]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #87922 - Manishearth:c-enum-target-spec, r=nagisa,eddyb
authorManish Goregaokar <manishsmail@gmail.com>
Thu, 12 Aug 2021 17:04:14 +0000 (10:04 -0700)
committerGitHub <noreply@github.com>
Thu, 12 Aug 2021 17:04:14 +0000 (10:04 -0700)
Add c_enum_min_bits target spec field, use for arm-none and thumb-none targets

Fixes https://github.com/rust-lang/rust/issues/87917

<s>Haven't tested this yet, still playing around.</s>

This seems to fix the issue.

1159 files changed:
Cargo.lock
compiler/rustc_ast_passes/src/feature_gate.rs
compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs
compiler/rustc_codegen_llvm/src/asm.rs
compiler/rustc_codegen_llvm/src/context.rs
compiler/rustc_codegen_llvm/src/intrinsic.rs
compiler/rustc_codegen_llvm/src/type_.rs
compiler/rustc_codegen_llvm/src/type_of.rs
compiler/rustc_codegen_llvm/src/va_arg.rs
compiler/rustc_codegen_ssa/src/back/symbol_export.rs
compiler/rustc_data_structures/src/graph/mod.rs
compiler/rustc_driver/src/lib.rs
compiler/rustc_error_codes/src/error_codes/E0530.md
compiler/rustc_errors/src/emitter.rs
compiler/rustc_errors/src/lib.rs
compiler/rustc_errors/src/snippet.rs
compiler/rustc_feature/src/active.rs
compiler/rustc_feature/src/builtin_attrs.rs
compiler/rustc_feature/src/removed.rs
compiler/rustc_infer/src/infer/mod.rs
compiler/rustc_infer/src/infer/opaque_types.rs [new file with mode: 0644]
compiler/rustc_interface/src/passes.rs
compiler/rustc_lexer/src/unescape.rs
compiler/rustc_lexer/src/unescape/tests.rs
compiler/rustc_lint/src/array_into_iter.rs
compiler/rustc_lint/src/builtin.rs
compiler/rustc_lint_defs/src/builtin.rs
compiler/rustc_metadata/src/locator.rs
compiler/rustc_middle/src/query/mod.rs
compiler/rustc_mir/src/borrow_check/mod.rs
compiler/rustc_mir/src/borrow_check/type_check/mod.rs
compiler/rustc_mir/src/interpret/intrinsics.rs
compiler/rustc_parse/src/lexer/unescape_error_reporting.rs
compiler/rustc_plugin_impl/src/build.rs [deleted file]
compiler/rustc_plugin_impl/src/lib.rs
compiler/rustc_plugin_impl/src/load.rs
compiler/rustc_session/src/session.rs
compiler/rustc_span/src/symbol.rs
compiler/rustc_symbol_mangling/src/legacy.rs
compiler/rustc_symbol_mangling/src/lib.rs
compiler/rustc_target/src/spec/mod.rs
compiler/rustc_target/src/spec/riscv32imc_esp_espidf.rs [new file with mode: 0644]
compiler/rustc_trait_selection/src/opaque_types.rs
compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs
compiler/rustc_typeck/src/check/_match.rs
compiler/rustc_typeck/src/check/check.rs
compiler/rustc_typeck/src/check/expr.rs
compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs
compiler/rustc_typeck/src/check/inherited.rs
compiler/rustc_typeck/src/check/intrinsic.rs
compiler/rustc_typeck/src/check/method/suggest.rs
compiler/rustc_typeck/src/check/pat.rs
compiler/rustc_typeck/src/check/regionck.rs
compiler/rustc_typeck/src/check/wfcheck.rs
compiler/rustc_typeck/src/check/writeback.rs
compiler/rustc_typeck/src/collect/type_of.rs
library/alloc/src/collections/mod.rs
library/alloc/tests/lib.rs
library/alloc/tests/string.rs
library/alloc/tests/vec.rs
library/alloc/tests/vec_deque.rs
library/core/src/convert/num.rs
library/core/src/hint.rs
library/core/src/intrinsics.rs
library/core/src/iter/traits/collect.rs
library/core/src/iter/traits/iterator.rs
library/core/src/lib.rs
library/core/src/option.rs
library/core/src/slice/specialize.rs
library/core/tests/lib.rs
library/core/tests/num/const_from.rs [new file with mode: 0644]
library/core/tests/num/mod.rs
library/core/tests/option.rs
library/core/tests/slice.rs
library/panic_unwind/src/lib.rs
library/std/Cargo.toml
library/std/build.rs
library/std/src/collections/hash/map/tests.rs
library/std/src/os/espidf/fs.rs [new file with mode: 0644]
library/std/src/os/espidf/mod.rs [new file with mode: 0644]
library/std/src/os/espidf/raw.rs [new file with mode: 0644]
library/std/src/os/mod.rs
library/std/src/os/unix/mod.rs
library/std/src/sys/common/alloc.rs
library/std/src/sys/unix/alloc.rs
library/std/src/sys/unix/args.rs
library/std/src/sys/unix/condvar.rs
library/std/src/sys/unix/env.rs
library/std/src/sys/unix/fd.rs
library/std/src/sys/unix/fs.rs
library/std/src/sys/unix/mod.rs
library/std/src/sys/unix/net.rs
library/std/src/sys/unix/os.rs
library/std/src/sys/unix/process/mod.rs
library/std/src/sys/unix/process/process_unsupported.rs [new file with mode: 0644]
library/std/src/sys/unix/rand.rs
library/std/src/sys/unix/thread.rs
library/std/src/sys/unix/time.rs
library/std/src/sys/windows/process.rs
library/std/src/sys_common/io.rs
library/std/src/sys_common/process.rs
library/std/src/thread/mod.rs
library/unwind/src/lib.rs
src/doc/book
src/doc/embedded-book
src/doc/nomicon
src/doc/reference
src/doc/rustc-dev-guide
src/doc/rustc/src/platform-support.md
src/doc/rustdoc/src/documentation-tests.md
src/doc/unstable-book/src/language-features/plugin-registrar.md [deleted file]
src/doc/unstable-book/src/language-features/plugin.md
src/etc/pre-commit.sh [changed mode: 0644->0755]
src/librustdoc/html/static/css/themes/ayu.css
src/test/codegen/align-enum.rs
src/test/codegen/align-struct.rs
src/test/codegen/unpadded-simd.rs [new file with mode: 0644]
src/test/rustdoc-ui/infinite-recursive-type-impl-trait-return.stderr
src/test/rustdoc-ui/infinite-recursive-type-impl-trait.stderr
src/test/rustdoc-ui/infinite-recursive-type.stderr
src/test/rustdoc-ui/intra-doc/ambiguity.stderr
src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.stderr
src/test/rustdoc-ui/intra-doc/errors.stderr
src/test/rustdoc-ui/intra-doc/field-ice.stderr
src/test/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.stderr
src/test/rustdoc-ui/intra-doc/prim-conflict.stderr
src/test/rustdoc-ui/invalid-syntax.stderr
src/test/rustdoc-ui/nocapture-fail.stderr
src/test/ui-fulldeps/auxiliary/empty-plugin.rs
src/test/ui-fulldeps/auxiliary/issue-40001-plugin.rs
src/test/ui-fulldeps/auxiliary/lint-for-crate-rpass.rs
src/test/ui-fulldeps/auxiliary/lint-for-crate.rs
src/test/ui-fulldeps/auxiliary/lint-group-plugin-test.rs
src/test/ui-fulldeps/auxiliary/lint-plugin-test.rs
src/test/ui-fulldeps/auxiliary/lint-tool-test.rs
src/test/ui-fulldeps/auxiliary/lto-syntax-extension-plugin.rs
src/test/ui-fulldeps/auxiliary/multiple-plugins-1.rs [new file with mode: 0644]
src/test/ui-fulldeps/auxiliary/multiple-plugins-2.rs [new file with mode: 0644]
src/test/ui-fulldeps/auxiliary/outlive-expansion-phase.rs
src/test/ui-fulldeps/auxiliary/rlib-crate-test.rs
src/test/ui-fulldeps/multiple-plugins.rs [new file with mode: 0644]
src/test/ui-fulldeps/multiple-plugins.stderr [new file with mode: 0644]
src/test/ui/anon-params/anon-params-denied-2018.stderr
src/test/ui/associated-consts/associated-const-ambiguity-report.stderr
src/test/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.rs
src/test/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.stderr
src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr
src/test/ui/associated-type-bounds/bounds-on-assoc-in-trait.stderr
src/test/ui/associated-type-bounds/inside-adt.stderr
src/test/ui/associated-type-bounds/type-alias.stderr
src/test/ui/associated-types/associated-type-projection-ambig-between-bound-and-where-clause.stderr
src/test/ui/associated-types/associated-type-projection-from-multiple-supertraits.stderr
src/test/ui/associated-types/associated-types-bound-failure.stderr
src/test/ui/associated-types/associated-types-eq-1.stderr
src/test/ui/associated-types/associated-types-eq-3.stderr
src/test/ui/associated-types/associated-types-for-unimpl-trait.stderr
src/test/ui/associated-types/associated-types-invalid-trait-ref-issue-18865.stderr
src/test/ui/associated-types/associated-types-multiple-types-one-trait.stderr
src/test/ui/associated-types/associated-types-no-suitable-bound.stderr
src/test/ui/associated-types/associated-types-no-suitable-supertrait-2.stderr
src/test/ui/associated-types/associated-types-no-suitable-supertrait.stderr
src/test/ui/associated-types/associated-types-path-1.stderr
src/test/ui/associated-types/associated-types-path-2.stderr
src/test/ui/associated-types/associated-types-project-from-hrtb-in-struct.stderr
src/test/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.stderr
src/test/ui/associated-types/associated-types-unsized.stderr
src/test/ui/associated-types/bound-lifetime-in-binding-only.elision.stderr
src/test/ui/associated-types/bound-lifetime-in-return-only.elision.stderr
src/test/ui/associated-types/defaults-cyclic-fail-1.stderr
src/test/ui/associated-types/defaults-cyclic-fail-2.stderr
src/test/ui/associated-types/defaults-suitability.stderr
src/test/ui/associated-types/defaults-unsound-62211-1.stderr
src/test/ui/associated-types/defaults-unsound-62211-2.stderr
src/test/ui/associated-types/hr-associated-type-bound-param-6.stderr
src/test/ui/associated-types/hr-associated-type-projection-1.stderr
src/test/ui/associated-types/impl-trait-return-missing-constraint.stderr
src/test/ui/associated-types/issue-20005.stderr
src/test/ui/associated-types/issue-22560.stderr
src/test/ui/associated-types/issue-27675-unchecked-bounds.stderr
src/test/ui/associated-types/issue-43784-associated-type.stderr
src/test/ui/associated-types/issue-54108.stderr
src/test/ui/associated-types/issue-63593.stderr
src/test/ui/associated-types/issue-87261.stderr
src/test/ui/associated-types/missing-associated-types.stderr
src/test/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr
src/test/ui/async-await/async-borrowck-escaping-block-error.stderr
src/test/ui/async-await/async-borrowck-escaping-closure-error.stderr
src/test/ui/async-await/await-keyword/2018-edition-error-in-non-macro-position.stderr
src/test/ui/async-await/await-keyword/2018-edition-error.stderr
src/test/ui/async-await/dont-suggest-missing-await.stderr
src/test/ui/async-await/issue-61076.stderr
src/test/ui/async-await/issue-70818.stderr
src/test/ui/async-await/issue-72590-type-error-sized.stderr
src/test/ui/async-await/issue-86507.stderr
src/test/ui/async-await/issues/issue-62097.nll.stderr
src/test/ui/async-await/issues/issue-63388-2.stderr
src/test/ui/async-await/issues/issue-65159.stderr
src/test/ui/async-await/issues/issue-78938-async-block.stderr
src/test/ui/async-await/pin-needed-to-poll.stderr
src/test/ui/async-await/suggest-missing-await-closure.stderr
src/test/ui/async-await/suggest-missing-await.stderr
src/test/ui/attributes/key-value-non-ascii.stderr
src/test/ui/binop/binary-op-on-double-ref.stderr
src/test/ui/binop/binop-consume-args.stderr
src/test/ui/binop/binop-move-semantics.stderr
src/test/ui/blind/blind-item-block-item-shadow.stderr
src/test/ui/blind/blind-item-item-shadow.stderr
src/test/ui/block-result/issue-5500.stderr
src/test/ui/block-result/unexpected-return-on-unit.stderr
src/test/ui/borrowck/borrowck-escaping-closure-error-1.stderr
src/test/ui/borrowck/borrowck-escaping-closure-error-2.stderr
src/test/ui/borrowck/borrowck-move-out-of-vec-tail.stderr
src/test/ui/borrowck/borrowck-unboxed-closures.stderr
src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr
src/test/ui/borrowck/issue-41962.stderr
src/test/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr
src/test/ui/borrowck/move-in-pattern-mut-in-loop.stderr
src/test/ui/borrowck/move-in-pattern-mut.stderr
src/test/ui/borrowck/move-in-pattern.stderr
src/test/ui/borrowck/mut-borrow-in-loop-2.stderr
src/test/ui/bound-suggestions.stderr
src/test/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr
src/test/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr
src/test/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr
src/test/ui/c-variadic/issue-86053-1.stderr
src/test/ui/c-variadic/variadic-ffi-6.stderr
src/test/ui/cast/issue-84213.stderr
src/test/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-4.stderr
src/test/ui/closures/2229_closure_analysis/migrations/auto_traits.stderr
src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.stderr
src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.stderr
src/test/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.stderr
src/test/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.stderr
src/test/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.stderr
src/test/ui/closures/2229_closure_analysis/migrations/precise.stderr
src/test/ui/closures/2229_closure_analysis/migrations/significant_drop.stderr
src/test/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr
src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.nll.stderr
src/test/ui/closures/closure-bounds-subtype.stderr
src/test/ui/closures/issue-41366.stderr
src/test/ui/closures/issue-67123.stderr
src/test/ui/closures/print/closure-print-generic-2.stderr
src/test/ui/closures/print/closure-print-generic-trim-off-verbose-2.stderr
src/test/ui/closures/print/closure-print-generic-verbose-2.stderr
src/test/ui/compare-method/bad-self-type.stderr
src/test/ui/conditional-compilation/cfg-attr-parse.stderr
src/test/ui/confuse-field-and-method/issue-18343.stderr
src/test/ui/confuse-field-and-method/issue-2392.stderr
src/test/ui/confuse-field-and-method/issue-32128.stderr
src/test/ui/confuse-field-and-method/issue-33784.stderr
src/test/ui/const-generics/closing-args-token.full.stderr
src/test/ui/const-generics/closing-args-token.min.stderr
src/test/ui/const-generics/const-argument-if-length.full.stderr
src/test/ui/const-generics/const-argument-if-length.min.stderr
src/test/ui/const-generics/const-expression-parameter.full.stderr
src/test/ui/const-generics/const-expression-parameter.min.stderr
src/test/ui/const-generics/const-param-shadowing.stderr
src/test/ui/const-generics/diagnostics.stderr
src/test/ui/const-generics/enum-variants.rs [new file with mode: 0644]
src/test/ui/const-generics/incorrect-number-of-const-args.full.stderr
src/test/ui/const-generics/incorrect-number-of-const-args.min.stderr
src/test/ui/const-generics/infer/cannot-infer-const-args.full.stderr
src/test/ui/const-generics/infer/cannot-infer-const-args.min.stderr
src/test/ui/const-generics/infer/issue-77092.stderr
src/test/ui/const-generics/infer/method-chain.full.stderr
src/test/ui/const-generics/infer/method-chain.min.stderr
src/test/ui/const-generics/infer/one-param-uninferred.full.stderr
src/test/ui/const-generics/infer/one-param-uninferred.min.stderr
src/test/ui/const-generics/infer/uninferred-consts.full.stderr
src/test/ui/const-generics/infer/uninferred-consts.min.stderr
src/test/ui/const-generics/invalid-enum.stderr
src/test/ui/const-generics/issues/issue-61336-2.full.stderr
src/test/ui/const-generics/issues/issue-61336-2.min.stderr
src/test/ui/const-generics/issues/issue-61336.full.stderr
src/test/ui/const-generics/issues/issue-61336.min.stderr
src/test/ui/const-generics/issues/issue-61336.stderr [deleted file]
src/test/ui/const-generics/issues/issue-76595.stderr
src/test/ui/const-generics/macro_rules-braces.full.stderr
src/test/ui/const-generics/macro_rules-braces.min.stderr
src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces-without-turbofish.stderr
src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.stderr
src/test/ui/const-generics/type-dependent/type-mismatch.full.stderr
src/test/ui/const-generics/type-dependent/type-mismatch.min.stderr
src/test/ui/constructor-lifetime-args.stderr
src/test/ui/consts/const-match-check.eval1.stderr
src/test/ui/consts/const-match-check.eval2.stderr
src/test/ui/consts/const-match-check.matchck.stderr
src/test/ui/deprecation/invalid-literal.stderr
src/test/ui/deref-suggestion.stderr
src/test/ui/destructuring-assignment/struct_destructure_fail.stderr
src/test/ui/destructuring-assignment/tuple_struct_destructure_fail.stderr
src/test/ui/did_you_mean/bad-assoc-ty.stderr
src/test/ui/did_you_mean/issue-40006.stderr
src/test/ui/did_you_mean/issue-40396.stderr
src/test/ui/did_you_mean/issue-42764.stderr
src/test/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr
src/test/ui/did_you_mean/issue-49746-unicode-confusable-in-float-literal-expt.stderr
src/test/ui/did_you_mean/issue-56028-there-is-an-enum-variant.stderr
src/test/ui/discrim/discrim-ill-typed.stderr
src/test/ui/diverging-tuple-parts-39485.stderr
src/test/ui/dst/dst-object-from-unsized-type.stderr
src/test/ui/dst/dst-sized-trait-param.stderr
src/test/ui/duplicate/duplicate-check-macro-exports.stderr
src/test/ui/dyn-keyword/dyn-2018-edition-lint.stderr
src/test/ui/dyn-keyword/dyn-2021-edition-error.stderr
src/test/ui/editions/edition-keywords-2015-2018-expansion.stderr
src/test/ui/editions/edition-keywords-2018-2015-parsing.stderr
src/test/ui/editions/edition-keywords-2018-2018-expansion.stderr
src/test/ui/editions/edition-keywords-2018-2018-parsing.stderr
src/test/ui/empty/empty-struct-braces-expr.stderr
src/test/ui/empty/empty-struct-braces-pat-1.stderr
src/test/ui/empty/empty-struct-braces-pat-2.stderr
src/test/ui/empty/empty-struct-braces-pat-3.stderr
src/test/ui/empty/empty-struct-tuple-pat.stderr
src/test/ui/empty/empty-struct-unit-expr.stderr
src/test/ui/empty/empty-struct-unit-pat.stderr
src/test/ui/error-codes/E0005.stderr
src/test/ui/error-codes/E0023.stderr
src/test/ui/error-codes/E0027.stderr
src/test/ui/error-codes/E0033-teach.stderr
src/test/ui/error-codes/E0033.stderr
src/test/ui/error-codes/E0034.stderr
src/test/ui/error-codes/E0106.stderr
src/test/ui/error-codes/E0107.stderr
src/test/ui/error-codes/E0221.stderr
src/test/ui/error-codes/E0252.stderr
src/test/ui/error-codes/E0254.stderr
src/test/ui/error-codes/E0255.stderr
src/test/ui/error-codes/E0277.stderr
src/test/ui/error-codes/E0423.stderr
src/test/ui/error-codes/E0424.stderr
src/test/ui/error-codes/E0429.stderr
src/test/ui/error-codes/E0605.stderr
src/test/ui/error-codes/E0615.stderr
src/test/ui/error-codes/E0617.stderr
src/test/ui/error-codes/E0618.stderr
src/test/ui/error-codes/E0642.stderr
src/test/ui/error-codes/E0746.stderr
src/test/ui/expr/if/if-no-match-bindings.stderr
src/test/ui/extern/extern-crate-rename.stderr
src/test/ui/extern/extern-types-unsized.stderr
src/test/ui/feature-gates/feature-gate-associated_type_bounds.stderr
src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr
src/test/ui/feature-gates/feature-gate-generic_associated_types.stderr
src/test/ui/feature-gates/feature-gate-in_band_lifetimes.stderr
src/test/ui/feature-gates/feature-gate-object_safe_for_dispatch.stderr
src/test/ui/feature-gates/feature-gate-plugin_registrar.rs [deleted file]
src/test/ui/feature-gates/feature-gate-plugin_registrar.stderr [deleted file]
src/test/ui/feature-gates/feature-gate-unsized_fn_params.stderr
src/test/ui/feature-gates/feature-gate-unsized_locals.stderr
src/test/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs
src/test/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr
src/test/ui/feature-gates/issue-43106-gating-of-macro_use.stderr
src/test/ui/float-literal-inference-restrictions.stderr
src/test/ui/fmt/format-string-error-2.rs
src/test/ui/fmt/format-string-error-2.stderr
src/test/ui/fmt/ifmt-bad-format-args.stderr
src/test/ui/fn/fn-compare-mismatch.stderr
src/test/ui/foreign-fn-return-lifetime.stderr
src/test/ui/generic-associated-types/constraint-assoc-type-suggestion.stderr
src/test/ui/generic-associated-types/gat-trait-path-generic-type-arg.stderr
src/test/ui/generic-associated-types/gat-trait-path-missing-lifetime.stderr
src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr
src/test/ui/generic-associated-types/generic-associated-types-where.stderr
src/test/ui/generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr
src/test/ui/generic-associated-types/impl_bounds.stderr
src/test/ui/generic-associated-types/issue-68641-check-gat-bounds.stderr
src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr
src/test/ui/generic-associated-types/issue-68643-broken-mir.stderr
src/test/ui/generic-associated-types/issue-68644-codegen-selection.stderr
src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr
src/test/ui/generic-associated-types/issue-68656-unsized-values.stderr
src/test/ui/generic-associated-types/issue-70304.stderr
src/test/ui/generic-associated-types/issue-71176.stderr
src/test/ui/generic-associated-types/issue-74816.stderr
src/test/ui/generic-associated-types/issue-74824.stderr
src/test/ui/generic-associated-types/issue-76535.stderr
src/test/ui/generic-associated-types/issue-78113-lifetime-mismatch-dyn-trait-box.stderr
src/test/ui/generic-associated-types/issue-78671.stderr
src/test/ui/generic-associated-types/issue-79422.stderr
src/test/ui/generic-associated-types/issue-79636-1.stderr
src/test/ui/generic-associated-types/issue-79636-2.stderr
src/test/ui/generic-associated-types/issue-80433.stderr
src/test/ui/generic-associated-types/issue-81712-cyclic-traits.stderr
src/test/ui/generic-associated-types/issue-81862.stderr
src/test/ui/generic-associated-types/missing-bounds.stderr
src/test/ui/generic-associated-types/missing_lifetime_args.stderr
src/test/ui/generic-associated-types/missing_lifetime_const.stderr
src/test/ui/generic-associated-types/parameter_number_and_kind.stderr
src/test/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr
src/test/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr
src/test/ui/generic-associated-types/projection-bound-cycle-generic.stderr
src/test/ui/generic-associated-types/projection-bound-cycle.stderr
src/test/ui/generics/generic-extern-lifetime.stderr
src/test/ui/generics/generic-impl-less-params-with-defaults.stderr
src/test/ui/generics/generic-type-less-params-with-defaults.stderr
src/test/ui/generics/issue-65285-incorrect-explicit-lifetime-name-needed.stderr
src/test/ui/generics/wrong-number-of-args.stderr
src/test/ui/hrtb/hrtb-higher-ranker-supertraits-transitive.stderr
src/test/ui/hrtb/hrtb-higher-ranker-supertraits.stderr
src/test/ui/hygiene/expansion-info-reset.stderr
src/test/ui/hygiene/rustc-macro-transparency.stderr
src/test/ui/impl-header-lifetime-elision/assoc-type.stderr
src/test/ui/impl-trait/bound-normalization-fail.stderr
src/test/ui/impl-trait/does-not-live-long-enough.stderr
src/test/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr
src/test/ui/impl-trait/equality2.stderr
src/test/ui/impl-trait/explicit-generic-args-with-impl-trait/not-enough-args.stderr
src/test/ui/impl-trait/impl-generic-mismatch.stderr
src/test/ui/impl-trait/issue-55872-1.full_tait.stderr [new file with mode: 0644]
src/test/ui/impl-trait/issue-55872-1.rs
src/test/ui/impl-trait/issue-55872-1.stderr
src/test/ui/impl-trait/issue-55872-2.rs
src/test/ui/impl-trait/issue-55872-2.stderr
src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr
src/test/ui/impl-trait/must_outlive_least_region_or_bound.stderr
src/test/ui/impl-trait/object-unsafe-trait-in-return-position-dyn-trait.stderr
src/test/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.stderr
src/test/ui/impl-trait/point-to-type-err-cause-on-impl-trait-return.stderr
src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr
src/test/ui/impl-trait/static-return-lifetime-infered.stderr
src/test/ui/implicit-method-bind.stderr
src/test/ui/imports/double-import.stderr
src/test/ui/imports/glob-resolve1.stderr
src/test/ui/imports/issue-19498.stderr
src/test/ui/imports/issue-24081.stderr
src/test/ui/imports/issue-25396.stderr
src/test/ui/imports/issue-32354-suggest-import-rename.stderr
src/test/ui/imports/issue-45829/import-self.stderr
src/test/ui/imports/issue-45829/issue-45829.stderr
src/test/ui/imports/issue-45829/rename-use-vs-extern.stderr
src/test/ui/imports/issue-45829/rename-use-with-tabs.stderr
src/test/ui/imports/issue-45829/rename-with-path.stderr
src/test/ui/imports/issue-45829/rename.stderr
src/test/ui/imports/issue-52891.stderr
src/test/ui/imports/issue-59764.stderr
src/test/ui/imports/issue-8640.stderr
src/test/ui/in-band-lifetimes/issue-61124-anon-lifetime-in-struct-declaration.stderr
src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.stderr
src/test/ui/indexing-requires-a-uint.stderr
src/test/ui/inference/cannot-infer-closure.stderr
src/test/ui/inference/cannot-infer-partial-try-return.stderr
src/test/ui/inference/inference_unstable_featured.stderr
src/test/ui/infinite/infinite-autoderef.stderr
src/test/ui/infinite/infinite-struct.stderr
src/test/ui/infinite/infinite-tag-type-recursion.stderr
src/test/ui/integer-literal-suffix-inference.stderr
src/test/ui/issues/issue-10412.stderr
src/test/ui/issues/issue-13359.stderr
src/test/ui/issues/issue-13497.stderr
src/test/ui/issues/issue-1362.stderr
src/test/ui/issues/issue-13853-2.stderr
src/test/ui/issues/issue-14092.stderr
src/test/ui/issues/issue-1448-2.stderr
src/test/ui/issues/issue-16922.stderr
src/test/ui/issues/issue-17431-1.stderr
src/test/ui/issues/issue-17431-2.stderr
src/test/ui/issues/issue-17431-3.stderr
src/test/ui/issues/issue-17431-4.stderr
src/test/ui/issues/issue-17431-5.stderr
src/test/ui/issues/issue-17431-6.stderr
src/test/ui/issues/issue-17431-7.stderr
src/test/ui/issues/issue-17546.stderr
src/test/ui/issues/issue-17800.stderr
src/test/ui/issues/issue-18446.stderr
src/test/ui/issues/issue-19380.stderr
src/test/ui/issues/issue-19707.stderr
src/test/ui/issues/issue-21837.stderr
src/test/ui/issues/issue-21946.stderr
src/test/ui/issues/issue-22289.stderr
src/test/ui/issues/issue-22312.stderr
src/test/ui/issues/issue-22644.stderr
src/test/ui/issues/issue-22872.stderr
src/test/ui/issues/issue-23024.stderr
src/test/ui/issues/issue-23122-1.stderr
src/test/ui/issues/issue-23122-2.stderr
src/test/ui/issues/issue-26472.stderr
src/test/ui/issues/issue-26638.stderr
src/test/ui/issues/issue-27078.stderr
src/test/ui/issues/issue-2718-a.stderr
src/test/ui/issues/issue-29181.stderr
src/test/ui/issues/issue-2995.stderr
src/test/ui/issues/issue-3008-1.stderr
src/test/ui/issues/issue-3008-2.stderr
src/test/ui/issues/issue-3008-3.stderr
src/test/ui/issues/issue-30255.stderr
src/test/ui/issues/issue-32004.stderr
src/test/ui/issues/issue-32122-1.stderr
src/test/ui/issues/issue-32122-2.stderr
src/test/ui/issues/issue-32323.stderr
src/test/ui/issues/issue-32326.stderr
src/test/ui/issues/issue-34721.stderr
src/test/ui/issues/issue-35075.stderr
src/test/ui/issues/issue-35241.stderr
src/test/ui/issues/issue-35668.stderr
src/test/ui/issues/issue-35675.stderr
src/test/ui/issues/issue-35988.stderr
src/test/ui/issues/issue-3702-2.stderr
src/test/ui/issues/issue-3779.stderr
src/test/ui/issues/issue-38954.stderr
src/test/ui/issues/issue-41229-ref-str.stderr
src/test/ui/issues/issue-41652/issue-41652.stderr
src/test/ui/issues/issue-42312.stderr
src/test/ui/issues/issue-42954.stderr
src/test/ui/issues/issue-43784-supertrait.stderr
src/test/ui/issues/issue-47377.stderr
src/test/ui/issues/issue-47380.stderr
src/test/ui/issues/issue-49257.stderr
src/test/ui/issues/issue-50571.stderr
src/test/ui/issues/issue-50687-ice-on-borrow.stderr
src/test/ui/issues/issue-5099.stderr
src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr
src/test/ui/issues/issue-51874.stderr
src/test/ui/issues/issue-5239-1.stderr
src/test/ui/issues/issue-56685.stderr
src/test/ui/issues/issue-57271.stderr
src/test/ui/issues/issue-5883.stderr
src/test/ui/issues/issue-59488.stderr
src/test/ui/issues/issue-60283.stderr
src/test/ui/issues/issue-65634-raw-ident-suggestion.stderr
src/test/ui/issues/issue-6738.stderr
src/test/ui/issues/issue-69130.stderr
src/test/ui/issues/issue-71676-1.stderr
src/test/ui/issues/issue-71676-2.stderr
src/test/ui/issues/issue-72554.stderr
src/test/ui/issues/issue-72574-1.stderr
src/test/ui/issues/issue-72574-2.stderr
src/test/ui/issues/issue-73427.stderr
src/test/ui/issues/issue-76077-1.stderr
src/test/ui/issues/issue-76191.stderr
src/test/ui/issues/issue-77218.stderr
src/test/ui/issues/issue-78720.stderr
src/test/ui/issues/issue-83924.stderr
src/test/ui/issues/issue-86756.stderr
src/test/ui/issues/issue-87199.stderr
src/test/ui/issues/issue-8761.stderr
src/test/ui/iterators/into-iter-on-arrays-2018.stderr
src/test/ui/iterators/into-iter-on-arrays-lint.stderr
src/test/ui/keyword/extern/keyword-extern-as-identifier-pat.stderr
src/test/ui/keyword/extern/keyword-extern-as-identifier-use.stderr
src/test/ui/kindck/kindck-impl-type-params.nll.stderr
src/test/ui/kindck/kindck-impl-type-params.stderr
src/test/ui/label/label_misspelled.stderr
src/test/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr
src/test/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr
src/test/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.stderr
src/test/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.stderr
src/test/ui/lint/bare-trait-objects-path.stderr
src/test/ui/lint/fn_must_use.stderr
src/test/ui/lint/force-warn/force-lint-in-allowed-group.stderr
src/test/ui/lint/force-warn/force-warn-cap-lints-allow.stderr
src/test/ui/lint/force-warn/force-warn-cap-lints-warn.stderr
src/test/ui/lint/force-warn/force-warn-group-allow-warning.stderr
src/test/ui/lint/force-warn/force-warn-group.stderr
src/test/ui/lint/inclusive-range-pattern-syntax.stderr
src/test/ui/lint/lint-non-snake-case-identifiers-suggestion-reserved.stderr
src/test/ui/lint/recommend-literal.stderr
src/test/ui/lint/renamed-lints-still-apply.stderr
src/test/ui/lint/unused-borrows.stderr
src/test/ui/lint/unused/issue-67691-unused-field-in-or-pattern.stderr
src/test/ui/lint/unused/issue-85913.stderr
src/test/ui/lint/unused/must-use-ops.stderr
src/test/ui/lint/unused/unused-doc-comments-edge-cases.stderr
src/test/ui/loops/loop-break-value-no-repeat.stderr
src/test/ui/loops/loop-break-value.stderr
src/test/ui/loops/loop-no-implicit-break.stderr
src/test/ui/macros/bad_hello.stderr
src/test/ui/macros/derive-in-eager-expansion-hang.stderr
src/test/ui/macros/empty-trailing-stmt.stderr
src/test/ui/macros/format-foreign.stderr
src/test/ui/macros/format-parse-errors.stderr
src/test/ui/macros/issue-30143.stderr
src/test/ui/macros/issue-34421-mac-expr-bad-stmt-good-add-semi.stderr
src/test/ui/macros/macro-backtrace-invalid-internals.stderr
src/test/ui/macros/macro-in-expression-context-2.stderr
src/test/ui/macros/macro-or-patterns-back-compat.stderr
src/test/ui/macros/macros-nonfatal-errors.stderr
src/test/ui/malformed/malformed-meta-delim.stderr
src/test/ui/match/match-pattern-field-mismatch.stderr
src/test/ui/meta/expected-error-correct-rev.a.stderr
src/test/ui/meta/meta-expected-error-wrong-rev.a.stderr
src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr
src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr
src/test/ui/methods/method-ambig-two-traits-from-bounds.stderr
src/test/ui/methods/method-ambig-two-traits-from-impls.stderr
src/test/ui/methods/method-ambig-two-traits-from-impls2.stderr
src/test/ui/methods/method-ambig-two-traits-with-default-method.stderr
src/test/ui/methods/method-call-lifetime-args-fail.stderr
src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr
src/test/ui/methods/method-missing-call.stderr
src/test/ui/methods/method-on-ambiguous-numeric-type.stderr
src/test/ui/mir/issue-80742.stderr
src/test/ui/mismatched_types/abridged.stderr
src/test/ui/mismatched_types/cast-rfc0401.stderr
src/test/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.stderr
src/test/ui/mismatched_types/closure-arg-count.stderr
src/test/ui/mismatched_types/issue-26480.stderr
src/test/ui/mismatched_types/issue-74918-missing-lifetime.stderr
src/test/ui/mismatched_types/numeric-literal-cast.stderr
src/test/ui/mismatched_types/recovered-block.stderr
src/test/ui/missing/missing-fields-in-struct-pattern.stderr
src/test/ui/missing/missing-items/missing-type-parameter2.stderr
src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.stderr
src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.stderr
src/test/ui/multiple-plugin-registrars.rs [deleted file]
src/test/ui/multiple-plugin-registrars.stderr [deleted file]
src/test/ui/namespace/namespace-mix.stderr
src/test/ui/never_type/issue-52443.stderr
src/test/ui/nll/issue-53807.stderr
src/test/ui/nll/issue-54382-use-span-of-tail-of-block.stderr
src/test/ui/nll/issue-54556-niconii.stderr
src/test/ui/nll/issue-54556-stephaneyfx.stderr
src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr
src/test/ui/nll/issue-54556-used-vs-unused-tails.stderr
src/test/ui/nll/ty-outlives/impl-trait-captures.stderr
src/test/ui/no-std-inject.stderr
src/test/ui/non-fmt-panic.stderr
src/test/ui/numeric/const-scope.stderr
src/test/ui/numeric/len.stderr
src/test/ui/numeric/numeric-cast-2.stderr
src/test/ui/numeric/numeric-cast-binop.stderr
src/test/ui/numeric/numeric-cast-no-fix.stderr
src/test/ui/numeric/numeric-cast.stderr
src/test/ui/numeric/numeric-suffix.stderr
src/test/ui/object-lifetime/object-lifetime-default-from-box-error.stderr
src/test/ui/object-safety/object-safety-no-static.curr.stderr
src/test/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr
src/test/ui/object-safety/object-safety-no-static.stderr [deleted file]
src/test/ui/obsolete-in-place/bad.stderr
src/test/ui/occurs-check-2.stderr
src/test/ui/occurs-check.stderr
src/test/ui/once-cant-call-twice-on-heap.stderr
src/test/ui/or-patterns/issue-69875-should-have-been-expanded-earlier-non-exhaustive.stderr
src/test/ui/packed/issue-27060-2.stderr
src/test/ui/panics/panic-2021.stderr
src/test/ui/parenthesized-deref-suggestion.stderr
src/test/ui/parser/bad-crate-name.stderr
src/test/ui/parser/bad-value-ident-false.stderr
src/test/ui/parser/bad-value-ident-true.stderr
src/test/ui/parser/bare-struct-body.stderr
src/test/ui/parser/byte-literals.stderr
src/test/ui/parser/byte-string-literals.stderr
src/test/ui/parser/chained-comparison-suggestion.stderr
src/test/ui/parser/doc-comment-in-stmt.stderr
src/test/ui/parser/dotdotdot-expr.stderr
src/test/ui/parser/expr-as-stmt-2.stderr
src/test/ui/parser/expr-as-stmt.stderr
src/test/ui/parser/fn-body-eq-expr-semi.stderr
src/test/ui/parser/fn-header-semantic-fail.stderr
src/test/ui/parser/incorrect-move-async-order-issue-79694.stderr
src/test/ui/parser/inverted-parameters.stderr
src/test/ui/parser/issue-32214.stderr
src/test/ui/parser/issue-35813-postfix-after-cast.stderr
src/test/ui/parser/issue-44406.stderr
src/test/ui/parser/issue-57198.stderr
src/test/ui/parser/issue-62524.stderr
src/test/ui/parser/issue-62554.stderr
src/test/ui/parser/issue-62895.stderr
src/test/ui/parser/issue-62973.stderr
src/test/ui/parser/issue-64732.stderr
src/test/ui/parser/issue-65257-invalid-var-decl-recovery.stderr
src/test/ui/parser/issue-68629.stderr
src/test/ui/parser/issue-68730.stderr
src/test/ui/parser/issue-68890-2.stderr
src/test/ui/parser/issue-72373.stderr
src/test/ui/parser/issue-73568-lifetime-after-mut.stderr
src/test/ui/parser/issue-81806.stderr
src/test/ui/parser/keyword-abstract.stderr
src/test/ui/parser/keyword-as-as-identifier.stderr
src/test/ui/parser/keyword-break-as-identifier.stderr
src/test/ui/parser/keyword-const-as-identifier.stderr
src/test/ui/parser/keyword-continue-as-identifier.stderr
src/test/ui/parser/keyword-else-as-identifier.stderr
src/test/ui/parser/keyword-enum-as-identifier.stderr
src/test/ui/parser/keyword-final.stderr
src/test/ui/parser/keyword-fn-as-identifier.stderr
src/test/ui/parser/keyword-for-as-identifier.stderr
src/test/ui/parser/keyword-if-as-identifier.stderr
src/test/ui/parser/keyword-impl-as-identifier.stderr
src/test/ui/parser/keyword-let-as-identifier.stderr
src/test/ui/parser/keyword-loop-as-identifier.stderr
src/test/ui/parser/keyword-match-as-identifier.stderr
src/test/ui/parser/keyword-mod-as-identifier.stderr
src/test/ui/parser/keyword-move-as-identifier.stderr
src/test/ui/parser/keyword-override.stderr
src/test/ui/parser/keyword-pub-as-identifier.stderr
src/test/ui/parser/keyword-return-as-identifier.stderr
src/test/ui/parser/keyword-static-as-identifier.stderr
src/test/ui/parser/keyword-struct-as-identifier.stderr
src/test/ui/parser/keyword-trait-as-identifier.stderr
src/test/ui/parser/keyword-try-as-identifier-edition2018.stderr
src/test/ui/parser/keyword-type-as-identifier.stderr
src/test/ui/parser/keyword-typeof.stderr
src/test/ui/parser/keyword-unsafe-as-identifier.stderr
src/test/ui/parser/keyword-use-as-identifier.stderr
src/test/ui/parser/keyword-where-as-identifier.stderr
src/test/ui/parser/keyword-while-as-identifier.stderr
src/test/ui/parser/keyword.stderr
src/test/ui/parser/lex-bad-char-literals-2.stderr
src/test/ui/parser/lex-bad-char-literals-3.stderr
src/test/ui/parser/lex-bad-char-literals-5.stderr
src/test/ui/parser/lex-bad-char-literals-6.stderr
src/test/ui/parser/lifetime-in-pattern.stderr
src/test/ui/parser/lifetime_starts_expressions.stderr
src/test/ui/parser/macro-keyword.stderr
src/test/ui/parser/macro/trait-object-macro-matcher.stderr
src/test/ui/parser/macros-no-semicolon-items.stderr
src/test/ui/parser/match-arm-without-braces.stderr
src/test/ui/parser/match-arrows-block-then-binop.stderr
src/test/ui/parser/mbe_missing_right_paren.stderr
src/test/ui/parser/mut-patterns.stderr
src/test/ui/parser/new-unicode-escapes-1.stderr
src/test/ui/parser/no-const-fn-in-extern-block.stderr
src/test/ui/parser/omitted-arg-in-item-fn.stderr
src/test/ui/parser/pat-lt-bracket-2.stderr
src/test/ui/parser/range_inclusive_dotdotdot.stderr
src/test/ui/parser/recover-assoc-eq-missing-term.stderr
src/test/ui/parser/recover-from-bad-variant.stderr
src/test/ui/parser/recover-from-homoglyph.stderr
src/test/ui/parser/recover-range-pats.stderr
src/test/ui/parser/require-parens-for-chained-comparison.stderr
src/test/ui/parser/struct-literal-in-for.stderr
src/test/ui/parser/struct-literal-in-if.stderr
src/test/ui/parser/struct-literal-in-match-discriminant.stderr
src/test/ui/parser/struct-literal-in-while.stderr
src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr
src/test/ui/parser/struct-literal-variant-in-if.stderr
src/test/ui/parser/trait-object-delimiters.stderr
src/test/ui/parser/trait-object-trait-parens.stderr
src/test/ui/parser/unicode-chars.stderr
src/test/ui/parser/unicode-quote-chars.stderr
src/test/ui/partialeq_help.stderr
src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.stderr
src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.stderr
src/test/ui/pattern/issue-67037-pat-tup-scrut-ty-diff-less-fields.stderr
src/test/ui/pattern/issue-74539.stderr
src/test/ui/pattern/issue-74702.stderr
src/test/ui/pattern/pat-tuple-underfield.stderr
src/test/ui/pattern/pattern-error-continue.stderr
src/test/ui/pattern/usefulness/non-exhaustive-defined-here.stderr
src/test/ui/phantom-auto-trait.stderr
src/test/ui/placement-syntax.stderr
src/test/ui/pptypedef.stderr
src/test/ui/privacy/privacy-ns1.stderr
src/test/ui/privacy/privacy-ns2.stderr
src/test/ui/privacy/private-in-public-warn.stderr
src/test/ui/proc-macro/item-error.stderr
src/test/ui/proc-macro/span-preservation.stderr
src/test/ui/pub/pub-ident-fn-2.stderr
src/test/ui/pub/pub-ident-fn-with-lifetime-2.stderr
src/test/ui/pub/pub-ident-fn-with-lifetime.stderr
src/test/ui/pub/pub-ident-fn.stderr
src/test/ui/pub/pub-ident-struct-with-lifetime.stderr
src/test/ui/pub/pub-ident-struct.stderr
src/test/ui/question-mark-type-infer.stderr
src/test/ui/range/range-inclusive-pattern-precedence.stderr
src/test/ui/range/range-inclusive-pattern-precedence2.stderr
src/test/ui/recursion/recursive-enum.stderr
src/test/ui/ref-suggestion.stderr
src/test/ui/regions/region-borrow-params-issue-29793-big.stderr
src/test/ui/regions/region-borrow-params-issue-29793-small.stderr
src/test/ui/regions/region-object-lifetime-in-coercion.stderr
src/test/ui/regions/regions-close-object-into-object-2.stderr
src/test/ui/regions/regions-close-object-into-object-4.stderr
src/test/ui/regions/regions-in-enums-anon.stderr
src/test/ui/regions/regions-in-structs-anon.stderr
src/test/ui/regions/regions-name-undeclared.stderr
src/test/ui/regions/regions-proc-bound-capture.stderr
src/test/ui/reify-intrinsic.stderr
src/test/ui/repeat_count.stderr
src/test/ui/reserved/reserved-become.stderr
src/test/ui/resolve/issue-2356.stderr
src/test/ui/resolve/issue-39226.stderr
src/test/ui/resolve/issue-5035-2.stderr
src/test/ui/resolve/issue-5035.stderr
src/test/ui/resolve/privacy-enum-ctor.stderr
src/test/ui/resolve/resolve-conflict-import-vs-extern-crate.stderr
src/test/ui/resolve/resolve-conflict-item-vs-import.stderr
src/test/ui/resolve/resolve-conflict-type-vs-import.stderr
src/test/ui/resolve/resolve-hint-macro.stderr
src/test/ui/resolve/suggest-path-instead-of-mod-dot-item.stderr
src/test/ui/return/issue-82612-return-mutable-reference.stderr
src/test/ui/return/return-type.stderr
src/test/ui/return/tail-expr-as-potential-return.stderr
src/test/ui/rfc-2008-non-exhaustive/struct.stderr
src/test/ui/rfc-2008-non-exhaustive/variant.stderr
src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.stderr
src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.stderr
src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.stderr
src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr
src/test/ui/rfc-2093-infer-outlives/regions-struct-not-wf.stderr
src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr
src/test/ui/rfc-2497-if-let-chains/feature-gate.stderr
src/test/ui/rfc-2565-param-attrs/param-attrs-2018.stderr
src/test/ui/rfc-2632-const-trait-impl/const-impl-recovery.stderr
src/test/ui/rfc1623-2.stderr
src/test/ui/rust-2018/dyn-trait-compatibility.stderr
src/test/ui/rust-2018/edition-lint-infer-outlives-multispan.stderr
src/test/ui/rust-2021/future-prelude-collision-generic.stderr
src/test/ui/rust-2021/future-prelude-collision-imported.stderr
src/test/ui/rust-2021/future-prelude-collision-shadow.stderr
src/test/ui/rust-2021/future-prelude-collision.stderr
src/test/ui/rust-2021/generic-type-collision.stderr
src/test/ui/rust-2021/inherent-dyn-collision.stderr
src/test/ui/rust-2021/reserved-prefixes-migration.stderr
src/test/ui/rust-2021/reserved-prefixes.stderr
src/test/ui/sanitize/memory.rs
src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.nll.stderr
src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr
src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.nll.stderr
src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr
src/test/ui/self/point-at-arbitrary-self-type-method.stderr
src/test/ui/self/point-at-arbitrary-self-type-trait-method.stderr
src/test/ui/self/self-infer.stderr
src/test/ui/shift-various-bad-types.stderr
src/test/ui/single-use-lifetime/one-use-in-fn-argument.stderr
src/test/ui/single-use-lifetime/one-use-in-inherent-method-argument.stderr
src/test/ui/single-use-lifetime/one-use-in-trait-method-argument.stderr
src/test/ui/sized-cycle-note.stderr
src/test/ui/span/E0072.stderr
src/test/ui/span/coerce-suggestions.stderr
src/test/ui/span/destructor-restrictions.stderr
src/test/ui/span/issue-23338-locals-die-before-temps-of-body.stderr
src/test/ui/span/issue-34264.stderr
src/test/ui/span/issue-37767.stderr
src/test/ui/span/issue-39018.stderr
src/test/ui/span/issue-7575.stderr
src/test/ui/span/issue-81800.stderr
src/test/ui/span/missing-unit-argument.stderr
src/test/ui/span/multiline-span-E0072.stderr
src/test/ui/span/recursive-type-field.stderr
src/test/ui/span/type-annotations-needed-expr.stderr
src/test/ui/specialization/deafult-associated-type-bound-2.stderr
src/test/ui/specialization/deafult-generic-associated-type-bound.stderr
src/test/ui/specialization/defaultimpl/specialization-wfcheck.stderr
src/test/ui/specialization/issue-33017.stderr
src/test/ui/specialization/issue-51892.stderr
src/test/ui/str/str-array-assignment.stderr
src/test/ui/str/str-as-char.stderr
src/test/ui/str/str-concat-on-double-ref.stderr
src/test/ui/str/str-escape.rs [new file with mode: 0644]
src/test/ui/str/str-escape.stderr [new file with mode: 0644]
src/test/ui/str/str-lit-type-mismatch.stderr
src/test/ui/str/str-mut-idx.stderr
src/test/ui/structs-enums/struct-rec/issue-74224.stderr
src/test/ui/structs-enums/struct-rec/issue-84611.stderr
src/test/ui/structs-enums/struct-rec/mutual-struct-recursion.stderr
src/test/ui/structs/struct-field-cfg.stderr
src/test/ui/structs/struct-pat-derived-error.stderr
src/test/ui/structs/struct-tuple-field-names.stderr
src/test/ui/substs-ppaux.normal.stderr
src/test/ui/substs-ppaux.verbose.stderr
src/test/ui/suggestions/adt-param-with-implicit-sized-bound.stderr
src/test/ui/suggestions/as-ref-2.stderr
src/test/ui/suggestions/as-ref.stderr
src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr
src/test/ui/suggestions/const-in-struct-pat.stderr
src/test/ui/suggestions/constrain-trait.stderr
src/test/ui/suggestions/dont-suggest-ref/duplicate-suggestions.stderr
src/test/ui/suggestions/dont-suggest-ref/simple.stderr
src/test/ui/suggestions/expected-boxed-future-isnt-pinned.stderr
src/test/ui/suggestions/field-access.stderr
src/test/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr
src/test/ui/suggestions/fn-missing-lifetime-in-item.stderr
src/test/ui/suggestions/fn-or-tuple-struct-without-args.stderr
src/test/ui/suggestions/for-i-in-vec.stderr
src/test/ui/suggestions/format-borrow.stderr
src/test/ui/suggestions/if-let-typo.stderr
src/test/ui/suggestions/imm-ref-trait-object-literal.stderr
src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.nll.stderr
src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.stderr
src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound.stderr
src/test/ui/suggestions/impl-trait-missing-lifetime.stderr
src/test/ui/suggestions/impl-trait-with-missing-bounds.stderr
src/test/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.stderr
src/test/ui/suggestions/issue-21673.stderr
src/test/ui/suggestions/issue-52820.stderr
src/test/ui/suggestions/issue-59819.stderr
src/test/ui/suggestions/issue-61963.stderr
src/test/ui/suggestions/issue-64252-self-type.stderr
src/test/ui/suggestions/issue-72766.stderr
src/test/ui/suggestions/issue-79843-impl-trait-with-missing-bounds-on-async-fn.stderr
src/test/ui/suggestions/issue-82361.stderr
src/test/ui/suggestions/issue-82566-1.stderr
src/test/ui/suggestions/issue-82566-2.stderr
src/test/ui/suggestions/issue-84592.stderr
src/test/ui/suggestions/issue-85347.stderr
src/test/ui/suggestions/issue-86100-tuple-paren-comma.stderr
src/test/ui/suggestions/issue-86667.stderr
src/test/ui/suggestions/lifetimes/trait-object-nested-in-impl-trait.nll.stderr
src/test/ui/suggestions/lifetimes/trait-object-nested-in-impl-trait.stderr
src/test/ui/suggestions/match-needing-semi.stderr
src/test/ui/suggestions/match-prev-arm-needing-semi.stderr
src/test/ui/suggestions/method-missing-parentheses.stderr
src/test/ui/suggestions/missing-lifetime-in-assoc-const-type.stderr
src/test/ui/suggestions/missing-lifetime-specifier.stderr
src/test/ui/suggestions/missing-lt-for-hrtb.stderr
src/test/ui/suggestions/missing-trait-bound-for-op.stderr
src/test/ui/suggestions/missing-trait-bounds-for-method-call.stderr
src/test/ui/suggestions/multibyte-escapes.stderr
src/test/ui/suggestions/mut-ref-reassignment.stderr
src/test/ui/suggestions/non-existent-field-present-in-subfield.stderr
src/test/ui/suggestions/object-unsafe-trait-should-use-self.stderr
src/test/ui/suggestions/object-unsafe-trait-should-use-where-sized.stderr
src/test/ui/suggestions/opaque-type-error.stderr
src/test/ui/suggestions/option-content-move.stderr
src/test/ui/suggestions/path-by-value.stderr
src/test/ui/suggestions/raw-byte-string-prefix.stderr
src/test/ui/suggestions/raw-name-use-suggestion.stderr
src/test/ui/suggestions/recover-missing-turbofish-surrounding-angle-braket.stderr
src/test/ui/suggestions/restrict-type-argument.stderr
src/test/ui/suggestions/return-elided-lifetime.stderr
src/test/ui/suggestions/return-without-lifetime.stderr
src/test/ui/suggestions/suggest-box.stderr
src/test/ui/suggestions/suggest-change-mut.stderr
src/test/ui/suggestions/suggest-closure-return-type-1.stderr
src/test/ui/suggestions/suggest-closure-return-type-2.stderr
src/test/ui/suggestions/suggest-closure-return-type-3.stderr
src/test/ui/suggestions/suggest-move-types.stderr
src/test/ui/suggestions/suggest-on-bare-closure-call.stderr
src/test/ui/suggestions/suggest-std-when-using-type.stderr
src/test/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.stderr
src/test/ui/suggestions/trait-with-missing-associated-type-restriction.stderr
src/test/ui/suggestions/try-operator-dont-suggest-semicolon.stderr
src/test/ui/suggestions/unsized-function-parameter.stderr
src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr
src/test/ui/tag-type-args.stderr
src/test/ui/tail-typeck.stderr
src/test/ui/terminal-width/non-1-width-unicode-multiline-label.stderr
src/test/ui/trait-bounds/unsized-bound.stderr
src/test/ui/trait-impl-bound-suggestions.stderr
src/test/ui/traits/alias/ambiguous.stderr
src/test/ui/traits/alias/wf.stderr
src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.stderr
src/test/ui/traits/bad-method-typaram-kind.stderr
src/test/ui/traits/bound/not-on-bare-trait.stderr
src/test/ui/traits/bound/not-on-struct.stderr
src/test/ui/traits/bound/on-structs-and-enums.stderr
src/test/ui/traits/inductive-overflow/two-traits.stderr
src/test/ui/traits/inheritance/repeated-supertrait-ambig.stderr
src/test/ui/traits/issue-65284-suggest-generic-trait-bound.stderr
src/test/ui/traits/issue-72410.stderr
src/test/ui/traits/issue-78372.stderr
src/test/ui/traits/multidispatch-bad.stderr
src/test/ui/traits/object/safety.stderr
src/test/ui/traits/object/vs-lifetime.stderr
src/test/ui/traits/resolution-in-overloaded-op.stderr
src/test/ui/traits/suggest-where-clause.stderr
src/test/ui/traits/trait-upcasting/type-checking-test-1.stderr
src/test/ui/traits/trait-upcasting/type-checking-test-2.stderr
src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr
src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr
src/test/ui/try-block/try-block-in-edition2015.stderr
src/test/ui/try-macro-suggestion.stderr
src/test/ui/tutorial-suffix-inference-test.stderr
src/test/ui/type-alias-enum-variants/incorrect-variant-form-through-alias-caught.stderr
src/test/ui/type-alias-impl-trait/bounds-are-checked-2.full_tait.stderr [new file with mode: 0644]
src/test/ui/type-alias-impl-trait/bounds-are-checked-2.stderr
src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.full_tait.stderr [new file with mode: 0644]
src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.stderr
src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.full_tait.stderr [new file with mode: 0644]
src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.stderr
src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.full_tait.stderr [new file with mode: 0644]
src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.stderr
src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.full_tait.stderr [new file with mode: 0644]
src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.stderr
src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.nll.stderr
src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.rs
src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.stderr
src/test/ui/type-alias-impl-trait/generic_underconstrained.full_tait.stderr [new file with mode: 0644]
src/test/ui/type-alias-impl-trait/generic_underconstrained.stderr
src/test/ui/type-alias-impl-trait/generic_underconstrained2.full_tait.stderr [new file with mode: 0644]
src/test/ui/type-alias-impl-trait/generic_underconstrained2.stderr
src/test/ui/type-alias-impl-trait/issue-52843.full_tait.stderr [new file with mode: 0644]
src/test/ui/type-alias-impl-trait/issue-52843.stderr
src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.nll.stderr
src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.rs
src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.stderr
src/test/ui/type-alias-impl-trait/issue-60371.rs
src/test/ui/type-alias-impl-trait/issue-60371.stderr
src/test/ui/type-alias-impl-trait/issue-63279.rs
src/test/ui/type-alias-impl-trait/issue-63279.stderr
src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.rs
src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.stderr [deleted file]
src/test/ui/type-alias-impl-trait/issue-74280.rs
src/test/ui/type-alias-impl-trait/issue-74280.stderr
src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.rs
src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.stderr
src/test/ui/type-inference/or_else-multiple-type-params.stderr
src/test/ui/type-inference/sort_by_key.stderr
src/test/ui/type/ascription/issue-34255-1.stderr
src/test/ui/type/issue-67690-type-alias-bound-diagnostic-crash.stderr
src/test/ui/type/type-alias-bounds.stderr
src/test/ui/type/type-annotation-needed.stderr
src/test/ui/type/type-check-defaults.stderr
src/test/ui/type/type-check/assignment-expected-bool.stderr
src/test/ui/type/type-check/assignment-in-if.stderr
src/test/ui/type/type-check/issue-41314.stderr
src/test/ui/type/type-check/missing_trait_impl.stderr
src/test/ui/type/type-params-in-different-spaces-2.stderr
src/test/ui/type/type-recursive.stderr
src/test/ui/typeck/conversion-methods.stderr
src/test/ui/typeck/issue-75883.stderr
src/test/ui/typeck/issue-81943.stderr
src/test/ui/typeck/issue-84831.stderr
src/test/ui/typeck/issue-87872-missing-inaccessible-field-literal.rs [new file with mode: 0644]
src/test/ui/typeck/issue-87872-missing-inaccessible-field-literal.stderr [new file with mode: 0644]
src/test/ui/typeck/issue-87872-missing-inaccessible-field-pattern.rs [new file with mode: 0644]
src/test/ui/typeck/issue-87872-missing-inaccessible-field-pattern.stderr [new file with mode: 0644]
src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr
src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr
src/test/ui/typeck/typeck_type_placeholder_item.full_tait.stderr [new file with mode: 0644]
src/test/ui/typeck/typeck_type_placeholder_item.stderr
src/test/ui/typeof/type_mismatch.stderr
src/test/ui/ufcs/ufcs-qpath-missing-params.stderr
src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr
src/test/ui/unboxed-closures/issue-53448.stderr
src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr
src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr
src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr
src/test/ui/unboxed-closures/unboxed-closures-type-mismatch.stderr
src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr
src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr
src/test/ui/underscore-lifetime/in-fn-return-illegal.stderr
src/test/ui/underscore-lifetime/in-struct.stderr
src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr
src/test/ui/uninhabited/uninhabited-irrefutable.stderr
src/test/ui/union/union-nonrepresentable.stderr
src/test/ui/union/union-sized-field.stderr
src/test/ui/union/union-suggest-field.mirunsafeck.stderr
src/test/ui/union/union-suggest-field.thirunsafeck.stderr
src/test/ui/union/union-unsized.mirunsafeck.stderr
src/test/ui/union/union-unsized.thirunsafeck.stderr
src/test/ui/unop-move-semantics.stderr
src/test/ui/unsized/unsized-bare-typaram.stderr
src/test/ui/unsized/unsized-enum.stderr
src/test/ui/unsized/unsized-enum2.stderr
src/test/ui/unsized/unsized-fn-arg.stderr
src/test/ui/unsized/unsized-inherent-impl-self-type.stderr
src/test/ui/unsized/unsized-struct.stderr
src/test/ui/unsized/unsized-trait-impl-self-type.stderr
src/test/ui/unsized/unsized-trait-impl-trait-arg.stderr
src/test/ui/unsized/unsized3.stderr
src/test/ui/unsized/unsized5.stderr
src/test/ui/unsized/unsized6.stderr
src/test/ui/unsized/unsized7.stderr
src/test/ui/use/use-mod/use-mod-4.stderr
src/test/ui/use/use-mod/use-mod-5.stderr
src/test/ui/use/use-mod/use-mod-6.stderr
src/test/ui/variants/variant-namespacing.stderr
src/test/ui/variants/variant-used-as-type.stderr
src/test/ui/wf/hir-wf-check-erase-regions.rs [new file with mode: 0644]
src/test/ui/wf/hir-wf-check-erase-regions.stderr [new file with mode: 0644]
src/test/ui/wf/wf-enum-bound.stderr
src/test/ui/wf/wf-enum-fields-struct-variant.stderr
src/test/ui/wf/wf-enum-fields.stderr
src/test/ui/wf/wf-fn-where-clause.stderr
src/test/ui/wf/wf-impl-associated-type-region.stderr
src/test/ui/wf/wf-impl-associated-type-trait.stderr
src/test/ui/wf/wf-in-fn-arg.stderr
src/test/ui/wf/wf-in-fn-ret.stderr
src/test/ui/wf/wf-in-fn-type-arg.stderr
src/test/ui/wf/wf-in-fn-type-ret.stderr
src/test/ui/wf/wf-in-fn-where-clause.stderr
src/test/ui/wf/wf-in-obj-type-trait.stderr
src/test/ui/wf/wf-inherent-impl-method-where-clause.stderr
src/test/ui/wf/wf-inherent-impl-where-clause.stderr
src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.stderr
src/test/ui/wf/wf-struct-bound.stderr
src/test/ui/wf/wf-struct-field.stderr
src/test/ui/wf/wf-trait-associated-type-bound.stderr
src/test/ui/wf/wf-trait-associated-type-region.stderr
src/test/ui/wf/wf-trait-associated-type-trait.stderr
src/test/ui/wf/wf-trait-bound.stderr
src/test/ui/wf/wf-trait-default-fn-arg.stderr
src/test/ui/wf/wf-trait-default-fn-ret.stderr
src/test/ui/wf/wf-trait-default-fn-where-clause.stderr
src/test/ui/wf/wf-trait-fn-arg.stderr
src/test/ui/wf/wf-trait-fn-ret.stderr
src/test/ui/wf/wf-trait-fn-where-clause.stderr
src/test/ui/wf/wf-trait-superbound.stderr
src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr
src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr
src/test/ui/wrong-ret-type.stderr
src/tools/cargo
src/tools/clippy/tests/ui/assign_ops2.stderr
src/tools/clippy/tests/ui/async_yields_async.stderr
src/tools/clippy/tests/ui/bind_instead_of_map_multipart.stderr
src/tools/clippy/tests/ui/blocks_in_if_conditions.stderr
src/tools/clippy/tests/ui/branches_sharing_code/shared_at_bottom.stderr
src/tools/clippy/tests/ui/branches_sharing_code/shared_at_top.stderr
src/tools/clippy/tests/ui/branches_sharing_code/shared_at_top_and_bottom.stderr
src/tools/clippy/tests/ui/collapsible_else_if.stderr
src/tools/clippy/tests/ui/collapsible_if.stderr
src/tools/clippy/tests/ui/crashes/ice-3717.stderr
src/tools/clippy/tests/ui/crashes/ice-3969.stderr
src/tools/clippy/tests/ui/crashes/ice-6250.stderr
src/tools/clippy/tests/ui/crashes/ice-6251.stderr
src/tools/clippy/tests/ui/dbg_macro.stderr
src/tools/clippy/tests/ui/entry.stderr
src/tools/clippy/tests/ui/entry_with_else.stderr
src/tools/clippy/tests/ui/eprint_with_newline.stderr
src/tools/clippy/tests/ui/exhaustive_items.stderr
src/tools/clippy/tests/ui/for_kv_map.stderr
src/tools/clippy/tests/ui/format.stderr
src/tools/clippy/tests/ui/if_let_some_result.stderr
src/tools/clippy/tests/ui/implicit_hasher.stderr
src/tools/clippy/tests/ui/implicit_return.stderr
src/tools/clippy/tests/ui/large_enum_variant.stderr
src/tools/clippy/tests/ui/let_and_return.stderr
src/tools/clippy/tests/ui/let_unit.stderr
src/tools/clippy/tests/ui/literals.stderr
src/tools/clippy/tests/ui/manual_async_fn.stderr
src/tools/clippy/tests/ui/manual_memcpy/with_loop_counters.stderr
src/tools/clippy/tests/ui/manual_memcpy/without_loop_counters.stderr
src/tools/clippy/tests/ui/manual_ok_or.stderr
src/tools/clippy/tests/ui/manual_strip.stderr
src/tools/clippy/tests/ui/manual_unwrap_or.stderr
src/tools/clippy/tests/ui/map_unwrap_or.stderr
src/tools/clippy/tests/ui/match_bool.stderr
src/tools/clippy/tests/ui/match_expr_like_matches_macro.stderr
src/tools/clippy/tests/ui/match_ref_pats.stderr
src/tools/clippy/tests/ui/match_single_binding.stderr
src/tools/clippy/tests/ui/match_single_binding2.stderr
src/tools/clippy/tests/ui/min_rust_version_attr.stderr
src/tools/clippy/tests/ui/mismatched_target_os_unix.stderr
src/tools/clippy/tests/ui/needless_borrow_pat.stderr
src/tools/clippy/tests/ui/needless_collect_indirect.stderr
src/tools/clippy/tests/ui/needless_for_each_fixable.stderr
src/tools/clippy/tests/ui/needless_for_each_unfixable.stderr
src/tools/clippy/tests/ui/needless_pass_by_value.stderr
src/tools/clippy/tests/ui/needless_range_loop.stderr
src/tools/clippy/tests/ui/needless_range_loop2.stderr
src/tools/clippy/tests/ui/new_without_default.stderr
src/tools/clippy/tests/ui/nonminimal_bool.stderr
src/tools/clippy/tests/ui/op_ref.stderr
src/tools/clippy/tests/ui/option_if_let_else.stderr
src/tools/clippy/tests/ui/option_map_or_none.stderr
src/tools/clippy/tests/ui/print_literal.stderr
src/tools/clippy/tests/ui/print_with_newline.stderr
src/tools/clippy/tests/ui/ptr_arg.stderr
src/tools/clippy/tests/ui/ref_binding_to_reference.stderr
src/tools/clippy/tests/ui/reversed_empty_ranges_fixable.stderr
src/tools/clippy/tests/ui/reversed_empty_ranges_loops_fixable.stderr
src/tools/clippy/tests/ui/single_element_loop.stderr
src/tools/clippy/tests/ui/single_match.stderr
src/tools/clippy/tests/ui/single_match_else.stderr
src/tools/clippy/tests/ui/strlen_on_c_strings.stderr
src/tools/clippy/tests/ui/unit_arg.stderr
src/tools/clippy/tests/ui/unit_arg_empty_blocks.stderr
src/tools/clippy/tests/ui/unnecessary_clone.stderr
src/tools/clippy/tests/ui/unnecessary_wraps.stderr
src/tools/clippy/tests/ui/unnested_or_patterns.stderr
src/tools/clippy/tests/ui/unnested_or_patterns2.stderr
src/tools/clippy/tests/ui/write_literal.stderr
src/tools/clippy/tests/ui/write_literal_2.stderr
src/tools/clippy/tests/ui/write_with_newline.stderr
src/tools/rust-analyzer
src/tools/rustdoc-js/tester.js

index 5253c819ca2c93ac4505afae60554cb8ce693405..940608975c5ecd3d4a15412339a85a3869e75bcf 100644 (file)
@@ -356,7 +356,7 @@ dependencies = [
 
 [[package]]
 name = "cargo-platform"
-version = "0.1.1"
+version = "0.1.2"
 dependencies = [
  "serde",
 ]
@@ -1723,9 +1723,9 @@ checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6"
 
 [[package]]
 name = "jobserver"
-version = "0.1.22"
+version = "0.1.23"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "972f5ae5d1cb9c6ae417789196c803205313edde988685da5e3aae0827b9e7fd"
+checksum = "f5ca711fd837261e14ec9e674f092cbb931d3fa1482b017ae59328ddc6f3212b"
 dependencies = [
  "libc",
 ]
@@ -1880,9 +1880,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
 
 [[package]]
 name = "libc"
-version = "0.2.98"
+version = "0.2.99"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790"
+checksum = "a7f823d141fe0a24df1e23b4af4e3c7ba9e5966ec514ea068c93024aa7deb765"
 dependencies = [
  "rustc-std-workspace-core",
 ]
index 89b59e5f00f1c4cbdaed0612dd64349b0daf413a..6dc459ea40200e18edc9b0cefd352157c41bf126 100644 (file)
@@ -375,14 +375,6 @@ fn visit_item(&mut self, i: &'a ast::Item) {
             }
 
             ast::ItemKind::Fn(..) => {
-                if self.sess.contains_name(&i.attrs[..], sym::plugin_registrar) {
-                    gate_feature_post!(
-                        &self,
-                        plugin_registrar,
-                        i.span,
-                        "compiler plugins are experimental and possibly buggy"
-                    );
-                }
                 if self.sess.contains_name(&i.attrs[..], sym::start) {
                     gate_feature_post!(
                         &self,
index 86698460747494f7a95711fe58bfada5da0a34e0..1c4d307fc50e14c4281b5bd487b83137e7342a33 100644 (file)
@@ -1136,6 +1136,11 @@ fn type_by_size(size: Size) -> Option<Type> {
                 };
             ret.write_cvalue(fx, CValue::by_val(is_eq_value, ret.layout()));
         };
+
+        black_box, (c a) {
+            // FIXME implement black_box semantics
+            ret.write_cvalue(fx, a);
+        };
     }
 
     if let Some((_, dest)) = destination {
index ebc3773df57cd7fd84b1bbce79876ce3142a64b2..4790b44bd19ef0c3672ea3a9367dafee8a9efe6d 100644 (file)
@@ -425,7 +425,7 @@ fn codegen_global_asm(
     }
 }
 
-fn inline_asm_call(
+pub(crate) fn inline_asm_call(
     bx: &mut Builder<'a, 'll, 'tcx>,
     asm: &str,
     cons: &str,
index 685f222e8025f90dc44c81d949b20ac82f20da2f..5d56c93f835d60308cd4aa606577a18b8dd44fc2 100644 (file)
@@ -24,6 +24,7 @@
 use rustc_span::symbol::Symbol;
 use rustc_target::abi::{HasDataLayout, LayoutOf, PointeeInfo, Size, TargetDataLayout, VariantIdx};
 use rustc_target::spec::{HasTargetSpec, RelocModel, Target, TlsModel};
+use smallvec::SmallVec;
 
 use std::cell::{Cell, RefCell};
 use std::ffi::CStr;
@@ -74,8 +75,12 @@ pub struct CodegenCx<'ll, 'tcx> {
     /// See <https://llvm.org/docs/LangRef.html#the-llvm-used-global-variable> for details
     pub used_statics: RefCell<Vec<&'ll Value>>,
 
-    pub lltypes: RefCell<FxHashMap<(Ty<'tcx>, Option<VariantIdx>), &'ll Type>>,
+    /// Mapping of non-scalar types to llvm types and field remapping if needed.
+    pub type_lowering: RefCell<FxHashMap<(Ty<'tcx>, Option<VariantIdx>), TypeLowering<'ll>>>,
+
+    /// Mapping of scalar types to llvm types.
     pub scalar_lltypes: RefCell<FxHashMap<Ty<'tcx>, &'ll Type>>,
+
     pub pointee_infos: RefCell<FxHashMap<(Ty<'tcx>, Size), Option<PointeeInfo>>>,
     pub isize_ty: &'ll Type,
 
@@ -92,6 +97,15 @@ pub struct CodegenCx<'ll, 'tcx> {
     local_gen_sym_counter: Cell<usize>,
 }
 
+pub struct TypeLowering<'ll> {
+    /// Associated LLVM type
+    pub lltype: &'ll Type,
+
+    /// If padding is used the slice maps fields from source order
+    /// to llvm order.
+    pub field_remapping: Option<SmallVec<[u32; 4]>>,
+}
+
 fn to_llvm_tls_model(tls_model: TlsModel) -> llvm::ThreadLocalMode {
     match tls_model {
         TlsModel::GeneralDynamic => llvm::ThreadLocalMode::GeneralDynamic,
@@ -304,7 +318,7 @@ impl<'ll, 'tcx> CodegenCx<'ll, 'tcx> {
             const_globals: Default::default(),
             statics_to_rauw: RefCell::new(Vec::new()),
             used_statics: RefCell::new(Vec::new()),
-            lltypes: Default::default(),
+            type_lowering: Default::default(),
             scalar_lltypes: Default::default(),
             pointee_infos: Default::default(),
             isize_ty,
index ed4841858651749e613e83abc9516bf496ab7d42..fe2ed21c1e3b02287533cb5237b9a19ce2c294e8 100644 (file)
@@ -7,6 +7,7 @@
 use crate::va_arg::emit_va_arg;
 use crate::value::Value;
 
+use rustc_ast as ast;
 use rustc_codegen_ssa::base::{compare_simd_types, wants_msvc_seh};
 use rustc_codegen_ssa::common::span_invalid_monomorphization_error;
 use rustc_codegen_ssa::common::{IntPredicate, TypeKind};
@@ -327,6 +328,31 @@ fn codegen_intrinsic_call(
                 }
             }
 
+            sym::black_box => {
+                args[0].val.store(self, result);
+
+                // We need to "use" the argument in some way LLVM can't introspect, and on
+                // targets that support it we can typically leverage inline assembly to do
+                // this. LLVM's interpretation of inline assembly is that it's, well, a black
+                // box. This isn't the greatest implementation since it probably deoptimizes
+                // more than we want, but it's so far good enough.
+                crate::asm::inline_asm_call(
+                    self,
+                    "",
+                    "r,~{memory}",
+                    &[result.llval],
+                    self.type_void(),
+                    true,
+                    false,
+                    ast::LlvmAsmDialect::Att,
+                    &[span],
+                )
+                .unwrap_or_else(|| bug!("failed to generate inline asm call for `black_box`"));
+
+                // We have copied the value to `result` already.
+                return;
+            }
+
             _ if name_str.starts_with("simd_") => {
                 match generic_simd_intrinsic(self, name, callee_ty, args, ret_ty, llret_ty, span) {
                     Ok(llval) => llval,
index 52ae56b89b33170c671cd82cf5122b126a0bd839..c7f4287e28e4ae29479c8045ce369d055c1a2ee7 100644 (file)
@@ -266,7 +266,7 @@ fn is_backend_scalar_pair(&self, layout: TyAndLayout<'tcx>) -> bool {
         layout.is_llvm_scalar_pair()
     }
     fn backend_field_index(&self, layout: TyAndLayout<'tcx>, index: usize) -> u64 {
-        layout.llvm_field_index(index)
+        layout.llvm_field_index(self, index)
     }
     fn scalar_pair_element_backend_type(
         &self,
index 0876907e1194b27e3b69c1bb0de0d12beb264970..85efe3e64836c76c5df392129d6095f1f8b45c7f 100644 (file)
@@ -1,5 +1,6 @@
 use crate::abi::FnAbi;
 use crate::common::*;
+use crate::context::TypeLowering;
 use crate::type_::Type;
 use rustc_codegen_ssa::traits::*;
 use rustc_middle::bug;
@@ -9,6 +10,7 @@
 use rustc_target::abi::{Abi, AddressSpace, Align, FieldsShape};
 use rustc_target::abi::{Int, Pointer, F32, F64};
 use rustc_target::abi::{LayoutOf, PointeeInfo, Scalar, Size, TyAndLayoutMethods, Variants};
+use smallvec::{smallvec, SmallVec};
 use tracing::debug;
 
 use std::fmt::Write;
@@ -17,6 +19,7 @@ fn uncached_llvm_type<'a, 'tcx>(
     cx: &CodegenCx<'a, 'tcx>,
     layout: TyAndLayout<'tcx>,
     defer: &mut Option<(&'a Type, TyAndLayout<'tcx>)>,
+    field_remapping: &mut Option<SmallVec<[u32; 4]>>,
 ) -> &'a Type {
     match layout.abi {
         Abi::Scalar(_) => bug!("handled elsewhere"),
@@ -75,7 +78,8 @@ fn uncached_llvm_type<'a, 'tcx>(
         FieldsShape::Array { count, .. } => cx.type_array(layout.field(cx, 0).llvm_type(cx), count),
         FieldsShape::Arbitrary { .. } => match name {
             None => {
-                let (llfields, packed) = struct_llfields(cx, layout);
+                let (llfields, packed, new_field_remapping) = struct_llfields(cx, layout);
+                *field_remapping = new_field_remapping;
                 cx.type_struct(&llfields, packed)
             }
             Some(ref name) => {
@@ -90,7 +94,7 @@ fn uncached_llvm_type<'a, 'tcx>(
 fn struct_llfields<'a, 'tcx>(
     cx: &CodegenCx<'a, 'tcx>,
     layout: TyAndLayout<'tcx>,
-) -> (Vec<&'a Type>, bool) {
+) -> (Vec<&'a Type>, bool, Option<SmallVec<[u32; 4]>>) {
     debug!("struct_llfields: {:#?}", layout);
     let field_count = layout.fields.count();
 
@@ -98,6 +102,7 @@ fn struct_llfields<'a, 'tcx>(
     let mut offset = Size::ZERO;
     let mut prev_effective_align = layout.align.abi;
     let mut result: Vec<_> = Vec::with_capacity(1 + field_count * 2);
+    let mut field_remapping = smallvec![0; field_count];
     for i in layout.fields.index_by_increasing_offset() {
         let target_offset = layout.fields.offset(i as usize);
         let field = layout.field(cx, i);
@@ -116,33 +121,37 @@ fn struct_llfields<'a, 'tcx>(
         );
         assert!(target_offset >= offset);
         let padding = target_offset - offset;
-        let padding_align = prev_effective_align.min(effective_field_align);
-        assert_eq!(offset.align_to(padding_align) + padding, target_offset);
-        result.push(cx.type_padding_filler(padding, padding_align));
-        debug!("    padding before: {:?}", padding);
-
+        if padding != Size::ZERO {
+            let padding_align = prev_effective_align.min(effective_field_align);
+            assert_eq!(offset.align_to(padding_align) + padding, target_offset);
+            result.push(cx.type_padding_filler(padding, padding_align));
+            debug!("    padding before: {:?}", padding);
+        }
+        field_remapping[i] = result.len() as u32;
         result.push(field.llvm_type(cx));
         offset = target_offset + field.size;
         prev_effective_align = effective_field_align;
     }
+    let padding_used = result.len() > field_count;
     if !layout.is_unsized() && field_count > 0 {
         if offset > layout.size {
             bug!("layout: {:#?} stride: {:?} offset: {:?}", layout, layout.size, offset);
         }
         let padding = layout.size - offset;
-        let padding_align = prev_effective_align;
-        assert_eq!(offset.align_to(padding_align) + padding, layout.size);
-        debug!(
-            "struct_llfields: pad_bytes: {:?} offset: {:?} stride: {:?}",
-            padding, offset, layout.size
-        );
-        result.push(cx.type_padding_filler(padding, padding_align));
-        assert_eq!(result.len(), 1 + field_count * 2);
+        if padding != Size::ZERO {
+            let padding_align = prev_effective_align;
+            assert_eq!(offset.align_to(padding_align) + padding, layout.size);
+            debug!(
+                "struct_llfields: pad_bytes: {:?} offset: {:?} stride: {:?}",
+                padding, offset, layout.size
+            );
+            result.push(cx.type_padding_filler(padding, padding_align));
+        }
     } else {
         debug!("struct_llfields: offset: {:?} stride: {:?}", offset, layout.size);
     }
-
-    (result, packed)
+    let field_remapping = if padding_used { Some(field_remapping) } else { None };
+    (result, packed, field_remapping)
 }
 
 impl<'a, 'tcx> CodegenCx<'a, 'tcx> {
@@ -177,7 +186,7 @@ fn scalar_pair_element_llvm_type<'a>(
         index: usize,
         immediate: bool,
     ) -> &'a Type;
-    fn llvm_field_index(&self, index: usize) -> u64;
+    fn llvm_field_index<'a>(&self, cx: &CodegenCx<'a, 'tcx>, index: usize) -> u64;
     fn pointee_info_at<'a>(&self, cx: &CodegenCx<'a, 'tcx>, offset: Size) -> Option<PointeeInfo>;
 }
 
@@ -234,8 +243,8 @@ fn llvm_type<'a>(&self, cx: &CodegenCx<'a, 'tcx>) -> &'a Type {
             Variants::Single { index } => Some(index),
             _ => None,
         };
-        if let Some(&llty) = cx.lltypes.borrow().get(&(self.ty, variant_index)) {
-            return llty;
+        if let Some(ref llty) = cx.type_lowering.borrow().get(&(self.ty, variant_index)) {
+            return llty.lltype;
         }
 
         debug!("llvm_type({:#?})", self);
@@ -247,6 +256,7 @@ fn llvm_type<'a>(&self, cx: &CodegenCx<'a, 'tcx>) -> &'a Type {
         let normal_ty = cx.tcx.erase_regions(self.ty);
 
         let mut defer = None;
+        let mut field_remapping = None;
         let llty = if self.ty != normal_ty {
             let mut layout = cx.layout_of(normal_ty);
             if let Some(v) = variant_index {
@@ -254,17 +264,24 @@ fn llvm_type<'a>(&self, cx: &CodegenCx<'a, 'tcx>) -> &'a Type {
             }
             layout.llvm_type(cx)
         } else {
-            uncached_llvm_type(cx, *self, &mut defer)
+            uncached_llvm_type(cx, *self, &mut defer, &mut field_remapping)
         };
         debug!("--> mapped {:#?} to llty={:?}", self, llty);
 
-        cx.lltypes.borrow_mut().insert((self.ty, variant_index), llty);
+        cx.type_lowering.borrow_mut().insert(
+            (self.ty, variant_index),
+            TypeLowering { lltype: llty, field_remapping: field_remapping },
+        );
 
         if let Some((llty, layout)) = defer {
-            let (llfields, packed) = struct_llfields(cx, layout);
-            cx.set_struct_body(llty, &llfields, packed)
+            let (llfields, packed, new_field_remapping) = struct_llfields(cx, layout);
+            cx.set_struct_body(llty, &llfields, packed);
+            cx.type_lowering
+                .borrow_mut()
+                .get_mut(&(self.ty, variant_index))
+                .unwrap()
+                .field_remapping = new_field_remapping;
         }
-
         llty
     }
 
@@ -340,7 +357,7 @@ fn scalar_pair_element_llvm_type<'a>(
         self.scalar_llvm_type_at(cx, scalar, offset)
     }
 
-    fn llvm_field_index(&self, index: usize) -> u64 {
+    fn llvm_field_index<'a>(&self, cx: &CodegenCx<'a, 'tcx>, index: usize) -> u64 {
         match self.abi {
             Abi::Scalar(_) | Abi::ScalarPair(..) => {
                 bug!("TyAndLayout::llvm_field_index({:?}): not applicable", self)
@@ -354,7 +371,25 @@ fn llvm_field_index(&self, index: usize) -> u64 {
 
             FieldsShape::Array { .. } => index as u64,
 
-            FieldsShape::Arbitrary { .. } => 1 + (self.fields.memory_index(index) as u64) * 2,
+            FieldsShape::Arbitrary { .. } => {
+                let variant_index = match self.variants {
+                    Variants::Single { index } => Some(index),
+                    _ => None,
+                };
+
+                // Look up llvm field if indexes do not match memory order due to padding. If
+                // `field_remapping` is `None` no padding was used and the llvm field index
+                // matches the memory index.
+                match cx.type_lowering.borrow().get(&(self.ty, variant_index)) {
+                    Some(TypeLowering { field_remapping: Some(ref remap), .. }) => {
+                        remap[index] as u64
+                    }
+                    Some(_) => self.fields.memory_index(index) as u64,
+                    None => {
+                        bug!("TyAndLayout::llvm_field_index({:?}): type info not found", self)
+                    }
+                }
+            }
         }
     }
 
index c9fb09570c35ad52b4462857adff174b322c4227..2208ec37a423551539391ea47ba4ab10e883e2d2 100644 (file)
@@ -98,7 +98,8 @@ fn emit_aapcs_va_arg(
     // Implementation of the AAPCS64 calling convention for va_args see
     // https://github.com/ARM-software/abi-aa/blob/master/aapcs64/aapcs64.rst
     let va_list_addr = list.immediate();
-    let va_list_ty = list.deref(bx.cx).layout.llvm_type(bx);
+    let va_list_layout = list.deref(bx.cx).layout;
+    let va_list_ty = va_list_layout.llvm_type(bx);
     let layout = bx.cx.layout_of(target_ty);
 
     let mut maybe_reg = bx.build_sibling_block("va_arg.maybe_reg");
@@ -110,13 +111,15 @@ fn emit_aapcs_va_arg(
 
     let gr_type = target_ty.is_any_ptr() || target_ty.is_integral();
     let (reg_off, reg_top_index, slot_size) = if gr_type {
-        let gr_offs = bx.struct_gep(va_list_ty, va_list_addr, 7);
+        let gr_offs =
+            bx.struct_gep(va_list_ty, va_list_addr, va_list_layout.llvm_field_index(bx.cx, 3));
         let nreg = (layout.size.bytes() + 7) / 8;
-        (gr_offs, 3, nreg * 8)
+        (gr_offs, va_list_layout.llvm_field_index(bx.cx, 1), nreg * 8)
     } else {
-        let vr_off = bx.struct_gep(va_list_ty, va_list_addr, 9);
+        let vr_off =
+            bx.struct_gep(va_list_ty, va_list_addr, va_list_layout.llvm_field_index(bx.cx, 4));
         let nreg = (layout.size.bytes() + 15) / 16;
-        (vr_off, 5, nreg * 16)
+        (vr_off, va_list_layout.llvm_field_index(bx.cx, 2), nreg * 16)
     };
 
     // if the offset >= 0 then the value will be on the stack
index 4ef21449d216e5c1771b2958fd8466a1b7aa1472..4a7090b31b4a9d8bc99247d24866a229563de40a 100644 (file)
@@ -137,10 +137,6 @@ fn reachable_non_generics_provider(tcx: TyCtxt<'_>, cnum: CrateNum) -> DefIdMap<
         reachable_non_generics.insert(id.to_def_id(), SymbolExportLevel::C);
     }
 
-    if let Some(id) = tcx.plugin_registrar_fn(()) {
-        reachable_non_generics.insert(id.to_def_id(), SymbolExportLevel::C);
-    }
-
     reachable_non_generics
 }
 
index e0903e4324124784fa3b0eecd63e1f9879346702..dff22855629a8e4b9f93f6b7e7041a56b415ba2b 100644 (file)
@@ -60,18 +60,13 @@ pub trait WithStartNode: DirectedGraph {
 }
 
 pub trait ControlFlowGraph:
-    DirectedGraph + WithStartNode + WithPredecessors + WithStartNode + WithSuccessors + WithNumNodes
+    DirectedGraph + WithStartNode + WithPredecessors + WithSuccessors + WithNumNodes
 {
     // convenient trait
 }
 
 impl<T> ControlFlowGraph for T where
-    T: DirectedGraph
-        + WithStartNode
-        + WithPredecessors
-        + WithStartNode
-        + WithSuccessors
-        + WithNumNodes
+    T: DirectedGraph + WithStartNode + WithPredecessors + WithSuccessors + WithNumNodes
 {
 }
 
index 84dd69ebd963496696d0ed03e9d7d5bc1d4a40b5..fcc70b2e4c5ff3e600993e2f82e5ea8cb053858e 100644 (file)
@@ -1287,9 +1287,6 @@ pub fn init_env_logger(env: &str) {
         .with_indent_lines(true)
         .with_ansi(color_logs)
         .with_targets(true)
-        .with_wraparound(10)
-        .with_verbose_exit(true)
-        .with_verbose_entry(true)
         .with_indent_amount(2);
     #[cfg(parallel_compiler)]
     let layer = layer.with_thread_ids(true).with_thread_names(true);
index 502f674fc1d21829aafc608c85d85635262fccb0..60fa711cbed363b458208cae42228331f7936e7f 100644 (file)
@@ -1,32 +1,57 @@
 A binding shadowed something it shouldn't.
 
-Erroneous code example:
+A match arm or a variable has a name that is already used by
+something else, e.g.
+
+* struct name
+* enum variant
+* static
+* associated constant
+
+This error may also happen when an enum variant *with fields* is used
+in a pattern, but without its fields.
+
+```compile_fail
+enum Enum {
+    WithField(i32)
+}
+
+use Enum::*;
+match WithField(1) {
+    WithField => {} // error: missing (_)
+}
+```
+
+Match bindings cannot shadow statics:
 
 ```compile_fail,E0530
 static TEST: i32 = 0;
 
-let r: (i32, i32) = (0, 0);
+let r = 123;
 match r {
-    TEST => {} // error: match bindings cannot shadow statics
+    TEST => {} // error: name of a static
 }
 ```
 
-To fix this error, just change the binding's name in order to avoid shadowing
-one of the following:
+Fixed examples:
 
-* struct name
-* struct/enum variant
-* static
-* const
-* associated const
+```
+static TEST: i32 = 0;
 
-Fixed example:
+let r = 123;
+match r {
+    some_value => {} // ok!
+}
+```
+
+or
 
 ```
-static TEST: i32 = 0;
+const TEST: i32 = 0; // const, not static
 
-let r: (i32, i32) = (0, 0);
+let r = 123;
 match r {
-    something => {} // ok!
+    TEST => {} // const is ok!
+    other_values => {}
 }
 ```
index 050f3ae583371d722fc8101f7c7723af44d2e4ab..07c864c93a1b56a3962a7f77c0f0ecd9c4635629 100644 (file)
 
 use crate::snippet::{Annotation, AnnotationType, Line, MultilineAnnotation, Style, StyledString};
 use crate::styled_buffer::StyledBuffer;
-use crate::{CodeSuggestion, Diagnostic, DiagnosticId, Level, SubDiagnostic, SuggestionStyle};
+use crate::{
+    CodeSuggestion, Diagnostic, DiagnosticId, Level, SubDiagnostic, SubstitutionHighlight,
+    SuggestionStyle,
+};
 
 use rustc_lint_defs::pluralize;
 
@@ -1590,8 +1593,11 @@ fn emit_suggestion_default(
         );
 
         let mut row_num = 2;
+        draw_col_separator_no_space(&mut buffer, 1, max_line_num_len + 1);
         let mut notice_capitalization = false;
-        for (complete, parts, only_capitalization) in suggestions.iter().take(MAX_SUGGESTIONS) {
+        for (complete, parts, highlights, only_capitalization) in
+            suggestions.iter().take(MAX_SUGGESTIONS)
+        {
             notice_capitalization |= only_capitalization;
             // Only show underline if the suggestion spans a single line and doesn't cover the
             // entirety of the code output. If you have multiple replacements in the same line
@@ -1599,16 +1605,26 @@ fn emit_suggestion_default(
             let show_underline = !(parts.len() == 1 && parts[0].snippet.trim() == complete.trim())
                 && complete.lines().count() == 1;
 
-            let lines = sm
+            let has_deletion = parts.iter().any(|p| p.is_deletion());
+            let is_multiline = complete.lines().count() > 1;
+
+            let show_diff = has_deletion && !is_multiline;
+
+            if show_diff {
+                row_num += 1;
+            }
+
+            let file_lines = sm
                 .span_to_lines(parts[0].span)
                 .expect("span_to_lines failed when emitting suggestion");
 
-            assert!(!lines.lines.is_empty() || parts[0].span.is_dummy());
+            assert!(!file_lines.lines.is_empty() || parts[0].span.is_dummy());
 
             let line_start = sm.lookup_char_pos(parts[0].span.lo()).line;
             draw_col_separator_no_space(&mut buffer, 1, max_line_num_len + 1);
             let mut lines = complete.lines();
-            for (line_pos, line) in lines.by_ref().take(MAX_SUGGESTION_HIGHLIGHT_LINES).enumerate()
+            for (line_pos, (line, parts)) in
+                lines.by_ref().zip(highlights).take(MAX_SUGGESTION_HIGHLIGHT_LINES).enumerate()
             {
                 // Print the span column to avoid confusion
                 buffer.puts(
@@ -1617,9 +1633,60 @@ fn emit_suggestion_default(
                     &self.maybe_anonymized(line_start + line_pos),
                     Style::LineNumber,
                 );
+                if show_diff {
+                    // Add the line number for both addition and removal to drive the point home.
+                    //
+                    // N - fn foo<A: T>(bar: A) {
+                    // N + fn foo(bar: impl T) {
+                    buffer.puts(
+                        row_num - 1,
+                        0,
+                        &self.maybe_anonymized(line_start + line_pos),
+                        Style::LineNumber,
+                    );
+                    buffer.puts(row_num - 1, max_line_num_len + 1, "- ", Style::Removal);
+                    buffer.puts(
+                        row_num - 1,
+                        max_line_num_len + 3,
+                        &replace_tabs(
+                            &*file_lines
+                                .file
+                                .get_line(file_lines.lines[line_pos].line_index)
+                                .unwrap(),
+                        ),
+                        Style::NoStyle,
+                    );
+                    buffer.puts(row_num, max_line_num_len + 1, "+ ", Style::Addition);
+                } else if is_multiline {
+                    match &parts[..] {
+                        [SubstitutionHighlight { start: 0, end }] if *end == line.len() => {
+                            buffer.puts(row_num, max_line_num_len + 1, "+ ", Style::Addition);
+                        }
+                        [] => {
+                            draw_col_separator(&mut buffer, row_num, max_line_num_len + 1);
+                        }
+                        _ => {
+                            buffer.puts(row_num, max_line_num_len + 1, "~ ", Style::Addition);
+                        }
+                    }
+                } else {
+                    draw_col_separator(&mut buffer, row_num, max_line_num_len + 1);
+                }
+
                 // print the suggestion
-                draw_col_separator(&mut buffer, row_num, max_line_num_len + 1);
                 buffer.append(row_num, &replace_tabs(line), Style::NoStyle);
+
+                if is_multiline {
+                    for SubstitutionHighlight { start, end } in parts {
+                        buffer.set_style_range(
+                            row_num,
+                            max_line_num_len + 3 + start,
+                            max_line_num_len + 3 + end,
+                            Style::Addition,
+                            true,
+                        );
+                    }
+                }
                 row_num += 1;
             }
 
@@ -1654,25 +1721,36 @@ fn emit_suggestion_default(
                     let underline_start = (span_start_pos + start) as isize + offset;
                     let underline_end = (span_start_pos + start + sub_len) as isize + offset;
                     assert!(underline_start >= 0 && underline_end >= 0);
+                    let padding: usize = max_line_num_len + 3;
                     for p in underline_start..underline_end {
-                        buffer.putc(
-                            row_num,
-                            ((max_line_num_len + 3) as isize + p) as usize,
-                            '^',
-                            Style::UnderlinePrimary,
+                        // Colorize addition/replacements with green.
+                        buffer.set_style(
+                            row_num - 1,
+                            (padding as isize + p) as usize,
+                            Style::Addition,
+                            true,
                         );
-                    }
-                    // underline removals too
-                    if underline_start == underline_end {
-                        for p in underline_start - 1..underline_start + 1 {
+                        if !show_diff {
+                            // If this is a replacement, underline with `^`, if this is an addition
+                            // underline with `+`.
                             buffer.putc(
                                 row_num,
-                                ((max_line_num_len + 3) as isize + p) as usize,
-                                '-',
-                                Style::UnderlineSecondary,
+                                (padding as isize + p) as usize,
+                                if part.is_addition(&sm) { '+' } else { '~' },
+                                Style::Addition,
                             );
                         }
                     }
+                    if show_diff {
+                        // Colorize removal with red in diff format.
+                        buffer.set_style_range(
+                            row_num - 2,
+                            (padding as isize + span_start_pos as isize) as usize,
+                            (padding as isize + span_end_pos as isize) as usize,
+                            Style::Removal,
+                            true,
+                        );
+                    }
 
                     // length of the code after substitution
                     let full_sub_len = part
@@ -2129,6 +2207,12 @@ impl<'a> WritableDst<'a> {
     fn apply_style(&mut self, lvl: Level, style: Style) -> io::Result<()> {
         let mut spec = ColorSpec::new();
         match style {
+            Style::Addition => {
+                spec.set_fg(Some(Color::Green)).set_intense(true);
+            }
+            Style::Removal => {
+                spec.set_fg(Some(Color::Red)).set_intense(true);
+            }
             Style::LineAndColumn => {}
             Style::LineNumber => {
                 spec.set_bold(true);
index fc0924ac5f920540e5e596e619362d347530f058..ec29d8016ddf4461478fc748f0065598d4ced5ec 100644 (file)
@@ -160,32 +160,77 @@ pub struct SubstitutionPart {
     pub snippet: String,
 }
 
+/// Used to translate between `Span`s and byte positions within a single output line in highlighted
+/// code of structured suggestions.
+#[derive(Debug, Clone, Copy)]
+pub struct SubstitutionHighlight {
+    start: usize,
+    end: usize,
+}
+
+impl SubstitutionPart {
+    pub fn is_addition(&self, sm: &SourceMap) -> bool {
+        !self.snippet.is_empty()
+            && sm
+                .span_to_snippet(self.span)
+                .map_or(self.span.is_empty(), |snippet| snippet.trim().is_empty())
+    }
+
+    pub fn is_deletion(&self) -> bool {
+        self.snippet.trim().is_empty()
+    }
+
+    pub fn is_replacement(&self, sm: &SourceMap) -> bool {
+        !self.snippet.is_empty()
+            && sm
+                .span_to_snippet(self.span)
+                .map_or(!self.span.is_empty(), |snippet| !snippet.trim().is_empty())
+    }
+}
+
 impl CodeSuggestion {
     /// Returns the assembled code suggestions, whether they should be shown with an underline
     /// and whether the substitution only differs in capitalization.
-    pub fn splice_lines(&self, sm: &SourceMap) -> Vec<(String, Vec<SubstitutionPart>, bool)> {
+    pub fn splice_lines(
+        &self,
+        sm: &SourceMap,
+    ) -> Vec<(String, Vec<SubstitutionPart>, Vec<Vec<SubstitutionHighlight>>, bool)> {
+        // For the `Vec<Vec<SubstitutionHighlight>>` value, the first level of the vector
+        // corresponds to the output snippet's lines, while the second level corresponds to the
+        // substrings within that line that should be highlighted.
+
         use rustc_span::{CharPos, Pos};
 
+        /// Append to a buffer the remainder of the line of existing source code, and return the
+        /// count of lines that have been added for accurate highlighting.
         fn push_trailing(
             buf: &mut String,
             line_opt: Option<&Cow<'_, str>>,
             lo: &Loc,
             hi_opt: Option<&Loc>,
-        ) {
+        ) -> usize {
+            let mut line_count = 0;
             let (lo, hi_opt) = (lo.col.to_usize(), hi_opt.map(|hi| hi.col.to_usize()));
             if let Some(line) = line_opt {
                 if let Some(lo) = line.char_indices().map(|(i, _)| i).nth(lo) {
                     let hi_opt = hi_opt.and_then(|hi| line.char_indices().map(|(i, _)| i).nth(hi));
                     match hi_opt {
-                        Some(hi) if hi > lo => buf.push_str(&line[lo..hi]),
+                        Some(hi) if hi > lo => {
+                            line_count = line[lo..hi].matches('\n').count();
+                            buf.push_str(&line[lo..hi])
+                        }
                         Some(_) => (),
-                        None => buf.push_str(&line[lo..]),
+                        None => {
+                            line_count = line[lo..].matches('\n').count();
+                            buf.push_str(&line[lo..])
+                        }
                     }
                 }
                 if hi_opt.is_none() {
                     buf.push('\n');
                 }
             }
+            line_count
         }
 
         assert!(!self.substitutions.is_empty());
@@ -220,6 +265,7 @@ fn push_trailing(
                     return None;
                 }
 
+                let mut highlights = vec![];
                 // To build up the result, we do this for each span:
                 // - push the line segment trailing the previous span
                 //   (at the beginning a "phantom" span pointing at the start of the line)
@@ -236,17 +282,29 @@ fn push_trailing(
                     lines.lines.get(0).and_then(|line0| sf.get_line(line0.line_index));
                 let mut buf = String::new();
 
+                let mut line_highlight = vec![];
                 for part in &substitution.parts {
                     let cur_lo = sm.lookup_char_pos(part.span.lo());
                     if prev_hi.line == cur_lo.line {
-                        push_trailing(&mut buf, prev_line.as_ref(), &prev_hi, Some(&cur_lo));
+                        let mut count =
+                            push_trailing(&mut buf, prev_line.as_ref(), &prev_hi, Some(&cur_lo));
+                        while count > 0 {
+                            highlights.push(std::mem::take(&mut line_highlight));
+                            count -= 1;
+                        }
                     } else {
-                        push_trailing(&mut buf, prev_line.as_ref(), &prev_hi, None);
+                        highlights.push(std::mem::take(&mut line_highlight));
+                        let mut count = push_trailing(&mut buf, prev_line.as_ref(), &prev_hi, None);
+                        while count > 0 {
+                            highlights.push(std::mem::take(&mut line_highlight));
+                            count -= 1;
+                        }
                         // push lines between the previous and current span (if any)
                         for idx in prev_hi.line..(cur_lo.line - 1) {
                             if let Some(line) = sf.get_line(idx) {
                                 buf.push_str(line.as_ref());
                                 buf.push('\n');
+                                highlights.push(std::mem::take(&mut line_highlight));
                             }
                         }
                         if let Some(cur_line) = sf.get_line(cur_lo.line - 1) {
@@ -257,10 +315,21 @@ fn push_trailing(
                             buf.push_str(&cur_line[..end]);
                         }
                     }
+                    // Add a whole line highlight per line in the snippet.
+                    line_highlight.push(SubstitutionHighlight {
+                        start: cur_lo.col.0,
+                        end: cur_lo.col.0
+                            + part.snippet.split('\n').next().unwrap_or(&part.snippet).len(),
+                    });
+                    for line in part.snippet.split('\n').skip(1) {
+                        highlights.push(std::mem::take(&mut line_highlight));
+                        line_highlight.push(SubstitutionHighlight { start: 0, end: line.len() });
+                    }
                     buf.push_str(&part.snippet);
                     prev_hi = sm.lookup_char_pos(part.span.hi());
                     prev_line = sf.get_line(prev_hi.line - 1);
                 }
+                highlights.push(std::mem::take(&mut line_highlight));
                 let only_capitalization = is_case_difference(sm, &buf, bounding_span);
                 // if the replacement already ends with a newline, don't print the next line
                 if !buf.ends_with('\n') {
@@ -270,7 +339,7 @@ fn push_trailing(
                 while buf.ends_with('\n') {
                     buf.pop();
                 }
-                Some((buf, substitution.parts, only_capitalization))
+                Some((buf, substitution.parts, highlights, only_capitalization))
             })
             .collect()
     }
index 3fe02bd0ceecf22bba43524631b7a32fa617eeb2..64353461e90e0cbe80e7dea4a98b39ebae3636f1 100644 (file)
@@ -177,4 +177,6 @@ pub enum Style {
     NoStyle,
     Level(Level),
     Highlight,
+    Addition,
+    Removal,
 }
index 128b51c206162d5fe0fcc5b6fb1be3b25ab564af..73b29d65e9132b9cbeb4cfbe12b37afb20774883 100644 (file)
@@ -281,9 +281,6 @@ pub fn set(&self, features: &mut Features, span: Span) {
     // feature-group-start: actual feature gates
     // -------------------------------------------------------------------------
 
-    /// 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),
 
index 49cca3fbc3985211ed7526ec9340342615170dae..5729384c0da25bec41570151474a79667e6595af 100644 (file)
@@ -291,18 +291,6 @@ macro_rules! experimental {
     ),
 
     // Plugins:
-    (
-        sym::plugin_registrar, Normal, template!(Word),
-        Gated(
-            Stability::Deprecated(
-                "https://github.com/rust-lang/rust/pull/64675",
-                Some("may be removed in a future compiler version"),
-            ),
-            sym::plugin_registrar,
-            "compiler plugins are deprecated",
-            cfg_fn!(plugin_registrar)
-        )
-    ),
     (
         sym::plugin, CrateLevel, template!(List: "name"),
         Gated(
index 46b36f2b7040f6f28163dbd6ef81f72c44aaa076..5cadbd9e5cf7198bf87c908d4de5e2dff56818fa 100644 (file)
@@ -136,9 +136,12 @@ macro_rules! declare_features {
     (removed, main, "1.53.0", Some(29634), None, None),
     (removed, pub_macro_rules, "1.53.0", Some(78855), None,
      Some("removed due to being incomplete, in particular it does not work across crates")),
-     /// Allows the definition of `const` functions with some advanced features.
+    /// Allows the definition of `const` functions with some advanced features.
     (removed, const_fn, "1.54.0", Some(57563), None,
      Some("split into finer-grained feature gates")),
+    /// Allows using `#[plugin_registrar]` on functions.
+    (removed, plugin_registrar, "1.54.0", Some(29597), None,
+     Some("a __rustc_plugin_registrar symbol must now be defined instead")),
 
     /// Allows `#[doc(include = "some-file")]`.
     (removed, external_doc, "1.54.0", Some(44732), None,
index f0d63f512fcbc2e4341b94e9ffabd3db7e94931c..10217a5f5749809d6615794d19f942a039c788d6 100644 (file)
@@ -4,10 +4,12 @@
 pub use self::SubregionOrigin::*;
 pub use self::ValuePairs::*;
 
+use self::opaque_types::OpaqueTypeMap;
 pub(crate) use self::undo_log::{InferCtxtUndoLogs, Snapshot, UndoLog};
 
 use crate::traits::{self, ObligationCause, PredicateObligations, TraitEngine};
 
+use hir::def_id::CRATE_DEF_ID;
 use rustc_data_structures::fx::{FxHashMap, FxHashSet};
 use rustc_data_structures::sync::Lrc;
 use rustc_data_structures::undo_log::Rollback;
@@ -59,6 +61,7 @@
 mod lexical_region_resolve;
 mod lub;
 pub mod nll_relate;
+pub mod opaque_types;
 pub mod outlives;
 pub mod region_constraints;
 pub mod resolve;
@@ -191,6 +194,19 @@ pub struct InferCtxtInner<'tcx> {
     region_obligations: Vec<(hir::HirId, RegionObligation<'tcx>)>,
 
     undo_log: InferCtxtUndoLogs<'tcx>,
+
+    // Opaque types found in explicit return types and their
+    // associated fresh inference variable. Writeback resolves these
+    // variables to get the concrete type, which can be used to
+    // 'de-opaque' OpaqueTypeDecl, after typeck is done with all functions.
+    pub opaque_types: OpaqueTypeMap<'tcx>,
+
+    /// A map from inference variables created from opaque
+    /// type instantiations (`ty::Infer`) to the actual opaque
+    /// type (`ty::Opaque`). Used during fallback to map unconstrained
+    /// opaque type inference variables to their corresponding
+    /// opaque type.
+    pub opaque_types_vars: FxHashMap<Ty<'tcx>, Ty<'tcx>>,
 }
 
 impl<'tcx> InferCtxtInner<'tcx> {
@@ -204,6 +220,8 @@ fn new() -> InferCtxtInner<'tcx> {
             float_unification_storage: ut::UnificationTableStorage::new(),
             region_constraint_storage: Some(RegionConstraintStorage::new()),
             region_obligations: vec![],
+            opaque_types: Default::default(),
+            opaque_types_vars: Default::default(),
         }
     }
 
@@ -273,6 +291,10 @@ pub fn unwrap_region_constraints(&mut self) -> RegionConstraintCollector<'_, 'tc
 pub struct InferCtxt<'a, 'tcx> {
     pub tcx: TyCtxt<'tcx>,
 
+    /// The `DefId` of the item in whose context we are performing inference or typeck.
+    /// It is used to check whether an opaque type use is a defining use.
+    pub defining_use_anchor: LocalDefId,
+
     /// During type-checking/inference of a body, `in_progress_typeck_results`
     /// contains a reference to the typeck results being built up, which are
     /// used for reading closure kinds/signatures as they are inferred,
@@ -531,6 +553,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
 pub struct InferCtxtBuilder<'tcx> {
     tcx: TyCtxt<'tcx>,
     fresh_typeck_results: Option<RefCell<ty::TypeckResults<'tcx>>>,
+    defining_use_anchor: LocalDefId,
 }
 
 pub trait TyCtxtInferExt<'tcx> {
@@ -539,15 +562,31 @@ pub trait TyCtxtInferExt<'tcx> {
 
 impl TyCtxtInferExt<'tcx> for TyCtxt<'tcx> {
     fn infer_ctxt(self) -> InferCtxtBuilder<'tcx> {
-        InferCtxtBuilder { tcx: self, fresh_typeck_results: None }
+        InferCtxtBuilder {
+            tcx: self,
+            defining_use_anchor: CRATE_DEF_ID,
+            fresh_typeck_results: None,
+        }
     }
 }
 
 impl<'tcx> InferCtxtBuilder<'tcx> {
     /// Used only by `rustc_typeck` during body type-checking/inference,
     /// will initialize `in_progress_typeck_results` with fresh `TypeckResults`.
+    /// Will also change the scope for opaque type defining use checks to the given owner.
     pub fn with_fresh_in_progress_typeck_results(mut self, table_owner: LocalDefId) -> Self {
         self.fresh_typeck_results = Some(RefCell::new(ty::TypeckResults::new(table_owner)));
+        self.with_opaque_type_inference(table_owner)
+    }
+
+    /// Whenever the `InferCtxt` should be able to handle defining uses of opaque types,
+    /// you need to call this function. Otherwise the opaque type will be treated opaquely.
+    ///
+    /// It is only meant to be called in two places, for typeck
+    /// (via `with_fresh_in_progress_typeck_results`) and for the inference context used
+    /// in mir borrowck.
+    pub fn with_opaque_type_inference(mut self, defining_use_anchor: LocalDefId) -> Self {
+        self.defining_use_anchor = defining_use_anchor;
         self
     }
 
@@ -575,10 +614,11 @@ pub fn enter_with_canonical<T, R>(
     }
 
     pub fn enter<R>(&mut self, f: impl for<'a> FnOnce(InferCtxt<'a, 'tcx>) -> R) -> R {
-        let InferCtxtBuilder { tcx, ref fresh_typeck_results } = *self;
+        let InferCtxtBuilder { tcx, defining_use_anchor, ref fresh_typeck_results } = *self;
         let in_progress_typeck_results = fresh_typeck_results.as_ref();
         f(InferCtxt {
             tcx,
+            defining_use_anchor,
             in_progress_typeck_results,
             inner: RefCell::new(InferCtxtInner::new()),
             lexical_region_resolutions: RefCell::new(None),
diff --git a/compiler/rustc_infer/src/infer/opaque_types.rs b/compiler/rustc_infer/src/infer/opaque_types.rs
new file mode 100644 (file)
index 0000000..d0883f2
--- /dev/null
@@ -0,0 +1,47 @@
+use rustc_data_structures::vec_map::VecMap;
+use rustc_hir as hir;
+use rustc_middle::ty::{OpaqueTypeKey, Ty};
+use rustc_span::Span;
+
+pub type OpaqueTypeMap<'tcx> = VecMap<OpaqueTypeKey<'tcx>, OpaqueTypeDecl<'tcx>>;
+
+/// Information about the opaque types whose values we
+/// are inferring in this function (these are the `impl Trait` that
+/// appear in the return type).
+#[derive(Copy, Clone, Debug)]
+pub struct OpaqueTypeDecl<'tcx> {
+    /// The opaque type (`ty::Opaque`) for this declaration.
+    pub opaque_type: Ty<'tcx>,
+
+    /// The span of this particular definition of the opaque type. So
+    /// for example:
+    ///
+    /// ```ignore (incomplete snippet)
+    /// type Foo = impl Baz;
+    /// fn bar() -> Foo {
+    /// //          ^^^ This is the span we are looking for!
+    /// }
+    /// ```
+    ///
+    /// In cases where the fn returns `(impl Trait, impl Trait)` or
+    /// other such combinations, the result is currently
+    /// over-approximated, but better than nothing.
+    pub definition_span: Span,
+
+    /// The type variable that represents the value of the opaque type
+    /// that we require. In other words, after we compile this function,
+    /// we will be created a constraint like:
+    ///
+    ///     Foo<'a, T> = ?C
+    ///
+    /// where `?C` is the value of this type variable. =) It may
+    /// naturally refer to the type and lifetime parameters in scope
+    /// in this function, though ultimately it should only reference
+    /// those that are arguments to `Foo` in the constraint above. (In
+    /// other words, `?C` should not include `'b`, even though it's a
+    /// lifetime parameter on `foo`.)
+    pub concrete_ty: Ty<'tcx>,
+
+    /// The origin of the opaque type.
+    pub origin: hir::OpaqueTyOrigin,
+}
index 5db027fb5b4734f6ab0be6de711ed6c3abe3d8f1..5dc57f6023b767764ff7ea644b4e20c6c56e93be 100644 (file)
@@ -741,7 +741,6 @@ pub fn prepare_outputs(
     let providers = &mut Providers::default();
     providers.analysis = analysis;
     proc_macro_decls::provide(providers);
-    plugin::build::provide(providers);
     rustc_middle::hir::provide(providers);
     mir::provide(providers);
     mir_build::provide(providers);
@@ -856,8 +855,6 @@ fn analysis(tcx: TyCtxt<'_>, (): ()) -> Result<()> {
             {
                 entry_point = sess.time("looking_for_entry_point", || tcx.entry_fn(()));
 
-                sess.time("looking_for_plugin_registrar", || tcx.ensure().plugin_registrar_fn(()));
-
                 sess.time("looking_for_derive_registrar", || {
                     tcx.ensure().proc_macro_decls_static(())
                 });
index 9a96c03cd3c8086806ebcfd1ea3ee3f47395e6d1..b970c9e4911fafb36ff0612c0e30fb417d46437f 100644 (file)
@@ -60,6 +60,9 @@ pub enum EscapeError {
     /// After a line ending with '\', the next line contains whitespace
     /// characters that are not skipped.
     UnskippedWhitespaceWarning,
+
+    /// After a line ending with '\', multiple lines are skipped.
+    MultipleSkippedLinesWarning,
 }
 
 impl EscapeError {
@@ -67,6 +70,7 @@ impl EscapeError {
     pub fn is_fatal(&self) -> bool {
         match self {
             EscapeError::UnskippedWhitespaceWarning => false,
+            EscapeError::MultipleSkippedLinesWarning => false,
             _ => true,
         }
     }
@@ -315,12 +319,17 @@ fn skip_ascii_whitespace<F>(chars: &mut Chars<'_>, start: usize, callback: &mut
     where
         F: FnMut(Range<usize>, Result<char, EscapeError>),
     {
-        let str = chars.as_str();
-        let first_non_space = str
+        let tail = chars.as_str();
+        let first_non_space = tail
             .bytes()
             .position(|b| b != b' ' && b != b'\t' && b != b'\n' && b != b'\r')
-            .unwrap_or(str.len());
-        let tail = &str[first_non_space..];
+            .unwrap_or(tail.len());
+        if tail[1..first_non_space].contains('\n') {
+            // The +1 accounts for the escaping slash.
+            let end = start + first_non_space + 1;
+            callback(start..end, Err(EscapeError::MultipleSkippedLinesWarning));
+        }
+        let tail = &tail[first_non_space..];
         if let Some(c) = tail.chars().nth(0) {
             // For error reporting, we would like the span to contain the character that was not
             // skipped.  The +1 is necessary to account for the leading \ that started the escape.
index 1f4dbb20f4e9896e292e44e3208146c8ab23830e..fa61554afde6c5d16c87b462e0ca802b15a7e0a7 100644 (file)
@@ -106,6 +106,10 @@ fn check(literal: &str, expected: &[(Range<usize>, Result<char, EscapeError>)])
         assert_eq!(unescaped, expected);
     }
 
+    // Check we can handle escaped newlines at the end of a file.
+    check("\\\n", &[]);
+    check("\\\n ", &[]);
+
     check(
         "\\\n \u{a0} x",
         &[
@@ -115,6 +119,7 @@ fn check(literal: &str, expected: &[(Range<usize>, Result<char, EscapeError>)])
             (6..7, Ok('x')),
         ],
     );
+    check("\\\n  \n  x", &[(0..7, Err(EscapeError::MultipleSkippedLinesWarning)), (7..8, Ok('x'))]);
 }
 
 #[test]
index 77741c7240b0d100ae1749094dbdd9e780a67f90..21fad5f9af683fb20f1c4ae70b4d4288966a941b 100644 (file)
@@ -32,7 +32,7 @@
     Warn,
     "detects calling `into_iter` on arrays in Rust 2015 and 2018",
     @future_incompatible = FutureIncompatibleInfo {
-        reference: "issue #66145 <https://github.com/rust-lang/rust/issues/66145>",
+        reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>",
         reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2021),
     };
 }
index f341ca686593c2508ac3fc094a985c8bc099e49f..31d0d917f9093fbee583384e861119daa7b99f29 100644 (file)
@@ -1680,7 +1680,7 @@ fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'tcx>) {
     Warn,
     "`...` range patterns are deprecated",
     @future_incompatible = FutureIncompatibleInfo {
-        reference: "issue #80165 <https://github.com/rust-lang/rust/issues/80165>",
+        reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>",
         reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
     };
 }
index 1998386603f12df543a4541f73f1f9ffae43d337..9ea17e0ccb61389375ec8422c6d3656f4188ee13 100644 (file)
     Warn,
     "suggest using `dyn Trait` for trait objects",
     @future_incompatible = FutureIncompatibleInfo {
-        reference: "issue #80165 <https://github.com/rust-lang/rust/issues/80165>",
+        reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>",
         reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
     };
 }
     Allow,
     "detects usage of old versions of or-patterns",
     @future_incompatible = FutureIncompatibleInfo {
-        reference: "issue #84869 <https://github.com/rust-lang/rust/issues/84869>",
+        reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/or-patterns-macro-rules.html>",
         reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
     };
 }
     "detects the usage of trait methods which are ambiguous with traits added to the \
         prelude in future editions",
     @future_incompatible = FutureIncompatibleInfo {
-        reference: "issue #85684 <https://github.com/rust-lang/rust/issues/85684>",
+        reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>",
         reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
     };
 }
     Allow,
     "identifiers that will be parsed as a prefix in Rust 2021",
     @future_incompatible = FutureIncompatibleInfo {
-        reference: "issue #84978 <https://github.com/rust-lang/rust/issues/84978>",
+        reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/reserving-syntax.html>",
         reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
     };
     crate_level_only
index cf8577a26cf714fd6c31b056e753b3c51208982f..8d1bf6f55df09b0c54356babeb4c7cc4f1ea7b0a 100644 (file)
 use rustc_session::filesearch::{FileDoesntMatch, FileMatches, FileSearch};
 use rustc_session::search_paths::PathKind;
 use rustc_session::utils::CanonicalizedPath;
-use rustc_session::{Session, StableCrateId};
+use rustc_session::Session;
 use rustc_span::symbol::{sym, Symbol};
 use rustc_span::Span;
 use rustc_target::spec::{Target, TargetTriple};
@@ -787,7 +787,7 @@ pub fn find_plugin_registrar(
     metadata_loader: &dyn MetadataLoader,
     span: Span,
     name: Symbol,
-) -> (PathBuf, StableCrateId) {
+) -> PathBuf {
     match find_plugin_registrar_impl(sess, metadata_loader, name) {
         Ok(res) => res,
         // `core` is always available if we got as far as loading plugins.
@@ -799,7 +799,7 @@ fn find_plugin_registrar_impl<'a>(
     sess: &'a Session,
     metadata_loader: &dyn MetadataLoader,
     name: Symbol,
-) -> Result<(PathBuf, StableCrateId), CrateError> {
+) -> Result<PathBuf, CrateError> {
     info!("find plugin registrar `{}`", name);
     let mut locator = CrateLocator::new(
         sess,
@@ -816,7 +816,7 @@ fn find_plugin_registrar_impl<'a>(
 
     match locator.maybe_load_library_crate()? {
         Some(library) => match library.source.dylib {
-            Some(dylib) => Ok((dylib.0, library.metadata.get_root().stable_crate_id())),
+            Some(dylib) => Ok(dylib.0),
             None => Err(CrateError::NonDylibPlugin(name)),
         },
         None => Err(locator.into_error()),
index 3c16852df059a9ee6b6938cd9bb7fdffaf252679..7c7025ac37a382509377edeac21b57e8998b7db2 100644 (file)
     query entry_fn(_: ()) -> Option<(DefId, EntryFnType)> {
         desc { "looking up the entry function of a crate" }
     }
-    query plugin_registrar_fn(_: ()) -> Option<LocalDefId> {
-        desc { "looking up the plugin registrar for a crate" }
-    }
     query proc_macro_decls_static(_: ()) -> Option<LocalDefId> {
         desc { "looking up the derive registrar for a crate" }
     }
index 36eb8a4baa8308f1f7d13a8c81c8f64cb79d57d2..2bfa51f27bbb610ad932d222da084a989cc5ac7f 100644 (file)
@@ -105,7 +105,7 @@ fn mir_borrowck<'tcx>(
     let (input_body, promoted) = tcx.mir_promoted(def);
     debug!("run query mir_borrowck: {}", tcx.def_path_str(def.did.to_def_id()));
 
-    let opt_closure_req = tcx.infer_ctxt().enter(|infcx| {
+    let opt_closure_req = tcx.infer_ctxt().with_opaque_type_inference(def.did).enter(|infcx| {
         let input_body: &Body<'_> = &input_body.borrow();
         let promoted: &IndexVec<_, _> = &promoted.borrow();
         do_mir_borrowck(&infcx, input_body, promoted)
index 3fb06cd2f5f441e1e93234fb9302d4c49d48fb63..f69d08a6d594231163296fac607a42bd41da390d 100644 (file)
@@ -179,54 +179,55 @@ pub(crate) fn type_check<'mir, 'tcx>(
             liveness::generate(&mut cx, body, elements, flow_inits, move_data, location_table);
 
             translate_outlives_facts(&mut cx);
-            let mut opaque_type_values = cx.opaque_type_values;
-
-            for (_, revealed_ty) in &mut opaque_type_values {
-                *revealed_ty = infcx.resolve_vars_if_possible(*revealed_ty);
-                if revealed_ty.has_infer_types_or_consts() {
-                    infcx.tcx.sess.delay_span_bug(
-                        body.span,
-                        &format!("could not resolve {:#?}", revealed_ty.kind()),
-                    );
-                    *revealed_ty = infcx.tcx.ty_error();
-                }
-            }
-
-            opaque_type_values.retain(|(opaque_type_key, resolved_ty)| {
-                let concrete_is_opaque = if let ty::Opaque(def_id, _) = resolved_ty.kind() {
-                    *def_id == opaque_type_key.def_id
-                } else {
-                    false
-                };
+            let opaque_type_values = mem::take(&mut infcx.inner.borrow_mut().opaque_types);
 
-                if concrete_is_opaque {
-                    // We're using an opaque `impl Trait` type without
-                    // 'revealing' it. For example, code like this:
-                    //
-                    // type Foo = impl Debug;
-                    // fn foo1() -> Foo { ... }
-                    // fn foo2() -> Foo { foo1() }
-                    //
-                    // In `foo2`, we're not revealing the type of `Foo` - we're
-                    // just treating it as the opaque type.
-                    //
-                    // When this occurs, we do *not* want to try to equate
-                    // the concrete type with the underlying defining type
-                    // of the opaque type - this will always fail, since
-                    // the defining type of an opaque type is always
-                    // some other type (e.g. not itself)
-                    // Essentially, none of the normal obligations apply here -
-                    // we're just passing around some unknown opaque type,
-                    // without actually looking at the underlying type it
-                    // gets 'revealed' into
-                    debug!(
-                        "eq_opaque_type_and_type: non-defining use of {:?}",
-                        opaque_type_key.def_id,
-                    );
-                }
-                !concrete_is_opaque
-            });
             opaque_type_values
+                .into_iter()
+                .filter_map(|(opaque_type_key, decl)| {
+                    let mut revealed_ty = infcx.resolve_vars_if_possible(decl.concrete_ty);
+                    if revealed_ty.has_infer_types_or_consts() {
+                        infcx.tcx.sess.delay_span_bug(
+                            body.span,
+                            &format!("could not resolve {:#?}", revealed_ty.kind()),
+                        );
+                        revealed_ty = infcx.tcx.ty_error();
+                    }
+                    let concrete_is_opaque = if let ty::Opaque(def_id, _) = revealed_ty.kind() {
+                        *def_id == opaque_type_key.def_id
+                    } else {
+                        false
+                    };
+
+                    if concrete_is_opaque {
+                        // We're using an opaque `impl Trait` type without
+                        // 'revealing' it. For example, code like this:
+                        //
+                        // type Foo = impl Debug;
+                        // fn foo1() -> Foo { ... }
+                        // fn foo2() -> Foo { foo1() }
+                        //
+                        // In `foo2`, we're not revealing the type of `Foo` - we're
+                        // just treating it as the opaque type.
+                        //
+                        // When this occurs, we do *not* want to try to equate
+                        // the concrete type with the underlying defining type
+                        // of the opaque type - this will always fail, since
+                        // the defining type of an opaque type is always
+                        // some other type (e.g. not itself)
+                        // Essentially, none of the normal obligations apply here -
+                        // we're just passing around some unknown opaque type,
+                        // without actually looking at the underlying type it
+                        // gets 'revealed' into
+                        debug!(
+                            "eq_opaque_type_and_type: non-defining use of {:?}",
+                            opaque_type_key.def_id,
+                        );
+                        None
+                    } else {
+                        Some((opaque_type_key, revealed_ty))
+                    }
+                })
+                .collect()
         },
     );
 
@@ -865,7 +866,6 @@ struct TypeChecker<'a, 'tcx> {
     reported_errors: FxHashSet<(Ty<'tcx>, Span)>,
     borrowck_context: &'a mut BorrowCheckContext<'a, 'tcx>,
     universal_region_relations: &'a UniversalRegionRelations<'tcx>,
-    opaque_type_values: VecMap<OpaqueTypeKey<'tcx>, Ty<'tcx>>,
 }
 
 struct BorrowCheckContext<'a, 'tcx> {
@@ -1025,7 +1025,6 @@ fn new(
             borrowck_context,
             reported_errors: Default::default(),
             universal_region_relations,
-            opaque_type_values: VecMap::default(),
         };
         checker.check_user_type_annotations();
         checker
@@ -1289,10 +1288,8 @@ fn eq_opaque_type_and_type(
         let body = self.body;
         let mir_def_id = body.source.def_id().expect_local();
 
-        let mut opaque_type_values = VecMap::new();
-
         debug!("eq_opaque_type_and_type: mir_def_id={:?}", mir_def_id);
-        let opaque_type_map = self.fully_perform_op(
+        self.fully_perform_op(
             locations,
             category,
             CustomTypeOp::new(
@@ -1307,20 +1304,17 @@ fn eq_opaque_type_and_type(
                     // to `Box<?T>`, returning an `opaque_type_map` mapping `{Foo<T> -> ?T}`.
                     // (Note that the key of the map is both the def-id of `Foo` along with
                     // any generic parameters.)
-                    let (output_ty, opaque_type_map) =
-                        obligations.add(infcx.instantiate_opaque_types(
-                            mir_def_id,
-                            dummy_body_id,
-                            param_env,
-                            anon_ty,
-                            locations.span(body),
-                        ));
+                    let output_ty = obligations.add(infcx.instantiate_opaque_types(
+                        dummy_body_id,
+                        param_env,
+                        anon_ty,
+                        locations.span(body),
+                    ));
                     debug!(
                         "eq_opaque_type_and_type: \
                          instantiated output_ty={:?} \
-                         opaque_type_map={:#?} \
                          revealed_ty={:?}",
-                        output_ty, opaque_type_map, revealed_ty
+                        output_ty, revealed_ty
                     );
 
                     // Make sure that the inferred types are well-formed. I'm
@@ -1338,48 +1332,38 @@ fn eq_opaque_type_and_type(
                             .eq(output_ty, revealed_ty)?,
                     );
 
-                    for &(opaque_type_key, opaque_decl) in &opaque_type_map {
-                        opaque_type_values.insert(opaque_type_key, opaque_decl.concrete_ty);
-                    }
-
                     debug!("eq_opaque_type_and_type: equated");
 
-                    Ok(InferOk {
-                        value: Some(opaque_type_map),
-                        obligations: obligations.into_vec(),
-                    })
+                    Ok(InferOk { value: (), obligations: obligations.into_vec() })
                 },
                 || "input_output".to_string(),
             ),
         )?;
 
-        self.opaque_type_values.extend(opaque_type_values);
-
         let universal_region_relations = self.universal_region_relations;
 
         // Finally, if we instantiated the anon types successfully, we
         // have to solve any bounds (e.g., `-> impl Iterator` needs to
         // prove that `T: Iterator` where `T` is the type we
         // instantiated it with).
-        if let Some(opaque_type_map) = opaque_type_map {
-            for (opaque_type_key, opaque_decl) in opaque_type_map {
-                self.fully_perform_op(
-                    locations,
-                    ConstraintCategory::OpaqueType,
-                    CustomTypeOp::new(
-                        |infcx| {
-                            infcx.constrain_opaque_type(
-                                opaque_type_key,
-                                &opaque_decl,
-                                GenerateMemberConstraints::IfNoStaticBound,
-                                universal_region_relations,
-                            );
-                            Ok(InferOk { value: (), obligations: vec![] })
-                        },
-                        || "opaque_type_map".to_string(),
-                    ),
-                )?;
-            }
+        let opaque_type_map = self.infcx.inner.borrow().opaque_types.clone();
+        for (opaque_type_key, opaque_decl) in opaque_type_map {
+            self.fully_perform_op(
+                locations,
+                ConstraintCategory::OpaqueType,
+                CustomTypeOp::new(
+                    |infcx| {
+                        infcx.constrain_opaque_type(
+                            opaque_type_key,
+                            &opaque_decl,
+                            GenerateMemberConstraints::IfNoStaticBound,
+                            universal_region_relations,
+                        );
+                        Ok(InferOk { value: (), obligations: vec![] })
+                    },
+                    || "opaque_type_map".to_string(),
+                ),
+            )?;
         }
         Ok(())
     }
index dc1f9053b61f028fe968a3c1b31928e657a61481..bfab886b6ee4f9fd2ab9c40b62099c287170884f 100644 (file)
@@ -465,7 +465,7 @@ pub fn emulate_intrinsic(
                 );
                 self.copy_op(&self.operand_index(&args[0], index)?, dest)?;
             }
-            sym::likely | sym::unlikely => {
+            sym::likely | sym::unlikely | sym::black_box => {
                 // These just return their argument
                 self.copy_op(&args[0], dest)?;
             }
index 4e95cdc0efa5f30c83392dc47498ca379b5d6d4d..aa6b424ce2b57ec167c85c7086471cc3165d62ec 100644 (file)
@@ -280,6 +280,11 @@ pub(crate) fn emit_unescape_error(
                 format!("non-ASCII whitespace symbol '{}' is not skipped", c.escape_unicode());
             handler.struct_span_warn(span, &msg).span_label(char_span, &msg).emit();
         }
+        EscapeError::MultipleSkippedLinesWarning => {
+            let msg = "multiple lines skipped by escaped newline";
+            let bottom_msg = "skipping everything up to and including this point";
+            handler.struct_span_warn(span, msg).span_label(span, bottom_msg).emit();
+        }
     }
 }
 
diff --git a/compiler/rustc_plugin_impl/src/build.rs b/compiler/rustc_plugin_impl/src/build.rs
deleted file mode 100644 (file)
index b95c4a7..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-//! Used by `rustc` when compiling a plugin crate.
-
-use rustc_hir as hir;
-use rustc_hir::def_id::LocalDefId;
-use rustc_hir::itemlikevisit::ItemLikeVisitor;
-use rustc_middle::ty::query::Providers;
-use rustc_middle::ty::TyCtxt;
-use rustc_span::symbol::sym;
-use rustc_span::Span;
-
-struct RegistrarFinder<'tcx> {
-    tcx: TyCtxt<'tcx>,
-    registrars: Vec<(LocalDefId, Span)>,
-}
-
-impl<'v, 'tcx> ItemLikeVisitor<'v> for RegistrarFinder<'tcx> {
-    fn visit_item(&mut self, item: &hir::Item<'_>) {
-        if let hir::ItemKind::Fn(..) = item.kind {
-            let attrs = self.tcx.hir().attrs(item.hir_id());
-            if self.tcx.sess.contains_name(attrs, sym::plugin_registrar) {
-                self.registrars.push((item.def_id, item.span));
-            }
-        }
-    }
-
-    fn visit_trait_item(&mut self, _trait_item: &hir::TraitItem<'_>) {}
-
-    fn visit_impl_item(&mut self, _impl_item: &hir::ImplItem<'_>) {}
-
-    fn visit_foreign_item(&mut self, _foreign_item: &hir::ForeignItem<'_>) {}
-}
-
-/// Finds the function marked with `#[plugin_registrar]`, if any.
-fn plugin_registrar_fn(tcx: TyCtxt<'_>, (): ()) -> Option<LocalDefId> {
-    let mut finder = RegistrarFinder { tcx, registrars: Vec::new() };
-    tcx.hir().krate().visit_all_item_likes(&mut finder);
-
-    let (def_id, span) = finder.registrars.pop()?;
-
-    if !finder.registrars.is_empty() {
-        let diagnostic = tcx.sess.diagnostic();
-        let mut e = diagnostic.struct_err("multiple plugin registration functions found");
-        e.span_note(span, "one is here");
-        for &(_, span) in &finder.registrars {
-            e.span_note(span, "one is here");
-        }
-        e.emit();
-        diagnostic.abort_if_errors();
-        unreachable!();
-    }
-
-    Some(def_id)
-}
-
-pub fn provide(providers: &mut Providers) {
-    *providers = Providers { plugin_registrar_fn, ..*providers };
-}
index 5bf4d300e9e54e991b02de9f8925cb7591d956c6..a1e13a1abb6197983624aa7acf7509d319ea8533 100644 (file)
@@ -12,7 +12,6 @@
 
 use rustc_lint::LintStore;
 
-pub mod build;
 pub mod load;
 
 /// Structure used to register plugins.
index 687f7db221f4ec3ef777993e131755b7cbeacb96..5da02e3a4899fe442fe9c5b86aac4d1415b0c807 100644 (file)
@@ -55,20 +55,13 @@ fn load_plugin(
     metadata_loader: &dyn MetadataLoader,
     ident: Ident,
 ) {
-    let (lib, disambiguator) =
-        locator::find_plugin_registrar(sess, metadata_loader, ident.span, ident.name);
-    let symbol = sess.generate_plugin_registrar_symbol(disambiguator);
-    let fun = dylink_registrar(sess, ident.span, lib, symbol);
+    let lib = locator::find_plugin_registrar(sess, metadata_loader, ident.span, ident.name);
+    let fun = dylink_registrar(sess, ident.span, lib);
     plugins.push(fun);
 }
 
 // Dynamically link a registrar function into the compiler process.
-fn dylink_registrar(
-    sess: &Session,
-    span: Span,
-    path: PathBuf,
-    symbol: String,
-) -> PluginRegistrarFn {
+fn dylink_registrar(sess: &Session, span: Span, path: PathBuf) -> PluginRegistrarFn {
     use rustc_metadata::dynamic_lib::DynamicLibrary;
 
     // Make sure the path contains a / or the linker will search for it.
@@ -83,7 +76,7 @@ fn dylink_registrar(
     };
 
     unsafe {
-        let registrar = match lib.symbol(&symbol) {
+        let registrar = match lib.symbol("__rustc_plugin_registrar") {
             Ok(registrar) => mem::transmute::<*mut u8, PluginRegistrarFn>(registrar),
             // again fatal if we can't register macros
             Err(err) => sess.span_fatal(span, &err),
@@ -91,7 +84,7 @@ fn dylink_registrar(
 
         // Intentionally leak the dynamic library. We can't ever unload it
         // since the library can make things that will live arbitrarily long
-        // (e.g., an @-box cycle or a thread).
+        // (e.g., an Rc cycle or a thread).
         mem::forget(lib);
 
         registrar
index d5c759623e38b82d9ebaeb2ca75c3f881bbe3fdf..0b1a99922d6d74fdb3e42af0bddc1315b4925c30 100644 (file)
@@ -792,12 +792,6 @@ pub fn must_emit_unwind_tables(&self) -> bool {
             )
     }
 
-    /// Returns the symbol name for the registrar function,
-    /// given the crate `Svh` and the function `DefIndex`.
-    pub fn generate_plugin_registrar_symbol(&self, stable_crate_id: StableCrateId) -> String {
-        format!("__rustc_plugin_registrar_{:08x}__", stable_crate_id.to_u64())
-    }
-
     pub fn generate_proc_macro_decls_symbol(&self, stable_crate_id: StableCrateId) -> String {
         format!("__rustc_proc_macro_decls_{:08x}__", stable_crate_id.to_u64())
     }
index 3f5d8273b38b8829bf5b216fc9ad2f1943465f88..6d03f1a37329e0d50fdfe9e41e40e058e484f905 100644 (file)
         bitreverse,
         bitxor,
         bitxor_assign,
+        black_box,
         block,
         bool,
         borrowck_graphviz_format,
index 0c64fe6ea60a9249cbce6f5c1c98d30d77a20ab3..1b4e6b4e38177bf658afb1a8907098323df6ae05 100644 (file)
@@ -55,7 +55,8 @@ pub(super) fn mangle(
 
     let hash = get_symbol_hash(tcx, instance, instance_ty, instantiating_crate);
 
-    let mut printer = SymbolPrinter { tcx, path: SymbolPath::new(), keep_within_component: false }
+    let mut printer = SymbolPrinter { tcx, path: SymbolPath::new(), keep_within_component: false };
+    printer
         .print_def_path(
             def_id,
             if let ty::InstanceDef::DropGlue(_, _) = instance.def {
@@ -198,7 +199,7 @@ struct SymbolPrinter<'tcx> {
 // `PrettyPrinter` aka pretty printing of e.g. types in paths,
 // symbol names should have their own printing machinery.
 
-impl Printer<'tcx> for SymbolPrinter<'tcx> {
+impl Printer<'tcx> for &mut SymbolPrinter<'tcx> {
     type Error = fmt::Error;
 
     type Path = Self;
@@ -242,7 +243,7 @@ fn print_dyn_existential(
         Ok(self)
     }
 
-    fn print_const(mut self, ct: &'tcx ty::Const<'tcx>) -> Result<Self::Const, Self::Error> {
+    fn print_const(self, ct: &'tcx ty::Const<'tcx>) -> Result<Self::Const, Self::Error> {
         // only print integers
         if let ty::ConstKind::Value(ConstValue::Scalar(Scalar::Int { .. })) = ct.val {
             if ct.ty.is_integral() {
@@ -253,7 +254,7 @@ fn print_const(mut self, ct: &'tcx ty::Const<'tcx>) -> Result<Self::Const, Self:
         Ok(self)
     }
 
-    fn path_crate(mut self, cnum: CrateNum) -> Result<Self::Path, Self::Error> {
+    fn path_crate(self, cnum: CrateNum) -> Result<Self::Path, Self::Error> {
         self.write_str(&self.tcx.crate_name(cnum).as_str())?;
         Ok(self)
     }
@@ -344,7 +345,7 @@ fn path_generic_args(
     }
 }
 
-impl PrettyPrinter<'tcx> for SymbolPrinter<'tcx> {
+impl PrettyPrinter<'tcx> for &mut SymbolPrinter<'tcx> {
     fn region_should_not_be_omitted(&self, _region: ty::Region<'_>) -> bool {
         false
     }
index ba59ff96f6554d3e8e5f3ce9f55e448d7d73e9dc..850d44eb339c72e7c737297f76166317abdae290 100644 (file)
@@ -164,10 +164,6 @@ fn compute_symbol_name(
 
     // FIXME(eddyb) Precompute a custom symbol name based on attributes.
     let is_foreign = if let Some(def_id) = def_id.as_local() {
-        if tcx.plugin_registrar_fn(()) == Some(def_id) {
-            let stable_crate_id = tcx.sess.local_stable_crate_id();
-            return tcx.sess.generate_plugin_registrar_symbol(stable_crate_id);
-        }
         if tcx.proc_macro_decls_static(()) == Some(def_id) {
             let stable_crate_id = tcx.sess.local_stable_crate_id();
             return tcx.sess.generate_proc_macro_decls_symbol(stable_crate_id);
index e5987511c9737057b65d2f9ad16e6000b9f33e71..911956859b8619b263b1e1c252627642bea512bd 100644 (file)
@@ -903,6 +903,7 @@ fn $module() {
 
     ("riscv32i-unknown-none-elf", riscv32i_unknown_none_elf),
     ("riscv32imc-unknown-none-elf", riscv32imc_unknown_none_elf),
+    ("riscv32imc-esp-espidf", riscv32imc_esp_espidf),
     ("riscv32imac-unknown-none-elf", riscv32imac_unknown_none_elf),
     ("riscv32gc-unknown-linux-gnu", riscv32gc_unknown_linux_gnu),
     ("riscv32gc-unknown-linux-musl", riscv32gc_unknown_linux_musl),
diff --git a/compiler/rustc_target/src/spec/riscv32imc_esp_espidf.rs b/compiler/rustc_target/src/spec/riscv32imc_esp_espidf.rs
new file mode 100644 (file)
index 0000000..fb084af
--- /dev/null
@@ -0,0 +1,37 @@
+use crate::spec::{LinkerFlavor, PanicStrategy, RelocModel};
+use crate::spec::{Target, TargetOptions};
+
+pub fn target() -> Target {
+    Target {
+        data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(),
+        llvm_target: "riscv32".to_string(),
+        pointer_width: 32,
+        arch: "riscv32".to_string(),
+
+        options: TargetOptions {
+            families: vec!["unix".to_string()],
+            os: "espidf".to_string(),
+            env: "newlib".to_string(),
+            vendor: "espressif".to_string(),
+            linker_flavor: LinkerFlavor::Gcc,
+            linker: Some("riscv32-esp-elf-gcc".to_string()),
+            cpu: "generic-rv32".to_string(),
+
+            // While the RiscV32IMC architecture does not natively support atomics, ESP-IDF does support
+            // the __atomic* and __sync* GCC builtins, so setting `max_atomic_width` to `Some(32)`
+            // and `atomic_cas` to `true` will cause the compiler to emit libcalls to these builtins.
+            //
+            // Support for atomics is necessary for the Rust STD library, which is supported by the ESP-IDF framework.
+            max_atomic_width: Some(32),
+            atomic_cas: true,
+
+            features: "+m,+c".to_string(),
+            executables: true,
+            panic_strategy: PanicStrategy::Abort,
+            relocation_model: RelocModel::Static,
+            emit_debug_gdb_scripts: false,
+            eh_frame_header: false,
+            ..Default::default()
+        },
+    }
+}
index 95c81c5c729be5be29ea0fafb84f7d5c66242d19..1a195ce18ec64d3708f30bfc83616341d472ed13 100644 (file)
@@ -2,11 +2,11 @@
 use crate::traits::{self, ObligationCause, PredicateObligation};
 use rustc_data_structures::fx::FxHashMap;
 use rustc_data_structures::sync::Lrc;
-use rustc_data_structures::vec_map::VecMap;
 use rustc_hir as hir;
 use rustc_hir::def_id::{DefId, LocalDefId};
 use rustc_infer::infer::error_reporting::unexpected_hidden_region_diagnostic;
 use rustc_infer::infer::free_regions::FreeRegionRelations;
+use rustc_infer::infer::opaque_types::OpaqueTypeDecl;
 use rustc_infer::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
 use rustc_infer::infer::{self, InferCtxt, InferOk};
 use rustc_middle::ty::fold::{BottomUpFolder, TypeFoldable, TypeFolder, TypeVisitor};
 
 use std::ops::ControlFlow;
 
-pub type OpaqueTypeMap<'tcx> = VecMap<OpaqueTypeKey<'tcx>, OpaqueTypeDecl<'tcx>>;
-
-/// Information about the opaque types whose values we
-/// are inferring in this function (these are the `impl Trait` that
-/// appear in the return type).
-#[derive(Copy, Clone, Debug)]
-pub struct OpaqueTypeDecl<'tcx> {
-    /// The opaque type (`ty::Opaque`) for this declaration.
-    pub opaque_type: Ty<'tcx>,
-
-    /// The span of this particular definition of the opaque type. So
-    /// for example:
-    ///
-    /// ```ignore (incomplete snippet)
-    /// type Foo = impl Baz;
-    /// fn bar() -> Foo {
-    /// //          ^^^ This is the span we are looking for!
-    /// }
-    /// ```
-    ///
-    /// In cases where the fn returns `(impl Trait, impl Trait)` or
-    /// other such combinations, the result is currently
-    /// over-approximated, but better than nothing.
-    pub definition_span: Span,
-
-    /// The type variable that represents the value of the opaque type
-    /// that we require. In other words, after we compile this function,
-    /// we will be created a constraint like:
-    ///
-    ///     Foo<'a, T> = ?C
-    ///
-    /// where `?C` is the value of this type variable. =) It may
-    /// naturally refer to the type and lifetime parameters in scope
-    /// in this function, though ultimately it should only reference
-    /// those that are arguments to `Foo` in the constraint above. (In
-    /// other words, `?C` should not include `'b`, even though it's a
-    /// lifetime parameter on `foo`.)
-    pub concrete_ty: Ty<'tcx>,
-
-    /// Returns `true` if the `impl Trait` bounds include region bounds.
-    /// For example, this would be true for:
-    ///
-    ///     fn foo<'a, 'b, 'c>() -> impl Trait<'c> + 'a + 'b
-    ///
-    /// but false for:
-    ///
-    ///     fn foo<'c>() -> impl Trait<'c>
-    ///
-    /// unless `Trait` was declared like:
-    ///
-    ///     trait Trait<'c>: 'c
-    ///
-    /// in which case it would be true.
-    ///
-    /// This is used during regionck to decide whether we need to
-    /// impose any additional constraints to ensure that region
-    /// variables in `concrete_ty` wind up being constrained to
-    /// something from `substs` (or, at minimum, things that outlive
-    /// the fn body). (Ultimately, writeback is responsible for this
-    /// check.)
-    pub has_required_region_bounds: bool,
-
-    /// The origin of the opaque type.
-    pub origin: hir::OpaqueTyOrigin,
-}
-
 /// Whether member constraints should be generated for all opaque types
 #[derive(Debug)]
 pub enum GenerateMemberConstraints {
@@ -98,18 +32,13 @@ pub enum GenerateMemberConstraints {
 pub trait InferCtxtExt<'tcx> {
     fn instantiate_opaque_types<T: TypeFoldable<'tcx>>(
         &self,
-        parent_def_id: LocalDefId,
         body_id: hir::HirId,
         param_env: ty::ParamEnv<'tcx>,
         value: T,
         value_span: Span,
-    ) -> InferOk<'tcx, (T, OpaqueTypeMap<'tcx>)>;
+    ) -> InferOk<'tcx, T>;
 
-    fn constrain_opaque_types<FRR: FreeRegionRelations<'tcx>>(
-        &self,
-        opaque_types: &OpaqueTypeMap<'tcx>,
-        free_region_relations: &FRR,
-    );
+    fn constrain_opaque_types<FRR: FreeRegionRelations<'tcx>>(&self, free_region_relations: &FRR);
 
     fn constrain_opaque_type<FRR: FreeRegionRelations<'tcx>>(
         &self,
@@ -164,28 +93,20 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
     /// - `value_span` -- the span where the value came from, used in error reporting
     fn instantiate_opaque_types<T: TypeFoldable<'tcx>>(
         &self,
-        parent_def_id: LocalDefId,
         body_id: hir::HirId,
         param_env: ty::ParamEnv<'tcx>,
         value: T,
         value_span: Span,
-    ) -> InferOk<'tcx, (T, OpaqueTypeMap<'tcx>)> {
+    ) -> InferOk<'tcx, T> {
         debug!(
-            "instantiate_opaque_types(value={:?}, parent_def_id={:?}, body_id={:?}, \
+            "instantiate_opaque_types(value={:?}, body_id={:?}, \
              param_env={:?}, value_span={:?})",
-            value, parent_def_id, body_id, param_env, value_span,
+            value, body_id, param_env, value_span,
         );
-        let mut instantiator = Instantiator {
-            infcx: self,
-            parent_def_id,
-            body_id,
-            param_env,
-            value_span,
-            opaque_types: Default::default(),
-            obligations: vec![],
-        };
+        let mut instantiator =
+            Instantiator { infcx: self, body_id, param_env, value_span, obligations: vec![] };
         let value = instantiator.instantiate_opaque_types_in_map(value);
-        InferOk { value: (value, instantiator.opaque_types), obligations: instantiator.obligations }
+        InferOk { value, obligations: instantiator.obligations }
     }
 
     /// Given the map `opaque_types` containing the opaque
@@ -350,12 +271,9 @@ fn instantiate_opaque_types<T: TypeFoldable<'tcx>>(
     /// - `opaque_types` -- the map produced by `instantiate_opaque_types`
     /// - `free_region_relations` -- something that can be used to relate
     ///   the free regions (`'a`) that appear in the impl trait.
-    fn constrain_opaque_types<FRR: FreeRegionRelations<'tcx>>(
-        &self,
-        opaque_types: &OpaqueTypeMap<'tcx>,
-        free_region_relations: &FRR,
-    ) {
-        for &(opaque_type_key, opaque_defn) in opaque_types {
+    fn constrain_opaque_types<FRR: FreeRegionRelations<'tcx>>(&self, free_region_relations: &FRR) {
+        let opaque_types = self.inner.borrow().opaque_types.clone();
+        for (opaque_type_key, opaque_defn) in opaque_types {
             self.constrain_opaque_type(
                 opaque_type_key,
                 &opaque_defn,
@@ -403,19 +321,35 @@ fn constrain_opaque_type<FRR: FreeRegionRelations<'tcx>>(
 
         let span = tcx.def_span(def_id);
 
-        // If there are required region bounds, we can use them.
-        if opaque_defn.has_required_region_bounds {
-            let bounds = tcx.explicit_item_bounds(def_id);
-            debug!("{:#?}", bounds);
-            let bounds: Vec<_> =
-                bounds.iter().map(|(bound, _)| bound.subst(tcx, opaque_type_key.substs)).collect();
-            debug!("{:#?}", bounds);
-            let opaque_type = tcx.mk_opaque(def_id, opaque_type_key.substs);
-
-            let required_region_bounds =
-                required_region_bounds(tcx, opaque_type, bounds.into_iter());
-            debug_assert!(!required_region_bounds.is_empty());
-
+        // Check if the `impl Trait` bounds include region bounds.
+        // For example, this would be true for:
+        //
+        //     fn foo<'a, 'b, 'c>() -> impl Trait<'c> + 'a + 'b
+        //
+        // but false for:
+        //
+        //     fn foo<'c>() -> impl Trait<'c>
+        //
+        // unless `Trait` was declared like:
+        //
+        //     trait Trait<'c>: 'c
+        //
+        // in which case it would be true.
+        //
+        // This is used during regionck to decide whether we need to
+        // impose any additional constraints to ensure that region
+        // variables in `concrete_ty` wind up being constrained to
+        // something from `substs` (or, at minimum, things that outlive
+        // the fn body). (Ultimately, writeback is responsible for this
+        // check.)
+        let bounds = tcx.explicit_item_bounds(def_id);
+        debug!("{:#?}", bounds);
+        let bounds = bounds.iter().map(|(bound, _)| bound.subst(tcx, opaque_type_key.substs));
+        debug!("{:#?}", bounds);
+        let opaque_type = tcx.mk_opaque(def_id, opaque_type_key.substs);
+
+        let required_region_bounds = required_region_bounds(tcx, opaque_type, bounds);
+        if !required_region_bounds.is_empty() {
             for required_region in required_region_bounds {
                 concrete_ty.visit_with(&mut ConstrainOpaqueTypeRegionVisitor {
                     op: |r| self.sub_regions(infer::CallReturn(span), required_region, r),
@@ -914,11 +848,9 @@ fn fold_const(&mut self, ct: &'tcx ty::Const<'tcx>) -> &'tcx ty::Const<'tcx> {
 
 struct Instantiator<'a, 'tcx> {
     infcx: &'a InferCtxt<'a, 'tcx>,
-    parent_def_id: LocalDefId,
     body_id: hir::HirId,
     param_env: ty::ParamEnv<'tcx>,
     value_span: Span,
-    opaque_types: OpaqueTypeMap<'tcx>,
     obligations: Vec<PredicateObligation<'tcx>>,
 }
 
@@ -968,7 +900,7 @@ fn instantiate_opaque_types_in_map<T: TypeFoldable<'tcx>>(&mut self, value: T) -
                     // ```
                     if let Some(def_id) = def_id.as_local() {
                         let opaque_hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
-                        let parent_def_id = self.parent_def_id;
+                        let parent_def_id = self.infcx.defining_use_anchor;
                         let def_scope_default = || {
                             let opaque_parent_hir_id = tcx.hir().get_parent_item(opaque_hir_id);
                             parent_def_id == tcx.hir().local_def_id(opaque_parent_hir_id)
@@ -980,14 +912,14 @@ fn instantiate_opaque_types_in_map<T: TypeFoldable<'tcx>>(&mut self, value: T) -
                                     impl_trait_fn: Some(parent),
                                     origin,
                                     ..
-                                }) => (parent == self.parent_def_id.to_def_id(), origin),
+                                }) => (parent == parent_def_id.to_def_id(), origin),
                                 // Named `type Foo = impl Bar;`
                                 hir::ItemKind::OpaqueTy(hir::OpaqueTy {
                                     impl_trait_fn: None,
                                     origin,
                                     ..
                                 }) => (
-                                    may_define_opaque_type(tcx, self.parent_def_id, opaque_hir_id),
+                                    may_define_opaque_type(tcx, parent_def_id, opaque_hir_id),
                                     origin,
                                 ),
                                 _ => (def_scope_default(), hir::OpaqueTyOrigin::TyAlias),
@@ -1028,32 +960,14 @@ fn fold_opaque_ty(
 
         // Use the same type variable if the exact same opaque type appears more
         // than once in the return type (e.g., if it's passed to a type alias).
-        if let Some(opaque_defn) = self.opaque_types.get(&opaque_type_key) {
+        if let Some(opaque_defn) = infcx.inner.borrow().opaque_types.get(&opaque_type_key) {
             debug!("instantiate_opaque_types: returning concrete ty {:?}", opaque_defn.concrete_ty);
             return opaque_defn.concrete_ty;
         }
-        let span = tcx.def_span(def_id);
-        debug!("fold_opaque_ty {:?} {:?}", self.value_span, span);
-        let ty_var = infcx
-            .next_ty_var(TypeVariableOrigin { kind: TypeVariableOriginKind::TypeInference, span });
-
-        let item_bounds = tcx.explicit_item_bounds(def_id);
-        debug!("instantiate_opaque_types: bounds={:#?}", item_bounds);
-        let bounds: Vec<_> =
-            item_bounds.iter().map(|(bound, _)| bound.subst(tcx, substs)).collect();
-
-        let param_env = tcx.param_env(def_id);
-        let InferOk { value: bounds, obligations } = infcx.partially_normalize_associated_types_in(
-            ObligationCause::misc(span, self.body_id),
-            param_env,
-            bounds,
-        );
-        self.obligations.extend(obligations);
-
-        debug!("instantiate_opaque_types: bounds={:?}", bounds);
-
-        let required_region_bounds = required_region_bounds(tcx, ty, bounds.iter().copied());
-        debug!("instantiate_opaque_types: required_region_bounds={:?}", required_region_bounds);
+        let ty_var = infcx.next_ty_var(TypeVariableOrigin {
+            kind: TypeVariableOriginKind::TypeInference,
+            span: self.value_span,
+        });
 
         // Make sure that we are in fact defining the *entire* type
         // (e.g., `type Foo<T: Bound> = impl Bar;` needs to be
@@ -1068,23 +982,46 @@ fn fold_opaque_ty(
         // Foo, impl Bar)`.
         let definition_span = self.value_span;
 
-        self.opaque_types.insert(
-            OpaqueTypeKey { def_id, substs },
-            OpaqueTypeDecl {
-                opaque_type: ty,
-                definition_span,
-                concrete_ty: ty_var,
-                has_required_region_bounds: !required_region_bounds.is_empty(),
-                origin,
-            },
-        );
+        {
+            let mut infcx = self.infcx.inner.borrow_mut();
+            infcx.opaque_types.insert(
+                OpaqueTypeKey { def_id, substs },
+                OpaqueTypeDecl { opaque_type: ty, definition_span, concrete_ty: ty_var, origin },
+            );
+            infcx.opaque_types_vars.insert(ty_var, ty);
+        }
+
         debug!("instantiate_opaque_types: ty_var={:?}", ty_var);
+        self.compute_opaque_type_obligations(opaque_type_key);
+
+        ty_var
+    }
+
+    fn compute_opaque_type_obligations(&mut self, opaque_type_key: OpaqueTypeKey<'tcx>) {
+        let infcx = self.infcx;
+        let tcx = infcx.tcx;
+        let OpaqueTypeKey { def_id, substs } = opaque_type_key;
+
+        let item_bounds = tcx.explicit_item_bounds(def_id);
+        debug!("instantiate_opaque_types: bounds={:#?}", item_bounds);
+        let bounds: Vec<_> =
+            item_bounds.iter().map(|(bound, _)| bound.subst(tcx, substs)).collect();
+
+        let param_env = tcx.param_env(def_id);
+        let InferOk { value: bounds, obligations } = infcx.partially_normalize_associated_types_in(
+            ObligationCause::misc(self.value_span, self.body_id),
+            param_env,
+            bounds,
+        );
+        self.obligations.extend(obligations);
+
+        debug!("instantiate_opaque_types: bounds={:?}", bounds);
 
         for predicate in &bounds {
             if let ty::PredicateKind::Projection(projection) = predicate.kind().skip_binder() {
                 if projection.ty.references_error() {
                     // No point on adding these obligations since there's a type error involved.
-                    return ty_var;
+                    return;
                 }
             }
         }
@@ -1096,14 +1033,13 @@ fn fold_opaque_ty(
             // This also instantiates nested instances of `impl Trait`.
             let predicate = self.instantiate_opaque_types_in_map(predicate);
 
-            let cause = traits::ObligationCause::new(span, self.body_id, traits::OpaqueType);
+            let cause =
+                traits::ObligationCause::new(self.value_span, self.body_id, traits::OpaqueType);
 
             // Require that the predicate holds for the concrete type.
             debug!("instantiate_opaque_types: predicate={:?}", predicate);
             self.obligations.push(traits::Obligation::new(cause, self.param_env, predicate));
         }
-
-        ty_var
     }
 }
 
index 3f713ce3c39145d238864de5bbf11601c37362d0..ac07cc1f03439a360ee0ecff4d13ca356382d0d8 100644 (file)
@@ -245,9 +245,10 @@ fn report_selection_error(
                 if let ObligationCauseCode::WellFormed(Some(wf_loc)) =
                     root_obligation.cause.code.peel_derives()
                 {
-                    if let Some(cause) =
-                        self.tcx.diagnostic_hir_wf_check((obligation.predicate, wf_loc.clone()))
-                    {
+                    if let Some(cause) = self.tcx.diagnostic_hir_wf_check((
+                        tcx.erase_regions(obligation.predicate),
+                        wf_loc.clone(),
+                    )) {
                         obligation.cause = cause;
                         span = obligation.cause.span;
                     }
index dee81510b795b8942f368ed91c77f91044e23650..10c3a97e73a5af46123d9446b320a1532007fdbc 100644 (file)
@@ -593,13 +593,18 @@ pub(crate) fn opt_suggest_box_span(
         orig_expected: Expectation<'tcx>,
     ) -> Option<Span> {
         match (orig_expected, self.ret_coercion_impl_trait.map(|ty| (self.body_id.owner, ty))) {
-            (Expectation::ExpectHasType(expected), Some((id, ty)))
+            (Expectation::ExpectHasType(expected), Some((_id, ty)))
                 if self.in_tail_expr && self.can_coerce(outer_ty, expected) =>
             {
                 let impl_trait_ret_ty =
-                    self.infcx.instantiate_opaque_types(id, self.body_id, self.param_env, ty, span);
-                let mut suggest_box = !impl_trait_ret_ty.obligations.is_empty();
-                for o in impl_trait_ret_ty.obligations {
+                    self.infcx.instantiate_opaque_types(self.body_id, self.param_env, ty, span);
+                assert!(
+                    impl_trait_ret_ty.obligations.is_empty(),
+                    "we should never get new obligations here"
+                );
+                let obligations = self.fulfillment_cx.borrow().pending_obligations();
+                let mut suggest_box = !obligations.is_empty();
+                for o in obligations {
                     match o.predicate.kind().skip_binder() {
                         ty::PredicateKind::Trait(t, constness) => {
                             let pred = ty::PredicateKind::Trait(
index ba99e0c03d8e2d4895b2de7787f94892337cfd8a..8b5b7e3e52c80d0d9cd72a8c029ab4308e3ef4c3 100644 (file)
@@ -94,69 +94,8 @@ pub(super) fn check_fn<'a, 'tcx>(
 
     let declared_ret_ty = fn_sig.output();
 
-    let feature = match tcx.hir().get(fn_id) {
-        // TAIT usage in function return position.
-        // Example:
-        //
-        // ```rust
-        // type Foo = impl Debug;
-        // fn bar() -> Foo { 42 }
-        // ```
-        Node::Item(hir::Item { kind: ItemKind::Fn(..), .. }) |
-        // TAIT usage in associated function return position.
-        //
-        // Example with a free type alias:
-        //
-        // ```rust
-        // type Foo = impl Debug;
-        // impl SomeTrait for SomeType {
-        //     fn bar() -> Foo { 42 }
-        // }
-        // ```
-        //
-        // Example with an associated TAIT:
-        //
-        // ```rust
-        // impl SomeTrait for SomeType {
-        //     type Foo = impl Debug;
-        //     fn bar() -> Self::Foo { 42 }
-        // }
-        // ```
-        Node::ImplItem(hir::ImplItem {
-            kind: hir::ImplItemKind::Fn(..), ..
-        }) => None,
-        // Forbid TAIT in trait declarations for now.
-        // Examples:
-        //
-        // ```rust
-        // type Foo = impl Debug;
-        // trait Bar {
-        //     fn bar() -> Foo;
-        // }
-        // trait Bop {
-        //     type Bop: PartialEq<Foo>;
-        // }
-        // ```
-        Node::TraitItem(hir::TraitItem {
-            kind: hir::TraitItemKind::Fn(..),
-            ..
-        }) |
-        // Forbid TAIT in closure return position for now.
-        // Example:
-        //
-        // ```rust
-        // type Foo = impl Debug;
-        // let x = |y| -> Foo { 42 + y };
-        // ```
-        Node::Expr(hir::Expr { kind: hir::ExprKind::Closure(..), .. }) => Some(sym::type_alias_impl_trait),
-        node => bug!("Item being checked wasn't a function/closure: {:?}", node),
-    };
-    let revealed_ret_ty = fcx.instantiate_opaque_types_from_value(
-        fn_id,
-        declared_ret_ty,
-        decl.output.span(),
-        feature,
-    );
+    let revealed_ret_ty =
+        fcx.instantiate_opaque_types_from_value(declared_ret_ty, decl.output.span());
     debug!("check_fn: declared_ret_ty: {}, revealed_ret_ty: {}", declared_ret_ty, revealed_ret_ty);
     fcx.ret_coercion = Some(RefCell::new(CoerceMany::new(revealed_ret_ty)));
     fcx.ret_type_span = Some(decl.output.span());
@@ -711,10 +650,11 @@ fn check_opaque_meets_bounds<'tcx>(
 
         let misc_cause = traits::ObligationCause::misc(span, hir_id);
 
-        let (_, opaque_type_map) = inh.register_infer_ok_obligations(
-            infcx.instantiate_opaque_types(def_id, hir_id, param_env, opaque_ty, span),
+        let _ = inh.register_infer_ok_obligations(
+            infcx.instantiate_opaque_types(hir_id, param_env, opaque_ty, span),
         );
 
+        let opaque_type_map = infcx.inner.borrow().opaque_types.clone();
         for (OpaqueTypeKey { def_id, substs }, opaque_defn) in opaque_type_map {
             match infcx
                 .at(&misc_cause, param_env)
index 831b573e1568a15129e2a675433f336459e1e8f1..a5362856511024e957b2bb129389ce91498d5b97 100644 (file)
@@ -1313,15 +1313,12 @@ fn check_expr_struct_fields(
                 .emit();
             }
         } else if check_completeness && !error_happened && !remaining_fields.is_empty() {
-            let no_accessible_remaining_fields = remaining_fields
-                .iter()
-                .find(|(_, (_, field))| {
-                    field.vis.is_accessible_from(tcx.parent_module(expr_id).to_def_id(), tcx)
-                })
-                .is_none();
+            let inaccessible_remaining_fields = remaining_fields.iter().any(|(_, (_, field))| {
+                !field.vis.is_accessible_from(tcx.parent_module(expr_id).to_def_id(), tcx)
+            });
 
-            if no_accessible_remaining_fields {
-                self.report_no_accessible_fields(adt_ty, span);
+            if inaccessible_remaining_fields {
+                self.report_inaccessible_fields(adt_ty, span);
             } else {
                 self.report_missing_fields(adt_ty, span, remaining_fields);
             }
@@ -1398,7 +1395,7 @@ fn report_missing_fields(
         .emit();
     }
 
-    /// Report an error for a struct field expression when there are no visible fields.
+    /// Report an error for a struct field expression when there are invisible fields.
     ///
     /// ```text
     /// error: cannot construct `Foo` with struct literal syntax due to inaccessible fields
@@ -1409,7 +1406,7 @@ fn report_missing_fields(
     ///
     /// error: aborting due to previous error
     /// ```
-    fn report_no_accessible_fields(&self, adt_ty: Ty<'tcx>, span: Span) {
+    fn report_inaccessible_fields(&self, adt_ty: Ty<'tcx>, span: Span) {
         self.tcx.sess.span_err(
             span,
             &format!(
index f5776ae7cf66a47a1ec812bf5fbb9d6ebb024575..b84a79b768c9a32223fa1c739685d54c372c83e8 100644 (file)
 };
 use rustc_session::lint;
 use rustc_session::lint::builtin::BARE_TRAIT_OBJECTS;
-use rustc_session::parse::feature_err;
 use rustc_span::edition::Edition;
+use rustc_span::hygiene::DesugaringKind;
 use rustc_span::source_map::{original_sp, DUMMY_SP};
 use rustc_span::symbol::{kw, sym, Ident};
 use rustc_span::{self, BytePos, MultiSpan, Span};
-use rustc_span::{hygiene::DesugaringKind, Symbol};
 use rustc_trait_selection::infer::InferCtxtExt as _;
 use rustc_trait_selection::opaque_types::InferCtxtExt as _;
 use rustc_trait_selection::traits::error_reporting::InferCtxtExt as _;
@@ -363,50 +362,18 @@ pub(in super::super) fn instantiate_bounds(
     /// Replaces the opaque types from the given value with type variables,
     /// and records the `OpaqueTypeMap` for later use during writeback. See
     /// `InferCtxt::instantiate_opaque_types` for more details.
+    #[instrument(skip(self, value_span), level = "debug")]
     pub(in super::super) fn instantiate_opaque_types_from_value<T: TypeFoldable<'tcx>>(
         &self,
-        parent_id: hir::HirId,
         value: T,
         value_span: Span,
-        feature: Option<Symbol>,
     ) -> T {
-        let parent_def_id = self.tcx.hir().local_def_id(parent_id);
-        debug!(
-            "instantiate_opaque_types_from_value(parent_def_id={:?}, value={:?})",
-            parent_def_id, value
-        );
-
-        let (value, opaque_type_map) =
-            self.register_infer_ok_obligations(self.instantiate_opaque_types(
-                parent_def_id,
-                self.body_id,
-                self.param_env,
-                value,
-                value_span,
-            ));
-
-        let mut opaque_types = self.opaque_types.borrow_mut();
-        let mut opaque_types_vars = self.opaque_types_vars.borrow_mut();
-
-        for (ty, decl) in opaque_type_map {
-            if let Some(feature) = feature {
-                if let hir::OpaqueTyOrigin::TyAlias = decl.origin {
-                    if !self.tcx.features().enabled(feature) {
-                        feature_err(
-                            &self.tcx.sess.parse_sess,
-                            feature,
-                            value_span,
-                            "type alias impl trait is not permitted here",
-                        )
-                        .emit();
-                    }
-                }
-            }
-            let _ = opaque_types.insert(ty, decl);
-            let _ = opaque_types_vars.insert(decl.concrete_ty, decl.opaque_type);
-        }
-
-        value
+        self.register_infer_ok_obligations(self.instantiate_opaque_types(
+            self.body_id,
+            self.param_env,
+            value,
+            value_span,
+        ))
     }
 
     /// Convenience method which tracks extra diagnostic information for normalization
@@ -726,7 +693,7 @@ pub(in super::super) fn fallback_if_possible(&self, ty: Ty<'tcx>, mode: Fallback
                 // We treat this as a non-defining use by making the inference
                 // variable fall back to the opaque type itself.
                 if let FallbackMode::All = mode {
-                    if let Some(opaque_ty) = self.opaque_types_vars.borrow().get(ty) {
+                    if let Some(opaque_ty) = self.infcx.inner.borrow().opaque_types_vars.get(ty) {
                         debug!(
                             "fallback_if_possible: falling back opaque type var {:?} to {:?}",
                             ty, opaque_ty
index 7e43e36fe55c6e8ae64ad78f1570621f241a7d5f..fb7beae70ba1ea4075a7f83cba657ea4fadc1eb6 100644 (file)
@@ -1,18 +1,15 @@
 use super::callee::DeferredCallResolution;
 use super::MaybeInProgressTables;
 
-use rustc_data_structures::fx::FxHashMap;
-use rustc_data_structures::vec_map::VecMap;
 use rustc_hir as hir;
 use rustc_hir::def_id::{DefIdMap, LocalDefId};
 use rustc_hir::HirIdMap;
 use rustc_infer::infer;
 use rustc_infer::infer::{InferCtxt, InferOk, TyCtxtInferExt};
 use rustc_middle::ty::fold::TypeFoldable;
-use rustc_middle::ty::{self, OpaqueTypeKey, Ty, TyCtxt};
+use rustc_middle::ty::{self, Ty, TyCtxt};
 use rustc_span::{self, Span};
 use rustc_trait_selection::infer::InferCtxtExt as _;
-use rustc_trait_selection::opaque_types::OpaqueTypeDecl;
 use rustc_trait_selection::traits::{self, ObligationCause, TraitEngine, TraitEngineExt};
 
 use std::cell::RefCell;
@@ -55,19 +52,6 @@ pub struct Inherited<'a, 'tcx> {
     pub(super) deferred_generator_interiors:
         RefCell<Vec<(hir::BodyId, Ty<'tcx>, hir::GeneratorKind)>>,
 
-    // Opaque types found in explicit return types and their
-    // associated fresh inference variable. Writeback resolves these
-    // variables to get the concrete type, which can be used to
-    // 'de-opaque' OpaqueTypeDecl, after typeck is done with all functions.
-    pub(super) opaque_types: RefCell<VecMap<OpaqueTypeKey<'tcx>, OpaqueTypeDecl<'tcx>>>,
-
-    /// A map from inference variables created from opaque
-    /// type instantiations (`ty::Infer`) to the actual opaque
-    /// type (`ty::Opaque`). Used during fallback to map unconstrained
-    /// opaque type inference variables to their corresponding
-    /// opaque type.
-    pub(super) opaque_types_vars: RefCell<FxHashMap<Ty<'tcx>, Ty<'tcx>>>,
-
     pub(super) body_id: Option<hir::BodyId>,
 }
 
@@ -124,8 +108,6 @@ pub(super) fn new(infcx: InferCtxt<'a, 'tcx>, def_id: LocalDefId) -> Self {
             deferred_call_resolutions: RefCell::new(Default::default()),
             deferred_cast_checks: RefCell::new(Vec::new()),
             deferred_generator_interiors: RefCell::new(Vec::new()),
-            opaque_types: RefCell::new(Default::default()),
-            opaque_types_vars: RefCell::new(Default::default()),
             body_id,
         }
     }
index 6661df21ed952cef4b2748a90e4748d75a6fd491..664954b0eb7a229673d8ad715b1545689f8a48b3 100644 (file)
@@ -102,6 +102,7 @@ pub fn intrinsic_operation_unsafety(intrinsic: Symbol) -> hir::Unsafety {
         | sym::maxnumf64
         | sym::type_name
         | sym::forget
+        | sym::black_box
         | sym::variant_count => hir::Unsafety::Normal,
         _ => hir::Unsafety::Unsafe,
     }
@@ -387,6 +388,8 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) {
                 (1, vec![param_ty; 2], tcx.types.bool)
             }
 
+            sym::black_box => (1, vec![param(0)], param(0)),
+
             other => {
                 tcx.sess.emit_err(UnrecognizedIntrinsicFunction { span: it.span, name: other });
                 return;
index 77586ce48529c897c94ad1733cc6a8927d69dceb..c7a7462668aa52b82ddada4789a41f01603ea129 100644 (file)
@@ -1695,8 +1695,8 @@ fn print_disambiguation_help(
     source_map: &source_map::SourceMap,
 ) {
     let mut applicability = Applicability::MachineApplicable;
-    let sugg_args = if let (ty::AssocKind::Fn, Some(args)) = (kind, args) {
-        format!(
+    let (span, sugg) = if let (ty::AssocKind::Fn, Some(args)) = (kind, args) {
+        let args = format!(
             "({}{})",
             if rcvr_ty.is_region_ptr() {
                 if rcvr_ty.is_mutable_ptr() { "&mut " } else { "&" }
@@ -1710,12 +1710,12 @@ fn print_disambiguation_help(
                 }))
                 .collect::<Vec<_>>()
                 .join(", "),
-        )
+        );
+        (span, format!("{}::{}{}", trait_name, item_name, args))
     } else {
-        String::new()
+        (span.with_hi(item_name.span.lo()), format!("{}::", trait_name))
     };
-    let sugg = format!("{}::{}{}", trait_name, item_name, sugg_args);
-    err.span_suggestion(
+    err.span_suggestion_verbose(
         span,
         &format!(
             "disambiguate the {} for {}",
index db77d155a2bae1bebf17736745f2b8ea6cb155ee..dae574bb7bf0fa04123ddf7b9647e7af7bbdc050 100644 (file)
@@ -1250,15 +1250,23 @@ fn check_struct_pat_fields(
                 tcx.sess.struct_span_err(pat.span, "`..` cannot be used in union patterns").emit();
             }
         } else if !etc && !unmentioned_fields.is_empty() {
-            let no_accessible_unmentioned_fields = !unmentioned_fields.iter().any(|(field, _)| {
-                field.vis.is_accessible_from(tcx.parent_module(pat.hir_id).to_def_id(), tcx)
-            });
+            let accessible_unmentioned_fields: Vec<_> = unmentioned_fields
+                .iter()
+                .copied()
+                .filter(|(field, _)| {
+                    field.vis.is_accessible_from(tcx.parent_module(pat.hir_id).to_def_id(), tcx)
+                })
+                .collect();
 
-            if no_accessible_unmentioned_fields {
+            if accessible_unmentioned_fields.is_empty() {
                 unmentioned_err = Some(self.error_no_accessible_fields(pat, &fields));
             } else {
-                unmentioned_err =
-                    Some(self.error_unmentioned_fields(pat, &unmentioned_fields, &fields));
+                unmentioned_err = Some(self.error_unmentioned_fields(
+                    pat,
+                    &accessible_unmentioned_fields,
+                    accessible_unmentioned_fields.len() != unmentioned_fields.len(),
+                    &fields,
+                ));
             }
         }
         match (inexistent_fields_err, unmentioned_err) {
@@ -1583,17 +1591,19 @@ fn error_unmentioned_fields(
         &self,
         pat: &Pat<'_>,
         unmentioned_fields: &[(&ty::FieldDef, Ident)],
+        have_inaccessible_fields: bool,
         fields: &'tcx [hir::PatField<'tcx>],
     ) -> DiagnosticBuilder<'tcx> {
+        let inaccessible = if have_inaccessible_fields { " and inaccessible fields" } else { "" };
         let field_names = if unmentioned_fields.len() == 1 {
-            format!("field `{}`", unmentioned_fields[0].1)
+            format!("field `{}`{}", unmentioned_fields[0].1, inaccessible)
         } else {
             let fields = unmentioned_fields
                 .iter()
                 .map(|(_, name)| format!("`{}`", name))
                 .collect::<Vec<String>>()
                 .join(", ");
-            format!("fields {}", fields)
+            format!("fields {}{}", fields, inaccessible)
         };
         let mut err = struct_span_err!(
             self.tcx.sess,
@@ -1624,17 +1634,19 @@ fn error_unmentioned_fields(
         err.span_suggestion(
             sp,
             &format!(
-                "include the missing field{} in the pattern",
+                "include the missing field{} in the pattern{}",
                 if len == 1 { "" } else { "s" },
+                if have_inaccessible_fields { " and ignore the inaccessible fields" } else { "" }
             ),
             format!(
-                "{}{}{}",
+                "{}{}{}{}",
                 prefix,
                 unmentioned_fields
                     .iter()
                     .map(|(_, name)| name.to_string())
                     .collect::<Vec<_>>()
                     .join(", "),
+                if have_inaccessible_fields { ", .." } else { "" },
                 postfix,
             ),
             Applicability::MachineApplicable,
index 8f8514cadb745ddb179b198ca1a345f424edf4d5..ca6828cfdf68de599fee44ff104038bbb081a59c 100644 (file)
@@ -291,10 +291,7 @@ fn visit_fn_body(
         self.visit_body(body);
         self.visit_region_obligations(body_id.hir_id);
 
-        self.constrain_opaque_types(
-            &self.fcx.opaque_types.borrow(),
-            self.outlives_environment.free_region_map(),
-        );
+        self.constrain_opaque_types(self.outlives_environment.free_region_map());
     }
 
     fn visit_region_obligations(&mut self, hir_id: hir::HirId) {
index e33cc603b5e543cc95cd8b3699642cb2ec2761e4..b82437096592807b823b2f966ca3cf1bf80cb7da 100644 (file)
@@ -194,12 +194,13 @@ pub fn check_trait_item(tcx: TyCtxt<'_>, def_id: LocalDefId) {
     let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
     let trait_item = tcx.hir().expect_trait_item(hir_id);
 
-    let method_sig = match trait_item.kind {
-        hir::TraitItemKind::Fn(ref sig, _) => Some(sig),
-        _ => None,
+    let (method_sig, span) = match trait_item.kind {
+        hir::TraitItemKind::Fn(ref sig, _) => (Some(sig), trait_item.span),
+        hir::TraitItemKind::Type(_bounds, Some(ty)) => (None, ty.span),
+        _ => (None, trait_item.span),
     };
     check_object_unsafe_self_trait_by_name(tcx, &trait_item);
-    check_associated_item(tcx, trait_item.hir_id(), trait_item.span, method_sig);
+    check_associated_item(tcx, trait_item.hir_id(), span, method_sig);
 }
 
 fn could_be_self(trait_def_id: LocalDefId, ty: &hir::Ty<'_>) -> bool {
@@ -268,12 +269,13 @@ pub fn check_impl_item(tcx: TyCtxt<'_>, def_id: LocalDefId) {
     let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
     let impl_item = tcx.hir().expect_impl_item(hir_id);
 
-    let method_sig = match impl_item.kind {
-        hir::ImplItemKind::Fn(ref sig, _) => Some(sig),
-        _ => None,
+    let (method_sig, span) = match impl_item.kind {
+        hir::ImplItemKind::Fn(ref sig, _) => (Some(sig), impl_item.span),
+        hir::ImplItemKind::TyAlias(ty) => (None, ty.span),
+        _ => (None, impl_item.span),
     };
 
-    check_associated_item(tcx, impl_item.hir_id(), impl_item.span, method_sig);
+    check_associated_item(tcx, impl_item.hir_id(), span, method_sig);
 }
 
 fn check_param_wf(tcx: TyCtxt<'_>, param: &hir::GenericParam<'_>) {
index e6eac16667d4ed4a4e2014e0ea222393545ad308..959ab69a679eb1d6075b02f1f42a2daf021679e1 100644 (file)
@@ -498,7 +498,8 @@ fn visit_generator_interior_types(&mut self) {
     }
 
     fn visit_opaque_types(&mut self, span: Span) {
-        for &(opaque_type_key, opaque_defn) in self.fcx.opaque_types.borrow().iter() {
+        let opaque_types = self.fcx.infcx.inner.borrow().opaque_types.clone();
+        for (opaque_type_key, opaque_defn) in opaque_types {
             let hir_id =
                 self.tcx().hir().local_def_id_to_hir_id(opaque_type_key.def_id.expect_local());
             let instantiated_ty = self.resolve(opaque_defn.concrete_ty, &hir_id);
index 96b3fa9aa0143e0011e6e18d2a5b7872cda398fb..b9483d6f987602c665b5867facaccbd1b12851e8 100644 (file)
@@ -190,8 +190,12 @@ pub(super) fn opt_const_param_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<
                 // Try to use the segment resolution if it is valid, otherwise we
                 // default to the path resolution.
                 let res = segment.res.filter(|&r| r != Res::Err).unwrap_or(path.res);
+                use def::CtorOf;
                 let generics = match res {
-                    Res::Def(DefKind::Ctor(..), def_id) => {
+                    Res::Def(DefKind::Ctor(CtorOf::Variant, _), def_id) => tcx.generics_of(
+                        tcx.parent(def_id).and_then(|def_id| tcx.parent(def_id)).unwrap(),
+                    ),
+                    Res::Def(DefKind::Variant | DefKind::Ctor(CtorOf::Struct, _), def_id) => {
                         tcx.generics_of(tcx.parent(def_id).unwrap())
                     }
                     // Other `DefKind`s don't have generics and would ICE when calling
@@ -200,7 +204,6 @@ pub(super) fn opt_const_param_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<
                         DefKind::Struct
                         | DefKind::Union
                         | DefKind::Enum
-                        | DefKind::Variant
                         | DefKind::Trait
                         | DefKind::OpaqueTy
                         | DefKind::TyAlias
index 3ee857f3399e09f931e342a03528244ae48d6941..0d442011921ba7bb5516058d21f6facbb76a31a6 100644 (file)
@@ -111,6 +111,7 @@ pub enum TryReserveErrorKind {
     issue = "48043"
 )]
 impl From<TryReserveErrorKind> for TryReserveError {
+    #[inline]
     fn from(kind: TryReserveErrorKind) -> Self {
         Self { kind }
     }
index b3e048a6587b9aa020ccf3e04ec354bcfa0940ce..8fca2662fc3047d7c50d0e3a627122b15d2df322 100644 (file)
@@ -1,4 +1,5 @@
 #![feature(allocator_api)]
+#![feature(assert_matches)]
 #![feature(box_syntax)]
 #![feature(cow_is_borrowed)]
 #![feature(const_cow_is_borrowed)]
index cf9d734a9d54ddee3f1d7d1ec0e0ef1f1cae7da0..7be137131ff0100d4feac67e7203c6e8edd1a53d 100644 (file)
@@ -1,3 +1,4 @@
+use std::assert_matches::assert_matches;
 use std::borrow::Cow;
 use std::cell::Cell;
 use std::collections::TryReserveErrorKind::*;
@@ -713,35 +714,32 @@ fn test_try_reserve() {
 
         if guards_against_isize {
             // Check isize::MAX + 1 does count as overflow
-            if let Err(CapacityOverflow) =
-                empty_string.try_reserve(MAX_CAP + 1).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an overflow!")
-            }
+            assert_matches!(
+                empty_string.try_reserve(MAX_CAP + 1).map_err(|e| e.kind()),
+                Err(CapacityOverflow),
+                "isize::MAX + 1 should trigger an overflow!"
+            );
 
             // Check usize::MAX does count as overflow
-            if let Err(CapacityOverflow) = empty_string.try_reserve(MAX_USIZE).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("usize::MAX should trigger an overflow!")
-            }
+            assert_matches!(
+                empty_string.try_reserve(MAX_USIZE).map_err(|e| e.kind()),
+                Err(CapacityOverflow),
+                "usize::MAX should trigger an overflow!"
+            );
         } else {
             // Check isize::MAX + 1 is an OOM
-            if let Err(AllocError { .. }) =
-                empty_string.try_reserve(MAX_CAP + 1).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an OOM!")
-            }
+            assert_matches!(
+                empty_string.try_reserve(MAX_CAP + 1).map_err(|e| e.kind()),
+                Err(AllocError { .. }),
+                "isize::MAX + 1 should trigger an OOM!"
+            );
 
             // Check usize::MAX is an OOM
-            if let Err(AllocError { .. }) =
-                empty_string.try_reserve(MAX_USIZE).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("usize::MAX should trigger an OOM!")
-            }
+            assert_matches!(
+                empty_string.try_reserve(MAX_USIZE).map_err(|e| e.kind()),
+                Err(AllocError { .. }),
+                "usize::MAX should trigger an OOM!"
+            );
         }
     }
 
@@ -756,23 +754,24 @@ fn test_try_reserve() {
             panic!("isize::MAX shouldn't trigger an overflow!");
         }
         if guards_against_isize {
-            if let Err(CapacityOverflow) = ten_bytes.try_reserve(MAX_CAP - 9).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an overflow!");
-            }
+            assert_matches!(
+                ten_bytes.try_reserve(MAX_CAP - 9).map_err(|e| e.kind()),
+                Err(CapacityOverflow),
+                "isize::MAX + 1 should trigger an overflow!"
+            );
         } else {
-            if let Err(AllocError { .. }) = ten_bytes.try_reserve(MAX_CAP - 9).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an OOM!")
-            }
+            assert_matches!(
+                ten_bytes.try_reserve(MAX_CAP - 9).map_err(|e| e.kind()),
+                Err(AllocError { .. }),
+                "isize::MAX + 1 should trigger an OOM!"
+            );
         }
         // Should always overflow in the add-to-len
-        if let Err(CapacityOverflow) = ten_bytes.try_reserve(MAX_USIZE).map_err(|e| e.kind()) {
-        } else {
-            panic!("usize::MAX should trigger an overflow!")
-        }
+        assert_matches!(
+            ten_bytes.try_reserve(MAX_USIZE).map_err(|e| e.kind()),
+            Err(CapacityOverflow),
+            "usize::MAX should trigger an overflow!"
+        );
     }
 }
 
@@ -801,33 +800,29 @@ fn test_try_reserve_exact() {
         }
 
         if guards_against_isize {
-            if let Err(CapacityOverflow) =
-                empty_string.try_reserve_exact(MAX_CAP + 1).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an overflow!")
-            }
-
-            if let Err(CapacityOverflow) =
-                empty_string.try_reserve_exact(MAX_USIZE).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("usize::MAX should trigger an overflow!")
-            }
+            assert_matches!(
+                empty_string.try_reserve_exact(MAX_CAP + 1).map_err(|e| e.kind()),
+                Err(CapacityOverflow),
+                "isize::MAX + 1 should trigger an overflow!"
+            );
+
+            assert_matches!(
+                empty_string.try_reserve_exact(MAX_USIZE).map_err(|e| e.kind()),
+                Err(CapacityOverflow),
+                "usize::MAX should trigger an overflow!"
+            );
         } else {
-            if let Err(AllocError { .. }) =
-                empty_string.try_reserve_exact(MAX_CAP + 1).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an OOM!")
-            }
-
-            if let Err(AllocError { .. }) =
-                empty_string.try_reserve_exact(MAX_USIZE).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("usize::MAX should trigger an OOM!")
-            }
+            assert_matches!(
+                empty_string.try_reserve_exact(MAX_CAP + 1).map_err(|e| e.kind()),
+                Err(AllocError { .. }),
+                "isize::MAX + 1 should trigger an OOM!"
+            );
+
+            assert_matches!(
+                empty_string.try_reserve_exact(MAX_USIZE).map_err(|e| e.kind()),
+                Err(AllocError { .. }),
+                "usize::MAX should trigger an OOM!"
+            );
         }
     }
 
@@ -845,25 +840,23 @@ fn test_try_reserve_exact() {
             panic!("isize::MAX shouldn't trigger an overflow!");
         }
         if guards_against_isize {
-            if let Err(CapacityOverflow) =
-                ten_bytes.try_reserve_exact(MAX_CAP - 9).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an overflow!");
-            }
-        } else {
-            if let Err(AllocError { .. }) =
-                ten_bytes.try_reserve_exact(MAX_CAP - 9).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an OOM!")
-            }
-        }
-        if let Err(CapacityOverflow) = ten_bytes.try_reserve_exact(MAX_USIZE).map_err(|e| e.kind())
-        {
+            assert_matches!(
+                ten_bytes.try_reserve_exact(MAX_CAP - 9).map_err(|e| e.kind()),
+                Err(CapacityOverflow),
+                "isize::MAX + 1 should trigger an overflow!"
+            );
         } else {
-            panic!("usize::MAX should trigger an overflow!")
+            assert_matches!(
+                ten_bytes.try_reserve_exact(MAX_CAP - 9).map_err(|e| e.kind()),
+                Err(AllocError { .. }),
+                "isize::MAX + 1 should trigger an OOM!"
+            );
         }
+        assert_matches!(
+            ten_bytes.try_reserve_exact(MAX_USIZE).map_err(|e| e.kind()),
+            Err(CapacityOverflow),
+            "usize::MAX should trigger an overflow!"
+        );
     }
 }
 
index d3a6dcfddc5270f8bdea31709c7dd6d1e6b5a233..c2df50b48f55d9c2176d35890554875e77daa9a6 100644 (file)
@@ -1,3 +1,4 @@
+use std::assert_matches::assert_matches;
 use std::borrow::Cow;
 use std::cell::Cell;
 use std::collections::TryReserveErrorKind::*;
@@ -1488,34 +1489,32 @@ fn test_try_reserve() {
 
         if guards_against_isize {
             // Check isize::MAX + 1 does count as overflow
-            if let Err(CapacityOverflow) =
-                empty_bytes.try_reserve(MAX_CAP + 1).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an overflow!")
-            }
+            assert_matches!(
+                empty_bytes.try_reserve(MAX_CAP + 1).map_err(|e| e.kind()),
+                Err(CapacityOverflow),
+                "isize::MAX + 1 should trigger an overflow!"
+            );
 
             // Check usize::MAX does count as overflow
-            if let Err(CapacityOverflow) = empty_bytes.try_reserve(MAX_USIZE).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("usize::MAX should trigger an overflow!")
-            }
+            assert_matches!(
+                empty_bytes.try_reserve(MAX_USIZE).map_err(|e| e.kind()),
+                Err(CapacityOverflow),
+                "usize::MAX should trigger an overflow!"
+            );
         } else {
             // Check isize::MAX + 1 is an OOM
-            if let Err(AllocError { .. }) =
-                empty_bytes.try_reserve(MAX_CAP + 1).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an OOM!")
-            }
+            assert_matches!(
+                empty_bytes.try_reserve(MAX_CAP + 1).map_err(|e| e.kind()),
+                Err(AllocError { .. }),
+                "isize::MAX + 1 should trigger an OOM!"
+            );
 
             // Check usize::MAX is an OOM
-            if let Err(AllocError { .. }) = empty_bytes.try_reserve(MAX_USIZE).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("usize::MAX should trigger an OOM!")
-            }
+            assert_matches!(
+                empty_bytes.try_reserve(MAX_USIZE).map_err(|e| e.kind()),
+                Err(AllocError { .. }),
+                "usize::MAX should trigger an OOM!"
+            );
         }
     }
 
@@ -1530,23 +1529,24 @@ fn test_try_reserve() {
             panic!("isize::MAX shouldn't trigger an overflow!");
         }
         if guards_against_isize {
-            if let Err(CapacityOverflow) = ten_bytes.try_reserve(MAX_CAP - 9).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an overflow!");
-            }
+            assert_matches!(
+                ten_bytes.try_reserve(MAX_CAP - 9).map_err(|e| e.kind()),
+                Err(CapacityOverflow),
+                "isize::MAX + 1 should trigger an overflow!"
+            );
         } else {
-            if let Err(AllocError { .. }) = ten_bytes.try_reserve(MAX_CAP - 9).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an OOM!")
-            }
+            assert_matches!(
+                ten_bytes.try_reserve(MAX_CAP - 9).map_err(|e| e.kind()),
+                Err(AllocError { .. }),
+                "isize::MAX + 1 should trigger an OOM!"
+            );
         }
         // Should always overflow in the add-to-len
-        if let Err(CapacityOverflow) = ten_bytes.try_reserve(MAX_USIZE).map_err(|e| e.kind()) {
-        } else {
-            panic!("usize::MAX should trigger an overflow!")
-        }
+        assert_matches!(
+            ten_bytes.try_reserve(MAX_USIZE).map_err(|e| e.kind()),
+            Err(CapacityOverflow),
+            "usize::MAX should trigger an overflow!"
+        );
     }
 
     {
@@ -1562,25 +1562,24 @@ fn test_try_reserve() {
             panic!("isize::MAX shouldn't trigger an overflow!");
         }
         if guards_against_isize {
-            if let Err(CapacityOverflow) =
-                ten_u32s.try_reserve(MAX_CAP / 4 - 9).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an overflow!");
-            }
+            assert_matches!(
+                ten_u32s.try_reserve(MAX_CAP / 4 - 9).map_err(|e| e.kind()),
+                Err(CapacityOverflow),
+                "isize::MAX + 1 should trigger an overflow!"
+            );
         } else {
-            if let Err(AllocError { .. }) =
-                ten_u32s.try_reserve(MAX_CAP / 4 - 9).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an OOM!")
-            }
+            assert_matches!(
+                ten_u32s.try_reserve(MAX_CAP / 4 - 9).map_err(|e| e.kind()),
+                Err(AllocError { .. }),
+                "isize::MAX + 1 should trigger an OOM!"
+            );
         }
         // Should fail in the mul-by-size
-        if let Err(CapacityOverflow) = ten_u32s.try_reserve(MAX_USIZE - 20).map_err(|e| e.kind()) {
-        } else {
-            panic!("usize::MAX should trigger an overflow!");
-        }
+        assert_matches!(
+            ten_u32s.try_reserve(MAX_USIZE - 20).map_err(|e| e.kind()),
+            Err(CapacityOverflow),
+            "usize::MAX should trigger an overflow!"
+        );
     }
 }
 
@@ -1609,33 +1608,29 @@ fn test_try_reserve_exact() {
         }
 
         if guards_against_isize {
-            if let Err(CapacityOverflow) =
-                empty_bytes.try_reserve_exact(MAX_CAP + 1).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an overflow!")
-            }
-
-            if let Err(CapacityOverflow) =
-                empty_bytes.try_reserve_exact(MAX_USIZE).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("usize::MAX should trigger an overflow!")
-            }
+            assert_matches!(
+                empty_bytes.try_reserve_exact(MAX_CAP + 1).map_err(|e| e.kind()),
+                Err(CapacityOverflow),
+                "isize::MAX + 1 should trigger an overflow!"
+            );
+
+            assert_matches!(
+                empty_bytes.try_reserve_exact(MAX_USIZE).map_err(|e| e.kind()),
+                Err(CapacityOverflow),
+                "usize::MAX should trigger an overflow!"
+            );
         } else {
-            if let Err(AllocError { .. }) =
-                empty_bytes.try_reserve_exact(MAX_CAP + 1).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an OOM!")
-            }
+            assert_matches!(
+                empty_bytes.try_reserve_exact(MAX_CAP + 1).map_err(|e| e.kind()),
+                Err(AllocError { .. }),
+                "isize::MAX + 1 should trigger an OOM!"
+            );
 
-            if let Err(AllocError { .. }) =
-                empty_bytes.try_reserve_exact(MAX_USIZE).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("usize::MAX should trigger an OOM!")
-            }
+            assert_matches!(
+                empty_bytes.try_reserve_exact(MAX_USIZE).map_err(|e| e.kind()),
+                Err(AllocError { .. }),
+                "usize::MAX should trigger an OOM!"
+            );
         }
     }
 
@@ -1653,25 +1648,23 @@ fn test_try_reserve_exact() {
             panic!("isize::MAX shouldn't trigger an overflow!");
         }
         if guards_against_isize {
-            if let Err(CapacityOverflow) =
-                ten_bytes.try_reserve_exact(MAX_CAP - 9).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an overflow!");
-            }
-        } else {
-            if let Err(AllocError { .. }) =
-                ten_bytes.try_reserve_exact(MAX_CAP - 9).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an OOM!")
-            }
-        }
-        if let Err(CapacityOverflow) = ten_bytes.try_reserve_exact(MAX_USIZE).map_err(|e| e.kind())
-        {
+            assert_matches!(
+                ten_bytes.try_reserve_exact(MAX_CAP - 9).map_err(|e| e.kind()),
+                Err(CapacityOverflow),
+                "isize::MAX + 1 should trigger an overflow!"
+            );
         } else {
-            panic!("usize::MAX should trigger an overflow!")
+            assert_matches!(
+                ten_bytes.try_reserve_exact(MAX_CAP - 9).map_err(|e| e.kind()),
+                Err(AllocError { .. }),
+                "isize::MAX + 1 should trigger an OOM!"
+            );
         }
+        assert_matches!(
+            ten_bytes.try_reserve_exact(MAX_USIZE).map_err(|e| e.kind()),
+            Err(CapacityOverflow),
+            "usize::MAX should trigger an overflow!"
+        );
     }
 
     {
@@ -1688,26 +1681,23 @@ fn test_try_reserve_exact() {
             panic!("isize::MAX shouldn't trigger an overflow!");
         }
         if guards_against_isize {
-            if let Err(CapacityOverflow) =
-                ten_u32s.try_reserve_exact(MAX_CAP / 4 - 9).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an overflow!");
-            }
+            assert_matches!(
+                ten_u32s.try_reserve_exact(MAX_CAP / 4 - 9).map_err(|e| e.kind()),
+                Err(CapacityOverflow),
+                "isize::MAX + 1 should trigger an overflow!"
+            );
         } else {
-            if let Err(AllocError { .. }) =
-                ten_u32s.try_reserve_exact(MAX_CAP / 4 - 9).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an OOM!")
-            }
-        }
-        if let Err(CapacityOverflow) =
-            ten_u32s.try_reserve_exact(MAX_USIZE - 20).map_err(|e| e.kind())
-        {
-        } else {
-            panic!("usize::MAX should trigger an overflow!")
-        }
+            assert_matches!(
+                ten_u32s.try_reserve_exact(MAX_CAP / 4 - 9).map_err(|e| e.kind()),
+                Err(AllocError { .. }),
+                "isize::MAX + 1 should trigger an OOM!"
+            );
+        }
+        assert_matches!(
+            ten_u32s.try_reserve_exact(MAX_USIZE - 20).map_err(|e| e.kind()),
+            Err(CapacityOverflow),
+            "usize::MAX should trigger an overflow!"
+        );
     }
 }
 
index e9fd19d76ea43f293df52f574b58fb54bde41472..ddfb4c00c2698fdc635219a2be033073264007a6 100644 (file)
@@ -1,3 +1,4 @@
+use std::assert_matches::assert_matches;
 use std::collections::TryReserveErrorKind::*;
 use std::collections::{vec_deque::Drain, VecDeque};
 use std::fmt::Debug;
@@ -1181,28 +1182,28 @@ fn test_try_reserve() {
 
         if guards_against_isize {
             // Check isize::MAX + 1 does count as overflow
-            if let Err(CapacityOverflow) =
-                empty_bytes.try_reserve(MAX_CAP + 1).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an overflow!")
-            }
+            assert_matches!(
+                empty_bytes.try_reserve(MAX_CAP + 1).map_err(|e| e.kind()),
+                Err(CapacityOverflow),
+                "isize::MAX + 1 should trigger an overflow!"
+            );
 
             // Check usize::MAX does count as overflow
-            if let Err(CapacityOverflow) = empty_bytes.try_reserve(MAX_USIZE).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("usize::MAX should trigger an overflow!")
-            }
+            assert_matches!(
+                empty_bytes.try_reserve(MAX_USIZE).map_err(|e| e.kind()),
+                Err(CapacityOverflow),
+                "usize::MAX should trigger an overflow!"
+            );
         } else {
             // Check isize::MAX is an OOM
             // VecDeque starts with capacity 7, always adds 1 to the capacity
             // and also rounds the number to next power of 2 so this is the
             // furthest we can go without triggering CapacityOverflow
-            if let Err(AllocError { .. }) = empty_bytes.try_reserve(MAX_CAP).map_err(|e| e.kind()) {
-            } else {
-                panic!("isize::MAX + 1 should trigger an OOM!")
-            }
+            assert_matches!(
+                empty_bytes.try_reserve(MAX_CAP).map_err(|e| e.kind()),
+                Err(AllocError { .. }),
+                "isize::MAX + 1 should trigger an OOM!"
+            );
         }
     }
 
@@ -1217,23 +1218,24 @@ fn test_try_reserve() {
             panic!("isize::MAX shouldn't trigger an overflow!");
         }
         if guards_against_isize {
-            if let Err(CapacityOverflow) = ten_bytes.try_reserve(MAX_CAP - 9).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an overflow!");
-            }
+            assert_matches!(
+                ten_bytes.try_reserve(MAX_CAP - 9).map_err(|e| e.kind()),
+                Err(CapacityOverflow),
+                "isize::MAX + 1 should trigger an overflow!"
+            );
         } else {
-            if let Err(AllocError { .. }) = ten_bytes.try_reserve(MAX_CAP - 9).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an OOM!")
-            }
+            assert_matches!(
+                ten_bytes.try_reserve(MAX_CAP - 9).map_err(|e| e.kind()),
+                Err(AllocError { .. }),
+                "isize::MAX + 1 should trigger an OOM!"
+            );
         }
         // Should always overflow in the add-to-len
-        if let Err(CapacityOverflow) = ten_bytes.try_reserve(MAX_USIZE).map_err(|e| e.kind()) {
-        } else {
-            panic!("usize::MAX should trigger an overflow!")
-        }
+        assert_matches!(
+            ten_bytes.try_reserve(MAX_USIZE).map_err(|e| e.kind()),
+            Err(CapacityOverflow),
+            "usize::MAX should trigger an overflow!"
+        );
     }
 
     {
@@ -1249,25 +1251,24 @@ fn test_try_reserve() {
             panic!("isize::MAX shouldn't trigger an overflow!");
         }
         if guards_against_isize {
-            if let Err(CapacityOverflow) =
-                ten_u32s.try_reserve(MAX_CAP / 4 - 9).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an overflow!");
-            }
+            assert_matches!(
+                ten_u32s.try_reserve(MAX_CAP / 4 - 9).map_err(|e| e.kind()),
+                Err(CapacityOverflow),
+                "isize::MAX + 1 should trigger an overflow!"
+            );
         } else {
-            if let Err(AllocError { .. }) =
-                ten_u32s.try_reserve(MAX_CAP / 4 - 9).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an OOM!")
-            }
+            assert_matches!(
+                ten_u32s.try_reserve(MAX_CAP / 4 - 9).map_err(|e| e.kind()),
+                Err(AllocError { .. }),
+                "isize::MAX + 1 should trigger an OOM!"
+            );
         }
         // Should fail in the mul-by-size
-        if let Err(CapacityOverflow) = ten_u32s.try_reserve(MAX_USIZE - 20).map_err(|e| e.kind()) {
-        } else {
-            panic!("usize::MAX should trigger an overflow!");
-        }
+        assert_matches!(
+            ten_u32s.try_reserve(MAX_USIZE - 20).map_err(|e| e.kind()),
+            Err(CapacityOverflow),
+            "usize::MAX should trigger an overflow!"
+        );
     }
 }
 
@@ -1296,30 +1297,27 @@ fn test_try_reserve_exact() {
         }
 
         if guards_against_isize {
-            if let Err(CapacityOverflow) =
-                empty_bytes.try_reserve_exact(MAX_CAP + 1).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an overflow!")
-            }
-
-            if let Err(CapacityOverflow) =
-                empty_bytes.try_reserve_exact(MAX_USIZE).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("usize::MAX should trigger an overflow!")
-            }
+            assert_matches!(
+                empty_bytes.try_reserve_exact(MAX_CAP + 1).map_err(|e| e.kind()),
+                Err(CapacityOverflow),
+                "isize::MAX + 1 should trigger an overflow!"
+            );
+
+            assert_matches!(
+                empty_bytes.try_reserve_exact(MAX_USIZE).map_err(|e| e.kind()),
+                Err(CapacityOverflow),
+                "usize::MAX should trigger an overflow!"
+            );
         } else {
             // Check isize::MAX is an OOM
             // VecDeque starts with capacity 7, always adds 1 to the capacity
             // and also rounds the number to next power of 2 so this is the
             // furthest we can go without triggering CapacityOverflow
-            if let Err(AllocError { .. }) =
-                empty_bytes.try_reserve_exact(MAX_CAP).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an OOM!")
-            }
+            assert_matches!(
+                empty_bytes.try_reserve_exact(MAX_CAP).map_err(|e| e.kind()),
+                Err(AllocError { .. }),
+                "isize::MAX + 1 should trigger an OOM!"
+            );
         }
     }
 
@@ -1337,25 +1335,23 @@ fn test_try_reserve_exact() {
             panic!("isize::MAX shouldn't trigger an overflow!");
         }
         if guards_against_isize {
-            if let Err(CapacityOverflow) =
-                ten_bytes.try_reserve_exact(MAX_CAP - 9).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an overflow!");
-            }
-        } else {
-            if let Err(AllocError { .. }) =
-                ten_bytes.try_reserve_exact(MAX_CAP - 9).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an OOM!")
-            }
-        }
-        if let Err(CapacityOverflow) = ten_bytes.try_reserve_exact(MAX_USIZE).map_err(|e| e.kind())
-        {
+            assert_matches!(
+                ten_bytes.try_reserve_exact(MAX_CAP - 9).map_err(|e| e.kind()),
+                Err(CapacityOverflow),
+                "isize::MAX + 1 should trigger an overflow!"
+            );
         } else {
-            panic!("usize::MAX should trigger an overflow!")
+            assert_matches!(
+                ten_bytes.try_reserve_exact(MAX_CAP - 9).map_err(|e| e.kind()),
+                Err(AllocError { .. }),
+                "isize::MAX + 1 should trigger an OOM!"
+            );
         }
+        assert_matches!(
+            ten_bytes.try_reserve_exact(MAX_USIZE).map_err(|e| e.kind()),
+            Err(CapacityOverflow),
+            "usize::MAX should trigger an overflow!"
+        );
     }
 
     {
@@ -1372,26 +1368,23 @@ fn test_try_reserve_exact() {
             panic!("isize::MAX shouldn't trigger an overflow!");
         }
         if guards_against_isize {
-            if let Err(CapacityOverflow) =
-                ten_u32s.try_reserve_exact(MAX_CAP / 4 - 9).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an overflow!");
-            }
-        } else {
-            if let Err(AllocError { .. }) =
-                ten_u32s.try_reserve_exact(MAX_CAP / 4 - 9).map_err(|e| e.kind())
-            {
-            } else {
-                panic!("isize::MAX + 1 should trigger an OOM!")
-            }
-        }
-        if let Err(CapacityOverflow) =
-            ten_u32s.try_reserve_exact(MAX_USIZE - 20).map_err(|e| e.kind())
-        {
+            assert_matches!(
+                ten_u32s.try_reserve_exact(MAX_CAP / 4 - 9).map_err(|e| e.kind()),
+                Err(CapacityOverflow),
+                "isize::MAX + 1 should trigger an overflow!"
+            );
         } else {
-            panic!("usize::MAX should trigger an overflow!")
+            assert_matches!(
+                ten_u32s.try_reserve_exact(MAX_CAP / 4 - 9).map_err(|e| e.kind()),
+                Err(AllocError { .. }),
+                "isize::MAX + 1 should trigger an OOM!"
+            );
         }
+        assert_matches!(
+            ten_u32s.try_reserve_exact(MAX_USIZE - 20).map_err(|e| e.kind()),
+            Err(CapacityOverflow),
+            "usize::MAX should trigger an overflow!"
+        );
     }
 }
 
index 1d3a12962145e44c780d568c2c67689d37e92a1a..75ef873abc965f40f2bf53258d1e4ab352de5565 100644 (file)
@@ -45,7 +45,8 @@ unsafe fn to_int_unchecked(self) -> $Int {
 macro_rules! impl_from {
     ($Small: ty, $Large: ty, #[$attr:meta], $doc: expr) => {
         #[$attr]
-        impl From<$Small> for $Large {
+        #[rustc_const_unstable(feature = "const_num_from_num", issue = "87852")]
+        impl const From<$Small> for $Large {
             // Rustdocs on the impl block show a "[+] show undocumented items" toggle.
             // Rustdocs on functions do not.
             #[doc = $doc]
@@ -172,7 +173,8 @@ macro_rules! impl_from_bool {
 macro_rules! try_from_unbounded {
     ($source:ty, $($target:ty),*) => {$(
         #[stable(feature = "try_from", since = "1.34.0")]
-        impl TryFrom<$source> for $target {
+        #[rustc_const_unstable(feature = "const_num_from_num", issue = "87852")]
+        impl const TryFrom<$source> for $target {
             type Error = TryFromIntError;
 
             /// Try to create the target number type from a source
@@ -190,7 +192,8 @@ fn try_from(value: $source) -> Result<Self, Self::Error> {
 macro_rules! try_from_lower_bounded {
     ($source:ty, $($target:ty),*) => {$(
         #[stable(feature = "try_from", since = "1.34.0")]
-        impl TryFrom<$source> for $target {
+        #[rustc_const_unstable(feature = "const_num_from_num", issue = "87852")]
+        impl const TryFrom<$source> for $target {
             type Error = TryFromIntError;
 
             /// Try to create the target number type from a source
@@ -212,7 +215,8 @@ fn try_from(u: $source) -> Result<Self, Self::Error> {
 macro_rules! try_from_upper_bounded {
     ($source:ty, $($target:ty),*) => {$(
         #[stable(feature = "try_from", since = "1.34.0")]
-        impl TryFrom<$source> for $target {
+        #[rustc_const_unstable(feature = "const_num_from_num", issue = "87852")]
+        impl const TryFrom<$source> for $target {
             type Error = TryFromIntError;
 
             /// Try to create the target number type from a source
@@ -234,7 +238,8 @@ fn try_from(u: $source) -> Result<Self, Self::Error> {
 macro_rules! try_from_both_bounded {
     ($source:ty, $($target:ty),*) => {$(
         #[stable(feature = "try_from", since = "1.34.0")]
-        impl TryFrom<$source> for $target {
+        #[rustc_const_unstable(feature = "const_num_from_num", issue = "87852")]
+        impl const TryFrom<$source> for $target {
             type Error = TryFromIntError;
 
             /// Try to create the target number type from a source
index a0b65399da2c5444d4db3eaa7ac0a9f3b8687ef6..a4924554919b07217af17ae101ad38e555aa32f4 100644 (file)
@@ -152,23 +152,19 @@ pub fn spin_loop() {
 /// backend used. Programs cannot rely on `black_box` for *correctness* in any way.
 ///
 /// [`std::convert::identity`]: crate::convert::identity
-#[cfg_attr(not(miri), inline)]
-#[cfg_attr(miri, inline(never))]
+#[inline]
 #[unstable(feature = "bench_black_box", issue = "64102")]
-#[cfg_attr(miri, allow(unused_mut))]
+#[cfg_attr(not(bootstrap), allow(unused_mut))]
 pub fn black_box<T>(mut dummy: T) -> T {
-    // We need to "use" the argument in some way LLVM can't introspect, and on
-    // targets that support it we can typically leverage inline assembly to do
-    // this. LLVM's interpretation of inline assembly is that it's, well, a black
-    // box. This isn't the greatest implementation since it probably deoptimizes
-    // more than we want, but it's so far good enough.
-
-    #[cfg(not(miri))] // This is just a hint, so it is fine to skip in Miri.
+    #[cfg(bootstrap)]
     // SAFETY: the inline assembly is a no-op.
     unsafe {
-        // FIXME: Cannot use `asm!` because it doesn't support MIPS and other architectures.
         llvm_asm!("" : : "r"(&mut dummy) : "memory" : "volatile");
+        dummy
     }
 
-    dummy
+    #[cfg(not(bootstrap))]
+    {
+        crate::intrinsics::black_box(dummy)
+    }
 }
index d15ac89668fa397c5ce123daa2cda8a4ee3c5ae4..272b1e3a1d75ee9549fc9903a36aba90c284b339 100644 (file)
@@ -1933,6 +1933,12 @@ pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
     /// which is UB if any of their inputs are `undef`.)
     #[rustc_const_unstable(feature = "const_intrinsic_raw_eq", issue = "none")]
     pub fn raw_eq<T>(a: &T, b: &T) -> bool;
+
+    /// See documentation of [`std::hint::black_box`] for details.
+    ///
+    /// [`std::hint::black_box`]: crate::hint::black_box
+    #[cfg(not(bootstrap))]
+    pub fn black_box<T>(dummy: T) -> T;
 }
 
 // Some functions are defined here because they accidentally got made
index 7f87ead6feed6c132faec40398c48dc1912591e6..aa91346851f9dc83aa003def0a3949ad412b215d 100644 (file)
@@ -360,3 +360,61 @@ fn extend<T: IntoIterator<Item = ()>>(&mut self, iter: T) {
     }
     fn extend_one(&mut self, _item: ()) {}
 }
+
+#[stable(feature = "extend_for_tuple", since = "1.56.0")]
+impl<A, B, ExtendA, ExtendB> Extend<(A, B)> for (ExtendA, ExtendB)
+where
+    ExtendA: Extend<A>,
+    ExtendB: Extend<B>,
+{
+    /// Allows to `extend` a tuple of collections that also implement `Extend`.
+    ///
+    /// See also: [`Iterator::unzip`]
+    ///
+    /// # Examples
+    /// ```
+    /// let mut tuple = (vec![0], vec![1]);
+    /// tuple.extend(vec![(2, 3), (4, 5), (6, 7)]);
+    /// assert_eq!(tuple.0, vec![0, 2, 4, 6]);
+    /// assert_eq!(tuple.1, vec![1, 3, 5, 7]);
+    ///
+    /// // also allows for arbitrarily nested tuples
+    /// let mut nested_tuple = (vec![(1, -1)], vec![(2, -2)]);
+    /// nested_tuple.extend(vec![((3, -3), (4, -4)), ((5, -5), (6, -6))]);
+    ///
+    /// assert_eq!(nested_tuple.0, vec![(1, -1), (3, -3), (5, -5)]);
+    /// assert_eq!(nested_tuple.1, vec![(2, -2), (4, -4), (6, -6)]);
+    /// ```
+    fn extend<T: IntoIterator<Item = (A, B)>>(&mut self, into_iter: T) {
+        let (a, b) = self;
+        let iter = into_iter.into_iter();
+
+        fn extend<'a, A, B>(
+            a: &'a mut impl Extend<A>,
+            b: &'a mut impl Extend<B>,
+        ) -> impl FnMut((), (A, B)) + 'a {
+            move |(), (t, u)| {
+                a.extend_one(t);
+                b.extend_one(u);
+            }
+        }
+
+        let (lower_bound, _) = iter.size_hint();
+        if lower_bound > 0 {
+            a.extend_reserve(lower_bound);
+            b.extend_reserve(lower_bound);
+        }
+
+        iter.fold((), extend(a, b));
+    }
+
+    fn extend_one(&mut self, item: (A, B)) {
+        self.0.extend_one(item.0);
+        self.1.extend_one(item.1);
+    }
+
+    fn extend_reserve(&mut self, additional: usize) {
+        self.0.extend_reserve(additional);
+        self.1.extend_reserve(additional);
+    }
+}
index 6b24d33bebca39239d618a74f3cd0d23615eadbd..524d8f857e2a5e26db1b757cb25abad31b4626b8 100644 (file)
@@ -2841,6 +2841,14 @@ fn rev(self) -> Rev<Self>
     ///
     /// assert_eq!(left, [1, 3]);
     /// assert_eq!(right, [2, 4]);
+    ///
+    /// // you can also unzip multiple nested tuples at once
+    /// let a = [(1, (2, 3)), (4, (5, 6))];
+    ///
+    /// let (x, (y, z)): (Vec<_>, (Vec<_>, Vec<_>)) = a.iter().cloned().unzip();
+    /// assert_eq!(x, [1, 4]);
+    /// assert_eq!(y, [2, 5]);
+    /// assert_eq!(z, [3, 6]);
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
@@ -2849,28 +2857,9 @@ fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
         FromB: Default + Extend<B>,
         Self: Sized + Iterator<Item = (A, B)>,
     {
-        fn extend<'a, A, B>(
-            ts: &'a mut impl Extend<A>,
-            us: &'a mut impl Extend<B>,
-        ) -> impl FnMut((), (A, B)) + 'a {
-            move |(), (t, u)| {
-                ts.extend_one(t);
-                us.extend_one(u);
-            }
-        }
-
-        let mut ts: FromA = Default::default();
-        let mut us: FromB = Default::default();
-
-        let (lower_bound, _) = self.size_hint();
-        if lower_bound > 0 {
-            ts.extend_reserve(lower_bound);
-            us.extend_reserve(lower_bound);
-        }
-
-        self.fold((), extend(&mut ts, &mut us));
-
-        (ts, us)
+        let mut unzipped: (FromA, FromB) = Default::default();
+        unzipped.extend(self);
+        unzipped
     }
 
     /// Creates an iterator which copies all of its elements.
index 222ef34b6aa8a82eb77cb4e01071193aad440adf..37c3f8d4c16abfbe12370ead005d77639c839858 100644 (file)
@@ -99,6 +99,7 @@
 #![feature(const_slice_from_raw_parts)]
 #![feature(const_slice_ptr_len)]
 #![feature(const_swap)]
+#![feature(const_trait_impl)]
 #![feature(const_type_id)]
 #![feature(const_type_name)]
 #![feature(const_unreachable_unchecked)]
index d4e9c384f93021ced4d79096bf4f709a1dd45135..3f9f04606b36a5f669b8cc999af47342f294ad68 100644 (file)
@@ -1399,6 +1399,33 @@ pub fn zip_with<U, F, R>(self, other: Option<U>, f: F) -> Option<R>
     }
 }
 
+impl<T, U> Option<(T, U)> {
+    /// Unzips an option containing a tuple of two options
+    ///
+    /// If `self` is `Some((a, b))` this method returns `(Some(a), Some(b))`.
+    /// Otherwise, `(None, None)` is returned.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// #![feature(unzip_option)]
+    ///
+    /// let x = Some((1, "hi"));
+    /// let y = None::<(u8, u32)>;
+    ///
+    /// assert_eq!(x.unzip(), (Some(1), Some("hi")));
+    /// assert_eq!(y.unzip(), (None, None));
+    /// ```
+    #[inline]
+    #[unstable(feature = "unzip_option", issue = "87800", reason = "recently added")]
+    pub const fn unzip(self) -> (Option<T>, Option<U>) {
+        match self {
+            Some((a, b)) => (Some(a), Some(b)),
+            None => (None, None),
+        }
+    }
+}
+
 impl<T: Copy> Option<&T> {
     /// Maps an `Option<&T>` to an `Option<T>` by copying the contents of the
     /// option.
index 425cf71626f40edae9d5f8dd2ce577c5e1a07549..80eb590587f993b1e248a65a1c481368c44e994a 100644 (file)
@@ -1,6 +1,3 @@
-use crate::mem::{size_of, transmute_copy};
-use crate::ptr::write_bytes;
-
 pub(super) trait SpecFill<T> {
     fn spec_fill(&mut self, value: T);
 }
@@ -19,17 +16,8 @@ impl<T: Clone> SpecFill<T> for [T] {
 
 impl<T: Copy> SpecFill<T> for [T] {
     fn spec_fill(&mut self, value: T) {
-        if size_of::<T>() == 1 {
-            // SAFETY: The size_of check above ensures that values are 1 byte wide, as required
-            // for the transmute and write_bytes
-            unsafe {
-                let value: u8 = transmute_copy(&value);
-                write_bytes(self.as_mut_ptr(), value, self.len());
-            }
-        } else {
-            for item in self.iter_mut() {
-                *item = value;
-            }
+        for item in self.iter_mut() {
+            *item = value;
         }
     }
 }
index c7756a503c3e9956d7f1ba1089655fd631b4e25c..13f483f19b770fcbc54a2e2fb1a644b5fb45205b 100644 (file)
@@ -13,6 +13,8 @@
 #![feature(const_ptr_read)]
 #![feature(const_ptr_write)]
 #![feature(const_ptr_offset)]
+#![feature(const_trait_impl)]
+#![feature(const_num_from_num)]
 #![feature(core_intrinsics)]
 #![feature(core_private_bignum)]
 #![feature(core_private_diy_float)]
@@ -66,6 +68,7 @@
 #![feature(slice_group_by)]
 #![feature(trusted_random_access)]
 #![feature(unsize)]
+#![feature(unzip_option)]
 #![deny(unsafe_op_in_unsafe_fn)]
 
 extern crate test;
diff --git a/library/core/tests/num/const_from.rs b/library/core/tests/num/const_from.rs
new file mode 100644 (file)
index 0000000..aca18ef
--- /dev/null
@@ -0,0 +1,25 @@
+#[test]
+fn from() {
+    use core::convert::TryFrom;
+    use core::num::TryFromIntError;
+
+    // From
+    const FROM: i64 = i64::from(1i32);
+    assert_eq!(FROM, 1i64);
+
+    // From int to float
+    const FROM_F64: f64 = f64::from(42u8);
+    assert_eq!(FROM_F64, 42f64);
+
+    // Upper bounded
+    const U8_FROM_U16: Result<u8, TryFromIntError> = u8::try_from(1u16);
+    assert_eq!(U8_FROM_U16, Ok(1u8));
+
+    // Both bounded
+    const I8_FROM_I16: Result<i8, TryFromIntError> = i8::try_from(1i16);
+    assert_eq!(I8_FROM_I16, Ok(1i8));
+
+    // Lower bounded
+    const I16_FROM_U16: Result<i16, TryFromIntError> = i16::try_from(1u16);
+    assert_eq!(I16_FROM_U16, Ok(1i16));
+}
index 76e838cf6bfbd2b75983a0257a82759db353cd99..37b5e9127d5b0b0645e4a5dde48f80fc7d6ee515 100644 (file)
@@ -27,6 +27,8 @@
 mod u8;
 
 mod bignum;
+
+mod const_from;
 mod dec2flt;
 mod flt2dec;
 mod int_log;
index 88ea15a3b33fac90de5bdb2c8ed7fee6dae1e2c0..cd8fdebe36a05a1620ee90daf9417f1e45575afd 100644 (file)
@@ -399,7 +399,7 @@ fn unwrap<T>(o: Option<T>) -> T {
 }
 
 #[test]
-pub fn option_ext() {
+fn option_ext() {
     let thing = "{{ f }}";
     let f = thing.find("{{");
 
@@ -407,3 +407,35 @@ pub fn option_ext() {
         println!("None!");
     }
 }
+
+#[test]
+fn zip_options() {
+    let x = Some(10);
+    let y = Some("foo");
+    let z: Option<usize> = None;
+
+    assert_eq!(x.zip(y), Some((10, "foo")));
+    assert_eq!(x.zip(z), None);
+    assert_eq!(z.zip(x), None);
+}
+
+#[test]
+fn unzip_options() {
+    let x = Some((10, "foo"));
+    let y = None::<(bool, i32)>;
+
+    assert_eq!(x.unzip(), (Some(10), Some("foo")));
+    assert_eq!(y.unzip(), (None, None));
+}
+
+#[test]
+fn zip_unzip_roundtrip() {
+    let x = Some(10);
+    let y = Some("foo");
+
+    let z = x.zip(y);
+    assert_eq!(z, Some((10, "foo")));
+
+    let a = z.unzip();
+    assert_eq!(a, (x, y));
+}
index 240b894057c3e80016dc5f052b9afebe285e8c90..43e2af3eb18d262403b9788e5db808a113ee1a64 100644 (file)
@@ -739,6 +739,10 @@ fn test_array_windows_count() {
     let v3: &[i32] = &[];
     let c3 = v3.array_windows::<2>();
     assert_eq!(c3.count(), 0);
+
+    let v4: &[()] = &[(); usize::MAX];
+    let c4 = v4.array_windows::<1>();
+    assert_eq!(c4.count(), usize::MAX);
 }
 
 #[test]
@@ -1050,6 +1054,10 @@ fn test_windows_count() {
     let v3: &[i32] = &[];
     let c3 = v3.windows(2);
     assert_eq!(c3.count(), 0);
+
+    let v4 = &[(); usize::MAX];
+    let c4 = v4.windows(1);
+    assert_eq!(c4.count(), usize::MAX);
 }
 
 #[test]
index 14b454da4f46f58675e6069509107218cf9fad79..ac7d8c18e3e029282473c1f695ea1ef1d993eb2c 100644 (file)
@@ -45,7 +45,7 @@
     } else if #[cfg(any(
         all(target_family = "windows", target_env = "gnu"),
         target_os = "psp",
-        target_family = "unix",
+        all(target_family = "unix", not(target_os = "espidf")),
         all(target_vendor = "fortanix", target_env = "sgx"),
     ))] {
         // Rust runtime's startup objects depend on these symbols, so make them public.
@@ -58,6 +58,7 @@
         // - arch=wasm32
         // - os=none ("bare metal" targets)
         // - os=uefi
+        // - os=espidf
         // - nvptx64-nvidia-cuda
         // - arch=avr
         #[path = "dummy.rs"]
index 492bffbba74c6fb45de0434138976ff89a6b6a10..64f413acd9709383b9850eedc7cea835272502d0 100644 (file)
@@ -15,7 +15,7 @@ cfg-if = { version = "0.1.8", features = ['rustc-dep-of-std'] }
 panic_unwind = { path = "../panic_unwind", optional = true }
 panic_abort = { path = "../panic_abort" }
 core = { path = "../core" }
-libc = { version = "0.2.98", default-features = false, features = ['rustc-dep-of-std'] }
+libc = { version = "0.2.99", default-features = false, features = ['rustc-dep-of-std'] }
 compiler_builtins = { version = "0.1.44" }
 profiler_builtins = { path = "../profiler_builtins", optional = true }
 unwind = { path = "../unwind" }
index a14ac63c7a8e4ee908cb955e8ab86ba55ef24445..726157c1f1a41a9e1dd301264f825dfaeadba2c4 100644 (file)
@@ -26,6 +26,7 @@ fn main() {
         || target.contains("vxworks")
         || target.contains("wasm32")
         || target.contains("asmjs")
+        || target.contains("espidf")
     {
         // These platforms don't have any special requirements.
     } else {
index 18d868d49a634e3e1204e05c33fbe6d256851cc2..d9b20aee2d27f1e1b6fd7951976766db317ac6bc 100644 (file)
@@ -1,6 +1,7 @@
 use super::Entry::{Occupied, Vacant};
 use super::HashMap;
 use super::RandomState;
+use crate::assert_matches::assert_matches;
 use crate::cell::RefCell;
 use rand::{thread_rng, Rng};
 use realstd::collections::TryReserveErrorKind::*;
@@ -821,15 +822,17 @@ fn test_try_reserve() {
 
     const MAX_USIZE: usize = usize::MAX;
 
-    if let Err(CapacityOverflow) = empty_bytes.try_reserve(MAX_USIZE).map_err(|e| e.kind()) {
-    } else {
-        panic!("usize::MAX should trigger an overflow!");
-    }
-
-    if let Err(AllocError { .. }) = empty_bytes.try_reserve(MAX_USIZE / 8).map_err(|e| e.kind()) {
-    } else {
-        panic!("usize::MAX / 8 should trigger an OOM!")
-    }
+    assert_matches!(
+        empty_bytes.try_reserve(MAX_USIZE).map_err(|e| e.kind()),
+        Err(CapacityOverflow),
+        "usize::MAX should trigger an overflow!"
+    );
+
+    assert_matches!(
+        empty_bytes.try_reserve(MAX_USIZE / 8).map_err(|e| e.kind()),
+        Err(AllocError { .. }),
+        "usize::MAX / 8 should trigger an OOM!"
+    );
 }
 
 #[test]
diff --git a/library/std/src/os/espidf/fs.rs b/library/std/src/os/espidf/fs.rs
new file mode 100644 (file)
index 0000000..93dc2c0
--- /dev/null
@@ -0,0 +1,117 @@
+#![stable(feature = "metadata_ext", since = "1.1.0")]
+
+use crate::fs::Metadata;
+use crate::sys_common::AsInner;
+
+#[allow(deprecated)]
+use crate::os::espidf::raw;
+
+/// OS-specific extensions to [`fs::Metadata`].
+///
+/// [`fs::Metadata`]: crate::fs::Metadata
+#[stable(feature = "metadata_ext", since = "1.1.0")]
+pub trait MetadataExt {
+    #[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_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_spare4(&self) -> [u32; 2];
+}
+
+#[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 {
+        0
+    }
+    fn st_mtime(&self) -> i64 {
+        self.as_inner().as_inner().st_mtime as i64
+    }
+    fn st_mtime_nsec(&self) -> i64 {
+        0
+    }
+    fn st_ctime(&self) -> i64 {
+        self.as_inner().as_inner().st_ctime as i64
+    }
+    fn st_ctime_nsec(&self) -> i64 {
+        0
+    }
+    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_spare4(&self) -> [u32; 2] {
+        let spare4 = self.as_inner().as_inner().st_spare4;
+        [spare4[0] as u32, spare4[1] as u32]
+    }
+}
diff --git a/library/std/src/os/espidf/mod.rs b/library/std/src/os/espidf/mod.rs
new file mode 100644 (file)
index 0000000..a9cef97
--- /dev/null
@@ -0,0 +1,6 @@
+//! Definitions for the ESP-IDF framework.
+
+#![stable(feature = "raw_ext", since = "1.1.0")]
+
+pub mod fs;
+pub mod raw;
diff --git a/library/std/src/os/espidf/raw.rs b/library/std/src/os/espidf/raw.rs
new file mode 100644 (file)
index 0000000..fb18ec6
--- /dev/null
@@ -0,0 +1,69 @@
+//! Raw type definitions for the ESP-IDF framework.
+
+#![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"
+)]
+
+use crate::os::raw::c_long;
+use crate::os::unix::raw::{gid_t, uid_t};
+
+#[stable(feature = "pthread_t", since = "1.8.0")]
+pub type pthread_t = libc::pthread_t;
+
+#[stable(feature = "raw_ext", since = "1.1.0")]
+pub type blkcnt_t = libc::blkcnt_t;
+
+#[stable(feature = "raw_ext", since = "1.1.0")]
+pub type blksize_t = libc::blksize_t;
+#[stable(feature = "raw_ext", since = "1.1.0")]
+pub type dev_t = libc::dev_t;
+#[stable(feature = "raw_ext", since = "1.1.0")]
+pub type ino_t = libc::ino_t;
+#[stable(feature = "raw_ext", since = "1.1.0")]
+pub type mode_t = libc::mode_t;
+#[stable(feature = "raw_ext", since = "1.1.0")]
+pub type nlink_t = libc::nlink_t;
+#[stable(feature = "raw_ext", since = "1.1.0")]
+pub type off_t = libc::off_t;
+
+#[stable(feature = "raw_ext", since = "1.1.0")]
+pub type time_t = libc::time_t;
+
+#[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_dev: dev_t,
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub st_ino: ino_t,
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub st_mode: mode_t,
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub st_nlink: nlink_t,
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub st_uid: uid_t,
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub st_gid: gid_t,
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub st_rdev: dev_t,
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub st_size: off_t,
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub st_atime: time_t,
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub st_mtime: time_t,
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub st_ctime: time_t,
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub st_blksize: blksize_t,
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub st_blocks: blkcnt_t,
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub st_spare4: [c_long; 2usize],
+}
index 07e29ebf3681cd6ca635738616699c60c8b4fd0c..4c9814919cdfa5e2aee68672909ff60b4c054c22 100644 (file)
@@ -80,6 +80,8 @@ mod imp {
     pub mod dragonfly;
     #[cfg(target_os = "emscripten")]
     pub mod emscripten;
+    #[cfg(target_os = "espidf")]
+    pub mod espidf;
     #[cfg(target_os = "freebsd")]
     pub mod freebsd;
     #[cfg(target_os = "fuchsia")]
index 73489c0f1620a5148106c0b7ebe79bc5fe4b68fb..6c73d4b21dd3dbc71f51e289316825df9409031c 100644 (file)
@@ -40,6 +40,8 @@ mod platform {
     pub use crate::os::dragonfly::*;
     #[cfg(target_os = "emscripten")]
     pub use crate::os::emscripten::*;
+    #[cfg(target_os = "espidf")]
+    pub use crate::os::espidf::*;
     #[cfg(target_os = "freebsd")]
     pub use crate::os::freebsd::*;
     #[cfg(target_os = "fuchsia")]
index 2a54e99020e38f1bd673e1a4d2c5106aaf7ba0a9..576667c017392054ff825cfdde82b1dc7be202ba 100644 (file)
@@ -14,7 +14,8 @@
     target_arch = "asmjs",
     target_arch = "wasm32",
     target_arch = "hexagon",
-    target_arch = "riscv32"
+    target_arch = "riscv32",
+    target_arch = "xtensa"
 )))]
 pub const MIN_ALIGN: usize = 8;
 #[cfg(all(any(
index 1b71905aa09b77b448cb6cb433fd2cfa54d82b52..7c3d9573940ae500d53b3638ffc0fe9257689221 100644 (file)
@@ -57,7 +57,8 @@ unsafe fn realloc(&self, ptr: *mut u8, layout: Layout, new_size: usize) -> *mut
         target_os = "android",
         target_os = "illumos",
         target_os = "redox",
-        target_os = "solaris"
+        target_os = "solaris",
+        target_os = "espidf"
     ))] {
         #[inline]
         unsafe fn aligned_malloc(layout: &Layout) -> *mut u8 {
index 0bd1ea645779f6d524e1cb9e27156bcfe3f82b38..ee5e3983ac26ae4bc53377aa071cbc9cd70d30de 100644 (file)
@@ -246,3 +246,15 @@ pub fn args() -> Args {
         Args { iter: res.into_iter() }
     }
 }
+
+#[cfg(target_os = "espidf")]
+mod imp {
+    use super::Args;
+
+    #[inline(always)]
+    pub unsafe fn init(_argc: isize, _argv: *const *const u8) {}
+
+    pub fn args() -> Args {
+        Args { iter: Vec::new().into_iter() }
+    }
+}
index e38f91af9f0b9ba6d17543c1a216002092f3e6a6..61261c0aa84e3e084aca6bc5a7f46698b8f91b3e 100644 (file)
@@ -34,12 +34,23 @@ pub const fn new() -> Condvar {
     ))]
     pub unsafe fn init(&mut self) {}
 
+    // NOTE: ESP-IDF's PTHREAD_COND_INITIALIZER support is not released yet
+    // So on that platform, init() should always be called
+    // Moreover, that platform does not have pthread_condattr_setclock support,
+    // hence that initialization should be skipped as well
+    #[cfg(target_os = "espidf")]
+    pub unsafe fn init(&mut self) {
+        let r = libc::pthread_cond_init(self.inner.get(), crate::ptr::null());
+        assert_eq!(r, 0);
+    }
+
     #[cfg(not(any(
         target_os = "macos",
         target_os = "ios",
         target_os = "l4re",
         target_os = "android",
-        target_os = "redox"
+        target_os = "redox",
+        target_os = "espidf"
     )))]
     pub unsafe fn init(&mut self) {
         use crate::mem::MaybeUninit;
@@ -76,7 +87,12 @@ pub unsafe fn wait(&self, mutex: &Mutex) {
     // where we configure condition variable to use monotonic clock (instead of
     // default system clock). This approach avoids all problems that result
     // from changes made to the system time.
-    #[cfg(not(any(target_os = "macos", target_os = "ios", target_os = "android")))]
+    #[cfg(not(any(
+        target_os = "macos",
+        target_os = "ios",
+        target_os = "android",
+        target_os = "espidf"
+    )))]
     pub unsafe fn wait_timeout(&self, mutex: &Mutex, dur: Duration) -> bool {
         use crate::mem;
 
@@ -103,7 +119,12 @@ pub unsafe fn wait_timeout(&self, mutex: &Mutex, dur: Duration) -> bool {
     // This implementation is modeled after libcxx's condition_variable
     // https://github.com/llvm-mirror/libcxx/blob/release_35/src/condition_variable.cpp#L46
     // https://github.com/llvm-mirror/libcxx/blob/release_35/include/__mutex_base#L367
-    #[cfg(any(target_os = "macos", target_os = "ios", target_os = "android"))]
+    #[cfg(any(
+        target_os = "macos",
+        target_os = "ios",
+        target_os = "android",
+        target_os = "espidf"
+    ))]
     pub unsafe fn wait_timeout(&self, mutex: &Mutex, mut dur: Duration) -> bool {
         use crate::ptr;
         use crate::time::Instant;
index 3a88dc083b06c735fc0274abeea9ea357dfbe659..60551aeb3e73e5f1c0ee92452c48cd146908dbef 100644 (file)
@@ -184,3 +184,14 @@ pub mod os {
     pub const EXE_SUFFIX: &str = "";
     pub const EXE_EXTENSION: &str = "";
 }
+
+#[cfg(target_os = "espidf")]
+pub mod os {
+    pub const FAMILY: &str = "unix";
+    pub const OS: &str = "espidf";
+    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 = "";
+}
index 821851a6c65b70be433262d9f783a6961284c291..28e32681e15b3d3624d1ba3c7ab935600e7ccad0 100644 (file)
@@ -91,6 +91,7 @@ pub fn read(&self, buf: &mut [u8]) -> io::Result<usize> {
         Ok(ret as usize)
     }
 
+    #[cfg(not(target_os = "espidf"))]
     pub fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> io::Result<usize> {
         let ret = cvt(unsafe {
             libc::readv(
@@ -102,9 +103,14 @@ pub fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> io::Result<usize> {
         Ok(ret as usize)
     }
 
+    #[cfg(target_os = "espidf")]
+    pub fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> io::Result<usize> {
+        return crate::io::default_read_vectored(|b| self.read(b), bufs);
+    }
+
     #[inline]
     pub fn is_read_vectored(&self) -> bool {
-        true
+        cfg!(not(target_os = "espidf"))
     }
 
     pub fn read_to_end(&self, buf: &mut Vec<u8>) -> io::Result<usize> {
@@ -148,6 +154,7 @@ pub fn write(&self, buf: &[u8]) -> io::Result<usize> {
         Ok(ret as usize)
     }
 
+    #[cfg(not(target_os = "espidf"))]
     pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> io::Result<usize> {
         let ret = cvt(unsafe {
             libc::writev(
@@ -159,9 +166,14 @@ pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> io::Result<usize> {
         Ok(ret as usize)
     }
 
+    #[cfg(target_os = "espidf")]
+    pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> io::Result<usize> {
+        return crate::io::default_write_vectored(|b| self.write(b), bufs);
+    }
+
     #[inline]
     pub fn is_write_vectored(&self) -> bool {
-        true
+        cfg!(not(target_os = "espidf"))
     }
 
     pub fn write_at(&self, buf: &[u8], offset: u64) -> io::Result<usize> {
@@ -217,7 +229,7 @@ pub fn set_cloexec(&self) -> io::Result<()> {
         }
     }
     #[cfg(any(
-        target_env = "newlib",
+        all(target_env = "newlib", not(target_os = "espidf")),
         target_os = "solaris",
         target_os = "illumos",
         target_os = "emscripten",
@@ -238,6 +250,12 @@ pub fn set_cloexec(&self) -> io::Result<()> {
             Ok(())
         }
     }
+    #[cfg(target_os = "espidf")]
+    pub fn set_cloexec(&self) -> io::Result<()> {
+        // FD_CLOEXEC is not supported in ESP-IDF but there's no need to,
+        // because ESP-IDF does not support spawning processes either.
+        Ok(())
+    }
 
     #[cfg(target_os = "linux")]
     pub fn set_nonblocking(&self, nonblocking: bool) -> io::Result<()> {
@@ -268,7 +286,17 @@ pub fn duplicate(&self) -> io::Result<FileDesc> {
         // We want to atomically duplicate this file descriptor and set the
         // CLOEXEC flag, and currently that's done via F_DUPFD_CLOEXEC. This
         // is a POSIX flag that was added to Linux in 2.6.24.
-        let fd = cvt(unsafe { libc::fcntl(self.raw(), libc::F_DUPFD_CLOEXEC, 0) })?;
+        #[cfg(not(target_os = "espidf"))]
+        let cmd = libc::F_DUPFD_CLOEXEC;
+
+        // For ESP-IDF, F_DUPFD is used instead, because the CLOEXEC semantics
+        // will never be supported, as this is a bare metal framework with
+        // no capabilities for multi-process execution.  While F_DUPFD is also
+        // not supported yet, it might be (currently it returns ENOSYS).
+        #[cfg(target_os = "espidf")]
+        let cmd = libc::F_DUPFD;
+
+        let fd = cvt(unsafe { libc::fcntl(self.raw(), cmd, 0) })?;
         Ok(FileDesc::new(fd))
     }
 }
index 7f69ebbeb4de60df54a3317946568fd07f0e2a54..fd4defd72eb4736b5f6389265820a78e5848be89 100644 (file)
@@ -312,7 +312,7 @@ pub fn created(&self) -> io::Result<SystemTime> {
 
 #[cfg(not(target_os = "netbsd"))]
 impl FileAttr {
-    #[cfg(not(target_os = "vxworks"))]
+    #[cfg(all(not(target_os = "vxworks"), not(target_os = "espidf")))]
     pub fn modified(&self) -> io::Result<SystemTime> {
         Ok(SystemTime::from(libc::timespec {
             tv_sec: self.stat.st_mtime as libc::time_t,
@@ -320,7 +320,7 @@ pub fn modified(&self) -> io::Result<SystemTime> {
         }))
     }
 
-    #[cfg(target_os = "vxworks")]
+    #[cfg(any(target_os = "vxworks", target_os = "espidf"))]
     pub fn modified(&self) -> io::Result<SystemTime> {
         Ok(SystemTime::from(libc::timespec {
             tv_sec: self.stat.st_mtime as libc::time_t,
@@ -328,7 +328,7 @@ pub fn modified(&self) -> io::Result<SystemTime> {
         }))
     }
 
-    #[cfg(not(target_os = "vxworks"))]
+    #[cfg(all(not(target_os = "vxworks"), not(target_os = "espidf")))]
     pub fn accessed(&self) -> io::Result<SystemTime> {
         Ok(SystemTime::from(libc::timespec {
             tv_sec: self.stat.st_atime as libc::time_t,
@@ -336,7 +336,7 @@ pub fn accessed(&self) -> io::Result<SystemTime> {
         }))
     }
 
-    #[cfg(target_os = "vxworks")]
+    #[cfg(any(target_os = "vxworks", target_os = "espidf"))]
     pub fn accessed(&self) -> io::Result<SystemTime> {
         Ok(SystemTime::from(libc::timespec {
             tv_sec: self.stat.st_atime as libc::time_t,
@@ -609,7 +609,8 @@ pub fn file_type(&self) -> io::Result<FileType> {
         target_os = "l4re",
         target_os = "fuchsia",
         target_os = "redox",
-        target_os = "vxworks"
+        target_os = "vxworks",
+        target_os = "espidf"
     ))]
     pub fn ino(&self) -> u64 {
         self.entry.d_ino as u64
@@ -648,7 +649,8 @@ fn name_bytes(&self) -> &[u8] {
         target_os = "emscripten",
         target_os = "l4re",
         target_os = "haiku",
-        target_os = "vxworks"
+        target_os = "vxworks",
+        target_os = "espidf"
     ))]
     fn name_bytes(&self) -> &[u8] {
         unsafe { CStr::from_ptr(self.entry.d_name.as_ptr()).to_bytes() }
@@ -1106,8 +1108,8 @@ pub fn link(original: &Path, link: &Path) -> io::Result<()> {
     let original = cstr(original)?;
     let link = cstr(link)?;
     cfg_if::cfg_if! {
-        if #[cfg(any(target_os = "vxworks", target_os = "redox", target_os = "android"))] {
-            // VxWorks and Redox lack `linkat`, so use `link` instead. POSIX leaves
+        if #[cfg(any(target_os = "vxworks", target_os = "redox", target_os = "android", target_os = "espidf"))] {
+            // VxWorks, Redox and ESP-IDF lack `linkat`, so use `link` instead. POSIX leaves
             // it implementation-defined whether `link` follows symlinks, so rely on the
             // `symlink_hard_link` test in library/std/src/fs/tests.rs to check the behavior.
             // Android has `linkat` on newer versions, but we happen to know `link`
@@ -1199,6 +1201,18 @@ fn open_from(from: &Path) -> io::Result<(crate::fs::File, crate::fs::Metadata)>
     Ok((reader, metadata))
 }
 
+#[cfg(target_os = "espidf")]
+fn open_to_and_set_permissions(
+    to: &Path,
+    reader_metadata: crate::fs::Metadata,
+) -> io::Result<(crate::fs::File, crate::fs::Metadata)> {
+    use crate::fs::OpenOptions;
+    let writer = OpenOptions::new().open(to)?;
+    let writer_metadata = writer.metadata()?;
+    Ok((writer, writer_metadata))
+}
+
+#[cfg(not(target_os = "espidf"))]
 fn open_to_and_set_permissions(
     to: &Path,
     reader_metadata: crate::fs::Metadata,
index f827a4bca53f0f35b85a44a4b97889e94c49b62f..f5424e3d282140abebd04d371147d56e9f4a715f 100644 (file)
@@ -5,6 +5,7 @@
 pub use self::rand::hashmap_random_keys;
 pub use libc::strlen;
 
+#[cfg(not(target_os = "espidf"))]
 #[macro_use]
 pub mod weak;
 
 pub mod thread_local_key;
 pub mod time;
 
+#[cfg(target_os = "espidf")]
+pub fn init(argc: isize, argv: *const *const u8) {}
+
+#[cfg(not(target_os = "espidf"))]
 // SAFETY: must be called only once during runtime initialization.
 // NOTE: this is not guaranteed to run, for example when Rust code is called externally.
 pub unsafe fn init(argc: isize, argv: *const *const u8) {
@@ -304,3 +309,19 @@ pub fn abort_internal() -> ! {
         extern "C" {}
     }
 }
+
+#[cfg(target_os = "espidf")]
+mod unsupported {
+    use crate::io;
+
+    pub fn unsupported<T>() -> io::Result<T> {
+        Err(unsupported_err())
+    }
+
+    pub fn unsupported_err() -> io::Error {
+        io::Error::new_const(
+            io::ErrorKind::Unsupported,
+            &"operation not supported on this platform",
+        )
+    }
+}
index 753cad55ce74546805385f7e48e9adbe3890580d..3f614fde08aca6482e0b8b1988266083f575aeb9 100644 (file)
@@ -9,7 +9,7 @@
 use crate::sys_common::{AsInner, FromInner, IntoInner};
 use crate::time::{Duration, Instant};
 
-use libc::{c_int, c_void, size_t, sockaddr, socklen_t, EAI_SYSTEM, MSG_PEEK};
+use libc::{c_int, c_void, size_t, sockaddr, socklen_t, MSG_PEEK};
 
 pub use crate::sys::{cvt, cvt_r};
 
@@ -30,13 +30,19 @@ pub fn cvt_gai(err: c_int) -> io::Result<()> {
     // We may need to trigger a glibc workaround. See on_resolver_failure() for details.
     on_resolver_failure();
 
-    if err == EAI_SYSTEM {
+    #[cfg(not(target_os = "espidf"))]
+    if err == libc::EAI_SYSTEM {
         return Err(io::Error::last_os_error());
     }
 
+    #[cfg(not(target_os = "espidf"))]
     let detail = unsafe {
         str::from_utf8(CStr::from_ptr(libc::gai_strerror(err)).to_bytes()).unwrap().to_owned()
     };
+
+    #[cfg(target_os = "espidf")]
+    let detail = "";
+
     Err(io::Error::new(
         io::ErrorKind::Uncategorized,
         &format!("failed to lookup address information: {}", detail)[..],
index bbfe846e31556d732a9ad70ee33800b894d11e2d..1d5ffb073211bcde9f40a679e2d296422bc45053 100644 (file)
@@ -128,6 +128,12 @@ pub fn error_string(errno: i32) -> String {
     }
 }
 
+#[cfg(target_os = "espidf")]
+pub fn getcwd() -> io::Result<PathBuf> {
+    Ok(PathBuf::from("/"))
+}
+
+#[cfg(not(target_os = "espidf"))]
 pub fn getcwd() -> io::Result<PathBuf> {
     let mut buf = Vec::with_capacity(512);
     loop {
@@ -154,6 +160,12 @@ pub fn getcwd() -> io::Result<PathBuf> {
     }
 }
 
+#[cfg(target_os = "espidf")]
+pub fn chdir(p: &path::Path) -> io::Result<()> {
+    super::unsupported::unsupported()
+}
+
+#[cfg(not(target_os = "espidf"))]
 pub fn chdir(p: &path::Path) -> io::Result<()> {
     let p: &OsStr = p.as_ref();
     let p = CString::new(p.as_bytes())?;
@@ -432,6 +444,11 @@ pub fn current_exe() -> io::Result<PathBuf> {
     path.canonicalize()
 }
 
+#[cfg(target_os = "espidf")]
+pub fn current_exe() -> io::Result<PathBuf> {
+    super::unsupported::unsupported()
+}
+
 pub struct Env {
     iter: vec::IntoIter<(OsString, OsString)>,
 }
@@ -541,6 +558,7 @@ pub fn unsetenv(n: &OsStr) -> io::Result<()> {
     }
 }
 
+#[cfg(not(target_os = "espidf"))]
 pub fn page_size() -> usize {
     unsafe { libc::sysconf(libc::_SC_PAGESIZE) as usize }
 }
@@ -563,7 +581,8 @@ pub fn home_dir() -> Option<PathBuf> {
         target_os = "ios",
         target_os = "emscripten",
         target_os = "redox",
-        target_os = "vxworks"
+        target_os = "vxworks",
+        target_os = "espidf"
     ))]
     unsafe fn fallback() -> Option<OsString> {
         None
@@ -573,7 +592,8 @@ unsafe fn fallback() -> Option<OsString> {
         target_os = "ios",
         target_os = "emscripten",
         target_os = "redox",
-        target_os = "vxworks"
+        target_os = "vxworks",
+        target_os = "espidf"
     )))]
     unsafe fn fallback() -> Option<OsString> {
         let amt = match libc::sysconf(libc::_SC_GETPW_R_SIZE_MAX) {
index b5a19ed54a2f25e78d1fc25dc52d4589778c5d14..0165ece849ee5034aba41becf2552fe03b61c139 100644 (file)
@@ -13,6 +13,9 @@
     } else if #[cfg(target_os = "vxworks")] {
         #[path = "process_vxworks.rs"]
         mod process_inner;
+    } else if #[cfg(target_os = "espidf")] {
+        #[path = "process_unsupported.rs"]
+        mod process_inner;
     } else {
         #[path = "process_unix.rs"]
         mod process_inner;
diff --git a/library/std/src/sys/unix/process/process_unsupported.rs b/library/std/src/sys/unix/process/process_unsupported.rs
new file mode 100644 (file)
index 0000000..7d549d0
--- /dev/null
@@ -0,0 +1,122 @@
+use crate::convert::{TryFrom, TryInto};
+use crate::fmt;
+use crate::io;
+use crate::io::ErrorKind;
+use crate::num::NonZeroI32;
+use crate::os::raw::NonZero_c_int;
+use crate::sys;
+use crate::sys::cvt;
+use crate::sys::pipe::AnonPipe;
+use crate::sys::process::process_common::*;
+use crate::sys::unix::unsupported::*;
+
+use libc::{c_int, pid_t};
+
+////////////////////////////////////////////////////////////////////////////////
+// Command
+////////////////////////////////////////////////////////////////////////////////
+
+impl Command {
+    pub fn spawn(
+        &mut self,
+        default: Stdio,
+        needs_stdin: bool,
+    ) -> io::Result<(Process, StdioPipes)> {
+        unsupported()
+    }
+
+    pub fn exec(&mut self, default: Stdio) -> io::Error {
+        unsupported_err()
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Processes
+////////////////////////////////////////////////////////////////////////////////
+
+pub struct Process {
+    handle: pid_t,
+}
+
+impl Process {
+    pub fn id(&self) -> u32 {
+        0
+    }
+
+    pub fn kill(&mut self) -> io::Result<()> {
+        unsupported()
+    }
+
+    pub fn wait(&mut self) -> io::Result<ExitStatus> {
+        unsupported()
+    }
+
+    pub fn try_wait(&mut self) -> io::Result<Option<ExitStatus>> {
+        unsupported()
+    }
+}
+
+#[derive(PartialEq, Eq, Clone, Copy, Debug)]
+pub struct ExitStatus(c_int);
+
+impl ExitStatus {
+    pub fn success(&self) -> bool {
+        self.code() == Some(0)
+    }
+
+    pub fn exit_ok(&self) -> Result<(), ExitStatusError> {
+        Err(ExitStatusError(1.try_into().unwrap()))
+    }
+
+    pub fn code(&self) -> Option<i32> {
+        None
+    }
+
+    pub fn signal(&self) -> Option<i32> {
+        None
+    }
+
+    pub fn core_dumped(&self) -> bool {
+        false
+    }
+
+    pub fn stopped_signal(&self) -> Option<i32> {
+        None
+    }
+
+    pub fn continued(&self) -> bool {
+        false
+    }
+
+    pub fn into_raw(&self) -> c_int {
+        0
+    }
+}
+
+/// Converts a raw `c_int` to a type-safe `ExitStatus` by wrapping it without copying.
+impl From<c_int> for ExitStatus {
+    fn from(a: c_int) -> ExitStatus {
+        ExitStatus(a as i32)
+    }
+}
+
+impl fmt::Display for ExitStatus {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        write!(f, "exit code: {}", self.0)
+    }
+}
+
+#[derive(PartialEq, Eq, Clone, Copy, Debug)]
+pub struct ExitStatusError(NonZero_c_int);
+
+impl Into<ExitStatus> for ExitStatusError {
+    fn into(self) -> ExitStatus {
+        ExitStatus(self.0.into())
+    }
+}
+
+impl ExitStatusError {
+    pub fn code(self) -> Option<NonZeroI32> {
+        ExitStatus(self.0.into()).code().map(|st| st.try_into().unwrap())
+    }
+}
index 32895001a65bae83dd119e5735dced1dd55c084e..7a3f6b0d95a09aace1cdba7529287315eeb6655a 100644 (file)
@@ -44,12 +44,17 @@ fn getrandom(
         unsafe { getrandom(buf.as_mut_ptr().cast(), buf.len(), libc::GRND_NONBLOCK) }
     }
 
-    #[cfg(not(any(target_os = "linux", target_os = "android")))]
+    #[cfg(target_os = "espidf")]
+    fn getrandom(buf: &mut [u8]) -> libc::ssize_t {
+        unsafe { libc::getrandom(buf.as_mut_ptr().cast(), buf.len(), 0) }
+    }
+
+    #[cfg(not(any(target_os = "linux", target_os = "android", target_os = "espidf")))]
     fn getrandom_fill_bytes(_buf: &mut [u8]) -> bool {
         false
     }
 
-    #[cfg(any(target_os = "linux", target_os = "android"))]
+    #[cfg(any(target_os = "linux", target_os = "android", target_os = "espidf"))]
     fn getrandom_fill_bytes(v: &mut [u8]) -> bool {
         use crate::sync::atomic::{AtomicBool, Ordering};
         use crate::sys::os::errno;
index bc61f472a2b0501fcbda5f5e4c01a3a61ed58fee..133ad3ea420b83b6bceb81d63020619154eb42d5 100644 (file)
@@ -9,12 +9,14 @@
 
 #[cfg(any(target_os = "linux", target_os = "solaris", target_os = "illumos"))]
 use crate::sys::weak::weak;
-#[cfg(not(any(target_os = "l4re", target_os = "vxworks")))]
+#[cfg(not(any(target_os = "l4re", target_os = "vxworks", target_os = "espidf")))]
 pub const DEFAULT_MIN_STACK_SIZE: usize = 2 * 1024 * 1024;
 #[cfg(target_os = "l4re")]
 pub const DEFAULT_MIN_STACK_SIZE: usize = 1024 * 1024;
 #[cfg(target_os = "vxworks")]
 pub const DEFAULT_MIN_STACK_SIZE: usize = 256 * 1024;
+#[cfg(target_os = "espidf")]
+pub const DEFAULT_MIN_STACK_SIZE: usize = 0; // 0 indicates that the stack size configured in the ESP-IDF menuconfig system should be used
 
 #[cfg(target_os = "fuchsia")]
 mod zircon {
@@ -50,22 +52,35 @@ pub unsafe fn new(stack: usize, p: Box<dyn FnOnce()>) -> io::Result<Thread> {
         let mut attr: libc::pthread_attr_t = mem::zeroed();
         assert_eq!(libc::pthread_attr_init(&mut attr), 0);
 
-        let stack_size = cmp::max(stack, min_stack_size(&attr));
-
-        match libc::pthread_attr_setstacksize(&mut attr, stack_size) {
-            0 => {}
-            n => {
-                assert_eq!(n, libc::EINVAL);
-                // EINVAL means |stack_size| is either too small or not a
-                // multiple of the system page size.  Because it's definitely
-                // >= PTHREAD_STACK_MIN, it must be an alignment issue.
-                // Round up to the nearest page and try again.
-                let page_size = os::page_size();
-                let stack_size =
-                    (stack_size + page_size - 1) & (-(page_size as isize - 1) as usize - 1);
-                assert_eq!(libc::pthread_attr_setstacksize(&mut attr, stack_size), 0);
-            }
-        };
+        #[cfg(target_os = "espidf")]
+        if stack > 0 {
+            // Only set the stack if a non-zero value is passed
+            // 0 is used as an indication that the default stack size configured in the ESP-IDF menuconfig system should be used
+            assert_eq!(
+                libc::pthread_attr_setstacksize(&mut attr, cmp::max(stack, min_stack_size(&attr))),
+                0
+            );
+        }
+
+        #[cfg(not(target_os = "espidf"))]
+        {
+            let stack_size = cmp::max(stack, min_stack_size(&attr));
+
+            match libc::pthread_attr_setstacksize(&mut attr, stack_size) {
+                0 => {}
+                n => {
+                    assert_eq!(n, libc::EINVAL);
+                    // EINVAL means |stack_size| is either too small or not a
+                    // multiple of the system page size.  Because it's definitely
+                    // >= PTHREAD_STACK_MIN, it must be an alignment issue.
+                    // Round up to the nearest page and try again.
+                    let page_size = os::page_size();
+                    let stack_size =
+                        (stack_size + page_size - 1) & (-(page_size as isize - 1) as usize - 1);
+                    assert_eq!(libc::pthread_attr_setstacksize(&mut attr, stack_size), 0);
+                }
+            };
+        }
 
         let ret = libc::pthread_create(&mut native, &attr, thread_start, p as *mut _);
         // Note: if the thread creation fails and this assert fails, then p will
@@ -183,6 +198,7 @@ pub fn set_name(_name: &CStr) {
         // Newlib, Emscripten, and VxWorks have no way to set a thread name.
     }
 
+    #[cfg(not(target_os = "espidf"))]
     pub fn sleep(dur: Duration) {
         let mut secs = dur.as_secs();
         let mut nsecs = dur.subsec_nanos() as _;
@@ -208,6 +224,19 @@ pub fn sleep(dur: Duration) {
         }
     }
 
+    #[cfg(target_os = "espidf")]
+    pub fn sleep(dur: Duration) {
+        let mut micros = dur.as_micros();
+        unsafe {
+            while micros > 0 {
+                let st = if micros > u32::MAX as u128 { u32::MAX } else { micros as u32 };
+                libc::usleep(st);
+
+                micros -= st as u128;
+            }
+        }
+    }
+
     pub fn join(self) {
         unsafe {
             let ret = libc::pthread_join(self.id, ptr::null_mut());
index 23a5c81c0053bb4abdf8b2cc2c4f520dcc035b0c..7dc09add27fd717c7487bd2af781a4c9dc1f7131 100644 (file)
@@ -361,9 +361,9 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         }
     }
 
-    #[cfg(not(target_os = "dragonfly"))]
+    #[cfg(not(any(target_os = "dragonfly", target_os = "espidf")))]
     pub type clock_t = libc::c_int;
-    #[cfg(target_os = "dragonfly")]
+    #[cfg(any(target_os = "dragonfly", target_os = "espidf"))]
     pub type clock_t = libc::c_ulong;
 
     fn now(clock: clock_t) -> Timespec {
index 0fdf72c8067d25abf66ddc39df771fb5bcf9f37d..ae193b82e91bb4ce67631babc0ff1c67a6f2e583 100644 (file)
@@ -3,7 +3,6 @@
 #[cfg(test)]
 mod tests;
 
-use crate::borrow::Borrow;
 use crate::cmp;
 use crate::collections::BTreeMap;
 use crate::convert::{TryFrom, TryInto};
@@ -46,6 +45,12 @@ pub struct EnvKey {
     utf16: Vec<u16>,
 }
 
+impl EnvKey {
+    fn new<T: Into<OsString>>(key: T) -> Self {
+        EnvKey::from(key.into())
+    }
+}
+
 // Comparing Windows environment variable keys[1] are behaviourally the
 // composition of two operations[2]:
 //
@@ -100,6 +105,20 @@ fn eq(&self, other: &Self) -> bool {
         }
     }
 }
+impl PartialOrd<str> for EnvKey {
+    fn partial_cmp(&self, other: &str) -> Option<cmp::Ordering> {
+        Some(self.cmp(&EnvKey::new(other)))
+    }
+}
+impl PartialEq<str> for EnvKey {
+    fn eq(&self, other: &str) -> bool {
+        if self.os_string.len() != other.len() {
+            false
+        } else {
+            self.cmp(&EnvKey::new(other)) == cmp::Ordering::Equal
+        }
+    }
+}
 
 // Environment variable keys should preserve their original case even though
 // they are compared using a caseless string mapping.
@@ -115,9 +134,9 @@ fn from(k: EnvKey) -> Self {
     }
 }
 
-impl Borrow<OsStr> for EnvKey {
-    fn borrow(&self) -> &OsStr {
-        &self.os_string
+impl From<&OsStr> for EnvKey {
+    fn from(k: &OsStr) -> Self {
+        Self::from(k.to_os_string())
     }
 }
 
@@ -242,7 +261,7 @@ pub fn spawn(
         // to read the *child's* PATH if one is provided. See #15149 for more
         // details.
         let program = maybe_env.as_ref().and_then(|env| {
-            if let Some(v) = env.get(OsStr::new("PATH")) {
+            if let Some(v) = env.get(&EnvKey::new("PATH")) {
                 // Split the value and test each path to see if the
                 // program exists.
                 for path in split_paths(&v) {
index 7c1d98a5abd599bb6b0460c6942ebaebd94175d4..ea9108f17133af8491544944727c7fc2a4f46a72 100644 (file)
@@ -1,4 +1,6 @@
-pub const DEFAULT_BUF_SIZE: usize = 8 * 1024;
+// Bare metal platforms usually have very small amounts of RAM
+// (in the order of hundreds of KB)
+pub const DEFAULT_BUF_SIZE: usize = if cfg!(target_os = "espidf") { 512 } else { 8 * 1024 };
 
 #[cfg(test)]
 #[allow(dead_code)] // not used on emscripten
index fe89b11043c0ff879703925a2f4307030f157971..38007d5c414ecd42bd97456334005c4231756bd9 100644 (file)
@@ -65,16 +65,18 @@ pub fn capture_if_changed(&self) -> Option<BTreeMap<EnvKey, OsString>> {
 
     // The following functions build up changes
     pub fn set(&mut self, key: &OsStr, value: &OsStr) {
+        let key = EnvKey::from(key);
         self.maybe_saw_path(&key);
-        self.vars.insert(key.to_owned().into(), Some(value.to_owned()));
+        self.vars.insert(key, Some(value.to_owned()));
     }
 
     pub fn remove(&mut self, key: &OsStr) {
+        let key = EnvKey::from(key);
         self.maybe_saw_path(&key);
         if self.clear {
-            self.vars.remove(key);
+            self.vars.remove(&key);
         } else {
-            self.vars.insert(key.to_owned().into(), None);
+            self.vars.insert(key, None);
         }
     }
 
@@ -87,7 +89,7 @@ pub fn have_changed_path(&self) -> bool {
         self.saw_path || self.clear
     }
 
-    fn maybe_saw_path(&mut self, key: &OsStr) {
+    fn maybe_saw_path(&mut self, key: &EnvKey) {
         if !self.saw_path && key == "PATH" {
             self.saw_path = true;
         }
index 36e1d502019b72139f12c5d496a117495025e5f0..f44df845bf4dd56fc2b25a8fdcede67796195647 100644 (file)
@@ -28,7 +28,7 @@
 //! When the main thread of a Rust program terminates, the entire program shuts
 //! down, even if other threads are still running. However, this module provides
 //! convenient facilities for automatically waiting for the termination of a
-//! child thread (i.e., join).
+//! thread (i.e., join).
 //!
 //! ## Spawning a thread
 //!
 //! });
 //! ```
 //!
-//! In this example, the spawned thread is "detached" from the current
-//! thread. This means that it can outlive its parent (the thread that spawned
-//! it), unless this parent is the main thread.
+//! In this example, the spawned thread is "detached," which means that there is
+//! no way for the program to learn when the spawned thread completes or otherwise
+//! terminates.
 //!
-//! The parent thread can also wait on the completion of the child
-//! thread; a call to [`spawn`] produces a [`JoinHandle`], which provides
-//! a `join` method for waiting:
+//! To learn when a thread completes, it is necessary to capture the [`JoinHandle`]
+//! object that is returned by the call to [`spawn`], which provides
+//! a `join` method that allows the caller to wait for the completion of the
+//! spawned thread:
 //!
 //! ```rust
 //! use std::thread;
 //!
-//! let child = thread::spawn(move || {
+//! let thread_join_handle = thread::spawn(move || {
 //!     // some work here
 //! });
 //! // some work here
-//! let res = child.join();
+//! let res = thread_join_handle.join();
 //! ```
 //!
 //! The [`join`] method returns a [`thread::Result`] containing [`Ok`] of the final
-//! value produced by the child thread, or [`Err`] of the value given to
-//! a call to [`panic!`] if the child panicked.
+//! value produced by the spawned thread, or [`Err`] of the value given to
+//! a call to [`panic!`] if the thread panicked.
+//!
+//! Note that there is no parent/child relationship between a thread that spawns a
+//! new thread and the thread being spawned.  In particular, the spawned thread may or
+//! may not outlive the spawning thread, unless the spawning thread is the main thread.
 //!
 //! ## Configuring threads
 //!
 //! A new thread can be configured before it is spawned via the [`Builder`] type,
-//! which currently allows you to set the name and stack size for the child thread:
+//! which currently allows you to set the name and stack size for the thread:
 //!
 //! ```rust
 //! # #![allow(unused_must_use)]
 //! use std::thread;
 //!
-//! thread::Builder::new().name("child1".to_string()).spawn(move || {
+//! thread::Builder::new().name("thread1".to_string()).spawn(move || {
 //!     println!("Hello, world!");
 //! });
 //! ```
@@ -344,7 +349,7 @@ pub fn stack_size(mut self, size: usize) -> Builder {
     /// The spawned thread may outlive the caller (unless the caller thread
     /// is the main thread; the whole process is terminated when the main
     /// thread finishes). The join handle can be used to block on
-    /// termination of the child thread, including recovering its panics.
+    /// termination of the spawned thread, including recovering its panics.
     ///
     /// For a more complete documentation see [`thread::spawn`][`spawn`].
     ///
@@ -389,7 +394,7 @@ pub fn spawn<F, T>(self, f: F) -> io::Result<JoinHandle<T>>
     /// The spawned thread may outlive the caller (unless the caller thread
     /// is the main thread; the whole process is terminated when the main
     /// thread finishes). The join handle can be used to block on
-    /// termination of the child thread, including recovering its panics.
+    /// termination of the spawned thread, including recovering its panics.
     ///
     /// This method is identical to [`thread::Builder::spawn`][`Builder::spawn`],
     /// except for the relaxed lifetime bounds, which render it unsafe.
@@ -516,15 +521,16 @@ pub unsafe fn spawn_unchecked<'a, F, T>(self, f: F) -> io::Result<JoinHandle<T>>
 
 /// Spawns a new thread, returning a [`JoinHandle`] for it.
 ///
-/// The join handle will implicitly *detach* the child thread upon being
-/// dropped. In this case, the child thread may outlive the parent (unless
-/// the parent thread is the main thread; the whole process is terminated when
-/// the main thread finishes). Additionally, the join handle provides a [`join`]
-/// method that can be used to join the child thread. If the child thread
-/// panics, [`join`] will return an [`Err`] containing the argument given to
-/// [`panic!`].
+/// The join handle provides a [`join`] method that can be used to join the spawned
+/// thread. If the spawned thread panics, [`join`] will return an [`Err`] containing
+/// the argument given to [`panic!`].
+///
+/// If the join handle is dropped, the spawned thread will implicitly be *detached*.
+/// In this case, the spawned thread may no longer be joined.
+/// (It is the responsibility of the program to either eventually join threads it
+/// creates or detach them; otherwise, a resource leak will result.)
 ///
-/// This will create a thread using default parameters of [`Builder`], if you
+/// This call will create a thread using default parameters of [`Builder`], if you
 /// want to specify the stack size or the name of the thread, use this API
 /// instead.
 ///
@@ -533,8 +539,8 @@ pub unsafe fn spawn_unchecked<'a, F, T>(self, f: F) -> io::Result<JoinHandle<T>>
 ///
 /// - The `'static` constraint means that the closure and its return value
 ///   must have a lifetime of the whole program execution. The reason for this
-///   is that threads can `detach` and outlive the lifetime they have been
-///   created in.
+///   is that threads can outlive the lifetime they have been created in.
+///
 ///   Indeed if the thread, and by extension its return value, can outlive their
 ///   caller, we need to make sure that they will be valid afterwards, and since
 ///   we *can't* know when it will return we need to have them valid as long as
@@ -1236,10 +1242,10 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
 #[stable(feature = "rust1", since = "1.0.0")]
 pub type Result<T> = crate::result::Result<T, Box<dyn Any + Send + 'static>>;
 
-// This packet is used to communicate the return value between the child thread
-// and the parent thread. Memory is shared through the `Arc` within and there's
+// This packet is used to communicate the return value between the spawned thread
+// and the rest of the program. Memory is shared through the `Arc` within and there's
 // no need for a mutex here because synchronization happens with `join()` (the
-// parent thread never reads this packet until the child has exited).
+// caller will never read this packet until the thread has exited).
 //
 // This packet itself is then stored into a `JoinInner` which in turns is placed
 // in `JoinHandle` and `JoinGuard`. Due to the usage of `UnsafeCell` we need to
@@ -1303,7 +1309,7 @@ fn join(&mut self) -> Result<T> {
 /// }).unwrap();
 /// ```
 ///
-/// Child being detached and outliving its parent:
+/// A thread being detached and outliving the thread that spawned it:
 ///
 /// ```no_run
 /// use std::thread;
@@ -1361,12 +1367,15 @@ pub fn thread(&self) -> &Thread {
 
     /// Waits for the associated thread to finish.
     ///
+    /// This function will return immediately if the associated thread has already finished.
+    ///
     /// In terms of [atomic memory orderings],  the completion of the associated
     /// thread synchronizes with this function returning. In other words, all
-    /// operations performed by that thread are ordered before all
+    /// operations performed by that thread [happen
+    /// before](https://doc.rust-lang.org/nomicon/atomics.html#data-accesses) all
     /// operations that happen after `join` returns.
     ///
-    /// If the child thread panics, [`Err`] is returned with the parameter given
+    /// If the associated thread panics, [`Err`] is returned with the parameter given
     /// to [`panic!`].
     ///
     /// [`Err`]: crate::result::Result::Err
index 9e52802450682137789e05161593441cad620451..53b13b9043b3a2e9fef7fe26e318e2f8a83303e4 100644 (file)
@@ -13,6 +13,7 @@
     } else if #[cfg(any(
         target_os = "l4re",
         target_os = "none",
+        target_os = "espidf",
     ))] {
         // These "unix" family members do not have unwinder.
         // Note this also matches x86_64-unknown-none-linuxkernel.
index a07036f864b37896b31eb996cd7aedb489f69a1f..7e49659102f0977d9142190e1ba23345c0f00eb1 160000 (submodule)
@@ -1 +1 @@
-Subproject commit a07036f864b37896b31eb996cd7aedb489f69a1f
+Subproject commit 7e49659102f0977d9142190e1ba23345c0f00eb1
index 09986cd352404eb4659db44613b27cac9aa652fc..4f9fcaa30d11ba52b641e6fd5206536d65838af9 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 09986cd352404eb4659db44613b27cac9aa652fc
+Subproject commit 4f9fcaa30d11ba52b641e6fd5206536d65838af9
index f51734eb5566c826b471977747ea3d7d6915bbe9..0c7e5bd1428e7838252bb57b7f0fbfda4ec82f02 160000 (submodule)
@@ -1 +1 @@
-Subproject commit f51734eb5566c826b471977747ea3d7d6915bbe9
+Subproject commit 0c7e5bd1428e7838252bb57b7f0fbfda4ec82f02
index 3b7be075af5d6e402a18efff672a8a265b4596fd..4884fe45c14f8b22121760fb117181bb4da8dfe0 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 3b7be075af5d6e402a18efff672a8a265b4596fd
+Subproject commit 4884fe45c14f8b22121760fb117181bb4da8dfe0
index 09343d6f921d2a07c66f8c41ec3d65bf1fa52556..c4644b427cbdaafc7a87be0ccdf5d8aaa07ac35f 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 09343d6f921d2a07c66f8c41ec3d65bf1fa52556
+Subproject commit c4644b427cbdaafc7a87be0ccdf5d8aaa07ac35f
index b5d20a6a4cd8119e7f054c3ba90f7e716d65ea61..0bfe35ea861899ae80009c4250775f30a05c46ca 100644 (file)
@@ -115,6 +115,7 @@ The `std` column in the table below has the following meanings:
 target | std | notes
 -------|:---:|-------
 `aarch64-apple-ios` | ✓ | ARM64 iOS
+[`aarch64-apple-ios-sim`](platform-support/aarch64-apple-ios-sim.md) | ✓ | Apple iOS Simulator on ARM64
 `aarch64-fuchsia` | ✓ | ARM64 Fuchsia
 `aarch64-linux-android` | ✓ | ARM64 Android
 `aarch64-unknown-none-softfloat` | * | Bare ARM64, softfloat
@@ -165,7 +166,6 @@ target | std | notes
 `wasm32-unknown-unknown` | ✓ | WebAssembly
 `wasm32-wasi` | ✓ | WebAssembly with WASI
 `x86_64-apple-ios` | ✓ | 64-bit x86 iOS
-[`aarch64-apple-ios-sim`](platform-support/aarch64-apple-ios-sim.md) | ✓ |  | Apple iOS Simulator on ARM64
 `x86_64-fortanix-unknown-sgx` | ✓ | [Fortanix ABI] for 64-bit Intel SGX
 `x86_64-fuchsia` | ✓ | 64-bit Fuchsia
 `x86_64-linux-android` | ✓ | 64-bit x86 Android
@@ -256,6 +256,7 @@ target | std | host | notes
 `powerpc64le-unknown-linux-musl` | ? |  |
 `riscv32gc-unknown-linux-gnu` |   |   | RISC-V Linux (kernel 5.4, glibc 2.33)
 `riscv32gc-unknown-linux-musl` |   |   | RISC-V Linux (kernel 5.4, musl + RISCV32 support patches)
+`riscv32imc-esp-espidf` | ✓ |  | RISC-V ESP-IDF
 `riscv64gc-unknown-linux-musl` |   |   | RISC-V Linux (kernel 4.20, musl 1.2.0)
 `s390x-unknown-linux-musl` |  |  | S390x Linux (kernel 2.6.32, MUSL)
 `sparc-unknown-linux-gnu` | ✓ |  | 32-bit SPARC Linux
index cb7b85655b5a8fe86b62c32900ec4fdb155e1109..70900a0bab942fa514533aec0fc3f884c8ab89e2 100644 (file)
@@ -297,9 +297,14 @@ we can add the `#[macro_use]` attribute. Second, we’ll need to add our own
 
 ## Attributes
 
-There are a few annotations that are useful to help `rustdoc` do the right
+Code blocks can be annotated with attributes that help `rustdoc` do the right
 thing when testing your code:
 
+The `ignore` attribute tells Rust to ignore your code. This is almost never
+what you want as it's the most generic. Instead, consider annotating it
+with `text` if it's not code or using `#`s to get a working example that
+only shows the part you care about.
+
 ```rust
 /// ```ignore
 /// fn foo() {
@@ -307,10 +312,8 @@ thing when testing your code:
 # fn foo() {}
 ```
 
-The `ignore` directive tells Rust to ignore your code. This is almost never
-what you want, as it's the most generic. Instead, consider annotating it
-with `text` if it's not code, or using `#`s to get a working example that
-only shows the part you care about.
+`should_panic` tells `rustdoc` that the code should compile correctly but
+panic during execution. If the code doesn't panic, the test will fail.
 
 ```rust
 /// ```should_panic
@@ -319,8 +322,10 @@ only shows the part you care about.
 # fn foo() {}
 ```
 
-`should_panic` tells `rustdoc` that the code should compile correctly, but
-not actually pass as a test.
+The `no_run` attribute will compile your code but not run it. This is
+important for examples such as "Here's how to retrieve a web page,"
+which you would want to ensure compiles, but might be run in a test
+environment that has no network access.
 
 ```rust
 /// ```no_run
@@ -331,24 +336,24 @@ not actually pass as a test.
 # fn foo() {}
 ```
 
-The `no_run` attribute will compile your code, but not run it. This is
-important for examples such as "Here's how to retrieve a web page,"
-which you would want to ensure compiles, but might be run in a test
-environment that has no network access.
+`compile_fail` tells `rustdoc` that the compilation should fail. If it
+compiles, then the test will fail. However, please note that code failing
+with the current Rust release may work in a future release, as new features
+are added.
 
-```text
+```rust
 /// ```compile_fail
 /// let x = 5;
 /// x += 2; // shouldn't compile!
 /// ```
+# fn foo() {}
 ```
 
-`compile_fail` tells `rustdoc` that the compilation should fail. If it
-compiles, then the test will fail. However please note that code failing
-with the current Rust release may work in a future release, as new features
-are added.
+`edition2018` tells `rustdoc` that the code sample should be compiled using
+the 2018 edition of Rust. Similarly, you can specify `edition2015` to compile
+the code with the 2015 edition.
 
-```text
+```rust
 /// Only runs on the 2018 edition.
 ///
 /// ```edition2018
@@ -358,12 +363,9 @@ are added.
 ///         + "3".parse::<i32>()?
 /// };
 /// ```
+# fn foo() {}
 ```
 
-`edition2018` tells `rustdoc` that the code sample should be compiled using
-the 2018 edition of Rust. Similarly, you can specify `edition2015` to compile
-the code with the 2015 edition.
-
 ## Syntax reference
 
 The *exact* syntax for code blocks, including the edge cases, can be found
@@ -385,7 +387,7 @@ section.
 
 However, it's preferable to use fenced code blocks over indented code blocks.
 Not only are fenced code blocks considered more idiomatic for Rust code,
-but there is no way to use directives such as `ignore` or `should_panic` with
+but there is no way to use attributes such as `ignore` or `should_panic` with
 indented code blocks.
 
 ### Include items only when collecting doctests
diff --git a/src/doc/unstable-book/src/language-features/plugin-registrar.md b/src/doc/unstable-book/src/language-features/plugin-registrar.md
deleted file mode 100644 (file)
index bf5dd81..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# `plugin_registrar`
-
-The tracking issue for this feature is: [#29597]
-
-[#29597]: https://github.com/rust-lang/rust/issues/29597
-
-This feature is part of "compiler plugins." It will often be used with the
-[`plugin`] and `rustc_private` features as well. For more details, see
-their docs.
-
-[`plugin`]: plugin.md
-
-------------------------
index 44308bdfba6c325b964afaaed8afeac12045557a..040f46f8b7c771160f9cc91df0e3fb12a922b166 100644 (file)
@@ -6,9 +6,7 @@ The tracking issue for this feature is: [#29597]
 
 
 This feature is part of "compiler plugins." It will often be used with the
-[`plugin_registrar`] and `rustc_private` features.
-
-[`plugin_registrar`]: plugin-registrar.md
+`rustc_private` feature.
 
 ------------------------
 
@@ -39,7 +37,6 @@ additional checks for code style, safety, etc. Now let's write a plugin
 that warns about any item named `lintme`.
 
 ```rust,ignore (requires-stage-2)
-#![feature(plugin_registrar)]
 #![feature(box_syntax, rustc_private)]
 
 extern crate rustc_ast;
@@ -68,8 +65,8 @@ impl EarlyLintPass for Pass {
     }
 }
 
-#[plugin_registrar]
-pub fn plugin_registrar(reg: &mut Registry) {
+#[no_mangle]
+fn __rustc_plugin_registrar(reg: &mut Registry) {
     reg.lint_store.register_lints(&[&TEST_LINT]);
     reg.lint_store.register_early_pass(|| box Pass);
 }
old mode 100644 (file)
new mode 100755 (executable)
index 849924ea5501e1d92f85bbc8be650907a4e11fbb..8dd7b2b3edc4015008e96b92a9db6063cde5cc29 100644 (file)
@@ -37,7 +37,7 @@ h4 {
 .docblock code {
        color: #ffb454;
 }
-h3 > code, h4 > code, h5 > code {
+.code-header {
        color: #e6e1cf;
 }
 pre > code {
index 0f2cf5a761678efec8c1b45140826dd73e689dac..441cd04690e7011df1beed33398e7c115a7b927f 100644 (file)
@@ -8,7 +8,7 @@ pub enum Align64 {
     A(u32),
     B(u32),
 }
-// CHECK: %Align64 = type { [0 x i32], i32, [15 x i32] }
+// CHECK: %Align64 = type { i32, [15 x i32] }
 
 pub struct Nested64 {
     a: u8,
index 82eec67af0fac24a8d49850cb22741caf92bde8f..acc5a2d5499ffb7158ce5691f43578cacf71e01c 100644 (file)
@@ -5,7 +5,7 @@
 
 #[repr(align(64))]
 pub struct Align64(i32);
-// CHECK: %Align64 = type { [0 x i32], i32, [15 x i32] }
+// CHECK: %Align64 = type { i32, [15 x i32] }
 
 pub struct Nested64 {
     a: Align64,
@@ -13,20 +13,20 @@ pub struct Nested64 {
     c: i32,
     d: i8,
 }
-// CHECK: %Nested64 = type { [0 x i64], %Align64, [0 x i32], i32, [0 x i32], i32, [0 x i8], i8, [55 x i8] }
+// CHECK: %Nested64 = type { %Align64, i32, i32, i8, [55 x i8] }
 
 pub enum Enum4 {
     A(i32),
     B(i32),
 }
-// CHECK: %"Enum4::A" = type { [1 x i32], i32, [0 x i32] }
+// CHECK: %"Enum4::A" = type { [1 x i32], i32 }
 
 pub enum Enum64 {
     A(Align64),
     B(i32),
 }
-// CHECK: %Enum64 = type { [0 x i32], i32, [31 x i32] }
-// CHECK: %"Enum64::A" = type { [8 x i64], %Align64, [0 x i64] }
+// CHECK: %Enum64 = type { i32, [31 x i32] }
+// CHECK: %"Enum64::A" = type { [8 x i64], %Align64 }
 
 // CHECK-LABEL: @align64
 #[no_mangle]
diff --git a/src/test/codegen/unpadded-simd.rs b/src/test/codegen/unpadded-simd.rs
new file mode 100644 (file)
index 0000000..eb44dbd
--- /dev/null
@@ -0,0 +1,14 @@
+// Make sure that no 0-sized padding is inserted in structs and that
+// structs are represented as expected by Neon intrinsics in LLVM.
+// See #87254.
+
+#![crate_type = "lib"]
+#![feature(repr_simd)]
+
+#[derive(Copy, Clone, Debug)]
+#[repr(simd)]
+pub struct int16x4_t(pub i16, pub i16, pub i16, pub i16);
+
+#[derive(Copy, Clone, Debug)]
+pub struct int16x4x2_t(pub int16x4_t, pub int16x4_t);
+// CHECK: %int16x4x2_t = type { <4 x i16>, <4 x i16> }
index 991dc6eec1d200003349c758eae2f07fd0b9c5d5..aa39d26feed1e3072d7cff06374264ce2c8660f1 100644 (file)
@@ -10,7 +10,7 @@ LL |         This(E),
 help: insert some indirection (e.g., a `DEF_ID` representable
    |
 LL |         This(Box<E>),
-   |              ^^^^ ^
+   |              ++++ +
 
 error: aborting due to previous error
 
index ec1bb786fe5adcaf46461055161cba3cfbdde2e1..009bedec5ed6a99825b996ed0f019daeaa688c18 100644 (file)
@@ -10,7 +10,7 @@ LL |         V(E),
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `f::E` representable
    |
 LL |         V(Box<E>),
-   |           ^^^^ ^
+   |           ++++ +
 
 error: aborting due to previous error
 
index 897445f200cb701d57d6a70e45454e1aa09179b8..b33aba446223c06daa9ec5ebd9749c4d9e7423ab 100644 (file)
@@ -10,7 +10,7 @@ LL |     V(E),
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `E` representable
    |
 LL |     V(Box<E>),
-   |       ^^^^ ^
+   |       ++++ +
 
 error: aborting due to previous error
 
index e87c26e9cc5b0d69921a825e56e83ab49d7a0a8c..7974796e47b172c56f46cf6db4efbdd10d6f7b0a 100644 (file)
@@ -12,11 +12,11 @@ LL | #![deny(rustdoc::broken_intra_doc_links)]
 help: to link to the module, prefix with `mod@`
    |
 LL | /// [mod@true]
-   |      ^^^^
+   |      ++++
 help: to link to the builtin type, prefix with `prim@`
    |
 LL | /// [prim@true]
-   |      ^^^^^
+   |      +++++
 
 error: `ambiguous` is both a struct and a function
   --> $DIR/ambiguity.rs:27:7
@@ -27,11 +27,11 @@ LL | /// [`ambiguous`] is ambiguous.
 help: to link to the struct, prefix with `struct@`
    |
 LL | /// [`struct@ambiguous`] is ambiguous.
-   |       ^^^^^^^
+   |       +++++++
 help: to link to the function, add parentheses
    |
 LL | /// [`ambiguous()`] is ambiguous.
-   |                ^^
+   |                ++
 
 error: `ambiguous` is both a struct and a function
   --> $DIR/ambiguity.rs:29:6
@@ -42,11 +42,11 @@ LL | /// [ambiguous] is ambiguous.
 help: to link to the struct, prefix with `struct@`
    |
 LL | /// [struct@ambiguous] is ambiguous.
-   |      ^^^^^^^
+   |      +++++++
 help: to link to the function, add parentheses
    |
 LL | /// [ambiguous()] is ambiguous.
-   |               ^^
+   |               ++
 
 error: `multi_conflict` is a struct, a function, and a macro
   --> $DIR/ambiguity.rs:31:7
@@ -57,15 +57,15 @@ LL | /// [`multi_conflict`] is a three-way conflict.
 help: to link to the struct, prefix with `struct@`
    |
 LL | /// [`struct@multi_conflict`] is a three-way conflict.
-   |       ^^^^^^^
+   |       +++++++
 help: to link to the function, add parentheses
    |
 LL | /// [`multi_conflict()`] is a three-way conflict.
-   |                     ^^
+   |                     ++
 help: to link to the macro, add an exclamation mark
    |
 LL | /// [`multi_conflict!`] is a three-way conflict.
-   |                     ^
+   |                     +
 
 error: `type_and_value` is both a module and a constant
   --> $DIR/ambiguity.rs:33:16
@@ -76,11 +76,11 @@ LL | /// Ambiguous [type_and_value].
 help: to link to the module, prefix with `mod@`
    |
 LL | /// Ambiguous [mod@type_and_value].
-   |                ^^^^
+   |                ++++
 help: to link to the constant, prefix with `const@`
    |
 LL | /// Ambiguous [const@type_and_value].
-   |                ^^^^^^
+   |                ++++++
 
 error: `foo::bar` is both an enum and a function
   --> $DIR/ambiguity.rs:35:43
@@ -91,11 +91,11 @@ LL | /// Ambiguous non-implied shortcut link [`foo::bar`].
 help: to link to the enum, prefix with `enum@`
    |
 LL | /// Ambiguous non-implied shortcut link [`enum@foo::bar`].
-   |                                           ^^^^^
+   |                                           +++++
 help: to link to the function, add parentheses
    |
 LL | /// Ambiguous non-implied shortcut link [`foo::bar()`].
-   |                                                   ^^
+   |                                                   ++
 
 error: aborting due to 6 previous errors
 
index 8d1519516ee76d7833d8de96c1b82f565239c8c4..12122f5fa867431a9bb51a863eedd37ee689bd3b 100644 (file)
@@ -12,7 +12,7 @@ LL | #![deny(rustdoc::broken_intra_doc_links)]
 help: to link to the enum, prefix with `enum@`
    |
 LL | /// Link to [enum@S]
-   |              ^^^^^
+   |              ~~~~~
 
 error: incompatible link kind for `S`
   --> $DIR/disambiguator-mismatch.rs:21:14
@@ -23,7 +23,7 @@ LL | /// Link to [mod@S]
 help: to link to the enum, prefix with `enum@`
    |
 LL | /// Link to [enum@S]
-   |              ^^^^^
+   |              ~~~~~
 
 error: incompatible link kind for `S`
   --> $DIR/disambiguator-mismatch.rs:26:14
@@ -34,7 +34,7 @@ LL | /// Link to [union@S]
 help: to link to the enum, prefix with `enum@`
    |
 LL | /// Link to [enum@S]
-   |              ^^^^^
+   |              ~~~~~
 
 error: incompatible link kind for `S`
   --> $DIR/disambiguator-mismatch.rs:31:14
@@ -45,7 +45,7 @@ LL | /// Link to [trait@S]
 help: to link to the enum, prefix with `enum@`
    |
 LL | /// Link to [enum@S]
-   |              ^^^^^
+   |              ~~~~~
 
 error: incompatible link kind for `T`
   --> $DIR/disambiguator-mismatch.rs:36:14
@@ -56,7 +56,7 @@ LL | /// Link to [struct@T]
 help: to link to the trait, prefix with `trait@`
    |
 LL | /// Link to [trait@T]
-   |              ^^^^^^
+   |              ~~~~~~
 
 error: incompatible link kind for `m`
   --> $DIR/disambiguator-mismatch.rs:41:14
@@ -66,8 +66,9 @@ LL | /// Link to [derive@m]
    |
 help: to link to the macro, add an exclamation mark
    |
-LL | /// Link to [m!]
-   |             --^
+LL - /// Link to [derive@m]
+LL + /// Link to [m!]
+   | 
 
 error: unresolved link to `m`
   --> $DIR/disambiguator-mismatch.rs:46:14
@@ -78,7 +79,7 @@ LL | /// Link to [m()]
 help: to link to the macro, add an exclamation mark
    |
 LL | /// Link to [m!()]
-   |               ^
+   |               +
 
 error: incompatible link kind for `s`
   --> $DIR/disambiguator-mismatch.rs:52:14
@@ -89,7 +90,7 @@ LL | /// Link to [const@s]
 help: to link to the static, prefix with `static@`
    |
 LL | /// Link to [static@s]
-   |              ^^^^^^^
+   |              ~~~~~~~
 
 error: incompatible link kind for `c`
   --> $DIR/disambiguator-mismatch.rs:57:14
@@ -100,7 +101,7 @@ LL | /// Link to [static@c]
 help: to link to the constant, prefix with `const@`
    |
 LL | /// Link to [const@c]
-   |              ^^^^^^
+   |              ~~~~~~
 
 error: incompatible link kind for `c`
   --> $DIR/disambiguator-mismatch.rs:62:14
@@ -111,7 +112,7 @@ LL | /// Link to [fn@c]
 help: to link to the constant, prefix with `const@`
    |
 LL | /// Link to [const@c]
-   |              ^^^^^^
+   |              ~~~~~~
 
 error: incompatible link kind for `c`
   --> $DIR/disambiguator-mismatch.rs:67:14
@@ -121,8 +122,9 @@ LL | /// Link to [c()]
    |
 help: to link to the constant, prefix with `const@`
    |
-LL | /// Link to [const@c]
-   |              ^^^^^^--
+LL - /// Link to [c()]
+LL + /// Link to [const@c]
+   | 
 
 error: incompatible link kind for `f`
   --> $DIR/disambiguator-mismatch.rs:72:14
@@ -132,8 +134,9 @@ LL | /// Link to [const@f]
    |
 help: to link to the function, add parentheses
    |
-LL | /// Link to [f()]
-   |             --^^
+LL - /// Link to [const@f]
+LL + /// Link to [f()]
+   | 
 
 error: aborting due to 12 previous errors
 
index 87d107b9c573be30a167d635e348596983e90c3e..e1ff3740bf6859b61f57708e1c4d833632c9beff 100644 (file)
@@ -96,8 +96,9 @@ LL | /// [type@Vec::into_iter]
    |
 help: to link to the associated function, add parentheses
    |
-LL | /// [Vec::into_iter()]
-   |     --             ^^
+LL - /// [type@Vec::into_iter]
+LL + /// [Vec::into_iter()]
+   | 
 
 error: unresolved link to `S`
   --> $DIR/errors.rs:68:6
@@ -107,8 +108,9 @@ LL | /// [S!]
    |
 help: to link to the struct, prefix with `struct@`
    |
-LL | /// [struct@S]
-   |      ^^^^^^^--
+LL - /// [S!]
+LL + /// [struct@S]
+   | 
 
 error: unresolved link to `S::h`
   --> $DIR/errors.rs:78:6
@@ -118,8 +120,9 @@ LL | /// [type@S::h]
    |
 help: to link to the associated function, add parentheses
    |
-LL | /// [S::h()]
-   |     --   ^^
+LL - /// [type@S::h]
+LL + /// [S::h()]
+   | 
 
 error: unresolved link to `T::g`
   --> $DIR/errors.rs:86:6
@@ -129,8 +132,9 @@ LL | /// [type@T::g]
    |
 help: to link to the associated function, add parentheses
    |
-LL | /// [T::g()]
-   |     --   ^^
+LL - /// [type@T::g]
+LL + /// [T::g()]
+   | 
 
 error: unresolved link to `T::h`
   --> $DIR/errors.rs:91:6
@@ -147,7 +151,7 @@ LL | /// [m()]
 help: to link to the macro, add an exclamation mark
    |
 LL | /// [m!()]
-   |       ^
+   |       +
 
 error: aborting due to 20 previous errors
 
index 3ab35d2df07b0c3f0c98ddc67fee0f393feb61bb..f45a3ca615bbe24f6aeba2d98add2da95ecc9b3f 100644 (file)
@@ -12,7 +12,7 @@ LL | #![deny(rustdoc::broken_intra_doc_links)]
 help: to link to the field, remove the disambiguator
    |
 LL | /// [`Foo::bar`]
-   |       ^^^^^^^^
+   |       ~~~~~~~~
 
 error: aborting due to previous error
 
index c2de5607ed64ae6afeae2329e8f672ab52b7af58..c43cda3eb7e9448aa47454f5f02c8637f813b825 100644 (file)
@@ -12,7 +12,7 @@ LL | #![deny(rustdoc::broken_intra_doc_links)]
 help: to link to the associated constant, prefix with `const@`
    |
 LL | //! [const@u8::MIN]
-   |      ^^^^^^
+   |      ~~~~~~
 
 error: aborting due to previous error
 
index 4dc1ce209007ee64b243524732c64bb745ea9b3c..6ef3b7eab3bafe53cb326ac796c613fefbd2b521 100644 (file)
@@ -12,11 +12,11 @@ LL | #![deny(rustdoc::broken_intra_doc_links)]
 help: to link to the module, prefix with `mod@`
    |
 LL | /// [mod@char]
-   |      ^^^^
+   |      ++++
 help: to link to the builtin type, prefix with `prim@`
    |
 LL | /// [prim@char]
-   |      ^^^^^
+   |      +++++
 
 error: `char` is both a module and a builtin type
   --> $DIR/prim-conflict.rs:10:6
@@ -27,11 +27,11 @@ LL | /// [type@char]
 help: to link to the module, prefix with `mod@`
    |
 LL | /// [mod@char]
-   |      ^^^^
+   |      ~~~~
 help: to link to the builtin type, prefix with `prim@`
    |
 LL | /// [prim@char]
-   |      ^^^^^
+   |      ~~~~~
 
 error: incompatible link kind for `char`
   --> $DIR/prim-conflict.rs:19:6
@@ -42,7 +42,7 @@ LL | /// [struct@char]
 help: to link to the module, prefix with `mod@`
    |
 LL | /// [mod@char]
-   |      ^^^^
+   |      ~~~~
 
 error: incompatible link kind for `char`
   --> $DIR/prim-conflict.rs:26:10
@@ -53,7 +53,7 @@ LL |     //! [struct@char]
 help: to link to the builtin type, prefix with `prim@`
    |
 LL |     //! [prim@char]
-   |          ^^^^^
+   |          ~~~~~
 
 error: aborting due to 4 previous errors
 
index 82eac9bd68b21b966b6276911f56f2ab07350667..5b1846a49d19fe0e7ef634f68e61a4cba58df46a 100644 (file)
@@ -14,7 +14,7 @@ LL | | /// ```
 help: mark blocks that do not contain Rust code as text
    |
 LL | /// ```text
-   |     ^^^^^^^
+   |     ~~~~~~~
 
 warning: could not parse code block as Rust code
   --> $DIR/invalid-syntax.rs:9:5
@@ -32,7 +32,7 @@ LL | | /// ```
 help: mark blocks that do not contain Rust code as text
    |
 LL | /// ```text
-   |     ^^^^^^^
+   |     ~~~~~~~
 
 warning: could not parse code block as Rust code
   --> $DIR/invalid-syntax.rs:21:5
@@ -47,7 +47,7 @@ LL | | /// ```
 help: mark blocks that do not contain Rust code as text
    |
 LL | /// ```text
-   |     ^^^^^^^
+   |     ~~~~~~~
 
 warning: could not parse code block as Rust code
   --> $DIR/invalid-syntax.rs:35:5
@@ -123,7 +123,7 @@ LL | | /// ```
 help: mark blocks that do not contain Rust code as text
    |
 LL | /// ```text
-   |     ^^^^^^^
+   |     ~~~~~~~
 
 warning: could not parse code block as Rust code
   --> $DIR/invalid-syntax.rs:92:9
@@ -148,7 +148,7 @@ LL | | /// ```
 help: mark blocks that do not contain Rust code as text
    |
 LL | /// ```text
-   |     ^^^^^^^
+   |     ~~~~~~~
 
 warning: 12 warnings emitted
 
index 16a5ac47cd2579401e3c06df48f346751e207156..b65b622c1ed4b5965539325ed02f8b51e936c5ac 100644 (file)
@@ -9,9 +9,9 @@ LL | | }
    |
 help: you might have forgotten to add the struct literal inside the block
    |
-LL | fn foo() { SomeStruct {
+LL ~ fn foo() { SomeStruct {
 LL |     Input: 123
-LL | } }
+LL ~ } }
    |
 
 error: aborting due to previous error
index 66fc245bdf59369c6ad4b1dff609f5b64004f36a..c24cdc97aa5004f579345ee055bdfc48e011e1b4 100644 (file)
@@ -1,10 +1,9 @@
 // force-host
 
-#![feature(plugin_registrar)]
 #![feature(rustc_private)]
 
 extern crate rustc_driver;
 use rustc_driver::plugin::Registry;
 
-#[plugin_registrar]
-pub fn plugin_registrar(_: &mut Registry) {}
+#[no_mangle]
+fn __rustc_plugin_registrar(_: &mut Registry) {}
index 124dd670d0931744d151ad5b6e91bc2a2f0c3945..0b68d5e04f7a208b262f52e7819f33e38fe548e7 100644 (file)
@@ -1,10 +1,9 @@
-#![feature(box_syntax, plugin, plugin_registrar, rustc_private)]
+#![feature(box_syntax, plugin, rustc_private)]
 #![crate_type = "dylib"]
 
 extern crate rustc_ast_pretty;
 extern crate rustc_driver;
 extern crate rustc_hir;
-#[macro_use]
 extern crate rustc_lint;
 #[macro_use]
 extern crate rustc_session;
 use rustc_hir as hir;
 use rustc_hir::intravisit;
 use rustc_hir::Node;
-use rustc_lint::{LateContext, LateLintPass, LintArray, LintContext, LintPass};
+use rustc_lint::{LateContext, LateLintPass, LintContext};
 use rustc_span::source_map;
 
-#[plugin_registrar]
-pub fn plugin_registrar(reg: &mut Registry) {
+#[no_mangle]
+fn __rustc_plugin_registrar(reg: &mut Registry) {
     reg.lint_store.register_lints(&[&MISSING_ALLOWED_ATTR]);
     reg.lint_store.register_late_pass(|| box MissingAllowedAttrPass);
 }
index 1f494e444846fa3555aa3e2907120090684607fc..0015a826126ff5776117f4511e1c5c12a00dcd70 100644 (file)
@@ -1,6 +1,6 @@
 // force-host
 
-#![feature(plugin_registrar, rustc_private)]
+#![feature(rustc_private)]
 #![feature(box_syntax)]
 
 extern crate rustc_driver;
@@ -64,8 +64,8 @@ fn check_crate(&mut self, cx: &LateContext, krate: &rustc_hir::Crate) {
     Symbol::intern("crate_grey"), Symbol::intern("crate_green")
 }
 
-#[plugin_registrar]
-pub fn plugin_registrar(reg: &mut Registry) {
+#[no_mangle]
+fn __rustc_plugin_registrar(reg: &mut Registry) {
     reg.lint_store.register_lints(&[
         &CRATE_NOT_OKAY,
         &CRATE_NOT_RED,
index 122a544e9d4699706fff947e2d274eb0a16af64d..87c90b53648c79901be67c28a50950128554e5c4 100644 (file)
@@ -1,6 +1,6 @@
 // force-host
 
-#![feature(plugin_registrar, rustc_private)]
+#![feature(rustc_private)]
 #![feature(box_syntax)]
 
 extern crate rustc_driver;
@@ -38,8 +38,8 @@ fn check_crate(&mut self, cx: &LateContext, krate: &rustc_hir::Crate) {
     }
 }
 
-#[plugin_registrar]
-pub fn plugin_registrar(reg: &mut Registry) {
+#[no_mangle]
+fn __rustc_plugin_registrar(reg: &mut Registry) {
     reg.lint_store.register_lints(&[&CRATE_NOT_OKAY]);
     reg.lint_store.register_late_pass(|| box Pass);
 }
index 02216b33dc3ad1276b15311636254fc6e4c64f78..f6ae560411b8e8f4cba0b29c39e8ba93444ffe97 100644 (file)
@@ -1,6 +1,5 @@
 // force-host
 
-#![feature(plugin_registrar)]
 #![feature(box_syntax, rustc_private)]
 
 // Load rustc as a plugin to get macros.
@@ -34,8 +33,8 @@ fn check_item(&mut self, cx: &LateContext, it: &rustc_hir::Item) {
     }
 }
 
-#[plugin_registrar]
-pub fn plugin_registrar(reg: &mut Registry) {
+#[no_mangle]
+fn __rustc_plugin_registrar(reg: &mut Registry) {
     reg.lint_store.register_lints(&[&TEST_LINT, &PLEASE_LINT]);
     reg.lint_store.register_late_pass(|| box Pass);
     reg.lint_store.register_group(
index 8cf8b7a44933a7c3c360a0ea78eb53e1086df3d2..32326bc8a5e5083ede7cefb6dcab661529106857 100644 (file)
@@ -1,6 +1,5 @@
 // force-host
 
-#![feature(plugin_registrar)]
 #![feature(box_syntax, rustc_private)]
 
 extern crate rustc_ast;
@@ -29,8 +28,8 @@ fn check_item(&mut self, cx: &EarlyContext, it: &ast::Item) {
     }
 }
 
-#[plugin_registrar]
-pub fn plugin_registrar(reg: &mut Registry) {
+#[no_mangle]
+fn __rustc_plugin_registrar(reg: &mut Registry) {
     reg.lint_store.register_lints(&[&TEST_LINT]);
     reg.lint_store.register_early_pass(|| box Pass);
 }
index 08b8fb3cbae5a93d1c125e38180e665044112379..42c1c851de8231105e1f7dd3876bbe11aeae6ca4 100644 (file)
@@ -1,4 +1,3 @@
-#![feature(plugin_registrar)]
 #![feature(box_syntax, rustc_private)]
 
 extern crate rustc_ast;
@@ -44,8 +43,8 @@ fn check_item(&mut self, cx: &EarlyContext, it: &ast::Item) {
     }
 }
 
-#[plugin_registrar]
-pub fn plugin_registrar(reg: &mut Registry) {
+#[no_mangle]
+fn __rustc_plugin_registrar(reg: &mut Registry) {
     reg.lint_store.register_lints(&[&TEST_RUSTC_TOOL_LINT, &TEST_LINT, &TEST_GROUP]);
     reg.lint_store.register_early_pass(|| box Pass);
     reg.lint_store.register_group(
index 5fbb3efabb37bedd7d0f7a4e2615955741614219..9b075c1a5b954e5be7ba965b8882153c64136778 100644 (file)
@@ -1,6 +1,5 @@
 // force-host
 
-#![feature(plugin_registrar)]
 #![feature(rustc_private)]
 
 extern crate rustc_middle;
@@ -8,5 +7,5 @@
 
 use rustc_driver::plugin::Registry;
 
-#[plugin_registrar]
-pub fn plugin_registrar(_reg: &mut Registry) {}
+#[no_mangle]
+fn __rustc_plugin_registrar(_reg: &mut Registry) {}
diff --git a/src/test/ui-fulldeps/auxiliary/multiple-plugins-1.rs b/src/test/ui-fulldeps/auxiliary/multiple-plugins-1.rs
new file mode 100644 (file)
index 0000000..fd6e9e2
--- /dev/null
@@ -0,0 +1,10 @@
+#![crate_type = "dylib"]
+#![feature(rustc_private)]
+
+extern crate rustc_middle;
+extern crate rustc_driver;
+
+use rustc_driver::plugin::Registry;
+
+#[no_mangle]
+fn __rustc_plugin_registrar(_: &mut Registry) {}
diff --git a/src/test/ui-fulldeps/auxiliary/multiple-plugins-2.rs b/src/test/ui-fulldeps/auxiliary/multiple-plugins-2.rs
new file mode 100644 (file)
index 0000000..fd6e9e2
--- /dev/null
@@ -0,0 +1,10 @@
+#![crate_type = "dylib"]
+#![feature(rustc_private)]
+
+extern crate rustc_middle;
+extern crate rustc_driver;
+
+use rustc_driver::plugin::Registry;
+
+#[no_mangle]
+fn __rustc_plugin_registrar(_: &mut Registry) {}
index 6584b905f5ed359ab4650543cd2aceff9e2f0ce8..d0eedf23cafe9661923f7ae9478ba2a5b6a3205a 100644 (file)
@@ -1,6 +1,5 @@
 // force-host
 
-#![feature(plugin_registrar)]
 #![feature(box_syntax, rustc_private)]
 
 extern crate rustc_middle;
@@ -18,8 +17,8 @@ impl Drop for Foo {
     fn drop(&mut self) {}
 }
 
-#[plugin_registrar]
-pub fn registrar(_: &mut Registry) {
+#[no_mangle]
+fn __rustc_plugin_registrar(_: &mut Registry) {
     thread_local!(static FOO: RefCell<Option<Box<Any+Send>>> = RefCell::new(None));
     FOO.with(|s| *s.borrow_mut() = Some(box Foo { foo: 10 } as Box<Any+Send>));
 }
index e8e8ae2985a689e4df5515d27223c681641d4e43..3ba73538ecfb6da8d227b65608dec6c1fcaace3f 100644 (file)
@@ -1,12 +1,12 @@
 // no-prefer-dynamic
 
 #![crate_type = "rlib"]
-#![feature(plugin_registrar, rustc_private)]
+#![feature(rustc_private)]
 
 extern crate rustc_middle;
 extern crate rustc_driver;
 
 use rustc_driver::plugin::Registry;
 
-#[plugin_registrar]
-pub fn plugin_registrar(_: &mut Registry) {}
+#[no_mangle]
+fn __rustc_plugin_registrar(_: &mut Registry) {}
diff --git a/src/test/ui-fulldeps/multiple-plugins.rs b/src/test/ui-fulldeps/multiple-plugins.rs
new file mode 100644 (file)
index 0000000..25d2c8b
--- /dev/null
@@ -0,0 +1,11 @@
+// run-pass
+// aux-build:multiple-plugins-1.rs
+// aux-build:multiple-plugins-2.rs
+
+// Check that the plugin registrar of multiple plugins doesn't conflict
+
+#![feature(plugin)]
+#![plugin(multiple_plugins_1)] //~ WARN use of deprecated attribute `plugin`
+#![plugin(multiple_plugins_2)] //~ WARN use of deprecated attribute `plugin`
+
+fn main() {}
diff --git a/src/test/ui-fulldeps/multiple-plugins.stderr b/src/test/ui-fulldeps/multiple-plugins.stderr
new file mode 100644 (file)
index 0000000..9915193
--- /dev/null
@@ -0,0 +1,16 @@
+warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
+  --> $DIR/multiple-plugins.rs:8:1
+   |
+LL | #![plugin(multiple_plugins_1)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
+   |
+   = note: `#[warn(deprecated)]` on by default
+
+warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
+  --> $DIR/multiple-plugins.rs:9:1
+   |
+LL | #![plugin(multiple_plugins_2)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
+
+warning: 2 warnings emitted
+
index b53640cd65ba9cc9d50aad406b1cec4b35652381..55905e5ca6a5acdeb03027ff80c5661a5584dcb7 100644 (file)
@@ -8,15 +8,15 @@ LL |     fn foo(i32);
 help: if this is a `self` type, give it a parameter name
    |
 LL |     fn foo(self: i32);
-   |            ^^^^^^^^^
+   |            ~~~~~~~~~
 help: if this is a parameter name, give it a type
    |
 LL |     fn foo(i32: TypeName);
-   |            ^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~
 help: if this is a type, explicitly ignore the parameter name
    |
 LL |     fn foo(_: i32);
-   |            ^^^^^^
+   |            ~~~~~~
 
 error: expected one of `:`, `@`, or `|`, found `)`
   --> $DIR/anon-params-denied-2018.rs:9:29
@@ -28,15 +28,15 @@ LL |     fn foo_with_ref(&mut i32);
 help: if this is a `self` type, give it a parameter name
    |
 LL |     fn foo_with_ref(self: &mut i32);
-   |                     ^^^^^^^^^^^^^^
+   |                     ~~~~~~~~~~~~~~
 help: if this is a parameter name, give it a type
    |
 LL |     fn foo_with_ref(i32: &mut TypeName);
-   |                     ^^^^^^^^^^^^^^^^^^
+   |                     ~~~~~~~~~~~~~~~~~~
 help: if this is a type, explicitly ignore the parameter name
    |
 LL |     fn foo_with_ref(_: &mut i32);
-   |                     ^^^^^^^^^^^
+   |                     ~~~~~~~~~~~
 
 error: expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`
   --> $DIR/anon-params-denied-2018.rs:12:47
@@ -48,7 +48,7 @@ LL |     fn foo_with_qualified_path(<Bar as T>::Baz);
 help: explicitly ignore the parameter name
    |
 LL |     fn foo_with_qualified_path(_: <Bar as T>::Baz);
-   |                                ^^^^^^^^^^^^^^^^^^
+   |                                ~~~~~~~~~~~~~~~~~~
 
 error: expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`
   --> $DIR/anon-params-denied-2018.rs:15:56
@@ -60,7 +60,7 @@ LL |     fn foo_with_qualified_path_and_ref(&<Bar as T>::Baz);
 help: explicitly ignore the parameter name
    |
 LL |     fn foo_with_qualified_path_and_ref(_: &<Bar as T>::Baz);
-   |                                        ^^^^^^^^^^^^^^^^^^^
+   |                                        ~~~~~~~~~~~~~~~~~~~
 
 error: expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `,`
   --> $DIR/anon-params-denied-2018.rs:18:57
@@ -72,7 +72,7 @@ LL |     fn foo_with_multiple_qualified_paths(<Bar as T>::Baz, <Bar as T>::Baz);
 help: explicitly ignore the parameter name
    |
 LL |     fn foo_with_multiple_qualified_paths(_: <Bar as T>::Baz, <Bar as T>::Baz);
-   |                                          ^^^^^^^^^^^^^^^^^^
+   |                                          ~~~~~~~~~~~~~~~~~~
 
 error: expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`
   --> $DIR/anon-params-denied-2018.rs:18:74
@@ -84,7 +84,7 @@ LL |     fn foo_with_multiple_qualified_paths(<Bar as T>::Baz, <Bar as T>::Baz);
 help: explicitly ignore the parameter name
    |
 LL |     fn foo_with_multiple_qualified_paths(<Bar as T>::Baz, _: <Bar as T>::Baz);
-   |                                                           ^^^^^^^^^^^^^^^^^^
+   |                                                           ~~~~~~~~~~~~~~~~~~
 
 error: expected one of `:`, `@`, or `|`, found `,`
   --> $DIR/anon-params-denied-2018.rs:22:36
@@ -96,15 +96,15 @@ LL |     fn bar_with_default_impl(String, String) {}
 help: if this is a `self` type, give it a parameter name
    |
 LL |     fn bar_with_default_impl(self: String, String) {}
-   |                              ^^^^^^^^^^^^
+   |                              ~~~~~~~~~~~~
 help: if this is a parameter name, give it a type
    |
 LL |     fn bar_with_default_impl(String: TypeName, String) {}
-   |                              ^^^^^^^^^^^^^^^^
+   |                              ~~~~~~~~~~~~~~~~
 help: if this is a type, explicitly ignore the parameter name
    |
 LL |     fn bar_with_default_impl(_: String, String) {}
-   |                              ^^^^^^^^^
+   |                              ~~~~~~~~~
 
 error: expected one of `:`, `@`, or `|`, found `)`
   --> $DIR/anon-params-denied-2018.rs:22:44
@@ -116,11 +116,11 @@ LL |     fn bar_with_default_impl(String, String) {}
 help: if this is a parameter name, give it a type
    |
 LL |     fn bar_with_default_impl(String, String: TypeName) {}
-   |                                      ^^^^^^^^^^^^^^^^
+   |                                      ~~~~~~~~~~~~~~~~
 help: if this is a type, explicitly ignore the parameter name
    |
 LL |     fn bar_with_default_impl(String, _: String) {}
-   |                                      ^^^^^^^^^
+   |                                      ~~~~~~~~~
 
 error: expected one of `:`, `@`, or `|`, found `,`
   --> $DIR/anon-params-denied-2018.rs:27:22
@@ -132,11 +132,11 @@ LL |     fn baz(a:usize, b, c: usize) -> usize {
 help: if this is a parameter name, give it a type
    |
 LL |     fn baz(a:usize, b: TypeName, c: usize) -> usize {
-   |                     ^^^^^^^^^^^
+   |                     ~~~~~~~~~~~
 help: if this is a type, explicitly ignore the parameter name
    |
 LL |     fn baz(a:usize, _: b, c: usize) -> usize {
-   |                     ^^^^
+   |                     ~~~~
 
 error: aborting due to 9 previous errors
 
index c5e32afbbce400f9bc44a8dc878f1adb902dd83f..d4c12b8e061cc4da070345426477856cce97d503 100644 (file)
@@ -17,11 +17,11 @@ LL |     const ID: i32 = 3;
 help: disambiguate the associated constant for candidate #1
    |
 LL | const X: i32 = Foo::ID;
-   |                ^^^^^^^
+   |                ~~~~~
 help: disambiguate the associated constant for candidate #2
    |
 LL | const X: i32 = Bar::ID;
-   |                ^^^^^^^
+   |                ~~~~~
 
 error: aborting due to previous error
 
index 7950dd3e99e29b11b14606560844698b27d16aa9..4c36289f47b857ac0e5c50ae4fa9df26d9dc7863 100644 (file)
@@ -28,9 +28,9 @@ impl Bar for AssocNoCopy {
 
 impl Thing for AssocNoCopy {
     type Out = Box<dyn Bar<Assoc: Copy>>;
-    //~^ ERROR the trait bound `String: Copy` is not satisfied
 
     fn func() -> Self::Out {
+        //~^ ERROR the trait bound `String: Copy` is not satisfied
         Box::new(AssocNoCopy)
     }
 }
index 0f1d35be0eb7a19c970be8f52f1de83e30c6dd7c..a32ab453152a0b4663c06788b189aaba8cd23431 100644 (file)
@@ -1,8 +1,8 @@
 error[E0277]: the trait bound `String: Copy` is not satisfied
-  --> $DIR/assoc-type-eq-with-dyn-atb-fail.rs:30:28
+  --> $DIR/assoc-type-eq-with-dyn-atb-fail.rs:32:18
    |
-LL |     type Out = Box<dyn Bar<Assoc: Copy>>;
-   |                            ^^^^^^^^^^^ the trait `Copy` is not implemented for `String`
+LL |     fn func() -> Self::Out {
+   |                  ^^^^^^^^^ the trait `Copy` is not implemented for `String`
 
 error: aborting due to previous error
 
index bf18eee4e07ed3ada762875c5dc9cbc48d64ddb6..703d790e92ce9c89e28d8103176c7d4fd9ec9596 100644 (file)
@@ -13,7 +13,7 @@ LL | pub unsafe auto trait Send {
 help: consider further restricting the associated type
    |
 LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Send {
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |             ++++++++++++++++++++++++++++++++++++++++++++++++++
 
 error[E0277]: `<<Self as Case1>::C as Iterator>::Item` is not an iterator
   --> $DIR/bad-bounds-on-assoc-in-trait.rs:27:43
@@ -30,7 +30,7 @@ LL | pub trait Iterator {
 help: consider further restricting the associated type
    |
 LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Iterator {
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |             ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 error[E0277]: `<<Self as Case1>::C as Iterator>::Item` cannot be shared between threads safely
   --> $DIR/bad-bounds-on-assoc-in-trait.rs:27:93
@@ -47,7 +47,7 @@ LL | pub unsafe auto trait Sync {
 help: consider further restricting the associated type
    |
 LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Sync {
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |             ++++++++++++++++++++++++++++++++++++++++++++++++++
 
 error: aborting due to 3 previous errors
 
index 46d472cdf80dbec9e5b14ce831c8ad4631848ac5..f3bd48f8c372490ecbec00c05dc2c38ddf1c81fc 100644 (file)
@@ -13,7 +13,7 @@ LL | pub trait Debug {
 help: consider further restricting the associated type
    |
 LL | trait Case1 where <<Self as Case1>::A as Iterator>::Item: Debug {
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |             +++++++++++++++++++++++++++++++++++++++++++++++++++
 
 error[E0277]: the trait bound `<<Self as Foo>::Out as Baz>::Assoc: Default` is not satisfied
   --> $DIR/bounds-on-assoc-in-trait.rs:35:38
@@ -29,7 +29,7 @@ LL | pub trait Default: Sized {
 help: consider further restricting the associated type
    |
 LL | pub trait Foo where <<Self as Foo>::Out as Baz>::Assoc: Default { type Out: Baz<Assoc: Default>; }
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |               +++++++++++++++++++++++++++++++++++++++++++++++++
 
 error: aborting due to 2 previous errors
 
index 74e858ca8616f13c8ae1738e364014144aa7d96a..0cacd78724732ee19b83d57aeb6cd8ce566f0e5a 100644 (file)
@@ -64,11 +64,11 @@ LL | enum E1 { V(dyn Iterator<Item: Copy>) }
 help: borrowed types always have a statically known size
    |
 LL | enum E1 { V(&dyn Iterator<Item: Copy>) }
-   |             ^
+   |             +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL | enum E1 { V(Box<dyn Iterator<Item: Copy>>) }
-   |             ^^^^                        ^
+   |             ++++                        +
 
 error[E0277]: the size for values of type `(dyn Iterator<Item = impl Sized> + 'static)` cannot be known at compilation time
   --> $DIR/inside-adt.rs:16:13
@@ -82,11 +82,11 @@ LL | enum E3 { V(dyn Iterator<Item: 'static>) }
 help: borrowed types always have a statically known size
    |
 LL | enum E3 { V(&dyn Iterator<Item: 'static>) }
-   |             ^
+   |             +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL | enum E3 { V(Box<dyn Iterator<Item: 'static>>) }
-   |             ^^^^                           ^
+   |             ++++                           +
 
 error[E0277]: the size for values of type `(dyn Iterator<Item = impl Copy> + 'static)` cannot be known at compilation time
   --> $DIR/inside-adt.rs:20:15
@@ -100,11 +100,11 @@ LL | union U1 { f: dyn Iterator<Item: Copy> }
 help: borrowed types always have a statically known size
    |
 LL | union U1 { f: &dyn Iterator<Item: Copy> }
-   |               ^
+   |               +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL | union U1 { f: Box<dyn Iterator<Item: Copy>> }
-   |               ^^^^                        ^
+   |               ++++                        +
 
 error[E0277]: the size for values of type `(dyn Iterator<Item = impl Sized> + 'static)` cannot be known at compilation time
   --> $DIR/inside-adt.rs:25:15
@@ -118,11 +118,11 @@ LL | union U3 { f: dyn Iterator<Item: 'static> }
 help: borrowed types always have a statically known size
    |
 LL | union U3 { f: &dyn Iterator<Item: 'static> }
-   |               ^
+   |               +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL | union U3 { f: Box<dyn Iterator<Item: 'static>> }
-   |               ^^^^                           ^
+   |               ++++                           +
 
 error: aborting due to 13 previous errors
 
index 42be09de03f22ca83687a41f7e6cf2e402daf4a9..6bde9d1a50df42ae67d04bb09dce560d41a9a5de 100644 (file)
@@ -7,8 +7,9 @@ LL | type _TaWhere1<T> where T: Iterator<Item: Copy> = T;
    = note: `#[warn(type_alias_bounds)]` on by default
 help: the clause will not be checked when the type alias is used, and should be removed
    |
-LL | type _TaWhere1<T>  = T;
-   |                  --
+LL - type _TaWhere1<T> where T: Iterator<Item: Copy> = T;
+LL + type _TaWhere1<T>  = T;
+   | 
 
 warning: where clauses are not enforced in type aliases
   --> $DIR/type-alias.rs:6:25
@@ -18,8 +19,9 @@ LL | type _TaWhere2<T> where T: Iterator<Item: 'static> = T;
    |
 help: the clause will not be checked when the type alias is used, and should be removed
    |
-LL | type _TaWhere2<T>  = T;
-   |                  --
+LL - type _TaWhere2<T> where T: Iterator<Item: 'static> = T;
+LL + type _TaWhere2<T>  = T;
+   | 
 
 warning: where clauses are not enforced in type aliases
   --> $DIR/type-alias.rs:7:25
@@ -29,8 +31,9 @@ LL | type _TaWhere3<T> where T: Iterator<Item: 'static> = T;
    |
 help: the clause will not be checked when the type alias is used, and should be removed
    |
-LL | type _TaWhere3<T>  = T;
-   |                  --
+LL - type _TaWhere3<T> where T: Iterator<Item: 'static> = T;
+LL + type _TaWhere3<T>  = T;
+   | 
 
 warning: where clauses are not enforced in type aliases
   --> $DIR/type-alias.rs:8:25
@@ -40,8 +43,9 @@ LL | type _TaWhere4<T> where T: Iterator<Item: 'static + Copy + Send> = T;
    |
 help: the clause will not be checked when the type alias is used, and should be removed
    |
-LL | type _TaWhere4<T>  = T;
-   |                  --
+LL - type _TaWhere4<T> where T: Iterator<Item: 'static + Copy + Send> = T;
+LL + type _TaWhere4<T>  = T;
+   | 
 
 warning: where clauses are not enforced in type aliases
   --> $DIR/type-alias.rs:9:25
@@ -51,8 +55,9 @@ LL | type _TaWhere5<T> where T: Iterator<Item: for<'a> Into<&'a u8>> = T;
    |
 help: the clause will not be checked when the type alias is used, and should be removed
    |
-LL | type _TaWhere5<T>  = T;
-   |                  --
+LL - type _TaWhere5<T> where T: Iterator<Item: for<'a> Into<&'a u8>> = T;
+LL + type _TaWhere5<T>  = T;
+   | 
 
 warning: where clauses are not enforced in type aliases
   --> $DIR/type-alias.rs:10:25
@@ -62,8 +67,9 @@ LL | type _TaWhere6<T> where T: Iterator<Item: Iterator<Item: Copy>> = T;
    |
 help: the clause will not be checked when the type alias is used, and should be removed
    |
-LL | type _TaWhere6<T>  = T;
-   |                  --
+LL - type _TaWhere6<T> where T: Iterator<Item: Iterator<Item: Copy>> = T;
+LL + type _TaWhere6<T>  = T;
+   | 
 
 warning: bounds on generic parameters are not enforced in type aliases
   --> $DIR/type-alias.rs:12:20
@@ -73,8 +79,9 @@ LL | type _TaInline1<T: Iterator<Item: Copy>> = T;
    |
 help: the bound will not be checked when the type alias is used, and should be removed
    |
-LL | type _TaInline1<T> = T;
-   |                 --
+LL - type _TaInline1<T: Iterator<Item: Copy>> = T;
+LL + type _TaInline1<T> = T;
+   | 
 
 warning: bounds on generic parameters are not enforced in type aliases
   --> $DIR/type-alias.rs:13:20
@@ -84,8 +91,9 @@ LL | type _TaInline2<T: Iterator<Item: 'static>> = T;
    |
 help: the bound will not be checked when the type alias is used, and should be removed
    |
-LL | type _TaInline2<T> = T;
-   |                 --
+LL - type _TaInline2<T: Iterator<Item: 'static>> = T;
+LL + type _TaInline2<T> = T;
+   | 
 
 warning: bounds on generic parameters are not enforced in type aliases
   --> $DIR/type-alias.rs:14:20
@@ -95,8 +103,9 @@ LL | type _TaInline3<T: Iterator<Item: 'static>> = T;
    |
 help: the bound will not be checked when the type alias is used, and should be removed
    |
-LL | type _TaInline3<T> = T;
-   |                 --
+LL - type _TaInline3<T: Iterator<Item: 'static>> = T;
+LL + type _TaInline3<T> = T;
+   | 
 
 warning: bounds on generic parameters are not enforced in type aliases
   --> $DIR/type-alias.rs:15:20
@@ -106,8 +115,9 @@ LL | type _TaInline4<T: Iterator<Item: 'static + Copy + Send>> = T;
    |
 help: the bound will not be checked when the type alias is used, and should be removed
    |
-LL | type _TaInline4<T> = T;
-   |                 --
+LL - type _TaInline4<T: Iterator<Item: 'static + Copy + Send>> = T;
+LL + type _TaInline4<T> = T;
+   | 
 
 warning: bounds on generic parameters are not enforced in type aliases
   --> $DIR/type-alias.rs:16:20
@@ -117,8 +127,9 @@ LL | type _TaInline5<T: Iterator<Item: for<'a> Into<&'a u8>>> = T;
    |
 help: the bound will not be checked when the type alias is used, and should be removed
    |
-LL | type _TaInline5<T> = T;
-   |                 --
+LL - type _TaInline5<T: Iterator<Item: for<'a> Into<&'a u8>>> = T;
+LL + type _TaInline5<T> = T;
+   | 
 
 warning: bounds on generic parameters are not enforced in type aliases
   --> $DIR/type-alias.rs:17:20
@@ -128,8 +139,9 @@ LL | type _TaInline6<T: Iterator<Item: Iterator<Item: Copy>>> = T;
    |
 help: the bound will not be checked when the type alias is used, and should be removed
    |
-LL | type _TaInline6<T> = T;
-   |                 --
+LL - type _TaInline6<T: Iterator<Item: Iterator<Item: Copy>>> = T;
+LL + type _TaInline6<T> = T;
+   | 
 
 warning: 12 warnings emitted
 
index 6de8459954c681a8ae2bb93cc6e4445b1f79c6ae..474b3c5c717c44fb55a2d1abc8de5134007692fe 100644 (file)
@@ -13,11 +13,11 @@ LL | fn a<C:Vehicle+Box>(_: C::Color) {
 help: use fully qualified syntax to disambiguate
    |
 LL | fn a<C:Vehicle+Box>(_: <C as Box>::Color) {
-   |                        ^^^^^^^^^^^^^^^^^
+   |                        ~~~~~~~~~~~~~~~~~
 help: use fully qualified syntax to disambiguate
    |
 LL | fn a<C:Vehicle+Box>(_: <C as Vehicle>::Color) {
-   |                        ^^^^^^^^^^^^^^^^^^^^^
+   |                        ~~~~~~~~~~~~~~~~~~~~~
 
 error[E0221]: ambiguous associated type `Color` in bounds of `C`
   --> $DIR/associated-type-projection-ambig-between-bound-and-where-clause.rs:20:12
@@ -34,11 +34,11 @@ LL | fn b<C>(_: C::Color) where C : Vehicle+Box {
 help: use fully qualified syntax to disambiguate
    |
 LL | fn b<C>(_: <C as Box>::Color) where C : Vehicle+Box {
-   |            ^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~
 help: use fully qualified syntax to disambiguate
    |
 LL | fn b<C>(_: <C as Vehicle>::Color) where C : Vehicle+Box {
-   |            ^^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~~
 
 error[E0221]: ambiguous associated type `Color` in bounds of `C`
   --> $DIR/associated-type-projection-ambig-between-bound-and-where-clause.rs:24:12
@@ -55,11 +55,11 @@ LL | fn c<C>(_: C::Color) where C : Vehicle, C : Box {
 help: use fully qualified syntax to disambiguate
    |
 LL | fn c<C>(_: <C as Box>::Color) where C : Vehicle, C : Box {
-   |            ^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~
 help: use fully qualified syntax to disambiguate
    |
 LL | fn c<C>(_: <C as Vehicle>::Color) where C : Vehicle, C : Box {
-   |            ^^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~~
 
 error[E0221]: ambiguous associated type `Color` in bounds of `X`
   --> $DIR/associated-type-projection-ambig-between-bound-and-where-clause.rs:35:20
@@ -76,11 +76,11 @@ LL |     fn e(&self, _: X::Color) where X : Box;
 help: use fully qualified syntax to disambiguate
    |
 LL |     fn e(&self, _: <X as Box>::Color) where X : Box;
-   |                    ^^^^^^^^^^^^^^^^^
+   |                    ~~~~~~~~~~~~~~~~~
 help: use fully qualified syntax to disambiguate
    |
 LL |     fn e(&self, _: <X as Vehicle>::Color) where X : Box;
-   |                    ^^^^^^^^^^^^^^^^^^^^^
+   |                    ~~~~~~~~~~~~~~~~~~~~~
 
 error[E0221]: ambiguous associated type `Color` in bounds of `X`
   --> $DIR/associated-type-projection-ambig-between-bound-and-where-clause.rs:38:20
@@ -97,11 +97,11 @@ LL |     fn f(&self, _: X::Color) where X : Box { }
 help: use fully qualified syntax to disambiguate
    |
 LL |     fn f(&self, _: <X as Box>::Color) where X : Box { }
-   |                    ^^^^^^^^^^^^^^^^^
+   |                    ~~~~~~~~~~~~~~~~~
 help: use fully qualified syntax to disambiguate
    |
 LL |     fn f(&self, _: <X as Vehicle>::Color) where X : Box { }
-   |                    ^^^^^^^^^^^^^^^^^^^^^
+   |                    ~~~~~~~~~~~~~~~~~~~~~
 
 error[E0221]: ambiguous associated type `Color` in bounds of `X`
   --> $DIR/associated-type-projection-ambig-between-bound-and-where-clause.rs:30:20
@@ -118,11 +118,11 @@ LL |     fn d(&self, _: X::Color) where X : Box { }
 help: use fully qualified syntax to disambiguate
    |
 LL |     fn d(&self, _: <X as Box>::Color) where X : Box { }
-   |                    ^^^^^^^^^^^^^^^^^
+   |                    ~~~~~~~~~~~~~~~~~
 help: use fully qualified syntax to disambiguate
    |
 LL |     fn d(&self, _: <X as Vehicle>::Color) where X : Box { }
-   |                    ^^^^^^^^^^^^^^^^^^^^^
+   |                    ~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 6 previous errors
 
index cd7c0dc4a44d0d049f7dc4d833ebf0b14deb30e2..e6e95336bb53d56e523bbaae93739ee8ef7862cd 100644 (file)
@@ -21,11 +21,11 @@ LL | fn dent<C:BoxCar>(c: C, color: C::Color) {
 help: use fully qualified syntax to disambiguate
    |
 LL | fn dent<C:BoxCar>(c: C, color: <C as Vehicle>::Color) {
-   |                                ^^^^^^^^^^^^^^^^^^^^^
+   |                                ~~~~~~~~~~~~~~~~~~~~~
 help: use fully qualified syntax to disambiguate
    |
 LL | fn dent<C:BoxCar>(c: C, color: <C as Box>::Color) {
-   |                                ^^^^^^^^^^^^^^^^^
+   |                                ~~~~~~~~~~~~~~~~~
 
 error[E0222]: ambiguous associated type `Color` in bounds of `BoxCar`
   --> $DIR/associated-type-projection-from-multiple-supertraits.rs:23:37
@@ -74,11 +74,11 @@ LL | fn paint<C:BoxCar>(c: C, d: C::Color) {
 help: use fully qualified syntax to disambiguate
    |
 LL | fn paint<C:BoxCar>(c: C, d: <C as Vehicle>::Color) {
-   |                             ^^^^^^^^^^^^^^^^^^^^^
+   |                             ~~~~~~~~~~~~~~~~~~~~~
 help: use fully qualified syntax to disambiguate
    |
 LL | fn paint<C:BoxCar>(c: C, d: <C as Box>::Color) {
-   |                             ^^^^^^^^^^^^^^^^^
+   |                             ~~~~~~~~~~~~~~~~~
 
 error[E0191]: the value of the associated types `Color` (from trait `Box`), `Color` (from trait `Vehicle`) must be specified
   --> $DIR/associated-type-projection-from-multiple-supertraits.rs:32:32
index 41e2d8ec314b777c707f2a661d388ca66aa98383..edcd2bf85adb64cc932e0914afc746faa7ce2ecb 100644 (file)
@@ -12,7 +12,7 @@ LL |     fn to_int(&self) -> isize;
 help: consider further restricting the associated type
    |
 LL |     where G : GetToInt, <G as GetToInt>::R: ToInt
-   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                       +++++++++++++++++++++++++++
 
 error: aborting due to previous error
 
index 53a45cf4e4f4db2763635182c1f60372cdfa9bab..e9ace7d2574b95e8ccb1e2ee2ccae3a854d3adf7 100644 (file)
@@ -9,11 +9,11 @@ LL |     let _: A = x.boo();
 help: a type parameter with a similar name exists
    |
 LL |     let _: I = x.boo();
-   |            ^
+   |            ~
 help: you might be missing a type parameter
    |
 LL | fn foo2<I: Foo, A>(x: I) {
-   |               ^^^
+   |               +++
 
 error: aborting due to previous error
 
index dffa4780a09ff0c41441b39ff11fcbb6ba81514a..5992b0d6bf1432b5fdd3e79fe7123425f195fe39 100644 (file)
@@ -11,7 +11,7 @@ LL |     let _: Bar = x.boo();
 help: consider constraining the associated type `<I as Foo>::A` to `Bar`
    |
 LL | fn foo2<I: Foo<A = Bar>>(x: I) {
-   |               ^^^^^^^^^
+   |               +++++++++
 
 error[E0271]: type mismatch resolving `<isize as Foo>::A == Bar`
   --> $DIR/associated-types-eq-3.rs:38:5
index 25e80159b0b180cf5e7080206c5a23bb56595df9..f2195ca694bd71c1c99080a9632eb904babf93e5 100644 (file)
@@ -10,7 +10,7 @@ LL |     fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) {}
 help: consider further restricting `Self`
    |
 LL |     fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get {}
-   |                                                              ^^^^^^^^^^^^^^^
+   |                                                              +++++++++++++++
 
 error: aborting due to previous error
 
index 1df127873538d2be8cef8d0e43f6e5685d132c50..8fecfdf7b932b405341ad835e27aab454475e93b 100644 (file)
@@ -7,7 +7,7 @@ LL |     let u: <T as Foo<usize>>::Bar = t.get_bar();
 help: consider further restricting this bound
    |
 LL | fn f<T:Foo<isize> + Foo<usize>>(t: &T) {
-   |                   ^^^^^^^^^^^^
+   |                   ++++++++++++
 
 error: aborting due to previous error
 
index b8f20d00ff8e45bee6d94ab34a55148a8541c0e1..cfc75652a61b4153281f2d731e0e8ea46b1f9c77 100644 (file)
@@ -12,7 +12,7 @@ LL | fn want_y<T:Foo<Y=i32>>(t: &T) { }
 help: consider constraining the associated type `<T as Foo>::Y` to `i32`
    |
 LL | fn have_x_want_y<T:Foo<X=u32, Y = i32>>(t: &T)
-   |                             ^^^^^^^^^
+   |                             +++++++++
 
 error[E0271]: type mismatch resolving `<T as Foo>::X == u32`
   --> $DIR/associated-types-multiple-types-one-trait.rs:18:5
@@ -28,7 +28,7 @@ LL | fn want_x<T:Foo<X=u32>>(t: &T) { }
 help: consider constraining the associated type `<T as Foo>::X` to `u32`
    |
 LL | fn have_y_want_x<T:Foo<Y=i32, X = u32>>(t: &T)
-   |                             ^^^^^^^^^
+   |                             +++++++++
 
 error: aborting due to 2 previous errors
 
index 19500f58aa6883d721d6dbd02e94220635693b2f..75f0354b81a6328739940f58714c74b65df3f4b8 100644 (file)
@@ -10,7 +10,7 @@ LL |     fn uhoh<T>(foo: <T as Get>::Value) {}
 help: consider restricting type parameter `T`
    |
 LL |     fn uhoh<T: Get>(foo: <T as Get>::Value) {}
-   |              ^^^^^
+   |              +++++
 
 error: aborting due to previous error
 
index 0e978f20a6634237dc8ca2a383025ba0b44d3158..a432805ced8aece7617e3ca6216cb48eadfaac7c 100644 (file)
@@ -10,7 +10,7 @@ LL |     fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) {}
 help: consider further restricting `Self`
    |
 LL |     fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get {}
-   |                                                              ^^^^^^^^^^^^^^^
+   |                                                              +++++++++++++++
 
 error: aborting due to previous error
 
index 1ec3c05983aefdc193557b482cd82ba8f4945ebc..10b2ab5e9741c465b68aefd083e7f865f0be68ae 100644 (file)
@@ -10,7 +10,7 @@ LL |     fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) {}
 help: consider further restricting `Self`
    |
 LL |     fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get {}
-   |                                                              ^^^^^^^^^^^^^^^
+   |                                                              +++++++++++++++
 
 error[E0277]: the trait bound `(T, U): Get` is not satisfied
   --> $DIR/associated-types-no-suitable-supertrait.rs:22:40
index 60db7749082e5c84e4590529ccb6ee9c4319ad73..8f94b24e7b6b616cf74d5ff948e211f6b18bafd9 100644 (file)
@@ -19,11 +19,11 @@ LL | pub fn f2<T: Foo + Bar>(a: T, x: T::A) {}
 help: use fully qualified syntax to disambiguate
    |
 LL | pub fn f2<T: Foo + Bar>(a: T, x: <T as Bar>::A) {}
-   |                                  ^^^^^^^^^^^^^
+   |                                  ~~~~~~~~~~~~~
 help: use fully qualified syntax to disambiguate
    |
 LL | pub fn f2<T: Foo + Bar>(a: T, x: <T as Foo>::A) {}
-   |                                  ^^^^^^^^^^^^^
+   |                                  ~~~~~~~~~~~~~
 
 error: aborting due to 2 previous errors
 
index 0881258aca1ac47bbf123c687ba5957e791d683b..77b638b703b4c6c851b5dd814be4195235012dec 100644 (file)
@@ -7,7 +7,7 @@ LL |     f1(2i32, 4i32);
 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
@@ -50,7 +50,7 @@ LL |     let _: i32 = f2(2i32);
 help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
    |
 LL |     let _: i32 = f2(2i32).try_into().unwrap();
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 6 previous errors
 
index cadc3e9eab1c93646072cff314a392caabc0c30c..62a619723511e6a9948b08e15911222e3587a8ce 100644 (file)
@@ -6,8 +6,8 @@ LL |     field: I::A
    |
 help: use a fully qualified path with explicit lifetimes
    |
-LL | struct SomeStruct<'a, I: for<'x> Foo<&'x isize>> {
-LL |     field: <I as Foo<&'a isize>>::A
+LL ~ struct SomeStruct<'a, I: for<'x> Foo<&'x isize>> {
+LL ~     field: <I as Foo<&'a isize>>::A
    |
 
 error[E0212]: cannot use the associated type of a trait with uninferred generic parameters
@@ -18,8 +18,8 @@ LL |     TupleVariant(I::A),
    |
 help: use a fully qualified path with explicit lifetimes
    |
-LL | enum SomeEnum<'c, 'b, I: for<'a> Foo<&'a isize>> {
-LL |     TupleVariant(<I as Foo<&'c isize>>::A),
+LL ~ enum SomeEnum<'c, 'b, I: for<'a> Foo<&'a isize>> {
+LL ~     TupleVariant(<I as Foo<&'c isize>>::A),
    |
 
 error[E0212]: cannot use the associated type of a trait with uninferred generic parameters
@@ -30,10 +30,10 @@ LL |     StructVariant { field: I::A },
    |
 help: use a fully qualified path with explicit lifetimes
    |
-LL | enum SomeEnum<'c, 'b, I: for<'a> Foo<&'a isize>> {
+LL ~ enum SomeEnum<'c, 'b, I: for<'a> Foo<&'a isize>> {
 LL |     TupleVariant(I::A),
 LL |
-LL |     StructVariant { field: <I as Foo<&'c isize>>::A },
+LL ~     StructVariant { field: <I as Foo<&'c isize>>::A },
    |
 
 error[E0212]: cannot use the associated type of a trait with uninferred generic parameters
@@ -44,9 +44,9 @@ LL |     field: I::A,
    |
 help: use a fully qualified path with explicit lifetimes
    |
-LL | struct Why<'bb, 'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'n, 'o, 'p, 'q, 'r, 's, 't, 'u, 'v, 'w, 'x,
+LL ~ struct Why<'bb, 'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'n, 'o, 'p, 'q, 'r, 's, 't, 'u, 'v, 'w, 'x,
 LL |     'y, 'z, 'aa, I: for<'l, 'm> Foo<&'l &'m isize>> {
-LL |     field: <I as Foo<&'bb &'bb isize>>::A,
+LL ~     field: <I as Foo<&'bb &'bb isize>>::A,
    |
 
 error: aborting due to 4 previous errors
index b6ee1ed733c3e99cc0f82f280bc964083bd170bc..7bbf060fdb68622adf6686908a6fd2b20b100445 100644 (file)
@@ -10,7 +10,7 @@ LL |     fn okay<U:Get>(&self, foo: U, bar: <Self as Get>::Value);
 help: consider further restricting `Self`
    |
 LL |     fn okay<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get;
-   |                                                              ^^^^^^^^^^^^^^^
+   |                                                              +++++++++++++++
 
 error: aborting due to previous error
 
index c2af5483003e282220aaffe4d731cd0d839b0748..bec9b1500c9d7c7256d47dd0eabbadf31acd3c74 100644 (file)
@@ -10,7 +10,7 @@ LL |     let x = t.get();
 help: consider further restricting the associated type
    |
 LL | fn foo<T:Get>(t: T) where <T as Get>::Value: Sized {
-   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                     ++++++++++++++++++++++++++++++
 
 error: aborting due to previous error
 
index 6c68cc7bc61aa94e25067b7431d84f80d7326f9e..e8e07997c721df94b12bd3199e885217767f7795 100644 (file)
@@ -9,11 +9,11 @@ LL | fn elision<T: Fn() -> &i32>() {
 help: consider making the bound lifetime-generic with a new `'a` lifetime
    |
 LL | fn elision<T: for<'a> Fn() -> &'a i32>() {
-   |               ^^^^^^^         ^^^
+   |               +++++++         ~~~
 help: consider using the `'static` lifetime
    |
 LL | fn elision<T: Fn() -> &'static i32>() {
-   |                       ^^^^^^^^
+   |                       ~~~~~~~~
 
 error: aborting due to previous error
 
index 93d2f8e7911f08ceee48ca3eb3291a1b374722d8..c75e732b7ca4c82c56a301d71e0a2c408e14cea7 100644 (file)
@@ -9,11 +9,11 @@ LL | fn elision(_: fn() -> &i32) {
 help: consider making the type lifetime-generic with a new `'a` lifetime
    |
 LL | fn elision(_: for<'a> fn() -> &'a i32) {
-   |               ^^^^^^^         ^^^
+   |               +++++++         ~~~
 help: consider using the `'static` lifetime
    |
 LL | fn elision(_: fn() -> &'static i32) {
-   |                       ^^^^^^^^
+   |                       ~~~~~~~~
 
 error: aborting due to previous error
 
index 5e98520b41187a5c9261e03603184c1022ecdbcf..008eddcb29dbcc121770f7fa6681913bea60960d 100644 (file)
@@ -1,14 +1,14 @@
 error[E0275]: overflow evaluating the requirement `<bool as Tr>::B == _`
-  --> $DIR/defaults-cyclic-fail-1.rs:26:5
+  --> $DIR/defaults-cyclic-fail-1.rs:26:14
    |
 LL |     type A = Box<Self::B>;
-   |     ^^^^^^^^^^^^^^^^^^^^^^
+   |              ^^^^^^^^^^^^
 
 error[E0275]: overflow evaluating the requirement `<usize as Tr>::A == _`
-  --> $DIR/defaults-cyclic-fail-1.rs:32:5
+  --> $DIR/defaults-cyclic-fail-1.rs:32:14
    |
 LL |     type B = &'static Self::A;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |              ^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
index c538805f858219dbccb8bdc34a4b4b5bd4d06f4e..d0fbab077153f4bbf974ed21d3dc48722df8038b 100644 (file)
@@ -1,14 +1,14 @@
 error[E0275]: overflow evaluating the requirement `<bool as Tr>::B == _`
-  --> $DIR/defaults-cyclic-fail-2.rs:27:5
+  --> $DIR/defaults-cyclic-fail-2.rs:27:14
    |
 LL |     type A = Box<Self::B>;
-   |     ^^^^^^^^^^^^^^^^^^^^^^
+   |              ^^^^^^^^^^^^
 
 error[E0275]: overflow evaluating the requirement `<usize as Tr>::A == _`
-  --> $DIR/defaults-cyclic-fail-2.rs:33:5
+  --> $DIR/defaults-cyclic-fail-2.rs:33:14
    |
 LL |     type B = &'static Self::A;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |              ^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
index af4e6f0a5c161fb342658e45e577a432eb74c57d..7023516e37f377db9b34c5422d14b9a78b46e535 100644 (file)
@@ -32,7 +32,7 @@ LL |     type Bar: Clone = Vec<T>;
 help: consider restricting type parameter `T`
    |
 LL | trait Foo<T: std::clone::Clone> {
-   |            ^^^^^^^^^^^^^^^^^^^
+   |            +++++++++++++++++++
 
 error[E0277]: the trait bound `(): Foo<Self>` is not satisfied
   --> $DIR/defaults-suitability.rs:34:5
@@ -68,7 +68,7 @@ LL |     type Bar: Clone = Vec<Self::Baz>;
 help: consider further restricting the associated type
    |
 LL | trait Foo2<T> where <Self as Foo2<T>>::Baz: Clone {
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |               +++++++++++++++++++++++++++++++++++
 
 error[E0277]: the trait bound `<Self as Foo25<T>>::Baz: Clone` is not satisfied
   --> $DIR/defaults-suitability.rs:74:5
@@ -83,7 +83,7 @@ LL |     type Bar: Clone = Vec<Self::Baz>;
 help: consider further restricting the associated type
    |
 LL | trait Foo25<T: Clone> where <Self as Foo25<T>>::Baz: Clone {
-   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                       ++++++++++++++++++++++++++++++++++++
 
 error[E0277]: the trait bound `T: Clone` is not satisfied
   --> $DIR/defaults-suitability.rs:87:5
@@ -100,7 +100,7 @@ LL |     type Baz = T;
 help: consider further restricting type parameter `T`
    |
 LL |     Self::Baz: Clone, T: std::clone::Clone
-   |                     ^^^^^^^^^^^^^^^^^^^^^^
+   |                     ~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 8 previous errors
 
index bcdb50aa312cb671caa1805c8450e680a6f657c2..3449272238caed9e3395f6819ebce758801c857c 100644 (file)
@@ -11,7 +11,7 @@ LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + Fro
 help: consider further restricting `Self`
    |
 LL | trait UncheckedCopy: Sized + std::fmt::Display {
-   |                            ^^^^^^^^^^^^^^^^^^^
+   |                            +++++++++++++++++++
 
 error[E0277]: cannot add-assign `&'static str` to `Self`
   --> $DIR/defaults-unsound-62211-1.rs:20:5
@@ -25,7 +25,7 @@ LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + Fro
 help: consider further restricting `Self`
    |
 LL | trait UncheckedCopy: Sized + AddAssign<&'static str> {
-   |                            ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                            +++++++++++++++++++++++++
 
 error[E0277]: the trait bound `Self: Deref` is not satisfied
   --> $DIR/defaults-unsound-62211-1.rs:20:5
@@ -39,7 +39,7 @@ LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + Fro
 help: consider further restricting `Self`
    |
 LL | trait UncheckedCopy: Sized + Deref {
-   |                            ^^^^^^^
+   |                            +++++++
 
 error[E0277]: the trait bound `Self: Copy` is not satisfied
   --> $DIR/defaults-unsound-62211-1.rs:20:5
@@ -53,7 +53,7 @@ LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + Fro
 help: consider further restricting `Self`
    |
 LL | trait UncheckedCopy: Sized + Copy {
-   |                            ^^^^^^
+   |                            ++++++
 
 error: aborting due to 4 previous errors
 
index fa5cf9196edbd85e3ceaa3a871bddda039a76713..3b86c534d58e07897647cd130781cdb4659166e7 100644 (file)
@@ -11,7 +11,7 @@ LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + Fro
 help: consider further restricting `Self`
    |
 LL | trait UncheckedCopy: Sized + std::fmt::Display {
-   |                            ^^^^^^^^^^^^^^^^^^^
+   |                            +++++++++++++++++++
 
 error[E0277]: cannot add-assign `&'static str` to `Self`
   --> $DIR/defaults-unsound-62211-2.rs:20:5
@@ -25,7 +25,7 @@ LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + Fro
 help: consider further restricting `Self`
    |
 LL | trait UncheckedCopy: Sized + AddAssign<&'static str> {
-   |                            ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                            +++++++++++++++++++++++++
 
 error[E0277]: the trait bound `Self: Deref` is not satisfied
   --> $DIR/defaults-unsound-62211-2.rs:20:5
@@ -39,7 +39,7 @@ LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + Fro
 help: consider further restricting `Self`
    |
 LL | trait UncheckedCopy: Sized + Deref {
-   |                            ^^^^^^^
+   |                            +++++++
 
 error[E0277]: the trait bound `Self: Copy` is not satisfied
   --> $DIR/defaults-unsound-62211-2.rs:20:5
@@ -53,7 +53,7 @@ LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + Fro
 help: consider further restricting `Self`
    |
 LL | trait UncheckedCopy: Sized + Copy {
-   |                            ^^^^^^
+   |                            ++++++
 
 error: aborting due to 4 previous errors
 
index 6e02b42e514c5072d0cb9c097019f560946b27fb..22bc0281d343a6b7a9863352ac2381dc0f0d20e8 100644 (file)
@@ -28,7 +28,7 @@ LL | impl<S, T> X<'_, T> for (S,) {
 help: consider restricting type parameter `T`
    |
 LL | impl<S, T: for<'b> X<'b, T>> X<'_, T> for (S,) {
-   |          ^^^^^^^^^^^^^^^^^^
+   |          ++++++++++++++++++
 
 error: aborting due to 2 previous errors
 
index 49fad4e1b1cb80e975cd9bad2e36fd1c8d9a9eb7..149279e417c1b6fe4ee2eefe8604241fe63bfb25 100644 (file)
@@ -23,7 +23,7 @@ LL | impl<T: Copy + std::ops::Deref> UnsafeCopy<'_, T> for T {
 help: consider further restricting the associated type
    |
 LL | impl<T: Copy + std::ops::Deref> UnsafeCopy<'_, T> for T where for<'b> <T as UnsafeCopy<'b, T>>::Item: Deref {
-   |                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                                         +++++++++++++++++++++++++++++++++++++++++++++++++++
 
 error: aborting due to 2 previous errors
 
index 89e05b61fc9d89a8097cee7bbbfc05e6d94c10b1..283ecea735d4156209b9f2b22614e9262fc451db 100644 (file)
@@ -12,7 +12,7 @@ LL | fn baz() -> impl Bar<Item = i32> {
 help: consider constraining the associated type `<impl Bar as Foo>::Item` to `i32`
    |
 LL | fn bar() -> impl Bar<Item = i32> {
-   |                     ^^^^^^^^^^^^
+   |                     ++++++++++++
 
 error: aborting due to previous error
 
index bc414044f7846e7ed0ef4086e1ca2a549aebc9d6..1f14b5bb787a40022f28d42e1388684aa323cb7b 100644 (file)
@@ -10,11 +10,11 @@ LL |     ) -> <Dst as From<Self>>::Result where Dst: From<Self> {
 help: consider further restricting `Self`
    |
 LL |     ) -> <Dst as From<Self>>::Result where Dst: From<Self>, Self: Sized {
-   |                                                           ^^^^^^^^^^^^^
+   |                                                           +++++++++++++
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | trait From<Src: ?Sized> {
-   |               ^^^^^^^^
+   |               ++++++++
 
 error: aborting due to previous error
 
index 9dda99109fa2b875416a57ccfa4967adcd842faa..d2193cc4a489534ed2ba766d2e459581c642a13d 100644 (file)
@@ -52,7 +52,7 @@ LL | type Test = dyn Add + Sub;
 help: specify the associated types
    |
 LL | type Test = dyn Add<Output = Type> + Sub<Output = Type>;
-   |                 ^^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 4 previous errors
 
index b6122bd54d1622e111b44fa76b578bedb16f2c30..2bb8398c93ea4a8cd3fb522f5615b2a6a5d55de3 100644 (file)
@@ -10,7 +10,7 @@ LL |     copy::<dyn Setup<From=T>>(t)
 help: consider restricting type parameter `T`
    |
 LL | pub fn copy_any<T: std::marker::Copy>(t: &T) -> T {
-   |                  ^^^^^^^^^^^^^^^^^^^
+   |                  +++++++++++++++++++
 
 error: aborting due to previous error
 
index 0e653a7d3b22fd531972e7d26fb0119aa180b5e1..c5e0cbc8a4a8ad44bf43f5839d4648b4d9914625 100644 (file)
@@ -10,7 +10,7 @@ LL |     type Assoc = T;
 help: consider restricting type parameter `T`
    |
 LL | impl<T: std::marker::Copy> Complete for T {
-   |       ^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++++++++
 
 error: aborting due to previous error
 
index 927a2de996561f6100527306a116cea6bd698325..84012e651df59bac77268d37cefb16d1052420f4 100644 (file)
@@ -11,7 +11,7 @@ LL |     type Size = <Self as SubEncoder>::ActualSize;
 help: consider further restricting the associated type
    |
 LL |     T: SubEncoder, <T as SubEncoder>::ActualSize: Add
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 16ae07687e2c7f355dbd56a02d022201e08db5b8..59637367604de6c84598016446b8392d808b5a71 100644 (file)
@@ -10,7 +10,7 @@ LL |     type This = Self;
 help: consider further restricting `Self`
    |
 LL | trait MyTrait: Sized {
-   |              ^^^^^^^
+   |              +++++++
 
 error: aborting due to previous error
 
index 0725acfe537dbb5022373d594bca2e4c91eff7af..780ef118d1cb255b1bef1bbab972a2824c06422c 100644 (file)
@@ -12,7 +12,7 @@ LL |     accepts_trait(a);
 help: consider constraining the associated type `<A as Trait>::Associated` to `()`
    |
 LL |     A: Trait<Associated = ()> + 'static,
-   |             ^^^^^^^^^^^^^^^^^
+   |             +++++++++++++++++
 
 error[E0271]: type mismatch resolving `<B as Trait>::Associated == ()`
   --> $DIR/issue-87261.rs:59:5
@@ -42,7 +42,7 @@ LL |     accepts_trait(c);
 help: consider constraining the associated type `<C as Trait>::Associated` to `()`
    |
 LL |     C: Trait<Associated = ()> + Foo,
-   |             ^^^^^^^^^^^^^^^^^
+   |             +++++++++++++++++
 
 error[E0271]: type mismatch resolving `<D as Trait>::Associated == ()`
   --> $DIR/issue-87261.rs:65:5
@@ -72,7 +72,7 @@ LL |     accepts_generic_trait(e);
 help: consider constraining the associated type `<E as GenericTrait<()>>::Associated` to `()`
    |
 LL |     E: GenericTrait<(), Associated = ()> + 'static,
-   |                       ^^^^^^^^^^^^^^^^^
+   |                       +++++++++++++++++
 
 error[E0271]: type mismatch resolving `<F as GenericTrait<()>>::Associated == ()`
   --> $DIR/issue-87261.rs:71:5
@@ -88,7 +88,7 @@ LL |     accepts_generic_trait(f);
 help: consider constraining the associated type `<F as GenericTrait<()>>::Associated` to `()`
    |
 LL |     F: GenericTrait<(), Associated = ()> + Foo,
-   |                       ^^^^^^^^^^^^^^^^^
+   |                       +++++++++++++++++
 
 error[E0271]: type mismatch resolving `<G as GenericTrait<()>>::Associated == ()`
   --> $DIR/issue-87261.rs:74:5
@@ -121,7 +121,7 @@ LL |     accepts_trait(returns_opaque());
 help: consider constraining the associated type `<impl Trait as Trait>::Associated` to `()`
    |
 LL | fn returns_opaque() -> impl Trait<Associated = ()> + 'static {
-   |                                  ^^^^^^^^^^^^^^^^^
+   |                                  +++++++++++++++++
 
 error[E0271]: type mismatch resolving `<impl DerivedTrait as Trait>::Associated == ()`
   --> $DIR/issue-87261.rs:82:5
@@ -140,7 +140,7 @@ LL |     accepts_trait(returns_opaque_derived());
 help: consider constraining the associated type `<impl DerivedTrait as Trait>::Associated` to `()`
    |
 LL | fn returns_opaque_derived() -> impl DerivedTrait<Associated = ()> + 'static {
-   |                                                 ^^^^^^^^^^^^^^^^^
+   |                                                 +++++++++++++++++
 
 error[E0271]: type mismatch resolving `<impl Trait+Foo as Trait>::Associated == ()`
   --> $DIR/issue-87261.rs:85:5
@@ -159,7 +159,7 @@ LL |     accepts_trait(returns_opaque_foo());
 help: consider constraining the associated type `<impl Trait+Foo as Trait>::Associated` to `()`
    |
 LL | fn returns_opaque_foo() -> impl Trait<Associated = ()> + Foo {
-   |                                      ^^^^^^^^^^^^^^^^^
+   |                                      +++++++++++++++++
 
 error[E0271]: type mismatch resolving `<impl DerivedTrait+Foo as Trait>::Associated == ()`
   --> $DIR/issue-87261.rs:88:5
@@ -195,7 +195,7 @@ LL |     accepts_generic_trait(returns_opaque_generic());
 help: consider constraining the associated type `<impl GenericTrait<()> as GenericTrait<()>>::Associated` to `()`
    |
 LL | fn returns_opaque_generic() -> impl GenericTrait<(), Associated = ()> + 'static {
-   |                                                    ^^^^^^^^^^^^^^^^^
+   |                                                    +++++++++++++++++
 
 error[E0271]: type mismatch resolving `<impl GenericTrait<()>+Foo as GenericTrait<()>>::Associated == ()`
   --> $DIR/issue-87261.rs:94:5
@@ -214,7 +214,7 @@ LL |     accepts_generic_trait(returns_opaque_generic_foo());
 help: consider constraining the associated type `<impl GenericTrait<()>+Foo as GenericTrait<()>>::Associated` to `()`
    |
 LL | fn returns_opaque_generic_foo() -> impl GenericTrait<(), Associated = ()> + Foo {
-   |                                                        ^^^^^^^^^^^^^^^^^
+   |                                                        +++++++++++++++++
 
 error[E0271]: type mismatch resolving `<impl GenericTrait<()>+GenericTrait<u8> as GenericTrait<()>>::Associated == ()`
   --> $DIR/issue-87261.rs:97:5
index 63164480a033b3bd1148e85a7d589607831f056d..340d4e2418e0f4a55d761a0c5a133f57bffa6ba0 100644 (file)
@@ -25,7 +25,7 @@ LL | type Foo<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Y<Rhs>;
 help: specify the associated types
    |
 LL | type Foo<Rhs> = dyn Add<Rhs, Output = Type> + Sub<Rhs, Output = Type> + X<Rhs, Output = Type> + Y<Rhs, A = Type>;
-   |                     ^^^^^^^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^^
+   |                     ~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
   --> $DIR/missing-associated-types.rs:15:32
@@ -61,7 +61,7 @@ LL | type Bar<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs>;
 help: specify the associated types
    |
 LL | type Bar<Rhs> = dyn Add<Rhs, Output = Type> + Sub<Rhs, Output = Type> + X<Rhs> + Z<Rhs, A = Type, B = Type, Output = Type>;
-   |                     ^^^^^^^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^^^^^^^^^            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                     ~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
   --> $DIR/missing-associated-types.rs:18:32
@@ -89,7 +89,7 @@ LL | type Baz<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Y<Rhs>;
 help: specify the associated types
    |
 LL | type Baz<Rhs> = dyn Add<Rhs, Output = Type> + Sub<Rhs, Output = Type> + Y<Rhs, A = Type>;
-   |                     ^^^^^^^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^^
+   |                     ~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
   --> $DIR/missing-associated-types.rs:21:32
@@ -113,7 +113,7 @@ LL | type Bat<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Fine<Rhs>;
 help: specify the associated types
    |
 LL | type Bat<Rhs> = dyn Add<Rhs, Output = Type> + Sub<Rhs, Output = Type> + Fine<Rhs>;
-   |                     ^^^^^^^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^^^^^^^^^
+   |                     ~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0191]: the value of the associated types `Output` (from trait `Div`), `Output` (from trait `Mul`) must be specified
   --> $DIR/missing-associated-types.rs:24:21
index 0afc380293370a54fb2e80a4a48d3f44a3e6c2ea..529b0f76c50d26d426917fd176c95071d7acb488 100644 (file)
@@ -12,7 +12,7 @@ LL | pub trait Add<Rhs = Self> {
 help: consider further restricting `Self`
    |
 LL | trait ArithmeticOps: Add<Output=Self> + Sub<Output=Self> + Mul<Output=Self> + Div<Output=Self> + Sized {}
-   |                                                                                                ^^^^^^^
+   |                                                                                                +++++++
 
 error: aborting due to previous error
 
index d0c91c4ab446687359bdce6e8c233596255981fa..44d60c1d80d881310f01d900ba00a075910bd06b 100644 (file)
@@ -15,7 +15,7 @@ LL | fn test_boxed() -> Box<impl std::future::Future<Output = u32>> {
 help: to force the async block to take ownership of `x` (and any other referenced variables), use the `move` keyword
    |
 LL |     Box::new(async move { x } )
-   |                    ^^^^
+   |                    ++++
 
 error[E0373]: async block may outlive the current function, but it borrows `x`, which is owned by the current function
   --> $DIR/async-borrowck-escaping-block-error.rs:11:11
@@ -34,7 +34,7 @@ LL |     async { *x }
 help: to force the async block to take ownership of `x` (and any other referenced variables), use the `move` keyword
    |
 LL |     async move { *x }
-   |           ^^^^
+   |           ++++
 
 error: aborting due to 2 previous errors
 
index 1bcaaf0d6b33b5d0a5a7c4169b5225a998abf497..10691aad04e811c1c63c79de81a6d0b98785e338 100644 (file)
@@ -14,7 +14,7 @@ LL |     Box::new((async || x)())
 help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
    |
 LL |     Box::new((async move || x)())
-   |                     ^^^^
+   |                     ++++
 
 error: aborting due to previous error
 
index 05d543a7e486d44ff8ee2869e52255ef3dc5b05d..56020d1b2f599b5b90dff37936c05ad234094deb 100644 (file)
@@ -7,7 +7,7 @@ LL |     pub mod await {
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     pub mod r#await {
-   |             ^^^^^^^
+   |             ~~~~~~~
 
 error: expected identifier, found keyword `await`
   --> $DIR/2018-edition-error-in-non-macro-position.rs:7:20
@@ -18,7 +18,7 @@ LL |         pub struct await;
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |         pub struct r#await;
-   |                    ^^^^^^^
+   |                    ~~~~~~~
 
 error: expected identifier, found keyword `await`
   --> $DIR/2018-edition-error-in-non-macro-position.rs:10:22
@@ -29,7 +29,7 @@ LL | use self::outer_mod::await::await;
 help: you can escape reserved keywords to use them as identifiers
    |
 LL | use self::outer_mod::r#await::await;
-   |                      ^^^^^^^
+   |                      ~~~~~~~
 
 error: expected identifier, found keyword `await`
   --> $DIR/2018-edition-error-in-non-macro-position.rs:10:29
@@ -40,7 +40,7 @@ LL | use self::outer_mod::await::await;
 help: you can escape reserved keywords to use them as identifiers
    |
 LL | use self::outer_mod::await::r#await;
-   |                             ^^^^^^^
+   |                             ~~~~~~~
 
 error: expected identifier, found keyword `await`
   --> $DIR/2018-edition-error-in-non-macro-position.rs:13:14
@@ -51,7 +51,7 @@ LL | struct Foo { await: () }
 help: you can escape reserved keywords to use them as identifiers
    |
 LL | struct Foo { r#await: () }
-   |              ^^^^^^^
+   |              ~~~~~~~
 
 error: expected identifier, found keyword `await`
   --> $DIR/2018-edition-error-in-non-macro-position.rs:16:15
@@ -62,7 +62,7 @@ LL | impl Foo { fn await() {} }
 help: you can escape reserved keywords to use them as identifiers
    |
 LL | impl Foo { fn r#await() {} }
-   |               ^^^^^^^
+   |               ~~~~~~~
 
 error: expected identifier, found keyword `await`
   --> $DIR/2018-edition-error-in-non-macro-position.rs:19:14
@@ -73,7 +73,7 @@ LL | macro_rules! await {
 help: you can escape reserved keywords to use them as identifiers
    |
 LL | macro_rules! r#await {
-   |              ^^^^^^^
+   |              ~~~~~~~
 
 error: aborting due to 7 previous errors
 
index d44d51b8fd15d11d82ecac741b01c11623a36612..e90cd644457a18843bcbf100009a918c55a19969 100644 (file)
@@ -7,7 +7,7 @@ LL |     pub mod await {
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     pub mod r#await {
-   |             ^^^^^^^
+   |             ~~~~~~~
 
 error: expected identifier, found keyword `await`
   --> $DIR/2018-edition-error.rs:6:20
@@ -18,7 +18,7 @@ LL |         pub struct await;
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |         pub struct r#await;
-   |                    ^^^^^^^
+   |                    ~~~~~~~
 
 error: expected identifier, found keyword `await`
   --> $DIR/2018-edition-error.rs:9:22
@@ -29,7 +29,7 @@ LL | use self::outer_mod::await::await;
 help: you can escape reserved keywords to use them as identifiers
    |
 LL | use self::outer_mod::r#await::await;
-   |                      ^^^^^^^
+   |                      ~~~~~~~
 
 error: expected identifier, found keyword `await`
   --> $DIR/2018-edition-error.rs:9:29
@@ -40,7 +40,7 @@ LL | use self::outer_mod::await::await;
 help: you can escape reserved keywords to use them as identifiers
    |
 LL | use self::outer_mod::await::r#await;
-   |                             ^^^^^^^
+   |                             ~~~~~~~
 
 error: expected identifier, found keyword `await`
   --> $DIR/2018-edition-error.rs:12:14
@@ -51,7 +51,7 @@ LL | macro_rules! await { () => {}; }
 help: you can escape reserved keywords to use them as identifiers
    |
 LL | macro_rules! r#await { () => {}; }
-   |              ^^^^^^^
+   |              ~~~~~~~
 
 error: expected expression, found `)`
   --> $DIR/2018-edition-error.rs:15:12
index 4dc5cafb98614ca06db17d11b52e75f3c7d6962d..76bbad26c8026443e6d869ea5fa8994c0d8a7831 100644 (file)
@@ -14,7 +14,7 @@ LL | async fn make_u32() -> u32 {
 help: consider `await`ing on the `Future`
    |
 LL |         take_u32(x.await)
-   |                   ^^^^^^
+   |                   ++++++
 
 error: aborting due to previous error
 
index 9fb2d5bc6cb42d098ce1e27ff67e5a1076854b62..60b5bfa53d77fb07cc425ff4e1e59cb8379a869d 100644 (file)
@@ -13,7 +13,7 @@ LL |     fn branch(self) -> ControlFlow<Self::Residual, Self::Output>;
 help: consider `await`ing on the `Future`
    |
 LL |     foo().await?;
-   |          ^^^^^^
+   |          ++++++
 
 error[E0277]: the `?` operator can only be applied to values that implement `Try`
   --> $DIR/issue-61076.rs:67:5
@@ -30,7 +30,7 @@ LL |     fn branch(self) -> ControlFlow<Self::Residual, Self::Output>;
 help: consider `await`ing on the `Future`
    |
 LL |     t.await?;
-   |      ^^^^^^
+   |      ++++++
 
 error[E0609]: no field `0` on type `impl Future`
   --> $DIR/issue-61076.rs:78:26
@@ -41,7 +41,7 @@ LL |     let _: i32 = tuple().0;
 help: consider `await`ing on the `Future` and access the field of its `Output`
    |
 LL |     let _: i32 = tuple().await.0;
-   |                         ^^^^^^
+   |                         ++++++
 
 error[E0609]: no field `a` on type `impl Future`
   --> $DIR/issue-61076.rs:82:28
@@ -52,7 +52,7 @@ LL |     let _: i32 = struct_().a;
 help: consider `await`ing on the `Future` and access the field of its `Output`
    |
 LL |     let _: i32 = struct_().await.a;
-   |                           ^^^^^^
+   |                           ++++++
 
 error[E0599]: no method named `method` found for opaque type `impl Future` in the current scope
   --> $DIR/issue-61076.rs:86:15
@@ -63,7 +63,7 @@ LL |     struct_().method();
 help: consider `await`ing on the `Future` and calling the method on its `Output`
    |
 LL |     struct_().await.method();
-   |               ^^^^^^
+   |               ++++++
 
 error[E0308]: mismatched types
   --> $DIR/issue-61076.rs:94:9
@@ -81,7 +81,7 @@ LL | async fn tuple() -> Tuple {
 help: consider `await`ing on the `Future`
    |
 LL |     match tuple().await {
-   |                  ^^^^^^
+   |                  ++++++
 
 error: aborting due to 6 previous errors
 
index 5f39cf6dde1258d5cc28f51e82d5a6954c143b3b..20109d4d1166a0e3331d4289ef60d2628ae1b1d9 100644 (file)
@@ -12,7 +12,7 @@ LL |     async { (ty, ty1) }
 help: consider restricting type parameter `U`
    |
 LL | fn foo<T: Send, U: std::marker::Send>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
-   |                  ^^^^^^^^^^^^^^^^^^^
+   |                  +++++++++++++++++++
 
 error: aborting due to previous error
 
index 50dfeffde7cf0a19ae2a73da0dbcf5168bcbacb4..778423578e169aab1ab9ccfa0a81c9fb3b9aface 100644 (file)
@@ -26,7 +26,7 @@ LL | struct Foo {
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL |     async fn frob(&self) {}
-   |                   ^
+   |                   +
 
 error: aborting due to 3 previous errors
 
index 51e8f61085b22987afacccefb43e68d51c1e01f8..ad0a359224147b949a660602a24b807d6c3b6e17 100644 (file)
@@ -17,7 +17,7 @@ LL |                     let x = x;
 help: consider further restricting type parameter `T`
    |
 LL |         where 'me:'async_trait, T: std::marker::Sync {
-   |                               ^^^^^^^^^^^^^^^^^^^^^^
+   |                               ++++++++++++++++++++++
 
 error: aborting due to previous error
 
index 1139175f8a07a87f0c74be1e419480f1f0f82c60..e71bcf5822808cd0c2b84bd9f98868bc72251b9b 100644 (file)
@@ -14,7 +14,7 @@ LL |         foo(|| self.bar()).await;
 help: to force the closure to take ownership of `self` (and any other referenced variables), use the `move` keyword
    |
 LL |         foo(move || self.bar()).await;
-   |             ^^^^
+   |             ++++
 
 error[E0521]: borrowed data escapes outside of associated function
   --> $DIR/issue-62097.rs:13:9
index ca42263dfed7b0622a542acfb79ab7a77dd42c09..24fd3845b4e04500ca6a4206c617f1d3c44fa9b2 100644 (file)
@@ -10,7 +10,7 @@ LL |     ) -> &dyn Foo
 help: consider using the `'a` lifetime
    |
 LL |     ) -> &'a dyn Foo
-   |          ^^^
+   |          ~~~
 
 error: aborting due to previous error
 
index 51fc34c48186c5ebf7f4fcfb396331baaa806aac..ff46bcb8983b34399dfe17292ca7b4325f3a3bd3 100644 (file)
@@ -14,7 +14,7 @@ LL | pub enum Result<T, E> {
 help: add missing generic argument
    |
 LL | async fn copy() -> Result<(), E>
-   |                             ^^^
+   |                             +++
 
 error[E0282]: type annotations needed
   --> $DIR/issue-65159.rs:8:5
index 22ebd86d85ca13847e60b1a5c5f14972c20a7115..29aa8372f87d087e039cfd225ba88c964cb48051 100644 (file)
@@ -12,7 +12,7 @@ LL | |     });
 help: to force the async block to take ownership of `room_ref` (and any other referenced variables), use the `move` keyword
    |
 LL |     let gameloop_handle = spawn(async move {
-   |                                       ^^^^
+   |                                       ++++
 
 error: aborting due to previous error
 
index 0714e666d387f4baa323f9ef698355efe75f4360..c47ec5dddb6e2b6bb0327409b8245ca3b6a303c7 100644 (file)
@@ -15,7 +15,7 @@ LL |     fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Outpu
 help: consider wrapping the receiver expression with the appropriate type
    |
 LL |         Pin::new(&mut self.sleep).poll(cx)
-   |         ^^^^^^^^^^^^^           ^
+   |         +++++++++++++           +
 
 error: aborting due to previous error
 
index 9d742049046b22a674196b19be37fb311af2a63d..630ae4b539f99c73e1bb2b1bd96fe6b41cf95dde 100644 (file)
@@ -14,7 +14,7 @@ LL | async fn make_u32() -> u32 {
 help: consider `await`ing on the `Future`
    |
 LL |         take_u32(x.await)
-   |                   ^^^^^^
+   |                   ++++++
 
 error: aborting due to previous error
 
index 890f66c58d0f89fce20840d8681d2fac1551fd95..08868a04657c436d8d619488534302b49a506f4c 100644 (file)
@@ -14,7 +14,7 @@ LL | async fn make_u32() -> u32 {
 help: consider `await`ing on the `Future`
    |
 LL |     take_u32(x.await)
-   |               ^^^^^^
+   |               ++++++
 
 error[E0308]: mismatched types
   --> $DIR/suggest-missing-await.rs:22:5
@@ -32,11 +32,11 @@ LL | async fn dummy() {}
 help: consider `await`ing on the `Future`
    |
 LL |     dummy().await
-   |            ^^^^^^
+   |            ++++++
 help: consider using a semicolon here
    |
 LL |     dummy();
-   |            ^
+   |            +
 
 error: aborting due to 2 previous errors
 
index 01a07ad3b0ee461fe9bbcd15c4da9963cc470118..422107867f7f995e0f47c80f0c954568405219aa 100644 (file)
@@ -7,7 +7,7 @@ LL | #[rustc_dummy = b"ffi.rs"]
 help: if you meant to use the UTF-8 encoding of 'ffi', use \xHH escapes
    |
 LL | #[rustc_dummy = b"/xEF/xAC/x83.rs"]
-   |                   ^^^^^^^^^^^^
+   |                   ~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 02b0488488c555154537ef7829870465590c6071..1651f70d5cde739dcb4b4d64463fe1625485b1a4 100644 (file)
@@ -9,7 +9,7 @@ LL |         x % 2 == 0
 help: `%` can be used on `{integer}`, you can dereference `x`
    |
 LL |         *x % 2 == 0
-   |         ^
+   |         +
 
 error: aborting due to previous error
 
index ac0a51d6ae92e8c1e29ebb9b19bf606bc2d0bbea..c734f8c1e17e3471dd2e82daf9bc2d5bc0cf2dce 100644 (file)
@@ -16,7 +16,7 @@ LL |     fn add(self, rhs: Rhs) -> Self::Output;
 help: consider further restricting this bound
    |
 LL | fn add<A: Add<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
-   |                             ^^^^^^
+   |                             ++++++
 
 error[E0382]: use of moved value: `rhs`
   --> $DIR/binop-consume-args.rs:8:10
@@ -32,7 +32,7 @@ LL |     drop(rhs);
 help: consider restricting type parameter `B`
    |
 LL | fn add<A: Add<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
-   |                               ^^^^^^
+   |                               ++++++
 
 error[E0382]: use of moved value: `lhs`
   --> $DIR/binop-consume-args.rs:13:10
@@ -52,7 +52,7 @@ LL |     fn sub(self, rhs: Rhs) -> Self::Output;
 help: consider further restricting this bound
    |
 LL | fn sub<A: Sub<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
-   |                             ^^^^^^
+   |                             ++++++
 
 error[E0382]: use of moved value: `rhs`
   --> $DIR/binop-consume-args.rs:14:10
@@ -68,7 +68,7 @@ LL |     drop(rhs);
 help: consider restricting type parameter `B`
    |
 LL | fn sub<A: Sub<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
-   |                               ^^^^^^
+   |                               ++++++
 
 error[E0382]: use of moved value: `lhs`
   --> $DIR/binop-consume-args.rs:19:10
@@ -88,7 +88,7 @@ LL |     fn mul(self, rhs: Rhs) -> Self::Output;
 help: consider further restricting this bound
    |
 LL | fn mul<A: Mul<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
-   |                             ^^^^^^
+   |                             ++++++
 
 error[E0382]: use of moved value: `rhs`
   --> $DIR/binop-consume-args.rs:20:10
@@ -104,7 +104,7 @@ LL |     drop(rhs);
 help: consider restricting type parameter `B`
    |
 LL | fn mul<A: Mul<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
-   |                               ^^^^^^
+   |                               ++++++
 
 error[E0382]: use of moved value: `lhs`
   --> $DIR/binop-consume-args.rs:25:10
@@ -124,7 +124,7 @@ LL |     fn div(self, rhs: Rhs) -> Self::Output;
 help: consider further restricting this bound
    |
 LL | fn div<A: Div<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
-   |                             ^^^^^^
+   |                             ++++++
 
 error[E0382]: use of moved value: `rhs`
   --> $DIR/binop-consume-args.rs:26:10
@@ -140,7 +140,7 @@ LL |     drop(rhs);
 help: consider restricting type parameter `B`
    |
 LL | fn div<A: Div<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
-   |                               ^^^^^^
+   |                               ++++++
 
 error[E0382]: use of moved value: `lhs`
   --> $DIR/binop-consume-args.rs:31:10
@@ -160,7 +160,7 @@ LL |     fn rem(self, rhs: Rhs) -> Self::Output;
 help: consider further restricting this bound
    |
 LL | fn rem<A: Rem<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
-   |                             ^^^^^^
+   |                             ++++++
 
 error[E0382]: use of moved value: `rhs`
   --> $DIR/binop-consume-args.rs:32:10
@@ -176,7 +176,7 @@ LL |     drop(rhs);
 help: consider restricting type parameter `B`
    |
 LL | fn rem<A: Rem<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
-   |                               ^^^^^^
+   |                               ++++++
 
 error[E0382]: use of moved value: `lhs`
   --> $DIR/binop-consume-args.rs:37:10
@@ -196,7 +196,7 @@ LL |     fn bitand(self, rhs: Rhs) -> Self::Output;
 help: consider further restricting this bound
    |
 LL | fn bitand<A: BitAnd<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
-   |                                   ^^^^^^
+   |                                   ++++++
 
 error[E0382]: use of moved value: `rhs`
   --> $DIR/binop-consume-args.rs:38:10
@@ -212,7 +212,7 @@ LL |     drop(rhs);
 help: consider restricting type parameter `B`
    |
 LL | fn bitand<A: BitAnd<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
-   |                                     ^^^^^^
+   |                                     ++++++
 
 error[E0382]: use of moved value: `lhs`
   --> $DIR/binop-consume-args.rs:43:10
@@ -232,7 +232,7 @@ LL |     fn bitor(self, rhs: Rhs) -> Self::Output;
 help: consider further restricting this bound
    |
 LL | fn bitor<A: BitOr<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
-   |                                 ^^^^^^
+   |                                 ++++++
 
 error[E0382]: use of moved value: `rhs`
   --> $DIR/binop-consume-args.rs:44:10
@@ -248,7 +248,7 @@ LL |     drop(rhs);
 help: consider restricting type parameter `B`
    |
 LL | fn bitor<A: BitOr<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
-   |                                   ^^^^^^
+   |                                   ++++++
 
 error[E0382]: use of moved value: `lhs`
   --> $DIR/binop-consume-args.rs:49:10
@@ -268,7 +268,7 @@ LL |     fn bitxor(self, rhs: Rhs) -> Self::Output;
 help: consider further restricting this bound
    |
 LL | fn bitxor<A: BitXor<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
-   |                                   ^^^^^^
+   |                                   ++++++
 
 error[E0382]: use of moved value: `rhs`
   --> $DIR/binop-consume-args.rs:50:10
@@ -284,7 +284,7 @@ LL |     drop(rhs);
 help: consider restricting type parameter `B`
    |
 LL | fn bitxor<A: BitXor<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
-   |                                     ^^^^^^
+   |                                     ++++++
 
 error[E0382]: use of moved value: `lhs`
   --> $DIR/binop-consume-args.rs:55:10
@@ -304,7 +304,7 @@ LL |     fn shl(self, rhs: Rhs) -> Self::Output;
 help: consider further restricting this bound
    |
 LL | fn shl<A: Shl<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
-   |                             ^^^^^^
+   |                             ++++++
 
 error[E0382]: use of moved value: `rhs`
   --> $DIR/binop-consume-args.rs:56:10
@@ -320,7 +320,7 @@ LL |     drop(rhs);
 help: consider restricting type parameter `B`
    |
 LL | fn shl<A: Shl<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
-   |                               ^^^^^^
+   |                               ++++++
 
 error[E0382]: use of moved value: `lhs`
   --> $DIR/binop-consume-args.rs:61:10
@@ -340,7 +340,7 @@ LL |     fn shr(self, rhs: Rhs) -> Self::Output;
 help: consider further restricting this bound
    |
 LL | fn shr<A: Shr<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
-   |                             ^^^^^^
+   |                             ++++++
 
 error[E0382]: use of moved value: `rhs`
   --> $DIR/binop-consume-args.rs:62:10
@@ -356,7 +356,7 @@ LL |     drop(rhs);
 help: consider restricting type parameter `B`
    |
 LL | fn shr<A: Shr<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
-   |                               ^^^^^^
+   |                               ++++++
 
 error: aborting due to 20 previous errors
 
index fa47de9a2cfeb1b45bfadbeb97e3361eafd9a72a..7721f8827db8772b417f370794c94a619839f71f 100644 (file)
@@ -19,7 +19,7 @@ LL |     fn add(self, rhs: Rhs) -> Self::Output;
 help: consider further restricting this bound
    |
 LL | fn double_move<T: Add<Output=()> + Copy>(x: T) {
-   |                                  ^^^^^^
+   |                                  ++++++
 
 error[E0382]: borrow of moved value: `x`
   --> $DIR/binop-move-semantics.rs:14:5
@@ -35,7 +35,7 @@ LL |     x.clone();
 help: consider further restricting this bound
    |
 LL | fn move_then_borrow<T: Add<Output=()> + Clone + Copy>(x: T) {
-   |                                               ^^^^^^
+   |                                               ++++++
 
 error[E0505]: cannot move out of `x` because it is borrowed
   --> $DIR/binop-move-semantics.rs:21:5
index d897bf56e108b3ac023640f45bd35e4bb16e0b19..68b3f4c1ae2fc4de2852d8c5ea48d6c9edafe743 100644 (file)
@@ -10,7 +10,7 @@ LL |         use foo::Bar;
 help: you can use `as` to change the binding name of the import
    |
 LL |         use foo::Bar as OtherBar;
-   |             ^^^^^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index f17d7843cd71557f2343765334b3e3f05d19330f..12b583ea3e9c0ba96703fbcce111b549d98d7ae8 100644 (file)
@@ -11,7 +11,7 @@ LL | use foo::foo;
 help: you can use `as` to change the binding name of the import
    |
 LL | use foo::foo as other_foo;
-   |     ^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index ef3e2da81b28c26993bd6ffdbf2027c0842cd111..7081b5106ff9621598247acfc2b2698b2ded73fb 100644 (file)
@@ -10,8 +10,9 @@ LL |     &panic!()
               found reference `&_`
 help: consider removing the borrow
    |
-LL |     panic!()
-   |    --
+LL -     &panic!()
+LL +     panic!()
+   | 
 
 error: aborting due to previous error
 
index 4fcd0ee2c48e28e0e89eab3ee9db0d9859f950bf..4acb955a8e7a407617f1f95a212569c130710e86 100644 (file)
@@ -7,11 +7,11 @@ LL |     foo()
 help: consider using a semicolon here
    |
 LL |     foo();
-   |          ^
+   |          +
 help: try adding a return type
    |
 LL | fn bar() -> usize {
-   |          ^^^^^^^^
+   |          ++++++++
 
 error: aborting due to previous error
 
index 161e4610d614fa2f2ec138bbdc6bfabe7033472d..acf6b37b773964db95f2901f4094befe71a5b081 100644 (file)
@@ -14,7 +14,7 @@ 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
 
index b07db6e12ad153242d91914d1ac6e84c09e25e86..814042539a22fa078ea6626e1fb81a152b4b15cd 100644 (file)
@@ -14,7 +14,7 @@ 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
 
index a345c1238f02c3bdb2322c33b72d7fc83dea2fd3..a865812cb4a7c4708fc90d1354659f21fea9ffd6 100644 (file)
@@ -12,8 +12,8 @@ LL |                   Foo { string: b }] => {
    = note: move occurs because these variables have types that don't implement the `Copy` trait
 help: consider removing the `&`
    |
-LL |                 [Foo { string: a },
-LL |                   Foo { string: b }] => {
+LL ~                 [Foo { string: a },
+LL ~                   Foo { string: b }] => {
    |
 
 error: aborting due to previous error
index bc1721944fbbb6de8b7b1da9112928d3782de7fe..d46ef126da481a9c0ecc8606efd727d2349db5f8 100644 (file)
@@ -34,7 +34,7 @@ LL |     f(1, 2);
 help: consider further restricting this bound
    |
 LL | fn c<F:FnOnce(isize, isize) -> isize + Copy>(f: F) {
-   |                                      ^^^^^^
+   |                                      ++++++
 
 error: aborting due to 3 previous errors
 
index b4b3bc1ba2b75720eae89dd4e7fd30f2ae0ddd73..36f8f5c9ad73970c810d74edd4079dfb1c6f084b 100644 (file)
@@ -36,12 +36,12 @@ LL |         &mut [_a,
    |
 help: consider removing the `&mut`
    |
-LL |         [_a,
-LL |
-LL |
-LL |
-LL |             ..
-LL |         ] => {
+LL ~         [_a,
+LL +
+LL +
+LL +
+LL +             ..
+LL ~         ] => {
    |
 
 error[E0508]: cannot move out of type `[Box<isize>]`, a non-copy slice
@@ -68,9 +68,9 @@ LL |          _b] => {}
    |
 help: consider removing the `&mut`
    |
-LL |         [
-LL |
-LL |          _b] => {}
+LL ~         [
+LL +
+LL ~          _b] => {}
    |
 
 error[E0508]: cannot move out of type `[Box<isize>]`, a non-copy slice
index dd3090b30f01207bfa07c081e5b0a7bc95a23fac..b20cc6d8cf59f23e2fa5f5ff43cae913eb2ec2ea 100644 (file)
@@ -8,7 +8,7 @@ LL |         if let Some(thing) = maybe {
 help: borrow this field in the pattern to avoid moving `maybe.0`
    |
 LL |         if let Some(ref thing) = maybe {
-   |                     ^^^
+   |                     +++
 
 error: aborting due to previous error
 
index 0d506a0956d21abbc50e2360995d6e5e737ab0c6..4bd0667304397e0a7b8eb91280cc183c52bcf03b 100644 (file)
@@ -26,7 +26,7 @@ LL | struct LockedMarket<T>(T);
 help: add missing generic argument
    |
 LL | async fn buy_lock(generator: &Mutex<MarketMultiplier>) -> LockedMarket<'_, T> {
-   |                                                                          ^^^
+   |                                                                          +++
 
 error[E0515]: cannot return value referencing temporary value
   --> $DIR/issue-82126-mismatched-subst-and-hir.rs:19:5
index 9373e4d95fccdd83c88df95d2e30c7050870206f..c6931ba72579bf74db5e2ffecb6be411512b750b 100644 (file)
@@ -8,7 +8,7 @@ LL |         if let Some(mut _x) = opt {}
 help: borrow this field in the pattern to avoid moving `opt.0`
    |
 LL |         if let Some(ref mut _x) = opt {}
-   |                     ^^^
+   |                     +++
 
 error: aborting due to previous error
 
index 17bc5492756e6fd47d9ec486e2fc979268b81b4b..2bf34b32176c0c481d1fe2aa5d27a168ce3d3084 100644 (file)
@@ -11,7 +11,7 @@ LL |     foo(s);
 help: borrow this field in the pattern to avoid moving `s.0`
    |
 LL |     if let Some(ref mut x) = s {
-   |                 ^^^
+   |                 +++
 
 error[E0382]: use of partially moved value: `e`
   --> $DIR/move-in-pattern-mut.rs:22:9
@@ -26,7 +26,7 @@ LL |     bar(e);
 help: borrow this field in the pattern to avoid moving `e.s`
    |
 LL |     let E::V { s: ref mut x } = e;
-   |                   ^^^
+   |                   +++
 
 error: aborting due to 2 previous errors
 
index 21ba92f1fc41cbac70c52b26758e437bee2a232a..6b84c0032cdde0f8e4d158ff7bffef3e45878155 100644 (file)
@@ -11,7 +11,7 @@ LL |     foo(s);
 help: borrow this field in the pattern to avoid moving `s.0`
    |
 LL |     if let Some(ref x) = s {
-   |                 ^^^
+   |                 +++
 
 error[E0382]: use of partially moved value: `e`
   --> $DIR/move-in-pattern.rs:23:9
@@ -26,7 +26,7 @@ LL |     bar(e);
 help: borrow this field in the pattern to avoid moving `e.s`
    |
 LL |     let E::V { s: ref x } = e;
-   |                   ^^^
+   |                   +++
 
 error: aborting due to 2 previous errors
 
index fa1b741394acb55b1a2fff931bcf2506698e7496..8b05b2388227389d4c77108a00351e0724c0771a 100644 (file)
@@ -10,7 +10,7 @@ LL |         Other::handle(value);
 help: consider creating a fresh reborrow of `value` here
    |
 LL |         Other::handle(&mut *value);
-   |                       ^^^^^^
+   |                       ++++++
 
 error: aborting due to previous error
 
index 14e28174a295d8b85b0c8af361d6f60a0a5668c2..ebad4b023563e4a9dd153fb6e34a6fa54886bede 100644 (file)
@@ -8,7 +8,7 @@ LL |     println!("{:?}", t);
 help: consider further restricting this bound
    |
 LL | fn test_impl(t: impl Sized + std::fmt::Debug) {
-   |                            ^^^^^^^^^^^^^^^^^
+   |                            +++++++++++++++++
 
 error[E0277]: `T` doesn't implement `Debug`
   --> $DIR/bound-suggestions.rs:15:22
@@ -20,7 +20,7 @@ LL |     println!("{:?}", t);
 help: consider restricting type parameter `T`
    |
 LL | fn test_no_bounds<T: std::fmt::Debug>(t: T) {
-   |                    ^^^^^^^^^^^^^^^^^
+   |                    +++++++++++++++++
 
 error[E0277]: `T` doesn't implement `Debug`
   --> $DIR/bound-suggestions.rs:21:22
@@ -32,7 +32,7 @@ LL |     println!("{:?}", t);
 help: consider further restricting this bound
    |
 LL | fn test_one_bound<T: Sized + std::fmt::Debug>(t: T) {
-   |                            ^^^^^^^^^^^^^^^^^
+   |                            +++++++++++++++++
 
 error[E0277]: `Y` doesn't implement `Debug`
   --> $DIR/bound-suggestions.rs:27:30
@@ -44,7 +44,7 @@ LL |     println!("{:?} {:?}", x, y);
 help: consider further restricting type parameter `Y`
    |
 LL | fn test_no_bounds_where<X, Y>(x: X, y: Y) where X: std::fmt::Debug, Y: std::fmt::Debug {
-   |                                                                   ^^^^^^^^^^^^^^^^^^^^
+   |                                                                   ~~~~~~~~~~~~~~~~~~~~
 
 error[E0277]: `X` doesn't implement `Debug`
   --> $DIR/bound-suggestions.rs:33:22
@@ -56,7 +56,7 @@ LL |     println!("{:?}", x);
 help: consider further restricting this bound
    |
 LL | fn test_one_bound_where<X>(x: X) where X: Sized + std::fmt::Debug {
-   |                                                 ^^^^^^^^^^^^^^^^^
+   |                                                 +++++++++++++++++
 
 error[E0277]: `X` doesn't implement `Debug`
   --> $DIR/bound-suggestions.rs:39:22
@@ -68,7 +68,7 @@ LL |     println!("{:?}", x);
 help: consider further restricting type parameter `X`
    |
 LL | fn test_many_bounds_where<X>(x: X) where X: Sized, X: Sized, X: std::fmt::Debug {
-   |                                                            ^^^^^^^^^^^^^^^^^^^^
+   |                                                            ++++++++++++++++++++
 
 error[E0277]: the size for values of type `Self` cannot be known at compilation time
   --> $DIR/bound-suggestions.rs:44:46
@@ -84,7 +84,7 @@ LL | pub const fn size_of<T>() -> usize {
 help: consider further restricting `Self`
    |
 LL | trait Foo<T>: Sized {
-   |             ^^^^^^^
+   |             +++++++
 
 error[E0277]: the size for values of type `Self` cannot be known at compilation time
   --> $DIR/bound-suggestions.rs:49:46
@@ -100,7 +100,7 @@ LL | pub const fn size_of<T>() -> usize {
 help: consider further restricting `Self`
    |
 LL | trait Bar: std::fmt::Display + Sized {
-   |                              ^^^^^^^
+   |                              +++++++
 
 error[E0277]: the size for values of type `Self` cannot be known at compilation time
   --> $DIR/bound-suggestions.rs:54:46
@@ -116,7 +116,7 @@ LL | pub const fn size_of<T>() -> usize {
 help: consider further restricting `Self`
    |
 LL | trait Baz: Sized where Self: std::fmt::Display {
-   |          ^^^^^^^
+   |          +++++++
 
 error[E0277]: the size for values of type `Self` cannot be known at compilation time
   --> $DIR/bound-suggestions.rs:59:46
@@ -132,7 +132,7 @@ LL | pub const fn size_of<T>() -> usize {
 help: consider further restricting `Self`
    |
 LL | trait Qux<T>: Sized where Self: std::fmt::Display {
-   |             ^^^^^^^
+   |             +++++++
 
 error[E0277]: the size for values of type `Self` cannot be known at compilation time
   --> $DIR/bound-suggestions.rs:64:46
@@ -148,7 +148,7 @@ LL | pub const fn size_of<T>() -> usize {
 help: consider further restricting `Self`
    |
 LL | trait Bat<T>: std::fmt::Display + Sized {
-   |                                 ^^^^^^^
+   |                                 +++++++
 
 error: aborting due to 11 previous errors
 
index 7ff986ec38109d78b3829d5cff702a0f851bf95a..d0df241f747ac5ae3b7cd610c77d2498d53d7a73 100644 (file)
@@ -11,7 +11,7 @@ LL | impl <T: Sync+'static> Foo for (T,) { }
 help: consider further restricting this bound
    |
 LL | impl <T: Sync+'static + std::marker::Send> Foo for (T,) { }
-   |                       ^^^^^^^^^^^^^^^^^^^
+   |                       +++++++++++++++++++
 
 error[E0277]: `T` cannot be shared between threads safely
   --> $DIR/builtin-superkinds-double-superkind.rs:9:16
@@ -26,7 +26,7 @@ LL | impl <T: Send> Foo for (T,T) { }
 help: consider further restricting this bound
    |
 LL | impl <T: Send + std::marker::Sync> Foo for (T,T) { }
-   |               ^^^^^^^^^^^^^^^^^^^
+   |               +++++++++++++++++++
 
 error: aborting due to 2 previous errors
 
index 64946c316cd1e78ac69f81884d6b1db709bdb4fc..8233e781d697286bcc973807867ce2e9ab87ea59 100644 (file)
@@ -17,7 +17,7 @@ LL | struct X<T>(T);
 help: consider further restricting this bound
    |
 LL | impl <T:Sync+'static + std::marker::Send> RequiresRequiresShareAndSend for X<T> { }
-   |                      ^^^^^^^^^^^^^^^^^^^
+   |                      +++++++++++++++++++
 
 error: aborting due to previous error
 
index ad80b3fa8d11f39b97a2ad145e7162d0a988ec65..78121ad18ed74e8a108d420a468de7f3814d4268 100644 (file)
@@ -10,7 +10,7 @@ LL | impl <T: Sync+'static> Foo for T { }
 help: consider further restricting this bound
    |
 LL | impl <T: Sync+'static + std::marker::Send> Foo for T { }
-   |                       ^^^^^^^^^^^^^^^^^^^
+   |                       +++++++++++++++++++
 
 error: aborting due to previous error
 
index b399f729f6506fb0bd0577bbf1a0ed68639a2391..793068138a9ac296661b4798ac1b2ad823e29015 100644 (file)
@@ -72,11 +72,11 @@ LL | pub trait Fn<Args>: FnMut<Args> {
 help: a trait with a similar name exists
    |
 LL |     self , ... ,   self ,   self , ... ) where Fn : FnOnce ( & 'a & 'b usize ) {
-   |                                                ^^
+   |                                                ~~
 help: you might be missing a type parameter
    |
 LL | fn ordering4 < 'a , 'b, F     > ( a :            ,   self , self ,   self ,
-   |                       ^^^
+   |                       +++
 
 error[E0491]: in type `&'a &'b usize`, reference has a longer lifetime than the data it references
   --> $DIR/issue-86053-1.rs:11:52
index 4626a4bc2dcff84d7599d26c4aed6369f37af457..bb15cc000a46bf73d7c29030dbb037604d3cbcf8 100644 (file)
@@ -8,7 +8,7 @@ LL | ) -> &usize {
 help: consider using the `'static` lifetime
    |
 LL | ) -> &'static usize {
-   |      ^^^^^^^^
+   |      ~~~~~~~~
 
 error: aborting due to previous error
 
index 90cfa263c5224d29bc0402ae08627d67763667ea..025970e54c84ad58abe70e07edf22c4ab3decd3a 100644 (file)
@@ -7,7 +7,7 @@ LL |     let _pointer_to_something = something as *const Something;
 help: consider borrowing the value
    |
 LL |     let _pointer_to_something = &something as *const Something;
-   |                                 ^
+   |                                 +
 
 error[E0605]: non-primitive cast: `Something` as `*mut Something`
   --> $DIR/issue-84213.rs:14:37
@@ -18,7 +18,7 @@ LL |     let _mut_pointer_to_something = something as *mut Something;
 help: consider borrowing the value
    |
 LL |     let _mut_pointer_to_something = &mut something as *mut Something;
-   |                                     ^^^^
+   |                                     ++++
 
 error: aborting due to 2 previous errors
 
index 311a1b84e0c80dd602d6fb18fdf66257b7b84984..bb00465758a4599de8d716969bf2a334989e8e5c 100644 (file)
@@ -15,7 +15,7 @@ LL | fn foo () -> impl FnMut()->() {
 help: to force the closure to take ownership of `p` (and any other referenced variables), use the `move` keyword
    |
 LL |     let mut c = move || {
-   |                 ^^^^
+   |                 ++++
 
 error: aborting due to previous error
 
index 9c954b1465d837e5a3d8293382a76323d92eae2b..e60d01f0c2caab9b4ec3de6370e4c65e223ce05d 100644 (file)
@@ -15,12 +15,12 @@ LL | #![deny(rust_2021_incompatible_closure_captures)]
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `fptr` to be fully captured
    |
-LL |     thread::spawn(move || { let _ = &fptr; unsafe {
-LL |
-LL |
-LL |
-LL |
-LL |         *fptr.0 = 20;
+LL ~     thread::spawn(move || { let _ = &fptr; unsafe {
+LL +
+LL +
+LL +
+LL +
+LL +         *fptr.0 = 20;
  ...
 
 error: changes to closure capture in Rust 2021 will affect `Sync`, `Send` trait implementation for closure
@@ -35,12 +35,12 @@ LL |         *fptr.0.0 = 20;
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `fptr` to be fully captured
    |
-LL |     thread::spawn(move || { let _ = &fptr; unsafe {
-LL |
-LL |
-LL |
-LL |
-LL |         *fptr.0.0 = 20;
+LL ~     thread::spawn(move || { let _ = &fptr; unsafe {
+LL +
+LL +
+LL +
+LL +
+LL +         *fptr.0.0 = 20;
  ...
 
 error: changes to closure capture in Rust 2021 will affect `Clone` trait implementation for closure and drop order
@@ -58,12 +58,12 @@ LL | }
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `f` to be fully captured
    |
-LL |     let c = || { let _ = &f; 
-LL |
-LL |
-LL |
-LL |
-LL |         let f_1 = f.1;
+LL ~     let c = || { let _ = &f; 
+LL +
+LL +
+LL +
+LL +
+LL +         let f_1 = f.1;
  ...
 
 error: aborting due to 3 previous errors
index e9e4794cff5f797c76a2af945130ebf14ebc871a..f4677297611578cda27dfad437a8c3cdc99b5c8f 100644 (file)
@@ -28,12 +28,12 @@ LL | #![deny(rust_2021_incompatible_closure_captures)]
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `t`, `t1`, `t2` to be fully captured
    |
-LL |     let c = || { let _ = (&t, &t1, &t2); 
-LL |
-LL |
-LL |
-LL | 
-LL |         let _t = t.0;
+LL ~     let c = || { let _ = (&t, &t1, &t2); 
+LL +
+LL +
+LL +
+LL + 
+LL +         let _t = t.0;
  ...
 
 error: changes to closure capture in Rust 2021 will affect drop order
@@ -57,12 +57,12 @@ LL | }
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `t`, `t1` to be fully captured
    |
-LL |     let c = || { let _ = (&t, &t1); 
-LL |
-LL |
-LL |
-LL |         let _t = t.0;
-LL |
+LL ~     let c = || { let _ = (&t, &t1); 
+LL +
+LL +
+LL +
+LL +         let _t = t.0;
+LL +
  ...
 
 error: changes to closure capture in Rust 2021 will affect drop order
@@ -80,12 +80,12 @@ LL | }
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `t` to be fully captured
    |
-LL |     let c = || { let _ = &t; 
-LL |
-LL |
-LL |
-LL |         let _t = t.0;
-LL |
+LL ~     let c = || { let _ = &t; 
+LL +
+LL +
+LL +
+LL +         let _t = t.0;
+LL +
  ...
 
 error: changes to closure capture in Rust 2021 will affect drop order
@@ -103,12 +103,12 @@ LL | }
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `t` to be fully captured
    |
-LL |     let c = || { let _ = &t; 
-LL |
-LL |
-LL |
-LL |         let _t = t.0;
-LL |
+LL ~     let c = || { let _ = &t; 
+LL +
+LL +
+LL +
+LL +         let _t = t.0;
+LL +
  ...
 
 error: changes to closure capture in Rust 2021 will affect drop order
@@ -126,12 +126,12 @@ LL | }
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `t` to be fully captured
    |
-LL |     let c = || { let _ = &t; 
-LL |
-LL |
-LL |
-LL |         let _t = t.0;
-LL |
+LL ~     let c = || { let _ = &t; 
+LL +
+LL +
+LL +
+LL +         let _t = t.0;
+LL +
  ...
 
 error: changes to closure capture in Rust 2021 will affect drop order
@@ -154,12 +154,12 @@ LL | }
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `t1`, `t` to be fully captured
    |
-LL |     let c = move || { let _ = (&t1, &t); 
-LL |
-LL |
-LL |
-LL |         println!("{} {}", t1.1, t.1);
-LL |
+LL ~     let c = move || { let _ = (&t1, &t); 
+LL +
+LL +
+LL +
+LL +         println!("{} {}", t1.1, t.1);
+LL +
  ...
 
 error: changes to closure capture in Rust 2021 will affect drop order
@@ -177,12 +177,12 @@ LL | }
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `t` to be fully captured
    |
-LL |     let c = || { let _ = &t; 
-LL |
-LL |
-LL |
-LL |         let _t = t.0;
-LL |
+LL ~     let c = || { let _ = &t; 
+LL +
+LL +
+LL +
+LL +         let _t = t.0;
+LL +
  ...
 
 error: aborting due to 7 previous errors
index 1e97ca34d162e3f3c58f4ac27514a3f9701ab15c..2de6ffb0673233befc51e5481aa1bf3197db097c 100644 (file)
@@ -18,12 +18,12 @@ LL | #![deny(rust_2021_incompatible_closure_captures)]
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `t` to be fully captured
    |
-LL |     let c = || { let _ = &t; 
-LL |
-LL |
-LL |
-LL |         let _t = t.0;
-LL |
+LL ~     let c = || { let _ = &t; 
+LL +
+LL +
+LL +
+LL +         let _t = t.0;
+LL +
  ...
 
 error: changes to closure capture in Rust 2021 will affect drop order
@@ -41,12 +41,12 @@ LL | }
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `t` to be fully captured
    |
-LL |     let c = move || { let _ = &t; 
-LL |
-LL |
-LL |
-LL |         let _t = t.1;
-LL |
+LL ~     let c = move || { let _ = &t; 
+LL +
+LL +
+LL +
+LL +         let _t = t.1;
+LL +
  ...
 
 error: aborting due to 2 previous errors
index f8f72d1580ca9df798300436768020562789e41e..e8e1eb03e93a4c30af7044e16d24ea21a65524bf 100644 (file)
@@ -18,12 +18,12 @@ LL | #![deny(rust_2021_incompatible_closure_captures)]
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `t` to be fully captured
    |
-LL |     let c = || { let _ = &t; 
-LL |
-LL |
-LL |
-LL |         let _t = t.0;
-LL |
+LL ~     let c = || { let _ = &t; 
+LL +
+LL +
+LL +
+LL +         let _t = t.0;
+LL +
  ...
 
 error: changes to closure capture in Rust 2021 will affect drop order
@@ -41,7 +41,7 @@ LL | }
 help: add a dummy let to cause `t` to be fully captured
    |
 LL |     let c = || { let _ = &t; t.0 };
-   |                ^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 2 previous errors
 
index 6ee0d0d252aba783b11a1747133ca92481651fbe..acd9fb654e5e0b18ce829578ddfed0e3bea0afeb 100644 (file)
@@ -15,12 +15,12 @@ LL | #![deny(rust_2021_incompatible_closure_captures)]
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `f` to be fully captured
    |
-LL |     let result = panic::catch_unwind(move || { let _ = &f; 
-LL |
-LL |
-LL |
-LL |
-LL |         f.0()
+LL ~     let result = panic::catch_unwind(move || { let _ = &f; 
+LL +
+LL +
+LL +
+LL +
+LL +         f.0()
  ...
 
 error: aborting due to previous error
index 8a42683c1df9f9df0c93f4f6a89c0a200117560c..b347516c95ce468738f3a5ffc2aa164dc70b1245 100644 (file)
@@ -21,12 +21,12 @@ LL | #![deny(rust_2021_incompatible_closure_captures)]
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `f1`, `f2` to be fully captured
    |
-LL |     let c = || { let _ = (&f1, &f2); 
-LL |
-LL |
-LL |
-LL |
-LL |         let _f_1 = f1.0;
+LL ~     let c = || { let _ = (&f1, &f2); 
+LL +
+LL +
+LL +
+LL +
+LL +         let _f_1 = f1.0;
  ...
 
 error: changes to closure capture in Rust 2021 will affect `Clone` trait implementation for closure
@@ -41,12 +41,12 @@ LL |         let _f_1 = f1.0;
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `f1` to be fully captured
    |
-LL |     let c = || { let _ = &f1; 
-LL |
-LL |
-LL |
-LL |
-LL |         let _f_1 = f1.0;
+LL ~     let c = || { let _ = &f1; 
+LL +
+LL +
+LL +
+LL +
+LL +         let _f_1 = f1.0;
  ...
 
 error: changes to closure capture in Rust 2021 will affect `Clone` trait implementation for closure
@@ -67,12 +67,12 @@ LL |         let _f_2 = f1.2;
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `f1` to be fully captured
    |
-LL |     let c = || { let _ = &f1; 
-LL |
-LL |
-LL |
-LL |
-LL |
+LL ~     let c = || { let _ = &f1; 
+LL +
+LL +
+LL +
+LL +
+LL +
  ...
 
 error: changes to closure capture in Rust 2021 will affect `Clone` trait implementation for closure and drop order
@@ -96,12 +96,12 @@ LL | }
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `f1` to be fully captured
    |
-LL |     let c = || { let _ = &f1; 
-LL |
-LL |
-LL |
-LL |
-LL |         let _f_0 = f1.0;
+LL ~     let c = || { let _ = &f1; 
+LL +
+LL +
+LL +
+LL +
+LL +         let _f_0 = f1.0;
  ...
 
 error: changes to closure capture in Rust 2021 will affect `Sync`, `Send` trait implementation for closure
@@ -122,12 +122,12 @@ LL |         *fptr2.0 = 20;
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `fptr1`, `fptr2` to be fully captured
    |
-LL |     thread::spawn(move || { let _ = (&fptr1, &fptr2); unsafe {
-LL |
-LL |
-LL |
-LL |
-LL |
+LL ~     thread::spawn(move || { let _ = (&fptr1, &fptr2); unsafe {
+LL +
+LL +
+LL +
+LL +
+LL +
  ...
 
 error: aborting due to 5 previous errors
index 5bf73ccc55400edbdc5f1c2a98ab8735cd4608f5..494d7e8e84236a07ae00608734522f014e1b0ff5 100644 (file)
@@ -18,12 +18,12 @@ LL | #![deny(rust_2021_incompatible_closure_captures)]
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `t` to be fully captured
    |
-LL |     let c = || { let _ = &t; 
-LL |
-LL |
-LL |
-LL |         let _t = t.0;
-LL |
+LL ~     let c = || { let _ = &t; 
+LL +
+LL +
+LL +
+LL +         let _t = t.0;
+LL +
  ...
 
 error: changes to closure capture in Rust 2021 will affect drop order
@@ -51,12 +51,12 @@ LL | }
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `u` to be fully captured
    |
-LL |     let c = || { let _ = &u; 
-LL |
-LL |
-LL |
-LL |         let _x = u.0.0;
-LL |
+LL ~     let c = || { let _ = &u; 
+LL +
+LL +
+LL +
+LL +         let _x = u.0.0;
+LL +
  ...
 
 error: aborting due to 2 previous errors
index b2b9ae8fd12f51b4274ea3b549821e2443d26b36..32afc07af7968a5bdb375fada8bf160f3bada8de 100644 (file)
@@ -28,12 +28,12 @@ LL | #![deny(rust_2021_incompatible_closure_captures)]
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `t`, `t1`, `t2` to be fully captured
    |
-LL |     let c = || { let _ = (&t, &t1, &t2); 
-LL |
-LL |
-LL |
-LL |         let _t = t.0;
-LL |
+LL ~     let c = || { let _ = (&t, &t1, &t2); 
+LL +
+LL +
+LL +
+LL +         let _t = t.0;
+LL +
  ...
 
 error: changes to closure capture in Rust 2021 will affect drop order
@@ -57,12 +57,12 @@ LL | }
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `t`, `t1` to be fully captured
    |
-LL |     let c = || { let _ = (&t, &t1); 
-LL |
-LL |
-LL |
-LL |         let _t = t.0;
-LL |
+LL ~     let c = || { let _ = (&t, &t1); 
+LL +
+LL +
+LL +
+LL +         let _t = t.0;
+LL +
  ...
 
 error: changes to closure capture in Rust 2021 will affect drop order
@@ -80,12 +80,12 @@ LL | }
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `t` to be fully captured
    |
-LL |     let c = || { let _ = &t; 
-LL |
-LL |
-LL |
-LL |         let _t = t.0;
-LL |
+LL ~     let c = || { let _ = &t; 
+LL +
+LL +
+LL +
+LL +         let _t = t.0;
+LL +
  ...
 
 error: changes to closure capture in Rust 2021 will affect drop order
@@ -103,12 +103,12 @@ LL | }
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `t` to be fully captured
    |
-LL |     let c = || { let _ = &t; 
-LL |
-LL |
-LL |
-LL |         let _t = t.0;
-LL |
+LL ~     let c = || { let _ = &t; 
+LL +
+LL +
+LL +
+LL +         let _t = t.0;
+LL +
  ...
 
 error: changes to closure capture in Rust 2021 will affect drop order
@@ -126,12 +126,12 @@ LL | }
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `t` to be fully captured
    |
-LL |     let c = || { let _ = &t; 
-LL |
-LL |
-LL |
-LL |         let _t = t.0;
-LL |
+LL ~     let c = || { let _ = &t; 
+LL +
+LL +
+LL +
+LL +         let _t = t.0;
+LL +
  ...
 
 error: changes to closure capture in Rust 2021 will affect drop order
@@ -149,12 +149,12 @@ LL | }
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `t` to be fully captured
    |
-LL |     let c = || { let _ = &t; 
-LL |
-LL |
-LL |
-LL |         let _t = t.1;
-LL |
+LL ~     let c = || { let _ = &t; 
+LL +
+LL +
+LL +
+LL +         let _t = t.1;
+LL +
  ...
 
 error: changes to closure capture in Rust 2021 will affect drop order
@@ -177,12 +177,12 @@ LL | }
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `t1`, `t` to be fully captured
    |
-LL |     let c = move || { let _ = (&t1, &t); 
-LL |
-LL |
-LL |
-LL |         println!("{:?} {:?}", t1.1, t.1);
-LL |
+LL ~     let c = move || { let _ = (&t1, &t); 
+LL +
+LL +
+LL +
+LL +         println!("{:?} {:?}", t1.1, t.1);
+LL +
  ...
 
 error: changes to closure capture in Rust 2021 will affect drop order
@@ -200,12 +200,12 @@ LL |         }
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `tuple` to be fully captured
    |
-LL |             let c = || { let _ = &tuple; 
-LL |
-LL |
-LL |
-LL |                 tuple.0;
-LL |
+LL ~             let c = || { let _ = &tuple; 
+LL +
+LL +
+LL +
+LL +                 tuple.0;
+LL +
  ...
 
 error: changes to closure capture in Rust 2021 will affect drop order
@@ -223,12 +223,12 @@ LL |     };
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
 help: add a dummy let to cause `tuple` to be fully captured
    |
-LL |         let c = || { let _ = &tuple; 
-LL |
-LL |
-LL |
-LL |             tuple.0;
-LL |
+LL ~         let c = || { let _ = &tuple; 
+LL +
+LL +
+LL +
+LL +             tuple.0;
+LL +
  ...
 
 error: aborting due to 9 previous errors
index 273eae995538a7dc0b62ce3b833d9fb5d9967437..b7f0571316f05c98f62c213898488720862f6411 100644 (file)
@@ -10,7 +10,7 @@ LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static {
 help: consider further restricting this bound
    |
 LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static + std::marker::Send {
-   |                                                       ^^^^^^^^^^^^^^^^^^^
+   |                                                       +++++++++++++++++++
 
 error: aborting due to previous error
 
index 7823e3570096e20680eed3d474201fff2c2552fe..e7d9664ec505ee39db917ec154a42a28e0efed56 100644 (file)
@@ -27,7 +27,7 @@ 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
 
index 7df29d5a098a02896f34bdf666fa479421c7b764..16b168db6810df94765f18bbc13568bff3a05c7f 100644 (file)
@@ -10,7 +10,7 @@ LL |     take_const_owned(f);
 help: consider further restricting this bound
    |
 LL | fn give_owned<F>(f: F) where F: FnOnce() + Send + std::marker::Sync {
-   |                                                 ^^^^^^^^^^^^^^^^^^^
+   |                                                 +++++++++++++++++++
 
 error: aborting due to previous error
 
index ffe0bce6f0fd8b01d0c079e221c4ba9e3092a07e..06477efac264ef78ed494419d986fdaecacdd18a 100644 (file)
@@ -20,11 +20,11 @@ LL |     (&|_| ()) as &dyn for<'x> Fn(<u32 as T<'x>>::V);
 help: consider further restricting the associated type
    |
 LL | fn main() where <u32 as T<'_>>::V: Sized {
-   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |           ++++++++++++++++++++++++++++++
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL |     (&|&_| ()) as &dyn for<'x> Fn(<u32 as T<'x>>::V);
-   |        ^
+   |        +
 
 error: aborting due to 2 previous errors
 
index 5a6dfb2fdf946fdfe7ed7a235f242731e08513e0..7877c7334d79b9ed2407f5bd43445ec735427c65 100644 (file)
@@ -10,7 +10,7 @@ LL |     || { t; t; };
 help: consider restricting type parameter `T`
    |
 LL | fn foo<T: Copy>(t: T) {
-   |         ^^^^^^
+   |         ++++++
 
 error: aborting due to previous error
 
index f7cfbd251b7c28831d6a87046eafe73c08c79a7f..9c75d5a9023edfea217c65d6fcb92912c28f7a83 100644 (file)
@@ -13,7 +13,7 @@ LL |         let c1: () = c;
 help: use parentheses to call this closure
    |
 LL |         let c1: () = c();
-   |                       ^^
+   |                       ++
 
 error: aborting due to previous error
 
index 7fd929221d026d54d2d30f6931cdf7dc121dd970..d9479002b6cde31df63b1e10c5c04bb77b4504e2 100644 (file)
@@ -13,7 +13,7 @@ LL |         let c1 : () = c;
 help: use parentheses to call this closure
    |
 LL |         let c1 : () = c();
-   |                        ^^
+   |                        ++
 
 error: aborting due to previous error
 
index 680f6ff6792194e8eb7b9e8dfe867c1fe0b22a14..880e38df2d70a87586c18a20cdd111dadcbd8711 100644 (file)
@@ -13,7 +13,7 @@ LL |         let c1 : () = c;
 help: use parentheses to call this closure
    |
 LL |         let c1 : () = c();
-   |                        ^^
+   |                        ++
 
 error: aborting due to previous error
 
index 76f91fbf241d030c36065d5acd923aa1bfa0f67e..737a5ae2656e6658bcf65197b430603b9fb8f1d7 100644 (file)
@@ -39,7 +39,7 @@ LL |     fn bar(self) {}
 help: change the output type to match the trait
    |
 LL |     fn bar(self) -> Option<()> {}
-   |                  ^^^^^^^^^^^^^
+   |                  +++++++++++++
 
 error: aborting due to 3 previous errors
 
index 3a590d3282d46b04bfba865e320b69270e4b45d8..8084a6220456029bbb84d271f08a1846f67f3dcc 100644 (file)
@@ -51,7 +51,7 @@ LL | #[cfg_attr[all(),,]]
 help: the delimiters should be `(` and `)`
    |
 LL | #[cfg_attr(all(),,)]
-   |           ^       ^
+   |           ~       ~
 
 error: expected identifier, found `,`
   --> $DIR/cfg-attr-parse.rs:44:18
@@ -71,7 +71,7 @@ LL | #[cfg_attr{all(),,}]
 help: the delimiters should be `(` and `)`
    |
 LL | #[cfg_attr(all(),,)]
-   |           ^       ^
+   |           ~       ~
 
 error: expected identifier, found `,`
   --> $DIR/cfg-attr-parse.rs:50:18
index fe6b12968c110a6d4f6c7bc0934ec0d7fffbb412..2f67c11ad1f5dff4f0cd567476401b067caca4ee 100644 (file)
@@ -10,7 +10,7 @@ LL |     o.closure();
 help: to call the function stored in `closure`, surround the field access with parentheses
    |
 LL |     (o.closure)();
-   |     ^         ^
+   |     +         +
 
 error: aborting due to previous error
 
index 0480958e99c0554ffe02ab7d26f1e9bea3d76594..a37e132d3642932b2f45f863530474c590b37ca6 100644 (file)
@@ -10,7 +10,7 @@ LL |     o_closure.closure();
 help: to call the function stored in `closure`, surround the field access with parentheses
    |
 LL |     (o_closure.closure)();
-   |     ^                 ^
+   |     +                 +
 
 error[E0599]: no method named `not_closure` found for struct `Obj` in the current scope
   --> $DIR/issue-2392.rs:38:15
@@ -35,7 +35,7 @@ LL |     o_func.closure();
 help: to call the function stored in `closure`, surround the field access with parentheses
    |
 LL |     (o_func.closure)();
-   |     ^              ^
+   |     +              +
 
 error[E0599]: no method named `boxed_closure` found for struct `BoxedObj` in the current scope
   --> $DIR/issue-2392.rs:45:14
@@ -49,7 +49,7 @@ LL |     boxed_fn.boxed_closure();
 help: to call the function stored in `boxed_closure`, surround the field access with parentheses
    |
 LL |     (boxed_fn.boxed_closure)();
-   |     ^                      ^
+   |     +                      +
 
 error[E0599]: no method named `boxed_closure` found for struct `BoxedObj` in the current scope
   --> $DIR/issue-2392.rs:48:19
@@ -63,7 +63,7 @@ LL |     boxed_closure.boxed_closure();
 help: to call the function stored in `boxed_closure`, surround the field access with parentheses
    |
 LL |     (boxed_closure.boxed_closure)();
-   |     ^                           ^
+   |     +                           +
 
 error[E0599]: no method named `closure` found for struct `Obj` in the current scope
   --> $DIR/issue-2392.rs:53:12
@@ -77,7 +77,7 @@ LL |     w.wrap.closure();
 help: to call the function stored in `closure`, surround the field access with parentheses
    |
 LL |     (w.wrap.closure)();
-   |     ^              ^
+   |     +              +
 
 error[E0599]: no method named `not_closure` found for struct `Obj` in the current scope
   --> $DIR/issue-2392.rs:55:12
@@ -102,7 +102,7 @@ LL |     check_expression().closure();
 help: to call the function stored in `closure`, surround the field access with parentheses
    |
 LL |     (check_expression().closure)();
-   |     ^                          ^
+   |     +                          +
 
 error[E0599]: no method named `f1` found for struct `FuncContainer` in the current scope
   --> $DIR/issue-2392.rs:64:31
@@ -116,7 +116,7 @@ LL |             (*self.container).f1(1);
 help: to call the function stored in `f1`, surround the field access with parentheses
    |
 LL |             ((*self.container).f1)(1);
-   |             ^                    ^
+   |             +                    +
 
 error[E0599]: no method named `f2` found for struct `FuncContainer` in the current scope
   --> $DIR/issue-2392.rs:65:31
@@ -130,7 +130,7 @@ LL |             (*self.container).f2(1);
 help: to call the function stored in `f2`, surround the field access with parentheses
    |
 LL |             ((*self.container).f2)(1);
-   |             ^                    ^
+   |             +                    +
 
 error[E0599]: no method named `f3` found for struct `FuncContainer` in the current scope
   --> $DIR/issue-2392.rs:66:31
@@ -144,7 +144,7 @@ LL |             (*self.container).f3(1);
 help: to call the function stored in `f3`, surround the field access with parentheses
    |
 LL |             ((*self.container).f3)(1);
-   |             ^                    ^
+   |             +                    +
 
 error: aborting due to 11 previous errors
 
index a8d97bdfe2fb564ee95296e3f9aa9e2336f694ef..50c6fe1e83308487fe9290cff38c7b119af4ff8e 100644 (file)
@@ -10,7 +10,7 @@ LL |     demo.example(1);
 help: to call the function stored in `example`, surround the field access with parentheses
    |
 LL |     (demo.example)(1);
-   |     ^            ^
+   |     +            +
 
 error: aborting due to previous error
 
index c109896e825be2ff9eb78806f0382676dc8c40fa..7c2e6b015330f74315037981166a3d5e34650338 100644 (file)
@@ -7,7 +7,7 @@ LL |     p.closure();
 help: to call the function stored in `closure`, surround the field access with parentheses
    |
 LL |     (p.closure)();
-   |     ^         ^
+   |     +         +
 
 error[E0599]: no method named `fn_ptr` found for reference `&&Obj<[closure@$DIR/issue-33784.rs:25:43: 25:48]>` in the current scope
   --> $DIR/issue-33784.rs:29:7
@@ -18,7 +18,7 @@ LL |     q.fn_ptr();
 help: to call the function stored in `fn_ptr`, surround the field access with parentheses
    |
 LL |     (q.fn_ptr)();
-   |     ^        ^
+   |     +        +
 
 error[E0599]: no method named `c_fn_ptr` found for reference `&D` in the current scope
   --> $DIR/issue-33784.rs:32:7
@@ -29,7 +29,7 @@ LL |     s.c_fn_ptr();
 help: to call the function stored in `c_fn_ptr`, surround the field access with parentheses
    |
 LL |     (s.c_fn_ptr)();
-   |     ^          ^
+   |     +          +
 
 error: aborting due to 3 previous errors
 
index 7737705440eb8ae46897dcd9a7efb0c861fc9009..f4bb1e422076915575e0e8e3c45b2e21247d476f 100644 (file)
@@ -7,7 +7,7 @@ LL |     S::<5 + 2 >> 7>;
 help: enclose the `const` expression in braces
    |
 LL |     S::<{ 5 + 2 } >> 7>;
-   |         ^       ^
+   |         +       +
 
 error: comparison operators cannot be chained
   --> $DIR/closing-args-token.rs:10:16
@@ -18,7 +18,7 @@ LL |     S::<5 + 2 >> 7>;
 help: split the comparison into two
    |
 LL |     S::<5 + 2 >> 7 && 7>;
-   |                    ^^^^
+   |                    ++++
 
 error: comparison operators cannot be chained
   --> $DIR/closing-args-token.rs:16:20
@@ -29,7 +29,7 @@ LL |     S::<{ 5 + 2 } >> 7>;
 help: split the comparison into two
    |
 LL |     S::<{ 5 + 2 } >> 7 && 7>;
-   |                        ^^^^
+   |                        ++++
 
 error: expected expression, found `;`
   --> $DIR/closing-args-token.rs:21:16
@@ -46,7 +46,7 @@ LL |     T::<x >>= 2 > 0>;
 help: split the comparison into two
    |
 LL |     T::<x >>= 2 && 2 > 0>;
-   |                 ^^^^
+   |                 ++++
 
 error: aborting due to 5 previous errors
 
index 7737705440eb8ae46897dcd9a7efb0c861fc9009..f4bb1e422076915575e0e8e3c45b2e21247d476f 100644 (file)
@@ -7,7 +7,7 @@ LL |     S::<5 + 2 >> 7>;
 help: enclose the `const` expression in braces
    |
 LL |     S::<{ 5 + 2 } >> 7>;
-   |         ^       ^
+   |         +       +
 
 error: comparison operators cannot be chained
   --> $DIR/closing-args-token.rs:10:16
@@ -18,7 +18,7 @@ LL |     S::<5 + 2 >> 7>;
 help: split the comparison into two
    |
 LL |     S::<5 + 2 >> 7 && 7>;
-   |                    ^^^^
+   |                    ++++
 
 error: comparison operators cannot be chained
   --> $DIR/closing-args-token.rs:16:20
@@ -29,7 +29,7 @@ LL |     S::<{ 5 + 2 } >> 7>;
 help: split the comparison into two
    |
 LL |     S::<{ 5 + 2 } >> 7 && 7>;
-   |                        ^^^^
+   |                        ++++
 
 error: expected expression, found `;`
   --> $DIR/closing-args-token.rs:21:16
@@ -46,7 +46,7 @@ LL |     T::<x >>= 2 > 0>;
 help: split the comparison into two
    |
 LL |     T::<x >>= 2 && 2 > 0>;
-   |                 ^^^^
+   |                 ++++
 
 error: aborting due to 5 previous errors
 
index cc2c9c8681bccf997962bf3a8ddc325fac9b274c..4eec2b21be606ca578ffd7aa38bdaff842b19417 100644 (file)
@@ -13,8 +13,9 @@ LL | pub const fn size_of<T>() -> usize {
    |
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | pub const fn is_zst<T>() -> usize {
-   |                     --
+LL - pub const fn is_zst<T: ?Sized>() -> usize {
+LL + pub const fn is_zst<T>() -> usize {
+   | 
 
 error[E0277]: the size for values of type `T` cannot be known at compilation time
   --> $DIR/const-argument-if-length.rs:16:12
@@ -28,16 +29,17 @@ LL |     value: T,
    = help: change the field's type to have a statically known size
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | pub struct AtLeastByte<T> {
-   |                        --
+LL - pub struct AtLeastByte<T: ?Sized> {
+LL + pub struct AtLeastByte<T> {
+   | 
 help: borrowed types always have a statically known size
    |
 LL |     value: &T,
-   |            ^
+   |            +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     value: Box<T>,
-   |            ^^^^ ^
+   |            ++++ +
 
 error: aborting due to 2 previous errors
 
index 173a14716635db8762044adb87b4d9e41a37020e..cdbbbf2a99b3bf2c3ea104be5a13bb0fc932c29d 100644 (file)
@@ -19,16 +19,17 @@ LL |     value: T,
    = help: change the field's type to have a statically known size
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | pub struct AtLeastByte<T> {
-   |                        --
+LL - pub struct AtLeastByte<T: ?Sized> {
+LL + pub struct AtLeastByte<T> {
+   | 
 help: borrowed types always have a statically known size
    |
 LL |     value: &T,
-   |            ^
+   |            +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     value: Box<T>,
-   |            ^^^^ ^
+   |            ++++ +
 
 error: aborting due to 2 previous errors
 
index 93c5173554f3c4a9065af26b997787c458c4e80f..4ce0ecdf3aab9f190ad9c8f3ca256a8b21443622 100644 (file)
@@ -7,7 +7,7 @@ LL |     i32_identity::<1 + 2>();
 help: enclose the `const` expression in braces
    |
 LL |     i32_identity::<{ 1 + 2 }>();
-   |                    ^       ^
+   |                    +       +
 
 error: aborting due to previous error
 
index 93c5173554f3c4a9065af26b997787c458c4e80f..4ce0ecdf3aab9f190ad9c8f3ca256a8b21443622 100644 (file)
@@ -7,7 +7,7 @@ LL |     i32_identity::<1 + 2>();
 help: enclose the `const` expression in braces
    |
 LL |     i32_identity::<{ 1 + 2 }>();
-   |                    ^       ^
+   |                    +       +
 
 error: aborting due to previous error
 
index 17ccd2f3527b0c64b0c13dea8d5e5d54377018a5..625338bd9b4a68ed3fdefcc7caa57a363d17ae7b 100644 (file)
@@ -7,7 +7,7 @@ LL | fn test<const N: usize>() -> Foo<N> {
 help: if this generic argument was intended as a const parameter, surround it with braces
    |
 LL | fn test<const N: usize>() -> Foo<{ N }> {
-   |                                  ^   ^
+   |                                  +   +
 
 error: aborting due to previous error
 
index 2e3132c2eb7b640072a2d1985414a4a0951a7149..dd37d4e7a85afd23b9d66f4f0fdc66265193713a 100644 (file)
@@ -10,11 +10,11 @@ LL | impl Foo for A<N> {}
 help: a struct with a similar name exists
    |
 LL | impl Foo for A<A> {}
-   |                ^
+   |                ~
 help: you might be missing a type parameter
    |
 LL | impl<N> Foo for A<N> {}
-   |     ^^^
+   |     +++
 
 error[E0412]: cannot find type `T` in this scope
   --> $DIR/diagnostics.rs:16:32
@@ -28,11 +28,11 @@ LL | impl<const N: u8> Foo for C<N, T> {}
 help: a struct with a similar name exists
    |
 LL | impl<const N: u8> Foo for C<N, A> {}
-   |                                ^
+   |                                ~
 help: you might be missing a type parameter
    |
 LL | impl<const N: u8, T> Foo for C<N, T> {}
-   |                 ^^^
+   |                 +++
 
 error[E0747]: unresolved item provided when a constant was expected
   --> $DIR/diagnostics.rs:7:16
@@ -43,7 +43,7 @@ LL | impl Foo for A<N> {}
 help: if this generic argument was intended as a const parameter, surround it with braces
    |
 LL | impl Foo for A<{ N }> {}
-   |                ^   ^
+   |                +   +
 
 error[E0747]: type provided when a constant was expected
   --> $DIR/diagnostics.rs:12:19
@@ -54,7 +54,7 @@ LL | impl<N> Foo for B<N> {}
 help: consider changing this type parameter to be a `const` generic
    |
 LL | impl<const N: u8> Foo for B<N> {}
-   |      ^^^^^^^^^^^
+   |      ~~~~~~~~~~~
 
 error[E0747]: unresolved item provided when a constant was expected
   --> $DIR/diagnostics.rs:16:32
@@ -65,7 +65,7 @@ LL | impl<const N: u8> Foo for C<N, T> {}
 help: if this generic argument was intended as a const parameter, surround it with braces
    |
 LL | impl<const N: u8> Foo for C<N, { T }> {}
-   |                                ^   ^
+   |                                +   +
 
 error: aborting due to 5 previous errors
 
diff --git a/src/test/ui/const-generics/enum-variants.rs b/src/test/ui/const-generics/enum-variants.rs
new file mode 100644 (file)
index 0000000..5c6c4a8
--- /dev/null
@@ -0,0 +1,24 @@
+// check-pass
+enum Foo<const N: usize> {
+    Variant,
+    Variant2(),
+    Variant3{},
+}
+
+struct Bar<const N: usize>;
+struct Bar2<const N: usize>();
+struct Bar3<const N: usize> {}
+
+fn main() {
+    let _ = Foo::Variant::<1>;
+    let _ = Foo::Variant2::<1>();
+    let _ = Foo::Variant3::<1>{};
+
+    let _ = Foo::<1>::Variant;
+    let _ = Foo::<1>::Variant2();
+    let _ = Foo::<1>::Variant3{};
+
+    let _ = Bar::<1>;
+    let _ = Bar2::<1>();
+    let _ = Bar3::<1>{};
+}
index 9deda56cd0df212ecb3fd3e622d093d6f14c125a..7a12f3bdec27820ba16f7e52a7b854c70559f6bb 100644 (file)
@@ -14,7 +14,7 @@ LL | fn foo<const X: usize, const Y: usize>() -> usize {
 help: add missing generic argument
    |
 LL |     foo::<0, Y>();
-   |            ^^^
+   |            +++
 
 error[E0107]: this function takes 2 generic arguments but 3 generic arguments were supplied
   --> $DIR/incorrect-number-of-const-args.rs:14:5
index 9deda56cd0df212ecb3fd3e622d093d6f14c125a..7a12f3bdec27820ba16f7e52a7b854c70559f6bb 100644 (file)
@@ -14,7 +14,7 @@ LL | fn foo<const X: usize, const Y: usize>() -> usize {
 help: add missing generic argument
    |
 LL |     foo::<0, Y>();
-   |            ^^^
+   |            +++
 
 error[E0107]: this function takes 2 generic arguments but 3 generic arguments were supplied
   --> $DIR/incorrect-number-of-const-args.rs:14:5
index e85bf8829aee715f2d2a39627c9161d8fb0888bf..01fb137dd6aff8ebe0f424059538f7c88f3e00e8 100644 (file)
@@ -7,7 +7,7 @@ LL |     foo();
 help: consider specifying the const argument
    |
 LL |     foo::<X>();
-   |     ^^^^^^^^
+   |     ~~~~~~~~
 
 error: aborting due to previous error
 
index e85bf8829aee715f2d2a39627c9161d8fb0888bf..01fb137dd6aff8ebe0f424059538f7c88f3e00e8 100644 (file)
@@ -7,7 +7,7 @@ LL |     foo();
 help: consider specifying the const argument
    |
 LL |     foo::<X>();
-   |     ^^^^^^^^
+   |     ~~~~~~~~
 
 error: aborting due to previous error
 
index 5857a4211985a0ad44389fc59edbd15ff7ba71e5..a625ed2bdc3b20a11e8cafa9f7bb9ef4fd860fdf 100644 (file)
@@ -7,7 +7,7 @@ LL |         println!("{:?}", take_array_from_mut(&mut arr, i));
 help: consider specifying the const argument
    |
 LL |         println!("{:?}", take_array_from_mut::<N>(&mut arr, i));
-   |                          ^^^^^^^^^^^^^^^^^^^^^^^^
+   |                          ~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index f6d9c4a26453c3a5ba159e412e3315deb8ab8025..979d50b85f1467836aef6e7a6ebe9a3bd42f60a9 100644 (file)
@@ -7,7 +7,7 @@ LL |     Foo.bar().bar().bar().bar().baz();
 help: consider specifying the const argument
    |
 LL |     Foo.bar().bar().bar().bar().baz::<N>();
-   |                                 ^^^^^^^^
+   |                                 ~~~~~~~~
 
 error: aborting due to previous error
 
index f6d9c4a26453c3a5ba159e412e3315deb8ab8025..979d50b85f1467836aef6e7a6ebe9a3bd42f60a9 100644 (file)
@@ -7,7 +7,7 @@ LL |     Foo.bar().bar().bar().bar().baz();
 help: consider specifying the const argument
    |
 LL |     Foo.bar().bar().bar().bar().baz::<N>();
-   |                                 ^^^^^^^^
+   |                                 ~~~~~~~~
 
 error: aborting due to previous error
 
index cc6c9a475104c15087c050ef0619d520b63c2963..31b7fc7ccf5a0276b27a68ed6362573476d9f5ab 100644 (file)
@@ -7,7 +7,7 @@ LL |     let _: [u8; 17] = foo();
 help: consider specifying the const argument
    |
 LL |     let _: [u8; 17] = foo::<M>();
-   |                       ^^^^^^^^
+   |                       ~~~~~~~~
 
 error: aborting due to previous error
 
index cc6c9a475104c15087c050ef0619d520b63c2963..31b7fc7ccf5a0276b27a68ed6362573476d9f5ab 100644 (file)
@@ -7,7 +7,7 @@ LL |     let _: [u8; 17] = foo();
 help: consider specifying the const argument
    |
 LL |     let _: [u8; 17] = foo::<M>();
-   |                       ^^^^^^^^
+   |                       ~~~~~~~~
 
 error: aborting due to previous error
 
index 254a28f70e213cb398183e230584954a99c677d2..bee4b693825f3ff8e53497f19b0073e156be6c1c 100644 (file)
@@ -7,7 +7,7 @@ LL |     Foo.foo();
 help: consider specifying the const argument
    |
 LL |     Foo.foo::<A>();
-   |         ^^^^^^^^
+   |         ~~~~~~~~
 
 error: aborting due to previous error
 
index 254a28f70e213cb398183e230584954a99c677d2..bee4b693825f3ff8e53497f19b0073e156be6c1c 100644 (file)
@@ -7,7 +7,7 @@ LL |     Foo.foo();
 help: consider specifying the const argument
    |
 LL |     Foo.foo::<A>();
-   |         ^^^^^^^^
+   |         ~~~~~~~~
 
 error: aborting due to previous error
 
index cfbc61f02543bc6ae4c7eaa4a5b33db37658f873..0d3643f6f899ab8b4a344481c8b96ebbd9324c95 100644 (file)
@@ -34,7 +34,7 @@ LL |   let _: Example<CompileFlag::A, _> = Example { x: 0 };
 help: if this generic argument was intended as a const parameter, surround it with braces
    |
 LL |   let _: Example<{ CompileFlag::A }, _> = Example { x: 0 };
-   |                  ^                ^
+   |                  +                +
 
 error[E0747]: type provided when a constant was expected
   --> $DIR/invalid-enum.rs:33:18
@@ -45,7 +45,7 @@ LL |   let _: Example<Example::ASSOC_FLAG, _> = Example { x: 0 };
 help: if this generic argument was intended as a const parameter, surround it with braces
    |
 LL |   let _: Example<{ Example::ASSOC_FLAG }, _> = Example { x: 0 };
-   |                  ^                     ^
+   |                  +                     +
 
 error[E0747]: unresolved item provided when a constant was expected
   --> $DIR/invalid-enum.rs:21:12
@@ -56,7 +56,7 @@ LL |   test_1::<CompileFlag::A>();
 help: if this generic argument was intended as a const parameter, surround it with braces
    |
 LL |   test_1::<{ CompileFlag::A }>();
-   |            ^                ^
+   |            +                +
 
 error[E0747]: unresolved item provided when a constant was expected
   --> $DIR/invalid-enum.rs:25:15
@@ -67,7 +67,7 @@ LL |   test_2::<_, CompileFlag::A>(0);
 help: if this generic argument was intended as a const parameter, surround it with braces
    |
 LL |   test_2::<_, { CompileFlag::A }>(0);
-   |               ^                ^
+   |               +                +
 
 error: aborting due to 7 previous errors
 
index ef0cafcb9bb7c54fadb4f8ed8b18bfc829a2bf6b..8f07d208091a04b8799726540b2f5e4cfb15704d 100644 (file)
@@ -17,7 +17,7 @@ LL |     [x; { N }]
 help: consider restricting type parameter `T`
    |
 LL | fn g<T: std::marker::Copy, const N: usize>(x: T) -> [T; N] {
-   |       ^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++++++++
 
 error: aborting due to previous error; 1 warning emitted
 
index e5fe50513aaf7563964ab6cd7baf8b72e7d9a71d..9b62ffc93494b83b7da2bca5259d0cfa549fe35b 100644 (file)
@@ -8,7 +8,7 @@ LL |     [x; { N }]
 help: consider restricting type parameter `T`
    |
 LL | fn g<T: std::marker::Copy, const N: usize>(x: T) -> [T; N] {
-   |       ^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++++++++
 
 error: aborting due to previous error
 
index fcfd39387c2934ead97f87dfa61cd00a396018ea..4883463c2e67353b65c301c2cc5b663a15d0e202 100644 (file)
@@ -17,7 +17,7 @@ LL |     [x; N]
 help: consider restricting type parameter `T`
    |
 LL | fn g<T: std::marker::Copy, const N: usize>(x: T) -> [T; N] {
-   |       ^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++++++++
 
 error: aborting due to previous error; 1 warning emitted
 
index 91580313e1e83b38c637b948774763f45ac5c267..dc891842e1382262852c84fc035a42efc69c5269 100644 (file)
@@ -8,7 +8,7 @@ LL |     [x; N]
 help: consider restricting type parameter `T`
    |
 LL | fn g<T: std::marker::Copy, const N: usize>(x: T) -> [T; N] {
-   |       ^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++++++++
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/const-generics/issues/issue-61336.stderr b/src/test/ui/const-generics/issues/issue-61336.stderr
deleted file mode 100644 (file)
index 1be907b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/issue-61336.rs:1:12
-   |
-LL | #![feature(const_generics)]
-   |            ^^^^^^^^^^^^^^
-   |
-   = note: `#[warn(incomplete_features)]` on by default
-   = note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
-
-error[E0277]: the trait bound `T: Copy` is not satisfied
-  --> $DIR/issue-61336.rs:9:5
-   |
-LL |     [x; N]
-   |     ^^^^^^ the trait `Copy` is not implemented for `T`
-   |
-   = note: the `Copy` trait is required because the repeated element will be copied
-help: consider restricting type parameter `T`
-   |
-LL | fn g<T: Copy, const N: usize>(x: T) -> [T; N] {
-   |       ^^^^^^
-
-error: aborting due to previous error; 1 warning emitted
-
-For more information about this error, try `rustc --explain E0277`.
index 01a0f6bcba9d8512599297c44a0e74f71dc8bdf7..3b69a4066a9ed91c1a8b54ada9d0c456611ee8ad 100644 (file)
@@ -14,7 +14,7 @@ LL | fn test<T, const P: usize>() where Bool<{core::mem::size_of::<T>() > 4}>: T
 help: add missing generic argument
    |
 LL |     test::<2, P>();
-   |             ^^^
+   |             +++
 
 error: aborting due to previous error
 
index ef6e857838a2858a18d14942e7af202cb06f36b8..b29e853510b1a065762f465f7cc399f0687c5f37 100644 (file)
@@ -7,7 +7,7 @@ LL |     let _: baz!(m::P);
 help: enclose the `const` expression in braces
    |
 LL |     let _: baz!({ m::P });
-   |                 ^      ^
+   |                 +      +
 
 error: expressions must be enclosed in braces to be used as const generic arguments
   --> $DIR/macro_rules-braces.rs:68:17
@@ -18,7 +18,7 @@ LL |     let _: baz!(10 + 7);
 help: enclose the `const` expression in braces
    |
 LL |     let _: baz!({ 10 + 7 });
-   |                 ^        ^
+   |                 +        +
 
 error: constant expression depends on a generic parameter
   --> $DIR/macro_rules-braces.rs:15:13
index 60583d43c0162d18a163f0c2df0d3db4c4e53055..c2e8c2c9c05aed9316f4ab9a3a83cbae9b9fd492 100644 (file)
@@ -7,7 +7,7 @@ LL |     let _: baz!(m::P);
 help: enclose the `const` expression in braces
    |
 LL |     let _: baz!({ m::P });
-   |                 ^      ^
+   |                 +      +
 
 error: expressions must be enclosed in braces to be used as const generic arguments
   --> $DIR/macro_rules-braces.rs:68:17
@@ -18,7 +18,7 @@ LL |     let _: baz!(10 + 7);
 help: enclose the `const` expression in braces
    |
 LL |     let _: baz!({ 10 + 7 });
-   |                 ^        ^
+   |                 +        +
 
 error: generic parameters may not be used in const operations
   --> $DIR/macro_rules-braces.rs:36:20
index beea0acac600a1c808094245c8e0f75514dd687e..11c3481f15afa18e15234864f83315d800b34478 100644 (file)
@@ -7,7 +7,7 @@ LL |     foo<BAR + 3>();
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |     foo::<BAR + 3>();
-   |        ^^
+   |        ++
 
 error: comparison operators cannot be chained
   --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:9:8
@@ -18,7 +18,7 @@ LL |     foo<BAR + BAR>();
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |     foo::<BAR + BAR>();
-   |        ^^
+   |        ++
 
 error: comparison operators cannot be chained
   --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:12:8
@@ -29,7 +29,7 @@ LL |     foo<3 + 3>();
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |     foo::<3 + 3>();
-   |        ^^
+   |        ++
 
 error: comparison operators cannot be chained
   --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:15:8
@@ -40,7 +40,7 @@ LL |     foo<BAR - 3>();
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |     foo::<BAR - 3>();
-   |        ^^
+   |        ++
 
 error: comparison operators cannot be chained
   --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:18:8
@@ -51,7 +51,7 @@ LL |     foo<BAR - BAR>();
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |     foo::<BAR - BAR>();
-   |        ^^
+   |        ++
 
 error: comparison operators cannot be chained
   --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:21:8
@@ -62,7 +62,7 @@ LL |     foo<100 - BAR>();
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |     foo::<100 - BAR>();
-   |        ^^
+   |        ++
 
 error: comparison operators cannot be chained
   --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:24:8
@@ -73,7 +73,7 @@ LL |     foo<bar<i32>()>();
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |     foo::<bar<i32>()>();
-   |        ^^
+   |        ++
 
 error: expected one of `;` or `}`, found `>`
   --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:24:19
@@ -90,7 +90,7 @@ LL |     foo<bar::<i32>()>();
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |     foo::<bar::<i32>()>();
-   |        ^^
+   |        ++
 
 error: comparison operators cannot be chained
   --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:31:8
@@ -101,7 +101,7 @@ LL |     foo<bar::<i32>() + BAR>();
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |     foo::<bar::<i32>() + BAR>();
-   |        ^^
+   |        ++
 
 error: comparison operators cannot be chained
   --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:34:8
@@ -112,7 +112,7 @@ LL |     foo<bar::<i32>() - BAR>();
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |     foo::<bar::<i32>() - BAR>();
-   |        ^^
+   |        ++
 
 error: comparison operators cannot be chained
   --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:37:8
@@ -123,7 +123,7 @@ LL |     foo<BAR - bar::<i32>()>();
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |     foo::<BAR - bar::<i32>()>();
-   |        ^^
+   |        ++
 
 error: comparison operators cannot be chained
   --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:40:8
@@ -134,7 +134,7 @@ LL |     foo<BAR - bar::<i32>()>();
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |     foo::<BAR - bar::<i32>()>();
-   |        ^^
+   |        ++
 
 error: aborting due to 13 previous errors
 
index b93bd6c6fa064b26b998c9ac61e0807af11830f9..380c17c8e62bbcb98b7ecf589c1a9beb12e84001 100644 (file)
@@ -7,7 +7,7 @@ LL |     foo::<BAR + 3>();
 help: expressions must be enclosed in braces to be used as const generic arguments
    |
 LL |     foo::<{ BAR + 3 }>();
-   |           ^         ^
+   |           +         +
 
 error: expressions must be enclosed in braces to be used as const generic arguments
   --> $DIR/const-expression-suggest-missing-braces.rs:19:11
@@ -18,7 +18,7 @@ LL |     foo::<3 + 3>();
 help: enclose the `const` expression in braces
    |
 LL |     foo::<{ 3 + 3 }>();
-   |           ^       ^
+   |           +       +
 
 error: expected one of `,` or `>`, found `-`
   --> $DIR/const-expression-suggest-missing-braces.rs:22:15
@@ -29,7 +29,7 @@ LL |     foo::<BAR - 3>();
 help: expressions must be enclosed in braces to be used as const generic arguments
    |
 LL |     foo::<{ BAR - 3 }>();
-   |           ^         ^
+   |           +         +
 
 error: expected one of `,` or `>`, found `-`
   --> $DIR/const-expression-suggest-missing-braces.rs:25:15
@@ -40,7 +40,7 @@ LL |     foo::<BAR - BAR>();
 help: expressions must be enclosed in braces to be used as const generic arguments
    |
 LL |     foo::<{ BAR - BAR }>();
-   |           ^           ^
+   |           +           +
 
 error: expressions must be enclosed in braces to be used as const generic arguments
   --> $DIR/const-expression-suggest-missing-braces.rs:28:11
@@ -51,7 +51,7 @@ LL |     foo::<100 - BAR>();
 help: enclose the `const` expression in braces
    |
 LL |     foo::<{ 100 - BAR }>();
-   |           ^           ^
+   |           +           +
 
 error: expected one of `,` or `>`, found `(`
   --> $DIR/const-expression-suggest-missing-braces.rs:31:19
@@ -62,7 +62,7 @@ LL |     foo::<bar<i32>()>();
 help: expressions must be enclosed in braces to be used as const generic arguments
    |
 LL |     foo::<{ bar<i32>() }>();
-   |           ^            ^
+   |           +            +
 
 error: expected one of `,` or `>`, found `(`
   --> $DIR/const-expression-suggest-missing-braces.rs:34:21
@@ -73,7 +73,7 @@ LL |     foo::<bar::<i32>()>();
 help: expressions must be enclosed in braces to be used as const generic arguments
    |
 LL |     foo::<{ bar::<i32>() }>();
-   |           ^              ^
+   |           +              +
 
 error: expected one of `,` or `>`, found `(`
   --> $DIR/const-expression-suggest-missing-braces.rs:37:21
@@ -84,7 +84,7 @@ LL |     foo::<bar::<i32>() + BAR>();
 help: expressions must be enclosed in braces to be used as const generic arguments
    |
 LL |     foo::<{ bar::<i32>() + BAR }>();
-   |           ^                    ^
+   |           +                    +
 
 error: expected one of `,` or `>`, found `(`
   --> $DIR/const-expression-suggest-missing-braces.rs:40:21
@@ -95,7 +95,7 @@ LL |     foo::<bar::<i32>() - BAR>();
 help: expressions must be enclosed in braces to be used as const generic arguments
    |
 LL |     foo::<{ bar::<i32>() - BAR }>();
-   |           ^                    ^
+   |           +                    +
 
 error: expected one of `,` or `>`, found `-`
   --> $DIR/const-expression-suggest-missing-braces.rs:43:15
@@ -106,7 +106,7 @@ LL |     foo::<BAR - bar::<i32>()>();
 help: expressions must be enclosed in braces to be used as const generic arguments
    |
 LL |     foo::<{ BAR - bar::<i32>() }>();
-   |           ^                    ^
+   |           +                    +
 
 error: expected one of `,` or `>`, found `-`
   --> $DIR/const-expression-suggest-missing-braces.rs:46:15
@@ -117,7 +117,7 @@ LL |     foo::<BAR - bar::<i32>()>();
 help: expressions must be enclosed in braces to be used as const generic arguments
    |
 LL |     foo::<{ BAR - bar::<i32>() }>();
-   |           ^                    ^
+   |           +                    +
 
 error[E0404]: expected trait, found constant `BAR`
   --> $DIR/const-expression-suggest-missing-braces.rs:11:11
@@ -139,7 +139,7 @@ LL |     foo::<BAR + BAR>();
    |
    = note: `#[warn(bare_trait_objects)]` on by default
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error[E0747]: type provided when a constant was expected
   --> $DIR/const-expression-suggest-missing-braces.rs:11:11
index b942c397a8d2b4280c0d2ef2ed994bda36ef27c9..a0a14558490dafc58ae12d2b606a0c9b0c735209 100644 (file)
@@ -7,7 +7,7 @@ LL |     assert_eq!(R.method::<1u16>(), 1);
 help: change the type of the numeric literal from `u16` to `u8`
    |
 LL |     assert_eq!(R.method::<1u8>(), 1);
-   |                           ^^^
+   |                           ~~~
 
 error: aborting due to previous error
 
index b942c397a8d2b4280c0d2ef2ed994bda36ef27c9..a0a14558490dafc58ae12d2b606a0c9b0c735209 100644 (file)
@@ -7,7 +7,7 @@ LL |     assert_eq!(R.method::<1u16>(), 1);
 help: change the type of the numeric literal from `u16` to `u8`
    |
 LL |     assert_eq!(R.method::<1u8>(), 1);
-   |                           ^^^
+   |                           ~~~
 
 error: aborting due to previous error
 
index f33aa4953e4f51accde9bb0754fb06706d91f5da..b97b6faa3be71c2a3c14405db2282c40a55e9438 100644 (file)
@@ -14,7 +14,7 @@ LL | struct S<'a, 'b>(&'a u8, &'b u8);
 help: add missing lifetime argument
    |
 LL |     S::<'static, 'b>(&0, &0);
-   |                ^^^^
+   |                ++++
 
 error[E0107]: this struct takes 2 lifetime arguments but 3 lifetime arguments were supplied
   --> $DIR/constructor-lifetime-args.rs:19:5
@@ -46,7 +46,7 @@ LL | enum E<'a, 'b> {
 help: add missing lifetime argument
    |
 LL |     E::V::<'static, 'b>(&0);
-   |                   ^^^^
+   |                   ++++
 
 error[E0107]: this enum takes 2 lifetime arguments but 3 lifetime arguments were supplied
   --> $DIR/constructor-lifetime-args.rs:24:8
index eb6b0774e152c42462ddf076226a6c1e482e2e51..4141cc4ab1a48d90a0ebae26159c61ec0f7ad1ee 100644 (file)
@@ -10,7 +10,7 @@ LL |     A = { let 0 = 0; 0 },
 help: you might want to use `if let` to ignore the variant that isn't matched
    |
 LL |     A = { if let 0 = 0 { /* */ } 0 },
-   |           ^^^^^^^^^^^^^^^^^^^^^^
+   |           ~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 756426d84a47990faa5eb01cdfd9653bafdc4dff..af86ba0cc82f8684a440e85df82d0f1a20ca296e 100644 (file)
@@ -10,7 +10,7 @@ LL |     let x: [i32; { let 0 = 0; 0 }] = [];
 help: you might want to use `if let` to ignore the variant that isn't matched
    |
 LL |     let x: [i32; { if let 0 = 0 { /* */ } 0 }] = [];
-   |                    ^^^^^^^^^^^^^^^^^^^^^^
+   |                    ~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 84600bb1b8aadebb9a089ac090b5c66b85c76862..f71490eba613541be69dc6956a977315fc1dac49 100644 (file)
@@ -10,7 +10,7 @@ LL | const X: i32 = { let 0 = 0; 0 };
 help: you might want to use `if let` to ignore the variant that isn't matched
    |
 LL | const X: i32 = { if let 0 = 0 { /* */ } 0 };
-   |                  ^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0005]: refutable pattern in local binding: `i32::MIN..=-1_i32` and `1_i32..=i32::MAX` not covered
   --> $DIR/const-match-check.rs:8:23
@@ -24,7 +24,7 @@ LL | static Y: i32 = { let 0 = 0; 0 };
 help: you might want to use `if let` to ignore the variant that isn't matched
    |
 LL | static Y: i32 = { if let 0 = 0 { /* */ } 0 };
-   |                   ^^^^^^^^^^^^^^^^^^^^^^
+   |                   ~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0005]: refutable pattern in local binding: `i32::MIN..=-1_i32` and `1_i32..=i32::MAX` not covered
   --> $DIR/const-match-check.rs:13:26
@@ -38,7 +38,7 @@ LL |     const X: i32 = { let 0 = 0; 0 };
 help: you might want to use `if let` to ignore the variant that isn't matched
    |
 LL |     const X: i32 = { if let 0 = 0 { /* */ } 0 };
-   |                      ^^^^^^^^^^^^^^^^^^^^^^
+   |                      ~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0005]: refutable pattern in local binding: `i32::MIN..=-1_i32` and `1_i32..=i32::MAX` not covered
   --> $DIR/const-match-check.rs:19:26
@@ -52,7 +52,7 @@ LL |     const X: i32 = { let 0 = 0; 0 };
 help: you might want to use `if let` to ignore the variant that isn't matched
    |
 LL |     const X: i32 = { if let 0 = 0 { /* */ } 0 };
-   |                      ^^^^^^^^^^^^^^^^^^^^^^
+   |                      ~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 4 previous errors
 
index a5088a3ee33168adbbaa75b0508fb219c35725f5..f15be95db1024fa032db4bfcf05fb2db2f16fd50 100644 (file)
@@ -7,11 +7,11 @@ LL | #[deprecated = b"test"]
 help: the following are the possible correct uses
    |
 LL | #[deprecated]
-   | ^^^^^^^^^^^^^
+   | ~~~~~~~~~~~~~
 LL | #[deprecated(/*opt*/ since = "version", /*opt*/ note = "reason")]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 LL | #[deprecated = "reason"]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
+   | ~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 8c004148a5d758d81b053f0f2cf683486ad07877..c5c8b8842979bf1176b2c2593449a0676721884e 100644 (file)
@@ -15,7 +15,7 @@ LL |     foo3(u);
 help: consider dereferencing the borrow
    |
 LL |     foo3(*u);
-   |          ^
+   |          +
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:30:9
@@ -25,8 +25,9 @@ LL |     foo(&"aaa".to_owned());
    |
 help: consider removing the borrow
    |
-LL |     foo("aaa".to_owned());
-   |        --
+LL -     foo(&"aaa".to_owned());
+LL +     foo("aaa".to_owned());
+   | 
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:32:9
@@ -36,8 +37,9 @@ LL |     foo(&mut "aaa".to_owned());
    |
 help: consider removing the borrow
    |
-LL |     foo("aaa".to_owned());
-   |        --
+LL -     foo(&mut "aaa".to_owned());
+LL +     foo("aaa".to_owned());
+   | 
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:2:20
@@ -85,7 +87,7 @@ LL |     let r = R { i };
 help: consider dereferencing the borrow
    |
 LL |     let r = R { i: *i };
-   |                 ^^^^^
+   |                 ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:46:20
@@ -96,7 +98,7 @@ LL |     let r = R { i: i };
 help: consider dereferencing the borrow
    |
 LL |     let r = R { i: *i };
-   |                    ^
+   |                    +
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:55:9
@@ -107,7 +109,7 @@ LL |         b
 help: consider dereferencing the borrow
    |
 LL |         *b
-   |         ^
+   |         +
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:63:9
@@ -118,7 +120,7 @@ LL |         b
 help: consider dereferencing the borrow
    |
 LL |         *b
-   |         ^
+   |         +
 
 error[E0308]: `if` and `else` have incompatible types
   --> $DIR/deref-suggestion.rs:68:12
index 8a83e145ea2d024a943b692d4eabf29c620eac06..635bd5e7edf4992a5123c91a4ad46bbc68e4b7e4 100644 (file)
@@ -33,11 +33,11 @@ LL |     Struct { a, _ } = Struct { a: 1, b: 2 };
 help: include the missing field in the pattern
    |
 LL |     Struct { a, b } = Struct { a: 1, b: 2 };
-   |               ^^^^^
+   |               ~~~~~
 help: if you don't care about this missing field, you can explicitly ignore it
    |
 LL |     Struct { a, .. } = Struct { a: 1, b: 2 };
-   |               ^^^^^^
+   |               ~~~~~~
 
 error: aborting due to 5 previous errors
 
index c270593cac741883fcc242d2961983adb4849b88..0e92cc5c9f282a70153f0c9495ba5b48cf8a3522 100644 (file)
@@ -35,11 +35,11 @@ LL |     TupleStruct(_) = TupleStruct(1, 2);
 help: use `_` to explicitly ignore each field
    |
 LL |     TupleStruct(_, _) = TupleStruct(1, 2);
-   |                  ^^^
+   |                  +++
 help: use `..` to ignore all fields
    |
 LL |     TupleStruct(..) = TupleStruct(1, 2);
-   |                 ^^
+   |                 ~~
 
 error[E0023]: this pattern has 3 fields, but the corresponding tuple variant has 2 fields
   --> $DIR/tuple_struct_destructure_fail.rs:34:5
@@ -62,11 +62,11 @@ LL |     Enum::SingleVariant(_) = Enum::SingleVariant(1, 2);
 help: use `_` to explicitly ignore each field
    |
 LL |     Enum::SingleVariant(_, _) = Enum::SingleVariant(1, 2);
-   |                          ^^^
+   |                          +++
 help: use `..` to ignore all fields
    |
 LL |     Enum::SingleVariant(..) = Enum::SingleVariant(1, 2);
-   |                         ^^
+   |                         ~~
 
 error[E0070]: invalid left-hand side of assignment
   --> $DIR/tuple_struct_destructure_fail.rs:40:12
index 8db9652b1eadeb6a686c956e64c95006b5908289..0e2fdf9f6c2bf2d74c2ece17b8095d0db8d41f5d 100644 (file)
@@ -133,7 +133,7 @@ LL | fn foo<X: K<_, _>>(x: X) {}
 help: use type parameters instead
    |
 LL | fn foo<X: K<T, T>, T>(x: X) {}
-   |             ^  ^ ^^^
+   |             ~  ~ +++
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
   --> $DIR/bad-assoc-ty.rs:52:34
@@ -144,7 +144,7 @@ LL | fn bar<F>(_: F) where F: Fn() -> _ {}
 help: use type parameters instead
    |
 LL | fn bar<F, T>(_: F) where F: Fn() -> T {}
-   |         ^^^                         ^
+   |         +++                         ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
   --> $DIR/bad-assoc-ty.rs:55:19
@@ -155,7 +155,7 @@ LL | fn baz<F: Fn() -> _>(_: F) {}
 help: use type parameters instead
    |
 LL | fn baz<F: Fn() -> T, T>(_: F) {}
-   |                   ^^^^
+   |                   ~+++
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs
   --> $DIR/bad-assoc-ty.rs:58:33
@@ -166,7 +166,7 @@ LL | struct L<F>(F) where F: Fn() -> _;
 help: use type parameters instead
    |
 LL | struct L<F, T>(F) where F: Fn() -> T;
-   |           ^^^                      ^
+   |           +++                      ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs
   --> $DIR/bad-assoc-ty.rs:60:30
@@ -177,7 +177,7 @@ LL | struct M<F> where F: Fn() -> _ {
 help: use type parameters instead
    |
 LL | struct M<F, T> where F: Fn() -> T {
-   |           ^^^                   ^
+   |           +++                   ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for enums
   --> $DIR/bad-assoc-ty.rs:64:28
@@ -188,7 +188,7 @@ LL | enum N<F> where F: Fn() -> _ {
 help: use type parameters instead
    |
 LL | enum N<F, T> where F: Fn() -> T {
-   |         ^^^                   ^
+   |         +++                   ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for unions
   --> $DIR/bad-assoc-ty.rs:69:29
@@ -199,7 +199,7 @@ LL | union O<F> where F: Fn() -> _ {
 help: use type parameters instead
    |
 LL | union O<F, T> where F: Fn() -> T {
-   |          ^^^                   ^
+   |          +++                   ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for traits
   --> $DIR/bad-assoc-ty.rs:74:29
@@ -210,7 +210,7 @@ LL | trait P<F> where F: Fn() -> _ {
 help: use type parameters instead
    |
 LL | trait P<F, T> where F: Fn() -> T {
-   |          ^^^                   ^
+   |          +++                   ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
   --> $DIR/bad-assoc-ty.rs:79:38
@@ -221,7 +221,7 @@ LL |     fn foo<F>(_: F) where F: Fn() -> _ {}
 help: use type parameters instead
    |
 LL |     fn foo<F, T>(_: F) where F: Fn() -> T {}
-   |             ^^^                         ^
+   |             +++                         ~
 
 error: aborting due to 28 previous errors
 
index 76e87a3749c33a5b8f2849c41707741b14b78dc6..d5e16e1ff273d693867fb148bee0c69fecac9448 100644 (file)
@@ -82,7 +82,7 @@ LL | }
 help: add `fn` here to parse `hello_method` as a public method
    |
 LL |     pub fn hello_method(&self) {
-   |         ^^
+   |         ++
 
 error[E0599]: no method named `hello_method` found for struct `S` in the current scope
   --> $DIR/issue-40006.rs:38:7
index 2c2978d2bff2d8ad27d2240d9816e9372ad952ab..f4bc5aef82dc3c5c91e0f1f37c4891728a260ecf 100644 (file)
@@ -7,7 +7,7 @@ LL |     (0..13).collect<Vec<i32>>();
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |     (0..13).collect::<Vec<i32>>();
-   |                    ^^
+   |                    ++
 
 error: comparison operators cannot be chained
   --> $DIR/issue-40396.rs:5:8
@@ -18,7 +18,7 @@ LL |     Vec<i32>::new();
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |     Vec::<i32>::new();
-   |        ^^
+   |        ++
 
 error: comparison operators cannot be chained
   --> $DIR/issue-40396.rs:8:20
@@ -29,7 +29,7 @@ LL |     (0..13).collect<Vec<i32>();
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |     (0..13).collect::<Vec<i32>();
-   |                    ^^
+   |                    ++
 
 error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, or an operator, found `,`
   --> $DIR/issue-40396.rs:11:43
@@ -40,7 +40,7 @@ LL |     let x = std::collections::HashMap<i128, i128>::new();
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |     let x = std::collections::HashMap::<i128, i128>::new();
-   |                                      ^^
+   |                                      ++
 
 error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `,`
   --> $DIR/issue-40396.rs:15:39
@@ -51,7 +51,7 @@ LL |         std::collections::HashMap<i128, i128>::new()
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |         std::collections::HashMap::<i128, i128>::new()
-   |                                  ^^
+   |                                  ++
 
 error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `,`
   --> $DIR/issue-40396.rs:20:39
@@ -62,7 +62,7 @@ LL |         std::collections::HashMap<i128, i128>::new();
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |         std::collections::HashMap::<i128, i128>::new();
-   |                                  ^^
+   |                                  ++
 
 error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `,`
   --> $DIR/issue-40396.rs:25:39
@@ -73,7 +73,7 @@ LL |         std::collections::HashMap<i128, i128>::new(1, 2);
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |         std::collections::HashMap::<i128, i128>::new(1, 2);
-   |                                  ^^
+   |                                  ++
 
 error[E0308]: mismatched types
   --> $DIR/issue-40396.rs:13:17
index 16b80a6f4123637461b902e8cd4127900c4fbdde..b339ce5ce8c923b96bba91f9581261d0dbddb53a 100644 (file)
@@ -9,9 +9,9 @@ LL |     this_function_expects_a_double_option(n);
 help: try using a variant of the expected enum
    |
 LL |     this_function_expects_a_double_option(DoubleOption::FirstSome(n));
-   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~
 LL |     this_function_expects_a_double_option(DoubleOption::AlternativeSome(n));
-   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/issue-42764.rs:27:33
index d05d6d120b08477e4d0eb61d6b959e895e80a4a9..c2e3ead7ec7c68a1b64bfcc62aa93b7842d8387a 100644 (file)
@@ -7,11 +7,11 @@ LL |     while let b1, b2, b3 = reading_frame.next().expect("there should be a s
 help: try adding parentheses to match on a tuple...
    |
 LL |     while let (b1, b2, b3) = reading_frame.next().expect("there should be a start codon") {
-   |               ^^^^^^^^^^^^
+   |               ~~~~~~~~~~~~
 help: ...or a vertical bar to match on multiple alternatives
    |
 LL |     while let b1 | b2 | b3 = reading_frame.next().expect("there should be a start codon") {
-   |               ^^^^^^^^^^^^
+   |               ~~~~~~~~~~~~
 
 error: unexpected `,` in pattern
   --> $DIR/issue-48492-tuple-destructure-missing-parens.rs:49:14
@@ -22,11 +22,11 @@ LL |     if let b1, b2, b3 = reading_frame.next().unwrap() {
 help: try adding parentheses to match on a tuple...
    |
 LL |     if let (b1, b2, b3) = reading_frame.next().unwrap() {
-   |            ^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~
 help: ...or a vertical bar to match on multiple alternatives
    |
 LL |     if let b1 | b2 | b3 = reading_frame.next().unwrap() {
-   |            ^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~
 
 error: unexpected `,` in pattern
   --> $DIR/issue-48492-tuple-destructure-missing-parens.rs:59:28
@@ -37,11 +37,11 @@ LL |         Nucleotide::Adenine, Nucleotide::Cytosine, _ => true
 help: try adding parentheses to match on a tuple...
    |
 LL |         (Nucleotide::Adenine, Nucleotide::Cytosine, _) => true
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 help: ...or a vertical bar to match on multiple alternatives
    |
 LL |         Nucleotide::Adenine | Nucleotide::Cytosine | _ => true
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: unexpected `,` in pattern
   --> $DIR/issue-48492-tuple-destructure-missing-parens.rs:67:10
@@ -52,11 +52,11 @@ LL |     for x, _barr_body in women.iter().map(|woman| woman.allosomes.clone())
 help: try adding parentheses to match on a tuple...
    |
 LL |     for (x, _barr_body) in women.iter().map(|woman| woman.allosomes.clone()) {
-   |         ^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~
 help: ...or a vertical bar to match on multiple alternatives
    |
 LL |     for x | _barr_body in women.iter().map(|woman| woman.allosomes.clone()) {
-   |         ^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~
 
 error: unexpected `,` in pattern
   --> $DIR/issue-48492-tuple-destructure-missing-parens.rs:75:10
@@ -67,11 +67,11 @@ LL |     for x, y @ Allosome::Y(_) in men.iter().map(|man| man.allosomes.clone()
 help: try adding parentheses to match on a tuple...
    |
 LL |     for (x, y @ Allosome::Y(_)) in men.iter().map(|man| man.allosomes.clone()) {
-   |         ^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~~~~~~
 help: ...or a vertical bar to match on multiple alternatives
    |
 LL |     for x | y @ Allosome::Y(_) in men.iter().map(|man| man.allosomes.clone()) {
-   |         ^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~~~~~
 
 error: unexpected `,` in pattern
   --> $DIR/issue-48492-tuple-destructure-missing-parens.rs:84:14
@@ -82,11 +82,11 @@ LL |     let women, men: (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned()
 help: try adding parentheses to match on a tuple...
    |
 LL |     let (women, men): (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned()
-   |         ^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~
 help: ...or a vertical bar to match on multiple alternatives
    |
 LL |     let women | men: (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned()
-   |         ^^^^^^^^^^^
+   |         ~~~~~~~~~~~
 
 error: aborting due to 6 previous errors
 
index 0ccccb53aac25063ee9920450e03d5b08cc8467b..83fc37e7e537fe9277ca052c1db5b69a7773b8f8 100644 (file)
@@ -13,7 +13,7 @@ LL | const UNIVERSAL_GRAVITATIONAL_CONSTANT: f64 = 6.674e−11; // m³⋅kg⁻¹
 help: Unicode character '−' (Minus Sign) looks like '-' (Minus/Hyphen), but it is not
    |
 LL | const UNIVERSAL_GRAVITATIONAL_CONSTANT: f64 = 6.674e-11; // m³⋅kg⁻¹⋅s⁻²
-   |                                                     ^
+   |                                                     ~
 
 error[E0277]: cannot subtract `{integer}` from `{float}`
   --> $DIR/issue-49746-unicode-confusable-in-float-literal-expt.rs:1:53
index 9429a0b576532e017c2d4307beabb4f8a9dfd536..abc040c0546b428551f9965753711bb65c354f9f 100644 (file)
@@ -7,13 +7,13 @@ LL | fn setup() -> Set { Set }
 help: there is an enum variant `AffixHeart::Set` and 7 others; try using the variant's enum
    |
 LL | fn setup() -> AffixHeart { Set }
-   |               ^^^^^^^^^^
+   |               ~~~~~~~~~~
 LL | fn setup() -> CauseToBe { Set }
-   |               ^^^^^^^^^
+   |               ~~~~~~~~~
 LL | fn setup() -> Determine { Set }
-   |               ^^^^^^^^^
+   |               ~~~~~~~~~
 LL | fn setup() -> PutDown { Set }
-   |               ^^^^^^^
+   |               ~~~~~~~
      and 3 other candidates
 
 error[E0425]: cannot find value `Set` in this scope
index 9a695a8987a37c40b61649c5ac94bc0891923374..3d8049cba9c8f822adde19927c649193d72a7bd7 100644 (file)
@@ -7,7 +7,7 @@ LL |         OhNo = 0_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:28:16
@@ -18,7 +18,7 @@ LL |         OhNo = 0_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:41:16
@@ -29,7 +29,7 @@ LL |         OhNo = 0_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:54:16
@@ -40,7 +40,7 @@ LL |         OhNo = 0_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:67:16
@@ -51,7 +51,7 @@ LL |         OhNo = 0_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:80:16
@@ -62,7 +62,7 @@ LL |         OhNo = 0_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:93:16
@@ -73,7 +73,7 @@ LL |         OhNo = 0_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:106:16
@@ -84,7 +84,7 @@ LL |         OhNo = 0_i64,
 help: change the type of the numeric literal from `i64` to `u64`
    |
 LL |         OhNo = 0_u64,
-   |                ^^^^^
+   |                ~~~~~
 
 error: aborting due to 8 previous errors
 
index 017b73a0d8611bdd78b1c4c1875aa4effa5af082..32967b376ca9c2b12dae6e9aee6bbbba0d10c90c 100644 (file)
@@ -9,11 +9,12 @@ LL |     &panic!()
 help: try adding a return type
    |
 LL | fn g() -> &_ {
-   |        ^^^^^
+   |        +++++
 help: consider removing the borrow
    |
-LL |     panic!()
-   |    --
+LL -     &panic!()
+LL +     panic!()
+   | 
 
 error[E0308]: mismatched types
   --> $DIR/diverging-tuple-parts-39485.rs:12:5
index 6c57dd9316fbd3f29d1daf2ac4eec5ec2e0c3738..b7824c027ec119deafc063958e669b2c8e5541bc 100644 (file)
@@ -9,8 +9,9 @@ LL |     let u: &dyn Foo = t;
    = note: required for the cast to the object type `dyn Foo`
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn test1<T: Foo>(t: &T) {
-   |            --
+LL - fn test1<T: ?Sized + Foo>(t: &T) {
+LL + fn test1<T: Foo>(t: &T) {
+   | 
 
 error[E0277]: the size for values of type `T` cannot be known at compilation time
   --> $DIR/dst-object-from-unsized-type.rs:13:23
@@ -23,8 +24,9 @@ LL |     let v: &dyn Foo = t as &dyn Foo;
    = note: required for the cast to the object type `dyn Foo`
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn test2<T: Foo>(t: &T) {
-   |            --
+LL - fn test2<T: ?Sized + Foo>(t: &T) {
+LL + fn test2<T: Foo>(t: &T) {
+   | 
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/dst-object-from-unsized-type.rs:18:28
index 481c01a75e5a9e9b4e9960905628c19abc20b0c3..8b781a7b1f92d571524c41a58b5f954bf625c06a 100644 (file)
@@ -11,7 +11,7 @@ LL | impl Foo<[isize]> for usize { }
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | trait Foo<T: ?Sized> : Sized { fn take(self, x: &T) { } } // Note: T is sized
-   |            ^^^^^^^^
+   |            ++++++++
 
 error[E0277]: the size for values of type `[usize]` cannot be known at compilation time
   --> $DIR/dst-sized-trait-param.rs:10:6
index 02f0206c443a287e997ae9346e89182c6e0a9cc2..ba723b38bfada417b4f6168a0dfc4be993d8e2ea 100644 (file)
@@ -11,7 +11,7 @@ LL | macro_rules! panic { () => {} }
 help: you can use `as` to change the binding name of the import
    |
 LL | pub use std::panic as other_panic;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 30f09e22792167ea0a9151c9a4430713810fb8c0..c9bb08cf35c1dc3111962c2650683b36ce345be5 100644 (file)
@@ -10,7 +10,7 @@ note: the lint level is defined here
 LL | #[deny(bare_trait_objects)]
    |        ^^^^^^^^^^^^^^^^^^
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error: trait objects without an explicit `dyn` are deprecated
   --> $DIR/dyn-2018-edition-lint.rs:4:35
@@ -19,7 +19,7 @@ LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
    |                                   ^^^^^^^^^ help: use `dyn`: `dyn SomeTrait`
    |
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error: trait objects without an explicit `dyn` are deprecated
   --> $DIR/dyn-2018-edition-lint.rs:9:14
@@ -28,7 +28,7 @@ LL |     let _x: &SomeTrait = todo!();
    |              ^^^^^^^^^ help: use `dyn`: `dyn SomeTrait`
    |
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error: aborting due to 3 previous errors
 
index 798f48060e7b7eed7915fae559ef4bb0b9429ad7..730bc691bf88610e5f9893d00071485574ccc9e5 100644 (file)
@@ -7,7 +7,7 @@ LL |     let _x: &SomeTrait = todo!();
 help: add `dyn` keyword before this trait
    |
 LL |     let _x: &dyn SomeTrait = todo!();
-   |              ^^^
+   |              +++
 
 error[E0782]: trait objects must include the `dyn` keyword
   --> $DIR/dyn-2021-edition-error.rs:3:17
@@ -18,7 +18,7 @@ LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
 help: add `dyn` keyword before this trait
    |
 LL | fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) {
-   |                 ^^^
+   |                 +++
 
 error[E0782]: trait objects must include the `dyn` keyword
   --> $DIR/dyn-2021-edition-error.rs:3:35
@@ -29,7 +29,7 @@ LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
 help: add `dyn` keyword before this trait
    |
 LL | fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) {
-   |                                   ^^^
+   |                                   +++
 
 error: aborting due to 3 previous errors
 
index 22f28a67798f53354bcc767c700a810faac64228..65d9199fa3326d5a528684fc7f6e45b07ae63c64 100644 (file)
@@ -8,7 +8,7 @@ LL |     produces_async! {}
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     () => (pub fn r#async() {})
-   |                   ^^^^^^^
+   |                   ~~~~~~~
 
 error: aborting due to previous error
 
index 04d45758578a395c10f00cc79e4fb94072875a33..837d35bfccb0e5d291254f62da2e2d3a4f790737 100644 (file)
@@ -7,7 +7,7 @@ LL |     let mut async = 1;
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let mut r#async = 1;
-   |             ^^^^^^^
+   |             ~~~~~~~
 
 error: expected identifier, found keyword `async`
   --> $DIR/edition-keywords-2018-2015-parsing.rs:26:13
@@ -18,7 +18,7 @@ LL |     module::async();
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     module::r#async();
-   |             ^^^^^^^
+   |             ~~~~~~~
 
 error: no rules expected the token `r#async`
   --> $DIR/edition-keywords-2018-2015-parsing.rs:20:31
index 2a1e7bb4afafd0a4fe80675d19df956cd8ed72f3..77b95ec87a0334f5b424eba42a674abb04dec66e 100644 (file)
@@ -8,7 +8,7 @@ LL |     produces_async! {}
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     () => (pub fn r#async() {})
-   |                   ^^^^^^^
+   |                   ~~~~~~~
 
 error: aborting due to previous error
 
index af11a505ccf36663e244830dcc067aa658ad990e..7c183699ac255f05c8f381531b8f29887004e905 100644 (file)
@@ -7,7 +7,7 @@ LL |     let mut async = 1;
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let mut r#async = 1;
-   |             ^^^^^^^
+   |             ~~~~~~~
 
 error: expected identifier, found keyword `async`
   --> $DIR/edition-keywords-2018-2018-parsing.rs:26:13
@@ -18,7 +18,7 @@ LL |     module::async();
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     module::r#async();
-   |             ^^^^^^^
+   |             ~~~~~~~
 
 error: no rules expected the token `r#async`
   --> $DIR/edition-keywords-2018-2018-parsing.rs:20:31
index 5ee8cbd912b0e2e22dbcf5b9a881babca6cfaaee..48e5ea8ec866cd866e50db26dd788382f3fe9273 100644 (file)
@@ -15,11 +15,11 @@ LL | pub struct XEmpty2;
 help: use struct literal syntax instead
    |
 LL |     let e1 = Empty1 {};
-   |              ^^^^^^^^^
+   |              ~~~~~~~~~
 help: a unit struct with a similar name exists
    |
 LL |     let e1 = XEmpty2;
-   |              ^^^^^^^
+   |              ~~~~~~~
 
 error[E0423]: expected function, tuple struct or tuple variant, found struct `Empty1`
   --> $DIR/empty-struct-braces-expr.rs:16:14
@@ -38,11 +38,11 @@ LL | pub struct XEmpty2;
 help: use struct literal syntax instead
    |
 LL |     let e1 = Empty1 {};
-   |              ^^^^^^^^^
+   |              ~~~~~~~~~
 help: a unit struct with a similar name exists
    |
 LL |     let e1 = XEmpty2();
-   |              ^^^^^^^
+   |              ~~~~~~~
 
 error[E0423]: expected value, found struct variant `E::Empty3`
   --> $DIR/empty-struct-braces-expr.rs:18:14
@@ -78,11 +78,11 @@ LL | pub struct XEmpty2;
 help: use struct literal syntax instead
    |
 LL |     let xe1 = XEmpty1 {};
-   |               ^^^^^^^^^^
+   |               ~~~~~~~~~~
 help: a unit struct with a similar name exists
    |
 LL |     let xe1 = XEmpty2;
-   |               ^^^^^^^
+   |               ~~~~~~~
 
 error[E0423]: expected function, tuple struct or tuple variant, found struct `XEmpty1`
   --> $DIR/empty-struct-braces-expr.rs:23:15
@@ -100,11 +100,11 @@ LL | pub struct XEmpty2;
 help: use struct literal syntax instead
    |
 LL |     let xe1 = XEmpty1 {};
-   |               ^^^^^^^^^^
+   |               ~~~~~~~~~~
 help: a unit struct with a similar name exists
    |
 LL |     let xe1 = XEmpty2();
-   |               ^^^^^^^
+   |               ~~~~~~~
 
 error[E0599]: no variant or associated item named `Empty3` found for enum `empty_struct::XE` in the current scope
   --> $DIR/empty-struct-braces-expr.rs:25:19
index 5c02b62969fe7c652e26fa7671c7ba68a70b0560..0215a9e5935322507e2609a5ef1b8c81fa354481 100644 (file)
@@ -23,11 +23,11 @@ LL |     XEmpty4,
 help: use struct pattern syntax instead
    |
 LL |         XE::XEmpty3 { /* fields */ } => ()
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 help: a unit variant with a similar name exists
    |
 LL |         XE::XEmpty4 => ()
-   |             ^^^^^^^
+   |             ~~~~~~~
 
 error: aborting due to 2 previous errors
 
index 4bac2dfe76f282d34f32df3493a3eb0626e7deb4..28191615afda4849b7553debfddad2652ccd222c 100644 (file)
@@ -15,11 +15,11 @@ LL | pub struct XEmpty6();
 help: use struct pattern syntax instead
    |
 LL |         Empty1 {} => ()
-   |         ^^^^^^^^^
+   |         ~~~~~~~~~
 help: a tuple struct with a similar name exists
    |
 LL |         XEmpty6() => ()
-   |         ^^^^^^^
+   |         ~~~~~~~
 
 error[E0532]: expected tuple struct or tuple variant, found struct `XEmpty1`
   --> $DIR/empty-struct-braces-pat-2.rs:18:9
@@ -38,11 +38,11 @@ LL | pub struct XEmpty6();
 help: use struct pattern syntax instead
    |
 LL |         XEmpty1 {} => ()
-   |         ^^^^^^^^^^
+   |         ~~~~~~~~~~
 help: a tuple struct with a similar name exists
    |
 LL |         XEmpty6() => ()
-   |         ^^^^^^^
+   |         ~~~~~~~
 
 error[E0532]: expected tuple struct or tuple variant, found struct `Empty1`
   --> $DIR/empty-struct-braces-pat-2.rs:21:9
@@ -61,11 +61,11 @@ LL | pub struct XEmpty6();
 help: use struct pattern syntax instead
    |
 LL |         Empty1 {} => ()
-   |         ^^^^^^^^^
+   |         ~~~~~~~~~
 help: a tuple struct with a similar name exists
    |
 LL |         XEmpty6(..) => ()
-   |         ^^^^^^^
+   |         ~~~~~~~
 
 error[E0532]: expected tuple struct or tuple variant, found struct `XEmpty1`
   --> $DIR/empty-struct-braces-pat-2.rs:24:9
@@ -84,11 +84,11 @@ LL | pub struct XEmpty6();
 help: use struct pattern syntax instead
    |
 LL |         XEmpty1 {} => ()
-   |         ^^^^^^^^^^
+   |         ~~~~~~~~~~
 help: a tuple struct with a similar name exists
    |
 LL |         XEmpty6(..) => ()
-   |         ^^^^^^^
+   |         ~~~~~~~
 
 error: aborting due to 4 previous errors
 
index cc2feb86d8e5b469ac85fcd04b05a58ec106bae0..60266bb35807df7314c527bbdabba1766b89a5e7 100644 (file)
@@ -24,11 +24,11 @@ LL |     XEmpty5(),
 help: use struct pattern syntax instead
    |
 LL |         XE::XEmpty3 { /* fields */ } => ()
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 help: a tuple variant with a similar name exists
    |
 LL |         XE::XEmpty5() => ()
-   |             ^^^^^^^
+   |             ~~~~~~~
 
 error[E0532]: expected tuple struct or tuple variant, found struct variant `E::Empty3`
   --> $DIR/empty-struct-braces-pat-3.rs:25:9
@@ -56,11 +56,11 @@ LL |     XEmpty5(),
 help: use struct pattern syntax instead
    |
 LL |         XE::XEmpty3 { /* fields */ } => ()
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 help: a tuple variant with a similar name exists
    |
 LL |         XE::XEmpty5(..) => ()
-   |             ^^^^^^^
+   |             ~~~~~~~
 
 error: aborting due to 4 previous errors
 
index 9b5c8422de55dfd79c4727d4c2f18b32f84b87f7..e696b85c6cc8164273480aa7f3a917119d03b676 100644 (file)
@@ -41,11 +41,11 @@ LL |     XEmpty5(),
 help: use the tuple variant pattern syntax instead
    |
 LL |         XE::XEmpty5(/* fields */) => (),
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~~
 help: a unit variant with a similar name exists
    |
 LL |         XE::XEmpty4 => (),
-   |             ^^^^^^^
+   |             ~~~~~~~
 
 error: aborting due to 4 previous errors
 
index 50b0e19133e3c26d53e13898b34eea76f50a3af5..1023950639a662c8daf2cae6b6d3ac8ff63890e4 100644 (file)
@@ -23,7 +23,7 @@ LL |     let e4 = E::Empty4();
 help: `E::Empty4` is a unit variant, you need to write it without the parenthesis
    |
 LL |     let e4 = E::Empty4;
-   |              ^^^^^^^^^
+   |              ~~~~~~~~~
 
 error[E0618]: expected function, found `empty_struct::XEmpty2`
   --> $DIR/empty-struct-unit-expr.rs:18:15
@@ -44,7 +44,7 @@ LL |     let xe4 = XE::XEmpty4();
 help: `XE::XEmpty4` is a unit variant, you need to write it without the parenthesis
    |
 LL |     let xe4 = XE::XEmpty4;
-   |               ^^^^^^^^^^^
+   |               ~~~~~~~~~~~
 
 error: aborting due to 4 previous errors
 
index 839d3a84103fab7e1fab634dce1713146a819ddd..b1b253385fd34e8bbe0a465e8d8609ed10afde8a 100644 (file)
@@ -15,11 +15,11 @@ LL | pub struct XEmpty6();
 help: use this syntax instead
    |
 LL |         Empty2 => ()
-   |         ^^^^^^
+   |         ~~~~~~
 help: a tuple struct with a similar name exists
    |
 LL |         XEmpty6() => ()
-   |         ^^^^^^^
+   |         ~~~~~~~
 
 error[E0532]: expected tuple struct or tuple variant, found unit struct `XEmpty2`
   --> $DIR/empty-struct-unit-pat.rs:24:9
@@ -37,11 +37,11 @@ LL | pub struct XEmpty6();
 help: use this syntax instead
    |
 LL |         XEmpty2 => ()
-   |         ^^^^^^^
+   |         ~~~~~~~
 help: a tuple struct with a similar name exists
    |
 LL |         XEmpty6() => ()
-   |         ^^^^^^^
+   |         ~~~~~~~
 
 error[E0532]: expected tuple struct or tuple variant, found unit struct `Empty2`
   --> $DIR/empty-struct-unit-pat.rs:28:9
@@ -60,11 +60,11 @@ LL | pub struct XEmpty6();
 help: use this syntax instead
    |
 LL |         Empty2 => ()
-   |         ^^^^^^
+   |         ~~~~~~
 help: a tuple struct with a similar name exists
    |
 LL |         XEmpty6(..) => ()
-   |         ^^^^^^^
+   |         ~~~~~~~
 
 error[E0532]: expected tuple struct or tuple variant, found unit struct `XEmpty2`
   --> $DIR/empty-struct-unit-pat.rs:32:9
@@ -82,11 +82,11 @@ LL | pub struct XEmpty6();
 help: use this syntax instead
    |
 LL |         XEmpty2 => ()
-   |         ^^^^^^^
+   |         ~~~~~~~
 help: a tuple struct with a similar name exists
    |
 LL |         XEmpty6(..) => ()
-   |         ^^^^^^^
+   |         ~~~~~~~
 
 error[E0532]: expected tuple struct or tuple variant, found unit variant `E::Empty4`
   --> $DIR/empty-struct-unit-pat.rs:37:9
@@ -113,11 +113,11 @@ LL |     XEmpty5(),
 help: use this syntax instead
    |
 LL |         XE::XEmpty4 => (),
-   |         ^^^^^^^^^^^
+   |         ~~~~~~~~~~~
 help: a tuple variant with a similar name exists
    |
 LL |         XE::XEmpty5() => (),
-   |             ^^^^^^^
+   |             ~~~~~~~
 
 error[E0532]: expected tuple struct or tuple variant, found unit variant `E::Empty4`
   --> $DIR/empty-struct-unit-pat.rs:46:9
@@ -144,11 +144,11 @@ LL |     XEmpty5(),
 help: use this syntax instead
    |
 LL |         XE::XEmpty4 => (),
-   |         ^^^^^^^^^^^
+   |         ~~~~~~~~~~~
 help: a tuple variant with a similar name exists
    |
 LL |         XE::XEmpty5(..) => (),
-   |             ^^^^^^^
+   |             ~~~~~~~
 
 error: aborting due to 8 previous errors
 
index a945a4be708548ee60b2f8def16704154c85d57e..b95dcbd8935b33e45367922cbea953418e4dfcf2 100644 (file)
@@ -15,7 +15,7 @@ LL |     None,
 help: you might want to use `if let` to ignore the variant that isn't matched
    |
 LL |     if let Some(y) = x { /* */ }
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 832eba69722134f762552a8ab1073de8660d9a29..ec3aae29714103601cc778f2f0d0c608dec1f535 100644 (file)
@@ -10,7 +10,7 @@ LL |         Fruit::Apple(a) => {},
 help: use `_` to explicitly ignore each field
    |
 LL |         Fruit::Apple(a, _) => {},
-   |                       ^^^
+   |                       +++
 
 error[E0023]: this pattern has 3 fields, but the corresponding tuple variant has 2 fields
   --> $DIR/E0023.rs:12:9
@@ -42,7 +42,7 @@ LL |         Fruit::Orange(a, b) => {},
 help: missing parentheses
    |
 LL |         Fruit::Orange((a, b)) => {},
-   |                       ^    ^
+   |                       +    +
 
 error[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 1 field
   --> $DIR/E0023.rs:15:9
@@ -56,7 +56,7 @@ LL |         Fruit::Banana() => {},
 help: missing parentheses
    |
 LL |         Fruit::Banana(()) => {},
-   |                      ^  ^
+   |                      +  +
 
 error: aborting due to 5 previous errors
 
index a3dd6910be4a5209c2f3c39d44a4b0f9a93e32e6..9ae97e4a994da75443cab3a7d4027078724bb4fd 100644 (file)
@@ -7,11 +7,11 @@ LL |         Dog { age: x } => {}
 help: include the missing field in the pattern
    |
 LL |         Dog { age: x, name } => {}
-   |                     ^^^^^^^^
+   |                     ~~~~~~~~
 help: if you don't care about this missing field, you can explicitly ignore it
    |
 LL |         Dog { age: x, .. } => {}
-   |                     ^^^^^^
+   |                     ~~~~~~
 
 error[E0027]: pattern does not mention field `age`
   --> $DIR/E0027.rs:15:9
@@ -22,11 +22,11 @@ LL |         Dog { name: x, } => {}
 help: include the missing field in the pattern
    |
 LL |         Dog { name: x, age } => {}
-   |                      ^^^^^^^
+   |                      ~~~~~~~
 help: if you don't care about this missing field, you can explicitly ignore it
    |
 LL |         Dog { name: x, .. } => {}
-   |                      ^^^^^^
+   |                      ~~~~~~
 
 error[E0027]: pattern does not mention field `age`
   --> $DIR/E0027.rs:19:9
@@ -37,11 +37,11 @@ LL |         Dog { name: x  , } => {}
 help: include the missing field in the pattern
    |
 LL |         Dog { name: x, age } => {}
-   |                      ^^^^^^^
+   |                      ~~~~~~~
 help: if you don't care about this missing field, you can explicitly ignore it
    |
 LL |         Dog { name: x, .. } => {}
-   |                      ^^^^^^
+   |                      ~~~~~~
 
 error[E0027]: pattern does not mention fields `name`, `age`
   --> $DIR/E0027.rs:22:9
@@ -52,11 +52,11 @@ LL |         Dog {} => {}
 help: include the missing fields in the pattern
    |
 LL |         Dog { name, age } => {}
-   |             ^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~
 help: if you don't care about these missing fields, you can explicitly ignore them
    |
 LL |         Dog { .. } => {}
-   |             ^^^^^^
+   |             ~~~~~~
 
 error: aborting due to 4 previous errors
 
index 513fda3097c145feadadf69c43375a228ba8673c..3b68abbb4a0ba1c22a0d7e486c2e6164245190cb 100644 (file)
@@ -20,11 +20,11 @@ LL |     fn foo();
 help: consider turning `foo` into a method by giving it a `&self` argument
    |
 LL |     fn foo(&self);
-   |            ^^^^^
+   |            +++++
 help: alternatively, consider constraining `foo` so it does not apply to trait objects
    |
 LL |     fn foo() where Self: Sized;
-   |              ^^^^^^^^^^^^^^^^^
+   |              +++++++++++++++++
 
 error[E0033]: type `&dyn SomeTrait` cannot be dereferenced
   --> $DIR/E0033-teach.rs:12:9
index fc1248440d0437354f912022a0c13157576af237..f0645107831e0c9402807503d47dc7356daad3e5 100644 (file)
@@ -20,11 +20,11 @@ LL |     fn foo();
 help: consider turning `foo` into a method by giving it a `&self` argument
    |
 LL |     fn foo(&self);
-   |            ^^^^^
+   |            +++++
 help: alternatively, consider constraining `foo` so it does not apply to trait objects
    |
 LL |     fn foo() where Self: Sized;
-   |              ^^^^^^^^^^^^^^^^^
+   |              +++++++++++++++++
 
 error[E0033]: type `&dyn SomeTrait` cannot be dereferenced
   --> $DIR/E0033.rs:10:9
index 471512ca8f72ceb69ad59a805edb0f5634c3ff88..83718a1e27371f0140c0792addd2ed6273da9e8f 100644 (file)
@@ -17,11 +17,11 @@ LL |     fn foo() {}
 help: disambiguate the associated function for candidate #1
    |
 LL |     Trait1::foo()
-   |     ^^^^^^^^^^^
+   |     ~~~~~~~~
 help: disambiguate the associated function for candidate #2
    |
 LL |     Trait2::foo()
-   |     ^^^^^^^^^^^
+   |     ~~~~~~~~
 
 error: aborting due to previous error
 
index b961fc8aeeb534e6ce27821f70ffa95a4aac1925..ee9a4733fd95fa0598785245cfb752bf23eb26a3 100644 (file)
@@ -6,8 +6,8 @@ LL |     x: &bool,
    |
 help: consider introducing a named lifetime parameter
    |
-LL | struct Foo<'a> {
-LL |     x: &'a bool,
+LL ~ struct Foo<'a> {
+LL ~     x: &'a bool,
    |
 
 error[E0106]: missing lifetime specifier
@@ -18,9 +18,9 @@ LL |     B(&bool),
    |
 help: consider introducing a named lifetime parameter
    |
-LL | enum Bar<'a> {
+LL ~ enum Bar<'a> {
 LL |     A(u8),
-LL |     B(&'a bool),
+LL ~     B(&'a bool),
    |
 
 error[E0106]: missing lifetime specifier
@@ -31,8 +31,8 @@ LL |     baz: Baz,
    |
 help: consider introducing a named lifetime parameter
    |
-LL | struct Quux<'a> {
-LL |     baz: Baz<'a>,
+LL ~ struct Quux<'a> {
+LL ~     baz: Baz<'a>,
    |
 
 error[E0106]: missing lifetime specifiers
@@ -43,11 +43,11 @@ LL |     buzz: Buzz,
    |
 help: consider introducing a named lifetime parameter
    |
-LL | struct Quux<'a> {
+LL ~ struct Quux<'a> {
 LL |     baz: Baz,
 LL |
 LL |
-LL |     buzz: Buzz<'a, 'a>,
+LL ~     buzz: Buzz<'a, 'a>,
    |
 
 error[E0106]: missing lifetime specifier
@@ -59,7 +59,7 @@ LL | type MyStr = &str;
 help: consider introducing a named lifetime parameter
    |
 LL | type MyStr<'a> = &'a str;
-   |           ^^^^   ^^^
+   |           ++++   ~~~
 
 error: aborting due to 5 previous errors
 
index 3c7aa6de541368f12fb9e97423884bceaa71cb5c..c90f85df967413b9ffbeae9e271d320ade216124 100644 (file)
@@ -14,7 +14,7 @@ LL | struct Buzz<'a, 'b>(&'a str, &'b str);
 help: add missing lifetime argument
    |
 LL |     buzz: Buzz<'a, 'a>,
-   |                  ^^^^
+   |                  ++++
 
 error[E0107]: this enum takes 0 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/E0107.rs:17:10
index 085f80f44f30ff5e425778b635b5100b1061e44e..86966d520e7e2653c3ada4bc53132161b90edf5c 100644 (file)
@@ -13,11 +13,11 @@ LL |         let _: Self::A;
 help: use fully qualified syntax to disambiguate
    |
 LL |         let _: <Self as Foo>::A;
-   |                ^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~
 help: use fully qualified syntax to disambiguate
    |
 LL |         let _: <Self as Bar>::A;
-   |                ^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~
 
 error[E0221]: ambiguous associated type `Err` in bounds of `Self`
   --> $DIR/E0221.rs:21:16
index 8486806c6729cfa6021b67c1bcd30eaf3768d91a..2722dfe5e0543fac0b694d9936b1a041cf543e64 100644 (file)
@@ -10,7 +10,7 @@ LL | use bar::baz;
 help: you can use `as` to change the binding name of the import
    |
 LL | use bar::baz as other_baz;
-   |     ^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 10456fd5a5dc1e67ace3e36c3793d63b6d640361..b098f8e1a7f49bb46f2749affb1d1ebe8a154243 100644 (file)
@@ -11,7 +11,7 @@ LL | use foo::alloc;
 help: you can use `as` to change the binding name of the import
    |
 LL | use foo::alloc as other_alloc;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 36e4eeeaeea76df63769da563894eb2ba7e3d4d7..b5c09499276b19518b5bd349c93f53b3e591d2bc 100644 (file)
@@ -11,7 +11,7 @@ LL | fn foo() {}
 help: you can use `as` to change the binding name of the import
    |
 LL | use bar::foo as other_foo;
-   |     ^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index dea0bb259f5062e95be1a454e8c64fb652422e09..2c2dcbdd0dc4a28b05a6f1cfc6f10e1c76468258 100644 (file)
@@ -10,7 +10,7 @@ LL | fn f(p: Path) { }
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL | fn f(p: &Path) { }
-   |         ^
+   |         +
 
 error[E0277]: the trait bound `i32: Foo` is not satisfied
   --> $DIR/E0277.rs:15:15
index a9aecb520b228da49c07ebc4fbfddc0bb16aee0d..5f251527e7716a06ff763e1c4b83a079b161a8db 100644 (file)
@@ -7,7 +7,7 @@ LL |     if let S { x: _x, y: 2 } = S { x: 1, y: 2 } { println!("Ok"); }
 help: surround the struct literal with parentheses
    |
 LL |     if let S { x: _x, y: 2 } = (S { x: 1, y: 2 }) { println!("Ok"); }
-   |                                ^                ^
+   |                                +                +
 
 error: expected expression, found `==`
   --> $DIR/E0423.rs:14:13
@@ -24,7 +24,7 @@ LL |     for _ in std::ops::Range { start: 0, end: 10 } {}
 help: surround the struct literal with parentheses
    |
 LL |     for _ in (std::ops::Range { start: 0, end: 10 }) {}
-   |              ^                                     ^
+   |              +                                     +
 
 error[E0423]: expected function, tuple struct or tuple variant, found struct `Foo`
   --> $DIR/E0423.rs:4:13
@@ -41,11 +41,11 @@ LL | fn foo() {
 help: use struct literal syntax instead
    |
 LL |     let f = Foo { a: val };
-   |             ^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~
 help: a function with a similar name exists
    |
 LL |     let f = foo();
-   |             ^^^
+   |             ~~~
 
 error[E0423]: expected value, found struct `T`
   --> $DIR/E0423.rs:14:8
@@ -56,7 +56,7 @@ LL |     if T {} == T {} { println!("Ok"); }
 help: surround the struct literal with parentheses
    |
 LL |     if (T {}) == T {} { println!("Ok"); }
-   |        ^    ^
+   |        +    +
 
 error: aborting due to 5 previous errors
 
index 20b7a4cb6ece6a52ca503fb1265497ffb15dac37..d02da3e4ecb8a78cd1305bd3f716c9827926b8aa 100644 (file)
@@ -9,7 +9,7 @@ LL |         self.bar();
 help: add a `self` receiver parameter to make the associated `fn` a method
    |
 LL |     fn foo(&self) {
-   |            ^^^^^
+   |            +++++
 
 error[E0424]: expected value, found module `self`
   --> $DIR/E0424.rs:11:9
@@ -22,7 +22,7 @@ LL |         self.bar();
 help: add a `self` receiver parameter to make the associated `fn` a method
    |
 LL |     fn baz(&self, _: i32) {
-   |            ^^^^^^
+   |            ++++++
 
 error[E0424]: expected value, found module `self`
   --> $DIR/E0424.rs:15:20
@@ -35,7 +35,7 @@ LL |         let _ = || self.bar();
 help: add a `self` receiver parameter to make the associated `fn` a method
    |
 LL |     fn qux(&self) {
-   |            ^^^^^
+   |            +++++
 
 error[E0424]: expected unit struct, unit variant or constant, found module `self`
   --> $DIR/E0424.rs:20:9
index c598803fa6cb80e2d340e93e552e4c0607b2c940..0b786ab1e2fe05cc8717ee888d792f0642c4596c 100644 (file)
@@ -6,12 +6,13 @@ LL | use std::fmt::self;
    |
 help: consider importing the module directly
    |
-LL | use std::fmt;
-   |            --
+LL - use std::fmt::self;
+LL + use std::fmt;
+   | 
 help: alternatively, use the multi-path `use` syntax to import `self`
    |
 LL | use std::fmt::{self};
-   |               ^    ^
+   |               +    +
 
 error: aborting due to previous error
 
index 6314e7a3a8a7857a8902df58994a9b88c7ee3047..e5647ee6d09684027667ec20adfb8c803a2cfe13 100644 (file)
@@ -13,7 +13,7 @@ LL |     v as &u8;
 help: consider borrowing the value
    |
 LL |     &*v as &u8;
-   |     ^^
+   |     ++
 
 error: aborting due to 2 previous errors
 
index 1bc047dd356e03547dac219ec2692fda245cdddd..c12e1a3a643612af11fbbb9e19377928497e3a80 100644 (file)
@@ -7,7 +7,7 @@ LL |     f.method;
 help: use parentheses to call the method
    |
 LL |     f.method();
-   |             ^^
+   |             ++
 
 error: aborting due to previous error
 
index c029060c3fbe1df61c39b73fcec5b7708604a15d..ea91ad08292301c9e16f469982523873785fbeb6 100644 (file)
@@ -37,7 +37,7 @@ LL |         printf(::std::ptr::null(), printf);
 help: cast the value to `unsafe extern "C" fn(*const i8, ...)`
    |
 LL |         printf(::std::ptr::null(), printf as unsafe extern "C" fn(*const i8, ...));
-   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 6 previous errors
 
index 714c8d1e4d75ce0182cbcbaa0fa3bbe254b4054a..19a1a8e20ccfa8c925b79042f4b46b80403db36a 100644 (file)
@@ -12,7 +12,7 @@ LL |     X::Entry();
 help: `X::Entry` is a unit variant, you need to write it without the parenthesis
    |
 LL |     X::Entry;
-   |     ^^^^^^^^
+   |     ~~~~~~~~
 
 error[E0618]: expected function, found `i32`
   --> $DIR/E0618.rs:9:5
index 83fcac042b1b41624b4c6816c8e99ffe757ecb57..dd9e28ad49277336d4f6be276b602f6f6832ce5d 100644 (file)
@@ -7,7 +7,7 @@ LL |     fn foo((x, y): (i32, i32));
 help: give this argument a name or use an underscore to ignore it
    |
 LL |     fn foo(_: (i32, i32));
-   |            ^
+   |            ~
 
 error[E0642]: patterns aren't allowed in methods without bodies
   --> $DIR/E0642.rs:11:12
@@ -18,7 +18,7 @@ LL |     fn bar((x, y): (i32, i32)) {}
 help: give this argument a name or use an underscore to ignore it
    |
 LL |     fn bar(_: (i32, i32)) {}
-   |            ^
+   |            ~
 
 error[E0642]: patterns aren't allowed in methods without bodies
   --> $DIR/E0642.rs:13:15
@@ -29,7 +29,7 @@ LL |     fn method(S { .. }: S) {}
 help: give this argument a name or use an underscore to ignore it
    |
 LL |     fn method(_: S) {}
-   |               ^
+   |               ~
 
 error: aborting due to 3 previous errors
 
index 3757ed6d0926eb1b45e5686ab500e1620a28186a..2153b59ad18ddd5c0e5f402d0069c8cc5a0e0077 100644 (file)
@@ -8,7 +8,7 @@ LL | fn foo() -> dyn Trait { Struct }
 help: use `impl Trait` as the return type, as all return paths are of type `Struct`, which implements `Trait`
    |
 LL | fn foo() -> impl Trait { Struct }
-   |             ^^^^^^^^^^
+   |             ~~~~~~~~~~
 
 error[E0746]: return type cannot have an unboxed trait object
   --> $DIR/E0746.rs:11:13
@@ -20,7 +20,7 @@ LL | fn bar() -> dyn Trait {
 help: use `impl Trait` as the return type, as all return paths are of type `{integer}`, which implements `Trait`
    |
 LL | fn bar() -> impl Trait {
-   |             ^^^^^^^^^^
+   |             ~~~~~~~~~~
 
 error: aborting due to 2 previous errors
 
index 554cc3a2bcf34c8d6f5b187bc7fb5c81bda8b40c..319371720710c9aa97b75f433845308c145c2785 100644 (file)
@@ -7,7 +7,7 @@ LL |     if b_ref() {}
 help: consider dereferencing the borrow
    |
 LL |     if *b_ref() {}
-   |        ^
+   |        +
 
 error[E0308]: mismatched types
   --> $DIR/if-no-match-bindings.rs:19:8
@@ -18,7 +18,7 @@ LL |     if b_mut_ref() {}
 help: consider dereferencing the borrow
    |
 LL |     if *b_mut_ref() {}
-   |        ^
+   |        +
 
 error[E0308]: mismatched types
   --> $DIR/if-no-match-bindings.rs:20:8
@@ -28,8 +28,9 @@ LL |     if &true {}
    |
 help: consider removing the borrow
    |
-LL |     if true {}
-   |       --
+LL -     if &true {}
+LL +     if true {}
+   | 
 
 error[E0308]: mismatched types
   --> $DIR/if-no-match-bindings.rs:21:8
@@ -39,8 +40,9 @@ LL |     if &mut true {}
    |
 help: consider removing the borrow
    |
-LL |     if true {}
-   |       --
+LL -     if &mut true {}
+LL +     if true {}
+   | 
 
 error[E0308]: mismatched types
   --> $DIR/if-no-match-bindings.rs:24:11
@@ -51,7 +53,7 @@ LL |     while b_ref() {}
 help: consider dereferencing the borrow
    |
 LL |     while *b_ref() {}
-   |           ^
+   |           +
 
 error[E0308]: mismatched types
   --> $DIR/if-no-match-bindings.rs:25:11
@@ -62,7 +64,7 @@ LL |     while b_mut_ref() {}
 help: consider dereferencing the borrow
    |
 LL |     while *b_mut_ref() {}
-   |           ^
+   |           +
 
 error[E0308]: mismatched types
   --> $DIR/if-no-match-bindings.rs:26:11
@@ -72,8 +74,9 @@ LL |     while &true {}
    |
 help: consider removing the borrow
    |
-LL |     while true {}
-   |          --
+LL -     while &true {}
+LL +     while true {}
+   | 
 
 error[E0308]: mismatched types
   --> $DIR/if-no-match-bindings.rs:27:11
@@ -83,8 +86,9 @@ LL |     while &mut true {}
    |
 help: consider removing the borrow
    |
-LL |     while true {}
-   |          --
+LL -     while &mut true {}
+LL +     while true {}
+   | 
 
 error: aborting due to 8 previous errors
 
index 787c11f2a81ab4d11cebe0771fe26ff349d452ad..5f14779552110a3595fbd84b92617c0d6909856d 100644 (file)
@@ -10,7 +10,7 @@ LL | extern crate m2 as m1;
 help: you can use `as` to change the binding name of the import
    |
 LL | extern crate m2 as other_m1;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 72e4be51822e20a690d59758bafddcabca1d4b70..44c0ae49ea6d68624cca9d7b85c097020e8aab98 100644 (file)
@@ -11,7 +11,7 @@ LL |     assert_sized::<A>();
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | fn assert_sized<T: ?Sized>() {}
-   |                  ^^^^^^^^
+   |                  ++++++++
 
 error[E0277]: the size for values of type `A` cannot be known at compilation time
   --> $DIR/extern-types-unsized.rs:25:5
@@ -31,7 +31,7 @@ LL | struct Foo {
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | fn assert_sized<T: ?Sized>() {}
-   |                  ^^^^^^^^
+   |                  ++++++++
 
 error[E0277]: the size for values of type `A` cannot be known at compilation time
   --> $DIR/extern-types-unsized.rs:28:5
@@ -51,7 +51,7 @@ LL | struct Bar<T: ?Sized> {
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | fn assert_sized<T: ?Sized>() {}
-   |                  ^^^^^^^^
+   |                  ++++++++
 
 error[E0277]: the size for values of type `A` cannot be known at compilation time
   --> $DIR/extern-types-unsized.rs:31:5
@@ -76,7 +76,7 @@ LL | struct Bar<T: ?Sized> {
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | fn assert_sized<T: ?Sized>() {}
-   |                  ^^^^^^^^
+   |                  ++++++++
 
 error: aborting due to 4 previous errors
 
index 912252fd34a2e6035b52e3774b572af8fd93d59d..8f5ba07bdaa9c12f03b41649b541868737b6be87 100644 (file)
@@ -147,7 +147,7 @@ LL | pub trait Copy: Clone {
 help: consider further restricting the associated type
    |
 LL | trait _Tr3 where <<Self as _Tr3>::A as Iterator>::Item: Copy {
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |            +++++++++++++++++++++++++++++++++++++++++++++++++
 
 error: aborting due to 17 previous errors
 
index 74629d3e7e64a15336dec63d1ab7388f6f3e9bcd..c5ffa55ebec6f64985bca63f2e7ac730f6ced3c5 100644 (file)
@@ -15,7 +15,7 @@ LL |     Err(#[stable(feature = "rust1", since = "1.0.0")] E),
 help: you might want to use `if let` to ignore the variant that isn't matched
    |
 LL |     if let Ok(_x) = foo() { /* */ }
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 4afbde5021f917be1a9d4367dfbb7187a012f151..318fb63d3827a10c9817908877f75cf5b2c8b18d 100644 (file)
@@ -70,7 +70,7 @@ LL |     type Pointer2<U32> = Box<U32>;
 help: consider restricting type parameter `U32`
    |
 LL |     type Pointer2<U32: std::clone::Clone> = Box<U32>;
-   |                      ^^^^^^^^^^^^^^^^^^^
+   |                      +++++++++++++++++++
 
 error: aborting due to 8 previous errors
 
index 497b8a429e0ed2a1fb4084c7eff16bc611ecf0c5..20e61303e36aafe41b64d7772c5f3a3c8cc89b01 100644 (file)
@@ -28,11 +28,11 @@ LL |     fn my_lifetime(&self) -> &'a u8 { self.0 }
 help: consider introducing lifetime `'a` here
    |
 LL | impl<'a> MyTrait<'a> for Y<&'a u8> {
-   |     ^^^^
+   |     ++++
 help: consider introducing lifetime `'a` here
    |
 LL |     fn my_lifetime<'a>(&self) -> &'a u8 { self.0 }
-   |                   ^^^^
+   |                   ++++
 
 error[E0261]: use of undeclared lifetime name `'b`
   --> $DIR/feature-gate-in_band_lifetimes.rs:55:27
@@ -44,11 +44,11 @@ LL |     fn any_lifetime() -> &'b u8 { &0 }
 help: consider introducing lifetime `'b` here
    |
 LL | impl<'b> MyTrait<'a> for Y<&'a u8> {
-   |     ^^^^
+   |     ++++
 help: consider introducing lifetime `'b` here
    |
 LL |     fn any_lifetime<'b>() -> &'b u8 { &0 }
-   |                    ^^^^
+   |                    ++++
 
 error[E0261]: use of undeclared lifetime name `'b`
   --> $DIR/feature-gate-in_band_lifetimes.rs:57:27
@@ -60,11 +60,11 @@ LL |     fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 }
 help: consider introducing lifetime `'b` here
    |
 LL | impl<'b> MyTrait<'a> for Y<&'a u8> {
-   |     ^^^^
+   |     ++++
 help: consider introducing lifetime `'b` here
    |
 LL |     fn borrowed_lifetime<'b>(&'b self) -> &'b u8 { &*self.0 }
-   |                         ^^^^
+   |                         ++++
 
 error[E0261]: use of undeclared lifetime name `'b`
   --> $DIR/feature-gate-in_band_lifetimes.rs:57:40
@@ -76,11 +76,11 @@ LL |     fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 }
 help: consider introducing lifetime `'b` here
    |
 LL | impl<'b> MyTrait<'a> for Y<&'a u8> {
-   |     ^^^^
+   |     ++++
 help: consider introducing lifetime `'b` here
    |
 LL |     fn borrowed_lifetime<'b>(&'b self) -> &'b u8 { &*self.0 }
-   |                         ^^^^
+   |                         ++++
 
 error[E0261]: use of undeclared lifetime name `'x`
   --> $DIR/feature-gate-in_band_lifetimes.rs:3:12
@@ -120,11 +120,11 @@ LL |     fn inner_2(&self) -> &'b u8 {
 help: consider introducing lifetime `'b` here
    |
 LL | impl<'b, 'a> X<'b> {
-   |      ^^^
+   |      +++
 help: consider introducing lifetime `'b` here
    |
 LL |     fn inner_2<'b>(&self) -> &'b u8 {
-   |               ^^^^
+   |               ++++
 
 error[E0261]: use of undeclared lifetime name `'b`
   --> $DIR/feature-gate-in_band_lifetimes.rs:23:8
@@ -146,11 +146,11 @@ LL |     fn inner_3(&self) -> &'b u8 {
 help: consider introducing lifetime `'b` here
    |
 LL | impl<'b> X<'b> {
-   |     ^^^^
+   |     ++++
 help: consider introducing lifetime `'b` here
    |
 LL |     fn inner_3<'b>(&self) -> &'b u8 {
-   |               ^^^^
+   |               ++++
 
 error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/feature-gate-in_band_lifetimes.rs:33:9
@@ -172,11 +172,11 @@ LL |     fn inner(&self) -> &'a u8 {
 help: consider introducing lifetime `'a` here
    |
 LL | impl<'a> Y<&'a u8> {
-   |     ^^^^
+   |     ++++
 help: consider introducing lifetime `'a` here
    |
 LL |     fn inner<'a>(&self) -> &'a u8 {
-   |             ^^^^
+   |             ++++
 
 error[E0261]: use of undeclared lifetime name `'b`
   --> $DIR/feature-gate-in_band_lifetimes.rs:43:27
@@ -188,11 +188,11 @@ LL |     fn any_lifetime() -> &'b u8;
 help: consider introducing lifetime `'b` here
    |
 LL | trait MyTrait<'b, 'a> {
-   |               ^^^
+   |               +++
 help: consider introducing lifetime `'b` here
    |
 LL |     fn any_lifetime<'b>() -> &'b u8;
-   |                    ^^^^
+   |                    ++++
 
 error[E0261]: use of undeclared lifetime name `'b`
   --> $DIR/feature-gate-in_band_lifetimes.rs:45:27
@@ -204,11 +204,11 @@ LL |     fn borrowed_lifetime(&'b self) -> &'b u8;
 help: consider introducing lifetime `'b` here
    |
 LL | trait MyTrait<'b, 'a> {
-   |               ^^^
+   |               +++
 help: consider introducing lifetime `'b` here
    |
 LL |     fn borrowed_lifetime<'b>(&'b self) -> &'b u8;
-   |                         ^^^^
+   |                         ++++
 
 error[E0261]: use of undeclared lifetime name `'b`
   --> $DIR/feature-gate-in_band_lifetimes.rs:45:40
@@ -220,11 +220,11 @@ LL |     fn borrowed_lifetime(&'b self) -> &'b u8;
 help: consider introducing lifetime `'b` here
    |
 LL | trait MyTrait<'b, 'a> {
-   |               ^^^
+   |               +++
 help: consider introducing lifetime `'b` here
    |
 LL |     fn borrowed_lifetime<'b>(&'b self) -> &'b u8;
-   |                         ^^^^
+   |                         ++++
 
 error: aborting due to 17 previous errors
 
index c13c05f146a7e676f94dadf53f7ca31eb8b773a9..a3bd65e518e4ced281311b20597432e9f9daadbe 100644 (file)
@@ -28,11 +28,11 @@ LL |     fn static_fn() {}
 help: consider turning `static_fn` into a method by giving it a `&self` argument
    |
 LL |     fn static_fn(&self) {}
-   |                  ^^^^^
+   |                  +++++
 help: alternatively, consider constraining `static_fn` so it does not apply to trait objects
    |
 LL |     fn static_fn() where Self: Sized {}
-   |                    ^^^^^^^^^^^^^^^^^
+   |                    +++++++++++++++++
 
 error[E0038]: the trait `NonObjectSafe3` cannot be made into an object
   --> $DIR/feature-gate-object_safe_for_dispatch.rs:27:39
diff --git a/src/test/ui/feature-gates/feature-gate-plugin_registrar.rs b/src/test/ui/feature-gates/feature-gate-plugin_registrar.rs
deleted file mode 100644 (file)
index 80e4aa7..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// Test that `#[plugin_registrar]` attribute is gated by `plugin_registrar`
-// feature gate.
-
-// the registration function isn't typechecked yet
-#[plugin_registrar]
-//~^ ERROR compiler plugins are deprecated
-//~| WARN use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated
-pub fn registrar() {}
-//~^ ERROR compiler plugins are experimental and possibly buggy
-
-fn main() {}
diff --git a/src/test/ui/feature-gates/feature-gate-plugin_registrar.stderr b/src/test/ui/feature-gates/feature-gate-plugin_registrar.stderr
deleted file mode 100644 (file)
index b3a43f4..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-error[E0658]: compiler plugins are experimental and possibly buggy
-  --> $DIR/feature-gate-plugin_registrar.rs:8:1
-   |
-LL | pub fn registrar() {}
-   | ^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #29597 <https://github.com/rust-lang/rust/issues/29597> for more information
-   = help: add `#![feature(plugin_registrar)]` to the crate attributes to enable
-
-error[E0658]: compiler plugins are deprecated
-  --> $DIR/feature-gate-plugin_registrar.rs:5:1
-   |
-LL | #[plugin_registrar]
-   | ^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #29597 <https://github.com/rust-lang/rust/issues/29597> for more information
-   = help: add `#![feature(plugin_registrar)]` to the crate attributes to enable
-
-warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/feature-gate-plugin_registrar.rs:5:1
-   |
-LL | #[plugin_registrar]
-   | ^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-error: aborting due to 2 previous errors; 1 warning emitted
-
-For more information about this error, try `rustc --explain E0658`.
index 3631a03938a65972ceecc59c4b1a97258171ab43..fbb18c8c4909705c058429ac44f851f9bcfd99e5 100644 (file)
@@ -9,7 +9,7 @@ LL | fn foo(x: dyn Foo) {
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL | fn foo(x: &dyn Foo) {
-   |           ^
+   |           +
 
 error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known at compilation time
   --> $DIR/feature-gate-unsized_fn_params.rs:24:5
index 0919c2f3a1e0e663f4137e2690f041321775dae7..c4507843e366e06896824d284114ac97951075ed 100644 (file)
@@ -9,7 +9,7 @@ LL | fn f(f: dyn FnOnce()) {}
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL | fn f(f: &dyn FnOnce()) {}
-   |         ^
+   |         +
 
 error: aborting due to previous error
 
index 19a60f1bcfffe2c83d4e01d3795c57f6f44b2b8c..1e5f3d17a90965c665485aab3c44d7a5d31f2bd9 100644 (file)
 
 // check-pass
 
-#![feature(test, plugin_registrar)]
+#![feature(test)]
 #![warn(unused_attributes, unknown_lints)]
 //~^ NOTE the lint level is defined here
 //~| NOTE the lint level is defined here
 
-// Exception, a gated and deprecated attribute.
-
-#![plugin_registrar]
-//~^ WARN unused attribute
-//~| WARN use of deprecated attribute
-//~| HELP may be removed in a future compiler version
-
 // UNGATED WHITE-LISTED BUILT-IN ATTRIBUTES
 
 #![warn(x5400)] //~ WARN unknown lint: `x5400`
@@ -90,6 +83,7 @@
 #![crate_id = "10"]
 //~^ WARN use of deprecated attribute
 //~| HELP remove this attribute
+//~| NOTE `#[warn(deprecated)]` on by default
 
 // FIXME(#44232) we should warn that this isn't used.
 #![feature(rust1)]
@@ -219,35 +213,6 @@ mod inner { #![macro_export] }
     //~^ WARN unused attribute
 }
 
-#[plugin_registrar]
-//~^ WARN unused attribute
-//~| WARN use of deprecated attribute
-//~| HELP may be removed in a future compiler version
-mod plugin_registrar {
-    mod inner { #![plugin_registrar] }
-    //~^ WARN unused attribute
-    //~| WARN use of deprecated attribute
-    //~| HELP may be removed in a future compiler version
-    //~| NOTE `#[warn(deprecated)]` on by default
-
-    // for `fn f()` case, see gated-plugin_registrar.rs
-
-    #[plugin_registrar] struct S;
-    //~^ WARN unused attribute
-    //~| WARN use of deprecated attribute
-    //~| HELP may be removed in a future compiler version
-
-    #[plugin_registrar] type T = S;
-    //~^ WARN unused attribute
-    //~| WARN use of deprecated attribute
-    //~| HELP may be removed in a future compiler version
-
-    #[plugin_registrar] impl S { }
-    //~^ WARN unused attribute
-    //~| WARN use of deprecated attribute
-    //~| HELP may be removed in a future compiler version
-}
-
 // At time of unit test authorship, if compiling without `--test` then
 // non-crate-level #[test] attributes seem to be ignored.
 
index c207c05455feaca98fe7fdb4c5db331d06ec7181..6f5d73044677a28d46ac669ce914fdddf6c1a1f7 100644 (file)
@@ -1,5 +1,5 @@
 warning: unknown lint: `x5400`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:52:9
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:45:9
    |
 LL | #![warn(x5400)]
    |         ^^^^^
@@ -11,169 +11,169 @@ LL | #![warn(unused_attributes, unknown_lints)]
    |                            ^^^^^^^^^^^^^
 
 warning: unknown lint: `x5300`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:53:10
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:46:10
    |
 LL | #![allow(x5300)]
    |          ^^^^^
 
 warning: unknown lint: `x5200`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:54:11
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:47:11
    |
 LL | #![forbid(x5200)]
    |           ^^^^^
 
 warning: unknown lint: `x5100`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:55:9
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:48:9
    |
 LL | #![deny(x5100)]
    |         ^^^^^
 
 warning: unknown lint: `x5400`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:110:8
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:104:8
    |
 LL | #[warn(x5400)]
    |        ^^^^^
 
 warning: unknown lint: `x5400`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:113:25
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:107:25
    |
 LL |     mod inner { #![warn(x5400)] }
    |                         ^^^^^
 
 warning: unknown lint: `x5400`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:116:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:110:12
    |
 LL |     #[warn(x5400)] fn f() { }
    |            ^^^^^
 
 warning: unknown lint: `x5400`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:119:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:113:12
    |
 LL |     #[warn(x5400)] struct S;
    |            ^^^^^
 
 warning: unknown lint: `x5400`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:122:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:116:12
    |
 LL |     #[warn(x5400)] type T = S;
    |            ^^^^^
 
 warning: unknown lint: `x5400`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:125:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:119:12
    |
 LL |     #[warn(x5400)] impl S { }
    |            ^^^^^
 
 warning: unknown lint: `x5300`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:129:9
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:123:9
    |
 LL | #[allow(x5300)]
    |         ^^^^^
 
 warning: unknown lint: `x5300`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:132:26
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:126:26
    |
 LL |     mod inner { #![allow(x5300)] }
    |                          ^^^^^
 
 warning: unknown lint: `x5300`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:135:13
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:129:13
    |
 LL |     #[allow(x5300)] fn f() { }
    |             ^^^^^
 
 warning: unknown lint: `x5300`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:138:13
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:132:13
    |
 LL |     #[allow(x5300)] struct S;
    |             ^^^^^
 
 warning: unknown lint: `x5300`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:141:13
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:135:13
    |
 LL |     #[allow(x5300)] type T = S;
    |             ^^^^^
 
 warning: unknown lint: `x5300`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:144:13
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:138:13
    |
 LL |     #[allow(x5300)] impl S { }
    |             ^^^^^
 
 warning: unknown lint: `x5200`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:148:10
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:142:10
    |
 LL | #[forbid(x5200)]
    |          ^^^^^
 
 warning: unknown lint: `x5200`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:151:27
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:145:27
    |
 LL |     mod inner { #![forbid(x5200)] }
    |                           ^^^^^
 
 warning: unknown lint: `x5200`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:154:14
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:148:14
    |
 LL |     #[forbid(x5200)] fn f() { }
    |              ^^^^^
 
 warning: unknown lint: `x5200`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:157:14
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:151:14
    |
 LL |     #[forbid(x5200)] struct S;
    |              ^^^^^
 
 warning: unknown lint: `x5200`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:160:14
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:154:14
    |
 LL |     #[forbid(x5200)] type T = S;
    |              ^^^^^
 
 warning: unknown lint: `x5200`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:163:14
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:157:14
    |
 LL |     #[forbid(x5200)] impl S { }
    |              ^^^^^
 
 warning: unknown lint: `x5100`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:167:8
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:161:8
    |
 LL | #[deny(x5100)]
    |        ^^^^^
 
 warning: unknown lint: `x5100`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:170:25
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:164:25
    |
 LL |     mod inner { #![deny(x5100)] }
    |                         ^^^^^
 
 warning: unknown lint: `x5100`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:173:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:167:12
    |
 LL |     #[deny(x5100)] fn f() { }
    |            ^^^^^
 
 warning: unknown lint: `x5100`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:176:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:170:12
    |
 LL |     #[deny(x5100)] struct S;
    |            ^^^^^
 
 warning: unknown lint: `x5100`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:179:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:173:12
    |
 LL |     #[deny(x5100)] type T = S;
    |            ^^^^^
 
 warning: unknown lint: `x5100`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:182:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:176:12
    |
 LL |     #[deny(x5100)] impl S { }
    |            ^^^^^
 
 warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:440:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:405:17
    |
 LL |     mod inner { #![macro_escape] }
    |                 ^^^^^^^^^^^^^^^^
@@ -181,63 +181,27 @@ LL |     mod inner { #![macro_escape] }
    = help: try an outer attribute: `#[macro_use]`
 
 warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:437:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:402:1
    |
 LL | #[macro_escape]
    | ^^^^^^^^^^^^^^^
 
-warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:227:17
-   |
-LL |     mod inner { #![plugin_registrar] }
-   |                 ^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:235:5
-   |
-LL |     #[plugin_registrar] struct S;
-   |     ^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-
-warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:240:5
-   |
-LL |     #[plugin_registrar] type T = S;
-   |     ^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-
-warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:245:5
-   |
-LL |     #[plugin_registrar] impl S { }
-   |     ^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-
-warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:222:1
-   |
-LL | #[plugin_registrar]
-   | ^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-
-warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:45:1
-   |
-LL | #![plugin_registrar]
-   | ^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-
 warning: use of deprecated attribute `crate_id`: no longer used.
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:90:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:83:1
    |
 LL | #![crate_id = "10"]
    | ^^^^^^^^^^^^^^^^^^^ help: remove this attribute
+   |
+   = note: `#[warn(deprecated)]` on by default
 
 warning: use of deprecated attribute `no_start`: no longer used.
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:99:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:93:1
    |
 LL | #![no_start]
    | ^^^^^^^^^^^^ help: remove this attribute
 
 warning: attribute should be applied to a function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:332:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:297:1
    |
 LL |   #[no_mangle]
    |   ^^^^^^^^^^^^
@@ -259,7 +223,7 @@ LL | #![warn(unused_attributes, unknown_lints)]
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:499:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:464:1
    |
 LL |   #[cold]
    |   ^^^^^^^
@@ -276,7 +240,7 @@ LL | | }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a foreign function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:528:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:493:1
    |
 LL |   #[link_name = "1900"]
    |   ^^^^^^^^^^^^^^^^^^^^^
@@ -293,7 +257,7 @@ LL | | }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:567:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:532:1
    |
 LL |   #[link_section = "1800"]
    |   ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -310,7 +274,7 @@ LL | | }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:68:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:61:1
    |
 LL | #![cold]
    | ^^^^^^^^
@@ -318,7 +282,7 @@ LL | #![cold]
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a foreign function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:72:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:65:1
    |
 LL | #![link_name = "1900"]
    | ^^^^^^^^^^^^^^^^^^^^^^
@@ -326,7 +290,7 @@ LL | #![link_name = "1900"]
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:75:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:68:1
    |
 LL | #![link_section = "1800"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -334,7 +298,7 @@ LL | #![link_section = "1800"]
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:337:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:302:17
    |
 LL |     mod inner { #![no_mangle] }
    |     ------------^^^^^^^^^^^^^-- not a function or static
@@ -342,7 +306,7 @@ LL |     mod inner { #![no_mangle] }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:344:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:309:5
    |
 LL |     #[no_mangle] struct S;
    |     ^^^^^^^^^^^^ --------- not a function or static
@@ -350,7 +314,7 @@ LL |     #[no_mangle] struct S;
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:349:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:314:5
    |
 LL |     #[no_mangle] type T = S;
    |     ^^^^^^^^^^^^ ----------- not a function or static
@@ -358,7 +322,7 @@ LL |     #[no_mangle] type T = S;
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:354:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:319:5
    |
 LL |     #[no_mangle] impl S { }
    |     ^^^^^^^^^^^^ ---------- not a function or static
@@ -366,7 +330,7 @@ LL |     #[no_mangle] impl S { }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:505:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:470:17
    |
 LL |     mod inner { #![cold] }
    |     ------------^^^^^^^^-- not a function
@@ -374,7 +338,7 @@ LL |     mod inner { #![cold] }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:512:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:477:5
    |
 LL |     #[cold] struct S;
    |     ^^^^^^^ --------- not a function
@@ -382,7 +346,7 @@ LL |     #[cold] struct S;
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:517:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:482:5
    |
 LL |     #[cold] type T = S;
    |     ^^^^^^^ ----------- not a function
@@ -390,7 +354,7 @@ LL |     #[cold] type T = S;
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:522:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:487:5
    |
 LL |     #[cold] impl S { }
    |     ^^^^^^^ ---------- not a function
@@ -398,7 +362,7 @@ LL |     #[cold] impl S { }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a foreign function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:534:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:499:5
    |
 LL |     #[link_name = "1900"]
    |     ^^^^^^^^^^^^^^^^^^^^^
@@ -408,13 +372,13 @@ LL |     extern "C" { }
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 help: try `#[link(name = "1900")]` instead
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:534:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:499:5
    |
 LL |     #[link_name = "1900"]
    |     ^^^^^^^^^^^^^^^^^^^^^
 
 warning: attribute should be applied to a foreign function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:541:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:506:17
    |
 LL |     mod inner { #![link_name="1900"] }
    |     ------------^^^^^^^^^^^^^^^^^^^^-- not a foreign function or static
@@ -422,7 +386,7 @@ LL |     mod inner { #![link_name="1900"] }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a foreign function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:546:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:511:5
    |
 LL |     #[link_name = "1900"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^ ---------- not a foreign function or static
@@ -430,7 +394,7 @@ LL |     #[link_name = "1900"] fn f() { }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a foreign function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:551:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:516:5
    |
 LL |     #[link_name = "1900"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^ --------- not a foreign function or static
@@ -438,7 +402,7 @@ LL |     #[link_name = "1900"] struct S;
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a foreign function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:556:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:521:5
    |
 LL |     #[link_name = "1900"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^ ----------- not a foreign function or static
@@ -446,7 +410,7 @@ LL |     #[link_name = "1900"] type T = S;
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a foreign function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:561:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:526:5
    |
 LL |     #[link_name = "1900"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^ ---------- not a foreign function or static
@@ -454,7 +418,7 @@ LL |     #[link_name = "1900"] impl S { }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:573:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:538:17
    |
 LL |     mod inner { #![link_section="1800"] }
    |     ------------^^^^^^^^^^^^^^^^^^^^^^^-- not a function or static
@@ -462,7 +426,7 @@ LL |     mod inner { #![link_section="1800"] }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:580:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:545:5
    |
 LL |     #[link_section = "1800"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^ --------- not a function or static
@@ -470,7 +434,7 @@ LL |     #[link_section = "1800"] struct S;
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:585:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:550:5
    |
 LL |     #[link_section = "1800"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^ ----------- not a function or static
@@ -478,7 +442,7 @@ LL |     #[link_section = "1800"] type T = S;
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:590:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:555:5
    |
 LL |     #[link_section = "1800"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^ ---------- not a function or static
@@ -486,7 +450,7 @@ LL |     #[link_section = "1800"] impl S { }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: the feature `rust1` has been stable since 1.0.0 and no longer requires an attribute to enable
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:95:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:89:12
    |
 LL | #![feature(rust1)]
    |            ^^^^^
@@ -494,850 +458,814 @@ LL | #![feature(rust1)]
    = note: `#[warn(stable_features)]` on by default
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:45:1
-   |
-LL | #![plugin_registrar]
-   | ^^^^^^^^^^^^^^^^^^^^
-
-warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:59:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:52:1
    |
 LL | #![should_panic]
    | ^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:60:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:53:1
    |
 LL | #![ignore]
    | ^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:66:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:59:1
    |
 LL | #![proc_macro_derive()]
    | ^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:190:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:184:5
    |
 LL |     #[macro_use] fn f() { }
    |     ^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:193:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:187:5
    |
 LL |     #[macro_use] struct S;
    |     ^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:196:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:190:5
    |
 LL |     #[macro_use] type T = S;
    |     ^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:199:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:193:5
    |
 LL |     #[macro_use] impl S { }
    |     ^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:203:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:197:1
    |
 LL | #[macro_export]
    | ^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:206:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:200:17
    |
 LL |     mod inner { #![macro_export] }
    |                 ^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:209:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:203:5
    |
 LL |     #[macro_export] fn f() { }
    |     ^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:212:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:206:5
    |
 LL |     #[macro_export] struct S;
    |     ^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:215:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:209:5
    |
 LL |     #[macro_export] type T = S;
    |     ^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:218:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:212:5
    |
 LL |     #[macro_export] impl S { }
    |     ^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:222:1
-   |
-LL | #[plugin_registrar]
-   | ^^^^^^^^^^^^^^^^^^^
-
-warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:227:17
-   |
-LL |     mod inner { #![plugin_registrar] }
-   |                 ^^^^^^^^^^^^^^^^^^^^
-
-warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:235:5
-   |
-LL |     #[plugin_registrar] struct S;
-   |     ^^^^^^^^^^^^^^^^^^^
-
-warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:240:5
-   |
-LL |     #[plugin_registrar] type T = S;
-   |     ^^^^^^^^^^^^^^^^^^^
-
-warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:245:5
-   |
-LL |     #[plugin_registrar] impl S { }
-   |     ^^^^^^^^^^^^^^^^^^^
-
-warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:300:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:265:5
    |
 LL |     #[path = "3800"] fn f() { }
    |     ^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:303:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:268:5
    |
 LL |     #[path = "3800"]  struct S;
    |     ^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:306:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:271:5
    |
 LL |     #[path = "3800"] type T = S;
    |     ^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:309:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:274:5
    |
 LL |     #[path = "3800"] impl S { }
    |     ^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:313:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:278:1
    |
 LL | #[automatically_derived]
    | ^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:316:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:281:17
    |
 LL |     mod inner { #![automatically_derived] }
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:319:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:284:5
    |
 LL |     #[automatically_derived] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:322:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:287:5
    |
 LL |     #[automatically_derived] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:325:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:290:5
    |
 LL |     #[automatically_derived] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:328:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:293:5
    |
 LL |     #[automatically_derived] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:360:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:325:1
    |
 LL | #[should_panic]
    | ^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:363:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:328:17
    |
 LL |     mod inner { #![should_panic] }
    |                 ^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:366:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:331:5
    |
 LL |     #[should_panic] fn f() { }
    |     ^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:369:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:334:5
    |
 LL |     #[should_panic] struct S;
    |     ^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:372:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:337:5
    |
 LL |     #[should_panic] type T = S;
    |     ^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:375:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:340:5
    |
 LL |     #[should_panic] impl S { }
    |     ^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:379:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:344:1
    |
 LL | #[ignore]
    | ^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:382:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:347:17
    |
 LL |     mod inner { #![ignore] }
    |                 ^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:385:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:350:5
    |
 LL |     #[ignore] fn f() { }
    |     ^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:388:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:353:5
    |
 LL |     #[ignore] struct S;
    |     ^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:391:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:356:5
    |
 LL |     #[ignore] type T = S;
    |     ^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:394:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:359:5
    |
 LL |     #[ignore] impl S { }
    |     ^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:398:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:363:1
    |
 LL | #[no_implicit_prelude]
    | ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:401:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:366:17
    |
 LL |     mod inner { #![no_implicit_prelude] }
    |                 ^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:404:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:369:5
    |
 LL |     #[no_implicit_prelude] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:407:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:372:5
    |
 LL |     #[no_implicit_prelude] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:410:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:375:5
    |
 LL |     #[no_implicit_prelude] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:413:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:378:5
    |
 LL |     #[no_implicit_prelude] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:417:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:382:1
    |
 LL | #[reexport_test_harness_main = "2900"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:420:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:385:17
    |
 LL |     mod inner { #![reexport_test_harness_main="2900"] }
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:423:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:388:5
    |
 LL |     #[reexport_test_harness_main = "2900"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:426:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:391:5
    |
 LL |     #[reexport_test_harness_main = "2900"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:429:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:394:5
    |
 LL |     #[reexport_test_harness_main = "2900"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:432:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:397:5
    |
 LL |     #[reexport_test_harness_main = "2900"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:444:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:409:5
    |
 LL |     #[macro_escape] fn f() { }
    |     ^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:447:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:412:5
    |
 LL |     #[macro_escape] struct S;
    |     ^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:450:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:415:5
    |
 LL |     #[macro_escape] type T = S;
    |     ^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:453:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:418:5
    |
 LL |     #[macro_escape] impl S { }
    |     ^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:457:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:422: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:457:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:422:1
    |
 LL | #[no_std]
    | ^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:461:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:426:17
    |
 LL |     mod inner { #![no_std] }
    |                 ^^^^^^^^^^
 
 warning: crate-level attribute should be in the root module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:461:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:426:17
    |
 LL |     mod inner { #![no_std] }
    |                 ^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:465:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:430: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:465:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:430:5
    |
 LL |     #[no_std] fn f() { }
    |     ^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:469:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:434: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:469:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:434:5
    |
 LL |     #[no_std] struct S;
    |     ^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:473:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:438: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:473:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:438:5
    |
 LL |     #[no_std] type T = S;
    |     ^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:477:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:442: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:477:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:442:5
    |
 LL |     #[no_std] impl S { }
    |     ^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:658:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:623: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:658:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:623:1
    |
 LL | #[crate_name = "0900"]
    | ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:662:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:627: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:662:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:627:17
    |
 LL |     mod inner { #![crate_name="0900"] }
    |                 ^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:666:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:631: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:666:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:631:5
    |
 LL |     #[crate_name = "0900"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:670:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:635: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:670:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:635:5
    |
 LL |     #[crate_name = "0900"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:674:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:639: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:674:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:639:5
    |
 LL |     #[crate_name = "0900"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:678:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:643: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:678:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:643:5
    |
 LL |     #[crate_name = "0900"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:683:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:648: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:683:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:648:1
    |
 LL | #[crate_type = "0800"]
    | ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:687:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:652: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:687:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:652:17
    |
 LL |     mod inner { #![crate_type="0800"] }
    |                 ^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:691:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:656: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:691:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:656:5
    |
 LL |     #[crate_type = "0800"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:695:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:660: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:695:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:660:5
    |
 LL |     #[crate_type = "0800"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:699:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:664: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:699:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:664:5
    |
 LL |     #[crate_type = "0800"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:703:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:668: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:703:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:668:5
    |
 LL |     #[crate_type = "0800"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:708:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:673: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:708:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:673:1
    |
 LL | #[feature(x0600)]
    | ^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:712:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:677:17
    |
 LL |     mod inner { #![feature(x0600)] }
    |                 ^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be in the root module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:712:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:677:17
    |
 LL |     mod inner { #![feature(x0600)] }
    |                 ^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:716:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:681: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:716:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:681:5
    |
 LL |     #[feature(x0600)] fn f() { }
    |     ^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:720:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:685: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:720:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:685:5
    |
 LL |     #[feature(x0600)] struct S;
    |     ^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:724:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:689: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:724:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:689:5
    |
 LL |     #[feature(x0600)] type T = S;
    |     ^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:728:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:693: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:728:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:693:5
    |
 LL |     #[feature(x0600)] impl S { }
    |     ^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:734:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:699: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:734:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:699:1
    |
 LL | #[no_main]
    | ^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:738:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:703:17
    |
 LL |     mod inner { #![no_main] }
    |                 ^^^^^^^^^^^
 
 warning: crate-level attribute should be in the root module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:738:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:703:17
    |
 LL |     mod inner { #![no_main] }
    |                 ^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:742:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:707: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:742:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:707:5
    |
 LL |     #[no_main] fn f() { }
    |     ^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:746:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:711: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:746:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:711:5
    |
 LL |     #[no_main] struct S;
    |     ^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:750:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:715: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:750:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:715:5
    |
 LL |     #[no_main] type T = S;
    |     ^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:754:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:719: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:754:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:719:5
    |
 LL |     #[no_main] impl S { }
    |     ^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:772:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:737: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:772:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:737:1
    |
 LL | #[recursion_limit="0200"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:776:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:741: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:776:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:741:17
    |
 LL |     mod inner { #![recursion_limit="0200"] }
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:780:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:745: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:780:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:745:5
    |
 LL |     #[recursion_limit="0200"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:784:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:749: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:784:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:749:5
    |
 LL |     #[recursion_limit="0200"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:788:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:753: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:788:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:753:5
    |
 LL |     #[recursion_limit="0200"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:792:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:757: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:792:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:757:5
    |
 LL |     #[recursion_limit="0200"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:797:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:762: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:797:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:762:1
    |
 LL | #[type_length_limit="0100"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:801:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:766: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:801:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:766:17
    |
 LL |     mod inner { #![type_length_limit="0100"] }
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:805:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:770: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:805:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:770:5
    |
 LL |     #[type_length_limit="0100"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:809:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:774: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:809:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:774:5
    |
 LL |     #[type_length_limit="0100"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:813:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:778: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:813:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:778:5
    |
 LL |     #[type_length_limit="0100"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: unused attribute
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:817:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:782: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:817:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:782:5
    |
 LL |     #[type_length_limit="0100"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-warning: 205 warnings emitted
+warning: 193 warnings emitted
 
index 7f6d608038f91d878283bc4c09b0ae3b2b2610bc..c0d2df3753d2ca7756724dedf6b32425eeb20c47 100644 (file)
@@ -25,9 +25,9 @@ LL |     #[macro_use = "2700"] struct S;
 help: the following are the possible correct uses
    |
 LL |     #[macro_use] struct S;
-   |     ^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~
 LL |     #[macro_use(name1, name2, ...)] struct S;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 4 previous errors
 
index 62ca8dc77294b446fe6fc0f583df9f46ce02d80a..263b5e594e10cc0130dc7a3d30a5d4e90317ae87 100644 (file)
@@ -19,7 +19,7 @@ LL |     let y: f32 = 1f64;
 help: change the type of the numeric literal from `f64` to `f32`
    |
 LL |     let y: f32 = 1f32;
-   |                  ^^^^
+   |                  ~~~~
 
 error: aborting due to 2 previous errors
 
index 69fed2cb69ad8898a240b80f59f9cb05f7616d02..1f7f0d8f6be6ae72c93d62814c3296dc4c807350 100644 (file)
@@ -5,7 +5,7 @@ fn main() {
     a");
     //~^ ERROR invalid format string
     format!("{ \
-
+               \
     b");
     //~^ ERROR invalid format string
     format!(r#"{ \
@@ -38,12 +38,12 @@ fn main() {
     { \
        \
     b \
-
+      \
     ");
     //~^^^ ERROR invalid format string
     format!(r#"
 raw  { \
-
+       \
     c"#);
     //~^^^ ERROR invalid format string
     format!(r#"
index c421fe49ef0a4897c9b035b04e5841976dc5a372..76cdfbb93bf24cad988434f806f096698cd8a0c6 100644 (file)
@@ -19,7 +19,7 @@ error: invalid format string: expected `'}'`, found `'b'`
    |
 LL |     format!("{ \
    |              - because of this opening brace
-LL | 
+LL |                \
 LL |     b");
    |     ^ expected `}` in format string
    |
index d117f3254407bfb83165389ed5249919b6f952aa..854abb90638c87338b5436dee22849988922c85a 100644 (file)
@@ -15,7 +15,7 @@ LL |     format_args!(|| {});
 help: you might be missing a string literal to format with
    |
 LL |     format_args!("{}", || {});
-   |                  ^^^^^
+   |                  +++++
 
 error: aborting due to 2 previous errors
 
index 326418ecbf953e601e2139c391064d2ef2b46c05..585f556abc8b538d31e0b011427527082fd15500 100644 (file)
@@ -9,11 +9,11 @@ LL |     let x = f == g;
 help: you might have forgotten to call this function
    |
 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
index feecb6d80e771ee8f88446d934a7c96f7a22fcd4..b174766cd3d0c166ef49989a87bea1b502a74217 100644 (file)
@@ -8,7 +8,7 @@ LL |     pub fn f() -> &u8;
 help: consider using the `'static` lifetime
    |
 LL |     pub fn f() -> &'static u8;
-   |                   ^^^^^^^^
+   |                   ~~~~~~~~
 
 error: aborting due to previous error
 
index ad02202dfc90c0e22a153f20ac703000a0e9bc3c..957ae5d2932402f65f85cb7505955d5ee96e7c73 100644 (file)
@@ -11,7 +11,7 @@ LL |     let b: Vec<i32> = a;
 help: consider constraining the associated type `<T as X>::Y<i32>` to `Vec<i32>`
    |
 LL | fn f<T: X<Y<i32> = Vec<i32>>>(a: T::Y<i32>) {
-   |          ^^^^^^^^^^^^^^^^^^^
+   |          +++++++++++++++++++
 
 error: aborting due to previous error
 
index 310f722e120fdf8ef49045ffbaa82f3f64fff6f9..1594747e54ce9bcae9f49a0539e91e7a4263bd4e 100644 (file)
@@ -15,7 +15,7 @@ LL |     type F<T1> = &[u8];
 help: consider introducing a named lifetime parameter
    |
 LL |     type F<'a, T1> = &'a [u8];
-   |            ^^^       ^^^
+   |            +++       ~~~
 
 error: aborting due to 2 previous errors
 
index 9b63e8f30726b0381b16ffe44881321587ae9255..aeb9238de81f4ebacc47f819f7eb06e8615e4d4e 100644 (file)
@@ -12,7 +12,7 @@ LL |   type Y<'a>;
 help: add missing lifetime argument
    |
 LL |   fn foo<'a, T1: X<Y<'a> = T1>>(t : T1) -> T1::Y<'a> {
-   |                    ^^^^^
+   |                    ~~~~~
 
 error[E0107]: missing generics for associated type `X::Y`
   --> $DIR/gat-trait-path-missing-lifetime.rs:10:20
@@ -28,7 +28,7 @@ LL |   type Y<'a>;
 help: add missing lifetime argument
    |
 LL |   fn foo<'a, T1: X<Y<'a> = T1>>(t : T1) -> T1::Y<'a> {
-   |                    ^^^^^
+   |                    ~~~~~
 
 error: aborting due to 2 previous errors
 
index d6fba8b8e4c8ac4ec4038b0ad94c942a5197e8f9..5e0f98c0bbf0a73caf33193f69b6504a2f2ede88 100644 (file)
@@ -18,7 +18,7 @@ LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
    |
    = note: `#[warn(bare_trait_objects)]` on by default
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
   --> $DIR/gat-trait-path-parenthesised-args.rs:7:27
@@ -34,7 +34,7 @@ LL |   type Y<'a>;
 help: add missing lifetime argument
    |
 LL | fn foo<'a>(arg: Box<dyn X<Y('a, 'a) = &'a ()>>) {}
-   |                             ^^^
+   |                             +++
 
 error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/gat-trait-path-parenthesised-args.rs:7:27
index d65265438220999d516e0ac415053af58757e93e..99a601003c13f29f35f72d9e7a5b2f670c1139bc 100644 (file)
@@ -8,7 +8,7 @@ LL |     type Assoc2<T> = Vec<T>;
 help: consider restricting type parameter `T`
    |
 LL |     type Assoc2<T: std::fmt::Display> = Vec<T>;
-   |                  ^^^^^^^^^^^^^^^^^^^
+   |                  +++++++++++++++++++
 
 error[E0276]: impl has stricter requirements than trait
   --> $DIR/generic-associated-types-where.rs:22:5
index e87176e0fb27ba5c31b51506f8c70c0b20d5f2eb..adbd47ac16f45862e992dee98e491b1f31546a94 100644 (file)
@@ -8,11 +8,11 @@ LL |         + Deref<Target = Self::Item<'b>>;
 help: consider introducing lifetime `'b` here
    |
 LL | trait Iterable<'b> {
-   |               ^^^^
+   |               ++++
 help: consider introducing lifetime `'b` here
    |
 LL |     type Iter<'b, 'a>: Iterator<Item = Self::Item<'a>>
-   |               ^^^
+   |               +++
 
 error[E0261]: use of undeclared lifetime name `'undeclared`
   --> $DIR/generic_associated_type_undeclared_lifetimes.rs:11:41
@@ -24,11 +24,11 @@ LL |     fn iter<'a>(&'a self) -> Self::Iter<'undeclared>;
 help: consider introducing lifetime `'undeclared` here
    |
 LL | trait Iterable<'undeclared> {
-   |               ^^^^^^^^^^^^^
+   |               +++++++++++++
 help: consider introducing lifetime `'undeclared` here
    |
 LL |     fn iter<'undeclared, 'a>(&'a self) -> Self::Iter<'undeclared>;
-   |             ^^^^^^^^^^^^
+   |             ++++++++++++
 
 error: aborting due to 2 previous errors
 
index 585ba16a491b7b5b6e38413293c224e70f627fb3..8cf923ca3ac0c4f0763029fc2da03b6f43ccd9ce 100644 (file)
@@ -64,7 +64,7 @@ LL |     type C where Self: Clone;
 help: consider restricting type parameter `T`
    |
 LL | impl<T: std::marker::Copy> Foo for Fooy<T> {
-   |       ^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++++++++
 
 error[E0277]: the trait bound `T: Copy` is not satisfied
   --> $DIR/impl_bounds.rs:22:5
@@ -89,7 +89,7 @@ LL |     fn d() where Self: Clone;
 help: consider restricting type parameter `T`
    |
 LL | impl<T: std::marker::Copy> Foo for Fooy<T> {
-   |       ^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++++++++
 
 error: aborting due to 5 previous errors
 
index 7ac1ccf0f37f3e60d29ad486032538ebb717354e..c341338390c3dd5fad7a5e093bbb2ccfdee3e3ea 100644 (file)
@@ -10,7 +10,7 @@ LL |     type Item<'a> = T;
 help: consider restricting type parameter `T`
    |
 LL | impl<T: std::marker::Copy> UnsafeCopy for T {
-   |       ^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++++++++
 
 error: aborting due to previous error
 
index 4e609ca5484df50906fbf92f96f958113ff5cd86..2861aee3aafac05d3743c8e2ac187a01791e5f4e 100644 (file)
@@ -11,7 +11,7 @@ LL |     type F<'a> = Self;
 help: consider restricting type parameter `T`
    |
 LL | impl<T: std::ops::Fn<()>> Fun for T {
-   |       ^^^^^^^^^^^^^^^^^^
+   |       ++++++++++++++++++
 
 error: aborting due to previous error
 
index 44600bfcf96f7f6e7e0f4dfc059d68796f8621a9..2eaeffba0893ff4b8095e56eed312b7ffded6a0d 100644 (file)
@@ -11,7 +11,7 @@ LL |     type F<'a> = Self;
 help: consider restricting type parameter `T`
    |
 LL | impl<T: std::ops::Fn<()>> Fun for T {
-   |       ^^^^^^^^^^^^^^^^^^
+   |       ++++++++++++++++++
 
 error: aborting due to previous error
 
index 2c21795e161993d3cb88cc095f6f86de2cad6684..7c56ded01bf98f770a48336fb422e40ef40162d0 100644 (file)
@@ -11,7 +11,7 @@ LL |     type F<'a> = Self;
 help: consider restricting type parameter `T`
    |
 LL | impl<T: std::ops::Fn<()>> Fun for T {
-   |       ^^^^^^^^^^^^^^^^^^
+   |       ++++++++++++++++++
 
 error: aborting due to previous error
 
index b2a2636d3eb9b4e5a64aac311951abeadd892264..6662a2b35da75545f60faf77198eba4a35186ded 100644 (file)
@@ -11,7 +11,7 @@ LL |     type F<'a> = Self;
 help: consider restricting type parameter `T`
    |
 LL | impl<T: std::ops::Fn<()>> Fun for T {
-   |       ^^^^^^^^^^^^^^^^^^
+   |       ++++++++++++++++++
 
 error: aborting due to previous error
 
index 9d90d6f608f7af58bbdfe705b9cdcdb2e3a7bdfd..422805a0d0b8c6f6cf37b7c046cf04ba8e5285a5 100644 (file)
@@ -14,7 +14,7 @@ LL |     type Item<'a> = T;
 help: consider further restricting this bound
    |
 LL | impl<T: Copy + std::ops::Deref + Deref<Target = T>> UnsafeCopy<T> for T {
-   |                                ^^^^^^^^^^^^^^^^^^^
+   |                                +++++++++++++++++++
 
 error: aborting due to previous error
 
index fd9e1acc557fa7a4ecb57746bdefd00348fc1a85..c53dbf63a3c5b98c2891a316cfa2462159fe79ef 100644 (file)
@@ -8,7 +8,7 @@ LL | fn create_doc() -> impl Document<Cursor<'_> = DocCursorImpl<'_>> {
 help: consider using the `'static` lifetime
    |
 LL | fn create_doc() -> impl Document<Cursor<'static> = DocCursorImpl<'_>> {
-   |                                         ^^^^^^^
+   |                                         ~~~~~~~
 
 error: aborting due to previous error
 
index f0babdaa60bea5337b0ae1f68f840261fac1a157..08c8d41624e2797e6e0f2164be69cb920d402809 100644 (file)
@@ -12,7 +12,7 @@ LL |     type A<'a>;
 help: add missing lifetime argument
    |
 LL |   inner: Box<dyn Provider<A<'a> = B>>,
-   |                           ^^^^^
+   |                           ~~~~~
 
 error: aborting due to previous error
 
index 431182e79c4f07070989ebb38c8e2cdde1f40e6d..c910261ca52a0ff410352c3ca451a1bdf6ab26ba 100644 (file)
@@ -10,7 +10,7 @@ LL |     type Associated: Trait1 = Self;
 help: consider further restricting `Self`
    |
 LL | trait Trait2: Trait1 {
-   |             ^^^^^^^^
+   |             ++++++++
 
 error[E0277]: the size for values of type `Self` cannot be known at compilation time
   --> $DIR/issue-74816.rs:9:5
@@ -24,7 +24,7 @@ LL |     type Associated: Trait1 = Self;
 help: consider further restricting `Self`
    |
 LL | trait Trait2: Sized {
-   |             ^^^^^^^
+   |             +++++++
 
 error: aborting due to 2 previous errors
 
index 54cb3fba2b5872113765ea0808d534ed9125c64b..aef44a164a98cd35232b1e8c39b71c848dcbb8d2 100644 (file)
@@ -20,7 +20,7 @@ LL |     type Copy<T>: Copy = Box<T>;
 help: consider restricting type parameter `T`
    |
 LL |     type Copy<T: std::clone::Clone>: Copy = Box<T>;
-   |                ^^^^^^^^^^^^^^^^^^^
+   |                +++++++++++++++++++
 
 error: aborting due to 2 previous errors
 
index 45af30e39651eef333b61492a2590638373d9389..246454f0612dbb76e22ae60bcde1171b89f31037 100644 (file)
@@ -12,7 +12,7 @@ LL |     type SubType<'a>: SubTrait;
 help: add missing lifetime argument
    |
 LL |     let sub: Box<dyn SuperTrait<SubType<'a> = SubStruct>> = Box::new(SuperStruct::new(0));
-   |                                 ^^^^^^^^^^^
+   |                                 ~~~~~~~~~~~
 
 error[E0038]: the trait `SuperTrait` cannot be made into an object
   --> $DIR/issue-76535.rs:36:14
index fedc6a341cad3d53f12a09817e811a2ffc6016d8..8ff6cb569b06093da77a905aa01fc9102601aa90 100644 (file)
@@ -23,7 +23,7 @@ LL | impl A for Box<dyn A> {}
 help: consider relaxing the implicit `'static` requirement
    |
 LL | impl A for Box<dyn A + '_> {}
-   |                      ^^^^
+   |                      ++++
 
 error: incompatible lifetime on type
   --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:27:5
@@ -77,11 +77,11 @@ LL | impl E for (Box<dyn A>, Box<dyn A>) {}
 help: consider relaxing the implicit `'static` requirement
    |
 LL | impl E for (Box<dyn A + '_>, Box<dyn A>) {}
-   |                       ^^^^
+   |                       ++++
 help: consider relaxing the implicit `'static` requirement
    |
 LL | impl E for (Box<dyn A>, Box<dyn A + '_>) {}
-   |                                   ^^^^
+   |                                   ++++
 
 error: aborting due to 3 previous errors
 
index 802621bd18c0b707b843f377fd20b43dcd0b989d..b92730839568d47ea5543cf33aefb71a16e59bd0 100644 (file)
@@ -12,7 +12,7 @@ LL |     type Member<T>;
 help: add missing generic argument
    |
 LL |     Box::new(Family) as &dyn CollectionFamily<Member<T>=usize>
-   |                                               ^^^^^^^^^
+   |                                               ~~~~~~~~~
 
 error[E0038]: the trait `CollectionFamily` cannot be made into an object
   --> $DIR/issue-78671.rs:7:25
index cf0a80bb2c58d4fbd8631b021cc08dd820739f63..8d8ef6bf836854602bd1ca900d411280b70c4c85 100644 (file)
@@ -12,7 +12,7 @@ LL |     type VRefCont<'a>: RefCont<'a, V>;
 help: add missing lifetime argument
    |
 LL |         as Box<dyn MapLike<u8, u8, VRefCont<'a> = dyn RefCont<'_, u8>>>;
-   |                                    ^^^^^^^^^^^^
+   |                                    ~~~~~~~~~~~~
 
 error[E0038]: the trait `MapLike` cannot be made into an object
   --> $DIR/issue-79422.rs:42:12
index e6f9a0c754681a08b29de9e518efd5a447e3972f..1ecb862827fd74898fc7540bb9b62974cec1f038 100644 (file)
@@ -12,7 +12,7 @@ LL |     type Wrapped<B>;
 help: add missing generic argument
    |
 LL |     MInner: Monad<Unwrapped = A, Wrapped<B> = MOuter::Wrapped<A>>,
-   |                                  ^^^^^^^^^^
+   |                                  ~~~~~~~~~~
 
 error: aborting due to previous error
 
index 9a240c6545824aeea3ec3cf80df94310abc3f3c0..ae61b7b104e87352daec1b570ae5680d3ddbf98b 100644 (file)
@@ -12,7 +12,7 @@ LL |     type Wrapped<A>: SomeTrait;
 help: add missing generic argument
    |
 LL |     W: SomeTrait<Wrapped<A> = W>,
-   |                  ^^^^^^^^^^
+   |                  ~~~~~~~~~~
 
 error: aborting due to previous error
 
index 26c879193b66b9a838f5576f2b9adbf0e4a939d3..d8c210dcf7e98d3e05beb87263c7689139bc036b 100644 (file)
@@ -12,7 +12,7 @@ LL |     type Output<'a>;
 help: add missing lifetime argument
    |
 LL | fn test_simpler<'a>(dst: &'a mut impl TestMut<Output<'a> = &'a mut f32>)
-   |                                               ^^^^^^^^^^
+   |                                               ~~~~~~~~~~
 
 error: aborting due to previous error
 
index 850b434e9bfdc8e77e66b1274d4fba6a614e6eb7..86c99c32fc1ab5914f18ee08dc26b833c362bf32 100644 (file)
@@ -12,7 +12,7 @@ LL |     type DType<T>: D<T, CType = Self>;
 help: add missing generic argument
    |
 LL |     type CType: C<DType<T> = Self>;
-   |                   ^^^^^^^^
+   |                   ~~~~~~~~
 
 error: aborting due to previous error
 
index 1ba21ccd796792c1614058a1d282462b4d0d5edf..024f8ad89f757a2aae385540a36d5dad17d99134 100644 (file)
@@ -12,7 +12,7 @@ LL |     type Item<'a>;
 help: add missing lifetime argument
    |
 LL |     fn next(&mut self) -> Option<Self::Item<'_>>;
-   |                                        ^^^^^^^^
+   |                                        ~~~~~~~~
 
 error: aborting due to previous error
 
index 4d4f7e55873b9b91c3f8514eb25043ff60b6aafd..4d33fe84829e0c6f42c25796741b61cc7f4bc570 100644 (file)
@@ -12,7 +12,7 @@ LL |         A(self.0 + rhs.0)
 help: consider further restricting this bound
    |
 LL | impl<B> Add for A<B> where B: Add + Add<Output = B> {
-   |                                   ^^^^^^^^^^^^^^^^^
+   |                                   +++++++++++++++++
 
 error[E0308]: mismatched types
   --> $DIR/missing-bounds.rs:21:14
@@ -28,7 +28,7 @@ LL |         Self(self.0 + rhs.0)
 help: consider further restricting this bound
    |
 LL | impl<B: Add + Add<Output = B>> Add for C<B> {
-   |             ^^^^^^^^^^^^^^^^^
+   |             +++++++++++++++++
 
 error[E0369]: cannot add `B` to `B`
   --> $DIR/missing-bounds.rs:31:21
@@ -41,7 +41,7 @@ LL |         Self(self.0 + rhs.0)
 help: consider restricting type parameter `B`
    |
 LL | impl<B: std::ops::Add<Output = B>> Add for D<B> {
-   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++++++++++++++++
 
 error: aborting due to 3 previous errors
 
index 95b048d36c2dec25e2a60f44851de4d6d941e4ef..7cf3f4b737e0e848b4c68f9f2915e4726417c1bd 100644 (file)
@@ -12,7 +12,7 @@ LL |     type Y<'a, 'b>;
 help: add missing lifetime arguments
    |
 LL | fn foo<'c, 'd>(_arg: Box<dyn X<Y<'c, 'd> = (&'c u32, &'d u32)>>) {}
-   |                                ^^^^^^^^^
+   |                                ~~~~~~~~~
 
 error[E0107]: this struct takes 3 lifetime arguments but 2 lifetime arguments were supplied
   --> $DIR/missing_lifetime_args.rs:16:26
@@ -30,7 +30,7 @@ LL | struct Foo<'a, 'b, 'c> {
 help: add missing lifetime argument
    |
 LL | fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b, 'a>) {}
-   |                                    ^^^^
+   |                                    ++++
 
 error[E0107]: this struct takes 3 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/missing_lifetime_args.rs:19:16
@@ -48,7 +48,7 @@ LL | struct Foo<'a, 'b, 'c> {
 help: add missing lifetime arguments
    |
 LL | fn f<'a>(_arg: Foo<'a, 'b, 'c>) {}
-   |                      ^^^^^^^^
+   |                      ++++++++
 
 error: aborting due to 3 previous errors
 
index 02d3cd2e8d5f9e7f7b1603e78a1e483af9f8ccf2..5d50637bd0131a9ef0a9ee4a0507f96c255e73f0 100644 (file)
@@ -12,7 +12,7 @@ LL |     type Assoc<'a, const N: usize>;
 help: add missing lifetime argument
    |
 LL |     let _: <T as Foo>::Assoc<'a, 3>;
-   |                              ^^^
+   |                              +++
 
 error: aborting due to previous error
 
index db469597f9a637654d2d4b6c226d3049592a55bd..53d76fd2201222df1ec2f6251cd8c4c1b821dd6b 100644 (file)
@@ -26,7 +26,7 @@ LL |     type E<'a, T>;
 help: add missing generic argument
    |
 LL |     type FErr1 = Self::E<'static, 'static, T>;
-   |                                          ^^^
+   |                                          +++
 
 error[E0107]: this associated type takes 1 generic argument but 2 generic arguments were supplied
   --> $DIR/parameter_number_and_kind.rs:15:27
index c2908150429e342951e1ce2d2135bfe20c130c4b..3ace774a041c7904931948e248ab45fe0aeb80c2 100644 (file)
@@ -7,7 +7,7 @@ LL |   fn f1<'a>(arg : Box<dyn X< : 32 >>) {}
 help: expressions must be enclosed in braces to be used as const generic arguments
    |
 LL |   fn f1<'a>(arg : Box<{ dyn X< : 32 } >>) {}
-   |                       ^             ^
+   |                       +             +
 
 error: expected parameter name, found `>`
   --> $DIR/trait-path-missing-gen_arg.rs:8:36
index 59b53c70388acdb094f3ee1de11250af7683cb55..46ddcb635187779fad2f301c5d9df3e1d172fa33 100644 (file)
@@ -12,7 +12,7 @@ LL |     type Y<'a>;
 help: add missing lifetime argument
    |
 LL |   fn f2<'a>(arg : Box<dyn X<Y<'a, 1> = &'a ()>>) {}
-   |                               ^^^
+   |                               +++
 
 error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/trait-path-type-error-once-implemented.rs:8:29
index d5e9caf9ecd4e3f0bc2a15cd7300791bf2fcf013..345e2b3fcb12ca1fcf8d61b2d920b455462874dc 100644 (file)
@@ -1,11 +1,11 @@
 error[E0275]: overflow evaluating the requirement `<T as Foo>::Item: Sized`
-  --> $DIR/projection-bound-cycle-generic.rs:44:5
+  --> $DIR/projection-bound-cycle-generic.rs:44:18
    |
 LL | struct OnlySized<T> where T: Sized { f: T }
    |                  - required by this bound in `OnlySized`
 ...
 LL |     type Assoc = OnlySized<<T as Foo>::Item>;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index fac62fef1ecff0094f9a50ad0259babd5dde441d..eefc09fa78863bfcfbd1427e4f5f306562d35081 100644 (file)
@@ -1,11 +1,11 @@
 error[E0275]: overflow evaluating the requirement `<T as Foo>::Item: Sized`
-  --> $DIR/projection-bound-cycle.rs:46:5
+  --> $DIR/projection-bound-cycle.rs:46:18
    |
 LL | struct OnlySized<T> where T: Sized { f: T }
    |                  - required by this bound in `OnlySized`
 ...
 LL |     type Assoc = OnlySized<<T as Foo>::Item>;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 3c9ed7a9dec081894eb70e2abdcec7e14629aa40..909848604ec8a5048fad45f055cf8c20ac393d6c 100644 (file)
@@ -14,7 +14,7 @@ LL |     pub fn life4<'b>(x: for<'c> fn(&'a i32));
 help: consider making the type lifetime-generic with a new `'a` lifetime
    |
 LL |     pub fn life4<'b>(x: for<'c, 'a> fn(&'a i32));
-   |                               ^^^^
+   |                               ++++
 
 error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/generic-extern-lifetime.rs:11:39
@@ -26,7 +26,7 @@ LL |     pub fn life7<'b>() -> for<'c> fn(&'a i32);
 help: consider making the type lifetime-generic with a new `'a` lifetime
    |
 LL |     pub fn life7<'b>() -> for<'c, 'a> fn(&'a i32);
-   |                                 ^^^^
+   |                                 ++++
 
 error: aborting due to 3 previous errors
 
index 2c7ffde7ddb97bb2ec406442a7a94731c236433b..cdbb57902e4a7d94084593aba3e6386038a6609e 100644 (file)
@@ -14,7 +14,7 @@ LL | struct Foo<A, B, C = (A, B)>(
 help: add missing generic argument
    |
 LL |     Foo::<isize, B>::new();
-   |                ^^^
+   |                +++
 
 error: aborting due to previous error
 
index 7c0836375e38e7e59f4a4bd9606f66239b55edc1..e45a0d9ca77377008377824823a370d8c7d909fe 100644 (file)
@@ -12,7 +12,7 @@ LL | struct Vec<T, A = Heap>(
 help: add missing generic argument
    |
 LL |     let _: Vec<T>;
-   |            ^^^^^^
+   |            ~~~~~~
 
 error: aborting due to previous error
 
index ce853d4d36ddd64982f7bf523feb94d63eff0383..270d6b8e18e2269dfbb7dda942af5d6f7e81244b 100644 (file)
@@ -13,7 +13,7 @@ LL | fn bar<'b, L: X<&'b Nested<i32>>>(){}
 help: consider using the `'b` lifetime
    |
 LL | fn bar<'b, L: X<'b, &'b Nested<i32>>>(){}
-   |                 ^^^
+   |                 +++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/issue-65285-incorrect-explicit-lifetime-name-needed.rs:9:21
@@ -31,7 +31,7 @@ LL |     fn foo<'b, L: X<&'b Nested<K>>>();
 help: consider using one of the available lifetimes here
    |
 LL |     fn foo<'b, L: X<'lifetime, &'b Nested<K>>>();
-   |                     ^^^^^^^^^^
+   |                     ++++++++++
 
 error: aborting due to 3 previous errors
 
index 4e921db8c25a45c0506b5afa93d36fc5a31b793f..98e5cd6bab89351861edeb9f1184ce01ae36325a 100644 (file)
@@ -82,7 +82,7 @@ LL |     struct Ty<A, B>;
 help: add missing generic arguments
    |
 LL |     type A = Ty<A, B>;
-   |              ^^^^^^^^
+   |              ~~~~~~~~
 
 error[E0107]: this struct takes 2 generic arguments but 1 generic argument was supplied
   --> $DIR/wrong-number-of-args.rs:30:14
@@ -100,7 +100,7 @@ LL |     struct Ty<A, B>;
 help: add missing generic argument
    |
 LL |     type B = Ty<usize, B>;
-   |                      ^^^
+   |                      +++
 
 error[E0107]: this struct takes 2 generic arguments but 3 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:36:14
@@ -130,7 +130,7 @@ LL |     struct Ty<A, B>;
 help: add missing generic arguments
    |
 LL |     type E = Ty<A, B>;
-   |                 ^^^^
+   |                 ++++
 
 error[E0107]: missing generics for struct `lifetime_and_type::Ty`
   --> $DIR/wrong-number-of-args.rs:48:14
@@ -146,7 +146,7 @@ LL |     struct Ty<'a, T>;
 help: add missing generic argument
    |
 LL |     type A = Ty<T>;
-   |              ^^^^^
+   |              ~~~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/wrong-number-of-args.rs:48:14
@@ -157,7 +157,7 @@ LL |     type A = Ty;
 help: consider introducing a named lifetime parameter
    |
 LL |     type A<'a> = Ty<'a>;
-   |           ^^^^   ^^^^^^
+   |           ++++   ~~~~~~
 
 error[E0107]: this struct takes 1 generic argument but 0 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:54:14
@@ -173,7 +173,7 @@ LL |     struct Ty<'a, T>;
 help: add missing generic argument
    |
 LL |     type B = Ty<'static, T>;
-   |                        ^^^
+   |                        +++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/wrong-number-of-args.rs:58:17
@@ -184,7 +184,7 @@ LL |     type C = Ty<usize>;
 help: consider introducing a named lifetime parameter
    |
 LL |     type C<'a> = Ty<'a, usize>;
-   |           ^^^^      ^^^
+   |           ++++      +++
 
 error[E0107]: this struct takes 1 generic argument but 0 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:64:14
@@ -200,7 +200,7 @@ LL |     struct Ty<'a, T>;
 help: add missing generic argument
    |
 LL |     type E = Ty<T>;
-   |                 ^
+   |                 +
 
 error[E0106]: missing lifetime specifier
   --> $DIR/wrong-number-of-args.rs:64:16
@@ -211,7 +211,7 @@ LL |     type E = Ty<>;
 help: consider introducing a named lifetime parameter
    |
 LL |     type E<'a> = Ty<'a>;
-   |           ^^^^      ^^
+   |           ++++      ++
 
 error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments were supplied
   --> $DIR/wrong-number-of-args.rs:70:14
@@ -255,7 +255,7 @@ LL |     struct Ty<A, B, C = &'static str>;
 help: add missing generic arguments
    |
 LL |     type A = Ty<A, B>;
-   |              ^^^^^^^^
+   |              ~~~~~~~~
 
 error[E0107]: this struct takes at least 2 generic arguments but 1 generic argument was supplied
   --> $DIR/wrong-number-of-args.rs:84:14
@@ -273,7 +273,7 @@ LL |     struct Ty<A, B, C = &'static str>;
 help: add missing generic argument
    |
 LL |     type B = Ty<usize, B>;
-   |                      ^^^
+   |                      +++
 
 error[E0107]: this struct takes at most 3 generic arguments but 4 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:92:14
@@ -303,7 +303,7 @@ LL |     struct Ty<A, B, C = &'static str>;
 help: add missing generic arguments
    |
 LL |     type F = Ty<A, B>;
-   |                 ^^^^
+   |                 ++++
 
 error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/wrong-number-of-args.rs:116:22
@@ -328,7 +328,7 @@ LL |     type B = Box<dyn GenericLifetime>;
 help: consider introducing a named lifetime parameter
    |
 LL |     type B<'a> = Box<dyn GenericLifetime<'a>>;
-   |           ^^^^           ^^^^^^^^^^^^^^^^^^^
+   |           ++++           ~~~~~~~~~~~~~~~~~~~
 
 error[E0107]: this trait takes 1 lifetime argument but 2 lifetime arguments were supplied
   --> $DIR/wrong-number-of-args.rs:124:22
@@ -358,7 +358,7 @@ LL |     trait GenericType<A> {
 help: add missing generic argument
    |
 LL |     type D = Box<dyn GenericType<A>>;
-   |                      ^^^^^^^^^^^^^^
+   |                      ~~~~~~~~~~~~~~
 
 error[E0107]: this trait takes 1 generic argument but 2 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:132:22
@@ -383,7 +383,7 @@ LL |     type F = Box<dyn GenericLifetime<>>;
 help: consider introducing a named lifetime parameter
    |
 LL |     type F<'a> = Box<dyn GenericLifetime<'a>>;
-   |           ^^^^                           ^^
+   |           ++++                           ++
 
 error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:140:22
@@ -399,7 +399,7 @@ LL |     trait GenericType<A> {
 help: add missing generic argument
    |
 LL |     type G = Box<dyn GenericType<A>>;
-   |                                  ^
+   |                                  +
 
 error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/wrong-number-of-args.rs:151:26
@@ -424,7 +424,7 @@ LL |         type A = Box<dyn GenericLifetimeAT<AssocTy=()>>;
 help: consider introducing a named lifetime parameter
    |
 LL |         type A<'a> = Box<dyn GenericLifetimeAT<'a, AssocTy=()>>;
-   |               ^^^^                             ^^^
+   |               ++++                             +++
 
 error[E0107]: this trait takes 1 lifetime argument but 2 lifetime arguments were supplied
   --> $DIR/wrong-number-of-args.rs:165:26
@@ -449,7 +449,7 @@ LL |         type C = Box<dyn GenericLifetimeAT<(), AssocTy=()>>;
 help: consider introducing a named lifetime parameter
    |
 LL |         type C<'a> = Box<dyn GenericLifetimeAT<'a, (), AssocTy=()>>;
-   |               ^^^^                             ^^^
+   |               ++++                             +++
 
 error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/wrong-number-of-args.rs:169:26
@@ -479,7 +479,7 @@ LL |         trait GenericTypeAT<A> {
 help: add missing generic argument
    |
 LL |         type A = Box<dyn GenericTypeAT<A, AssocTy=()>>;
-   |                                        ^^
+   |                                        ++
 
 error[E0107]: this trait takes 1 generic argument but 2 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:185:26
@@ -523,7 +523,7 @@ LL |         trait GenericTypeAT<A> {
 help: add missing generic argument
    |
 LL |         type C = Box<dyn GenericTypeAT<'static, A, AssocTy=()>>;
-   |                                               ^^^
+   |                                               +++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/wrong-number-of-args.rs:201:48
@@ -534,7 +534,7 @@ LL |         type A = Box<dyn GenericLifetimeTypeAT<AssocTy=()>>;
 help: consider introducing a named lifetime parameter
    |
 LL |         type A<'a> = Box<dyn GenericLifetimeTypeAT<'a, AssocTy=()>>;
-   |               ^^^^                                 ^^^
+   |               ++++                                 +++
 
 error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:201:26
@@ -550,7 +550,7 @@ LL |         trait GenericLifetimeTypeAT<'a, A> {
 help: add missing generic argument
    |
 LL |         type A = Box<dyn GenericLifetimeTypeAT<A, AssocTy=()>>;
-   |                                                ^^
+   |                                                ++
 
 error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:207:26
@@ -566,7 +566,7 @@ LL |         trait GenericLifetimeTypeAT<'a, A> {
 help: add missing generic argument
    |
 LL |         type B = Box<dyn GenericLifetimeTypeAT<'static, A, AssocTy=()>>;
-   |                                                       ^^^
+   |                                                       +++
 
 error[E0107]: this trait takes 1 lifetime argument but 2 lifetime arguments were supplied
   --> $DIR/wrong-number-of-args.rs:211:26
@@ -596,7 +596,7 @@ LL |         trait GenericLifetimeTypeAT<'a, A> {
 help: add missing generic argument
    |
 LL |         type C = Box<dyn GenericLifetimeTypeAT<'static, 'static, A, AssocTy=()>>;
-   |                                                                ^^^
+   |                                                                +++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/wrong-number-of-args.rs:217:48
@@ -607,7 +607,7 @@ LL |         type D = Box<dyn GenericLifetimeTypeAT<(), AssocTy=()>>;
 help: consider introducing a named lifetime parameter
    |
 LL |         type D<'a> = Box<dyn GenericLifetimeTypeAT<'a, (), AssocTy=()>>;
-   |               ^^^^                                 ^^^
+   |               ++++                                 +++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/wrong-number-of-args.rs:221:48
@@ -618,7 +618,7 @@ LL |         type E = Box<dyn GenericLifetimeTypeAT<(), (), AssocTy=()>>;
 help: consider introducing a named lifetime parameter
    |
 LL |         type E<'a> = Box<dyn GenericLifetimeTypeAT<'a, (), (), AssocTy=()>>;
-   |               ^^^^                                 ^^^
+   |               ++++                                 +++
 
 error[E0107]: this trait takes 1 generic argument but 2 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:221:26
@@ -704,7 +704,7 @@ LL |         trait GenericTypeTypeAT<A, B> {
 help: add missing generic arguments
    |
 LL |         type A = Box<dyn GenericTypeTypeAT<A, B, AssocTy=()>>;
-   |                                            ^^^^^
+   |                                            +++++
 
 error[E0107]: this trait takes 2 generic arguments but 1 generic argument was supplied
   --> $DIR/wrong-number-of-args.rs:251:26
@@ -722,7 +722,7 @@ LL |         trait GenericTypeTypeAT<A, B> {
 help: add missing generic argument
    |
 LL |         type B = Box<dyn GenericTypeTypeAT<(), B, AssocTy=()>>;
-   |                                              ^^^
+   |                                              +++
 
 error[E0107]: this trait takes 2 generic arguments but 3 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:255:26
@@ -747,7 +747,7 @@ LL |         type A = Box<dyn GenericLifetimeLifetimeAT<AssocTy=()>>;
 help: consider introducing a named lifetime parameter
    |
 LL |         type A<'a> = Box<dyn GenericLifetimeLifetimeAT<'a, 'a, AssocTy=()>>;
-   |               ^^^^                                     ^^^^^^^
+   |               ++++                                     +++++++
 
 error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/wrong-number-of-args.rs:269:26
@@ -765,7 +765,7 @@ LL |         trait GenericLifetimeLifetimeAT<'a, 'b> {
 help: add missing lifetime argument
    |
 LL |         type B = Box<dyn GenericLifetimeLifetimeAT<'static, 'b, AssocTy=()>>;
-   |                                                           ^^^^
+   |                                                           ++++
 
 error[E0106]: missing lifetime specifiers
   --> $DIR/wrong-number-of-args.rs:279:56
@@ -776,7 +776,7 @@ LL |         type A = Box<dyn GenericLifetimeLifetimeTypeAT<AssocTy=()>>;
 help: consider introducing a named lifetime parameter
    |
 LL |         type A<'a> = Box<dyn GenericLifetimeLifetimeTypeAT<'a, 'a, AssocTy=()>>;
-   |               ^^^^                                         ^^^^^^^
+   |               ++++                                         +++++++
 
 error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:279:26
@@ -792,7 +792,7 @@ LL |         trait GenericLifetimeLifetimeTypeAT<'a, 'b, A> {
 help: add missing generic argument
    |
 LL |         type A = Box<dyn GenericLifetimeLifetimeTypeAT<A, AssocTy=()>>;
-   |                                                        ^^
+   |                                                        ++
 
 error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/wrong-number-of-args.rs:285:26
@@ -810,7 +810,7 @@ LL |         trait GenericLifetimeLifetimeTypeAT<'a, 'b, A> {
 help: add missing lifetime argument
    |
 LL |         type B = Box<dyn GenericLifetimeLifetimeTypeAT<'static, 'b, AssocTy=()>>;
-   |                                                               ^^^^
+   |                                                               ++++
 
 error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:285:26
@@ -826,7 +826,7 @@ LL |         trait GenericLifetimeLifetimeTypeAT<'a, 'b, A> {
 help: add missing generic argument
    |
 LL |         type B = Box<dyn GenericLifetimeLifetimeTypeAT<'static, A, AssocTy=()>>;
-   |                                                               ^^^
+   |                                                               +++
 
 error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/wrong-number-of-args.rs:291:26
@@ -844,7 +844,7 @@ LL |         trait GenericLifetimeLifetimeTypeAT<'a, 'b, A> {
 help: add missing lifetime argument
    |
 LL |         type C = Box<dyn GenericLifetimeLifetimeTypeAT<'static, 'b, (), AssocTy=()>>;
-   |                                                               ^^^^
+   |                                                               ++++
 
 error[E0107]: missing generics for struct `HashMap`
   --> $DIR/wrong-number-of-args.rs:301:18
@@ -860,7 +860,7 @@ LL | pub struct HashMap<K, V, S = RandomState> {
 help: add missing generic arguments
    |
 LL |         type A = HashMap<K, V>;
-   |                  ^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~
 
 error[E0107]: this struct takes at least 2 generic arguments but 1 generic argument was supplied
   --> $DIR/wrong-number-of-args.rs:305:18
@@ -878,7 +878,7 @@ LL | pub struct HashMap<K, V, S = RandomState> {
 help: add missing generic argument
    |
 LL |         type B = HashMap<String, V>;
-   |                                ^^^
+   |                                +++
 
 error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/wrong-number-of-args.rs:309:18
@@ -908,7 +908,7 @@ LL | pub struct HashMap<K, V, S = RandomState> {
 help: add missing generic arguments
    |
 LL |         type C = HashMap<'static, K, V>;
-   |                                 ^^^^^^
+   |                                 ++++++
 
 error[E0107]: this struct takes at most 3 generic arguments but 4 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:315:18
@@ -938,7 +938,7 @@ LL | pub struct HashMap<K, V, S = RandomState> {
 help: add missing generic arguments
    |
 LL |         type E = HashMap<K, V>;
-   |                          ^^^^
+   |                          ++++
 
 error[E0107]: missing generics for enum `Result`
   --> $DIR/wrong-number-of-args.rs:325:18
@@ -954,7 +954,7 @@ LL | pub enum Result<T, E> {
 help: add missing generic arguments
    |
 LL |         type A = Result<T, E>;
-   |                  ^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~
 
 error[E0107]: this enum takes 2 generic arguments but 1 generic argument was supplied
   --> $DIR/wrong-number-of-args.rs:329:18
@@ -972,7 +972,7 @@ LL | pub enum Result<T, E> {
 help: add missing generic argument
    |
 LL |         type B = Result<String, E>;
-   |                               ^^^
+   |                               +++
 
 error[E0107]: this enum takes 0 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/wrong-number-of-args.rs:333:18
@@ -1002,7 +1002,7 @@ LL | pub enum Result<T, E> {
 help: add missing generic arguments
    |
 LL |         type C = Result<'static, T, E>;
-   |                                ^^^^^^
+   |                                ++++++
 
 error[E0107]: this enum takes 2 generic arguments but 3 generic arguments were supplied
   --> $DIR/wrong-number-of-args.rs:339:18
@@ -1032,7 +1032,7 @@ LL | pub enum Result<T, E> {
 help: add missing generic arguments
    |
 LL |         type E = Result<T, E>;
-   |                         ^^^^
+   |                         ++++
 
 error: aborting due to 71 previous errors
 
index 87a13889298dfc81f40b9d9cc3923b50942cabc0..55eca0345139ee7cc8d1c5ee68effbc8f8ddbc34 100644 (file)
@@ -12,7 +12,7 @@ LL |     want_bar_for_any_ccx(b);
 help: consider further restricting this bound
    |
 LL |     where B : Qux + for<'ccx> Bar<'ccx>
-   |                   ^^^^^^^^^^^^^^^^^^^^^
+   |                   +++++++++++++++++++++
 
 error: aborting due to previous error
 
index 0123faa36dbcd8fdbcdd1c072dd9cc99a398a889..d7758ad96098577517b7e7b5cf3eef94fed18939 100644 (file)
@@ -12,7 +12,7 @@ LL |     where F : for<'tcx> Foo<'tcx>
 help: consider further restricting this bound
    |
 LL |     where F : Foo<'x> + for<'tcx> Foo<'tcx>
-   |                       ^^^^^^^^^^^^^^^^^^^^^
+   |                       +++++++++++++++++++++
 
 error[E0277]: the trait bound `for<'ccx> B: Bar<'ccx>` is not satisfied
   --> $DIR/hrtb-higher-ranker-supertraits.rs:35:26
@@ -28,7 +28,7 @@ LL |     where B : for<'ccx> Bar<'ccx>
 help: consider further restricting this bound
    |
 LL |     where B : Bar<'x> + for<'ccx> Bar<'ccx>
-   |                       ^^^^^^^^^^^^^^^^^^^^^
+   |                       +++++++++++++++++++++
 
 error: aborting due to 2 previous errors
 
index 216f7a24a1e3af1377ad9d63cd2e76c55ce84e99..64d27e0648700ddb80f2cd19f68c63d2dc855d3d 100644 (file)
@@ -7,7 +7,7 @@ LL |     format_args!({ #[derive(Clone)] struct S; });
 help: you might be missing a string literal to format with
    |
 LL |     format_args!("{}", { #[derive(Clone)] struct S; });
-   |                  ^^^^^
+   |                  +++++
 
 error: aborting due to previous error
 
index 94256b2eb79aba41502ed85ec3b18c1807556ba3..ef650b75b5634f4d97c4b4af3dbfac6f5b6084bd 100644 (file)
@@ -13,7 +13,7 @@ LL |     semitransparent;
 help: use `!` to invoke the macro
    |
 LL |     semitransparent!;
-   |                    ^
+   |                    +
 
 error[E0423]: expected value, found macro `opaque`
   --> $DIR/rustc-macro-transparency.rs:30:5
@@ -24,7 +24,7 @@ LL |     opaque;
 help: use `!` to invoke the macro
    |
 LL |     opaque!;
-   |           ^
+   |           +
 
 error: aborting due to 3 previous errors
 
index 211a3286cc355324441446a3179542f32f6f17fd..b752cde228d52d12b56ec97155287082fb15bfa4 100644 (file)
@@ -7,7 +7,7 @@ LL |     type Output = &i32;
 help: consider introducing a named lifetime parameter
    |
 LL |     type Output<'a> = &'a i32;
-   |                ^^^^   ^^^
+   |                ++++   ~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/assoc-type.rs:16:20
@@ -18,7 +18,7 @@ LL |     type Output = &'_ i32;
 help: consider introducing a named lifetime parameter
    |
 LL |     type Output<'a> = &'a i32;
-   |                ^^^^    ^^
+   |                ++++    ~~
 
 error: aborting due to 2 previous errors
 
index 611543a19260b05863eb6a5fb51a12422a45d3a4..bf04a8c987393017a5755560c87a895cf3e51bf1 100644 (file)
@@ -9,7 +9,7 @@ LL |     fn foo_fail<T: Trait>() -> impl FooLike<Output = T::Assoc> {
 help: consider constraining the associated type `<T as impl_trait::Trait>::Assoc` to `()`
    |
 LL |     fn foo_fail<T: Trait<Assoc = ()>>() -> impl FooLike<Output = T::Assoc> {
-   |                         ^^^^^^^^^^^^
+   |                         ++++++++++++
 
 error[E0760]: `impl Trait` return type cannot contain a projection or `Self` that references lifetimes from a parent scope
   --> $DIR/bound-normalization-fail.rs:41:41
@@ -28,7 +28,7 @@ LL |     fn foo2_fail<'a, T: Trait<'a>>() -> impl FooLike<Output = T::Assoc> {
 help: consider constraining the associated type `<T as lifetimes::Trait<'static>>::Assoc` to `()`
    |
 LL |     fn foo2_fail<'a, T: Trait<'a, Assoc = ()>>() -> impl FooLike<Output = T::Assoc> {
-   |                                 ^^^^^^^^^^^^
+   |                                 ++++++++++++
 
 error: aborting due to 3 previous errors
 
index 73fd5e8ded3b6cc003dccec6fed60becf1e63603..f4bd0fde3b6cbfe73efcf94692ea4e95b6002a67 100644 (file)
@@ -14,7 +14,7 @@ LL |     fn started_with<'a>(&'a self, prefix: &'a str) -> impl Iterator<Item=&'
 help: to force the closure to take ownership of `prefix` (and any other referenced variables), use the `move` keyword
    |
 LL |         self.data.iter().filter(move |s| s.starts_with(prefix)).map(|s| s.as_ref())
-   |                                 ^^^^
+   |                                 ++++
 
 error: aborting due to previous error
 
index 0ecec5eea368a03cc0486a6e040d58c338b68f1c..0d4f82bfc153f8170424e57b0af322ed45e45460 100644 (file)
@@ -50,7 +50,7 @@ LL | fn bap() -> Trait { Struct }
 help: use `impl Trait` as the return type, as all return paths are of type `Struct`, which implements `Trait`
    |
 LL | fn bap() -> impl Trait { Struct }
-   |             ^^^^^^^^^^
+   |             ~~~~~~~~~~
 
 error[E0746]: return type cannot have an unboxed trait object
   --> $DIR/dyn-trait-return-should-be-impl-trait.rs:15:13
@@ -62,7 +62,7 @@ LL | fn ban() -> dyn Trait { Struct }
 help: use `impl Trait` as the return type, as all return paths are of type `Struct`, which implements `Trait`
    |
 LL | fn ban() -> impl Trait { Struct }
-   |             ^^^^^^^^^^
+   |             ~~~~~~~~~~
 
 error[E0746]: return type cannot have an unboxed trait object
   --> $DIR/dyn-trait-return-should-be-impl-trait.rs:17:13
@@ -73,15 +73,15 @@ LL | fn bak() -> dyn Trait { unimplemented!() }
 help: use some type `T` that is `T: Sized` as the return type if all return paths have the same type
    |
 LL | fn bak() -> T { unimplemented!() }
-   |             ^
+   |             ~
 help: use `impl Trait` as the return type if all return paths have the same type but you want to expose only the trait in the signature
    |
 LL | fn bak() -> impl Trait { unimplemented!() }
-   |             ^^^^^^^^^^
+   |             ~~~~~~~~~~
 help: use a boxed trait object if all return paths implement trait `Trait`
    |
 LL | fn bak() -> Box<dyn Trait> { unimplemented!() }
-   |             ^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~
 
 error[E0746]: return type cannot have an unboxed trait object
   --> $DIR/dyn-trait-return-should-be-impl-trait.rs:19:13
@@ -95,11 +95,11 @@ LL | fn bal() -> dyn Trait {
    = note: you can create a new `enum` with a variant for each returned type
 help: return a boxed trait object instead
    |
-LL | fn bal() -> Box<dyn Trait> {
+LL ~ fn bal() -> Box<dyn Trait> {
 LL |     if true {
-LL |         return Box::new(Struct);
+LL ~         return Box::new(Struct);
 LL |     }
-LL |     Box::new(42)
+LL ~     Box::new(42)
    |
 
 error[E0308]: `if` and `else` have incompatible types
@@ -126,11 +126,11 @@ LL | fn bax() -> dyn Trait {
    = note: you can create a new `enum` with a variant for each returned type
 help: return a boxed trait object instead
    |
-LL | fn bax() -> Box<dyn Trait> {
+LL ~ fn bax() -> Box<dyn Trait> {
 LL |     if true {
-LL |         Box::new(Struct)
+LL ~         Box::new(Struct)
 LL |     } else {
-LL |         Box::new(42)
+LL ~         Box::new(42)
    |
 
 error[E0308]: mismatched types
@@ -148,7 +148,7 @@ LL |         return Struct;
 help: store this in the heap by calling `Box::new`
    |
 LL |         return Box::new(Struct);
-   |                ^^^^^^^^^      ^
+   |                +++++++++      +
 
 error[E0308]: mismatched types
   --> $DIR/dyn-trait-return-should-be-impl-trait.rs:36:5
@@ -165,7 +165,7 @@ LL |     42
 help: store this in the heap by calling `Box::new`
    |
 LL |     Box::new(42)
-   |     ^^^^^^^^^  ^
+   |     +++++++++  +
 
 error[E0308]: mismatched types
   --> $DIR/dyn-trait-return-should-be-impl-trait.rs:40:16
@@ -182,7 +182,7 @@ LL |         return 0;
 help: store this in the heap by calling `Box::new`
    |
 LL |         return Box::new(0);
-   |                ^^^^^^^^^ ^
+   |                +++++++++ +
 
 error[E0308]: mismatched types
   --> $DIR/dyn-trait-return-should-be-impl-trait.rs:42:5
@@ -199,7 +199,7 @@ LL |     42
 help: store this in the heap by calling `Box::new`
    |
 LL |     Box::new(42)
-   |     ^^^^^^^^^  ^
+   |     +++++++++  +
 
 error[E0308]: mismatched types
   --> $DIR/dyn-trait-return-should-be-impl-trait.rs:46:9
@@ -216,7 +216,7 @@ LL |         Struct
 help: store this in the heap by calling `Box::new`
    |
 LL |         Box::new(Struct)
-   |         ^^^^^^^^^      ^
+   |         +++++++++      +
 
 error[E0308]: mismatched types
   --> $DIR/dyn-trait-return-should-be-impl-trait.rs:48:9
@@ -233,7 +233,7 @@ LL |         42
 help: store this in the heap by calling `Box::new`
    |
 LL |         Box::new(42)
-   |         ^^^^^^^^^  ^
+   |         +++++++++  +
 
 error[E0308]: mismatched types
   --> $DIR/dyn-trait-return-should-be-impl-trait.rs:53:9
@@ -250,7 +250,7 @@ LL |         0
 help: store this in the heap by calling `Box::new`
    |
 LL |         Box::new(0)
-   |         ^^^^^^^^^ ^
+   |         +++++++++ +
 
 error[E0308]: mismatched types
   --> $DIR/dyn-trait-return-should-be-impl-trait.rs:55:9
@@ -267,7 +267,7 @@ LL |         42
 help: store this in the heap by calling `Box::new`
    |
 LL |         Box::new(42)
-   |         ^^^^^^^^^  ^
+   |         +++++++++  +
 
 error[E0746]: return type cannot have an unboxed trait object
   --> $DIR/dyn-trait-return-should-be-impl-trait.rs:60:13
@@ -279,7 +279,7 @@ LL | fn bat() -> dyn Trait {
 help: use `impl Trait` as the return type, as all return paths are of type `{integer}`, which implements `Trait`
    |
 LL | fn bat() -> impl Trait {
-   |             ^^^^^^^^^^
+   |             ~~~~~~~~~~
 
 error[E0746]: return type cannot have an unboxed trait object
   --> $DIR/dyn-trait-return-should-be-impl-trait.rs:66:13
@@ -291,7 +291,7 @@ LL | fn bay() -> dyn Trait {
 help: use `impl Trait` as the return type, as all return paths are of type `{integer}`, which implements `Trait`
    |
 LL | fn bay() -> impl Trait {
-   |             ^^^^^^^^^^
+   |             ~~~~~~~~~~
 
 error: aborting due to 20 previous errors
 
index 3318866c52cf95e3ae1930f70e2c252f4958b3e0..46053c6e7c1196f4cb10eb13c4814751856b6f33 100644 (file)
@@ -38,7 +38,7 @@ LL |     let _: i32 = Leak::leak(hide(0_i32));
 help: consider constraining the associated type `<impl Foo as Leak>::T` to `i32`
    |
 LL | fn hide<T: Foo>(x: T) -> impl Foo<T = i32> {
-   |                                  ^^^^^^^^^
+   |                                  +++++++++
 
 error[E0308]: mismatched types
   --> $DIR/equality2.rs:38:10
index 233b47445db029b26b30703ac5a1600bd2d84358..b6701b68fd6c1d6f30b2248c48a538860db4a55a 100644 (file)
@@ -14,7 +14,7 @@ LL | fn f<T: ?Sized, U: ?Sized>(_: impl AsRef<T>, _: impl AsRef<U>) {}
 help: add missing generic argument
    |
 LL |     f::<[u8], U>("a", b"a");
-   |             ^^^
+   |             +++
 
 error: aborting due to previous error
 
index 6af91480e3a6e511ae958402b20cac5bb69530f9..d1a04af070637035561fec638419226133a4c551 100644 (file)
@@ -9,8 +9,9 @@ LL |     fn foo<U: Debug>(&self, _: &U) { }
    |
 help: try removing the generic parameter and using `impl Trait` instead
    |
-LL |     fn foo(&self, _: &impl Debug) { }
-   |          --           ^^^^^^^^^^
+LL -     fn foo<U: Debug>(&self, _: &U) { }
+LL +     fn foo(&self, _: &impl Debug) { }
+   | 
 
 error[E0643]: method `bar` has incompatible signature for trait
   --> $DIR/impl-generic-mismatch.rs:17:23
@@ -24,7 +25,7 @@ LL |     fn bar(&self, _: &impl Debug) { }
 help: try changing the `impl Trait` argument to a generic parameter
    |
 LL |     fn bar<U: Debug>(&self, _: &U) { }
-   |           ^^^^^^^^^^            ^
+   |           ++++++++++            ~
 
 error[E0643]: method `hash` has incompatible signature for trait
   --> $DIR/impl-generic-mismatch.rs:28:33
diff --git a/src/test/ui/impl-trait/issue-55872-1.full_tait.stderr b/src/test/ui/impl-trait/issue-55872-1.full_tait.stderr
new file mode 100644 (file)
index 0000000..50eab7d
--- /dev/null
@@ -0,0 +1,57 @@
+warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/issue-55872-1.rs:3:32
+   |
+LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
+   |                                ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
+
+error[E0276]: impl has stricter requirements than trait
+  --> $DIR/issue-55872-1.rs:17:5
+   |
+LL |     fn foo<T>() -> Self::E;
+   |     ----------------------- definition of `foo` from trait
+...
+LL |     fn foo<T: Default>() -> Self::E {
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Default`
+
+error[E0277]: the trait bound `S: Copy` is not satisfied in `(S, T)`
+  --> $DIR/issue-55872-1.rs:13:14
+   |
+LL |     type E = impl Copy;
+   |              ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S`
+   |
+   = note: required because it appears within the type `(S, T)`
+help: consider further restricting this bound
+   |
+LL | impl<S: Default + std::marker::Copy> Bar for S {
+   |                 +++++++++++++++++++
+
+error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)`
+  --> $DIR/issue-55872-1.rs:13:14
+   |
+LL |     type E = impl Copy;
+   |              ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T`
+   |
+   = note: required because it appears within the type `(S, T)`
+help: consider further restricting this bound
+   |
+LL |     fn foo<T: Default + std::marker::Copy>() -> Self::E {
+   |                       +++++++++++++++++++
+
+error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
+  --> $DIR/issue-55872-1.rs:17:37
+   |
+LL |       fn foo<T: Default>() -> Self::E {
+   |  _____________________________________^
+LL | |
+LL | |
+LL | |         (S::default(), T::default())
+LL | |     }
+   | |_____^
+
+error: aborting due to 4 previous errors; 1 warning emitted
+
+Some errors have detailed explanations: E0276, E0277.
+For more information about an error, try `rustc --explain E0276`.
index 72a060abae3e77f7267dce6b001cf52f48004ddb..46188636475db0362549d659208bef75878f060a 100644 (file)
@@ -8,12 +8,12 @@ pub trait Bar {
 
 impl<S: Default> Bar for S {
     type E = impl Copy;
-    //~^ ERROR the trait bound `S: Copy` is not satisfied in `(S, T)` [E0277]
-    //~^^ ERROR the trait bound `T: Copy` is not satisfied in `(S, T)` [E0277]
 
     fn foo<T: Default>() -> Self::E {
         //~^ ERROR type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
         //~| ERROR impl has stricter requirements than trait
+        //~| ERROR the trait bound `S: Copy` is not satisfied in `(S, T)` [E0277]
+        //~| ERROR the trait bound `T: Copy` is not satisfied in `(S, T)` [E0277]
         (S::default(), T::default())
     }
 }
index 6411c1b5d1ca2c080f27aa0b5dc4be1b204dea2a..e772445a56c9a7af48eccd643b4bfd99f7be4c65 100644 (file)
@@ -1,5 +1,5 @@
 error[E0276]: impl has stricter requirements than trait
-  --> $DIR/issue-55872-1.rs:14:5
+  --> $DIR/issue-55872-1.rs:12:5
    |
 LL |     fn foo<T>() -> Self::E;
    |     ----------------------- definition of `foo` from trait
@@ -8,36 +8,38 @@ LL |     fn foo<T: Default>() -> Self::E {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Default`
 
 error[E0277]: the trait bound `S: Copy` is not satisfied in `(S, T)`
-  --> $DIR/issue-55872-1.rs:10:14
+  --> $DIR/issue-55872-1.rs:12:29
    |
-LL |     type E = impl Copy;
-   |              ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S`
+LL |     fn foo<T: Default>() -> Self::E {
+   |                             ^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S`
    |
    = note: required because it appears within the type `(S, T)`
 help: consider further restricting this bound
    |
 LL | impl<S: Default + std::marker::Copy> Bar for S {
-   |                 ^^^^^^^^^^^^^^^^^^^
+   |                 +++++++++++++++++++
 
 error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)`
-  --> $DIR/issue-55872-1.rs:10:14
+  --> $DIR/issue-55872-1.rs:12:29
    |
-LL |     type E = impl Copy;
-   |              ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T`
+LL |     fn foo<T: Default>() -> Self::E {
+   |                             ^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T`
    |
    = note: required because it appears within the type `(S, T)`
 help: consider further restricting this bound
    |
 LL |     fn foo<T: Default + std::marker::Copy>() -> Self::E {
-   |                       ^^^^^^^^^^^^^^^^^^^
+   |                       +++++++++++++++++++
 
 error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
-  --> $DIR/issue-55872-1.rs:14:37
+  --> $DIR/issue-55872-1.rs:12:37
    |
 LL |       fn foo<T: Default>() -> Self::E {
    |  _____________________________________^
 LL | |
 LL | |
+LL | |
+LL | |
 LL | |         (S::default(), T::default())
 LL | |     }
    | |_____^
index 6eda1dc62ec62895a1a8b197a2547ddee3283bb2..9546d01ac5c6895ea2c0560ab2bf255f94dff540 100644 (file)
@@ -11,9 +11,9 @@ pub trait Bar {
 
 impl<S> Bar for S {
     type E = impl std::marker::Copy;
-    //~^ ERROR the trait bound `impl Future: Copy` is not satisfied [E0277]
     fn foo<T>() -> Self::E {
         //~^ ERROR type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
+        //~| ERROR the trait bound `impl Future: Copy` is not satisfied [E0277]
         async {}
     }
 }
index 58c5ee45051af2159fcfd9994ccc2ec5d69544cc..31b8fbd299c51ea9087e988a24a02940feb05aa1 100644 (file)
@@ -1,15 +1,16 @@
 error[E0277]: the trait bound `impl Future: Copy` is not satisfied
-  --> $DIR/issue-55872-2.rs:13:14
+  --> $DIR/issue-55872-2.rs:14:20
    |
-LL |     type E = impl std::marker::Copy;
-   |              ^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future`
+LL |     fn foo<T>() -> Self::E {
+   |                    ^^^^^^^ the trait `Copy` is not implemented for `impl Future`
 
 error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
-  --> $DIR/issue-55872-2.rs:15:28
+  --> $DIR/issue-55872-2.rs:14:28
    |
 LL |       fn foo<T>() -> Self::E {
    |  ____________________________^
 LL | |
+LL | |
 LL | |         async {}
 LL | |     }
    | |_____^
index e9d620877345423f65e0683bad69c34df47ab0ce..3b75939ff02c5ccbca4d5b6c3dcb705f74aa2eb4 100644 (file)
@@ -9,7 +9,7 @@ LL | fn elided(x: &i32) -> impl Copy { x }
 help: to allow this `impl Trait` to capture borrowed data with lifetime `'1`, add `'_` as a bound
    |
 LL | fn elided(x: &i32) -> impl Copy + '_ { x }
-   |                                 ^^^^
+   |                                 ++++
 
 error: lifetime may not live long enough
   --> $DIR/must_outlive_least_region_or_bound.rs:5:32
@@ -23,7 +23,7 @@ LL | fn explicit<'a>(x: &'a i32) -> impl Copy { x }
 help: to allow this `impl Trait` to capture borrowed data with lifetime `'a`, add `'a` as a bound
    |
 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:7:46
index b040889217e47032e23cfcffbd0b301ce63f31fa..81ba89b0e05f7d5a1c2ecac4ee82729049170696 100644 (file)
@@ -14,7 +14,7 @@ LL | fn elided(x: &i32) -> impl Copy { x }
 help: to declare that the `impl Trait` captures data from argument `x`, you can add an explicit `'_` lifetime bound
    |
 LL | fn elided(x: &i32) -> impl Copy + '_ { x }
-   |                                 ^^^^
+   |                                 ++++
 
 error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime requirement
   --> $DIR/must_outlive_least_region_or_bound.rs:5:44
@@ -32,7 +32,7 @@ LL | fn explicit<'a>(x: &'a i32) -> impl Copy { x }
 help: to declare that the `impl Trait` captures data from argument `x`, you can add an explicit `'a` lifetime bound
    |
 LL | fn explicit<'a>(x: &'a i32) -> impl Copy + 'a { x }
-   |                                          ^^^^
+   |                                          ++++
 
 error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement
   --> $DIR/must_outlive_least_region_or_bound.rs:7:46
@@ -50,11 +50,11 @@ LL | fn elided2(x: &i32) -> impl Copy + 'static { x }
 help: consider changing the `impl Trait`'s explicit `'static` bound to the lifetime of argument `x`
    |
 LL | fn elided2(x: &i32) -> impl Copy + '_ { x }
-   |                                    ^^
+   |                                    ~~
 help: alternatively, add an explicit `'static` bound to this reference
    |
 LL | fn elided2(x: &'static i32) -> impl Copy + 'static { x }
-   |               ^^^^^^^^^^^^
+   |               ~~~~~~~~~~~~
 
 error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime requirement
   --> $DIR/must_outlive_least_region_or_bound.rs:9:55
@@ -72,11 +72,11 @@ LL | fn explicit2<'a>(x: &'a i32) -> impl Copy + 'static { x }
 help: consider changing the `impl Trait`'s explicit `'static` bound to the lifetime of argument `x`
    |
 LL | fn explicit2<'a>(x: &'a i32) -> impl Copy + 'a { x }
-   |                                             ^^
+   |                                             ~~
 help: alternatively, add an explicit `'static` bound to this reference
    |
 LL | fn explicit2<'a>(x: &'static i32) -> impl Copy + 'static { x }
-   |                     ^^^^^^^^^^^^
+   |                     ~~~~~~~~~~~~
 
 error[E0621]: explicit lifetime required in the type of `x`
   --> $DIR/must_outlive_least_region_or_bound.rs:11:24
@@ -95,11 +95,11 @@ LL | fn elided5(x: &i32) -> (Box<dyn Debug>, impl Debug) { (Box::new(x), x) }
 help: to declare that the trait object captures data from argument `x`, you can add an explicit `'_` lifetime bound
    |
 LL | fn elided5(x: &i32) -> (Box<dyn Debug + '_>, impl Debug) { (Box::new(x), x) }
-   |                                       ^^^^
+   |                                       ++++
 help: to declare that the `impl Trait` captures data from argument `x`, you can add an explicit `'_` lifetime bound
    |
 LL | fn elided5(x: &i32) -> (Box<dyn Debug>, impl Debug + '_) { (Box::new(x), x) }
-   |                                                    ^^^^
+   |                                                    ++++
 
 error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement
   --> $DIR/must_outlive_least_region_or_bound.rs:22:69
@@ -115,11 +115,11 @@ LL | fn elided5(x: &i32) -> (Box<dyn Debug>, impl Debug) { (Box::new(x), x) }
 help: to declare that the trait object captures data from argument `x`, you can add an explicit `'_` lifetime bound
    |
 LL | fn elided5(x: &i32) -> (Box<dyn Debug + '_>, impl Debug) { (Box::new(x), x) }
-   |                                       ^^^^
+   |                                       ++++
 help: to declare that the `impl Trait` captures data from argument `x`, you can add an explicit `'_` lifetime bound
    |
 LL | fn elided5(x: &i32) -> (Box<dyn Debug>, impl Debug + '_) { (Box::new(x), x) }
-   |                                                    ^^^^
+   |                                                    ++++
 
 error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime requirement
   --> $DIR/must_outlive_least_region_or_bound.rs:28:69
@@ -135,11 +135,11 @@ LL | fn with_bound<'a>(x: &'a i32) -> impl LifetimeTrait<'a> + 'static { x }
 help: consider changing the `impl Trait`'s explicit `'static` bound to the lifetime of argument `x`
    |
 LL | fn with_bound<'a>(x: &'a i32) -> impl LifetimeTrait<'a> + 'a { x }
-   |                                                           ^^
+   |                                                           ~~
 help: alternatively, add an explicit `'static` bound to this reference
    |
 LL | fn with_bound<'a>(x: &'static i32) -> impl LifetimeTrait<'a> + 'static { x }
-   |                      ^^^^^^^^^^^^
+   |                      ~~~~~~~~~~~~
 
 error[E0623]: lifetime mismatch
   --> $DIR/must_outlive_least_region_or_bound.rs:32:61
@@ -169,7 +169,7 @@ LL | fn elided3(x: &i32) -> Box<dyn Debug> { Box::new(x) }
 help: to declare that the trait object captures data from argument `x`, you can add an explicit `'_` lifetime bound
    |
 LL | fn elided3(x: &i32) -> Box<dyn Debug + '_> { Box::new(x) }
-   |                                      ^^^^
+   |                                      ++++
 
 error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime requirement
   --> $DIR/must_outlive_least_region_or_bound.rs:16:59
@@ -182,7 +182,7 @@ LL | fn explicit3<'a>(x: &'a i32) -> Box<dyn Debug> { Box::new(x) }
 help: to declare that the trait object captures data from argument `x`, you can add an explicit `'a` lifetime bound
    |
 LL | fn explicit3<'a>(x: &'a i32) -> Box<dyn Debug + 'a> { Box::new(x) }
-   |                                               ^^^^
+   |                                               ++++
 
 error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement
   --> $DIR/must_outlive_least_region_or_bound.rs:18:60
@@ -195,11 +195,11 @@ LL | fn elided4(x: &i32) -> Box<dyn Debug + 'static> { Box::new(x) }
 help: consider changing the trait object's explicit `'static` bound to the lifetime of argument `x`
    |
 LL | fn elided4(x: &i32) -> Box<dyn Debug + '_> { Box::new(x) }
-   |                                        ^^
+   |                                        ~~
 help: alternatively, add an explicit `'static` bound to this reference
    |
 LL | fn elided4(x: &'static i32) -> Box<dyn Debug + 'static> { Box::new(x) }
-   |               ^^^^^^^^^^^^
+   |               ~~~~~~~~~~~~
 
 error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime requirement
   --> $DIR/must_outlive_least_region_or_bound.rs:20:69
@@ -210,11 +210,11 @@ LL | fn explicit4<'a>(x: &'a i32) -> Box<dyn Debug + 'static> { Box::new(x) }
 help: consider changing the trait object's explicit `'static` bound to the lifetime of argument `x`
    |
 LL | fn explicit4<'a>(x: &'a i32) -> Box<dyn Debug + 'a> { Box::new(x) }
-   |                                                 ^^
+   |                                                 ~~
 help: alternatively, add an explicit `'static` bound to this reference
    |
 LL | fn explicit4<'a>(x: &'static i32) -> Box<dyn Debug + 'static> { Box::new(x) }
-   |                     ^^^^^^^^^^^^
+   |                     ~~~~~~~~~~~~
 
 error: aborting due to 14 previous errors
 
index 2f3726bdb33a825dffb2ad4408414ca749d34242..365ecd9fcfa1d7e859145588bb7ffd68a55a834f 100644 (file)
@@ -14,11 +14,11 @@ LL |     fn foo() -> Self;
 help: consider turning `foo` into a method by giving it a `&self` argument
    |
 LL |     fn foo(&self) -> Self;
-   |            ^^^^^
+   |            +++++
 help: alternatively, consider constraining `foo` so it does not apply to trait objects
    |
 LL |     fn foo() -> Self where Self: Sized;
-   |                      ^^^^^^^^^^^^^^^^^
+   |                      +++++++++++++++++
 
 error[E0038]: the trait `NotObjectSafe` cannot be made into an object
   --> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:28:13
@@ -36,11 +36,11 @@ LL |     fn foo() -> Self;
 help: consider turning `foo` into a method by giving it a `&self` argument
    |
 LL |     fn foo(&self) -> Self;
-   |            ^^^^^
+   |            +++++
 help: alternatively, consider constraining `foo` so it does not apply to trait objects
    |
 LL |     fn foo() -> Self where Self: Sized;
-   |                      ^^^^^^^^^^^^^^^^^
+   |                      +++++++++++++++++
 
 error: aborting due to 2 previous errors
 
index 66043267f91cd71979f72ae93fabbba300952e0c..357166d112377aa56b82cfe7a1da18fa4465dbcd 100644 (file)
@@ -35,12 +35,12 @@ LL |     B
 help: you could change the return type to be a boxed trait object
    |
 LL | fn cat() -> Box<dyn ObjectSafe> {
-   |             ^^^^^^^           ^
+   |             ~~~~~~~           +
 help: if you change the return type to expect trait objects, box the returned expressions
    |
-LL |         return Box::new(A);
+LL ~         return Box::new(A);
 LL |     }
-LL |     Box::new(B)
+LL ~     Box::new(B)
    |
 
 error: aborting due to 2 previous errors
index eb4dc45c8a9320e136428e8b6699a3e560de9ef9..970abad5c72e9166c35412786b5fe18803192641 100644 (file)
@@ -17,12 +17,12 @@ LL |     1u32
 help: you could change the return type to be a boxed trait object
    |
 LL | fn foo() -> Box<dyn std::fmt::Display> {
-   |             ^^^^^^^                  ^
+   |             ~~~~~~~                  +
 help: if you change the return type to expect trait objects, box the returned expressions
    |
-LL |         return Box::new(0i32);
+LL ~         return Box::new(0i32);
 LL |     }
-LL |     Box::new(1u32)
+LL ~     Box::new(1u32)
    |
 
 error[E0308]: mismatched types
@@ -44,12 +44,12 @@ LL |         return 1u32;
 help: you could change the return type to be a boxed trait object
    |
 LL | fn bar() -> Box<dyn std::fmt::Display> {
-   |             ^^^^^^^                  ^
+   |             ~~~~~~~                  +
 help: if you change the return type to expect trait objects, box the returned expressions
    |
-LL |         return Box::new(0i32);
+LL ~         return Box::new(0i32);
 LL |     } else {
-LL |         return Box::new(1u32);
+LL ~         return Box::new(1u32);
    |
 
 error[E0308]: mismatched types
@@ -71,12 +71,12 @@ LL |         1u32
 help: you could change the return type to be a boxed trait object
    |
 LL | fn baz() -> Box<dyn std::fmt::Display> {
-   |             ^^^^^^^                  ^
+   |             ~~~~~~~                  +
 help: if you change the return type to expect trait objects, box the returned expressions
    |
-LL |         return Box::new(0i32);
+LL ~         return Box::new(0i32);
 LL |     } else {
-LL |         Box::new(1u32)
+LL ~         Box::new(1u32)
    |
 
 error[E0308]: `if` and `else` have incompatible types
@@ -94,12 +94,12 @@ LL | |     }
 help: you could change the return type to be a boxed trait object
    |
 LL | fn qux() -> Box<dyn std::fmt::Display> {
-   |             ^^^^^^^                  ^
+   |             ~~~~~~~                  +
 help: if you change the return type to expect trait objects, box the returned expressions
    |
-LL |         Box::new(0i32)
+LL ~         Box::new(0i32)
 LL |     } else {
-LL |         Box::new(1u32)
+LL ~         Box::new(1u32)
    |
 
 error[E0308]: mismatched types
@@ -120,11 +120,11 @@ LL |         _ => 1u32,
 help: you could change the return type to be a boxed trait object
    |
 LL | fn bat() -> Box<dyn std::fmt::Display> {
-   |             ^^^^^^^                  ^
+   |             ~~~~~~~                  +
 help: if you change the return type to expect trait objects, box the returned expressions
    |
-LL |         0 => return Box::new(0i32),
-LL |         _ => Box::new(1u32),
+LL ~         0 => return Box::new(0i32),
+LL ~         _ => Box::new(1u32),
    |
 
 error[E0308]: mismatched types
@@ -147,14 +147,14 @@ LL | |     }
 help: you could change the return type to be a boxed trait object
    |
 LL | fn can() -> Box<dyn std::fmt::Display> {
-   |             ^^^^^^^                  ^
+   |             ~~~~~~~                  +
 help: if you change the return type to expect trait objects, box the returned expressions
    |
-LL |     Box::new(match 13 {
-LL |         0 => return Box::new(0i32),
+LL ~     Box::new(match 13 {
+LL ~         0 => return Box::new(0i32),
 LL |         1 => 1u32,
 LL |         _ => 2u32,
-LL |     })
+LL ~     })
    |
 
 error[E0308]: mismatched types
@@ -176,13 +176,13 @@ LL |             1u32
 help: you could change the return type to be a boxed trait object
    |
 LL | fn cat() -> Box<dyn std::fmt::Display> {
-   |             ^^^^^^^                  ^
+   |             ~~~~~~~                  +
 help: if you change the return type to expect trait objects, box the returned expressions
    |
-LL |             return Box::new(0i32);
+LL ~             return Box::new(0i32);
 LL |         }
 LL |         _ => {
-LL |             Box::new(1u32)
+LL ~             Box::new(1u32)
    |
 
 error[E0308]: `match` arms have incompatible types
@@ -200,11 +200,11 @@ LL | |     }
 help: you could change the return type to be a boxed trait object
    |
 LL | fn dog() -> Box<dyn std::fmt::Display> {
-   |             ^^^^^^^                  ^
+   |             ~~~~~~~                  +
 help: if you change the return type to expect trait objects, box the returned expressions
    |
-LL |         0 => Box::new(0i32),
-LL |         1 => Box::new(1u32),
+LL ~         0 => Box::new(0i32),
+LL ~         1 => Box::new(1u32),
    |
 
 error[E0308]: `if` and `else` have incompatible types
@@ -222,12 +222,12 @@ LL | |     }
 help: you could change the return type to be a boxed trait object
    |
 LL | fn apt() -> Box<dyn std::fmt::Display> {
-   |             ^^^^^^^                  ^
+   |             ~~~~~~~                  +
 help: if you change the return type to expect trait objects, box the returned expressions
    |
-LL |         Box::new(0i32)
+LL ~         Box::new(0i32)
 LL |     } else {
-LL |         Box::new(1u32)
+LL ~         Box::new(1u32)
    |
 
 error[E0746]: return type cannot have an unboxed trait object
@@ -242,10 +242,10 @@ LL | fn hat() -> dyn std::fmt::Display {
    = note: you can create a new `enum` with a variant for each returned type
 help: return a boxed trait object instead
    |
-LL | fn hat() -> Box<dyn std::fmt::Display> {
+LL ~ fn hat() -> Box<dyn std::fmt::Display> {
 LL |     match 13 {
 LL |         0 => {
-LL |             return Box::new(0i32);
+LL ~             return Box::new(0i32);
 LL |         }
 LL |         _ => {
  ...
@@ -274,11 +274,11 @@ LL | fn pug() -> dyn std::fmt::Display {
    = note: you can create a new `enum` with a variant for each returned type
 help: return a boxed trait object instead
    |
-LL | fn pug() -> Box<dyn std::fmt::Display> {
+LL ~ fn pug() -> Box<dyn std::fmt::Display> {
 LL |     match 13 {
-LL |         0 => Box::new(0i32),
-LL |         1 => Box::new(1u32),
-LL |         _ => Box::new(2u32),
+LL ~         0 => Box::new(0i32),
+LL ~         1 => Box::new(1u32),
+LL ~         _ => Box::new(2u32),
    |
 
 error[E0308]: `if` and `else` have incompatible types
@@ -305,11 +305,11 @@ LL | fn man() -> dyn std::fmt::Display {
    = note: you can create a new `enum` with a variant for each returned type
 help: return a boxed trait object instead
    |
-LL | fn man() -> Box<dyn std::fmt::Display> {
+LL ~ fn man() -> Box<dyn std::fmt::Display> {
 LL |     if false {
-LL |         Box::new(0i32)
+LL ~         Box::new(0i32)
 LL |     } else {
-LL |         Box::new(1u32)
+LL ~         Box::new(1u32)
    |
 
 error: aborting due to 14 previous errors
index 6c5264671a9120c3f397bc612d465736f98a4d24..05a9ed1d4e15d3b477b380c041585de609e68045 100644 (file)
@@ -9,7 +9,7 @@ LL |     fn iter_values_anon(&self) -> impl Iterator<Item=u32> {
 help: to allow this `impl Trait` to capture borrowed data with lifetime `'1`, add `'_` as a bound
    |
 LL |     fn iter_values_anon(&self) -> impl Iterator<Item=u32> + '_ {
-   |                                                           ^^^^
+   |                                                           ++++
 
 error: lifetime may not live long enough
   --> $DIR/static-return-lifetime-infered.rs:9:37
@@ -23,7 +23,7 @@ LL |     fn iter_values<'a>(&'a self) -> impl Iterator<Item=u32> {
 help: to allow this `impl Trait` to capture borrowed data with lifetime `'a`, add `'a` as a bound
    |
 LL |     fn iter_values<'a>(&'a self) -> impl Iterator<Item=u32> + 'a {
-   |                                                             ^^^^
+   |                                                             ++++
 
 error: aborting due to 2 previous errors
 
index 7c289b388223a4b6ebff083f9f32210745ee7d6c..ebd0b6a12818029b73ba225a23f63316b1589b07 100644 (file)
@@ -16,7 +16,7 @@ LL |     fn iter_values_anon(&self) -> impl Iterator<Item=u32> {
 help: to declare that the `impl Trait` captures data from argument `self`, you can add an explicit `'_` lifetime bound
    |
 LL |     fn iter_values_anon(&self) -> impl Iterator<Item=u32> + '_ {
-   |                                                           ^^^^
+   |                                                           ++++
 
 error[E0759]: `self` has lifetime `'a` but it needs to satisfy a `'static` lifetime requirement
   --> $DIR/static-return-lifetime-infered.rs:10:16
@@ -36,7 +36,7 @@ LL |     fn iter_values<'a>(&'a self) -> impl Iterator<Item=u32> {
 help: to declare that the `impl Trait` captures data from argument `self`, you can add an explicit `'a` lifetime bound
    |
 LL |     fn iter_values<'a>(&'a self) -> impl Iterator<Item=u32> + 'a {
-   |                                                             ^^^^
+   |                                                             ++++
 
 error: aborting due to 2 previous errors
 
index c6af47805ea5bdfd4f5983f5d2d0cc094528835a..e0a968527205fc788d77d507a11bf34b7904e29f 100644 (file)
@@ -7,7 +7,7 @@ LL |     let _f = 10i32.abs;
 help: use parentheses to call the method
    |
 LL |     let _f = 10i32.abs();
-   |                       ^^
+   |                       ++
 
 error: aborting due to previous error
 
index 7a4e8e5d3b926e784b5d51d8d26f1137c9ab6282..82f5eb83e6f2d4affdc377b6a6f7e5677b36aba7 100644 (file)
@@ -10,7 +10,7 @@ LL | use sub2::foo;
 help: you can use `as` to change the binding name of the import
    |
 LL | use sub2::foo as other_foo;
-   |     ^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 7629cede7a45fc14e1c651ae1e06f061cdaec8ec..2c7a8ad5c1adb12a77b5e7337d2dd790046c7939 100644 (file)
@@ -36,7 +36,7 @@ LL | |     }
 help: you might have meant to use the following enum variant
    |
 LL |     B::B1;
-   |     ^^^^^
+   |     ~~~~~
 
 error[E0425]: cannot find value `C` in this scope
   --> $DIR/glob-resolve1.rs:29:5
@@ -72,7 +72,7 @@ LL |     foo::<A>();
 help: an enum with a similar name exists
    |
 LL |     foo::<B>();
-   |           ^
+   |           ~
 help: consider importing this enum
    |
 LL | use bar::A;
@@ -90,7 +90,7 @@ LL |     foo::<C>();
 help: an enum with a similar name exists
    |
 LL |     foo::<B>();
-   |           ^
+   |           ~
 help: consider importing this struct
    |
 LL | use bar::C;
@@ -108,7 +108,7 @@ LL |     foo::<D>();
 help: an enum with a similar name exists
    |
 LL |     foo::<B>();
-   |           ^
+   |           ~
 help: consider importing this type alias
    |
 LL | use bar::D;
index cc1d649d61093bd214e363efb6d752d7333c4b5e..9d26022098fddf09d10a33e56bfe61439d10dae8 100644 (file)
@@ -11,7 +11,7 @@ LL | mod A {}
 help: you can use `as` to change the binding name of the import
    |
 LL | use self::A as OtherA;
-   |     ^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~
 
 error[E0255]: the name `B` is defined multiple times
   --> $DIR/issue-19498.rs:5:1
@@ -26,7 +26,7 @@ LL | pub mod B {}
 help: you can use `as` to change the binding name of the import
    |
 LL | use self::B as OtherB;
-   |     ^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~
 
 error[E0255]: the name `D` is defined multiple times
   --> $DIR/issue-19498.rs:9:5
@@ -40,7 +40,7 @@ LL |     mod D {}
 help: you can use `as` to change the binding name of the import
    |
 LL |     use C::D as OtherD;
-   |         ^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~
 
 error: aborting due to 3 previous errors
 
index 647048c7c2012f1eb4ae441be3c6bd269af4dacb..e5ed6b10a5479757e38d1255ffc1e42b1aa09787 100644 (file)
@@ -11,7 +11,7 @@ LL | type Add = bool;
 help: you can use `as` to change the binding name of the import
    |
 LL | use std::ops::Add as OtherAdd;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0255]: the name `Sub` is defined multiple times
   --> $DIR/issue-24081.rs:9:1
@@ -26,7 +26,7 @@ LL | struct Sub { x: f32 }
 help: you can use `as` to change the binding name of the import
    |
 LL | use std::ops::Sub as OtherSub;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0255]: the name `Mul` is defined multiple times
   --> $DIR/issue-24081.rs:11:1
@@ -41,7 +41,7 @@ LL | enum Mul { A, B }
 help: you can use `as` to change the binding name of the import
    |
 LL | use std::ops::Mul as OtherMul;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0255]: the name `Div` is defined multiple times
   --> $DIR/issue-24081.rs:13:1
@@ -56,7 +56,7 @@ LL | mod Div { }
 help: you can use `as` to change the binding name of the import
    |
 LL | use std::ops::Div as OtherDiv;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0255]: the name `Rem` is defined multiple times
   --> $DIR/issue-24081.rs:15:1
@@ -71,7 +71,7 @@ LL | trait Rem {  }
 help: you can use `as` to change the binding name of the import
    |
 LL | use std::ops::Rem as OtherRem;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 5 previous errors
 
index 38dc9ef10351930659d22abd14da9c7b9d928987..518d2be784111fa46a5bfe666db99408f96256a6 100644 (file)
@@ -10,7 +10,7 @@ LL | use bar::baz;
 help: you can use `as` to change the binding name of the import
    |
 LL | use bar::baz as other_baz;
-   |     ^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~
 
 error[E0252]: the name `Quux` is defined multiple times
   --> $DIR/issue-25396.rs:7:5
@@ -24,7 +24,7 @@ LL | use bar::Quux;
 help: you can use `as` to change the binding name of the import
    |
 LL | use bar::Quux as OtherQuux;
-   |     ^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0252]: the name `blah` is defined multiple times
   --> $DIR/issue-25396.rs:10:5
@@ -38,7 +38,7 @@ LL | use bar::blah;
 help: you can use `as` to change the binding name of the import
    |
 LL | use bar::blah as other_blah;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0252]: the name `WOMP` is defined multiple times
   --> $DIR/issue-25396.rs:13:5
@@ -52,7 +52,7 @@ LL | use bar::WOMP;
 help: you can use `as` to change the binding name of the import
    |
 LL | use bar::WOMP as OtherWOMP;
-   |     ^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 4 previous errors
 
index 96684309a008dbc1f7f6a1a9a23138bd26b2c11a..4c5875ba77664014c6f68a56383da49ab7c6514d 100644 (file)
@@ -10,7 +10,7 @@ LL | use extension2::ConstructorExtension;
 help: you can use `as` to change the binding name of the import
    |
 LL | use extension2::ConstructorExtension as OtherConstructorExtension;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 158e81cdd9643c179483711e6f9765cdbcf367e9..3301b7d4ef80e9376e84b9b72ba584d9c93dee5f 100644 (file)
@@ -12,12 +12,13 @@ LL | use foo::self;
    |
 help: consider importing the module directly
    |
-LL | use foo;
-   |       --
+LL - use foo::self;
+LL + use foo;
+   | 
 help: alternatively, use the multi-path `use` syntax to import `self`
    |
 LL | use foo::{self};
-   |          ^    ^
+   |          +    +
 
 error[E0255]: the name `foo` is defined multiple times
   --> $DIR/import-self.rs:6:11
@@ -32,7 +33,7 @@ LL | use foo::{self};
 help: you can use `as` to change the binding name of the import
    |
 LL | use foo::{self as other_foo};
-   |           ^^^^^^^^^^^^^^^^^
+   |           ~~~~~~~~~~~~~~~~~
 
 error[E0255]: the name `foo` is defined multiple times
   --> $DIR/import-self.rs:12:5
@@ -47,7 +48,7 @@ LL | use foo::self;
 help: you can use `as` to change the binding name of the import
    |
 LL | use foo as other_foo;
-   |     ^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~
 
 error[E0252]: the name `A` is defined multiple times
   --> $DIR/import-self.rs:16:11
@@ -61,7 +62,7 @@ LL | use foo::{self as A};
 help: you can use `as` to change the binding name of the import
    |
 LL | use foo::{self as OtherA};
-   |           ^^^^^^^^^^^^^^
+   |           ~~~~~~~~~~~~~~
 
 error: aborting due to 5 previous errors
 
index a7ebc7171bc90f6b724dde30bddf66baf40d6e4c..e9a9d47ce7cd6e944f316f8f7181f6d2b85363fa 100644 (file)
@@ -10,7 +10,7 @@ LL | use foo::{A, B as A};
 help: you can use `as` to change the binding name of the import
    |
 LL | use foo::{A, B as OtherA};
-   |              ^^^^^^^^^^^
+   |              ~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 6b917d5574762205d8f79adb21a4d66e1e9ab228..dfb5810c494c693d734b64fd4ee98e5bac651a5e 100644 (file)
@@ -10,7 +10,7 @@ LL | use std as issue_45829_b;
 help: you can use `as` to change the binding name of the import
    |
 LL | use std as other_issue_45829_b;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 3baad6cd72f3ea8d352d4aa165d4f521806af8ab..5a63af58855419442d2c1c5e37ef95da5935a1d1 100644 (file)
@@ -10,7 +10,7 @@ LL | use foo::{A, bar::B    as    A};
 help: you can use `as` to change the binding name of the import
    |
 LL | use foo::{A, bar::B as OtherA};
-   |              ^^^^^^^^^^^^^^^^
+   |              ~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index ba83eeaa813385925f25ff734bbf3854f549bbd8..2d26b08384e10cbc9bdbf7fb906d75301285bcd9 100644 (file)
@@ -10,7 +10,7 @@ LL | use std::{collections::HashMap as A, sync::Arc as A};
 help: you can use `as` to change the binding name of the import
    |
 LL | use std::{collections::HashMap as A, sync::Arc as OtherA};
-   |                                      ^^^^^^^^^^^^^^^^^^^
+   |                                      ~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 8f12d92d6fbe982076ed1962b0fb1b9202c38b3b..ed185ae2a44636fe2d2ce6ec3be5ce883f655aaa 100644 (file)
@@ -10,7 +10,7 @@ LL | use std as core;
 help: you can use `as` to change the binding name of the import
    |
 LL | use std as other_core;
-   |     ^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 6e6e42ddc2d093d705f97c8a3feb75e5c31edeed..7bb1301edf264806ba2eb47a244ff237c6f5b12d 100644 (file)
@@ -98,7 +98,7 @@ LL | use issue_52891::b::inner;
 help: you can use `as` to change the binding name of the import
    |
 LL | use issue_52891::b::inner as other_inner;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0254]: the name `issue_52891` is defined multiple times
   --> $DIR/issue-52891.rs:31:19
index f266e908ecc3f8f3398e5b461b35a9bfbe8b7c76..c2cfc0939d6b3a11d370f67e79fe26f45a2f6e78 100644 (file)
@@ -7,8 +7,9 @@ LL |     use issue_59764::foo::{baz, makro};
    = 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}};
-   |                      ^^^^^^^^^       --^^
+LL -     use issue_59764::foo::{baz, makro};
+LL +     use issue_59764::{makro, foo::{baz}};
+   | 
 
 error[E0432]: unresolved import `issue_59764::foo::makro`
   --> $DIR/issue-59764.rs:21:9
@@ -19,10 +20,10 @@ LL |         makro,
    = 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 ~     use issue_59764::{makro, foo::{
 LL |         baz,
-LL |
-LL |     }};
+LL ~
+LL ~     }};
    |
 
 error[E0432]: unresolved import `issue_59764::foo::makro`
@@ -34,10 +35,10 @@ LL |         makro
    = 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 ~     use issue_59764::{makro, foo::{
 LL |         baz,
-LL |
-LL |     }};
+LL ~
+LL ~     }};
    |
 
 error[E0432]: unresolved import `issue_59764::foo::makro`
@@ -49,8 +50,9 @@ LL |     use issue_59764::foo::{baz, makro, foobar};
    = 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}};
-   |                      ^^^^^^^^^         --      ^^
+LL -     use issue_59764::foo::{baz, makro, foobar};
+LL +     use issue_59764::{makro, foo::{baz, foobar}};
+   | 
 
 error[E0432]: unresolved import `issue_59764::foo::makro`
   --> $DIR/issue-59764.rs:40:9
@@ -61,11 +63,11 @@ LL |         makro,
    = 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 ~     use issue_59764::{makro, foo::{
 LL |         baz,
-LL |
+LL ~
 LL |         foobar,
-LL |     }};
+LL ~     }};
    |
 
 error[E0432]: unresolved import `issue_59764::foo::makro`
@@ -77,11 +79,11 @@ LL |         makro,
    = 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 ~     use issue_59764::{makro, foo::{
 LL |         baz,
-LL |
+LL ~
 LL |         foobar
-LL |     }};
+LL ~     }};
    |
 
 error[E0432]: unresolved import `issue_59764::foo::makro`
@@ -93,8 +95,9 @@ LL |     use issue_59764::{foobaz, foo::makro};
    = 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};
-   |                      ^^^^^^^      --
+LL -     use issue_59764::{foobaz, foo::makro};
+LL +     use issue_59764::{makro, foobaz};
+   | 
 
 error[E0432]: unresolved import `issue_59764::foo::makro`
   --> $DIR/issue-59764.rs:59:42
@@ -105,8 +108,9 @@ LL |     use issue_59764::{foobaz, foo::{baz, makro}};
    = 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}};
-   |                      ^^^^^^^                 --
+LL -     use issue_59764::{foobaz, foo::{baz, makro}};
+LL +     use issue_59764::{makro, foobaz, foo::{baz}};
+   | 
 
 error[E0432]: unresolved import `issue_59764::foo::makro`
   --> $DIR/issue-59764.rs:68:13
@@ -117,11 +121,11 @@ LL |             makro,
    = 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 ~     use issue_59764::{makro, 
 LL |         foobaz,
 LL |         foo::{
 LL |             baz,
-LL |
+LL ~
    |
 
 error[E0432]: unresolved import `issue_59764::foo::makro`
@@ -133,11 +137,11 @@ LL |             makro
    = 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 ~     use issue_59764::{makro, 
 LL |         foobaz,
 LL |         foo::{
 LL |             baz,
-LL |
+LL ~
    |
 
 error[E0432]: unresolved import `issue_59764::foo::makro`
@@ -149,8 +153,9 @@ LL |     use issue_59764::{foobaz, foo::{baz, makro, barbaz::{barfoo}}};
    = 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}}};
-   |                      ^^^^^^^                   --
+LL -     use issue_59764::{foobaz, foo::{baz, makro, barbaz::{barfoo}}};
+LL +     use issue_59764::{makro, foobaz, foo::{baz, barbaz::{barfoo}}};
+   | 
 
 error[E0432]: unresolved import `issue_59764::foo::makro`
   --> $DIR/issue-59764.rs:93:13
@@ -161,11 +166,11 @@ LL |             makro,
    = 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 ~     use issue_59764::{makro, 
 LL |         foobaz,
 LL |         foo::{
 LL |             baz,
-LL |
+LL ~
    |
 
 error[E0432]: unresolved import `issue_59764::foo::makro`
@@ -178,7 +183,7 @@ LL |     use issue_59764::foo::makro as baz;
 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
@@ -189,8 +194,9 @@ LL |     use issue_59764::foo::{baz, makro as foobar};
    = 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}};
-   |                      ^^^^^^^^^^^^^^^^^^^       --^^
+LL -     use issue_59764::foo::{baz, makro as foobar};
+LL +     use issue_59764::{makro as foobar, foo::{baz}};
+   | 
 
 error[E0432]: unresolved import `issue_59764::foo::makro`
   --> $DIR/issue-59764.rs:120:17
@@ -201,12 +207,12 @@ LL |                 makro as foobar}
    = 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 ~         issue_59764::{makro as foobar, 
 LL | 
 LL |             foobaz,
 LL | 
 LL | 
-LL |             foo::{baz}
+LL ~             foo::{baz}
    |
 
 error[E0432]: unresolved import `issue_59764::foo::makro`
@@ -219,7 +225,7 @@ LL | use issue_59764::foo::makro;
 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
index 4ce639454640a74d535b5bfa5337db60bd604e3e..ab44f067fe7448186eb9c51530e53e6c022bc0cc 100644 (file)
@@ -10,7 +10,7 @@ LL |     mod bar {}
 help: you can use `as` to change the binding name of the import
    |
 LL |     use baz::bar as other_bar;
-   |         ^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index f2a4150632d2f8ad477e3501c940bd17fda67ce8..20369a543b3ae02256e5c3bffa1ad5d131b294ef 100644 (file)
@@ -7,7 +7,7 @@ LL | struct Heartbreak(Betrayal);
 help: consider introducing a named lifetime parameter
    |
 LL | struct Heartbreak<'a>(Betrayal<'a>);
-   |                  ^^^^ ^^^^^^^^^^^^
+   |                  ++++ ~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index a43b49041ec2aa4fc0cb391cf3ebc305b9d33a3e..5f0de61e69d29177e49267eebddf3a6094182b6b 100644 (file)
@@ -16,11 +16,11 @@ LL |     let y: fn(&'test u32) = foo2;
 help: consider introducing lifetime `'test` here
    |
 LL | fn bar<'test>() {
-   |       ^^^^^^^
+   |       +++++++
 help: consider making the type lifetime-generic with a new `'test` lifetime
    |
 LL |     let y: for<'test> fn(&'test u32) = foo2;
-   |            ^^^^^^^^^^
+   |            ++++++++++
 
 error: aborting due to 2 previous errors
 
index 3152dec30a0e6cf4b613b5387f394bd591ccc515..1bcb89de2bad4ad1f21e583334f9729d7f9a4895 100644 (file)
@@ -16,7 +16,7 @@ LL |     bar::<isize>(i);  // i should not be re-coerced back to an isize
 help: you can convert a `usize` to an `isize` and panic if the converted value doesn't fit
    |
 LL |     bar::<isize>(i.try_into().unwrap());  // i should not be re-coerced back to an isize
-   |                  ^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 2 previous errors
 
index e055d1a94ffe98c06356c90581dcad1fbc4c626a..f8026fafeb2c4db7ed39c95508d8bcf88f833d8a 100644 (file)
@@ -7,7 +7,7 @@ LL |         Ok(b)
 help: give this closure an explicit return type without `_` placeholders
    |
 LL |     let x = |a: (), b: ()| -> Result<(), _> {
-   |                            ^^^^^^^^^^^^^^^^
+   |                            ++++++++++++++++
 
 error: aborting due to previous error
 
index c394f6efbda9b3527671d1ecfbd51d040f092a74..3542eb6848caf23863446267634a03dbd9f10791 100644 (file)
@@ -7,7 +7,7 @@ LL |         infallible()?;
 help: give this closure an explicit return type without `_` placeholders
    |
 LL |     let x = || -> Result<(), QualifiedError<_>> {
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 0dd4baf80db60aa8a2b9fb1308ee0ec4a9d16dfb..4ddede29c85550457a1a5c9bc4909dd0c9c12c4a 100644 (file)
@@ -9,11 +9,11 @@ LL |     assert_eq!('x'.ipu_flatten(), 0);
 help: disambiguate the associated function for candidate #1
    |
 LL |     assert_eq!(IpuIterator::ipu_flatten(&'x'), 0);
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 help: disambiguate the associated function for candidate #2
    |
 LL |     assert_eq!(IpuItertools::ipu_flatten(&'x'), 0);
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 957ab2a754882af05329a5ac66450ccdef439d93..cbefbf83be0a24da6a88ef87fc33a20e637c1d38 100644 (file)
@@ -7,7 +7,7 @@ LL |         x = box x;
 help: try using a conversion method
    |
 LL |         x = (box x).to_string();
-   |             ^     ^^^^^^^^^^^^^
+   |             +     +++++++++++++
 
 error[E0055]: reached the recursion limit while auto-dereferencing `Foo`
   --> $DIR/infinite-autoderef.rs:25:5
index d180670e38fda7a8ba7d17384f342458ab7290e5..7ffb51061b7ddef30788e74da7c96cae47c0ede2 100644 (file)
@@ -10,7 +10,7 @@ LL | struct Take(Take);
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Take` representable
    |
 LL | struct Take(Box<Take>);
-   |             ^^^^    ^
+   |             ++++    +
 
 error[E0391]: cycle detected when computing drop-check constraints for `Take`
   --> $DIR/infinite-struct.rs:1:1
index 45322ea96721d8be3701049615f8019961a0a9f1..1f147e070b4d10cec588ac6d3b3dd92e208d49aa 100644 (file)
@@ -9,7 +9,7 @@ LL | enum MList { Cons(isize, MList), Nil }
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `MList` representable
    |
 LL | enum MList { Cons(isize, Box<MList>), Nil }
-   |                          ^^^^     ^
+   |                          ++++     +
 
 error[E0391]: cycle detected when computing drop-check constraints for `MList`
   --> $DIR/infinite-tag-type-recursion.rs:1:1
index bfb47515823a3c4a9caf61d3ffce1efe66d21888..c9cfbc506be46c5199dea97b091f3851e304bec6 100644 (file)
@@ -7,7 +7,7 @@ LL |     id_i8(a16);
 help: you can convert an `i16` to an `i8` and panic if the converted value doesn't fit
    |
 LL |     id_i8(a16.try_into().unwrap());
-   |           ^^^^^^^^^^^^^^^^^^^^^^^
+   |           ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:41:11
@@ -18,7 +18,7 @@ LL |     id_i8(a32);
 help: you can convert an `i32` to an `i8` and panic if the converted value doesn't fit
    |
 LL |     id_i8(a32.try_into().unwrap());
-   |           ^^^^^^^^^^^^^^^^^^^^^^^
+   |           ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:44:11
@@ -29,7 +29,7 @@ LL |     id_i8(a64);
 help: you can convert an `i64` to an `i8` and panic if the converted value doesn't fit
    |
 LL |     id_i8(a64.try_into().unwrap());
-   |           ^^^^^^^^^^^^^^^^^^^^^^^
+   |           ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:47:11
@@ -40,7 +40,7 @@ LL |     id_i8(asize);
 help: you can convert an `isize` to an `i8` and panic if the converted value doesn't fit
    |
 LL |     id_i8(asize.try_into().unwrap());
-   |           ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |           ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:51:12
@@ -60,7 +60,7 @@ LL |     id_i16(a32);
 help: you can convert an `i32` to an `i16` and panic if the converted value doesn't fit
    |
 LL |     id_i16(a32.try_into().unwrap());
-   |            ^^^^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:58:12
@@ -71,7 +71,7 @@ LL |     id_i16(a64);
 help: you can convert an `i64` to an `i16` and panic if the converted value doesn't fit
    |
 LL |     id_i16(a64.try_into().unwrap());
-   |            ^^^^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:61:12
@@ -82,7 +82,7 @@ LL |     id_i16(asize);
 help: you can convert an `isize` to an `i16` and panic if the converted value doesn't fit
    |
 LL |     id_i16(asize.try_into().unwrap());
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:65:12
@@ -111,7 +111,7 @@ LL |     id_i32(a64);
 help: you can convert an `i64` to an `i32` and panic if the converted value doesn't fit
    |
 LL |     id_i32(a64.try_into().unwrap());
-   |            ^^^^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:75:12
@@ -122,7 +122,7 @@ LL |     id_i32(asize);
 help: you can convert an `isize` to an `i32` and panic if the converted value doesn't fit
    |
 LL |     id_i32(asize.try_into().unwrap());
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:79:12
@@ -160,7 +160,7 @@ LL |     id_i64(asize);
 help: you can convert an `isize` to an `i64` and panic if the converted value doesn't fit
    |
 LL |     id_i64(asize.try_into().unwrap());
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:93:14
@@ -189,7 +189,7 @@ LL |     id_isize(a32);
 help: you can convert an `i32` to an `isize` and panic if the converted value doesn't fit
    |
 LL |     id_isize(a32.try_into().unwrap());
-   |              ^^^^^^^^^^^^^^^^^^^^^^^
+   |              ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:102:14
@@ -200,7 +200,7 @@ LL |     id_isize(a64);
 help: you can convert an `i64` to an `isize` and panic if the converted value doesn't fit
    |
 LL |     id_isize(a64.try_into().unwrap());
-   |              ^^^^^^^^^^^^^^^^^^^^^^^
+   |              ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:108:11
@@ -211,7 +211,7 @@ LL |     id_i8(c16);
 help: you can convert an `i16` to an `i8` and panic if the converted value doesn't fit
    |
 LL |     id_i8(c16.try_into().unwrap());
-   |           ^^^^^^^^^^^^^^^^^^^^^^^
+   |           ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:111:11
@@ -222,7 +222,7 @@ LL |     id_i8(c32);
 help: you can convert an `i32` to an `i8` and panic if the converted value doesn't fit
    |
 LL |     id_i8(c32.try_into().unwrap());
-   |           ^^^^^^^^^^^^^^^^^^^^^^^
+   |           ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:114:11
@@ -233,7 +233,7 @@ LL |     id_i8(c64);
 help: you can convert an `i64` to an `i8` and panic if the converted value doesn't fit
    |
 LL |     id_i8(c64.try_into().unwrap());
-   |           ^^^^^^^^^^^^^^^^^^^^^^^
+   |           ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:118:12
@@ -253,7 +253,7 @@ LL |     id_i16(c32);
 help: you can convert an `i32` to an `i16` and panic if the converted value doesn't fit
    |
 LL |     id_i16(c32.try_into().unwrap());
-   |            ^^^^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:125:12
@@ -264,7 +264,7 @@ LL |     id_i16(c64);
 help: you can convert an `i64` to an `i16` and panic if the converted value doesn't fit
    |
 LL |     id_i16(c64.try_into().unwrap());
-   |            ^^^^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:129:12
@@ -293,7 +293,7 @@ LL |     id_i32(c64);
 help: you can convert an `i64` to an `i32` and panic if the converted value doesn't fit
    |
 LL |     id_i32(c64.try_into().unwrap());
-   |            ^^^^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:140:12
@@ -331,7 +331,7 @@ LL |     id_u8(b16);
 help: you can convert a `u16` to a `u8` and panic if the converted value doesn't fit
    |
 LL |     id_u8(b16.try_into().unwrap());
-   |           ^^^^^^^^^^^^^^^^^^^^^^^
+   |           ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:155:11
@@ -342,7 +342,7 @@ LL |     id_u8(b32);
 help: you can convert a `u32` to a `u8` and panic if the converted value doesn't fit
    |
 LL |     id_u8(b32.try_into().unwrap());
-   |           ^^^^^^^^^^^^^^^^^^^^^^^
+   |           ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:158:11
@@ -353,7 +353,7 @@ LL |     id_u8(b64);
 help: you can convert a `u64` to a `u8` and panic if the converted value doesn't fit
    |
 LL |     id_u8(b64.try_into().unwrap());
-   |           ^^^^^^^^^^^^^^^^^^^^^^^
+   |           ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:161:11
@@ -364,7 +364,7 @@ LL |     id_u8(bsize);
 help: you can convert a `usize` to a `u8` and panic if the converted value doesn't fit
    |
 LL |     id_u8(bsize.try_into().unwrap());
-   |           ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |           ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:165:12
@@ -384,7 +384,7 @@ LL |     id_u16(b32);
 help: you can convert a `u32` to a `u16` and panic if the converted value doesn't fit
    |
 LL |     id_u16(b32.try_into().unwrap());
-   |            ^^^^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:172:12
@@ -395,7 +395,7 @@ LL |     id_u16(b64);
 help: you can convert a `u64` to a `u16` and panic if the converted value doesn't fit
    |
 LL |     id_u16(b64.try_into().unwrap());
-   |            ^^^^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:175:12
@@ -406,7 +406,7 @@ LL |     id_u16(bsize);
 help: you can convert a `usize` to a `u16` and panic if the converted value doesn't fit
    |
 LL |     id_u16(bsize.try_into().unwrap());
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:179:12
@@ -435,7 +435,7 @@ LL |     id_u32(b64);
 help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
    |
 LL |     id_u32(b64.try_into().unwrap());
-   |            ^^^^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:189:12
@@ -446,7 +446,7 @@ LL |     id_u32(bsize);
 help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
    |
 LL |     id_u32(bsize.try_into().unwrap());
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:193:12
@@ -484,7 +484,7 @@ LL |     id_u64(bsize);
 help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
    |
 LL |     id_u64(bsize.try_into().unwrap());
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:207:14
@@ -513,7 +513,7 @@ LL |     id_usize(b32);
 help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
    |
 LL |     id_usize(b32.try_into().unwrap());
-   |              ^^^^^^^^^^^^^^^^^^^^^^^
+   |              ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:216:14
@@ -524,7 +524,7 @@ LL |     id_usize(b64);
 help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit
    |
 LL |     id_usize(b64.try_into().unwrap());
-   |              ^^^^^^^^^^^^^^^^^^^^^^^
+   |              ~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 52 previous errors
 
index 9d181eab7fbcdf1cd51989d3143f792224b6b557..ee5b81391e97cf420bb565ea3ac0322ec38f8e26 100644 (file)
@@ -61,7 +61,7 @@ LL | impl<'self> Serializable<str> for &'self str {
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | trait Serializable<'self, T: ?Sized> {
-   |                            ^^^^^^^^
+   |                            ++++++++
 
 error: aborting due to 9 previous errors
 
index 115b471e96b465fd6681dfbdd4f6b7a0b414b75b..0796ede52a9ee5667e269d64a76291ca98f3c115 100644 (file)
@@ -7,7 +7,7 @@ LL |     foo(1*(1 as isize));
 help: you can convert an `isize` to an `i16` and panic if the converted value doesn't fit
    |
 LL |     foo((1*(1 as isize)).try_into().unwrap());
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/issue-13359.rs:10:9
@@ -18,7 +18,7 @@ LL |     bar(1*(1 as usize));
 help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
    |
 LL |     bar((1*(1 as usize)).try_into().unwrap());
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 2 previous errors
 
index a231f73d06729bc5dc9d22dfc238c62d08e4d4a3..6521a67428eb260d7b1bc91bfc807223703eed5c 100644 (file)
@@ -8,7 +8,7 @@ LL |     &str
 help: consider using the `'static` lifetime
    |
 LL |     &'static str
-   |     ^^^^^^^^
+   |     ~~~~~~~~
 
 error: aborting due to previous error
 
index 6fc2b99a11a4de3c2ee75c2facdf9279930ead39..a925fc29c8cf02ed494469e525693b105ba31937 100644 (file)
@@ -9,7 +9,7 @@ LL |   let x: u32 = 20i32;
 help: change the type of the numeric literal from `i32` to `u32`
    |
 LL |   let x: u32 = 20u32;
-   |                ^^^^^
+   |                ~~~~~
 
 error: aborting due to previous error
 
index 667ddbca97c1af742064bc6d87e4317f5d825802..92068df6c057008d6e82f93e170eca612186581a 100644 (file)
@@ -7,7 +7,7 @@ LL | fn foo(res : Box<dyn ResponseHook>) { res.get }
 help: use parentheses to call the method
    |
 LL | fn foo(res : Box<dyn ResponseHook>) { res.get() }
-   |                                              ^^
+   |                                              ++
 
 error: aborting due to previous error
 
index 1aa278b450f9f15ed7afc63c08339a545dac68b9..7928b3fba2785fd2105560dd620fcba3316b9464 100644 (file)
@@ -14,7 +14,7 @@ LL |     T: ?Sized,
 help: add missing generic argument
    |
 LL | fn fn1(0: Box<T>) {}
-   |           ^^^^^^
+   |           ~~~~~~
 
 error: aborting due to previous error
 
index 9cf2f09e17747cf9d05a2533fc5b832197894faa..6bf76c4904dcbb6db4791d56bfc5e7591d5dfc85 100644 (file)
@@ -7,7 +7,7 @@ LL |     println!("{}", foo(10i32));
 help: change the type of the numeric literal from `i32` to `u32`
    |
 LL |     println!("{}", foo(10u32));
-   |                        ^^^^^
+   |                        ~~~~~
 
 error: aborting due to previous error
 
index 6decc751321f9abfd3a434d39873dd34af7b6b87..8b09b7d59079fef7be233d69322da245ac4ee643 100644 (file)
@@ -9,7 +9,7 @@ LL |     Box::new(value) as Box<dyn Any>
 help: to declare that the trait object captures data from argument `value`, you can add an explicit `'_` lifetime bound
    |
 LL | fn foo<T: Any>(value: &T) -> Box<dyn Any + '_> {
-   |                                          ^^^^
+   |                                          ++++
 
 error: aborting due to previous error
 
index 58d087ca1998b7900e35b094e94b7d5f9841a5fd..4d739a3823b1073246f1f42a344383617ac3ccb5 100644 (file)
@@ -9,7 +9,7 @@ LL | struct Foo { foo: Option<Option<Foo>> }
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable
    |
 LL | struct Foo { foo: Box<Option<Option<Foo>>> }
-   |                   ^^^^                   ^
+   |                   ++++                   +
 
 error: aborting due to previous error
 
index eba4bf6d1d5eaf2ab9a408bc1e0359fd6801b339..e53134c5238c60ababa8bf516e91cee79777b99c 100644 (file)
@@ -9,7 +9,7 @@ LL | struct Baz { q: Option<Foo> }
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Baz` representable
    |
 LL | struct Baz { q: Box<Option<Foo>> }
-   |                 ^^^^           ^
+   |                 ++++           +
 
 error[E0072]: recursive type `Foo` has infinite size
   --> $DIR/issue-17431-2.rs:4:1
@@ -22,7 +22,7 @@ LL | struct Foo { q: Option<Baz> }
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable
    |
 LL | struct Foo { q: Box<Option<Baz>> }
-   |                 ^^^^           ^
+   |                 ++++           +
 
 error: aborting due to 2 previous errors
 
index f6b15d0528ae8ab605e8ace07f8502461ba27d38..0dde6f382c34a4e3d1bacaa9f99cf1b0b6038df5 100644 (file)
@@ -9,7 +9,7 @@ LL | struct Foo { foo: Mutex<Option<Foo>> }
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable
    |
 LL | struct Foo { foo: Box<Mutex<Option<Foo>>> }
-   |                   ^^^^                  ^
+   |                   ++++                  +
 
 error: aborting due to previous error
 
index aa709e1ad518350eb0ac815ae67f8dba787c8e81..f5aeeec7337115dda48d2dc678b9ec36d523febe 100644 (file)
@@ -9,7 +9,7 @@ LL | struct Foo<T> { foo: Option<Option<Foo<T>>>, marker: marker::PhantomData<T>
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable
    |
 LL | struct Foo<T> { foo: Box<Option<Option<Foo<T>>>>, marker: marker::PhantomData<T> }
-   |                      ^^^^                      ^
+   |                      ++++                      +
 
 error: aborting due to previous error
 
index 1558cffb036b3490fac5b9487a6bc6cbdf77c7dd..a379598c2657c436195c2f849cfe6b485aa6ab7b 100644 (file)
@@ -9,7 +9,7 @@ LL | struct Bar<T> { x: Bar<Foo> , marker: marker::PhantomData<T> }
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Bar` representable
    |
 LL | struct Bar<T> { x: Box<Bar<Foo>> , marker: marker::PhantomData<T> }
-   |                    ^^^^        ^
+   |                    ++++        +
 
 error: aborting due to previous error
 
index f2aa2a79c820030141750f658c73b90df23cc798..fcac420b23845237e9de022898232c5d9bd17c4b 100644 (file)
@@ -9,7 +9,7 @@ LL | enum Foo { X(Mutex<Option<Foo>>) }
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable
    |
 LL | enum Foo { X(Box<Mutex<Option<Foo>>>) }
-   |              ^^^^                  ^
+   |              ++++                  +
 
 error: aborting due to previous error
 
index 684c3089e85ec872695fb5da4845861780b599a3..aeaadaa69175e2a84b46c7a0c66fe1e1330344ea 100644 (file)
@@ -9,7 +9,7 @@ LL | enum Foo { Voo(Option<Option<Foo>>) }
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable
    |
 LL | enum Foo { Voo(Box<Option<Option<Foo>>>) }
-   |                ^^^^                   ^
+   |                ++++                   +
 
 error: aborting due to previous error
 
index 42953bd8d2c2e09a961040a0dd1fff8bdf36af9e..16678c8c8a9028f655b95231e70b1672a0d75574 100644 (file)
@@ -12,11 +12,11 @@ LL | pub enum Result<T, E> {
 help: try using the variant's enum
    |
 LL |     fn new() -> foo::MyEnum {
-   |                 ^^^^^^^^^^^
+   |                 ~~~~~~~~~~~
 help: an enum with a similar name exists
    |
 LL |     fn new() -> Result<MyEnum, String> {
-   |                 ^^^^^^
+   |                 ~~~~~~
 
 error[E0573]: expected type, found variant `Result`
   --> $DIR/issue-17546.rs:24:17
@@ -66,11 +66,11 @@ LL | pub enum Result<T, E> {
 help: try using the variant's enum
    |
 LL | fn newer() -> foo::MyEnum {
-   |               ^^^^^^^^^^^
+   |               ~~~~~~~~~~~
 help: an enum with a similar name exists
    |
 LL | fn newer() -> Result<foo::MyEnum, String> {
-   |               ^^^^^^
+   |               ~~~~~~
 
 error: aborting due to 4 previous errors
 
index 7df86d7326bc6e073174039742b091800a8f0078..baab675834fca5ccc950f8d9c64dc138aa20cdea 100644 (file)
@@ -7,7 +7,7 @@ LL |         MyOption::MySome { x: 42 } => (),
 help: use the tuple variant pattern syntax instead
    |
 LL |         MyOption::MySome(42) => (),
-   |                         ^^^^
+   |                         ~~~~
 
 error: aborting due to previous error
 
index 11c8cfdcf66a5ff2f4bb8bf58b3825d77d598d5f..939cf0292534ceddea227662963cbae38626e030 100644 (file)
@@ -2,10 +2,7 @@ error[E0034]: multiple applicable items in scope
   --> $DIR/issue-18446.rs:18:7
    |
 LL |     x.foo();
-   |     --^^^--
-   |     | |
-   |     | multiple `foo` found
-   |     help: disambiguate the associated function for candidate #2: `T::foo(&x)`
+   |       ^^^ multiple `foo` found
    |
 note: candidate #1 is defined in an impl for the type `(dyn T + 'a)`
   --> $DIR/issue-18446.rs:9:5
@@ -17,6 +14,10 @@ note: candidate #2 is defined in the trait `T`
    |
 LL |     fn foo(&self);
    |     ^^^^^^^^^^^^^^
+help: disambiguate the associated function for candidate #2
+   |
+LL |     T::foo(&x);
+   |     ~~~~~~~~~~
 
 error: aborting due to previous error
 
index 4400b6179c6f8ad782b870d846de1618226cc6e1..b2aeb5edf29e2b9c81dd8f5fac46b6abd48cf86c 100644 (file)
@@ -14,11 +14,11 @@ LL |   fn qiz();
 help: consider turning `qiz` into a method by giving it a `&self` argument
    |
 LL |   fn qiz(&self);
-   |          ^^^^^
+   |          +++++
 help: alternatively, consider constraining `qiz` so it does not apply to trait objects
    |
 LL |   fn qiz() where Self: Sized;
-   |            ^^^^^^^^^^^^^^^^^
+   |            +++++++++++++++++
 
 error: aborting due to previous error
 
index 337f2f971ede0b8235e38c10c5a290a63d62d679..c3e5fcdd63b55724a0545baeb49462780acbcf3b 100644 (file)
@@ -9,11 +9,11 @@ LL | type Foo = fn(&u8, &u8) -> &u8;
 help: consider making the type lifetime-generic with a new `'a` lifetime
    |
 LL | type Foo = for<'a> fn(&'a u8, &'a u8) -> &'a u8;
-   |            ^^^^^^^    ^^^^^^  ^^^^^^     ^^^
+   |            +++++++    ~~~~~~  ~~~~~~     ~~~
 help: consider introducing a named lifetime parameter
    |
 LL | type Foo<'a> = fn(&'a u8, &'a u8) -> &'a u8;
-   |         ^^^^      ^^^^^^  ^^^^^^     ^^^
+   |         ++++      ~~~~~~  ~~~~~~     ~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/issue-19707.rs:5:27
@@ -26,11 +26,11 @@ LL | fn bar<F: Fn(&u8, &u8) -> &u8>(f: &F) {}
 help: consider making the bound lifetime-generic with a new `'a` lifetime
    |
 LL | fn bar<F: for<'a> Fn(&'a u8, &'a u8) -> &'a u8>(f: &F) {}
-   |           ^^^^^^^    ^^^^^^  ^^^^^^     ^^^
+   |           +++++++    ~~~~~~  ~~~~~~     ~~~
 help: consider introducing a named lifetime parameter
    |
 LL | fn bar<'a, F: Fn(&'a u8, &'a u8) -> &'a u8>(f: &F) {}
-   |        ^^^       ^^^^^^  ^^^^^^     ^^^
+   |        +++       ~~~~~~  ~~~~~~     ~~~
 
 error: aborting due to 2 previous errors
 
index 27e5c606a64a408179d7f68b35eea1886dd77b65..4b5768d1291ac01031ff0bfc3f187d650583457f 100644 (file)
@@ -10,7 +10,7 @@ LL | impl<T> Trait2 for Foo<T> {}
 help: consider restricting type parameter `T`
    |
 LL | impl<T: Bound> Trait2 for Foo<T> {}
-   |       ^^^^^^^
+   |       +++++++
 
 error: aborting due to previous error
 
index 0497bd20469a0e6bddaea19c5f4c408773890ca4..67f6b3081bb3042603362155ebce71f855f7bace 100644 (file)
@@ -1,8 +1,8 @@
 error[E0275]: overflow evaluating the requirement `<FooStruct as Foo>::A == _`
-  --> $DIR/issue-21946.rs:8:5
+  --> $DIR/issue-21946.rs:8:14
    |
 LL |     type A = <FooStruct as Foo>::A;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |              ^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index f90e89efb4a8cf3e0dde4495f4cfb97ffd30e2e2..b594e8b7a1eed77f34a8fdb6ea929abdb6f398ba 100644 (file)
@@ -7,7 +7,7 @@ LL |     0 as &dyn std::any::Any;
 help: consider borrowing the value
    |
 LL |     &0 as &dyn std::any::Any;
-   |     ^
+   |     +
 
 error: aborting due to previous error
 
index 47ee544c02af796827c3e0bca29dd2ae8d65527a..da15c092fc3118f1239676d513312fc9e646d102 100644 (file)
@@ -7,7 +7,7 @@ LL |         let indexer = &(*self as &dyn Index<usize, Output = <Self as Index<
 help: consider borrowing the value
    |
 LL |         let indexer = &(&*self as &dyn Index<usize, Output = <Self as Index<usize>>::Output>);
-   |                         ^
+   |                         +
 
 error: aborting due to previous error
 
index 99ff9ac0a0d5891b1dbb6a8af644b9d6ee84c336..6bec98121b759f331a11a547605343e7b37a0b9e 100644 (file)
@@ -9,7 +9,7 @@ LL |     println!("{}", a as usize < long_name);
 help: try comparing the cast value
    |
 LL |     println!("{}", (a as usize) < long_name);
-   |                    ^          ^
+   |                    +          +
 
 error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
   --> $DIR/issue-22644.rs:9:33
@@ -22,7 +22,7 @@ LL |     println!("{}{}", a as usize < long_name, long_name);
 help: try comparing the cast value
    |
 LL |     println!("{}{}", (a as usize) < long_name, long_name);
-   |                      ^          ^
+   |                      +          +
 
 error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
   --> $DIR/issue-22644.rs:11:31
@@ -35,7 +35,7 @@ LL |     println!("{}", a as usize < 4);
 help: try comparing the cast value
    |
 LL |     println!("{}", (a as usize) < 4);
-   |                    ^          ^
+   |                    +          +
 
 error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
   --> $DIR/issue-22644.rs:13:31
@@ -48,7 +48,7 @@ LL |     println!("{}{}", a: usize < long_name, long_name);
 help: try comparing the cast value
    |
 LL |     println!("{}{}", (a: usize) < long_name, long_name);
-   |                      ^        ^
+   |                      +        +
 
 error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
   --> $DIR/issue-22644.rs:15:29
@@ -61,7 +61,7 @@ LL |     println!("{}", a: usize < 4);
 help: try comparing the cast value
    |
 LL |     println!("{}", (a: usize) < 4);
-   |                    ^        ^
+   |                    +        +
 
 error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
   --> $DIR/issue-22644.rs:20:20
@@ -73,9 +73,9 @@ LL |                    4);
    |
 help: try comparing the cast value
    |
-LL |     println!("{}", (a
+LL ~     println!("{}", (a
 LL |                    as
-LL |                    usize)
+LL ~                    usize)
    |
 
 error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
@@ -88,7 +88,7 @@ LL |                    5);
    |
 help: try comparing the cast value
    |
-LL |     println!("{}", (a
+LL ~     println!("{}", (a
 LL | 
 LL | 
 LL |                    as
@@ -107,7 +107,7 @@ LL |     println!("{}", a as usize << long_name);
 help: try shifting the cast value
    |
 LL |     println!("{}", (a as usize) << long_name);
-   |                    ^          ^
+   |                    +          +
 
 error: expected type, found `4`
   --> $DIR/issue-22644.rs:34:28
index fd3db9546991c019c6263ec7d47d036577ae7141..cd96646d751f20a607346526e8841483f1bb4243 100644 (file)
@@ -14,7 +14,7 @@ LL | impl<'b, P> Wrap<'b> for Wrapper<P>
 help: consider further restricting the associated type
    |
 LL | fn push_process<P>(process: P) where P: Process<'static>, <P as Process<'_>>::Item: Iterator {
-   |                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                                         ++++++++++++++++++++++++++++++++++++
 
 error: aborting due to previous error
 
index 5d7ffeb0deb0ef5e968967fb83f6249f8b18f177..7a4d90b4412f9a3d6cf56e8ae9ec579dd22f154e 100644 (file)
@@ -21,7 +21,7 @@ LL | pub trait Fn<Args>: FnMut<Args> {
 help: add missing generic argument
    |
 LL |     println!("{:?}",(vfnfer[0] as dyn Fn<Args>)(3));
-   |                                       ^^^^^^^^
+   |                                       ~~~~~~~~
 
 error[E0191]: the value of the associated type `Output` (from trait `FnOnce`) must be specified
   --> $DIR/issue-23024.rs:9:39
index 8613c1ef8c201e2982293d726029bb64e5fe9ea8..0b568b30e08d8dab9e7e3c6e25dc835746f4c4f0 100644 (file)
@@ -1,8 +1,8 @@
 error[E0275]: overflow evaluating the requirement `<GetNext<T> as Next>::Next == _`
-  --> $DIR/issue-23122-1.rs:10:5
+  --> $DIR/issue-23122-1.rs:10:17
    |
 LL |     type Next = <GetNext<T> as Next>::Next;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 5008a499986d43510a3c1ff8e11c51af82a6b31f..68a95dc265e821bc155fd880e1d0405336f16f89 100644 (file)
@@ -1,8 +1,8 @@
 error[E0275]: overflow evaluating the requirement `<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<T as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next: Sized`
-  --> $DIR/issue-23122-2.rs:9:5
+  --> $DIR/issue-23122-2.rs:9:17
    |
 LL |     type Next = <GetNext<T::Next> as Next>::Next;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`issue_23122_2`)
 note: required because of the requirements on the impl of `Next` for `GetNext<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<T as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next>`
index 8e95b2ff688875a88e9451f7b7034b731446973e..d7134bff17618077df56b0adcc713ef7724f69db 100644 (file)
@@ -7,7 +7,7 @@ LL |     let v = s.len;
 help: a method `len` also exists, call it with parentheses
    |
 LL |     let v = s.len();
-   |                  ^^
+   |                  ++
 
 error[E0616]: field `len` of struct `S` is private
   --> $DIR/issue-26472.rs:12:7
index 3df58d66d1f8e34a94edd61b741c60260dd99c68..5784ca9d77f0e5857fa7a9177e077ad7338406b6 100644 (file)
@@ -8,7 +8,7 @@ LL | fn parse_type(iter: Box<dyn Iterator<Item=&str>+'static>) -> &str { iter.ne
 help: consider introducing a named lifetime parameter
    |
 LL | fn parse_type<'a>(iter: Box<dyn Iterator<Item=&str>+'static>) -> &'a str { iter.next() }
-   |              ^^^^                                                ^^^
+   |              ++++                                                ~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/issue-26638.rs:4:40
@@ -20,7 +20,7 @@ LL | fn parse_type_2(iter: fn(&u8)->&u8) -> &str { iter() }
 help: consider using the `'static` lifetime
    |
 LL | fn parse_type_2(iter: fn(&u8)->&u8) -> &'static str { iter() }
-   |                                        ^^^^^^^^
+   |                                        ~~~~~~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/issue-26638.rs:7:22
@@ -32,7 +32,7 @@ LL | fn parse_type_3() -> &str { unimplemented!() }
 help: consider using the `'static` lifetime
    |
 LL | fn parse_type_3() -> &'static str { unimplemented!() }
-   |                      ^^^^^^^^
+   |                      ~~~~~~~~
 
 error: aborting due to 3 previous errors
 
index 021a08696de2cc831035935513c6c7656323d871..98cec1bfe9d990693e226cb734e6174afd9789f3 100644 (file)
@@ -8,11 +8,11 @@ LL |     fn foo(self) -> &'static i32 {
 help: consider further restricting `Self`
    |
 LL |     fn foo(self) -> &'static i32 where Self: Sized {
-   |                                  ^^^^^^^^^^^^^^^^^
+   |                                  +++++++++++++++++
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL |     fn foo(&self) -> &'static i32 {
-   |            ^
+   |            +
 
 error: aborting due to previous error
 
index 5c6c99a1ff2526dd5295e797f1059cb3f0d901aa..4aec27f9684f995b699f5642efe61370a5c31f2c 100644 (file)
@@ -10,7 +10,7 @@ LL |     pub struct Pong(SendPacket<Ping>);
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Pong` representable
    |
 LL |     pub struct Pong(Box<SendPacket<Ping>>);
-   |                     ^^^^                ^
+   |                     ++++                +
 
 error: aborting due to previous error
 
index b66dcb88d00625adcb17534f04743d7a578fb3c5..53addf2fe4d09caf452607e77921426d5d446b29 100644 (file)
@@ -13,7 +13,7 @@ LL |     let _ = |x: f64| x * 2.0.exp();
 help: you must specify a concrete type for this numeric value, like `f32`
    |
 LL |     let _ = |x: f64| x * 2.0_f32.exp();
-   |                          ^^^^^^^
+   |                          ~~~~~~~
 
 error: aborting due to 2 previous errors
 
index b08fe8c7352a9e9d6999e38b892344ff9bbfcb4f..455d32e233ab9c15061f51a4d853404a5c7757ca 100644 (file)
@@ -7,7 +7,7 @@ LL |     let _q: &isize = p as &isize;
 help: consider borrowing the value
    |
 LL |     let _q: &isize = &*p as &isize;
-   |                      ^^
+   |                      ++
 
 error: aborting due to previous error
 
index 87ee36df21696e3b51fa3b18db910ed106b7f89e..e49d8e6aa0d8ed4544ca65f5fa9a97c1db6426b3 100644 (file)
@@ -10,7 +10,7 @@ LL |     BarSome(Bar)
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Bar` representable
    |
 LL |     BarSome(Box<Bar>)
-   |             ^^^^   ^
+   |             ++++   +
 
 error: aborting due to previous error
 
index 369a19d37e6f6450679ba38e959871a709b6eb11..b3ce6e42096bba4412f66749e789156d10174875 100644 (file)
@@ -9,7 +9,7 @@ LL | struct Bar { x: Bar }
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Bar` representable
    |
 LL | struct Bar { x: Box<Bar> }
-   |                 ^^^^   ^
+   |                 ++++   +
 
 error: aborting due to previous error
 
index 0b162eff94a7cb251fe529dc44c105387e7107d9..c1c043e217b4e2056c2bf2e766095cf0e5e08563 100644 (file)
@@ -9,7 +9,7 @@ LL | enum E2<T> { V2(E2<E1>, marker::PhantomData<T>), }
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `E2` representable
    |
 LL | enum E2<T> { V2(Box<E2<E1>>, marker::PhantomData<T>), }
-   |                 ^^^^      ^
+   |                 ++++      +
 
 error: aborting due to previous error
 
index ab43d4a3c6002cfd7a497b9a4a4b2f975042cfdb..390aa31487a879c4e749cc0d6fe955b4039a43a0 100644 (file)
@@ -8,7 +8,7 @@ LL | fn f(a: &S, b: i32) -> &i32 {
 help: consider introducing a named lifetime parameter
    |
 LL | fn f<'a>(a: &'a S, b: i32) -> &'a i32 {
-   |     ^^^^    ^^^^^             ^^^
+   |     ++++    ~~~~~             ~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/issue-30255.rs:14:34
@@ -20,7 +20,7 @@ LL | fn g(a: &S, b: bool, c: &i32) -> &i32 {
 help: consider introducing a named lifetime parameter
    |
 LL | fn g<'a>(a: &'a S, b: bool, c: &'a i32) -> &'a i32 {
-   |     ^^^^    ^^^^^              ^^^^^^^     ^^^
+   |     ++++    ~~~~~              ~~~~~~~     ~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/issue-30255.rs:19:44
@@ -32,7 +32,7 @@ LL | fn h(a: &bool, b: bool, c: &S, d: &i32) -> &i32 {
 help: consider introducing a named lifetime parameter
    |
 LL | fn h<'a>(a: &'a bool, b: bool, c: &'a S, d: &'a i32) -> &'a i32 {
-   |     ^^^^    ^^^^^^^^              ^^^^^     ^^^^^^^     ^^^
+   |     ++++    ~~~~~~~~              ~~~~~     ~~~~~~~     ~~~
 
 error: aborting due to 3 previous errors
 
index bf125a8942edf904636de5c92da05a30865db05a..2d2ed5a63015bb5e468909ffb51db7eb56d6fc4f 100644 (file)
@@ -12,11 +12,11 @@ LL |         Foo::Bar => {}
 help: use the tuple variant pattern syntax instead
    |
 LL |         Foo::Bar(_) => {}
-   |         ^^^^^^^^^^^
+   |         ~~~~~~~~~~~
 help: a unit variant with a similar name exists
    |
 LL |         Foo::Baz => {}
-   |              ^^^
+   |              ~~~
 
 error[E0532]: expected tuple struct or tuple variant, found unit struct `S`
   --> $DIR/issue-32004.rs:16:9
index b3362ae44b63798c8a91ad100547067527372b8a..10b0c0967c1e83740d9981177b2631a4d38c9858 100644 (file)
@@ -11,7 +11,7 @@ LL |     let _: *const u8 = &a;
 help: consider dereferencing
    |
 LL |     let _: *const u8 = &*a;
-   |                         ^
+   |                         +
 
 error: aborting due to previous error
 
index bcf71638127e043b3fbabe1ad4a4a7d972e3e674..5c3dade8e20c5b2b5c037998bda5910b0bf98c26 100644 (file)
@@ -11,7 +11,7 @@ LL |     let _: *const u8 = &a;
 help: consider dereferencing
    |
 LL |     let _: *const u8 = &***a;
-   |                         ^^^
+   |                         +++
 
 error: aborting due to previous error
 
index 369f56b9869a334755e72c442b6f67e11b63932a..8212c607e1126795d6c2cb27c1b995c54f1de996 100644 (file)
@@ -11,7 +11,7 @@ LL | pub fn f<'a, T: Tr<'a>>() -> <T as Tr<'a>>::Out {}
 help: consider constraining the associated type `<T as Tr<'a>>::Out` to `()`
    |
 LL | pub fn f<'a, T: Tr<'a, Out = ()>>() -> <T as Tr<'a>>::Out {}
-   |                      ^^^^^^^^^^
+   |                      ++++++++++
 
 error: aborting due to previous error
 
index 0f3d3690b732ea1bf1d3660b2bd441f02caae636..cea765850564ff14c49ed45b85182695dbadb4f1 100644 (file)
@@ -11,7 +11,7 @@ LL |     Plus(Expr, Expr),
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Expr` representable
    |
 LL |     Plus(Box<Expr>, Box<Expr>),
-   |          ^^^^    ^  ^^^^    ^
+   |          ++++    +  ++++    +
 
 error: aborting due to previous error
 
index b14faff8f7b8d52cb07535df2a36698e4194d47c..045819061c1b044e196240b28e544f1eb0e86c1d 100644 (file)
@@ -21,7 +21,7 @@ LL |     fn zero(self) -> Self;
 help: consider further restricting this bound
    |
 LL |     pub fn baz<T: Foo + Copy>(x: T) -> T {
-   |                       ^^^^^^
+   |                       ++++++
 
 error: aborting due to previous error
 
index 85acbfb8de4be9106c4ac73c2e57d41452ab17bc..08bdaa728583d5ff2435b5063f3f794964678125 100644 (file)
@@ -7,7 +7,7 @@ LL |     inner: Foo<T>
 help: there is an enum variant `Baz::Foo`; try using the variant's enum
    |
 LL |     inner: Baz
-   |            ^^^
+   |            ~~~
 
 error[E0412]: cannot find type `Foo` in this scope
   --> $DIR/issue-35075.rs:6:9
@@ -18,7 +18,7 @@ LL |     Foo(Foo<T>)
 help: there is an enum variant `Baz::Foo`; try using the variant's enum
    |
 LL |     Foo(Baz)
-   |         ^^^
+   |         ~~~
 
 error: aborting due to 2 previous errors
 
index b6045c993a9585f14d5ecb30cbf47e6ca88df249..4e89f59afbe426784cae90b43ab82679c757edec 100644 (file)
@@ -14,7 +14,7 @@ LL | fn test() -> Foo { Foo }
 help: use parentheses to instantiate this tuple struct
    |
 LL | fn test() -> Foo { Foo(_) }
-   |                       ^^^
+   |                       +++
 
 error: aborting due to previous error
 
index 81a2bb88c89a38a9a196e82dfb4816af85feef66..04faea9008a11b5ab15ea9131336d1bded9ced7a 100644 (file)
@@ -9,7 +9,7 @@ LL |     a.iter().map(|a| a*a)
 help: consider restricting type parameter `T`
    |
 LL | fn func<'a, T: std::ops::Mul<Output = &T>>(a: &'a [T]) -> impl Iterator<Item=&'a T> {
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |              ++++++++++++++++++++++++++++
 
 error: aborting due to previous error
 
index 8637e574c5ecb1b4dafdb523c348f05236daf9dd..4a06196d548e3f9fd1ac7eccaaebc5cf4a337582 100644 (file)
@@ -7,7 +7,7 @@ LL | fn should_return_fruit() -> Apple {
 help: there is an enum variant `Fruit::Apple`; try using the variant's enum
    |
 LL | fn should_return_fruit() -> Fruit {
-   |                             ^^^^^
+   |                             ~~~~~
 
 error[E0425]: cannot find function, tuple struct or tuple variant `Apple` in this scope
   --> $DIR/issue-35675.rs:9:5
@@ -58,7 +58,7 @@ LL | fn bar() -> Variant3 {
 help: there is an enum variant `x::Enum::Variant3`; try using the variant's enum
    |
 LL | fn bar() -> x::Enum {
-   |             ^^^^^^^
+   |             ~~~~~~~
 
 error[E0573]: expected type, found variant `Some`
   --> $DIR/issue-35675.rs:28:13
index 2e03acc112d6c7728b5bdfc68c02acc10f8cc627..55988844c178c73eaca9c53751bbb98312845890 100644 (file)
@@ -10,11 +10,11 @@ LL |     V([Box<E>]),
 help: borrowed types always have a statically known size
    |
 LL |     V(&[Box<E>]),
-   |       ^
+   |       +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     V(Box<[Box<E>]>),
-   |       ^^^^        ^
+   |       ++++        +
 
 error: aborting due to previous error
 
index 6d8d17292f2d1758a8103968e3f94f4e6dc82586..1fd64ca90aa782fae23efa101e48c73eb4c00ccf 100644 (file)
@@ -17,11 +17,11 @@ LL |     fn to_int(&self) -> isize { *self }
 help: disambiguate the associated function for candidate #1
    |
 LL |         ToPrimitive::to_int(&self) + other.to_int()
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~
 help: disambiguate the associated function for candidate #2
    |
 LL |         Add::to_int(&self) + other.to_int()
-   |         ^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 7b17e91421660f4a31d83ec28692b8394a7da156..6a21472848a74d9345947f6aece40b350b4cda70 100644 (file)
@@ -10,7 +10,7 @@ LL |     element: Option<S>
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `S` representable
    |
 LL |     element: Box<Option<S>>
-   |              ^^^^         ^
+   |              ++++         +
 
 error: aborting due to previous error
 
index f76063fc55872ceefde07464b6e233aabde2a335..ab15bb1afa82772c43b05cfbd39031159adec8f2 100644 (file)
@@ -9,7 +9,7 @@ LL | fn _test(ref _p: str) {}
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL | fn _test(ref _p: &str) {}
-   |                  ^
+   |                  +
 
 error: aborting due to previous error
 
index 8b37e5e9774e58b69e27ea2e5e5f2cf1375d6259..31fdf3b72e7a468f97be65b3d8ae3d5fc1b1255b 100644 (file)
@@ -9,7 +9,7 @@ LL | pub fn example(ref s: str) {}
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL | pub fn example(ref s: &str) {}
-   |                       ^
+   |                       +
 
 error: aborting due to previous error
 
index f7107d61ac3e255563f9226ace4f3c2bcabefd59..1618f0f5a11aa57c1a7ab34a3fe1df6870658945 100644 (file)
@@ -7,7 +7,7 @@ LL |         3.f()
 help: you must specify a concrete type for this numeric value, like `i32`
    |
 LL |         3_i32.f()
-   |         ^^^^^
+   |         ~~~~~
 
 error: aborting due to previous error
 
index f69c2a9925de7bd922221ea56208efa27ce8d55d..6fe151622433a83050286b46287dd1d5d0b2b1b5 100644 (file)
@@ -9,11 +9,11 @@ LL |     fn baz(_: Self::Target) where Self: Deref {}
 help: consider further restricting the associated type
    |
 LL |     fn baz(_: Self::Target) where Self: Deref, <Self as Deref>::Target: Sized {}
-   |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                              ++++++++++++++++++++++++++++++++
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL |     fn baz(_: &Self::Target) where Self: Deref {}
-   |               ^
+   |               +
 
 error[E0277]: the size for values of type `(dyn ToString + 'static)` cannot be known at compilation time
   --> $DIR/issue-42312.rs:8:10
@@ -26,7 +26,7 @@ LL | pub fn f(_: dyn ToString) {}
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL | pub fn f(_: &dyn ToString) {}
-   |             ^
+   |             +
 
 error: aborting due to 2 previous errors
 
index 4f41c95323a253f1c69939ebe9f3a45a9655fa0b..d00fd4aad73a6e7bf68812e971e0a25bb10e519c 100644 (file)
@@ -13,7 +13,7 @@ LL |     is_plainly_printable!(c);
 help: try comparing the cast value
    |
 LL |         ($i as u32) < 0
-   |         ^         ^
+   |         +         +
 
 error: aborting due to previous error
 
index 45a2350ddfd0ed0e0403fe6f4013238769751ad3..7fd1fd90ccca5ffbbefefb8cc3e512ee6540b6ef 100644 (file)
@@ -10,7 +10,7 @@ LL | impl<T> Complete for T {}
 help: consider restricting type parameter `T`
    |
 LL | impl<T: std::marker::Copy> Complete for T {}
-   |       ^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++++++++
 
 error: aborting due to previous error
 
index 5f785679c5587791799534f2a6dc19e76a72dc70..a7b8b1ca86167b732be790005e8c9c9474bc2d7e 100644 (file)
@@ -10,7 +10,7 @@ LL |      let _a = b + ", World!";
 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.to_owned() + ", World!";
-   |               ^^^^^^^^^^^^
+   |               ~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 216e32ddae4115e4bbc7bd65e919a1b2a98a9ba1..f6222c77e2e251fdf2d869027995b56e2a2d8dd0 100644 (file)
@@ -10,7 +10,7 @@ LL |     println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!";
 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 |     println!("🦀🦀🦀🦀🦀"); let _a = b.to_owned() + ", World!";
-   |                                      ^^^^^^^^^^^^
+   |                                      ~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index b9d96dc79075aa3a9b16499124afb936499cf9a5..a14a66659b3b302e12100bb5247f2011e595fb23 100644 (file)
@@ -9,8 +9,9 @@ LL |     let Point { .., y, } = p;
    |
 help: move the `..` to the end of the field list
    |
-LL |     let Point { y, .. } = p;
-   |                --  ^^^^
+LL -     let Point { .., y, } = p;
+LL +     let Point { y, .. } = p;
+   | 
 
 error: expected `}`, found `,`
   --> $DIR/issue-49257.rs:11:19
@@ -23,8 +24,9 @@ LL |     let Point { .., y } = p;
    |
 help: move the `..` to the end of the field list
    |
-LL |     let Point { y , .. } = p;
-   |                -- ^^^^^^
+LL -     let Point { .., y } = p;
+LL +     let Point { y , .. } = p;
+   | 
 
 error: expected `}`, found `,`
   --> $DIR/issue-49257.rs:12:19
index ed01362758573c4d237912cfe9fff7d9b239b5d1..f69963bb7af6cafa7345235b5344dfc389fc54c3 100644 (file)
@@ -7,7 +7,7 @@ LL |     fn foo([a, b]: [i32; 2]) {}
 help: give this argument a name or use an underscore to ignore it
    |
 LL |     fn foo(_: [i32; 2]) {}
-   |            ^
+   |            ~
 
 error: aborting due to previous error
 
index a9404c1c46afd69d115bcae21989f57cf50f4dcc..e6a0edac4b1113d3c434532953901e7b6b195d57 100644 (file)
@@ -11,7 +11,7 @@ LL |     let _: () = Borrow::borrow(&owned);
 help: consider dereferencing the borrow
    |
 LL |     let _: () = *Borrow::borrow(&owned);
-   |                 ^
+   |                 +
 
 error: aborting due to previous error
 
index b39c4a9f272d02154f451d80d83b0f8727fa12b2..e9b2a9c4d4844f6727dfef46cab05b7160df10e4 100644 (file)
@@ -7,11 +7,11 @@ LL |         this.a
 help: you might have meant to use `self` here instead
    |
 LL |         self.a
-   |         ^^^^
+   |         ~~~~
 help: if you meant to use `self`, you are also missing a `self` receiver argument
    |
 LL |     fn a(&self) -> A {
-   |          ^^^^^
+   |          +++++
 
 error[E0425]: cannot find value `this` in this scope
   --> $DIR/issue-5099.rs:6:9
@@ -22,11 +22,11 @@ LL |         this.b(x);
 help: you might have meant to use `self` here instead
    |
 LL |         self.b(x);
-   |         ^^^^
+   |         ~~~~
 help: if you meant to use `self`, you are also missing a `self` receiver argument
    |
 LL |     fn b(&self, x: i32) {
-   |          ^^^^^^
+   |          ++++++
 
 error[E0425]: cannot find value `this` in this scope
   --> $DIR/issue-5099.rs:9:20
@@ -37,11 +37,11 @@ LL |         let _ = || this.a;
 help: you might have meant to use `self` here instead
    |
 LL |         let _ = || self.a;
-   |                    ^^^^
+   |                    ~~~~
 help: if you meant to use `self`, you are also missing a `self` receiver argument
    |
 LL |     fn c(&self) {
-   |          ^^^^^
+   |          +++++
 
 error: aborting due to 3 previous errors
 
index 554ac7e7c75fc1d50f6834756bd72391c997f9c5..2c821aa23088d6d675b598da2a2cf6a787ae2611 100644 (file)
@@ -8,8 +8,9 @@ LL |     missing_discourses()?
               found type `isize`
 help: try removing this `?`
    |
-LL |     missing_discourses()
-   |                        --
+LL -     missing_discourses()?
+LL +     missing_discourses()
+   | 
 help: try using a variant of the expected enum
    |
 LL |     Ok(missing_discourses()?)
index c7c4843a0fa80cf5cb68604b04dd9d26afa58c3c..b39159a65390de93bc7bd6ea1e2545b899e43443 100644 (file)
@@ -7,7 +7,7 @@ LL |     let a = (1.0).pow(1.0);
 help: you must specify a concrete type for this numeric value, like `f32`
    |
 LL |     let a = (1.0_f32).pow(1.0);
-   |              ^^^^^^^
+   |              ~~~~~~~
 
 error: aborting due to previous error
 
index 078a7ef2173bd349961bca1d9f8ff5eca58e788e..b743f0df4b11ae41bcc7ba5fb75bc0104102f931 100644 (file)
@@ -9,7 +9,7 @@ LL |     let x = |ref x: isize| { x += 1; };
 help: `+=` can be used on `isize`, you can dereference `x`
    |
 LL |     let x = |ref x: isize| { *x += 1; };
-   |                              ^
+   |                              +
 
 error: aborting due to previous error
 
index eccb71095acc70df351051d1c8fb00f0b18543df..ccf357d4aa00e493e8fff4678b86709c1f3226c1 100644 (file)
@@ -12,7 +12,7 @@ LL | #![deny(unused_variables)]
 help: if this is intentional, prefix it with an underscore
    |
 LL |         E::A(_x) | E::B(_x) => {}
-   |              ^^         ^^
+   |              ~~         ~~
 
 error: unused variable: `x`
   --> $DIR/issue-56685.rs:25:14
@@ -23,7 +23,7 @@ LL |         F::A(x, y) | F::B(x, y) => { y },
 help: if this is intentional, prefix it with an underscore
    |
 LL |         F::A(_x, y) | F::B(_x, y) => { y },
-   |              ^^            ^^
+   |              ~~            ~~
 
 error: unused variable: `a`
   --> $DIR/issue-56685.rs:27:14
@@ -46,7 +46,7 @@ LL |     let _ = if let F::A(x, y) | F::B(x, y) = F::A(1, 2) {
 help: if this is intentional, prefix it with an underscore
    |
 LL |     let _ = if let F::A(_x, y) | F::B(_x, y) = F::A(1, 2) {
-   |                         ^^            ^^
+   |                         ~~            ~~
 
 error: unused variable: `x`
   --> $DIR/issue-56685.rs:39:20
@@ -57,7 +57,7 @@ LL |     while let F::A(x, y) | F::B(x, y) = F::A(1, 2) {
 help: if this is intentional, prefix it with an underscore
    |
 LL |     while let F::A(_x, y) | F::B(_x, y) = F::A(1, 2) {
-   |                    ^^            ^^
+   |                    ~~            ~~
 
 error: aborting due to 6 previous errors
 
index b7c799e163cee7474a99e9781995aaf55f06774c..8250096656ab2836ab8e1569e4a6a913abf6aad3 100644 (file)
@@ -10,7 +10,7 @@ LL |     Array(TypeSignature),
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `ObjectType` representable
    |
 LL |     Array(Box<TypeSignature>),
-   |           ^^^^             ^
+   |           ++++             +
 
 error[E0072]: recursive type `TypeSignature` has infinite size
   --> $DIR/issue-57271.rs:19:1
@@ -24,7 +24,7 @@ LL |     Object(ObjectType),
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `TypeSignature` representable
    |
 LL |     Object(Box<ObjectType>),
-   |            ^^^^          ^
+   |            ++++          +
 
 error: aborting due to 2 previous errors
 
index de598a70ee06ac471677d071481a6498bba08410..8a20a60853a63a3e952988cb055779c786cd8fc9 100644 (file)
@@ -9,7 +9,7 @@ LL |     r: dyn A + 'static
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL |     r: &dyn A + 'static
-   |        ^
+   |        +
 
 error[E0277]: the size for values of type `(dyn A + 'static)` cannot be known at compilation time
   --> $DIR/issue-5883.rs:9:6
index 46d1f9924118729cec7c2d3dce8171161d4a50c9..7789ee342ab44f220ddaf004f327a778fa038f37 100644 (file)
@@ -45,11 +45,11 @@ LL |     foo > 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
index 9bddc2c41a310960bf19f53ef7977a7ce150e661..7241128d17aa9b3f4281a77a8935b6db783561b0 100644 (file)
@@ -28,7 +28,7 @@ LL | pub fn drop<T>(_x: T) {}
 help: consider further restricting the associated type
    |
 LL | fn main() where <() as Trait<'_>>::Item: Sized {
-   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |           ++++++++++++++++++++++++++++++++++++
 
 error: aborting due to 2 previous errors
 
index de0e78ac20c698223a8bcd5507dfc7c4efc7d40a..68ccf5cab5b6b95f2c80e1fc96e2ce37a44ba6ba 100644 (file)
@@ -17,11 +17,11 @@ LL |     fn r#struct(&self) {
 help: disambiguate the associated function for candidate #1
    |
 LL |     async::r#struct(&r#fn {});
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~
 help: disambiguate the associated function for candidate #2
    |
 LL |     await::r#struct(&r#fn {});
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index a428ff7e91faddb04e0a80a4136be4bcf0dfff91..f97d899c2d3f316f4d24236be982113917f0bfbf 100644 (file)
@@ -9,7 +9,7 @@ LL |         self.x += v.x;
 help: consider restricting type parameter `T`
    |
 LL | impl<T: std::ops::AddAssign> Foo<T> {
-   |       ^^^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++++++++++
 
 error: aborting due to previous error
 
index a4700a5ed1da05a1fc2ae7ea8468db7f069e0272..e67cc295d43e127899a487151feae917e4f146ff 100644 (file)
@@ -12,8 +12,8 @@ LL | M (§& u8)}
    |
 help: consider introducing a named lifetime parameter
    |
-LL | enum F<'a> {
-LL | M (§&'a  u8)}
+LL ~ enum F<'a> {
+LL ~ M (§&'a  u8)}
    |
 
 error: aborting due to 2 previous errors
index 14913c93bf74509b62047ba784edab219bc911cd..2104634eb93551adb10f0e852bfc64642fffb7ee 100644 (file)
@@ -11,7 +11,7 @@ LL |     let _: *const u8 = &a;
 help: consider dereferencing
    |
 LL |     let _: *const u8 = &***a;
-   |                         ^^^
+   |                         +++
 
 error[E0308]: mismatched types
   --> $DIR/issue-71676-1.rs:46:22
@@ -26,7 +26,7 @@ LL |     let _: *mut u8 = &a;
 help: consider dereferencing
    |
 LL |     let _: *mut u8 = &mut ***a;
-   |                       ^^^^^^^
+   |                       +++++++
 
 error[E0308]: mismatched types
   --> $DIR/issue-71676-1.rs:49:24
@@ -41,7 +41,7 @@ LL |     let _: *const u8 = &mut a;
 help: consider dereferencing
    |
 LL |     let _: *const u8 = &***a;
-   |                         ^^^
+   |                         ~~~
 
 error[E0308]: mismatched types
   --> $DIR/issue-71676-1.rs:52:22
@@ -56,7 +56,7 @@ LL |     let _: *mut u8 = &mut a;
 help: consider dereferencing
    |
 LL |     let _: *mut u8 = &mut ***a;
-   |                           ^^^
+   |                           +++
 
 error: aborting due to 4 previous errors
 
index 0544deda4ae5a0af27b18a128ec2d4e44a5cb399..80fb4aed1cd683f96c6b40e5ab48fcbc7e738038 100644 (file)
@@ -11,7 +11,7 @@ LL |     let _: *mut u8 = &a;
 help: consider dereferencing
    |
 LL |     let _: *mut u8 = &mut ***a;
-   |                       ^^^^^^^
+   |                       +++++++
 
 error: aborting due to previous error
 
index 9de94c393a7113508b79bb92868efba6a463b9ee..a6e44be636a433957ca74e340630766ea667b854 100644 (file)
@@ -9,7 +9,7 @@ LL |     A(ElemDerived)
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `ElemDerived` representable
    |
 LL |     A(Box<ElemDerived>)
-   |       ^^^^           ^
+   |       ++++           +
 
 error: aborting due to previous error
 
index 92ebb45e88d4b71b6e26215fe9c37b1ef51fa5b8..653869a237d88b5d70def281be3e4aec317cad64 100644 (file)
@@ -8,7 +8,7 @@ LL |         (_a, _x @ ..) => {}
 help: if you don't need to use the contents of _x, discard the tuple's remaining fields
    |
 LL |         (_a, ..) => {}
-   |              ^^
+   |              ~~
 
 error: `..` patterns are not allowed here
   --> $DIR/issue-72574-1.rs:4:19
index a1e8ec1677db5feac9cc831ef18a2bf3809030af..928fa58b17556d14833373819cf477705c7b5247 100644 (file)
@@ -8,7 +8,7 @@ LL |         Binder(_a, _x @ ..) => {}
 help: if you don't need to use the contents of _x, discard the tuple's remaining fields
    |
 LL |         Binder(_a, ..) => {}
-   |                    ^^
+   |                    ~~
 
 error: `..` patterns are not allowed here
   --> $DIR/issue-72574-2.rs:6:25
@@ -30,7 +30,7 @@ LL |         Binder(_a, _x @ ..) => {}
 help: use `_` to explicitly ignore each field
    |
 LL |         Binder(_a, _x @ .., _) => {}
-   |                           ^^^
+   |                           +++
 
 error: aborting due to 3 previous errors
 
index 4b5f65b346174668b8979d4d36cb76639f4cbd49..54df7fccaa5c00fe97c9fc813fefa3600d90639a 100644 (file)
@@ -18,17 +18,17 @@ LL | | }
 help: you might have meant to use one of the following enum variants
    |
 LL |     (A::Struct {}).foo();
-   |     ^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~
 LL |     (A::Tuple()).foo();
-   |     ^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~
 LL |     A::Unit.foo();
-   |     ^^^^^^^
+   |     ~~~~~~~
 help: the following enum variants are available
    |
 LL |     (A::StructWithFields { /* fields */ }).foo();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 LL |     (A::TupleWithFields(/* fields */)).foo();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0423]: expected value, found enum `B`
   --> $DIR/issue-73427.rs:31:5
@@ -47,9 +47,9 @@ LL | | }
 help: the following enum variants are available
    |
 LL |     (B::StructWithFields { /* fields */ }).foo();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 LL |     (B::TupleWithFields(/* fields */)).foo();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0423]: expected value, found enum `C`
   --> $DIR/issue-73427.rs:33:5
@@ -69,13 +69,13 @@ LL | | }
 help: you might have meant to use the following enum variant
    |
 LL |     C::Unit.foo();
-   |     ^^^^^^^
+   |     ~~~~~~~
 help: the following enum variants are available
    |
 LL |     (C::StructWithFields { /* fields */ }).foo();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 LL |     (C::TupleWithFields(/* fields */)).foo();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0423]: expected value, found enum `D`
   --> $DIR/issue-73427.rs:35:5
@@ -94,11 +94,11 @@ LL | | }
 help: you might have meant to use the following enum variant
    |
 LL |     D::Unit.foo();
-   |     ^^^^^^^
+   |     ~~~~~~~
 help: the following enum variant is available
    |
 LL |     (D::TupleWithFields(/* fields */)).foo();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0423]: expected function, tuple struct or tuple variant, found enum `A`
   --> $DIR/issue-73427.rs:40:13
@@ -121,9 +121,9 @@ LL | | }
 help: try to construct one of the enum's variants
    |
 LL |     let x = A::TupleWithFields(3);
-   |             ^^^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~~~
 LL |     let x = A::Tuple(3);
-   |             ^^^^^^^^
+   |             ~~~~~~~~
 
 error[E0532]: expected tuple struct or tuple variant, found enum `A`
   --> $DIR/issue-73427.rs:42:12
@@ -146,9 +146,9 @@ LL | | }
 help: try to match against one of the enum's variants
    |
 LL |     if let A::TupleWithFields(3) = x { }
-   |            ^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~
 LL |     if let A::Tuple(3) = x { }
-   |            ^^^^^^^^
+   |            ~~~~~~~~
 
 error: aborting due to 6 previous errors
 
index 4557595529fa23bf1387753ac683f21f0f15b8d7..8e77662b4ba3f39a4b8684f93b708ce7aadc7d54 100644 (file)
@@ -7,7 +7,7 @@ LL |     let foo::Foo {} = foo::Foo::default();
 help: ignore the inaccessible and unused fields
    |
 LL |     let foo::Foo { .. } = foo::Foo::default();
-   |                  ^^^^^^
+   |                  ~~~~~~
 
 error: pattern requires `..` due to inaccessible fields
   --> $DIR/issue-76077-1.rs:16:9
@@ -18,7 +18,7 @@ LL |     let foo::Bar { visible } = foo::Bar::default();
 help: ignore the inaccessible and unused fields
    |
 LL |     let foo::Bar { visible, .. } = foo::Bar::default();
-   |                           ^^^^
+   |                           ++++
 
 error: aborting due to 2 previous errors
 
index bdcd2fe1adc5a727636cea40fc055b4a0687ad3d..fb8ed43674f28c11c30542fdafb79a0e852b80e1 100644 (file)
@@ -17,7 +17,7 @@ LL |         RANGE => {}
 help: you may want to move the range into the match block
    |
 LL |         0..=255 => {}
-   |         ^^^^^^^
+   |         ~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/issue-76191.rs:15:9
index f945f7f38f9ee2d00920e60a73bc2410b534fdfb..ce70c0111bee2a19e56a37deade83dca48b22c11 100644 (file)
@@ -26,7 +26,7 @@ LL |     while Some(0) = value.get(0) {
 help: consider dereferencing the borrow
    |
 LL |     while Some(*0) = value.get(0) {
-   |                ^
+   |                +
 
 error[E0308]: mismatched types
   --> $DIR/issue-77218.rs:3:11
index 95b2f447102ad1c0f7f6b0790be9d85895f60235..3dd1387729833fc6c318f9f104d3135b306ddfa9 100644 (file)
@@ -18,11 +18,11 @@ LL | pub trait Fn<Args>: FnMut<Args> {
 help: a trait with a similar name exists
    |
 LL |     _func: Fn,
-   |            ^^
+   |            ~~
 help: you might be missing a type parameter
    |
 LL | struct Map2<Segment2, F> {
-   |                     ^^^
+   |                     +++
 
 error[E0308]: mismatched types
   --> $DIR/issue-78720.rs:7:39
@@ -43,11 +43,11 @@ LL |     fn map2<F>(self, f: F) -> Map2<F> {}
 help: consider further restricting `Self`
    |
 LL |     fn map2<F>(self, f: F) -> Map2<F> where Self: Sized {}
-   |                                       ^^^^^^^^^^^^^^^^^
+   |                                       +++++++++++++++++
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL |     fn map2<F>(&self, f: F) -> Map2<F> {}
-   |                ^
+   |                +
 
 error: aborting due to 4 previous errors
 
index 682bc323cb051224aa6775714f4549f3156b04e9..767571cddbeea954c660cf9fe5f632bc0e1035be 100644 (file)
@@ -18,7 +18,7 @@ LL |     fn into_iter(self) -> Self::IntoIter;
 help: consider creating a fresh reborrow of `v` here
    |
 LL |     for n in &mut *v {
-   |              ^^^^^^
+   |              ++++++
 
 error: aborting due to previous error
 
index 1ef219867266036d51b80bfdc8101a02e3c6e8ed..0d576909a35692089e8e28eab72812a53ee95c4c 100644 (file)
@@ -22,7 +22,7 @@ LL |     eq::<dyn, Foo>
    |
    = note: `#[warn(bare_trait_objects)]` on by default
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error[E0107]: missing generics for trait `Foo`
   --> $DIR/issue-86756.rs:5:15
@@ -38,7 +38,7 @@ LL | trait Foo<T, T = T> {}
 help: add missing generic argument
    |
 LL |     eq::<dyn, Foo<T>>
-   |               ^^^^^^
+   |               ~~~~~~
 
 error: aborting due to 3 previous errors; 1 warning emitted
 
index e3a8e82a09fd694c042ba133f7b15717ea5e8112..87b284abf201cdf3b17aa88923c76e1d854ad2a2 100644 (file)
@@ -29,7 +29,7 @@ LL |     ref_arg::<[i32]>(&[5]);
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | fn ref_arg<T: ?Send + ?Sized>(_: &T) {}
-   |                     ^^^^^^^^
+   |                     ++++++++
 
 error: aborting due to previous error; 3 warnings emitted
 
index 836520a28ef349cbfa04f6721ec522ba38ed5504..4c67dbf6796b305cdfe41b5d3342482f903aa4ae 100644 (file)
@@ -7,7 +7,7 @@ LL |     A = 1i64,
 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
@@ -18,7 +18,7 @@ LL |     B = 2u8
 help: change the type of the numeric literal from `u8` to `isize`
    |
 LL |     B = 2isize
-   |         ^^^^^^
+   |         ~~~~~~
 
 error: aborting due to 2 previous errors
 
index 3bd3ca6e875a13ddfcab03361aad1dcb41d26a5e..e9780d9b165c765239b84e22641bf7e8f729ca16 100644 (file)
@@ -6,15 +6,15 @@ LL |     let _: Iter<'_, i32> = array.into_iter();
    |
    = note: `#[warn(array_into_iter)]` on by default
    = warning: this changes meaning in Rust 2021
-   = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
 help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
    |
 LL |     let _: Iter<'_, i32> = array.iter();
-   |                                  ^^^^
+   |                                  ~~~~
 help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value
    |
 LL |     let _: Iter<'_, i32> = IntoIterator::into_iter(array);
-   |                            ^^^^^^^^^^^^^^^^^^^^^^^^     ^
+   |                            ++++++++++++++++++++++++     ~
 
 warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021.
   --> $DIR/into-iter-on-arrays-2018.rs:18:44
@@ -23,15 +23,15 @@ LL |     let _: Iter<'_, i32> = Box::new(array).into_iter();
    |                                            ^^^^^^^^^
    |
    = warning: this changes meaning in Rust 2021
-   = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
 help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
    |
 LL |     let _: Iter<'_, i32> = Box::new(array).iter();
-   |                                            ^^^^
+   |                                            ~~~~
 help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value
    |
 LL |     let _: Iter<'_, i32> = IntoIterator::into_iter(Box::new(array));
-   |                            ^^^^^^^^^^^^^^^^^^^^^^^^               ^
+   |                            ++++++++++++++++++++++++               ~
 
 warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021.
   --> $DIR/into-iter-on-arrays-2018.rs:29:24
@@ -40,15 +40,16 @@ LL |     for _ in [1, 2, 3].into_iter() {}
    |                        ^^^^^^^^^
    |
    = warning: this changes meaning in Rust 2021
-   = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
 help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
    |
 LL |     for _ in [1, 2, 3].iter() {}
-   |                        ^^^^
+   |                        ~~~~
 help: or remove `.into_iter()` to iterate by value
    |
-LL |     for _ in [1, 2, 3] {}
-   |                      --
+LL -     for _ in [1, 2, 3].into_iter() {}
+LL +     for _ in [1, 2, 3] {}
+   | 
 
 warning: 3 warnings emitted
 
index 01789e0e257485847031f1b40df54bd885a9ecfb..138becc4ffe1ea6cca92202c562eb708ce8cc96c 100644 (file)
@@ -6,15 +6,15 @@ LL |     small.into_iter();
    |
    = note: `#[warn(array_into_iter)]` on by default
    = warning: this changes meaning in Rust 2021
-   = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
 help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
    |
 LL |     small.iter();
-   |           ^^^^
+   |           ~~~~
 help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value
    |
 LL |     IntoIterator::into_iter(small);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^     ^
+   |     ++++++++++++++++++++++++     ~
 
 warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021.
   --> $DIR/into-iter-on-arrays-lint.rs:13:12
@@ -23,15 +23,15 @@ LL |     [1, 2].into_iter();
    |            ^^^^^^^^^
    |
    = warning: this changes meaning in Rust 2021
-   = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
 help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
    |
 LL |     [1, 2].iter();
-   |            ^^^^
+   |            ~~~~
 help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value
    |
 LL |     IntoIterator::into_iter([1, 2]);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^      ^
+   |     ++++++++++++++++++++++++      ~
 
 warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021.
   --> $DIR/into-iter-on-arrays-lint.rs:16:9
@@ -40,15 +40,15 @@ LL |     big.into_iter();
    |         ^^^^^^^^^
    |
    = warning: this changes meaning in Rust 2021
-   = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
 help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
    |
 LL |     big.iter();
-   |         ^^^^
+   |         ~~~~
 help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value
    |
 LL |     IntoIterator::into_iter(big);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^   ^
+   |     ++++++++++++++++++++++++   ~
 
 warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021.
   --> $DIR/into-iter-on-arrays-lint.rs:19:15
@@ -57,15 +57,15 @@ LL |     [0u8; 33].into_iter();
    |               ^^^^^^^^^
    |
    = warning: this changes meaning in Rust 2021
-   = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
 help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
    |
 LL |     [0u8; 33].iter();
-   |               ^^^^
+   |               ~~~~
 help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value
    |
 LL |     IntoIterator::into_iter([0u8; 33]);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^         ^
+   |     ++++++++++++++++++++++++         ~
 
 warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021.
   --> $DIR/into-iter-on-arrays-lint.rs:23:21
@@ -74,15 +74,15 @@ LL |     Box::new(small).into_iter();
    |                     ^^^^^^^^^
    |
    = warning: this changes meaning in Rust 2021
-   = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
 help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
    |
 LL |     Box::new(small).iter();
-   |                     ^^^^
+   |                     ~~~~
 help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value
    |
 LL |     IntoIterator::into_iter(Box::new(small));
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^               ^
+   |     ++++++++++++++++++++++++               ~
 
 warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021.
   --> $DIR/into-iter-on-arrays-lint.rs:26:22
@@ -91,15 +91,15 @@ LL |     Box::new([1, 2]).into_iter();
    |                      ^^^^^^^^^
    |
    = warning: this changes meaning in Rust 2021
-   = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
 help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
    |
 LL |     Box::new([1, 2]).iter();
-   |                      ^^^^
+   |                      ~~~~
 help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value
    |
 LL |     IntoIterator::into_iter(Box::new([1, 2]));
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^                ^
+   |     ++++++++++++++++++++++++                ~
 
 warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021.
   --> $DIR/into-iter-on-arrays-lint.rs:29:19
@@ -108,15 +108,15 @@ LL |     Box::new(big).into_iter();
    |                   ^^^^^^^^^
    |
    = warning: this changes meaning in Rust 2021
-   = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
 help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
    |
 LL |     Box::new(big).iter();
-   |                   ^^^^
+   |                   ~~~~
 help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value
    |
 LL |     IntoIterator::into_iter(Box::new(big));
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^             ^
+   |     ++++++++++++++++++++++++             ~
 
 warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021.
   --> $DIR/into-iter-on-arrays-lint.rs:32:25
@@ -125,15 +125,15 @@ LL |     Box::new([0u8; 33]).into_iter();
    |                         ^^^^^^^^^
    |
    = warning: this changes meaning in Rust 2021
-   = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
 help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
    |
 LL |     Box::new([0u8; 33]).iter();
-   |                         ^^^^
+   |                         ~~~~
 help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value
    |
 LL |     IntoIterator::into_iter(Box::new([0u8; 33]));
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^                   ^
+   |     ++++++++++++++++++++++++                   ~
 
 warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021.
   --> $DIR/into-iter-on-arrays-lint.rs:36:31
@@ -142,15 +142,15 @@ LL |     Box::new(Box::new(small)).into_iter();
    |                               ^^^^^^^^^
    |
    = warning: this changes meaning in Rust 2021
-   = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
 help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
    |
 LL |     Box::new(Box::new(small)).iter();
-   |                               ^^^^
+   |                               ~~~~
 help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value
    |
 LL |     IntoIterator::into_iter(Box::new(Box::new(small)));
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^                         ^
+   |     ++++++++++++++++++++++++                         ~
 
 warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021.
   --> $DIR/into-iter-on-arrays-lint.rs:39:32
@@ -159,15 +159,15 @@ LL |     Box::new(Box::new([1, 2])).into_iter();
    |                                ^^^^^^^^^
    |
    = warning: this changes meaning in Rust 2021
-   = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
 help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
    |
 LL |     Box::new(Box::new([1, 2])).iter();
-   |                                ^^^^
+   |                                ~~~~
 help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value
    |
 LL |     IntoIterator::into_iter(Box::new(Box::new([1, 2])));
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^                          ^
+   |     ++++++++++++++++++++++++                          ~
 
 warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021.
   --> $DIR/into-iter-on-arrays-lint.rs:42:29
@@ -176,15 +176,15 @@ LL |     Box::new(Box::new(big)).into_iter();
    |                             ^^^^^^^^^
    |
    = warning: this changes meaning in Rust 2021
-   = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
 help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
    |
 LL |     Box::new(Box::new(big)).iter();
-   |                             ^^^^
+   |                             ~~~~
 help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value
    |
 LL |     IntoIterator::into_iter(Box::new(Box::new(big)));
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^                       ^
+   |     ++++++++++++++++++++++++                       ~
 
 warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <[T; N] as IntoIterator>::into_iter in Rust 2021.
   --> $DIR/into-iter-on-arrays-lint.rs:45:35
@@ -193,15 +193,15 @@ LL |     Box::new(Box::new([0u8; 33])).into_iter();
    |                                   ^^^^^^^^^
    |
    = warning: this changes meaning in Rust 2021
-   = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
 help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
    |
 LL |     Box::new(Box::new([0u8; 33])).iter();
-   |                                   ^^^^
+   |                                   ~~~~
 help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value
    |
 LL |     IntoIterator::into_iter(Box::new(Box::new([0u8; 33])));
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^                             ^
+   |     ++++++++++++++++++++++++                             ~
 
 warning: 12 warnings emitted
 
index 5f5297be42ac914cb8ecea25cbcf4f0312d05c66..b3535232f0296cef76d1b0e53c8fc8f457f2ea3e 100644 (file)
@@ -7,7 +7,7 @@ LL |     let extern = 0;
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#extern = 0;
-   |         ^^^^^^^^
+   |         ~~~~~~~~
 
 error: aborting due to previous error
 
index edbb36452b6ce0139ff8239a8f962323af289e68..a5787d657589d22847ecdda75286673d2788f8b4 100644 (file)
@@ -7,7 +7,7 @@ LL | use extern::foo;
 help: you can escape reserved keywords to use them as identifiers
    |
 LL | use r#extern::foo;
-   |     ^^^^^^^^
+   |     ~~~~~~~~
 
 error[E0432]: unresolved import `r#extern`
   --> $DIR/keyword-extern-as-identifier-use.rs:1:5
index 035501009bda4c4074b44b5f45d8c8b080cd94d8..7129bad8a978ad34a8486460bd204e7e6f6084f8 100644 (file)
@@ -13,7 +13,7 @@ LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
 help: consider restricting type parameter `T`
    |
 LL | fn f<T: std::marker::Send>(val: T) {
-   |       ^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++++++++
 
 error[E0277]: the trait bound `T: Copy` is not satisfied
   --> $DIR/kindck-impl-type-params.rs:18:13
@@ -30,7 +30,7 @@ LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
 help: consider restricting type parameter `T`
    |
 LL | fn f<T: std::marker::Copy>(val: T) {
-   |       ^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++++++++
 
 error[E0277]: `T` cannot be sent between threads safely
   --> $DIR/kindck-impl-type-params.rs:25:31
@@ -47,7 +47,7 @@ LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
 help: consider restricting type parameter `T`
    |
 LL | fn g<T: std::marker::Send>(val: T) {
-   |       ^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++++++++
 
 error[E0277]: the trait bound `T: Copy` is not satisfied
   --> $DIR/kindck-impl-type-params.rs:25:31
@@ -64,7 +64,7 @@ LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
 help: consider restricting type parameter `T`
    |
 LL | fn g<T: std::marker::Copy>(val: T) {
-   |       ^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++++++++
 
 error[E0277]: the trait bound `String: Copy` is not satisfied
   --> $DIR/kindck-impl-type-params.rs:38:13
index 241fe367fd339cfc70bc24263df6144d74c66f9f..3558f0c9e62949637de853a120174233a1cd3de7 100644 (file)
@@ -13,7 +13,7 @@ LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
 help: consider restricting type parameter `T`
    |
 LL | fn f<T: std::marker::Send>(val: T) {
-   |       ^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++++++++
 
 error[E0277]: the trait bound `T: Copy` is not satisfied
   --> $DIR/kindck-impl-type-params.rs:18:13
@@ -30,7 +30,7 @@ LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
 help: consider restricting type parameter `T`
    |
 LL | fn f<T: std::marker::Copy>(val: T) {
-   |       ^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++++++++
 
 error[E0277]: `T` cannot be sent between threads safely
   --> $DIR/kindck-impl-type-params.rs:25:31
@@ -47,7 +47,7 @@ LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
 help: consider restricting type parameter `T`
    |
 LL | fn g<T: std::marker::Send>(val: T) {
-   |       ^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++++++++
 
 error[E0277]: the trait bound `T: Copy` is not satisfied
   --> $DIR/kindck-impl-type-params.rs:25:31
@@ -64,7 +64,7 @@ LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
 help: consider restricting type parameter `T`
    |
 LL | fn g<T: std::marker::Copy>(val: T) {
-   |       ^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++++++++
 
 error[E0477]: the type `&'a isize` does not fulfill the required lifetime
   --> $DIR/kindck-impl-type-params.rs:32:13
index b09695787a443ae6108a5c200d15c00352c66e55..4b5b9e92ca09a5ab244ac9c384bf6f525eeb6438 100644 (file)
@@ -158,11 +158,11 @@ LL |         break foo;
 help: use `break` on its own without a value inside this `while` loop
    |
 LL |         break;
-   |         ^^^^^
+   |         ~~~~~
 help: alternatively, you might have meant to use the available loop label
    |
 LL |         break 'while_loop;
-   |               ^^^^^^^^^^^
+   |               ~~~~~~~~~~~
 
 error[E0571]: `break` with value from a `while` loop
   --> $DIR/label_misspelled.rs:54:9
@@ -176,11 +176,11 @@ LL |         break foo;
 help: use `break` on its own without a value inside this `while` loop
    |
 LL |         break;
-   |         ^^^^^
+   |         ~~~~~
 help: alternatively, you might have meant to use the available loop label
    |
 LL |         break 'while_let;
-   |               ^^^^^^^^^^
+   |               ~~~~~~~~~~
 
 error[E0571]: `break` with value from a `for` loop
   --> $DIR/label_misspelled.rs:59:9
@@ -194,11 +194,11 @@ LL |         break foo;
 help: use `break` on its own without a value inside this `for` loop
    |
 LL |         break;
-   |         ^^^^^
+   |         ~~~~~
 help: alternatively, you might have meant to use the available loop label
    |
 LL |         break 'for_loop;
-   |               ^^^^^^^^^
+   |               ~~~~~~~~~
 
 error: aborting due to 11 previous errors; 10 warnings emitted
 
index 5809b5bd661e0e7c195bc971973459f90d630c7b..d0dc3601202f0c0882534b7afa575801789d2456 100644 (file)
@@ -8,7 +8,7 @@ LL | fn f() -> &isize {
 help: consider using the `'static` lifetime
    |
 LL | fn f() -> &'static isize {
-   |           ^^^^^^^^
+   |           ~~~~~~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:7:33
@@ -20,7 +20,7 @@ LL | fn g(_x: &isize, _y: &isize) -> &isize {
 help: consider introducing a named lifetime parameter
    |
 LL | fn g<'a>(_x: &'a isize, _y: &'a isize) -> &'a isize {
-   |     ^^^^     ^^^^^^^^^      ^^^^^^^^^     ^^^
+   |     ++++     ~~~~~~~~~      ~~~~~~~~~     ~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:17:19
@@ -32,7 +32,7 @@ LL | fn h(_x: &Foo) -> &isize {
 help: consider introducing a named lifetime parameter
    |
 LL | fn h<'a>(_x: &'a Foo) -> &'a isize {
-   |     ^^^^     ^^^^^^^     ^^^
+   |     ++++     ~~~~~~~     ~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:21:20
@@ -44,7 +44,7 @@ LL | fn i(_x: isize) -> &isize {
 help: consider using the `'static` lifetime
    |
 LL | fn i(_x: isize) -> &'static isize {
-   |                    ^^^^^^^^
+   |                    ~~~~~~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:34:24
@@ -56,7 +56,7 @@ LL | fn j(_x: StaticStr) -> &isize {
 help: consider using the `'static` lifetime
    |
 LL | fn j(_x: StaticStr) -> &'static isize {
-   |                        ^^^^^^^^
+   |                        ~~~~~~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:40:49
@@ -68,7 +68,7 @@ LL | fn k<'a, T: WithLifetime<'a>>(_x: T::Output) -> &isize {
 help: consider using the `'a` lifetime
    |
 LL | fn k<'a, T: WithLifetime<'a>>(_x: T::Output) -> &'a isize {
-   |                                                 ^^^
+   |                                                 ~~~
 
 error: aborting due to 6 previous errors
 
index c1fcab2409f642287bf7fc9916547cd38bae910b..cf365af99040a957ce23aae076fc5b1c2479d243 100644 (file)
@@ -8,7 +8,7 @@ LL | fn foo(x: &i32, y: &i32) -> &i32 {
 help: consider introducing a named lifetime parameter
    |
 LL | fn foo<'a>(x: &'a i32, y: &'a i32) -> &'a i32 {
-   |       ^^^^    ^^^^^^^     ^^^^^^^     ^^^
+   |       ++++    ~~~~~~~     ~~~~~~~     ~~~
 
 error: aborting due to previous error
 
index 16333a7ca380c68e6a72400393cc6e0b60c32c5d..8c87f6da8dc3a873819236fa9eec9e0e432a2fc5 100644 (file)
@@ -18,11 +18,11 @@ LL |     fn foo(&'b self) {}
 help: consider introducing lifetime `'b` here
    |
 LL | impl<'b> T for Test {
-   |     ^^^^
+   |     ++++
 help: consider introducing lifetime `'b` here
    |
 LL |     fn foo<'b>(&'b self) {}
-   |           ^^^^
+   |           ++++
 
 error[E0261]: use of undeclared lifetime name `'b`
   --> $DIR/undeclared-lifetime-used-in-debug-macro-issue-70152.rs:3:9
index 1fef8fc69e23a63c69f1289855b46e82c9e22e22..4399045098d0f71438296018453d3a9ee50ac402 100644 (file)
@@ -14,7 +14,7 @@ LL |     [0].iter().flat_map(|a| [0].iter().map(|_| &a));
 help: to force the closure to take ownership of `a` (and any other referenced variables), use the `move` keyword
    |
 LL |     [0].iter().flat_map(|a| [0].iter().map(move |_| &a));
-   |                                            ^^^^
+   |                                            ++++
 
 error: aborting due to previous error
 
index 40fafc4b3b59b7085334612994de57150f5c2b5f..3477b01b6b567374283133ef3028ee8826973a16 100644 (file)
@@ -12,7 +12,7 @@ LL |     Dyn::func();
    |
    = note: `#[warn(bare_trait_objects)]` on by default
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 warning: trait objects without an explicit `dyn` are deprecated
   --> $DIR/bare-trait-objects-path.rs:17:5
@@ -21,7 +21,7 @@ LL |     ::Dyn::func();
    |     ^^^^^ help: use `dyn`: `<dyn (::Dyn)>`
    |
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 warning: trait objects without an explicit `dyn` are deprecated
   --> $DIR/bare-trait-objects-path.rs:20:5
@@ -30,7 +30,7 @@ LL |     Dyn::CONST;
    |     ^^^ help: use `dyn`: `<dyn Dyn>`
    |
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error: aborting due to previous error; 3 warnings emitted
 
index 6a5fdac4d914b241d8f2ac9c0285a85fc1e54511..61b7993d2ae4d8383e99aa6b574633e71bc5d105 100644 (file)
@@ -52,7 +52,7 @@ LL |     2 == 3;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = 2 == 3;
-   |     ^^^^^^^
+   |     +++++++
 
 warning: unused comparison that must be used
   --> $DIR/fn_must_use.rs:75:5
@@ -63,7 +63,7 @@ LL |     m == n;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = m == n;
-   |     ^^^^^^^
+   |     +++++++
 
 warning: 8 warnings emitted
 
index 185c0e8e3d0eba88105739eb1e0821a59ba31dd5..c1ebdb9514bd479f8fefa7459ee3f88bccf67b92 100644 (file)
@@ -6,7 +6,7 @@ LL | pub fn function(_x: Box<SomeTrait>) {}
    |
    = note: requested on the command line with `--force-warn bare-trait-objects`
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 warning: 1 warning emitted
 
index a89970587751d3ed94d8c82f8d80911942ec7839..8514956af743ef3852c2d7434c4f65e3353ab4da 100644 (file)
@@ -6,7 +6,7 @@ LL | pub fn function(_x: Box<SomeTrait>) {}
    |
    = note: requested on the command line with `--force-warn bare-trait-objects`
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 warning: 1 warning emitted
 
index 1d5f88086c5c410c97bb0a6d79bcae15e42e27cc..3a0227463e69a564568b9393661df21667b5517e 100644 (file)
@@ -6,7 +6,7 @@ LL |         0...100 => true,
    |
    = note: `--force-warn ellipsis-inclusive-range-patterns` implied by `--force-warn rust-2021-compatibility`
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 warning: 1 warning emitted
 
index d242ef266b8d1a2e2f36ceeef1dd0225927086fe..29eba6d635f93848c21605743d8d9c8317666338 100644 (file)
@@ -6,7 +6,7 @@ LL | pub fn function(_x: Box<SomeTrait>) {}
    |
    = note: `--force-warn bare-trait-objects` implied by `--force-warn rust-2018-idioms`
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 warning: 1 warning emitted
 
index 180dff880a65828356280598b923880db57b1045..54bee452cddad28621396e91c07f2c0d1a226fc4 100644 (file)
@@ -6,7 +6,7 @@ LL | pub fn function(_x: Box<SomeTrait>) {}
    |
    = note: `--force-warn bare-trait-objects` implied by `--force-warn rust-2018-idioms`
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 warning: 1 warning emitted
 
index efa684a24e3d393c5fcba1e45cdc0d03ec21521d..91b8d2b5afc77e60078ca2863eb87dd2a1a060f9 100644 (file)
@@ -10,7 +10,7 @@ note: the lint level is defined here
 LL | #![warn(ellipsis_inclusive_range_patterns)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 warning: `...` range patterns are deprecated
   --> $DIR/inclusive-range-pattern-syntax.rs:16:9
@@ -19,7 +19,7 @@ LL |         &1...2 => {}
    |         ^^^^^^ help: use `..=` for an inclusive range: `&(1..=2)`
    |
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 warning: 2 warnings emitted
 
index c179f4a25bdd2290da656a8b1d55a3082ff4dd8d..2841815ecf2b94611e00155d0aabf5c0b79771f8 100644 (file)
@@ -31,7 +31,7 @@ LL | #![deny(non_snake_case)]
 help: rename the identifier or convert it to a snake case raw identifier
    |
 LL | mod r#impl {}
-   |     ^^^^^^
+   |     ~~~~~~
 
 error: function `While` should have a snake case name
   --> $DIR/lint-non-snake-case-identifiers-suggestion-reserved.rs:8:4
@@ -42,7 +42,7 @@ LL | fn While() {}
 help: rename the identifier or convert it to a snake case raw identifier
    |
 LL | fn r#while() {}
-   |    ^^^^^^^
+   |    ~~~~~~~
 
 error: variable `Mod` should have a snake case name
   --> $DIR/lint-non-snake-case-identifiers-suggestion-reserved.rs:12:9
@@ -53,7 +53,7 @@ LL |     let Mod: usize = 0;
 help: rename the identifier or convert it to a snake case raw identifier
    |
 LL |     let r#mod: usize = 0;
-   |         ^^^^^
+   |         ~~~~~
 
 error: variable `Super` should have a snake case name
   --> $DIR/lint-non-snake-case-identifiers-suggestion-reserved.rs:16:9
index b01073b42b864daf1f6613733dfa00cb896a7ed6..0ebcfb40dc3b8a4012aa3ab7ba306a797038f02b 100644 (file)
@@ -52,11 +52,11 @@ LL |     depth: Option<int>,
 help: perhaps you intended to use this type
    |
 LL |     depth: Option<i32>,
-   |                   ^^^
+   |                   ~~~
 help: you might be missing a type parameter
    |
 LL | struct Data<int> {
-   |            ^^^^^
+   |            +++++
 
 error[E0412]: cannot find type `short` in this scope
   --> $DIR/recommend-literal.rs:33:16
index 33e5a03266e50ec88526f14960c02dd60fa0ed98..00ed5c89d4b8b9140246f0e0362576cb1d44e811 100644 (file)
@@ -21,8 +21,9 @@ LL | #![deny(single_use_lifetime)]
    |         ^^^^^^^^^^^^^^^^^^^
 help: elide the single-use lifetime
    |
-LL | fn _foo(_x: &u32) {}
-   |       --    --
+LL - fn _foo<'a>(_x: &'a u32) {}
+LL + fn _foo(_x: &u32) {}
+   | 
 
 error: aborting due to previous error; 1 warning emitted
 
index e91e02df4764d5d0b899fb45d7de462641369ff9..d8dd2b5fddf94e79266723ace623792f9993d1f8 100644 (file)
@@ -12,7 +12,7 @@ LL | #![deny(unused_must_use)]
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = &42;
-   |     ^^^^^^^
+   |     +++++++
 
 error: unused borrow that must be used
   --> $DIR/unused-borrows.rs:9:5
@@ -23,7 +23,7 @@ LL |     &mut foo(42);
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = &mut foo(42);
-   |     ^^^^^^^
+   |     +++++++
 
 error: unused borrow that must be used
   --> $DIR/unused-borrows.rs:12:5
@@ -34,7 +34,7 @@ LL |     &&42;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = &&42;
-   |     ^^^^^^^
+   |     +++++++
 
 error: unused borrow that must be used
   --> $DIR/unused-borrows.rs:15:5
@@ -45,7 +45,7 @@ LL |     &&mut 42;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = &&mut 42;
-   |     ^^^^^^^
+   |     +++++++
 
 error: unused borrow that must be used
   --> $DIR/unused-borrows.rs:18:5
@@ -56,7 +56,7 @@ LL |     &mut &42;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = &mut &42;
-   |     ^^^^^^^
+   |     +++++++
 
 error: unused borrow that must be used
   --> $DIR/unused-borrows.rs:23:5
@@ -67,7 +67,7 @@ LL |     && foo(42);
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = && foo(42);
-   |     ^^^^^^^
+   |     +++++++
 
 error: aborting due to 6 previous errors
 
index 8aefe243a944b497575cd0418829bd07dc6f658a..8fc2d1bc88fdd84185f4ddebd84a29505a2e90d5 100644 (file)
@@ -13,7 +13,7 @@ LL | #![deny(unused)]
 help: try ignoring the field
    |
 LL |         A { i, j: _ } | B { i, j: _ } => {
-   |                ^^^^            ^^^^
+   |                ~~~~            ~~~~
 
 error: unused variable: `j`
   --> $DIR/issue-67691-unused-field-in-or-pattern.rs:30:16
@@ -24,7 +24,7 @@ LL |         A { i, ref j } | B { i, ref j } => {
 help: try ignoring the field
    |
 LL |         A { i, j: _ } | B { i, j: _ } => {
-   |                ^^^^            ^^^^
+   |                ~~~~            ~~~~
 
 error: unused variable: `j`
   --> $DIR/issue-67691-unused-field-in-or-pattern.rs:40:21
@@ -35,7 +35,7 @@ LL |         Some(A { i, j } | B { i, j }) => {
 help: try ignoring the field
    |
 LL |         Some(A { i, j: _ } | B { i, j: _ }) => {
-   |                     ^^^^            ^^^^
+   |                     ~~~~            ~~~~
 
 error: unused variable: `j`
   --> $DIR/issue-67691-unused-field-in-or-pattern.rs:52:21
@@ -46,7 +46,7 @@ LL |         Some(A { i, ref j } | B { i, ref j }) => {
 help: try ignoring the field
    |
 LL |         Some(A { i, j: _ } | B { i, j: _ }) => {
-   |                     ^^^^            ^^^^
+   |                     ~~~~            ~~~~
 
 error: unused variable: `i`
   --> $DIR/issue-67691-unused-field-in-or-pattern.rs:62:24
@@ -57,7 +57,7 @@ LL |         MixedEnum::A { i } | MixedEnum::B(i) => {
 help: try ignoring the field
    |
 LL |         MixedEnum::A { i: _ } | MixedEnum::B(_) => {
-   |                        ^^^^                  ^
+   |                        ~~~~                  ~
 
 error: unused variable: `i`
   --> $DIR/issue-67691-unused-field-in-or-pattern.rs:70:24
@@ -68,7 +68,7 @@ LL |         MixedEnum::A { ref i } | MixedEnum::B(ref i) => {
 help: try ignoring the field
    |
 LL |         MixedEnum::A { i: _ } | MixedEnum::B(_) => {
-   |                        ^^^^                  ^
+   |                        ~~~~                  ~
 
 error: aborting due to 6 previous errors
 
index 4835cfae46fdc67edc26e569f3e29d73614bd814..8234ed3b1678c6de3359b8e03a4c6aedfedd78af 100644 (file)
@@ -12,7 +12,7 @@ LL | #![deny(unused_must_use)]
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = function() && return 1;
-   |     ^^^^^^^
+   |     +++++++
 
 error: aborting due to previous error
 
index 4dd739088b99fdb7470ad95a54df4610274ffbee..b248dd0fe15472f238233ac63d51e23a08a3b092 100644 (file)
@@ -12,7 +12,7 @@ LL | #![warn(unused_must_use)]
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = val == 1;
-   |     ^^^^^^^
+   |     +++++++
 
 warning: unused comparison that must be used
   --> $DIR/must-use-ops.rs:13:5
@@ -23,7 +23,7 @@ LL |     val < 1;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = val < 1;
-   |     ^^^^^^^
+   |     +++++++
 
 warning: unused comparison that must be used
   --> $DIR/must-use-ops.rs:14:5
@@ -34,7 +34,7 @@ LL |     val <= 1;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = val <= 1;
-   |     ^^^^^^^
+   |     +++++++
 
 warning: unused comparison that must be used
   --> $DIR/must-use-ops.rs:15:5
@@ -45,7 +45,7 @@ LL |     val != 1;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = val != 1;
-   |     ^^^^^^^
+   |     +++++++
 
 warning: unused comparison that must be used
   --> $DIR/must-use-ops.rs:16:5
@@ -56,7 +56,7 @@ LL |     val >= 1;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = val >= 1;
-   |     ^^^^^^^
+   |     +++++++
 
 warning: unused comparison that must be used
   --> $DIR/must-use-ops.rs:17:5
@@ -67,7 +67,7 @@ LL |     val > 1;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = val > 1;
-   |     ^^^^^^^
+   |     +++++++
 
 warning: unused arithmetic operation that must be used
   --> $DIR/must-use-ops.rs:20:5
@@ -78,7 +78,7 @@ LL |     val + 2;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = val + 2;
-   |     ^^^^^^^
+   |     +++++++
 
 warning: unused arithmetic operation that must be used
   --> $DIR/must-use-ops.rs:21:5
@@ -89,7 +89,7 @@ LL |     val - 2;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = val - 2;
-   |     ^^^^^^^
+   |     +++++++
 
 warning: unused arithmetic operation that must be used
   --> $DIR/must-use-ops.rs:22:5
@@ -100,7 +100,7 @@ LL |     val / 2;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = val / 2;
-   |     ^^^^^^^
+   |     +++++++
 
 warning: unused arithmetic operation that must be used
   --> $DIR/must-use-ops.rs:23:5
@@ -111,7 +111,7 @@ LL |     val * 2;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = val * 2;
-   |     ^^^^^^^
+   |     +++++++
 
 warning: unused arithmetic operation that must be used
   --> $DIR/must-use-ops.rs:24:5
@@ -122,7 +122,7 @@ LL |     val % 2;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = val % 2;
-   |     ^^^^^^^
+   |     +++++++
 
 warning: unused logical operation that must be used
   --> $DIR/must-use-ops.rs:27:5
@@ -133,7 +133,7 @@ LL |     true && true;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = true && true;
-   |     ^^^^^^^
+   |     +++++++
 
 warning: unused logical operation that must be used
   --> $DIR/must-use-ops.rs:28:5
@@ -144,7 +144,7 @@ LL |     false || true;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = false || true;
-   |     ^^^^^^^
+   |     +++++++
 
 warning: unused bitwise operation that must be used
   --> $DIR/must-use-ops.rs:31:5
@@ -155,7 +155,7 @@ LL |     5 ^ val;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = 5 ^ val;
-   |     ^^^^^^^
+   |     +++++++
 
 warning: unused bitwise operation that must be used
   --> $DIR/must-use-ops.rs:32:5
@@ -166,7 +166,7 @@ LL |     5 & val;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = 5 & val;
-   |     ^^^^^^^
+   |     +++++++
 
 warning: unused bitwise operation that must be used
   --> $DIR/must-use-ops.rs:33:5
@@ -177,7 +177,7 @@ LL |     5 | val;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = 5 | val;
-   |     ^^^^^^^
+   |     +++++++
 
 warning: unused bitwise operation that must be used
   --> $DIR/must-use-ops.rs:34:5
@@ -188,7 +188,7 @@ LL |     5 << val;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = 5 << val;
-   |     ^^^^^^^
+   |     +++++++
 
 warning: unused bitwise operation that must be used
   --> $DIR/must-use-ops.rs:35:5
@@ -199,7 +199,7 @@ LL |     5 >> val;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = 5 >> val;
-   |     ^^^^^^^
+   |     +++++++
 
 warning: unused unary operation that must be used
   --> $DIR/must-use-ops.rs:38:5
@@ -210,7 +210,7 @@ LL |     !val;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = !val;
-   |     ^^^^^^^
+   |     +++++++
 
 warning: unused unary operation that must be used
   --> $DIR/must-use-ops.rs:39:5
@@ -221,7 +221,7 @@ LL |     -val;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = -val;
-   |     ^^^^^^^
+   |     +++++++
 
 warning: unused unary operation that must be used
   --> $DIR/must-use-ops.rs:40:5
@@ -232,7 +232,7 @@ LL |     *val_pointer;
 help: use `let _ = ...` to ignore the resulting value
    |
 LL |     let _ = *val_pointer;
-   |     ^^^^^^^
+   |     +++++++
 
 warning: 21 warnings emitted
 
index 14db5f64b0c7406f7f11e1294918150a44585e1e..403367017c6e6e35e4c9f2a8bfa6034b72d769ba 100644 (file)
@@ -53,7 +53,7 @@ LL | |     }
 help: you might have meant to return this value
    |
 LL |         return true;
-   |         ^^^^^^     ^
+   |         ++++++     +
 
 error: aborting due to 5 previous errors
 
index 1c0d39a6e5ad738983fa19f94cd1cd28f23f7303..605a1841cf3764b3110ea551141b547b5abc885a 100644 (file)
@@ -9,7 +9,7 @@ LL |         break 22
 help: use `break` on its own without a value inside this `for` loop
    |
 LL |         break
-   |         ^^^^^
+   |         ~~~~~
 
 error: aborting due to previous error
 
index adb099f9b1769ed0f26048775866844c4604c4fe..ccb27c3507076897e7a680350bcebce21bb98c55 100644 (file)
@@ -29,11 +29,11 @@ LL |         break ();
 help: use `break` on its own without a value inside this `while` loop
    |
 LL |         break;
-   |         ^^^^^
+   |         ~~~~~
 help: alternatively, you might have meant to use the available loop label
    |
 LL |         break 'while_loop;
-   |               ^^^^^^^^^^^
+   |               ~~~~~~~~~~~
 
 error[E0571]: `break` with value from a `while` loop
   --> $DIR/loop-break-value.rs:30:13
@@ -47,7 +47,7 @@ LL |             break 'while_loop 123;
 help: use `break` on its own without a value inside this `while` loop
    |
 LL |             break 'while_loop;
-   |             ^^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~~
 
 error[E0571]: `break` with value from a `while` loop
   --> $DIR/loop-break-value.rs:38:12
@@ -60,7 +60,7 @@ LL |         if break () {
 help: use `break` on its own without a value inside this `while` loop
    |
 LL |         if break {
-   |            ^^^^^
+   |            ~~~~~
 
 error[E0571]: `break` with value from a `while` loop
   --> $DIR/loop-break-value.rs:43:9
@@ -73,7 +73,7 @@ LL |         break None;
 help: use `break` on its own without a value inside this `while` loop
    |
 LL |         break;
-   |         ^^^^^
+   |         ~~~~~
 
 error[E0571]: `break` with value from a `while` loop
   --> $DIR/loop-break-value.rs:49:13
@@ -87,7 +87,7 @@ LL |             break 'while_let_loop "nope";
 help: use `break` on its own without a value inside this `while` loop
    |
 LL |             break 'while_let_loop;
-   |             ^^^^^^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~~~~~~
 
 error[E0571]: `break` with value from a `for` loop
   --> $DIR/loop-break-value.rs:56:9
@@ -100,7 +100,7 @@ LL |         break ();
 help: use `break` on its own without a value inside this `for` loop
    |
 LL |         break;
-   |         ^^^^^
+   |         ~~~~~
 
 error[E0571]: `break` with value from a `for` loop
   --> $DIR/loop-break-value.rs:57:9
@@ -114,7 +114,7 @@ LL |         break [()];
 help: use `break` on its own without a value inside this `for` loop
    |
 LL |         break;
-   |         ^^^^^
+   |         ~~~~~
 
 error[E0571]: `break` with value from a `for` loop
   --> $DIR/loop-break-value.rs:64:13
@@ -128,7 +128,7 @@ LL |             break 'for_loop Some(17);
 help: use `break` on its own without a value inside this `for` loop
    |
 LL |             break 'for_loop;
-   |             ^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/loop-break-value.rs:4:31
index 5087662e7bfa4c879c687f504ba354c14b4e4048..8a1afdea2493645950acd96d31688136d7795adb 100644 (file)
@@ -7,7 +7,7 @@ LL |         1
 help: you might have meant to break the loop with this value
    |
 LL |         break 1;
-   |         ^^^^^  ^
+   |         +++++  +
 
 error[E0308]: mismatched types
   --> $DIR/loop-no-implicit-break.rs:13:9
@@ -18,7 +18,7 @@ LL |         1
 help: you might have meant to break the loop with this value
    |
 LL |         break 1;
-   |         ^^^^^  ^
+   |         +++++  +
 
 error[E0308]: mismatched types
   --> $DIR/loop-no-implicit-break.rs:21:9
@@ -29,7 +29,7 @@ LL |         1
 help: you might have meant to return this value
    |
 LL |         return 1;
-   |         ^^^^^^  ^
+   |         ++++++  +
 
 error[E0308]: mismatched types
   --> $DIR/loop-no-implicit-break.rs:29:9
@@ -40,7 +40,7 @@ LL |         1
 help: you might have meant to return this value
    |
 LL |         return 1;
-   |         ^^^^^^  ^
+   |         ++++++  +
 
 error: aborting due to 4 previous errors
 
index 6ef4cdcb0200e93708631244636e9a2645089f06..fc9bb82b7844cd4f83afc4560d50231f41aa08cf 100644 (file)
@@ -7,7 +7,7 @@ LL |     println!(3 + 4);
 help: you might be missing a string literal to format with
    |
 LL |     println!("{}", 3 + 4);
-   |              ^^^^^
+   |              +++++
 
 error: format argument must be a string literal
   --> $DIR/bad_hello.rs:4:14
@@ -18,7 +18,7 @@ LL |     println!(3, 4);
 help: you might be missing a string literal to format with
    |
 LL |     println!("{} {}", 3, 4);
-   |              ^^^^^^^^
+   |              ++++++++
 
 error: aborting due to 2 previous errors
 
index dfbbb07de588ae7e68f2310363797ab12f07e3ed..e0a4f3878d8bb45a2c64963b5f540ceb12dd44b3 100644 (file)
@@ -16,7 +16,7 @@ LL |       format_args!(hang!());
 help: you might be missing a string literal to format with
    |
 LL |     format_args!("{}", hang!());
-   |                  ^^^^^
+   |                  +++++
 
 error: aborting due to previous error
 
index 1db759a2181d596537863384e8c9de6e9c713649..97a2edd396605a6071ba80d527a23ad84e2e6e1c 100644 (file)
@@ -7,7 +7,7 @@ LL |     { true }
 help: you might have meant to return this value
    |
 LL |     { return true; }
-   |       ^^^^^^     ^
+   |       ++++++     +
 
 error[E0308]: mismatched types
   --> $DIR/empty-trailing-stmt.rs:5:13
index e2f2f14dce3193bd73548b2b678dcee122e0db11..ff5236dc949b2f09bf471bc0a195889031ed9257 100644 (file)
@@ -12,7 +12,7 @@ LL |     println!("%.*3$s %s!\n", "Hello,", "World", 4);
 help: format specifiers use curly braces
    |
 LL |     println!("{:.2$} {}!\n", "Hello,", "World", 4);
-   |               ^^^^^^ ^^
+   |               ~~~~~~ ~~
 
 error: argument never used
   --> $DIR/format-foreign.rs:3:29
@@ -40,8 +40,8 @@ LL | | "###, "Hello,", "World", 4);
    = note: printf formatting not supported; see the documentation for `std::fmt`
 help: format specifiers use curly braces
    |
-LL |     println!(r###"{:.2$}
-LL |         {}!\n
+LL ~     println!(r###"{:.2$}
+LL ~         {}!\n
    |
 
 error: argument never used
@@ -76,7 +76,7 @@ LL |     println!("$1 $0 $$ $NAME", 1, 2, NAME=3);
 help: format specifiers use curly braces
    |
 LL |     println!("{1} {0} $$ {NAME}", 1, 2, NAME=3);
-   |               ^^^ ^^^    ^^^^^^
+   |               ~~~ ~~~    ~~~~~~
 
 error: aborting due to 6 previous errors
 
index b479a2778e0ef55819d0b3e82562cc6a09569437..ef914cc1c6d5c59ffb17621090f019902d280c2f 100644 (file)
@@ -47,7 +47,7 @@ LL |     format!(123);
 help: you might be missing a string literal to format with
    |
 LL |     format!("{}", 123);
-   |             ^^^^^
+   |             +++++
 
 error: aborting due to 7 previous errors
 
index 19d977f69a21002509bd8e442c7ba880200bf1aa..fd2378dbcb3f21b513c4f09c22862a83c6245623 100644 (file)
@@ -7,7 +7,7 @@ LL |     println!(0);
 help: you might be missing a string literal to format with
    |
 LL |     println!("{}", 0);
-   |              ^^^^^
+   |              +++++
 
 error: format argument must be a string literal
   --> $DIR/issue-30143.rs:6:15
@@ -18,7 +18,7 @@ LL |     eprintln!('a');
 help: you might be missing a string literal to format with
    |
 LL |     eprintln!("{}", 'a');
-   |               ^^^^^
+   |               +++++
 
 error: format argument must be a string literal
   --> $DIR/issue-30143.rs:9:17
@@ -29,7 +29,7 @@ LL |     writeln!(s, true).unwrap();
 help: you might be missing a string literal to format with
    |
 LL |     writeln!(s, "{}", true).unwrap();
-   |                 ^^^^^
+   |                 +++++
 
 error: aborting due to 3 previous errors
 
index b7079158fb093a253d0b6ef2eca66a557e7408ff..00139662d619bee30a7afd28a83e16720e93a919 100644 (file)
@@ -12,7 +12,7 @@ LL |     make_item!(A)
 help: add `;` to interpret the expansion as a statement
    |
 LL |     make_item!(A);
-   |                  ^
+   |                  +
 
 error: expected expression, found keyword `struct`
   --> $DIR/issue-34421-mac-expr-bad-stmt-good-add-semi.rs:3:9
@@ -28,7 +28,7 @@ LL |     make_item!(B)
 help: add `;` to interpret the expansion as a statement
    |
 LL |     make_item!(B);
-   |                  ^
+   |                  +
 
 error: aborting due to 2 previous errors
 
index b4d20699221abcdb50ccd1941d9082671f0f9e75..5c8646008258b6e9adffdefecc9dee4f70f9b084 100644 (file)
@@ -44,7 +44,7 @@ LL |     real_method_stmt!();
 help: you must specify a concrete type for this numeric value, like `f32`
    |
 LL |           2.0_f32.neg()
-   |           ^^^^^^^
+   |           ~~~~~~~
 
 error[E0599]: no method named `fake` found for type `{integer}` in the current scope
   --> $DIR/macro-backtrace-invalid-internals.rs:23:13
@@ -92,7 +92,7 @@ LL |     let _ = real_method_expr!();
 help: you must specify a concrete type for this numeric value, like `f32`
    |
 LL |           2.0_f32.neg()
-   |           ^^^^^^^
+   |           ~~~~~~~
 
 error: aborting due to 8 previous errors
 
index 8f9660963937f9cb2a795cf8d6bdcf7f00514493..d0312c4850824626f80c3e52b9d9c02727014468 100644 (file)
@@ -11,7 +11,7 @@ LL |         _ => { empty!() }
 help: add `;` to interpret the expansion as a statement
    |
 LL |         _ => { empty!(); }
-   |                        ^
+   |                        +
 
 error: aborting due to previous error
 
index eb6204fa02e69221dc89aee8af589b70bbbc1d97..9a5b8009f32cd095a36f49ad080dc976babbfd16 100644 (file)
@@ -10,7 +10,7 @@ note: the lint level is defined here
 LL | #![deny(rust_2021_incompatible_or_patterns)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #84869 <https://github.com/rust-lang/rust/issues/84869>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/or-patterns-macro-rules.html>
 
 error: the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
   --> $DIR/macro-or-patterns-back-compat.rs:13:23
@@ -19,7 +19,7 @@ LL | macro_rules! bar { ($($x:pat)+ | $($y:pat)+) => {} }
    |                       ^^^^^^ help: use pat_param to preserve semantics: `$x:pat_param`
    |
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #84869 <https://github.com/rust-lang/rust/issues/84869>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/or-patterns-macro-rules.html>
 
 error: the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
   --> $DIR/macro-or-patterns-back-compat.rs:19:21
@@ -28,7 +28,7 @@ LL | macro_rules! ogg { ($x:pat | $y:pat_param) => {} }
    |                     ^^^^^^ help: use pat_param to preserve semantics: `$x:pat_param`
    |
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #84869 <https://github.com/rust-lang/rust/issues/84869>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/or-patterns-macro-rules.html>
 
 error: the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
   --> $DIR/macro-or-patterns-back-compat.rs:23:26
@@ -37,7 +37,7 @@ LL |     ( $expr:expr , $( $( $pat:pat )|+ => $expr_arm:expr ),+ ) => {
    |                          ^^^^^^^^ help: use pat_param to preserve semantics: `$pat:pat_param`
    |
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #84869 <https://github.com/rust-lang/rust/issues/84869>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/or-patterns-macro-rules.html>
 
 error: aborting due to 4 previous errors
 
index e0ed8522bf6523f7ac4bf1af9a9d7c8881b778b5..932732da4b0ec6f87c653f6dd9dbb3ea81f7a9fe 100644 (file)
@@ -179,7 +179,7 @@ LL |     format!(invalid);
 help: you might be missing a string literal to format with
    |
 LL |     format!("{}", invalid);
-   |             ^^^^^
+   |             +++++
 
 error: argument must be a string literal
   --> $DIR/macros-nonfatal-errors.rs:110:14
index 407193d4adebbd8784daf89623206769a145e5f5..27636c3d546fdd09f752b2ed7c4e83392142a97e 100644 (file)
@@ -7,7 +7,7 @@ LL | #[allow { foo_lint } ]
 help: the delimiters should be `(` and `)`
    |
 LL | #[allow ( foo_lint ) ]
-   |         ^          ^
+   |         ~          ~
 
 error: wrong meta list delimiters
   --> $DIR/malformed-meta-delim.rs:8:9
@@ -18,7 +18,7 @@ LL | #[allow [ foo_lint ] ]
 help: the delimiters should be `(` and `)`
    |
 LL | #[allow ( foo_lint ) ]
-   |         ^          ^
+   |         ~          ~
 
 error: aborting due to 2 previous errors
 
index 37839482b31a2ef3aabae9fb356661db531c0241..e34164ec0db249af65a512112f76cdbe65564107 100644 (file)
@@ -10,11 +10,11 @@ LL |           Color::Rgb(_, _) => { }
 help: use `_` to explicitly ignore each field
    |
 LL |           Color::Rgb(_, _, _) => { }
-   |                          ^^^
+   |                          +++
 help: use `..` to ignore all fields
    |
 LL |           Color::Rgb(..) => { }
-   |                      ^^
+   |                      ~~
 
 error: aborting due to previous error
 
index df4dbdbc8e62d36496faf9c500ad3fd73a7180d3..75c1f695d7e3a5dcc0fcf008484353a6cf6182ba 100644 (file)
@@ -9,7 +9,7 @@ LL |     let x: u32 = 22_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
 
index 583b2c4cfe039f77f8dba570468c5470ab402bc6..aa7dd32f4d3037062dcb3f8e298d2c510497ae89 100644 (file)
@@ -9,7 +9,7 @@ LL |     let x: u32 = 22_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
 
index 82660a7c416930dba56bd3b3c767adafb96200ed..e725e74efc2b444e75c68c2b3111e499c62066cc 100644 (file)
@@ -17,7 +17,7 @@ LL |     let y: usize = x.foo();
 help: you can convert an `isize` to a `usize` and panic if the converted value doesn't fit
    |
 LL |     let y: usize = x.foo().try_into().unwrap();
-   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 2 previous errors
 
index 42802ba1d0ffbacb2bbfb96a665f6a17ea31a481..ed03b37fde2b80c9fba8e78e78cf5a9147b76249 100644 (file)
@@ -13,11 +13,11 @@ LL | impl Me2 for usize { fn me(&self) -> usize { *self } }
 help: disambiguate the associated function for candidate #1
    |
 LL | fn main() { Me2::me(&1_usize); }
-   |             ^^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~~
 help: disambiguate the associated function for candidate #2
    |
 LL | fn main() { Me::me(&1_usize); }
-   |             ^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 5cbed652b0a40a30555060e95a8f3754473f36f3..1feaa2c73e040efcb0bcffd4f112401227c9d314 100644 (file)
@@ -17,11 +17,11 @@ LL | trait B { fn foo(&self); }
 help: disambiguate the associated function for candidate #1
    |
 LL |     A::foo(t);
-   |     ^^^^^^^^^
+   |     ~~~~~~~~~
 help: disambiguate the associated function for candidate #2
    |
 LL |     B::foo(t);
-   |     ^^^^^^^^^
+   |     ~~~~~~~~~
 
 error: aborting due to previous error
 
index 8585929934e31c8a21209e5e1741aa668e9a40dd..f69b56892392e202d0cbe79f0857cf5a3b4b3151 100644 (file)
@@ -17,11 +17,11 @@ LL |     fn foo(self) {}
 help: disambiguate the associated function for candidate #1
    |
 LL |     A::foo(AB {});
-   |     ^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~
 help: disambiguate the associated function for candidate #2
    |
 LL |     B::foo(AB {});
-   |     ^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 85b39647885909a538de562977a5a3c18a8ae30e..e0a58aed8f447fdde4133044effc3a366bc239fd 100644 (file)
@@ -17,11 +17,11 @@ LL |     fn foo() {}
 help: disambiguate the associated function for candidate #1
    |
 LL |     A::foo();
-   |     ^^^^^^
+   |     ~~~
 help: disambiguate the associated function for candidate #2
    |
 LL |     B::foo();
-   |     ^^^^^^
+   |     ~~~
 
 error: aborting due to previous error
 
index 4ce7236ed96c584a512616975536c119ca9cc62d..e84dff8bab7b22bf070dc6c15f173c22da6d647e 100644 (file)
@@ -17,11 +17,11 @@ LL | trait Bar { fn method(&self) {} }
 help: disambiguate the associated function for candidate #1
    |
 LL |     Foo::method(&1_usize);
-   |     ^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~
 help: disambiguate the associated function for candidate #2
    |
 LL |     Bar::method(&1_usize);
-   |     ^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index ea50815ec1af71711e8bc0b74f06588142d44da9..835edb4b0ae941a27b99956bfed15e1825f08ad3 100644 (file)
@@ -14,7 +14,7 @@ LL |     fn early<'a, 'b>(self) -> (&'a u8, &'b u8) { loop {} }
 help: add missing lifetime argument
    |
 LL |     S.early::<'static, 'b>();
-   |                      ^^^^
+   |                      ++++
 
 error[E0107]: this associated function takes 2 lifetime arguments but 3 lifetime arguments were supplied
   --> $DIR/method-call-lifetime-args-fail.rs:18:7
@@ -214,7 +214,7 @@ LL |     fn early<'a, 'b>(self) -> (&'a u8, &'b u8) { loop {} }
 help: add missing lifetime argument
    |
 LL |     S::early::<'static, 'b>(S);
-   |                       ^^^^
+   |                       ++++
 
 error[E0107]: this associated function takes 2 lifetime arguments but 3 lifetime arguments were supplied
   --> $DIR/method-call-lifetime-args-fail.rs:65:8
index 0a516c89a8b554c8bef5701ebc5240247be8eac5..59075397ea5f076334b6dbfa28181f7ec451125a 100644 (file)
@@ -47,15 +47,15 @@ LL |     fn foo(&self) -> u8;
 help: disambiguate the associated function for candidate #1
    |
 LL |     let z = X::foo(x);
-   |             ^^^^^^^^^
+   |             ~~~~~~~~~
 help: disambiguate the associated function for candidate #2
    |
 LL |     let z = NuisanceFoo::foo(x);
-   |             ^^^^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~~~~
 help: disambiguate the associated function for candidate #3
    |
 LL |     let z = FinalFoo::foo(x);
-   |             ^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:139:24
index 241c50d7ced2188df6b6094a5060488253db932e..045f9ab700420b2b244d450da90b2834a538a66d 100644 (file)
@@ -7,7 +7,7 @@ LL |                         .get_x;
 help: use parentheses to call the method
    |
 LL |                         .get_x();
-   |                               ^^
+   |                               ++
 
 error[E0615]: attempted to take value of method `filter_map` on type `Filter<Map<std::slice::Iter<'_, {integer}>, [closure@$DIR/method-missing-call.rs:27:20: 27:25]>, [closure@$DIR/method-missing-call.rs:28:23: 28:35]>`
   --> $DIR/method-missing-call.rs:29:16
@@ -18,7 +18,7 @@ LL |               .filter_map;
 help: use parentheses to call the method
    |
 LL |               .filter_map(_);
-   |                          ^^^
+   |                          +++
 
 error: aborting due to 2 previous errors
 
index c6dde67cfeba6141903901f1a29a1193aff753cd..09978b35f7e8a10df591bb901aeef37ea8e9ff62 100644 (file)
@@ -7,7 +7,7 @@ LL |     let x = 2.0.neg();
 help: you must specify a concrete type for this numeric value, like `f32`
    |
 LL |     let x = 2.0_f32.neg();
-   |             ^^^^^^^
+   |             ~~~~~~~
 
 error[E0689]: can't call method `neg` on ambiguous numeric type `{float}`
   --> $DIR/method-on-ambiguous-numeric-type.rs:14:15
@@ -18,7 +18,7 @@ LL |     let x = y.neg();
 help: you must specify a type for this binding, like `f32`
    |
 LL |     let y: f32 = 2.0;
-   |         ^^^^^^
+   |         ~~~~~~
 
 error[E0689]: can't call method `pow` on ambiguous numeric type `{integer}`
   --> $DIR/method-on-ambiguous-numeric-type.rs:19:26
@@ -37,7 +37,7 @@ LL |     local_bar.pow(2);
 help: you must specify a type for this binding, like `i32`
    |
 LL |     ($ident:ident) => { let $ident: i32 = 42; }
-   |                             ^^^^^^^^^^^
+   |                             ~~~~~~~~~~~
 
 error[E0689]: can't call method `pow` on ambiguous numeric type `{integer}`
   --> $DIR/method-on-ambiguous-numeric-type.rs:30:9
@@ -48,7 +48,7 @@ LL |     bar.pow(2);
 help: you must specify a type for this binding, like `i32`
    |
 LL |     ($ident:ident) => { let $ident: i32 = 42; }
-   |                             ^^^^^^^^^^^
+   |                             ~~~~~~~~~~~
 
 error: aborting due to 5 previous errors
 
index 1ebd2b00aee0c64d45477d91495aade22a17b653..d3983f9aae8f42bcf2e0f3f19f9c9d35ca106c48 100644 (file)
@@ -62,7 +62,7 @@ LL |     let dst = Inline::<dyn Debug>::new(0);
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | struct Inline<T: ?Sized>
-   |                ^^^^^^^^
+   |                ++++++++
 
 error: aborting due to 4 previous errors
 
index 7697a375fd8ae589c632997c39ccc31776a11f42..db4e8589291b7023c9848073286930ea2b7f33be 100644 (file)
@@ -83,7 +83,7 @@ LL |     1+2
 help: try using a conversion method
    |
 LL |     (1+2).to_string()
-   |     ^   ^^^^^^^^^^^^^
+   |     +   +++++++++++++
 
 error[E0308]: mismatched types
   --> $DIR/abridged.rs:59:5
@@ -96,7 +96,7 @@ LL |     -2
 help: try using a conversion method
    |
 LL |     (-2).to_string()
-   |     ^  ^^^^^^^^^^^^^
+   |     +  +++++++++++++
 
 error: aborting due to 8 previous errors
 
index 6a97d1ee3b813f38b74ac3a647ad4af124c742db..a47eb87cff06c2795f3e65bba00acd61fadafc62 100644 (file)
@@ -29,7 +29,7 @@ LL |     let _ = v as &u8;
 help: consider borrowing the value
    |
 LL |     let _ = &*v as &u8;
-   |             ^^
+   |             ++
 
 error[E0605]: non-primitive cast: `*const u8` as `E`
   --> $DIR/cast-rfc0401.rs:30:13
index a8da87d60bf942d145935e6ae114da7d8e682875..d7db90e50e51b11ccfa5fdc2da1bfd1b1b69afef 100644 (file)
@@ -9,7 +9,7 @@ LL |     let _n = m.iter().map(|_, b| {
 help: change the closure to accept a tuple instead of individual arguments
    |
 LL |     let _n = m.iter().map(|(_, b)| {
-   |                           ^^^^^^^^
+   |                           ~~~~~~~~
 
 error: aborting due to previous error
 
index 405343783de05ca11339248b2478543a85cdd8be..2bea9572b7096e2b9c474c8896244139b504149d 100644 (file)
@@ -9,7 +9,7 @@ LL |     [1, 2, 3].sort_by(|| panic!());
 help: consider changing the closure to take and ignore the expected arguments
    |
 LL |     [1, 2, 3].sort_by(|_, _| panic!());
-   |                       ^^^^^^
+   |                       ~~~~~~
 
 error[E0593]: closure is expected to take 2 arguments, but it takes 1 argument
   --> $DIR/closure-arg-count.rs:7:15
@@ -30,7 +30,7 @@ LL |     [1, 2, 3].sort_by(|(tuple, tuple2)| panic!());
 help: change the closure to take multiple arguments instead of a single tuple
    |
 LL |     [1, 2, 3].sort_by(|tuple, tuple2| panic!());
-   |                       ^^^^^^^^^^^^^^^
+   |                       ~~~~~~~~~~~~~~~
 
 error[E0593]: closure is expected to take 2 distinct arguments, but it takes a single 2-tuple as argument
   --> $DIR/closure-arg-count.rs:11:15
@@ -43,7 +43,7 @@ LL |     [1, 2, 3].sort_by(|(tuple, tuple2): (usize, _)| panic!());
 help: change the closure to take multiple arguments instead of a single tuple
    |
 LL |     [1, 2, 3].sort_by(|tuple, tuple2| panic!());
-   |                       ^^^^^^^^^^^^^^^
+   |                       ~~~~~~~~~~~~~~~
 
 error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments
   --> $DIR/closure-arg-count.rs:13:5
@@ -59,7 +59,7 @@ LL |     f(|| panic!());
 help: consider changing the closure to take and ignore the expected argument
    |
 LL |     f(|_| panic!());
-   |       ^^^
+   |       ~~~
 
 error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments
   --> $DIR/closure-arg-count.rs:15:5
@@ -75,7 +75,7 @@ LL |     f(  move    || panic!());
 help: consider changing the closure to take and ignore the expected argument
    |
 LL |     f(  move    |_| panic!());
-   |                 ^^^
+   |                 ~~~
 
 error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
   --> $DIR/closure-arg-count.rs:18:53
@@ -88,7 +88,7 @@ LL |     let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x| i);
 help: change the closure to accept a tuple instead of individual arguments
    |
 LL |     let _it = vec![1, 2, 3].into_iter().enumerate().map(|(i, x)| i);
-   |                                                         ^^^^^^^^
+   |                                                         ~~~~~~~~
 
 error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
   --> $DIR/closure-arg-count.rs:20:53
@@ -101,7 +101,7 @@ LL |     let _it = vec![1, 2, 3].into_iter().enumerate().map(|i: usize, x| i);
 help: change the closure to accept a tuple instead of individual arguments
    |
 LL |     let _it = vec![1, 2, 3].into_iter().enumerate().map(|(i, x)| i);
-   |                                                         ^^^^^^^^
+   |                                                         ~~~~~~~~
 
 error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 3 distinct arguments
   --> $DIR/closure-arg-count.rs:22:53
index d0859726a49f6d787cf7c97781541c8a2f5cf1b8..e480bb250b2a5e4596c97931fb1f6d7cb7d7c8cf 100644 (file)
@@ -11,7 +11,7 @@ LL |     write!(hello);
 help: you can convert a `usize` to a `u64` and panic if the converted value doesn'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
index 1e035ff99d0bcbb94b6d4099052028e47ecd42ed..c7e1f87f2d4d4509c158a0e429d8d5c18e0312e9 100644 (file)
@@ -7,7 +7,7 @@ LL |     type Item = IteratorChunk<T, S>;
 help: consider introducing a named lifetime parameter
    |
 LL |     type Item<'a> = IteratorChunk<'a, T, S>;
-   |              ^^^^                 ^^^
+   |              ++++                 +++
 
 error: aborting due to previous error
 
index 22a6df8902596c593583e2b0e76e352a45a30a3c..7ab5224979897232ec39e0a19094fab79bb4460d 100644 (file)
@@ -7,7 +7,7 @@ LL |     foo(1u8);
 help: change the type of the numeric literal from `u8` to `u16`
    |
 LL |     foo(1u16);
-   |         ^^^^
+   |         ~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-literal-cast.rs:8:10
@@ -18,7 +18,7 @@ LL |     foo1(2f32);
 help: change the type of the numeric literal from `f32` to `f64`
    |
 LL |     foo1(2f64);
-   |          ^^^^
+   |          ~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-literal-cast.rs:10:10
@@ -29,7 +29,7 @@ LL |     foo2(3i16);
 help: change the type of the numeric literal from `i16` to `i32`
    |
 LL |     foo2(3i32);
-   |          ^^^^
+   |          ~~~~
 
 error: aborting due to 3 previous errors
 
index f2b8404a328e28af7e0159d3e5a7935501b54b1d..f275321abe5ebdf27e2b97e4f870412dce7f9b9e 100644 (file)
@@ -7,7 +7,7 @@ LL |     pub Foo { text }
 help: add `struct` here to parse `Foo` as a public struct
    |
 LL |     pub struct Foo { text }
-   |         ^^^^^^
+   |         ++++++
 
 error: expected one of `(` or `<`, found `{`
   --> $DIR/recovered-block.rs:17:9
index a95b5bb94d24a7c020d01529a40227ff5f054a14..1fe9f5299aa081ba3300dd10f8fe2d5ba96a73fa 100644 (file)
@@ -7,7 +7,7 @@ LL |     if let S { a, b, c, d } = S(1, 2, 3, 4) {
 help: use the tuple variant pattern syntax instead
    |
 LL |     if let S(a, b, c, d) = S(1, 2, 3, 4) {
-   |             ^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 985a9bb2a3f6a8867c8ad9c386f8a68619b126c6..f955659f23d27f13ffc5f7576aab6c4388a75c3c 100644 (file)
@@ -10,11 +10,11 @@ LL | impl X<N> {}
 help: a struct with a similar name exists
    |
 LL | impl X<X> {}
-   |        ^
+   |        ~
 help: you might be missing a type parameter
    |
 LL | impl<N> X<N> {}
-   |     ^^^
+   |     +++
 
 error[E0412]: cannot find type `N` in this scope
   --> $DIR/missing-type-parameter2.rs:9:28
@@ -27,11 +27,11 @@ LL | impl<T, const A: u8 = 2> X<N> {}
 help: a type parameter with a similar name exists
    |
 LL | impl<T, const A: u8 = 2> X<T> {}
-   |                            ^
+   |                            ~
 help: you might be missing a type parameter
    |
 LL | impl<T, const A: u8 = 2, N> X<N> {}
-   |                        ^^^
+   |                        +++
 
 error[E0412]: cannot find type `T` in this scope
   --> $DIR/missing-type-parameter2.rs:14:20
@@ -45,11 +45,11 @@ LL | fn foo(_: T) where T: Send {}
 help: a struct with a similar name exists
    |
 LL | fn foo(_: T) where X: Send {}
-   |                    ^
+   |                    ~
 help: you might be missing a type parameter
    |
 LL | fn foo<T>(_: T) where T: Send {}
-   |       ^^^
+   |       +++
 
 error[E0412]: cannot find type `T` in this scope
   --> $DIR/missing-type-parameter2.rs:14:11
@@ -63,11 +63,11 @@ LL | fn foo(_: T) where T: Send {}
 help: a struct with a similar name exists
    |
 LL | fn foo(_: X) where T: Send {}
-   |           ^
+   |           ~
 help: you might be missing a type parameter
    |
 LL | fn foo<T>(_: T) where T: Send {}
-   |       ^^^
+   |       +++
 
 error[E0412]: cannot find type `A` in this scope
   --> $DIR/missing-type-parameter2.rs:18:24
@@ -81,11 +81,11 @@ LL | fn bar<const N: u8>(_: A) {}
 help: a struct with a similar name exists
    |
 LL | fn bar<const N: u8>(_: X) {}
-   |                        ^
+   |                        ~
 help: you might be missing a type parameter
    |
 LL | fn bar<const N: u8, A>(_: A) {}
-   |                   ^^^
+   |                   +++
 
 error[E0747]: unresolved item provided when a constant was expected
   --> $DIR/missing-type-parameter2.rs:6:8
@@ -96,7 +96,7 @@ LL | impl X<N> {}
 help: if this generic argument was intended as a const parameter, surround it with braces
    |
 LL | impl X<{ N }> {}
-   |        ^   ^
+   |        +   +
 
 error: defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
   --> $DIR/missing-type-parameter2.rs:9:15
@@ -113,7 +113,7 @@ LL | impl<T, const A: u8 = 2> X<N> {}
 help: if this generic argument was intended as a const parameter, surround it with braces
    |
 LL | impl<T, const A: u8 = 2> X<{ N }> {}
-   |                            ^   ^
+   |                            +   +
 
 error: aborting due to 8 previous errors
 
index f7e17815b675529921ebd17d63c40a4cc0aaa318..a315bbaab33c037c32b8d4cc4c39115d002a6513 100644 (file)
@@ -11,7 +11,7 @@ LL |     consume(node) + r
 help: borrow this field in the pattern to avoid moving `node.next.0`
    |
 LL |         Some(ref right) => consume(right),
-   |              ^^^
+   |              +++
 
 error: aborting due to previous error
 
index a30bfa66c5a9ca22772fe841b5a242fa305d8cca..2adaf576adf5c9298ca879834b80a93a827d6cf3 100644 (file)
@@ -20,7 +20,7 @@ LL |     f(&mut r, false)
 help: consider further restricting this bound
    |
 LL | fn conspirator<F>(mut f: F) where F: FnMut(&mut R, bool) + Copy {
-   |                                                          ^^^^^^
+   |                                                          ++++++
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/multiple-plugin-registrars.rs b/src/test/ui/multiple-plugin-registrars.rs
deleted file mode 100644 (file)
index d211204..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// error-pattern: multiple plugin registration functions found
-
-#![feature(plugin_registrar)]
-
-// the registration function isn't typechecked yet
-#[plugin_registrar]
-pub fn one() {}
-
-#[plugin_registrar]
-pub fn two() {}
-
-fn main() {}
diff --git a/src/test/ui/multiple-plugin-registrars.stderr b/src/test/ui/multiple-plugin-registrars.stderr
deleted file mode 100644 (file)
index 7b86d76..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/multiple-plugin-registrars.rs:6:1
-   |
-LL | #[plugin_registrar]
-   | ^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/multiple-plugin-registrars.rs:9:1
-   |
-LL | #[plugin_registrar]
-   | ^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-
-error: multiple plugin registration functions found
-   |
-note: one is here
-  --> $DIR/multiple-plugin-registrars.rs:10:1
-   |
-LL | pub fn two() {}
-   | ^^^^^^^^^^^^^^^
-note: one is here
-  --> $DIR/multiple-plugin-registrars.rs:7:1
-   |
-LL | pub fn one() {}
-   | ^^^^^^^^^^^^^^^
-
-error: aborting due to previous error; 2 warnings emitted
-
index 71e35b445ef817b9383063609897ad7a9d074dfc..6c792c3314c9790d2bff5acde94f33428d02f807 100644 (file)
@@ -11,7 +11,7 @@ LL |     check(m1::S);
 help: a tuple struct with a similar name exists
    |
 LL |     check(m1::TS);
-   |               ^^
+   |               ~~
 help: consider importing one of these items instead
    |
 LL | use m2::S;
@@ -34,7 +34,7 @@ LL |     pub struct TS();
 help: a tuple struct with a similar name exists
    |
 LL |     check(xm1::TS);
-   |                ^^
+   |                ~~
 help: consider importing one of these items instead
    |
 LL | use m2::S;
@@ -56,11 +56,11 @@ LL |     check(m7::V);
 help: use struct literal syntax instead
    |
 LL |     check(m7::V {});
-   |           ^^^^^^^^
+   |           ~~~~~~~~
 help: a tuple variant with a similar name exists
    |
 LL |     check(m7::TV);
-   |               ^^
+   |               ~~
 help: consider importing one of these items instead
    |
 LL | use m8::V;
@@ -84,11 +84,11 @@ LL |         TV(),
 help: use struct literal syntax instead
    |
 LL |     check(xm7::V { /* fields */ });
-   |           ^^^^^^^^^^^^^^^^^^^^^^^
+   |           ~~~~~~~~~~~~~~~~~~~~~~~
 help: a tuple variant with a similar name exists
    |
 LL |     check(xm7::TV);
-   |                ^^
+   |                ~~
 help: consider importing one of these items instead
    |
 LL | use m8::V;
index 3453f031623f42dd5d5b1c9b3f0ec48a6c55884f..216b56f7059041da119ecd4accfe4addc0f00e9f 100644 (file)
@@ -25,8 +25,9 @@ LL |     [(); & { loop { continue } } ];
            found reference `&_`
 help: consider removing the borrow
    |
-LL |     [(); { loop { continue } } ];
-   |         --
+LL -     [(); & { loop { continue } } ];
+LL +     [(); { loop { continue } } ];
+   | 
 
 error[E0308]: mismatched types
   --> $DIR/issue-52443.rs:4:17
index 6767f7cd6163b8fcdcac6e68435774815fc40cc5..574a114340f0349dbe9210216aa1bc1078a7d824 100644 (file)
@@ -8,7 +8,7 @@ LL |         if let Some(thing) = maybe {
 help: borrow this field in the pattern to avoid moving `maybe.0`
    |
 LL |         if let Some(ref thing) = maybe {
-   |                     ^^^
+   |                     +++
 
 error: aborting due to previous error
 
index 2dca92e2be1f346897b72ebe35107a6ef999a63b..6dacfd1f264c63136d48d79de320db0b251d293a 100644 (file)
@@ -16,7 +16,7 @@ LL |     ;
 help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped
    |
 LL |             D("other").next(&_thing1);
-   |                                      ^
+   |                                      +
 
 error: aborting due to previous error
 
index 1bfebd755b4fc8790b0cc5200f6f740b5de10ba4..70f063ca0e8334cc3aba00ff874dbc441887aa00 100644 (file)
@@ -16,7 +16,7 @@ LL | }
 help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped
    |
 LL |     if let Ok(_) = counter.lock() { };
-   |                                      ^
+   |                                      +
 
 error: aborting due to previous error
 
index bfb0eb74a56dd9185612efa03819a3cea36af60f..a5a0fc415bb3793d64ddac04be9ce935a6c81441 100644 (file)
@@ -17,7 +17,7 @@ LL | }
 help: 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
    |
 LL |     let x = rows.map(|row| row).next(); x
-   |     ^^^^^^^                           ^^^
+   |     +++++++                           +++
 
 error: aborting due to previous error
 
index 047fdbc9148aced01d6601d9d4698a9f050d2444..68d3cef8aa13ba227545a2c4d9b3c8cdbe3a9319 100644 (file)
@@ -15,7 +15,7 @@ LL |     ;
 help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped
    |
 LL |         D(&_thing1).end();
-   |                          ^
+   |                          +
 
 error: aborting due to previous error
 
index 85920a8e7394c41953e6bfbf07146c8c5168bae9..25226e2967353b45a8f804d12e60e758c341ee7e 100644 (file)
@@ -11,7 +11,7 @@ LL |     {              let mut _t1 = D(Box::new("t1")); D(&_t1).end()    } ; //
 help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped
    |
 LL |     {              let mut _t1 = D(Box::new("t1")); D(&_t1).end();    } ; // suggest `;`
-   |                                                                  ^
+   |                                                                  +
 
 error[E0597]: `_t1` does not live long enough
   --> $DIR/issue-54556-used-vs-unused-tails.rs:13:55
@@ -26,7 +26,7 @@ LL |     {            { let mut _t1 = D(Box::new("t1")); D(&_t1).end() }  } ; //
 help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped
    |
 LL |     {            { let mut _t1 = D(Box::new("t1")); D(&_t1).end(); }  } ; // suggest `;`
-   |                                                                  ^
+   |                                                                  +
 
 error[E0597]: `_t1` does not live long enough
   --> $DIR/issue-54556-used-vs-unused-tails.rs:16:55
@@ -41,7 +41,7 @@ LL |     {            { let mut _t1 = D(Box::new("t1")); D(&_t1).end() }; }   //
 help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped
    |
 LL |     {            { let mut _t1 = D(Box::new("t1")); D(&_t1).end(); }; }   // suggest `;`
-   |                                                                  ^
+   |                                                                  +
 
 error[E0597]: `_t1` does not live long enough
   --> $DIR/issue-54556-used-vs-unused-tails.rs:19:55
@@ -56,7 +56,7 @@ LL |     let _ =      { let mut _t1 = D(Box::new("t1")); D(&_t1).end()    } ; //
 help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped
    |
 LL |     let _ =      { let mut _t1 = D(Box::new("t1")); D(&_t1).end();    } ; // suggest `;`
-   |                                                                  ^
+   |                                                                  +
 
 error[E0597]: `_t1` does not live long enough
   --> $DIR/issue-54556-used-vs-unused-tails.rs:22:55
@@ -71,7 +71,7 @@ LL |     let _u =     { let mut _t1 = D(Box::new("t1")); D(&_t1).unit()   } ; //
 help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped
    |
 LL |     let _u =     { let mut _t1 = D(Box::new("t1")); D(&_t1).unit();   } ; // suggest `;`
-   |                                                                   ^
+   |                                                                   +
 
 error[E0597]: `_t1` does not live long enough
   --> $DIR/issue-54556-used-vs-unused-tails.rs:25:55
@@ -88,7 +88,7 @@ LL |     let _x =     { let mut _t1 = D(Box::new("t1")); D(&_t1).end()    } ; //
 help: 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
    |
 LL |     let _x =     { let mut _t1 = D(Box::new("t1")); let x = D(&_t1).end(); x    } ; // `let x = ...; x`
-   |                                                     ^^^^^^^              ^^^
+   |                                                     +++++++              +++
 
 error[E0597]: `_t1` does not live long enough
   --> $DIR/issue-54556-used-vs-unused-tails.rs:30:55
@@ -105,7 +105,7 @@ LL |     _y =         { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } ; // `l
 help: 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
    |
 LL |     _y =         { let mut _t1 = D(Box::new("t1")); let x = D(&_t1).end(); x } ; // `let x = ...; x`
-   |                                                     ^^^^^^^              ^^^
+   |                                                     +++++++              +++
 
 error[E0597]: `_t1` does not live long enough
   --> $DIR/issue-54556-used-vs-unused-tails.rs:37:55
@@ -121,7 +121,7 @@ LL | fn f_local_ref() { let mut _t1 = D(Box::new("t1")); D(&_t1).unit()   }  //
 help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped
    |
 LL | fn f_local_ref() { let mut _t1 = D(Box::new("t1")); D(&_t1).unit();   }  // suggest `;`
-   |                                                                   ^
+   |                                                                   +
 
 error[E0597]: `_t1` does not live long enough
   --> $DIR/issue-54556-used-vs-unused-tails.rs:40:55
@@ -139,7 +139,7 @@ LL | fn f() -> String { let mut _t1 = D(Box::new("t1")); D(&_t1).end()   }   //
 help: 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
    |
 LL | fn f() -> String { let mut _t1 = D(Box::new("t1")); let x = D(&_t1).end(); x   }   // `let x = ...; x`
-   |                                                     ^^^^^^^              ^^^
+   |                                                     +++++++              +++
 
 error: aborting due to 9 previous errors
 
index f6a86aa43b53459ee417ec197db8437b9c21ee01..d05fc793967ae22912d3825bad331f396a52973c 100644 (file)
@@ -7,7 +7,7 @@ LL | fn foo<'a, T>(x: &T) -> impl Foo<'a> {
 help: add explicit lifetime `ReEarlyBound(0, 'a)` to the type of `x`
    |
 LL | fn foo<'a, T>(x: &ReEarlyBound(0, 'a) T) -> impl Foo<'a> {
-   |                  ^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index a82931e0fbdd050710e2c795871101bfe920fa99..8e226804890d954c85c700f19df4618f3112ed3e 100644 (file)
@@ -8,7 +8,7 @@ LL | extern crate core;
 help: you can use `as` to change the binding name of the import
    |
 LL | extern crate core as other_core;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 6aa2eb174e922166af0333ce180de8478dfedc85..2c058f1f5a48435e653ebb2f69153c0214862b0b 100644 (file)
@@ -9,7 +9,7 @@ LL |     panic!("here's a brace: {");
 help: add a "{}" format string to use the message literally
    |
 LL |     panic!("{}", "here's a brace: {");
-   |            ^^^^^
+   |            +++++
 
 warning: panic message contains a brace
   --> $DIR/non-fmt-panic.rs:12:31
@@ -21,7 +21,7 @@ LL |     std::panic!("another one: }");
 help: add a "{}" format string to use the message literally
    |
 LL |     std::panic!("{}", "another one: }");
-   |                 ^^^^^
+   |                 +++++
 
 warning: panic message contains an unused formatting placeholder
   --> $DIR/non-fmt-panic.rs:13:25
@@ -33,11 +33,11 @@ LL |     core::panic!("Hello {}");
 help: add the missing argument
    |
 LL |     core::panic!("Hello {}", ...);
-   |                            ^^^^^
+   |                            +++++
 help: or add a "{}" format string to use the message literally
    |
 LL |     core::panic!("{}", "Hello {}");
-   |                  ^^^^^
+   |                  +++++
 
 warning: panic message contains unused formatting placeholders
   --> $DIR/non-fmt-panic.rs:14:21
@@ -49,11 +49,11 @@ LL |     assert!(false, "{:03x} {test} bla");
 help: add the missing arguments
    |
 LL |     assert!(false, "{:03x} {test} bla", ...);
-   |                                       ^^^^^
+   |                                       +++++
 help: or add a "{}" format string to use the message literally
    |
 LL |     assert!(false, "{}", "{:03x} {test} bla");
-   |                    ^^^^^
+   |                    +++++
 
 warning: panic message is not a string literal
   --> $DIR/non-fmt-panic.rs:16:20
@@ -66,7 +66,7 @@ LL |     assert!(false, S);
 help: add a "{}" format string to Display the message
    |
 LL |     assert!(false, "{}", S);
-   |                    ^^^^^
+   |                    +++++
 
 warning: panic message contains braces
   --> $DIR/non-fmt-panic.rs:18:27
@@ -78,7 +78,7 @@ LL |     debug_assert!(false, "{{}} bla");
 help: add a "{}" format string to use the message literally
    |
 LL |     debug_assert!(false, "{}", "{{}} bla");
-   |                          ^^^^^
+   |                          +++++
 
 warning: panic message is not a string literal
   --> $DIR/non-fmt-panic.rs:19:12
@@ -91,11 +91,11 @@ LL |     panic!(C);
 help: add a "{}" format string to Display the message
    |
 LL |     panic!("{}", C);
-   |            ^^^^^
+   |            +++++
 help: or use std::panic::panic_any instead
    |
 LL |     std::panic::panic_any(C);
-   |     ^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~
 
 warning: panic message is not a string literal
   --> $DIR/non-fmt-panic.rs:20:12
@@ -108,11 +108,11 @@ LL |     panic!(S);
 help: add a "{}" format string to Display the message
    |
 LL |     panic!("{}", S);
-   |            ^^^^^
+   |            +++++
 help: or use std::panic::panic_any instead
    |
 LL |     std::panic::panic_any(S);
-   |     ^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~
 
 warning: panic message is not a string literal
   --> $DIR/non-fmt-panic.rs:21:17
@@ -125,11 +125,11 @@ LL |     std::panic!(123);
 help: add a "{}" format string to Display the message
    |
 LL |     std::panic!("{}", 123);
-   |                 ^^^^^
+   |                 +++++
 help: or use std::panic::panic_any instead
    |
 LL |     std::panic::panic_any(123);
-   |     ^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~
 
 warning: panic message is not a string literal
   --> $DIR/non-fmt-panic.rs:22:18
@@ -142,7 +142,7 @@ LL |     core::panic!(&*"abc");
 help: add a "{}" format string to Display the message
    |
 LL |     core::panic!("{}", &*"abc");
-   |                  ^^^^^
+   |                  +++++
 
 warning: panic message contains an unused formatting placeholder
   --> $DIR/non-fmt-panic.rs:23:12
@@ -154,11 +154,11 @@ LL |     panic!(concat!("{", "}"));
 help: add the missing argument
    |
 LL |     panic!(concat!("{", "}"), ...);
-   |                             ^^^^^
+   |                             +++++
 help: or add a "{}" format string to use the message literally
    |
 LL |     panic!("{}", concat!("{", "}"));
-   |            ^^^^^
+   |            +++++
 
 warning: panic message contains braces
   --> $DIR/non-fmt-panic.rs:24:5
@@ -170,7 +170,7 @@ LL |     panic!(concat!("{", "{"));
 help: add a "{}" format string to use the message literally
    |
 LL |     panic!("{}", concat!("{", "{"));
-   |            ^^^^^
+   |            +++++
 
 warning: panic message contains an unused formatting placeholder
   --> $DIR/non-fmt-panic.rs:26:37
@@ -200,11 +200,11 @@ LL |     panic!(a!());
 help: add a "{}" format string to Display the message
    |
 LL |     panic!("{}", a!());
-   |            ^^^^^
+   |            +++++
 help: or use std::panic::panic_any instead
    |
 LL |     std::panic::panic_any(a!());
-   |     ^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~
 
 warning: panic message is not a string literal
   --> $DIR/non-fmt-panic.rs:38:12
@@ -217,8 +217,9 @@ LL |     panic!(format!("{}", 1));
    = note: the panic!() macro supports formatting, so there's no need for the format!() macro here
 help: remove the `format!(..)` macro call
    |
-LL |     panic!("{}", 1);
-   |           --     --
+LL -     panic!(format!("{}", 1));
+LL +     panic!("{}", 1);
+   | 
 
 warning: panic message is not a string literal
   --> $DIR/non-fmt-panic.rs:39:20
@@ -231,8 +232,9 @@ LL |     assert!(false, format!("{}", 1));
    = note: the assert!() macro supports formatting, so there's no need for the format!() macro here
 help: remove the `format!(..)` macro call
    |
-LL |     assert!(false, "{}", 1);
-   |                   --     --
+LL -     assert!(false, format!("{}", 1));
+LL +     assert!(false, "{}", 1);
+   | 
 
 warning: panic message is not a string literal
   --> $DIR/non-fmt-panic.rs:40:26
@@ -245,8 +247,9 @@ LL |     debug_assert!(false, format!("{}", 1));
    = note: the debug_assert!() macro supports formatting, so there's no need for the format!() macro here
 help: remove the `format!(..)` macro call
    |
-LL |     debug_assert!(false, "{}", 1);
-   |                         --     --
+LL -     debug_assert!(false, format!("{}", 1));
+LL +     debug_assert!(false, "{}", 1);
+   | 
 
 warning: panic message is not a string literal
   --> $DIR/non-fmt-panic.rs:42:12
@@ -259,11 +262,11 @@ LL |     panic![123];
 help: add a "{}" format string to Display the message
    |
 LL |     panic!["{}", 123];
-   |            ^^^^^
+   |            +++++
 help: or use std::panic::panic_any instead
    |
 LL |     std::panic::panic_any(123);
-   |     ^^^^^^^^^^^^^^^^^^^^^^   ^
+   |     ~~~~~~~~~~~~~~~~~~~~~~   ~
 
 warning: panic message is not a string literal
   --> $DIR/non-fmt-panic.rs:43:12
@@ -276,11 +279,11 @@ LL |     panic!{123};
 help: add a "{}" format string to Display the message
    |
 LL |     panic!{"{}", 123};
-   |            ^^^^^
+   |            +++++
 help: or use std::panic::panic_any instead
    |
 LL |     std::panic::panic_any(123);
-   |     ^^^^^^^^^^^^^^^^^^^^^^   ^
+   |     ~~~~~~~~~~~~~~~~~~~~~~   ~
 
 warning: 20 warnings emitted
 
index 5a275d5d089b14ef2299f13de3649f0bd8fa0f8b..6732391e1a1fbda8e09a2b177c55ca3300096203 100644 (file)
@@ -7,7 +7,7 @@ LL | const C: i32 = 1i8;
 help: change the type of the numeric literal from `i8` to `i32`
    |
 LL | const C: i32 = 1i32;
-   |                ^^^^
+   |                ~~~~
 
 error[E0308]: mismatched types
   --> $DIR/const-scope.rs:2:15
@@ -26,7 +26,7 @@ LL |     let c: i32 = 1i8;
 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:6:17
@@ -47,7 +47,7 @@ LL |     let c: i32 = 1i8;
 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
@@ -60,7 +60,7 @@ LL |     let d: i8 = c;
 help: you can convert an `i32` to an `i8` and panic if the converted value doesn't fit
    |
 LL |     let d: i8 = c.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 6 previous errors
 
index 79b38b069863187fbb5c14f496d39ff621cb57a1..9a3248c5720dbf0f6dc5dd7eb4ac7e13aa99257d 100644 (file)
@@ -7,7 +7,7 @@ LL |     test(array.len());
 help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
    |
 LL |     test(array.len().try_into().unwrap());
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 858990fe59bd50e4fff77632a3f177fc8dfbb7cb..83d8ce5eea9ac57a98f120ec225cd86872ca95fb 100644 (file)
@@ -9,7 +9,7 @@ LL |     let x: u16 = foo();
 help: you can convert an `i32` to a `u16` and panic if the converted value doesn't fit
    |
 LL |     let x: u16 = foo().try_into().unwrap();
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-2.rs:7:18
index cb051aa1230212c26ebe7a162d432ea483eed076..b0ff50748fef1bd4e380dcf3a92690c410a9360b 100644 (file)
@@ -7,7 +7,7 @@ LL |         x_u8 > x_u16;
 help: you can convert `x_u8` from `u8` to `u16`, matching the type of `x_u16`
    |
 LL |         u16::from(x_u8) > x_u16;
-   |         ^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:25:16
@@ -18,7 +18,7 @@ LL |         x_u8 > x_u32;
 help: you can convert `x_u8` from `u8` to `u32`, matching the type of `x_u32`
    |
 LL |         u32::from(x_u8) > x_u32;
-   |         ^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:27:16
@@ -29,7 +29,7 @@ LL |         x_u8 > x_u64;
 help: you can convert `x_u8` from `u8` to `u64`, matching the type of `x_u64`
    |
 LL |         u64::from(x_u8) > x_u64;
-   |         ^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:29:16
@@ -40,7 +40,7 @@ LL |         x_u8 > x_u128;
 help: you can convert `x_u8` from `u8` to `u128`, matching the type of `x_u128`
    |
 LL |         u128::from(x_u8) > x_u128;
-   |         ^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:31:16
@@ -51,7 +51,7 @@ LL |         x_u8 > x_usize;
 help: you can convert `x_u8` from `u8` to `usize`, matching the type of `x_usize`
    |
 LL |         usize::from(x_u8) > x_usize;
-   |         ^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:34:17
@@ -71,7 +71,7 @@ LL |         x_u16 > x_u32;
 help: you can convert `x_u16` from `u16` to `u32`, matching the type of `x_u32`
    |
 LL |         u32::from(x_u16) > x_u32;
-   |         ^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:38:17
@@ -82,7 +82,7 @@ LL |         x_u16 > x_u64;
 help: you can convert `x_u16` from `u16` to `u64`, matching the type of `x_u64`
    |
 LL |         u64::from(x_u16) > x_u64;
-   |         ^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:40:17
@@ -93,7 +93,7 @@ LL |         x_u16 > x_u128;
 help: you can convert `x_u16` from `u16` to `u128`, matching the type of `x_u128`
    |
 LL |         u128::from(x_u16) > x_u128;
-   |         ^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:42:17
@@ -104,7 +104,7 @@ LL |         x_u16 > x_usize;
 help: you can convert `x_u16` from `u16` to `usize`, matching the type of `x_usize`
    |
 LL |         usize::from(x_u16) > x_usize;
-   |         ^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:45:17
@@ -133,7 +133,7 @@ LL |         x_u32 > x_u64;
 help: you can convert `x_u32` from `u32` to `u64`, matching the type of `x_u64`
    |
 LL |         u64::from(x_u32) > x_u64;
-   |         ^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:51:17
@@ -144,7 +144,7 @@ LL |         x_u32 > x_u128;
 help: you can convert `x_u32` from `u32` to `u128`, matching the type of `x_u128`
    |
 LL |         u128::from(x_u32) > x_u128;
-   |         ^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:53:17
@@ -155,7 +155,7 @@ LL |         x_u32 > x_usize;
 help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
    |
 LL |         x_u32 > x_usize.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:56:17
@@ -193,7 +193,7 @@ LL |         x_u64 > x_u128;
 help: you can convert `x_u64` from `u64` to `u128`, matching the type of `x_u128`
    |
 LL |         u128::from(x_u64) > x_u128;
-   |         ^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:64:17
@@ -204,7 +204,7 @@ LL |         x_u64 > x_usize;
 help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
    |
 LL |         x_u64 > x_usize.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:67:18
@@ -251,7 +251,7 @@ LL |         x_u128 > x_usize;
 help: you can convert a `usize` to a `u128` and panic if the converted value doesn't fit
    |
 LL |         x_u128 > x_usize.try_into().unwrap();
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:78:19
@@ -280,7 +280,7 @@ LL |         x_usize > x_u32;
 help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
    |
 LL |         x_usize > x_u32.try_into().unwrap();
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                   ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:84:19
@@ -291,7 +291,7 @@ LL |         x_usize > x_u64;
 help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit
    |
 LL |         x_usize > x_u64.try_into().unwrap();
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                   ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:86:19
@@ -302,7 +302,7 @@ LL |         x_usize > x_u128;
 help: you can convert a `u128` to a `usize` and panic if the converted value doesn't fit
    |
 LL |         x_usize > x_u128.try_into().unwrap();
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:92:16
@@ -313,7 +313,7 @@ LL |         x_i8 > x_i16;
 help: you can convert `x_i8` from `i8` to `i16`, matching the type of `x_i16`
    |
 LL |         i16::from(x_i8) > x_i16;
-   |         ^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:94:16
@@ -324,7 +324,7 @@ LL |         x_i8 > x_i32;
 help: you can convert `x_i8` from `i8` to `i32`, matching the type of `x_i32`
    |
 LL |         i32::from(x_i8) > x_i32;
-   |         ^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:96:16
@@ -335,7 +335,7 @@ LL |         x_i8 > x_i64;
 help: you can convert `x_i8` from `i8` to `i64`, matching the type of `x_i64`
    |
 LL |         i64::from(x_i8) > x_i64;
-   |         ^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:98:16
@@ -346,7 +346,7 @@ LL |         x_i8 > x_i128;
 help: you can convert `x_i8` from `i8` to `i128`, matching the type of `x_i128`
    |
 LL |         i128::from(x_i8) > x_i128;
-   |         ^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:100:16
@@ -357,7 +357,7 @@ LL |         x_i8 > x_isize;
 help: you can convert `x_i8` from `i8` to `isize`, matching the type of `x_isize`
    |
 LL |         isize::from(x_i8) > x_isize;
-   |         ^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:103:17
@@ -377,7 +377,7 @@ LL |         x_i16 > x_i32;
 help: you can convert `x_i16` from `i16` to `i32`, matching the type of `x_i32`
    |
 LL |         i32::from(x_i16) > x_i32;
-   |         ^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:107:17
@@ -388,7 +388,7 @@ LL |         x_i16 > x_i64;
 help: you can convert `x_i16` from `i16` to `i64`, matching the type of `x_i64`
    |
 LL |         i64::from(x_i16) > x_i64;
-   |         ^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:109:17
@@ -399,7 +399,7 @@ LL |         x_i16 > x_i128;
 help: you can convert `x_i16` from `i16` to `i128`, matching the type of `x_i128`
    |
 LL |         i128::from(x_i16) > x_i128;
-   |         ^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:111:17
@@ -410,7 +410,7 @@ LL |         x_i16 > x_isize;
 help: you can convert `x_i16` from `i16` to `isize`, matching the type of `x_isize`
    |
 LL |         isize::from(x_i16) > x_isize;
-   |         ^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:114:17
@@ -439,7 +439,7 @@ LL |         x_i32 > x_i64;
 help: you can convert `x_i32` from `i32` to `i64`, matching the type of `x_i64`
    |
 LL |         i64::from(x_i32) > x_i64;
-   |         ^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:120:17
@@ -450,7 +450,7 @@ LL |         x_i32 > x_i128;
 help: you can convert `x_i32` from `i32` to `i128`, matching the type of `x_i128`
    |
 LL |         i128::from(x_i32) > x_i128;
-   |         ^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:122:17
@@ -461,7 +461,7 @@ LL |         x_i32 > x_isize;
 help: you can convert an `isize` to an `i32` and panic if the converted value doesn't fit
    |
 LL |         x_i32 > x_isize.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:125:17
@@ -499,7 +499,7 @@ LL |         x_i64 > x_i128;
 help: you can convert `x_i64` from `i64` to `i128`, matching the type of `x_i128`
    |
 LL |         i128::from(x_i64) > x_i128;
-   |         ^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:133:17
@@ -510,7 +510,7 @@ LL |         x_i64 > x_isize;
 help: you can convert an `isize` to an `i64` and panic if the converted value doesn't fit
    |
 LL |         x_i64 > x_isize.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:136:18
@@ -557,7 +557,7 @@ LL |         x_i128 > x_isize;
 help: you can convert an `isize` to an `i128` and panic if the converted value doesn't fit
    |
 LL |         x_i128 > x_isize.try_into().unwrap();
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:147:19
@@ -586,7 +586,7 @@ LL |         x_isize > x_i32;
 help: you can convert an `i32` to an `isize` and panic if the converted value doesn't fit
    |
 LL |         x_isize > x_i32.try_into().unwrap();
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                   ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:153:19
@@ -597,7 +597,7 @@ LL |         x_isize > x_i64;
 help: you can convert an `i64` to an `isize` and panic if the converted value doesn't fit
    |
 LL |         x_isize > x_i64.try_into().unwrap();
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                   ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:155:19
@@ -608,7 +608,7 @@ LL |         x_isize > x_i128;
 help: you can convert an `i128` to an `isize` and panic if the converted value doesn't fit
    |
 LL |         x_isize > x_i128.try_into().unwrap();
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:161:16
@@ -619,7 +619,7 @@ LL |         x_u8 > x_i8;
 help: you can convert an `i8` to a `u8` and panic if the converted value doesn't fit
    |
 LL |         x_u8 > x_i8.try_into().unwrap();
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:163:16
@@ -630,7 +630,7 @@ LL |         x_u8 > x_i16;
 help: you can convert `x_u8` from `u8` to `i16`, matching the type of `x_i16`
    |
 LL |         i16::from(x_u8) > x_i16;
-   |         ^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:165:16
@@ -641,7 +641,7 @@ LL |         x_u8 > x_i32;
 help: you can convert `x_u8` from `u8` to `i32`, matching the type of `x_i32`
    |
 LL |         i32::from(x_u8) > x_i32;
-   |         ^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:167:16
@@ -652,7 +652,7 @@ LL |         x_u8 > x_i64;
 help: you can convert `x_u8` from `u8` to `i64`, matching the type of `x_i64`
    |
 LL |         i64::from(x_u8) > x_i64;
-   |         ^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:169:16
@@ -663,7 +663,7 @@ LL |         x_u8 > x_i128;
 help: you can convert `x_u8` from `u8` to `i128`, matching the type of `x_i128`
    |
 LL |         i128::from(x_u8) > x_i128;
-   |         ^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:171:16
@@ -674,7 +674,7 @@ LL |         x_u8 > x_isize;
 help: you can convert `x_u8` from `u8` to `isize`, matching the type of `x_isize`
    |
 LL |         isize::from(x_u8) > x_isize;
-   |         ^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:174:17
@@ -685,7 +685,7 @@ LL |         x_u16 > x_i8;
 help: you can convert an `i8` to a `u16` and panic if the converted value doesn't fit
    |
 LL |         x_u16 > x_i8.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:176:17
@@ -696,7 +696,7 @@ LL |         x_u16 > x_i16;
 help: you can convert an `i16` to a `u16` and panic if the converted value doesn't fit
    |
 LL |         x_u16 > x_i16.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:178:17
@@ -707,7 +707,7 @@ LL |         x_u16 > x_i32;
 help: you can convert `x_u16` from `u16` to `i32`, matching the type of `x_i32`
    |
 LL |         i32::from(x_u16) > x_i32;
-   |         ^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:180:17
@@ -718,7 +718,7 @@ LL |         x_u16 > x_i64;
 help: you can convert `x_u16` from `u16` to `i64`, matching the type of `x_i64`
    |
 LL |         i64::from(x_u16) > x_i64;
-   |         ^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:182:17
@@ -729,7 +729,7 @@ LL |         x_u16 > x_i128;
 help: you can convert `x_u16` from `u16` to `i128`, matching the type of `x_i128`
    |
 LL |         i128::from(x_u16) > x_i128;
-   |         ^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:184:17
@@ -740,7 +740,7 @@ LL |         x_u16 > x_isize;
 help: you can convert an `isize` to a `u16` and panic if the converted value doesn't fit
    |
 LL |         x_u16 > x_isize.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:187:17
@@ -751,7 +751,7 @@ LL |         x_u32 > x_i8;
 help: you can convert an `i8` to a `u32` and panic if the converted value doesn't fit
    |
 LL |         x_u32 > x_i8.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:189:17
@@ -762,7 +762,7 @@ LL |         x_u32 > x_i16;
 help: you can convert an `i16` to a `u32` and panic if the converted value doesn't fit
    |
 LL |         x_u32 > x_i16.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:191:17
@@ -773,7 +773,7 @@ LL |         x_u32 > x_i32;
 help: you can convert an `i32` to a `u32` and panic if the converted value doesn't fit
    |
 LL |         x_u32 > x_i32.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:193:17
@@ -784,7 +784,7 @@ LL |         x_u32 > x_i64;
 help: you can convert `x_u32` from `u32` to `i64`, matching the type of `x_i64`
    |
 LL |         i64::from(x_u32) > x_i64;
-   |         ^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:195:17
@@ -795,7 +795,7 @@ LL |         x_u32 > x_i128;
 help: you can convert `x_u32` from `u32` to `i128`, matching the type of `x_i128`
    |
 LL |         i128::from(x_u32) > x_i128;
-   |         ^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:197:17
@@ -806,7 +806,7 @@ LL |         x_u32 > x_isize;
 help: you can convert an `isize` to a `u32` and panic if the converted value doesn't fit
    |
 LL |         x_u32 > x_isize.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:200:17
@@ -817,7 +817,7 @@ LL |         x_u64 > x_i8;
 help: you can convert an `i8` to a `u64` and panic if the converted value doesn't fit
    |
 LL |         x_u64 > x_i8.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:202:17
@@ -828,7 +828,7 @@ LL |         x_u64 > x_i16;
 help: you can convert an `i16` to a `u64` and panic if the converted value doesn't fit
    |
 LL |         x_u64 > x_i16.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:204:17
@@ -839,7 +839,7 @@ LL |         x_u64 > x_i32;
 help: you can convert an `i32` to a `u64` and panic if the converted value doesn't fit
    |
 LL |         x_u64 > x_i32.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:206:17
@@ -850,7 +850,7 @@ LL |         x_u64 > x_i64;
 help: you can convert an `i64` to a `u64` and panic if the converted value doesn't fit
    |
 LL |         x_u64 > x_i64.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:208:17
@@ -861,7 +861,7 @@ LL |         x_u64 > x_i128;
 help: you can convert `x_u64` from `u64` to `i128`, matching the type of `x_i128`
    |
 LL |         i128::from(x_u64) > x_i128;
-   |         ^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:210:17
@@ -872,7 +872,7 @@ LL |         x_u64 > x_isize;
 help: you can convert an `isize` to a `u64` and panic if the converted value doesn't fit
    |
 LL |         x_u64 > x_isize.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:213:18
@@ -883,7 +883,7 @@ LL |         x_u128 > x_i8;
 help: you can convert an `i8` to a `u128` and panic if the converted value doesn't fit
    |
 LL |         x_u128 > x_i8.try_into().unwrap();
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:215:18
@@ -894,7 +894,7 @@ LL |         x_u128 > x_i16;
 help: you can convert an `i16` to a `u128` and panic if the converted value doesn't fit
    |
 LL |         x_u128 > x_i16.try_into().unwrap();
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:217:18
@@ -905,7 +905,7 @@ LL |         x_u128 > x_i32;
 help: you can convert an `i32` to a `u128` and panic if the converted value doesn't fit
    |
 LL |         x_u128 > x_i32.try_into().unwrap();
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:219:18
@@ -916,7 +916,7 @@ LL |         x_u128 > x_i64;
 help: you can convert an `i64` to a `u128` and panic if the converted value doesn't fit
    |
 LL |         x_u128 > x_i64.try_into().unwrap();
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:221:18
@@ -927,7 +927,7 @@ LL |         x_u128 > x_i128;
 help: you can convert an `i128` to a `u128` and panic if the converted value doesn't fit
    |
 LL |         x_u128 > x_i128.try_into().unwrap();
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:223:18
@@ -938,7 +938,7 @@ LL |         x_u128 > x_isize;
 help: you can convert an `isize` to a `u128` and panic if the converted value doesn't fit
    |
 LL |         x_u128 > x_isize.try_into().unwrap();
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:226:19
@@ -949,7 +949,7 @@ LL |         x_usize > x_i8;
 help: you can convert an `i8` to a `usize` and panic if the converted value doesn't fit
    |
 LL |         x_usize > x_i8.try_into().unwrap();
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^
+   |                   ~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:228:19
@@ -960,7 +960,7 @@ LL |         x_usize > x_i16;
 help: you can convert an `i16` to a `usize` and panic if the converted value doesn't fit
    |
 LL |         x_usize > x_i16.try_into().unwrap();
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                   ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:230:19
@@ -971,7 +971,7 @@ LL |         x_usize > x_i32;
 help: you can convert an `i32` to a `usize` and panic if the converted value doesn't fit
    |
 LL |         x_usize > x_i32.try_into().unwrap();
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                   ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:232:19
@@ -982,7 +982,7 @@ LL |         x_usize > x_i64;
 help: you can convert an `i64` to a `usize` and panic if the converted value doesn't fit
    |
 LL |         x_usize > x_i64.try_into().unwrap();
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                   ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:234:19
@@ -993,7 +993,7 @@ LL |         x_usize > x_i128;
 help: you can convert an `i128` to a `usize` and panic if the converted value doesn't fit
    |
 LL |         x_usize > x_i128.try_into().unwrap();
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:236:19
@@ -1004,7 +1004,7 @@ LL |         x_usize > x_isize;
 help: you can convert an `isize` to a `usize` and panic if the converted value doesn't fit
    |
 LL |         x_usize > x_isize.try_into().unwrap();
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:242:16
@@ -1015,7 +1015,7 @@ LL |         x_i8 > x_u8;
 help: you can convert a `u8` to an `i8` and panic if the converted value doesn't fit
    |
 LL |         x_i8 > x_u8.try_into().unwrap();
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:244:16
@@ -1026,7 +1026,7 @@ LL |         x_i8 > x_u16;
 help: you can convert a `u16` to an `i8` and panic if the converted value doesn't fit
    |
 LL |         x_i8 > x_u16.try_into().unwrap();
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:246:16
@@ -1037,7 +1037,7 @@ LL |         x_i8 > x_u32;
 help: you can convert a `u32` to an `i8` and panic if the converted value doesn't fit
    |
 LL |         x_i8 > x_u32.try_into().unwrap();
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:248:16
@@ -1048,7 +1048,7 @@ LL |         x_i8 > x_u64;
 help: you can convert a `u64` to an `i8` and panic if the converted value doesn't fit
    |
 LL |         x_i8 > x_u64.try_into().unwrap();
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:250:16
@@ -1059,7 +1059,7 @@ LL |         x_i8 > x_u128;
 help: you can convert a `u128` to an `i8` and panic if the converted value doesn't fit
    |
 LL |         x_i8 > x_u128.try_into().unwrap();
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:252:16
@@ -1070,7 +1070,7 @@ LL |         x_i8 > x_usize;
 help: you can convert a `usize` to an `i8` and panic if the converted value doesn't fit
    |
 LL |         x_i8 > x_usize.try_into().unwrap();
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:255:17
@@ -1090,7 +1090,7 @@ LL |         x_i16 > x_u16;
 help: you can convert a `u16` to an `i16` and panic if the converted value doesn't fit
    |
 LL |         x_i16 > x_u16.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:259:17
@@ -1101,7 +1101,7 @@ LL |         x_i16 > x_u32;
 help: you can convert a `u32` to an `i16` and panic if the converted value doesn't fit
    |
 LL |         x_i16 > x_u32.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:261:17
@@ -1112,7 +1112,7 @@ LL |         x_i16 > x_u64;
 help: you can convert a `u64` to an `i16` and panic if the converted value doesn't fit
    |
 LL |         x_i16 > x_u64.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:263:17
@@ -1123,7 +1123,7 @@ LL |         x_i16 > x_u128;
 help: you can convert a `u128` to an `i16` and panic if the converted value doesn't fit
    |
 LL |         x_i16 > x_u128.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:265:17
@@ -1134,7 +1134,7 @@ LL |         x_i16 > x_usize;
 help: you can convert a `usize` to an `i16` and panic if the converted value doesn't fit
    |
 LL |         x_i16 > x_usize.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:268:17
@@ -1163,7 +1163,7 @@ LL |         x_i32 > x_u32;
 help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
    |
 LL |         x_i32 > x_u32.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:274:17
@@ -1174,7 +1174,7 @@ LL |         x_i32 > x_u64;
 help: you can convert a `u64` to an `i32` and panic if the converted value doesn't fit
    |
 LL |         x_i32 > x_u64.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:276:17
@@ -1185,7 +1185,7 @@ LL |         x_i32 > x_u128;
 help: you can convert a `u128` to an `i32` and panic if the converted value doesn't fit
    |
 LL |         x_i32 > x_u128.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:278:17
@@ -1196,7 +1196,7 @@ LL |         x_i32 > x_usize;
 help: you can convert a `usize` to an `i32` and panic if the converted value doesn't fit
    |
 LL |         x_i32 > x_usize.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:281:17
@@ -1234,7 +1234,7 @@ LL |         x_i64 > x_u64;
 help: you can convert a `u64` to an `i64` and panic if the converted value doesn't fit
    |
 LL |         x_i64 > x_u64.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:289:17
@@ -1245,7 +1245,7 @@ LL |         x_i64 > x_u128;
 help: you can convert a `u128` to an `i64` and panic if the converted value doesn't fit
    |
 LL |         x_i64 > x_u128.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:291:17
@@ -1256,7 +1256,7 @@ LL |         x_i64 > x_usize;
 help: you can convert a `usize` to an `i64` and panic if the converted value doesn't fit
    |
 LL |         x_i64 > x_usize.try_into().unwrap();
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:294:18
@@ -1303,7 +1303,7 @@ LL |         x_i128 > x_u128;
 help: you can convert a `u128` to an `i128` and panic if the converted value doesn't fit
    |
 LL |         x_i128 > x_u128.try_into().unwrap();
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:304:18
@@ -1314,7 +1314,7 @@ LL |         x_i128 > x_usize;
 help: you can convert a `usize` to an `i128` and panic if the converted value doesn't fit
    |
 LL |         x_i128 > x_usize.try_into().unwrap();
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:307:19
@@ -1334,7 +1334,7 @@ LL |         x_isize > x_u16;
 help: you can convert a `u16` to an `isize` and panic if the converted value doesn't fit
    |
 LL |         x_isize > x_u16.try_into().unwrap();
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                   ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:311:19
@@ -1345,7 +1345,7 @@ LL |         x_isize > x_u32;
 help: you can convert a `u32` to an `isize` and panic if the converted value doesn't fit
    |
 LL |         x_isize > x_u32.try_into().unwrap();
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                   ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:313:19
@@ -1356,7 +1356,7 @@ LL |         x_isize > x_u64;
 help: you can convert a `u64` to an `isize` and panic if the converted value doesn't fit
    |
 LL |         x_isize > x_u64.try_into().unwrap();
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                   ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:315:19
@@ -1367,7 +1367,7 @@ LL |         x_isize > x_u128;
 help: you can convert a `u128` to an `isize` and panic if the converted value doesn't fit
    |
 LL |         x_isize > x_u128.try_into().unwrap();
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-binop.rs:317:19
@@ -1378,7 +1378,7 @@ LL |         x_isize > x_usize;
 help: you can convert a `usize` to an `isize` and panic if the converted value doesn't fit
    |
 LL |         x_isize > x_usize.try_into().unwrap();
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 132 previous errors
 
index 4852e7047b47a3c5db48e13f4c88a101eb0a7983..4510ce10b3dc48b475d04342334128b98055d75a 100644 (file)
@@ -47,7 +47,7 @@ LL |     x_u8 > -1_isize;
 help: you can convert `x_u8` from `u8` to `isize`, matching the type of `-1_isize`
    |
 LL |     isize::from(x_u8) > -1_isize;
-   |     ^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-no-fix.rs:23:15
@@ -74,7 +74,7 @@ LL |     x_u64 > -1_i128;
 help: you can convert `x_u64` from `u64` to `i128`, matching the type of `-1_i128`
    |
 LL |     i128::from(x_u64) > -1_i128;
-   |     ^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-no-fix.rs:29:13
@@ -85,7 +85,7 @@ LL |     x_u32 > -1_i128;
 help: you can convert `x_u32` from `u32` to `i128`, matching the type of `-1_i128`
    |
 LL |     i128::from(x_u32) > -1_i128;
-   |     ^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-no-fix.rs:31:13
@@ -96,7 +96,7 @@ LL |     x_u16 > -1_i128;
 help: you can convert `x_u16` from `u16` to `i128`, matching the type of `-1_i128`
    |
 LL |     i128::from(x_u16) > -1_i128;
-   |     ^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-no-fix.rs:33:12
@@ -107,7 +107,7 @@ LL |     x_u8 > -1_i128;
 help: you can convert `x_u8` from `u8` to `i128`, matching the type of `-1_i128`
    |
 LL |     i128::from(x_u8) > -1_i128;
-   |     ^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-no-fix.rs:36:15
@@ -142,7 +142,7 @@ LL |     x_u32 > -1_i64;
 help: you can convert `x_u32` from `u32` to `i64`, matching the type of `-1_i64`
    |
 LL |     i64::from(x_u32) > -1_i64;
-   |     ^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-no-fix.rs:44:13
@@ -153,7 +153,7 @@ LL |     x_u16 > -1_i64;
 help: you can convert `x_u16` from `u16` to `i64`, matching the type of `-1_i64`
    |
 LL |     i64::from(x_u16) > -1_i64;
-   |     ^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-no-fix.rs:46:12
@@ -164,7 +164,7 @@ LL |     x_u8 > -1_i64;
 help: you can convert `x_u8` from `u8` to `i64`, matching the type of `-1_i64`
    |
 LL |     i64::from(x_u8) > -1_i64;
-   |     ^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-no-fix.rs:49:15
@@ -207,7 +207,7 @@ LL |     x_u16 > -1_i32;
 help: you can convert `x_u16` from `u16` to `i32`, matching the type of `-1_i32`
    |
 LL |     i32::from(x_u16) > -1_i32;
-   |     ^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-no-fix.rs:59:12
@@ -218,7 +218,7 @@ LL |     x_u8 > -1_i32;
 help: you can convert `x_u8` from `u8` to `i32`, matching the type of `-1_i32`
    |
 LL |     i32::from(x_u8) > -1_i32;
-   |     ^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-no-fix.rs:62:15
@@ -269,7 +269,7 @@ LL |     x_u8 > -1_i16;
 help: you can convert `x_u8` from `u8` to `i16`, matching the type of `-1_i16`
    |
 LL |     i16::from(x_u8) > -1_i16;
-   |     ^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-no-fix.rs:75:15
index ffd6368bac15faad009235f265822e2fe0b8faf0..8bc617be57313a6c42aacf72ac6db687f6f4567e 100644 (file)
@@ -7,7 +7,7 @@ LL |     foo::<usize>(x_u64);
 help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit
    |
 LL |     foo::<usize>(x_u64.try_into().unwrap());
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:25:18
@@ -18,7 +18,7 @@ LL |     foo::<usize>(x_u32);
 help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
    |
 LL |     foo::<usize>(x_u32.try_into().unwrap());
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:27:18
@@ -47,7 +47,7 @@ LL |     foo::<usize>(x_isize);
 help: you can convert an `isize` to a `usize` and panic if the converted value doesn't fit
    |
 LL |     foo::<usize>(x_isize.try_into().unwrap());
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:33:18
@@ -58,7 +58,7 @@ LL |     foo::<usize>(x_i64);
 help: you can convert an `i64` to a `usize` and panic if the converted value doesn't fit
    |
 LL |     foo::<usize>(x_i64.try_into().unwrap());
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:35:18
@@ -69,7 +69,7 @@ LL |     foo::<usize>(x_i32);
 help: you can convert an `i32` to a `usize` and panic if the converted value doesn't fit
    |
 LL |     foo::<usize>(x_i32.try_into().unwrap());
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:37:18
@@ -80,7 +80,7 @@ LL |     foo::<usize>(x_i16);
 help: you can convert an `i16` to a `usize` and panic if the converted value doesn't fit
    |
 LL |     foo::<usize>(x_i16.try_into().unwrap());
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:39:18
@@ -91,7 +91,7 @@ LL |     foo::<usize>(x_i8);
 help: you can convert an `i8` to a `usize` and panic if the converted value doesn't fit
    |
 LL |     foo::<usize>(x_i8.try_into().unwrap());
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:44:18
@@ -102,7 +102,7 @@ LL |     foo::<isize>(x_usize);
 help: you can convert a `usize` to an `isize` and panic if the converted value doesn't fit
    |
 LL |     foo::<isize>(x_usize.try_into().unwrap());
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:46:18
@@ -113,7 +113,7 @@ LL |     foo::<isize>(x_u64);
 help: you can convert a `u64` to an `isize` and panic if the converted value doesn't fit
    |
 LL |     foo::<isize>(x_u64.try_into().unwrap());
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:48:18
@@ -124,7 +124,7 @@ LL |     foo::<isize>(x_u32);
 help: you can convert a `u32` to an `isize` and panic if the converted value doesn't fit
    |
 LL |     foo::<isize>(x_u32.try_into().unwrap());
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:50:18
@@ -135,7 +135,7 @@ LL |     foo::<isize>(x_u16);
 help: you can convert a `u16` to an `isize` and panic if the converted value doesn't fit
    |
 LL |     foo::<isize>(x_u16.try_into().unwrap());
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:52:18
@@ -155,7 +155,7 @@ LL |     foo::<isize>(x_i64);
 help: you can convert an `i64` to an `isize` and panic if the converted value doesn't fit
    |
 LL |     foo::<isize>(x_i64.try_into().unwrap());
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:57:18
@@ -166,7 +166,7 @@ LL |     foo::<isize>(x_i32);
 help: you can convert an `i32` to an `isize` and panic if the converted value doesn't fit
    |
 LL |     foo::<isize>(x_i32.try_into().unwrap());
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:59:18
@@ -195,7 +195,7 @@ LL |     foo::<u64>(x_usize);
 help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
    |
 LL |     foo::<u64>(x_usize.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:69:16
@@ -233,7 +233,7 @@ LL |     foo::<u64>(x_isize);
 help: you can convert an `isize` to a `u64` and panic if the converted value doesn't fit
    |
 LL |     foo::<u64>(x_isize.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:77:16
@@ -244,7 +244,7 @@ LL |     foo::<u64>(x_i64);
 help: you can convert an `i64` to a `u64` and panic if the converted value doesn't fit
    |
 LL |     foo::<u64>(x_i64.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:79:16
@@ -255,7 +255,7 @@ LL |     foo::<u64>(x_i32);
 help: you can convert an `i32` to a `u64` and panic if the converted value doesn't fit
    |
 LL |     foo::<u64>(x_i32.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:81:16
@@ -266,7 +266,7 @@ LL |     foo::<u64>(x_i16);
 help: you can convert an `i16` to a `u64` and panic if the converted value doesn't fit
    |
 LL |     foo::<u64>(x_i16.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:83:16
@@ -277,7 +277,7 @@ LL |     foo::<u64>(x_i8);
 help: you can convert an `i8` to a `u64` and panic if the converted value doesn't fit
    |
 LL |     foo::<u64>(x_i8.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:88:16
@@ -288,7 +288,7 @@ LL |     foo::<i64>(x_usize);
 help: you can convert a `usize` to an `i64` and panic if the converted value doesn't fit
    |
 LL |     foo::<i64>(x_usize.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:90:16
@@ -299,7 +299,7 @@ LL |     foo::<i64>(x_u64);
 help: you can convert a `u64` to an `i64` and panic if the converted value doesn't fit
    |
 LL |     foo::<i64>(x_u64.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:92:16
@@ -337,7 +337,7 @@ LL |     foo::<i64>(x_isize);
 help: you can convert an `isize` to an `i64` and panic if the converted value doesn't fit
    |
 LL |     foo::<i64>(x_isize.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:101:16
@@ -375,7 +375,7 @@ LL |     foo::<u32>(x_usize);
 help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
    |
 LL |     foo::<u32>(x_usize.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:112:16
@@ -386,7 +386,7 @@ LL |     foo::<u32>(x_u64);
 help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
    |
 LL |     foo::<u32>(x_u64.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:115:16
@@ -415,7 +415,7 @@ LL |     foo::<u32>(x_isize);
 help: you can convert an `isize` to a `u32` and panic if the converted value doesn't fit
    |
 LL |     foo::<u32>(x_isize.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:121:16
@@ -426,7 +426,7 @@ LL |     foo::<u32>(x_i64);
 help: you can convert an `i64` to a `u32` and panic if the converted value doesn't fit
    |
 LL |     foo::<u32>(x_i64.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:123:16
@@ -437,7 +437,7 @@ LL |     foo::<u32>(x_i32);
 help: you can convert an `i32` to a `u32` and panic if the converted value doesn't fit
    |
 LL |     foo::<u32>(x_i32.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:125:16
@@ -448,7 +448,7 @@ LL |     foo::<u32>(x_i16);
 help: you can convert an `i16` to a `u32` and panic if the converted value doesn't fit
    |
 LL |     foo::<u32>(x_i16.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:127:16
@@ -459,7 +459,7 @@ LL |     foo::<u32>(x_i8);
 help: you can convert an `i8` to a `u32` and panic if the converted value doesn't fit
    |
 LL |     foo::<u32>(x_i8.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:132:16
@@ -470,7 +470,7 @@ LL |     foo::<i32>(x_usize);
 help: you can convert a `usize` to an `i32` and panic if the converted value doesn't fit
    |
 LL |     foo::<i32>(x_usize.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:134:16
@@ -481,7 +481,7 @@ LL |     foo::<i32>(x_u64);
 help: you can convert a `u64` to an `i32` and panic if the converted value doesn't fit
    |
 LL |     foo::<i32>(x_u64.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:136:16
@@ -492,7 +492,7 @@ LL |     foo::<i32>(x_u32);
 help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
    |
 LL |     foo::<i32>(x_u32.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:138:16
@@ -521,7 +521,7 @@ LL |     foo::<i32>(x_isize);
 help: you can convert an `isize` to an `i32` and panic if the converted value doesn't fit
    |
 LL |     foo::<i32>(x_isize.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:144:16
@@ -532,7 +532,7 @@ LL |     foo::<i32>(x_i64);
 help: you can convert an `i64` to an `i32` and panic if the converted value doesn't fit
    |
 LL |     foo::<i32>(x_i64.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:147:16
@@ -561,7 +561,7 @@ LL |     foo::<u16>(x_usize);
 help: you can convert a `usize` to a `u16` and panic if the converted value doesn't fit
    |
 LL |     foo::<u16>(x_usize.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:156:16
@@ -572,7 +572,7 @@ LL |     foo::<u16>(x_u64);
 help: you can convert a `u64` to a `u16` and panic if the converted value doesn't fit
    |
 LL |     foo::<u16>(x_u64.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:158:16
@@ -583,7 +583,7 @@ LL |     foo::<u16>(x_u32);
 help: you can convert a `u32` to a `u16` and panic if the converted value doesn't fit
    |
 LL |     foo::<u16>(x_u32.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:161:16
@@ -603,7 +603,7 @@ LL |     foo::<u16>(x_isize);
 help: you can convert an `isize` to a `u16` and panic if the converted value doesn't fit
    |
 LL |     foo::<u16>(x_isize.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:165:16
@@ -614,7 +614,7 @@ LL |     foo::<u16>(x_i64);
 help: you can convert an `i64` to a `u16` and panic if the converted value doesn't fit
    |
 LL |     foo::<u16>(x_i64.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:167:16
@@ -625,7 +625,7 @@ LL |     foo::<u16>(x_i32);
 help: you can convert an `i32` to a `u16` and panic if the converted value doesn't fit
    |
 LL |     foo::<u16>(x_i32.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:169:16
@@ -636,7 +636,7 @@ LL |     foo::<u16>(x_i16);
 help: you can convert an `i16` to a `u16` and panic if the converted value doesn't fit
    |
 LL |     foo::<u16>(x_i16.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:171:16
@@ -647,7 +647,7 @@ LL |     foo::<u16>(x_i8);
 help: you can convert an `i8` to a `u16` and panic if the converted value doesn't fit
    |
 LL |     foo::<u16>(x_i8.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:176:16
@@ -658,7 +658,7 @@ LL |     foo::<i16>(x_usize);
 help: you can convert a `usize` to an `i16` and panic if the converted value doesn't fit
    |
 LL |     foo::<i16>(x_usize.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:178:16
@@ -669,7 +669,7 @@ LL |     foo::<i16>(x_u64);
 help: you can convert a `u64` to an `i16` and panic if the converted value doesn't fit
    |
 LL |     foo::<i16>(x_u64.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:180:16
@@ -680,7 +680,7 @@ LL |     foo::<i16>(x_u32);
 help: you can convert a `u32` to an `i16` and panic if the converted value doesn't fit
    |
 LL |     foo::<i16>(x_u32.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:182:16
@@ -691,7 +691,7 @@ LL |     foo::<i16>(x_u16);
 help: you can convert a `u16` to an `i16` and panic if the converted value doesn't fit
    |
 LL |     foo::<i16>(x_u16.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:184:16
@@ -711,7 +711,7 @@ LL |     foo::<i16>(x_isize);
 help: you can convert an `isize` to an `i16` and panic if the converted value doesn't fit
    |
 LL |     foo::<i16>(x_isize.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:188:16
@@ -722,7 +722,7 @@ LL |     foo::<i16>(x_i64);
 help: you can convert an `i64` to an `i16` and panic if the converted value doesn't fit
    |
 LL |     foo::<i16>(x_i64.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:190:16
@@ -733,7 +733,7 @@ LL |     foo::<i16>(x_i32);
 help: you can convert an `i32` to an `i16` and panic if the converted value doesn't fit
    |
 LL |     foo::<i16>(x_i32.try_into().unwrap());
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:193:16
@@ -753,7 +753,7 @@ LL |     foo::<u8>(x_usize);
 help: you can convert a `usize` to a `u8` and panic if the converted value doesn't fit
    |
 LL |     foo::<u8>(x_usize.try_into().unwrap());
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:200:15
@@ -764,7 +764,7 @@ LL |     foo::<u8>(x_u64);
 help: you can convert a `u64` to a `u8` and panic if the converted value doesn't fit
    |
 LL |     foo::<u8>(x_u64.try_into().unwrap());
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |               ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:202:15
@@ -775,7 +775,7 @@ LL |     foo::<u8>(x_u32);
 help: you can convert a `u32` to a `u8` and panic if the converted value doesn't fit
    |
 LL |     foo::<u8>(x_u32.try_into().unwrap());
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |               ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:204:15
@@ -786,7 +786,7 @@ LL |     foo::<u8>(x_u16);
 help: you can convert a `u16` to a `u8` and panic if the converted value doesn't fit
    |
 LL |     foo::<u8>(x_u16.try_into().unwrap());
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |               ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:207:15
@@ -797,7 +797,7 @@ LL |     foo::<u8>(x_isize);
 help: you can convert an `isize` to a `u8` and panic if the converted value doesn't fit
    |
 LL |     foo::<u8>(x_isize.try_into().unwrap());
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:209:15
@@ -808,7 +808,7 @@ LL |     foo::<u8>(x_i64);
 help: you can convert an `i64` to a `u8` and panic if the converted value doesn't fit
    |
 LL |     foo::<u8>(x_i64.try_into().unwrap());
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |               ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:211:15
@@ -819,7 +819,7 @@ LL |     foo::<u8>(x_i32);
 help: you can convert an `i32` to a `u8` and panic if the converted value doesn't fit
    |
 LL |     foo::<u8>(x_i32.try_into().unwrap());
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |               ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:213:15
@@ -830,7 +830,7 @@ LL |     foo::<u8>(x_i16);
 help: you can convert an `i16` to a `u8` and panic if the converted value doesn't fit
    |
 LL |     foo::<u8>(x_i16.try_into().unwrap());
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |               ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:215:15
@@ -841,7 +841,7 @@ LL |     foo::<u8>(x_i8);
 help: you can convert an `i8` to a `u8` and panic if the converted value doesn't fit
    |
 LL |     foo::<u8>(x_i8.try_into().unwrap());
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^
+   |               ~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:220:15
@@ -852,7 +852,7 @@ LL |     foo::<i8>(x_usize);
 help: you can convert a `usize` to an `i8` and panic if the converted value doesn't fit
    |
 LL |     foo::<i8>(x_usize.try_into().unwrap());
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:222:15
@@ -863,7 +863,7 @@ LL |     foo::<i8>(x_u64);
 help: you can convert a `u64` to an `i8` and panic if the converted value doesn't fit
    |
 LL |     foo::<i8>(x_u64.try_into().unwrap());
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |               ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:224:15
@@ -874,7 +874,7 @@ LL |     foo::<i8>(x_u32);
 help: you can convert a `u32` to an `i8` and panic if the converted value doesn't fit
    |
 LL |     foo::<i8>(x_u32.try_into().unwrap());
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |               ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:226:15
@@ -885,7 +885,7 @@ LL |     foo::<i8>(x_u16);
 help: you can convert a `u16` to an `i8` and panic if the converted value doesn't fit
    |
 LL |     foo::<i8>(x_u16.try_into().unwrap());
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |               ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:228:15
@@ -896,7 +896,7 @@ LL |     foo::<i8>(x_u8);
 help: you can convert a `u8` to an `i8` and panic if the converted value doesn't fit
    |
 LL |     foo::<i8>(x_u8.try_into().unwrap());
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^
+   |               ~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:230:15
@@ -907,7 +907,7 @@ LL |     foo::<i8>(x_isize);
 help: you can convert an `isize` to an `i8` and panic if the converted value doesn't fit
    |
 LL |     foo::<i8>(x_isize.try_into().unwrap());
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:232:15
@@ -918,7 +918,7 @@ LL |     foo::<i8>(x_i64);
 help: you can convert an `i64` to an `i8` and panic if the converted value doesn't fit
    |
 LL |     foo::<i8>(x_i64.try_into().unwrap());
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |               ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:234:15
@@ -929,7 +929,7 @@ LL |     foo::<i8>(x_i32);
 help: you can convert an `i32` to an `i8` and panic if the converted value doesn't fit
    |
 LL |     foo::<i8>(x_i32.try_into().unwrap());
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |               ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:236:15
@@ -940,7 +940,7 @@ LL |     foo::<i8>(x_i16);
 help: you can convert an `i16` to an `i8` and panic if the converted value doesn't fit
    |
 LL |     foo::<i8>(x_i16.try_into().unwrap());
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |               ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:242:16
@@ -951,7 +951,7 @@ LL |     foo::<f64>(x_usize);
 help: you can cast a `usize` to an `f64`, producing the floating point representation of the integer,
    |                                              rounded if necessary
 LL |     foo::<f64>(x_usize as f64);
-   |                ^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:244:16
@@ -962,7 +962,7 @@ LL |     foo::<f64>(x_u64);
 help: you can cast a `u64` to an `f64`, producing the floating point representation of the integer,
    |                                              rounded if necessary
 LL |     foo::<f64>(x_u64 as f64);
-   |                ^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:246:16
@@ -973,7 +973,7 @@ LL |     foo::<f64>(x_u32);
 help: you can convert a `u32` to an `f64`, producing the floating point representation of the integer
    |
 LL |     foo::<f64>(x_u32.into());
-   |                ^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:248:16
@@ -984,7 +984,7 @@ LL |     foo::<f64>(x_u16);
 help: you can convert a `u16` to an `f64`, producing the floating point representation of the integer
    |
 LL |     foo::<f64>(x_u16.into());
-   |                ^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:250:16
@@ -995,7 +995,7 @@ LL |     foo::<f64>(x_u8);
 help: you can convert a `u8` to an `f64`, producing the floating point representation of the integer
    |
 LL |     foo::<f64>(x_u8.into());
-   |                ^^^^^^^^^^^
+   |                ~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:252:16
@@ -1006,7 +1006,7 @@ LL |     foo::<f64>(x_isize);
 help: you can convert an `isize` to an `f64`, producing the floating point representation of the integer, rounded if necessary
    |
 LL |     foo::<f64>(x_isize as f64);
-   |                ^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:254:16
@@ -1017,7 +1017,7 @@ LL |     foo::<f64>(x_i64);
 help: you can convert an `i64` to an `f64`, producing the floating point representation of the integer, rounded if necessary
    |
 LL |     foo::<f64>(x_i64 as f64);
-   |                ^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:256:16
@@ -1028,7 +1028,7 @@ LL |     foo::<f64>(x_i32);
 help: you can convert an `i32` to an `f64`, producing the floating point representation of the integer
    |
 LL |     foo::<f64>(x_i32.into());
-   |                ^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:258:16
@@ -1039,7 +1039,7 @@ LL |     foo::<f64>(x_i16);
 help: you can convert an `i16` to an `f64`, producing the floating point representation of the integer
    |
 LL |     foo::<f64>(x_i16.into());
-   |                ^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:260:16
@@ -1050,7 +1050,7 @@ LL |     foo::<f64>(x_i8);
 help: you can convert an `i8` to an `f64`, producing the floating point representation of the integer
    |
 LL |     foo::<f64>(x_i8.into());
-   |                ^^^^^^^^^^^
+   |                ~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:263:16
@@ -1070,7 +1070,7 @@ LL |     foo::<f32>(x_usize);
 help: you can cast a `usize` to an `f32`, producing the floating point representation of the integer,
    |                                              rounded if necessary
 LL |     foo::<f32>(x_usize as f32);
-   |                ^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:268:16
@@ -1081,7 +1081,7 @@ LL |     foo::<f32>(x_u64);
 help: you can cast a `u64` to an `f32`, producing the floating point representation of the integer,
    |                                              rounded if necessary
 LL |     foo::<f32>(x_u64 as f32);
-   |                ^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:270:16
@@ -1092,7 +1092,7 @@ LL |     foo::<f32>(x_u32);
 help: you can cast a `u32` to an `f32`, producing the floating point representation of the integer,
    |                                              rounded if necessary
 LL |     foo::<f32>(x_u32 as f32);
-   |                ^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:272:16
@@ -1103,7 +1103,7 @@ LL |     foo::<f32>(x_u16);
 help: you can convert a `u16` to an `f32`, producing the floating point representation of the integer
    |
 LL |     foo::<f32>(x_u16.into());
-   |                ^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:274:16
@@ -1114,7 +1114,7 @@ LL |     foo::<f32>(x_u8);
 help: you can convert a `u8` to an `f32`, producing the floating point representation of the integer
    |
 LL |     foo::<f32>(x_u8.into());
-   |                ^^^^^^^^^^^
+   |                ~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:276:16
@@ -1125,7 +1125,7 @@ LL |     foo::<f32>(x_isize);
 help: you can convert an `isize` to an `f32`, producing the floating point representation of the integer, rounded if necessary
    |
 LL |     foo::<f32>(x_isize as f32);
-   |                ^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:278:16
@@ -1136,7 +1136,7 @@ LL |     foo::<f32>(x_i64);
 help: you can convert an `i64` to an `f32`, producing the floating point representation of the integer, rounded if necessary
    |
 LL |     foo::<f32>(x_i64 as f32);
-   |                ^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:280:16
@@ -1147,7 +1147,7 @@ LL |     foo::<f32>(x_i32);
 help: you can convert an `i32` to an `f32`, producing the floating point representation of the integer, rounded if necessary
    |
 LL |     foo::<f32>(x_i32 as f32);
-   |                ^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:282:16
@@ -1158,7 +1158,7 @@ LL |     foo::<f32>(x_i16);
 help: you can convert an `i16` to an `f32`, producing the floating point representation of the integer
    |
 LL |     foo::<f32>(x_i16.into());
-   |                ^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:284:16
@@ -1169,7 +1169,7 @@ LL |     foo::<f32>(x_i8);
 help: you can convert an `i8` to an `f32`, producing the floating point representation of the integer
    |
 LL |     foo::<f32>(x_i8.into());
-   |                ^^^^^^^^^^^
+   |                ~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:289:16
index a62956ee8da8db7f8cc66ed6fd7cff845d577400..d3f02214e3b7a0f403c7ee6d35b3888e3defe6cf 100644 (file)
@@ -7,7 +7,7 @@ LL |     foo::<usize>(42_u64);
 help: change the type of the numeric literal from `u64` to `usize`
    |
 LL |     foo::<usize>(42_usize);
-   |                  ^^^^^^^^
+   |                  ~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:9:18
@@ -18,7 +18,7 @@ LL |     foo::<usize>(42_u32);
 help: change the type of the numeric literal from `u32` to `usize`
    |
 LL |     foo::<usize>(42_usize);
-   |                  ^^^^^^^^
+   |                  ~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:11:18
@@ -29,7 +29,7 @@ LL |     foo::<usize>(42_u16);
 help: change the type of the numeric literal from `u16` to `usize`
    |
 LL |     foo::<usize>(42_usize);
-   |                  ^^^^^^^^
+   |                  ~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:13:18
@@ -40,7 +40,7 @@ LL |     foo::<usize>(42_u8);
 help: change the type of the numeric literal from `u8` to `usize`
    |
 LL |     foo::<usize>(42_usize);
-   |                  ^^^^^^^^
+   |                  ~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:15:18
@@ -51,7 +51,7 @@ LL |     foo::<usize>(42_isize);
 help: change the type of the numeric literal from `isize` to `usize`
    |
 LL |     foo::<usize>(42_usize);
-   |                  ^^^^^^^^
+   |                  ~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:17:18
@@ -62,7 +62,7 @@ LL |     foo::<usize>(42_i64);
 help: change the type of the numeric literal from `i64` to `usize`
    |
 LL |     foo::<usize>(42_usize);
-   |                  ^^^^^^^^
+   |                  ~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:19:18
@@ -73,7 +73,7 @@ LL |     foo::<usize>(42_i32);
 help: change the type of the numeric literal from `i32` to `usize`
    |
 LL |     foo::<usize>(42_usize);
-   |                  ^^^^^^^^
+   |                  ~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:21:18
@@ -84,7 +84,7 @@ LL |     foo::<usize>(42_i16);
 help: change the type of the numeric literal from `i16` to `usize`
    |
 LL |     foo::<usize>(42_usize);
-   |                  ^^^^^^^^
+   |                  ~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:23:18
@@ -95,7 +95,7 @@ LL |     foo::<usize>(42_i8);
 help: change the type of the numeric literal from `i8` to `usize`
    |
 LL |     foo::<usize>(42_usize);
-   |                  ^^^^^^^^
+   |                  ~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:25:18
@@ -106,7 +106,7 @@ LL |     foo::<usize>(42.0_f64);
 help: change the type of the numeric literal from `f64` to `usize`
    |
 LL |     foo::<usize>(42usize);
-   |                  ^^^^^^^
+   |                  ~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:27:18
@@ -117,7 +117,7 @@ LL |     foo::<usize>(42.0_f32);
 help: change the type of the numeric literal from `f32` to `usize`
    |
 LL |     foo::<usize>(42usize);
-   |                  ^^^^^^^
+   |                  ~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:30:18
@@ -128,7 +128,7 @@ LL |     foo::<isize>(42_usize);
 help: change the type of the numeric literal from `usize` to `isize`
    |
 LL |     foo::<isize>(42_isize);
-   |                  ^^^^^^^^
+   |                  ~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:32:18
@@ -139,7 +139,7 @@ LL |     foo::<isize>(42_u64);
 help: change the type of the numeric literal from `u64` to `isize`
    |
 LL |     foo::<isize>(42_isize);
-   |                  ^^^^^^^^
+   |                  ~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:34:18
@@ -150,7 +150,7 @@ LL |     foo::<isize>(42_u32);
 help: change the type of the numeric literal from `u32` to `isize`
    |
 LL |     foo::<isize>(42_isize);
-   |                  ^^^^^^^^
+   |                  ~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:36:18
@@ -161,7 +161,7 @@ LL |     foo::<isize>(42_u16);
 help: change the type of the numeric literal from `u16` to `isize`
    |
 LL |     foo::<isize>(42_isize);
-   |                  ^^^^^^^^
+   |                  ~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:38:18
@@ -172,7 +172,7 @@ LL |     foo::<isize>(42_u8);
 help: change the type of the numeric literal from `u8` to `isize`
    |
 LL |     foo::<isize>(42_isize);
-   |                  ^^^^^^^^
+   |                  ~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:41:18
@@ -183,7 +183,7 @@ LL |     foo::<isize>(42_i64);
 help: change the type of the numeric literal from `i64` to `isize`
    |
 LL |     foo::<isize>(42_isize);
-   |                  ^^^^^^^^
+   |                  ~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:43:18
@@ -194,7 +194,7 @@ LL |     foo::<isize>(42_i32);
 help: change the type of the numeric literal from `i32` to `isize`
    |
 LL |     foo::<isize>(42_isize);
-   |                  ^^^^^^^^
+   |                  ~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:45:18
@@ -205,7 +205,7 @@ LL |     foo::<isize>(42_i16);
 help: change the type of the numeric literal from `i16` to `isize`
    |
 LL |     foo::<isize>(42_isize);
-   |                  ^^^^^^^^
+   |                  ~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:47:18
@@ -216,7 +216,7 @@ LL |     foo::<isize>(42_i8);
 help: change the type of the numeric literal from `i8` to `isize`
    |
 LL |     foo::<isize>(42_isize);
-   |                  ^^^^^^^^
+   |                  ~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:49:18
@@ -227,7 +227,7 @@ LL |     foo::<isize>(42.0_f64);
 help: change the type of the numeric literal from `f64` to `isize`
    |
 LL |     foo::<isize>(42isize);
-   |                  ^^^^^^^
+   |                  ~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:51:18
@@ -238,7 +238,7 @@ LL |     foo::<isize>(42.0_f32);
 help: change the type of the numeric literal from `f32` to `isize`
    |
 LL |     foo::<isize>(42isize);
-   |                  ^^^^^^^
+   |                  ~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:54:16
@@ -249,7 +249,7 @@ LL |     foo::<u64>(42_usize);
 help: change the type of the numeric literal from `usize` to `u64`
    |
 LL |     foo::<u64>(42_u64);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:57:16
@@ -260,7 +260,7 @@ LL |     foo::<u64>(42_u32);
 help: change the type of the numeric literal from `u32` to `u64`
    |
 LL |     foo::<u64>(42_u64);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:59:16
@@ -271,7 +271,7 @@ LL |     foo::<u64>(42_u16);
 help: change the type of the numeric literal from `u16` to `u64`
    |
 LL |     foo::<u64>(42_u64);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:61:16
@@ -282,7 +282,7 @@ LL |     foo::<u64>(42_u8);
 help: change the type of the numeric literal from `u8` to `u64`
    |
 LL |     foo::<u64>(42_u64);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:63:16
@@ -293,7 +293,7 @@ LL |     foo::<u64>(42_isize);
 help: change the type of the numeric literal from `isize` to `u64`
    |
 LL |     foo::<u64>(42_u64);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:65:16
@@ -304,7 +304,7 @@ LL |     foo::<u64>(42_i64);
 help: change the type of the numeric literal from `i64` to `u64`
    |
 LL |     foo::<u64>(42_u64);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:67:16
@@ -315,7 +315,7 @@ LL |     foo::<u64>(42_i32);
 help: change the type of the numeric literal from `i32` to `u64`
    |
 LL |     foo::<u64>(42_u64);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:69:16
@@ -326,7 +326,7 @@ LL |     foo::<u64>(42_i16);
 help: change the type of the numeric literal from `i16` to `u64`
    |
 LL |     foo::<u64>(42_u64);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:71:16
@@ -337,7 +337,7 @@ LL |     foo::<u64>(42_i8);
 help: change the type of the numeric literal from `i8` to `u64`
    |
 LL |     foo::<u64>(42_u64);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:73:16
@@ -348,7 +348,7 @@ LL |     foo::<u64>(42.0_f64);
 help: change the type of the numeric literal from `f64` to `u64`
    |
 LL |     foo::<u64>(42u64);
-   |                ^^^^^
+   |                ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:75:16
@@ -359,7 +359,7 @@ LL |     foo::<u64>(42.0_f32);
 help: change the type of the numeric literal from `f32` to `u64`
    |
 LL |     foo::<u64>(42u64);
-   |                ^^^^^
+   |                ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:78:16
@@ -370,7 +370,7 @@ LL |     foo::<i64>(42_usize);
 help: change the type of the numeric literal from `usize` to `i64`
    |
 LL |     foo::<i64>(42_i64);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:80:16
@@ -381,7 +381,7 @@ LL |     foo::<i64>(42_u64);
 help: change the type of the numeric literal from `u64` to `i64`
    |
 LL |     foo::<i64>(42_i64);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:82:16
@@ -392,7 +392,7 @@ LL |     foo::<i64>(42_u32);
 help: change the type of the numeric literal from `u32` to `i64`
    |
 LL |     foo::<i64>(42_i64);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:84:16
@@ -403,7 +403,7 @@ LL |     foo::<i64>(42_u16);
 help: change the type of the numeric literal from `u16` to `i64`
    |
 LL |     foo::<i64>(42_i64);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:86:16
@@ -414,7 +414,7 @@ LL |     foo::<i64>(42_u8);
 help: change the type of the numeric literal from `u8` to `i64`
    |
 LL |     foo::<i64>(42_i64);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:88:16
@@ -425,7 +425,7 @@ LL |     foo::<i64>(42_isize);
 help: change the type of the numeric literal from `isize` to `i64`
    |
 LL |     foo::<i64>(42_i64);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:91:16
@@ -436,7 +436,7 @@ LL |     foo::<i64>(42_i32);
 help: change the type of the numeric literal from `i32` to `i64`
    |
 LL |     foo::<i64>(42_i64);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:93:16
@@ -447,7 +447,7 @@ LL |     foo::<i64>(42_i16);
 help: change the type of the numeric literal from `i16` to `i64`
    |
 LL |     foo::<i64>(42_i64);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:95:16
@@ -458,7 +458,7 @@ LL |     foo::<i64>(42_i8);
 help: change the type of the numeric literal from `i8` to `i64`
    |
 LL |     foo::<i64>(42_i64);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:97:16
@@ -469,7 +469,7 @@ LL |     foo::<i64>(42.0_f64);
 help: change the type of the numeric literal from `f64` to `i64`
    |
 LL |     foo::<i64>(42i64);
-   |                ^^^^^
+   |                ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:99:16
@@ -480,7 +480,7 @@ LL |     foo::<i64>(42.0_f32);
 help: change the type of the numeric literal from `f32` to `i64`
    |
 LL |     foo::<i64>(42i64);
-   |                ^^^^^
+   |                ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:102:16
@@ -491,7 +491,7 @@ LL |     foo::<u32>(42_usize);
 help: change the type of the numeric literal from `usize` to `u32`
    |
 LL |     foo::<u32>(42_u32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:104:16
@@ -502,7 +502,7 @@ LL |     foo::<u32>(42_u64);
 help: change the type of the numeric literal from `u64` to `u32`
    |
 LL |     foo::<u32>(42_u32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:107:16
@@ -513,7 +513,7 @@ LL |     foo::<u32>(42_u16);
 help: change the type of the numeric literal from `u16` to `u32`
    |
 LL |     foo::<u32>(42_u32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:109:16
@@ -524,7 +524,7 @@ LL |     foo::<u32>(42_u8);
 help: change the type of the numeric literal from `u8` to `u32`
    |
 LL |     foo::<u32>(42_u32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:111:16
@@ -535,7 +535,7 @@ LL |     foo::<u32>(42_isize);
 help: change the type of the numeric literal from `isize` to `u32`
    |
 LL |     foo::<u32>(42_u32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:113:16
@@ -546,7 +546,7 @@ LL |     foo::<u32>(42_i64);
 help: change the type of the numeric literal from `i64` to `u32`
    |
 LL |     foo::<u32>(42_u32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:115:16
@@ -557,7 +557,7 @@ LL |     foo::<u32>(42_i32);
 help: change the type of the numeric literal from `i32` to `u32`
    |
 LL |     foo::<u32>(42_u32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:117:16
@@ -568,7 +568,7 @@ LL |     foo::<u32>(42_i16);
 help: change the type of the numeric literal from `i16` to `u32`
    |
 LL |     foo::<u32>(42_u32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:119:16
@@ -579,7 +579,7 @@ LL |     foo::<u32>(42_i8);
 help: change the type of the numeric literal from `i8` to `u32`
    |
 LL |     foo::<u32>(42_u32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:121:16
@@ -590,7 +590,7 @@ LL |     foo::<u32>(42.0_f64);
 help: change the type of the numeric literal from `f64` to `u32`
    |
 LL |     foo::<u32>(42u32);
-   |                ^^^^^
+   |                ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:123:16
@@ -601,7 +601,7 @@ LL |     foo::<u32>(42.0_f32);
 help: change the type of the numeric literal from `f32` to `u32`
    |
 LL |     foo::<u32>(42u32);
-   |                ^^^^^
+   |                ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:126:16
@@ -612,7 +612,7 @@ LL |     foo::<i32>(42_usize);
 help: change the type of the numeric literal from `usize` to `i32`
    |
 LL |     foo::<i32>(42_i32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:128:16
@@ -623,7 +623,7 @@ LL |     foo::<i32>(42_u64);
 help: change the type of the numeric literal from `u64` to `i32`
    |
 LL |     foo::<i32>(42_i32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:130:16
@@ -634,7 +634,7 @@ LL |     foo::<i32>(42_u32);
 help: change the type of the numeric literal from `u32` to `i32`
    |
 LL |     foo::<i32>(42_i32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:132:16
@@ -645,7 +645,7 @@ LL |     foo::<i32>(42_u16);
 help: change the type of the numeric literal from `u16` to `i32`
    |
 LL |     foo::<i32>(42_i32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:134:16
@@ -656,7 +656,7 @@ LL |     foo::<i32>(42_u8);
 help: change the type of the numeric literal from `u8` to `i32`
    |
 LL |     foo::<i32>(42_i32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:136:16
@@ -667,7 +667,7 @@ LL |     foo::<i32>(42_isize);
 help: change the type of the numeric literal from `isize` to `i32`
    |
 LL |     foo::<i32>(42_i32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:138:16
@@ -678,7 +678,7 @@ LL |     foo::<i32>(42_i64);
 help: change the type of the numeric literal from `i64` to `i32`
    |
 LL |     foo::<i32>(42_i32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:141:16
@@ -689,7 +689,7 @@ LL |     foo::<i32>(42_i16);
 help: change the type of the numeric literal from `i16` to `i32`
    |
 LL |     foo::<i32>(42_i32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:143:16
@@ -700,7 +700,7 @@ LL |     foo::<i32>(42_i8);
 help: change the type of the numeric literal from `i8` to `i32`
    |
 LL |     foo::<i32>(42_i32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:145:16
@@ -711,7 +711,7 @@ LL |     foo::<i32>(42.0_f64);
 help: change the type of the numeric literal from `f64` to `i32`
    |
 LL |     foo::<i32>(42i32);
-   |                ^^^^^
+   |                ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:147:16
@@ -722,7 +722,7 @@ LL |     foo::<i32>(42.0_f32);
 help: change the type of the numeric literal from `f32` to `i32`
    |
 LL |     foo::<i32>(42i32);
-   |                ^^^^^
+   |                ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:150:16
@@ -733,7 +733,7 @@ LL |     foo::<u16>(42_usize);
 help: change the type of the numeric literal from `usize` to `u16`
    |
 LL |     foo::<u16>(42_u16);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:152:16
@@ -744,7 +744,7 @@ LL |     foo::<u16>(42_u64);
 help: change the type of the numeric literal from `u64` to `u16`
    |
 LL |     foo::<u16>(42_u16);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:154:16
@@ -755,7 +755,7 @@ LL |     foo::<u16>(42_u32);
 help: change the type of the numeric literal from `u32` to `u16`
    |
 LL |     foo::<u16>(42_u16);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:157:16
@@ -766,7 +766,7 @@ LL |     foo::<u16>(42_u8);
 help: change the type of the numeric literal from `u8` to `u16`
    |
 LL |     foo::<u16>(42_u16);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:159:16
@@ -777,7 +777,7 @@ LL |     foo::<u16>(42_isize);
 help: change the type of the numeric literal from `isize` to `u16`
    |
 LL |     foo::<u16>(42_u16);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:161:16
@@ -788,7 +788,7 @@ LL |     foo::<u16>(42_i64);
 help: change the type of the numeric literal from `i64` to `u16`
    |
 LL |     foo::<u16>(42_u16);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:163:16
@@ -799,7 +799,7 @@ LL |     foo::<u16>(42_i32);
 help: change the type of the numeric literal from `i32` to `u16`
    |
 LL |     foo::<u16>(42_u16);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:165:16
@@ -810,7 +810,7 @@ LL |     foo::<u16>(42_i16);
 help: change the type of the numeric literal from `i16` to `u16`
    |
 LL |     foo::<u16>(42_u16);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:167:16
@@ -821,7 +821,7 @@ LL |     foo::<u16>(42_i8);
 help: change the type of the numeric literal from `i8` to `u16`
    |
 LL |     foo::<u16>(42_u16);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:169:16
@@ -832,7 +832,7 @@ LL |     foo::<u16>(42.0_f64);
 help: change the type of the numeric literal from `f64` to `u16`
    |
 LL |     foo::<u16>(42u16);
-   |                ^^^^^
+   |                ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:171:16
@@ -843,7 +843,7 @@ LL |     foo::<u16>(42.0_f32);
 help: change the type of the numeric literal from `f32` to `u16`
    |
 LL |     foo::<u16>(42u16);
-   |                ^^^^^
+   |                ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:174:16
@@ -854,7 +854,7 @@ LL |     foo::<i16>(42_usize);
 help: change the type of the numeric literal from `usize` to `i16`
    |
 LL |     foo::<i16>(42_i16);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:176:16
@@ -865,7 +865,7 @@ LL |     foo::<i16>(42_u64);
 help: change the type of the numeric literal from `u64` to `i16`
    |
 LL |     foo::<i16>(42_i16);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:178:16
@@ -876,7 +876,7 @@ LL |     foo::<i16>(42_u32);
 help: change the type of the numeric literal from `u32` to `i16`
    |
 LL |     foo::<i16>(42_i16);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:180:16
@@ -887,7 +887,7 @@ LL |     foo::<i16>(42_u16);
 help: change the type of the numeric literal from `u16` to `i16`
    |
 LL |     foo::<i16>(42_i16);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:182:16
@@ -898,7 +898,7 @@ LL |     foo::<i16>(42_u8);
 help: change the type of the numeric literal from `u8` to `i16`
    |
 LL |     foo::<i16>(42_i16);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:184:16
@@ -909,7 +909,7 @@ LL |     foo::<i16>(42_isize);
 help: change the type of the numeric literal from `isize` to `i16`
    |
 LL |     foo::<i16>(42_i16);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:186:16
@@ -920,7 +920,7 @@ LL |     foo::<i16>(42_i64);
 help: change the type of the numeric literal from `i64` to `i16`
    |
 LL |     foo::<i16>(42_i16);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:188:16
@@ -931,7 +931,7 @@ LL |     foo::<i16>(42_i32);
 help: change the type of the numeric literal from `i32` to `i16`
    |
 LL |     foo::<i16>(42_i16);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:191:16
@@ -942,7 +942,7 @@ LL |     foo::<i16>(42_i8);
 help: change the type of the numeric literal from `i8` to `i16`
    |
 LL |     foo::<i16>(42_i16);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:193:16
@@ -953,7 +953,7 @@ LL |     foo::<i16>(42.0_f64);
 help: change the type of the numeric literal from `f64` to `i16`
    |
 LL |     foo::<i16>(42i16);
-   |                ^^^^^
+   |                ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:195:16
@@ -964,7 +964,7 @@ LL |     foo::<i16>(42.0_f32);
 help: change the type of the numeric literal from `f32` to `i16`
    |
 LL |     foo::<i16>(42i16);
-   |                ^^^^^
+   |                ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:198:15
@@ -975,7 +975,7 @@ LL |     foo::<u8>(42_usize);
 help: change the type of the numeric literal from `usize` to `u8`
    |
 LL |     foo::<u8>(42_u8);
-   |               ^^^^^
+   |               ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:200:15
@@ -986,7 +986,7 @@ LL |     foo::<u8>(42_u64);
 help: change the type of the numeric literal from `u64` to `u8`
    |
 LL |     foo::<u8>(42_u8);
-   |               ^^^^^
+   |               ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:202:15
@@ -997,7 +997,7 @@ LL |     foo::<u8>(42_u32);
 help: change the type of the numeric literal from `u32` to `u8`
    |
 LL |     foo::<u8>(42_u8);
-   |               ^^^^^
+   |               ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:204:15
@@ -1008,7 +1008,7 @@ LL |     foo::<u8>(42_u16);
 help: change the type of the numeric literal from `u16` to `u8`
    |
 LL |     foo::<u8>(42_u8);
-   |               ^^^^^
+   |               ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:207:15
@@ -1019,7 +1019,7 @@ LL |     foo::<u8>(42_isize);
 help: change the type of the numeric literal from `isize` to `u8`
    |
 LL |     foo::<u8>(42_u8);
-   |               ^^^^^
+   |               ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:209:15
@@ -1030,7 +1030,7 @@ LL |     foo::<u8>(42_i64);
 help: change the type of the numeric literal from `i64` to `u8`
    |
 LL |     foo::<u8>(42_u8);
-   |               ^^^^^
+   |               ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:211:15
@@ -1041,7 +1041,7 @@ LL |     foo::<u8>(42_i32);
 help: change the type of the numeric literal from `i32` to `u8`
    |
 LL |     foo::<u8>(42_u8);
-   |               ^^^^^
+   |               ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:213:15
@@ -1052,7 +1052,7 @@ LL |     foo::<u8>(42_i16);
 help: change the type of the numeric literal from `i16` to `u8`
    |
 LL |     foo::<u8>(42_u8);
-   |               ^^^^^
+   |               ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:215:15
@@ -1063,7 +1063,7 @@ LL |     foo::<u8>(42_i8);
 help: change the type of the numeric literal from `i8` to `u8`
    |
 LL |     foo::<u8>(42_u8);
-   |               ^^^^^
+   |               ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:217:15
@@ -1074,7 +1074,7 @@ LL |     foo::<u8>(42.0_f64);
 help: change the type of the numeric literal from `f64` to `u8`
    |
 LL |     foo::<u8>(42u8);
-   |               ^^^^
+   |               ~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:219:15
@@ -1085,7 +1085,7 @@ LL |     foo::<u8>(42.0_f32);
 help: change the type of the numeric literal from `f32` to `u8`
    |
 LL |     foo::<u8>(42u8);
-   |               ^^^^
+   |               ~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:222:15
@@ -1096,7 +1096,7 @@ LL |     foo::<i8>(42_usize);
 help: change the type of the numeric literal from `usize` to `i8`
    |
 LL |     foo::<i8>(42_i8);
-   |               ^^^^^
+   |               ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:224:15
@@ -1107,7 +1107,7 @@ LL |     foo::<i8>(42_u64);
 help: change the type of the numeric literal from `u64` to `i8`
    |
 LL |     foo::<i8>(42_i8);
-   |               ^^^^^
+   |               ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:226:15
@@ -1118,7 +1118,7 @@ LL |     foo::<i8>(42_u32);
 help: change the type of the numeric literal from `u32` to `i8`
    |
 LL |     foo::<i8>(42_i8);
-   |               ^^^^^
+   |               ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:228:15
@@ -1129,7 +1129,7 @@ LL |     foo::<i8>(42_u16);
 help: change the type of the numeric literal from `u16` to `i8`
    |
 LL |     foo::<i8>(42_i8);
-   |               ^^^^^
+   |               ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:230:15
@@ -1140,7 +1140,7 @@ LL |     foo::<i8>(42_u8);
 help: change the type of the numeric literal from `u8` to `i8`
    |
 LL |     foo::<i8>(42_i8);
-   |               ^^^^^
+   |               ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:232:15
@@ -1151,7 +1151,7 @@ LL |     foo::<i8>(42_isize);
 help: change the type of the numeric literal from `isize` to `i8`
    |
 LL |     foo::<i8>(42_i8);
-   |               ^^^^^
+   |               ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:234:15
@@ -1162,7 +1162,7 @@ LL |     foo::<i8>(42_i64);
 help: change the type of the numeric literal from `i64` to `i8`
    |
 LL |     foo::<i8>(42_i8);
-   |               ^^^^^
+   |               ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:236:15
@@ -1173,7 +1173,7 @@ LL |     foo::<i8>(42_i32);
 help: change the type of the numeric literal from `i32` to `i8`
    |
 LL |     foo::<i8>(42_i8);
-   |               ^^^^^
+   |               ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:238:15
@@ -1184,7 +1184,7 @@ LL |     foo::<i8>(42_i16);
 help: change the type of the numeric literal from `i16` to `i8`
    |
 LL |     foo::<i8>(42_i8);
-   |               ^^^^^
+   |               ~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:241:15
@@ -1195,7 +1195,7 @@ LL |     foo::<i8>(42.0_f64);
 help: change the type of the numeric literal from `f64` to `i8`
    |
 LL |     foo::<i8>(42i8);
-   |               ^^^^
+   |               ~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:243:15
@@ -1206,7 +1206,7 @@ LL |     foo::<i8>(42.0_f32);
 help: change the type of the numeric literal from `f32` to `i8`
    |
 LL |     foo::<i8>(42i8);
-   |               ^^^^
+   |               ~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:246:16
@@ -1217,7 +1217,7 @@ LL |     foo::<f64>(42_usize);
 help: change the type of the numeric literal from `usize` to `f64`
    |
 LL |     foo::<f64>(42_f64);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:248:16
@@ -1228,7 +1228,7 @@ LL |     foo::<f64>(42_u64);
 help: change the type of the numeric literal from `u64` to `f64`
    |
 LL |     foo::<f64>(42_f64);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:250:16
@@ -1239,7 +1239,7 @@ LL |     foo::<f64>(42_u32);
 help: you can convert a `u32` to an `f64`, producing the floating point representation of the integer
    |
 LL |     foo::<f64>(42_u32.into());
-   |                ^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:252:16
@@ -1250,7 +1250,7 @@ LL |     foo::<f64>(42_u16);
 help: you can convert a `u16` to an `f64`, producing the floating point representation of the integer
    |
 LL |     foo::<f64>(42_u16.into());
-   |                ^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:254:16
@@ -1261,7 +1261,7 @@ LL |     foo::<f64>(42_u8);
 help: you can convert a `u8` to an `f64`, producing the floating point representation of the integer
    |
 LL |     foo::<f64>(42_u8.into());
-   |                ^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:256:16
@@ -1272,7 +1272,7 @@ LL |     foo::<f64>(42_isize);
 help: change the type of the numeric literal from `isize` to `f64`
    |
 LL |     foo::<f64>(42_f64);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:258:16
@@ -1283,7 +1283,7 @@ LL |     foo::<f64>(42_i64);
 help: change the type of the numeric literal from `i64` to `f64`
    |
 LL |     foo::<f64>(42_f64);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:260:16
@@ -1294,7 +1294,7 @@ LL |     foo::<f64>(42_i32);
 help: you can convert an `i32` to an `f64`, producing the floating point representation of the integer
    |
 LL |     foo::<f64>(42_i32.into());
-   |                ^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:262:16
@@ -1305,7 +1305,7 @@ LL |     foo::<f64>(42_i16);
 help: you can convert an `i16` to an `f64`, producing the floating point representation of the integer
    |
 LL |     foo::<f64>(42_i16.into());
-   |                ^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:264:16
@@ -1316,7 +1316,7 @@ LL |     foo::<f64>(42_i8);
 help: you can convert an `i8` to an `f64`, producing the floating point representation of the integer
    |
 LL |     foo::<f64>(42_i8.into());
-   |                ^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:267:16
@@ -1327,7 +1327,7 @@ LL |     foo::<f64>(42.0_f32);
 help: change the type of the numeric literal from `f32` to `f64`
    |
 LL |     foo::<f64>(42.0_f64);
-   |                ^^^^^^^^
+   |                ~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:270:16
@@ -1338,7 +1338,7 @@ LL |     foo::<f32>(42_usize);
 help: change the type of the numeric literal from `usize` to `f32`
    |
 LL |     foo::<f32>(42_f32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:272:16
@@ -1349,7 +1349,7 @@ LL |     foo::<f32>(42_u64);
 help: change the type of the numeric literal from `u64` to `f32`
    |
 LL |     foo::<f32>(42_f32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:274:16
@@ -1360,7 +1360,7 @@ LL |     foo::<f32>(42_u32);
 help: change the type of the numeric literal from `u32` to `f32`
    |
 LL |     foo::<f32>(42_f32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:276:16
@@ -1371,7 +1371,7 @@ LL |     foo::<f32>(42_u16);
 help: you can convert a `u16` to an `f32`, producing the floating point representation of the integer
    |
 LL |     foo::<f32>(42_u16.into());
-   |                ^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:278:16
@@ -1382,7 +1382,7 @@ LL |     foo::<f32>(42_u8);
 help: you can convert a `u8` to an `f32`, producing the floating point representation of the integer
    |
 LL |     foo::<f32>(42_u8.into());
-   |                ^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:280:16
@@ -1393,7 +1393,7 @@ LL |     foo::<f32>(42_isize);
 help: change the type of the numeric literal from `isize` to `f32`
    |
 LL |     foo::<f32>(42_f32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:282:16
@@ -1404,7 +1404,7 @@ LL |     foo::<f32>(42_i64);
 help: change the type of the numeric literal from `i64` to `f32`
    |
 LL |     foo::<f32>(42_f32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:284:16
@@ -1415,7 +1415,7 @@ LL |     foo::<f32>(42_i32);
 help: change the type of the numeric literal from `i32` to `f32`
    |
 LL |     foo::<f32>(42_f32);
-   |                ^^^^^^
+   |                ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:286:16
@@ -1426,7 +1426,7 @@ LL |     foo::<f32>(42_i16);
 help: you can convert an `i16` to an `f32`, producing the floating point representation of the integer
    |
 LL |     foo::<f32>(42_i16.into());
-   |                ^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:288:16
@@ -1437,7 +1437,7 @@ LL |     foo::<f32>(42_i8);
 help: you can convert an `i8` to an `f32`, producing the floating point representation of the integer
    |
 LL |     foo::<f32>(42_i8.into());
-   |                ^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:290:16
@@ -1448,7 +1448,7 @@ LL |     foo::<f32>(42.0_f64);
 help: change the type of the numeric literal from `f64` to `f32`
    |
 LL |     foo::<f32>(42.0_f32);
-   |                ^^^^^^^^
+   |                ~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:294:16
index 70b99ef7869ca8cfab83e016c7463e4eb2ef17d9..e0a8534cd28fa801e83139466986502fa8ae5301 100644 (file)
@@ -10,7 +10,7 @@ LL |     ss.r
 help: to declare that the trait object captures data from argument `ss`, you can add an explicit `'_` lifetime bound
    |
 LL | fn load(ss: &mut SomeStruct) -> Box<dyn SomeTrait + '_> {
-   |                                                   ^^^^
+   |                                                   ++++
 
 error[E0621]: explicit lifetime required in the type of `ss`
   --> $DIR/object-lifetime-default-from-box-error.rs:31:12
index e00d6bb2f4a36bc5eda071146ad32a44309c1705..bd8cf4e30f7fac064a778bc6e2ff4bb796f56931 100644 (file)
@@ -14,11 +14,11 @@ LL |     fn foo() {}
 help: consider turning `foo` into a method by giving it a `&self` argument
    |
 LL |     fn foo(&self) {}
-   |            ^^^^^
+   |            +++++
 help: alternatively, consider constraining `foo` so it does not apply to trait objects
    |
 LL |     fn foo() where Self: Sized {}
-   |              ^^^^^^^^^^^^^^^^^
+   |              +++++++++++++++++
 
 error: aborting due to previous error
 
index 91a071f567813c8e4978c03485b1380576b8c1b2..ea1c575ff8c9ab0a1e8a10f27b1863449aecf561 100644 (file)
@@ -16,11 +16,11 @@ LL |     fn foo() {}
 help: consider turning `foo` into a method by giving it a `&self` argument
    |
 LL |     fn foo(&self) {}
-   |            ^^^^^
+   |            +++++
 help: alternatively, consider constraining `foo` so it does not apply to trait objects
    |
 LL |     fn foo() where Self: Sized {}
-   |              ^^^^^^^^^^^^^^^^^
+   |              +++++++++++++++++
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/object-safety/object-safety-no-static.stderr b/src/test/ui/object-safety/object-safety-no-static.stderr
deleted file mode 100644 (file)
index 0de783f..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety-no-static.rs:8:1
-   |
-LL |     fn foo();
-   |        --- associated function `foo` has no `self` parameter
-...
-LL | fn foo_implicit<T:Foo+'static>(b: Box<T>) -> Box<dyn Foo + 'static> {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` cannot be made into an object
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0038`.
index b9aad01b2929ab6c1bcb16e5a955c8044d33db65..363dfb77628c45061a893c63bfc6911d4456a19e 100644 (file)
@@ -7,7 +7,7 @@ LL |     x <- y;
 help: if you meant to write a comparison against a negative value, add a space in between `<` and `-`
    |
 LL |     x < - y;
-   |       ^^^
+   |       ~~~
 
 error: expected expression, found keyword `in`
   --> $DIR/bad.rs:10:5
index b2c8775e78c37938f37c611df7a9e8df6564c2af..c004043307899f11a6e7e6bde1bbd5b2ea4cf3ec 100644 (file)
@@ -7,7 +7,7 @@ LL |     f = box g;
 help: try using a conversion method
    |
 LL |     f = (box g).to_string();
-   |         ^     ^^^^^^^^^^^^^
+   |         +     +++++++++++++
 
 error: aborting due to previous error
 
index a657106ad911f2465952c606fb0f5f85d5c9a2ce..452163e2fa5ee44fd9a0b71c66e32244373707fe 100644 (file)
@@ -7,7 +7,7 @@ LL |     f = box f;
 help: try using a conversion method
    |
 LL |     f = (box f).to_string();
-   |         ^     ^^^^^^^^^^^^^
+   |         +     +++++++++++++
 
 error: aborting due to previous error
 
index 8761b5261d51bab1ebf7b6a2fd2cedcd6680df98..dde75724ed701fe5173bd4bdfa339f48e9c58a9c 100644 (file)
@@ -16,7 +16,7 @@ LL |     blk();
 help: consider further restricting this bound
    |
 LL | fn foo<F:FnOnce() + Copy>(blk: F) {
-   |                   ^^^^^^
+   |                   ++++++
 
 error: aborting due to previous error
 
index 61175b84ee1deb6f701d057645ad1c74820e9003..8e6964e30623ddbe9932faf75e5668c72b17bfde 100644 (file)
@@ -10,7 +10,7 @@ LL |     let (0 | (1 | 2)) = 0;
 help: you might want to use `if let` to ignore the variant that isn't matched
    |
 LL |     if let (0 | (1 | 2)) = 0 { /* */ }
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0004]: non-exhaustive patterns: `i32::MIN..=-1_i32` and `3_i32..=i32::MAX` not covered
   --> $DIR/issue-69875-should-have-been-expanded-earlier-non-exhaustive.rs:3:11
index 64e061a89b410e053af1a0ed925d35b425667a63..8cd2ce6f36ca631f55b4d178428ef757d581af5a 100644 (file)
@@ -10,16 +10,17 @@ LL |     data: T,
    = help: change the field's type to have a statically known size
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | pub struct Bad<T> {
-   |                --
+LL - pub struct Bad<T: ?Sized> {
+LL + pub struct Bad<T> {
+   | 
 help: borrowed types always have a statically known size
    |
 LL |     data: &T,
-   |           ^
+   |           +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     data: Box<T>,
-   |           ^^^^ ^
+   |           ++++ +
 
 error: aborting due to previous error
 
index 59b1e4f7a985871fcb1c11212957898faccebab9..373c1c2c0b100fc3542555f0158ffab8f0b170a1 100644 (file)
@@ -7,7 +7,7 @@ LL |     panic!(123);
 help: you might be missing a string literal to format with
    |
 LL |     panic!("{}", 123);
-   |            ^^^^^
+   |            +++++
 
 error: 1 positional argument in format string, but no arguments were given
   --> $DIR/panic-2021.rs:5:13
@@ -30,7 +30,7 @@ LL |     assert!(false, 123);
 help: you might be missing a string literal to format with
    |
 LL |     assert!(false, "{}", 123);
-   |                    ^^^^^
+   |                    +++++
 
 error: 1 positional argument in format string, but no arguments were given
   --> $DIR/panic-2021.rs:8:21
index 24be32ae9eba679aa052e5acd88bf6b4f425c159..cafddbe2624240dbd9276df2e181b4f7f55da156 100644 (file)
@@ -7,7 +7,7 @@ LL |     (sess as *const Session).opts;
 help: `(sess as *const Session)` is a raw pointer; try dereferencing it
    |
 LL |     (*(sess as *const Session)).opts;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0609]: no field `0` on type `[u32; 1]`
   --> $DIR/parenthesized-deref-suggestion.rs:10:21
index e015010da13969e8b520cba2ff1e2af75bbe2dc1..c98a620f1237147a5d0884236365335c02c58088 100644 (file)
@@ -7,7 +7,7 @@ LL | extern crate krate-name-here;
 help: if the original crate name uses dashes you need to use underscores in the code
    |
 LL | extern crate krate_name_here;
-   |                   ^    ^
+   |                   ~    ~
 
 error[E0463]: can't find crate for `krate_name_here`
   --> $DIR/bad-crate-name.rs:1:1
index b59ea97e3b1e0e84988c5b76bf94458bb3514228..b23322f2c8ced595d162799ea8ba1a83cbe2585d 100644 (file)
@@ -7,7 +7,7 @@ LL | fn false() { }
 help: you can escape reserved keywords to use them as identifiers
    |
 LL | fn r#false() { }
-   |    ^^^^^^^
+   |    ~~~~~~~
 
 error: aborting due to previous error
 
index 12132b0856bf128dfc9749616d3a4f600505131f..3eaa6004796cbabede4f97f8386f9bf4b94aa04d 100644 (file)
@@ -7,7 +7,7 @@ LL | fn true() { }
 help: you can escape reserved keywords to use them as identifiers
    |
 LL | fn r#true() { }
-   |    ^^^^^^
+   |    ~~~~~~
 
 error: aborting due to previous error
 
index df10b0ec2d2bc3156dabddb866d891c053d3782b..c77992b2c3406f3b0dbd7037c7cc6025ea201028 100644 (file)
@@ -9,9 +9,9 @@ LL | | }
    |
 help: you might have forgotten to add the struct literal inside the block
    |
-LL | fn foo() -> Foo { SomeStruct {
+LL ~ fn foo() -> Foo { SomeStruct {
 LL |     val: (),
-LL | } }
+LL ~ } }
    |
 
 error: struct literal body without path
@@ -25,9 +25,9 @@ LL | |     };
    |
 help: you might have forgotten to add the struct literal inside the block
    |
-LL |     let x = { SomeStruct {
+LL ~     let x = { SomeStruct {
 LL |         val: (),
-LL |     } };
+LL ~     } };
    |
 
 error[E0308]: mismatched types
index b9fb42088d9d385359561f7c8cec94c8f72b8290..c3d0006163005def230f0e33aa52c9735598da5e 100644 (file)
@@ -41,7 +41,7 @@ LL |     b'é';
 help: if you meant to use the unicode code point for 'é', use a \xHH escape
    |
 LL |     b'\xE9';
-   |       ^^^^
+   |       ~~~~
 
 error[E0763]: unterminated byte constant
   --> $DIR/byte-literals.rs:11:6
index 4f22a16224f0c3f2b9fc4bc9f4588b19ea0189d4..3b8b3692e053f0fa9fa83133705875f43535a5fe 100644 (file)
@@ -29,7 +29,7 @@ LL |     b"é";
 help: if you meant to use the unicode code point for 'é', use a \xHH escape
    |
 LL |     b"\xE9";
-   |       ^^^^
+   |       ~~~~
 
 error: raw byte string must be ASCII
   --> $DIR/byte-string-literals.rs:7:10
index 067920d12f486c6595229d8eef6c896ba9a055b6..694b0b6eb028f7498b7b1e60d65388bb8d9a9487 100644 (file)
@@ -7,7 +7,7 @@ LL |     1 < 2 <= 3;
 help: split the comparison into two
    |
 LL |     1 < 2 && 2 <= 3;
-   |           ^^^^
+   |           ++++
 
 error: comparison operators cannot be chained
   --> $DIR/chained-comparison-suggestion.rs:9:7
@@ -18,7 +18,7 @@ LL |     1 < 2 < 3;
 help: split the comparison into two
    |
 LL |     1 < 2 && 2 < 3;
-   |           ^^^^
+   |           ++++
 
 error: comparison operators cannot be chained
   --> $DIR/chained-comparison-suggestion.rs:13:7
@@ -29,7 +29,7 @@ LL |     1 <= 2 < 3;
 help: split the comparison into two
    |
 LL |     1 <= 2 && 2 < 3;
-   |            ^^^^
+   |            ++++
 
 error: comparison operators cannot be chained
   --> $DIR/chained-comparison-suggestion.rs:18:7
@@ -40,7 +40,7 @@ LL |     1 <= 2 <= 3;
 help: split the comparison into two
    |
 LL |     1 <= 2 && 2 <= 3;
-   |            ^^^^
+   |            ++++
 
 error: comparison operators cannot be chained
   --> $DIR/chained-comparison-suggestion.rs:23:7
@@ -51,7 +51,7 @@ LL |     1 > 2 >= 3;
 help: split the comparison into two
    |
 LL |     1 > 2 && 2 >= 3;
-   |           ^^^^
+   |           ++++
 
 error: comparison operators cannot be chained
   --> $DIR/chained-comparison-suggestion.rs:28:7
@@ -62,7 +62,7 @@ LL |     1 > 2 > 3;
 help: split the comparison into two
    |
 LL |     1 > 2 && 2 > 3;
-   |           ^^^^
+   |           ++++
 
 error: comparison operators cannot be chained
   --> $DIR/chained-comparison-suggestion.rs:32:7
@@ -73,7 +73,7 @@ LL |     1 >= 2 > 3;
 help: split the comparison into two
    |
 LL |     1 >= 2 && 2 > 3;
-   |            ^^^^
+   |            ++++
 
 error: comparison operators cannot be chained
   --> $DIR/chained-comparison-suggestion.rs:36:7
@@ -84,7 +84,7 @@ LL |     1 >= 2 >= 3;
 help: split the comparison into two
    |
 LL |     1 >= 2 && 2 >= 3;
-   |            ^^^^
+   |            ++++
 
 error: comparison operators cannot be chained
   --> $DIR/chained-comparison-suggestion.rs:41:7
@@ -95,7 +95,7 @@ LL |     1 == 2 < 3;
 help: parenthesize the comparison
    |
 LL |     1 == (2 < 3);
-   |          ^     ^
+   |          +     +
 
 error: comparison operators cannot be chained
   --> $DIR/chained-comparison-suggestion.rs:45:7
@@ -106,7 +106,7 @@ LL |     1 > 2 == false;
 help: parenthesize the comparison
    |
 LL |     (1 > 2) == false;
-   |     ^     ^
+   |     +     +
 
 error: comparison operators cannot be chained
   --> $DIR/chained-comparison-suggestion.rs:49:7
@@ -117,7 +117,7 @@ LL |     1 == 2 == 3;
 help: split the comparison into two
    |
 LL |     1 == 2 && 2 == 3;
-   |            ^^^^
+   |            ++++
 
 error[E0308]: mismatched types
   --> $DIR/chained-comparison-suggestion.rs:4:14
index 5d94d6fe69b59716f7a452ad77ae7b9b8f1c9b28..febfb600cc7a6e4c13c6c4889cf174c9e7a71203 100644 (file)
@@ -9,7 +9,7 @@ LL |     //!self.allow_ty_infer()
 help: add a space before `!` to use a regular comment
    |
 LL |     // !self.allow_ty_infer()
-   |     ^^^^
+   |     ~~~~
 
 error: expected one of `.`, `;`, `?`, `}`, or an operator, found doc comment `/*! bar */`
   --> $DIR/doc-comment-in-stmt.rs:9:5
@@ -22,7 +22,7 @@ LL |     /*! bar */
 help: add a space before `!` to use a regular comment
    |
 LL |     /* ! bar */
-   |     ^^^^
+   |     ~~~~
 
 error: expected one of `.`, `;`, `?`, `}`, or an operator, found doc comment `/** baz */`
   --> $DIR/doc-comment-in-stmt.rs:13:7
@@ -33,7 +33,7 @@ LL |     1 /** baz */
 help: add a space before `*` to use a regular comment
    |
 LL |     1 /* * baz */
-   |       ^^^^
+   |       ~~~~
 
 error: expected one of `.`, `;`, `?`, `}`, or an operator, found doc comment `/*! quux */`
   --> $DIR/doc-comment-in-stmt.rs:17:7
@@ -44,7 +44,7 @@ LL |     2 /*! quux */
 help: add a space before `!` to use a regular comment
    |
 LL |     2 /* ! quux */
-   |       ^^^^
+   |       ~~~~
 
 error: aborting due to 4 previous errors
 
index ec1335cfdb072325942fce6a93873800450d6edf..e7203f24d3f8dd9b21e5720e1faf74cb73390c71 100644 (file)
@@ -7,11 +7,11 @@ LL |     let _redemptive = 1...21;
 help: use `..` for an exclusive range
    |
 LL |     let _redemptive = 1..21;
-   |                        ^^
+   |                        ~~
 help: or `..=` for an inclusive range
    |
 LL |     let _redemptive = 1..=21;
-   |                        ^^^
+   |                        ~~~
 
 error: aborting due to previous error
 
index affcb6ed22425f64e9da31337eb4a01b61e922cb..2b6314c38ceb6db64784caf2ccccb336e726a09b 100644 (file)
@@ -10,7 +10,7 @@ LL |     if let Some(x) = a { true } else { false }
 help: you might have meant to return this value
    |
 LL |     if let Some(x) = a { return true; } else { false }
-   |                          ^^^^^^     ^
+   |                          ++++++     +
 
 error[E0308]: mismatched types
   --> $DIR/expr-as-stmt-2.rs:3:40
@@ -24,7 +24,7 @@ LL |     if let Some(x) = a { true } else { false }
 help: you might have meant to return this value
    |
 LL |     if let Some(x) = a { true } else { return false; }
-   |                                        ^^^^^^      ^
+   |                                        ++++++      +
 
 error[E0308]: mismatched types
   --> $DIR/expr-as-stmt-2.rs:6:5
@@ -39,7 +39,7 @@ LL | |     if let Some(y) = a { true } else { false }
 help: parentheses are required to parse this as an expression
    |
 LL |     (if let Some(x) = a { true } else { false })
-   |     ^                                          ^
+   |     +                                          +
 
 error: aborting due to 3 previous errors
 
index 2bb320e732185e3e31c22f8a396b5473e698caa9..ba5cd01abfcc78a334f40a76e95e83187ba3bb4b 100644 (file)
@@ -7,7 +7,7 @@ LL |     {2} + {2}
 help: parentheses are required to parse this as an expression
    |
 LL |     ({2}) + {2}
-   |     ^   ^
+   |     +   +
 
 error: expected expression, found `+`
   --> $DIR/expr-as-stmt.rs:13:9
@@ -18,7 +18,7 @@ LL |     {2} + 2
 help: parentheses are required to parse this as an expression
    |
 LL |     ({2}) + 2
-   |     ^   ^
+   |     +   +
 
 error: expected expression, found `+`
   --> $DIR/expr-as-stmt.rs:19:12
@@ -29,7 +29,7 @@ LL |     { 42 } + foo;
 help: parentheses are required to parse this as an expression
    |
 LL |     ({ 42 }) + foo;
-   |     ^      ^
+   |     +      +
 
 error: expected expression, found `>`
   --> $DIR/expr-as-stmt.rs:32:7
@@ -39,9 +39,9 @@ LL |     } > 0
    |
 help: parentheses are required to parse this as an expression
    |
-LL |     (match x {
+LL ~     (match x {
 LL |         _ => 1,
-LL |     }) > 0
+LL ~     }) > 0
    |
 
 error[E0308]: mismatched types
@@ -53,7 +53,7 @@ LL |     {2} + {2}
 help: you might have meant to return this value
    |
 LL |     {return 2;} + {2}
-   |      ^^^^^^  ^
+   |      ++++++  +
 
 error[E0308]: mismatched types
   --> $DIR/expr-as-stmt.rs:13:6
@@ -64,7 +64,7 @@ LL |     {2} + 2
 help: you might have meant to return this value
    |
 LL |     {return 2;} + 2
-   |      ^^^^^^  ^
+   |      ++++++  +
 
 error[E0308]: mismatched types
   --> $DIR/expr-as-stmt.rs:19:7
@@ -75,7 +75,7 @@ LL |     { 42 } + foo;
 help: you might have meant to return this value
    |
 LL |     { return 42; } + foo;
-   |       ^^^^^^   ^
+   |       ++++++   +
 
 error[E0308]: mismatched types
   --> $DIR/expr-as-stmt.rs:25:7
@@ -86,7 +86,7 @@ LL |     { 3 } * 3
 help: you might have meant to return this value
    |
 LL |     { return 3; } * 3
-   |       ^^^^^^  ^
+   |       ++++++  +
 
 error[E0614]: type `{integer}` cannot be dereferenced
   --> $DIR/expr-as-stmt.rs:25:11
@@ -97,7 +97,7 @@ LL |     { 3 } * 3
 help: parentheses are required to parse this as an expression
    |
 LL |     ({ 3 }) * 3
-   |     ^     ^
+   |     +     +
 
 error: aborting due to 9 previous errors
 
index fdc7a9409d733a771d17767b7056779c32877ee8..f1255d8642a60bb1d136c7d30f12bc85b28ebb13 100644 (file)
@@ -7,7 +7,7 @@ LL |     fn foo() = 42;
 help: surround the expression with `{` and `}` instead of `=` and `;`
    |
 LL |     fn foo() { 42 }
-   |              ^    ^
+   |              ~    ~
 
 error: function body cannot be `= expression;`
   --> $DIR/fn-body-eq-expr-semi.rs:5:20
@@ -18,7 +18,7 @@ LL |     fn bar() -> u8 = 42;
 help: surround the expression with `{` and `}` instead of `=` and `;`
    |
 LL |     fn bar() -> u8 { 42 }
-   |                    ^    ^
+   |                    ~    ~
 
 error: function body cannot be `= expression;`
   --> $DIR/fn-body-eq-expr-semi.rs:9:14
@@ -29,7 +29,7 @@ LL |     fn foo() = 42;
 help: surround the expression with `{` and `}` instead of `=` and `;`
    |
 LL |     fn foo() { 42 }
-   |              ^    ^
+   |              ~    ~
 
 error: function body cannot be `= expression;`
   --> $DIR/fn-body-eq-expr-semi.rs:11:20
@@ -40,7 +40,7 @@ LL |     fn bar() -> u8 = 42;
 help: surround the expression with `{` and `}` instead of `=` and `;`
    |
 LL |     fn bar() -> u8 { 42 }
-   |                    ^    ^
+   |                    ~    ~
 
 error: function body cannot be `= expression;`
   --> $DIR/fn-body-eq-expr-semi.rs:16:14
@@ -51,7 +51,7 @@ LL |     fn foo() = 42;
 help: surround the expression with `{` and `}` instead of `=` and `;`
    |
 LL |     fn foo() { 42 }
-   |              ^    ^
+   |              ~    ~
 
 error: function body cannot be `= expression;`
   --> $DIR/fn-body-eq-expr-semi.rs:17:20
@@ -62,7 +62,7 @@ LL |     fn bar() -> u8 = 42;
 help: surround the expression with `{` and `}` instead of `=` and `;`
    |
 LL |     fn bar() -> u8 { 42 }
-   |                    ^    ^
+   |                    ~    ~
 
 error: function body cannot be `= expression;`
   --> $DIR/fn-body-eq-expr-semi.rs:21:14
@@ -73,7 +73,7 @@ LL |     fn foo() = 42;
 help: surround the expression with `{` and `}` instead of `=` and `;`
    |
 LL |     fn foo() { 42 }
-   |              ^    ^
+   |              ~    ~
 
 error: function body cannot be `= expression;`
   --> $DIR/fn-body-eq-expr-semi.rs:22:20
@@ -84,7 +84,7 @@ LL |     fn bar() -> u8 = 42;
 help: surround the expression with `{` and `}` instead of `=` and `;`
    |
 LL |     fn bar() -> u8 { 42 }
-   |                    ^    ^
+   |                    ~    ~
 
 error: incorrect function inside `extern` block
   --> $DIR/fn-body-eq-expr-semi.rs:9:8
index b3f60b13b0f74a640869a8bb5dd1a8e9c0ec07ea..0adfa5b47a3e25a28cb0d717a4e491d950b396fc 100644 (file)
@@ -113,7 +113,7 @@ LL |         async fn fe1();
 help: remove the qualifiers
    |
 LL |         fn fe1();
-   |         ^^
+   |         ~~
 
 error: functions in `extern` blocks cannot have qualifiers
   --> $DIR/fn-header-semantic-fail.rs:51:19
@@ -127,7 +127,7 @@ LL |         unsafe fn fe2();
 help: remove the qualifiers
    |
 LL |         fn fe2();
-   |         ^^
+   |         ~~
 
 error: functions in `extern` blocks cannot have qualifiers
   --> $DIR/fn-header-semantic-fail.rs:52:18
@@ -141,7 +141,7 @@ LL |         const fn fe3();
 help: remove the qualifiers
    |
 LL |         fn fe3();
-   |         ^^
+   |         ~~
 
 error: functions in `extern` blocks cannot have qualifiers
   --> $DIR/fn-header-semantic-fail.rs:53:23
@@ -155,7 +155,7 @@ LL |         extern "C" fn fe4();
 help: remove the qualifiers
    |
 LL |         fn fe4();
-   |         ^^
+   |         ~~
 
 error: functions in `extern` blocks cannot have qualifiers
   --> $DIR/fn-header-semantic-fail.rs:54:42
@@ -169,7 +169,7 @@ LL |         const async unsafe extern "C" fn fe5();
 help: remove the qualifiers
    |
 LL |         fn fe5();
-   |         ^^
+   |         ~~
 
 error: functions cannot be both `const` and `async`
   --> $DIR/fn-header-semantic-fail.rs:54:9
index 2add9fb33c70eafe9246d6c85f799bab8b8748e2..5367b986d2b8dff2aadf50f42fcb756bda5765aa 100644 (file)
@@ -7,7 +7,7 @@ LL |     let _ = move async { };
 help: try switching the order
    |
 LL |     let _ = async move { };
-   |             ^^^^^^^^^^
+   |             ~~~~~~~~~~
 
 error: aborting due to previous error
 
index ae180af93e37394ce0bab605db1cbe10ac18848d..d1a249389fe5c8bf4adec2b0652de501f3574ddf 100644 (file)
@@ -38,15 +38,15 @@ LL | fn fizz(i32) {}
 help: if this is a `self` type, give it a parameter name
    |
 LL | fn fizz(self: i32) {}
-   |         ^^^^^^^^^
+   |         ~~~~~~~~~
 help: if this is a parameter name, give it a type
    |
 LL | fn fizz(i32: TypeName) {}
-   |         ^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~
 help: if this is a type, explicitly ignore the parameter name
    |
 LL | fn fizz(_: i32) {}
-   |         ^^^^^^
+   |         ~~~~~~
 
 error: expected one of `:`, `@`, or `|`, found `S`
   --> $DIR/inverted-parameters.rs:27:23
index bc61b3b74e2175598aadd89cfe0b4dd49688b0d1..d0a9b529983b1ad89269b269b389dae8be692a64 100644 (file)
@@ -9,7 +9,7 @@ LL | pub fn test<W, I: Trait<Item=(), W> >() {}
 help: move the constraint after the generic argument
    |
 LL | pub fn test<W, I: Trait<W, Item = ()> >() {}
-   |                        ^^^^^^^^^^^^^^
+   |                        ~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 9ccf17a6cb10ea9833f9dbf79892672714a7dc81..19b68556d79ad27cfb40022ee21d2bdc66367df5 100644 (file)
@@ -7,7 +7,7 @@ LL |     vec![1, 2, 3] as Vec<i32>[0];
 help: try surrounding the expression in parentheses
    |
 LL |     (vec![1, 2, 3] as Vec<i32>)[0];
-   |     ^                         ^
+   |     +                         +
 
 error: casts cannot be followed by indexing
   --> $DIR/issue-35813-postfix-after-cast.rs:12:5
@@ -18,7 +18,7 @@ LL |     vec![1, 2, 3]: Vec<i32>[0];
 help: try surrounding the expression in parentheses
    |
 LL |     (vec![1, 2, 3]: Vec<i32>)[0];
-   |     ^                       ^
+   |     +                       +
 
 error: casts cannot be followed by indexing
   --> $DIR/issue-35813-postfix-after-cast.rs:17:5
@@ -29,7 +29,7 @@ LL |     (&[0]) as &[i32][0];
 help: try surrounding the expression in parentheses
    |
 LL |     ((&[0]) as &[i32])[0];
-   |     ^                ^
+   |     +                +
 
 error: casts cannot be followed by indexing
   --> $DIR/issue-35813-postfix-after-cast.rs:19:5
@@ -40,7 +40,7 @@ LL |     (&[0i32]): &[i32; 1][0];
 help: try surrounding the expression in parentheses
    |
 LL |     ((&[0i32]): &[i32; 1])[0];
-   |     ^                    ^
+   |     +                    +
 
 error: casts cannot be followed by a method call
   --> $DIR/issue-35813-postfix-after-cast.rs:39:13
@@ -51,7 +51,7 @@ LL |     let _ = 0i32: i32: i32.count_ones();
 help: try surrounding the expression in parentheses
    |
 LL |     let _ = (0i32: i32: i32).count_ones();
-   |             ^              ^
+   |             +              +
 
 error: casts cannot be followed by a method call
   --> $DIR/issue-35813-postfix-after-cast.rs:41:13
@@ -62,7 +62,7 @@ LL |     let _ = 0 as i32: i32.count_ones();
 help: try surrounding the expression in parentheses
    |
 LL |     let _ = (0 as i32: i32).count_ones();
-   |             ^             ^
+   |             +             +
 
 error: casts cannot be followed by a method call
   --> $DIR/issue-35813-postfix-after-cast.rs:43:13
@@ -73,7 +73,7 @@ LL |     let _ = 0i32: i32 as i32.count_ones();
 help: try surrounding the expression in parentheses
    |
 LL |     let _ = (0i32: i32 as i32).count_ones();
-   |             ^                ^
+   |             +                +
 
 error: casts cannot be followed by a method call
   --> $DIR/issue-35813-postfix-after-cast.rs:45:13
@@ -84,7 +84,7 @@ LL |     let _ = 0 as i32 as i32.count_ones();
 help: try surrounding the expression in parentheses
    |
 LL |     let _ = (0 as i32 as i32).count_ones();
-   |             ^               ^
+   |             +               +
 
 error: casts cannot be followed by a method call
   --> $DIR/issue-35813-postfix-after-cast.rs:47:13
@@ -95,7 +95,7 @@ LL |     let _ = 0i32: i32: i32 as u32 as i32.count_ones();
 help: try surrounding the expression in parentheses
    |
 LL |     let _ = (0i32: i32: i32 as u32 as i32).count_ones();
-   |             ^                            ^
+   |             +                            +
 
 error: casts cannot be followed by a method call
   --> $DIR/issue-35813-postfix-after-cast.rs:49:13
@@ -106,7 +106,7 @@ LL |     let _ = 0i32: i32.count_ones(): u32;
 help: try surrounding the expression in parentheses
    |
 LL |     let _ = (0i32: i32).count_ones(): u32;
-   |             ^         ^
+   |             +         +
 
 error: casts cannot be followed by a method call
   --> $DIR/issue-35813-postfix-after-cast.rs:51:13
@@ -117,7 +117,7 @@ LL |     let _ = 0 as i32.count_ones(): u32;
 help: try surrounding the expression in parentheses
    |
 LL |     let _ = (0 as i32).count_ones(): u32;
-   |             ^        ^
+   |             +        +
 
 error: casts cannot be followed by a method call
   --> $DIR/issue-35813-postfix-after-cast.rs:53:13
@@ -128,7 +128,7 @@ LL |     let _ = 0i32: i32.count_ones() as u32;
 help: try surrounding the expression in parentheses
    |
 LL |     let _ = (0i32: i32).count_ones() as u32;
-   |             ^         ^
+   |             +         +
 
 error: casts cannot be followed by a method call
   --> $DIR/issue-35813-postfix-after-cast.rs:55:13
@@ -139,7 +139,7 @@ LL |     let _ = 0 as i32.count_ones() as u32;
 help: try surrounding the expression in parentheses
    |
 LL |     let _ = (0 as i32).count_ones() as u32;
-   |             ^        ^
+   |             +        +
 
 error: casts cannot be followed by a method call
   --> $DIR/issue-35813-postfix-after-cast.rs:57:13
@@ -150,7 +150,7 @@ LL |     let _ = 0i32: i32: i32.count_ones() as u32 as i32;
 help: try surrounding the expression in parentheses
    |
 LL |     let _ = (0i32: i32: i32).count_ones() as u32 as i32;
-   |             ^              ^
+   |             +              +
 
 error: casts cannot be followed by a method call
   --> $DIR/issue-35813-postfix-after-cast.rs:62:13
@@ -162,8 +162,8 @@ LL | |         as i32
    |
 help: try surrounding the expression in parentheses
    |
-LL |     let _ = (0
-LL |         as i32)
+LL ~     let _ = (0
+LL ~         as i32)
    |
 
 error: casts cannot be followed by indexing
@@ -175,7 +175,7 @@ LL |     let x: i32 = &vec![1, 2, 3] as &Vec<i32>[0];
 help: try surrounding the expression in parentheses
    |
 LL |     let x: i32 = (&vec![1, 2, 3] as &Vec<i32>)[0];
-   |                  ^                           ^
+   |                  +                           +
 
 error: casts cannot be followed by a method call
   --> $DIR/issue-35813-postfix-after-cast.rs:75:5
@@ -186,7 +186,7 @@ LL |     0 as i32.max(0);
 help: try surrounding the expression in parentheses
    |
 LL |     (0 as i32).max(0);
-   |     ^        ^
+   |     +        +
 
 error: casts cannot be followed by a method call
   --> $DIR/issue-35813-postfix-after-cast.rs:77:5
@@ -197,7 +197,7 @@ LL |     0: i32.max(0);
 help: try surrounding the expression in parentheses
    |
 LL |     (0: i32).max(0);
-   |     ^      ^
+   |     +      +
 
 error: casts cannot be followed by a method call
   --> $DIR/issue-35813-postfix-after-cast.rs:92:8
@@ -208,7 +208,7 @@ LL |     if 5u64 as i32.max(0) == 0 {
 help: try surrounding the expression in parentheses
    |
 LL |     if (5u64 as i32).max(0) == 0 {
-   |        ^           ^
+   |        +           +
 
 error: casts cannot be followed by a method call
   --> $DIR/issue-35813-postfix-after-cast.rs:95:8
@@ -219,7 +219,7 @@ LL |     if 5u64: u64.max(0) == 0 {
 help: try surrounding the expression in parentheses
    |
 LL |     if (5u64: u64).max(0) == 0 {
-   |        ^         ^
+   |        +         +
 
 error: casts cannot be followed by a method call
   --> $DIR/issue-35813-postfix-after-cast.rs:102:9
@@ -230,7 +230,7 @@ LL |         5u64 as u32.max(0) == 0
 help: try surrounding the expression in parentheses
    |
 LL |         (5u64 as u32).max(0) == 0
-   |         ^           ^
+   |         +           +
 
 error: casts cannot be followed by a method call
   --> $DIR/issue-35813-postfix-after-cast.rs:106:9
@@ -241,7 +241,7 @@ LL |         5u64: u64.max(0) == 0
 help: try surrounding the expression in parentheses
    |
 LL |         (5u64: u64).max(0) == 0
-   |         ^         ^
+   |         +         +
 
 error: casts cannot be followed by indexing
   --> $DIR/issue-35813-postfix-after-cast.rs:111:24
@@ -252,7 +252,7 @@ LL | static bar: &[i32] = &(&[1,2,3] as &[i32][0..1]);
 help: try surrounding the expression in parentheses
    |
 LL | static bar: &[i32] = &((&[1,2,3] as &[i32])[0..1]);
-   |                        ^                  ^
+   |                        +                  +
 
 error: casts cannot be followed by indexing
   --> $DIR/issue-35813-postfix-after-cast.rs:114:25
@@ -263,7 +263,7 @@ LL | static bar2: &[i32] = &(&[1i32,2,3]: &[i32; 3][0..1]);
 help: try surrounding the expression in parentheses
    |
 LL | static bar2: &[i32] = &((&[1i32,2,3]: &[i32; 3])[0..1]);
-   |                         ^                      ^
+   |                         +                      +
 
 error: casts cannot be followed by ?
   --> $DIR/issue-35813-postfix-after-cast.rs:119:5
@@ -274,7 +274,7 @@ LL |     Err(0u64) as Result<u64,u64>?;
 help: try surrounding the expression in parentheses
    |
 LL |     (Err(0u64) as Result<u64,u64>)?;
-   |     ^                            ^
+   |     +                            +
 
 error: casts cannot be followed by ?
   --> $DIR/issue-35813-postfix-after-cast.rs:121:5
@@ -285,7 +285,7 @@ LL |     Err(0u64): Result<u64,u64>?;
 help: try surrounding the expression in parentheses
    |
 LL |     (Err(0u64): Result<u64,u64>)?;
-   |     ^                          ^
+   |     +                          +
 
 error: casts cannot be followed by a function call
   --> $DIR/issue-35813-postfix-after-cast.rs:145:5
@@ -296,7 +296,7 @@ LL |     drop as fn(u8)(0);
 help: try surrounding the expression in parentheses
    |
 LL |     (drop as fn(u8))(0);
-   |     ^              ^
+   |     +              +
 
 error: casts cannot be followed by a function call
   --> $DIR/issue-35813-postfix-after-cast.rs:147:5
@@ -307,7 +307,7 @@ LL |     drop_ptr: fn(u8)(0);
 help: try surrounding the expression in parentheses
    |
 LL |     (drop_ptr: fn(u8))(0);
-   |     ^                ^
+   |     +                +
 
 error: casts cannot be followed by `.await`
   --> $DIR/issue-35813-postfix-after-cast.rs:152:5
@@ -318,7 +318,7 @@ LL |     Box::pin(noop()) as Pin<Box<dyn Future<Output = ()>>>.await;
 help: try surrounding the expression in parentheses
    |
 LL |     (Box::pin(noop()) as Pin<Box<dyn Future<Output = ()>>>).await;
-   |     ^                                                     ^
+   |     +                                                     +
 
 error: casts cannot be followed by `.await`
   --> $DIR/issue-35813-postfix-after-cast.rs:155:5
@@ -329,7 +329,7 @@ LL |     Box::pin(noop()): Pin<Box<_>>.await;
 help: try surrounding the expression in parentheses
    |
 LL |     (Box::pin(noop()): Pin<Box<_>>).await;
-   |     ^                             ^
+   |     +                             +
 
 error: casts cannot be followed by a field access
   --> $DIR/issue-35813-postfix-after-cast.rs:167:5
@@ -340,7 +340,7 @@ LL |     Foo::default() as Foo.bar;
 help: try surrounding the expression in parentheses
    |
 LL |     (Foo::default() as Foo).bar;
-   |     ^                     ^
+   |     +                     +
 
 error: casts cannot be followed by a field access
   --> $DIR/issue-35813-postfix-after-cast.rs:169:5
@@ -351,7 +351,7 @@ LL |     Foo::default(): Foo.bar;
 help: try surrounding the expression in parentheses
    |
 LL |     (Foo::default(): Foo).bar;
-   |     ^                   ^
+   |     +                   +
 
 error: casts cannot be followed by a method call
   --> $DIR/issue-35813-postfix-after-cast.rs:84:9
@@ -362,7 +362,7 @@ LL |         if true { 33 } else { 44 } as i32.max(0),
 help: try surrounding the expression in parentheses
    |
 LL |         (if true { 33 } else { 44 } as i32).max(0),
-   |         ^                                 ^
+   |         +                                 +
 
 error: casts cannot be followed by a method call
   --> $DIR/issue-35813-postfix-after-cast.rs:86:9
@@ -373,7 +373,7 @@ LL |         if true { 33 } else { 44 }: i32.max(0)
 help: try surrounding the expression in parentheses
    |
 LL |         (if true { 33 } else { 44 }: i32).max(0)
-   |         ^                               ^
+   |         +                               +
 
 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
   --> $DIR/issue-35813-postfix-after-cast.rs:131:13
index 701c32d6236b643ec173c7f33ef8fd0b7b0f470a..372387131e54b5c0c05ace1a17b67150846d526b 100644 (file)
@@ -7,7 +7,7 @@ LL |     foo!(true);
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     foo!(r#true);
-   |          ^^^^^^
+   |          ~~~~~~
 
 error: expected type, found keyword `true`
   --> $DIR/issue-44406.rs:8:10
index 197c4cc967d4da1ea32c3dfa373caf45552cf6af..5a56d80a7d74e32698477412653739069d60e510 100644 (file)
@@ -7,7 +7,7 @@ LL |     m::for();
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     m::r#for();
-   |        ^^^^^
+   |        ~~~~~
 
 error: aborting due to previous error
 
index d5e07622b11b99dce7867a65762ed90655b5d692..55eed0402a4c60cf53fbd12144589df6de14c574 100644 (file)
@@ -17,11 +17,11 @@ LL | | Ϥ,
 help: change the delimiters to curly braces
    |
 LL | y! { /* items */ }
-   |    ^^^^^^^^^^^^^^^
+   |    ~~~~~~~~~~~~~~~
 help: add a semicolon
    |
 LL | Ϥ,;
-   |   ^
+   |   +
 
 error: cannot find macro `y` in this scope
   --> $DIR/issue-62524.rs:5:1
index 935d3842cdf6120299f42537bf487e1df044452d..5dc9a9675bc219f6ad0d3b087ce46effd60c26f2 100644 (file)
@@ -63,8 +63,8 @@ LL | fn foo(u: u8) { if u8 macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s
    |
 help: try placing this code inside a block
    |
-LL | fn foo(u: u8) { if u8 { macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s loo mod u8 {
-LL |  }
+LL ~ fn foo(u: u8) { if u8 { macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s loo mod u8 {
+LL +  }
    |
 
 error: aborting due to 6 previous errors
index ed4d2340fc5bbf473e4e963cec2ceb33ad095497..2e7e500f4788083f01d4d022f6e681dc5ef66de8 100644 (file)
@@ -19,7 +19,7 @@ LL | pub    g() -> is
 help: add `fn` here to parse `g` as a public function
    |
 LL | pub fn g() -> is
-   |     ^^
+   |     ++
 
 error: expected item, found `;`
   --> $DIR/issue-62895.rs:10:9
index 95ee52d810ddcd85139b0870978257bea380b619..3065d642fe105267acc3db44e392e04d65facbd9 100644 (file)
@@ -41,9 +41,9 @@ LL | |
    |
 help: surround the struct literal with parentheses
    |
-LL | fn p() { match (s { v, E { [) {) }
+LL ~ fn p() { match (s { v, E { [) {) }
 LL | 
-LL | )
+LL ~ )
    |
 
 error: expected one of `.`, `?`, `{`, or an operator, found `}`
index ac042580962807b3ad8421cec438cf016b5db29b..80462549377635fde34774f5ccac7430ff68c5bf 100644 (file)
@@ -7,7 +7,7 @@ LL |     let _foo = b'hello\0';
 help: if you meant to write a byte string literal, use double quotes
    |
 LL |     let _foo = b"hello\0";
-   |                ^^^^^^^^^^
+   |                ~~~~~~~~~~
 
 error: character literal may only contain one codepoint
   --> $DIR/issue-64732.rs:6:16
@@ -18,7 +18,7 @@ LL |     let _bar = 'hello';
 help: if you meant to write a `str` literal, use double quotes
    |
 LL |     let _bar = "hello";
-   |                ^^^^^^^
+   |                ~~~~~~~
 
 error: aborting due to 2 previous errors
 
index ad72dd30542c0c91d0d0b48ec717a56cc7bad754..0a88dd2c4d31c02dc1beec1e97eb8b35833d1475 100644 (file)
@@ -7,7 +7,7 @@ LL |     auto n = 0;
 help: write `let` instead of `auto` to introduce a new variable
    |
 LL |     let n = 0;
-   |     ^^^
+   |     ~~~
 
 error: invalid variable declaration
   --> $DIR/issue-65257-invalid-var-decl-recovery.rs:4:5
@@ -18,7 +18,7 @@ LL |     auto m;
 help: write `let` instead of `auto` to introduce a new variable
    |
 LL |     let m;
-   |     ^^^
+   |     ~~~
 
 error: invalid variable declaration
   --> $DIR/issue-65257-invalid-var-decl-recovery.rs:8:5
@@ -29,7 +29,7 @@ LL |     var n = 0;
 help: write `let` instead of `var` to introduce a new variable
    |
 LL |     let n = 0;
-   |     ^^^
+   |     ~~~
 
 error: invalid variable declaration
   --> $DIR/issue-65257-invalid-var-decl-recovery.rs:10:5
@@ -40,7 +40,7 @@ LL |     var m;
 help: write `let` instead of `var` to introduce a new variable
    |
 LL |     let m;
-   |     ^^^
+   |     ~~~
 
 error: invalid variable declaration
   --> $DIR/issue-65257-invalid-var-decl-recovery.rs:14:5
index 19c9ef30f9049537fca85864287462c8f875eee4..b2c7dddc8011c21e1f3d21185bc48a97dbadf79c 100644 (file)
Binary files a/src/test/ui/parser/issue-68629.stderr and b/src/test/ui/parser/issue-68629.stderr differ
index 8602abacabd325988d4f2b8a9116d85688365341..6585a19d954efd39c15e3d7bd77ecb26e9796ae8 100644 (file)
Binary files a/src/test/ui/parser/issue-68730.stderr and b/src/test/ui/parser/issue-68730.stderr differ
index dce03e1a9635cf5e66b0f937fafdbda442503de8..1a64b9a017d519546c8d33aac3b429ebccaa956f 100644 (file)
@@ -12,7 +12,7 @@ LL | type X<'a> = (?'a) +;
    |
    = note: `#[warn(bare_trait_objects)]` on by default
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error[E0224]: at least one trait is required for an object type
   --> $DIR/issue-68890-2.rs:3:14
index dfde8624814f8e154303dbefedf3ce963d031e21..0bb99a01e55a32b0df70e29c024de09af793b9c5 100644 (file)
@@ -7,7 +7,7 @@ LL |         [h, ref ts..] => foo(c, n - h) + foo(ts, n),
 help: if you meant to bind the contents of the rest of the array pattern into `ts`, use `@`
    |
 LL |         [h, ref ts @ ..] => foo(c, n - h) + foo(ts, n),
-   |                    ^
+   |                    +
 
 error: aborting due to previous error
 
index c10037d44e30d9f92b30431fb0dbb6b7e182efdd..6f26f36e7631591aeb17451876e54f5089d351ff 100644 (file)
@@ -35,7 +35,7 @@ LL | fn y<'a>(y: &mut 'a + Send) {
    |
    = note: `#[warn(bare_trait_objects)]` on by default
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 warning: trait objects without an explicit `dyn` are deprecated
   --> $DIR/issue-73568-lifetime-after-mut.rs:19:23
@@ -44,7 +44,7 @@ LL |     let z = y as &mut 'a + Send;
    |                       ^^ help: use `dyn`: `dyn 'a`
    |
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error[E0224]: at least one trait is required for an object type
   --> $DIR/issue-73568-lifetime-after-mut.rs:14:18
index b8ada11d922b247765f7d2734c4deb69b7772bef..a62c9b0a1aac4929a544e5083279003a1490e710 100644 (file)
@@ -11,7 +11,7 @@ LL | }
 help: you can escape reserved keywords to use them as identifiers
    |
 LL | r#impl
-   | ^^^^^^
+   | ~~~~~~
 
 error: aborting due to previous error
 
index b355b3a708d4531fa5d0110645a004196121b3f7..730c5b64b5b7dba387d93e2b0723f9ca51ea5899 100644 (file)
@@ -7,7 +7,7 @@ LL |     let abstract = ();
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#abstract = ();
-   |         ^^^^^^^^^^
+   |         ~~~~~~~~~~
 
 error: aborting due to previous error
 
index dea4afd5c0a1ca87551bd62e2db8a8d7aa682d73..b9ebdf4b909125d23be4362be910146be5fb1a8f 100644 (file)
@@ -7,7 +7,7 @@ LL |     let as = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#as = "foo";
-   |         ^^^^
+   |         ~~~~
 
 error: aborting due to previous error
 
index db05f3956a2a991d29e039a1269cb7dfc5363a45..05615b41756b9723c8c3ffcd3a29ff0dbddb6adc 100644 (file)
@@ -7,7 +7,7 @@ LL |     let break = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#break = "foo";
-   |         ^^^^^^^
+   |         ~~~~~~~
 
 error: aborting due to previous error
 
index 45c129960ecef342b03a00ffa25c2280bf4a63c3..f7efa53a45e2cb92c195df17087c82f4aec710c7 100644 (file)
@@ -7,7 +7,7 @@ LL |     let const = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#const = "foo";
-   |         ^^^^^^^
+   |         ~~~~~~~
 
 error: aborting due to previous error
 
index 2ec4b28c94e09eb249969306e69c56faf5ff062a..aed6be2089967738d73607645d3b0cc3b255af3f 100644 (file)
@@ -7,7 +7,7 @@ LL |     let continue = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#continue = "foo";
-   |         ^^^^^^^^^^
+   |         ~~~~~~~~~~
 
 error: aborting due to previous error
 
index b622806e9166907c684e5b9ec7131f93810f8169..3fc8af3d154a543a72dbf119015149a7a9199413 100644 (file)
@@ -7,7 +7,7 @@ LL |     let else = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#else = "foo";
-   |         ^^^^^^
+   |         ~~~~~~
 
 error: aborting due to previous error
 
index 0f3fa3fb624dce88517c3be01e71d573b53f1268..4632814019dab02fe65b5ad4f24b16639ba4a7f3 100644 (file)
@@ -7,7 +7,7 @@ LL |     let enum = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#enum = "foo";
-   |         ^^^^^^
+   |         ~~~~~~
 
 error: aborting due to previous error
 
index c74e3101729d493835ca9355bc96bd58ca354cb9..f2edc3fa6b923f74ca82f46ae768a7b8645c048a 100644 (file)
@@ -7,7 +7,7 @@ LL |     let final = ();
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#final = ();
-   |         ^^^^^^^
+   |         ~~~~~~~
 
 error: aborting due to previous error
 
index 3219eaf24f94f70033d3e6978914955b8a6f9c55..100295caf634871b5b0ecb813b17ed0bf645b7d9 100644 (file)
@@ -7,7 +7,7 @@ LL |     let fn = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#fn = "foo";
-   |         ^^^^
+   |         ~~~~
 
 error: aborting due to previous error
 
index 30974af74248f20eb5e9b7a172ec1440b3a123ac..312a635cddc2a3363223f91588c0b190785405bc 100644 (file)
@@ -7,7 +7,7 @@ LL |     let for = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#for = "foo";
-   |         ^^^^^
+   |         ~~~~~
 
 error: aborting due to previous error
 
index a72030befb38da8472074347676a15c8eb638ca1..086a77742a7b9e2bc925b2e7917b7b2f8d4cade8 100644 (file)
@@ -7,7 +7,7 @@ LL |     let if = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#if = "foo";
-   |         ^^^^
+   |         ~~~~
 
 error: aborting due to previous error
 
index e51c60ed494f3f427f80833c58483c291c126574..a7493d2e60ba5fd85fa121e72ddb95b20c4faece 100644 (file)
@@ -7,7 +7,7 @@ LL |     let impl = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#impl = "foo";
-   |         ^^^^^^
+   |         ~~~~~~
 
 error: aborting due to previous error
 
index d580b4518098ccfbf5f3d966a01f35f5b5924a4b..456e06dbfaa181ff6d4071df4c2d8caad2c70a5d 100644 (file)
@@ -7,7 +7,7 @@ LL |     let let = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#let = "foo";
-   |         ^^^^^
+   |         ~~~~~
 
 error: aborting due to previous error
 
index 15c008da353556d3610bb4718274bd427448423c..c3b33afb4a32d1d6858897786fd1d621664761e2 100644 (file)
@@ -7,7 +7,7 @@ LL |     let loop = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#loop = "foo";
-   |         ^^^^^^
+   |         ~~~~~~
 
 error: aborting due to previous error
 
index 5ba63965c87be9d25d9719660c37b0fa5e8fda9a..1ca80dbbd09e43befb10478b0649d52714f6ce5f 100644 (file)
@@ -7,7 +7,7 @@ LL |     let match = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#match = "foo";
-   |         ^^^^^^^
+   |         ~~~~~~~
 
 error: aborting due to previous error
 
index 7fb1bda3fb0536950c7acdedbaf699d3cbe6081e..ea161b004c1411c7e377385f3753dbb3e15837e9 100644 (file)
@@ -7,7 +7,7 @@ LL |     let mod = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#mod = "foo";
-   |         ^^^^^
+   |         ~~~~~
 
 error: aborting due to previous error
 
index 9721c88cb165d6c2f55cbab9fc3fc1162ff9df71..8036cecd791dd1363a347f7d204d29a53808f6c3 100644 (file)
@@ -7,7 +7,7 @@ LL |     let move = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#move = "foo";
-   |         ^^^^^^
+   |         ~~~~~~
 
 error: aborting due to previous error
 
index 8bbc6fc654750fc82eae70bde7b77e72afd08798..7ae669b27193b6eb828ed7efa3333f435546baaf 100644 (file)
@@ -7,7 +7,7 @@ LL |     let override = ();
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#override = ();
-   |         ^^^^^^^^^^
+   |         ~~~~~~~~~~
 
 error: aborting due to previous error
 
index 10ff53e29161ef8f9c957c2110c9cd6f01de14d6..df9429a98f0bd4568c712ef9b38c7e05db4ec567 100644 (file)
@@ -7,7 +7,7 @@ LL |     let pub = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#pub = "foo";
-   |         ^^^^^
+   |         ~~~~~
 
 error: aborting due to previous error
 
index 5b5f2b7ed54fe893e9324fcfd5663f6b279ee85c..831f557c27a4576437be2558ae4988a303fb693f 100644 (file)
@@ -7,7 +7,7 @@ LL |     let return = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#return = "foo";
-   |         ^^^^^^^^
+   |         ~~~~~~~~
 
 error: aborting due to previous error
 
index 81aeb9e37abb3650cb511d44b0e48bb70e2ce33b..d133e939d3a0d822907526331133365ce3dfc56b 100644 (file)
@@ -7,7 +7,7 @@ LL |     let static = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#static = "foo";
-   |         ^^^^^^^^
+   |         ~~~~~~~~
 
 error: aborting due to previous error
 
index 1b287b60197f4a3c15d928ca2bee484b0916f6d2..228ba7c2bc7267bc14998e57d8214c06b65fa2ba 100644 (file)
@@ -7,7 +7,7 @@ LL |     let struct = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#struct = "foo";
-   |         ^^^^^^^^
+   |         ~~~~~~~~
 
 error: aborting due to previous error
 
index c3d4d61dbb72a28119639583c7c4aa02d35382cf..ea90ed3f05e13478b3f14d040180439f0ef6697f 100644 (file)
@@ -7,7 +7,7 @@ LL |     let trait = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#trait = "foo";
-   |         ^^^^^^^
+   |         ~~~~~~~
 
 error: aborting due to previous error
 
index fcd717d6e67127b73a8c3a715906537a4cb5b9c6..37ba0f27bc241fc4b0f6cfe041f97f67a3432c91 100644 (file)
@@ -7,7 +7,7 @@ LL |     let try = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#try = "foo";
-   |         ^^^^^
+   |         ~~~~~
 
 error: aborting due to previous error
 
index dfe1958e78fd7e0a823318f5052ac36578596203..1c49811ae5c84980620689d8be95503fc3798b7c 100644 (file)
@@ -7,7 +7,7 @@ LL |     let type = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#type = "foo";
-   |         ^^^^^^
+   |         ~~~~~~
 
 error: aborting due to previous error
 
index 7cef6de0cee80f6c4e73209ce7de3591763711ac..9fb8ac12db4e4a6504e345edd6bf0543ad7cd9fc 100644 (file)
@@ -7,7 +7,7 @@ LL |     let typeof = ();
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#typeof = ();
-   |         ^^^^^^^^
+   |         ~~~~~~~~
 
 error: aborting due to previous error
 
index d714a99dac44995b7c0c4d0b9b325399c9f5c5d3..ddd1bd53083bd4e6f816eec31483e011964b8656 100644 (file)
@@ -7,7 +7,7 @@ LL |     let unsafe = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#unsafe = "foo";
-   |         ^^^^^^^^
+   |         ~~~~~~~~
 
 error: aborting due to previous error
 
index 30a6c5b16a354fe2b3a0c19853429d90693f38d7..880afb0075f06aafa18c952c801acb15566038b3 100644 (file)
@@ -7,7 +7,7 @@ LL |     let use = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#use = "foo";
-   |         ^^^^^
+   |         ~~~~~
 
 error: aborting due to previous error
 
index 38d734ab81244ff67244264c304286e278baba9d..7b6210b712d4f8c19553a2e8ad888c525a5891cb 100644 (file)
@@ -7,7 +7,7 @@ LL |     let where = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#where = "foo";
-   |         ^^^^^^^
+   |         ~~~~~~~
 
 error: aborting due to previous error
 
index 22b5454add8b95fd1128606bd7033f9a96fdaa52..8f744c3b1ad6ff5dc909734493b4216f583126d2 100644 (file)
@@ -7,7 +7,7 @@ LL |     let while = "foo";
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#while = "foo";
-   |         ^^^^^^^
+   |         ~~~~~~~
 
 error: aborting due to previous error
 
index c179f4ec56089d5b6792680934242e460caf886d..f7692f8c57fe23ad231fd85794f90349dbd0d9dc 100644 (file)
@@ -7,7 +7,7 @@ LL | pub mod break {
 help: you can escape reserved keywords to use them as identifiers
    |
 LL | pub mod r#break {
-   |         ^^^^^^^
+   |         ~~~~~~~
 
 error: aborting due to previous error
 
index 3a545ee282660426e59e41057325408ed7e0ff7c..c2b19a7ad5f2d6f8765b5e4f362a1d5c4d6ad91b 100644 (file)
@@ -7,7 +7,7 @@ LL |     'nope'
 help: if you meant to write a `str` literal, use double quotes
    |
 LL |     "nope"
-   |     ^^^^^^
+   |     ~~~~~~
 
 error: aborting due to previous error
 
index ec661ee2a60d4b4d898696463a94a77f03a4832c..62a5e424cb469b7dbd17972ab7216cbc7a7d0eda 100644 (file)
@@ -7,7 +7,7 @@ LL | static c: char = '●●';
 help: if you meant to write a `str` literal, use double quotes
    |
 LL | static c: char = "●●";
-   |                  ^^^^
+   |                  ~~~~
 
 error: character literal may only contain one codepoint
   --> $DIR/lex-bad-char-literals-3.rs:5:20
@@ -18,7 +18,7 @@ LL |     let ch: &str = '●●';
 help: if you meant to write a `str` literal, use double quotes
    |
 LL |     let ch: &str = "●●";
-   |                    ^^^^
+   |                    ~~~~
 
 error: aborting due to 2 previous errors
 
index 334165a962a06b637a30e64a84aeac192c06086c..184817a6579d0bf6b03705c79b3a1d4df26c7e05 100644 (file)
@@ -7,7 +7,7 @@ LL | static c: char = '\x10\x10';
 help: if you meant to write a `str` literal, use double quotes
    |
 LL | static c: char = "\x10\x10";
-   |                  ^^^^^^^^^^
+   |                  ~~~~~~~~~~
 
 error: character literal may only contain one codepoint
   --> $DIR/lex-bad-char-literals-5.rs:5:20
@@ -18,7 +18,7 @@ LL |     let ch: &str = '\x10\x10';
 help: if you meant to write a `str` literal, use double quotes
    |
 LL |     let ch: &str = "\x10\x10";
-   |                    ^^^^^^^^^^
+   |                    ~~~~~~~~~~
 
 error: aborting due to 2 previous errors
 
index 48b8fc6a72917c174903028c5630b1b9682c8d74..4332bdefcb258d328ec2ff5d7fa872c8ee8a75b7 100644 (file)
@@ -7,7 +7,7 @@ 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
@@ -18,7 +18,7 @@ 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
@@ -29,7 +29,7 @@ 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
index 4ffee657cabbeb64ad5252c647cc2ecf5ac42f50..bf73595e5b0817c515722447423ab9ed14131ad4 100644 (file)
@@ -14,15 +14,15 @@ LL | fn test(&'a str) {
 help: if this is a `self` type, give it a parameter name
    |
 LL | fn test(self: &str) {
-   |         ^^^^^^^^^^
+   |         ~~~~~~~~~~
 help: if this is a parameter name, give it a type
    |
 LL | fn test(str: &TypeName) {
-   |         ^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~
 help: if this is a type, explicitly ignore the parameter name
    |
 LL | fn test(_: &str) {
-   |         ^^^^^^^
+   |         ~~~~~~~
 
 error: aborting due to 2 previous errors
 
index 6f3320e283cdbb2a39207c546610459de036c977..82e2743256b0511ee4bee7948584aa2d068132d0 100644 (file)
@@ -7,7 +7,7 @@ LL |     loop { break 'label: loop { break 'label 42; }; }
 help: wrap the expression in parentheses
    |
 LL |     loop { break ('label: loop { break 'label 42; }); }
-   |                  ^                                 ^
+   |                  +                                 +
 
 error: parentheses are required around this expression to avoid confusion with a labeled break expression
   --> $DIR/lifetime_starts_expressions.rs:33:15
@@ -22,11 +22,11 @@ LL | |         };
    |
 help: wrap the expression in parentheses
    |
-LL |         break ('inner_loop: loop {
+LL ~         break ('inner_loop: loop {
 LL |
 LL |
 LL |             break 'inner_loop 1;
-LL |         });
+LL ~         });
    |
 
 warning: this labeled break expression is easy to confuse with an unlabeled break with a labeled value expression
@@ -41,7 +41,7 @@ LL | |             loop { break 42; };
 help: wrap this expression in parentheses
    |
 LL |             (loop { break 42; });
-   |             ^                  ^
+   |             +                  +
 
 error: aborting due to 2 previous errors; 1 warning emitted
 
index 9fe95c3fd3dd06bf68ac8a455dd8b4d7da4b8680..22f3ccd0de6fb6fb625a29834f466f1da41137c5 100644 (file)
@@ -7,7 +7,7 @@ LL | fn macro() {
 help: you can escape reserved keywords to use them as identifiers
    |
 LL | fn r#macro() {
-   |    ^^^^^^^
+   |    ~~~~~~~
 
 error: aborting due to previous error
 
index caca84f695d76d67a52890939974fb867e0bad78..876bfd389cb5dc8800e5e27572b60dce06de1dc6 100644 (file)
@@ -12,7 +12,7 @@ LL |     m!('static);
    |
    = note: `#[warn(bare_trait_objects)]` on by default
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error[E0224]: at least one trait is required for an object type
   --> $DIR/trait-object-macro-matcher.rs:11:8
index f9019b78c8d3862e86de88406cf41688cec117d7..6d2431c4aec47bd1f3aae40a70419c8ebc59f7b0 100644 (file)
@@ -7,11 +7,11 @@ LL | macro_rules! foo()
 help: change the delimiters to curly braces
    |
 LL | macro_rules! foo{}
-   |                 ^^
+   |                 ~~
 help: add a semicolon
    |
 LL | macro_rules! foo();
-   |                   ^
+   |                   +
 
 error: macros that expand to items must be delimited with braces or followed by a semicolon
   --> $DIR/macros-no-semicolon-items.rs:8:5
@@ -26,16 +26,16 @@ LL | | )
    |
 help: change the delimiters to curly braces
    |
-LL | bar!{
+LL ~ bar!{
 LL |     blah
 LL |     blah
 LL |     blah
-LL | }
+LL + }
    |
 help: add a semicolon
    |
 LL | );
-   |  ^
+   |  +
 
 error: unexpected end of macro invocation
   --> $DIR/macros-no-semicolon-items.rs:1:1
index 03ae351bf7902c98ead5269006f7b1799724cf3e..4831d79ef2bb32fa5b37a36b0a062c2476e8f508 100644 (file)
@@ -18,8 +18,8 @@ LL | |           8;
    |
 help: surround the statements with a body
    |
-LL |           { 7;
-LL |           8; }
+LL ~           { 7;
+LL ~           8; }
    |
 
 error: `match` arm body without braces
@@ -33,8 +33,8 @@ LL | |           12;
    |
 help: surround the statements with a body
    |
-LL |           { 11;
-LL |           12; }
+LL ~           { 11;
+LL ~           12; }
    |
 
 error: `match` arm body without braces
@@ -48,8 +48,8 @@ LL | |           15;
    |
 help: surround the statements with a body
    |
-LL |           { 14;
-LL |           15; }
+LL ~           { 14;
+LL ~           15; }
    |
 
 error: expected one of `,`, `.`, `?`, `}`, or an operator, found reserved identifier `_`
@@ -73,8 +73,8 @@ LL | |           21
    |
 help: surround the statements with a body
    |
-LL |           { 20;
-LL |           21 }
+LL ~           { 20;
+LL ~           21 }
    |
 
 error: `match` arm body without braces
@@ -88,8 +88,8 @@ LL | |           25
    |
 help: surround the statements with a body
    |
-LL |           { 24;
-LL |           25 }
+LL ~           { 24;
+LL ~           25 }
    |
 
 error: `match` arm body without braces
@@ -103,8 +103,8 @@ LL | |           28
    |
 help: surround the statements with a body
    |
-LL |           { 27;
-LL |           28 }
+LL ~           { 27;
+LL ~           28 }
    |
 
 error: expected one of `,`, `.`, `?`, `}`, or an operator, found `;`
index 3bc451e84e6064af2e05bc9335ee77f638c86d0c..cb361a3db53803464274e31f226e6fa061fe305a 100644 (file)
@@ -6,9 +6,9 @@ LL |       } + 5
    |
 help: parentheses are required to parse this as an expression
    |
-LL |       0 => ({
+LL ~       0 => ({
 LL |         0
-LL |       }) + 5
+LL ~       }) + 5
    |
 
 error: aborting due to previous error
index ec04b937b9ace73aba14a438058791a7c8a89bd1..ccaf77d3995e0463a9012fa66b509e7258f85518 100644 (file)
@@ -15,11 +15,11 @@ LL | macro_rules! abc(ؼ
 help: change the delimiters to curly braces
    |
 LL | macro_rules! abc { /* items */ }
-   |                  ^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~
 help: add a semicolon
    |
 LL | macro_rules! abc(ؼ;
-   |                   ^
+   |                   +
 
 error: unexpected end of macro invocation
   --> $DIR/mbe_missing_right_paren.rs:3:19
index 88a77adcd31cdc02013f18bdd667c7a832b59f2c..bfa443a7f01132abf66d76eb94e59da8214e4bc0 100644 (file)
@@ -59,7 +59,7 @@ LL |     let mut mut yield(become, await) = r#yield(0, 0);
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let mut mut r#yield(become, await) = r#yield(0, 0);
-   |                 ^^^^^^^
+   |                 ~~~~~~~
 
 error: expected identifier, found reserved keyword `become`
   --> $DIR/mut-patterns.rs:28:23
@@ -70,7 +70,7 @@ LL |     let mut mut yield(become, await) = r#yield(0, 0);
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let mut mut yield(r#become, await) = r#yield(0, 0);
-   |                       ^^^^^^^^
+   |                       ~~~~~~~~
 
 error: expected identifier, found keyword `await`
   --> $DIR/mut-patterns.rs:28:31
@@ -81,7 +81,7 @@ LL |     let mut mut yield(become, await) = r#yield(0, 0);
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let mut mut yield(become, r#await) = r#yield(0, 0);
-   |                               ^^^^^^^
+   |                               ~~~~~~~
 
 error: `mut` must be attached to each individual binding
   --> $DIR/mut-patterns.rs:28:9
index 1ffdc0401e59c9d6248d08933da62e6fb9a3448d..d133e46b4b0d2601a94b37d38d3bbb1a6c2dbf3d 100644 (file)
@@ -7,7 +7,7 @@ LL |     let s = "\u{2603";
 help: terminate the unicode escape
    |
 LL |     let s = "\u{2603}";
-   |                     ^
+   |                     +
 
 error: aborting due to previous error
 
index 04fc8c85e4f033e59834365bab3e12e06a269e80..4ac0e265501f2df028de19b3c22f55b97e84c58f 100644 (file)
@@ -9,7 +9,7 @@ LL |     const fn foo();
 help: remove the qualifiers
    |
 LL |     fn foo();
-   |     ^^
+   |     ~~
 
 error: functions in `extern` blocks cannot have qualifiers
   --> $DIR/no-const-fn-in-extern-block.rs:4:21
@@ -23,7 +23,7 @@ LL |     const unsafe fn bar();
 help: remove the qualifiers
    |
 LL |     fn bar();
-   |     ^^
+   |     ~~
 
 error: aborting due to 2 previous errors
 
index bc3329dcbc23d91ee20c41bf013a119701fe3e4d..329fa8776f5aff7e9f6e02e813bfeada24a470aa 100644 (file)
@@ -8,15 +8,15 @@ LL | fn foo(x) {
 help: if this is a `self` type, give it a parameter name
    |
 LL | fn foo(self: x) {
-   |        ^^^^^^^
+   |        ~~~~~~~
 help: if this is a parameter name, give it a type
    |
 LL | fn foo(x: TypeName) {
-   |        ^^^^^^^^^^^
+   |        ~~~~~~~~~~~
 help: if this is a type, explicitly ignore the parameter name
    |
 LL | fn foo(_: x) {
-   |        ^^^^
+   |        ~~~~
 
 error: aborting due to previous error
 
index 6db9a4a0f15a6f92d69e4b3c1c0a20bbe9e8aa01..762733cc97ba3496572db697455c7a4236b4c790 100644 (file)
@@ -8,11 +8,11 @@ LL | fn a(B<) {}
 help: if this is a `self` type, give it a parameter name
    |
 LL | fn a(self: B<) {}
-   |      ^^^^^^^
+   |      ~~~~~~~
 help: if this is a type, explicitly ignore the parameter name
    |
 LL | fn a(_: B<) {}
-   |      ^^^^
+   |      ~~~~
 
 error: aborting due to previous error
 
index f129e1e372f1a66b80c8f038a8503017fb0d31c9..2dc2c87eb7baa1385e7664b50bbf62a5c7a9b86e 100644 (file)
@@ -7,11 +7,11 @@ LL |     return ...1;
 help: use `..` for an exclusive range
    |
 LL |     return ..1;
-   |            ^^
+   |            ~~
 help: or `..=` for an inclusive range
    |
 LL |     return ..=1;
-   |            ^^^
+   |            ~~~
 
 error: unexpected token: `...`
   --> $DIR/range_inclusive_dotdotdot.rs:12:13
@@ -22,11 +22,11 @@ LL |     let x = ...0;
 help: use `..` for an exclusive range
    |
 LL |     let x = ..0;
-   |             ^^
+   |             ~~
 help: or `..=` for an inclusive range
    |
 LL |     let x = ..=0;
-   |             ^^^
+   |             ~~~
 
 error: unexpected token: `...`
   --> $DIR/range_inclusive_dotdotdot.rs:16:14
@@ -37,11 +37,11 @@ LL |     let x = 5...5;
 help: use `..` for an exclusive range
    |
 LL |     let x = 5..5;
-   |              ^^
+   |              ~~
 help: or `..=` for an inclusive range
    |
 LL |     let x = 5..=5;
-   |              ^^^
+   |              ~~~
 
 error: unexpected token: `...`
   --> $DIR/range_inclusive_dotdotdot.rs:20:15
@@ -52,11 +52,11 @@ LL |     for _ in 0...1 {}
 help: use `..` for an exclusive range
    |
 LL |     for _ in 0..1 {}
-   |               ^^
+   |               ~~
 help: or `..=` for an inclusive range
    |
 LL |     for _ in 0..=1 {}
-   |               ^^^
+   |               ~~~
 
 error: aborting due to 4 previous errors
 
index 6e41e139220aeb058a5150a1f3b77e417cb7e367..f3ed77cbde215d4fc27c1bddad9a96034601a791 100644 (file)
@@ -7,11 +7,12 @@ LL |     bar::<Item =   >();
 help: to constrain the associated type, add a type after `=`
    |
 LL |     bar::<Item = TheType>();
-   |                  ^^^^^^^
+   |                  +++++++
 help: remove the `=` if `Item` is a type
    |
-LL |     bar::<Item >();
-   |               --
+LL -     bar::<Item =   >();
+LL +     bar::<Item >();
+   | 
 
 error: aborting due to previous error
 
index 9b9d2bc4972b4c414d581974728b943cd8de489f..61ea3695eee0b1adc4960b7705553393442ddab8 100644 (file)
@@ -27,7 +27,7 @@ LL |         Enum::Bar { a, b } => {}
 help: use the tuple variant pattern syntax instead
    |
 LL |         Enum::Bar(a, b) => {}
-   |                  ^^^^^^
+   |                  ~~~~~~
 
 error: aborting due to 3 previous errors
 
index c807931beee1901f7595ccee7887212051935245..f11ca9fd584076eaa002ca7b23a0e2721d7dff98 100644 (file)
@@ -7,7 +7,7 @@ LL |     println!("");
 help: Unicode character ';' (Greek Question Mark) looks like ';' (Semicolon), but it is not
    |
 LL |     println!("");
-   |                 ^
+   |                 ~
 
 error[E0308]: mismatched types
   --> $DIR/recover-from-homoglyph.rs:3:20
index 2d8088432a257a1890965432224e7851eb9fe537..762066825db29bb4e520ee4fadbb7245cf5b78c1 100644 (file)
@@ -205,7 +205,7 @@ note: the lint level is defined here
 LL | #![deny(ellipsis_inclusive_range_patterns)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error: `...` range patterns are deprecated
   --> $DIR/recover-range-pats.rs:45:13
@@ -214,7 +214,7 @@ LL |     if let 0...Y = 0 {}
    |             ^^^ help: use `..=` for an inclusive range
    |
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error: `...` range patterns are deprecated
   --> $DIR/recover-range-pats.rs:48:13
@@ -223,7 +223,7 @@ LL |     if let X...3 = 0 {}
    |             ^^^ help: use `..=` for an inclusive range
    |
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error: `...` range patterns are deprecated
   --> $DIR/recover-range-pats.rs:51:13
@@ -232,7 +232,7 @@ LL |     if let X...Y = 0 {}
    |             ^^^ help: use `..=` for an inclusive range
    |
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error: `...` range patterns are deprecated
   --> $DIR/recover-range-pats.rs:54:16
@@ -241,7 +241,7 @@ LL |     if let true...Y = 0 {}
    |                ^^^ help: use `..=` for an inclusive range
    |
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error: `...` range patterns are deprecated
   --> $DIR/recover-range-pats.rs:57:13
@@ -250,7 +250,7 @@ LL |     if let X...true = 0 {}
    |             ^^^ help: use `..=` for an inclusive range
    |
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error: `...` range patterns are deprecated
   --> $DIR/recover-range-pats.rs:60:14
@@ -259,7 +259,7 @@ LL |     if let .0...Y = 0 {}
    |              ^^^ help: use `..=` for an inclusive range
    |
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error: `...` range patterns are deprecated
   --> $DIR/recover-range-pats.rs:64:13
@@ -268,7 +268,7 @@ LL |     if let X... .0 = 0 {}
    |             ^^^ help: use `..=` for an inclusive range
    |
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error: `...` range patterns are deprecated
   --> $DIR/recover-range-pats.rs:138:20
@@ -280,7 +280,7 @@ LL |     mac2!(0, 1);
    |     ------------ in this macro invocation
    |
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
    = note: this error originates in the macro `mac2` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0029]: only `char` and numeric types are allowed in range patterns
index afb964c17e255053e3403dc5dbe0c96a4faedaab..74429cb438c73452a401b3efc6186902c0a18c2f 100644 (file)
@@ -7,7 +7,7 @@ LL |     false == false == false;
 help: split the comparison into two
    |
 LL |     false == false && false == false;
-   |                    ^^^^^^^^
+   |                    ++++++++
 
 error: comparison operators cannot be chained
   --> $DIR/require-parens-for-chained-comparison.rs:9:11
@@ -18,7 +18,7 @@ LL |     false == 0 < 2;
 help: parenthesize the comparison
    |
 LL |     false == (0 < 2);
-   |              ^     ^
+   |              +     +
 
 error: comparison operators cannot be chained
   --> $DIR/require-parens-for-chained-comparison.rs:13:6
@@ -29,7 +29,7 @@ LL |     f<X>();
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |     f::<X>();
-   |      ^^
+   |      ++
 
 error: comparison operators cannot be chained
   --> $DIR/require-parens-for-chained-comparison.rs:17:6
@@ -40,7 +40,7 @@ LL |     f<Result<Option<X>, Option<Option<X>>>(1, 2);
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |     f::<Result<Option<X>, Option<Option<X>>>(1, 2);
-   |      ^^
+   |      ++
 
 error: comparison operators cannot be chained
   --> $DIR/require-parens-for-chained-comparison.rs:22:21
index 5c229431ad34cc2c0edb378e30498ba04142a37d..feabd8f5813b87cb83b4344689b5b11723bb654b 100644 (file)
@@ -9,9 +9,9 @@ LL | |     }.hi() {
    |
 help: surround the struct literal with parentheses
    |
-LL |     for x in (Foo {
+LL ~     for x in (Foo {
 LL |         x: 3
-LL |     }).hi() {
+LL ~     }).hi() {
    |
 
 error[E0277]: `bool` is not an iterator
index 7a64a42e3c8aa13195ed5a57ad97d487cf463cc5..b5a9864bbc4c404352414526df5105bf92ac2fdc 100644 (file)
@@ -9,9 +9,9 @@ LL | |     }.hi() {
    |
 help: surround the struct literal with parentheses
    |
-LL |     if (Foo {
+LL ~     if (Foo {
 LL |         x: 3
-LL |     }).hi() {
+LL ~     }).hi() {
    |
 
 error: aborting due to previous error
index 98077761e01ccf590383424f53f6daa9694ed913..692b4d73503a43e9064e3f7d39c1db2d6ea12ab6 100644 (file)
@@ -9,9 +9,9 @@ LL | |     } {
    |
 help: surround the struct literal with parentheses
    |
-LL |     match (Foo {
+LL ~     match (Foo {
 LL |         x: 3
-LL |     }) {
+LL ~     }) {
    |
 
 error: aborting due to previous error
index a14df3a220e752251e8b0af11b1f54e460a0508a..17e9277e07413b0425eb158e204c64a0d0720992 100644 (file)
@@ -9,9 +9,9 @@ LL | |     }.hi() {
    |
 help: surround the struct literal with parentheses
    |
-LL |     while (Foo {
+LL ~     while (Foo {
 LL |         x: 3
-LL |     }).hi() {
+LL ~     }).hi() {
    |
 
 error: aborting due to previous error
index d12ea0b2fcb9a2a584ddf4a5db101b07f566a61e..b948ab2abb50870990fa355aa934d1086667c44f 100644 (file)
@@ -9,9 +9,9 @@ LL | |     }.hi() {
    |
 help: surround the struct literal with parentheses
    |
-LL |     while || (Foo {
+LL ~     while || (Foo {
 LL |         x: 3
-LL |     }).hi() {
+LL ~     }).hi() {
    |
 
 error[E0308]: mismatched types
index 3ea5ca565c5e530e9cd4525cc6dffafd6863dfab..4cffbe433b87d4e16d03858af2a4c0d6b1a999fa 100644 (file)
@@ -7,7 +7,7 @@ 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
@@ -18,7 +18,7 @@ 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
@@ -29,7 +29,7 @@ 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
@@ -40,7 +40,7 @@ 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
@@ -51,7 +51,7 @@ LL |     if x == E::V { field } {}
 help: surround the struct literal with parentheses
    |
 LL |     if x == (E::V { field }) {}
-   |             ^              ^
+   |             +              +
 
 error[E0308]: mismatched types
   --> $DIR/struct-literal-variant-in-if.rs:10:20
index 18b1b24122ecf320d2a2cd9c48e6a36da76deb13..1ae0205615cb11f952c6618d8d545df23cf96020 100644 (file)
@@ -12,8 +12,9 @@ LL | fn foo2(_: &dyn (Drop + AsRef<str>)) {}
    |
 help: remove the parentheses
    |
-LL | fn foo2(_: &dyn Drop + AsRef<str>) {}
-   |                --               --
+LL - fn foo2(_: &dyn (Drop + AsRef<str>)) {}
+LL + fn foo2(_: &dyn Drop + AsRef<str>) {}
+   | 
 
 error: expected parameter name, found `{`
   --> $DIR/trait-object-delimiters.rs:8:17
index 9bfc4943fe9414c3338a82c66e522f357d885456..b39fe4646a3cc3fe5fc367128491b3a89b1cb628 100644 (file)
@@ -24,7 +24,7 @@ LL |     let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>;
    |
    = note: `#[warn(bare_trait_objects)]` on by default
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 warning: trait objects without an explicit `dyn` are deprecated
   --> $DIR/trait-object-trait-parens.rs:13:16
@@ -33,7 +33,7 @@ LL |     let _: Box<?Sized + (for<'a> Trait<'a>) + (Obj)>;
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ?Sized + (for<'a> Trait<'a>) + (Obj)`
    |
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 warning: trait objects without an explicit `dyn` are deprecated
   --> $DIR/trait-object-trait-parens.rs:18:16
@@ -42,7 +42,7 @@ LL |     let _: Box<for<'a> Trait<'a> + (Obj) + (?Sized)>;
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn for<'a> Trait<'a> + (Obj) + (?Sized)`
    |
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
   --> $DIR/trait-object-trait-parens.rs:8:35
index 4e14eda8f2bfabd4f92fa8c9aacc21e43f8d87b2..0cfe9240e8514e65fb7ec186ff97069965c87581 100644 (file)
@@ -7,7 +7,7 @@ LL |     let y = 0;
 help: Unicode character ';' (Greek Question Mark) looks like ';' (Semicolon), but it is not
    |
 LL |     let y = 0;
-   |              ^
+   |              ~
 
 error: aborting due to previous error
 
index 04ea0c6e95f3987da93ac7683611254bfb57cba7..092abeb53cd405dbe0ded78c4480da97055bc738 100644 (file)
@@ -7,7 +7,7 @@ LL |     println!(“hello world”);
 help: Unicode characters '“' (Left Double Quotation Mark) and '”' (Right Double Quotation Mark) look like '"' (Quotation Mark), but are not
    |
 LL |     println!("hello world");
-   |              ^^^^^^^^^^^^^
+   |              ~~~~~~~~~~~~~
 
 error: unknown start of token: \u{201d}
   --> $DIR/unicode-quote-chars.rs:2:26
@@ -18,7 +18,7 @@ LL |     println!(“hello world”);
 help: Unicode character '”' (Right Double Quotation Mark) looks like '"' (Quotation Mark), but it is not
    |
 LL |     println!(“hello world");
-   |                          ^
+   |                          ~
 
 error: expected `,`, found `world`
   --> $DIR/unicode-quote-chars.rs:2:21
index e14e17c162233ac3008ef32752b00ed9d1395b1a..528306b22dd5a34806b23eb89ec5e8acc1b74e46 100644 (file)
@@ -8,7 +8,7 @@ LL |     a == b;
 help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement
    |
 LL | fn foo<T: PartialEq>(a: &T, b: T) where &T: PartialEq<T> {
-   |                                   ^^^^^^^^^^^^^^^^^^^^^^
+   |                                   ++++++++++++++++++++++
 
 error: aborting due to previous error
 
index 6ff0dadf0d1f3da7e78b9caaf48996d2e457fe80..4249a74b3ed62d3f77a37c361cb53cea9e68335b 100644 (file)
@@ -49,7 +49,7 @@ LL |         Some(ref _y @ _z) => {}
 help: borrow this field in the pattern to avoid moving `x.0`
    |
 LL |         Some(ref _y @ ref _z) => {}
-   |                       ^^^
+   |                       +++
 
 error[E0382]: borrow of moved value
   --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:26:14
@@ -64,7 +64,7 @@ LL |         Some(ref mut _y @ _z) => {}
 help: borrow this field in the pattern to avoid moving `x.0`
    |
 LL |         Some(ref mut _y @ ref _z) => {}
-   |                           ^^^
+   |                           +++
 
 error: aborting due to 6 previous errors
 
index e6a1e5ef07ce41bc96b7d9c18d5dd4d637869e17..c019aae3dfc9c10612e295c0f526433ed92c85c4 100644 (file)
@@ -299,7 +299,7 @@ LL |         ref a @ Some((ref b @ mut c, ref d @ e)) => {}
 help: borrow this field in the pattern to avoid moving the value
    |
 LL |         ref a @ Some((ref b @ ref mut c, ref d @ e)) => {}
-   |                               ^^^
+   |                               +++
 
 error[E0382]: borrow of moved value
   --> $DIR/borrowck-pat-by-move-and-ref.rs:69:38
@@ -314,7 +314,7 @@ LL |         ref a @ Some((ref b @ mut c, ref d @ e)) => {}
 help: borrow this field in the pattern to avoid moving the value
    |
 LL |         ref a @ Some((ref b @ mut c, ref d @ ref e)) => {}
-   |                                              ^^^
+   |                                              +++
 
 error[E0382]: borrow of moved value
   --> $DIR/borrowck-pat-by-move-and-ref.rs:11:11
index 9bdbf0bf9f40dfced6ed3e35aea1a6591fb913c0..7f5da8f3c2dcc3c788a22646245b02da1982a3f7 100644 (file)
@@ -21,11 +21,11 @@ LL |     let P() = U {};
 help: use `_` to explicitly ignore each field
    |
 LL |     let P(_) = U {};
-   |           ^
+   |           +
 help: use `..` to ignore all fields
    |
 LL |     let P(..) = U {};
-   |           ^^
+   |           ++
 
 error: aborting due to 2 previous errors
 
index f7644c19ea0d9cbc3435ef5a65f2beccb0bb2038..7d998af7fb38896d85beed9e6759b0c1b118cce5 100644 (file)
@@ -8,7 +8,7 @@ LL |         E::A(x @ ..) => {
 help: if you don't need to use the contents of x, discard the tuple's remaining fields
    |
 LL |         E::A(..) => {
-   |              ^^
+   |              ~~
 
 error: `..` patterns are not allowed here
   --> $DIR/issue-74539.rs:8:18
@@ -30,7 +30,7 @@ LL |         E::A(x @ ..) => {
 help: use `_` to explicitly ignore each field
    |
 LL |         E::A(x @ .., _) => {
-   |                    ^^^
+   |                    +++
 
 error: aborting due to 3 previous errors
 
index aca5c9aed96247a0d14c49100b608da6a1428b52..f2e2c8f021badac2c2a555395adb7c74c33c7e19 100644 (file)
@@ -8,7 +8,7 @@ LL |     let (foo @ ..,) = (0, 0);
 help: if you don't need to use the contents of foo, discard the tuple's remaining fields
    |
 LL |     let (..,) = (0, 0);
-   |          ^^
+   |          ~~
 
 error: `..` patterns are not allowed here
   --> $DIR/issue-74702.rs:2:16
index 70c21dbafe9fc160bce1b2bd5069c2eab5beb96f..2fbcb6d67ba3634da5a33fb874ec5f774b959bde 100644 (file)
@@ -19,7 +19,7 @@ LL |         S(x) => {}
 help: use `_` to explicitly ignore each field
    |
 LL |         S(x, _) => {}
-   |            ^^^
+   |            +++
 
 error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 2 fields
   --> $DIR/pat-tuple-underfield.rs:14:9
@@ -33,11 +33,11 @@ LL |         S(_) => {}
 help: use `_` to explicitly ignore each field
    |
 LL |         S(_, _) => {}
-   |            ^^^
+   |            +++
 help: use `..` to ignore all fields
    |
 LL |         S(..) => {}
-   |           ^^
+   |           ~~
 
 error[E0023]: this pattern has 0 fields, but the corresponding tuple struct has 2 fields
   --> $DIR/pat-tuple-underfield.rs:20:9
@@ -51,11 +51,11 @@ LL |         S() => {}
 help: use `_` to explicitly ignore each field
    |
 LL |         S(_, _) => {}
-   |           ^^^^
+   |           ++++
 help: use `..` to ignore all fields
    |
 LL |         S(..) => {}
-   |           ^^
+   |           ++
 
 error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> $DIR/pat-tuple-underfield.rs:27:9
@@ -69,7 +69,7 @@ LL |         E::S(x) => {}
 help: use `_` to explicitly ignore each field
    |
 LL |         E::S(x, _) => {}
-   |               ^^^
+   |               +++
 
 error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> $DIR/pat-tuple-underfield.rs:32:9
@@ -83,11 +83,11 @@ LL |         E::S(_) => {}
 help: use `_` to explicitly ignore each field
    |
 LL |         E::S(_, _) => {}
-   |               ^^^
+   |               +++
 help: use `..` to ignore all fields
    |
 LL |         E::S(..) => {}
-   |              ^^
+   |              ~~
 
 error[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 2 fields
   --> $DIR/pat-tuple-underfield.rs:38:9
@@ -101,11 +101,11 @@ LL |         E::S() => {}
 help: use `_` to explicitly ignore each field
    |
 LL |         E::S(_, _) => {}
-   |              ^^^^
+   |              ++++
 help: use `..` to ignore all fields
    |
 LL |         E::S(..) => {}
-   |              ^^
+   |              ++
 
 error[E0023]: this pattern has 2 fields, but the corresponding tuple struct has 4 fields
   --> $DIR/pat-tuple-underfield.rs:50:9
@@ -119,11 +119,11 @@ LL |         Point4(   a   ,     _    ) => {}
 help: use `_` to explicitly ignore each field
    |
 LL |         Point4(   a   ,     _    , _, _) => {}
-   |                                  ^^^^^^
+   |                                  ++++++
 help: use `..` to ignore the rest of the fields
    |
 LL |         Point4(   a, ..) => {}
-   |                    ^^^^
+   |                    ~~~~
 
 error: aborting due to 8 previous errors
 
index 44d6a854b3db6d90ddc35f48484c2f66566660e6..3f28ffed291629bf659a68eb7af2ac028c827c2f 100644 (file)
@@ -19,11 +19,11 @@ LL |         A::D(_) => (),
 help: use this syntax instead
    |
 LL |         A::D => (),
-   |         ^^^^
+   |         ~~~~
 help: a tuple variant with a similar name exists
    |
 LL |         A::B(_) => (),
-   |            ^
+   |            ~
 
 error[E0023]: this pattern has 3 fields, but the corresponding tuple variant has 2 fields
   --> $DIR/pattern-error-continue.rs:17:9
index 29aa0c1c92670e04dc8b401094b067da7857f8d9..02eff28015d178bd6f2152619d3dae40deaf1cf8 100644 (file)
@@ -49,7 +49,7 @@ LL |       let E::A = e;
 help: you might want to use `if let` to ignore the variant that isn't matched
    |
 LL |     if let E::A = e { /* */ }
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0004]: non-exhaustive patterns: `&B` and `&C` not covered
   --> $DIR/non-exhaustive-defined-here.rs:40:11
@@ -102,7 +102,7 @@ LL |       let E::A = e;
 help: you might want to use `if let` to ignore the variant that isn't matched
    |
 LL |     if let E::A = e { /* */ }
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0004]: non-exhaustive patterns: `&&mut &B` and `&&mut &C` not covered
   --> $DIR/non-exhaustive-defined-here.rs:48:11
@@ -198,7 +198,7 @@ LL |       let Opt::Some(ref _x) = e;
 help: you might want to use `if let` to ignore the variant that isn't matched
    |
 LL |     if let Opt::Some(ref _x) = e { /* */ }
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 8 previous errors
 
index de13176ddc2a54d9b1f0b9b53d3833b63fc261fd..acd33e0a41686db987d153612beeee62b1bc84d2 100644 (file)
@@ -21,7 +21,7 @@ LL | struct Guard<'a, T: 'a> {
 help: consider restricting type parameter `T`
    |
 LL | fn not_sync<T: std::marker::Sync>(x: Guard<T>) {
-   |              ^^^^^^^^^^^^^^^^^^^
+   |              +++++++++++++++++++
 
 error[E0277]: `T` cannot be shared between threads safely
   --> $DIR/phantom-auto-trait.rs:26:12
@@ -51,7 +51,7 @@ LL | struct Nested<T>(T);
 help: consider restricting type parameter `T`
    |
 LL | fn nested_not_sync<T: std::marker::Sync>(x: Nested<Guard<T>>) {
-   |                     ^^^^^^^^^^^^^^^^^^^
+   |                     +++++++++++++++++++
 
 error: aborting due to 2 previous errors
 
index 1a76f7c222fc27f54201248c3b00b741473d783c..3fdaf4cd0f55d74ef4810c57c4baf7f66ad07b67 100644 (file)
@@ -7,7 +7,7 @@ LL |     if x<-1 {
 help: if you meant to write a comparison against a negative value, add a space in between `<` and `-`
    |
 LL |     if x< -1 {
-   |         ^^^
+   |         ~~~
 
 error: aborting due to previous error
 
index 40155de9c770283159477f36f1efb44500711f9f..c42d9e6bbf0fcbcacadab027882df9a97d0e8cf7 100644 (file)
@@ -7,7 +7,7 @@ LL |     let_in(3u32, |i| { assert!(i == 3i32); });
 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
@@ -18,7 +18,7 @@ LL |     let_in(3i32, |i| { assert!(i == 3u32); });
 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
 
index d09a8aae7480108eee0c477cc6e7493bdbd71d3c..91bc84e70ac5163cb3629585450730ce10e8da6e 100644 (file)
@@ -10,7 +10,7 @@ LL |     Bar();
 help: a unit struct with a similar name exists
    |
 LL |     Baz();
-   |     ^^^
+   |     ~~~
 help: consider importing this function instead
    |
 LL | use foo2::Bar;
@@ -28,7 +28,7 @@ LL |     Bar();
 help: a unit struct with a similar name exists
    |
 LL |     Baz();
-   |     ^^^
+   |     ~~~
 help: consider importing this function
    |
 LL | use foo2::Bar;
@@ -46,7 +46,7 @@ LL |     let _x: Box<Bar>;
 help: a struct with a similar name exists
    |
 LL |     let _x: Box<Baz>;
-   |                 ^^^
+   |                 ~~~
 help: consider importing this trait
    |
 LL | use foo1::Bar;
index fdf0549cf50bc5fd5dcf4318b9a1f7a28d581fb1..904e9013f94a88a5296e9bf82ed8fa0b70cbe3f8 100644 (file)
@@ -21,7 +21,7 @@ LL |     Bar();
 help: a unit struct with a similar name exists
    |
 LL |     Baz();
-   |     ^^^
+   |     ~~~
 help: consider importing this function instead
    |
 LL | use foo2::Bar;
@@ -36,7 +36,7 @@ LL |     let _x : Bar();
 help: use `=` if you meant to assign
    |
 LL |     let _x = Bar();
-   |            ^
+   |            ~
 help: consider importing this trait instead
    |
 LL | use foo1::Bar;
index 8240cc3649d074c3da50a22c998082f5e132cb29..f51cfc836a8d51352aef39dd65be9dbe8f1a1f36 100644 (file)
@@ -336,8 +336,9 @@ LL |     pub type Alias<T: PrivTr> = T;
    = note: `#[warn(type_alias_bounds)]` on by default
 help: the bound will not be checked when the type alias is used, and should be removed
    |
-LL |     pub type Alias<T> = T;
-   |                    --
+LL -     pub type Alias<T: PrivTr> = T;
+LL +     pub type Alias<T> = T;
+   | 
 
 warning: where clauses are not enforced in type aliases
   --> $DIR/private-in-public-warn.rs:75:29
@@ -347,8 +348,9 @@ LL |     pub type Alias<T> where T: PrivTr = T;
    |
 help: the clause will not be checked when the type alias is used, and should be removed
    |
-LL |     pub type Alias<T>  = T;
-   |                      --
+LL -     pub type Alias<T> where T: PrivTr = T;
+LL +     pub type Alias<T>  = T;
+   | 
 
 error: aborting due to 36 previous errors; 2 warnings emitted
 
index 27f7639d213d24b0138d4790e47bec962aea71e0..b544be6e96a27519db38006aab96e76e5eb2cc05 100644 (file)
@@ -6,8 +6,8 @@ LL |     a: &u64
    |
 help: consider introducing a named lifetime parameter
    |
-LL | struct A<'a> {
-LL |     a: &'a u64
+LL ~ struct A<'a> {
+LL ~     a: &'a u64
    |
 
 error: aborting due to previous error
index 9e91ed4068b1fb8df8fee5e0cd19e61c80c4cb43..713560772ee4c0dcea6069664ccd607f82e69708 100644 (file)
@@ -18,7 +18,7 @@ LL |         Some(x) => { return x },
 help: you can convert an `isize` to a `usize` and panic if the converted value doesn't fit
    |
 LL |         Some(x) => { return x.try_into().unwrap() },
-   |                             ^^^^^^^^^^^^^^^^^^^^^
+   |                             ~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/span-preservation.rs:33:22
index b830b0e90098a490db11ac237b7578e3937b4a22..b5b667b41b67b6a29f32526d3fe18534be2539d9 100644 (file)
@@ -7,7 +7,7 @@ LL | pub foo(_s: usize) { bar() }
 help: add `fn` here to parse `foo` as a public function
    |
 LL | pub fn foo(_s: usize) { bar() }
-   |     ^^
+   |     ++
 
 error: aborting due to previous error
 
index 0df6c00a31656afc1fac55d628f78cfd57e2cee2..6a9aeaf4a56ac3fdb3bad647d6e9dba9c5e7d191 100644 (file)
@@ -7,7 +7,7 @@ LL | pub   bar<'a>(&self, _s: &'a usize) -> bool { true }
 help: add `fn` here to parse `bar` as a public method
    |
 LL | pub fn bar<'a>(&self, _s: &'a usize) -> bool { true }
-   |     ^^
+   |     ++
 
 error: aborting due to previous error
 
index 5b378df04b025d4243fadb2f3fd188b066bfc190..c1ca0136b18fbe29a11329963990acde85eadd03 100644 (file)
@@ -7,7 +7,7 @@ LL | pub   foo<'a>(_s: &'a usize) -> bool { true }
 help: add `fn` here to parse `foo` as a public function
    |
 LL | pub fn foo<'a>(_s: &'a usize) -> bool { true }
-   |     ^^
+   |     ++
 
 error: aborting due to previous error
 
index 928f62133a95bf8b19efdb9c210ffd78b686fa87..cb94c48add4be4b6ff61b4d82c4a85782ba330a1 100644 (file)
@@ -7,7 +7,7 @@ LL | pub   foo(_s: usize) -> bool { true }
 help: add `fn` here to parse `foo` as a public function
    |
 LL | pub fn foo(_s: usize) -> bool { true }
-   |     ^^
+   |     ++
 
 error: aborting due to previous error
 
index 79597c54e68e2b209944d0bb322e6e8a49f7fa80..562b68e354249982fadbf33f0c525867643b185e 100644 (file)
@@ -7,7 +7,7 @@ LL | pub S<'a> {
 help: add `struct` here to parse `S` as a public struct
    |
 LL | pub struct S<'a> {
-   |     ^^^^^^
+   |     ++++++
 
 error: aborting due to previous error
 
index 8af24904ef24cc1f4bec0d7e6c9dad202b5b91d6..d3a378786e4d2e3bbad850bec03327d5bcf0593f 100644 (file)
@@ -7,7 +7,7 @@ LL | pub S {
 help: add `struct` here to parse `S` as a public struct
    |
 LL | pub struct S {
-   |     ^^^^^^
+   |     ++++++
 
 error: aborting due to previous error
 
index db5042b40d8bcfa10e339fb1be41990cd3eb571e..86c533d7a59c9b81d8a87a68dfdede04f1b78b4b 100644 (file)
@@ -8,7 +8,7 @@ LL |     l.iter().map(f).collect()?
 help: consider specifying the type argument in the method call
    |
 LL |     l.iter().map(f).collect::<B>()?
-   |                            ^^^^^
+   |                            +++++
 
 error: aborting due to previous error
 
index 3330ced1ebf341aeebb65ee6b145b741de95542a..8af1a570253a2cb611e7325dcee79f3a76919f10 100644 (file)
@@ -16,7 +16,7 @@ note: the lint level is defined here
 LL | #![warn(ellipsis_inclusive_range_patterns)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error: aborting due to previous error; 1 warning emitted
 
index 90a4aa68222f64f16a58bd56e3f3d335d2eae893..009273c74350b214d1b70725cfb53f5d81b61df4 100644 (file)
@@ -16,7 +16,7 @@ note: the lint level is defined here
 LL | #![warn(ellipsis_inclusive_range_patterns)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error: aborting due to previous error; 1 warning emitted
 
index ab4709d8e709e0bd5c5f5b7bc389cce36dc7eb37..f5d25c5641dd1121077ed7f1a8adf1e21cebe4bf 100644 (file)
@@ -9,7 +9,7 @@ LL | enum List<T> { Cons(T, List<T>), Nil }
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `List` representable
    |
 LL | enum List<T> { Cons(T, Box<List<T>>), Nil }
-   |                        ^^^^       ^
+   |                        ++++       +
 
 error: aborting due to previous error
 
index 332dbb79cfa48530aeb40ce257290e62c7b4d5c8..a973c583a9d664ae806f5d8461303a83d5a8a444 100644 (file)
@@ -31,7 +31,7 @@ LL |     x;
 help: borrow this field in the pattern to avoid moving `x.0.0`
    |
 LL |         (Some(ref y), ()) => {},
-   |               ^^^
+   |               +++
 
 error: aborting due to 3 previous errors
 
index 4bd16c71137a1fb253e2fd5dcadce835afb9d159..561dd64b49d4bb3d83e7866601f7e92b6d7ea17b 100644 (file)
@@ -14,7 +14,7 @@ LL |         WrapB::new().set(|t: bool| if t { x } else { y }) // (separate erro
 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:67:26
@@ -32,7 +32,7 @@ LL |         WrapB::new().set(|t: bool| if t { x } else { y }) // (separate erro
 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
 
index f70e4ea9fbcc632ac947eb58540c571148f921fe..e446f2a0027e424abb6a5cd3770a24be6940886d 100644 (file)
@@ -14,7 +14,7 @@ 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
@@ -32,7 +32,7 @@ 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
@@ -50,7 +50,7 @@ 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
@@ -68,7 +68,7 @@ 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
@@ -86,7 +86,7 @@ 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
@@ -104,7 +104,7 @@ 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
@@ -122,7 +122,7 @@ 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
@@ -140,7 +140,7 @@ 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
@@ -158,7 +158,7 @@ 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
@@ -176,7 +176,7 @@ 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
@@ -194,7 +194,7 @@ 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
@@ -212,7 +212,7 @@ 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
@@ -230,7 +230,7 @@ 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
@@ -248,7 +248,7 @@ 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
@@ -266,7 +266,7 @@ 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
@@ -284,7 +284,7 @@ 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
@@ -302,7 +302,7 @@ 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
@@ -320,7 +320,7 @@ 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
@@ -338,7 +338,7 @@ 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
@@ -356,7 +356,7 @@ 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
 
index 3607d6a722c72fd4d1d5f67adc88ea3680ffd27b..1c8840f540e76712a11075f39fc710269926f2fd 100644 (file)
@@ -9,11 +9,11 @@ LL |     let x: Box<dyn Foo + 'static> = Box::new(v);
 help: consider changing the trait object's explicit `'static` bound to the lifetime of argument `v`
    |
 LL | fn a(v: &[u8]) -> Box<dyn Foo + '_> {
-   |                                 ^^
+   |                                 ~~
 help: alternatively, add an explicit `'static` bound to this reference
    |
 LL | fn a(v: &'static [u8]) -> Box<dyn Foo + 'static> {
-   |         ^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~
 
 error[E0759]: `v` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement
   --> $DIR/region-object-lifetime-in-coercion.rs:13:14
@@ -26,11 +26,11 @@ LL |     Box::new(v)
 help: consider changing the trait object's explicit `'static` bound to the lifetime of argument `v`
    |
 LL | fn b(v: &[u8]) -> Box<dyn Foo + '_> {
-   |                                 ^^
+   |                                 ~~
 help: alternatively, add an explicit `'static` bound to this reference
    |
 LL | fn b(v: &'static [u8]) -> Box<dyn Foo + 'static> {
-   |         ^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~
 
 error[E0759]: `v` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement
   --> $DIR/region-object-lifetime-in-coercion.rs:19:14
@@ -44,7 +44,7 @@ LL |     Box::new(v)
 help: to declare that the trait object captures data from argument `v`, you can add an explicit `'_` lifetime bound
    |
 LL | fn c(v: &[u8]) -> Box<dyn Foo + '_> {
-   |                               ^^^^
+   |                               ++++
 
 error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
   --> $DIR/region-object-lifetime-in-coercion.rs:23:14
index da995a96310c2fbae3aa842c51db7070f214d1b0..78d2371cf53b29f2ebb14535c88872e0bc57ed65 100644 (file)
@@ -9,11 +9,11 @@ LL |     box B(&*v) as Box<dyn X>
 help: consider changing the trait object's explicit `'static` bound to the lifetime of argument `v`
    |
 LL | fn g<'a, T: 'static>(v: Box<dyn A<T> + 'a>) -> Box<dyn X + 'a> {
-   |                                                            ^^
+   |                                                            ~~
 help: alternatively, add an explicit `'static` bound to this reference
    |
 LL | fn g<'a, T: 'static>(v: Box<(dyn A<T> + 'static)>) -> Box<dyn X + 'static> {
-   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                         ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 7dc880849a629cd40fa7acac530e5b5488452b00..8c94b44f20037c84df4b0b89c14d08beddf7f84b 100644 (file)
@@ -9,11 +9,11 @@ LL |     box B(&*v) as Box<dyn X>
 help: consider changing the trait object's explicit `'static` bound to the lifetime of argument `v`
    |
 LL | fn i<'a, T, U>(v: Box<dyn A<U>+'a>) -> Box<dyn X + 'a> {
-   |                                                    ^^
+   |                                                    ~~
 help: alternatively, add an explicit `'static` bound to this reference
    |
 LL | fn i<'a, T, U>(v: Box<(dyn A<U> + 'static)>) -> Box<dyn X + 'static> {
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                   ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index b3649c5b48530dc486be9e658169a93c5b2315c6..ed547aa9c4100bb32dedad56ab0c7e4e75372aee 100644 (file)
@@ -6,8 +6,8 @@ LL |     Bar(&isize)
    |
 help: consider introducing a named lifetime parameter
    |
-LL | enum Foo<'a> {
-LL |     Bar(&'a isize)
+LL ~ enum Foo<'a> {
+LL ~     Bar(&'a isize)
    |
 
 error: aborting due to previous error
index 60a6fb9a0fad9aa79cc9edaafd871413205c6c9c..992d25c9fd124c7b5164bb86308fe1231fe6fea4 100644 (file)
@@ -6,8 +6,8 @@ LL |     x: &isize
    |
 help: consider introducing a named lifetime parameter
    |
-LL | struct Foo<'a> {
-LL |     x: &'a isize
+LL ~ struct Foo<'a> {
+LL ~     x: &'a isize
    |
 
 error: aborting due to previous error
index 5f6ff280e6531e38742e1afa2de99f0555eb83a7..250752c9b9e685b5fcdbbcd733151a63ced4c493 100644 (file)
@@ -28,11 +28,11 @@ LL |     fn m4(&self, arg: &'b isize) { }
 help: consider introducing lifetime `'b` here
    |
 LL | impl<'b, 'a> Foo<'a> {
-   |      ^^^
+   |      +++
 help: consider introducing lifetime `'b` here
    |
 LL |     fn m4<'b>(&self, arg: &'b isize) { }
-   |          ^^^^
+   |          ++++
 
 error[E0261]: use of undeclared lifetime name `'b`
   --> $DIR/regions-name-undeclared.rs:17:12
@@ -44,11 +44,11 @@ LL |     fn m5(&'b self) { }
 help: consider introducing lifetime `'b` here
    |
 LL | impl<'b, 'a> Foo<'a> {
-   |      ^^^
+   |      +++
 help: consider introducing lifetime `'b` here
    |
 LL |     fn m5<'b>(&'b self) { }
-   |          ^^^^
+   |          ++++
 
 error[E0261]: use of undeclared lifetime name `'b`
   --> $DIR/regions-name-undeclared.rs:18:27
@@ -60,11 +60,11 @@ LL |     fn m6(&self, arg: Foo<'b>) { }
 help: consider introducing lifetime `'b` here
    |
 LL | impl<'b, 'a> Foo<'a> {
-   |      ^^^
+   |      +++
 help: consider introducing lifetime `'b` here
    |
 LL |     fn m6<'b>(&self, arg: Foo<'b>) { }
-   |          ^^^^
+   |          ++++
 
 error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/regions-name-undeclared.rs:26:22
@@ -107,11 +107,11 @@ LL | ...                   &'b isize,
 help: consider introducing lifetime `'b` here
    |
 LL | fn fn_types<'b>(a: &'a isize,
-   |            ^^^^
+   |            ++++
 help: consider making the bound lifetime-generic with a new `'b` lifetime
    |
 LL |             b: Box<dyn for<'a, 'b> FnOnce(&'a isize,
-   |                              ^^^^
+   |                              ++++
 
 error[E0261]: use of undeclared lifetime name `'b`
   --> $DIR/regions-name-undeclared.rs:46:36
@@ -124,11 +124,11 @@ LL | ...                   &'b isize)>,
 help: consider introducing lifetime `'b` here
    |
 LL | fn fn_types<'b>(a: &'a isize,
-   |            ^^^^
+   |            ++++
 help: consider making the bound lifetime-generic with a new `'b` lifetime
    |
 LL |             b: Box<dyn for<'a, 'b> FnOnce(&'a isize,
-   |                              ^^^^
+   |                              ++++
 
 error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/regions-name-undeclared.rs:47:17
@@ -151,11 +151,11 @@ LL |     async fn buggy(&self) -> &'a str {
 help: consider introducing lifetime `'a` here
    |
 LL | impl<'a> Bug {
-   |     ^^^^
+   |     ++++
 help: consider introducing lifetime `'a` here
    |
 LL |     async fn buggy<'a>(&self) -> &'a str {
-   |                   ^^^^
+   |                   ++++
 
 error: aborting due to 12 previous errors
 
index e76073f4f6b13f5b6be54d1179799ef19cd2c63c..50b3748bf40e9f78a9644e8455bd060f910ba382 100644 (file)
@@ -10,11 +10,11 @@ LL |     Box::new(move || { *x })
 help: consider changing the trait object's explicit `'static` bound to the lifetime of argument `x`
    |
 LL | fn static_proc(x: &isize) -> Box<dyn FnMut() -> (isize) + '_> {
-   |                                                           ^^
+   |                                                           ~~
 help: alternatively, add an explicit `'static` bound to this reference
    |
 LL | fn static_proc(x: &'static isize) -> Box<dyn FnMut() -> (isize) + 'static> {
-   |                   ^^^^^^^^^^^^^^
+   |                   ~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 69c11b5c56fd387cb729bbb6976ffcfc23c1972d..dff4ca68d3103bbccb799a24de968004217995c6 100644 (file)
@@ -11,7 +11,7 @@ LL |     let _: unsafe extern "rust-intrinsic" fn(isize) -> usize = std::mem::tr
 help: use parentheses to call this function
    |
 LL |     let _: unsafe extern "rust-intrinsic" fn(isize) -> usize = std::mem::transmute(...);
-   |                                                                                   ^^^^^
+   |                                                                                   +++++
 
 error[E0606]: casting `unsafe extern "rust-intrinsic" fn(_) -> _ {transmute::<_, _>}` as `unsafe extern "rust-intrinsic" fn(isize) -> usize` is invalid
   --> $DIR/reify-intrinsic.rs:11:13
index e90754e9118d25e9e5728441630e087e22c1e066..cd07e5b8935f201cb0418b0b45fbc2ee28e27003 100644 (file)
@@ -61,7 +61,7 @@ LL |     let f = [0; 4u8];
 help: change the type of the numeric literal from `u8` to `usize`
    |
 LL |     let f = [0; 4usize];
-   |                 ^^^^^^
+   |                 ~~~~~~
 
 error: aborting due to 9 previous errors
 
index 47e5b803970b5cd938b15dccab939df11c336649..7878efeebe996fa6a391e4bc1fb95fa9acb4a54d 100644 (file)
@@ -7,7 +7,7 @@ LL |     let become = 0;
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     let r#become = 0;
-   |         ^^^^^^^^
+   |         ~~~~~~~~
 
 error: aborting due to previous error
 
index 8083233c01b92ec431d7da3394d23404b2a7054d..d187267388577afba36d530d8e59e1888cff7e63 100644 (file)
@@ -19,7 +19,7 @@ LL |     default();
 help: you might have meant to call the associated function
    |
 LL |     Self::default();
-   |     ^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~
 help: consider importing this function
    |
 LL | use std::default::default;
@@ -78,7 +78,7 @@ LL |     if self.whiskers > 3 {
 help: add a `self` receiver parameter to make the associated `fn` a method
    |
 LL |   fn meow(&self) {
-   |           ^^^^^
+   |           +++++
 
 error[E0425]: cannot find function `grow_older` in this scope
   --> $DIR/issue-2356.rs:72:5
index 72d66b0f6a2a16e4947f6140c33daebf71e40d19..5045ec6c30e3536d373ac5cdcffb03a6d45fe30d 100644 (file)
@@ -10,11 +10,11 @@ LL |         handle: Handle
 help: use struct literal syntax instead
    |
 LL |         handle: Handle {}
-   |                 ^^^^^^^^^
+   |                 ~~~~~~~~~
 help: a local variable with a similar name exists
    |
 LL |         handle: handle
-   |                 ^^^^^^
+   |                 ~~~~~~
 
 error: aborting due to previous error
 
index e94877fded78467dc24155ce46e4ccb842ff84ff..939392733f0e9659de281625967ee497f98f9eb1 100644 (file)
@@ -9,7 +9,7 @@ LL | fn foo(_x: K) {}
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL | fn foo(_x: &K) {}
-   |            ^
+   |            +
 
 error: aborting due to previous error
 
index a8aa50b7c3ab2247e8d64fa1e72dbeb921e95b26..32b972b21ffade1f61f92b1c9d4a342f1c43cc91 100644 (file)
@@ -20,7 +20,7 @@ LL | trait K = dyn I;
 help: a trait with a similar name exists
    |
 LL | impl I for isize {}
-   |      ^
+   |      ~
 
 error: aborting due to 2 previous errors
 
index 807dadf417bf5c2a0d3b535c1a23101ce8a83eba..192349e0fafe31ab6b55c52dd7e11abd11ce9224 100644 (file)
@@ -18,13 +18,13 @@ LL | |         }
 help: you might have meant to use the following enum variant
    |
 LL |         m::Z::Unit;
-   |         ^^^^^^^^^^
+   |         ~~~~~~~~~~
 help: the following enum variants are available
    |
 LL |         (m::Z::Fn(/* fields */));
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~
 LL |         (m::Z::Struct { /* fields */ });
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0423]: expected value, found enum `Z`
   --> $DIR/privacy-enum-ctor.rs:25:9
@@ -46,13 +46,13 @@ LL | |         }
 help: you might have meant to use the following enum variant
    |
 LL |         m::Z::Unit;
-   |         ^^^^^^^^^^
+   |         ~~~~~~~~~~
 help: the following enum variants are available
    |
 LL |         (m::Z::Fn(/* fields */));
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~
 LL |         (m::Z::Struct { /* fields */ });
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0423]: expected value, found struct variant `Z::Struct`
   --> $DIR/privacy-enum-ctor.rs:29:20
@@ -88,17 +88,17 @@ LL | |     }
 help: you might have meant to use the following enum variant
    |
 LL |     let _: E = E::Unit;
-   |                ^^^^^^^
+   |                ~~~~~~~
 help: the following enum variants are available
    |
 LL |     let _: E = (E::Fn(/* fields */));
-   |                ^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~
 LL |     let _: E = (E::Struct { /* fields */ });
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 help: a function with a similar name exists
    |
 LL |     let _: E = m::f;
-   |                   ^
+   |                   ~
 help: consider importing one of these items instead
    |
 LL | use std::f32::consts::E;
@@ -137,13 +137,13 @@ LL | |     }
 help: you might have meant to use the following enum variant
    |
 LL |     let _: E = E::Unit;
-   |                ^^^^^^^
+   |                ~~~~~~~
 help: the following enum variants are available
    |
 LL |     let _: E = (E::Fn(/* fields */));
-   |                ^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~
 LL |     let _: E = (E::Struct { /* fields */ });
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 help: consider importing one of these items instead
    |
 LL | use std::f32::consts::E;
@@ -174,7 +174,7 @@ LL |     let _: Z = m::n::Z;
 help: an enum with a similar name exists
    |
 LL |     let _: E = m::n::Z;
-   |            ^
+   |            ~
 help: consider importing this enum
    |
 LL | use m::Z;
@@ -200,13 +200,13 @@ LL | |         }
 help: you might have meant to use the following enum variant
    |
 LL |     let _: Z = m::Z::Unit;
-   |                ^^^^^^^^^^
+   |                ~~~~~~~~~~
 help: the following enum variants are available
    |
 LL |     let _: Z = (m::Z::Fn(/* fields */));
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~
 LL |     let _: Z = (m::Z::Struct { /* fields */ });
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0412]: cannot find type `Z` in this scope
   --> $DIR/privacy-enum-ctor.rs:61:12
@@ -220,7 +220,7 @@ LL |     let _: Z = m::n::Z::Fn;
 help: an enum with a similar name exists
    |
 LL |     let _: E = m::n::Z::Fn;
-   |            ^
+   |            ~
 help: consider importing this enum
    |
 LL | use m::Z;
@@ -238,7 +238,7 @@ LL |     let _: Z = m::n::Z::Struct;
 help: an enum with a similar name exists
    |
 LL |     let _: E = m::n::Z::Struct;
-   |            ^
+   |            ~
 help: consider importing this enum
    |
 LL | use m::Z;
@@ -267,7 +267,7 @@ LL |     let _: Z = m::n::Z::Unit {};
 help: an enum with a similar name exists
    |
 LL |     let _: E = m::n::Z::Unit {};
-   |            ^
+   |            ~
 help: consider importing this enum
    |
 LL | use m::Z;
@@ -337,7 +337,7 @@ LL |         let _: Z = Z::Fn;
 help: use parentheses to instantiate this tuple variant
    |
 LL |         let _: Z = Z::Fn(_);
-   |                         ^^^
+   |                         +++
 
 error[E0618]: expected function, found enum variant `Z::Unit`
   --> $DIR/privacy-enum-ctor.rs:31:17
@@ -353,7 +353,7 @@ LL |         let _ = Z::Unit();
 help: `Z::Unit` is a unit variant, you need to write it without the parenthesis
    |
 LL |         let _ = Z::Unit;
-   |                 ^^^^^^^
+   |                 ~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/privacy-enum-ctor.rs:43:16
@@ -371,7 +371,7 @@ LL |     let _: E = m::E::Fn;
 help: use parentheses to instantiate this tuple variant
    |
 LL |     let _: E = m::E::Fn(_);
-   |                        ^^^
+   |                        +++
 
 error[E0618]: expected function, found enum variant `m::E::Unit`
   --> $DIR/privacy-enum-ctor.rs:47:16
@@ -387,7 +387,7 @@ LL |     let _: E = m::E::Unit();
 help: `m::E::Unit` is a unit variant, you need to write it without the parenthesis
    |
 LL |     let _: E = m::E::Unit;
-   |                ^^^^^^^^^^
+   |                ~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/privacy-enum-ctor.rs:51:16
@@ -405,7 +405,7 @@ LL |     let _: E = E::Fn;
 help: use parentheses to instantiate this tuple variant
    |
 LL |     let _: E = E::Fn(_);
-   |                     ^^^
+   |                     +++
 
 error[E0618]: expected function, found enum variant `E::Unit`
   --> $DIR/privacy-enum-ctor.rs:55:16
@@ -421,7 +421,7 @@ LL |     let _: E = E::Unit();
 help: `E::Unit` is a unit variant, you need to write it without the parenthesis
    |
 LL |     let _: E = E::Unit;
-   |                ^^^^^^^
+   |                ~~~~~~~
 
 error: aborting due to 23 previous errors
 
index a0a858209019dea7c5a504f7e4ed06a1d439a462..abf068a1f68b75952d14fd05ae71e3a96dadc811 100644 (file)
@@ -8,7 +8,7 @@ LL | use std::slice as std;
 help: you can use `as` to change the binding name of the import
    |
 LL | use std::slice as other_std;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 83beb20fe90b3ed6278361483f586d5c931ac05a..922753a00db17b80d58d3240accd35653e30935e 100644 (file)
@@ -11,7 +11,7 @@ LL | fn transmute() {}
 help: you can use `as` to change the binding name of the import
    |
 LL | use std::mem::transmute as other_transmute;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 104ed9bdc29e10ee1a79341d1aaf407400451862..b63495458a02db161dafc9f9a2bfd7004f5b6493 100644 (file)
@@ -11,7 +11,7 @@ LL | struct Iter;
 help: you can use `as` to change the binding name of the import
    |
 LL | use std::slice::Iter as OtherIter;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index efcfc7198ab51291f49e763c4627838e83298457..78d77678083c3cd584d6c2933779d2d59ebb5e96 100644 (file)
@@ -7,7 +7,7 @@ LL |     assert_eq(1, 1);
 help: use `!` to invoke the macro
    |
 LL |     assert_eq!(1, 1);
-   |              ^
+   |              +
 
 error: aborting due to previous error
 
index 2d35159ec9a22b3afda928a98bac6842f8e86259..54b242123eb8f1bd82f5e984a319f7a7a020070a 100644 (file)
@@ -38,7 +38,7 @@ LL |     a::b::J
 help: a constant with a similar name exists
    |
 LL |     a::I.J
-   |        ^
+   |        ~
 
 error[E0423]: expected value, found module `a`
   --> $DIR/suggest-path-instead-of-mod-dot-item.rs:37:5
@@ -71,11 +71,11 @@ LL |     a::b.f()
 help: use the path separator to refer to an item
    |
 LL |     a::b::f()
-   |     ^^^^^^^
+   |     ~~~~~~~
 help: a constant with a similar name exists
    |
 LL |     a::I.f()
-   |        ^
+   |        ~
 
 error[E0423]: expected value, found module `a::b`
   --> $DIR/suggest-path-instead-of-mod-dot-item.rs:50:5
index a8045e043ad891c000f3230b9dbeb19d5c78a97e..eb2322d51fd5162acadb3a13de2b2eccb36ccb22 100644 (file)
@@ -13,15 +13,15 @@ LL | |         }
 help: consider using a semicolon here
    |
 LL |             value.get_or_insert_with(func);
-   |                                           ^
+   |                                           +
 help: consider using a semicolon here
    |
 LL |         };
-   |          ^
+   |          +
 help: you might have meant to return this value
    |
 LL |             return value.get_or_insert_with(func);
-   |             ^^^^^^                               ^
+   |             ++++++                               +
 
 error: aborting due to previous error
 
index 6ef921bef3d7a9cbfb640aec4d8d7c4ce26df81d..5af136e6011238497ff2b145661577b7a4ce979f 100644 (file)
@@ -9,11 +9,11 @@ LL |     foo(4 as usize)
 help: consider using a semicolon here
    |
 LL |     foo(4 as usize);
-   |                    ^
+   |                    +
 help: try adding a return type
    |
 LL | fn bar() -> S<usize> {
-   |          ^^^^^^^^^^^
+   |          +++++++++++
 
 error: aborting due to previous error
 
index f8527961374ddb79958150dada7af654eb701e4c..87ef18878d6f195fe664b7364eb8cc411dc5ad0b 100644 (file)
@@ -12,7 +12,7 @@ LL | |     }
 help: you might have meant to return this value
    |
 LL |         return Err(42);
-   |         ^^^^^^        ^
+   |         ++++++        +
 
 error: aborting due to previous error
 
index 141363fc32caa5cd35b632c8d571dfb194e97ad8..b0c319f2c7f4188be632036d70463296597125d6 100644 (file)
@@ -66,7 +66,7 @@ LL |     let NormalStruct { first_field, second_field } = ns;
 help: add `..` at the end of the field list to ignore all other fields
    |
 LL |     let NormalStruct { first_field, second_field , .. } = ns;
-   |                                                  ^^^^^^
+   |                                                  ~~~~~~
 
 error[E0638]: `..` required with struct marked as non-exhaustive
   --> $DIR/struct.rs:26:9
@@ -77,7 +77,7 @@ LL |     let TupleStruct { 0: first_field, 1: second_field } = ts;
 help: add `..` at the end of the field list to ignore all other fields
    |
 LL |     let TupleStruct { 0: first_field, 1: second_field , .. } = ts;
-   |                                                       ^^^^^^
+   |                                                       ~~~~~~
 
 error[E0638]: `..` required with struct marked as non-exhaustive
   --> $DIR/struct.rs:35:9
@@ -88,7 +88,7 @@ LL |     let UnitStruct { } = us;
 help: add `..` at the end of the field list to ignore all other fields
    |
 LL |     let UnitStruct { .. } = us;
-   |                      ^^^^
+   |                      ~~~~
 
 error: aborting due to 9 previous errors
 
index fbdbb0c9930a6a6d1ed89f91b3883289c62afa85..64cae3748c91e9ed38f7aad23e2af8ae96a763dd 100644 (file)
@@ -73,7 +73,7 @@ LL |         NonExhaustiveVariants::Struct { field } => ""
 help: add `..` at the end of the field list to ignore all other fields
    |
 LL |         NonExhaustiveVariants::Struct { field , .. } => ""
-   |                                               ^^^^^^
+   |                                               ~~~~~~
 
 error[E0638]: `..` required with variant marked as non-exhaustive
   --> $DIR/variant.rs:30:12
@@ -84,7 +84,7 @@ LL |     if let NonExhaustiveVariants::Struct { field } = variant_struct {
 help: add `..` at the end of the field list to ignore all other fields
    |
 LL |     if let NonExhaustiveVariants::Struct { field , .. } = variant_struct {
-   |                                                  ^^^^^^
+   |                                                  ~~~~~~
 
 error: aborting due to 8 previous errors
 
index dfa44008ad7840efe9d5ce0a0c9550899a186703..09b51fe0568707684e4c7d9cd0edf748da12ad8d 100644 (file)
@@ -1,8 +1,8 @@
 error[E0491]: in type `&'a Foo<'b>`, reference has a longer lifetime than the data it references
-  --> $DIR/regions-outlives-nominal-type-region-rev.rs:17:9
+  --> $DIR/regions-outlives-nominal-type-region-rev.rs:17:20
    |
 LL |         type Out = &'a Foo<'b>;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^
+   |                    ^^^^^^^^^^^
    |
 note: the pointer is valid for the lifetime `'a` as defined on the impl at 16:10
   --> $DIR/regions-outlives-nominal-type-region-rev.rs:16:10
index 3561379138b9b2264447a676327d61530f3e46ed..957a9d6dd3c1243876fc9547da9b2a09d6656fef 100644 (file)
@@ -1,8 +1,8 @@
 error[E0491]: in type `&'a Foo<'b>`, reference has a longer lifetime than the data it references
-  --> $DIR/regions-outlives-nominal-type-region.rs:17:9
+  --> $DIR/regions-outlives-nominal-type-region.rs:17:20
    |
 LL |         type Out = &'a Foo<'b>;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^
+   |                    ^^^^^^^^^^^
    |
 note: the pointer is valid for the lifetime `'a` as defined on the impl at 16:10
   --> $DIR/regions-outlives-nominal-type-region.rs:16:10
index 207686defa1ac6a8c55aca9a2d93be2515f6eec3..1589f93d90c8ea184b08b1bb5287292da796c0ad 100644 (file)
@@ -1,8 +1,8 @@
 error[E0491]: in type `&'a Foo<&'b i32>`, reference has a longer lifetime than the data it references
-  --> $DIR/regions-outlives-nominal-type-type-rev.rs:17:9
+  --> $DIR/regions-outlives-nominal-type-type-rev.rs:17:20
    |
 LL |         type Out = &'a Foo<&'b i32>;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                    ^^^^^^^^^^^^^^^^
    |
 note: the pointer is valid for the lifetime `'a` as defined on the impl at 16:10
   --> $DIR/regions-outlives-nominal-type-type-rev.rs:16:10
index c1c4e78f785c35eed291bcac9c688f82ed10cb27..4bfaa1aac782aaa51dd9452cf3fca5e849e3419e 100644 (file)
@@ -1,8 +1,8 @@
 error[E0491]: in type `&'a Foo<&'b i32>`, reference has a longer lifetime than the data it references
-  --> $DIR/regions-outlives-nominal-type-type.rs:17:9
+  --> $DIR/regions-outlives-nominal-type-type.rs:17:20
    |
 LL |         type Out = &'a Foo<&'b i32>;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                    ^^^^^^^^^^^^^^^^
    |
 note: the pointer is valid for the lifetime `'a` as defined on the impl at 16:10
   --> $DIR/regions-outlives-nominal-type-type.rs:16:10
index 71caeefabac3468cb3fc39538c07e8ceca6f3217..1b1a2f7b043b76ea150d981b883303598e6d81ad 100644 (file)
@@ -1,18 +1,18 @@
 error[E0309]: the parameter type `T` may not live long enough
-  --> $DIR/regions-struct-not-wf.rs:13:5
+  --> $DIR/regions-struct-not-wf.rs:13:16
    |
 LL | impl<'a, T> Trait<'a, T> for usize {
    |          - help: consider adding an explicit lifetime bound...: `T: 'a`
 LL |     type Out = &'a T;
-   |     ^^^^^^^^^^^^^^^^^ ...so that the reference type `&'a T` does not outlive the data it points at
+   |                ^^^^^ ...so that the reference type `&'a T` does not outlive the data it points at
 
 error[E0309]: the parameter type `T` may not live long enough
-  --> $DIR/regions-struct-not-wf.rs:21:5
+  --> $DIR/regions-struct-not-wf.rs:21:16
    |
 LL | impl<'a, T> Trait<'a, T> for u32 {
    |          - help: consider adding an explicit lifetime bound...: `T: 'a`
 LL |     type Out = RefOk<'a, T>;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds...
+   |                ^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds...
    |
 note: ...that is required by this bound
   --> $DIR/regions-struct-not-wf.rs:16:20
@@ -21,10 +21,10 @@ LL | struct RefOk<'a, T:'a> {
    |                    ^^
 
 error[E0491]: in type `&'a &'b T`, reference has a longer lifetime than the data it references
-  --> $DIR/regions-struct-not-wf.rs:25:5
+  --> $DIR/regions-struct-not-wf.rs:25:16
    |
 LL |     type Out = &'a &'b T;
-   |     ^^^^^^^^^^^^^^^^^^^^^
+   |                ^^^^^^^^^
    |
 note: the pointer is valid for the lifetime `'a` as defined on the impl at 24:6
   --> $DIR/regions-struct-not-wf.rs:24:6
index 23eabfa3b3edc50bf86428b26935763907f0be03..996d0ea476d5c0486db7d98d596c20d058ae345d 100644 (file)
@@ -7,7 +7,7 @@ LL |         true && let 1 = 1
 help: enclose the `const` expression in braces
    |
 LL |         { true && let 1 = 1 }
-   |         ^                   ^
+   |         +                   +
 
 error: `let` expressions are not supported here
   --> $DIR/disallowed-positions.rs:32:9
@@ -482,8 +482,9 @@ LL |     if &let 0 = 0 {}
    |
 help: consider removing the borrow
    |
-LL |     if let 0 = 0 {}
-   |       --
+LL -     if &let 0 = 0 {}
+LL +     if let 0 = 0 {}
+   | 
 
 error[E0614]: type `bool` cannot be dereferenced
   --> $DIR/disallowed-positions.rs:36:8
@@ -541,7 +542,7 @@ LL |     if x = let 0 = 0 {}
 help: you might have meant to compare for equality
    |
 LL |     if x == let 0 = 0 {}
-   |          ^^
+   |          ~~
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:59:8
@@ -684,8 +685,9 @@ LL |     while &let 0 = 0 {}
    |
 help: consider removing the borrow
    |
-LL |     while let 0 = 0 {}
-   |          --
+LL -     while &let 0 = 0 {}
+LL +     while let 0 = 0 {}
+   | 
 
 error[E0614]: type `bool` cannot be dereferenced
   --> $DIR/disallowed-positions.rs:100:11
@@ -743,7 +745,7 @@ LL |     while x = let 0 = 0 {}
 help: you might have meant to compare for equality
    |
 LL |     while x == let 0 = 0 {}
-   |             ^^
+   |             ~~
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:123:11
index 7364f62c922298b9dcb1863c827e88ba334bb97c..db464ad03f5f0a082eb1d5d4a8d9ebae5ffca3df 100644 (file)
@@ -335,8 +335,9 @@ LL |     if (let 0 = 1) {}
    |
 help: `if let` needs to be written without parentheses
    |
-LL |     if let 0 = 1 {}
-   |       --       --
+LL -     if (let 0 = 1) {}
+LL +     if let 0 = 1 {}
+   | 
 
 error: invalid parentheses around `let` expression in `if let`
   --> $DIR/feature-gate.rs:18:8
@@ -346,8 +347,9 @@ LL |     if (((let 0 = 1))) {}
    |
 help: `if let` needs to be written without parentheses
    |
-LL |     if let 0 = 1 {}
-   |       --       --
+LL -     if (((let 0 = 1))) {}
+LL +     if let 0 = 1 {}
+   | 
 
 error: `let` expressions are not supported here
   --> $DIR/feature-gate.rs:22:16
@@ -581,8 +583,9 @@ LL |     use_expr!((let 0 = 1));
    |
 help: `if let` needs to be written without parentheses
    |
-LL |     use_expr!(let 0 = 1);
-   |              --       --
+LL -     use_expr!((let 0 = 1));
+LL +     use_expr!(let 0 = 1);
+   | 
 
 error: `let` expressions are not supported here
   --> $DIR/feature-gate.rs:127:16
index 5516d4a4c1c1cd0398b944edf5e2c69dfdb39e54..4514fd96c2eddc993490cfb7ec0e68d7e38ef102 100644 (file)
@@ -8,15 +8,15 @@ LL | trait Trait2015 { fn foo(#[allow(C)] i32); }
 help: if this is a `self` type, give it a parameter name
    |
 LL | trait Trait2015 { fn foo(#[allow(C)] self: i32); }
-   |                                      ^^^^^^^^^
+   |                                      ~~~~~~~~~
 help: if this is a parameter name, give it a type
    |
 LL | trait Trait2015 { fn foo(#[allow(C)] i32: TypeName); }
-   |                                      ^^^^^^^^^^^^^
+   |                                      ~~~~~~~~~~~~~
 help: if this is a type, explicitly ignore the parameter name
    |
 LL | trait Trait2015 { fn foo(#[allow(C)] _: i32); }
-   |                                      ^^^^^^
+   |                                      ~~~~~~
 
 error: aborting due to previous error
 
index f815389ff01c3cacfbd480fab870243544426b9a..79d170cdd1b61757ef3e145dbdee70b056438e22 100644 (file)
@@ -6,8 +6,9 @@ LL | const impl Foo for i32 {}
    |
 help: you might have meant to write a const trait impl
    |
-LL | impl const Foo for i32 {}
-   |--    ^^^^^
+LL - const impl Foo for i32 {}
+LL + impl const Foo for i32 {}
+   | 
 
 error: expected identifier, found keyword `impl`
   --> $DIR/const-impl-recovery.rs:9:7
@@ -17,8 +18,9 @@ LL | const impl<T: Foo> Bar for T {}
    |
 help: you might have meant to write a const trait impl
    |
-LL | impl<T: Foo> const Bar for T {}
-   |--            ^^^^^
+LL - const impl<T: Foo> Bar for T {}
+LL + impl<T: Foo> const Bar for T {}
+   | 
 
 error: aborting due to 2 previous errors
 
index 732bb61e6eebbab489c8b80b0a092591cfac126d..8ed606cf9051041a8962799c956da02ce6869f72 100644 (file)
@@ -9,7 +9,7 @@ LL | static NON_ELIDABLE_FN: &fn(&u8, &u8) -> &u8 =
 help: consider making the type lifetime-generic with a new `'a` lifetime
    |
 LL | static NON_ELIDABLE_FN: &for<'a> fn(&'a u8, &'a u8) -> &'a u8 =
-   |                          ^^^^^^^    ^^^^^^  ^^^^^^     ^^^
+   |                          +++++++    ~~~~~~  ~~~~~~     ~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/rfc1623-2.rs:10:39
@@ -22,7 +22,7 @@ LL |     &(non_elidable as fn(&u8, &u8) -> &u8);
 help: consider making the type lifetime-generic with a new `'a` lifetime
    |
 LL |     &(non_elidable as for<'a> fn(&'a u8, &'a u8) -> &'a u8);
-   |                       ^^^^^^^    ^^^^^^  ^^^^^^     ^^^
+   |                       +++++++    ~~~~~~  ~~~~~~     ~~~
 
 error: aborting due to 2 previous errors
 
index 01c4737de5ec7d63509d6d4e0093d7e379105f18..495b06fd2ccff14d08781544abf47e93e595caff 100644 (file)
@@ -7,7 +7,7 @@ LL | type A1 = dyn::dyn;
 help: you can escape reserved keywords to use them as identifiers
    |
 LL | type A1 = dyn::r#dyn;
-   |                ^^^^^
+   |                ~~~~~
 
 error: expected identifier, found `<`
   --> $DIR/dyn-trait-compatibility.rs:5:14
index 45bc5dbc4467696719a50a42d88701fec67705d3..b8eba3e075d3e2fb805e84b04aae28bbca786d53 100644 (file)
@@ -11,8 +11,9 @@ LL | #![deny(explicit_outlives_requirements)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: remove these bounds
    |
-LL |     struct TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> {
-   |                                              --   --
+LL -     struct TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> {
+LL +     struct TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:18:61
@@ -22,8 +23,9 @@ LL |     struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b
    |
 help: remove these bounds
    |
-LL |     struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug {
-   |                                                            --   --
+LL -     struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b {
+LL +     struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:23:53
@@ -33,8 +35,9 @@ LL |     struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> {
    |
 help: remove these bounds
    |
-LL |     struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> {
-   |                                                    --   --
+LL -     struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> {
+LL +     struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:29:48
@@ -44,8 +47,9 @@ LL |     struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> {
    |
 help: remove these bounds
    |
-LL |     struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug> {
-   |                                               --   --
+LL -     struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> {
+LL +     struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:35:48
@@ -55,8 +59,9 @@ LL |     struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> {
    |
 help: remove these bounds
    |
-LL |     struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug> {
-   |                                               --        --
+LL -     struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> {
+LL +     struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:41:46
@@ -66,8 +71,9 @@ LL |     struct TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b {
    |
 help: remove these bounds
    |
-LL |     struct TeeOutlivesAyYooWhereBee<'a, 'b, T, U> {
-   |                                             --  --
+LL -     struct TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b {
+LL +     struct TeeOutlivesAyYooWhereBee<'a, 'b, T, U> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:47:67
@@ -77,8 +83,9 @@ LL |     struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debu
    |
 help: remove these bounds
    |
-LL |     struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug {
-   |                                                                  --   --
+LL -     struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b {
+LL +     struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:53:53
@@ -88,8 +95,9 @@ LL |     struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b +
    |
 help: remove these bounds
    |
-LL |     struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug {
-   |                                                    --            --
+LL -     struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + Debug {
+LL +     struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:59:53
@@ -99,8 +107,9 @@ LL |     struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug
    |
 help: remove these bounds
    |
-LL |     struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug {
-   |                                                    --                 --
+LL -     struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + 'b {
+LL +     struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:65:69
@@ -110,8 +119,9 @@ LL |     struct TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a,
    |
 help: remove these bounds
    |
-LL |     struct TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug {
-   |                                                                    -- --
+LL -     struct TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: 'b + Debug {
+LL +     struct TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:71:69
@@ -121,8 +131,9 @@ LL |     struct TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a,
    |
 help: remove these bounds
    |
-LL |     struct TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug {
-   |                                                                    --      --
+LL -     struct TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: Debug + 'b {
+LL +     struct TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:77:38
@@ -132,8 +143,9 @@ LL |     struct BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> {
    |
 help: remove these bounds
    |
-LL |     struct BeeOutlivesAyTeeBee<'a, 'b, T> {
-   |                                     -- --
+LL -     struct BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> {
+LL +     struct BeeOutlivesAyTeeBee<'a, 'b, T> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:82:40
@@ -143,8 +155,9 @@ LL |     struct BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> {
    |
 help: remove these bounds
    |
-LL |     struct BeeOutlivesAyTeeAyBee<'a, 'b, T> {
-   |                                       -- --
+LL -     struct BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> {
+LL +     struct BeeOutlivesAyTeeAyBee<'a, 'b, T> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:87:55
@@ -154,8 +167,9 @@ LL |     struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug +
    |
 help: remove these bounds
    |
-LL |     struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> {
-   |                                                      --   --   --
+LL -     struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b> {
+LL +     struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:92:68
@@ -165,8 +179,9 @@ LL |     struct BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a,
    |
 help: remove these bounds
    |
-LL |     struct BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug {
-   |                                                                   -- --   --
+LL -     struct BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T: 'a + Debug + 'b {
+LL +     struct BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:97:58
@@ -176,8 +191,9 @@ LL |     struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + D
    |
 help: remove these bounds
    |
-LL |     struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> {
-   |                                                         --      --   --
+LL -     struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b> {
+LL +     struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:104:18
@@ -187,8 +203,9 @@ LL |         where U: 'a + Debug + 'b, 'b: 'a
    |
 help: remove these bounds
    |
-LL |         where U: Debug, 
-   |                 --   ----
+LL -         where U: 'a + Debug + 'b, 'b: 'a
+LL +         where U: Debug, 
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:115:47
@@ -198,8 +215,9 @@ LL |     struct TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b>(&'a &'b T);
    |
 help: remove these bounds
    |
-LL |     struct TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug>(&'a &'b T);
-   |                                              --   --
+LL -     struct TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b>(&'a &'b T);
+LL +     struct TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug>(&'a &'b T);
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:118:72
@@ -209,8 +227,9 @@ LL |     struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T>(&'a &'b T) where T: 'a +
    |
 help: remove these bounds
    |
-LL |     struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T>(&'a &'b T) where T: Debug;
-   |                                                                       --   --
+LL -     struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T>(&'a &'b T) where T: 'a + Debug + 'b;
+LL +     struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T>(&'a &'b T) where T: Debug;
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:121:53
@@ -220,8 +239,9 @@ LL |     struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b>(T, &'a
    |
 help: remove these bounds
    |
-LL |     struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug>(T, &'a &'b U);
-   |                                                    --   --
+LL -     struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b>(T, &'a &'b U);
+LL +     struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug>(T, &'a &'b U);
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:124:48
@@ -231,8 +251,9 @@ LL |     struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug>(&'a T,
    |
 help: remove these bounds
    |
-LL |     struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug>(&'a T, &'b U);
-   |                                               --   --
+LL -     struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug>(&'a T, &'b U);
+LL +     struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug>(&'a T, &'b U);
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:127:48
@@ -242,8 +263,9 @@ LL |     struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b>(&'a T,
    |
 help: remove these bounds
    |
-LL |     struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug>(&'a T, &'b U);
-   |                                               --        --
+LL -     struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b>(&'a T, &'b U);
+LL +     struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug>(&'a T, &'b U);
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:130:46
@@ -253,8 +275,9 @@ LL |     struct TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U>(&'a T, &'b U) where U
    |
 help: remove these bounds
    |
-LL |     struct TeeOutlivesAyYooWhereBee<'a, 'b, T, U>(&'a T, &'b U) ;
-   |                                             --                 --
+LL -     struct TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U>(&'a T, &'b U) where U: 'b;
+LL +     struct TeeOutlivesAyYooWhereBee<'a, 'b, T, U>(&'a T, &'b U) ;
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:133:81
@@ -264,8 +287,9 @@ LL |     struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U>(T, &'a &'b U) wher
    |
 help: remove these bounds
    |
-LL |     struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U>(T, &'a &'b U) where U: Debug;
-   |                                                                                --   --
+LL -     struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U>(T, &'a &'b U) where U: 'a + Debug + 'b;
+LL +     struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U>(T, &'a &'b U) where U: Debug;
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:136:53
@@ -275,8 +299,9 @@ LL |     struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U>(&'a T, &'b U)
    |
 help: remove these bounds
    |
-LL |     struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U>(&'a T, &'b U) where U: Debug;
-   |                                                    --                          --
+LL -     struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U>(&'a T, &'b U) where U: 'b + Debug;
+LL +     struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U>(&'a T, &'b U) where U: Debug;
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:139:53
@@ -286,8 +311,9 @@ LL |     struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U>(&'a T, &'b U)
    |
 help: remove these bounds
    |
-LL |     struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U>(&'a T, &'b U) where U: Debug;
-   |                                                    --                               --
+LL -     struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U>(&'a T, &'b U) where U: Debug + 'b;
+LL +     struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U>(&'a T, &'b U) where U: Debug;
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:142:75
@@ -297,8 +323,9 @@ LL |     struct TeeWhereAyYooWhereBeeIsDebug<'a, 'b, T, U>(&'a T, &'b U) where T
    |
 help: remove these bounds
    |
-LL |     struct TeeWhereAyYooWhereBeeIsDebug<'a, 'b, T, U>(&'a T, &'b U) where U: Debug;
-   |                                                                          -- --
+LL -     struct TeeWhereAyYooWhereBeeIsDebug<'a, 'b, T, U>(&'a T, &'b U) where T: 'a, U: 'b + Debug;
+LL +     struct TeeWhereAyYooWhereBeeIsDebug<'a, 'b, T, U>(&'a T, &'b U) where U: Debug;
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:145:75
@@ -308,8 +335,9 @@ LL |     struct TeeWhereAyYooWhereIsDebugBee<'a, 'b, T, U>(&'a T, &'b U) where T
    |
 help: remove these bounds
    |
-LL |     struct TeeWhereAyYooWhereIsDebugBee<'a, 'b, T, U>(&'a T, &'b U) where U: Debug;
-   |                                                                          --      --
+LL -     struct TeeWhereAyYooWhereIsDebugBee<'a, 'b, T, U>(&'a T, &'b U) where T: 'a, U: Debug + 'b;
+LL +     struct TeeWhereAyYooWhereIsDebugBee<'a, 'b, T, U>(&'a T, &'b U) where U: Debug;
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:148:38
@@ -319,8 +347,9 @@ LL |     struct BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b>(&'a &'b T);
    |
 help: remove these bounds
    |
-LL |     struct BeeOutlivesAyTeeBee<'a, 'b, T>(&'a &'b T);
-   |                                     -- --
+LL -     struct BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b>(&'a &'b T);
+LL +     struct BeeOutlivesAyTeeBee<'a, 'b, T>(&'a &'b T);
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:151:40
@@ -330,8 +359,9 @@ LL |     struct BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b>(&'a &'b T);
    |
 help: remove these bounds
    |
-LL |     struct BeeOutlivesAyTeeAyBee<'a, 'b, T>(&'a &'b T);
-   |                                       -- --
+LL -     struct BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b>(&'a &'b T);
+LL +     struct BeeOutlivesAyTeeAyBee<'a, 'b, T>(&'a &'b T);
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:154:55
@@ -341,8 +371,9 @@ LL |     struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug +
    |
 help: remove these bounds
    |
-LL |     struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug>(&'a &'b T);
-   |                                                      --   --   --
+LL -     struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b>(&'a &'b T);
+LL +     struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug>(&'a &'b T);
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:157:71
@@ -352,8 +383,9 @@ LL |     struct BeeWhereAyTeeWhereAyIsDebugBee<'a, 'b, T>(&'a &'b T) where 'b: '
    |
 help: remove these bounds
    |
-LL |     struct BeeWhereAyTeeWhereAyIsDebugBee<'a, 'b, T>(&'a &'b T) where T: Debug;
-   |                                                                      -- --   --
+LL -     struct BeeWhereAyTeeWhereAyIsDebugBee<'a, 'b, T>(&'a &'b T) where 'b: 'a, T: 'a + Debug + 'b;
+LL +     struct BeeWhereAyTeeWhereAyIsDebugBee<'a, 'b, T>(&'a &'b T) where T: Debug;
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:160:58
@@ -363,8 +395,9 @@ LL |     struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + D
    |
 help: remove these bounds
    |
-LL |     struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug>(T, &'a &'b U);
-   |                                                         --      --   --
+LL -     struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b>(T, &'a &'b U);
+LL +     struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug>(T, &'a &'b U);
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:164:18
@@ -374,8 +407,9 @@ LL |         where U: 'a + Debug + 'b, 'b: 'a;
    |
 help: remove these bounds
    |
-LL |         where U: Debug, ;
-   |                 --   ----
+LL -         where U: 'a + Debug + 'b, 'b: 'a;
+LL +         where U: Debug, ;
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:171:45
@@ -385,8 +419,9 @@ LL |     enum TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> {
    |
 help: remove these bounds
    |
-LL |     enum TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> {
-   |                                            --   --
+LL -     enum TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> {
+LL +     enum TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:176:59
@@ -396,8 +431,9 @@ LL |     enum TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b {
    |
 help: remove these bounds
    |
-LL |     enum TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug {
-   |                                                          --   --
+LL -     enum TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b {
+LL +     enum TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:181:51
@@ -407,8 +443,9 @@ LL |     enum TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> {
    |
 help: remove these bounds
    |
-LL |     enum TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> {
-   |                                                  --   --
+LL -     enum TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> {
+LL +     enum TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:187:46
@@ -418,8 +455,9 @@ LL |     enum TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> {
    |
 help: remove these bounds
    |
-LL |     enum TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug> {
-   |                                             --   --
+LL -     enum TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> {
+LL +     enum TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:193:46
@@ -429,8 +467,9 @@ LL |     enum TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> {
    |
 help: remove these bounds
    |
-LL |     enum TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug> {
-   |                                             --        --
+LL -     enum TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> {
+LL +     enum TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:199:44
@@ -440,8 +479,9 @@ LL |     enum TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b {
    |
 help: remove these bounds
    |
-LL |     enum TeeOutlivesAyYooWhereBee<'a, 'b, T, U> {
-   |                                           --  --
+LL -     enum TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b {
+LL +     enum TeeOutlivesAyYooWhereBee<'a, 'b, T, U> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:205:65
@@ -451,8 +491,9 @@ LL |     enum TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug
    |
 help: remove these bounds
    |
-LL |     enum TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug {
-   |                                                                --   --
+LL -     enum TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b {
+LL +     enum TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:211:51
@@ -462,8 +503,9 @@ LL |     enum TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + De
    |
 help: remove these bounds
    |
-LL |     enum TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug {
-   |                                                  --            --
+LL -     enum TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + Debug {
+LL +     enum TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:217:51
@@ -473,8 +515,9 @@ LL |     enum TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug +
    |
 help: remove these bounds
    |
-LL |     enum TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug {
-   |                                                  --                 --
+LL -     enum TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + 'b {
+LL +     enum TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:223:67
@@ -484,8 +527,9 @@ LL |     enum TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U:
    |
 help: remove these bounds
    |
-LL |     enum TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug {
-   |                                                                  -- --
+LL -     enum TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: 'b + Debug {
+LL +     enum TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:229:67
@@ -495,8 +539,9 @@ LL |     enum TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U:
    |
 help: remove these bounds
    |
-LL |     enum TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug {
-   |                                                                  --      --
+LL -     enum TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: Debug + 'b {
+LL +     enum TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:235:36
@@ -506,8 +551,9 @@ LL |     enum BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> {
    |
 help: remove these bounds
    |
-LL |     enum BeeOutlivesAyTeeBee<'a, 'b, T> {
-   |                                   -- --
+LL -     enum BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> {
+LL +     enum BeeOutlivesAyTeeBee<'a, 'b, T> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:240:38
@@ -517,8 +563,9 @@ LL |     enum BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> {
    |
 help: remove these bounds
    |
-LL |     enum BeeOutlivesAyTeeAyBee<'a, 'b, T> {
-   |                                     -- --
+LL -     enum BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> {
+LL +     enum BeeOutlivesAyTeeAyBee<'a, 'b, T> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:246:53
@@ -528,8 +575,9 @@ LL |     enum BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + '
    |
 help: remove these bounds
    |
-LL |     enum BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> {
-   |                                                    --   --   --
+LL -     enum BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b> {
+LL +     enum BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:251:66
@@ -539,8 +587,9 @@ LL |     enum BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T:
    |
 help: remove these bounds
    |
-LL |     enum BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug {
-   |                                                                 -- --   --
+LL -     enum BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T: 'a + Debug + 'b {
+LL +     enum BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:256:56
@@ -550,8 +599,9 @@ LL |     enum BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Deb
    |
 help: remove these bounds
    |
-LL |     enum BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> {
-   |                                                       --      --   --
+LL -     enum BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b> {
+LL +     enum BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:262:75
@@ -561,8 +611,9 @@ LL |     enum BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: '
    |
 help: remove these bounds
    |
-LL |     enum BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug,  {
-   |                                                                          --   ----
+LL -     enum BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b, 'b: 'a {
+LL +     enum BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug,  {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:271:46
@@ -572,8 +623,9 @@ LL |     union TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> {
    |
 help: remove these bounds
    |
-LL |     union TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> {
-   |                                             --   --
+LL -     union TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> {
+LL +     union TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:276:60
@@ -583,8 +635,9 @@ LL |     union TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b
    |
 help: remove these bounds
    |
-LL |     union TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug {
-   |                                                           --   --
+LL -     union TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b {
+LL +     union TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:281:52
@@ -594,8 +647,9 @@ LL |     union TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> {
    |
 help: remove these bounds
    |
-LL |     union TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> {
-   |                                                   --   --
+LL -     union TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> {
+LL +     union TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:287:47
@@ -605,8 +659,9 @@ LL |     union TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> {
    |
 help: remove these bounds
    |
-LL |     union TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug> {
-   |                                              --   --
+LL -     union TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> {
+LL +     union TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:293:47
@@ -616,8 +671,9 @@ LL |     union TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> {
    |
 help: remove these bounds
    |
-LL |     union TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug> {
-   |                                              --        --
+LL -     union TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> {
+LL +     union TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:299:45
@@ -627,8 +683,9 @@ LL |     union TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b {
    |
 help: remove these bounds
    |
-LL |     union TeeOutlivesAyYooWhereBee<'a, 'b, T, U> {
-   |                                            --  --
+LL -     union TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b {
+LL +     union TeeOutlivesAyYooWhereBee<'a, 'b, T, U> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:305:66
@@ -638,8 +695,9 @@ LL |     union TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug
    |
 help: remove these bounds
    |
-LL |     union TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug {
-   |                                                                 --   --
+LL -     union TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b {
+LL +     union TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:311:52
@@ -649,8 +707,9 @@ LL |     union TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + D
    |
 help: remove these bounds
    |
-LL |     union TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug {
-   |                                                   --            --
+LL -     union TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + Debug {
+LL +     union TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:317:52
@@ -660,8 +719,9 @@ LL |     union TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug
    |
 help: remove these bounds
    |
-LL |     union TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug {
-   |                                                   --                 --
+LL -     union TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + 'b {
+LL +     union TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:323:68
@@ -671,8 +731,9 @@ LL |     union TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U
    |
 help: remove these bounds
    |
-LL |     union TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug {
-   |                                                                   -- --
+LL -     union TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: 'b + Debug {
+LL +     union TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:329:68
@@ -682,8 +743,9 @@ LL |     union TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U
    |
 help: remove these bounds
    |
-LL |     union TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug {
-   |                                                                   --      --
+LL -     union TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: Debug + 'b {
+LL +     union TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:335:37
@@ -693,8 +755,9 @@ LL |     union BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> {
    |
 help: remove these bounds
    |
-LL |     union BeeOutlivesAyTeeBee<'a, 'b, T> {
-   |                                    -- --
+LL -     union BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> {
+LL +     union BeeOutlivesAyTeeBee<'a, 'b, T> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:340:39
@@ -704,8 +767,9 @@ LL |     union BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> {
    |
 help: remove these bounds
    |
-LL |     union BeeOutlivesAyTeeAyBee<'a, 'b, T> {
-   |                                      -- --
+LL -     union BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> {
+LL +     union BeeOutlivesAyTeeAyBee<'a, 'b, T> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:345:54
@@ -715,8 +779,9 @@ LL |     union BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug +
    |
 help: remove these bounds
    |
-LL |     union BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> {
-   |                                                     --   --   --
+LL -     union BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b> {
+LL +     union BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:350:67
@@ -726,8 +791,9 @@ LL |     union BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T
    |
 help: remove these bounds
    |
-LL |     union BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug {
-   |                                                                  -- --   --
+LL -     union BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T: 'a + Debug + 'b {
+LL +     union BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:355:57
@@ -737,8 +803,9 @@ LL |     union BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + De
    |
 help: remove these bounds
    |
-LL |     union BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> {
-   |                                                        --      --   --
+LL -     union BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b> {
+LL +     union BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> {
+   | 
 
 error: outlives requirements can be inferred
   --> $DIR/edition-lint-infer-outlives-multispan.rs:361:76
@@ -748,8 +815,9 @@ LL |     union BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U:
    |
 help: remove these bounds
    |
-LL |     union BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug,  {
-   |                                                                           --   ----
+LL -     union BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b, 'b: 'a {
+LL +     union BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug,  {
+   | 
 
 error: aborting due to 68 previous errors
 
index 2c6a63df42f2ce4b5041c8f099269eb0f6917975..0a722baa185cd60c8722cf1a98f34ae91df603fa 100644 (file)
@@ -10,7 +10,7 @@ note: the lint level is defined here
 LL | #![warn(rust_2021_prelude_collisions)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
-   = note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
 
 warning: trait-associated function `from_iter` will become ambiguous in Rust 2021
   --> $DIR/future-prelude-collision-generic.rs:31:5
@@ -19,7 +19,7 @@ LL |     Generic::<i32, i32>::from_iter(1);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `<Generic::<i32, i32> as MyFromIter>::from_iter`
    |
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
-   = note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
 
 warning: trait-associated function `from_iter` will become ambiguous in Rust 2021
   --> $DIR/future-prelude-collision-generic.rs:34:5
@@ -28,7 +28,7 @@ LL |     Generic::<_, _>::from_iter(1);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `<Generic::<_, _> as MyFromIter>::from_iter`
    |
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
-   = note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
 
 warning: 3 warnings emitted
 
index 61975876819229bfbfc8fbe123f3b10a20eff4ad..fbda5d61f36dc070685b900b09c6e23ad381eb8a 100644 (file)
@@ -10,7 +10,7 @@ note: the lint level is defined here
 LL | #![warn(rust_2021_prelude_collisions)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
-   = note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
 
 warning: trait method `try_into` will become ambiguous in Rust 2021
   --> $DIR/future-prelude-collision-imported.rs:40:22
@@ -19,7 +19,7 @@ LL |         let _: u32 = 3u8.try_into().unwrap();
    |                      ^^^^^^^^^^^^^^ help: disambiguate the associated function: `crate::m::TryIntoU32::try_into(3u8)`
    |
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
-   = note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
 
 warning: trait method `try_into` will become ambiguous in Rust 2021
   --> $DIR/future-prelude-collision-imported.rs:53:22
@@ -28,7 +28,7 @@ LL |         let _: u32 = 3u8.try_into().unwrap();
    |                      ^^^^^^^^^^^^^^ help: disambiguate the associated function: `super::m::TryIntoU32::try_into(3u8)`
    |
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
-   = note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
 
 warning: 3 warnings emitted
 
index 7a63e6f6e686a06687458fd2384c46c25e6cacec..e60f9c039be36cd746be8f8bff1ada996bc9bef9 100644 (file)
@@ -21,19 +21,19 @@ LL |     fn try_into(self) -> Result<T, Self::Error>;
 help: consider wrapping the receiver expression with the appropriate type
    |
 LL |         let _: u32 = Box::new(3u8).try_into().unwrap();
-   |                      ^^^^^^^^^   ^
+   |                      +++++++++   +
 help: consider wrapping the receiver expression with the appropriate type
    |
 LL |         let _: u32 = Pin::new(3u8).try_into().unwrap();
-   |                      ^^^^^^^^^   ^
+   |                      +++++++++   +
 help: consider wrapping the receiver expression with the appropriate type
    |
 LL |         let _: u32 = Arc::new(3u8).try_into().unwrap();
-   |                      ^^^^^^^^^   ^
+   |                      +++++++++   +
 help: consider wrapping the receiver expression with the appropriate type
    |
 LL |         let _: u32 = Rc::new(3u8).try_into().unwrap();
-   |                      ^^^^^^^^   ^
+   |                      ++++++++   +
 
 error: aborting due to previous error
 
index 03b89da00d970c934ece61e64ba817bc7f7eb4c4..889e66de03f9ea541eb70c48437cf0148280e3ca 100644 (file)
@@ -10,7 +10,7 @@ note: the lint level is defined here
 LL | #![warn(rust_2021_prelude_collisions)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
-   = note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
 
 warning: trait-associated function `try_from` will become ambiguous in Rust 2021
   --> $DIR/future-prelude-collision.rs:61:13
@@ -19,7 +19,7 @@ LL |     let _ = u32::try_from(3u8).unwrap();
    |             ^^^^^^^^^^^^^ help: disambiguate the associated function: `<u32 as TryFromU8>::try_from`
    |
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
-   = note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
 
 warning: trait-associated function `from_iter` will become ambiguous in Rust 2021
   --> $DIR/future-prelude-collision.rs:66:13
@@ -28,7 +28,7 @@ LL |     let _ = <Vec<u8>>::from_iter(vec![1u8, 2, 3, 4, 5, 6].into_iter());
    |             ^^^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `<Vec<u8> as FromByteIterator>::from_iter`
    |
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
-   = note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
 
 warning: trait-associated function `try_from` will become ambiguous in Rust 2021
   --> $DIR/future-prelude-collision.rs:74:18
@@ -37,7 +37,7 @@ LL |     let _: u32 = <_>::try_from(3u8).unwrap();
    |                  ^^^^^^^^^^^^^ help: disambiguate the associated function: `<_ as TryFromU8>::try_from`
    |
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
-   = note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
 
 warning: trait method `try_into` will become ambiguous in Rust 2021
   --> $DIR/future-prelude-collision.rs:79:18
@@ -46,7 +46,7 @@ LL |     let _: u32 = (&3u8).try_into().unwrap();
    |                  ^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `TryIntoU32::try_into(*(&3u8))`
    |
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
-   = note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
 
 warning: trait method `try_into` will become ambiguous in Rust 2021
   --> $DIR/future-prelude-collision.rs:84:18
@@ -55,7 +55,7 @@ LL |     let _: u32 = 3.0.try_into().unwrap();
    |                  ^^^^^^^^^^^^^^ help: disambiguate the associated function: `TryIntoU32::try_into(&3.0)`
    |
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
-   = note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
 
 warning: trait method `try_into` will become ambiguous in Rust 2021
   --> $DIR/future-prelude-collision.rs:90:18
@@ -64,7 +64,7 @@ LL |     let _: u32 = mut_ptr.try_into().unwrap();
    |                  ^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `TryIntoU32::try_into(mut_ptr as *const _)`
    |
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
-   = note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
 
 warning: trait-associated function `try_from` will become ambiguous in Rust 2021
   --> $DIR/future-prelude-collision.rs:95:13
@@ -73,7 +73,7 @@ LL |     let _ = U32Alias::try_from(3u8).unwrap();
    |             ^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `<U32Alias as TryFromU8>::try_from`
    |
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
-   = note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
 
 warning: 8 warnings emitted
 
index d4999201c27f962bacb9586e0d7687fe91eb296b..e6ea28d718db81336adb489c4af9a558ccab5299 100644 (file)
@@ -10,7 +10,7 @@ note: the lint level is defined here
 LL | #![warn(rust_2021_prelude_collisions)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
 
 warning: 1 warning emitted
 
index 605f9ced9ebb72e559a81c5ae2d35bacdce59010..77b4c385132816b2ec2d32daccd289a2e3b005c3 100644 (file)
@@ -10,7 +10,7 @@ note: the lint level is defined here
 LL | #![warn(rust_2021_prelude_collisions)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
-   = note: for more information, see issue #85684 <https://github.com/rust-lang/rust/issues/85684>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
 
 warning: 1 warning emitted
 
index 95105f932dcbd945f9777fba6c998e96b5952550..dc1152679b92094f323edf788a85cc1c62976d59 100644 (file)
@@ -10,11 +10,12 @@ note: the lint level is defined here
 LL | #![warn(rust_2021_prefixes_incompatible_syntax)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
-   = note: for more information, see issue #84978 <https://github.com/rust-lang/rust/issues/84978>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/reserving-syntax.html>
 help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
    |
-LL |     m2!(z "hey");
-   |          --
+LL -     m2!(z"hey");
+LL +     m2!(z "hey");
+   | 
 
 warning: prefix `prefix` is unknown
   --> $DIR/reserved-prefixes-migration.rs:19:9
@@ -23,11 +24,12 @@ LL |     m2!(prefix"hey");
    |         ^^^^^^ unknown prefix
    |
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
-   = note: for more information, see issue #84978 <https://github.com/rust-lang/rust/issues/84978>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/reserving-syntax.html>
 help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
    |
-LL |     m2!(prefix "hey");
-   |               --
+LL -     m2!(prefix"hey");
+LL +     m2!(prefix "hey");
+   | 
 
 warning: prefix `hey` is unknown
   --> $DIR/reserved-prefixes-migration.rs:22:9
@@ -36,11 +38,12 @@ LL |     m3!(hey#123);
    |         ^^^ unknown prefix
    |
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
-   = note: for more information, see issue #84978 <https://github.com/rust-lang/rust/issues/84978>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/reserving-syntax.html>
 help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
    |
-LL |     m3!(hey #123);
-   |            --
+LL -     m3!(hey#123);
+LL +     m3!(hey #123);
+   | 
 
 warning: prefix `hey` is unknown
   --> $DIR/reserved-prefixes-migration.rs:25:9
@@ -49,11 +52,12 @@ LL |     m3!(hey#hey);
    |         ^^^ unknown prefix
    |
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
-   = note: for more information, see issue #84978 <https://github.com/rust-lang/rust/issues/84978>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/reserving-syntax.html>
 help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
    |
-LL |     m3!(hey #hey);
-   |            --
+LL -     m3!(hey#hey);
+LL +     m3!(hey #hey);
+   | 
 
 warning: prefix `kind` is unknown
   --> $DIR/reserved-prefixes-migration.rs:35:14
@@ -62,11 +66,12 @@ LL |     #name = #kind#value
    |              ^^^^ unknown prefix
    |
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
-   = note: for more information, see issue #84978 <https://github.com/rust-lang/rust/issues/84978>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/reserving-syntax.html>
 help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
    |
-LL |     #name = #kind #value
-   |                  --
+LL -     #name = #kind#value
+LL +     #name = #kind #value
+   | 
 
 warning: 5 warnings emitted
 
index 32e18563329252a7443ba57f70e64ca9ef461e89..2755688c17f97fa4524f6215d62363143686e838 100644 (file)
@@ -7,8 +7,9 @@ LL |     demo3!(foo#bar);
    = note: prefixed identifiers and literals are reserved since Rust 2021
 help: consider inserting whitespace here
    |
-LL |     demo3!(foo #bar);
-   |               --
+LL -     demo3!(foo#bar);
+LL +     demo3!(foo #bar);
+   | 
 
 error: prefix `foo` is unknown
   --> $DIR/reserved-prefixes.rs:17:12
@@ -19,8 +20,9 @@ LL |     demo2!(foo"bar");
    = note: prefixed identifiers and literals are reserved since Rust 2021
 help: consider inserting whitespace here
    |
-LL |     demo2!(foo "bar");
-   |               --
+LL -     demo2!(foo"bar");
+LL +     demo2!(foo "bar");
+   | 
 
 error: prefix `foo` is unknown
   --> $DIR/reserved-prefixes.rs:18:12
@@ -31,8 +33,9 @@ LL |     demo2!(foo'b');
    = note: prefixed identifiers and literals are reserved since Rust 2021
 help: consider inserting whitespace here
    |
-LL |     demo2!(foo 'b');
-   |               --
+LL -     demo2!(foo'b');
+LL +     demo2!(foo 'b');
+   | 
 
 error: prefix `foo` is unknown
   --> $DIR/reserved-prefixes.rs:20:12
@@ -43,8 +46,9 @@ LL |     demo2!(foo'b);
    = note: prefixed identifiers and literals are reserved since Rust 2021
 help: consider inserting whitespace here
    |
-LL |     demo2!(foo 'b);
-   |               --
+LL -     demo2!(foo'b);
+LL +     demo2!(foo 'b);
+   | 
 
 error: prefix `foo` is unknown
   --> $DIR/reserved-prefixes.rs:21:12
@@ -55,8 +59,9 @@ LL |     demo3!(foo# bar);
    = note: prefixed identifiers and literals are reserved since Rust 2021
 help: consider inserting whitespace here
    |
-LL |     demo3!(foo # bar);
-   |               --
+LL -     demo3!(foo# bar);
+LL +     demo3!(foo # bar);
+   | 
 
 error: prefix `foo` is unknown
   --> $DIR/reserved-prefixes.rs:22:12
@@ -67,8 +72,9 @@ LL |     demo4!(foo#! bar);
    = note: prefixed identifiers and literals are reserved since Rust 2021
 help: consider inserting whitespace here
    |
-LL |     demo4!(foo #! bar);
-   |               --
+LL -     demo4!(foo#! bar);
+LL +     demo4!(foo #! bar);
+   | 
 
 error: prefix `foo` is unknown
   --> $DIR/reserved-prefixes.rs:23:12
@@ -79,8 +85,9 @@ LL |     demo4!(foo## bar);
    = note: prefixed identifiers and literals are reserved since Rust 2021
 help: consider inserting whitespace here
    |
-LL |     demo4!(foo ## bar);
-   |               --
+LL -     demo4!(foo## bar);
+LL +     demo4!(foo ## bar);
+   | 
 
 error: prefix `foo` is unknown
   --> $DIR/reserved-prefixes.rs:25:12
@@ -91,8 +98,9 @@ LL |     demo4!(foo#bar#);
    = note: prefixed identifiers and literals are reserved since Rust 2021
 help: consider inserting whitespace here
    |
-LL |     demo4!(foo #bar#);
-   |               --
+LL -     demo4!(foo#bar#);
+LL +     demo4!(foo #bar#);
+   | 
 
 error: prefix `bar` is unknown
   --> $DIR/reserved-prefixes.rs:25:16
@@ -103,8 +111,9 @@ LL |     demo4!(foo#bar#);
    = note: prefixed identifiers and literals are reserved since Rust 2021
 help: consider inserting whitespace here
    |
-LL |     demo4!(foo#bar #);
-   |                   --
+LL -     demo4!(foo#bar#);
+LL +     demo4!(foo#bar #);
+   | 
 
 error: aborting due to 9 previous errors
 
index 48a482a13aaa9d47b5eca083994f4dc4b544acbe..b53f19a5b01aa6d2e2024990ef35a3b37b3d9f4b 100644 (file)
@@ -6,7 +6,7 @@
 // run-fail
 // error-pattern: MemorySanitizer: use-of-uninitialized-value
 // error-pattern: Uninitialized value was created by an allocation
-// error-pattern: in the stack frame of function 'random'
+// error-pattern: in the stack frame of function 'main'
 //
 // This test case intentionally limits the usage of the std,
 // since it will be linked with an uninstrumented version of it.
index e25c6363515be7d0ff556f1ad0e9af6ad6d96345..5d0b2c2ebdf68b1cc37a33cf474b9ec838e6b2f9 100644 (file)
@@ -9,7 +9,7 @@ LL |     async fn f(self: Pin<&Self>) -> impl Clone { self }
 help: to allow this `impl Trait` to capture borrowed data with lifetime `'1`, add `'_` as a bound
    |
 LL |     async fn f(self: Pin<&Self>) -> impl Clone + '_ { self }
-   |                                                ^^^^
+   |                                                ++++
 
 error: aborting due to previous error
 
index 9cd0fd328ffa007a37fda588dbed69e79ce2aca9..04cd2b78da124610733a6d77b7c03e3310c04ee4 100644 (file)
@@ -10,7 +10,7 @@ LL |     async fn f(self: Pin<&Self>) -> impl Clone { self }
 help: to declare that the `impl Trait` captures data from argument `self`, you can add an explicit `'_` lifetime bound
    |
 LL |     async fn f(self: Pin<&Self>) -> impl Clone + '_ { self }
-   |                                                ^^^^
+   |                                                ++++
 
 error: aborting due to previous error
 
index 962593e411e92a16aac8f7d1a3f35edaf77268ae..4301d8f767a51a366ab0b449c2d154411ad174b4 100644 (file)
@@ -9,7 +9,7 @@ LL |     fn f(self: Pin<&Self>) -> impl Clone { self }
 help: to allow this `impl Trait` to capture borrowed data with lifetime `'1`, add `'_` as a bound
    |
 LL |     fn f(self: Pin<&Self>) -> impl Clone + '_ { self }
-   |                                          ^^^^
+   |                                          ++++
 
 error: aborting due to previous error
 
index cb9d5b56dbc5cbd585691e8647bf4a224f660776..54e75aeec3e3662c8c6e9b436313196a1d781034 100644 (file)
@@ -14,7 +14,7 @@ LL |     fn f(self: Pin<&Self>) -> impl Clone { self }
 help: to declare that the `impl Trait` captures data from argument `self`, you can add an explicit `'_` lifetime bound
    |
 LL |     fn f(self: Pin<&Self>) -> impl Clone + '_ { self }
-   |                                          ^^^^
+   |                                          ++++
 
 error: aborting due to previous error
 
index b804ddfb024bf310ccb36d1d4e853f549cf3c07a..a0ef7e3f2cbab793948ea11475ed61ef3937701d 100644 (file)
@@ -13,7 +13,7 @@ LL |     A.foo();
 help: consider wrapping the receiver expression with the appropriate type
    |
 LL |     Box::new(A).foo();
-   |     ^^^^^^^^^ ^
+   |     +++++++++ +
 
 error: aborting due to previous error
 
index e1ed0e42f985c4be2cc6603e11afa237e01eff99..440676482835c48e7326e3ff1c65fe19667e071c 100644 (file)
@@ -14,7 +14,7 @@ LL |     A.foo()
 help: consider wrapping the receiver expression with the appropriate type
    |
 LL |     Box::new(A).foo()
-   |     ^^^^^^^^^ ^
+   |     +++++++++ +
 
 error: aborting due to previous error
 
index 8d70c6287e55ac65cac1d3a2454ee913020d640c..d3bf63efa40d87511ae8e3bd367d12ab931d9a8f 100644 (file)
@@ -7,7 +7,7 @@ LL |     fn f(self: _) {}
 help: use type parameters instead
    |
 LL |     fn f<T>(self: T) {}
-   |         ^^^       ^
+   |         +++       ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
   --> $DIR/self-infer.rs:5:17
@@ -18,7 +18,7 @@ LL |     fn g(self: &_) {}
 help: use type parameters instead
    |
 LL |     fn g<T>(self: &T) {}
-   |         ^^^        ^
+   |         +++        ~
 
 error: aborting due to 2 previous errors
 
index 63b70f7fcd95c35d160e99100215cd71da43f804..7c16581686a00263de2456c7fb2f19b53a577571 100644 (file)
@@ -33,7 +33,7 @@ LL |     let _: i32 = 22_i64 >> 1_i32;
 help: you can convert an `i64` to an `i32` and panic if the converted value doesn't fit
    |
 LL |     let _: i32 = (22_i64 >> 1_i32).try_into().unwrap();
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 4 previous errors
 
index f78970ac0a41d0ea37de119ec09bfd22ef6819f1..d22508998a616463eed71d4110831efdc54f4087 100644 (file)
@@ -13,8 +13,9 @@ LL | #![deny(single_use_lifetimes)]
    |         ^^^^^^^^^^^^^^^^^^^^
 help: elide the single-use lifetime
    |
-LL | fn a(x: &u32) {
-   |    --   --
+LL - fn a<'a>(x: &'a u32) {
+LL + fn a(x: &u32) {
+   | 
 
 error: lifetime parameter `'m` only used once
   --> $DIR/one-use-in-fn-argument.rs:15:11
@@ -26,8 +27,9 @@ LL | fn center<'m>(_: Single<'m>) {}
    |
 help: elide the single-use lifetime
    |
-LL | fn center(_: Single<'_>) {}
-   |         --          ^^
+LL - fn center<'m>(_: Single<'m>) {}
+LL + fn center(_: Single<'_>) {}
+   | 
 
 error: lifetime parameter `'y` only used once
   --> $DIR/one-use-in-fn-argument.rs:17:13
@@ -37,8 +39,9 @@ LL | fn left<'x, 'y>(foo: Double<'x, 'y>) -> &'x u32 { foo.f }
    |
 help: elide the single-use lifetime
    |
-LL | fn left<'x>(foo: Double<'x, '_>) -> &'x u32 { foo.f }
-   |          --                 ^^
+LL - fn left<'x, 'y>(foo: Double<'x, 'y>) -> &'x u32 { foo.f }
+LL + fn left<'x>(foo: Double<'x, '_>) -> &'x u32 { foo.f }
+   | 
 
 error: lifetime parameter `'x` only used once
   --> $DIR/one-use-in-fn-argument.rs:19:10
@@ -48,8 +51,9 @@ LL | fn right<'x, 'y>(foo: Double<'x, 'y>) -> &'y u32 { foo.f }
    |
 help: elide the single-use lifetime
    |
-LL | fn right<'y>(foo: Double<'_, 'y>) -> &'y u32 { foo.f }
-   |         --               ^^
+LL - fn right<'x, 'y>(foo: Double<'x, 'y>) -> &'y u32 { foo.f }
+LL + fn right<'y>(foo: Double<'_, 'y>) -> &'y u32 { foo.f }
+   | 
 
 error: aborting due to 4 previous errors
 
index 10fb40b9d142dc00e868349bdff2a2d27aaed823..b8b78cd87b003dfb358b37af361bf0dc4e6f9abc 100644 (file)
@@ -13,8 +13,9 @@ LL | #![deny(single_use_lifetimes)]
    |         ^^^^^^^^^^^^^^^^^^^^
 help: elide the single-use lifetime
    |
-LL |     fn inherent_a(&self, data: &u32) {
-   |                 --             --
+LL -     fn inherent_a<'a>(&self, data: &'a u32) {
+LL +     fn inherent_a(&self, data: &u32) {
+   | 
 
 error: lifetime parameter `'f` only used once
   --> $DIR/one-use-in-inherent-method-argument.rs:11:6
index 55d11add7b6b116714010005d5ae1c62ed741803..05944e04bd8bc571f5c96e5e88f06eedd78d83b7 100644 (file)
@@ -13,8 +13,9 @@ LL | #![deny(single_use_lifetimes)]
    |         ^^^^^^^^^^^^^^^^^^^^
 help: elide the single-use lifetime
    |
-LL |     fn next(&mut self) -> Option<Self::Item> {
-   |           ----
+LL -     fn next<'g>(&'g mut self) -> Option<Self::Item> {
+LL +     fn next(&mut self) -> Option<Self::Item> {
+   | 
 
 error: aborting due to previous error
 
index 45062c2ea6c7239fa0a847f9a06d36a8223daf55..0726b16a91948d0afbeffe413bb630f55bca1067 100644 (file)
@@ -9,7 +9,7 @@ LL | struct Baz { q: Option<Foo> }
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Baz` representable
    |
 LL | struct Baz { q: Box<Option<Foo>> }
-   |                 ^^^^           ^
+   |                 ++++           +
 
 error[E0072]: recursive type `Foo` has infinite size
   --> $DIR/sized-cycle-note.rs:11:1
@@ -22,7 +22,7 @@ LL | struct Foo { q: Option<Baz> }
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable
    |
 LL | struct Foo { q: Box<Option<Baz>> }
-   |                 ^^^^           ^
+   |                 ++++           +
 
 error: aborting due to 2 previous errors
 
index 06493f05142e6d2a59fa7e2ab6ba4a17d4253e40..98e92751360cfc0296e14b482ff70ee840265202 100644 (file)
@@ -10,7 +10,7 @@ LL |     tail: Option<ListNode>,
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `ListNode` representable
    |
 LL |     tail: Box<Option<ListNode>>,
-   |           ^^^^                ^
+   |           ++++                +
 
 error: aborting due to previous error
 
index 2595cd91dc1f38fcb1d20c0ee715850fdc86c308..2487684c1dd7f62f74c3b1cf4074e5ef8fe9816d 100644 (file)
@@ -43,7 +43,7 @@ LL |     f = box f;
 help: try using a conversion method
    |
 LL |     f = (box f).to_string();
-   |         ^     ^^^^^^^^^^^^^
+   |         +     +++++++++++++
 
 error[E0308]: mismatched types
   --> $DIR/coerce-suggestions.rs:21:9
index f63d97780c1f91d37d08d62fd00c9506a4403ca2..8f75c388f6576070b9ac1d54b6f8b6c55dbed24d 100644 (file)
@@ -16,7 +16,7 @@ LL |     };
 help: 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
    |
 LL |         let x = *a.borrow() + 1; x
-   |         ^^^^^^^                ^^^
+   |         +++++++                +++
 
 error: aborting due to previous error
 
index e04ca0f5265d4e6e0581ae2be2a52aa41e74ba7f..8d4709d660fa99d5a7f9e4404a00690b0a7520e4 100644 (file)
@@ -17,7 +17,7 @@ LL | }
 help: 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
    |
 LL |     let x = y.borrow().clone(); x
-   |     ^^^^^^^                   ^^^
+   |     +++++++                   +++
 
 error[E0597]: `y` does not live long enough
   --> $DIR/issue-23338-locals-die-before-temps-of-body.rs:17:9
@@ -37,7 +37,7 @@ LL |     };
 help: 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
    |
 LL |         let x = y.borrow().clone(); x
-   |         ^^^^^^^                   ^^^
+   |         +++++++                   +++
 
 error: aborting due to 2 previous errors
 
index 5cda17fd6a1fc31b491db066d4d59b964cffff77..da0a3c8b47602cc7ee57deb8839cbd4403a359dc 100644 (file)
@@ -8,11 +8,11 @@ LL | fn foo(Option<i32>, String) {}
 help: if this is a `self` type, give it a parameter name
    |
 LL | fn foo(self: Option<i32>, String) {}
-   |        ^^^^^^^^^^^^
+   |        ~~~~~~~~~~~~
 help: if this is a type, explicitly ignore the parameter name
    |
 LL | fn foo(_: Option<i32>, String) {}
-   |        ^^^^^^^^^
+   |        ~~~~~~~~~
 
 error: expected one of `:`, `@`, or `|`, found `)`
   --> $DIR/issue-34264.rs:1:27
@@ -24,11 +24,11 @@ LL | fn foo(Option<i32>, String) {}
 help: if this is a parameter name, give it a type
    |
 LL | fn foo(Option<i32>, String: TypeName) {}
-   |                     ^^^^^^^^^^^^^^^^
+   |                     ~~~~~~~~~~~~~~~~
 help: if this is a type, explicitly ignore the parameter name
    |
 LL | fn foo(Option<i32>, _: String) {}
-   |                     ^^^^^^^^^
+   |                     ~~~~~~~~~
 
 error: expected one of `:`, `@`, or `|`, found `,`
   --> $DIR/issue-34264.rs:3:9
@@ -40,15 +40,15 @@ LL | fn bar(x, y: usize) {}
 help: if this is a `self` type, give it a parameter name
    |
 LL | fn bar(self: x, y: usize) {}
-   |        ^^^^^^^
+   |        ~~~~~~~
 help: if this is a parameter name, give it a type
    |
 LL | fn bar(x: TypeName, y: usize) {}
-   |        ^^^^^^^^^^^
+   |        ~~~~~~~~~~~
 help: if this is a type, explicitly ignore the parameter name
    |
 LL | fn bar(_: x, y: usize) {}
-   |        ^^^^
+   |        ~~~~
 
 error[E0061]: this function takes 2 arguments but 3 arguments were supplied
   --> $DIR/issue-34264.rs:7:5
index fc6c556c16d888a7e68b55086835b554ab69cdc3..f7732847a28604367c8cc6df0b5e611d0396fa31 100644 (file)
@@ -17,11 +17,11 @@ LL |     fn foo(&mut self) {}
 help: disambiguate the associated function for candidate #1
    |
 LL |     A::foo(&a)
-   |     ^^^^^^^^^^
+   |     ~~~~~~~~~~
 help: disambiguate the associated function for candidate #2
    |
 LL |     B::foo(&a)
-   |     ^^^^^^^^^^
+   |     ~~~~~~~~~~
 
 error[E0034]: multiple applicable items in scope
   --> $DIR/issue-37767.rs:22:7
@@ -42,11 +42,11 @@ LL |     fn foo(&self) {}
 help: disambiguate the associated function for candidate #1
    |
 LL |     C::foo(&a)
-   |     ^^^^^^^^^^
+   |     ~~~~~~~~~~
 help: disambiguate the associated function for candidate #2
    |
 LL |     D::foo(&a)
-   |     ^^^^^^^^^^
+   |     ~~~~~~~~~~
 
 error[E0034]: multiple applicable items in scope
   --> $DIR/issue-37767.rs:34:7
@@ -67,11 +67,11 @@ LL |     fn foo(self) {}
 help: disambiguate the associated function for candidate #1
    |
 LL |     E::foo(a)
-   |     ^^^^^^^^^
+   |     ~~~~~~~~~
 help: disambiguate the associated function for candidate #2
    |
 LL |     F::foo(a)
-   |     ^^^^^^^^^
+   |     ~~~~~~~~~
 
 error: aborting due to 3 previous errors
 
index a7131ab8af56f73d0497134dfb42455bfec7acd0..c5a0448e798d172d5e3c0f7e6225ce5c8acdef07 100644 (file)
@@ -10,7 +10,7 @@ LL |     let x = "Hello " + "World!";
 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!";
-   |             ^^^^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~~~~
 
 error[E0369]: cannot add `World` to `World`
   --> $DIR/issue-39018.rs:8:26
@@ -34,7 +34,7 @@ LL |     let x = "Hello " + "World!".to_owned();
 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[E0369]: cannot add `&String` to `&String`
   --> $DIR/issue-39018.rs:26:16
@@ -48,7 +48,7 @@ LL |     let _ = &a + &b;
 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]: cannot add `String` to `&String`
   --> $DIR/issue-39018.rs:27:16
@@ -62,7 +62,7 @@ LL |     let _ = &a + b;
 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
@@ -85,7 +85,7 @@ LL |     let _ = e + b;
 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]: cannot add `&String` to `&String`
   --> $DIR/issue-39018.rs:31:15
@@ -99,7 +99,7 @@ LL |     let _ = e + &b;
 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]: cannot add `&str` to `&String`
   --> $DIR/issue-39018.rs:32:15
@@ -113,7 +113,7 @@ LL |     let _ = e + d;
 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]: cannot add `&&str` to `&String`
   --> $DIR/issue-39018.rs:33:15
@@ -127,7 +127,7 @@ LL |     let _ = e + &d;
 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]: cannot add `&&str` to `&&str`
   --> $DIR/issue-39018.rs:34:16
@@ -157,7 +157,7 @@ LL |     let _ = c + &d;
 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]: cannot add `&str` to `&str`
   --> $DIR/issue-39018.rs:37:15
@@ -171,7 +171,7 @@ LL |     let _ = c + d;
 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
 
index 16a1ac6d71814c8381b1eadfab05c97cda53cdf2..288c1042a26c72be5bca08a6284bc23a22b0337e 100644 (file)
@@ -28,15 +28,15 @@ LL |     fn f9(_: usize) -> usize;
 help: disambiguate the associated function for candidate #1
    |
 LL |     u.f8(42) + CtxtFn::f9(u, 342) + m.fff(42)
-   |                ^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~
 help: disambiguate the associated function for candidate #2
    |
 LL |     u.f8(42) + OtherTrait::f9(u, 342) + m.fff(42)
-   |                ^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~
 help: disambiguate the associated function for candidate #3
    |
 LL |     u.f8(42) + UnusedTrait::f9(u, 342) + m.fff(42)
-   |                ^^^^^^^^^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0599]: no method named `fff` found for struct `Myisize` in the current scope
   --> $DIR/issue-7575.rs:62:30
@@ -61,10 +61,7 @@ error[E0599]: no method named `is_str` found for type parameter `T` in the curre
   --> $DIR/issue-7575.rs:70:7
    |
 LL |     t.is_str()
-   |     --^^^^^^--
-   |     | |
-   |     | this is an associated function, not a method
-   |     help: disambiguate the associated function for the candidate: `ManyImplTrait::is_str(t)`
+   |       ^^^^^^ 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`
@@ -73,6 +70,10 @@ note: the candidate is defined in the trait `ManyImplTrait`
 LL |     fn is_str() -> bool {
    |     ^^^^^^^^^^^^^^^^^^^
    = help: items from traits can only be used if the type parameter is bounded by the trait
+help: disambiguate the associated function for the candidate
+   |
+LL |     ManyImplTrait::is_str(t)
+   |
 
 error: aborting due to 3 previous errors
 
index d37f13a6683b05d8c3afd812ff8e38c9eca10a4a..86c64573b140fcd58fe04384a17d6c6f2847663b 100644 (file)
@@ -7,7 +7,7 @@ LL | fn x˂-
 help: Unicode character '˂' (Modifier Letter Left Arrowhead) looks like '<' (Less-Than Sign), but it is not
    |
 LL | fn x<-
-   |     ^
+   |     ~
 
 error: expected one of `#`, `>`, `const`, identifier, or lifetime, found `-`
   --> $DIR/issue-81800.rs:1:6
index 7a24ffbd81c88d2e6edbd271dcf3e32eafa3b4a8..99c57322d865141092e157d1d25bdee15833ae53 100644 (file)
@@ -7,7 +7,7 @@ LL |     let _: Result<(), String> = Ok();
 help: expected the unit value `()`; create it with empty parentheses
    |
 LL |     let _: Result<(), String> = Ok(());
-   |                                    ^^
+   |                                    ++
 
 error[E0061]: this function takes 2 arguments but 0 arguments were supplied
   --> $DIR/missing-unit-argument.rs:12:5
@@ -51,7 +51,7 @@ LL | fn bar(():()) {}
 help: expected the unit value `()`; create it with empty parentheses
    |
 LL |     bar(());
-   |         ^^
+   |         ++
 
 error[E0061]: this function takes 1 argument but 0 arguments were supplied
   --> $DIR/missing-unit-argument.rs:15:7
@@ -67,7 +67,7 @@ LL |     fn baz(self, (): ()) { }
 help: expected the unit value `()`; create it with empty parentheses
    |
 LL |     S.baz(());
-   |           ^^
+   |           ++
 
 error[E0061]: this function takes 1 argument but 0 arguments were supplied
   --> $DIR/missing-unit-argument.rs:16:7
@@ -83,7 +83,7 @@ LL |     fn generic<T>(self, _: T) { }
 help: expected the unit value `()`; create it with empty parentheses
    |
 LL |     S.generic::<()>(());
-   |                     ^^
+   |                     ++
 
 error: aborting due to 6 previous errors
 
index 55128347f7404f26f091e4e1a240047a6f2bbcb2..cb71a55b09eaf29cd70e4657e51fb1d7fe525521 100644 (file)
@@ -13,7 +13,7 @@ LL | | }
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `ListNode` representable
    |
 LL |     tail: Box<Option<ListNode>>,
-   |           ^^^^                ^
+   |           ++++                +
 
 error: aborting due to previous error
 
index fb1d98b58dfbe3cd433767b8b19e9de241ad2b48..08e97e750c31aed45c8a5d2e1ebc390dbff8a561 100644 (file)
@@ -9,7 +9,7 @@ LL |     bar: Bar<'a>,
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable
    |
 LL |     bar: Box<Bar<'a>>,
-   |          ^^^^       ^
+   |          ++++       +
 
 error[E0072]: recursive type `Bar` has infinite size
   --> $DIR/recursive-type-field.rs:8:1
index 3e6d350b36c330f0ef4e3741b012c7d9e8adf70e..fbfbefd0782024301154c5d55e874ab701df0db7 100644 (file)
@@ -8,7 +8,7 @@ LL |     let _ = (vec![1,2,3]).into_iter().sum() as f64;
 help: consider specifying the type argument in the method call
    |
 LL |     let _ = (vec![1,2,3]).into_iter().sum::<S>() as f64;
-   |                                          ^^^^^
+   |                                          +++++
 
 error: aborting due to previous error
 
index 0e8a774bce37fde91014a3f92690b8b41f0a6ad8..8d110d50e2876821138eba5a713074645d479a9d 100644 (file)
@@ -21,7 +21,7 @@ LL |     default type U = &'static B;
 help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement
    |
 LL | impl<B: 'static, T> X<B> for T where &'static B: PartialEq<B> {
-   |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                ++++++++++++++++++++++++++++++
 
 error: aborting due to previous error; 1 warning emitted
 
index e646c1640b1c6f28a52bc4bc80aad18442d94b5b..ff56c77c8f8b8dbb13ca61b0c450aff750506f32 100644 (file)
@@ -21,7 +21,7 @@ LL |     default type U<'a> = &'a T;
 help: consider further restricting this bound
    |
 LL | impl<T: 'static + std::cmp::PartialEq> X for T {
-   |                 ^^^^^^^^^^^^^^^^^^^^^
+   |                 +++++++++++++++++++++
 
 error: aborting due to previous error; 1 warning emitted
 
index e416f30cb415dea0aa432e78d24b91b49e684040..a8f6cf6839963bee8fe9b3a574031fc60d88861d 100644 (file)
@@ -20,7 +20,7 @@ LL | default impl<U> Foo<'static, U> for () {}
 help: consider restricting type parameter `U`
    |
 LL | default impl<U: std::cmp::Eq> Foo<'static, U> for () {}
-   |               ^^^^^^^^^^^^^^
+   |               ++++++++++++++
 
 error: aborting due to previous error; 1 warning emitted
 
index bff4618d0be4c3b7294a43c6ce551623bf78871e..0d4976c665dea58a521cc11c01cc89da47f1ea50 100644 (file)
@@ -10,7 +10,7 @@ LL |     default type Output = Self;
 help: consider restricting type parameter `T`
    |
 LL | impl<T: std::marker::Copy> UncheckedCopy for T {
-   |       ^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++++++++
 
 error: aborting due to previous error
 
index 2d30164380a8ee6ad1c91328be81113c1a09781d..10a39a4914770d1d7890b2589adaf81cb694716f 100644 (file)
@@ -1,8 +1,8 @@
 error: unconstrained generic constant
-  --> $DIR/issue-51892.rs:15:5
+  --> $DIR/issue-51892.rs:15:17
    |
 LL |     type Type = [u8; std::mem::size_of::<<T as Trait>::Type>()];
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: try adding a `where` bound using this expression: `where [(); std::mem::size_of::<<T as Trait>::Type>()]:`
 
index 73c03f09f2ebc3777a775897c340d1cdea05efcc..c23400a1d14a716915816c7bd8bbcd5905347cfd 100644 (file)
@@ -27,7 +27,7 @@ LL |   let v = s[..2];
 help: consider borrowing here
    |
 LL |   let v = &s[..2];
-   |           ^
+   |           +
 
 error[E0308]: mismatched types
   --> $DIR/str-array-assignment.rs:9:17
index 27d6336974c85e1df9c5ca2de0459a7c1d4bfa0e..c3cb488e3d1bb4876e349664e97546af37776cf5 100644 (file)
@@ -7,7 +7,7 @@ LL |     println!('●●');
 help: if you meant to write a `str` literal, use double quotes
    |
 LL |     println!("●●");
-   |              ^^^^
+   |              ~~~~
 
 error: aborting due to previous error
 
index ac87d6ecca5780d83ebbe3f6eb61622b61306322..dee28897f4dddce8aa89722717f08d9760b12aa2 100644 (file)
@@ -10,7 +10,7 @@ LL |     let c = a + b;
 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 = a.to_owned() + b;
-   |             ^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/str/str-escape.rs b/src/test/ui/str/str-escape.rs
new file mode 100644 (file)
index 0000000..0264632
--- /dev/null
@@ -0,0 +1,11 @@
+// check-pass
+fn main() {
+    let s = "\
+
+             ";
+    //~^^^ WARNING multiple lines skipped by escaped newline
+    let s = "foo\
+             bar
+             ";
+    //~^^^ WARNING non-ASCII whitespace symbol '\u{a0}' is not skipped
+}
diff --git a/src/test/ui/str/str-escape.stderr b/src/test/ui/str/str-escape.stderr
new file mode 100644 (file)
index 0000000..b2501f1
--- /dev/null
@@ -0,0 +1,21 @@
+warning: multiple lines skipped by escaped newline
+  --> $DIR/str-escape.rs:3:14
+   |
+LL |       let s = "\
+   |  ______________^
+LL | |
+LL | |              ";
+   | |_____________^ skipping everything up to and including this point
+
+warning: non-ASCII whitespace symbol '\u{a0}' is not skipped
+  --> $DIR/str-escape.rs:7:17
+   |
+LL |       let s = "foo\
+   |  _________________^
+LL | |              bar
+   | |   ^ non-ASCII whitespace symbol '\u{a0}' is not skipped
+   | |___|
+   | 
+
+warning: 2 warnings emitted
+
index e8e2c4e24f55efc668f3fb323b7c0c04bd5f2489..90590b70dfe9f73984da1536ac1434869ad89959 100644 (file)
@@ -11,7 +11,7 @@ LL |     let x: &[u8] = "foo";
 help: consider adding a leading `b`
    |
 LL |     let x: &[u8] = b"foo";
-   |                    ^
+   |                    +
 
 error[E0308]: mismatched types
   --> $DIR/str-lit-type-mismatch.rs:3:23
@@ -26,7 +26,7 @@ LL |     let y: &[u8; 4] = "baaa";
 help: consider adding a leading `b`
    |
 LL |     let y: &[u8; 4] = b"baaa";
-   |                       ^
+   |                       +
 
 error[E0308]: mismatched types
   --> $DIR/str-lit-type-mismatch.rs:4:19
@@ -40,8 +40,9 @@ LL |     let z: &str = b"foo";
               found reference `&'static [u8; 3]`
 help: consider removing the leading `b`
    |
-LL |     let z: &str = "foo";
-   |                  --
+LL -     let z: &str = b"foo";
+LL +     let z: &str = "foo";
+   | 
 
 error: aborting due to 3 previous errors
 
index 405542820a394cdbc5920a0efcb2c5976f36c14a..567f5d8e1e73afe97834fe9ad7c29d32185db12f 100644 (file)
@@ -11,7 +11,7 @@ LL |     s[1..2] = bot();
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | fn bot<T: ?Sized>() -> T { loop {} }
-   |         ^^^^^^^^
+   |         ++++++++
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/str-mut-idx.rs:4:5
index d61ab1952f9f1452acfe37cf5d31df7a8285952b..6199178467fcf73a67793b0840a3ddcfc73c2477 100644 (file)
@@ -10,7 +10,7 @@ LL |     y: A<A<T>>,
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `A` representable
    |
 LL |     y: Box<A<A<T>>>,
-   |        ^^^^       ^
+   |        ++++       +
 
 error: aborting due to previous error
 
index 0a898e5c46dbefcf0e06c6afad4f8a2377c203b8..2e99435e033d50c3eed6323ff18802799876e8c7 100644 (file)
@@ -10,7 +10,7 @@ LL |     x: Foo<[T; 1]>,
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable
    |
 LL |     x: Box<Foo<[T; 1]>>,
-   |        ^^^^           ^
+   |        ++++           +
 
 error: aborting due to previous error
 
index efc4ba93f0a2bdf147c366ec149fbaac3949313b..c6d2434e424b10fc8871aacf63fa4174730757da 100644 (file)
@@ -10,7 +10,7 @@ LL |     y: B<T>,
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `A` representable
    |
 LL |     y: Box<B<T>>,
-   |        ^^^^    ^
+   |        ++++    +
 
 error[E0072]: recursive type `B` has infinite size
   --> $DIR/mutual-struct-recursion.rs:7:1
@@ -24,7 +24,7 @@ LL |     z: A<T>
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `B` representable
    |
 LL |     z: Box<A<T>>
-   |        ^^^^    ^
+   |        ++++    +
 
 error[E0072]: recursive type `C` has infinite size
   --> $DIR/mutual-struct-recursion.rs:12:1
@@ -38,7 +38,7 @@ LL |     y: Option<Option<D<T>>>,
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `C` representable
    |
 LL |     y: Box<Option<Option<D<T>>>>,
-   |        ^^^^                    ^
+   |        ++++                    +
 
 error[E0072]: recursive type `D` has infinite size
   --> $DIR/mutual-struct-recursion.rs:18:1
@@ -52,7 +52,7 @@ LL |     z: Option<Option<C<T>>>,
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `D` representable
    |
 LL |     z: Box<Option<Option<C<T>>>>,
-   |        ^^^^                    ^
+   |        ++++                    +
 
 error: aborting due to 4 previous errors
 
index 740ea3829dc511b2e1a683a2bc1eb45b13701984..5ec47c093a9b03a0a2cd8d0e9c08df0cae707208 100644 (file)
@@ -21,11 +21,11 @@ LL |     let Foo { #[cfg(any())] present: () } = foo;
 help: include the missing field in the pattern
    |
 LL |     let Foo { present } = foo;
-   |             ^^^^^^^^^^^
+   |             ~~~~~~~~~~~
 help: if you don't care about this missing field, you can explicitly ignore it
    |
 LL |     let Foo { .. } = foo;
-   |             ^^^^^^
+   |             ~~~~~~
 
 error[E0026]: struct `Foo` does not have a field named `absent`
   --> $DIR/struct-field-cfg.rs:16:42
index c1a95636d34cb0040ca34d207cfe697d0380217f..a91e47657ab913d1bdc97cbb33c2aeb5aaed9832 100644 (file)
@@ -19,11 +19,11 @@ LL |         let A { x, y } = self.d;
 help: include the missing fields in the pattern
    |
 LL |         let A { x, y, b, c } = self.d;
-   |                     ^^^^^^^^
+   |                     ~~~~~~~~
 help: if you don't care about these missing fields, you can explicitly ignore them
    |
 LL |         let A { x, y, .. } = self.d;
-   |                     ^^^^^^
+   |                     ~~~~~~
 
 error: aborting due to 3 previous errors
 
index 29e721465215d432bb8538a5db4ee2c162f0b4e3..5494c29a6fd25ce44a0b68466b6fff6ef891bf5e 100644 (file)
@@ -7,7 +7,7 @@ LL |         E::S { 0, 1 } => {}
 help: use the tuple variant pattern syntax instead
    |
 LL |         E::S(_, _) => {}
-   |             ^^^^^^
+   |             ~~~~~~
 
 error[E0769]: tuple variant `S` written as struct variant
   --> $DIR/struct-tuple-field-names.rs:13:9
@@ -18,7 +18,7 @@ LL |         S { } => {}
 help: use the tuple variant pattern syntax instead
    |
 LL |         S(_, _) => {}
-   |          ^^^^^^
+   |          ~~~~~~
 
 error: aborting due to 2 previous errors
 
index 5bbf4225812b60f7875a3f35dd79fc083fa8f580..10abdfc333aaa0c03d87558e40824df4deaa46be 100644 (file)
@@ -14,7 +14,7 @@ LL |     let x: () = <i8 as Foo<'static, 'static,  u8>>::bar::<'static, char>;
 help: use parentheses to call this function
    |
 LL |     let x: () = <i8 as Foo<'static, 'static,  u8>>::bar::<'static, char>();
-   |                                                                         ^^
+   |                                                                         ++
 
 error[E0308]: mismatched types
   --> $DIR/substs-ppaux.rs:25:17
@@ -32,7 +32,7 @@ LL |     let x: () = <i8 as Foo<'static, 'static,  u32>>::bar::<'static, char>;
 help: use parentheses to call this function
    |
 LL |     let x: () = <i8 as Foo<'static, 'static,  u32>>::bar::<'static, char>();
-   |                                                                          ^^
+   |                                                                          ++
 
 error[E0308]: mismatched types
   --> $DIR/substs-ppaux.rs:33:17
@@ -50,7 +50,7 @@ LL |     let x: () = <i8 as Foo<'static, 'static,  u8>>::baz;
 help: use parentheses to call this function
    |
 LL |     let x: () = <i8 as Foo<'static, 'static,  u8>>::baz();
-   |                                                        ^^
+   |                                                        ++
 
 error[E0308]: mismatched types
   --> $DIR/substs-ppaux.rs:41:17
@@ -68,7 +68,7 @@ LL |     let x: () = foo::<'static>;
 help: use parentheses to call this function
    |
 LL |     let x: () = foo::<'static>();
-   |                               ^^
+   |                               ++
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/substs-ppaux.rs:49:5
index 20d7655337448874dec09f6ed8c01971583c4209..136e269b21010d801c84c02f136493943ed89e2c 100644 (file)
@@ -14,7 +14,7 @@ LL |     let x: () = <i8 as Foo<'static, 'static,  u8>>::bar::<'static, char>;
 help: use parentheses to call this function
    |
 LL |     let x: () = <i8 as Foo<'static, 'static,  u8>>::bar::<'static, char>();
-   |                                                                         ^^
+   |                                                                         ++
 
 error[E0308]: mismatched types
   --> $DIR/substs-ppaux.rs:25:17
@@ -32,7 +32,7 @@ LL |     let x: () = <i8 as Foo<'static, 'static,  u32>>::bar::<'static, char>;
 help: use parentheses to call this function
    |
 LL |     let x: () = <i8 as Foo<'static, 'static,  u32>>::bar::<'static, char>();
-   |                                                                          ^^
+   |                                                                          ++
 
 error[E0308]: mismatched types
   --> $DIR/substs-ppaux.rs:33:17
@@ -50,7 +50,7 @@ LL |     let x: () = <i8 as Foo<'static, 'static,  u8>>::baz;
 help: use parentheses to call this function
    |
 LL |     let x: () = <i8 as Foo<'static, 'static,  u8>>::baz();
-   |                                                        ^^
+   |                                                        ++
 
 error[E0308]: mismatched types
   --> $DIR/substs-ppaux.rs:41:17
@@ -68,7 +68,7 @@ LL |     let x: () = foo::<'static>;
 help: use parentheses to call this function
    |
 LL |     let x: () = foo::<'static>();
-   |                               ^^
+   |                               ++
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/substs-ppaux.rs:49:5
index ac3902dc6de9a349e45547fda6145315db05e340..c64205411bb7eba0c0a45e117c289b04670f1b03 100644 (file)
@@ -10,11 +10,11 @@ LL | struct Struct1<T>{
 help: consider further restricting `Self`
    |
 LL |     fn func1() -> Struct1<Self> where Self: Sized;
-   |                                 ^^^^^^^^^^^^^^^^^
+   |                                 +++++++++++++++++
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | struct Struct1<T: ?Sized>{
-   |                 ^^^^^^^^
+   |                 ++++++++
 
 error[E0277]: the size for values of type `Self` cannot be known at compilation time
   --> $DIR/adt-param-with-implicit-sized-bound.rs:3:23
@@ -28,11 +28,11 @@ LL | struct Struct2<'a, T>{
 help: consider further restricting `Self`
    |
 LL |     fn func2<'a>() -> Struct2<'a, Self> where Self: Sized;
-   |                                         ^^^^^^^^^^^^^^^^^
+   |                                         +++++++++++++++++
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | struct Struct2<'a, T: ?Sized>{
-   |                     ^^^^^^^^
+   |                     ++++++++
 
 error[E0277]: the size for values of type `Self` cannot be known at compilation time
   --> $DIR/adt-param-with-implicit-sized-bound.rs:4:19
@@ -53,7 +53,7 @@ LL |     _t: T,
 help: consider further restricting `Self`
    |
 LL |     fn func3() -> Struct3<Self> where Self: Sized;
-   |                                 ^^^^^^^^^^^^^^^^^
+   |                                 +++++++++++++++++
 
 error[E0277]: the size for values of type `Self` cannot be known at compilation time
   --> $DIR/adt-param-with-implicit-sized-bound.rs:5:19
@@ -67,11 +67,11 @@ LL | struct Struct4<T>{
 help: consider further restricting `Self`
    |
 LL |     fn func4() -> Struct4<Self> where Self: Sized;
-   |                                 ^^^^^^^^^^^^^^^^^
+   |                                 +++++++++++++++++
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | struct Struct4<T: ?Sized>{
-   |                 ^^^^^^^^
+   |                 ++++++++
 
 error[E0277]: the size for values of type `T` cannot be known at compilation time
   --> $DIR/adt-param-with-implicit-sized-bound.rs:25:9
@@ -93,8 +93,9 @@ LL | struct X<T>(T);
    |          this could be changed to `T: ?Sized`...
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | struct Struct5<T>{
-   |                --
+LL - struct Struct5<T: ?Sized>{
+LL + struct Struct5<T>{
+   | 
 
 error: aborting due to 5 previous errors
 
index f2eddf2fb098eab4a109f437c3d09440960c02ec..86a175098c6be3aaf83ccdf610be3915ea9b949e 100644 (file)
@@ -16,7 +16,7 @@ LL |     pub fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Option<U> {
 help: consider calling `.as_ref()` to borrow the type's contents
    |
 LL |     let _x: Option<Struct> = foo.as_ref().map(|s| bar(&s));
-   |                                  ^^^^^^^^^
+   |                                  +++++++++
 
 error: aborting due to previous error
 
index dc5d7efd752cfd0ba65be033b8d6ca0c51aef9c3..8d93ac50796671182b44d57b07901d7448d80643 100644 (file)
@@ -56,7 +56,7 @@ LL |     let y: Result<&usize, &usize> = x;
 help: you can convert from `&Result<T, E>` to `Result<&T, &E>` using `.as_ref()`
    |
 LL |     let y: Result<&usize, &usize> = x.as_ref();
-   |                                     ^^^^^^^^^^
+   |                                     ~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/as-ref.rs:19:36
index cb4acc4c392e345359eae4fa9f61c450cd42be79..81c9b0378e706fc8423bf16ecf778329bc9b5cf3 100644 (file)
@@ -14,7 +14,7 @@ LL |     bar(foo);
 help: use parentheses to call the function
    |
 LL |     bar(foo());
-   |            ^^
+   |            ++
 
 error[E0277]: `[closure@$DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:11:25: 11:36]` is not a future
   --> $DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:12:9
@@ -31,7 +31,7 @@ LL |     bar(async_closure);
 help: use parentheses to call the closure
    |
 LL |     bar(async_closure());
-   |                      ^^
+   |                      ++
 
 error: aborting due to 2 previous errors
 
index df9c230eefdc97ee0259ca85ff6cd89a5a8db0d9..784f1bdb6cf3d825e45693277dec41540828201b 100644 (file)
@@ -13,7 +13,7 @@ LL |     let Thing { foo } = t;
 help: bind the struct field to a different name instead
    |
 LL |     let Thing { foo: other_foo } = t;
-   |                    ^^^^^^^^^^^
+   |                    +++++++++++
 
 error: aborting due to previous error
 
index f1c50e59a845eaacd7e633765c0d2c320cacec4f..a26f86917bc1f86421d6a0402b71e94d1e18f05b 100644 (file)
@@ -8,7 +8,7 @@ LL |         println!("{:?}", self.get_a());
 help: the following trait defines an item `get_a`, perhaps you need to add another supertrait for it:
    |
 LL | trait UseString: std::fmt::Debug + GetString {
-   |                                  ^^^^^^^^^^^
+   |                                  +++++++++++
 
 error[E0599]: no method named `get_a` found for reference `&Self` in the current scope
   --> $DIR/constrain-trait.rs:21:31
@@ -20,7 +20,7 @@ LL |         println!("{:?}", self.get_a());
 help: the following trait defines an item `get_a`, perhaps you need to add a supertrait for it:
    |
 LL | trait UseString2: GetString {
-   |                 ^^^^^^^^^^^
+   |                 +++++++++++
 
 error: aborting due to 2 previous errors
 
index 612fae208cc9d8e18fa80a56720ee7f48cc6833c..40ad671f9663029c6d0790cd0d4ea87433403378 100644 (file)
@@ -52,11 +52,11 @@ LL |         &(Either::Two(_t), Either::One(_u)) => (),
 help: consider removing the `&`
    |
 LL |         (Either::One(_t), Either::Two(_u)) => (),
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 help: consider removing the `&`
    |
 LL |         (Either::Two(_t), Either::One(_u)) => (),
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0507]: cannot move out of a shared reference
   --> $DIR/duplicate-suggestions.rs:61:11
@@ -72,10 +72,10 @@ LL |         &(Either::One(_t), Either::Two(_u))
    = note: move occurs because these variables have types that don't implement the `Copy` trait
 help: consider removing the `&`
    |
-LL |         (Either::One(_t), Either::Two(_u))
-LL |
-LL |
-LL |         | &(Either::Two(_t), Either::One(_u)) => (),
+LL ~         (Either::One(_t), Either::Two(_u))
+LL +
+LL +
+LL ~         | &(Either::Two(_t), Either::One(_u)) => (),
    |
 
 error[E0507]: cannot move out of a shared reference
@@ -162,11 +162,11 @@ LL |         &mut (Either::Two(_t), Either::One(_u)) => (),
 help: consider removing the `&mut`
    |
 LL |         (Either::One(_t), Either::Two(_u)) => (),
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 help: consider removing the `&mut`
    |
 LL |         (Either::Two(_t), Either::One(_u)) => (),
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0507]: cannot move out of a mutable reference
   --> $DIR/duplicate-suggestions.rs:113:11
@@ -182,10 +182,10 @@ LL |         &mut (Either::One(_t), Either::Two(_u))
    = note: move occurs because these variables have types that don't implement the `Copy` trait
 help: consider removing the `&mut`
    |
-LL |         (Either::One(_t), Either::Two(_u))
-LL |
-LL |
-LL |         | &mut (Either::Two(_t), Either::One(_u)) => (),
+LL ~         (Either::One(_t), Either::Two(_u))
+LL +
+LL +
+LL ~         | &mut (Either::Two(_t), Either::One(_u)) => (),
    |
 
 error[E0507]: cannot move out of a mutable reference
index f7528b5ccd29822b9832d0c3d8fa1a98cc6e5af3..ca09c3d5ff1f08489280e723373baf98a667a317 100644 (file)
@@ -270,10 +270,10 @@ LL |         &Either::One(_t)
    |
 help: consider removing the `&`
    |
-LL |         Either::One(_t)
-LL |
-LL |
-LL |         | &Either::Two(_t) => (),
+LL ~         Either::One(_t)
+LL +
+LL +
+LL ~         | &Either::Two(_t) => (),
    |
 
 error[E0507]: cannot move out of `r.0` which is behind a shared reference
@@ -348,11 +348,11 @@ LL |         &mut Either::Two(_t) => (),
 help: consider removing the `&mut`
    |
 LL |         Either::One(_t) => (),
-   |         ^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~
 help: consider removing the `&mut`
    |
 LL |         Either::Two(_t) => (),
-   |         ^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~
 
 error[E0507]: cannot move out of `rm.0` which is behind a mutable reference
   --> $DIR/simple.rs:228:11
@@ -516,10 +516,10 @@ LL |         &Either::One(_t)
    |
 help: consider removing the `&`
    |
-LL |         Either::One(_t)
-LL |
-LL |
-LL |         | &Either::Two(_t) => (),
+LL ~         Either::One(_t)
+LL +
+LL +
+LL ~         | &Either::Two(_t) => (),
    |
 
 error[E0507]: cannot move out of a shared reference
@@ -592,10 +592,10 @@ LL |         &mut Either::One(_t)
    |
 help: consider removing the `&mut`
    |
-LL |         Either::One(_t)
-LL |
-LL |
-LL |         | &mut Either::Two(_t) => (),
+LL ~         Either::One(_t)
+LL +
+LL +
+LL ~         | &mut Either::Two(_t) => (),
    |
 
 error[E0507]: cannot move out of a mutable reference
index c4eeb3aaa5709362b769c2ba70f28f0ef00c0edb..ff08178cb74707584996ef6a0c45846f912e93ad 100644 (file)
@@ -12,7 +12,7 @@ LL |     x
 help: you need to pin and box this expression
    |
 LL |     Box::pin(x)
-   |     ^^^^^^^^^ ^
+   |     +++++++++ +
 
 error[E0308]: mismatched types
   --> $DIR/expected-boxed-future-isnt-pinned.rs:18:5
@@ -40,7 +40,7 @@ LL |     Pin::new(x)
 help: store this in the heap by calling `Box::new`
    |
 LL |     Pin::new(Box::new(x))
-   |              ^^^^^^^^^ ^
+   |              +++++++++ +
 
 error[E0277]: `dyn Future<Output = i32> + Send` cannot be unpinned
   --> $DIR/expected-boxed-future-isnt-pinned.rs:22:5
@@ -87,9 +87,9 @@ LL |   pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
            found opaque type `impl Future`
 help: you need to pin and box this expression
    |
-LL |     Box::pin(async {
+LL ~     Box::pin(async {
 LL |         42
-LL |     })
+LL ~     })
    |
 
 error: aborting due to 6 previous errors
index b113b3746d87ef3de0fb1a6d010a3214c89d877a..b9f0f788b8c3c3f025c7ffae0c6c02837bdfb503 100644 (file)
@@ -12,7 +12,7 @@ LL |     if let B::Fst = a {};
 help: you might have meant to use field `b` whose type is `B`
    |
 LL |     if let B::Fst = a.b {};
-   |                     ^^^
+   |                     ~~~
 
 error[E0308]: mismatched types
   --> $DIR/field-access.rs:25:9
@@ -29,7 +29,7 @@ LL |         B::Fst => (),
 help: you might have meant to use field `b` whose type is `B`
    |
 LL |     match a.b {
-   |           ^^^
+   |           ~~~
 
 error[E0308]: mismatched types
   --> $DIR/field-access.rs:26:9
@@ -46,7 +46,7 @@ LL |         B::Snd => (),
 help: you might have meant to use field `b` whose type is `B`
    |
 LL |     match a.b {
-   |           ^^^
+   |           ~~~
 
 error[E0308]: mismatched types
   --> $DIR/field-access.rs:32:9
@@ -60,7 +60,7 @@ LL |         1u32 => (),
 help: you might have meant to use field `bar` whose type is `u32`
    |
 LL |     match unsafe { foo.bar } {
-   |           ^^^^^^^^^^^^^^^^^^
+   |           ~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 4 previous errors
 
index 8589a2757e91d4499fde923c63e6babc48b07aaf..1916fe54cc5df82e39db27708868fc79f8f51d58 100644 (file)
@@ -13,7 +13,7 @@ LL |     bar(foo);
 help: use parentheses to call the function
    |
 LL |     bar(foo());
-   |            ^^
+   |            ++
 
 error[E0277]: the trait bound `[closure@$DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:18:19: 18:23]: T` is not satisfied
   --> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:19:9
@@ -29,7 +29,7 @@ LL |     bar(closure);
 help: use parentheses to call the closure
    |
 LL |     bar(closure());
-   |                ^^
+   |                ++
 
 error: aborting due to 2 previous errors
 
index fe9c3445fc46fcb2ab16a08bcc199f39c4f31ac3..20468cef20ba283028cc64ac2532ccd5cb2d3a9f 100644 (file)
@@ -8,11 +8,11 @@ LL | struct S1<F: Fn(&i32, &i32) -> &'a i32>(F);
 help: consider introducing lifetime `'a` here
    |
 LL | struct S1<'a, F: Fn(&i32, &i32) -> &'a i32>(F);
-   |           ^^^
+   |           +++
 help: consider making the bound lifetime-generic with a new `'a` lifetime
    |
 LL | struct S1<F: for<'a> Fn(&i32, &i32) -> &'a i32>(F);
-   |              ^^^^^^^
+   |              +++++++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/fn-missing-lifetime-in-item.rs:2:32
@@ -25,11 +25,11 @@ LL | struct S2<F: Fn(&i32, &i32) -> &i32>(F);
 help: consider making the bound lifetime-generic with a new `'a` lifetime
    |
 LL | struct S2<F: for<'a> Fn(&'a i32, &'a i32) -> &'a i32>(F);
-   |              ^^^^^^^    ^^^^^^^  ^^^^^^^     ^^^
+   |              +++++++    ~~~~~~~  ~~~~~~~     ~~~
 help: consider introducing a named lifetime parameter
    |
 LL | struct S2<'a, F: Fn(&'a i32, &'a i32) -> &'a i32>(F);
-   |           ^^^       ^^^^^^^  ^^^^^^^     ^^^
+   |           +++       ~~~~~~~  ~~~~~~~     ~~~
 
 error[E0582]: binding for associated type `Output` references lifetime `'a`, which does not appear in the trait input types
   --> $DIR/fn-missing-lifetime-in-item.rs:3:40
index 9b2febb1393e13524f4f1538c0551037a146a894..1ed784e8f5bc9c346d7715b9c7b76dbe5c454cd4 100644 (file)
@@ -12,11 +12,11 @@ LL |     let _: E = E::B;
 help: use struct literal syntax instead
    |
 LL |     let _: E = E::B { a: val };
-   |                ^^^^^^^^^^^^^^^
+   |                ~~~~~~~~~~~~~~~
 help: a tuple variant with a similar name exists
    |
 LL |     let _: E = E::A;
-   |                   ^
+   |                   ~
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:29:20
@@ -34,7 +34,7 @@ LL |     let _: usize = foo;
 help: use parentheses to call this function
    |
 LL |     let _: usize = foo(a, b);
-   |                       ^^^^^^
+   |                       ++++++
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:30:16
@@ -52,7 +52,7 @@ LL |     let _: S = S;
 help: use parentheses to instantiate this tuple struct
    |
 LL |     let _: S = S(_, _);
-   |                 ^^^^^^
+   |                 ++++++
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:31:20
@@ -70,7 +70,7 @@ LL |     let _: usize = bar;
 help: use parentheses to call this function
    |
 LL |     let _: usize = bar();
-   |                       ^^
+   |                       ++
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:32:16
@@ -88,7 +88,7 @@ LL |     let _: V = V;
 help: use parentheses to instantiate this tuple struct
    |
 LL |     let _: V = V();
-   |                 ^^
+   |                 ++
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:33:20
@@ -106,7 +106,7 @@ LL |     let _: usize = T::baz;
 help: use parentheses to call this function
    |
 LL |     let _: usize = T::baz(x, y);
-   |                          ^^^^^^
+   |                          ++++++
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:34:20
@@ -124,7 +124,7 @@ LL |     let _: usize = T::bat;
 help: use parentheses to call this function
    |
 LL |     let _: usize = T::bat(x);
-   |                          ^^^
+   |                          +++
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:35:16
@@ -142,7 +142,7 @@ LL |     let _: E = E::A;
 help: use parentheses to instantiate this tuple variant
    |
 LL |     let _: E = E::A(_);
-   |                    ^^^
+   |                    +++
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:37:20
@@ -160,7 +160,7 @@ LL |     let _: usize = X::baz;
 help: use parentheses to call this function
    |
 LL |     let _: usize = X::baz(x, y);
-   |                          ^^^^^^
+   |                          ++++++
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:38:20
@@ -178,7 +178,7 @@ LL |     let _: usize = X::bat;
 help: use parentheses to call this function
    |
 LL |     let _: usize = X::bat(x);
-   |                          ^^^
+   |                          +++
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:39:20
@@ -196,7 +196,7 @@ LL |     let _: usize = X::bax;
 help: use parentheses to call this function
    |
 LL |     let _: usize = X::bax(x);
-   |                          ^^^
+   |                          +++
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:40:20
@@ -214,7 +214,7 @@ LL |     let _: usize = X::bach;
 help: use parentheses to call this function
    |
 LL |     let _: usize = X::bach(x);
-   |                           ^^^
+   |                           +++
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:41:20
@@ -232,7 +232,7 @@ LL |     let _: usize = X::ban;
 help: use parentheses to call this function
    |
 LL |     let _: usize = X::ban(_);
-   |                          ^^^
+   |                          +++
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:42:20
@@ -250,7 +250,7 @@ LL |     let _: usize = X::bal;
 help: use parentheses to call this function
    |
 LL |     let _: usize = X::bal(_);
-   |                          ^^^
+   |                          +++
 
 error[E0615]: attempted to take value of method `ban` on type `X`
   --> $DIR/fn-or-tuple-struct-without-args.rs:43:22
@@ -261,7 +261,7 @@ LL |     let _: usize = X.ban;
 help: use parentheses to call the method
    |
 LL |     let _: usize = X.ban();
-   |                         ^^
+   |                         ++
 
 error[E0615]: attempted to take value of method `bal` on type `X`
   --> $DIR/fn-or-tuple-struct-without-args.rs:44:22
@@ -272,7 +272,7 @@ LL |     let _: usize = X.bal;
 help: use parentheses to call the method
    |
 LL |     let _: usize = X.bal();
-   |                         ^^
+   |                         ++
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:46:20
@@ -289,7 +289,7 @@ LL |     let _: usize = closure;
 help: use parentheses to call this closure
    |
 LL |     let _: usize = closure();
-   |                           ^^
+   |                           ++
 
 error: aborting due to 17 previous errors
 
index 011fdf34c28b543cf60d4d4a93fde4e36d6ad089..49cee6abc4eb4cfe0dd0f2b8c3ec04e9aa33d580 100644 (file)
@@ -7,7 +7,7 @@ LL |         for _ in self.v {
 help: consider iterating over a slice of the `Vec<u32>`'s content
    |
 LL |         for _ in &self.v {
-   |                  ^
+   |                  +
 
 error[E0507]: cannot move out of `self.h` which is behind a shared reference
   --> $DIR/for-i-in-vec.rs:13:18
@@ -18,7 +18,7 @@ LL |         for _ in self.h {
 help: consider iterating over a slice of the `HashMap<i32, i32>`'s content
    |
 LL |         for _ in &self.h {
-   |                  ^
+   |                  +
 
 error: aborting due to 2 previous errors
 
index 15cb845a06d543674a04e701bfc6e3b953016b40..8a2941cb6a4deb2aab0f89156a0723b62282bbcb 100644 (file)
@@ -8,8 +8,9 @@ LL |     let a: String = &String::from("a");
    |
 help: consider removing the borrow
    |
-LL |     let a: String = String::from("a");
-   |                    --
+LL -     let a: String = &String::from("a");
+LL +     let a: String = String::from("a");
+   | 
 
 error[E0308]: mismatched types
   --> $DIR/format-borrow.rs:4:21
@@ -21,8 +22,9 @@ LL |     let b: String = &format!("b");
    |
 help: consider removing the borrow
    |
-LL |     let b: String = format!("b");
-   |                    --
+LL -     let b: String = &format!("b");
+LL +     let b: String = format!("b");
+   | 
 
 error[E0308]: mismatched types
   --> $DIR/format-borrow.rs:6:21
@@ -34,8 +36,9 @@ LL |     let c: String = &mut format!("c");
    |
 help: consider removing the borrow
    |
-LL |     let c: String = format!("c");
-   |                    --
+LL -     let c: String = &mut format!("c");
+LL +     let c: String = format!("c");
+   | 
 
 error[E0308]: mismatched types
   --> $DIR/format-borrow.rs:8:21
@@ -47,8 +50,9 @@ LL |     let d: String = &mut (format!("d"));
    |
 help: consider removing the borrow
    |
-LL |     let d: String = format!("d"));
-   |                    --
+LL -     let d: String = &mut (format!("d"));
+LL +     let d: String = format!("d"));
+   | 
 
 error: aborting due to 4 previous errors
 
index ce1ee0cd06d4854788b78cd9ca1a7e61213d00e7..1e23ede7adc870716cfa1a79cab1a4440e0fdd01 100644 (file)
@@ -7,7 +7,7 @@ LL |     if Some(x) = foo {}
 help: you might have meant to use pattern matching
    |
 LL |     if let Some(x) = foo {}
-   |        ^^^
+   |        +++
 
 error[E0658]: destructuring assignments are unstable
   --> $DIR/if-let-typo.rs:4:16
@@ -63,7 +63,7 @@ LL |     if 3 = foo {}
 help: you might have meant to use pattern matching
    |
 LL |     if let 3 = foo {}
-   |        ^^^
+   |        +++
 
 error[E0070]: invalid left-hand side of assignment
   --> $DIR/if-let-typo.rs:10:16
index bd060c92cd4699f3c8872bd3d7350a62d74180f6..a12b6bd2128a8715ba2f226d1a513fef6437419c 100644 (file)
@@ -12,7 +12,7 @@ LL |   foo(&s);
 help: consider changing this borrow's mutability
    |
 LL |   foo(&mut s);
-   |       ^^^^
+   |       ~~~~
 
 error[E0277]: the trait bound `S: Trait` is not satisfied
   --> $DIR/imm-ref-trait-object-literal.rs:13:7
index acf0c0ece402010799a0af429648e19f0d4f98a4..043a771129a617a45a0d86c66ea5f8c9321d4269 100644 (file)
@@ -11,7 +11,7 @@ LL |     }
 help: you can add a bound to the opaque type to make it last less than `'static` and match `'a`
    |
 LL |     fn use_it<'a>(val: Box<dyn ObjectTrait<Assoc = i32>>) -> impl OtherTrait<'a> + 'a {
-   |                                                                                  ^^^^
+   |                                                                                  ++++
 
 error[E0515]: cannot return value referencing function parameter `val`
   --> $DIR/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.rs:43:9
index 00971b41c7ce652e5b2bffc185aab7278d7324df..29991b6572fb42b413b57743f53730045e4b4e8e 100644 (file)
@@ -11,7 +11,7 @@ LL |     }
 help: you can add a bound to the opaque type to make it last less than `'static` and match `'a`
    |
 LL |     fn use_it<'a>(val: Box<dyn ObjectTrait<Assoc = i32>>) -> impl OtherTrait<'a> + 'a {
-   |                                                                                  ^^^^
+   |                                                                                  ++++
 
 error[E0515]: cannot return value referencing function parameter `val`
   --> $DIR/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.rs:43:9
@@ -49,7 +49,7 @@ LL |         fn use_self(&self) -> &() { panic!() }
 help: consider relaxing the implicit `'static` requirement
    |
 LL |     impl MyTrait for Box<dyn ObjectTrait<Assoc = i32> + '_> {
-   |                                                       ^^^^
+   |                                                       ++++
 
 error: aborting due to 4 previous errors
 
index 2fb6c25fd17028a417650e3419660658a11fa900..6d9f0811b27358fee9f828610227ba87c6edf593 100644 (file)
@@ -16,7 +16,7 @@ LL |         fn use_self<K>(&self) -> &() { panic!() }
 help: consider relaxing the implicit `'static` requirement
    |
 LL |     impl<T> MyTrait<T> for dyn ObjectTrait<T> + '_ {
-   |                                               ^^^^
+   |                                               ++++
 
 error[E0772]: `val` has lifetime `'a` but calling `use_self` introduces an implicit `'static` lifetime requirement
   --> $DIR/impl-on-dyn-trait-with-implicit-static-bound.rs:69:13
@@ -36,7 +36,7 @@ LL |         fn use_self(&self) -> &() { panic!() }
 help: consider relaxing the implicit `'static` requirement
    |
 LL |     impl dyn ObjectTrait + '_ {
-   |                          ^^^^
+   |                          ++++
 
 error[E0759]: `val` has lifetime `'a` but it needs to satisfy a `'static` lifetime requirement
   --> $DIR/impl-on-dyn-trait-with-implicit-static-bound.rs:88:13
@@ -57,11 +57,11 @@ LL |     impl MyTrait for dyn ObjectTrait {}
 help: consider relaxing the implicit `'static` requirement
    |
 LL |     impl MyTrait for dyn ObjectTrait + '_ {}
-   |                                      ^^^^
+   |                                      ++++
 help: to declare that the `impl Trait` captures data from argument `val`, you can add an explicit `'a` lifetime bound
    |
 LL |     fn use_it<'a>(val: &'a dyn ObjectTrait) -> impl OtherTrait<'a> + 'a {
-   |                                                                    ^^^^
+   |                                                                    ++++
 
 error[E0759]: `val` has lifetime `'a` but it needs to satisfy a `'static` lifetime requirement
   --> $DIR/impl-on-dyn-trait-with-implicit-static-bound.rs:108:27
@@ -87,7 +87,7 @@ LL |     impl MyTrait for dyn ObjectTrait {}
 help: consider relaxing the implicit `'static` requirement
    |
 LL |     impl MyTrait for dyn ObjectTrait + '_ {}
-   |                                      ^^^^
+   |                                      ++++
 
 error[E0772]: `val` has lifetime `'a` but calling `use_self` introduces an implicit `'static` lifetime requirement
   --> $DIR/impl-on-dyn-trait-with-implicit-static-bound.rs:37:13
@@ -107,7 +107,7 @@ LL |         fn use_self(&self) -> &() { panic!() }
 help: consider relaxing the implicit `'static` requirement
    |
 LL |     impl MyTrait for dyn ObjectTrait + '_ {
-   |                                      ^^^^
+   |                                      ++++
 
 error[E0772]: `val` has lifetime `'a` but calling `use_self` introduces an implicit `'static` lifetime requirement
   --> $DIR/impl-on-dyn-trait-with-implicit-static-bound.rs:54:13
@@ -127,7 +127,7 @@ LL |         fn use_self(&self) -> &() { panic!() }
 help: consider relaxing the implicit `'static` requirement
    |
 LL |     impl MyTrait for Box<dyn ObjectTrait + '_> {
-   |                                          ^^^^
+   |                                          ++++
 
 error: aborting due to 6 previous errors
 
index e31f25ab60304627e30e05219df1c00cdee324dd..a3a339b13c4782e53272815dba6266587db818c5 100644 (file)
@@ -7,7 +7,7 @@ LL | fn f(_: impl Iterator<Item = &'_ ()>) {}
 help: consider introducing a named lifetime parameter
    |
 LL | fn f<'a>(_: impl Iterator<Item = &'a ()>) {}
-   |     ^^^^                          ^^
+   |     ++++                          ~~
 
 error: aborting due to previous error
 
index 0de3b9aec19e1aeca8775a916c5bfdd962f878d7..7d8a34ed01889dce41461cf371d0799f05da7fc4 100644 (file)
@@ -11,7 +11,7 @@ LL | fn qux(_: impl std::fmt::Debug) {}
 help: introduce a type parameter with a trait bound instead of using `impl Trait`
    |
 LL | fn foo<I: Iterator>(constraints: I) where <I as Iterator>::Item: Debug {
-   |       ^^^^^^^^^^^^^              ^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++              ~  ++++++++++++++++++++++++++++++++++
 
 error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
   --> $DIR/impl-trait-with-missing-bounds.rs:14:13
@@ -26,7 +26,7 @@ LL | fn qux(_: impl std::fmt::Debug) {}
 help: introduce a type parameter with a trait bound instead of using `impl Trait`
    |
 LL | fn bar<T, I: Iterator>(t: T, constraints: I) where T: std::fmt::Debug, <I as Iterator>::Item: Debug {
-   |         ^^^^^^^^^^^^^                     ^                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         +++++++++++++                     ~                          ++++++++++++++++++++++++++++++
 
 error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
   --> $DIR/impl-trait-with-missing-bounds.rs:22:13
@@ -41,7 +41,7 @@ LL | fn qux(_: impl std::fmt::Debug) {}
 help: introduce a type parameter with a trait bound instead of using `impl Trait`
    |
 LL | fn baz<I: Iterator>(t: impl std::fmt::Debug, constraints: I) where <I as Iterator>::Item: Debug {
-   |       ^^^^^^^^^^^^^                                       ^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++                                       ~  ++++++++++++++++++++++++++++++++++
 
 error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
   --> $DIR/impl-trait-with-missing-bounds.rs:30:13
@@ -56,7 +56,7 @@ LL | fn qux(_: impl std::fmt::Debug) {}
 help: introduce a type parameter with a trait bound instead of using `impl Trait`
    |
 LL | fn bat<I, T: std::fmt::Debug, U: Iterator>(t: T, constraints: U, _: I) where <U as Iterator>::Item: Debug {
-   |                             ^^^^^^^^^^^^^                     ^        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                             +++++++++++++                     ~        ++++++++++++++++++++++++++++++++++
 
 error[E0277]: `<impl Iterator + std::fmt::Debug as Iterator>::Item` doesn't implement `Debug`
   --> $DIR/impl-trait-with-missing-bounds.rs:37:13
@@ -71,7 +71,7 @@ LL | fn qux(_: impl std::fmt::Debug) {}
 help: introduce a type parameter with a trait bound instead of using `impl Trait`
    |
 LL | fn bak<I: Iterator + std::fmt::Debug>(constraints: I) where <I as Iterator>::Item: Debug {
-   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^              ^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++++++++++++++++++++              ~  ++++++++++++++++++++++++++++++++++
 
 error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
   --> $DIR/impl-trait-with-missing-bounds.rs:45:13
@@ -86,7 +86,7 @@ LL | fn qux(_: impl std::fmt::Debug) {}
 help: introduce a type parameter with a trait bound instead of using `impl Trait`
    |
 LL | fn baw<I: Iterator>(constraints: I) where <I as Iterator>::Item: Debug {
-   |       ^^^^^^^^^^^^^              ^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |       ~~~~~~~~~~~~~              ~  ++++++++++++++++++++++++++++++++++
 
 error: aborting due to 6 previous errors
 
index db54d044d9e9264721834ad6f6a7dfd467b5ec55..6255df06efb6ade307d7a8930812506c0f0dc2ab 100644 (file)
@@ -8,7 +8,7 @@ LL |     foo.hello();
 help: the following trait defines an item `hello`, perhaps you need to restrict type parameter `impl Foo` with it:
    |
 LL | fn test(foo: impl Foo + Bar) {
-   |              ^^^^^^^^^^^^^^
+   |              ~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 14c7b18ea51d36569afceba86ddff3ffb33d27d7..eda29f876d8fcbb27316f5f40f7a3f7bc0f77f4c 100644 (file)
@@ -8,7 +8,7 @@ LL |     x.method()
 help: the following trait defines an item `method`, perhaps you need to restrict type parameter `T` with it:
    |
 LL | fn call_method<T: Foo + std::fmt::Debug>(x: &T) {
-   |                ^^^^^^^^
+   |                ~~~~~~~~
 
 error[E0599]: no method named `method` found for type parameter `T` in the current scope
   --> $DIR/issue-21673.rs:10:7
@@ -20,7 +20,7 @@ LL |     x.method()
 help: the following trait defines an item `method`, perhaps you need to restrict type parameter `T` with it:
    |
 LL | fn call_method_2<T: Foo>(x: T) {
-   |                  ^^^^^^
+   |                  ~~~~~~
 
 error: aborting due to 2 previous errors
 
index 62c04584d3c75176b2fa0ba37a993c44a73a6bd3..7b465844501927b63255fc4875c9abb0a41f84a0 100644 (file)
@@ -7,7 +7,7 @@ LL |         guts,
 help: try using a conversion method
    |
 LL |         guts: guts.to_string(),
-   |         ^^^^^     ^^^^^^^^^^^^
+   |         +++++     ++++++++++++
 
 error[E0308]: mismatched types
   --> $DIR/issue-52820.rs:10:17
index ac9b6d975f42526dcb41672052f0b246b7203db3..40e4c7b78499c6174fe7328a774f3e319f04a744 100644 (file)
@@ -9,7 +9,7 @@ LL |     let y: i32 = x;
 help: consider dereferencing the type
    |
 LL |     let y: i32 = *x;
-   |                  ^
+   |                  +
 
 error[E0308]: mismatched types
   --> $DIR/issue-59819.rs:30:18
@@ -22,7 +22,7 @@ LL |     let b: i32 = a;
 help: consider dereferencing the borrow
    |
 LL |     let b: i32 = *a;
-   |                  ^
+   |                  +
 
 error[E0308]: mismatched types
   --> $DIR/issue-59819.rs:34:21
index 6282a693855af778e1f86fb0ef67f14a37eb034f..bb487920e3bb689ca2ad23c727aeb105fb2fa1f1 100644 (file)
@@ -10,7 +10,7 @@ note: the lint level is defined here
 LL | #![deny(bare_trait_objects)]
    |         ^^^^^^^^^^^^^^^^^^
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error: trait objects without an explicit `dyn` are deprecated
   --> $DIR/issue-61963.rs:18:1
@@ -19,7 +19,7 @@ LL | pub struct Foo {
    | ^^^ help: use `dyn`: `dyn pub`
    |
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error: aborting due to 2 previous errors
 
index e96db3f1e8630664159a9ef6c8f46506de0382bf..009707a3a6449489969728fb1a21b00e39fe6e23 100644 (file)
@@ -8,11 +8,11 @@ LL | pub fn foo(Box<Self>) { }
 help: if this is a `self` type, give it a parameter name
    |
 LL | pub fn foo(self: Box<Self>) { }
-   |            ^^^^^^^^^
+   |            ~~~~~~~~~
 help: if this is a type, explicitly ignore the parameter name
    |
 LL | pub fn foo(_: Box<Self>) { }
-   |            ^^^^^^
+   |            ~~~~~~
 
 error: expected one of `:`, `@`, or `|`, found `<`
   --> $DIR/issue-64252-self-type.rs:10:15
@@ -24,11 +24,11 @@ LL |     fn bar(Box<Self>) { }
 help: if this is a `self` type, give it a parameter name
    |
 LL |     fn bar(self: Box<Self>) { }
-   |            ^^^^^^^^^
+   |            ~~~~~~~~~
 help: if this is a type, explicitly ignore the parameter name
    |
 LL |     fn bar(_: Box<Self>) { }
-   |            ^^^^^^
+   |            ~~~~~~
 
 error: aborting due to 2 previous errors
 
index fcc49ef59d1294711d6e781e537976d074f83b66..43ba35d0205bd38bcbbcaf19e5d75bf55039980a 100644 (file)
@@ -13,7 +13,7 @@ LL |     fn branch(self) -> ControlFlow<Self::Residual, Self::Output>;
 help: consider `await`ing on the `Future`
    |
 LL |     SadGirl {}.call().await?;
-   |                      ^^^^^^
+   |                      ++++++
 
 error: aborting due to previous error
 
index 9404c3bb583172fa2b9d0170b904ca34a09106cd..be91eb876d0e0fa962eb634d4d12b325c8931053 100644 (file)
@@ -11,7 +11,7 @@ LL | fn assert_is_send<T: Send>(_: &T) {}
 help: introduce a type parameter with a trait bound instead of using `impl Trait`
    |
 LL | async fn run<F: Foo>(_: &(), foo: F) -> std::io::Result<()> where <F as Foo>::Bar: Send {
-   |             ^^^^^^^^              ^                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |             ++++++++              ~                         +++++++++++++++++++++++++++
 
 error[E0277]: `<impl Foo as Foo>::Bar` cannot be sent between threads safely
   --> $DIR/issue-79843-impl-trait-with-missing-bounds-on-async-fn.rs:24:20
@@ -26,7 +26,7 @@ LL | fn assert_is_send<T: Send>(_: &T) {}
 help: introduce a type parameter with a trait bound instead of using `impl Trait`
    |
 LL | async fn run2<F: Foo>(_: &(), foo: F) -> std::io::Result<()> where <F as Foo>::Bar: Send {
-   |              ^^^^^^^^              ^                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |              ~~~~~~~~              ~                         +++++++++++++++++++++++++++
 
 error: aborting due to 2 previous errors
 
index 91b380e4e0d32a0157bd1411b307fe550d5ce6ed..c09ad17f82acdc25a6c0cc08184d5f4e60852d4f 100644 (file)
@@ -13,7 +13,7 @@ LL | |     };
 help: consider dereferencing the borrow
    |
 LL |         *b
-   |         ^
+   |         +
 
 error[E0308]: `if` and `else` have incompatible types
   --> $DIR/issue-82361.rs:16:9
@@ -29,8 +29,9 @@ LL | |     };
    |
 help: consider removing the borrow
    |
-LL |         1
-   |        --
+LL -         &1
+LL +         1
+   | 
 
 error[E0308]: `if` and `else` have incompatible types
   --> $DIR/issue-82361.rs:22:9
@@ -46,8 +47,9 @@ LL | |     };
    |
 help: consider removing the borrow
    |
-LL |         1
-   |        --
+LL -         &mut 1
+LL +         1
+   | 
 
 error: aborting due to 3 previous errors
 
index 5a9099a894c8fb4387a88834bc92d4bc4c928871..a05c59c786b0a71f6a9d8a9cde75b7ec4048c5ca 100644 (file)
@@ -7,7 +7,7 @@ LL |     T1<1>::C;
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |     T1::<1>::C;
-   |       ^^
+   |       ++
 
 error: expected one of `.`, `;`, `?`, `}`, or an operator, found `,`
   --> $DIR/issue-82566-1.rs:19:9
@@ -18,7 +18,7 @@ LL |     T2<1, 2>::C;
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |     T2::<1, 2>::C;
-   |       ^^
+   |       ++
 
 error: expected one of `.`, `;`, `?`, `}`, or an operator, found `,`
   --> $DIR/issue-82566-1.rs:20:9
@@ -29,7 +29,7 @@ LL |     T3<1, 2, 3>::C;
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL |     T3::<1, 2, 3>::C;
-   |       ^^
+   |       ++
 
 error: aborting due to 3 previous errors
 
index ea391ee078c8154c7440acbea7680dcf03589f25..8f30a301bb82f97260281ed2822a83497b484287 100644 (file)
@@ -7,7 +7,7 @@ LL | fn foo1() -> [(); Foo1<10>::SUM] {
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL | fn foo1() -> [(); Foo1::<10>::SUM] {
-   |                       ^^
+   |                       ++
 
 error: expected one of `.`, `?`, `]`, or an operator, found `,`
   --> $DIR/issue-82566-2.rs:21:26
@@ -18,7 +18,7 @@ LL | fn foo2() -> [(); Foo2<10, 20>::SUM] {
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL | fn foo2() -> [(); Foo2::<10, 20>::SUM] {
-   |                       ^^
+   |                       ++
 
 error: expected one of `.`, `?`, `]`, or an operator, found `,`
   --> $DIR/issue-82566-2.rs:26:26
@@ -29,7 +29,7 @@ LL | fn foo3() -> [(); Foo3<10, 20, 30>::SUM] {
 help: use `::<...>` instead of `<...>` to specify type or const arguments
    |
 LL | fn foo3() -> [(); Foo3::<10, 20, 30>::SUM] {
-   |                       ^^
+   |                       ++
 
 error: aborting due to 3 previous errors
 
index 02f9241a6d2dae3fdbb5e13aa35870c777f2702f..fe301e41277fc5fbde819f08fc09a6b9ecda0528 100644 (file)
@@ -10,7 +10,7 @@ LL | fn two_lifetimes_needed(a: &(), b: &()) -> TwoLifetimes<'_, '_> {
 help: consider introducing a named lifetime parameter
    |
 LL | fn two_lifetimes_needed<'a>(a: &'a (), b: &'a ()) -> TwoLifetimes<'a, 'a> {
-   |                        ^^^^    ^^^^^^     ^^^^^^                  ^^  ^^
+   |                        ++++    ~~~~~~     ~~~~~~                  ~~  ~~
 
 error: aborting due to previous error
 
index 60594baa29cb65344806b4e1a208e40ebf12fe88..fccd2ef8df77ca16604c579f5b9533c93bccab7d 100644 (file)
@@ -12,7 +12,7 @@ LL |     type Bar<'a>: Deref<Target = <Self>::Bar<Target = Self>>;
 help: add missing lifetime argument
    |
 LL |     type Bar<'a>: Deref<Target = <Self>::Bar<'a, Target = Self>>;
-   |                                              ^^^
+   |                                              +++
 
 error: aborting due to previous error
 
index 575379690b46f1b877c1bb47e2f13bef3a360055..9c8356a528470b53cfb023c7ea79bae9611e2b05 100644 (file)
@@ -11,7 +11,7 @@ LL |     let _x: (i32,) = (5);
 help: use a trailing comma to create a tuple with one element
    |
 LL |     let _x: (i32,) = (5,);
-   |                      ^^^^
+   |                      ~~~~
 
 error[E0308]: mismatched types
   --> $DIR/issue-86100-tuple-paren-comma.rs:13:9
@@ -24,7 +24,7 @@ LL |     foo((Some(3)));
 help: use a trailing comma to create a tuple with one element
    |
 LL |     foo((Some(3),));
-   |         ^^^^^^^^^^
+   |         ~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/issue-86100-tuple-paren-comma.rs:17:22
@@ -37,7 +37,7 @@ LL |     let _s = S { _s: ("abc".to_string()) };
 help: use a trailing comma to create a tuple with one element
    |
 LL |     let _s = S { _s: ("abc".to_string(),) };
-   |                      ^^^^^^^^^^^^^^^^^^^^
+   |                      ~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/issue-86100-tuple-paren-comma.rs:23:22
index 77f7f874a4e42b62f0d2d6d110a4ff580c150abf..c1319165a70407e3173306bdd5d3083417315be6 100644 (file)
@@ -8,7 +8,7 @@ LL | async fn a(s1: &str, s2: &str) -> &str {
 help: consider introducing a named lifetime parameter
    |
 LL | async fn a<'a>(s1: &'a str, s2: &'a str) -> &'a str {
-   |           ^^^^     ^^^^^^^      ^^^^^^^     ^^^
+   |           ++++     ~~~~~~~      ~~~~~~~     ~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/issue-86667.rs:11:29
@@ -20,7 +20,7 @@ LL | fn b(s1: &str, s2: &str) -> &str {
 help: consider introducing a named lifetime parameter
    |
 LL | fn b<'a>(s1: &'a str, s2: &'a str) -> &'a str {
-   |     ^^^^     ^^^^^^^      ^^^^^^^     ^^^
+   |     ++++     ~~~~~~~      ~~~~~~~     ~~~
 
 error: aborting due to 2 previous errors
 
index 05ba7808600b01131933898a9206009e9f8c3542..b27980300325beed4b4c1188a66873b38488e7d2 100644 (file)
@@ -9,7 +9,7 @@ LL |     fn iter(&self) -> impl Iterator<Item = Box<dyn Foo>> {
 help: to allow this `impl Trait` to capture borrowed data with lifetime `'1`, add `'_` as a bound
    |
 LL |     fn iter(&self) -> impl Iterator<Item = Box<dyn Foo>> + '_ {
-   |                                                          ^^^^
+   |                                                          ++++
 
 error: lifetime may not live long enough
   --> $DIR/trait-object-nested-in-impl-trait.rs:39:9
@@ -47,7 +47,7 @@ LL |     fn iter<'a>(&'a self) -> impl Iterator<Item = Box<dyn Foo>> {
 help: to allow this `impl Trait` to capture borrowed data with lifetime `'a`, add `'a` as a bound
    |
 LL |     fn iter<'a>(&'a self) -> impl Iterator<Item = Box<dyn Foo>> + 'a {
-   |                                                                 ^^^^
+   |                                                                 ++++
 
 error: aborting due to 4 previous errors
 
index 9f30787f07cc6d9d9114805811f52a0b0323191a..1ca22ebeef479357d748589d19dad8380b68206e 100644 (file)
@@ -17,11 +17,11 @@ LL |     fn iter(&self) -> impl Iterator<Item = Box<dyn Foo>> {
 help: to declare that the `impl Trait` captures data from argument `self`, you can add an explicit `'_` lifetime bound
    |
 LL |     fn iter(&self) -> impl Iterator<Item = Box<dyn Foo>> + '_ {
-   |                                                          ^^^^
+   |                                                          ++++
 help: to declare that the trait object captures data from argument `self`, you can add an explicit `'_` lifetime bound
    |
 LL |     fn iter(&self) -> impl Iterator<Item = Box<dyn Foo + '_>> {
-   |                                                        ^^^^
+   |                                                        ++++
 
 error[E0759]: `self` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement
   --> $DIR/trait-object-nested-in-impl-trait.rs:41:31
@@ -42,7 +42,7 @@ LL |     fn iter(&self) -> impl Iterator<Item = Box<dyn Foo>> + '_ {
 help: to declare that the trait object captures data from argument `self`, you can add an explicit `'_` lifetime bound
    |
 LL |     fn iter(&self) -> impl Iterator<Item = Box<dyn Foo + '_>> + '_ {
-   |                                                        ^^^^
+   |                                                        ++++
 
 error[E0759]: `self` has lifetime `'a` but it needs to satisfy a `'static` lifetime requirement
   --> $DIR/trait-object-nested-in-impl-trait.rs:52:31
@@ -63,7 +63,7 @@ LL |     fn iter<'a>(&'a self) -> impl Iterator<Item = Box<dyn Foo>> + 'a {
 help: to declare that the trait object captures data from argument `self`, you can add an explicit `'a` lifetime bound
    |
 LL |     fn iter<'a>(&'a self) -> impl Iterator<Item = Box<dyn Foo + 'a>> + 'a {
-   |                                                               ^^^^
+   |                                                               ++++
 
 error[E0759]: `self` has lifetime `'a` but it needs to satisfy a `'static` lifetime requirement
   --> $DIR/trait-object-nested-in-impl-trait.rs:63:31
@@ -84,11 +84,11 @@ LL |     fn iter<'a>(&'a self) -> impl Iterator<Item = Box<dyn Foo>> {
 help: to declare that the `impl Trait` captures data from argument `self`, you can add an explicit `'a` lifetime bound
    |
 LL |     fn iter<'a>(&'a self) -> impl Iterator<Item = Box<dyn Foo>> + 'a {
-   |                                                                 ^^^^
+   |                                                                 ++++
 help: to declare that the trait object captures data from argument `self`, you can add an explicit `'a` lifetime bound
    |
 LL |     fn iter<'a>(&'a self) -> impl Iterator<Item = Box<dyn Foo + 'a>> {
-   |                                                               ^^^^
+   |                                                               ++++
 
 error: aborting due to 4 previous errors
 
index 3739c9940f0cc268c13938e49aaecd05c6752367..b5f01d7038c0dea23404ab2c6e620c66fabbceaa 100644 (file)
@@ -14,11 +14,11 @@ LL | |     }
 help: consider using a semicolon here
    |
 LL |             foo();
-   |                  ^
+   |                  +
 help: consider using a semicolon here
    |
 LL |     };
-   |      ^
+   |      +
 
 error[E0308]: mismatched types
   --> $DIR/match-needing-semi.rs:11:5
index 9e64b539f0fdc1a0db05036b98095dc5981d8fd6..a8f7f3cb177799cbc9b3561d3b5da35a3088b1d2 100644 (file)
@@ -25,11 +25,12 @@ LL | async fn async_dummy() {}
 help: consider `await`ing on the `Future`
    |
 LL |         false => async_dummy().await,
-   |                               ^^^^^^
+   |                               ++++++
 help: consider removing this semicolon
    |
-LL |             async_dummy()
-   |                         --
+LL -             async_dummy();
+LL +             async_dummy()
+   | 
 
 error[E0308]: `match` arms have incompatible types
   --> $DIR/match-prev-arm-needing-semi.rs:45:18
@@ -58,13 +59,13 @@ LL | async fn async_dummy2() {}
 help: consider `await`ing on the `Future`
    |
 LL |         false => async_dummy2().await,
-   |                                ^^^^^^
+   |                                ++++++
 help: consider removing this semicolon and boxing the expressions
    |
-LL |             Box::new(async_dummy())
+LL ~             Box::new(async_dummy())
 LL |
 LL |         }
-LL |         false => Box::new(async_dummy2()),
+LL ~         false => Box::new(async_dummy2()),
    |
 
 error[E0308]: `match` arms have incompatible types
@@ -92,9 +93,9 @@ LL | async fn async_dummy2() {}
    = note: distinct uses of `impl Trait` result in different opaque types
 help: consider `await`ing on both `Future`s
    |
-LL |         true => async_dummy().await,
+LL ~         true => async_dummy().await,
 LL |
-LL |         false => async_dummy2().await,
+LL ~         false => async_dummy2().await,
    |
 
 error[E0308]: `match` arms have incompatible types
index 04c67ec6a06b6a7b7eb89e5476e751f53aee7bdf..1bfff56a6a906cae07101430b755d8fe7c3406b1 100644 (file)
@@ -13,7 +13,7 @@ LL |     let _ = vec![].into_iter().collect::<usize>;
 help: use parentheses to call the method
    |
 LL |     let _ = vec![].into_iter().collect::<usize>();
-   |                                                ^^
+   |                                                ++
 
 error: aborting due to 2 previous errors
 
index b20778ce208176346db23b7fc4c09d294c16bc48..1ecaade93c8ca8026df321a4d97546a0ea343291 100644 (file)
@@ -7,11 +7,11 @@ LL |     const A: &str = "";
 help: consider using the `'static` lifetime
    |
 LL |     const A: &'static str = "";
-   |               ^^^^^^^
+   |               +++++++
 help: consider introducing a named lifetime parameter
    |
-LL | trait ZstAssert<'a>: Sized {
-LL |     const A: &'a str = "";
+LL ~ trait ZstAssert<'a>: Sized {
+LL ~     const A: &'a str = "";
    |
 
 error[E0106]: missing lifetime specifier
@@ -23,12 +23,12 @@ LL |     const B: S = S { s: &() };
 help: consider using the `'static` lifetime
    |
 LL |     const B: S<'static> = S { s: &() };
-   |               ^^^^^^^^^
+   |               +++++++++
 help: consider introducing a named lifetime parameter
    |
-LL | trait ZstAssert<'a>: Sized {
+LL ~ trait ZstAssert<'a>: Sized {
 LL |     const A: &str = "";
-LL |     const B: S<'a> = S { s: &() };
+LL ~     const B: S<'a> = S { s: &() };
    |
 
 error[E0106]: missing lifetime specifier
@@ -40,13 +40,13 @@ LL |     const C: &'_ str = "";
 help: consider using the `'static` lifetime
    |
 LL |     const C: &'static str = "";
-   |               ^^^^^^^
+   |               ~~~~~~~
 help: consider introducing a named lifetime parameter
    |
-LL | trait ZstAssert<'a>: Sized {
+LL ~ trait ZstAssert<'a>: Sized {
 LL |     const A: &str = "";
 LL |     const B: S = S { s: &() };
-LL |     const C: &'a str = "";
+LL ~     const C: &'a str = "";
    |
 
 error[E0106]: missing lifetime specifiers
@@ -58,14 +58,14 @@ LL |     const D: T = T { a: &(), b: &() };
 help: consider using the `'static` lifetime
    |
 LL |     const D: T<'static, 'static> = T { a: &(), b: &() };
-   |               ^^^^^^^^^^^^^^^^^^
+   |               ++++++++++++++++++
 help: consider introducing a named lifetime parameter
    |
-LL | trait ZstAssert<'a>: Sized {
+LL ~ trait ZstAssert<'a>: Sized {
 LL |     const A: &str = "";
 LL |     const B: S = S { s: &() };
 LL |     const C: &'_ str = "";
-LL |     const D: T<'a, 'a> = T { a: &(), b: &() };
+LL ~     const D: T<'a, 'a> = T { a: &(), b: &() };
    |
 
 error: aborting due to 4 previous errors
index 8ddd2f7d52221fa585f94a725180a760dfda1d5e..bf546384124c061a83d2529ea7b435b67b5ff4c1 100644 (file)
@@ -8,7 +8,7 @@ LL |     static a: RefCell<HashMap<i32, Vec<Vec<Foo>>>> = RefCell::new(HashMap::
 help: consider using the `'static` lifetime
    |
 LL |     static a: RefCell<HashMap<i32, Vec<Vec<Foo<'static, 'static>>>>> = RefCell::new(HashMap::new());
-   |                                            ^^^^^^^^^^^^^^^^^^^^^
+   |                                            ~~~~~~~~~~~~~~~~~~~~~
 
 error[E0106]: missing lifetime specifiers
   --> $DIR/missing-lifetime-specifier.rs:18:44
@@ -20,7 +20,7 @@ LL |     static a: RefCell<HashMap<i32, Vec<Vec<Foo>>>> = RefCell::new(HashMap::
 help: consider using the `'static` lifetime
    |
 LL |     static a: RefCell<HashMap<i32, Vec<Vec<Foo<'static, 'static>>>>> = RefCell::new(HashMap::new());
-   |                                            ^^^^^^^^^^^^^^^^^^^^^
+   |                                            ~~~~~~~~~~~~~~~~~~~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/missing-lifetime-specifier.rs:23:44
@@ -32,7 +32,7 @@ LL |     static b: RefCell<HashMap<i32, Vec<Vec<&Bar>>>> = RefCell::new(HashMap:
 help: consider using the `'static` lifetime
    |
 LL |     static b: RefCell<HashMap<i32, Vec<Vec<&'static Bar>>>> = RefCell::new(HashMap::new());
-   |                                            ^^^^^^^^
+   |                                            ~~~~~~~~
 
 error[E0106]: missing lifetime specifiers
   --> $DIR/missing-lifetime-specifier.rs:23:45
@@ -44,7 +44,7 @@ LL |     static b: RefCell<HashMap<i32, Vec<Vec<&Bar>>>> = RefCell::new(HashMap:
 help: consider using the `'static` lifetime
    |
 LL |     static b: RefCell<HashMap<i32, Vec<Vec<&Bar<'static, 'static>>>>> = RefCell::new(HashMap::new());
-   |                                             ^^^^^^^^^^^^^^^^^^^^^
+   |                                             ~~~~~~~~~~~~~~~~~~~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/missing-lifetime-specifier.rs:23:44
@@ -56,7 +56,7 @@ LL |     static b: RefCell<HashMap<i32, Vec<Vec<&Bar>>>> = RefCell::new(HashMap:
 help: consider using the `'static` lifetime
    |
 LL |     static b: RefCell<HashMap<i32, Vec<Vec<&'static Bar>>>> = RefCell::new(HashMap::new());
-   |                                            ^^^^^^^^
+   |                                            ~~~~~~~~
 
 error[E0106]: missing lifetime specifiers
   --> $DIR/missing-lifetime-specifier.rs:23:45
@@ -68,7 +68,7 @@ LL |     static b: RefCell<HashMap<i32, Vec<Vec<&Bar>>>> = RefCell::new(HashMap:
 help: consider using the `'static` lifetime
    |
 LL |     static b: RefCell<HashMap<i32, Vec<Vec<&Bar<'static, 'static>>>>> = RefCell::new(HashMap::new());
-   |                                             ^^^^^^^^^^^^^^^^^^^^^
+   |                                             ~~~~~~~~~~~~~~~~~~~~~
 
 error[E0106]: missing lifetime specifiers
   --> $DIR/missing-lifetime-specifier.rs:30:48
@@ -80,7 +80,7 @@ LL |     static c: RefCell<HashMap<i32, Vec<Vec<Qux<i32>>>>> = RefCell::new(Hash
 help: consider using the `'static` lifetime
    |
 LL |     static c: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
-   |                                                ^^^^^^^^^^^^^^^^^
+   |                                                +++++++++++++++++
 
 error[E0106]: missing lifetime specifiers
   --> $DIR/missing-lifetime-specifier.rs:30:48
@@ -92,7 +92,7 @@ LL |     static c: RefCell<HashMap<i32, Vec<Vec<Qux<i32>>>>> = RefCell::new(Hash
 help: consider using the `'static` lifetime
    |
 LL |     static c: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
-   |                                                ^^^^^^^^^^^^^^^^^
+   |                                                +++++++++++++++++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/missing-lifetime-specifier.rs:35:44
@@ -104,7 +104,7 @@ LL |     static d: RefCell<HashMap<i32, Vec<Vec<&Tar<i32>>>>> = RefCell::new(Has
 help: consider using the `'static` lifetime
    |
 LL |     static d: RefCell<HashMap<i32, Vec<Vec<&'static Tar<i32>>>>> = RefCell::new(HashMap::new());
-   |                                            ^^^^^^^^
+   |                                            ~~~~~~~~
 
 error[E0106]: missing lifetime specifiers
   --> $DIR/missing-lifetime-specifier.rs:35:49
@@ -116,7 +116,7 @@ LL |     static d: RefCell<HashMap<i32, Vec<Vec<&Tar<i32>>>>> = RefCell::new(Has
 help: consider using the `'static` lifetime
    |
 LL |     static d: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
-   |                                                 ^^^^^^^^^^^^^^^^^
+   |                                                 +++++++++++++++++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/missing-lifetime-specifier.rs:35:44
@@ -128,7 +128,7 @@ LL |     static d: RefCell<HashMap<i32, Vec<Vec<&Tar<i32>>>>> = RefCell::new(Has
 help: consider using the `'static` lifetime
    |
 LL |     static d: RefCell<HashMap<i32, Vec<Vec<&'static Tar<i32>>>>> = RefCell::new(HashMap::new());
-   |                                            ^^^^^^^^
+   |                                            ~~~~~~~~
 
 error[E0106]: missing lifetime specifiers
   --> $DIR/missing-lifetime-specifier.rs:35:49
@@ -140,7 +140,7 @@ LL |     static d: RefCell<HashMap<i32, Vec<Vec<&Tar<i32>>>>> = RefCell::new(Has
 help: consider using the `'static` lifetime
    |
 LL |     static d: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
-   |                                                 ^^^^^^^^^^^^^^^^^
+   |                                                 +++++++++++++++++
 
 error[E0107]: this union takes 2 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/missing-lifetime-specifier.rs:43:44
@@ -158,7 +158,7 @@ LL | pub union Qux<'t, 'k, I> {
 help: add missing lifetime argument
    |
 LL |     static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, '_, i32>>>>> = RefCell::new(HashMap::new());
-   |                                                       ^^^^
+   |                                                       ++++
 
 error[E0107]: this union takes 2 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/missing-lifetime-specifier.rs:43:44
@@ -176,7 +176,7 @@ LL | pub union Qux<'t, 'k, I> {
 help: add missing lifetime argument
    |
 LL |     static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'k, i32>>>>> = RefCell::new(HashMap::new());
-   |                                                       ^^^^
+   |                                                       ++++
 
 error[E0107]: this union takes 2 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/missing-lifetime-specifier.rs:43:44
@@ -194,7 +194,7 @@ LL | pub union Qux<'t, 'k, I> {
 help: add missing lifetime argument
    |
 LL |     static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'k, i32>>>>> = RefCell::new(HashMap::new());
-   |                                                       ^^^^
+   |                                                       ++++
 
 error[E0107]: this union takes 2 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/missing-lifetime-specifier.rs:43:44
@@ -212,7 +212,7 @@ LL | pub union Qux<'t, 'k, I> {
 help: add missing lifetime argument
    |
 LL |     static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, '_, i32>>>>> = RefCell::new(HashMap::new());
-   |                                                       ^^^^
+   |                                                       ++++
 
 error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/missing-lifetime-specifier.rs:50:45
@@ -230,7 +230,7 @@ LL | trait Tar<'t, 'k, I> {}
 help: add missing lifetime argument
    |
 LL |     static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, '_, i32>>>>> = RefCell::new(HashMap::new());
-   |                                                        ^^^^
+   |                                                        ++++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/missing-lifetime-specifier.rs:50:44
@@ -242,7 +242,7 @@ LL |     static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell
 help: consider using the `'static` lifetime
    |
 LL |     static f: RefCell<HashMap<i32, Vec<Vec<&'static Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
-   |                                            ^^^^^^^^
+   |                                            ~~~~~~~~
 
 error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/missing-lifetime-specifier.rs:50:45
@@ -260,7 +260,7 @@ LL | trait Tar<'t, 'k, I> {}
 help: add missing lifetime argument
    |
 LL |     static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, 'k, i32>>>>> = RefCell::new(HashMap::new());
-   |                                                        ^^^^
+   |                                                        ++++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/missing-lifetime-specifier.rs:50:44
@@ -272,7 +272,7 @@ LL |     static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell
 help: consider using the `'static` lifetime
    |
 LL |     static f: RefCell<HashMap<i32, Vec<Vec<&'static Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
-   |                                            ^^^^^^^^
+   |                                            ~~~~~~~~
 
 error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/missing-lifetime-specifier.rs:50:45
@@ -290,7 +290,7 @@ LL | trait Tar<'t, 'k, I> {}
 help: add missing lifetime argument
    |
 LL |     static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, 'k, i32>>>>> = RefCell::new(HashMap::new());
-   |                                                        ^^^^
+   |                                                        ++++
 
 error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/missing-lifetime-specifier.rs:50:45
@@ -308,7 +308,7 @@ LL | trait Tar<'t, 'k, I> {}
 help: add missing lifetime argument
    |
 LL |     static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, '_, i32>>>>> = RefCell::new(HashMap::new());
-   |                                                        ^^^^
+   |                                                        ++++
 
 error: aborting due to 22 previous errors
 
index a7a44b511db8de6b3b12dc917bf902a4f564caa8..b1caaea9aed7ba48d5f4ef2ceba6cdb68bb6e713 100644 (file)
@@ -9,11 +9,11 @@ LL | struct S<'a>(&'a dyn Fn(&X) -> &X);
 help: consider making the bound lifetime-generic with a new `'b` lifetime
    |
 LL | struct S<'a>(&'a dyn for<'b> Fn(&'b X) -> &'b X);
-   |                      ^^^^^^^    ^^^^^     ^^^
+   |                      +++++++    ~~~~~     ~~~
 help: consider using the `'a` lifetime
    |
 LL | struct S<'a>(&'a dyn Fn(&X) -> &'a X);
-   |                                ^^^
+   |                                ~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/missing-lt-for-hrtb.rs:2:33
@@ -26,11 +26,11 @@ LL | struct S<'a>(&'a dyn Fn(&X) -> &X);
 help: consider making the bound lifetime-generic with a new `'b` lifetime
    |
 LL | struct S<'a>(&'a dyn for<'b> Fn(&'b X) -> &X<'b>);
-   |                      ^^^^^^^    ^^^^^      ^^^^^
+   |                      +++++++    ~~~~~      ~~~~~
 help: consider using the `'a` lifetime
    |
 LL | struct S<'a>(&'a dyn Fn(&X) -> &X<'a>);
-   |                                 ^^^^^
+   |                                 ~~~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/missing-lt-for-hrtb.rs:5:40
@@ -47,7 +47,7 @@ LL | struct V<'a>(&'a dyn for<'b> Fn(&X) -> &X);
 help: consider using one of the available lifetimes here
    |
 LL | struct V<'a>(&'a dyn for<'b> Fn(&X) -> &'lifetime X);
-   |                                        ^^^^^^^^^^
+   |                                        ~~~~~~~~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/missing-lt-for-hrtb.rs:5:41
index 0e0d397d6fc1546df01e12ca9fe47c06046d182d..cde0755012594c39fc5fbc96952d545cae1c8c05 100644 (file)
@@ -9,7 +9,7 @@ LL |     let _ = s == t;
 help: consider restricting type parameter `T`
    |
 LL | pub fn foo<T: std::cmp::PartialEq>(s: &[T], t: &[T]) {
-   |             ^^^^^^^^^^^^^^^^^^^^^
+   |             +++++++++++++++++++++
 
 error: aborting due to previous error
 
index 0a64a0d7d5ebcdf61a14bd98cfeabd88ee2d3f73..2f0fd692a444a23648e85ed22d6bd9b692937842 100644 (file)
@@ -15,7 +15,7 @@ LL |         self.foo();
 help: consider restricting the type parameters to satisfy the trait bounds
    |
 LL | struct Foo<T> where T: Bar, T: Default {
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^
+   |               ++++++++++++++++++++++++
 
 error[E0599]: the method `foo` exists for reference `&Fin<T>`, but its trait bounds were not satisfied
   --> $DIR/missing-trait-bounds-for-method-call.rs:27:14
@@ -32,7 +32,7 @@ LL |         self.foo();
 help: consider restricting the type parameter to satisfy the trait bound
    |
 LL | struct Fin<T> where T: Bar, T: Default {
-   |                           ^^^^^^^^^^^^
+   |                           ++++++++++++
 
 error: aborting due to 2 previous errors
 
index bb4f8e8c304a10cbdcb6e5c0a35b384a3e2be628..6e26bc1f01cef5abfda10bbf8d9d5990af2d9ae8 100644 (file)
@@ -7,7 +7,7 @@ LL |     b'µ';
 help: if you meant to use the unicode code point for 'µ', use a \xHH escape
    |
 LL |     b'\xB5';
-   |       ^^^^
+   |       ~~~~
 
 error: non-ASCII character in byte constant
   --> $DIR/multibyte-escapes.rs:9:7
@@ -27,7 +27,7 @@ LL |     b"字";
 help: if you meant to use the UTF-8 encoding of '字', use \xHH escapes
    |
 LL |     b"\xE5\xAD\x97";
-   |       ^^^^^^^^^^^^
+   |       ~~~~~~~~~~~~
 
 error: aborting due to 3 previous errors
 
index 13b6182c0f5f605c82f6ffede603d854d2f91610..fd5677898e65658ea9a3693d782730f923e39e74 100644 (file)
@@ -9,7 +9,7 @@ LL |     opt = None;
 help: consider dereferencing here to assign to the mutable borrowed piece of memory
    |
 LL |     *opt = None;
-   |     ^
+   |     +
 
 error[E0308]: mismatched types
   --> $DIR/mut-ref-reassignment.rs:6:11
@@ -31,7 +31,7 @@ LL |     opt = Some(String::new())
 help: consider dereferencing here to assign to the mutable borrowed piece of memory
    |
 LL |     *opt = Some(String::new())
-   |     ^
+   |     +
 
 error[E0308]: mismatched types
   --> $DIR/mut-ref-reassignment.rs:14:11
index ddb7476ec6e34b4a355ea11003cc0e1e215bff08..cc991b915d33980240970949c802f84cf0e3de76 100644 (file)
@@ -8,7 +8,7 @@ LL |     let _test = &fooer.c;
 help: one of the expressions' fields has a field of the same name
    |
 LL |     let _test = &fooer.first.bar.c;
-   |                        ^^^^^^^^^^
+   |                        ++++++++++
 
 error[E0609]: no field `test` on type `Foo`
   --> $DIR/non-existent-field-present-in-subfield.rs:40:24
@@ -20,7 +20,7 @@ LL |     let _test2 = fooer.test;
 help: one of the expressions' fields has a field of the same name
    |
 LL |     let _test2 = fooer.first.bar.c.test;
-   |                        ^^^^^^^^^^^^
+   |                        ++++++++++++
 
 error: aborting due to 2 previous errors
 
index 67491b0446f90d7ba2f39bd4da78331ef53d3048..55047b42698b57ce949666f382fb99f7097568ad 100644 (file)
@@ -9,7 +9,7 @@ LL |     fn f(a: A) -> A;
 help: you might have meant to use `Self` to refer to the implementing type
    |
 LL |     fn f(a: Self) -> Self;
-   |             ^^^^     ^^^^
+   |             ~~~~     ~~~~
 
 error[E0038]: the trait `A` cannot be made into an object
   --> $DIR/object-unsafe-trait-should-use-self.rs:3:13
@@ -36,7 +36,7 @@ LL |     fn f(a: B) -> B;
 help: you might have meant to use `Self` to refer to the implementing type
    |
 LL |     fn f(a: Self) -> Self;
-   |             ^^^^     ^^^^
+   |             ~~~~     ~~~~
 
 error[E0038]: the trait `B` cannot be made into an object
   --> $DIR/object-unsafe-trait-should-use-self.rs:8:13
@@ -54,11 +54,11 @@ LL |     fn f(a: B) -> B;
 help: consider turning `f` into a method by giving it a `&self` argument
    |
 LL |     fn f(&self, a: B) -> B;
-   |          ^^^^^^
+   |          ++++++
 help: alternatively, consider constraining `f` so it does not apply to trait objects
    |
 LL |     fn f(a: B) -> B where Self: Sized;
-   |                     ^^^^^^^^^^^^^^^^^
+   |                     +++++++++++++++++
 
 error: aborting due to 4 previous errors
 
index 4a53706f9772e0a761fa57fd2c66bc7e1422e1cb..74237e6e6c638ab3c02e86d8b871d8e02c701fb7 100644 (file)
@@ -25,15 +25,15 @@ LL |     fn bar(self: ()) {}
 help: consider turning `foo` into a method by giving it a `&self` argument
    |
 LL |     fn foo(&self) where Self: Other, { }
-   |            ^^^^^
+   |            +++++
 help: alternatively, consider constraining `foo` so it does not apply to trait objects
    |
 LL |     fn foo() where Self: Other, Self: Sized, { }
-   |                               ^^^^^^^^^^^^^
+   |                               +++++++++++++
 help: consider changing method `bar`'s `self` parameter to be `&self`
    |
 LL |     fn bar(self: &Self) {}
-   |                  ^^^^^
+   |                  ~~~~~
 
 error: aborting due to 2 previous errors
 
index d74076cbc9b8e1bad1564cffb12f3316214d1583..851073734515d7a92c488997f9ede9e909726d22 100644 (file)
@@ -18,9 +18,9 @@ LL | |     }.await
    = note: distinct uses of `impl Trait` result in different opaque types
 help: consider `await`ing on both `Future`s
    |
-LL |         thing_one().await
+LL ~         thing_one().await
 LL |     } else {
-LL |         thing_two().await
+LL ~         thing_two().await
    |
 
 error: aborting due to previous error
index 94766530091552c0f393824858ad88eb46066cfe..a9e540084e590445f0c78884006c1a0e696bf9b8 100644 (file)
@@ -7,7 +7,7 @@ LL |                 if selection.1.unwrap().contains(selection.0) {
 help: consider borrowing the `Option`'s content
    |
 LL |                 if selection.1.as_ref().unwrap().contains(selection.0) {
-   |                               ^^^^^^^^^
+   |                               +++++++++
 
 error[E0507]: cannot move out of `selection.1` which is behind a shared reference
   --> $DIR/option-content-move.rs:29:20
@@ -18,7 +18,7 @@ LL |                 if selection.1.unwrap().contains(selection.0) {
 help: consider borrowing the `Result`'s content
    |
 LL |                 if selection.1.as_ref().unwrap().contains(selection.0) {
-   |                               ^^^^^^^^^
+   |                               +++++++++
 
 error: aborting due to 2 previous errors
 
index 5919a6f7492058988705b4de0d2f85f846115d0a..bbeaa26a93a0befcc8d35f0afaa023a440ab011d 100644 (file)
@@ -10,7 +10,7 @@ LL | fn f(p: Path) { }
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL | fn f(p: &Path) { }
-   |         ^
+   |         +
 
 error: aborting due to previous error
 
index 1498f5ac93513c243bdfc9cb7fa94273918363fd..4f5106849d5eb7e5ba791f0bf5415d40536c27fc 100644 (file)
@@ -8,7 +8,7 @@ LL |     rb"abc";
 help: use `br` for a raw byte string
    |
 LL |     br"abc";
-   |     ^^
+   |     ~~
 
 error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `"abc"`
   --> $DIR/raw-byte-string-prefix.rs:6:7
index 7447cf87ce1680efd763600e7865e8a575630e6e..bfefc144698352f52940ca9ac964952dbf797010 100644 (file)
@@ -7,7 +7,7 @@ LL |     pub fn break() {}
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     pub fn r#break() {}
-   |            ^^^^^^^
+   |            ~~~~~~~
 
 error: expected identifier, found keyword `let`
   --> $DIR/raw-name-use-suggestion.rs:7:10
@@ -18,7 +18,7 @@ LL |     foo::let();
 help: you can escape reserved keywords to use them as identifiers
    |
 LL |     foo::r#let();
-   |          ^^^^^
+   |          ~~~~~
 
 error[E0425]: cannot find function `r#break` in this scope
   --> $DIR/raw-name-use-suggestion.rs:8:5
index 981f95749d3ba7c66ea45a91b6ef89a9a30fd037..618ccba0d3d12350852e02c2c7ffc4db9bb120ee 100644 (file)
@@ -7,7 +7,7 @@ LL |     let _ = vec![1, 2, 3].into_iter().collect::Vec<_>();
 help: surround the type parameters with angle brackets
    |
 LL |     let _ = vec![1, 2, 3].into_iter().collect::<Vec<_>>();
-   |                                                ^      ^
+   |                                                +      +
 
 error: generic parameters without surrounding angle brackets
   --> $DIR/recover-missing-turbofish-surrounding-angle-braket.rs:4:48
@@ -18,7 +18,7 @@ LL |     let _ = vec![1, 2, 3].into_iter().collect::Vec<_>>>>();
 help: surround the type parameters with angle brackets
    |
 LL |     let _ = vec![1, 2, 3].into_iter().collect::<Vec<_>>();
-   |                                                ^      ^
+   |                                                +      ~
 
 error: generic parameters without surrounding angle brackets
   --> $DIR/recover-missing-turbofish-surrounding-angle-braket.rs:6:48
@@ -29,7 +29,7 @@ LL |     let _ = vec![1, 2, 3].into_iter().collect::Vec<_>>>();
 help: surround the type parameters with angle brackets
    |
 LL |     let _ = vec![1, 2, 3].into_iter().collect::<Vec<_>>();
-   |                                                ^      ^
+   |                                                +      ~
 
 error: generic parameters without surrounding angle brackets
   --> $DIR/recover-missing-turbofish-surrounding-angle-braket.rs:8:48
@@ -40,7 +40,7 @@ LL |     let _ = vec![1, 2, 3].into_iter().collect::Vec<_>>();
 help: surround the type parameters with angle brackets
    |
 LL |     let _ = vec![1, 2, 3].into_iter().collect::<Vec<_>>();
-   |                                                ^      ^
+   |                                                +      ~
 
 error: aborting due to 4 previous errors
 
index 33af13d943f74d97d6fd393355c594eb0721b3b2..95a0cb192f33558a2ae8b06c9c0b9589221b09b2 100644 (file)
@@ -10,7 +10,7 @@ LL |     is_send(val);
 help: consider further restricting this bound
    |
 LL | fn use_impl_sync(val: impl Sync + std::marker::Send) {
-   |                                 ^^^^^^^^^^^^^^^^^^^
+   |                                 +++++++++++++++++++
 
 error[E0277]: `S` cannot be sent between threads safely
   --> $DIR/restrict-type-argument.rs:8:13
@@ -24,7 +24,7 @@ LL |     is_send(val);
 help: consider further restricting this bound
    |
 LL | fn use_where<S>(val: S) where S: Sync + std::marker::Send {
-   |                                       ^^^^^^^^^^^^^^^^^^^
+   |                                       +++++++++++++++++++
 
 error[E0277]: `S` cannot be sent between threads safely
   --> $DIR/restrict-type-argument.rs:12:13
@@ -38,7 +38,7 @@ LL |     is_send(val);
 help: consider further restricting this bound
    |
 LL | fn use_bound<S: Sync + std::marker::Send>(val: S) {
-   |                      ^^^^^^^^^^^^^^^^^^^
+   |                      +++++++++++++++++++
 
 error[E0277]: `S` cannot be sent between threads safely
   --> $DIR/restrict-type-argument.rs:20:13
@@ -52,7 +52,7 @@ LL |     is_send(val);
 help: consider further restricting this bound
    |
 LL |     Sync + std::marker::Send
-   |          ^^^^^^^^^^^^^^^^^^^
+   |          +++++++++++++++++++
 
 error[E0277]: `S` cannot be sent between threads safely
   --> $DIR/restrict-type-argument.rs:24:13
@@ -66,7 +66,7 @@ LL |     is_send(val);
 help: consider further restricting this bound
    |
 LL | fn use_bound_and_where<S: Sync>(val: S) where S: std::fmt::Debug + std::marker::Send {
-   |                                                                  ^^^^^^^^^^^^^^^^^^^
+   |                                                                  +++++++++++++++++++
 
 error[E0277]: `S` cannot be sent between threads safely
   --> $DIR/restrict-type-argument.rs:28:13
@@ -80,7 +80,7 @@ LL |     is_send(val);
 help: consider restricting type parameter `S`
    |
 LL | fn use_unbound<S: std::marker::Send>(val: S) {
-   |                 ^^^^^^^^^^^^^^^^^^^
+   |                 +++++++++++++++++++
 
 error: aborting due to 6 previous errors
 
index 888cd5e58abeca671718a7572b56fe0a53db8f53..cdc3f5e85d142825cb61035d86c2f930b4b03ad0 100644 (file)
@@ -8,7 +8,7 @@ LL | fn f1() -> &i32 { loop {} }
 help: consider using the `'static` lifetime
    |
 LL | fn f1() -> &'static i32 { loop {} }
-   |            ^^^^^^^^
+   |            ~~~~~~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/return-elided-lifetime.rs:8:14
@@ -20,7 +20,7 @@ LL | fn f1_() -> (&i32, &i32) { loop {} }
 help: consider using the `'static` lifetime
    |
 LL | fn f1_() -> (&'static i32, &i32) { loop {} }
-   |              ^^^^^^^^
+   |              ~~~~~~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/return-elided-lifetime.rs:8:20
@@ -32,7 +32,7 @@ LL | fn f1_() -> (&i32, &i32) { loop {} }
 help: consider using the `'static` lifetime
    |
 LL | fn f1_() -> (&i32, &'static i32) { loop {} }
-   |                    ^^^^^^^^
+   |                    ~~~~~~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/return-elided-lifetime.rs:12:26
@@ -44,7 +44,7 @@ LL | fn f2(a: i32, b: i32) -> &i32 { loop {} }
 help: consider using the `'static` lifetime
    |
 LL | fn f2(a: i32, b: i32) -> &'static i32 { loop {} }
-   |                          ^^^^^^^^
+   |                          ~~~~~~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/return-elided-lifetime.rs:14:28
@@ -56,7 +56,7 @@ LL | fn f2_(a: i32, b: i32) -> (&i32, &i32) { loop {} }
 help: consider using the `'static` lifetime
    |
 LL | fn f2_(a: i32, b: i32) -> (&'static i32, &i32) { loop {} }
-   |                            ^^^^^^^^
+   |                            ~~~~~~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/return-elided-lifetime.rs:14:34
@@ -68,7 +68,7 @@ LL | fn f2_(a: i32, b: i32) -> (&i32, &i32) { loop {} }
 help: consider using the `'static` lifetime
    |
 LL | fn f2_(a: i32, b: i32) -> (&i32, &'static i32) { loop {} }
-   |                                  ^^^^^^^^
+   |                                  ~~~~~~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/return-elided-lifetime.rs:19:17
@@ -80,7 +80,7 @@ LL | fn f3(s: &S) -> &i32 { loop {} }
 help: consider introducing a named lifetime parameter
    |
 LL | fn f3<'a>(s: &'a S) -> &'a i32 { loop {} }
-   |      ^^^^    ^^^^^     ^^^
+   |      ++++    ~~~~~     ~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/return-elided-lifetime.rs:21:26
@@ -92,7 +92,7 @@ LL | fn f3_(s: &S, t: &S) -> (&i32, &i32) { loop {} }
 help: consider introducing a named lifetime parameter
    |
 LL | fn f3_<'a>(s: &'a S, t: &'a S) -> (&'a i32, &i32) { loop {} }
-   |       ^^^^    ^^^^^     ^^^^^      ^^^
+   |       ++++    ~~~~~     ~~~~~      ~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/return-elided-lifetime.rs:21:32
@@ -104,7 +104,7 @@ LL | fn f3_(s: &S, t: &S) -> (&i32, &i32) { loop {} }
 help: consider introducing a named lifetime parameter
    |
 LL | fn f3_<'a>(s: &'a S, t: &'a S) -> (&i32, &'a i32) { loop {} }
-   |       ^^^^    ^^^^^     ^^^^^            ^^^
+   |       ++++    ~~~~~     ~~~~~            ~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/return-elided-lifetime.rs:25:42
@@ -121,7 +121,7 @@ LL | fn f4<'a, 'b>(a: &'a i32, b: &'b i32) -> &i32 { loop {} }
 help: consider using one of the available lifetimes here
    |
 LL | fn f4<'a, 'b>(a: &'a i32, b: &'b i32) -> &'lifetime i32 { loop {} }
-   |                                          ^^^^^^^^^^
+   |                                          ~~~~~~~~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/return-elided-lifetime.rs:27:44
@@ -138,7 +138,7 @@ LL | fn f4_<'a, 'b>(a: &'a i32, b: &'b i32) -> (&i32, &i32) { loop {} }
 help: consider using one of the available lifetimes here
    |
 LL | fn f4_<'a, 'b>(a: &'a i32, b: &'b i32) -> (&'lifetime i32, &i32) { loop {} }
-   |                                            ^^^^^^^^^^
+   |                                            ~~~~~~~~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/return-elided-lifetime.rs:27:50
@@ -155,7 +155,7 @@ LL | fn f4_<'a, 'b>(a: &'a i32, b: &'b i32) -> (&i32, &i32) { loop {} }
 help: consider using one of the available lifetimes here
    |
 LL | fn f4_<'a, 'b>(a: &'a i32, b: &'b i32) -> (&i32, &'lifetime i32) { loop {} }
-   |                                                  ^^^^^^^^^^
+   |                                                  ~~~~~~~~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/return-elided-lifetime.rs:31:35
@@ -167,7 +167,7 @@ LL | fn f5<'a>(a: &'a i32, b: &i32) -> &i32 { loop {} }
 help: consider using the `'a` lifetime
    |
 LL | fn f5<'a>(a: &'a i32, b: &i32) -> &'a i32 { loop {} }
-   |                                   ^^^
+   |                                   ~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/return-elided-lifetime.rs:33:37
@@ -179,7 +179,7 @@ LL | fn f5_<'a>(a: &'a i32, b: &i32) -> (&i32, &i32) { loop {} }
 help: consider using the `'a` lifetime
    |
 LL | fn f5_<'a>(a: &'a i32, b: &i32) -> (&'a i32, &i32) { loop {} }
-   |                                     ^^^
+   |                                     ~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/return-elided-lifetime.rs:33:43
@@ -191,7 +191,7 @@ LL | fn f5_<'a>(a: &'a i32, b: &i32) -> (&i32, &i32) { loop {} }
 help: consider using the `'a` lifetime
    |
 LL | fn f5_<'a>(a: &'a i32, b: &i32) -> (&i32, &'a i32) { loop {} }
-   |                                           ^^^
+   |                                           ~~~
 
 error: aborting due to 15 previous errors
 
index 2a237d61f50fe4d56fe6043468a62cdd9e52c5bd..449a61d48090cec206d6a704a4ebd4445861494a 100644 (file)
@@ -7,7 +7,7 @@ LL | struct Foo<'a>(&usize);
 help: consider using the `'a` lifetime
    |
 LL | struct Foo<'a>(&'a usize);
-   |                ^^^
+   |                ~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/return-without-lifetime.rs:5:34
@@ -19,7 +19,7 @@ LL | fn func1<'a>(_arg: &'a Thing) -> &() { unimplemented!() }
 help: consider using the `'a` lifetime
    |
 LL | fn func1<'a>(_arg: &'a Thing) -> &'a () { unimplemented!() }
-   |                                  ^^^
+   |                                  ~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/return-without-lifetime.rs:7:35
@@ -31,7 +31,7 @@ LL | fn func2<'a>(_arg: &Thing<'a>) -> &() { unimplemented!() }
 help: consider using the `'a` lifetime
    |
 LL | fn func2<'a>(_arg: &Thing<'a>) -> &'a () { unimplemented!() }
-   |                                   ^^^
+   |                                   ~~~
 
 error: aborting due to 3 previous errors
 
index 8107fd862122add18d66c9e36a87cce9eacfa20e..d5c49a477b028a2dfdcb02ef90629eea3b387b1e 100644 (file)
@@ -15,10 +15,10 @@ LL | |     };
    = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html
 help: store this in the heap by calling `Box::new`
    |
-LL |     let _x: Box<dyn Fn() -> Result<(), ()>> = Box::new(|| {
+LL ~     let _x: Box<dyn Fn() -> Result<(), ()>> = Box::new(|| {
 LL |         Err(())?;
 LL |         Ok(())
-LL |     });
+LL ~     });
    |
 
 error: aborting due to previous error
index 8384f952b684959af6f910cc523e20e42cbfbe5c..1f14ebae84127220c5e692af00cf2c399a7decc4 100644 (file)
@@ -11,16 +11,17 @@ LL |     pub fn new(inner: R) -> BufReader<R> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: consider removing the leading `&`-reference
    |
-LL |         let mut stream_reader = BufReader::new(stream);
-   |                                               --
+LL -         let mut stream_reader = BufReader::new(&stream);
+LL +         let mut stream_reader = BufReader::new(stream);
+   | 
 help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement
    |
 LL | fn issue_81421<T: Read + Write>(mut stream: T) where &T: std::io::Read {
-   |                                                ^^^^^^^^^^^^^^^^^^^^^^^
+   |                                                +++++++++++++++++++++++
 help: consider changing this borrow's mutability
    |
 LL |         let mut stream_reader = BufReader::new(&mut stream);
-   |                                                ^^^^
+   |                                                ~~~~
 
 error[E0599]: the method `read_until` exists for struct `BufReader<&T>`, but its trait bounds were not satisfied
   --> $DIR/suggest-change-mut.rs:16:23
index 7ef959053805be61b945ce9fe69e6fbf5be6914e..7161ca3903e613bdc7c7743a46df6f644d88725d 100644 (file)
@@ -7,7 +7,7 @@ LL |     let _v = || -> _ { [] };
 help: give this closure an explicit return type without `_` placeholders
    |
 LL |     let _v = || -> [_; 0] { [] };
-   |                    ^^^^^^
+   |                    ~~~~~~
 
 error: aborting due to previous error
 
index 2a8d7dd5b85dbd3878d10dbd950e3887ca4ff154..a7f5b58c4da768f439c4b754101ef59e1df138cc 100644 (file)
@@ -7,7 +7,7 @@ LL |     let _v = || { [] };
 help: give this closure an explicit return type without `_` placeholders
    |
 LL |     let _v = || -> [_; 0] { [] };
-   |                 ^^^^^^^^^
+   |                 +++++++++
 
 error: aborting due to previous error
 
index 67dc4d8fd69b257175c0cb50f94503ea4aa19224..eeec23e0da030fd08d52db678a6b94df385f1f2a 100644 (file)
@@ -7,7 +7,7 @@ LL |     let _v = || [];
 help: give this closure an explicit return type without `_` placeholders
    |
 LL |     let _v = || -> [_; 0] { [] };
-   |                 ^^^^^^^^^^^    ^
+   |                 +++++++++++    +
 
 error: aborting due to previous error
 
index df064f22f358450d0a52ccd36e089837060fc796..1a6032db0010a7a15a5029dab155f387e84b6c94 100644 (file)
@@ -9,7 +9,7 @@ LL | struct A<T, M: One<A=(), T>> {
 help: move the constraint after the generic argument
    |
 LL | struct A<T, M: One<T, A = ()>> {
-   |                   ^^^^^^^^^^^
+   |                   ~~~~~~~~~~~
 
 error: generic arguments must come before the first constraint
   --> $DIR/suggest-move-types.rs:33:43
@@ -22,7 +22,7 @@ LL | struct Al<'a, T, M: OneWithLifetime<A=(), T, 'a>> {
 help: move the constraint after the generic arguments
    |
 LL | struct Al<'a, T, M: OneWithLifetime<'a, T, A = ()>> {
-   |                                    ^^^^^^^^^^^^^^^
+   |                                    ~~~~~~~~~~~~~~~
 
 error: generic arguments must come before the first constraint
   --> $DIR/suggest-move-types.rs:40:46
@@ -35,7 +35,7 @@ LL | struct B<T, U, V, M: Three<A=(), B=(), C=(), T, U, V>> {
 help: move the constraints after the generic arguments
    |
 LL | struct B<T, U, V, M: Three<T, U, V, A = (), B = (), C = ()>> {
-   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: generic arguments must come before the first constraint
   --> $DIR/suggest-move-types.rs:48:71
@@ -48,7 +48,7 @@ LL | struct Bl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<A=(), B=(), C=(), T, U,
 help: move the constraints after the generic arguments
    |
 LL | struct Bl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<'a, 'b, 'c, T, U, V, A = (), B = (), C = ()>> {
-   |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: generic arguments must come before the first constraint
   --> $DIR/suggest-move-types.rs:57:28
@@ -61,7 +61,7 @@ LL | struct C<T, U, V, M: Three<T, A=(), B=(), C=(), U, V>> {
 help: move the constraints after the generic arguments
    |
 LL | struct C<T, U, V, M: Three<T, U, V, A = (), B = (), C = ()>> {
-   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: generic arguments must come before the first constraint
   --> $DIR/suggest-move-types.rs:65:53
@@ -74,7 +74,7 @@ LL | struct Cl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<T, 'a, A=(), B=(), C=()
 help: move the constraints after the generic arguments
    |
 LL | struct Cl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<'a, 'b, 'c, T, U, V, A = (), B = (), C = ()>> {
-   |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: generic arguments must come before the first constraint
   --> $DIR/suggest-move-types.rs:74:28
@@ -87,7 +87,7 @@ LL | struct D<T, U, V, M: Three<T, A=(), B=(), U, C=(), V>> {
 help: move the constraints after the generic arguments
    |
 LL | struct D<T, U, V, M: Three<T, U, V, A = (), B = (), C = ()>> {
-   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: generic arguments must come before the first constraint
   --> $DIR/suggest-move-types.rs:82:53
@@ -100,7 +100,7 @@ LL | struct Dl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<T, 'a, A=(), B=(), U, '
 help: move the constraints after the generic arguments
    |
 LL | struct Dl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<'a, 'b, 'c, T, U, V, A = (), B = (), C = ()>> {
-   |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0747]: type provided when a lifetime was expected
   --> $DIR/suggest-move-types.rs:33:43
index 28fef511e04b14a6d4cd8416ef268af1128b9635..0c91e2feed3ade40afa74bb159f13d3d30438d7a 100644 (file)
@@ -9,7 +9,7 @@ LL |     let _ = ||{}();
 help: if you meant to create this closure and immediately call it, surround the closure with parenthesis
    |
 LL |     let _ = (||{})();
-   |             ^    ^
+   |             +    +
 
 error: aborting due to previous error
 
index 7f4c80f50e2674121381be72fedbf67bee80e4a5..4255281d9a7ac9fbf4d64db0ebfd13913276a70f 100644 (file)
@@ -7,7 +7,7 @@ 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
@@ -18,7 +18,7 @@ LL |         str::from_utf8(bytes)
 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
 
index f785f7b84a76fae8bef31422b5d82344546c9e43..19fc772544d59883cc9f1c65ea996dc496e53796 100644 (file)
@@ -9,7 +9,7 @@ LL |         qux(x.func())
 help: consider constraining the associated type `<impl Trait as Trait>::A` to `usize`
    |
 LL |     fn foo<'a, T: Trait + 'a>(&self, _: impl Trait, x: impl Trait<A = usize>, _: T) {
-   |                                                                  ^^^^^^^^^^^
+   |                                                                  +++++++++++
 
 error[E0308]: mismatched types
   --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:17:13
@@ -22,7 +22,7 @@ LL |         qux(x.func())
 help: consider constraining the associated type `<T as Trait>::A` to `usize`
    |
 LL |     fn ban<T>(x: T) where T: Trait<A = usize> {
-   |                                   ^^^^^^^^^^^
+   |                                   +++++++++++
 
 error[E0308]: mismatched types
   --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:22:9
@@ -35,7 +35,7 @@ LL |     qux(x.func())
 help: consider constraining the associated type `<impl Trait as Trait>::A` to `usize`
    |
 LL | fn foo<'a, T: Trait + 'a>(_: impl Trait, x: impl Trait<A = usize>, _: T) {
-   |                                                       ^^^^^^^^^^^
+   |                                                       +++++++++++
 
 error[E0308]: mismatched types
   --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:26:9
@@ -48,7 +48,7 @@ LL |     qux(x.func())
 help: consider constraining the associated type `<T as Trait>::A` to `usize`
    |
 LL | fn bar<T: Trait<A = usize>>(x: T) {
-   |                ^^^^^^^^^^^
+   |                +++++++++++
 
 error[E0308]: mismatched types
   --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:30:9
@@ -61,7 +61,7 @@ LL |     qux(x.func())
 help: consider constraining the associated type `<impl Trait<i32> as Trait<i32>>::A` to `usize`
    |
 LL | fn foo2(x: impl Trait<i32, A = usize>) {
-   |                          ^^^^^^^^^^^
+   |                          +++++++++++
 
 error[E0308]: mismatched types
   --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:34:9
@@ -74,7 +74,7 @@ LL |     qux(x.func())
 help: consider constraining the associated type `<T as Trait<i32>>::A` to `usize`
    |
 LL | fn bar2<T: Trait<i32, A = usize>>(x: T) {
-   |                     ^^^^^^^^^^^
+   |                     +++++++++++
 
 error[E0308]: mismatched types
   --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:38:9
@@ -87,7 +87,7 @@ LL |     qux(x.func())
 help: consider constraining the associated type `<T as Trait>::A` to `usize`
    |
 LL | fn ban<T>(x: T) where T: Trait<A = usize> {
-   |                               ^^^^^^^^^^^
+   |                               +++++++++++
 
 error: aborting due to 7 previous errors
 
index e629f8f970d320d5e18617dd598f08913324250e..943cbcbc81a22f06f4d47b9d35cf5a9a847df7e8 100644 (file)
@@ -23,7 +23,7 @@ LL |     qux(x.func())
 help: consider constraining the associated type `<impl Trait as Trait>::A` to `usize`
    |
 LL | fn foo(_: impl Trait, x: impl Trait<A = usize>) {
-   |                                    ^^^^^^^^^^^
+   |                                    +++++++++++
 
 error[E0308]: mismatched types
   --> $DIR/trait-with-missing-associated-type-restriction.rs:18:9
@@ -36,7 +36,7 @@ LL |     qux(x.func())
 help: consider constraining the associated type `<T as Trait>::A` to `usize`
    |
 LL | fn bar<T: Trait<A = usize>>(x: T) {
-   |                ^^^^^^^^^^^
+   |                +++++++++++
 
 error[E0308]: mismatched types
   --> $DIR/trait-with-missing-associated-type-restriction.rs:22:9
@@ -49,7 +49,7 @@ LL |     qux(x.func())
 help: consider constraining the associated type `<impl Trait<i32> as Trait<i32>>::A` to `usize`
    |
 LL | fn foo2(x: impl Trait<i32, A = usize>) {
-   |                          ^^^^^^^^^^^
+   |                          +++++++++++
 
 error[E0308]: mismatched types
   --> $DIR/trait-with-missing-associated-type-restriction.rs:26:12
@@ -70,7 +70,7 @@ LL |     fn funq(&self) -> Self::A {}
 help: consider constraining the associated type `<T as Trait<i32>>::A` to `{integer}`
    |
 LL | fn bar2<T: Trait<i32, A = {integer}>>(x: T) {
-   |                     ^^^^^^^^^^^^^^^
+   |                     +++++++++++++++
 
 error[E0308]: mismatched types
   --> $DIR/trait-with-missing-associated-type-restriction.rs:27:9
@@ -83,7 +83,7 @@ LL |     qux(x.func())
 help: consider constraining the associated type `<T as Trait<i32>>::A` to `usize`
    |
 LL | fn bar2<T: Trait<i32, A = usize>>(x: T) {
-   |                     ^^^^^^^^^^^
+   |                     +++++++++++
 
 error[E0308]: mismatched types
   --> $DIR/trait-with-missing-associated-type-restriction.rs:31:9
@@ -113,7 +113,7 @@ LL |     qux(x.func())
 help: consider constraining the associated type `<T as Trait>::A` to `usize`
    |
 LL | fn ban<T>(x: T) where T: Trait<A = usize> {
-   |                               ^^^^^^^^^^^
+   |                               +++++++++++
 
 error: aborting due to 9 previous errors
 
index 4f7e18742e22e84ea67a1202c88066536bc51ea8..939285498fb6949faf391311ee6cb94141def259 100644 (file)
@@ -22,11 +22,11 @@ LL | |     }
 help: consider using a semicolon here
    |
 LL |         x?;
-   |           ^
+   |           +
 help: consider using a semicolon here
    |
 LL |     };
-   |      ^
+   |      +
 
 error: aborting due to 2 previous errors
 
index 8cbd8bf3f34587a50150fef108e3a6079e16cac2..55d8d1ab1bc06ff4e6077e91090486e02e2dbfd3 100644 (file)
@@ -9,7 +9,7 @@ LL | fn foo1(bar: str) {}
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL | fn foo1(bar: &str) {}
-   |              ^
+   |              +
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/unsized-function-parameter.rs:11:9
@@ -22,7 +22,7 @@ LL | fn foo2(_bar: str) {}
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL | fn foo2(_bar: &str) {}
-   |               ^
+   |               +
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/unsized-function-parameter.rs:17:9
@@ -35,7 +35,7 @@ LL | fn foo3(_: str) {}
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL | fn foo3(_: &str) {}
-   |            ^
+   |            +
 
 error: aborting due to 3 previous errors
 
index f1248643105eba7e30c2626ff3a9985ecf8b6610..5a158e5876a069a23049d6872a15ee22ca3a47ba 100644 (file)
@@ -27,7 +27,7 @@ LL |     i: Box<dyn T<usize, usize, usize, usize, B=usize>>,
 help: specify the associated types
    |
 LL |     i: Box<dyn T<usize, usize, A = usize, C = usize, B=usize>>,
-   |                                ^^^^^^^^^  ^^^^^^^^^
+   |                                ~~~~~~~~~  ~~~~~~~~~
 
 error: aborting due to 2 previous errors
 
index 7523a931dd58f172ae7fda97408de4ce92d18462..107af76413d3916b2dc69535b62eb39424c288c4 100644 (file)
@@ -12,7 +12,7 @@ LL | enum Quux<T> { Bar }
 help: add missing generic argument
    |
 LL | fn foo(c: Quux<T>) { assert!((false)); }
-   |           ^^^^^^^
+   |           ~~~~~~~
 
 error: aborting due to previous error
 
index cff0991072103d3fe9b0a2bceb8b32b718f886c0..422aa904e1d934692fe2288af4bf338f76354f39 100644 (file)
@@ -9,7 +9,7 @@ LL | fn f() -> isize { return g(); }
 help: you can convert a `usize` to an `isize` and panic if the converted value doesn't fit
    |
 LL | fn f() -> isize { return g().try_into().unwrap(); }
-   |                          ^^^^^^^^^^^^^^^^^^^^^^^
+   |                          ~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 69daa93412a3a40829586072f48a70ad13ad4cdf..480f442fedd2822c7156702e6fa4642ada40b702 100644 (file)
@@ -10,7 +10,7 @@ LL | ...ཽཾཿ྄ཱྀྀྂྃ྅྆྇ྈྉྊྋྌྍྎྏྐྑྒྒྷྔ
 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 _ = "ༀ༁༂༃༄༅༆༇༈༉༊་༌།༎༏༐༑༒༓༔༕༖༗༘༙༚༛༜༝༞༟༠༡༢༣༤༥༦༧༨༩༪༫༬༭༮༯༰༱༲༳༴༵༶༷༸༹༺༻༼༽༾༿ཀཁགགྷངཅཆཇ཈ཉཊཋཌཌྷཎཏཐདདྷནཔཕབབྷམཙཚཛཛྷཝཞཟའཡརལཤཥསཧཨཀྵཪཫཬ཭཮཯཰ཱཱཱིིུུྲྀཷླྀཹེཻོཽཾཿ྄ཱྀྀྂྃ྅྆྇ྈྉྊྋྌྍྎྏྐྑྒྒྷྔྕྖྗ྘ྙྚྛྜྜྷྞྟྠྡྡྷྣྤྥྦྦྷྨྩྪྫྫྷྭྮྯྰྱྲླྴྵྶྷྸྐྵྺྻྼ྽྾྿࿀࿁࿂࿃࿄࿅࿆࿇࿈࿉࿊࿋࿌࿍࿎࿏࿐࿑࿒࿓࿔࿕࿖࿗࿘࿙࿚"; let _a = unicode_is_fun.to_owned() + " really fun!";
-   |                                                                                                                                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                                                                                                                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 30163ab7978134fce8211bd2f949acf5bf4ea2fe..c2f176c4b46b2ab15b8e63f8f1f976be336b108d 100644 (file)
@@ -11,12 +11,13 @@ LL | impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {}
    = note: required because it appears within the type `(A, B)`
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, {}
-   |                                                   --
+LL - impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {}
+LL + impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, {}
+   | 
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | trait Trait<A: ?Sized> {}
-   |              ^^^^^^^^
+   |              ++++++++
 
 error[E0277]: the size for values of type `A` cannot be known at compilation time
   --> $DIR/unsized-bound.rs:2:30
@@ -29,8 +30,9 @@ LL | impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {}
    = note: only the last element of a tuple may have a dynamically sized type
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | impl<A, B> Trait<(A, B)> for (A, B) where B: ?Sized, {}
-   |                                          --
+LL - impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {}
+LL + impl<A, B> Trait<(A, B)> for (A, B) where B: ?Sized, {}
+   | 
 
 error[E0277]: the size for values of type `C` cannot be known at compilation time
   --> $DIR/unsized-bound.rs:5:31
@@ -46,12 +48,13 @@ LL | impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Size
    = note: required because it appears within the type `(A, B, C)`
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | impl<A, B: ?Sized, C> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
-   |                    --
+LL - impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
+LL + impl<A, B: ?Sized, C> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
+   | 
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | trait Trait<A: ?Sized> {}
-   |              ^^^^^^^^
+   |              ++++++++
 
 error[E0277]: the size for values of type `A` cannot be known at compilation time
   --> $DIR/unsized-bound.rs:5:52
@@ -64,8 +67,9 @@ LL | impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Size
    = note: only the last element of a tuple may have a dynamically sized type
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C)  {}
-   |                                                             --
+LL - impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
+LL + impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C)  {}
+   | 
 
 error[E0277]: the size for values of type `B` cannot be known at compilation time
   --> $DIR/unsized-bound.rs:5:52
@@ -78,8 +82,9 @@ LL | impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Size
    = note: only the last element of a tuple may have a dynamically sized type
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | impl<A, B, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
-   |         --
+LL - impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
+LL + impl<A, B, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
+   | 
 
 error[E0277]: the size for values of type `B` cannot be known at compilation time
   --> $DIR/unsized-bound.rs:10:28
@@ -94,12 +99,13 @@ LL | impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {}
    = note: required because it appears within the type `(A, B)`
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | impl<A: ?Sized, B> Trait2<(A, B)> for (A, B) {}
-   |                 --
+LL - impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {}
+LL + impl<A: ?Sized, B> Trait2<(A, B)> for (A, B) {}
+   | 
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | trait Trait2<A: ?Sized> {}
-   |               ^^^^^^^^
+   |               ++++++++
 
 error[E0277]: the size for values of type `A` cannot be known at compilation time
   --> $DIR/unsized-bound.rs:10:47
@@ -112,8 +118,9 @@ LL | impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {}
    = note: only the last element of a tuple may have a dynamically sized type
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | impl<A, B: ?Sized> Trait2<(A, B)> for (A, B) {}
-   |      --
+LL - impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {}
+LL + impl<A, B: ?Sized> Trait2<(A, B)> for (A, B) {}
+   | 
 
 error[E0277]: the size for values of type `A` cannot be known at compilation time
   --> $DIR/unsized-bound.rs:14:9
@@ -127,12 +134,13 @@ LL | impl<A> Trait3<A> for A where A: ?Sized {}
    |
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | impl<A> Trait3<A> for A  {}
-   |                        --
+LL - impl<A> Trait3<A> for A where A: ?Sized {}
+LL + impl<A> Trait3<A> for A  {}
+   | 
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | trait Trait3<A: ?Sized> {}
-   |               ^^^^^^^^
+   |               ++++++++
 
 error[E0277]: the size for values of type `A` cannot be known at compilation time
   --> $DIR/unsized-bound.rs:17:17
@@ -146,12 +154,13 @@ LL | impl<A: ?Sized> Trait4<A> for A {}
    |
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | impl<A> Trait4<A> for A {}
-   |      --
+LL - impl<A: ?Sized> Trait4<A> for A {}
+LL + impl<A> Trait4<A> for A {}
+   | 
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | trait Trait4<A: ?Sized> {}
-   |               ^^^^^^^^
+   |               ++++++++
 
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized-bound.rs:20:12
@@ -165,12 +174,13 @@ LL | impl<X, Y> Trait5<X, Y> for X where X: ?Sized {}
    |
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | impl<X, Y> Trait5<X, Y> for X  {}
-   |                              --
+LL - impl<X, Y> Trait5<X, Y> for X where X: ?Sized {}
+LL + impl<X, Y> Trait5<X, Y> for X  {}
+   | 
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | trait Trait5<A: ?Sized, B> {}
-   |               ^^^^^^^^
+   |               ++++++++
 
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized-bound.rs:23:20
@@ -184,12 +194,13 @@ LL | impl<X: ?Sized, Y> Trait6<X, Y> for X {}
    |
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | impl<X, Y> Trait6<X, Y> for X {}
-   |      --
+LL - impl<X: ?Sized, Y> Trait6<X, Y> for X {}
+LL + impl<X, Y> Trait6<X, Y> for X {}
+   | 
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | trait Trait6<A: ?Sized, B> {}
-   |               ^^^^^^^^
+   |               ++++++++
 
 error[E0277]: the size for values of type `Y` cannot be known at compilation time
   --> $DIR/unsized-bound.rs:26:12
@@ -203,12 +214,13 @@ LL | impl<X, Y> Trait7<X, Y> for X where Y: ?Sized {}
    |
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | impl<X, Y> Trait7<X, Y> for X  {}
-   |                              --
+LL - impl<X, Y> Trait7<X, Y> for X where Y: ?Sized {}
+LL + impl<X, Y> Trait7<X, Y> for X  {}
+   | 
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | trait Trait7<A, B: ?Sized> {}
-   |                  ^^^^^^^^
+   |                  ++++++++
 
 error[E0277]: the size for values of type `Y` cannot be known at compilation time
   --> $DIR/unsized-bound.rs:29:20
@@ -222,12 +234,13 @@ LL | impl<X, Y: ?Sized> Trait8<X, Y> for X {}
    |
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | impl<X, Y> Trait8<X, Y> for X {}
-   |         --
+LL - impl<X, Y: ?Sized> Trait8<X, Y> for X {}
+LL + impl<X, Y> Trait8<X, Y> for X {}
+   | 
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | trait Trait8<A, B: ?Sized> {}
-   |                  ^^^^^^^^
+   |                  ++++++++
 
 error: aborting due to 13 previous errors
 
index 110ca79908079c0c3da858d2b21cd61d42b91fdf..c9dad2ef896f6a0159d0ccaee85110b227d2af1a 100644 (file)
@@ -10,7 +10,7 @@ LL |     fn return_the_constrained_type(&self, x: X) -> ConstrainedStruct<X> {
 help: consider further restricting type parameter `X`
    |
 LL | trait InsufficientlyConstrainedGeneric<X=()> where X: std::marker::Copy {
-   |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                              ++++++++++++++++++++++++++
 
 error: aborting due to previous error
 
index 649ce72604e2de7977700b5b8dfd72c381d1ea1a..0fe1a79678da5cb568f486247eea2594d2bcbd18 100644 (file)
@@ -17,11 +17,11 @@ LL |         fn foo(&self) {}
 help: disambiguate the associated function for candidate #1
    |
 LL |     A::foo(&t);
-   |     ^^^^^^^^^^
+   |     ~~~~~~~~~~
 help: disambiguate the associated function for candidate #2
    |
 LL |     B::foo(&t);
-   |     ^^^^^^^^^^
+   |     ~~~~~~~~~~
 
 error: aborting due to previous error
 
index b07145f4d38f007887cd9ceb94603bf477f4426d..44b194cea402ac5cc4ebc851136b1ed5013c382e 100644 (file)
@@ -9,7 +9,7 @@ LL | trait B<T> = A<T>;
 help: consider restricting type parameter `T`
    |
 LL | trait B<T: Foo> = A<T>;
-   |          ^^^^^
+   |          +++++
 
 error: aborting due to previous error
 
index bfdd121012ae0491ac05b24c5751c849dc80c5e7..38b2e5ae9b9c0200d28f59311c6a56145429f619 100644 (file)
@@ -12,11 +12,11 @@ LL | pub trait ToString {
 help: constrain the associated type to `String`
    |
 LL | struct Foo<T> where T: Bar, T: Bar<Baz = String> {
-   |                             ^^^^^^^^^^^^^^^^^^^^
+   |                             ~~~~~~~~~~~~~~~~~~~~
 help: a trait with a similar name exists
    |
 LL | struct Foo<T> where T: Bar, <T as Bar>::Baz: ToString {
-   |                                              ^^^^^^^^
+   |                                              ~~~~~~~~
 
 error[E0404]: expected trait, found struct `String`
   --> $DIR/assoc_type_bound_with_struct.rs:9:54
@@ -32,11 +32,11 @@ LL | pub trait ToString {
 help: constrain the associated type to `String`
    |
 LL | struct Qux<'a, T> where T: Bar, &'a T: Bar<Baz = String> {
-   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                 ~~~~~~~~~~~~~~~~~~~~~~~~
 help: a trait with a similar name exists
    |
 LL | struct Qux<'a, T> where T: Bar, <&'a T as Bar>::Baz: ToString {
-   |                                                      ^^^^^^^^
+   |                                                      ~~~~~~~~
 
 error[E0404]: expected trait, found struct `String`
   --> $DIR/assoc_type_bound_with_struct.rs:13:45
@@ -52,11 +52,11 @@ LL | pub trait ToString {
 help: constrain the associated type to `String`
    |
 LL | fn foo<T: Bar>(_: T) where T: Bar<Baz = String> {
-   |                            ^^^^^^^^^^^^^^^^^^^^
+   |                            ~~~~~~~~~~~~~~~~~~~~
 help: a trait with a similar name exists
    |
 LL | fn foo<T: Bar>(_: T) where <T as Bar>::Baz: ToString {
-   |                                             ^^^^^^^^
+   |                                             ~~~~~~~~
 
 error[E0404]: expected trait, found struct `String`
   --> $DIR/assoc_type_bound_with_struct.rs:16:57
@@ -72,11 +72,11 @@ LL | pub trait ToString {
 help: constrain the associated type to `String`
    |
 LL | fn qux<'a, T: Bar>(_: &'a T) where &'a T: Bar<Baz = String> {
-   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                    ~~~~~~~~~~~~~~~~~~~~~~~~
 help: a trait with a similar name exists
    |
 LL | fn qux<'a, T: Bar>(_: &'a T) where <&'a T as Bar>::Baz: ToString {
-   |                                                         ^^^^^^^^
+   |                                                         ~~~~~~~~
 
 error: aborting due to 4 previous errors
 
index fd3999ae6fbeca92d9edcacbfed3794ebf0da4e2..1e9d151629f2fadd7d2659d583a7bb267c36902f 100644 (file)
@@ -7,7 +7,7 @@ LL |     1.bar::<T>();
 help: consider further restricting this bound
    |
 LL | fn foo<T:'static + std::marker::Send>() {
-   |                  ^^^^^^^^^^^^^^^^^^^
+   |                  +++++++++++++++++++
 
 error: aborting due to previous error
 
index e65b8989e0b1ec47f1c5e9517db88551e8af54e5..0bbf1bffda5101e8072e6de59ed3810a21a2208c 100644 (file)
@@ -6,7 +6,7 @@ LL | fn foo(_x: Foo + Send) {
    |
    = note: `#[warn(bare_trait_objects)]` on by default
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error[E0277]: the size for values of type `(dyn Foo + Send + 'static)` cannot be known at compilation time
   --> $DIR/not-on-bare-trait.rs:7:8
@@ -19,7 +19,7 @@ LL | fn foo(_x: Foo + Send) {
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL | fn foo(_x: &Foo + Send) {
-   |            ^
+   |            +
 
 error: aborting due to previous error; 1 warning emitted
 
index 951e974ad2677d84230de6b0198d3d30d9ecd21c..407a4f0ef1486bfa1df5f90b67fe485dd68c20fd 100644 (file)
@@ -45,8 +45,9 @@ LL | fn a() -> A + 'static {
    |           expected this type to be a trait...
 help: if you meant to use a type and not a trait here, remove the bounds
    |
-LL | fn a() -> A {
-   |           --
+LL - fn a() -> A + 'static {
+LL + fn a() -> A {
+   | 
 
 error[E0404]: expected trait, found enum `Result`
   --> $DIR/not-on-struct.rs:16:34
@@ -63,8 +64,9 @@ LL | fn b<'a,T,E>(iter: Iterator<Item=Result<T,E> + 'a>) {
    |                                  expected this type to be a trait...
 help: if you meant to use a type and not a trait here, remove the bounds
    |
-LL | fn b<'a,T,E>(iter: Iterator<Item=Result<T,E>>) {
-   |                                            --
+LL - fn b<'a,T,E>(iter: Iterator<Item=Result<T,E> + 'a>) {
+LL + fn b<'a,T,E>(iter: Iterator<Item=Result<T,E>>) {
+   | 
 
 error[E0404]: expected trait, found struct `A`
   --> $DIR/not-on-struct.rs:19:21
@@ -81,8 +83,9 @@ LL | fn c() -> 'static + A {
    |           ...because of this bound
 help: if you meant to use a type and not a trait here, remove the bounds
    |
-LL | fn c() -> A {
-   |          --
+LL - fn c() -> 'static + A {
+LL + fn c() -> A {
+   | 
 
 error[E0404]: expected trait, found enum `Result`
   --> $DIR/not-on-struct.rs:22:39
@@ -99,8 +102,9 @@ LL | fn d<'a,T,E>(iter: Iterator<Item='a + Result<T,E>>) {
    |                                  ...because of this bound
 help: if you meant to use a type and not a trait here, remove the bounds
    |
-LL | fn d<'a,T,E>(iter: Iterator<Item=Result<T,E>>) {
-   |                                 --
+LL - fn d<'a,T,E>(iter: Iterator<Item='a + Result<T,E>>) {
+LL + fn d<'a,T,E>(iter: Iterator<Item=Result<T,E>>) {
+   | 
 
 error[E0404]: expected trait, found struct `A`
   --> $DIR/not-on-struct.rs:25:21
@@ -117,8 +121,9 @@ LL | fn e() -> 'static + A + 'static {
    |                     expected this type to be a trait...
 help: if you meant to use a type and not a trait here, remove the bounds
    |
-LL | fn e() -> A {
-   |          ---
+LL - fn e() -> 'static + A + 'static {
+LL + fn e() -> A {
+   | 
 
 error[E0404]: expected trait, found enum `Result`
   --> $DIR/not-on-struct.rs:29:39
@@ -135,8 +140,9 @@ LL | fn f<'a,T,E>(iter: Iterator<Item='a + Result<T,E> + 'a>) {
    |                                       expected this type to be a trait...
 help: if you meant to use a type and not a trait here, remove the bounds
    |
-LL | fn f<'a,T,E>(iter: Iterator<Item=Result<T,E>>) {
-   |                                 --         --
+LL - fn f<'a,T,E>(iter: Iterator<Item='a + Result<T,E> + 'a>) {
+LL + fn f<'a,T,E>(iter: Iterator<Item=Result<T,E>>) {
+   | 
 
 error[E0404]: expected trait, found struct `Traitor`
   --> $DIR/not-on-struct.rs:35:11
@@ -155,12 +161,13 @@ LL | fn g() -> Traitor + 'static {
    |           expected this type to be a trait...
 help: if you meant to use a type and not a trait here, remove the bounds
    |
-LL | fn g() -> Traitor {
-   |                 --
+LL - fn g() -> Traitor + 'static {
+LL + fn g() -> Traitor {
+   | 
 help: a trait with a similar name exists
    |
 LL | fn g() -> Trait + 'static {
-   |           ^^^^^
+   |           ~~~~~
 
 error: aborting due to 11 previous errors
 
index 0c69e7b6feef6e265c6683f8b6f840ac50585237..cc09b80898cf19dd22715051b2a1533fca05c1a9 100644 (file)
@@ -10,7 +10,7 @@ LL | impl<T> Foo<T> {
 help: consider restricting type parameter `T`
    |
 LL | impl<T: Trait> Foo<T> {
-   |       ^^^^^^^
+   |       +++++++
 
 error[E0277]: the trait bound `isize: Trait` is not satisfied
   --> $DIR/on-structs-and-enums.rs:19:8
@@ -42,7 +42,7 @@ LL |     b: Foo<U>,
 help: consider restricting type parameter `U`
    |
 LL | struct Badness<U: Trait> {
-   |                 ^^^^^^^
+   |                 +++++++
 
 error[E0277]: the trait bound `V: Trait` is not satisfied
   --> $DIR/on-structs-and-enums.rs:31:21
@@ -56,7 +56,7 @@ LL |     EvenMoreBadness(Bar<V>),
 help: consider restricting type parameter `V`
    |
 LL | enum MoreBadness<V: Trait> {
-   |                   ^^^^^^^
+   |                   +++++++
 
 error[E0277]: the trait bound `i32: Trait` is not satisfied
   --> $DIR/on-structs-and-enums.rs:35:5
index 508a12d859a629b3838be8f2465babb97be8454d..bf2acd350aef9c63c2806e06ae573cceeddde7df 100644 (file)
@@ -10,7 +10,7 @@ LL |     type X = Self;
 help: consider further restricting this bound
    |
 LL | impl<T: Magic + std::marker::Sync> Magic for T {
-   |               ^^^^^^^^^^^^^^^^^^^
+   |               +++++++++++++++++++
 
 error[E0275]: overflow evaluating the requirement `*mut (): Magic`
   --> $DIR/two-traits.rs:20:5
index bc7b863ca4f5175392ef1a0451c994a5575e7e0e..fa8799bf7d8a19e0915919377cd4f19a16dd7f0d 100644 (file)
@@ -13,7 +13,7 @@ LL |     c.same_as(22)
 help: consider further restricting this bound
    |
 LL | fn with_trait<C:CompareToInts + CompareTo<i32>>(c: &C) -> bool {
-   |                               ^^^^^^^^^^^^^^^^
+   |                               ++++++++++++++++
 
 error[E0277]: the trait bound `dyn CompareToInts: CompareTo<i32>` is not satisfied
   --> $DIR/repeated-supertrait-ambig.rs:34:5
@@ -41,7 +41,7 @@ LL |     fn same_as(&self, t: T) -> bool;
 help: consider further restricting this bound
    |
 LL | fn with_ufcs2<C:CompareToInts + CompareTo<i32>>(c: &C) -> bool {
-   |                               ^^^^^^^^^^^^^^^^
+   |                               ++++++++++++++++
 
 error[E0277]: the trait bound `i64: CompareTo<i32>` is not satisfied
   --> $DIR/repeated-supertrait-ambig.rs:42:23
index 4807a0930e7d02e733b79d148bdbedde68410939..cb1128fe5c66912dd68d1478195b7a58d0010a64 100644 (file)
@@ -8,7 +8,7 @@ LL |     t.foo()
 help: the following trait defines an item `foo`, perhaps you need to restrict type parameter `T` with it:
    |
 LL | fn do_stuff<T: Foo + Bar>(t : T) {
-   |             ^^^^^^^^
+   |             ~~~~~~~~
 
 error: aborting due to previous error
 
index c91d1db4d764abc0ddba1a1bf711d17e0b336ed6..c7beb834b57f3f0331c49a130a11f9a483ce8f56 100644 (file)
@@ -14,11 +14,11 @@ LL |     fn map()
 help: consider turning `map` into a method by giving it a `&self` argument
    |
 LL |     fn map(&self)
-   |            ^^^^^
+   |            +++++
 help: alternatively, consider constraining `map` so it does not apply to trait objects
    |
 LL |     where for<'a> &'a mut [dyn Bar]:, Self: Sized ;
-   |                                     ^^^^^^^^^^^^^
+   |                                     +++++++++++++
 
 error: aborting due to previous error
 
index e63740c4ea928df9dc9a59faf8cfa7280735ef61..0150ff41303ae3439416b48a563c4c04298c5403 100644 (file)
@@ -20,11 +20,11 @@ LL | impl<T> DispatchFromDyn<Smaht<U, MISC>> for T {}
 help: a type parameter with a similar name exists
    |
 LL | impl<T> DispatchFromDyn<Smaht<T, MISC>> for T {}
-   |                               ^
+   |                               ~
 help: you might be missing a type parameter
    |
 LL | impl<T, U> DispatchFromDyn<Smaht<U, MISC>> for T {}
-   |       ^^^
+   |       +++
 
 error[E0412]: cannot find type `MISC` in this scope
   --> $DIR/issue-78372.rs:3:34
index 8d4813c453e17030cb349a56e33c90cf2a7b42a8..ccdace1957d39a209f7a648f7dd8625010636891 100644 (file)
@@ -7,7 +7,7 @@ LL |     test(22i32, 44i32);
 help: change the type of the numeric literal from `i32` to `u32`
    |
 LL |     test(22i32, 44u32);
-   |                 ^^^^^
+   |                 ~~~~~
 
 error: aborting due to previous error
 
index 6784689072e70220d76b8b3ce1f3843ceac65725..cf534d984c2d8eccf3a04e6f2b41b82214920de3 100644 (file)
@@ -16,11 +16,11 @@ LL |     fn foo();
 help: consider turning `foo` into a method by giving it a `&self` argument
    |
 LL |     fn foo(&self);
-   |            ^^^^^
+   |            +++++
 help: alternatively, consider constraining `foo` so it does not apply to trait objects
    |
 LL |     fn foo() where Self: Sized;
-   |              ^^^^^^^^^^^^^^^^^
+   |              +++++++++++++++++
 
 error[E0038]: the trait `Tr` cannot be made into an object
   --> $DIR/safety.rs:15:12
@@ -38,11 +38,11 @@ LL |     fn foo();
 help: consider turning `foo` into a method by giving it a `&self` argument
    |
 LL |     fn foo(&self);
-   |            ^^^^^
+   |            +++++
 help: alternatively, consider constraining `foo` so it does not apply to trait objects
    |
 LL |     fn foo() where Self: Sized;
-   |              ^^^^^^^^^^^^^^^^^
+   |              +++++++++++++++++
 
 error: aborting due to 2 previous errors
 
index 40f5fcbceaf0b0a5613e3eebc36a5b2c78cd27cf..22446522852cca63f3269b9f4fb65e783947ca6b 100644 (file)
@@ -32,7 +32,7 @@ LL | struct S<'a, T>(&'a u8, T);
 help: add missing generic argument
    |
 LL |     let _: S<'static, 'static, T>;
-   |                              ^^^
+   |                              +++
 
 error[E0224]: at least one trait is required for an object type
   --> $DIR/vs-lifetime.rs:14:14
index 6a641ed214dfa32769bedf17bdfb5cc630f344e8..049fffe165ab58a2fbdff5ebbc47766ddeb9adff 100644 (file)
@@ -9,7 +9,7 @@ LL |     a * b
 help: consider further restricting this bound
    |
 LL | fn foo<T: MyMul<f64, f64> + std::ops::Mul<Output = f64>>(a: &T, b: f64) -> f64 {
-   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                           +++++++++++++++++++++++++++++
 
 error: aborting due to previous error
 
index c34e3261fe185afb36b94bed5a8047b4b3f1cbce..a6b0837e7d4ed676a1549cc49e8cba4d9a77af44 100644 (file)
@@ -14,8 +14,9 @@ LL | pub const fn size_of<T>() -> usize {
    |
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn check<T: Iterator, U>() {
-   |                       --
+LL - fn check<T: Iterator, U: ?Sized>() {
+LL + fn check<T: Iterator, U>() {
+   | 
 
 error[E0277]: the size for values of type `U` cannot be known at compilation time
   --> $DIR/suggest-where-clause.rs:10:5
@@ -38,8 +39,9 @@ LL | struct Misc<T:?Sized>(T);
    |        ^^^^
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn check<T: Iterator, U>() {
-   |                       --
+LL - fn check<T: Iterator, U: ?Sized>() {
+LL + fn check<T: Iterator, U>() {
+   | 
 
 error[E0277]: the trait bound `u64: From<T>` is not satisfied
   --> $DIR/suggest-where-clause.rs:15:5
@@ -55,7 +57,7 @@ LL |     fn from(_: T) -> Self;
 help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement
    |
 LL | fn check<T: Iterator, U: ?Sized>() where u64: From<T> {
-   |                                    ^^^^^^^^^^^^^^^^^^
+   |                                    ++++++++++++++++++
 
 error[E0277]: the trait bound `u64: From<<T as Iterator>::Item>` is not satisfied
   --> $DIR/suggest-where-clause.rs:18:5
@@ -71,7 +73,7 @@ LL |     fn from(_: T) -> Self;
 help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement
    |
 LL | fn check<T: Iterator, U: ?Sized>() where u64: From<<T as Iterator>::Item> {
-   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                    ++++++++++++++++++++++++++++++++++++++
 
 error[E0277]: the trait bound `Misc<_>: From<T>` is not satisfied
   --> $DIR/suggest-where-clause.rs:23:5
index 6aaa8a4a90437947272c6a97a8cdea1f40b431c2..da647f16c3d563d2bb61cdb712e85abe31283973 100644 (file)
@@ -7,7 +7,7 @@ LL |     let _ = x as &dyn Bar<i32>; // FIXME: OK, eventually
 help: consider borrowing the value
    |
 LL |     let _ = &x as &dyn Bar<i32>; // FIXME: OK, eventually
-   |             ^
+   |             +
 
 error[E0605]: non-primitive cast: `&dyn Foo` as `&dyn Bar<u32>`
   --> $DIR/type-checking-test-1.rs:15:13
@@ -18,7 +18,7 @@ LL |     let _ = x as &dyn Bar<u32>; // FIXME: OK, eventually
 help: consider borrowing the value
    |
 LL |     let _ = &x as &dyn Bar<u32>; // FIXME: OK, eventually
-   |             ^
+   |             +
 
 error[E0277]: the trait bound `&dyn Foo: Bar<i32>` is not satisfied
   --> $DIR/type-checking-test-1.rs:12:13
@@ -45,7 +45,7 @@ LL |     let _ = x as &dyn Bar<_>; // Ambiguous
 help: consider borrowing the value
    |
 LL |     let _ = &x as &dyn Bar<_>; // Ambiguous
-   |             ^
+   |             +
 
 error[E0277]: the trait bound `&dyn Foo: Bar<_>` is not satisfied
   --> $DIR/type-checking-test-1.rs:21:13
@@ -64,7 +64,7 @@ LL |     let a = x as &dyn Bar<_>; // FIXME: OK, eventually
 help: consider borrowing the value
    |
 LL |     let a = &x as &dyn Bar<_>; // FIXME: OK, eventually
-   |             ^
+   |             +
 
 error[E0277]: the trait bound `&dyn Foo: Bar<u32>` is not satisfied
   --> $DIR/type-checking-test-1.rs:27:13
index a38f8a146043ef45d5beaa9615bc18ba3bad18cf..582eddc7aa0538a4dd898f11fce343275ee6d8c2 100644 (file)
@@ -7,7 +7,7 @@ LL |     let _ = x as &dyn Bar<i32>; // FIXME: OK, eventually
 help: consider borrowing the value
    |
 LL |     let _ = &x as &dyn Bar<i32>; // FIXME: OK, eventually
-   |             ^
+   |             +
 
 error[E0277]: the trait bound `&dyn Foo<u32>: Bar<i32>` is not satisfied
   --> $DIR/type-checking-test-2.rs:16:13
@@ -26,7 +26,7 @@ LL |     let _ = x as &dyn Bar<u32>; // Error
 help: consider borrowing the value
    |
 LL |     let _ = &x as &dyn Bar<u32>; // Error
-   |             ^
+   |             +
 
 error[E0277]: the trait bound `&dyn Foo<i32>: Bar<u32>` is not satisfied
   --> $DIR/type-checking-test-2.rs:22:13
@@ -45,7 +45,7 @@ LL |     let a = x as &dyn Bar<_>; // Ambiguous
 help: consider borrowing the value
    |
 LL |     let a = &x as &dyn Bar<_>; // Ambiguous
-   |             ^
+   |             +
 
 error[E0277]: the trait bound `&dyn Foo<u32>: Bar<_>` is not satisfied
   --> $DIR/type-checking-test-2.rs:28:13
index edb48b6625ee223865ddea1cdbf506f8ec7f307b..6508e6a6e767fdad2c234faedde8ce8165fac0cd 100644 (file)
@@ -10,7 +10,7 @@ LL |     B::get_x()
 help: you can convert an `i32` to a `u8` and panic if the converted value doesn't fit
    |
 LL |     B::get_x().try_into().unwrap()
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 38245010c781c9ee352329fab9713006cff6202d..94c51c5788a32604f8eb4a917e048659122abf5b 100644 (file)
@@ -33,8 +33,9 @@ LL | type Y where i32: Foo = ();
    = note: `#[warn(type_alias_bounds)]` on by default
 help: the clause will not be checked when the type alias is used, and should be removed
    |
-LL | type Y  = ();
-   |       --
+LL - type Y where i32: Foo = ();
+LL + type Y  = ();
+   | 
 
 warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
   --> $DIR/trivial-bounds-inconsistent.rs:22:19
index 0f3c14b1386e79bdc24d38e08f997e612c2d59d3..a00064c44d2dc2022edfc93113bab72881f934c5 100644 (file)
@@ -17,7 +17,7 @@ LL |     let try_result: Option<_> = try {
 help: use `!` to invoke the macro
    |
 LL |     let try_result: Option<_> = try! {
-   |                                    ^
+   |                                    +
 
 error: aborting due to 2 previous errors
 
index 9d833ef5ed9fb50cba6d1a66a7c8144017b973d7..c7dde7eeac33edc3f059db4262b503d63c908902 100644 (file)
@@ -8,7 +8,7 @@ LL |     Ok(try!());
 help: you can still access the deprecated `try!()` macro using the "raw identifier" syntax
    |
 LL |     Ok(r#try!());
-   |        ^^
+   |        ++
 
 error: use of deprecated `try` macro
   --> $DIR/try-macro-suggestion.rs:4:8
@@ -19,12 +19,13 @@ LL |     Ok(try!(Ok(())))
    = note: in the 2018 edition `try` is a reserved keyword, and the `try!()` macro is deprecated
 help: you can use the `?` operator instead
    |
-LL |     Ok(Ok(())?)
-   |       --     ^
+LL -     Ok(try!(Ok(())))
+LL +     Ok(Ok(())?)
+   | 
 help: alternatively, you can still access the deprecated `try!()` macro using the "raw identifier" syntax
    |
 LL |     Ok(r#try!(Ok(())))
-   |        ^^
+   |        ++
 
 error: aborting due to 2 previous errors
 
index f9974acfb7071c2d2a359d8319b69d333b985cc1..ac1027ff34a131d47b0cb248a30ec5646f2fbdfa 100644 (file)
@@ -16,7 +16,7 @@ LL |     identity_u16(y);
 help: you can convert an `i32` to a `u16` and panic if the converted value doesn't fit
    |
 LL |     identity_u16(y.try_into().unwrap());
-   |                  ^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/tutorial-suffix-inference-test.rs:21:18
@@ -27,7 +27,7 @@ LL |     identity_u16(a);
 help: you can convert an `isize` to a `u16` and panic if the converted value doesn't fit
    |
 LL |     identity_u16(a.try_into().unwrap());
-   |                  ^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 3 previous errors
 
index f80abade0fd54d18c2ce0b4c13fae6026a8045ce..2e12b768f706693e3251b42c0082ffaca13d9402 100644 (file)
@@ -30,7 +30,7 @@ LL |     Alias::Unit();
 help: `Alias::Unit` is a unit variant, you need to write it without the parenthesis
    |
 LL |     Alias::Unit;
-   |     ^^^^^^^^^^^
+   |     ~~~~~~~~~~~
 
 error[E0164]: expected tuple struct or tuple variant, found unit variant `Alias::Unit`
   --> $DIR/incorrect-variant-form-through-alias-caught.rs:17:9
diff --git a/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.full_tait.stderr b/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.full_tait.stderr
new file mode 100644 (file)
index 0000000..3ba04af
--- /dev/null
@@ -0,0 +1,23 @@
+warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/bounds-are-checked-2.rs:6:32
+   |
+LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
+   |                                ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
+
+error[E0277]: the trait bound `T: Clone` is not satisfied
+  --> $DIR/bounds-are-checked-2.rs:9:13
+   |
+LL | type X<T> = impl Clone;
+   |             ^^^^^^^^^^ the trait `Clone` is not implemented for `T`
+   |
+help: consider restricting type parameter `T`
+   |
+LL | type X<T: std::clone::Clone> = impl Clone;
+   |         +++++++++++++++++++
+
+error: aborting due to previous error; 1 warning emitted
+
+For more information about this error, try `rustc --explain E0277`.
index c1f58aa6de6636806332de891339c741f1660027..5ee7c72bf730de632565a16d9baede3512ef04f9 100644 (file)
@@ -7,7 +7,7 @@ LL | type X<T> = impl Clone;
 help: consider restricting type parameter `T`
    |
 LL | type X<T: std::clone::Clone> = impl Clone;
-   |         ^^^^^^^^^^^^^^^^^^^
+   |         +++++++++++++++++++
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.full_tait.stderr
new file mode 100644 (file)
index 0000000..918121c
--- /dev/null
@@ -0,0 +1,48 @@
+warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/generic_duplicate_param_use5.rs:3:32
+   |
+LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
+   |                                ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
+
+error: concrete type differs from previous defining opaque type use
+  --> $DIR/generic_duplicate_param_use5.rs:19:1
+   |
+LL | fn three<T: Debug, U: Debug>(t: T, u: U) -> Two<T, U> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(T, U)`, got `(U, T)`
+   |
+note: previous use here
+  --> $DIR/generic_duplicate_param_use5.rs:15:1
+   |
+LL | fn two<T: Debug, U: Debug>(t: T, u: U) -> Two<T, U> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0277]: `T` doesn't implement `Debug`
+  --> $DIR/generic_duplicate_param_use5.rs:11:18
+   |
+LL | type Two<T, U> = impl Debug;
+   |                  ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |
+   = note: required because of the requirements on the impl of `Debug` for `(T, U)`
+help: consider restricting type parameter `T`
+   |
+LL | type Two<T: std::fmt::Debug, U> = impl Debug;
+   |           +++++++++++++++++
+
+error[E0277]: `U` doesn't implement `Debug`
+  --> $DIR/generic_duplicate_param_use5.rs:11:18
+   |
+LL | type Two<T, U> = impl Debug;
+   |                  ^^^^^^^^^^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |
+   = note: required because of the requirements on the impl of `Debug` for `(T, U)`
+help: consider restricting type parameter `U`
+   |
+LL | type Two<T, U: std::fmt::Debug> = impl Debug;
+   |              +++++++++++++++++
+
+error: aborting due to 3 previous errors; 1 warning emitted
+
+For more information about this error, try `rustc --explain E0277`.
index cb43b897cf9be0bab78496f031949c38e11d0e7b..6cc6b35668c94ab781822129f5e4951f67dfd7d2 100644 (file)
@@ -20,7 +20,7 @@ LL | type Two<T, U> = impl Debug;
 help: consider restricting type parameter `T`
    |
 LL | type Two<T: std::fmt::Debug, U> = impl Debug;
-   |           ^^^^^^^^^^^^^^^^^
+   |           +++++++++++++++++
 
 error[E0277]: `U` doesn't implement `Debug`
   --> $DIR/generic_duplicate_param_use5.rs:8:18
@@ -32,7 +32,7 @@ LL | type Two<T, U> = impl Debug;
 help: consider restricting type parameter `U`
    |
 LL | type Two<T, U: std::fmt::Debug> = impl Debug;
-   |              ^^^^^^^^^^^^^^^^^
+   |              +++++++++++++++++
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.full_tait.stderr
new file mode 100644 (file)
index 0000000..394b428
--- /dev/null
@@ -0,0 +1,36 @@
+warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/generic_duplicate_param_use6.rs:3:32
+   |
+LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
+   |                                ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
+
+error: concrete type differs from previous defining opaque type use
+  --> $DIR/generic_duplicate_param_use6.rs:18:1
+   |
+LL | fn three<T: Copy + Debug, U: Debug>(t: T, u: U) -> Two<T, U> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(T, T)`, got `(U, T)`
+   |
+note: previous use here
+  --> $DIR/generic_duplicate_param_use6.rs:14:1
+   |
+LL | fn two<T: Copy + Debug, U: Debug>(t: T, u: U) -> Two<T, U> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0277]: `T` doesn't implement `Debug`
+  --> $DIR/generic_duplicate_param_use6.rs:11:18
+   |
+LL | type Two<T, U> = impl Debug;
+   |                  ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |
+   = note: required because of the requirements on the impl of `Debug` for `(T, T)`
+help: consider restricting type parameter `T`
+   |
+LL | type Two<T: std::fmt::Debug, U> = impl Debug;
+   |           +++++++++++++++++
+
+error: aborting due to 2 previous errors; 1 warning emitted
+
+For more information about this error, try `rustc --explain E0277`.
index 509da2320e862cef301bf4cfd4cd5df439d116c1..e7520988e34bd2f90fc5dfa0d0b6df455f615b1a 100644 (file)
@@ -20,7 +20,7 @@ LL | type Two<T, U> = impl Debug;
 help: consider restricting type parameter `T`
    |
 LL | type Two<T: std::fmt::Debug, U> = impl Debug;
-   |           ^^^^^^^^^^^^^^^^^
+   |           +++++++++++++++++
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.full_tait.stderr
new file mode 100644 (file)
index 0000000..8c6ea3b
--- /dev/null
@@ -0,0 +1,36 @@
+warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/generic_duplicate_param_use8.rs:3:32
+   |
+LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
+   |                                ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
+
+error: concrete type differs from previous defining opaque type use
+  --> $DIR/generic_duplicate_param_use8.rs:17:1
+   |
+LL | fn three<T: Debug, U: Debug>(_: T, u: U) -> Two<T, U> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(T, u32)`, got `(U, u32)`
+   |
+note: previous use here
+  --> $DIR/generic_duplicate_param_use8.rs:13:1
+   |
+LL | fn two<T: Debug, U: Debug>(t: T, _: U) -> Two<T, U> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0277]: `T` doesn't implement `Debug`
+  --> $DIR/generic_duplicate_param_use8.rs:10:18
+   |
+LL | type Two<T, U> = impl Debug;
+   |                  ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |
+   = note: required because of the requirements on the impl of `Debug` for `(T, u32)`
+help: consider restricting type parameter `T`
+   |
+LL | type Two<T: std::fmt::Debug, U> = impl Debug;
+   |           +++++++++++++++++
+
+error: aborting due to 2 previous errors; 1 warning emitted
+
+For more information about this error, try `rustc --explain E0277`.
index a09f2506258fb14288e30f4f69a038095b829672..44bdbdc95cc2638aaf3cdb2139400e8a15d0aa4f 100644 (file)
@@ -20,7 +20,7 @@ LL | type Two<T, U> = impl Debug;
 help: consider restricting type parameter `T`
    |
 LL | type Two<T: std::fmt::Debug, U> = impl Debug;
-   |           ^^^^^^^^^^^^^^^^^
+   |           +++++++++++++++++
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.full_tait.stderr
new file mode 100644 (file)
index 0000000..d0176b1
--- /dev/null
@@ -0,0 +1,60 @@
+warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/generic_duplicate_param_use9.rs:3:32
+   |
+LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
+   |                                ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
+
+error: concrete type differs from previous defining opaque type use
+  --> $DIR/generic_duplicate_param_use9.rs:24:1
+   |
+LL | fn three<T: Debug, U: Debug>(t: T, u: U) -> Two<T, U> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(A, B, <A as Foo>::Bar)`, got `(A, B, i32)`
+   |
+note: previous use here
+  --> $DIR/generic_duplicate_param_use9.rs:20:1
+   |
+LL | fn two<T: Debug + Foo, U: Debug>(t: T, u: U) -> Two<T, U> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0277]: the trait bound `A: Foo` is not satisfied in `(A, B, <A as Foo>::Bar)`
+  --> $DIR/generic_duplicate_param_use9.rs:10:18
+   |
+LL | type Two<A, B> = impl Debug;
+   |                  ^^^^^^^^^^ within `(A, B, <A as Foo>::Bar)`, the trait `Foo` is not implemented for `A`
+   |
+   = note: required because it appears within the type `(A, B, <A as Foo>::Bar)`
+help: consider restricting type parameter `A`
+   |
+LL | type Two<A: Foo, B> = impl Debug;
+   |           +++++
+
+error[E0277]: `A` doesn't implement `Debug`
+  --> $DIR/generic_duplicate_param_use9.rs:10:18
+   |
+LL | type Two<A, B> = impl Debug;
+   |                  ^^^^^^^^^^ `A` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |
+   = note: required because of the requirements on the impl of `Debug` for `(A, B, <A as Foo>::Bar)`
+help: consider restricting type parameter `A`
+   |
+LL | type Two<A: std::fmt::Debug, B> = impl Debug;
+   |           +++++++++++++++++
+
+error[E0277]: `B` doesn't implement `Debug`
+  --> $DIR/generic_duplicate_param_use9.rs:10:18
+   |
+LL | type Two<A, B> = impl Debug;
+   |                  ^^^^^^^^^^ `B` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |
+   = note: required because of the requirements on the impl of `Debug` for `(A, B, <A as Foo>::Bar)`
+help: consider restricting type parameter `B`
+   |
+LL | type Two<A, B: std::fmt::Debug> = impl Debug;
+   |              +++++++++++++++++
+
+error: aborting due to 4 previous errors; 1 warning emitted
+
+For more information about this error, try `rustc --explain E0277`.
index 68a30820951fa0533408b30893d980eb775b6ce9..a8eb53a50e38bb33d99f2256d7c3d58739878055 100644 (file)
@@ -20,7 +20,7 @@ LL | type Two<A, B> = impl Debug;
 help: consider restricting type parameter `A`
    |
 LL | type Two<A: Foo, B> = impl Debug;
-   |           ^^^^^
+   |           +++++
 
 error[E0277]: `A` doesn't implement `Debug`
   --> $DIR/generic_duplicate_param_use9.rs:7:18
@@ -32,7 +32,7 @@ LL | type Two<A, B> = impl Debug;
 help: consider restricting type parameter `A`
    |
 LL | type Two<A: std::fmt::Debug, B> = impl Debug;
-   |           ^^^^^^^^^^^^^^^^^
+   |           +++++++++++++++++
 
 error[E0277]: `B` doesn't implement `Debug`
   --> $DIR/generic_duplicate_param_use9.rs:7:18
@@ -44,7 +44,7 @@ LL | type Two<A, B> = impl Debug;
 help: consider restricting type parameter `B`
    |
 LL | type Two<A, B: std::fmt::Debug> = impl Debug;
-   |              ^^^^^^^^^^^^^^^^^
+   |              +++++++++++++++++
 
 error: aborting due to 4 previous errors
 
index 84f48cd6c0d202228ceb4916811722ac9887180e..f4e1de8e50f688399b52757f244d6c5200f17405 100644 (file)
@@ -19,7 +19,7 @@ LL | type WrongGeneric<T> = impl 'static;
            found opaque type `impl Sized`
 
 error[E0310]: the parameter type `T` may not live long enough
-  --> $DIR/generic_type_does_not_live_long_enough.rs:13:30
+  --> $DIR/generic_type_does_not_live_long_enough.rs:12:30
    |
 LL | fn wrong_generic<T>(t: T) -> WrongGeneric<T> {
    |                              ^^^^^^^^^^^^^^^
index 9c6b93b7ba0405c111e4cae57631b155e95ee03d..78d25e30e0382eba41de11a042664471784ca8a2 100644 (file)
@@ -7,9 +7,9 @@ fn main() {
 }
 
 type WrongGeneric<T> = impl 'static;
-//~^ ERROR the parameter type `T` may not live long enough
-//~| ERROR: at least one trait must be specified
+//~^ ERROR: at least one trait must be specified
 
 fn wrong_generic<T>(t: T) -> WrongGeneric<T> {
+    //~^ ERROR the parameter type `T` may not live long enough
     t
 }
index 18d8daa05e63d168fb413a3ca948c39316897749..568784372e5191db73218523175ccec67dafc72c 100644 (file)
@@ -19,13 +19,12 @@ LL | type WrongGeneric<T> = impl 'static;
            found opaque type `impl Sized`
 
 error[E0310]: the parameter type `T` may not live long enough
-  --> $DIR/generic_type_does_not_live_long_enough.rs:9:24
+  --> $DIR/generic_type_does_not_live_long_enough.rs:12:30
    |
-LL | type WrongGeneric<T> = impl 'static;
-   |                        ^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
-...
 LL | fn wrong_generic<T>(t: T) -> WrongGeneric<T> {
-   |                  - help: consider adding an explicit lifetime bound...: `T: 'static`
+   |                  -           ^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
+   |                  |
+   |                  help: consider adding an explicit lifetime bound...: `T: 'static`
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_underconstrained.full_tait.stderr
new file mode 100644 (file)
index 0000000..74d5c0c
--- /dev/null
@@ -0,0 +1,32 @@
+error: at least one trait must be specified
+  --> $DIR/generic_underconstrained.rs:9:35
+   |
+LL | type Underconstrained<T: Trait> = impl 'static;
+   |                                   ^^^^^^^^^^^^
+
+warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/generic_underconstrained.rs:3:32
+   |
+LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
+   |                                ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
+
+error[E0277]: the trait bound `T: Trait` is not satisfied
+  --> $DIR/generic_underconstrained.rs:13:31
+   |
+LL | type Underconstrained<T: Trait> = impl 'static;
+   |                          ----- required by this bound in `Underconstrained`
+...
+LL | fn underconstrain<T>(_: T) -> Underconstrained<T> {
+   |                               ^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `T`
+   |
+help: consider restricting type parameter `T`
+   |
+LL | fn underconstrain<T: Trait>(_: T) -> Underconstrained<T> {
+   |                    +++++++
+
+error: aborting due to 2 previous errors; 1 warning emitted
+
+For more information about this error, try `rustc --explain E0277`.
index cefc5d99b379ed68381731bfcb85f0817b527d22..c2671f7ae605daef13359e41aa24ab64c4cbbd6a 100644 (file)
@@ -16,7 +16,7 @@ LL | fn underconstrain<T>(_: T) -> Underconstrained<T> {
 help: consider restricting type parameter `T`
    |
 LL | fn underconstrain<T: Trait>(_: T) -> Underconstrained<T> {
-   |                    ^^^^^^^
+   |                    +++++++
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained2.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_underconstrained2.full_tait.stderr
new file mode 100644 (file)
index 0000000..348563b
--- /dev/null
@@ -0,0 +1,52 @@
+error: at least one trait must be specified
+  --> $DIR/generic_underconstrained2.rs:8:45
+   |
+LL | type Underconstrained<T: std::fmt::Debug> = impl 'static;
+   |                                             ^^^^^^^^^^^^
+
+error: at least one trait must be specified
+  --> $DIR/generic_underconstrained2.rs:17:46
+   |
+LL | type Underconstrained2<T: std::fmt::Debug> = impl 'static;
+   |                                              ^^^^^^^^^^^^
+
+warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/generic_underconstrained2.rs:3:32
+   |
+LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
+   |                                ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
+
+error[E0277]: `U` doesn't implement `Debug`
+  --> $DIR/generic_underconstrained2.rs:12:33
+   |
+LL | type Underconstrained<T: std::fmt::Debug> = impl 'static;
+   |                          --------------- required by this bound in `Underconstrained`
+...
+LL | fn underconstrained<U>(_: U) -> Underconstrained<U> {
+   |                                 ^^^^^^^^^^^^^^^^^^^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |
+help: consider restricting type parameter `U`
+   |
+LL | fn underconstrained<U: std::fmt::Debug>(_: U) -> Underconstrained<U> {
+   |                      +++++++++++++++++
+
+error[E0277]: `V` doesn't implement `Debug`
+  --> $DIR/generic_underconstrained2.rs:21:43
+   |
+LL | type Underconstrained2<T: std::fmt::Debug> = impl 'static;
+   |                           --------------- required by this bound in `Underconstrained2`
+...
+LL | fn underconstrained2<U, V>(_: U, _: V) -> Underconstrained2<V> {
+   |                                           ^^^^^^^^^^^^^^^^^^^^ `V` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |
+help: consider restricting type parameter `V`
+   |
+LL | fn underconstrained2<U, V: std::fmt::Debug>(_: U, _: V) -> Underconstrained2<V> {
+   |                          +++++++++++++++++
+
+error: aborting due to 4 previous errors; 1 warning emitted
+
+For more information about this error, try `rustc --explain E0277`.
index 8bba62a913e114cc6eed413aa2cd12e74ab71cc9..3213b26456dc40ba494e7c7691b754b24a56edae 100644 (file)
@@ -22,7 +22,7 @@ LL | fn underconstrained<U>(_: U) -> Underconstrained<U> {
 help: consider restricting type parameter `U`
    |
 LL | fn underconstrained<U: std::fmt::Debug>(_: U) -> Underconstrained<U> {
-   |                      ^^^^^^^^^^^^^^^^^
+   |                      +++++++++++++++++
 
 error[E0277]: `V` doesn't implement `Debug`
   --> $DIR/generic_underconstrained2.rs:18:43
@@ -36,7 +36,7 @@ LL | fn underconstrained2<U, V>(_: U, _: V) -> Underconstrained2<V> {
 help: consider restricting type parameter `V`
    |
 LL | fn underconstrained2<U, V: std::fmt::Debug>(_: U, _: V) -> Underconstrained2<V> {
-   |                          ^^^^^^^^^^^^^^^^^
+   |                          +++++++++++++++++
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/type-alias-impl-trait/issue-52843.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-52843.full_tait.stderr
new file mode 100644 (file)
index 0000000..16b1830
--- /dev/null
@@ -0,0 +1,23 @@
+warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/issue-52843.rs:3:32
+   |
+LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
+   |                                ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
+
+error[E0277]: the trait bound `T: Default` is not satisfied
+  --> $DIR/issue-52843.rs:6:15
+   |
+LL | type Foo<T> = impl Default;
+   |               ^^^^^^^^^^^^ the trait `Default` is not implemented for `T`
+   |
+help: consider restricting type parameter `T`
+   |
+LL | type Foo<T: std::default::Default> = impl Default;
+   |           +++++++++++++++++++++++
+
+error: aborting due to previous error; 1 warning emitted
+
+For more information about this error, try `rustc --explain E0277`.
index 8718a57d9d4f363b5b1218480f11f529e30a6971..2463ed9c71a61c3818ee41b8f206bb7c558cd962 100644 (file)
@@ -7,7 +7,7 @@ LL | type Foo<T> = impl Default;
 help: consider restricting type parameter `T`
    |
 LL | type Foo<T: std::default::Default> = impl Default;
-   |           ^^^^^^^^^^^^^^^^^^^^^^^
+   |           +++++++++++++++++++++++
 
 error: aborting due to previous error
 
index a4ccae4eb7ed99e7b5b49de3479f78aa5db2f44b..8c9cb742fac91f12814c64af1ed4806180b25a04 100644 (file)
@@ -10,29 +10,5 @@ error: higher-ranked subtype error
 LL |         |x| x
    |         ^^^^^
 
-error[E0308]: mismatched types
-  --> $DIR/issue-57611-trait-alias.rs:17:16
-   |
-LL |     type Bar = impl Baz<Self, Self>;
-   |                ^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
-   |
-   = note: expected type `for<'r> Fn<(&'r X,)>`
-              found type `Fn<(&'static X,)>`
-note: this closure does not fulfill the lifetime requirements
-  --> $DIR/issue-57611-trait-alias.rs:21:9
-   |
-LL |         |x| x
-   |         ^^^^^
-
-error: implementation of `FnOnce` is not general enough
-  --> $DIR/issue-57611-trait-alias.rs:17:16
-   |
-LL |     type Bar = impl Baz<Self, Self>;
-   |                ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
-   |
-   = note: closure with signature `fn(&'static X) -> &'static X` must implement `FnOnce<(&'0 X,)>`, for any lifetime `'0`...
-   = note: ...but it actually implements `FnOnce<(&'static X,)>`
-
-error: aborting due to 4 previous errors
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0308`.
index a55fbf9c48a5776a95728c8ca8a66535f22f227d..625e46b6bc0122b4ed5e1d74367e150e5e2595dc 100644 (file)
@@ -15,9 +15,9 @@ trait Foo {
 
 impl Foo for X {
     type Bar = impl Baz<Self, Self>;
-    //~^ ERROR implementation of `FnOnce` is not general enough
 
     fn bar(&self) -> Self::Bar {
+        //~^ ERROR implementation of `FnOnce` is not general enough
         |x| x
     }
 }
index f87beb66d995e6fbd31d11f627b0feeb5cd78893..54d237159d80b56fd0edb903825ec19682ab342e 100644 (file)
@@ -1,8 +1,8 @@
 error: implementation of `FnOnce` is not general enough
-  --> $DIR/issue-57611-trait-alias.rs:17:16
+  --> $DIR/issue-57611-trait-alias.rs:19:22
    |
-LL |     type Bar = impl Baz<Self, Self>;
-   |                ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
+LL |     fn bar(&self) -> Self::Bar {
+   |                      ^^^^^^^^^ implementation of `FnOnce` is not general enough
    |
    = note: closure with signature `fn(&'2 X) -> &X` must implement `FnOnce<(&'1 X,)>`, for any lifetime `'1`...
    = note: ...but it actually implements `FnOnce<(&'2 X,)>`, for some specific lifetime `'2`
index cee5e5a01cc2a5aefc6fb6df8065ac87865bc863..37a2f28ce074fed466fbb7dcb3f4b95ef7a0a7cd 100644 (file)
@@ -8,10 +8,9 @@ trait Bug {
 
 impl Bug for &() {
     type Item = impl Bug; //~ ERROR `impl Trait` in type aliases is unstable
-    //~^ ERROR the trait bound `(): Bug` is not satisfied
 
     const FUN: fn() -> Self::Item = || ();
-    //~^ ERROR type alias impl trait is not permitted here
+    //~^ ERROR the trait bound `(): Bug` is not satisfied
 }
 
 fn main() {}
index 9abdd70bbd9275dbfcc1afe9d71323e36662671b..1710e07644d647e3b698b4fe60fbf10997c44952 100644 (file)
@@ -7,25 +7,16 @@ LL |     type Item = impl Bug;
    = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
    = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
 
-error[E0658]: type alias impl trait is not permitted here
-  --> $DIR/issue-60371.rs:13:40
-   |
-LL |     const FUN: fn() -> Self::Item = || ();
-   |                                        ^
-   |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
-
 error[E0277]: the trait bound `(): Bug` is not satisfied
-  --> $DIR/issue-60371.rs:10:17
+  --> $DIR/issue-60371.rs:12:40
    |
-LL |     type Item = impl Bug;
-   |                 ^^^^^^^^ the trait `Bug` is not implemented for `()`
+LL |     const FUN: fn() -> Self::Item = || ();
+   |                                        ^ the trait `Bug` is not implemented for `()`
    |
    = help: the following implementations were found:
              <&() as Bug>
 
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0277, E0658.
 For more information about an error, try `rustc --explain E0277`.
index b97192a2aed4a19aa4b2eb86d6227c57fe837875..875cce4df2390b0d9ad38d7c9d2bab320a5a6986 100644 (file)
@@ -2,10 +2,10 @@
 
 #![feature(type_alias_impl_trait)]
 
-type Closure = impl FnOnce(); //~ ERROR: type mismatch resolving
+type Closure = impl FnOnce();
 
 fn c() -> Closure {
-    || -> Closure { || () }
+    || -> Closure { || () } //~ ERROR: mismatched types
 }
 
 fn main() {}
index 63a83a60ff876bb4d94c2a54892aa0de18b1affb..5fde8c2ef1e1138e896cfa4d3b37d998a9cf3d24 100644 (file)
@@ -1,12 +1,17 @@
-error[E0271]: type mismatch resolving `<[closure@$DIR/issue-63279.rs:8:5: 8:28] as FnOnce<()>>::Output == ()`
-  --> $DIR/issue-63279.rs:5:16
+error[E0308]: mismatched types
+  --> $DIR/issue-63279.rs:8:5
    |
 LL | type Closure = impl FnOnce();
-   |                ^^^^^^^^^^^^^ expected `()`, found opaque type
+   |                ------------- the found opaque type
+...
+LL |     || -> Closure { || () }
+   |     ^^^^^^^^^^^^^^^^^^^^^^^ expected closure, found a different closure
    |
-   = note: expected unit type `()`
-            found opaque type `impl FnOnce<()>`
+   = note: expected type `[closure@$DIR/issue-63279.rs:8:21: 8:26]`
+           found closure `[closure@$DIR/issue-63279.rs:8:5: 8:28]`
+   = note: no two closures, even if identical, have the same type
+   = help: consider boxing your closure and/or using it as a trait object
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0271`.
+For more information about this error, try `rustc --explain E0308`.
index 0f0cd4e9227b4f40f1382fcbdef5c231bf242efb..72c22827f624bc039e2ca161767b7d7734f1daa0 100644 (file)
@@ -1,4 +1,5 @@
 // compile-flags: -Zsave-analysis
+// check-pass
 
 #![feature(type_alias_impl_trait, rustc_attrs)]
 
@@ -11,9 +12,7 @@
 
 fn take(_: fn() -> T) {}
 
-#[rustc_error]
 fn main() {
-    //~^ ERROR fatal error triggered by #[rustc_error]
     take(|| {});
     take(|| {});
 }
diff --git a/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.stderr b/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.stderr
deleted file mode 100644 (file)
index f3683f2..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-error: fatal error triggered by #[rustc_error]
-  --> $DIR/issue-65679-inst-opaque-ty-from-val-twice.rs:15:1
-   |
-LL | fn main() {
-   | ^^^^^^^^^
-
-error: aborting due to previous error
-
index d5b90a49b05218641a7e1011b50976157ab313f0..ad641eaa00d38afa4721054eba06d8b81a1e86a2 100644 (file)
@@ -6,8 +6,7 @@
 
 fn test() -> Test {
     let y = || -> Test { () };
-    //~^ ERROR: concrete type differs from previous defining opaque type use
-    7
+    7 //~ ERROR mismatched types
 }
 
 fn main() {}
index 79c7df788f46c21f0ff25b4dad4ba08d6c27c9cb..f6b369dd8d51827d0ec572e925405673d318779a 100644 (file)
@@ -1,14 +1,9 @@
-error: concrete type differs from previous defining opaque type use
-  --> $DIR/issue-74280.rs:8:13
+error[E0308]: mismatched types
+  --> $DIR/issue-74280.rs:9:5
    |
-LL |     let y = || -> Test { () };
-   |             ^^^^^^^^^^^^^^^^^ expected `i32`, got `()`
-   |
-note: previous use here
-  --> $DIR/issue-74280.rs:7:1
-   |
-LL | fn test() -> Test {
-   | ^^^^^^^^^^^^^^^^^
+LL |     7
+   |     ^ expected `()`, found integer
 
 error: aborting due to previous error
 
+For more information about this error, try `rustc --explain E0308`.
index 371dff475d1d787cd79fc49add979dd465335cba..da845e86147b7ffb620f880936aae59069a2095f 100644 (file)
@@ -5,9 +5,9 @@
 #![feature(type_alias_impl_trait)]
 
 type X<A, B> = impl Into<&'static A>;
-//~^ ERROR the trait bound `&'static B: From<&A>` is not satisfied
 
 fn f<A, B: 'static>(a: &'static A, b: B) -> (X<A, B>, X<B, A>) {
+    //~^ ERROR the trait bound `&'static B: From<&A>` is not satisfied
     (a, a)
 }
 
index 731c6e2788dde5e6b8206e90ef1caa0548013516..4df2f52a9e427e795b4439727e7cbfd17a105717 100644 (file)
@@ -1,14 +1,14 @@
 error[E0277]: the trait bound `&'static B: From<&A>` is not satisfied
-  --> $DIR/multiple-def-uses-in-one-fn.rs:7:16
+  --> $DIR/multiple-def-uses-in-one-fn.rs:9:45
    |
-LL | type X<A, B> = impl Into<&'static A>;
-   |                ^^^^^^^^^^^^^^^^^^^^^ the trait `From<&A>` is not implemented for `&'static B`
+LL | fn f<A, B: 'static>(a: &'static A, b: B) -> (X<A, B>, X<B, A>) {
+   |                                             ^^^^^^^^^^^^^^^^^^ the trait `From<&A>` is not implemented for `&'static B`
    |
    = note: required because of the requirements on the impl of `Into<&'static B>` for `&A`
 help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement
    |
 LL | fn f<A, B: 'static>(a: &'static A, b: B) -> (X<A, B>, X<B, A>) where &'static B: From<&A> {
-   |                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                                                ++++++++++++++++++++++++++
 
 error: aborting due to previous error
 
index 047728dc1ea4e3d39ea5ab0eda91b075b4de0678..12a98e4d783e70c50a631337269c1b725db34de7 100644 (file)
@@ -7,7 +7,7 @@ LL |         .or_else(|err| {
 help: consider specifying the type arguments in the method call
    |
 LL |         .or_else::<F, O>(|err| {
-   |                 ^^^^^^^^
+   |                 ++++++++
 
 error: aborting due to previous error
 
index 0b6630ec8942384bdf7ea924e4288079d487535c..78b7386c03e1f6530c3fc9fd4c11d297f132efc0 100644 (file)
@@ -7,7 +7,7 @@ LL |     lst.sort_by_key(|&(v, _)| v.iter().sum());
 help: consider specifying the type argument in the method call
    |
 LL |     lst.sort_by_key(|&(v, _)| v.iter().sum::<S>());
-   |                                           ^^^^^
+   |                                           +++++
 
 error: aborting due to previous error
 
index 00449af6a459fab5375837f4182aa678429f0ccb..96ee422b7b9dd570a2b0cfed5727bd663b97b403 100644 (file)
@@ -24,7 +24,7 @@ LL | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A
 help: add missing generic argument
    |
 LL |         input_cells: Vec<T>::new()
-   |                      ^^^^^^
+   |                      ~~~~~~
 
 error: aborting due to 3 previous errors
 
index c1c76659c674519c9c98b5d001fd50a645bf241a..db215d2810a018b20439275809a7c37ef3c38a22 100644 (file)
@@ -7,8 +7,9 @@ LL | pub type T<P: Send + Send + Send> = P;
    = note: `#[warn(type_alias_bounds)]` on by default
 help: the bound will not be checked when the type alias is used, and should be removed
    |
-LL | pub type T<P> = P;
-   |            --
+LL - pub type T<P: Send + Send + Send> = P;
+LL + pub type T<P> = P;
+   | 
 
 warning: 1 warning emitted
 
index d4188b5f01a41343b9b77e101348210163e23b10..dc44dede13b14ed5c9793f8c8d83befe19eb91de 100644 (file)
@@ -7,8 +7,9 @@ LL | type SVec<T: Send + Send> = Vec<T>;
    = note: `#[warn(type_alias_bounds)]` on by default
 help: the bound will not be checked when the type alias is used, and should be removed
    |
-LL | type SVec<T> = Vec<T>;
-   |           --
+LL - type SVec<T: Send + Send> = Vec<T>;
+LL + type SVec<T> = Vec<T>;
+   | 
 
 warning: where clauses are not enforced in type aliases
   --> $DIR/type-alias-bounds.rs:10:21
@@ -18,8 +19,9 @@ LL | type S2Vec<T> where T: Send = Vec<T>;
    |
 help: the clause will not be checked when the type alias is used, and should be removed
    |
-LL | type S2Vec<T>  = Vec<T>;
-   |              --
+LL - type S2Vec<T> where T: Send = Vec<T>;
+LL + type S2Vec<T>  = Vec<T>;
+   | 
 
 warning: bounds on generic parameters are not enforced in type aliases
   --> $DIR/type-alias-bounds.rs:12:19
@@ -29,8 +31,9 @@ LL | type VVec<'b, 'a: 'b + 'b> = (&'b u32, Vec<&'a i32>);
    |
 help: the bound will not be checked when the type alias is used, and should be removed
    |
-LL | type VVec<'b, 'a> = (&'b u32, Vec<&'a i32>);
-   |                --
+LL - type VVec<'b, 'a: 'b + 'b> = (&'b u32, Vec<&'a i32>);
+LL + type VVec<'b, 'a> = (&'b u32, Vec<&'a i32>);
+   | 
 
 warning: bounds on generic parameters are not enforced in type aliases
   --> $DIR/type-alias-bounds.rs:14:18
@@ -40,8 +43,9 @@ LL | type WVec<'b, T: 'b + 'b> = (&'b u32, Vec<T>);
    |
 help: the bound will not be checked when the type alias is used, and should be removed
    |
-LL | type WVec<'b, T> = (&'b u32, Vec<T>);
-   |               --
+LL - type WVec<'b, T: 'b + 'b> = (&'b u32, Vec<T>);
+LL + type WVec<'b, T> = (&'b u32, Vec<T>);
+   | 
 
 warning: where clauses are not enforced in type aliases
   --> $DIR/type-alias-bounds.rs:16:25
@@ -51,8 +55,9 @@ LL | type W2Vec<'b, T> where T: 'b, T: 'b = (&'b u32, Vec<T>);
    |
 help: the clause will not be checked when the type alias is used, and should be removed
    |
-LL | type W2Vec<'b, T>  = (&'b u32, Vec<T>);
-   |                  --
+LL - type W2Vec<'b, T> where T: 'b, T: 'b = (&'b u32, Vec<T>);
+LL + type W2Vec<'b, T>  = (&'b u32, Vec<T>);
+   | 
 
 warning: bounds on generic parameters are not enforced in type aliases
   --> $DIR/type-alias-bounds.rs:47:12
@@ -67,8 +72,9 @@ LL | type T1<U: Bound> = U::Assoc;
    |                     ^^^^^^^^
 help: the bound will not be checked when the type alias is used, and should be removed
    |
-LL | type T1<U> = U::Assoc;
-   |         --
+LL - type T1<U: Bound> = U::Assoc;
+LL + type T1<U> = U::Assoc;
+   | 
 
 warning: where clauses are not enforced in type aliases
   --> $DIR/type-alias-bounds.rs:48:18
@@ -83,8 +89,9 @@ LL | type T2<U> where U: Bound = U::Assoc;
    |                             ^^^^^^^^
 help: the clause will not be checked when the type alias is used, and should be removed
    |
-LL | type T2<U>  = U::Assoc;
-   |           --
+LL - type T2<U> where U: Bound = U::Assoc;
+LL + type T2<U>  = U::Assoc;
+   | 
 
 warning: bounds on generic parameters are not enforced in type aliases
   --> $DIR/type-alias-bounds.rs:56:12
@@ -94,8 +101,9 @@ LL | type T5<U: Bound> = <U as Bound>::Assoc;
    |
 help: the bound will not be checked when the type alias is used, and should be removed
    |
-LL | type T5<U> = <U as Bound>::Assoc;
-   |         --
+LL - type T5<U: Bound> = <U as Bound>::Assoc;
+LL + type T5<U> = <U as Bound>::Assoc;
+   | 
 
 warning: bounds on generic parameters are not enforced in type aliases
   --> $DIR/type-alias-bounds.rs:57:12
@@ -105,8 +113,9 @@ LL | type T6<U: Bound> = ::std::vec::Vec<U>;
    |
 help: the bound will not be checked when the type alias is used, and should be removed
    |
-LL | type T6<U> = ::std::vec::Vec<U>;
-   |         --
+LL - type T6<U: Bound> = ::std::vec::Vec<U>;
+LL + type T6<U> = ::std::vec::Vec<U>;
+   | 
 
 warning: 9 warnings emitted
 
index 97817a1f9fda97f8dd3c1ae14d44b07ffff5d42b..3052ff5490a9fd7dd548ce211bb69de1dafcd6b7 100644 (file)
@@ -11,7 +11,7 @@ LL |     foo(42);
 help: consider specifying the type argument in the function call
    |
 LL |     foo::<T>(42);
-   |        ^^^^^
+   |        +++++
 
 error: aborting due to previous error
 
index adf3fa2c8074820084d87d85c672aaa2953271de..6a2f4beb98aac3c1d77a1f6d761f8d35b227097f 100644 (file)
@@ -66,7 +66,7 @@ LL | trait Base<T = String>: Super<T> { }
 help: consider further restricting type parameter `T`
    |
 LL | trait Base<T = String>: Super<T> where T: std::marker::Copy { }
-   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                  ++++++++++++++++++++++++++
 
 error[E0277]: cannot add `u8` to `i32`
   --> $DIR/type-check-defaults.rs:24:66
index d1c13a33f7f4b55ce9c5850274edbc403aad874c..862ac65bc24e436a984d804a64f1c227f5b5821c 100644 (file)
@@ -7,7 +7,7 @@ LL |     let _: bool = 0 = 0;
 help: you might have meant to compare for equality
    |
 LL |     let _: bool = 0 == 0;
-   |                     ^^
+   |                     ~~
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:9:14
@@ -18,7 +18,7 @@ LL |         0 => 0 = 0,
 help: you might have meant to compare for equality
    |
 LL |         0 => 0 == 0,
-   |                ^^
+   |                ~~
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:10:14
@@ -29,7 +29,7 @@ LL |         _ => 0 = 0,
 help: you might have meant to compare for equality
    |
 LL |         _ => 0 == 0,
-   |                ^^
+   |                ~~
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:14:17
@@ -40,7 +40,7 @@ LL |         true => 0 = 0,
 help: you might have meant to compare for equality
    |
 LL |         true => 0 == 0,
-   |                   ^^
+   |                   ~~
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:18:8
@@ -51,11 +51,11 @@ LL |     if 0 = 0 {}
 help: you might have meant to use pattern matching
    |
 LL |     if let 0 = 0 {}
-   |        ^^^
+   |        +++
 help: you might have meant to compare for equality
    |
 LL |     if 0 == 0 {}
-   |          ^^
+   |          ~~
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:20:24
@@ -66,7 +66,7 @@ LL |     let _: bool = if { 0 = 0 } {
 help: you might have meant to compare for equality
    |
 LL |     let _: bool = if { 0 == 0 } {
-   |                          ^^
+   |                          ~~
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:21:9
@@ -77,7 +77,7 @@ LL |         0 = 0
 help: you might have meant to compare for equality
    |
 LL |         0 == 0
-   |           ^^
+   |           ~~
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:23:9
@@ -88,7 +88,7 @@ LL |         0 = 0
 help: you might have meant to compare for equality
    |
 LL |         0 == 0
-   |           ^^
+   |           ~~
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:26:13
@@ -99,7 +99,7 @@ LL |     let _ = (0 = 0)
 help: you might have meant to compare for equality
    |
 LL |     let _ = (0 == 0)
-   |                ^^
+   |                ~~
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:27:14
@@ -110,7 +110,7 @@ LL |         && { 0 = 0 }
 help: you might have meant to compare for equality
    |
 LL |         && { 0 == 0 }
-   |                ^^
+   |                ~~
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:28:12
@@ -121,7 +121,7 @@ LL |         || (0 = 0);
 help: you might have meant to compare for equality
    |
 LL |         || (0 == 0);
-   |               ^^
+   |               ~~
 
 error[E0070]: invalid left-hand side of assignment
   --> $DIR/assignment-expected-bool.rs:31:22
index f5306a122641649927a341250e957b1fc2a401e3..710be9d6a0420da43f76a39940a52f22b61f89c9 100644 (file)
@@ -7,7 +7,7 @@ LL |     if x = x {
 help: you might have meant to compare for equality
    |
 LL |     if x == x {
-   |          ^^
+   |          ~~
 
 error[E0308]: mismatched types
   --> $DIR/assignment-in-if.rs:20:8
@@ -18,7 +18,7 @@ LL |     if (x = x) {
 help: you might have meant to compare for equality
    |
 LL |     if (x == x) {
-   |           ^^
+   |           ~~
 
 error[E0308]: mismatched types
   --> $DIR/assignment-in-if.rs:25:8
@@ -29,7 +29,7 @@ LL |     if y = (Foo { foo: x }) {
 help: you might have meant to compare for equality
    |
 LL |     if y == (Foo { foo: x }) {
-   |          ^^
+   |          ~~
 
 error[E0308]: mismatched types
   --> $DIR/assignment-in-if.rs:30:8
@@ -40,11 +40,11 @@ LL |     if 3 = x {
 help: you might have meant to use pattern matching
    |
 LL |     if let 3 = x {
-   |        ^^^
+   |        +++
 help: you might have meant to compare for equality
    |
 LL |     if 3 == x {
-   |          ^^
+   |          ~~
 
 error[E0308]: mismatched types
   --> $DIR/assignment-in-if.rs:36:13
@@ -55,7 +55,7 @@ LL |             x = 4
 help: you might have meant to compare for equality
    |
 LL |             x == 4
-   |               ^^
+   |               ~~
 
 error[E0308]: mismatched types
   --> $DIR/assignment-in-if.rs:38:13
@@ -66,7 +66,7 @@ LL |             x = 5
 help: you might have meant to compare for equality
    |
 LL |             x == 5
-   |               ^^
+   |               ~~
 
 error: aborting due to 6 previous errors
 
index c3d41ae68cd6ad07d687e571eef48f3990d57f08..4a9bf610647a723d2cb8fc7d702e58cf8faf94c4 100644 (file)
@@ -7,7 +7,7 @@ LL |         X::Y { number } => {}
 help: use the tuple variant pattern syntax instead
    |
 LL |         X::Y(number) => {}
-   |             ^^^^^^^^
+   |             ~~~~~~~~
 
 error: aborting due to previous error
 
index 30df1261cefa1f56e9f23a3245f57fa400b12627..45f2e845735eab9f1f9af39bfd452c52c3f515a7 100644 (file)
@@ -9,7 +9,7 @@ LL |     let z = x + y;
 help: consider restricting type parameter `T`
    |
 LL | fn foo<T: std::ops::Add<Output = T>>(x: T, y: T) {
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         +++++++++++++++++++++++++++
 
 error[E0368]: binary assignment operation `+=` cannot be applied to type `T`
   --> $DIR/missing_trait_impl.rs:9:5
@@ -22,7 +22,7 @@ LL |     x += x;
 help: consider restricting type parameter `T`
    |
 LL | fn bar<T: std::ops::AddAssign>(x: T) {
-   |         ^^^^^^^^^^^^^^^^^^^^^
+   |         +++++++++++++++++++++
 
 error: aborting due to 2 previous errors
 
index a6b41520d67b1841786a40990f0c81e66287189b..368adb456d61a9fb5a510d809bb29873eef2d130 100644 (file)
@@ -12,7 +12,7 @@ LL |     fn op(_: T) -> Self;
 help: consider further restricting `Self`
    |
 LL |     fn test<U>(u: U) -> Self where Self: Tr<U> {
-   |                              ^^^^^^^^^^^^^^^^^
+   |                              +++++++++++++++++
 
 error[E0277]: the trait bound `Self: Tr<U>` is not satisfied
   --> $DIR/type-params-in-different-spaces-2.rs:16:9
@@ -28,7 +28,7 @@ LL |     fn op(_: T) -> Self;
 help: consider further restricting `Self`
    |
 LL |     fn test<U>(u: U) -> Self where Self: Tr<U> {
-   |                              ^^^^^^^^^^^^^^^^^
+   |                              +++++++++++++++++
 
 error: aborting due to 2 previous errors
 
index d6d32cc5d6f395ffa9c2b4e4f239287fe5e0a548..5a94a0fd6831a43eb37a204bd7bb09468de08a99 100644 (file)
@@ -10,7 +10,7 @@ LL |     foolish: T1
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `T1` representable
    |
 LL |     foolish: Box<T1>
-   |              ^^^^  ^
+   |              ++++  +
 
 error: aborting due to previous error
 
index 15848c66c15043e6be9bc4e8c2b9d5cb8a334df8..091502bdda34a14e48c7dd9845513152bb4dfc76 100644 (file)
@@ -38,7 +38,7 @@ LL |     let _prove_piercing_earnest: Vec<usize> = &[1, 2, 3];
 help: try using a conversion method
    |
 LL |     let _prove_piercing_earnest: Vec<usize> = (&[1, 2, 3]).to_vec();
-   |                                               ^          ^^^^^^^^^^
+   |                                               +          ++++++++++
 
 error: aborting due to 4 previous errors
 
index a722c4b5e3ea6b79dfa9df772558898fb68c8581..5e42c817e030b361814d8811f22bee9f6d967864 100644 (file)
@@ -14,7 +14,7 @@ LL | pub enum Result<T, E> {
 help: add missing generic argument
    |
 LL |     pub fn run() -> Result<_, E> {
-   |                             ^^^
+   |                             +++
 
 error[E0107]: this enum takes 2 generic arguments but 1 generic argument was supplied
   --> $DIR/issue-75883.rs:15:35
@@ -32,7 +32,7 @@ LL | pub enum Result<T, E> {
 help: add missing generic argument
    |
 LL |     pub fn interact(&mut self) -> Result<_, E> {
-   |                                           ^^^
+   |                                           +++
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types
   --> $DIR/issue-75883.rs:15:42
index 7a1846529761cb34ae794edb7e36b7ba47c618bd..041ff10752cf016e061362a5949586d29e635428 100644 (file)
@@ -18,11 +18,11 @@ LL |   f(|x| match x { tmp => { g(tmp) } });
 help: consider using a semicolon here
    |
 LL |   f(|x| match x { tmp => { g(tmp); } });
-   |                                  ^
+   |                                  +
 help: consider using a semicolon here
    |
 LL |   f(|x| match x { tmp => { g(tmp) } };);
-   |                                      ^
+   |                                      +
 
 error[E0308]: mismatched types
   --> $DIR/issue-81943.rs:10:38
@@ -40,11 +40,11 @@ LL |   f(|x| d!(x));
 help: consider using a semicolon here
    |
 LL |     ($e:expr) => { match $e { x => { g(x); } } }
-   |                                          ^
+   |                                          +
 help: consider using a semicolon here
    |
 LL |     ($e:expr) => { match $e { x => { g(x) } }; }
-   |                                              ^
+   |                                              +
 
 error: aborting due to 3 previous errors
 
index e3cce10a00fd1fc68cb81190b8fba7993322f3ad..461ccb142f97822708112b92738f320a2003b470 100644 (file)
@@ -7,7 +7,7 @@ LL |     std::<_ as _>;
 help: expressions must be enclosed in braces to be used as const generic arguments
    |
 LL |     std::<{ _ as _ }>;
-   |           ^        ^
+   |           +        +
 
 error[E0423]: expected value, found crate `std`
   --> $DIR/issue-84831.rs:2:5
diff --git a/src/test/ui/typeck/issue-87872-missing-inaccessible-field-literal.rs b/src/test/ui/typeck/issue-87872-missing-inaccessible-field-literal.rs
new file mode 100644 (file)
index 0000000..3176144
--- /dev/null
@@ -0,0 +1,11 @@
+pub mod foo {
+    pub struct Foo {
+        pub you_can_use_this_field: bool,
+        you_cant_use_this_field: bool,
+    }
+}
+
+fn main() {
+    foo::Foo {};
+    //~^ ERROR cannot construct `Foo` with struct literal syntax due to inaccessible fields
+}
diff --git a/src/test/ui/typeck/issue-87872-missing-inaccessible-field-literal.stderr b/src/test/ui/typeck/issue-87872-missing-inaccessible-field-literal.stderr
new file mode 100644 (file)
index 0000000..81b73c0
--- /dev/null
@@ -0,0 +1,8 @@
+error: cannot construct `Foo` with struct literal syntax due to inaccessible fields
+  --> $DIR/issue-87872-missing-inaccessible-field-literal.rs:9:5
+   |
+LL |     foo::Foo {};
+   |     ^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/typeck/issue-87872-missing-inaccessible-field-pattern.rs b/src/test/ui/typeck/issue-87872-missing-inaccessible-field-pattern.rs
new file mode 100644 (file)
index 0000000..d28e175
--- /dev/null
@@ -0,0 +1,11 @@
+#![allow(dead_code, unused_variables)]
+
+pub mod foo {
+    #[derive(Default)]
+    pub struct Foo { pub visible: bool, invisible: bool, }
+}
+
+fn main() {
+    let foo::Foo {} = foo::Foo::default();
+    //~^ ERROR pattern does not mention field `visible` and inaccessible fields
+}
diff --git a/src/test/ui/typeck/issue-87872-missing-inaccessible-field-pattern.stderr b/src/test/ui/typeck/issue-87872-missing-inaccessible-field-pattern.stderr
new file mode 100644 (file)
index 0000000..dc30975
--- /dev/null
@@ -0,0 +1,18 @@
+error[E0027]: pattern does not mention field `visible` and inaccessible fields
+  --> $DIR/issue-87872-missing-inaccessible-field-pattern.rs:9:9
+   |
+LL |     let foo::Foo {} = foo::Foo::default();
+   |         ^^^^^^^^^^^ missing field `visible` and inaccessible fields
+   |
+help: include the missing field in the pattern and ignore the inaccessible fields
+   |
+LL |     let foo::Foo { visible, .. } = foo::Foo::default();
+   |                  ~~~~~~~~~~~~~~~
+help: if you don't care about this missing field, you can explicitly ignore it
+   |
+LL |     let foo::Foo { .. } = foo::Foo::default();
+   |                  ~~~~~~
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0027`.
index 17ad0172941a602ac3fbbd4926c8b7a6b3e88eb8..11c2fbbcda267679751ec1ec2dbf4b3b0cf21698 100644 (file)
@@ -11,7 +11,7 @@ LL | fn is_send<T:Send>() {
 help: consider further restricting the associated type
    |
 LL | fn bar<T:Trait+Send>() where <T as Trait>::AssocType: Send {
-   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                        +++++++++++++++++++++++++++++++++++
 
 error: aborting due to previous error
 
index 7398b48a238d1c7c31022c78a39a13fa2f0a3fb4..b73ed49ce6557af654f6572be6d2ac8e96f63354 100644 (file)
@@ -10,7 +10,7 @@ LL | fn is_send<T:Send>() {
 help: consider restricting type parameter `T`
    |
 LL | fn foo<T: std::marker::Send>() {
-   |         ^^^^^^^^^^^^^^^^^^^
+   |         +++++++++++++++++++
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/typeck/typeck_type_placeholder_item.full_tait.stderr b/src/test/ui/typeck/typeck_type_placeholder_item.full_tait.stderr
new file mode 100644 (file)
index 0000000..6ba28c3
--- /dev/null
@@ -0,0 +1,647 @@
+error: expected identifier, found reserved identifier `_`
+  --> $DIR/typeck_type_placeholder_item.rs:157:18
+   |
+LL | struct BadStruct<_>(_);
+   |                  ^ expected identifier, found reserved identifier
+
+error: expected identifier, found reserved identifier `_`
+  --> $DIR/typeck_type_placeholder_item.rs:160:16
+   |
+LL | trait BadTrait<_> {}
+   |                ^ expected identifier, found reserved identifier
+
+error: expected identifier, found reserved identifier `_`
+  --> $DIR/typeck_type_placeholder_item.rs:170:19
+   |
+LL | struct BadStruct1<_, _>(_);
+   |                   ^ expected identifier, found reserved identifier
+
+error: expected identifier, found reserved identifier `_`
+  --> $DIR/typeck_type_placeholder_item.rs:170:22
+   |
+LL | struct BadStruct1<_, _>(_);
+   |                      ^ expected identifier, found reserved identifier
+
+error: expected identifier, found reserved identifier `_`
+  --> $DIR/typeck_type_placeholder_item.rs:175:19
+   |
+LL | struct BadStruct2<_, T>(_, T);
+   |                   ^ expected identifier, found reserved identifier
+
+error: associated constant in `impl` without body
+  --> $DIR/typeck_type_placeholder_item.rs:208:5
+   |
+LL |     const C: _;
+   |     ^^^^^^^^^^-
+   |               |
+   |               help: provide a definition for the constant: `= <expr>;`
+
+error[E0403]: the name `_` is already used for a generic parameter in this item's generic parameters
+  --> $DIR/typeck_type_placeholder_item.rs:170:22
+   |
+LL | struct BadStruct1<_, _>(_);
+   |                   -  ^ already used
+   |                   |
+   |                   first use of `_`
+
+warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/typeck_type_placeholder_item.rs:5:32
+   |
+LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
+   |                                ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types
+  --> $DIR/typeck_type_placeholder_item.rs:10:14
+   |
+LL | fn test() -> _ { 5 }
+   |              ^
+   |              |
+   |              not allowed in type signatures
+   |              help: replace with the correct return type: `i32`
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types
+  --> $DIR/typeck_type_placeholder_item.rs:13:16
+   |
+LL | fn test2() -> (_, _) { (5, 5) }
+   |               -^--^-
+   |               ||  |
+   |               ||  not allowed in type signatures
+   |               |not allowed in type signatures
+   |               help: replace with the correct return type: `(i32, i32)`
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables
+  --> $DIR/typeck_type_placeholder_item.rs:16:15
+   |
+LL | static TEST3: _ = "test";
+   |               ^
+   |               |
+   |               not allowed in type signatures
+   |               help: replace with the correct type: `&str`
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables
+  --> $DIR/typeck_type_placeholder_item.rs:19:15
+   |
+LL | static TEST4: _ = 145;
+   |               ^
+   |               |
+   |               not allowed in type signatures
+   |               help: replace with the correct type: `i32`
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables
+  --> $DIR/typeck_type_placeholder_item.rs:22:15
+   |
+LL | static TEST5: (_, _) = (1, 2);
+   |               ^^^^^^ not allowed in type signatures
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/typeck_type_placeholder_item.rs:25:13
+   |
+LL | fn test6(_: _) { }
+   |             ^ not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL | fn test6<T>(_: T) { }
+   |         +++    ~
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/typeck_type_placeholder_item.rs:28:18
+   |
+LL | fn test6_b<T>(_: _, _: T) { }
+   |                  ^ not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL | fn test6_b<T, U>(_: U, _: T) { }
+   |             +++     ~
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/typeck_type_placeholder_item.rs:31:30
+   |
+LL | fn test6_c<T, K, L, A, B>(_: _, _: (T, K, L, A, B)) { }
+   |                              ^ not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL | fn test6_c<T, K, L, A, B, U>(_: U, _: (T, K, L, A, B)) { }
+   |                         +++     ~
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/typeck_type_placeholder_item.rs:34:13
+   |
+LL | fn test7(x: _) { let _x: usize = x; }
+   |             ^ not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL | fn test7<T>(x: T) { let _x: usize = x; }
+   |         +++    ~
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/typeck_type_placeholder_item.rs:37:22
+   |
+LL | fn test8(_f: fn() -> _) { }
+   |                      ^
+   |                      |
+   |                      not allowed in type signatures
+   |                      help: use type parameters instead: `T`
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/typeck_type_placeholder_item.rs:37:22
+   |
+LL | fn test8(_f: fn() -> _) { }
+   |                      ^ not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL | fn test8<T>(_f: fn() -> T) { }
+   |         +++             ~
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types
+  --> $DIR/typeck_type_placeholder_item.rs:51:26
+   |
+LL | fn test11(x: &usize) -> &_ {
+   |                         -^
+   |                         ||
+   |                         |not allowed in type signatures
+   |                         help: replace with the correct return type: `&'static &'static usize`
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types
+  --> $DIR/typeck_type_placeholder_item.rs:56:52
+   |
+LL | unsafe fn test12(x: *const usize) -> *const *const _ {
+   |                                      --------------^
+   |                                      |             |
+   |                                      |             not allowed in type signatures
+   |                                      help: replace with the correct return type: `*const *const usize`
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs
+  --> $DIR/typeck_type_placeholder_item.rs:70:8
+   |
+LL |     a: _,
+   |        ^ not allowed in type signatures
+LL |
+LL |     b: (_, _),
+   |         ^  ^ not allowed in type signatures
+   |         |
+   |         not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL ~ struct Test10<T> {
+LL ~     a: T,
+LL |
+LL ~     b: (T, T),
+   |
+
+error: missing type for `static` item
+  --> $DIR/typeck_type_placeholder_item.rs:76:12
+   |
+LL |     static A = 42;
+   |            ^ help: provide a type for the static variable: `A: i32`
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables
+  --> $DIR/typeck_type_placeholder_item.rs:78:15
+   |
+LL |     static B: _ = 42;
+   |               ^
+   |               |
+   |               not allowed in type signatures
+   |               help: replace with the correct type: `i32`
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables
+  --> $DIR/typeck_type_placeholder_item.rs:80:15
+   |
+LL |     static C: Option<_> = Some(42);
+   |               ^^^^^^^^^ not allowed in type signatures
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types
+  --> $DIR/typeck_type_placeholder_item.rs:82:21
+   |
+LL |     fn fn_test() -> _ { 5 }
+   |                     ^
+   |                     |
+   |                     not allowed in type signatures
+   |                     help: replace with the correct return type: `i32`
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types
+  --> $DIR/typeck_type_placeholder_item.rs:85:23
+   |
+LL |     fn fn_test2() -> (_, _) { (5, 5) }
+   |                      -^--^-
+   |                      ||  |
+   |                      ||  not allowed in type signatures
+   |                      |not allowed in type signatures
+   |                      help: replace with the correct return type: `(i32, i32)`
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables
+  --> $DIR/typeck_type_placeholder_item.rs:88:22
+   |
+LL |     static FN_TEST3: _ = "test";
+   |                      ^
+   |                      |
+   |                      not allowed in type signatures
+   |                      help: replace with the correct type: `&str`
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables
+  --> $DIR/typeck_type_placeholder_item.rs:91:22
+   |
+LL |     static FN_TEST4: _ = 145;
+   |                      ^
+   |                      |
+   |                      not allowed in type signatures
+   |                      help: replace with the correct type: `i32`
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables
+  --> $DIR/typeck_type_placeholder_item.rs:94:22
+   |
+LL |     static FN_TEST5: (_, _) = (1, 2);
+   |                      ^^^^^^ not allowed in type signatures
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/typeck_type_placeholder_item.rs:97:20
+   |
+LL |     fn fn_test6(_: _) { }
+   |                    ^ not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL |     fn fn_test6<T>(_: T) { }
+   |                +++    ~
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/typeck_type_placeholder_item.rs:100:20
+   |
+LL |     fn fn_test7(x: _) { let _x: usize = x; }
+   |                    ^ not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL |     fn fn_test7<T>(x: T) { let _x: usize = x; }
+   |                +++    ~
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/typeck_type_placeholder_item.rs:103:29
+   |
+LL |     fn fn_test8(_f: fn() -> _) { }
+   |                             ^
+   |                             |
+   |                             not allowed in type signatures
+   |                             help: use type parameters instead: `T`
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/typeck_type_placeholder_item.rs:103:29
+   |
+LL |     fn fn_test8(_f: fn() -> _) { }
+   |                             ^ not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL |     fn fn_test8<T>(_f: fn() -> T) { }
+   |                +++             ~
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs
+  --> $DIR/typeck_type_placeholder_item.rs:126:12
+   |
+LL |         a: _,
+   |            ^ not allowed in type signatures
+LL |
+LL |         b: (_, _),
+   |             ^  ^ not allowed in type signatures
+   |             |
+   |             not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL ~     struct FnTest10<T> {
+LL ~         a: T,
+LL |
+LL ~         b: (T, T),
+   |
+
+error[E0282]: type annotations needed
+  --> $DIR/typeck_type_placeholder_item.rs:131:18
+   |
+LL |     fn fn_test11(_: _) -> (_, _) { panic!() }
+   |                  ^ cannot infer type
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types
+  --> $DIR/typeck_type_placeholder_item.rs:131:28
+   |
+LL |     fn fn_test11(_: _) -> (_, _) { panic!() }
+   |                            ^  ^ not allowed in type signatures
+   |                            |
+   |                            not allowed in type signatures
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types
+  --> $DIR/typeck_type_placeholder_item.rs:135:30
+   |
+LL |     fn fn_test12(x: i32) -> (_, _) { (x, x) }
+   |                             -^--^-
+   |                             ||  |
+   |                             ||  not allowed in type signatures
+   |                             |not allowed in type signatures
+   |                             help: replace with the correct return type: `(i32, i32)`
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types
+  --> $DIR/typeck_type_placeholder_item.rs:138:33
+   |
+LL |     fn fn_test13(x: _) -> (i32, _) { (x, x) }
+   |                           ------^-
+   |                           |     |
+   |                           |     not allowed in type signatures
+   |                           help: replace with the correct return type: `(i32, i32)`
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs
+  --> $DIR/typeck_type_placeholder_item.rs:157:21
+   |
+LL | struct BadStruct<_>(_);
+   |                     ^ not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL | struct BadStruct<T>(T);
+   |                  ~  ~
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for implementations
+  --> $DIR/typeck_type_placeholder_item.rs:162:15
+   |
+LL | impl BadTrait<_> for BadStruct<_> {}
+   |               ^                ^ not allowed in type signatures
+   |               |
+   |               not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL | impl<T> BadTrait<T> for BadStruct<T> {}
+   |     +++          ~                ~
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for opaque types
+  --> $DIR/typeck_type_placeholder_item.rs:165:34
+   |
+LL | fn impl_trait() -> impl BadTrait<_> {
+   |                                  ^ not allowed in type signatures
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs
+  --> $DIR/typeck_type_placeholder_item.rs:170:25
+   |
+LL | struct BadStruct1<_, _>(_);
+   |                         ^ not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL | struct BadStruct1<T, _>(T);
+   |                   ~     ~
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs
+  --> $DIR/typeck_type_placeholder_item.rs:175:25
+   |
+LL | struct BadStruct2<_, T>(_, T);
+   |                         ^ not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL | struct BadStruct2<U, T>(U, T);
+   |                   ~     ~
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for type aliases
+  --> $DIR/typeck_type_placeholder_item.rs:179:14
+   |
+LL | type X = Box<_>;
+   |              ^ not allowed in type signatures
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for opaque types
+  --> $DIR/typeck_type_placeholder_item.rs:185:21
+   |
+LL | type Y = impl Trait<_>;
+   |                     ^ not allowed in type signatures
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types
+  --> $DIR/typeck_type_placeholder_item.rs:219:31
+   |
+LL | fn value() -> Option<&'static _> {
+   |               ----------------^-
+   |               |               |
+   |               |               not allowed in type signatures
+   |               help: replace with the correct return type: `Option<&'static u8>`
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants
+  --> $DIR/typeck_type_placeholder_item.rs:224:10
+   |
+LL | const _: Option<_> = map(value);
+   |          ^^^^^^^^^
+   |          |
+   |          not allowed in type signatures
+   |          help: replace with the correct type: `Option<u8>`
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/typeck_type_placeholder_item.rs:143:31
+   |
+LL |     fn method_test1(&self, x: _);
+   |                               ^ not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL |     fn method_test1<T>(&self, x: T);
+   |                    +++           ~
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/typeck_type_placeholder_item.rs:145:31
+   |
+LL |     fn method_test2(&self, x: _) -> _;
+   |                               ^     ^ not allowed in type signatures
+   |                               |
+   |                               not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL |     fn method_test2<T>(&self, x: T) -> T;
+   |                    +++           ~     ~
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/typeck_type_placeholder_item.rs:147:31
+   |
+LL |     fn method_test3(&self) -> _;
+   |                               ^ not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL |     fn method_test3<T>(&self) -> T;
+   |                    +++           ~
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/typeck_type_placeholder_item.rs:149:26
+   |
+LL |     fn assoc_fn_test1(x: _);
+   |                          ^ not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL |     fn assoc_fn_test1<T>(x: T);
+   |                      +++    ~
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/typeck_type_placeholder_item.rs:151:26
+   |
+LL |     fn assoc_fn_test2(x: _) -> _;
+   |                          ^     ^ not allowed in type signatures
+   |                          |
+   |                          not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL |     fn assoc_fn_test2<T>(x: T) -> T;
+   |                      +++    ~     ~
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/typeck_type_placeholder_item.rs:153:28
+   |
+LL |     fn assoc_fn_test3() -> _;
+   |                            ^ not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL |     fn assoc_fn_test3<T>() -> T;
+   |                      +++      ~
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types
+  --> $DIR/typeck_type_placeholder_item.rs:193:14
+   |
+LL |     type B = _;
+   |              ^ not allowed in type signatures
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants
+  --> $DIR/typeck_type_placeholder_item.rs:195:14
+   |
+LL |     const C: _;
+   |              ^ not allowed in type signatures
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants
+  --> $DIR/typeck_type_placeholder_item.rs:197:14
+   |
+LL |     const D: _ = 42;
+   |              ^
+   |              |
+   |              not allowed in type signatures
+   |              help: replace with the correct type: `i32`
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types
+  --> $DIR/typeck_type_placeholder_item.rs:200:26
+   |
+LL |     type F: std::ops::Fn(_);
+   |                          ^ not allowed in type signatures
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types
+  --> $DIR/typeck_type_placeholder_item.rs:44:24
+   |
+LL |     fn test9(&self) -> _ { () }
+   |                        ^
+   |                        |
+   |                        not allowed in type signatures
+   |                        help: replace with the correct return type: `()`
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/typeck_type_placeholder_item.rs:47:27
+   |
+LL |     fn test10(&self, _x : _) { }
+   |                           ^ not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL |     fn test10<T>(&self, _x : T) { }
+   |              +++             ~
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types
+  --> $DIR/typeck_type_placeholder_item.rs:62:24
+   |
+LL |     fn clone(&self) -> _ { Test9 }
+   |                        ^
+   |                        |
+   |                        not allowed in type signatures
+   |                        help: replace with the correct return type: `Test9`
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/typeck_type_placeholder_item.rs:65:37
+   |
+LL |     fn clone_from(&mut self, other: _) { *self = Test9; }
+   |                                     ^ not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL |     fn clone_from<T>(&mut self, other: T) { *self = Test9; }
+   |                  +++                   ~
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types
+  --> $DIR/typeck_type_placeholder_item.rs:110:31
+   |
+LL |         fn fn_test9(&self) -> _ { () }
+   |                               ^
+   |                               |
+   |                               not allowed in type signatures
+   |                               help: replace with the correct return type: `()`
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/typeck_type_placeholder_item.rs:113:34
+   |
+LL |         fn fn_test10(&self, _x : _) { }
+   |                                  ^ not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL |         fn fn_test10<T>(&self, _x : T) { }
+   |                     +++             ~
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types
+  --> $DIR/typeck_type_placeholder_item.rs:118:28
+   |
+LL |         fn clone(&self) -> _ { FnTest9 }
+   |                            ^
+   |                            |
+   |                            not allowed in type signatures
+   |                            help: replace with the correct return type: `FnTest9`
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/typeck_type_placeholder_item.rs:121:41
+   |
+LL |         fn clone_from(&mut self, other: _) { *self = FnTest9; }
+   |                                         ^ not allowed in type signatures
+   |
+help: use type parameters instead
+   |
+LL |         fn clone_from<T>(&mut self, other: T) { *self = FnTest9; }
+   |                      +++                   ~
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types
+  --> $DIR/typeck_type_placeholder_item.rs:204:14
+   |
+LL |     type A = _;
+   |              ^ not allowed in type signatures
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types
+  --> $DIR/typeck_type_placeholder_item.rs:206:14
+   |
+LL |     type B = _;
+   |              ^ not allowed in type signatures
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants
+  --> $DIR/typeck_type_placeholder_item.rs:208:14
+   |
+LL |     const C: _;
+   |              ^ not allowed in type signatures
+
+error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants
+  --> $DIR/typeck_type_placeholder_item.rs:211:14
+   |
+LL |     const D: _ = 42;
+   |              ^
+   |              |
+   |              not allowed in type signatures
+   |              help: replace with the correct type: `i32`
+
+error: aborting due to 69 previous errors; 1 warning emitted
+
+Some errors have detailed explanations: E0121, E0282, E0403.
+For more information about an error, try `rustc --explain E0121`.
index 4827439bfbfe4f9f0e416c4a1787a3e81e0b8eaa..e1f66afdacc11d4498b6e3fe81439222f03b9c0b 100644 (file)
@@ -96,7 +96,7 @@ LL | fn test6(_: _) { }
 help: use type parameters instead
    |
 LL | fn test6<T>(_: T) { }
-   |         ^^^    ^
+   |         +++    ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
   --> $DIR/typeck_type_placeholder_item.rs:25:18
@@ -107,7 +107,7 @@ LL | fn test6_b<T>(_: _, _: T) { }
 help: use type parameters instead
    |
 LL | fn test6_b<T, U>(_: U, _: T) { }
-   |             ^^^     ^
+   |             +++     ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
   --> $DIR/typeck_type_placeholder_item.rs:28:30
@@ -118,7 +118,7 @@ LL | fn test6_c<T, K, L, A, B>(_: _, _: (T, K, L, A, B)) { }
 help: use type parameters instead
    |
 LL | fn test6_c<T, K, L, A, B, U>(_: U, _: (T, K, L, A, B)) { }
-   |                         ^^^     ^
+   |                         +++     ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
   --> $DIR/typeck_type_placeholder_item.rs:31:13
@@ -129,7 +129,7 @@ LL | fn test7(x: _) { let _x: usize = x; }
 help: use type parameters instead
    |
 LL | fn test7<T>(x: T) { let _x: usize = x; }
-   |         ^^^    ^
+   |         +++    ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
   --> $DIR/typeck_type_placeholder_item.rs:34:22
@@ -149,7 +149,7 @@ LL | fn test8(_f: fn() -> _) { }
 help: use type parameters instead
    |
 LL | fn test8<T>(_f: fn() -> T) { }
-   |         ^^^             ^
+   |         +++             ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types
   --> $DIR/typeck_type_placeholder_item.rs:48:26
@@ -182,10 +182,10 @@ LL |     b: (_, _),
    |
 help: use type parameters instead
    |
-LL | struct Test10<T> {
-LL |     a: T,
+LL ~ struct Test10<T> {
+LL ~     a: T,
 LL |
-LL |     b: (T, T),
+LL ~     b: (T, T),
    |
 
 error: missing type for `static` item
@@ -261,7 +261,7 @@ LL |     fn fn_test6(_: _) { }
 help: use type parameters instead
    |
 LL |     fn fn_test6<T>(_: T) { }
-   |                ^^^    ^
+   |                +++    ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
   --> $DIR/typeck_type_placeholder_item.rs:97:20
@@ -272,7 +272,7 @@ LL |     fn fn_test7(x: _) { let _x: usize = x; }
 help: use type parameters instead
    |
 LL |     fn fn_test7<T>(x: T) { let _x: usize = x; }
-   |                ^^^    ^
+   |                +++    ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
   --> $DIR/typeck_type_placeholder_item.rs:100:29
@@ -292,7 +292,7 @@ LL |     fn fn_test8(_f: fn() -> _) { }
 help: use type parameters instead
    |
 LL |     fn fn_test8<T>(_f: fn() -> T) { }
-   |                ^^^             ^
+   |                +++             ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs
   --> $DIR/typeck_type_placeholder_item.rs:123:12
@@ -307,10 +307,10 @@ LL |         b: (_, _),
    |
 help: use type parameters instead
    |
-LL |     struct FnTest10<T> {
-LL |         a: T,
+LL ~     struct FnTest10<T> {
+LL ~         a: T,
 LL |
-LL |         b: (T, T),
+LL ~         b: (T, T),
    |
 
 error[E0282]: type annotations needed
@@ -355,7 +355,7 @@ LL | struct BadStruct<_>(_);
 help: use type parameters instead
    |
 LL | struct BadStruct<T>(T);
-   |                  ^  ^
+   |                  ~  ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for implementations
   --> $DIR/typeck_type_placeholder_item.rs:159:15
@@ -368,7 +368,7 @@ LL | impl BadTrait<_> for BadStruct<_> {}
 help: use type parameters instead
    |
 LL | impl<T> BadTrait<T> for BadStruct<T> {}
-   |     ^^^          ^                ^
+   |     +++          ~                ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for opaque types
   --> $DIR/typeck_type_placeholder_item.rs:162:34
@@ -385,7 +385,7 @@ LL | struct BadStruct1<_, _>(_);
 help: use type parameters instead
    |
 LL | struct BadStruct1<T, _>(T);
-   |                   ^     ^
+   |                   ~     ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs
   --> $DIR/typeck_type_placeholder_item.rs:172:25
@@ -396,7 +396,7 @@ LL | struct BadStruct2<_, T>(_, T);
 help: use type parameters instead
    |
 LL | struct BadStruct2<U, T>(U, T);
-   |                   ^     ^
+   |                   ~     ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for type aliases
   --> $DIR/typeck_type_placeholder_item.rs:176:14
@@ -437,7 +437,7 @@ LL |     fn method_test1(&self, x: _);
 help: use type parameters instead
    |
 LL |     fn method_test1<T>(&self, x: T);
-   |                    ^^^           ^
+   |                    +++           ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
   --> $DIR/typeck_type_placeholder_item.rs:142:31
@@ -450,7 +450,7 @@ LL |     fn method_test2(&self, x: _) -> _;
 help: use type parameters instead
    |
 LL |     fn method_test2<T>(&self, x: T) -> T;
-   |                    ^^^           ^     ^
+   |                    +++           ~     ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
   --> $DIR/typeck_type_placeholder_item.rs:144:31
@@ -461,7 +461,7 @@ LL |     fn method_test3(&self) -> _;
 help: use type parameters instead
    |
 LL |     fn method_test3<T>(&self) -> T;
-   |                    ^^^           ^
+   |                    +++           ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
   --> $DIR/typeck_type_placeholder_item.rs:146:26
@@ -472,7 +472,7 @@ LL |     fn assoc_fn_test1(x: _);
 help: use type parameters instead
    |
 LL |     fn assoc_fn_test1<T>(x: T);
-   |                      ^^^    ^
+   |                      +++    ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
   --> $DIR/typeck_type_placeholder_item.rs:148:26
@@ -485,7 +485,7 @@ LL |     fn assoc_fn_test2(x: _) -> _;
 help: use type parameters instead
    |
 LL |     fn assoc_fn_test2<T>(x: T) -> T;
-   |                      ^^^    ^     ^
+   |                      +++    ~     ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions
   --> $DIR/typeck_type_placeholder_item.rs:150:28
@@ -496,7 +496,7 @@ LL |     fn assoc_fn_test3() -> _;
 help: use type parameters instead
    |
 LL |     fn assoc_fn_test3<T>() -> T;
-   |                      ^^^      ^
+   |                      +++      ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types
   --> $DIR/typeck_type_placeholder_item.rs:190:14
@@ -543,7 +543,7 @@ LL |     fn test10(&self, _x : _) { }
 help: use type parameters instead
    |
 LL |     fn test10<T>(&self, _x : T) { }
-   |              ^^^             ^
+   |              +++             ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types
   --> $DIR/typeck_type_placeholder_item.rs:59:24
@@ -563,7 +563,7 @@ LL |     fn clone_from(&mut self, other: _) { *self = Test9; }
 help: use type parameters instead
    |
 LL |     fn clone_from<T>(&mut self, other: T) { *self = Test9; }
-   |                  ^^^                   ^
+   |                  +++                   ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types
   --> $DIR/typeck_type_placeholder_item.rs:107:31
@@ -583,7 +583,7 @@ LL |         fn fn_test10(&self, _x : _) { }
 help: use type parameters instead
    |
 LL |         fn fn_test10<T>(&self, _x : T) { }
-   |                     ^^^             ^
+   |                     +++             ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types
   --> $DIR/typeck_type_placeholder_item.rs:115:28
@@ -603,7 +603,7 @@ LL |         fn clone_from(&mut self, other: _) { *self = FnTest9; }
 help: use type parameters instead
    |
 LL |         fn clone_from<T>(&mut self, other: T) { *self = FnTest9; }
-   |                      ^^^                   ^
+   |                      +++                   ~
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types
   --> $DIR/typeck_type_placeholder_item.rs:201:14
index 12fd7c9963cfc661aae9545bcb158284888e50ca..5c58e29fa0027b36251a78d3e49c8c06cddf0869 100644 (file)
@@ -15,7 +15,7 @@ LL |     let b: typeof(a) = 1i8;
 help: change the type of the numeric literal from `i8` to `u8`
    |
 LL |     let b: typeof(a) = 1u8;
-   |                        ^^^
+   |                        ~~~
 
 error: aborting due to 2 previous errors
 
index 37aa4d949daeaddbe395e3ebed546c0271495e6a..a832964d220a798daca3371671ed6f34288a67f5 100644 (file)
@@ -12,7 +12,7 @@ LL | pub trait IntoCow<'a, B: ?Sized> where B: ToOwned {
 help: add missing generic argument
    |
 LL |     <String as IntoCow<B>>::into_cow("foo".to_string());
-   |                ^^^^^^^^^^
+   |                ~~~~~~~~~~
 
 error[E0107]: missing generics for trait `IntoCow`
   --> $DIR/ufcs-qpath-missing-params.rs:17:16
@@ -28,7 +28,7 @@ LL | pub trait IntoCow<'a, B: ?Sized> where B: ToOwned {
 help: add missing generic argument
    |
 LL |     <String as IntoCow<B>>::into_cow::<str>("foo".to_string());
-   |                ^^^^^^^^^^
+   |                ~~~~~~~~~~
 
 error[E0107]: this associated function takes 0 generic arguments but 1 generic argument was supplied
   --> $DIR/ufcs-qpath-missing-params.rs:17:26
index e30e4f5e7d3fd9caea78d069b224b8c6a521d9f8..8dc024697d7fc6fb77b8f473a252f1bc9af431f8 100644 (file)
@@ -20,7 +20,7 @@ LL |     <i32 as Add<i32>>::add(1u32, 2);
 help: change the type of the numeric literal from `u32` to `i32`
    |
 LL |     <i32 as Add<i32>>::add(1i32, 2);
-   |                            ^^^^
+   |                            ~~~~
 
 error[E0308]: mismatched types
   --> $DIR/ufcs-qpath-self-mismatch.rs:8:31
@@ -31,7 +31,7 @@ LL |     <i32 as Add<i32>>::add(1, 2u32);
 help: change the type of the numeric literal from `u32` to `i32`
    |
 LL |     <i32 as Add<i32>>::add(1, 2i32);
-   |                               ^^^^
+   |                               ~~~~
 
 error: aborting due to 3 previous errors
 
index 29273a5babefd577162f775b8cac4d50e228d3fa..8f9d918fdba2b1baa582b89629baf63ba4d8c9db 100644 (file)
@@ -9,11 +9,11 @@ LL |     let f: &mut dyn FnMut<(_,), Output = ()> = &mut |_: <() as Lt<'_>>::T|
 help: consider further restricting the associated type
    |
 LL | fn main() where <() as Lt<'_>>::T: Sized {
-   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |           ++++++++++++++++++++++++++++++
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL |     let f: &mut dyn FnMut<(_,), Output = ()> = &mut |_: &<() as Lt<'_>>::T| {};
-   |                                                         ^
+   |                                                         +
 
 error: aborting due to previous error
 
index 1719a99d421d06efbf7446800d5acdaff77ae62d..64d14d0fc5fa4736be0171c479d384b10628f2ca 100644 (file)
@@ -7,7 +7,7 @@ LL |     let _: dyn Foo(&isize, &usize) -> &usize;
    = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from argument 1 or argument 2
 help: consider introducing a named lifetime parameter
    |
-LL | fn main<'a>() {
+LL ~ fn main<'a>() {
 LL |     eq::< dyn for<'a> Foo<(&'a isize,), Output=&'a isize>,
 LL |           dyn Foo(&isize) -> &isize                                   >();
 LL |     eq::< dyn for<'a> Foo<(&'a isize,), Output=(&'a isize, &'a isize)>,
index 90bef7ba1180808305bea54c4d54e159700a18a0..29ea5735cad473fd77ca9bc606a3df123240f07a 100644 (file)
@@ -18,7 +18,7 @@ LL | struct Bar<A> {
 help: add missing generic argument
    |
 LL |     let x: Box<Bar(A)> = panic!();
-   |                    ^
+   |                    +
 
 error: aborting due to 2 previous errors
 
index 931675afd83f027e4d38dba99aac7e08f3ed76a1..427ba3414f8fab82b66101df7e524e6fb7d5e0d8 100644 (file)
@@ -18,7 +18,7 @@ LL | struct Bar<A> {
 help: add missing generic argument
    |
 LL | fn foo(b: Box<Bar(A)>) {
-   |                   ^
+   |                   +
 
 error: aborting due to 2 previous errors
 
index 482b3ace65b4a2d513740ae6e02a8a181a5f3b7a..67bf4be54e621412cf9de4279f2531ce8d4d9fc1 100644 (file)
@@ -7,7 +7,7 @@ LL |     let z = f(1_usize, 2);
 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
 
index 2c595833cd1b04602d13116da5e07bf9b57a2e78..b865278e25fd8de5e40aa7ea51211f14f08fba37 100644 (file)
@@ -6,8 +6,8 @@ LL |     x: Box<dyn Debug + '_>,
    |
 help: consider introducing a named lifetime parameter
    |
-LL | struct Foo<'a> {
-LL |     x: Box<dyn Debug + 'a>,
+LL ~ struct Foo<'a> {
+LL ~     x: Box<dyn Debug + 'a>,
    |
 
 error[E0228]: the lifetime bound for this object type cannot be deduced from context; please supply an explicit bound
index dd804864dab4f59e0eb96f063b2223e50aa21978..de3a6bbae17954749bc87d4a56f8165013c2098c 100644 (file)
@@ -10,7 +10,7 @@ LL |     Box::new(items.iter())
 help: to declare that the trait object captures data from argument `items`, you can add an explicit `'_` lifetime bound
    |
 LL | fn a<T>(items: &[T]) -> Box<dyn Iterator<Item=&T> + '_> {
-   |                                                   ^^^^
+   |                                                   ++++
 
 error: aborting due to previous error
 
index 8d2c82e59edc15f4a01834890067975738db1f96..89d36bfc92662d988369dbf201968e93f100f174 100644 (file)
@@ -8,7 +8,7 @@ LL | fn foo(x: &u32, y: &u32) -> &'_ u32 { loop { } }
 help: consider introducing a named lifetime parameter
    |
 LL | fn foo<'a>(x: &'a u32, y: &'a u32) -> &'a u32 { loop { } }
-   |       ^^^^    ^^^^^^^     ^^^^^^^      ^^
+   |       ++++    ~~~~~~~     ~~~~~~~      ~~
 
 error: aborting due to previous error
 
index 4275cc26f735fb526946eaa8514b1166cc055763..84183f61e3f812bf907a864895a1593a158cec55 100644 (file)
@@ -6,8 +6,8 @@ LL |     x: &'_ u32,
    |
 help: consider introducing a named lifetime parameter
    |
-LL | struct Foo<'a> {
-LL |     x: &'a u32,
+LL ~ struct Foo<'a> {
+LL ~     x: &'a u32,
    |
 
 error[E0106]: missing lifetime specifier
@@ -18,8 +18,8 @@ LL |     Variant(&'_ u32),
    |
 help: consider introducing a named lifetime parameter
    |
-LL | enum Bar<'a> {
-LL |     Variant(&'a u32),
+LL ~ enum Bar<'a> {
+LL ~     Variant(&'a u32),
    |
 
 error: aborting due to 2 previous errors
index 594cdd245b3ec9875d9e44c2f7e370974b8cc27e..4c207bd3e68d80559ff57f0339bf6526e80f0e96 100644 (file)
@@ -19,7 +19,7 @@ LL | struct Baz<'a>(&'_ &'a u8);
 help: consider using the `'a` lifetime
    |
 LL | struct Baz<'a>(&'a &'a u8);
-   |                 ^^
+   |                 ~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/underscore-lifetime-binders.rs:10:33
@@ -31,7 +31,7 @@ LL | fn meh() -> Box<dyn for<'_> Meh<'_>>
 help: consider using the `'static` lifetime
    |
 LL | fn meh() -> Box<dyn for<'_> Meh<'static>>
-   |                                 ^^^^^^^
+   |                                 ~~~~~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/underscore-lifetime-binders.rs:16:35
@@ -43,7 +43,7 @@ LL | fn foo2(_: &'_ u8, y: &'_ u8) -> &'_ u8 { y }
 help: consider introducing a named lifetime parameter
    |
 LL | fn foo2<'a>(_: &'a u8, y: &'a u8) -> &'a u8 { y }
-   |        ^^^^    ^^^^^^     ^^^^^^      ^^
+   |        ++++    ~~~~~~     ~~~~~~      ~~
 
 error: aborting due to 5 previous errors
 
index e1ff38f3057f142e2052511b5fe47253edd7d99c..3cb9955674800e3d095cfc39649925a873394205 100644 (file)
@@ -19,7 +19,7 @@ LL |       let Foo::D(_y) = x;
 help: you might want to use `if let` to ignore the variant that isn't matched
    |
 LL |     if let Foo::D(_y) = x { /* */ }
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index c54d04de12c509043382130f57522fff7d5f9e7c..7da7c870e704b134b0d98fca75a3638faba597d5 100644 (file)
@@ -10,7 +10,7 @@ LL |     b: U,
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `U` representable
    |
 LL |     b: Box<U>,
-   |        ^^^^ ^
+   |        ++++ +
 
 error: aborting due to previous error
 
index ef86c624e9b19cb789da35959bee5f646a2a2f1c..0f66f6c541b3fb609aedbcb8ac4e7f389110428b 100644 (file)
@@ -10,16 +10,17 @@ LL |     value: T,
    = help: change the field's type to have a statically known size
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | union Foo<T> {
-   |           --
+LL - union Foo<T: ?Sized> {
+LL + union Foo<T> {
+   | 
 help: borrowed types always have a statically known size
    |
 LL |     value: &T,
-   |            ^
+   |            +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     value: Box<T>,
-   |            ^^^^ ^
+   |            ++++ +
 
 error[E0277]: the size for values of type `T` cannot be known at compilation time
   --> $DIR/union-sized-field.rs:9:12
@@ -33,16 +34,17 @@ LL |     value: T,
    = help: change the field's type to have a statically known size
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | struct Foo2<T> {
-   |             --
+LL - struct Foo2<T: ?Sized> {
+LL + struct Foo2<T> {
+   | 
 help: borrowed types always have a statically known size
    |
 LL |     value: &T,
-   |            ^
+   |            +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     value: Box<T>,
-   |            ^^^^ ^
+   |            ++++ +
 
 error[E0277]: the size for values of type `T` cannot be known at compilation time
   --> $DIR/union-sized-field.rs:15:11
@@ -56,16 +58,17 @@ LL |     Value(T),
    = help: change the field's type to have a statically known size
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | enum Foo3<T> {
-   |           --
+LL - enum Foo3<T: ?Sized> {
+LL + enum Foo3<T> {
+   | 
 help: borrowed types always have a statically known size
    |
 LL |     Value(&T),
-   |           ^
+   |           +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     Value(Box<T>),
-   |           ^^^^ ^
+   |           ++++ +
 
 error: aborting due to 3 previous errors
 
index 26fc25b96bd42a73193711c4f0dd5ec9be3cb792..58b1f5cb0786ace54492062e0a2d4124812d5be6 100644 (file)
@@ -19,7 +19,7 @@ LL |     let y = u.calculate;
 help: use parentheses to call the method
    |
 LL |     let y = u.calculate();
-   |                        ^^
+   |                        ++
 
 error: aborting due to 3 previous errors
 
index 26fc25b96bd42a73193711c4f0dd5ec9be3cb792..58b1f5cb0786ace54492062e0a2d4124812d5be6 100644 (file)
@@ -19,7 +19,7 @@ LL |     let y = u.calculate;
 help: use parentheses to call the method
    |
 LL |     let y = u.calculate();
-   |                        ^^
+   |                        ++
 
 error: aborting due to 3 previous errors
 
index 86a13c1e7ca904db6b683dd18c8e48b7dd8c8b83..36e782ac0424dc632a2f4bc16e0c530583377a57 100644 (file)
@@ -10,11 +10,11 @@ LL |     a: str,
 help: borrowed types always have a statically known size
    |
 LL |     a: &str,
-   |        ^
+   |        +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     a: Box<str>,
-   |        ^^^^   ^
+   |        ++++   +
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/union-unsized.rs:15:8
@@ -28,11 +28,11 @@ LL |     b: str,
 help: borrowed types always have a statically known size
    |
 LL |     b: &str,
-   |        ^
+   |        +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     b: Box<str>,
-   |        ^^^^   ^
+   |        ++++   +
 
 error: aborting due to 2 previous errors
 
index 86a13c1e7ca904db6b683dd18c8e48b7dd8c8b83..36e782ac0424dc632a2f4bc16e0c530583377a57 100644 (file)
@@ -10,11 +10,11 @@ LL |     a: str,
 help: borrowed types always have a statically known size
    |
 LL |     a: &str,
-   |        ^
+   |        +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     a: Box<str>,
-   |        ^^^^   ^
+   |        ++++   +
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/union-unsized.rs:15:8
@@ -28,11 +28,11 @@ LL |     b: str,
 help: borrowed types always have a statically known size
    |
 LL |     b: &str,
-   |        ^
+   |        +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     b: Box<str>,
-   |        ^^^^   ^
+   |        ++++   +
 
 error: aborting due to 2 previous errors
 
index c20d3ddefcdb714724991444a266d6a0a878eb47..95a0f4f5fabee8a6aa07996351d60eb90e5606c6 100644 (file)
@@ -17,7 +17,7 @@ LL |     fn not(self) -> Self::Output;
 help: consider further restricting this bound
    |
 LL | fn move_then_borrow<T: Not<Output=T> + Clone + Copy>(x: T) {
-   |                                              ^^^^^^
+   |                                              ++++++
 
 error[E0505]: cannot move out of `x` because it is borrowed
   --> $DIR/unop-move-semantics.rs:15:6
index 35bba1c103a05869e9e17a6ae662abde205d5022..9af9cd24481e72bdc2938a1a02ec4b6b7901eb84 100644 (file)
@@ -10,8 +10,9 @@ LL | fn foo<T: ?Sized>() { bar::<T>() }
    |
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn foo<T>() { bar::<T>() }
-   |        --
+LL - fn foo<T: ?Sized>() { bar::<T>() }
+LL + fn foo<T>() { bar::<T>() }
+   | 
 
 error: aborting due to previous error
 
index f66ce2af30416efca4fa5c06ed72ab63423062d2..88678307de21f8536b29b98a10e2e09e60f3208c 100644 (file)
@@ -18,8 +18,9 @@ LL | enum Foo<U> { FooSome(U), FooNone }
    |          this could be changed to `U: ?Sized`...
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn foo2<T>() { not_sized::<Foo<T>>() }
-   |         --
+LL - fn foo2<T: ?Sized>() { not_sized::<Foo<T>>() }
+LL + fn foo2<T>() { not_sized::<Foo<T>>() }
+   | 
 
 error: aborting due to previous error
 
index b9a03d904af4d2d4719ae91f168b0eb64dcc853e..3985f73f118bbe7cce160205890e940813d790e5 100644 (file)
@@ -11,16 +11,17 @@ LL |     VA(W),
    = help: change the field's type to have a statically known size
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | enum E<W, X: ?Sized, Y: ?Sized, Z: ?Sized> {
-   |        --
+LL - enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
+LL + enum E<W, X: ?Sized, Y: ?Sized, Z: ?Sized> {
+   | 
 help: borrowed types always have a statically known size
    |
 LL |     VA(&W),
-   |        ^
+   |        +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     VA(Box<W>),
-   |        ^^^^ ^
+   |        ++++ +
 
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized-enum2.rs:25:11
@@ -35,16 +36,17 @@ LL |     VB{x: X},
    = help: change the field's type to have a statically known size
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | enum E<W: ?Sized, X, Y: ?Sized, Z: ?Sized> {
-   |                   --
+LL - enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
+LL + enum E<W: ?Sized, X, Y: ?Sized, Z: ?Sized> {
+   | 
 help: borrowed types always have a statically known size
    |
 LL |     VB{x: &X},
-   |           ^
+   |           +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     VB{x: Box<X>},
-   |           ^^^^ ^
+   |           ++++ +
 
 error[E0277]: the size for values of type `Y` cannot be known at compilation time
   --> $DIR/unsized-enum2.rs:27:15
@@ -59,16 +61,17 @@ LL |     VC(isize, Y),
    = help: change the field's type to have a statically known size
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | enum E<W: ?Sized, X: ?Sized, Y, Z: ?Sized> {
-   |                              --
+LL - enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
+LL + enum E<W: ?Sized, X: ?Sized, Y, Z: ?Sized> {
+   | 
 help: borrowed types always have a statically known size
    |
 LL |     VC(isize, &Y),
-   |               ^
+   |               +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     VC(isize, Box<Y>),
-   |               ^^^^ ^
+   |               ++++ +
 
 error[E0277]: the size for values of type `Z` cannot be known at compilation time
   --> $DIR/unsized-enum2.rs:29:21
@@ -83,16 +86,17 @@ LL |     VD{u: isize, x: Z},
    = help: change the field's type to have a statically known size
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z> {
-   |                                         --
+LL - enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
+LL + enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z> {
+   | 
 help: borrowed types always have a statically known size
    |
 LL |     VD{u: isize, x: &Z},
-   |                     ^
+   |                     +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     VD{u: isize, x: Box<Z>},
-   |                     ^^^^ ^
+   |                     ++++ +
 
 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
   --> $DIR/unsized-enum2.rs:33:8
@@ -106,11 +110,11 @@ LL |     VE([u8]),
 help: borrowed types always have a statically known size
    |
 LL |     VE(&[u8]),
-   |        ^
+   |        +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     VE(Box<[u8]>),
-   |        ^^^^    ^
+   |        ++++    +
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/unsized-enum2.rs:35:11
@@ -124,11 +128,11 @@ LL |     VF{x: str},
 help: borrowed types always have a statically known size
    |
 LL |     VF{x: &str},
-   |           ^
+   |           +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     VF{x: Box<str>},
-   |           ^^^^   ^
+   |           ++++   +
 
 error[E0277]: the size for values of type `[f32]` cannot be known at compilation time
   --> $DIR/unsized-enum2.rs:37:15
@@ -142,11 +146,11 @@ LL |     VG(isize, [f32]),
 help: borrowed types always have a statically known size
    |
 LL |     VG(isize, &[f32]),
-   |               ^
+   |               +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     VG(isize, Box<[f32]>),
-   |               ^^^^     ^
+   |               ++++     +
 
 error[E0277]: the size for values of type `[u32]` cannot be known at compilation time
   --> $DIR/unsized-enum2.rs:39:21
@@ -160,11 +164,11 @@ LL |     VH{u: isize, x: [u32]},
 help: borrowed types always have a statically known size
    |
 LL |     VH{u: isize, x: &[u32]},
-   |                     ^
+   |                     +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     VH{u: isize, x: Box<[u32]>},
-   |                     ^^^^     ^
+   |                     ++++     +
 
 error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known at compilation time
   --> $DIR/unsized-enum2.rs:53:8
@@ -178,11 +182,11 @@ LL |     VM(dyn Foo),
 help: borrowed types always have a statically known size
    |
 LL |     VM(&dyn Foo),
-   |        ^
+   |        +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     VM(Box<dyn Foo>),
-   |        ^^^^       ^
+   |        ++++       +
 
 error[E0277]: the size for values of type `(dyn Bar + 'static)` cannot be known at compilation time
   --> $DIR/unsized-enum2.rs:55:11
@@ -196,11 +200,11 @@ LL |     VN{x: dyn Bar},
 help: borrowed types always have a statically known size
    |
 LL |     VN{x: &dyn Bar},
-   |           ^
+   |           +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     VN{x: Box<dyn Bar>},
-   |           ^^^^       ^
+   |           ++++       +
 
 error[E0277]: the size for values of type `(dyn FooBar + 'static)` cannot be known at compilation time
   --> $DIR/unsized-enum2.rs:57:15
@@ -214,11 +218,11 @@ LL |     VO(isize, dyn FooBar),
 help: borrowed types always have a statically known size
    |
 LL |     VO(isize, &dyn FooBar),
-   |               ^
+   |               +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     VO(isize, Box<dyn FooBar>),
-   |               ^^^^          ^
+   |               ++++          +
 
 error[E0277]: the size for values of type `(dyn BarFoo + 'static)` cannot be known at compilation time
   --> $DIR/unsized-enum2.rs:59:21
@@ -232,11 +236,11 @@ LL |     VP{u: isize, x: dyn BarFoo},
 help: borrowed types always have a statically known size
    |
 LL |     VP{u: isize, x: &dyn BarFoo},
-   |                     ^
+   |                     +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     VP{u: isize, x: Box<dyn BarFoo>},
-   |                     ^^^^          ^
+   |                     ++++          +
 
 error[E0277]: the size for values of type `[i8]` cannot be known at compilation time
   --> $DIR/unsized-enum2.rs:63:8
@@ -250,11 +254,11 @@ LL |     VQ(<&'static [i8] as Deref>::Target),
 help: borrowed types always have a statically known size
    |
 LL |     VQ(&<&'static [i8] as Deref>::Target),
-   |        ^
+   |        +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     VQ(Box<<&'static [i8] as Deref>::Target>),
-   |        ^^^^                                ^
+   |        ++++                                +
 
 error[E0277]: the size for values of type `[char]` cannot be known at compilation time
   --> $DIR/unsized-enum2.rs:65:11
@@ -268,11 +272,11 @@ LL |     VR{x: <&'static [char] as Deref>::Target},
 help: borrowed types always have a statically known size
    |
 LL |     VR{x: &<&'static [char] as Deref>::Target},
-   |           ^
+   |           +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     VR{x: Box<<&'static [char] as Deref>::Target>},
-   |           ^^^^                                  ^
+   |           ++++                                  +
 
 error[E0277]: the size for values of type `[f64]` cannot be known at compilation time
   --> $DIR/unsized-enum2.rs:67:15
@@ -286,11 +290,11 @@ LL |     VS(isize, <&'static [f64] as Deref>::Target),
 help: borrowed types always have a statically known size
    |
 LL |     VS(isize, &<&'static [f64] as Deref>::Target),
-   |               ^
+   |               +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     VS(isize, Box<<&'static [f64] as Deref>::Target>),
-   |               ^^^^                                 ^
+   |               ++++                                 +
 
 error[E0277]: the size for values of type `[i32]` cannot be known at compilation time
   --> $DIR/unsized-enum2.rs:69:21
@@ -304,11 +308,11 @@ LL |     VT{u: isize, x: <&'static [i32] as Deref>::Target},
 help: borrowed types always have a statically known size
    |
 LL |     VT{u: isize, x: &<&'static [i32] as Deref>::Target},
-   |                     ^
+   |                     +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     VT{u: isize, x: Box<<&'static [i32] as Deref>::Target>},
-   |                     ^^^^                                 ^
+   |                     ++++                                 +
 
 error[E0277]: the size for values of type `(dyn PathHelper1 + 'static)` cannot be known at compilation time
   --> $DIR/unsized-enum2.rs:43:8
@@ -327,11 +331,11 @@ LL | struct Path1(dyn PathHelper1);
 help: borrowed types always have a statically known size
    |
 LL |     VI(&Path1),
-   |        ^
+   |        +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     VI(Box<Path1>),
-   |        ^^^^     ^
+   |        ++++     +
 
 error[E0277]: the size for values of type `(dyn PathHelper2 + 'static)` cannot be known at compilation time
   --> $DIR/unsized-enum2.rs:45:11
@@ -350,11 +354,11 @@ LL | struct Path2(dyn PathHelper2);
 help: borrowed types always have a statically known size
    |
 LL |     VJ{x: &Path2},
-   |           ^
+   |           +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     VJ{x: Box<Path2>},
-   |           ^^^^     ^
+   |           ++++     +
 
 error[E0277]: the size for values of type `(dyn PathHelper3 + 'static)` cannot be known at compilation time
   --> $DIR/unsized-enum2.rs:47:15
@@ -373,11 +377,11 @@ LL | struct Path3(dyn PathHelper3);
 help: borrowed types always have a statically known size
    |
 LL |     VK(isize, &Path3),
-   |               ^
+   |               +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     VK(isize, Box<Path3>),
-   |               ^^^^     ^
+   |               ++++     +
 
 error[E0277]: the size for values of type `(dyn PathHelper4 + 'static)` cannot be known at compilation time
   --> $DIR/unsized-enum2.rs:49:21
@@ -396,11 +400,11 @@ LL | struct Path4(dyn PathHelper4);
 help: borrowed types always have a statically known size
    |
 LL |     VL{u: isize, x: &Path4},
-   |                     ^
+   |                     +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     VL{u: isize, x: Box<Path4>},
-   |                     ^^^^     ^
+   |                     ++++     +
 
 error: aborting due to 20 previous errors
 
index acb8a598d2c8aba19d8f26b9898f2cb209b7393e..d81dd7f342cf0e8be8ea6d6ca9adbeebd1fa51a7 100644 (file)
@@ -9,12 +9,13 @@ LL | fn f<T: ?Sized>(t: T) {}
    = help: unsized fn params are gated as an unstable feature
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn f<T>(t: T) {}
-   |      --
+LL - fn f<T: ?Sized>(t: T) {}
+LL + fn f<T>(t: T) {}
+   | 
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL | fn f<T: ?Sized>(t: &T) {}
-   |                    ^
+   |                    +
 
 error: aborting due to previous error
 
index 99f75d8c5b3035ed1aef00b66c39ee028b37c805..7cd8383c52cbb3f923087469e63273c2985be15e 100644 (file)
@@ -18,8 +18,9 @@ LL | struct S5<Y>(Y);
    |           this could be changed to `Y: ?Sized`...
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | impl<X> S5<X> {
-   |      --
+LL - impl<X: ?Sized> S5<X> {
+LL + impl<X> S5<X> {
+   | 
 
 error: aborting due to previous error
 
index 71693b8130dee9c01fb59da27af42754a897342e..fc2df2977ce2e49b6ca4fb658ea03fa64942ac98 100644 (file)
@@ -18,8 +18,9 @@ LL | struct Foo<T> { data: T }
    |            this could be changed to `T: ?Sized`...
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn foo2<T>() { not_sized::<Foo<T>>() }
-   |         --
+LL - fn foo2<T: ?Sized>() { not_sized::<Foo<T>>() }
+LL + fn foo2<T>() { not_sized::<Foo<T>>() }
+   | 
 
 error[E0277]: the size for values of type `T` cannot be known at compilation time
   --> $DIR/unsized-struct.rs:13:24
@@ -39,8 +40,9 @@ LL | struct Bar<T: ?Sized> { data: T }
    |        ^^^
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn bar2<T>() { is_sized::<Bar<T>>() }
-   |         --
+LL - fn bar2<T: ?Sized>() { is_sized::<Bar<T>>() }
+LL + fn bar2<T>() { is_sized::<Bar<T>>() }
+   | 
 
 error: aborting due to 2 previous errors
 
index 201dbf85d20429d5634c18883713a9efde7b0d10..55cdffec8c3cf134043538f135663a6af5c657b0 100644 (file)
@@ -18,8 +18,9 @@ LL | struct S5<Y>(Y);
    |           this could be changed to `Y: ?Sized`...
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | impl<X> T3<X> for S5<X> {
-   |      --
+LL - impl<X: ?Sized> T3<X> for S5<X> {
+LL + impl<X> T3<X> for S5<X> {
+   | 
 
 error: aborting due to previous error
 
index f8f8aa8e3e9ba3ae5521c66a0c3c3a8341c2a919..7dfd0e43974a831ff3e9468b80c0cfdb7b702db1 100644 (file)
@@ -11,12 +11,13 @@ LL | impl<X: ?Sized> T2<X> for S4<X> {
    |
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | impl<X> T2<X> for S4<X> {
-   |      --
+LL - impl<X: ?Sized> T2<X> for S4<X> {
+LL + impl<X> T2<X> for S4<X> {
+   | 
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | trait T2<Z: ?Sized> {
-   |           ^^^^^^^^
+   |           ++++++++
 
 error: aborting due to previous error
 
index 10ddfe34eace65c41ed5c97a8c37ff02aa5681e0..e2331774ebe753466560f801a3f443e9f193539d 100644 (file)
@@ -11,12 +11,13 @@ LL | fn f2<X>(x: &X) {
    |
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn f1<X>(x: &X) {
-   |       --
+LL - fn f1<X: ?Sized>(x: &X) {
+LL + fn f1<X>(x: &X) {
+   | 
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | fn f2<X: ?Sized>(x: &X) {
-   |        ^^^^^^^^
+   |        ++++++++
 
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized3.rs:18:13
@@ -31,12 +32,13 @@ LL | fn f4<X: T>(x: &X) {
    |
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn f3<X: T>(x: &X) {
-   |         --
+LL - fn f3<X: ?Sized + T>(x: &X) {
+LL + fn f3<X: T>(x: &X) {
+   | 
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | fn f4<X: T + ?Sized>(x: &X) {
-   |            ^^^^^^^^
+   |            ++++++++
 
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized3.rs:33:8
@@ -56,12 +58,13 @@ LL | struct S<X: ?Sized> {
    |        ^
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn f8<X>(x1: &S<X>, x2: &S<X>) {
-   |       --
+LL - fn f8<X: ?Sized>(x1: &S<X>, x2: &S<X>) {
+LL + fn f8<X>(x1: &S<X>, x2: &S<X>) {
+   | 
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | fn f5<Y: ?Sized>(x: &Y) {}
-   |        ^^^^^^^^
+   |        ++++++++
 
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized3.rs:40:8
@@ -79,8 +82,9 @@ LL | struct S<X: ?Sized> {
    = note: only the last element of a tuple may have a dynamically sized type
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn f9<X>(x1: Box<S<X>>) {
-   |       --
+LL - fn f9<X: ?Sized>(x1: Box<S<X>>) {
+LL + fn f9<X>(x1: Box<S<X>>) {
+   | 
 
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized3.rs:45:9
@@ -99,8 +103,9 @@ LL | struct S<X: ?Sized> {
    = note: tuples must have a statically known size to be initialized
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn f10<X>(x1: Box<S<X>>) {
-   |        --
+LL - fn f10<X: ?Sized>(x1: Box<S<X>>) {
+LL + fn f10<X>(x1: Box<S<X>>) {
+   | 
 
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized3.rs:45:8
@@ -121,12 +126,13 @@ LL | struct S<X: ?Sized> {
    = note: required because it appears within the type `({integer}, S<X>)`
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn f10<X>(x1: Box<S<X>>) {
-   |        --
+LL - fn f10<X: ?Sized>(x1: Box<S<X>>) {
+LL + fn f10<X>(x1: Box<S<X>>) {
+   | 
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | fn f5<Y: ?Sized>(x: &Y) {}
-   |        ^^^^^^^^
+   |        ++++++++
 
 error: aborting due to 6 previous errors
 
index 6e5b355642932bfef4b6a4d59fac856131f6bf13..43463ff8266d60d97c6205eb6dcd18dbdf91cd41 100644 (file)
@@ -10,16 +10,17 @@ LL |     f1: X,
    = help: change the field's type to have a statically known size
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | struct S1<X> {
-   |           --
+LL - struct S1<X: ?Sized> {
+LL + struct S1<X> {
+   | 
 help: borrowed types always have a statically known size
    |
 LL |     f1: &X,
-   |         ^
+   |         +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     f1: Box<X>,
-   |         ^^^^ ^
+   |         ++++ +
 
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized5.rs:10:8
@@ -34,16 +35,17 @@ LL |     g: X,
    = help: change the field's type to have a statically known size
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | struct S2<X> {
-   |           --
+LL - struct S2<X: ?Sized> {
+LL + struct S2<X> {
+   | 
 help: borrowed types always have a statically known size
    |
 LL |     g: &X,
-   |        ^
+   |        +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     g: Box<X>,
-   |        ^^^^ ^
+   |        ++++ +
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/unsized5.rs:15:8
@@ -57,11 +59,11 @@ LL |     f: str,
 help: borrowed types always have a statically known size
    |
 LL |     f: &str,
-   |        ^
+   |        +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     f: Box<str>,
-   |        ^^^^   ^
+   |        ++++   +
 
 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
   --> $DIR/unsized5.rs:20:8
@@ -75,11 +77,11 @@ LL |     f: [u8],
 help: borrowed types always have a statically known size
    |
 LL |     f: &[u8],
-   |        ^
+   |        +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     f: Box<[u8]>,
-   |        ^^^^    ^
+   |        ++++    +
 
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized5.rs:25:8
@@ -93,16 +95,17 @@ LL |     V1(X, isize),
    = help: change the field's type to have a statically known size
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | enum E<X> {
-   |        --
+LL - enum E<X: ?Sized> {
+LL + enum E<X> {
+   | 
 help: borrowed types always have a statically known size
    |
 LL |     V1(&X, isize),
-   |        ^
+   |        +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     V1(Box<X>, isize),
-   |        ^^^^ ^
+   |        ++++ +
 
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized5.rs:29:12
@@ -116,16 +119,17 @@ LL |     V2{f1: X, f: isize},
    = help: change the field's type to have a statically known size
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | enum F<X> {
-   |        --
+LL - enum F<X: ?Sized> {
+LL + enum F<X> {
+   | 
 help: borrowed types always have a statically known size
    |
 LL |     V2{f1: &X, f: isize},
-   |            ^
+   |            +
 help: the `Box` type always has a statically known size and allocates its contents in the heap
    |
 LL |     V2{f1: Box<X>, f: isize},
-   |            ^^^^ ^
+   |            ++++ +
 
 error: aborting due to 6 previous errors
 
index 5eff89d971fbbb550a6ea7ebf7ca7ea82fe8f553..38ed50daa1d495ef4daafb2606080ab64eb54d4b 100644 (file)
@@ -11,8 +11,9 @@ LL |     let y: Y;
    = help: unsized locals are gated as an unstable feature
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn f1<W: ?Sized, X: ?Sized, Y, Z: ?Sized>(x: &X) {
-   |                             --
+LL - fn f1<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized>(x: &X) {
+LL + fn f1<W: ?Sized, X: ?Sized, Y, Z: ?Sized>(x: &X) {
+   | 
 
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized6.rs:7:12
@@ -26,8 +27,9 @@ LL |     let _: (isize, (X, isize));
    = note: only the last element of a tuple may have a dynamically sized type
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn f1<W: ?Sized, X, Y: ?Sized, Z: ?Sized>(x: &X) {
-   |                  --
+LL - fn f1<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized>(x: &X) {
+LL + fn f1<W: ?Sized, X, Y: ?Sized, Z: ?Sized>(x: &X) {
+   | 
 
 error[E0277]: the size for values of type `Z` cannot be known at compilation time
   --> $DIR/unsized6.rs:11:12
@@ -41,8 +43,9 @@ LL |     let y: (isize, (Z, usize));
    = note: only the last element of a tuple may have a dynamically sized type
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn f1<W: ?Sized, X: ?Sized, Y: ?Sized, Z>(x: &X) {
-   |                                        --
+LL - fn f1<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized>(x: &X) {
+LL + fn f1<W: ?Sized, X: ?Sized, Y: ?Sized, Z>(x: &X) {
+   | 
 
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized6.rs:15:9
@@ -56,8 +59,9 @@ LL |     let y: X;
    = help: unsized locals are gated as an unstable feature
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn f2<X, Y: ?Sized>(x: &X) {
-   |       --
+LL - fn f2<X: ?Sized, Y: ?Sized>(x: &X) {
+LL + fn f2<X, Y: ?Sized>(x: &X) {
+   | 
 
 error[E0277]: the size for values of type `Y` cannot be known at compilation time
   --> $DIR/unsized6.rs:17:12
@@ -71,8 +75,9 @@ LL |     let y: (isize, (Y, isize));
    = note: only the last element of a tuple may have a dynamically sized type
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn f2<X: ?Sized, Y>(x: &X) {
-   |                  --
+LL - fn f2<X: ?Sized, Y: ?Sized>(x: &X) {
+LL + fn f2<X: ?Sized, Y>(x: &X) {
+   | 
 
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized6.rs:22:9
@@ -86,8 +91,9 @@ LL |     let y: X = *x1;
    = help: unsized locals are gated as an unstable feature
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn f3<X>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
-   |       --
+LL - fn f3<X: ?Sized>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
+LL + fn f3<X>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
+   | 
 
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized6.rs:24:9
@@ -102,8 +108,9 @@ LL |     let y = *x2;
    = help: unsized locals are gated as an unstable feature
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn f3<X>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
-   |       --
+LL - fn f3<X: ?Sized>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
+LL + fn f3<X>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
+   | 
 
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized6.rs:26:10
@@ -118,8 +125,9 @@ LL |     let (y, z) = (*x3, 4);
    = help: unsized locals are gated as an unstable feature
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn f3<X>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
-   |       --
+LL - fn f3<X: ?Sized>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
+LL + fn f3<X>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
+   | 
 
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized6.rs:30:9
@@ -133,8 +141,9 @@ LL |     let y: X = *x1;
    = help: unsized locals are gated as an unstable feature
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn f4<X: T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
-   |         --
+LL - fn f4<X: ?Sized + T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
+LL + fn f4<X: T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
+   | 
 
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized6.rs:32:9
@@ -149,8 +158,9 @@ LL |     let y = *x2;
    = help: unsized locals are gated as an unstable feature
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn f4<X: T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
-   |         --
+LL - fn f4<X: ?Sized + T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
+LL + fn f4<X: T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
+   | 
 
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized6.rs:34:10
@@ -165,8 +175,9 @@ LL |     let (y, z) = (*x3, 4);
    = help: unsized locals are gated as an unstable feature
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn f4<X: T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
-   |         --
+LL - fn f4<X: ?Sized + T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
+LL + fn f4<X: T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
+   | 
 
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized6.rs:38:18
@@ -179,12 +190,13 @@ LL | fn g1<X: ?Sized>(x: X) {}
    = help: unsized fn params are gated as an unstable feature
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn g1<X>(x: X) {}
-   |       --
+LL - fn g1<X: ?Sized>(x: X) {}
+LL + fn g1<X>(x: X) {}
+   | 
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL | fn g1<X: ?Sized>(x: &X) {}
-   |                     ^
+   |                     +
 
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized6.rs:40:22
@@ -197,12 +209,13 @@ LL | fn g2<X: ?Sized + T>(x: X) {}
    = help: unsized fn params are gated as an unstable feature
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | fn g2<X: T>(x: X) {}
-   |         --
+LL - fn g2<X: ?Sized + T>(x: X) {}
+LL + fn g2<X: T>(x: X) {}
+   | 
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL | fn g2<X: ?Sized + T>(x: &X) {}
-   |                         ^
+   |                         +
 
 error: aborting due to 13 previous errors
 
index e0d95e212964d4a3f1af411428af0a94a54fd74c..f176b8863f8fd4144215487e8d7956b9e0bc625c 100644 (file)
@@ -11,12 +11,13 @@ LL | impl<X: ?Sized + T> T1<X> for S3<X> {
    |
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
-LL | impl<X: T> T1<X> for S3<X> {
-   |        --
+LL - impl<X: ?Sized + T> T1<X> for S3<X> {
+LL + impl<X: T> T1<X> for S3<X> {
+   | 
 help: consider relaxing the implicit `Sized` restriction
    |
 LL | trait T1<Z: T + ?Sized> {
-   |               ^^^^^^^^
+   |               ++++++++
 
 error: aborting due to previous error
 
index a29bd07ac4419eaff767ae9bf767218b7fd14b2e..5bb04b2633b60742d11385dd893533a7470258c2 100644 (file)
@@ -6,12 +6,13 @@ LL | use foo::self;
    |
 help: consider importing the module directly
    |
-LL | use foo;
-   |       --
+LL - use foo::self;
+LL + use foo;
+   | 
 help: alternatively, use the multi-path `use` syntax to import `self`
    |
 LL | use foo::{self};
-   |          ^    ^
+   |          +    +
 
 error[E0429]: `self` imports are only allowed within a { } list
   --> $DIR/use-mod-4.rs:4:13
@@ -21,12 +22,13 @@ LL | use std::mem::self;
    |
 help: consider importing the module directly
    |
-LL | use std::mem;
-   |            --
+LL - use std::mem::self;
+LL + use std::mem;
+   | 
 help: alternatively, use the multi-path `use` syntax to import `self`
    |
 LL | use std::mem::{self};
-   |               ^    ^
+   |               +    +
 
 error[E0432]: unresolved import `foo`
   --> $DIR/use-mod-4.rs:1:5
index ebb71c51293ec277d6bd4a2dd5498d423d286ecd..627cf73c3148c321ef42aa12351a647a22ac8117 100644 (file)
@@ -6,12 +6,13 @@ LL | use foo::bar::self;
    |
 help: consider importing the module directly
    |
-LL | use foo::bar;
-   |            --
+LL - use foo::bar::self;
+LL + use foo::bar;
+   | 
 help: alternatively, use the multi-path `use` syntax to import `self`
    |
 LL | use foo::bar::{self};
-   |               ^    ^
+   |               +    +
 
 error: aborting due to previous error
 
index 36fdf9c75c704f5a5a15af0e59dd6fcbdf288687..7be6e7525cbc9bca6a66930aee2034b1804e585d 100644 (file)
@@ -6,12 +6,13 @@ LL | use foo::bar::self as abc;
    |
 help: consider importing the module directly
    |
-LL | use foo::bar as abc;
-   |            --
+LL - use foo::bar::self as abc;
+LL + use foo::bar as abc;
+   | 
 help: alternatively, use the multi-path `use` syntax to import `self`
    |
 LL | use foo::bar::{self as abc};
-   |               ^           ^
+   |               +           +
 
 error: aborting due to previous error
 
index 3954da4ec29192ac9911a9f5590d946196a74dcd..9e91ff7178d98dc58261a9b7da1158dc209dbb4a 100644 (file)
@@ -11,7 +11,7 @@ LL | pub use variant_namespacing::XE::{XStruct, XTuple, XUnit};
 help: you can use `as` to change the binding name of the import
    |
 LL | pub use variant_namespacing::XE::{XStruct as OtherXStruct, XTuple, XUnit};
-   |                                   ^^^^^^^^^^^^^^^^^^^^^^^
+   |                                   ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0255]: the name `XTuple` is defined multiple times
   --> $DIR/variant-namespacing.rs:24:44
@@ -26,7 +26,7 @@ LL | pub use variant_namespacing::XE::{XStruct, XTuple, XUnit};
 help: you can use `as` to change the binding name of the import
    |
 LL | pub use variant_namespacing::XE::{XStruct, XTuple as OtherXTuple, XUnit};
-   |                                            ^^^^^^^^^^^^^^^^^^^^^
+   |                                            ~~~~~~~~~~~~~~~~~~~~~
 
 error[E0255]: the name `XUnit` is defined multiple times
   --> $DIR/variant-namespacing.rs:24:52
@@ -41,7 +41,7 @@ LL | pub use variant_namespacing::XE::{XStruct, XTuple, XUnit};
 help: you can use `as` to change the binding name of the import
    |
 LL | pub use variant_namespacing::XE::{XStruct, XTuple, XUnit as OtherXUnit};
-   |                                                    ^^^^^^^^^^^^^^^^^^^
+   |                                                    ~~~~~~~~~~~~~~~~~~~
 
 error[E0255]: the name `Struct` is defined multiple times
   --> $DIR/variant-namespacing.rs:28:13
@@ -56,7 +56,7 @@ LL | pub use E::{Struct, Tuple, Unit};
 help: you can use `as` to change the binding name of the import
    |
 LL | pub use E::{Struct as OtherStruct, Tuple, Unit};
-   |             ^^^^^^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~~~~~~
 
 error[E0255]: the name `Tuple` is defined multiple times
   --> $DIR/variant-namespacing.rs:28:21
@@ -71,7 +71,7 @@ LL | pub use E::{Struct, Tuple, Unit};
 help: you can use `as` to change the binding name of the import
    |
 LL | pub use E::{Struct, Tuple as OtherTuple, Unit};
-   |                     ^^^^^^^^^^^^^^^^^^^
+   |                     ~~~~~~~~~~~~~~~~~~~
 
 error[E0255]: the name `Unit` is defined multiple times
   --> $DIR/variant-namespacing.rs:28:28
@@ -86,7 +86,7 @@ LL | pub use E::{Struct, Tuple, Unit};
 help: you can use `as` to change the binding name of the import
    |
 LL | pub use E::{Struct, Tuple, Unit as OtherUnit};
-   |                            ^^^^^^^^^^^^^^^^^
+   |                            ~~~~~~~~~~~~~~~~~
 
 error: aborting due to 6 previous errors
 
index 096dd16c63431010da8c3a66ecb7222ec248f294..64424abbcecce2907bf7747e8cc4210bdf4fd627 100644 (file)
@@ -7,9 +7,9 @@ LL |     B(Ty::A),
 help: try using the variant's enum
    |
 LL |     B(E),
-   |       ^
+   |       ~
 LL |     B(Ty),
-   |       ^^
+   |       ~~
 
 error[E0573]: expected type, found variant `E::A`
   --> $DIR/variant-used-as-type.rs:17:6
@@ -20,9 +20,9 @@ LL | impl E::A {}
 help: try using the variant's enum
    |
 LL | impl E {}
-   |      ^
+   |      ~
 LL | impl Ty {}
-   |      ^^
+   |      ~~
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/wf/hir-wf-check-erase-regions.rs b/src/test/ui/wf/hir-wf-check-erase-regions.rs
new file mode 100644 (file)
index 0000000..bb398e5
--- /dev/null
@@ -0,0 +1,14 @@
+// Regression test for #87549.
+// compile-flags: -C incremental=tmp/wf/hir-wf-check-erase-regions
+
+pub struct Table<T, const N: usize>([Option<T>; N]);
+
+impl<'a, T, const N: usize> IntoIterator for &'a Table<T, N> {
+    type IntoIter = std::iter::Flatten<std::slice::Iter<'a, T>>; //~ ERROR `&T` is not an iterator
+    type Item = &'a T;
+
+    fn into_iter(self) -> Self::IntoIter { //~ ERROR `&T` is not an iterator
+        unimplemented!()
+    }
+}
+fn main() {}
diff --git a/src/test/ui/wf/hir-wf-check-erase-regions.stderr b/src/test/ui/wf/hir-wf-check-erase-regions.stderr
new file mode 100644 (file)
index 0000000..272a875
--- /dev/null
@@ -0,0 +1,31 @@
+error[E0277]: `&T` is not an iterator
+  --> $DIR/hir-wf-check-erase-regions.rs:7:21
+   |
+LL |     type IntoIter = std::iter::Flatten<std::slice::Iter<'a, T>>;
+   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&T` is not an iterator
+   |
+  ::: $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL
+   |
+LL | pub struct Flatten<I: Iterator<Item: IntoIterator>> {
+   |                                      ------------ required by this bound in `Flatten`
+   |
+   = help: the trait `Iterator` is not implemented for `&T`
+   = note: required because of the requirements on the impl of `IntoIterator` for `&T`
+
+error[E0277]: `&T` is not an iterator
+  --> $DIR/hir-wf-check-erase-regions.rs:10:27
+   |
+LL |     fn into_iter(self) -> Self::IntoIter {
+   |                           ^^^^^^^^^^^^^^ `&T` is not an iterator
+   |
+  ::: $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL
+   |
+LL | pub struct Flatten<I: Iterator<Item: IntoIterator>> {
+   |                                      ------------ required by this bound in `Flatten`
+   |
+   = help: the trait `Iterator` is not implemented for `&T`
+   = note: required because of the requirements on the impl of `IntoIterator` for `&T`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
index 7819110dd98b59dd857751776d03ba57b40896c1..d62a6828ca3a12f0eb68d099057ca7316ed7e388 100644 (file)
@@ -10,7 +10,7 @@ LL |     where T: ExtraCopy<U>
 help: consider further restricting type parameter `U`
    |
 LL |     where T: ExtraCopy<U>, U: std::marker::Copy
-   |                          ^^^^^^^^^^^^^^^^^^^^^^
+   |                          ++++++++++++++++++++++
 
 error: aborting due to previous error
 
index 4bfb2413fe99f8de9483d7a618ed72c69d9b6314..295037efb5427a10ddf3006a889efd15b73d4a27 100644 (file)
@@ -10,7 +10,7 @@ LL |         f: IsCopy<A>
 help: consider restricting type parameter `A`
    |
 LL | enum AnotherEnum<A: std::marker::Copy> {
-   |                   ^^^^^^^^^^^^^^^^^^^
+   |                   +++++++++++++++++++
 
 error: aborting due to previous error
 
index c8a75afbab7cbb31a243a772c3bc01d2265ceef5..496216a7fa8f9e2f078a41d34e15b0ecc4eb2785 100644 (file)
@@ -10,7 +10,7 @@ LL |     SomeVariant(IsCopy<A>)
 help: consider restricting type parameter `A`
    |
 LL | enum SomeEnum<A: std::marker::Copy> {
-   |                ^^^^^^^^^^^^^^^^^^^
+   |                +++++++++++++++++++
 
 error: aborting due to previous error
 
index e463e3db887a52f63476813e0c8b74f216f922a7..1302d0e1761f9eb59b2a8c627be90c692461d709 100644 (file)
@@ -10,7 +10,7 @@ LL | fn foo<T,U>() where T: ExtraCopy<U>
 help: consider further restricting type parameter `U`
    |
 LL | fn foo<T,U>() where T: ExtraCopy<U>, U: std::marker::Copy
-   |                                    ^^^^^^^^^^^^^^^^^^^^^^
+   |                                    ++++++++++++++++++++++
 
 error[E0277]: the size for values of type `(dyn Copy + 'static)` cannot be known at compilation time
   --> $DIR/wf-fn-where-clause.rs:12:16
index f3b32ad3f7e85d27399c8e9a574d4aad8789606a..3f324190b7b6bcd1fff6b40646c5feb5c361342f 100644 (file)
@@ -1,10 +1,10 @@
 error[E0309]: the parameter type `T` may not live long enough
-  --> $DIR/wf-impl-associated-type-region.rs:10:5
+  --> $DIR/wf-impl-associated-type-region.rs:10:16
    |
 LL | impl<'a, T> Foo<'a> for T {
    |          - help: consider adding an explicit lifetime bound...: `T: 'a`
 LL |     type Bar = &'a T;
-   |     ^^^^^^^^^^^^^^^^^ ...so that the reference type `&'a T` does not outlive the data it points at
+   |                ^^^^^ ...so that the reference type `&'a T` does not outlive the data it points at
 
 error: aborting due to previous error
 
index 0d4480fbf26e012956677e35924f018ba3231ea1..50b4e5d8e7e98d3e8650a8f17d32cbdc9a432a17 100644 (file)
@@ -10,7 +10,7 @@ LL |     type Bar = MySet<T>;
 help: consider restricting type parameter `T`
    |
 LL | impl<T: MyHash> Foo for T {
-   |       ^^^^^^^^
+   |       ++++++++
 
 error: aborting due to previous error
 
index ca90e9222dea9c9f29773f7a5153a9cd4ddbc47b..94899e21876af388f8e9b7655b567bd2cad39646 100644 (file)
@@ -10,7 +10,7 @@ LL | fn bar<T>(_: &MustBeCopy<T>)
 help: consider restricting type parameter `T`
    |
 LL | fn bar<T: std::marker::Copy>(_: &MustBeCopy<T>)
-   |         ^^^^^^^^^^^^^^^^^^^
+   |         +++++++++++++++++++
 
 error: aborting due to previous error
 
index f9a962578e65086a6fea2f229367a8bb7cd07ff3..731331c894aaff606ff23d50333b62b9427bb41a 100644 (file)
@@ -10,7 +10,7 @@ LL | fn bar<T>() -> MustBeCopy<T>
 help: consider restricting type parameter `T`
    |
 LL | fn bar<T: std::marker::Copy>() -> MustBeCopy<T>
-   |         ^^^^^^^^^^^^^^^^^^^
+   |         +++++++++++++++++++
 
 error: aborting due to previous error
 
index 20aa97707105e2156079225216800fd2bb60229f..e41fe321142bea46983572a1a9c189590285a4f1 100644 (file)
@@ -10,7 +10,7 @@ LL |     x: fn(MustBeCopy<T>)
 help: consider restricting type parameter `T`
    |
 LL | struct Bar<T: std::marker::Copy> {
-   |             ^^^^^^^^^^^^^^^^^^^
+   |             +++++++++++++++++++
 
 error: aborting due to previous error
 
index 48af696c3a7527aac89b520c901bd24bc0c5ff98..36ee740de311bd466b8b6094c1010f85651ee6e3 100644 (file)
@@ -10,7 +10,7 @@ LL |     x: fn() -> MustBeCopy<T>
 help: consider restricting type parameter `T`
    |
 LL | struct Foo<T: std::marker::Copy> {
-   |             ^^^^^^^^^^^^^^^^^^^
+   |             +++++++++++++++++++
 
 error: aborting due to previous error
 
index 7cb9af11d799bee04f835fb3bccd770c56d2a55b..5d9501bac853671a06a3beebe66c361e3358becc 100644 (file)
@@ -10,7 +10,7 @@ LL |     where T: MustBeCopy<U>
 help: consider further restricting type parameter `U`
    |
 LL |     where T: MustBeCopy<U>, U: std::marker::Copy
-   |                           ^^^^^^^^^^^^^^^^^^^^^^
+   |                           ++++++++++++++++++++++
 
 error: aborting due to previous error
 
index b3b919a569ed41fa0b08a79355bab4088a6dbb55..abf53010a60b5e7a9d9a97ffcf96bb07ffeec72e 100644 (file)
@@ -10,7 +10,7 @@ LL |     x: dyn Object<MustBeCopy<T>>
 help: consider restricting type parameter `T`
    |
 LL | struct Bar<T: std::marker::Copy> {
-   |             ^^^^^^^^^^^^^^^^^^^
+   |             +++++++++++++++++++
 
 error: aborting due to previous error
 
index 8e0ce557e6b43cecb728a6164d01eb3090e42196..097d23ddc5fe90939da5c845c5075238a77bbb94 100644 (file)
@@ -10,7 +10,7 @@ LL |     fn foo(self) where T: ExtraCopy<U>
 help: consider restricting type parameter `U`
    |
 LL | impl<T,U: std::marker::Copy> Foo<T,U> {
-   |         ^^^^^^^^^^^^^^^^^^^
+   |         +++++++++++++++++++
 
 error: aborting due to previous error
 
index bf8077ba88f6b4e0f2fe68269fd4e4f21194979e..5767cae5bc94684cb829d4cbf1c9dd7b524e83f6 100644 (file)
@@ -10,7 +10,7 @@ LL | impl<T,U> Foo<T,U> where T: ExtraCopy<U>
 help: consider further restricting type parameter `U`
    |
 LL | impl<T,U> Foo<T,U> where T: ExtraCopy<U>, U: std::marker::Copy
-   |                                         ^^^^^^^^^^^^^^^^^^^^^^
+   |                                         ++++++++++++++++++++++
 
 error: aborting due to previous error
 
index 4c25ab9593958ddf8d26de9dc9da0e548ebc6d21..68c1e9091d753d653d07e8c165a4be0ab1b125ec 100644 (file)
@@ -1,18 +1,18 @@
 error[E0309]: the parameter type `T` may not live long enough
-  --> $DIR/wf-outlives-ty-in-fn-or-trait.rs:9:5
+  --> $DIR/wf-outlives-ty-in-fn-or-trait.rs:9:16
    |
 LL | impl<'a, T> Trait<'a, T> for usize {
    |          - help: consider adding an explicit lifetime bound...: `T: 'a`
 LL |     type Out = &'a fn(T);
-   |     ^^^^^^^^^^^^^^^^^^^^^ ...so that the reference type `&'a fn(T)` does not outlive the data it points at
+   |                ^^^^^^^^^ ...so that the reference type `&'a fn(T)` does not outlive the data it points at
 
 error[E0309]: the parameter type `T` may not live long enough
-  --> $DIR/wf-outlives-ty-in-fn-or-trait.rs:19:5
+  --> $DIR/wf-outlives-ty-in-fn-or-trait.rs:19:16
    |
 LL | impl<'a, T> Trait<'a, T> for u32 {
    |          - help: consider adding an explicit lifetime bound...: `T: 'a`
 LL |     type Out = &'a dyn Baz<T>;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the reference type `&'a (dyn Baz<T> + 'a)` does not outlive the data it points at
+   |                ^^^^^^^^^^^^^^ ...so that the reference type `&'a (dyn Baz<T> + 'a)` does not outlive the data it points at
 
 error: aborting due to 2 previous errors
 
index e85f3591438a9e5dd2290b8c140412ec301d0af9..6d72ef7035557383386e8f0387b07bdfc4c47648 100644 (file)
@@ -10,7 +10,7 @@ LL |     where T: ExtraCopy<U>
 help: consider further restricting type parameter `U`
    |
 LL |     where T: ExtraCopy<U>, U: std::marker::Copy
-   |                          ^^^^^^^^^^^^^^^^^^^^^^
+   |                          ++++++++++++++++++++++
 
 error: aborting due to previous error
 
index 62ef6bb60c7a24af65ea6f7b10c4b7e128b48473..e4c322163d7de5f8e0b1177cb0dec9dba78f42dc 100644 (file)
@@ -10,7 +10,7 @@ LL |     data: IsCopy<A>
 help: consider restricting type parameter `A`
    |
 LL | struct SomeStruct<A: std::marker::Copy> {
-   |                    ^^^^^^^^^^^^^^^^^^^
+   |                    +++++++++++++++++++
 
 error: aborting due to previous error
 
index 51adfdb6bd2a9c77129f1b06227ca4da22d4cfb8..404f3400a48bc29dc8ded3ee9a31c9d86a2b5f93 100644 (file)
@@ -10,7 +10,7 @@ LL |     type Type1: ExtraCopy<T>;
 help: consider restricting type parameter `T`
    |
 LL | trait SomeTrait<T: std::marker::Copy> {
-   |                  ^^^^^^^^^^^^^^^^^^^
+   |                  +++++++++++++++++++
 
 error: aborting due to previous error
 
index ae681ba6c9bb5c573fd8f7e3fe555cdd07370e3b..6e2cc8aba4b72d104a97dc891cc3438978223a02 100644 (file)
@@ -1,8 +1,8 @@
 error[E0309]: the associated type `<Self as SomeTrait<'a>>::Type1` may not live long enough
-  --> $DIR/wf-trait-associated-type-region.rs:9:5
+  --> $DIR/wf-trait-associated-type-region.rs:9:18
    |
 LL |     type Type2 = &'a Self::Type1;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ^^^^^^^^^^^^^^^
    |
    = help: consider adding an explicit lifetime bound `<Self as SomeTrait<'a>>::Type1: 'a`...
    = note: ...so that the reference type `&'a <Self as SomeTrait<'a>>::Type1` does not outlive the data it points at
index d1c2c65043d21b8ee8fe2ec862cc504bd8d4743a..dc1cd3d17c3079f5dcd053c5e98f415ba8bab907 100644 (file)
@@ -10,7 +10,7 @@ LL |     type Type2 = (IsCopy<Self::Type1>, bool);
 help: consider further restricting the associated type
    |
 LL | trait SomeTrait where <Self as SomeTrait>::Type1: Copy {
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ++++++++++++++++++++++++++++++++++++++
 
 error: aborting due to previous error
 
index c9e818f8e7dc8d62bb08b84a770e4642cdcc3dce..4b77d48e87c77f497d44627bdbe8db0e4f3ed845 100644 (file)
@@ -10,7 +10,7 @@ LL |     where T: ExtraCopy<U>
 help: consider further restricting type parameter `U`
    |
 LL |     where T: ExtraCopy<U>, U: std::marker::Copy
-   |                          ^^^^^^^^^^^^^^^^^^^^^^
+   |                          ++++++++++++++++++++++
 
 error: aborting due to previous error
 
index 2a129538f76333bbfb69cf8b829a255f8947227a..81b0dd04d29fa26c53eda5dee96d45f3e606882c 100644 (file)
@@ -10,7 +10,7 @@ LL |     fn bar(&self, x: &Bar<Self>) {
 help: consider further restricting `Self`
    |
 LL |     fn bar(&self, x: &Bar<Self>) where Self: Eq {
-   |                                  ^^^^^^^^^^^^^^
+   |                                  ++++++++++++++
 
 error: aborting due to previous error
 
index 4382a8fe819eb0f0ca7bf5b25e63537b4b568fda..d0da0ee5860e37b4ac219b2888da8c77741b9d54 100644 (file)
@@ -10,7 +10,7 @@ LL |     fn bar(&self) -> Bar<Self> {
 help: consider further restricting `Self`
    |
 LL |     fn bar(&self) -> Bar<Self> where Self: Eq {
-   |                                ^^^^^^^^^^^^^^
+   |                                ++++++++++++++
 
 error: aborting due to previous error
 
index 16c0424915a5d843899684377f888e9a3174c0f9..1572d06932596328f1e4c015eb7855220b963341 100644 (file)
@@ -10,7 +10,7 @@ LL |     fn bar<A>(&self) where A: Bar<Self> {
 help: consider further restricting `Self`
    |
 LL |     fn bar<A>(&self) where A: Bar<Self>, Self: Eq {
-   |                                        ^^^^^^^^^^
+   |                                        ++++++++++
 
 error: aborting due to previous error
 
index 7693aa6d2d583ed64a597ddc705a1488cea19216..3b366605b75ffd6c6310fc33f0257485fef20608 100644 (file)
@@ -10,7 +10,7 @@ LL |     fn bar(&self, x: &Bar<Self>);
 help: consider further restricting `Self`
    |
 LL |     fn bar(&self, x: &Bar<Self>) where Self: Eq;
-   |                                  ^^^^^^^^^^^^^^
+   |                                  ++++++++++++++
 
 error: aborting due to previous error
 
index bd0bbc09a8b63344857e1c0c6b0736756a08645e..d289501d1630df7d08e939c77769db32dabeb838 100644 (file)
@@ -10,7 +10,7 @@ LL |     fn bar(&self) -> &Bar<Self>;
 help: consider further restricting `Self`
    |
 LL |     fn bar(&self) -> &Bar<Self> where Self: Eq;
-   |                                 ^^^^^^^^^^^^^^
+   |                                 ++++++++++++++
 
 error: aborting due to previous error
 
index 62e5318802274fd9043046c066b531f21fee2027..ad517511a63ef470f532b0e2167ffbd8419639d7 100644 (file)
@@ -10,7 +10,7 @@ LL |     fn bar(&self) where Self: Sized, Bar<Self>: Copy;
 help: consider further restricting `Self`
    |
 LL |     fn bar(&self) where Self: Sized, Bar<Self>: Copy, Self: Eq;
-   |                                                     ^^^^^^^^^^
+   |                                                     ++++++++++
 
 error: aborting due to previous error
 
index 6926983527178f1e459a26976adc67abf8af982c..c3016cff0f537e0d6b3b875d379d566c8cf2b828 100644 (file)
@@ -10,7 +10,7 @@ LL | trait SomeTrait<T>: ExtraCopy<T> {
 help: consider restricting type parameter `T`
    |
 LL | trait SomeTrait<T: std::marker::Copy>: ExtraCopy<T> {
-   |                  ^^^^^^^^^^^^^^^^^^^
+   |                  +++++++++++++++++++
 
 error: aborting due to previous error
 
index 356ba347cc36a6eaf66729f78a696fbdfe93f3ed..08945c5fdc1e9687240d109f4f3c580ba50981c7 100644 (file)
@@ -10,7 +10,7 @@ LL |         require_copy(self.x);
 help: consider restricting type parameter `T`
    |
 LL | impl<T: std::marker::Copy> Foo<T> {
-   |       ^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++++++++
 
 error: aborting due to previous error
 
index d84242cfe12b832761985ed60edfeea3322c1510..1a54ec25291226011efb1bc1586a675ef07f191d 100644 (file)
@@ -10,7 +10,7 @@ LL |         require_copy(self.x);
 help: consider restricting type parameter `T`
    |
 LL | impl<T: std::marker::Copy> Foo<T> for Bar<T> {
-   |       ^^^^^^^^^^^^^^^^^^^
+   |       +++++++++++++++++++
 
 error: aborting due to previous error
 
index 5498dae718f1e46605f70f7942a15b958fa6c4d2..8e240a0e40d475f01263263760f203e8aefbf5fd 100644 (file)
@@ -9,7 +9,7 @@ LL | fn mk_int() -> usize { let i: isize = 3; return i; }
 help: you can convert an `isize` to a `usize` and panic if the converted value doesn't fit
    |
 LL | fn mk_int() -> usize { let i: isize = 3; return i.try_into().unwrap(); }
-   |                                                 ^^^^^^^^^^^^^^^^^^^^^
+   |                                                 ~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index cc17afbb0067b1f57d8882640f63b2168d5b7624..b51439fd8b505d4800a257acfecf3c69f81e35cf 160000 (submodule)
@@ -1 +1 @@
-Subproject commit cc17afbb0067b1f57d8882640f63b2168d5b7624
+Subproject commit b51439fd8b505d4800a257acfecf3c69f81e35cf
index e40668ed339f2ef40bf41e80d0fab5c881427110..04b1dc93d4a4241b811ebba75729a2defc99d5eb 100644 (file)
@@ -8,11 +8,11 @@ LL |     a += a + 1;
 help: did you mean `a = a + 1` or `a = a + a + 1`? Consider replacing it with
    |
 LL |     a += 1;
-   |     ^^^^^^
+   |     ~~~~~~
 help: or
    |
 LL |     a = a + a + 1;
-   |     ^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~
 
 error: variable appears on both sides of an assignment operation
   --> $DIR/assign_ops2.rs:6:5
@@ -23,11 +23,11 @@ LL |     a += 1 + a;
 help: did you mean `a = a + 1` or `a = a + 1 + a`? Consider replacing it with
    |
 LL |     a += 1;
-   |     ^^^^^^
+   |     ~~~~~~
 help: or
    |
 LL |     a = a + 1 + a;
-   |     ^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~
 
 error: variable appears on both sides of an assignment operation
   --> $DIR/assign_ops2.rs:7:5
@@ -38,11 +38,11 @@ LL |     a -= a - 1;
 help: did you mean `a = a - 1` or `a = a - (a - 1)`? Consider replacing it with
    |
 LL |     a -= 1;
-   |     ^^^^^^
+   |     ~~~~~~
 help: or
    |
 LL |     a = a - (a - 1);
-   |     ^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~
 
 error: variable appears on both sides of an assignment operation
   --> $DIR/assign_ops2.rs:8:5
@@ -53,11 +53,11 @@ LL |     a *= a * 99;
 help: did you mean `a = a * 99` or `a = a * a * 99`? Consider replacing it with
    |
 LL |     a *= 99;
-   |     ^^^^^^^
+   |     ~~~~~~~
 help: or
    |
 LL |     a = a * a * 99;
-   |     ^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~
 
 error: variable appears on both sides of an assignment operation
   --> $DIR/assign_ops2.rs:9:5
@@ -68,11 +68,11 @@ LL |     a *= 42 * a;
 help: did you mean `a = a * 42` or `a = a * 42 * a`? Consider replacing it with
    |
 LL |     a *= 42;
-   |     ^^^^^^^
+   |     ~~~~~~~
 help: or
    |
 LL |     a = a * 42 * a;
-   |     ^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~
 
 error: variable appears on both sides of an assignment operation
   --> $DIR/assign_ops2.rs:10:5
@@ -83,11 +83,11 @@ LL |     a /= a / 2;
 help: did you mean `a = a / 2` or `a = a / (a / 2)`? Consider replacing it with
    |
 LL |     a /= 2;
-   |     ^^^^^^
+   |     ~~~~~~
 help: or
    |
 LL |     a = a / (a / 2);
-   |     ^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~
 
 error: variable appears on both sides of an assignment operation
   --> $DIR/assign_ops2.rs:11:5
@@ -98,11 +98,11 @@ LL |     a %= a % 5;
 help: did you mean `a = a % 5` or `a = a % (a % 5)`? Consider replacing it with
    |
 LL |     a %= 5;
-   |     ^^^^^^
+   |     ~~~~~~
 help: or
    |
 LL |     a = a % (a % 5);
-   |     ^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~
 
 error: variable appears on both sides of an assignment operation
   --> $DIR/assign_ops2.rs:12:5
@@ -113,11 +113,11 @@ LL |     a &= a & 1;
 help: did you mean `a = a & 1` or `a = a & a & 1`? Consider replacing it with
    |
 LL |     a &= 1;
-   |     ^^^^^^
+   |     ~~~~~~
 help: or
    |
 LL |     a = a & a & 1;
-   |     ^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~
 
 error: variable appears on both sides of an assignment operation
   --> $DIR/assign_ops2.rs:13:5
@@ -128,11 +128,11 @@ LL |     a *= a * a;
 help: did you mean `a = a * a` or `a = a * a * a`? Consider replacing it with
    |
 LL |     a *= a;
-   |     ^^^^^^
+   |     ~~~~~~
 help: or
    |
 LL |     a = a * a * a;
-   |     ^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~
 
 error: manual implementation of an assign operation
   --> $DIR/assign_ops2.rs:50:5
index 17d0c3751064ff2b2ddf604c4dc78af7f6d04676..3f2051458f677c219930503943f5ef00ae44224a 100644 (file)
@@ -14,9 +14,9 @@ LL |  |     };
    = note: `-D clippy::async-yields-async` implied by `-D warnings`
 help: consider awaiting this value
    |
-LL |         async {
-LL |             3
-LL |         }.await
+LL ~         async {
+LL +             3
+LL +         }.await
    |
 
 error: an async construct yields a type which is itself awaitable
@@ -47,9 +47,9 @@ LL |  |     };
    |
 help: consider awaiting this value
    |
-LL |         async {
-LL |             3
-LL |         }.await
+LL ~         async {
+LL +             3
+LL +         }.await
    |
 
 error: an async construct yields a type which is itself awaitable
index 50ce2f4051e008df976e2ed16b743f2d4d174d40..e4f605a4de3059ae15e3230b72f9dc143da2c70a 100644 (file)
@@ -12,7 +12,7 @@ LL | #![deny(clippy::bind_instead_of_map)]
 help: try this
    |
 LL |     let _ = Some("42").map(|s| if s.len() < 42 { 0 } else { s.len() });
-   |                        ^^^                       ^          ^^^^^^^
+   |                        ~~~                       ~          ~~~~~~~
 
 error: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`
   --> $DIR/bind_instead_of_map_multipart.rs:8:13
@@ -23,7 +23,7 @@ LL |     let _ = Ok::<_, ()>("42").and_then(|s| if s.len() < 42 { Ok(0) } else {
 help: try this
    |
 LL |     let _ = Ok::<_, ()>("42").map(|s| if s.len() < 42 { 0 } else { s.len() });
-   |                               ^^^                       ^          ^^^^^^^
+   |                               ~~~                       ~          ~~~~~~~
 
 error: using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)`
   --> $DIR/bind_instead_of_map_multipart.rs:11:13
@@ -34,7 +34,7 @@ LL |     let _ = Err::<(), _>("42").or_else(|s| if s.len() < 42 { Err(s.len() +
 help: try this
    |
 LL |     let _ = Err::<(), _>("42").map_err(|s| if s.len() < 42 { s.len() + 20 } else { s.len() });
-   |                                ^^^^^^^                       ^^^^^^^^^^^^          ^^^^^^^
+   |                                ~~~~~~~                       ~~~~~~~~~~~~          ~~~~~~~
 
 error: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
   --> $DIR/bind_instead_of_map_multipart.rs:19:5
@@ -50,10 +50,10 @@ LL | |     });
    |
 help: try this
    |
-LL |     Some("42").map(|s| {
+LL ~     Some("42").map(|s| {
 LL |         if {
 LL |             if s == "43" {
-LL |                 return 43;
+LL ~                 return 43;
 LL |             }
 LL |             s == "42"
  ...
@@ -67,7 +67,7 @@ LL |     let _ = Some("").and_then(|s| if s.len() == 20 { Some(m!()) } else { So
 help: try this
    |
 LL |     let _ = Some("").map(|s| if s.len() == 20 { m!() } else { Some(20) });
-   |                      ^^^                        ^^^^          ^^^^^^^^
+   |                      ~~~                        ~~~~          ~~~~~~~~
 
 error: aborting due to 5 previous errors
 
index 9328492733fd8ce480d45612373267aee5f2024b..079f2feb5c4868b46079ba2b2e1c9d7d24d8808a 100644 (file)
@@ -10,10 +10,10 @@ LL | |     } {
    = note: `-D clippy::blocks-in-if-conditions` implied by `-D warnings`
 help: try
    |
-LL |     let res = {
-LL |         let x = 3;
-LL |         x == 3
-LL |     }; if res {
+LL ~     let res = {
+LL +         let x = 3;
+LL +         x == 3
+LL ~     }; if res {
    |
 
 error: omit braces around single expression condition
index 271fcd8b6c129fa87203db8f8f04a4cd765ad93a..e3c1bbee994238afed1c34a98822c82a029205b1 100644 (file)
@@ -15,10 +15,10 @@ LL | #![deny(clippy::if_same_then_else, clippy::branches_sharing_code)]
    = note: The end suggestion probably needs some adjustments to use the expression result correctly
 help: consider moving the end statements out like this
    |
-LL |     }
-LL |     let result = false;
-LL |     println!("Block end!");
-LL |     result;
+LL ~     }
+LL +     let result = false;
+LL +     println!("Block end!");
+LL ~     result;
    |
 
 error: all if blocks contain the same code at the end
@@ -30,8 +30,8 @@ LL | |     }
    |
 help: consider moving the end statements out like this
    |
-LL |     }
-LL |     println!("Same end of block");
+LL ~     }
+LL +     println!("Same end of block");
    |
 
 error: all if blocks contain the same code at the end
@@ -46,11 +46,11 @@ LL | |     }
    |
 help: consider moving the end statements out like this
    |
-LL |     }
-LL |     println!(
-LL |         "I'm moveable because I know: `outer_scope_value`: '{}'",
-LL |         outer_scope_value
-LL |     );
+LL ~     }
+LL +     println!(
+LL +         "I'm moveable because I know: `outer_scope_value`: '{}'",
+LL +         outer_scope_value
+LL +     );
    |
 
 error: all if blocks contain the same code at the end
@@ -62,8 +62,8 @@ LL | |         }
    |
 help: consider moving the end statements out like this
    |
-LL |         }
-LL |         println!("Hello World");
+LL ~         }
+LL +         println!("Hello World");
    |
 
 error: all if blocks contain the same code at the end
@@ -78,9 +78,9 @@ LL | |     }
    = warning: Some moved values might need to be renamed to avoid wrong references
 help: consider moving the end statements out like this
    |
-LL |     }
-LL |     let later_used_value = "A string value";
-LL |     println!("{}", later_used_value);
+LL ~     }
+LL +     let later_used_value = "A string value";
+LL +     println!("{}", later_used_value);
    |
 
 error: all if blocks contain the same code at the end
@@ -94,9 +94,9 @@ LL | |     }
    = warning: Some moved values might need to be renamed to avoid wrong references
 help: consider moving the end statements out like this
    |
-LL |     }
-LL |     let simple_examples = "I now identify as a &str :)";
-LL |     println!("This is the new simple_example: {}", simple_examples);
+LL ~     }
+LL +     let simple_examples = "I now identify as a &str :)";
+LL +     println!("This is the new simple_example: {}", simple_examples);
    |
 
 error: all if blocks contain the same code at the end
@@ -109,8 +109,8 @@ LL | |     };
    = note: The end suggestion probably needs some adjustments to use the expression result correctly
 help: consider moving the end statements out like this
    |
-LL |     }
-LL |     x << 2;
+LL ~     }
+LL ~     x << 2;
    |
 
 error: all if blocks contain the same code at the end
@@ -123,8 +123,8 @@ LL | |     }
    = note: The end suggestion probably needs some adjustments to use the expression result correctly
 help: consider moving the end statements out like this
    |
-LL |     }
-LL |     x * 4
+LL ~     }
+LL +     x * 4
    |
 
 error: all if blocks contain the same code at the end
@@ -135,8 +135,8 @@ LL |     if x == 17 { b = 1; a = 0x99; } else { a = 0x99; }
    |
 help: consider moving the end statements out like this
    |
-LL |     if x == 17 { b = 1; a = 0x99; } else { }
-LL |     a = 0x99;
+LL ~     if x == 17 { b = 1; a = 0x99; } else { }
+LL +     a = 0x99;
    |
 
 error: aborting due to 9 previous errors
index 15867e9ea020ac09d5aa280e761f622be9229e13..8d78fa5de7e498b5e436346570295397bd8011e2 100644 (file)
@@ -12,8 +12,8 @@ LL | #![deny(clippy::if_same_then_else, clippy::branches_sharing_code)]
    |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: consider moving the start statements out like this
    |
-LL |     println!("Hello World!");
-LL |     if true {
+LL ~     println!("Hello World!");
+LL +     if true {
    |
 
 error: all if blocks contain the same code at the start
@@ -28,10 +28,10 @@ LL | |         let _z = y;
    = warning: Some moved values might need to be renamed to avoid wrong references
 help: consider moving the start statements out like this
    |
-LL |     let y = 9;
-LL |     println!("The value y was set to: `{}`", y);
-LL |     let _z = y;
-LL |     if x == 0 {
+LL ~     let y = 9;
+LL +     println!("The value y was set to: `{}`", y);
+LL +     let _z = y;
+LL +     if x == 0 {
    |
 
 error: all if blocks contain the same code at the start
@@ -43,8 +43,8 @@ LL | |         let y = 16;
    |
 help: consider moving the start statements out like this
    |
-LL |     let y = 16;
-LL |     let _ = if x == 7 {
+LL ~     let y = 16;
+LL +     let _ = if x == 7 {
    |
 
 error: all if blocks contain the same code at the start
@@ -58,9 +58,9 @@ LL | |         println!("Str: {}", used_value_name);
    = warning: Some moved values might need to be renamed to avoid wrong references
 help: consider moving the start statements out like this
    |
-LL |     let used_value_name = "Different type";
-LL |     println!("Str: {}", used_value_name);
-LL |     if x == 10 {
+LL ~     let used_value_name = "Different type";
+LL +     println!("Str: {}", used_value_name);
+LL +     if x == 10 {
    |
 
 error: all if blocks contain the same code at the start
@@ -74,9 +74,9 @@ LL | |         println!("I'm also moveable");
    = warning: Some moved values might need to be renamed to avoid wrong references
 help: consider moving the start statements out like this
    |
-LL |     let can_be_overridden = "Move me";
-LL |     println!("I'm also moveable");
-LL |     if x == 11 {
+LL ~     let can_be_overridden = "Move me";
+LL +     println!("I'm also moveable");
+LL +     if x == 11 {
    |
 
 error: all if blocks contain the same code at the start
@@ -89,9 +89,9 @@ LL | |         println!("Because `IF_SAME_THEN_ELSE` is allowed here");
    |
 help: consider moving the start statements out like this
    |
-LL |     println!("This should trigger the `SHARED_CODE_IN_IF_BLOCKS` lint.");
-LL |     println!("Because `IF_SAME_THEN_ELSE` is allowed here");
-LL |     if x == 2020 {
+LL ~     println!("This should trigger the `SHARED_CODE_IN_IF_BLOCKS` lint.");
+LL +     println!("Because `IF_SAME_THEN_ELSE` is allowed here");
+LL +     if x == 2020 {
    |
 
 error: this `if` has identical blocks
index 212cfb2f1d1803f3ef7b96314a95b09b86dbbfbe..1db2343d3fe971b7830b1808785cde5751dc4823 100644 (file)
@@ -20,15 +20,15 @@ LL | |     }
    | |_____^
 help: consider moving the start statements out like this
    |
-LL |     let t = 7;
-LL |     let _overlap_start = t * 2;
-LL |     let _overlap_end = 2 * t;
-LL |     if x == 7 {
+LL ~     let t = 7;
+LL +     let _overlap_start = t * 2;
+LL +     let _overlap_end = 2 * t;
+LL +     if x == 7 {
    |
 help: and consider moving the end statements out like this
    |
-LL |     }
-LL |     let _u = 9;
+LL ~     }
+LL +     let _u = 9;
    |
 
 error: all if blocks contain the same code at the start and the end. Here at the start
@@ -50,16 +50,16 @@ LL | |     }
    = warning: Some moved values might need to be renamed to avoid wrong references
 help: consider moving the start statements out like this
    |
-LL |     let r = 7;
-LL |     let _overlap_start = r;
-LL |     let _overlap_middle = r * r;
-LL |     if x == 99 {
+LL ~     let r = 7;
+LL +     let _overlap_start = r;
+LL +     let _overlap_middle = r * r;
+LL +     if x == 99 {
    |
 help: and consider moving the end statements out like this
    |
-LL |     }
-LL |     let _overlap_end = r * r * r;
-LL |     let z = "end";
+LL ~     }
+LL +     let _overlap_end = r * r * r;
+LL +     let z = "end";
    |
 
 error: all if blocks contain the same code at the start and the end. Here at the start
@@ -85,19 +85,19 @@ LL | |     }
    = warning: Some moved values might need to be renamed to avoid wrong references
 help: consider moving the start statements out like this
    |
-LL |     let a = 0xcafe;
-LL |     let b = 0xffff00ff;
-LL |     let e_id = gen_id(a, b);
-LL |     if (x > 7 && y < 13) || (x + y) % 2 == 1 {
+LL ~     let a = 0xcafe;
+LL +     let b = 0xffff00ff;
+LL +     let e_id = gen_id(a, b);
+LL +     if (x > 7 && y < 13) || (x + y) % 2 == 1 {
    |
 help: and consider moving the end statements out like this
    |
-LL |     }
-LL |     let pack = DataPack {
-LL |         id: e_id,
-LL |         name: "Player 1".to_string(),
-LL |         some_data: vec![0x12, 0x34, 0x56, 0x78, 0x90],
-LL |     };
+LL ~     }
+LL +     let pack = DataPack {
+LL +         id: e_id,
+LL +         name: "Player 1".to_string(),
+LL +         some_data: vec![0x12, 0x34, 0x56, 0x78, 0x90],
+LL +     };
  ...
 
 error: all if blocks contain the same code at the start and the end. Here at the start
@@ -116,13 +116,13 @@ LL | |     };
    = note: The end suggestion probably needs some adjustments to use the expression result correctly
 help: consider moving the start statements out like this
    |
-LL |     let _ = 19;
-LL |     let _ = if x == 7 {
+LL ~     let _ = 19;
+LL +     let _ = if x == 7 {
    |
 help: and consider moving the end statements out like this
    |
-LL |     }
-LL |     x << 2;
+LL ~     }
+LL ~     x << 2;
    |
 
 error: all if blocks contain the same code at the start and the end. Here at the start
@@ -141,13 +141,13 @@ LL | |     }
    = note: The end suggestion probably needs some adjustments to use the expression result correctly
 help: consider moving the start statements out like this
    |
-LL |     let _ = 17;
-LL |     if x == 9 {
+LL ~     let _ = 17;
+LL +     if x == 9 {
    |
 help: and consider moving the end statements out like this
    |
-LL |     }
-LL |     x * 4
+LL ~     }
+LL +     x * 4
    |
 
 error: aborting due to 5 previous errors
index ee3e11ae565d405435cafdbae0e27cf845698ee6..6970f66097908ee23aa202b1f86370f6cd742646 100644 (file)
@@ -12,9 +12,9 @@ LL | |     }
    = note: `-D clippy::collapsible-else-if` implied by `-D warnings`
 help: collapse nested if block
    |
-LL |     } else if y == "world" {
-LL |         println!("world!")
-LL |     }
+LL ~     } else if y == "world" {
+LL +         println!("world!")
+LL +     }
    |
 
 error: this `else { if .. }` block can be collapsed
@@ -30,9 +30,9 @@ LL | |     }
    |
 help: collapse nested if block
    |
-LL |     } else if let Some(42) = Some(42) {
-LL |         println!("world!")
-LL |     }
+LL ~     } else if let Some(42) = Some(42) {
+LL +         println!("world!")
+LL +     }
    |
 
 error: this `else { if .. }` block can be collapsed
@@ -50,12 +50,12 @@ LL | |     }
    |
 help: collapse nested if block
    |
-LL |     } else if y == "world" {
-LL |         println!("world")
-LL |     }
-LL |     else {
-LL |         println!("!")
-LL |     }
+LL ~     } else if y == "world" {
+LL +         println!("world")
+LL +     }
+LL +     else {
+LL +         println!("!")
+LL +     }
    |
 
 error: this `else { if .. }` block can be collapsed
@@ -73,12 +73,12 @@ LL | |     }
    |
 help: collapse nested if block
    |
-LL |     } else if let Some(42) = Some(42) {
-LL |         println!("world")
-LL |     }
-LL |     else {
-LL |         println!("!")
-LL |     }
+LL ~     } else if let Some(42) = Some(42) {
+LL +         println!("world")
+LL +     }
+LL +     else {
+LL +         println!("!")
+LL +     }
    |
 
 error: this `else { if .. }` block can be collapsed
@@ -96,12 +96,12 @@ LL | |     }
    |
 help: collapse nested if block
    |
-LL |     } else if let Some(42) = Some(42) {
-LL |         println!("world")
-LL |     }
-LL |     else {
-LL |         println!("!")
-LL |     }
+LL ~     } else if let Some(42) = Some(42) {
+LL +         println!("world")
+LL +     }
+LL +     else {
+LL +         println!("!")
+LL +     }
    |
 
 error: this `else { if .. }` block can be collapsed
@@ -119,12 +119,12 @@ LL | |     }
    |
 help: collapse nested if block
    |
-LL |     } else if x == "hello" {
-LL |         println!("world")
-LL |     }
-LL |     else {
-LL |         println!("!")
-LL |     }
+LL ~     } else if x == "hello" {
+LL +         println!("world")
+LL +     }
+LL +     else {
+LL +         println!("!")
+LL +     }
    |
 
 error: this `else { if .. }` block can be collapsed
@@ -142,12 +142,12 @@ LL | |     }
    |
 help: collapse nested if block
    |
-LL |     } else if let Some(42) = Some(42) {
-LL |         println!("world")
-LL |     }
-LL |     else {
-LL |         println!("!")
-LL |     }
+LL ~     } else if let Some(42) = Some(42) {
+LL +         println!("world")
+LL +     }
+LL +     else {
+LL +         println!("!")
+LL +     }
    |
 
 error: aborting due to 7 previous errors
index acd1ec3f2caeaf6a924529a5f1d9307e8ca9075a..6749612388fe3726374e02b864cc2d3e37343935 100644 (file)
@@ -11,9 +11,9 @@ LL | |     }
    = note: `-D clippy::collapsible-if` implied by `-D warnings`
 help: collapse nested if block
    |
-LL |     if x == "hello" && y == "world" {
-LL |         println!("Hello world!");
-LL |     }
+LL ~     if x == "hello" && y == "world" {
+LL +         println!("Hello world!");
+LL +     }
    |
 
 error: this `if` statement can be collapsed
@@ -28,9 +28,9 @@ LL | |     }
    |
 help: collapse nested if block
    |
-LL |     if (x == "hello" || x == "world") && (y == "world" || y == "hello") {
-LL |         println!("Hello world!");
-LL |     }
+LL ~     if (x == "hello" || x == "world") && (y == "world" || y == "hello") {
+LL +         println!("Hello world!");
+LL +     }
    |
 
 error: this `if` statement can be collapsed
@@ -45,9 +45,9 @@ LL | |     }
    |
 help: collapse nested if block
    |
-LL |     if x == "hello" && x == "world" && (y == "world" || y == "hello") {
-LL |         println!("Hello world!");
-LL |     }
+LL ~     if x == "hello" && x == "world" && (y == "world" || y == "hello") {
+LL +         println!("Hello world!");
+LL +     }
    |
 
 error: this `if` statement can be collapsed
@@ -62,9 +62,9 @@ LL | |     }
    |
 help: collapse nested if block
    |
-LL |     if (x == "hello" || x == "world") && y == "world" && y == "hello" {
-LL |         println!("Hello world!");
-LL |     }
+LL ~     if (x == "hello" || x == "world") && y == "world" && y == "hello" {
+LL +         println!("Hello world!");
+LL +     }
    |
 
 error: this `if` statement can be collapsed
@@ -79,9 +79,9 @@ LL | |     }
    |
 help: collapse nested if block
    |
-LL |     if x == "hello" && x == "world" && y == "world" && y == "hello" {
-LL |         println!("Hello world!");
-LL |     }
+LL ~     if x == "hello" && x == "world" && y == "world" && y == "hello" {
+LL +         println!("Hello world!");
+LL +     }
    |
 
 error: this `if` statement can be collapsed
@@ -96,9 +96,9 @@ LL | |     }
    |
 help: collapse nested if block
    |
-LL |     if 42 == 1337 && 'a' != 'A' {
-LL |         println!("world!")
-LL |     }
+LL ~     if 42 == 1337 && 'a' != 'A' {
+LL +         println!("world!")
+LL +     }
    |
 
 error: this `if` statement can be collapsed
@@ -113,9 +113,9 @@ LL | |     }
    |
 help: collapse nested if block
    |
-LL |     if x == "hello" && y == "world" { // Collapsible
-LL |         println!("Hello world!");
-LL |     }
+LL ~     if x == "hello" && y == "world" { // Collapsible
+LL +         println!("Hello world!");
+LL +     }
    |
 
 error: this `if` statement can be collapsed
index 296c95abb96d343f73629910d0f5fab3dd6fd228..4d3d617b693756062f9b9ffcc7a86e7ec10c7361 100644 (file)
@@ -12,11 +12,11 @@ LL | #![deny(clippy::implicit_hasher)]
 help: consider adding a type parameter
    |
 LL | pub fn ice_3717<S: ::std::hash::BuildHasher + Default>(_: &HashSet<usize, S>) {
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^     ^^^^^^^^^^^^^^^^^
+   |                +++++++++++++++++++++++++++++++++++++++     ~~~~~~~~~~~~~~~~~
 help: ...and use generic constructor
    |
 LL |     let _: HashSet<usize> = HashSet::default();
-   |                             ^^^^^^^^^^^^^^^^^^
+   |                             ~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
index 8b2c318acf84e108982231e08c281889057757ba..9a89047f072777cd7f6bf3f5588083be74b7f6b0 100644 (file)
@@ -6,7 +6,7 @@ LL |     for<'a> Dst<A + 'a>: Sized,
    |
    = note: `-D bare-trait-objects` implied by `-D warnings`
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error: trait objects without an explicit `dyn` are deprecated
   --> $DIR/ice-3969.rs:27:16
@@ -15,7 +15,7 @@ LL |     let x: Dst<A> = *(Box::new(Dst { x: 1 }) as Box<Dst<A>>);
    |                ^ help: use `dyn`: `dyn A`
    |
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error: trait objects without an explicit `dyn` are deprecated
   --> $DIR/ice-3969.rs:27:57
@@ -24,7 +24,7 @@ LL |     let x: Dst<A> = *(Box::new(Dst { x: 1 }) as Box<Dst<A>>);
    |                                                         ^ help: use `dyn`: `dyn A`
    |
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
+   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 
 error: aborting due to 3 previous errors
 
index 320b3bb42f897ebb4d06e620ec337cd1c603674c..439884b7d274aef2d3cd92637a0b8847e1bedbd8 100644 (file)
@@ -30,7 +30,7 @@ LL |         Some(reference) = cache.data.get(key) {
 help: consider dereferencing the borrow
    |
 LL |         Some(*reference) = cache.data.get(key) {
-   |              ^
+   |              +
 
 error[E0308]: mismatched types
   --> $DIR/ice-6250.rs:12:9
index 8498c0407808d1b60950894cb8495fca0a30f787..14c71e884b6ea9779cc867b6104d156e6821bf2c 100644 (file)
@@ -17,7 +17,7 @@ LL | fn bug<T>() -> impl Iterator<Item = [(); { |x: [u8]| x }]> {
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL | fn bug<T>() -> impl Iterator<Item = [(); { |x: &[u8]| x }]> {
-   |                                                ^
+   |                                                +
 
 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
   --> $DIR/ice-6251.rs:4:54
index bdf372af2907502aa13ea597e68e166bf259fd3a..0abe953af26139b40754ae010550e106450f42ae 100644 (file)
@@ -8,7 +8,7 @@ LL |     if let Some(n) = dbg!(n.checked_sub(4)) { n } else { n }
 help: ensure to avoid having uses of it in version control
    |
 LL |     if let Some(n) = n.checked_sub(4) { n } else { n }
-   |                      ^^^^^^^^^^^^^^^^
+   |                      ~~~~~~~~~~~~~~~~
 
 error: `dbg!` macro is intended as a debugging tool
   --> $DIR/dbg_macro.rs:8:8
@@ -19,7 +19,7 @@ LL |     if dbg!(n <= 1) {
 help: ensure to avoid having uses of it in version control
    |
 LL |     if n <= 1 {
-   |        ^^^^^^
+   |        ~~~~~~
 
 error: `dbg!` macro is intended as a debugging tool
   --> $DIR/dbg_macro.rs:9:9
@@ -52,7 +52,7 @@ LL |     dbg!(42);
 help: ensure to avoid having uses of it in version control
    |
 LL |     42;
-   |     ^^
+   |     ~~
 
 error: `dbg!` macro is intended as a debugging tool
   --> $DIR/dbg_macro.rs:17:5
@@ -63,7 +63,7 @@ LL |     dbg!(dbg!(dbg!(42)));
 help: ensure to avoid having uses of it in version control
    |
 LL |     dbg!(dbg!(42));
-   |     ^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~
 
 error: `dbg!` macro is intended as a debugging tool
   --> $DIR/dbg_macro.rs:18:14
@@ -74,7 +74,7 @@ LL |     foo(3) + dbg!(factorial(4));
 help: ensure to avoid having uses of it in version control
    |
 LL |     foo(3) + factorial(4);
-   |              ^^^^^^^^^^^^
+   |              ~~~~~~~~~~~~
 
 error: aborting due to 7 previous errors
 
index 2f075a97010a63d77365ce0ac6f03eeef8e3ab50..8f2e383d675da8fdd43c49910f2529093eeeed09 100644 (file)
@@ -22,12 +22,12 @@ LL | |     }
    |
 help: try this
    |
-LL |     m.entry(k).or_insert_with(|| {
-LL |         if true {
-LL |             v
-LL |         } else {
-LL |             v2
-LL |         }
+LL ~     m.entry(k).or_insert_with(|| {
+LL +         if true {
+LL +             v
+LL +         } else {
+LL +             v2
+LL +         }
  ...
 
 error: usage of `contains_key` followed by `insert` on a `HashMap`
@@ -44,12 +44,12 @@ LL | |     }
    |
 help: try this
    |
-LL |     m.entry(k).or_insert_with(|| {
-LL |         if true {
-LL |             v
-LL |         } else {
-LL |             v2
-LL |         }
+LL ~     m.entry(k).or_insert_with(|| {
+LL +         if true {
+LL +             v
+LL +         } else {
+LL +             v2
+LL +         }
  ...
 
 error: usage of `contains_key` followed by `insert` on a `HashMap`
@@ -66,12 +66,12 @@ LL | |     }
    |
 help: try this
    |
-LL |     if let std::collections::hash_map::Entry::Vacant(e) = m.entry(k) {
-LL |         if true {
-LL |             e.insert(v);
-LL |         } else {
-LL |             e.insert(v2);
-LL |             return;
+LL ~     if let std::collections::hash_map::Entry::Vacant(e) = m.entry(k) {
+LL +         if true {
+LL +             e.insert(v);
+LL +         } else {
+LL +             e.insert(v2);
+LL +             return;
  ...
 
 error: usage of `contains_key` followed by `insert` on a `HashMap`
@@ -85,10 +85,10 @@ LL | |     }
    |
 help: try this
    |
-LL |     m.entry(k).or_insert_with(|| {
-LL |         foo();
-LL |         v
-LL |     });
+LL ~     m.entry(k).or_insert_with(|| {
+LL +         foo();
+LL +         v
+LL +     });
    |
 
 error: usage of `contains_key` followed by `insert` on a `HashMap`
@@ -105,12 +105,12 @@ LL | |     }
    |
 help: try this
    |
-LL |     m.entry(k).or_insert_with(|| {
-LL |         match 0 {
-LL |             1 if true => {
-LL |                 v
-LL |             },
-LL |             _ => {
+LL ~     m.entry(k).or_insert_with(|| {
+LL +         match 0 {
+LL +             1 if true => {
+LL +                 v
+LL +             },
+LL +             _ => {
  ...
 
 error: usage of `contains_key` followed by `insert` on a `HashMap`
@@ -127,12 +127,12 @@ LL | |     }
    |
 help: try this
    |
-LL |     if let std::collections::hash_map::Entry::Vacant(e) = m.entry(k) {
-LL |         match 0 {
-LL |             0 => foo(),
-LL |             _ => {
-LL |                 e.insert(v2);
-LL |             },
+LL ~     if let std::collections::hash_map::Entry::Vacant(e) = m.entry(k) {
+LL +         match 0 {
+LL +             0 => foo(),
+LL +             _ => {
+LL +                 e.insert(v2);
+LL +             },
  ...
 
 error: usage of `contains_key` followed by `insert` on a `HashMap`
@@ -149,12 +149,12 @@ LL | |     }
    |
 help: try this
    |
-LL |     m.entry(k).or_insert_with(|| {
-LL |         foo();
-LL |         match 0 {
-LL |             0 if false => {
-LL |                 v
-LL |             },
+LL ~     m.entry(k).or_insert_with(|| {
+LL +         foo();
+LL +         match 0 {
+LL +             0 if false => {
+LL +                 v
+LL +             },
  ...
 
 error: usage of `contains_key` followed by `insert` on a `HashMap`
@@ -176,10 +176,10 @@ LL | |     }
    |
 help: try this
    |
-LL |     if let std::collections::btree_map::Entry::Vacant(e) = m.entry(k) {
-LL |         e.insert(v);
-LL |         foo();
-LL |     }
+LL ~     if let std::collections::btree_map::Entry::Vacant(e) = m.entry(k) {
+LL +         e.insert(v);
+LL +         foo();
+LL +     }
    |
 
 error: aborting due to 10 previous errors
index 6f62ff8d37457609f72a14510f69e3d661ff9cfe..7279efc5959596a194ce52aa151f11fa5dbed542 100644 (file)
@@ -11,12 +11,12 @@ LL | |     }
    = note: `-D clippy::map-entry` implied by `-D warnings`
 help: try this
    |
-LL |     match m.entry(k) {
-LL |         std::collections::hash_map::Entry::Vacant(e) => {
-LL |             e.insert(v);
-LL |         }
-LL |         std::collections::hash_map::Entry::Occupied(mut e) => {
-LL |             e.insert(v2);
+LL ~     match m.entry(k) {
+LL +         std::collections::hash_map::Entry::Vacant(e) => {
+LL +             e.insert(v);
+LL +         }
+LL +         std::collections::hash_map::Entry::Occupied(mut e) => {
+LL +             e.insert(v2);
  ...
 
 error: usage of `contains_key` followed by `insert` on a `HashMap`
@@ -31,12 +31,12 @@ LL | |     }
    |
 help: try this
    |
-LL |     match m.entry(k) {
-LL |         std::collections::hash_map::Entry::Occupied(mut e) => {
-LL |             e.insert(v);
-LL |         }
-LL |         std::collections::hash_map::Entry::Vacant(e) => {
-LL |             e.insert(v2);
+LL ~     match m.entry(k) {
+LL +         std::collections::hash_map::Entry::Occupied(mut e) => {
+LL +             e.insert(v);
+LL +         }
+LL +         std::collections::hash_map::Entry::Vacant(e) => {
+LL +             e.insert(v2);
  ...
 
 error: usage of `contains_key` followed by `insert` on a `HashMap`
@@ -51,11 +51,11 @@ LL | |     }
    |
 help: try this
    |
-LL |     if let std::collections::hash_map::Entry::Vacant(e) = m.entry(k) {
-LL |         e.insert(v);
-LL |     } else {
-LL |         foo();
-LL |     }
+LL ~     if let std::collections::hash_map::Entry::Vacant(e) = m.entry(k) {
+LL +         e.insert(v);
+LL +     } else {
+LL +         foo();
+LL +     }
    |
 
 error: usage of `contains_key` followed by `insert` on a `HashMap`
@@ -70,11 +70,11 @@ LL | |     }
    |
 help: try this
    |
-LL |     if let std::collections::hash_map::Entry::Occupied(mut e) = m.entry(k) {
-LL |         e.insert(v);
-LL |     } else {
-LL |         foo();
-LL |     }
+LL ~     if let std::collections::hash_map::Entry::Occupied(mut e) = m.entry(k) {
+LL +         e.insert(v);
+LL +     } else {
+LL +         foo();
+LL +     }
    |
 
 error: usage of `contains_key` followed by `insert` on a `HashMap`
@@ -89,12 +89,12 @@ LL | |     }
    |
 help: try this
    |
-LL |     match m.entry(k) {
-LL |         std::collections::hash_map::Entry::Vacant(e) => {
-LL |             e.insert(v);
-LL |         }
-LL |         std::collections::hash_map::Entry::Occupied(mut e) => {
-LL |             e.insert(v2);
+LL ~     match m.entry(k) {
+LL +         std::collections::hash_map::Entry::Vacant(e) => {
+LL +             e.insert(v);
+LL +         }
+LL +         std::collections::hash_map::Entry::Occupied(mut e) => {
+LL +             e.insert(v2);
  ...
 
 error: usage of `contains_key` followed by `insert` on a `HashMap`
@@ -109,12 +109,12 @@ LL | |     };
    |
 help: try this
    |
-LL |     match m.entry(k) {
-LL |         std::collections::hash_map::Entry::Occupied(mut e) => {
-LL |             if true { Some(e.insert(v)) } else { Some(e.insert(v2)) }
-LL |         }
-LL |         std::collections::hash_map::Entry::Vacant(e) => {
-LL |             e.insert(v);
+LL ~     match m.entry(k) {
+LL +         std::collections::hash_map::Entry::Occupied(mut e) => {
+LL +             if true { Some(e.insert(v)) } else { Some(e.insert(v2)) }
+LL +         }
+LL +         std::collections::hash_map::Entry::Vacant(e) => {
+LL +             e.insert(v);
  ...
 
 error: usage of `contains_key` followed by `insert` on a `HashMap`
@@ -130,12 +130,12 @@ LL | |     };
    |
 help: try this
    |
-LL |     if let std::collections::hash_map::Entry::Occupied(mut e) = m.entry(k) {
-LL |         foo();
-LL |         Some(e.insert(v))
-LL |     } else {
-LL |         None
-LL |     };
+LL ~     if let std::collections::hash_map::Entry::Occupied(mut e) = m.entry(k) {
+LL +         foo();
+LL +         Some(e.insert(v))
+LL +     } else {
+LL +         None
+LL ~     };
    |
 
 error: aborting due to 7 previous errors
index 31811d1d92a04285321bf4d5c0c6e3dead552d0a..090dae3733d91910d43f1d97c1f5883551b2a1d1 100644 (file)
@@ -7,8 +7,9 @@ LL |     eprint!("Hello/n");
    = note: `-D clippy::print-with-newline` implied by `-D warnings`
 help: use `eprintln!` instead
    |
-LL |     eprintln!("Hello");
-   |     ^^^^^^^^       --
+LL -     eprint!("Hello/n");
+LL +     eprintln!("Hello");
+   | 
 
 error: using `eprint!()` with a format string that ends in a single newline
   --> $DIR/eprint_with_newline.rs:6:5
@@ -18,8 +19,9 @@ LL |     eprint!("Hello {}/n", "world");
    |
 help: use `eprintln!` instead
    |
-LL |     eprintln!("Hello {}", "world");
-   |     ^^^^^^^^          --
+LL -     eprint!("Hello {}/n", "world");
+LL +     eprintln!("Hello {}", "world");
+   | 
 
 error: using `eprint!()` with a format string that ends in a single newline
   --> $DIR/eprint_with_newline.rs:7:5
@@ -29,8 +31,9 @@ LL |     eprint!("Hello {} {}/n", "world", "#2");
    |
 help: use `eprintln!` instead
    |
-LL |     eprintln!("Hello {} {}", "world", "#2");
-   |     ^^^^^^^^             --
+LL -     eprint!("Hello {} {}/n", "world", "#2");
+LL +     eprintln!("Hello {} {}", "world", "#2");
+   | 
 
 error: using `eprint!()` with a format string that ends in a single newline
   --> $DIR/eprint_with_newline.rs:8:5
@@ -40,8 +43,9 @@ LL |     eprint!("{}/n", 1265);
    |
 help: use `eprintln!` instead
    |
-LL |     eprintln!("{}", 1265);
-   |     ^^^^^^^^    --
+LL -     eprint!("{}/n", 1265);
+LL +     eprintln!("{}", 1265);
+   | 
 
 error: using `eprint!()` with a format string that ends in a single newline
   --> $DIR/eprint_with_newline.rs:9:5
@@ -51,8 +55,9 @@ LL |     eprint!("/n");
    |
 help: use `eprintln!` instead
    |
-LL |     eprintln!();
-   |     ^^^^^^^^ --
+LL -     eprint!("/n");
+LL +     eprintln!();
+   | 
 
 error: using `eprint!()` with a format string that ends in a single newline
   --> $DIR/eprint_with_newline.rs:28:5
@@ -62,8 +67,9 @@ LL |     eprint!("//n"); // should fail
    |
 help: use `eprintln!` instead
    |
-LL |     eprintln!("/"); // should fail
-   |     ^^^^^^^^    --
+LL -     eprint!("//n"); // should fail
+LL +     eprintln!("/"); // should fail
+   | 
 
 error: using `eprint!()` with a format string that ends in a single newline
   --> $DIR/eprint_with_newline.rs:35:5
@@ -76,8 +82,8 @@ LL | |     );
    |
 help: use `eprintln!` instead
    |
-LL |     eprintln!(
-LL |         ""
+LL ~     eprintln!(
+LL ~         ""
    |
 
 error: using `eprint!()` with a format string that ends in a single newline
@@ -91,8 +97,8 @@ LL | |     );
    |
 help: use `eprintln!` instead
    |
-LL |     eprintln!(
-LL |         r""
+LL ~     eprintln!(
+LL ~         r""
    |
 
 error: using `eprint!()` with a format string that ends in a single newline
@@ -103,8 +109,9 @@ LL |     eprint!("/r/n"); //~ ERROR
    |
 help: use `eprintln!` instead
    |
-LL |     eprintln!("/r"); //~ ERROR
-   |     ^^^^^^^^     --
+LL -     eprint!("/r/n"); //~ ERROR
+LL +     eprintln!("/r"); //~ ERROR
+   | 
 
 error: using `eprint!()` with a format string that ends in a single newline
   --> $DIR/eprint_with_newline.rs:48:5
@@ -114,8 +121,9 @@ LL |     eprint!("foo/rbar/n") // ~ ERROR
    |
 help: use `eprintln!` instead
    |
-LL |     eprintln!("foo/rbar") // ~ ERROR
-   |     ^^^^^^^^          --
+LL -     eprint!("foo/rbar/n") // ~ ERROR
+LL +     eprintln!("foo/rbar") // ~ ERROR
+   | 
 
 error: aborting due to 10 previous errors
 
index 8fbab535a9b25a67ca26b7b9edeabb9550a7ead2..f46ebd477b8f2d24e6a24b8884e2ce8a1d24503a 100644 (file)
@@ -16,8 +16,8 @@ LL | #![deny(clippy::exhaustive_enums, clippy::exhaustive_structs)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^
 help: try adding #[non_exhaustive]
    |
-LL |     #[non_exhaustive]
-LL |     pub enum Exhaustive {
+LL ~     #[non_exhaustive]
+LL ~     pub enum Exhaustive {
    |
 
 error: exported enums should not be exhaustive
@@ -33,8 +33,8 @@ LL | |     }
    |
 help: try adding #[non_exhaustive]
    |
-LL |     #[non_exhaustive]
-LL |     pub enum ExhaustiveWithAttrs {
+LL ~     #[non_exhaustive]
+LL ~     pub enum ExhaustiveWithAttrs {
    |
 
 error: exported structs should not be exhaustive
@@ -53,8 +53,8 @@ LL | #![deny(clippy::exhaustive_enums, clippy::exhaustive_structs)]
    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: try adding #[non_exhaustive]
    |
-LL |     #[non_exhaustive]
-LL |     pub struct Exhaustive {
+LL ~     #[non_exhaustive]
+LL ~     pub struct Exhaustive {
    |
 
 error: aborting due to 3 previous errors
index 241758c542cfbe82aea3c2c00ad1e567fab11d68..e5cc7c1466ab4a4e117532413477ca699224871d 100644 (file)
@@ -8,7 +8,7 @@ LL |     for (_, v) in &m {
 help: use the corresponding method
    |
 LL |     for v in m.values() {
-   |         ^    ^^^^^^^^^^
+   |         ~    ~~~~~~~~~~
 
 error: you seem to want to iterate on a map's values
   --> $DIR/for_kv_map.rs:14:19
@@ -19,7 +19,7 @@ LL |     for (_, v) in &*m {
 help: use the corresponding method
    |
 LL |     for v in (*m).values() {
-   |         ^    ^^^^^^^^^^^^^
+   |         ~    ~~~~~~~~~~~~~
 
 error: you seem to want to iterate on a map's values
   --> $DIR/for_kv_map.rs:22:19
@@ -30,7 +30,7 @@ LL |     for (_, v) in &mut m {
 help: use the corresponding method
    |
 LL |     for v in m.values_mut() {
-   |         ^    ^^^^^^^^^^^^^^
+   |         ~    ~~~~~~~~~~~~~~
 
 error: you seem to want to iterate on a map's values
   --> $DIR/for_kv_map.rs:27:19
@@ -41,7 +41,7 @@ LL |     for (_, v) in &mut *m {
 help: use the corresponding method
    |
 LL |     for v in (*m).values_mut() {
-   |         ^    ^^^^^^^^^^^^^^^^^
+   |         ~    ~~~~~~~~~~~~~~~~~
 
 error: you seem to want to iterate on a map's keys
   --> $DIR/for_kv_map.rs:33:24
@@ -52,7 +52,7 @@ LL |     for (k, _value) in rm {
 help: use the corresponding method
    |
 LL |     for k in rm.keys() {
-   |         ^    ^^^^^^^^^
+   |         ~    ~~~~~~~~~
 
 error: aborting due to 5 previous errors
 
index 2017eb2b3838fc46208b13ec268f6248bdb21d54..496a083497dfaced8f257537fa3444d4454b7822 100644 (file)
@@ -29,8 +29,8 @@ LL | |     );
    |
 help: consider using `.to_string()`
    |
-LL |     r##"foo {}
-LL | " bar"##.to_string();
+LL ~     r##"foo {}
+LL + " bar"##.to_string();
    |
 
 error: useless use of `format!`
index 0646dd27f35e8ebd6072a2d7fd145a22abe1d2dc..134ce9d24116b85f33dafa8faa230edc60b0a385 100644 (file)
@@ -8,7 +8,7 @@ LL |     if let Some(y) = x.parse().ok() { y } else { 0 }
 help: consider matching on `Ok(y)` and removing the call to `ok` instead
    |
 LL |     if let Ok(y) = x.parse() { y } else { 0 }
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: matching on `Some` with `ok()` is redundant
   --> $DIR/if_let_some_result.rs:16:9
@@ -19,7 +19,7 @@ LL |         if let Some(y) = x   .   parse()   .   ok   ()    {
 help: consider matching on `Ok(y)` and removing the call to `ok` instead
    |
 LL |         if let Ok(y) = x   .   parse()       {
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 2 previous errors
 
index 41ca6485c4c97fcdef8b980cb2e9bb4786c917e4..2e62dd30f9fc59f7b11ca90b7145a517dc28037f 100644 (file)
@@ -12,11 +12,11 @@ LL | #![deny(clippy::implicit_hasher)]
 help: consider adding a type parameter
    |
 LL | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<i8> for HashMap<K, V, S> {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^             ^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~             ~~~~~~~~~~~~~~~~
 help: ...and use generic constructor
    |
 LL |         (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
-   |          ^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |          ~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: impl for `HashMap` should be generalized over different hashers
   --> $DIR/implicit_hasher.rs:25:36
@@ -27,11 +27,11 @@ LL | impl<K: Hash + Eq, V> Foo<i8> for (HashMap<K, V>,) {
 help: consider adding a type parameter
    |
 LL | impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<i8> for (HashMap<K, V, S>,) {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^              ^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~              ~~~~~~~~~~~~~~~~
 help: ...and use generic constructor
    |
 LL |         ((HashMap::default(),), (HashMap::with_capacity_and_hasher(10, Default::default()),))
-   |           ^^^^^^^^^^^^^^^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |           ~~~~~~~~~~~~~~~~~~     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: impl for `HashMap` should be generalized over different hashers
   --> $DIR/implicit_hasher.rs:30:19
@@ -42,11 +42,11 @@ LL | impl Foo<i16> for HashMap<String, String> {
 help: consider adding a type parameter
    |
 LL | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashMap<String, String, S> {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^              ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     +++++++++++++++++++++++++++++++++++++++              ~~~~~~~~~~~~~~~~~~~~~~~~~~
 help: ...and use generic constructor
    |
 LL |         (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
-   |          ^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |          ~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: impl for `HashSet` should be generalized over different hashers
   --> $DIR/implicit_hasher.rs:47:32
@@ -57,11 +57,11 @@ LL | impl<T: Hash + Eq> Foo<i8> for HashSet<T> {
 help: consider adding a type parameter
    |
 LL | impl<T: Hash + Eq, S: ::std::hash::BuildHasher + Default> Foo<i8> for HashSet<T, S> {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^             ^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~             ~~~~~~~~~~~~~
 help: ...and use generic constructor
    |
 LL |         (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default()))
-   |          ^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |          ~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: impl for `HashSet` should be generalized over different hashers
   --> $DIR/implicit_hasher.rs:52:19
@@ -72,11 +72,11 @@ LL | impl Foo<i16> for HashSet<String> {
 help: consider adding a type parameter
    |
 LL | impl<S: ::std::hash::BuildHasher + Default> Foo<i16> for HashSet<String, S> {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^              ^^^^^^^^^^^^^^^^^^
+   |     +++++++++++++++++++++++++++++++++++++++              ~~~~~~~~~~~~~~~~~~
 help: ...and use generic constructor
    |
 LL |         (HashSet::default(), HashSet::with_capacity_and_hasher(10, Default::default()))
-   |          ^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |          ~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: parameter of type `HashMap` should be generalized over different hashers
   --> $DIR/implicit_hasher.rs:69:23
@@ -87,7 +87,7 @@ LL | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
 help: consider adding a type parameter
    |
 LL | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {}
-   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^            ^^^^^^^^^^^^^^^^^^^^
+   |           +++++++++++++++++++++++++++++            ~~~~~~~~~~~~~~~~~~~~
 
 error: parameter of type `HashSet` should be generalized over different hashers
   --> $DIR/implicit_hasher.rs:69:53
@@ -98,7 +98,7 @@ LL | pub fn foo(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
 help: consider adding a type parameter
    |
 LL | pub fn foo<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {}
-   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                          ^^^^^^^^^^^^^^^
+   |           +++++++++++++++++++++++++++++                                          ~~~~~~~~~~~~~~~
 
 error: impl for `HashMap` should be generalized over different hashers
   --> $DIR/implicit_hasher.rs:73:43
@@ -113,11 +113,11 @@ LL | gen!(impl);
 help: consider adding a type parameter
    |
 LL |         impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<u8> for HashMap<K, V, S> {
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^             ^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~             ~~~~~~~~~~~~~~~~
 help: ...and use generic constructor
    |
 LL |                 (HashMap::default(), HashMap::with_capacity_and_hasher(10, Default::default()))
-   |                  ^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: parameter of type `HashMap` should be generalized over different hashers
   --> $DIR/implicit_hasher.rs:81:33
@@ -132,7 +132,7 @@ LL | gen!(fn bar);
 help: consider adding a type parameter
    |
 LL |         pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32, S>, _set: &mut HashSet<i32>) {}
-   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^            ^^^^^^^^^^^^^^^^^^^^
+   |                     +++++++++++++++++++++++++++++            ~~~~~~~~~~~~~~~~~~~~
 
 error: parameter of type `HashSet` should be generalized over different hashers
   --> $DIR/implicit_hasher.rs:81:63
@@ -147,7 +147,7 @@ LL | gen!(fn bar);
 help: consider adding a type parameter
    |
 LL |         pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {}
-   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                          ^^^^^^^^^^^^^^^
+   |                     +++++++++++++++++++++++++++++                                          ~~~~~~~~~~~~~~~
 
 error: aborting due to 10 previous errors
 
index 16fe9ed444ff696d20c0c3411cb56913a631a6d2..5e078b15ce393f6070b3f932ec0553d0c880f91f 100644 (file)
@@ -94,9 +94,9 @@ LL | |     }
    |
 help: add `return` as shown
    |
-LL |     return loop {
-LL |         m!(true);
-LL |     }
+LL ~     return loop {
+LL +         m!(true);
+LL +     }
    |
 
 error: missing `return` statement
index d39a4d462aabde949de878d8821d11950cecfc73..0eac28fbd35003d6a1c8009f6eeb59de653ac9eb 100644 (file)
@@ -13,7 +13,7 @@ LL |     A(i32),
 help: consider boxing the large fields to reduce the total size of the enum
    |
 LL |     B(Box<[i32; 8000]>),
-   |       ^^^^^^^^^^^^^^^^
+   |       ~~~~~~~~~~~~~~~~
 
 error: large size difference between variants
   --> $DIR/large_enum_variant.rs:36:5
@@ -29,7 +29,7 @@ LL |     VariantOk(i32, u32),
 help: consider boxing the large fields to reduce the total size of the enum
    |
 LL |     ContainingLargeEnum(Box<LargeEnum>),
-   |                         ^^^^^^^^^^^^^^
+   |                         ~~~~~~~~~~~~~~
 
 error: large size difference between variants
   --> $DIR/large_enum_variant.rs:46:5
@@ -62,7 +62,7 @@ LL |     VariantOk(i32, u32),
 help: consider boxing the large fields to reduce the total size of the enum
    |
 LL |     StructLikeLarge2 { x: Box<[i32; 8000]> },
-   |                           ^^^^^^^^^^^^^^^^
+   |                           ~~~~~~~~~~~~~~~~
 
 error: aborting due to 4 previous errors
 
index a6941dabeb88d56a722fa07b7efbcf620c395cea..17fd694bf7ac9ab12b7c1366b9812b62a99842c0 100644 (file)
@@ -9,8 +9,8 @@ LL |     x
    = note: `-D clippy::let-and-return` implied by `-D warnings`
 help: return the expression directly
    |
-LL |     
-LL |     5
+LL ~     
+LL ~     5
    |
 
 error: returning the result of a `let` binding from a block
@@ -23,8 +23,8 @@ LL |         x
    |
 help: return the expression directly
    |
-LL |         
-LL |         5
+LL ~         
+LL ~         5
    |
 
 error: returning the result of a `let` binding from a block
@@ -37,8 +37,8 @@ LL |             clone
    |
 help: return the expression directly
    |
-LL |             
-LL |             Arc::clone(&self.foo) as _
+LL ~             
+LL ~             Arc::clone(&self.foo) as _
    |
 
 error: aborting due to 3 previous errors
index eb8482087bcc87711d4c67fbfc0a60115754a04a..f2600c6c22883ef6f28434f10efa95a7c8268eea 100644 (file)
@@ -26,12 +26,12 @@ LL | |         .unwrap();
    |
 help: omit the `let` binding
    |
-LL |     v
-LL |         .into_iter()
-LL |         .map(|i| i * 2)
-LL |         .filter(|i| i % 2 == 0)
-LL |         .map(|_| ())
-LL |         .next()
+LL ~     v
+LL +         .into_iter()
+LL +         .map(|i| i * 2)
+LL +         .filter(|i| i % 2 == 0)
+LL +         .map(|_| ())
+LL +         .next()
  ...
 
 error: aborting due to 3 previous errors
index 64ceeb316d8e5a109871389304449d97f424bda1..99542e20f785fea9f916c59976b20850fcd8edc7 100644 (file)
@@ -28,11 +28,11 @@ LL |     let fail_multi_zero = 000_123usize;
 help: if you mean to use a decimal constant, remove the `0` to avoid confusion
    |
 LL |     let fail_multi_zero = 123usize;
-   |                           ^^^^^^^^
+   |                           ~~~~~~~~
 help: if you mean to use an octal constant, use `0o`
    |
 LL |     let fail_multi_zero = 0o123usize;
-   |                           ^^^^^^^^^^
+   |                           ~~~~~~~~~~
 
 error: this is a decimal constant
   --> $DIR/literals.rs:21:17
@@ -43,11 +43,11 @@ LL |     let fail8 = 0123;
 help: if you mean to use a decimal constant, remove the `0` to avoid confusion
    |
 LL |     let fail8 = 123;
-   |                 ^^^
+   |                 ~~~
 help: if you mean to use an octal constant, use `0o`
    |
 LL |     let fail8 = 0o123;
-   |                 ^^^^^
+   |                 ~~~~~
 
 error: digits grouped inconsistently by underscores
   --> $DIR/literals.rs:33:18
index fdd43db3255ee5991fe49597ded05698fbae3f64..51f1a52b6dd65154d3b50d0a56bedfb8d24c37c9 100644 (file)
@@ -8,11 +8,11 @@ LL | fn fut() -> impl Future<Output = i32> {
 help: make the function `async` and return the output of the future directly
    |
 LL | async fn fut() -> i32 {
-   | ^^^^^^^^^^^^^^^^^^^^^
+   | ~~~~~~~~~~~~~~~~~~~~~
 help: move the body of the async block to the enclosing function
    |
 LL | fn fut() -> impl Future<Output = i32> { 42 }
-   |                                       ^^^^^^
+   |                                       ~~~~~~
 
 error: this function can be simplified using the `async fn` syntax
   --> $DIR/manual_async_fn.rs:13:1
@@ -23,11 +23,11 @@ LL | fn fut2() ->impl Future<Output = i32> {
 help: make the function `async` and return the output of the future directly
    |
 LL | async fn fut2() -> i32 {
-   | ^^^^^^^^^^^^^^^^^^^^^^
+   | ~~~~~~~~~~~~~~~~~~~~~~
 help: move the body of the async block to the enclosing function
    |
 LL | fn fut2() ->impl Future<Output = i32> { 42 }
-   |                                       ^^^^^^
+   |                                       ~~~~~~
 
 error: this function can be simplified using the `async fn` syntax
   --> $DIR/manual_async_fn.rs:18:1
@@ -38,11 +38,11 @@ LL | fn fut3()-> impl Future<Output = i32> {
 help: make the function `async` and return the output of the future directly
    |
 LL | async fn fut3() -> i32 {
-   | ^^^^^^^^^^^^^^^^^^^^^^
+   | ~~~~~~~~~~~~~~~~~~~~~~
 help: move the body of the async block to the enclosing function
    |
 LL | fn fut3()-> impl Future<Output = i32> { 42 }
-   |                                       ^^^^^^
+   |                                       ~~~~~~
 
 error: this function can be simplified using the `async fn` syntax
   --> $DIR/manual_async_fn.rs:22:1
@@ -53,11 +53,11 @@ LL | fn empty_fut() -> impl Future<Output = ()> {
 help: make the function `async` and remove the return type
    |
 LL | async fn empty_fut() {
-   | ^^^^^^^^^^^^^^^^^^^^
+   | ~~~~~~~~~~~~~~~~~~~~
 help: move the body of the async block to the enclosing function
    |
 LL | fn empty_fut() -> impl Future<Output = ()> {}
-   |                                            ^^
+   |                                            ~~
 
 error: this function can be simplified using the `async fn` syntax
   --> $DIR/manual_async_fn.rs:27:1
@@ -68,11 +68,11 @@ LL | fn empty_fut2() ->impl Future<Output = ()> {
 help: make the function `async` and remove the return type
    |
 LL | async fn empty_fut2() {
-   | ^^^^^^^^^^^^^^^^^^^^^
+   | ~~~~~~~~~~~~~~~~~~~~~
 help: move the body of the async block to the enclosing function
    |
 LL | fn empty_fut2() ->impl Future<Output = ()> {}
-   |                                            ^^
+   |                                            ~~
 
 error: this function can be simplified using the `async fn` syntax
   --> $DIR/manual_async_fn.rs:32:1
@@ -83,11 +83,11 @@ LL | fn empty_fut3()-> impl Future<Output = ()> {
 help: make the function `async` and remove the return type
    |
 LL | async fn empty_fut3() {
-   | ^^^^^^^^^^^^^^^^^^^^^
+   | ~~~~~~~~~~~~~~~~~~~~~
 help: move the body of the async block to the enclosing function
    |
 LL | fn empty_fut3()-> impl Future<Output = ()> {}
-   |                                            ^^
+   |                                            ~~
 
 error: this function can be simplified using the `async fn` syntax
   --> $DIR/manual_async_fn.rs:36:1
@@ -98,11 +98,11 @@ LL | fn core_fut() -> impl core::future::Future<Output = i32> {
 help: make the function `async` and return the output of the future directly
    |
 LL | async fn core_fut() -> i32 {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ~~~~~~~~~~~~~~~~~~~~~~~~~~
 help: move the body of the async block to the enclosing function
    |
 LL | fn core_fut() -> impl core::future::Future<Output = i32> { 42 }
-   |                                                          ^^^^^^
+   |                                                          ~~~~~~
 
 error: this function can be simplified using the `async fn` syntax
   --> $DIR/manual_async_fn.rs:58:5
@@ -113,15 +113,15 @@ LL |     fn inh_fut() -> impl Future<Output = i32> {
 help: make the function `async` and return the output of the future directly
    |
 LL |     async fn inh_fut() -> i32 {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~~~~~
 help: move the body of the async block to the enclosing function
    |
-LL |     fn inh_fut() -> impl Future<Output = i32> {
-LL |         // NOTE: this code is here just to check that the indentation is correct in the suggested fix
-LL |         let a = 42;
-LL |         let b = 21;
-LL |         if a < b {
-LL |             let c = 21;
+LL ~     fn inh_fut() -> impl Future<Output = i32> {
+LL +         // NOTE: this code is here just to check that the indentation is correct in the suggested fix
+LL +         let a = 42;
+LL +         let b = 21;
+LL +         if a < b {
+LL +             let c = 21;
  ...
 
 error: this function can be simplified using the `async fn` syntax
@@ -133,11 +133,11 @@ LL | fn elided(_: &i32) -> impl Future<Output = i32> + '_ {
 help: make the function `async` and return the output of the future directly
    |
 LL | async fn elided(_: &i32) -> i32 {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 help: move the body of the async block to the enclosing function
    |
 LL | fn elided(_: &i32) -> impl Future<Output = i32> + '_ { 42 }
-   |                                                      ^^^^^^
+   |                                                      ~~~~~~
 
 error: this function can be simplified using the `async fn` syntax
   --> $DIR/manual_async_fn.rs:102:1
@@ -148,11 +148,11 @@ LL | fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> impl Future<Output = i32> +
 help: make the function `async` and return the output of the future directly
    |
 LL | async fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> i32 {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 help: move the body of the async block to the enclosing function
    |
 LL | fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> impl Future<Output = i32> + 'a + 'b { 42 }
-   |                                                                                    ^^^^^^
+   |                                                                                    ~~~~~~
 
 error: aborting due to 10 previous errors
 
index a2f2dfce168d5bd561450bc1a8eefda32e3b28da..0243158dec50747ee4a944b7c8b08bb35c177f9b 100644 (file)
@@ -85,8 +85,8 @@ LL | |     }
    |
 help: try replacing the loop by
    |
-LL |     dst[3..(src.len() + 3)].clone_from_slice(&src[..]);
-LL |     dst2[30..(src.len() + 30)].clone_from_slice(&src[..]);
+LL ~     dst[3..(src.len() + 3)].clone_from_slice(&src[..]);
+LL +     dst2[30..(src.len() + 30)].clone_from_slice(&src[..]);
    |
 
 error: it looks like you're manually copying between slices
index 54b966f6e5419d375623fee09c6c58c66273ca7e..8ff0137a8120e1a413ce53da92a3cfac11675f55 100644 (file)
@@ -51,8 +51,8 @@ LL | |     }
    |
 help: try replacing the loop by
    |
-LL |     dst[10..256].clone_from_slice(&src[(10 - 5)..(256 - 5)]);
-LL |     dst2[(10 + 500)..(256 + 500)].clone_from_slice(&src[10..256]);
+LL ~     dst[10..256].clone_from_slice(&src[(10 - 5)..(256 - 5)]);
+LL +     dst2[(10 + 500)..(256 + 500)].clone_from_slice(&src[10..256]);
    |
 
 error: it looks like you're manually copying between slices
index 8ea10ac54363660225df1216d7435f3c756630f1..65459a097384b08dedd024e2a3d2fc172b4f7524 100644 (file)
@@ -32,9 +32,9 @@ LL | |     );
    |
 help: replace with
    |
-LL |     foo.ok_or(&format!(
-LL |         "{}{}{}{}{}{}{}",
-LL |         "Alice", "Bob", "Sarah", "Marc", "Sandra", "Eric", "Jenifer"));
+LL ~     foo.ok_or(&format!(
+LL +         "{}{}{}{}{}{}{}",
+LL ~         "Alice", "Bob", "Sarah", "Marc", "Sandra", "Eric", "Jenifer"));
    |
 
 error: aborting due to 4 previous errors
index 1352a8713d4f8d31ef98b3ec74b9b8ebbf88667b..896edf2ae516df33cd1713f4e8197ef9010f8201 100644 (file)
@@ -12,12 +12,12 @@ LL |     if s.starts_with("ab") {
    |     ^^^^^^^^^^^^^^^^^^^^^^^
 help: try using the `strip_prefix` method
    |
-LL |     if let Some(<stripped>) = s.strip_prefix("ab") {
-LL |         str::to_string(<stripped>);
-LL |         <stripped>.to_string();
+LL ~     if let Some(<stripped>) = s.strip_prefix("ab") {
+LL ~         str::to_string(<stripped>);
+LL ~         <stripped>.to_string();
 LL | 
-LL |         str::to_string(<stripped>);
-LL |         <stripped>.to_string();
+LL ~         str::to_string(<stripped>);
+LL ~         <stripped>.to_string();
    |
 
 error: stripping a suffix manually
@@ -33,12 +33,12 @@ LL |     if s.ends_with("bc") {
    |     ^^^^^^^^^^^^^^^^^^^^^
 help: try using the `strip_suffix` method
    |
-LL |     if let Some(<stripped>) = s.strip_suffix("bc") {
-LL |         str::to_string(<stripped>);
-LL |         <stripped>.to_string();
+LL ~     if let Some(<stripped>) = s.strip_suffix("bc") {
+LL ~         str::to_string(<stripped>);
+LL ~         <stripped>.to_string();
 LL | 
-LL |         str::to_string(<stripped>);
-LL |         <stripped>.to_string();
+LL ~         str::to_string(<stripped>);
+LL ~         <stripped>.to_string();
    |
 
 error: stripping a prefix manually
@@ -54,9 +54,9 @@ LL |     if s.starts_with('a') {
    |     ^^^^^^^^^^^^^^^^^^^^^^
 help: try using the `strip_prefix` method
    |
-LL |     if let Some(<stripped>) = s.strip_prefix('a') {
-LL |         str::to_string(<stripped>);
-LL |         <stripped>.to_string();
+LL ~     if let Some(<stripped>) = s.strip_prefix('a') {
+LL ~         str::to_string(<stripped>);
+LL ~         <stripped>.to_string();
    |
 
 error: stripping a prefix manually
@@ -72,8 +72,8 @@ LL |     if s.starts_with(prefix) {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
 help: try using the `strip_prefix` method
    |
-LL |     if let Some(<stripped>) = s.strip_prefix(prefix) {
-LL |         str::to_string(<stripped>);
+LL ~     if let Some(<stripped>) = s.strip_prefix(prefix) {
+LL ~         str::to_string(<stripped>);
    |
 
 error: stripping a prefix manually
@@ -89,9 +89,9 @@ LL |     if s.starts_with(PREFIX) {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
 help: try using the `strip_prefix` method
    |
-LL |     if let Some(<stripped>) = s.strip_prefix(PREFIX) {
-LL |         str::to_string(<stripped>);
-LL |         str::to_string(<stripped>);
+LL ~     if let Some(<stripped>) = s.strip_prefix(PREFIX) {
+LL ~         str::to_string(<stripped>);
+LL ~         str::to_string(<stripped>);
    |
 
 error: stripping a prefix manually
@@ -107,8 +107,8 @@ LL |     if TARGET.starts_with(prefix) {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: try using the `strip_prefix` method
    |
-LL |     if let Some(<stripped>) = TARGET.strip_prefix(prefix) {
-LL |         str::to_string(<stripped>);
+LL ~     if let Some(<stripped>) = TARGET.strip_prefix(prefix) {
+LL ~         str::to_string(<stripped>);
    |
 
 error: stripping a prefix manually
@@ -124,8 +124,8 @@ LL |     if s1.starts_with("ab") {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
 help: try using the `strip_prefix` method
    |
-LL |     if let Some(<stripped>) = s1.strip_prefix("ab") {
-LL |         <stripped>.to_uppercase();
+LL ~     if let Some(<stripped>) = s1.strip_prefix("ab") {
+LL ~         <stripped>.to_uppercase();
    |
 
 error: aborting due to 7 previous errors
index 99625b789b6a4d7d0728ca89eb19dd98e8d73125..0e4cb798d455eaeb7e2be23442d57ee1cf10b646 100644 (file)
@@ -41,11 +41,11 @@ LL | |     };
    |
 help: replace with
    |
-LL |     Some(1).unwrap_or({
-LL |         42 + 42
-LL |             + 42 + 42 + 42
-LL |             + 42 + 42 + 42
-LL |     });
+LL ~     Some(1).unwrap_or({
+LL +         42 + 42
+LL +             + 42 + 42 + 42
+LL +             + 42 + 42 + 42
+LL ~     });
    |
 
 error: this pattern reimplements `Option::unwrap_or`
@@ -125,11 +125,11 @@ LL | |     };
    |
 help: replace with
    |
-LL |     Ok::<i32, &str>(1).unwrap_or({
-LL |         42 + 42
-LL |             + 42 + 42 + 42
-LL |             + 42 + 42 + 42
-LL |     });
+LL ~     Ok::<i32, &str>(1).unwrap_or({
+LL +         42 + 42
+LL +             + 42 + 42 + 42
+LL +             + 42 + 42 + 42
+LL ~     });
    |
 
 error: this pattern reimplements `Result::unwrap_or`
index 96b9d6cc3c14519aed1cb04cdf5d9c941a797deb..954000b8b76d2f598c6f18453512ab78a2d14bdb 100644 (file)
@@ -10,8 +10,9 @@ LL | |         .unwrap_or(0);
    = note: `-D clippy::map-unwrap-or` implied by `-D warnings`
 help: use `map_or(<a>, <f>)` instead
    |
-LL |     let _ = opt.map_or(0, |x| x + 1);
-   |                 ^^^^^^ ^^          --
+LL -     let _ = opt.map(|x| x + 1)
+LL +     let _ = opt.map_or(0, |x| x + 1);
+   | 
 
 error: called `map(<f>).unwrap_or(<a>)` on an `Option` value. This can be done more directly by calling `map_or(<a>, <f>)` instead
   --> $DIR/map_unwrap_or.rs:20:13
@@ -25,10 +26,10 @@ LL | |     ).unwrap_or(0);
    |
 help: use `map_or(<a>, <f>)` instead
    |
-LL |     let _ = opt.map_or(0, |x| {
+LL ~     let _ = opt.map_or(0, |x| {
 LL |         x + 1
 LL |     }
-LL |     );
+LL ~     );
    |
 
 error: called `map(<f>).unwrap_or(<a>)` on an `Option` value. This can be done more directly by calling `map_or(<a>, <f>)` instead
@@ -43,9 +44,9 @@ LL | |         });
    |
 help: use `map_or(<a>, <f>)` instead
    |
-LL |     let _ = opt.map_or({
-LL |             0
-LL |         }, |x| x + 1);
+LL ~     let _ = opt.map_or({
+LL +             0
+LL ~         }, |x| x + 1);
    |
 
 error: called `map(<f>).unwrap_or(None)` on an `Option` value. This can be done more directly by calling `and_then(<f>)` instead
@@ -56,8 +57,9 @@ LL |     let _ = opt.map(|x| Some(x + 1)).unwrap_or(None);
    |
 help: use `and_then(<f>)` instead
    |
-LL |     let _ = opt.and_then(|x| Some(x + 1));
-   |                 ^^^^^^^^                --
+LL -     let _ = opt.map(|x| Some(x + 1)).unwrap_or(None);
+LL +     let _ = opt.and_then(|x| Some(x + 1));
+   | 
 
 error: called `map(<f>).unwrap_or(None)` on an `Option` value. This can be done more directly by calling `and_then(<f>)` instead
   --> $DIR/map_unwrap_or.rs:31:13
@@ -71,10 +73,10 @@ LL | |     ).unwrap_or(None);
    |
 help: use `and_then(<f>)` instead
    |
-LL |     let _ = opt.and_then(|x| {
+LL ~     let _ = opt.and_then(|x| {
 LL |         Some(x + 1)
 LL |     }
-LL |     );
+LL ~     );
    |
 
 error: called `map(<f>).unwrap_or(None)` on an `Option` value. This can be done more directly by calling `and_then(<f>)` instead
@@ -88,8 +90,9 @@ LL | |         .unwrap_or(None);
    |
 help: use `and_then(<f>)` instead
    |
-LL |         .and_then(|x| Some(x + 1));
-   |          ^^^^^^^^                --
+LL -         .map(|x| Some(x + 1))
+LL +         .and_then(|x| Some(x + 1));
+   | 
 
 error: called `map(<f>).unwrap_or(<a>)` on an `Option` value. This can be done more directly by calling `map_or(<a>, <f>)` instead
   --> $DIR/map_unwrap_or.rs:46:13
@@ -99,8 +102,9 @@ LL |     let _ = Some("prefix").map(|p| format!("{}.", p)).unwrap_or(id);
    |
 help: use `map_or(<a>, <f>)` instead
    |
-LL |     let _ = Some("prefix").map_or(id, |p| format!("{}.", p));
-   |                            ^^^^^^ ^^^                      --
+LL -     let _ = Some("prefix").map(|p| format!("{}.", p)).unwrap_or(id);
+LL +     let _ = Some("prefix").map_or(id, |p| format!("{}.", p));
+   | 
 
 error: called `map(<f>).unwrap_or_else(<g>)` on an `Option` value. This can be done more directly by calling `map_or_else(<g>, <f>)` instead
   --> $DIR/map_unwrap_or.rs:50:13
index 1ad78c740c68bf104e9b3fd8a6e9fc1b84cc6703..3fd0468e51de8e77215e92e3d0eda16bf3e9acdd 100644 (file)
@@ -43,9 +43,9 @@ LL | |     };
    |
 help: consider using an `if`/`else` expression
    |
-LL |     if !test {
-LL |         println!("Noooo!");
-LL |     };
+LL ~     if !test {
+LL +         println!("Noooo!");
+LL ~     };
    |
 
 error: you seem to be trying to match on a boolean expression
@@ -61,9 +61,9 @@ LL | |     };
    |
 help: consider using an `if`/`else` expression
    |
-LL |     if !test {
-LL |         println!("Noooo!");
-LL |     };
+LL ~     if !test {
+LL +         println!("Noooo!");
+LL ~     };
    |
 
 error: you seem to be trying to match on a boolean expression
@@ -79,9 +79,9 @@ LL | |     };
    |
 help: consider using an `if`/`else` expression
    |
-LL |     if !(test && test) {
-LL |         println!("Noooo!");
-LL |     };
+LL ~     if !(test && test) {
+LL +         println!("Noooo!");
+LL ~     };
    |
 
 error: equal expressions as operands to `&&`
@@ -106,11 +106,11 @@ LL | |     };
    |
 help: consider using an `if`/`else` expression
    |
-LL |     if test {
-LL |         println!("Yes!");
-LL |     } else {
-LL |         println!("Noooo!");
-LL |     };
+LL ~     if test {
+LL +         println!("Yes!");
+LL +     } else {
+LL +         println!("Noooo!");
+LL ~     };
    |
 
 error: aborting due to 8 previous errors
index f27b4e9cb20b11786aec24c4066c147e3a51350c..366ef36c367bfb3f031f42968dc77f170c3c1ec5 100644 (file)
@@ -123,8 +123,8 @@ LL | |         };
    = note: `-D clippy::match-ref-pats` implied by `-D warnings`
 help: try
    |
-LL |         let _res = match val {
-LL |             Some(ref _a) => true,
+LL ~         let _res = match val {
+LL ~             Some(ref _a) => true,
    |
 
 error: match expression looks like `matches!` macro
@@ -149,8 +149,8 @@ LL | |         };
    |
 help: try
    |
-LL |         let _res = match val {
-LL |             Some(ref _a) => true,
+LL ~         let _res = match val {
+LL ~             Some(ref _a) => true,
    |
 
 error: aborting due to 14 previous errors
index 67474e65cde4fb2f1fedfb64bcc5bedcc86684af..a57a338b2763434e95af9ee7b94606447ddab33f 100644 (file)
@@ -10,9 +10,9 @@ LL | |         }
    = note: `-D clippy::match-ref-pats` implied by `-D warnings`
 help: instead of prefixing all patterns with `&`, you can dereference the expression
    |
-LL |         match *v {
-LL |             Some(v) => println!("{:?}", v),
-LL |             None => println!("none"),
+LL ~         match *v {
+LL ~             Some(v) => println!("{:?}", v),
+LL ~             None => println!("none"),
    |
 
 error: you don't need to add `&` to all patterns
@@ -26,8 +26,8 @@ LL | |     }
    |
 help: instead of prefixing all patterns with `&`, you can dereference the expression
    |
-LL |     match *tup {
-LL |         (v, 1) => println!("{}", v),
+LL ~     match *tup {
+LL ~         (v, 1) => println!("{}", v),
    |
 
 error: you don't need to add `&` to both the expression and the patterns
@@ -41,9 +41,9 @@ LL | |     }
    |
 help: try
    |
-LL |     match w {
-LL |         Some(v) => println!("{:?}", v),
-LL |         None => println!("none"),
+LL ~     match w {
+LL ~         Some(v) => println!("{:?}", v),
+LL ~         None => println!("none"),
    |
 
 error: redundant pattern matching, consider using `is_none()`
@@ -65,7 +65,7 @@ LL | |     }
 help: instead of prefixing all patterns with `&`, you can dereference the expression
    |
 LL |     if let None = *a {
-   |            ^^^^   ^^
+   |            ~~~~   ~~
 
 error: redundant pattern matching, consider using `is_none()`
   --> $DIR/match_ref_pats.rs:40:12
@@ -84,7 +84,7 @@ LL | |     }
 help: try
    |
 LL |     if let None = b {
-   |            ^^^^   ^
+   |            ~~~~   ~
 
 error: you don't need to add `&` to all patterns
   --> $DIR/match_ref_pats.rs:67:9
@@ -97,8 +97,8 @@ LL | |         }
    |
 help: instead of prefixing all patterns with `&`, you can dereference the expression
    |
-LL |         match *foo_variant!(0) {
-LL |             Foo::A => println!("A"),
+LL ~         match *foo_variant!(0) {
+LL ~             Foo::A => println!("A"),
    |
 
 error: aborting due to 8 previous errors
index 795c8c3e24d7e44816419aabc3c3f2256feb2b4f..291fa77dc2ee1e78186bcb933163d35e8fddd8e9 100644 (file)
@@ -11,10 +11,10 @@ LL | |     }
    = note: `-D clippy::match-single-binding` implied by `-D warnings`
 help: consider using `let` statement
    |
-LL |     let (x, y, z) = (a, b, c);
-LL |     {
-LL |         println!("{} {} {}", x, y, z);
-LL |     }
+LL ~     let (x, y, z) = (a, b, c);
+LL +     {
+LL +         println!("{} {} {}", x, y, z);
+LL +     }
    |
 
 error: this match could be written as a `let` statement
@@ -27,8 +27,8 @@ LL | |     }
    |
 help: consider using `let` statement
    |
-LL |     let (x, y, z) = (a, b, c);
-LL |     println!("{} {} {}", x, y, z);
+LL ~     let (x, y, z) = (a, b, c);
+LL +     println!("{} {} {}", x, y, z);
    |
 
 error: this match could be replaced by its body itself
@@ -52,10 +52,10 @@ LL | |     }
    |
 help: consider using the match body instead
    |
-LL |     {
-LL |         let x = 29;
-LL |         println!("x has a value of {}", x);
-LL |     }
+LL ~     {
+LL +         let x = 29;
+LL +         println!("x has a value of {}", x);
+LL +     }
    |
 
 error: this match could be replaced by its body itself
@@ -72,12 +72,12 @@ LL | |     }
    |
 help: consider using the match body instead
    |
-LL |     {
-LL |         let e = 5 * a;
-LL |         if e >= 5 {
-LL |             println!("e is superior to 5");
-LL |         }
-LL |     }
+LL ~     {
+LL +         let e = 5 * a;
+LL +         if e >= 5 {
+LL +             println!("e is superior to 5");
+LL +         }
+LL +     }
    |
 
 error: this match could be written as a `let` statement
@@ -90,8 +90,8 @@ LL | |     }
    |
 help: consider using `let` statement
    |
-LL |     let Point { x, y } = p;
-LL |     println!("Coords: ({}, {})", x, y);
+LL ~     let Point { x, y } = p;
+LL +     println!("Coords: ({}, {})", x, y);
    |
 
 error: this match could be written as a `let` statement
@@ -104,8 +104,8 @@ LL | |     }
    |
 help: consider using `let` statement
    |
-LL |     let Point { x: x1, y: y1 } = p;
-LL |     println!("Coords: ({}, {})", x1, y1);
+LL ~     let Point { x: x1, y: y1 } = p;
+LL +     println!("Coords: ({}, {})", x1, y1);
    |
 
 error: this match could be written as a `let` statement
@@ -118,8 +118,8 @@ LL | |     }
    |
 help: consider using `let` statement
    |
-LL |     let ref r = x;
-LL |     println!("Got a reference to {}", r);
+LL ~     let ref r = x;
+LL +     println!("Got a reference to {}", r);
    |
 
 error: this match could be written as a `let` statement
@@ -132,8 +132,8 @@ LL | |     }
    |
 help: consider using `let` statement
    |
-LL |     let ref mut mr = x;
-LL |     println!("Got a mutable reference to {}", mr);
+LL ~     let ref mut mr = x;
+LL +     println!("Got a mutable reference to {}", mr);
    |
 
 error: this match could be written as a `let` statement
@@ -146,8 +146,8 @@ LL | |     };
    |
 help: consider using `let` statement
    |
-LL |     let Point { x, y } = coords();
-LL |     let product = x * y;
+LL ~     let Point { x, y } = coords();
+LL +     let product = x * y;
    |
 
 error: this match could be written as a `let` statement
@@ -161,10 +161,10 @@ LL | |         })
    |
 help: consider using `let` statement
    |
-LL |         .map(|i| {
-LL |             let unwrapped = i.unwrap();
-LL |             unwrapped
-LL |         })
+LL ~         .map(|i| {
+LL +             let unwrapped = i.unwrap();
+LL +             unwrapped
+LL ~         })
    |
 
 error: aborting due to 11 previous errors
index 4372f55af8767978d764ba5bc1b99c64384fbca0..d34933194660132ae730112904dae0123d09b226 100644 (file)
@@ -10,10 +10,10 @@ LL | |             },
    = note: `-D clippy::match-single-binding` implied by `-D warnings`
 help: consider using `let` statement
    |
-LL |             Some((iter, _item)) => {
-LL |                 let (min, max) = iter.size_hint();
-LL |                 (min.saturating_add(1), max.and_then(|max| max.checked_add(1)))
-LL |             },
+LL ~             Some((iter, _item)) => {
+LL +                 let (min, max) = iter.size_hint();
+LL +                 (min.saturating_add(1), max.and_then(|max| max.checked_add(1)))
+LL ~             },
    |
 
 error: this match could be written as a `let` statement
@@ -26,8 +26,8 @@ LL | |             }
    |
 help: consider using `let` statement
    |
-LL |             let (a, b) = get_tup();
-LL |             println!("a {:?} and b {:?}", a, b);
+LL ~             let (a, b) = get_tup();
+LL +             println!("a {:?} and b {:?}", a, b);
    |
 
 error: this match could be replaced by its scrutinee and body
@@ -40,8 +40,8 @@ LL | |     }
    |
 help: consider using the scrutinee and body instead
    |
-LL |     side_effects();
-LL |     println!("Side effects");
+LL ~     side_effects();
+LL +     println!("Side effects");
    |
 
 error: this match could be replaced by its scrutinee and body
@@ -57,11 +57,11 @@ LL | |     }
    |
 help: consider using the scrutinee and body instead
    |
-LL |     match x {
-LL |         0 => 1,
-LL |         _ => 2,
-LL |     };
-LL |     println!("Single branch");
+LL ~     match x {
+LL +         0 => 1,
+LL +         _ => 2,
+LL +     };
+LL +     println!("Single branch");
    |
 
 error: aborting due to 4 previous errors
index ddb1e1f37240909738d742fcd917b6c0b4d83d02..a2e4e86ed6b8ca853f2a29adc978f74d54183c34 100644 (file)
@@ -12,8 +12,8 @@ LL |         if s.starts_with("hello, ") {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: try using the `strip_prefix` method
    |
-LL |         if let Some(<stripped>) = s.strip_prefix("hello, ") {
-LL |             assert_eq!(<stripped>.to_uppercase(), "WORLD!");
+LL ~         if let Some(<stripped>) = s.strip_prefix("hello, ") {
+LL ~             assert_eq!(<stripped>.to_uppercase(), "WORLD!");
    |
 
 error: stripping a prefix manually
@@ -29,8 +29,8 @@ LL |         if s.starts_with("hello, ") {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: try using the `strip_prefix` method
    |
-LL |         if let Some(<stripped>) = s.strip_prefix("hello, ") {
-LL |             assert_eq!(<stripped>.to_uppercase(), "WORLD!");
+LL ~         if let Some(<stripped>) = s.strip_prefix("hello, ") {
+LL ~             assert_eq!(<stripped>.to_uppercase(), "WORLD!");
    |
 
 error: aborting due to 2 previous errors
index ea39f5b5577beb12803a059f1b3c9322098e55c6..3534b53282f9b435995c851a90b2c1ff8d13f444 100644 (file)
@@ -169,15 +169,15 @@ LL | #[cfg(all(not(any(solaris, linux)), freebsd))]
 help: try
    |
 LL | #[cfg(all(not(any(target_os = "solaris", linux)), freebsd))]
-   |                   ^^^^^^^^^^^^^^^^^^^^^
+   |                   ~~~~~~~~~~~~~~~~~~~~~
 help: try
    |
 LL | #[cfg(all(not(any(solaris, target_os = "linux")), freebsd))]
-   |                            ^^^^^^^^^^^^^^^^^^^
+   |                            ~~~~~~~~~~~~~~~~~~~
 help: try
    |
 LL | #[cfg(all(not(any(solaris, linux)), target_os = "freebsd"))]
-   |                                     ^^^^^^^^^^^^^^^^^^^^^
+   |                                     ~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 17 previous errors
 
index 32913d59f7ae89075354b675f4f5afc58da5308c..365ecd68d8ff2e9cabc8e0635670712e744d17b1 100644 (file)
@@ -15,7 +15,7 @@ LL |         Some(ref x) => *x,
 help: try this
    |
 LL |         Some(x) => x,
-   |              ^     ^
+   |              ~     ~
 
 error: this pattern creates a reference to a reference
   --> $DIR/needless_borrow_pat.rs:72:14
@@ -25,9 +25,9 @@ LL |         Some(ref x) => {
    |
 help: try this
    |
-LL |         Some(x) => {
-LL |             f1(x);
+LL ~         Some(x) => {
 LL |             f1(x);
+LL ~             f1(x);
    |
 
 error: this pattern creates a reference to a reference
@@ -50,8 +50,8 @@ LL |     let (ref y,) = (&x,);
    |
 help: try this
    |
-LL |     let (y,) = (&x,);
-LL |     let _: &String = y;
+LL ~     let (y,) = (&x,);
+LL ~     let _: &String = y;
    |
 
 error: this pattern creates a reference to a reference
@@ -69,7 +69,7 @@ LL |         E::A(ref x) | E::B(ref x) => *x,
 help: try this
    |
 LL |         E::A(x) | E::B(x) => x,
-   |              ^         ^     ^
+   |              ~         ~     ~
 
 error: this pattern creates a reference to a reference
   --> $DIR/needless_borrow_pat.rs:118:21
@@ -85,9 +85,9 @@ LL | fn f2<'a>(&ref x: &&'a String) -> &'a String {
    |
 help: try this
    |
-LL | fn f2<'a>(&x: &&'a String) -> &'a String {
+LL ~ fn f2<'a>(&x: &&'a String) -> &'a String {
 LL |     let _: &String = x;
-LL |     x
+LL ~     x
    |
 
 error: this pattern creates a reference to a reference
@@ -104,8 +104,8 @@ LL |     fn f(&ref x: &&String) {
    |
 help: try this
    |
-LL |     fn f(&x: &&String) {
-LL |         let _: &String = x;
+LL ~     fn f(&x: &&String) {
+LL ~         let _: &String = x;
    |
 
 error: aborting due to 12 previous errors
index f094e182a48f31eb1cb9e945581f7cf32613829d..0f5e78f91198c27dd50d74e25bce448c89207d37 100644 (file)
@@ -9,8 +9,8 @@ LL |     indirect_iter.into_iter().map(|x| (x, x + 1)).collect::<HashMap<_, _>>(
    = note: `-D clippy::needless-collect` implied by `-D warnings`
 help: use the original Iterator instead of collecting it and then producing a new one
    |
-LL |     
-LL |     sample.iter().map(|x| (x, x + 1)).collect::<HashMap<_, _>>();
+LL ~     
+LL ~     sample.iter().map(|x| (x, x + 1)).collect::<HashMap<_, _>>();
    |
 
 error: avoid using `collect()` when not needed
@@ -23,8 +23,8 @@ LL |     indirect_len.len();
    |
 help: take the original Iterator's count instead of collecting it and finding the length
    |
-LL |     
-LL |     sample.iter().count();
+LL ~     
+LL ~     sample.iter().count();
    |
 
 error: avoid using `collect()` when not needed
@@ -37,8 +37,8 @@ LL |     indirect_empty.is_empty();
    |
 help: check if the original Iterator has anything instead of collecting it and seeing if it's empty
    |
-LL |     
-LL |     sample.iter().next().is_none();
+LL ~     
+LL ~     sample.iter().next().is_none();
    |
 
 error: avoid using `collect()` when not needed
@@ -51,8 +51,8 @@ LL |     indirect_contains.contains(&&5);
    |
 help: check if the original Iterator contains an element instead of collecting then checking
    |
-LL |     
-LL |     sample.iter().any(|x| x == &5);
+LL ~     
+LL ~     sample.iter().any(|x| x == &5);
    |
 
 error: avoid using `collect()` when not needed
@@ -65,8 +65,8 @@ LL |     non_copy_contains.contains(&a);
    |
 help: check if the original Iterator contains an element instead of collecting then checking
    |
-LL |     
-LL |     sample.into_iter().any(|x| x == a);
+LL ~     
+LL ~     sample.into_iter().any(|x| x == a);
    |
 
 error: avoid using `collect()` when not needed
@@ -79,8 +79,8 @@ LL |         buffer.len()
    |
 help: take the original Iterator's count instead of collecting it and finding the length
    |
-LL |         
-LL |         string.split('/').count()
+LL ~         
+LL ~         string.split('/').count()
    |
 
 error: avoid using `collect()` when not needed
@@ -93,8 +93,8 @@ LL |         indirect_len.len()
    |
 help: take the original Iterator's count instead of collecting it and finding the length
    |
-LL |         
-LL |         sample.iter().count()
+LL ~         
+LL ~         sample.iter().count()
    |
 
 error: avoid using `collect()` when not needed
@@ -107,8 +107,8 @@ LL |         indirect_len.len()
    |
 help: take the original Iterator's count instead of collecting it and finding the length
    |
-LL |         
-LL |         sample.iter().count()
+LL ~         
+LL ~         sample.iter().count()
    |
 
 error: avoid using `collect()` when not needed
@@ -121,8 +121,8 @@ LL |         indirect_len.len()
    |
 help: take the original Iterator's count instead of collecting it and finding the length
    |
-LL |         
-LL |         sample.iter().count()
+LL ~         
+LL ~         sample.iter().count()
    |
 
 error: aborting due to 9 previous errors
index 483a5e6d61d7291cb4a7d6f637bf5b1dfa42beb6..6487e57266c71a7da8a65bc3f722cfffa30884b5 100644 (file)
@@ -9,9 +9,9 @@ LL | |     });
    = note: `-D clippy::needless-for-each` implied by `-D warnings`
 help: try
    |
-LL |     for elem in v.iter() {
-LL |         acc += elem;
-LL |     }
+LL ~     for elem in v.iter() {
+LL +         acc += elem;
+LL +     }
    |
 
 error: needless use of `for_each`
@@ -24,9 +24,9 @@ LL | |     });
    |
 help: try
    |
-LL |     for elem in v.into_iter() {
-LL |         acc += elem;
-LL |     }
+LL ~     for elem in v.into_iter() {
+LL +         acc += elem;
+LL +     }
    |
 
 error: needless use of `for_each`
@@ -39,9 +39,9 @@ LL | |     });
    |
 help: try
    |
-LL |     for elem in [1, 2, 3].iter() {
-LL |         acc += elem;
-LL |     }
+LL ~     for elem in [1, 2, 3].iter() {
+LL +         acc += elem;
+LL +     }
    |
 
 error: needless use of `for_each`
@@ -54,9 +54,9 @@ LL | |     });
    |
 help: try
    |
-LL |     for (k, v) in hash_map.iter() {
-LL |         acc += k + v;
-LL |     }
+LL ~     for (k, v) in hash_map.iter() {
+LL +         acc += k + v;
+LL +     }
    |
 
 error: needless use of `for_each`
@@ -69,9 +69,9 @@ LL | |     });
    |
 help: try
    |
-LL |     for (k, v) in hash_map.iter_mut() {
-LL |         acc += *k + *v;
-LL |     }
+LL ~     for (k, v) in hash_map.iter_mut() {
+LL +         acc += *k + *v;
+LL +     }
    |
 
 error: needless use of `for_each`
@@ -84,9 +84,9 @@ LL | |     });
    |
 help: try
    |
-LL |     for k in hash_map.keys() {
-LL |         acc += k;
-LL |     }
+LL ~     for k in hash_map.keys() {
+LL +         acc += k;
+LL +     }
    |
 
 error: needless use of `for_each`
@@ -99,9 +99,9 @@ LL | |     });
    |
 help: try
    |
-LL |     for v in hash_map.values() {
-LL |         acc += v;
-LL |     }
+LL ~     for v in hash_map.values() {
+LL +         acc += v;
+LL +     }
    |
 
 error: needless use of `for_each`
@@ -114,9 +114,9 @@ LL | |     });
    |
 help: try
    |
-LL |     for elem in my_vec().iter() {
-LL |         acc += elem;
-LL |     }
+LL ~     for elem in my_vec().iter() {
+LL +         acc += elem;
+LL +     }
    |
 
 error: aborting due to 8 previous errors
index 8c4507d23283ce2b0c9785e1734626c8357e8ae2..f607e0a430e24f195850f3291db21f986a66e817 100644 (file)
@@ -13,17 +13,17 @@ LL | |     });
    = note: `-D clippy::needless-for-each` implied by `-D warnings`
 help: try
    |
-LL |     for v in v.iter() {
-LL |         if *v == 10 {
-LL |             return;
-LL |         } else {
-LL |             println!("{}", v);
-LL |         }
+LL ~     for v in v.iter() {
+LL +         if *v == 10 {
+LL +             return;
+LL +         } else {
+LL +             println!("{}", v);
+LL +         }
  ...
 help: ...and replace `return` with `continue`
    |
 LL |             continue;
-   |             ^^^^^^^^
+   |             ~~~~~~~~
 
 error: aborting due to previous error
 
index 9aa783bf904e1224a5d1361c0579fd01a2050c73..2f61ba241c45dd64f2bb13c9e6a142ab342fd796 100644 (file)
@@ -63,11 +63,11 @@ LL | fn issue_2114(s: String, t: String, u: Vec<i32>, v: Vec<i32>) {
 help: consider changing the type to
    |
 LL | fn issue_2114(s: String, t: &str, u: Vec<i32>, v: Vec<i32>) {
-   |                             ^^^^
+   |                             ~~~~
 help: change `t.clone()` to
    |
 LL |     let _ = t.to_string();
-   |             ^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~
 
 error: this argument is passed by value, but not consumed in the function body
   --> $DIR/needless_pass_by_value.rs:81:40
@@ -84,11 +84,11 @@ LL | fn issue_2114(s: String, t: String, u: Vec<i32>, v: Vec<i32>) {
 help: consider changing the type to
    |
 LL | fn issue_2114(s: String, t: String, u: Vec<i32>, v: &[i32]) {
-   |                                                     ^^^^^^
+   |                                                     ~~~~~~
 help: change `v.clone()` to
    |
 LL |     let _ = v.to_owned();
-   |             ^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~
 
 error: this argument is passed by value, but not consumed in the function body
   --> $DIR/needless_pass_by_value.rs:94:12
index c898cd64a93925e0b5ef45fc640825bff9ff8f6d..a86cc69dfc5db19c933922488b8819a569d06e0a 100644 (file)
@@ -8,7 +8,7 @@ LL |     for i in 0..vec.len() {
 help: consider using an iterator
    |
 LL |     for <item> in &vec {
-   |         ^^^^^^    ^^^^
+   |         ~~~~~~    ~~~~
 
 error: the loop variable `i` is only used to index `vec`
   --> $DIR/needless_range_loop.rs:19:14
@@ -19,7 +19,7 @@ LL |     for i in 0..vec.len() {
 help: consider using an iterator
    |
 LL |     for <item> in &vec {
-   |         ^^^^^^    ^^^^
+   |         ~~~~~~    ~~~~
 
 error: the loop variable `j` is only used to index `STATIC`
   --> $DIR/needless_range_loop.rs:24:14
@@ -30,7 +30,7 @@ LL |     for j in 0..4 {
 help: consider using an iterator
    |
 LL |     for <item> in &STATIC {
-   |         ^^^^^^    ^^^^^^^
+   |         ~~~~~~    ~~~~~~~
 
 error: the loop variable `j` is only used to index `CONST`
   --> $DIR/needless_range_loop.rs:28:14
@@ -41,7 +41,7 @@ LL |     for j in 0..4 {
 help: consider using an iterator
    |
 LL |     for <item> in &CONST {
-   |         ^^^^^^    ^^^^^^
+   |         ~~~~~~    ~~~~~~
 
 error: the loop variable `i` is used to index `vec`
   --> $DIR/needless_range_loop.rs:32:14
@@ -52,7 +52,7 @@ LL |     for i in 0..vec.len() {
 help: consider using an iterator
    |
 LL |     for (i, <item>) in vec.iter().enumerate() {
-   |         ^^^^^^^^^^^    ^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~
 
 error: the loop variable `i` is only used to index `vec2`
   --> $DIR/needless_range_loop.rs:40:14
@@ -63,7 +63,7 @@ LL |     for i in 0..vec.len() {
 help: consider using an iterator
    |
 LL |     for <item> in vec2.iter().take(vec.len()) {
-   |         ^^^^^^    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: the loop variable `i` is only used to index `vec`
   --> $DIR/needless_range_loop.rs:44:14
@@ -74,7 +74,7 @@ LL |     for i in 5..vec.len() {
 help: consider using an iterator
    |
 LL |     for <item> in vec.iter().skip(5) {
-   |         ^^^^^^    ^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~    ~~~~~~~~~~~~~~~~~~
 
 error: the loop variable `i` is only used to index `vec`
   --> $DIR/needless_range_loop.rs:48:14
@@ -85,7 +85,7 @@ LL |     for i in 0..MAX_LEN {
 help: consider using an iterator
    |
 LL |     for <item> in vec.iter().take(MAX_LEN) {
-   |         ^^^^^^    ^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: the loop variable `i` is only used to index `vec`
   --> $DIR/needless_range_loop.rs:52:14
@@ -96,7 +96,7 @@ LL |     for i in 0..=MAX_LEN {
 help: consider using an iterator
    |
 LL |     for <item> in vec.iter().take(MAX_LEN + 1) {
-   |         ^^^^^^    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: the loop variable `i` is only used to index `vec`
   --> $DIR/needless_range_loop.rs:56:14
@@ -107,7 +107,7 @@ LL |     for i in 5..10 {
 help: consider using an iterator
    |
 LL |     for <item> in vec.iter().take(10).skip(5) {
-   |         ^^^^^^    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: the loop variable `i` is only used to index `vec`
   --> $DIR/needless_range_loop.rs:60:14
@@ -118,7 +118,7 @@ LL |     for i in 5..=10 {
 help: consider using an iterator
    |
 LL |     for <item> in vec.iter().take(10 + 1).skip(5) {
-   |         ^^^^^^    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: the loop variable `i` is used to index `vec`
   --> $DIR/needless_range_loop.rs:64:14
@@ -129,7 +129,7 @@ LL |     for i in 5..vec.len() {
 help: consider using an iterator
    |
 LL |     for (i, <item>) in vec.iter().enumerate().skip(5) {
-   |         ^^^^^^^^^^^    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: the loop variable `i` is used to index `vec`
   --> $DIR/needless_range_loop.rs:68:14
@@ -140,7 +140,7 @@ LL |     for i in 5..10 {
 help: consider using an iterator
    |
 LL |     for (i, <item>) in vec.iter().enumerate().take(10).skip(5) {
-   |         ^^^^^^^^^^^    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: the loop variable `i` is used to index `vec`
   --> $DIR/needless_range_loop.rs:73:14
@@ -151,7 +151,7 @@ LL |     for i in 0..vec.len() {
 help: consider using an iterator
    |
 LL |     for (i, <item>) in vec.iter_mut().enumerate() {
-   |         ^^^^^^^^^^^    ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 14 previous errors
 
index 2e1f0fd0299b4cfb168785cc34b2bc11cfdf4110..1e6ec5e667aa0839f716e1d8802ed2b726290153 100644 (file)
@@ -8,7 +8,7 @@ LL |     for i in 3..10 {
 help: consider using an iterator
    |
 LL |     for <item> in ns.iter().take(10).skip(3) {
-   |         ^^^^^^    ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: the loop variable `i` is only used to index `ms`
   --> $DIR/needless_range_loop2.rs:31:14
@@ -19,7 +19,7 @@ LL |     for i in 0..ms.len() {
 help: consider using an iterator
    |
 LL |     for <item> in &mut ms {
-   |         ^^^^^^    ^^^^^^^
+   |         ~~~~~~    ~~~~~~~
 
 error: the loop variable `i` is only used to index `ms`
   --> $DIR/needless_range_loop2.rs:37:14
@@ -30,7 +30,7 @@ LL |     for i in 0..ms.len() {
 help: consider using an iterator
    |
 LL |     for <item> in &mut ms {
-   |         ^^^^^^    ^^^^^^^
+   |         ~~~~~~    ~~~~~~~
 
 error: the loop variable `i` is only used to index `vec`
   --> $DIR/needless_range_loop2.rs:61:14
@@ -41,7 +41,7 @@ LL |     for i in x..x + 4 {
 help: consider using an iterator
    |
 LL |     for <item> in vec.iter_mut().skip(x).take(4) {
-   |         ^^^^^^    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: the loop variable `i` is only used to index `vec`
   --> $DIR/needless_range_loop2.rs:68:14
@@ -52,7 +52,7 @@ LL |     for i in x..=x + 4 {
 help: consider using an iterator
    |
 LL |     for <item> in vec.iter_mut().skip(x).take(4 + 1) {
-   |         ^^^^^^    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: the loop variable `i` is only used to index `arr`
   --> $DIR/needless_range_loop2.rs:74:14
@@ -63,7 +63,7 @@ LL |     for i in 0..3 {
 help: consider using an iterator
    |
 LL |     for <item> in &arr {
-   |         ^^^^^^    ^^^^
+   |         ~~~~~~    ~~~~
 
 error: the loop variable `i` is only used to index `arr`
   --> $DIR/needless_range_loop2.rs:78:14
@@ -74,7 +74,7 @@ LL |     for i in 0..2 {
 help: consider using an iterator
    |
 LL |     for <item> in arr.iter().take(2) {
-   |         ^^^^^^    ^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~    ~~~~~~~~~~~~~~~~~~
 
 error: the loop variable `i` is only used to index `arr`
   --> $DIR/needless_range_loop2.rs:82:14
@@ -85,7 +85,7 @@ LL |     for i in 1..3 {
 help: consider using an iterator
    |
 LL |     for <item> in arr.iter().skip(1) {
-   |         ^^^^^^    ^^^^^^^^^^^^^^^^^^
+   |         ~~~~~~    ~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 8 previous errors
 
index 7c964000807ea9730bb38aba3da58a9be7f96227..14ddb66f2324c18b6ddd10e5e9655015e5fd72a0 100644 (file)
@@ -9,11 +9,11 @@ LL | |     }
    = note: `-D clippy::new-without-default` implied by `-D warnings`
 help: try adding this
    |
-LL | impl Default for Foo {
-LL |     fn default() -> Self {
-LL |         Self::new()
-LL |     }
-LL | }
+LL + impl Default for Foo {
+LL +     fn default() -> Self {
+LL +         Self::new()
+LL +     }
+LL + }
    |
 
 error: you should consider adding a `Default` implementation for `Bar`
@@ -26,11 +26,11 @@ LL | |     }
    |
 help: try adding this
    |
-LL | impl Default for Bar {
-LL |     fn default() -> Self {
-LL |         Self::new()
-LL |     }
-LL | }
+LL + impl Default for Bar {
+LL +     fn default() -> Self {
+LL +         Self::new()
+LL +     }
+LL + }
    |
 
 error: you should consider adding a `Default` implementation for `LtKo<'c>`
@@ -43,11 +43,11 @@ LL | |     }
    |
 help: try adding this
    |
-LL | impl<'c> Default for LtKo<'c> {
-LL |     fn default() -> Self {
-LL |         Self::new()
-LL |     }
-LL | }
+LL + impl<'c> Default for LtKo<'c> {
+LL +     fn default() -> Self {
+LL +         Self::new()
+LL +     }
+LL + }
    |
 
 error: you should consider adding a `Default` implementation for `NewNotEqualToDerive`
@@ -60,11 +60,11 @@ LL | |     }
    |
 help: try adding this
    |
-LL | impl Default for NewNotEqualToDerive {
-LL |     fn default() -> Self {
-LL |         Self::new()
-LL |     }
-LL | }
+LL + impl Default for NewNotEqualToDerive {
+LL +     fn default() -> Self {
+LL +         Self::new()
+LL +     }
+LL + }
    |
 
 error: you should consider adding a `Default` implementation for `FooGenerics<T>`
@@ -77,11 +77,11 @@ LL | |     }
    |
 help: try adding this
    |
-LL | impl<T> Default for FooGenerics<T> {
-LL |     fn default() -> Self {
-LL |         Self::new()
-LL |     }
-LL | }
+LL + impl<T> Default for FooGenerics<T> {
+LL +     fn default() -> Self {
+LL +         Self::new()
+LL +     }
+LL + }
    |
 
 error: you should consider adding a `Default` implementation for `BarGenerics<T>`
@@ -94,11 +94,11 @@ LL | |     }
    |
 help: try adding this
    |
-LL | impl<T: Copy> Default for BarGenerics<T> {
-LL |     fn default() -> Self {
-LL |         Self::new()
-LL |     }
-LL | }
+LL + impl<T: Copy> Default for BarGenerics<T> {
+LL +     fn default() -> Self {
+LL +         Self::new()
+LL +     }
+LL + }
    |
 
 error: you should consider adding a `Default` implementation for `Foo<T>`
@@ -111,12 +111,12 @@ LL | |         }
    |
 help: try adding this
    |
-LL |     impl<T> Default for Foo<T> {
-LL |         fn default() -> Self {
-LL |             Self::new()
-LL |         }
-LL |     }
-LL | 
+LL ~     impl<T> Default for Foo<T> {
+LL +         fn default() -> Self {
+LL +             Self::new()
+LL +         }
+LL +     }
+LL + 
  ...
 
 error: aborting due to 7 previous errors
index d34d106cb2fbb1a11d245224b2ad622a287c8f8b..1d39bce935db8cdb0dfedba0f9e6424613bc2249 100644 (file)
@@ -51,9 +51,9 @@ LL |     let _ = a == b && c == 5 && a == b;
 help: try
    |
 LL |     let _ = a == b && c == 5;
-   |             ^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~
 LL |     let _ = !(a != b || c != 5);
-   |             ^^^^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~~~~
 
 error: this boolean expression can be simplified
   --> $DIR/nonminimal_bool.rs:28:13
@@ -64,9 +64,9 @@ LL |     let _ = a == b || c == 5 || a == b;
 help: try
    |
 LL |     let _ = a == b || c == 5;
-   |             ^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~
 LL |     let _ = !(a != b && c != 5);
-   |             ^^^^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~~~~
 
 error: this boolean expression can be simplified
   --> $DIR/nonminimal_bool.rs:29:13
@@ -77,9 +77,9 @@ LL |     let _ = a == b && c == 5 && b == a;
 help: try
    |
 LL |     let _ = a == b && c == 5;
-   |             ^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~
 LL |     let _ = !(a != b || c != 5);
-   |             ^^^^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~~~~
 
 error: this boolean expression can be simplified
   --> $DIR/nonminimal_bool.rs:30:13
@@ -90,9 +90,9 @@ LL |     let _ = a != b || !(a != b || c == d);
 help: try
    |
 LL |     let _ = a != b || c != d;
-   |             ^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~
 LL |     let _ = !(a == b && c == d);
-   |             ^^^^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~~~~
 
 error: this boolean expression can be simplified
   --> $DIR/nonminimal_bool.rs:31:13
@@ -103,9 +103,9 @@ LL |     let _ = a != b && !(a != b && c == d);
 help: try
    |
 LL |     let _ = a != b && c != d;
-   |             ^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~
 LL |     let _ = !(a == b || c == d);
-   |             ^^^^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 12 previous errors
 
index a3a9adcc483551aa12d80c7423fa241625234e56..821099d8779dc1421b5f6625ad67e0b3e220f29f 100644 (file)
@@ -8,7 +8,7 @@ LL |     let foo = &5 - &6;
 help: use the values directly
    |
 LL |     let foo = 5 - 6;
-   |               ^   ^
+   |               ~   ~
 
 error: taken reference of right operand
   --> $DIR/op_ref.rs:57:13
index 4ebb068d22ed52bd3de3a674f214639aad6417fc..099e49ef8e3dc5e9b7762645ba8a0e400ada3405 100644 (file)
@@ -36,10 +36,10 @@ LL | |     };
    |
 help: try
    |
-LL |     let _ = num.as_mut().map_or(&mut 0, |s| {
-LL |         *s += 1;
-LL |         s
-LL |     });
+LL ~     let _ = num.as_mut().map_or(&mut 0, |s| {
+LL +         *s += 1;
+LL +         s
+LL ~     });
    |
 
 error: use Option::map_or instead of an if let/else
@@ -62,10 +62,10 @@ LL | |     };
    |
 help: try
    |
-LL |     let _ = num.map_or(0, |mut s| {
-LL |         s += 1;
-LL |         s
-LL |     });
+LL ~     let _ = num.map_or(0, |mut s| {
+LL +         s += 1;
+LL +         s
+LL ~     });
    |
 
 error: use Option::map_or instead of an if let/else
@@ -82,10 +82,10 @@ LL | |     };
    |
 help: try
    |
-LL |     let _ = num.as_mut().map_or(&mut 0, |s| {
-LL |         *s += 1;
-LL |         s
-LL |     });
+LL ~     let _ = num.as_mut().map_or(&mut 0, |s| {
+LL +         *s += 1;
+LL +         s
+LL ~     });
    |
 
 error: use Option::map_or instead of an if let/else
@@ -101,10 +101,10 @@ LL | |     }
    |
 help: try
    |
-LL |     arg.map_or(13, |x| {
-LL |         let y = x * x;
-LL |         y * y
-LL |     })
+LL ~     arg.map_or(13, |x| {
+LL +         let y = x * x;
+LL +         y * y
+LL +     })
    |
 
 error: use Option::map_or_else instead of an if let/else
@@ -134,12 +134,12 @@ LL | |     };
    |
 help: try
    |
-LL |     let _ = arg.map_or_else(|| {
-LL |         let mut y = 1;
-LL |         y = (y + 2 / y) / 2;
-LL |         y = (y + 2 / y) / 2;
-LL |         y
-LL |     }, |x| x * x * x * x);
+LL ~     let _ = arg.map_or_else(|| {
+LL +         let mut y = 1;
+LL +         y = (y + 2 / y) / 2;
+LL +         y = (y + 2 / y) / 2;
+LL +         y
+LL ~     }, |x| x * x * x * x);
    |
 
 error: use Option::map_or instead of an if let/else
index 1cba29412b872b927a359b74ab397d5b1b2798a9..27d68b85e6f81f853d59e6aa613e8c39904696ca 100644 (file)
@@ -17,9 +17,9 @@ LL | |                        });
    |
 help: try using `and_then` instead
    |
-LL |     let _ = opt.and_then(|x| {
-LL |                         Some(x + 1)
-LL |                        });
+LL ~     let _ = opt.and_then(|x| {
+LL +                         Some(x + 1)
+LL ~                        });
    |
 
 error: aborting due to 2 previous errors
index 54a4084c89e116f1e532c9ac76c8e5bd63d11f47..a10cac04411cc737cefd77015b105fe43615bf3e 100644 (file)
@@ -7,8 +7,9 @@ LL |     print!("Hello {}", "world");
    = note: `-D clippy::print-literal` implied by `-D warnings`
 help: try this
    |
-LL |     print!("Hello world");
-   |                   ^^^^^--
+LL -     print!("Hello {}", "world");
+LL +     print!("Hello world");
+   | 
 
 error: literal with an empty format string
   --> $DIR/print_literal.rs:26:36
@@ -18,8 +19,9 @@ LL |     println!("Hello {} {}", world, "world");
    |
 help: try this
    |
-LL |     println!("Hello {} world", world);
-   |                        ^^^^^       --
+LL -     println!("Hello {} {}", world, "world");
+LL +     println!("Hello {} world", world);
+   | 
 
 error: literal with an empty format string
   --> $DIR/print_literal.rs:27:26
@@ -29,8 +31,9 @@ LL |     println!("Hello {}", "world");
    |
 help: try this
    |
-LL |     println!("Hello world");
-   |                     ^^^^^--
+LL -     println!("Hello {}", "world");
+LL +     println!("Hello world");
+   | 
 
 error: literal with an empty format string
   --> $DIR/print_literal.rs:32:25
@@ -40,8 +43,9 @@ LL |     println!("{0} {1}", "hello", "world");
    |
 help: try this
    |
-LL |     println!("hello {1}", "world");
-   |               ^^^^^    --
+LL -     println!("{0} {1}", "hello", "world");
+LL +     println!("hello {1}", "world");
+   | 
 
 error: literal with an empty format string
   --> $DIR/print_literal.rs:32:34
@@ -51,8 +55,9 @@ LL |     println!("{0} {1}", "hello", "world");
    |
 help: try this
    |
-LL |     println!("{0} world", "hello");
-   |                   ^^^^^         --
+LL -     println!("{0} {1}", "hello", "world");
+LL +     println!("{0} world", "hello");
+   | 
 
 error: literal with an empty format string
   --> $DIR/print_literal.rs:33:25
@@ -62,8 +67,9 @@ LL |     println!("{1} {0}", "hello", "world");
    |
 help: try this
    |
-LL |     println!("{1} hello", "world");
-   |                   ^^^^^--
+LL -     println!("{1} {0}", "hello", "world");
+LL +     println!("{1} hello", "world");
+   | 
 
 error: literal with an empty format string
   --> $DIR/print_literal.rs:33:34
@@ -73,8 +79,9 @@ LL |     println!("{1} {0}", "hello", "world");
    |
 help: try this
    |
-LL |     println!("world {0}", "hello");
-   |               ^^^^^             --
+LL -     println!("{1} {0}", "hello", "world");
+LL +     println!("world {0}", "hello");
+   | 
 
 error: literal with an empty format string
   --> $DIR/print_literal.rs:36:29
@@ -84,8 +91,9 @@ LL |     println!("{foo} {bar}", foo = "hello", bar = "world");
    |
 help: try this
    |
-LL |     println!("hello {bar}", bar = "world");
-   |               ^^^^^      --
+LL -     println!("{foo} {bar}", foo = "hello", bar = "world");
+LL +     println!("hello {bar}", bar = "world");
+   | 
 
 error: literal with an empty format string
   --> $DIR/print_literal.rs:36:44
@@ -95,8 +103,9 @@ LL |     println!("{foo} {bar}", foo = "hello", bar = "world");
    |
 help: try this
    |
-LL |     println!("{foo} world", foo = "hello");
-   |                     ^^^^^               --
+LL -     println!("{foo} {bar}", foo = "hello", bar = "world");
+LL +     println!("{foo} world", foo = "hello");
+   | 
 
 error: literal with an empty format string
   --> $DIR/print_literal.rs:37:29
@@ -106,8 +115,9 @@ LL |     println!("{bar} {foo}", foo = "hello", bar = "world");
    |
 help: try this
    |
-LL |     println!("{bar} hello", bar = "world");
-   |                     ^^^^^--
+LL -     println!("{bar} {foo}", foo = "hello", bar = "world");
+LL +     println!("{bar} hello", bar = "world");
+   | 
 
 error: literal with an empty format string
   --> $DIR/print_literal.rs:37:44
@@ -117,8 +127,9 @@ LL |     println!("{bar} {foo}", foo = "hello", bar = "world");
    |
 help: try this
    |
-LL |     println!("world {foo}", foo = "hello");
-   |               ^^^^^                     --
+LL -     println!("{bar} {foo}", foo = "hello", bar = "world");
+LL +     println!("world {foo}", foo = "hello");
+   | 
 
 error: aborting due to 11 previous errors
 
index 54b3ad75b31e83bb9a893ee910257a29de946fcd..d409bee30ece3a5b683d39ca9ef51f1d244d43f3 100644 (file)
@@ -7,8 +7,9 @@ LL |     print!("Hello/n");
    = note: `-D clippy::print-with-newline` implied by `-D warnings`
 help: use `println!` instead
    |
-LL |     println!("Hello");
-   |     ^^^^^^^       --
+LL -     print!("Hello/n");
+LL +     println!("Hello");
+   | 
 
 error: using `print!()` with a format string that ends in a single newline
   --> $DIR/print_with_newline.rs:9:5
@@ -18,8 +19,9 @@ LL |     print!("Hello {}/n", "world");
    |
 help: use `println!` instead
    |
-LL |     println!("Hello {}", "world");
-   |     ^^^^^^^          --
+LL -     print!("Hello {}/n", "world");
+LL +     println!("Hello {}", "world");
+   | 
 
 error: using `print!()` with a format string that ends in a single newline
   --> $DIR/print_with_newline.rs:10:5
@@ -29,8 +31,9 @@ LL |     print!("Hello {} {}/n", "world", "#2");
    |
 help: use `println!` instead
    |
-LL |     println!("Hello {} {}", "world", "#2");
-   |     ^^^^^^^             --
+LL -     print!("Hello {} {}/n", "world", "#2");
+LL +     println!("Hello {} {}", "world", "#2");
+   | 
 
 error: using `print!()` with a format string that ends in a single newline
   --> $DIR/print_with_newline.rs:11:5
@@ -40,8 +43,9 @@ LL |     print!("{}/n", 1265);
    |
 help: use `println!` instead
    |
-LL |     println!("{}", 1265);
-   |     ^^^^^^^    --
+LL -     print!("{}/n", 1265);
+LL +     println!("{}", 1265);
+   | 
 
 error: using `print!()` with a format string that ends in a single newline
   --> $DIR/print_with_newline.rs:12:5
@@ -51,8 +55,9 @@ LL |     print!("/n");
    |
 help: use `println!` instead
    |
-LL |     println!();
-   |     ^^^^^^^ --
+LL -     print!("/n");
+LL +     println!();
+   | 
 
 error: using `print!()` with a format string that ends in a single newline
   --> $DIR/print_with_newline.rs:31:5
@@ -62,8 +67,9 @@ LL |     print!("//n"); // should fail
    |
 help: use `println!` instead
    |
-LL |     println!("/"); // should fail
-   |     ^^^^^^^    --
+LL -     print!("//n"); // should fail
+LL +     println!("/"); // should fail
+   | 
 
 error: using `print!()` with a format string that ends in a single newline
   --> $DIR/print_with_newline.rs:38:5
@@ -76,8 +82,8 @@ LL | |     );
    |
 help: use `println!` instead
    |
-LL |     println!(
-LL |         ""
+LL ~     println!(
+LL ~         ""
    |
 
 error: using `print!()` with a format string that ends in a single newline
@@ -91,8 +97,8 @@ LL | |     );
    |
 help: use `println!` instead
    |
-LL |     println!(
-LL |         r""
+LL ~     println!(
+LL ~         r""
    |
 
 error: using `print!()` with a format string that ends in a single newline
@@ -103,8 +109,9 @@ LL |     print!("/r/n"); //~ ERROR
    |
 help: use `println!` instead
    |
-LL |     println!("/r"); //~ ERROR
-   |     ^^^^^^^     --
+LL -     print!("/r/n"); //~ ERROR
+LL +     println!("/r"); //~ ERROR
+   | 
 
 error: using `print!()` with a format string that ends in a single newline
   --> $DIR/print_with_newline.rs:51:5
@@ -114,8 +121,9 @@ LL |     print!("foo/rbar/n") // ~ ERROR
    |
 help: use `println!` instead
    |
-LL |     println!("foo/rbar") // ~ ERROR
-   |     ^^^^^^^          --
+LL -     print!("foo/rbar/n") // ~ ERROR
+LL +     println!("foo/rbar") // ~ ERROR
+   | 
 
 error: aborting due to 10 previous errors
 
index d302b16d4b72ac801147a2056717b8f58a699b54..64594eb870c2c5067b413095f6eabdeded968ebc 100644 (file)
@@ -33,11 +33,11 @@ LL | fn cloned(x: &Vec<u8>) -> Vec<u8> {
 help: change this to
    |
 LL | fn cloned(x: &[u8]) -> Vec<u8> {
-   |              ^^^^^
+   |              ~~~~~
 help: change `x.clone()` to
    |
 LL |     let e = x.to_owned();
-   |             ^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~
 help: change `x.clone()` to
    |
 LL |     x.to_owned()
@@ -52,15 +52,15 @@ LL | fn str_cloned(x: &String) -> String {
 help: change this to
    |
 LL | fn str_cloned(x: &str) -> String {
-   |                  ^^^^
+   |                  ~~~~
 help: change `x.clone()` to
    |
 LL |     let a = x.to_string();
-   |             ^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~
 help: change `x.clone()` to
    |
 LL |     let b = x.to_string();
-   |             ^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~
 help: change `x.clone()` to
    |
 LL |     x.to_string()
@@ -75,15 +75,15 @@ LL | fn path_cloned(x: &PathBuf) -> PathBuf {
 help: change this to
    |
 LL | fn path_cloned(x: &Path) -> PathBuf {
-   |                   ^^^^^
+   |                   ~~~~~
 help: change `x.clone()` to
    |
 LL |     let a = x.to_path_buf();
-   |             ^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~
 help: change `x.clone()` to
    |
 LL |     let b = x.to_path_buf();
-   |             ^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~
 help: change `x.clone()` to
    |
 LL |     x.to_path_buf()
@@ -98,15 +98,15 @@ LL | fn false_positive_capacity(x: &Vec<u8>, y: &String) {
 help: change this to
    |
 LL | fn false_positive_capacity(x: &Vec<u8>, y: &str) {
-   |                                            ^^^^
+   |                                            ~~~~
 help: change `y.clone()` to
    |
 LL |     let b = y.to_string();
-   |             ^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~
 help: change `y.as_str()` to
    |
 LL |     let c = y;
-   |             ^
+   |             ~
 
 error: using a reference to `Cow` is not recommended
   --> $DIR/ptr_arg.rs:90:25
@@ -123,15 +123,15 @@ LL |     fn foo_vec(vec: &Vec<u8>) {
 help: change this to
    |
 LL |     fn foo_vec(vec: &[u8]) {
-   |                     ^^^^^
+   |                     ~~~~~
 help: change `vec.clone()` to
    |
 LL |         let _ = vec.to_owned().pop();
-   |                 ^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~
 help: change `vec.clone()` to
    |
 LL |         let _ = vec.to_owned().clone();
-   |                 ^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~
 
 error: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do
   --> $DIR/ptr_arg.rs:148:23
@@ -142,15 +142,15 @@ LL |     fn foo_path(path: &PathBuf) {
 help: change this to
    |
 LL |     fn foo_path(path: &Path) {
-   |                       ^^^^^
+   |                       ~~~~~
 help: change `path.clone()` to
    |
 LL |         let _ = path.to_path_buf().pop();
-   |                 ^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~
 help: change `path.clone()` to
    |
 LL |         let _ = path.to_path_buf().clone();
-   |                 ^^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~~
 
 error: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do
   --> $DIR/ptr_arg.rs:153:21
@@ -161,15 +161,15 @@ LL |     fn foo_str(str: &PathBuf) {
 help: change this to
    |
 LL |     fn foo_str(str: &Path) {
-   |                     ^^^^^
+   |                     ~~~~~
 help: change `str.clone()` to
    |
 LL |         let _ = str.to_path_buf().pop();
-   |                 ^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~
 help: change `str.clone()` to
    |
 LL |         let _ = str.to_path_buf().clone();
-   |                 ^^^^^^^^^^^^^^^^^
+   |                 ~~~~~~~~~~~~~~~~~
 
 error: aborting due to 12 previous errors
 
index 00aeff4fefa32536d43acb6bc3ae9261c0e603fb..eb36cd516a246a9e4f581b7079efb0bacc8cc09d 100644 (file)
@@ -8,7 +8,7 @@ LL |         Some(ref x) => x,
 help: try this
    |
 LL |         Some(x) => &x,
-   |              ^     ^^
+   |              ~     ~~
 
 error: this pattern creates a reference to a reference
   --> $DIR/ref_binding_to_reference.rs:37:14
@@ -18,10 +18,10 @@ LL |         Some(ref x) => {
    |
 help: try this
    |
-LL |         Some(x) => {
+LL ~         Some(x) => {
 LL |             f1(x);
-LL |             f1(x);
-LL |             &x
+LL ~             f1(x);
+LL ~             &x
    |
 
 error: this pattern creates a reference to a reference
@@ -33,7 +33,7 @@ LL |         Some(ref x) => m2!(x),
 help: try this
    |
 LL |         Some(x) => m2!(&x),
-   |              ^         ^^
+   |              ~         ~~
 
 error: this pattern creates a reference to a reference
   --> $DIR/ref_binding_to_reference.rs:52:15
@@ -43,8 +43,8 @@ LL |     let _ = |&ref x: &&String| {
    |
 help: try this
    |
-LL |     let _ = |&x: &&String| {
-LL |         let _: &&String = &x;
+LL ~     let _ = |&x: &&String| {
+LL ~         let _: &&String = &x;
    |
 
 error: this pattern creates a reference to a reference
@@ -55,9 +55,9 @@ LL | fn f2<'a>(&ref x: &&'a String) -> &'a String {
    |
 help: try this
    |
-LL | fn f2<'a>(&x: &&'a String) -> &'a String {
-LL |     let _: &&String = &x;
-LL |     x
+LL ~ fn f2<'a>(&x: &&'a String) -> &'a String {
+LL ~     let _: &&String = &x;
+LL ~     x
    |
 
 error: this pattern creates a reference to a reference
@@ -68,8 +68,8 @@ LL |     fn f(&ref x: &&String) {
    |
 help: try this
    |
-LL |     fn f(&x: &&String) {
-LL |         let _: &&String = &x;
+LL ~     fn f(&x: &&String) {
+LL ~         let _: &&String = &x;
    |
 
 error: this pattern creates a reference to a reference
@@ -80,8 +80,8 @@ LL |     fn f(&ref x: &&String) {
    |
 help: try this
    |
-LL |     fn f(&x: &&String) {
-LL |         let _: &&String = &x;
+LL ~     fn f(&x: &&String) {
+LL ~         let _: &&String = &x;
    |
 
 error: aborting due to 7 previous errors
index de83c4f3d633c141e502bf1cadbcab2eae61f6cc..2d1bfe62c92368a980082148cfdcfc226bc229b2 100644 (file)
@@ -8,7 +8,7 @@ LL |     (42..=21).for_each(|x| println!("{}", x));
 help: consider using the following if you are attempting to iterate over this range in reverse
    |
 LL |     (21..=42).rev().for_each(|x| println!("{}", x));
-   |     ^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~
 
 error: this range is empty so it will yield no values
   --> $DIR/reversed_empty_ranges_fixable.rs:10:13
@@ -19,7 +19,7 @@ LL |     let _ = (ANSWER..21).filter(|x| x % 2 == 0).take(10).collect::<Vec<_>>(
 help: consider using the following if you are attempting to iterate over this range in reverse
    |
 LL |     let _ = (21..ANSWER).rev().filter(|x| x % 2 == 0).take(10).collect::<Vec<_>>();
-   |             ^^^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~~~
 
 error: this range is empty so it will yield no values
   --> $DIR/reversed_empty_ranges_fixable.rs:12:14
@@ -30,7 +30,7 @@ LL |     for _ in -21..=-42 {}
 help: consider using the following if you are attempting to iterate over this range in reverse
    |
 LL |     for _ in (-42..=-21).rev() {}
-   |              ^^^^^^^^^^^^^^^^^
+   |              ~~~~~~~~~~~~~~~~~
 
 error: this range is empty so it will yield no values
   --> $DIR/reversed_empty_ranges_fixable.rs:13:14
@@ -41,7 +41,7 @@ LL |     for _ in 42u32..21u32 {}
 help: consider using the following if you are attempting to iterate over this range in reverse
    |
 LL |     for _ in (21u32..42u32).rev() {}
-   |              ^^^^^^^^^^^^^^^^^^^^
+   |              ~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 4 previous errors
 
index e89e040a0ff9e0ae5f3b49e2eaf00f85bebf556b..a135da488ffd3ed26510433415faebf630d04fc2 100644 (file)
@@ -8,7 +8,7 @@ LL |     for i in 10..0 {
 help: consider using the following if you are attempting to iterate over this range in reverse
    |
 LL |     for i in (0..10).rev() {
-   |              ^^^^^^^^^^^^^
+   |              ~~~~~~~~~~~~~
 
 error: this range is empty so it will yield no values
   --> $DIR/reversed_empty_ranges_loops_fixable.rs:11:14
@@ -19,7 +19,7 @@ LL |     for i in 10..=0 {
 help: consider using the following if you are attempting to iterate over this range in reverse
    |
 LL |     for i in (0..=10).rev() {
-   |              ^^^^^^^^^^^^^^
+   |              ~~~~~~~~~~~~~~
 
 error: this range is empty so it will yield no values
   --> $DIR/reversed_empty_ranges_loops_fixable.rs:15:14
@@ -30,7 +30,7 @@ LL |     for i in MAX_LEN..0 {
 help: consider using the following if you are attempting to iterate over this range in reverse
    |
 LL |     for i in (0..MAX_LEN).rev() {
-   |              ^^^^^^^^^^^^^^^^^^
+   |              ~~~~~~~~~~~~~~~~~~
 
 error: this range is empty so it will yield no values
   --> $DIR/reversed_empty_ranges_loops_fixable.rs:34:14
@@ -41,7 +41,7 @@ LL |     for i in (10..0).map(|x| x * 2) {
 help: consider using the following if you are attempting to iterate over this range in reverse
    |
 LL |     for i in (0..10).rev().map(|x| x * 2) {
-   |              ^^^^^^^^^^^^^
+   |              ~~~~~~~~~~~~~
 
 error: this range is empty so it will yield no values
   --> $DIR/reversed_empty_ranges_loops_fixable.rs:39:14
@@ -52,7 +52,7 @@ LL |     for i in 10..5 + 4 {
 help: consider using the following if you are attempting to iterate over this range in reverse
    |
 LL |     for i in (5 + 4..10).rev() {
-   |              ^^^^^^^^^^^^^^^^^
+   |              ~~~~~~~~~~~~~~~~~
 
 error: this range is empty so it will yield no values
   --> $DIR/reversed_empty_ranges_loops_fixable.rs:43:14
@@ -63,7 +63,7 @@ LL |     for i in (5 + 2)..(3 - 1) {
 help: consider using the following if you are attempting to iterate over this range in reverse
    |
 LL |     for i in ((3 - 1)..(5 + 2)).rev() {
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^
+   |              ~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 6 previous errors
 
index 0e35a33ded5ba0fc34a7aeaf46623630b74aaaa9..f52ca8c5a9b0c35c6cda340763ebc6e4ba74cb17 100644 (file)
@@ -9,10 +9,10 @@ LL | |     }
    = note: `-D clippy::single-element-loop` implied by `-D warnings`
 help: try
    |
-LL |     {
-LL |         let item = &item1;
-LL |         println!("{}", item);
-LL |     }
+LL ~     {
+LL +         let item = &item1;
+LL +         println!("{}", item);
+LL +     }
    |
 
 error: for loop over a single element
@@ -25,10 +25,10 @@ LL | |     }
    |
 help: try
    |
-LL |     {
-LL |         let item = &item1;
-LL |         println!("{:?}", item);
-LL |     }
+LL ~     {
+LL +         let item = &item1;
+LL +         println!("{:?}", item);
+LL +     }
    |
 
 error: aborting due to 2 previous errors
index 9ef2a8668a6faffdcb9e92757bc742b597e0db1a..c261b5111c8bf3edb40c7adf333968aadcb2b555 100644 (file)
@@ -12,9 +12,9 @@ LL | |     };
    = note: `-D clippy::single-match` implied by `-D warnings`
 help: try this
    |
-LL |     if let Some(y) = x {
-LL |         println!("{:?}", y);
-LL |     };
+LL ~     if let Some(y) = x {
+LL +         println!("{:?}", y);
+LL ~     };
    |
 
 error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
index 20be4fa226cf154f1de72a8dcb6ab2f71285a79b..c61d80a905c9f0d0d5b097641c4d6719c7c8dc08 100644 (file)
@@ -13,10 +13,10 @@ LL | |     }
    = note: `-D clippy::single-match-else` implied by `-D warnings`
 help: try this
    |
-LL |     if let ExprNode::ExprAddrOf = ExprNode::Butterflies { Some(&NODE) } else {
-LL |         let x = 5;
-LL |         None
-LL |     }
+LL ~     if let ExprNode::ExprAddrOf = ExprNode::Butterflies { Some(&NODE) } else {
+LL +         let x = 5;
+LL +         None
+LL +     }
    |
 
 error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
@@ -33,10 +33,10 @@ LL | |     }
    |
 help: try this
    |
-LL |     if let Some(a) = Some(1) { println!("${:?}", a) } else {
-LL |         println!("else block");
-LL |         return
-LL |     }
+LL ~     if let Some(a) = Some(1) { println!("${:?}", a) } else {
+LL +         println!("else block");
+LL +         return
+LL +     }
    |
 
 error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
@@ -53,10 +53,10 @@ LL | |     }
    |
 help: try this
    |
-LL |     if let Some(a) = Some(1) { println!("${:?}", a) } else {
-LL |         println!("else block");
-LL |         return;
-LL |     }
+LL ~     if let Some(a) = Some(1) { println!("${:?}", a) } else {
+LL +         println!("else block");
+LL +         return;
+LL +     }
    |
 
 error: aborting due to 3 previous errors
index a212bd327c35dc71ee16e6e948ff3e2af26769d9..e0ca511557c5b594981270097a7161909b6fb319 100644 (file)
@@ -8,7 +8,7 @@ LL |     let len = unsafe { libc::strlen(cstring.as_ptr()) };
 help: try this (you might also need to get rid of `unsafe` block in some cases):
    |
 LL |     let len = unsafe { cstring.as_bytes().len() };
-   |                        ^^^^^^^^^^^^^^^^^^^^^^^^
+   |                        ~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: using `libc::strlen` on a `CString` or `CStr` value
   --> $DIR/strlen_on_c_strings.rs:15:24
@@ -19,7 +19,7 @@ LL |     let len = unsafe { libc::strlen(cstr.as_ptr()) };
 help: try this (you might also need to get rid of `unsafe` block in some cases):
    |
 LL |     let len = unsafe { cstr.to_bytes().len() };
-   |                        ^^^^^^^^^^^^^^^^^^^^^
+   |                        ~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 2 previous errors
 
index 8155c4ae1107b23f57ac42a0439381850f975fdb..5cfb367a7be80795eb5da98fd6b2b3ea4b4614fa 100644 (file)
@@ -13,10 +13,10 @@ LL |         1
    |
 help: or move the expression in front of the call and replace it with the unit literal `()`
    |
-LL |     {
-LL |         1;
-LL |     };
-LL |     foo(());
+LL ~     {
+LL +         1;
+LL +     };
+LL ~     foo(());
    |
 
 error: passing a unit value to a function
@@ -27,8 +27,8 @@ LL |     foo(foo(1));
    |
 help: move the expression in front of the call and replace it with the unit literal `()`
    |
-LL |     foo(1);
-LL |     foo(());
+LL ~     foo(1);
+LL ~     foo(());
    |
 
 error: passing a unit value to a function
@@ -46,11 +46,11 @@ LL |         foo(2)
    |
 help: or move the expression in front of the call and replace it with the unit literal `()`
    |
-LL |     {
-LL |         foo(1);
-LL |         foo(2);
-LL |     };
-LL |     foo(());
+LL ~     {
+LL +         foo(1);
+LL +         foo(2);
+LL +     };
+LL ~     foo(());
    |
 
 error: passing a unit value to a function
@@ -67,10 +67,10 @@ LL |         1
    |
 help: or move the expression in front of the call and replace it with the unit literal `()`
    |
-LL |     {
-LL |         1;
-LL |     };
-LL |     b.bar(());
+LL ~     {
+LL +         1;
+LL +     };
+LL ~     b.bar(());
    |
 
 error: passing unit values to a function
@@ -81,9 +81,9 @@ LL |     taking_multiple_units(foo(0), foo(1));
    |
 help: move the expressions in front of the call and replace them with the unit literal `()`
    |
-LL |     foo(0);
-LL |     foo(1);
-LL |     taking_multiple_units((), ());
+LL ~     foo(0);
+LL +     foo(1);
+LL ~     taking_multiple_units((), ());
    |
 
 error: passing unit values to a function
@@ -101,12 +101,12 @@ LL |         foo(2)
    |
 help: or move the expressions in front of the call and replace them with the unit literal `()`
    |
-LL |     foo(0);
-LL |     {
-LL |         foo(1);
-LL |         foo(2);
-LL |     };
-LL |     taking_multiple_units((), ());
+LL ~     foo(0);
+LL +     {
+LL +         foo(1);
+LL +         foo(2);
+LL +     };
+LL ~     taking_multiple_units((), ());
    |
 
 error: passing unit values to a function
@@ -131,12 +131,12 @@ LL |             foo(3)
    |
 help: or move the expressions in front of the call and replace them with the unit literal `()`
    |
-LL |     {
-LL |         foo(0);
-LL |         foo(1);
-LL |     };
-LL |     {
-LL |         foo(2);
+LL ~     {
+LL +         foo(0);
+LL +         foo(1);
+LL +     };
+LL +     {
+LL +         foo(2);
  ...
 
 error: passing a unit value to a function
@@ -147,10 +147,10 @@ LL |     None.or(Some(foo(2)));
    |
 help: move the expression in front of the call and replace it with the unit literal `()`
    |
-LL |     None.or({
-LL |         foo(2);
-LL |         Some(())
-LL |     });
+LL ~     None.or({
+LL +         foo(2);
+LL +         Some(())
+LL ~     });
    |
 
 error: passing a unit value to a function
@@ -161,8 +161,8 @@ LL |     foo(foo(()));
    |
 help: move the expression in front of the call and replace it with the unit literal `()`
    |
-LL |     foo(());
-LL |     foo(());
+LL ~     foo(());
+LL ~     foo(());
    |
 
 error: passing a unit value to a function
@@ -173,8 +173,8 @@ LL |     Some(foo(1))
    |
 help: move the expression in front of the call and replace it with the unit literal `()`
    |
-LL |     foo(1);
-LL |     Some(())
+LL ~     foo(1);
+LL +     Some(())
    |
 
 error: aborting due to 10 previous errors
index 456b12a2c6b1654a7b18b2325603f740593ce8aa..39072c9a8cc0f0825756e4051d8988b0aaa639c5 100644 (file)
@@ -24,8 +24,8 @@ LL |     taking_two_units({}, foo(0));
    |
 help: move the expression in front of the call and replace it with the unit literal `()`
    |
-LL |     foo(0);
-LL |     taking_two_units((), ());
+LL ~     foo(0);
+LL ~     taking_two_units((), ());
    |
 
 error: passing unit values to a function
@@ -36,9 +36,9 @@ LL |     taking_three_units({}, foo(0), foo(1));
    |
 help: move the expressions in front of the call and replace them with the unit literal `()`
    |
-LL |     foo(0);
-LL |     foo(1);
-LL |     taking_three_units((), (), ());
+LL ~     foo(0);
+LL +     foo(1);
+LL ~     taking_three_units((), (), ());
    |
 
 error: aborting due to 4 previous errors
index 9df1ae568673084298ac3c1acb5672c602616a50..94cc7777acacd787a8aff6f64f48f66d4c9eb0e2 100644 (file)
@@ -54,11 +54,11 @@ LL |     let z: &Vec<_> = y.clone();
 help: try dereferencing it
    |
 LL |     let z: &Vec<_> = &(*y).clone();
-   |                      ^^^^^^^^^^^^^
+   |                      ~~~~~~~~~~~~~
 help: or try being explicit if you are sure, that you want to clone a reference
    |
 LL |     let z: &Vec<_> = <&std::vec::Vec<i32>>::clone(y);
-   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: using `clone` on type `many_derefs::E` which implements the `Copy` trait
   --> $DIR/unnecessary_clone.rs:84:20
@@ -75,11 +75,11 @@ LL |         let _ = &mut encoded.clone();
 help: try dereferencing it
    |
 LL |         let _ = &mut &(*encoded).clone();
-   |                      ^^^^^^^^^^^^^^^^^^^
+   |                      ~~~~~~~~~~~~~~~~~~~
 help: or try being explicit if you are sure, that you want to clone a reference
    |
 LL |         let _ = &mut <&[u8]>::clone(encoded);
-   |                      ^^^^^^^^^^^^^^^^^^^^^^^
+   |                      ~~~~~~~~~~~~~~~~~~~~~~~
 
 error: using `clone` on a double-reference; this will copy the reference of type `&[u8]` instead of cloning the inner type
   --> $DIR/unnecessary_clone.rs:90:18
@@ -90,11 +90,11 @@ LL |         let _ = &encoded.clone();
 help: try dereferencing it
    |
 LL |         let _ = &&(*encoded).clone();
-   |                  ^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~
 help: or try being explicit if you are sure, that you want to clone a reference
    |
 LL |         let _ = &<&[u8]>::clone(encoded);
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~
 
 error: using `.clone()` on a ref-counted pointer
   --> $DIR/unnecessary_clone.rs:108:14
index 0e570397e2a298c3dd189fa7be528be194b2dfcf..8e31db3950247a6c699627f94cb87bab70e199d4 100644 (file)
@@ -14,14 +14,14 @@ LL | | }
 help: remove `Option` from the return type...
    |
 LL | fn func1(a: bool, b: bool) -> i32 {
-   |                               ^^^
+   |                               ~~~
 help: ...and then change returning expressions
    |
-LL |         return 42;
+LL ~         return 42;
 LL |     }
 LL |     if a {
 LL |         Some(-1);
-LL |         2
+LL ~         2
 LL |     } else {
  ...
 
@@ -39,12 +39,12 @@ LL | | }
 help: remove `Option` from the return type...
    |
 LL | fn func2(a: bool, b: bool) -> i32 {
-   |                               ^^^
+   |                               ~~~
 help: ...and then change returning expressions
    |
-LL |         return 10;
+LL ~         return 10;
 LL |     }
-LL |     if a { 20 } else { 30 }
+LL ~     if a { 20 } else { 30 }
    |
 
 error: this function's return value is unnecessarily wrapped by `Option`
@@ -58,7 +58,7 @@ LL | | }
 help: remove `Option` from the return type...
    |
 LL | fn func5() -> i32 {
-   |               ^^^
+   |               ~~~
 help: ...and then change returning expressions
    |
 LL |     1
@@ -75,7 +75,7 @@ LL | | }
 help: remove `Result` from the return type...
    |
 LL | fn func7() -> i32 {
-   |               ^^^
+   |               ~~~
 help: ...and then change returning expressions
    |
 LL |     1
@@ -92,7 +92,7 @@ LL | |     }
 help: remove `Option` from the return type...
    |
 LL |     fn func12() -> i32 {
-   |                    ^^^
+   |                    ~~~
 help: ...and then change returning expressions
    |
 LL |         1
@@ -113,14 +113,14 @@ LL | | }
 help: remove the return type...
    |
 LL | fn issue_6640_1(a: bool, b: bool) -> Option<()> {
-   |                                      ^^^^^^^^^^
+   |                                      ~~~~~~~~~~
 help: ...and then remove returned values
    |
-LL |         return ;
+LL ~         return ;
 LL |     }
 LL |     if a {
 LL |         Some(());
-LL |         
+LL ~         
 LL |     } else {
  ...
 
@@ -139,15 +139,15 @@ LL | | }
 help: remove the return type...
    |
 LL | fn issue_6640_2(a: bool, b: bool) -> Result<(), i32> {
-   |                                      ^^^^^^^^^^^^^^^
+   |                                      ~~~~~~~~~~~~~~~
 help: ...and then remove returned values
    |
-LL |         return ;
+LL ~         return ;
 LL |     }
 LL |     if a {
-LL |         
+LL ~         
 LL |     } else {
-LL |         return ;
+LL ~         return ;
    |
 
 error: aborting due to 7 previous errors
index f7cb513c15c90867ec1eceab3a656d66a0ba4bb7..de424c3fdb8f2c628da68ce4eab5d39ab5523002 100644 (file)
@@ -8,7 +8,7 @@ LL |     if let box 0 | box 2 = Box::new(0) {}
 help: nest the patterns
    |
 LL |     if let box (0 | 2) = Box::new(0) {}
-   |            ^^^^^^^^^^^
+   |            ~~~~~~~~~~~
 
 error: unnested or-patterns
   --> $DIR/unnested_or_patterns.rs:10:12
@@ -19,7 +19,7 @@ LL |     if let box ((0 | 1)) | box (2 | 3) | box 4 = Box::new(0) {}
 help: nest the patterns
    |
 LL |     if let box (0 | 1 | 2 | 3 | 4) = Box::new(0) {}
-   |            ^^^^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~~~~
 
 error: unnested or-patterns
   --> $DIR/unnested_or_patterns.rs:12:12
@@ -30,7 +30,7 @@ LL |     if let &0 | C0 | &2 = &0 {}
 help: nest the patterns
    |
 LL |     if let &(0 | 2) | C0 = &0 {}
-   |            ^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~
 
 error: unnested or-patterns
   --> $DIR/unnested_or_patterns.rs:13:12
@@ -41,7 +41,7 @@ LL |     if let &mut 0 | &mut 2 = &mut 0 {}
 help: nest the patterns
    |
 LL |     if let &mut (0 | 2) = &mut 0 {}
-   |            ^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~
 
 error: unnested or-patterns
   --> $DIR/unnested_or_patterns.rs:14:12
@@ -52,7 +52,7 @@ LL |     if let x @ 0 | x @ 2 = 0 {}
 help: nest the patterns
    |
 LL |     if let x @ (0 | 2) = 0 {}
-   |            ^^^^^^^^^^^
+   |            ~~~~~~~~~~~
 
 error: unnested or-patterns
   --> $DIR/unnested_or_patterns.rs:15:12
@@ -63,7 +63,7 @@ LL |     if let (0, 1) | (0, 2) | (0, 3) = (0, 0) {}
 help: nest the patterns
    |
 LL |     if let (0, 1 | 2 | 3) = (0, 0) {}
-   |            ^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~
 
 error: unnested or-patterns
   --> $DIR/unnested_or_patterns.rs:16:12
@@ -74,7 +74,7 @@ LL |     if let (1, 0) | (2, 0) | (3, 0) = (0, 0) {}
 help: nest the patterns
    |
 LL |     if let (1 | 2 | 3, 0) = (0, 0) {}
-   |            ^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~
 
 error: unnested or-patterns
   --> $DIR/unnested_or_patterns.rs:17:12
@@ -85,7 +85,7 @@ LL |     if let (x, ..) | (x, 1) | (x, 2) = (0, 1) {}
 help: nest the patterns
    |
 LL |     if let (x, ..) | (x, 1 | 2) = (0, 1) {}
-   |            ^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~
 
 error: unnested or-patterns
   --> $DIR/unnested_or_patterns.rs:18:12
@@ -96,7 +96,7 @@ LL |     if let [0] | [1] = [0] {}
 help: nest the patterns
    |
 LL |     if let [0 | 1] = [0] {}
-   |            ^^^^^^^
+   |            ~~~~~~~
 
 error: unnested or-patterns
   --> $DIR/unnested_or_patterns.rs:19:12
@@ -107,7 +107,7 @@ LL |     if let [x, 0] | [x, 1] = [0, 1] {}
 help: nest the patterns
    |
 LL |     if let [x, 0 | 1] = [0, 1] {}
-   |            ^^^^^^^^^^
+   |            ~~~~~~~~~~
 
 error: unnested or-patterns
   --> $DIR/unnested_or_patterns.rs:20:12
@@ -118,7 +118,7 @@ LL |     if let [x, 0] | [x, 1] | [x, 2] = [0, 1] {}
 help: nest the patterns
    |
 LL |     if let [x, 0 | 1 | 2] = [0, 1] {}
-   |            ^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~
 
 error: unnested or-patterns
   --> $DIR/unnested_or_patterns.rs:21:12
@@ -129,7 +129,7 @@ LL |     if let [x, ..] | [x, 1] | [x, 2] = [0, 1] {}
 help: nest the patterns
    |
 LL |     if let [x, ..] | [x, 1 | 2] = [0, 1] {}
-   |            ^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~
 
 error: unnested or-patterns
   --> $DIR/unnested_or_patterns.rs:23:12
@@ -140,7 +140,7 @@ LL |     if let TS(0, x) | TS(1, x) = TS(0, 0) {}
 help: nest the patterns
    |
 LL |     if let TS(0 | 1, x) = TS(0, 0) {}
-   |            ^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~
 
 error: unnested or-patterns
   --> $DIR/unnested_or_patterns.rs:24:12
@@ -151,7 +151,7 @@ LL |     if let TS(1, 0) | TS(2, 0) | TS(3, 0) = TS(0, 0) {}
 help: nest the patterns
    |
 LL |     if let TS(1 | 2 | 3, 0) = TS(0, 0) {}
-   |            ^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~
 
 error: unnested or-patterns
   --> $DIR/unnested_or_patterns.rs:25:12
@@ -162,7 +162,7 @@ LL |     if let TS(x, ..) | TS(x, 1) | TS(x, 2) = TS(0, 0) {}
 help: nest the patterns
    |
 LL |     if let TS(x, ..) | TS(x, 1 | 2) = TS(0, 0) {}
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: unnested or-patterns
   --> $DIR/unnested_or_patterns.rs:30:12
@@ -173,7 +173,7 @@ LL |     if let S { x: 0, y } | S { y, x: 1 } = (S { x: 0, y: 1 }) {}
 help: nest the patterns
    |
 LL |     if let S { x: 0 | 1, y } = (S { x: 0, y: 1 }) {}
-   |            ^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~
 
 error: aborting due to 16 previous errors
 
index 9042c9c00b1ac525a6c448fe9ea9a7a2343b448b..41e8d3fc709244402cefdaddd58589dc63a8b20c 100644 (file)
@@ -8,7 +8,7 @@ LL |     if let Some(Some(0)) | Some(Some(1)) = None {}
 help: nest the patterns
    |
 LL |     if let Some(Some(0 | 1)) = None {}
-   |            ^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~
 
 error: unnested or-patterns
   --> $DIR/unnested_or_patterns2.rs:10:12
@@ -19,7 +19,7 @@ LL |     if let Some(Some(0)) | Some(Some(1) | Some(2)) = None {}
 help: nest the patterns
    |
 LL |     if let Some(Some(0 | 1 | 2)) = None {}
-   |            ^^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~~
 
 error: unnested or-patterns
   --> $DIR/unnested_or_patterns2.rs:11:12
@@ -30,7 +30,7 @@ LL |     if let Some(Some(0 | 1) | Some(2)) | Some(Some(3) | Some(4)) = None {}
 help: nest the patterns
    |
 LL |     if let Some(Some(0 | 1 | 2 | 3 | 4)) = None {}
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: unnested or-patterns
   --> $DIR/unnested_or_patterns2.rs:12:12
@@ -41,7 +41,7 @@ LL |     if let Some(Some(0) | Some(1 | 2)) = None {}
 help: nest the patterns
    |
 LL |     if let Some(Some(0 | 1 | 2)) = None {}
-   |            ^^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~~
 
 error: unnested or-patterns
   --> $DIR/unnested_or_patterns2.rs:13:12
@@ -52,7 +52,7 @@ LL |     if let ((0,),) | ((1,) | (2,),) = ((0,),) {}
 help: nest the patterns
    |
 LL |     if let ((0 | 1 | 2,),) = ((0,),) {}
-   |            ^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~
 
 error: unnested or-patterns
   --> $DIR/unnested_or_patterns2.rs:14:12
@@ -63,7 +63,7 @@ LL |     if let 0 | (1 | 2) = 0 {}
 help: nest the patterns
    |
 LL |     if let 0 | 1 | 2 = 0 {}
-   |            ^^^^^^^^^
+   |            ~~~~~~~~~
 
 error: unnested or-patterns
   --> $DIR/unnested_or_patterns2.rs:15:12
@@ -74,7 +74,7 @@ LL |     if let box (0 | 1) | (box 2 | box (3 | 4)) = Box::new(0) {}
 help: nest the patterns
    |
 LL |     if let box (0 | 1 | 2 | 3 | 4) = Box::new(0) {}
-   |            ^^^^^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~~~~~
 
 error: unnested or-patterns
   --> $DIR/unnested_or_patterns2.rs:16:12
@@ -85,7 +85,7 @@ LL |     if let box box 0 | box (box 2 | box 4) = Box::new(Box::new(0)) {}
 help: nest the patterns
    |
 LL |     if let box box (0 | 2 | 4) = Box::new(Box::new(0)) {}
-   |            ^^^^^^^^^^^^^^^^^^^
+   |            ~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 8 previous errors
 
index 507a78e82805030cf9ae9b34be7b0228c57b3f27..e0297c0023156ad7ef1952718fecf1a628de87be 100644 (file)
@@ -7,8 +7,9 @@ LL |     write!(&mut v, "Hello {}", "world");
    = note: `-D clippy::write-literal` implied by `-D warnings`
 help: try this
    |
-LL |     write!(&mut v, "Hello world");
-   |                           ^^^^^--
+LL -     write!(&mut v, "Hello {}", "world");
+LL +     write!(&mut v, "Hello world");
+   | 
 
 error: literal with an empty format string
   --> $DIR/write_literal.rs:31:44
@@ -18,8 +19,9 @@ LL |     writeln!(&mut v, "Hello {} {}", world, "world");
    |
 help: try this
    |
-LL |     writeln!(&mut v, "Hello {} world", world);
-   |                                ^^^^^       --
+LL -     writeln!(&mut v, "Hello {} {}", world, "world");
+LL +     writeln!(&mut v, "Hello {} world", world);
+   | 
 
 error: literal with an empty format string
   --> $DIR/write_literal.rs:32:34
@@ -29,8 +31,9 @@ LL |     writeln!(&mut v, "Hello {}", "world");
    |
 help: try this
    |
-LL |     writeln!(&mut v, "Hello world");
-   |                             ^^^^^--
+LL -     writeln!(&mut v, "Hello {}", "world");
+LL +     writeln!(&mut v, "Hello world");
+   | 
 
 error: literal with an empty format string
   --> $DIR/write_literal.rs:37:33
@@ -40,8 +43,9 @@ LL |     writeln!(&mut v, "{0} {1}", "hello", "world");
    |
 help: try this
    |
-LL |     writeln!(&mut v, "hello {1}", "world");
-   |                       ^^^^^    --
+LL -     writeln!(&mut v, "{0} {1}", "hello", "world");
+LL +     writeln!(&mut v, "hello {1}", "world");
+   | 
 
 error: literal with an empty format string
   --> $DIR/write_literal.rs:37:42
@@ -51,8 +55,9 @@ LL |     writeln!(&mut v, "{0} {1}", "hello", "world");
    |
 help: try this
    |
-LL |     writeln!(&mut v, "{0} world", "hello");
-   |                           ^^^^^         --
+LL -     writeln!(&mut v, "{0} {1}", "hello", "world");
+LL +     writeln!(&mut v, "{0} world", "hello");
+   | 
 
 error: literal with an empty format string
   --> $DIR/write_literal.rs:38:33
@@ -62,8 +67,9 @@ LL |     writeln!(&mut v, "{1} {0}", "hello", "world");
    |
 help: try this
    |
-LL |     writeln!(&mut v, "{1} hello", "world");
-   |                           ^^^^^--
+LL -     writeln!(&mut v, "{1} {0}", "hello", "world");
+LL +     writeln!(&mut v, "{1} hello", "world");
+   | 
 
 error: literal with an empty format string
   --> $DIR/write_literal.rs:38:42
@@ -73,8 +79,9 @@ LL |     writeln!(&mut v, "{1} {0}", "hello", "world");
    |
 help: try this
    |
-LL |     writeln!(&mut v, "world {0}", "hello");
-   |                       ^^^^^             --
+LL -     writeln!(&mut v, "{1} {0}", "hello", "world");
+LL +     writeln!(&mut v, "world {0}", "hello");
+   | 
 
 error: literal with an empty format string
   --> $DIR/write_literal.rs:41:37
@@ -84,8 +91,9 @@ LL |     writeln!(&mut v, "{foo} {bar}", foo = "hello", bar = "world");
    |
 help: try this
    |
-LL |     writeln!(&mut v, "hello {bar}", bar = "world");
-   |                       ^^^^^      --
+LL -     writeln!(&mut v, "{foo} {bar}", foo = "hello", bar = "world");
+LL +     writeln!(&mut v, "hello {bar}", bar = "world");
+   | 
 
 error: literal with an empty format string
   --> $DIR/write_literal.rs:41:52
@@ -95,8 +103,9 @@ LL |     writeln!(&mut v, "{foo} {bar}", foo = "hello", bar = "world");
    |
 help: try this
    |
-LL |     writeln!(&mut v, "{foo} world", foo = "hello");
-   |                             ^^^^^               --
+LL -     writeln!(&mut v, "{foo} {bar}", foo = "hello", bar = "world");
+LL +     writeln!(&mut v, "{foo} world", foo = "hello");
+   | 
 
 error: literal with an empty format string
   --> $DIR/write_literal.rs:42:37
@@ -106,8 +115,9 @@ LL |     writeln!(&mut v, "{bar} {foo}", foo = "hello", bar = "world");
    |
 help: try this
    |
-LL |     writeln!(&mut v, "{bar} hello", bar = "world");
-   |                             ^^^^^--
+LL -     writeln!(&mut v, "{bar} {foo}", foo = "hello", bar = "world");
+LL +     writeln!(&mut v, "{bar} hello", bar = "world");
+   | 
 
 error: literal with an empty format string
   --> $DIR/write_literal.rs:42:52
@@ -117,8 +127,9 @@ LL |     writeln!(&mut v, "{bar} {foo}", foo = "hello", bar = "world");
    |
 help: try this
    |
-LL |     writeln!(&mut v, "world {foo}", foo = "hello");
-   |                       ^^^^^                     --
+LL -     writeln!(&mut v, "{bar} {foo}", foo = "hello", bar = "world");
+LL +     writeln!(&mut v, "world {foo}", foo = "hello");
+   | 
 
 error: aborting due to 11 previous errors
 
index 0aa1b55e58c56c9196adfced013db68df75b384a..73c6b88581329a0ca5658647de0474dbf902ceff 100644 (file)
@@ -7,8 +7,9 @@ LL |     writeln!(&mut v, "{}", "{hello}");
    = note: `-D clippy::write-literal` implied by `-D warnings`
 help: try this
    |
-LL |     writeln!(&mut v, "{{hello}}");
-   |                       ^^^^^^^^^--
+LL -     writeln!(&mut v, "{}", "{hello}");
+LL +     writeln!(&mut v, "{{hello}}");
+   | 
 
 error: literal with an empty format string
   --> $DIR/write_literal_2.rs:10:29
@@ -18,8 +19,9 @@ LL |     writeln!(&mut v, r"{}", r"{hello}");
    |
 help: try this
    |
-LL |     writeln!(&mut v, r"{{hello}}");
-   |                        ^^^^^^^^^--
+LL -     writeln!(&mut v, r"{}", r"{hello}");
+LL +     writeln!(&mut v, r"{{hello}}");
+   | 
 
 error: literal with an empty format string
   --> $DIR/write_literal_2.rs:11:28
@@ -29,8 +31,9 @@ LL |     writeln!(&mut v, "{}", '/'');
    |
 help: try this
    |
-LL |     writeln!(&mut v, "'");
-   |                       ^--
+LL -     writeln!(&mut v, "{}", '/'');
+LL +     writeln!(&mut v, "'");
+   | 
 
 error: literal with an empty format string
   --> $DIR/write_literal_2.rs:12:28
@@ -40,8 +43,9 @@ LL |     writeln!(&mut v, "{}", '"');
    |
 help: try this
    |
-LL |     writeln!(&mut v, "/"");
-   |                       ^^--
+LL -     writeln!(&mut v, "{}", '"');
+LL +     writeln!(&mut v, "/"");
+   | 
 
 error: literal with an empty format string
   --> $DIR/write_literal_2.rs:14:29
@@ -51,8 +55,9 @@ LL |     writeln!(&mut v, r"{}", '/'');
    |
 help: try this
    |
-LL |     writeln!(&mut v, r"'");
-   |                        ^--
+LL -     writeln!(&mut v, r"{}", '/'');
+LL +     writeln!(&mut v, r"'");
+   | 
 
 error: literal with an empty format string
   --> $DIR/write_literal_2.rs:18:9
@@ -63,8 +68,8 @@ LL | |         world!"
    |
 help: try this
    |
-LL |         "some hello /
-LL |         world!"
+LL ~         "some hello /
+LL ~         world!"
    |
 
 error: literal with an empty format string
@@ -75,8 +80,8 @@ LL |         "1", "2", "3",
    |
 help: try this
    |
-LL |         "some 1/
-LL |         {} / {}", "2", "3",
+LL ~         "some 1/
+LL ~         {} / {}", "2", "3",
    |
 
 error: literal with an empty format string
@@ -87,8 +92,8 @@ LL |         "1", "2", "3",
    |
 help: try this
    |
-LL |         2 / {}",
-LL |         "1", "3",
+LL ~         2 / {}",
+LL ~         "1", "3",
    |
 
 error: literal with an empty format string
@@ -99,8 +104,8 @@ LL |         "1", "2", "3",
    |
 help: try this
    |
-LL |         {} / 3",
-LL |         "1", "2",
+LL ~         {} / 3",
+LL ~         "1", "2",
    |
 
 error: aborting due to 9 previous errors
index cecc2ea9406aa77c140875cdff363b0124551010..186459e50b64ce6a118bd5b4c3f9a1a90c565829 100644 (file)
@@ -7,8 +7,9 @@ LL |     write!(&mut v, "Hello/n");
    = note: `-D clippy::write-with-newline` implied by `-D warnings`
 help: use `writeln!()` instead
    |
-LL |     writeln!(&mut v, "Hello");
-   |     ^^^^^^^               --
+LL -     write!(&mut v, "Hello/n");
+LL +     writeln!(&mut v, "Hello");
+   | 
 
 error: using `write!()` with a format string that ends in a single newline
   --> $DIR/write_with_newline.rs:14:5
@@ -18,8 +19,9 @@ LL |     write!(&mut v, "Hello {}/n", "world");
    |
 help: use `writeln!()` instead
    |
-LL |     writeln!(&mut v, "Hello {}", "world");
-   |     ^^^^^^^                  --
+LL -     write!(&mut v, "Hello {}/n", "world");
+LL +     writeln!(&mut v, "Hello {}", "world");
+   | 
 
 error: using `write!()` with a format string that ends in a single newline
   --> $DIR/write_with_newline.rs:15:5
@@ -29,8 +31,9 @@ LL |     write!(&mut v, "Hello {} {}/n", "world", "#2");
    |
 help: use `writeln!()` instead
    |
-LL |     writeln!(&mut v, "Hello {} {}", "world", "#2");
-   |     ^^^^^^^                     --
+LL -     write!(&mut v, "Hello {} {}/n", "world", "#2");
+LL +     writeln!(&mut v, "Hello {} {}", "world", "#2");
+   | 
 
 error: using `write!()` with a format string that ends in a single newline
   --> $DIR/write_with_newline.rs:16:5
@@ -40,8 +43,9 @@ LL |     write!(&mut v, "{}/n", 1265);
    |
 help: use `writeln!()` instead
    |
-LL |     writeln!(&mut v, "{}", 1265);
-   |     ^^^^^^^            --
+LL -     write!(&mut v, "{}/n", 1265);
+LL +     writeln!(&mut v, "{}", 1265);
+   | 
 
 error: using `write!()` with a format string that ends in a single newline
   --> $DIR/write_with_newline.rs:17:5
@@ -51,8 +55,9 @@ LL |     write!(&mut v, "/n");
    |
 help: use `writeln!()` instead
    |
-LL |     writeln!(&mut v);
-   |     ^^^^^^^       --
+LL -     write!(&mut v, "/n");
+LL +     writeln!(&mut v);
+   | 
 
 error: using `write!()` with a format string that ends in a single newline
   --> $DIR/write_with_newline.rs:36:5
@@ -62,8 +67,9 @@ LL |     write!(&mut v, "//n"); // should fail
    |
 help: use `writeln!()` instead
    |
-LL |     writeln!(&mut v, "/"); // should fail
-   |     ^^^^^^^            --
+LL -     write!(&mut v, "//n"); // should fail
+LL +     writeln!(&mut v, "/"); // should fail
+   | 
 
 error: using `write!()` with a format string that ends in a single newline
   --> $DIR/write_with_newline.rs:43:5
@@ -77,9 +83,9 @@ LL | |     );
    |
 help: use `writeln!()` instead
    |
-LL |     writeln!(
+LL ~     writeln!(
 LL |         &mut v,
-LL |         ""
+LL ~         ""
    |
 
 error: using `write!()` with a format string that ends in a single newline
@@ -94,9 +100,9 @@ LL | |     );
    |
 help: use `writeln!()` instead
    |
-LL |     writeln!(
+LL ~     writeln!(
 LL |         &mut v,
-LL |         r""
+LL ~         r""
    |
 
 error: using `write!()` with a format string that ends in a single newline
@@ -107,8 +113,9 @@ LL |     write!(&mut v, "/r/n"); //~ ERROR
    |
 help: use `writeln!()` instead
    |
-LL |     writeln!(&mut v, "/r"); //~ ERROR
-   |     ^^^^^^^             --
+LL -     write!(&mut v, "/r/n"); //~ ERROR
+LL +     writeln!(&mut v, "/r"); //~ ERROR
+   | 
 
 error: using `write!()` with a format string that ends in a single newline
   --> $DIR/write_with_newline.rs:58:5
@@ -118,8 +125,9 @@ LL |     write!(&mut v, "foo/rbar/n");
    |
 help: use `writeln!()` instead
    |
-LL |     writeln!(&mut v, "foo/rbar");
-   |     ^^^^^^^                  --
+LL -     write!(&mut v, "foo/rbar/n");
+LL +     writeln!(&mut v, "foo/rbar");
+   | 
 
 error: aborting due to 10 previous errors
 
index ea105f9396a9dab68e71efb06016b7c76c83ba7c..5664a2b0b31403024ce5ab927760d630d5ddc9a4 160000 (submodule)
@@ -1 +1 @@
-Subproject commit ea105f9396a9dab68e71efb06016b7c76c83ba7c
+Subproject commit 5664a2b0b31403024ce5ab927760d630d5ddc9a4
index 86b16f8b0e60d8bba1d879c66fe6b37db9ed88c6..bb9cd00f3f5829196df0a2a93d12274d82702f8a 100644 (file)
@@ -20,15 +20,17 @@ function getNextStep(content, pos, stop) {
 // will blow up. Template strings are not tested and might also be
 // broken.
 function extractFunction(content, functionName) {
-    var indent = 0;
+    var level = 0;
     var splitter = "function " + functionName + "(";
+    var stop;
+    var pos, start;
 
     while (true) {
-        var start = content.indexOf(splitter);
+        start = content.indexOf(splitter);
         if (start === -1) {
             break;
         }
-        var pos = start;
+        pos = start;
         while (pos < content.length && content[pos] !== ')') {
             pos += 1;
         }
@@ -44,30 +46,33 @@ function extractFunction(content, functionName) {
         }
         while (pos < content.length) {
             // Eat single-line comments
-            if (content[pos] === '/' && pos > 0 && content[pos-1] === '/') {
+            if (content[pos] === '/' && pos > 0 && content[pos - 1] === '/') {
                 do {
                     pos += 1;
                 } while (pos < content.length && content[pos] !== '\n');
 
+            // Eat multiline comment.
+            } else if (content[pos] === '*' && pos > 0 && content[pos - 1] === '/') {
+                do {
+                    pos += 1;
+                } while (pos < content.length && content[pos] !== '/' && content[pos - 1] !== '*');
+
             // Eat quoted strings
             } else if (content[pos] === '"' || content[pos] === "'" || content[pos] === "`") {
-                var stop = content[pos];
-                var is_escaped = false;
+                stop = content[pos];
                 do {
                     if (content[pos] === '\\') {
-                        pos += 2;
-                    } else {
                         pos += 1;
                     }
-                } while (pos < content.length &&
-                         (content[pos] !== stop || content[pos - 1] === '\\'));
+                    pos += 1;
+                } while (pos < content.length && content[pos] !== stop);
 
-            // Otherwise, check for indent
+            // Otherwise, check for block level.
             } else if (content[pos] === '{') {
-                indent += 1;
+                level += 1;
             } else if (content[pos] === '}') {
-                indent -= 1;
-                if (indent === 0) {
+                level -= 1;
+                if (level === 0) {
                     return content.slice(start, pos + 1);
                 }
             }