]> git.lizzy.rs Git - rust.git/commitdiff
Shorten def_span for more items.
authorCamille GILLOT <gillot.camille@gmail.com>
Sun, 13 Feb 2022 15:27:59 +0000 (16:27 +0100)
committerCamille GILLOT <gillot.camille@gmail.com>
Fri, 1 Jul 2022 15:39:19 +0000 (17:39 +0200)
421 files changed:
compiler/rustc_middle/src/hir/map/mod.rs
src/test/incremental/issue-61323.rs
src/test/mir-opt/const_promotion_extern_static.BAR.PromoteTemps.diff
src/test/mir-opt/const_promotion_extern_static.BOP.mir_map.0.mir
src/test/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff
src/test/mir-opt/issue_41697.{impl#0}-{constant#0}.SimplifyCfg-promote-consts.after.32bit.mir
src/test/mir-opt/issue_41697.{impl#0}-{constant#0}.SimplifyCfg-promote-consts.after.64bit.mir
src/test/mir-opt/retag.{impl#0}-foo.SimplifyCfg-elaborate-drops.after.mir
src/test/mir-opt/retag.{impl#0}-foo_shr.SimplifyCfg-elaborate-drops.after.mir
src/test/mir-opt/storage_live_dead_in_statics.XXX.mir_map.0.mir
src/test/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.mir_map.0.32bit.mir
src/test/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.mir_map.0.64bit.mir
src/test/rustdoc-ui/lint-missing-doc-code-example.stderr
src/test/rustdoc/check-source-code-urls-to-def.rs
src/test/rustdoc/inline_cross/macros.rs
src/test/ui/array-slice-vec/array_const_index-0.stderr
src/test/ui/array-slice-vec/array_const_index-1.stderr
src/test/ui/associated-consts/assoc-const-ty-mismatch.stderr
src/test/ui/associated-consts/associated-const-ambiguity-report.stderr
src/test/ui/associated-consts/associated-const-private-impl.stderr
src/test/ui/associated-consts/defaults-cyclic-fail.stderr
src/test/ui/associated-consts/defaults-not-assumed-fail.stderr
src/test/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr
src/test/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr
src/test/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr
src/test/ui/associated-item/associated-item-duplicate-names-2.stderr
src/test/ui/associated-item/associated-item-duplicate-names-3.stderr
src/test/ui/associated-item/associated-item-duplicate-names.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-coherence-failure.stderr
src/test/ui/associated-types/associated-types-incomplete-object.stderr
src/test/ui/associated-types/associated-types-issue-17359.stderr
src/test/ui/associated-types/associated-types-path-1.stderr
src/test/ui/associated-types/defaults-mixed.stderr
src/test/ui/associated-types/hr-associated-type-bound-2.stderr
src/test/ui/associated-types/impl-wf-cycle-1.stderr
src/test/ui/associated-types/impl-wf-cycle-2.stderr
src/test/ui/associated-types/issue-22560.stderr
src/test/ui/associated-types/issue-23595-1.stderr
src/test/ui/associated-types/issue-59324.stderr
src/test/ui/associated-types/issue-85103.stderr
src/test/ui/associated-types/missing-associated-types.stderr
src/test/ui/auto-traits/suspicious-impls-lint.stderr
src/test/ui/binop/issue-28837.stderr
src/test/ui/binop/issue-3820.stderr
src/test/ui/blind/blind-item-block-middle.stderr
src/test/ui/borrowck/issue-81365-1.stderr
src/test/ui/borrowck/issue-81365-2.stderr
src/test/ui/borrowck/issue-81365-3.stderr
src/test/ui/borrowck/issue-81365-4.stderr
src/test/ui/borrowck/issue-81365-5.stderr
src/test/ui/borrowck/issue-81365-6.stderr
src/test/ui/borrowck/issue-81365-7.stderr
src/test/ui/borrowck/issue-81365-8.stderr
src/test/ui/borrowck/issue-81899.stderr
src/test/ui/borrowck/issue-88434-minimal-example.stderr
src/test/ui/borrowck/issue-88434-removal-index-should-be-less.stderr
src/test/ui/closures/2229_closure_analysis/match/non-exhaustive-match.stderr
src/test/ui/coherence/coherence-overlap-downstream.stderr
src/test/ui/coherence/coherence-overlap-upstream.stderr
src/test/ui/coherence/coherence-wasm-bindgen.stderr
src/test/ui/conflicting-repr-hints.stderr
src/test/ui/const-generics/generic_const_exprs/eval-privacy.stderr
src/test/ui/const-generics/issues/issue-83765.stderr
src/test/ui/const-ptr/forbidden_slices.32bit.stderr
src/test/ui/const-ptr/forbidden_slices.64bit.stderr
src/test/ui/consts/assert-type-intrinsics.stderr
src/test/ui/consts/assoc_const_generic_impl.stderr
src/test/ui/consts/const-as-fn.stderr
src/test/ui/consts/const-err-early.stderr
src/test/ui/consts/const-err-multi.stderr
src/test/ui/consts/const-err.stderr
src/test/ui/consts/const-eval/conditional_array_execution.stderr
src/test/ui/consts/const-eval/const-eval-overflow-2.stderr
src/test/ui/consts/const-eval/const-eval-overflow2.stderr
src/test/ui/consts/const-eval/const-eval-overflow2b.stderr
src/test/ui/consts/const-eval/const-eval-overflow2c.stderr
src/test/ui/consts/const-eval/const-eval-query-stack.stderr
src/test/ui/consts/const-eval/const-pointer-values-in-various-types.64bit.stderr
src/test/ui/consts/const-eval/const_fn_ptr_fail2.stderr
src/test/ui/consts/const-eval/erroneous-const.stderr
src/test/ui/consts/const-eval/erroneous-const2.stderr
src/test/ui/consts/const-eval/heap/alloc_intrinsic_nontransient_fail.stderr
src/test/ui/consts/const-eval/heap/alloc_intrinsic_uninit.32bit.stderr
src/test/ui/consts/const-eval/heap/alloc_intrinsic_uninit.64bit.stderr
src/test/ui/consts/const-eval/heap/alloc_intrinsic_untyped.stderr
src/test/ui/consts/const-eval/index-out-of-bounds-never-type.stderr
src/test/ui/consts/const-eval/issue-43197.stderr
src/test/ui/consts/const-eval/issue-44578.stderr
src/test/ui/consts/const-eval/issue-50814-2.stderr
src/test/ui/consts/const-eval/issue-50814.stderr
src/test/ui/consts/const-eval/partial_ptr_overwrite.stderr
src/test/ui/consts/const-eval/promoted_errors.noopt.stderr
src/test/ui/consts/const-eval/promoted_errors.opt.stderr
src/test/ui/consts/const-eval/promoted_errors.opt_with_overflow_checks.stderr
src/test/ui/consts/const-eval/pub_const_err.stderr
src/test/ui/consts/const-eval/pub_const_err_bin.stderr
src/test/ui/consts/const-eval/ref_to_int_match.32bit.stderr
src/test/ui/consts/const-eval/ref_to_int_match.64bit.stderr
src/test/ui/consts/const-eval/transmute-const.32bit.stderr
src/test/ui/consts/const-eval/transmute-const.64bit.stderr
src/test/ui/consts/const-eval/ub-enum-overwrite.stderr
src/test/ui/consts/const-eval/ub-enum.32bit.stderr
src/test/ui/consts/const-eval/ub-enum.64bit.stderr
src/test/ui/consts/const-eval/ub-incorrect-vtable.32bit.stderr
src/test/ui/consts/const-eval/ub-incorrect-vtable.64bit.stderr
src/test/ui/consts/const-eval/ub-int-array.32bit.stderr
src/test/ui/consts/const-eval/ub-int-array.64bit.stderr
src/test/ui/consts/const-eval/ub-nonnull.32bit.stderr
src/test/ui/consts/const-eval/ub-nonnull.64bit.stderr
src/test/ui/consts/const-eval/ub-ref-ptr.32bit.stderr
src/test/ui/consts/const-eval/ub-ref-ptr.64bit.stderr
src/test/ui/consts/const-eval/ub-uninhabit.32bit.stderr
src/test/ui/consts/const-eval/ub-uninhabit.64bit.stderr
src/test/ui/consts/const-eval/ub-upvars.32bit.stderr
src/test/ui/consts/const-eval/ub-upvars.64bit.stderr
src/test/ui/consts/const-eval/ub-wide-ptr.32bit.stderr
src/test/ui/consts/const-eval/ub-wide-ptr.64bit.stderr
src/test/ui/consts/const-eval/union-const-eval-field.stderr
src/test/ui/consts/const-eval/union-ice.stderr
src/test/ui/consts/const-eval/union-ub.32bit.stderr
src/test/ui/consts/const-eval/union-ub.64bit.stderr
src/test/ui/consts/const-eval/unused-broken-const.stderr
src/test/ui/consts/const-eval/validate_uninhabited_zsts.32bit.stderr
src/test/ui/consts/const-eval/validate_uninhabited_zsts.64bit.stderr
src/test/ui/consts/const-float-bits-reject-conv.stderr
src/test/ui/consts/const-len-underflow-separate-spans.stderr
src/test/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr
src/test/ui/consts/const-pattern-irrefutable.stderr
src/test/ui/consts/const-points-to-static.32bit.stderr
src/test/ui/consts/const-points-to-static.64bit.stderr
src/test/ui/consts/const-prop-read-static-in-const.stderr
src/test/ui/consts/const-size_of_val-align_of_val-extern-type.stderr
src/test/ui/consts/const-slice-oob.stderr
src/test/ui/consts/const_limit/const_eval_limit_reached.stderr
src/test/ui/consts/dangling-alloc-id-ice.stderr
src/test/ui/consts/dangling_raw_ptr.stderr
src/test/ui/consts/issue-36163.stderr
src/test/ui/consts/issue-63952.32bit.stderr
src/test/ui/consts/issue-63952.64bit.stderr
src/test/ui/consts/issue-79690.64bit.stderr
src/test/ui/consts/issue-83182.32bit.stderr
src/test/ui/consts/issue-83182.64bit.stderr
src/test/ui/consts/issue-miri-1910.stderr
src/test/ui/consts/miri_unleashed/assoc_const.stderr
src/test/ui/consts/miri_unleashed/assoc_const_2.stderr
src/test/ui/consts/miri_unleashed/const_refers_to_static.stderr
src/test/ui/consts/miri_unleashed/const_refers_to_static2.32bit.stderr
src/test/ui/consts/miri_unleashed/const_refers_to_static2.64bit.stderr
src/test/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr
src/test/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr
src/test/ui/consts/miri_unleashed/mutable_references_err.32bit.stderr
src/test/ui/consts/miri_unleashed/mutable_references_err.64bit.stderr
src/test/ui/consts/miri_unleashed/raw_mutable_const.stderr
src/test/ui/consts/ptr_comparisons.stderr
src/test/ui/consts/raw-ptr-const.stderr
src/test/ui/consts/recursive-zst-static.default.stderr
src/test/ui/consts/recursive-zst-static.unleash.stderr
src/test/ui/consts/recursive.stderr
src/test/ui/consts/std/alloc.32bit.stderr
src/test/ui/consts/std/alloc.64bit.stderr
src/test/ui/consts/std/cell.stderr
src/test/ui/consts/uninhabited-const-issue-61744.stderr
src/test/ui/consts/validate_never_arrays.32bit.stderr
src/test/ui/consts/validate_never_arrays.64bit.stderr
src/test/ui/consts/write-to-static-mut-in-static.stderr
src/test/ui/derives/derive-assoc-type-not-impl.stderr
src/test/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr
src/test/ui/derives/derives-span-PartialEq-enum.stderr
src/test/ui/derives/derives-span-PartialEq-struct.stderr
src/test/ui/derives/derives-span-PartialEq-tuple-struct.stderr
src/test/ui/derives/deriving-meta-unknown-trait.stderr
src/test/ui/derives/deriving-no-inner-impl-error-message.stderr
src/test/ui/derives/issue-91492.stderr
src/test/ui/derives/issue-91550.stderr
src/test/ui/destructuring-assignment/note-unsupported.stderr
src/test/ui/did_you_mean/compatible-variants-in-pat.stderr
src/test/ui/dropck/issue-38868.stderr
src/test/ui/dropck/reject-specialized-drops-8142.stderr
src/test/ui/dropck/relate_lt_in_type_outlives_bound.stderr
src/test/ui/duplicate/dupe-symbols-6.stderr
src/test/ui/empty/empty-struct-braces-expr.stderr
src/test/ui/empty/empty-struct-braces-pat-2.stderr
src/test/ui/empty/empty-struct-unit-expr.stderr
src/test/ui/empty/empty-struct-unit-pat.stderr
src/test/ui/error-codes/E0004-2.stderr
src/test/ui/error-codes/E0005.stderr
src/test/ui/error-codes/E0017.stderr
src/test/ui/error-codes/E0075.stderr
src/test/ui/error-codes/E0076.stderr
src/test/ui/error-codes/E0077.stderr
src/test/ui/error-codes/E0152.stderr
src/test/ui/error-codes/E0191.stderr
src/test/ui/error-codes/E0201.stderr
src/test/ui/error-codes/E0220.stderr
src/test/ui/error-codes/E0221.stderr
src/test/ui/error-codes/E0264.stderr
src/test/ui/error-codes/E0297.stderr
src/test/ui/error-codes/E0374.stderr
src/test/ui/error-codes/E0376.stderr
src/test/ui/error-codes/E0388.stderr
src/test/ui/error-codes/E0393.stderr
src/test/ui/error-codes/E0445.stderr
src/test/ui/error-codes/E0446.stderr
src/test/ui/error-codes/E0520.stderr
src/test/ui/error-festival.stderr
src/test/ui/extern/extern-main-issue-86110.stderr
src/test/ui/extern/extern-types-distinct-types.stderr
src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr
src/test/ui/generic-associated-types/generic-associated-types-where.stderr
src/test/ui/generic-associated-types/impl_bounds.stderr
src/test/ui/generic-associated-types/issue-47206-where-clause.stderr
src/test/ui/generic-associated-types/issue-78113-lifetime-mismatch-dyn-trait-box.stderr
src/test/ui/generic-associated-types/issue-90014.stderr
src/test/ui/generic-associated-types/issue-91883.stderr
src/test/ui/generic-associated-types/issue-92033.stderr
src/test/ui/generic-associated-types/method-unsatified-assoc-type-predicate.stderr
src/test/ui/generic-associated-types/missing-where-clause-on-trait.stderr
src/test/ui/impl-trait/issues/issue-62742.stderr
src/test/ui/infinite/infinite-struct.stderr
src/test/ui/infinite/infinite-trait-alias-recursion.stderr
src/test/ui/invalid_dispatch_from_dyn_impls.stderr
src/test/ui/issues/issue-14091-2.stderr
src/test/ui/issues/issue-16250.stderr
src/test/ui/issues/issue-16725.stderr
src/test/ui/issues/issue-17252.stderr
src/test/ui/issues/issue-17718-const-privacy.stderr
src/test/ui/issues/issue-17959.stderr
src/test/ui/issues/issue-18389.stderr
src/test/ui/issues/issue-19482.stderr
src/test/ui/issues/issue-20714.stderr
src/test/ui/issues/issue-20772.stderr
src/test/ui/issues/issue-21701.stderr
src/test/ui/issues/issue-21950.stderr
src/test/ui/issues/issue-22370.stderr
src/test/ui/issues/issue-22434.stderr
src/test/ui/issues/issue-23302-3.stderr
src/test/ui/issues/issue-25901.stderr
src/test/ui/issues/issue-2718-a.stderr
src/test/ui/issues/issue-33504.stderr
src/test/ui/issues/issue-35241.stderr
src/test/ui/issues/issue-38857.stderr
src/test/ui/issues/issue-43355.stderr
src/test/ui/issues/issue-46771.stderr
src/test/ui/issues/issue-4968.stderr
src/test/ui/issues/issue-69602-type-err-during-codegen-ice.stderr
src/test/ui/issues/issue-73112.stderr
src/test/ui/issues/issue-76191.stderr
src/test/ui/issues/issue-77919.stderr
src/test/ui/keyword/keyword-self-as-type-param.stderr
src/test/ui/layout/debug.stderr
src/test/ui/layout/hexagon-enum.stderr
src/test/ui/layout/homogeneous-aggr-zero-sized-c-struct.stderr
src/test/ui/layout/homogeneous-aggr-zero-sized-repr-rust.stderr
src/test/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.stderr
src/test/ui/layout/thumb-enum.stderr
src/test/ui/layout/zero-sized-array-union.stderr
src/test/ui/limits/issue-56762.stderr
src/test/ui/linkage-attr/linkage-detect-extern-generated-name-collision.stderr
src/test/ui/linkage-attr/linkage-detect-local-generated-name-collision.stderr
src/test/ui/linkage-attr/linkage-requires-raw-ptr.stderr
src/test/ui/linkage-attr/linkage2.stderr
src/test/ui/linkage-attr/linkage3.stderr
src/test/ui/lint/force-warn/allowed-cli-deny-by-default-lint.stderr
src/test/ui/lint/force-warn/allowed-deny-by-default-lint.stderr
src/test/ui/lint/force-warn/deny-by-default-lint.stderr
src/test/ui/lint/issue-14309.stderr
src/test/ui/lint/lint-const-item-mutation.stderr
src/test/ui/lint/lint-ctypes-enum.stderr
src/test/ui/lint/lint-ctypes-fn.stderr
src/test/ui/lint/lint-ctypes.stderr
src/test/ui/lint/uninitialized-zeroed.stderr
src/test/ui/macro_backtrace/main.-Zmacro-backtrace.stderr
src/test/ui/macros/unknown-builtin.stderr
src/test/ui/marker_trait_attr/marker-trait-with-associated-items.stderr
src/test/ui/match/match_non_exhaustive.stderr
src/test/ui/methods/method-call-err-msg.stderr
src/test/ui/mismatched_types/assignment-operator-unimplemented.stderr
src/test/ui/mismatched_types/closure-arg-count.stderr
src/test/ui/missing-trait-bounds/issue-69725.stderr
src/test/ui/missing-trait-bounds/missing-trait-bounds-for-method-call.stderr
src/test/ui/moves/move-deref-coercion.stderr
src/test/ui/namespace/namespace-mix.stderr
src/test/ui/never_type/never-from-impl-is-reserved.stderr
src/test/ui/no-capture-arc.stderr
src/test/ui/no-reuse-move-arc.stderr
src/test/ui/or-patterns/or-patterns-syntactic-fail.stderr
src/test/ui/parser/fn-header-semantic-fail.stderr
src/test/ui/pattern/pat-tuple-field-count-cross.stderr
src/test/ui/pattern/pat-tuple-overfield.stderr
src/test/ui/pattern/usefulness/doc-hidden-non-exhaustive.stderr
src/test/ui/pattern/usefulness/issue-35609.stderr
src/test/ui/pattern/usefulness/issue-3601.stderr
src/test/ui/pattern/usefulness/match-arm-statics-2.stderr
src/test/ui/pattern/usefulness/match-privately-empty.stderr
src/test/ui/pattern/usefulness/non-exhaustive-match.stderr
src/test/ui/pattern/usefulness/stable-gated-patterns.stderr
src/test/ui/pattern/usefulness/unstable-gated-patterns.stderr
src/test/ui/privacy/issue-30079.stderr
src/test/ui/privacy/privacy5.stderr
src/test/ui/privacy/private-in-public-assoc-ty.stderr
src/test/ui/privacy/private-in-public-lint.stderr
src/test/ui/privacy/private-in-public-warn.stderr
src/test/ui/privacy/private-in-public.stderr
src/test/ui/privacy/private-inferred-type.stderr
src/test/ui/privacy/pub-priv-dep/pub-priv1.stderr
src/test/ui/privacy/restricted/private-in-public.stderr
src/test/ui/privacy/restricted/test.stderr
src/test/ui/privacy/where-priv-type.stderr
src/test/ui/privacy/where-pub-type-impls-priv-trait.stderr
src/test/ui/proc-macro/resolve-error.stderr
src/test/ui/pub/issue-33174-restricted-type-in-public-interface.stderr
src/test/ui/recursion/recursive-static-definition.stderr
src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr
src/test/ui/repr/repr-packed-contains-align.stderr
src/test/ui/repr/repr-transparent-issue-87496.stderr
src/test/ui/repr/repr-transparent.stderr
src/test/ui/resolve/issue-23305.stderr
src/test/ui/resolve/privacy-struct-ctor.stderr
src/test/ui/resolve/resolve-self-in-impl.stderr
src/test/ui/rfc-2005-default-binding-mode/const.stderr
src/test/ui/rfc-2008-non-exhaustive/enum.stderr
src/test/ui/rfc-2008-non-exhaustive/struct.stderr
src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match.stderr
src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.stderr
src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.stderr
src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.stderr
src/test/ui/rfc-2093-infer-outlives/cross-crate.stderr
src/test/ui/rfc-2093-infer-outlives/enum.stderr
src/test/ui/rfc-2093-infer-outlives/explicit-dyn.stderr
src/test/ui/rfc-2093-infer-outlives/explicit-enum.stderr
src/test/ui/rfc-2093-infer-outlives/explicit-projection.stderr
src/test/ui/rfc-2093-infer-outlives/explicit-struct.stderr
src/test/ui/rfc-2093-infer-outlives/explicit-union.stderr
src/test/ui/rfc-2093-infer-outlives/nested-enum.stderr
src/test/ui/rfc-2093-infer-outlives/nested-regions.stderr
src/test/ui/rfc-2093-infer-outlives/nested-structs.stderr
src/test/ui/rfc-2093-infer-outlives/nested-union.stderr
src/test/ui/rfc-2093-infer-outlives/projection.stderr
src/test/ui/rfc-2093-infer-outlives/reference.stderr
src/test/ui/rfc-2093-infer-outlives/self-dyn.stderr
src/test/ui/rfc-2093-infer-outlives/self-structs.stderr
src/test/ui/simd/type-len.stderr
src/test/ui/span/impl-wrong-item-for-trait.stderr
src/test/ui/span/issue-39018.stderr
src/test/ui/span/multiline-span-E0072.stderr
src/test/ui/span/transitive-dep-span.stderr
src/test/ui/specialization/defaultimpl/specialization-no-default.stderr
src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr
src/test/ui/specialization/issue-50452-fail.stderr
src/test/ui/specialization/issue-52050.stderr
src/test/ui/specialization/min_specialization/dyn-trait-assoc-types.stderr
src/test/ui/specialization/min_specialization/repeated_projection_type.stderr
src/test/ui/specialization/min_specialization/repeating_lifetimes.stderr
src/test/ui/specialization/min_specialization/repeating_param.stderr
src/test/ui/specialization/min_specialization/spec-marker-supertraits.stderr
src/test/ui/specialization/min_specialization/specialization_marker.stderr
src/test/ui/specialization/min_specialization/specialization_super_trait.stderr
src/test/ui/specialization/min_specialization/specialization_trait.stderr
src/test/ui/specialization/min_specialization/specialize_on_static.stderr
src/test/ui/specialization/min_specialization/specialize_on_trait.stderr
src/test/ui/specialization/non-defaulted-item-fail.stderr
src/test/ui/specialization/specialization-no-default.stderr
src/test/ui/static/static-priv-by-default2.stderr
src/test/ui/statics/uninhabited-static.stderr
src/test/ui/suggestions/attribute-typos.stderr
src/test/ui/suggestions/const-in-struct-pat.stderr
src/test/ui/suggestions/const-pat-non-exaustive-let-new-var.stderr
src/test/ui/suggestions/derive-trait-for-method-call.stderr
src/test/ui/suggestions/fn-or-tuple-struct-without-args.stderr
src/test/ui/suggestions/invalid-bin-op.stderr
src/test/ui/suggestions/missing-assoc-fn-applicable-suggestions.stderr
src/test/ui/suggestions/suggest-trait-items.stderr
src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr
src/test/ui/traits/alias/only-maybe-bound.stderr
src/test/ui/traits/bound/same-crate-name.stderr
src/test/ui/traits/copy-impl-cannot-normalize.stderr
src/test/ui/traits/issue-33140-hack-boundaries.stderr
src/test/ui/traits/issue-65673.stderr
src/test/ui/traits/issue-71036.stderr
src/test/ui/traits/issue-78372.stderr
src/test/ui/traits/item-privacy.stderr
src/test/ui/traits/object/with-self-in-projection-output-bad.stderr
src/test/ui/traits/vtable/vtable-diamond.stderr
src/test/ui/traits/vtable/vtable-multi-level.stderr
src/test/ui/traits/vtable/vtable-multiple.stderr
src/test/ui/traits/vtable/vtable-non-object-safe.stderr
src/test/ui/traits/vtable/vtable-vacant.stderr
src/test/ui/type-alias-enum-variants/enum-variant-priority-lint-ambiguous_associated_items.stderr
src/test/ui/type-alias-impl-trait/issue-53092-2.stderr
src/test/ui/type/type-ascription-precedence.stderr
src/test/ui/type/type-parameter-defaults-referencing-Self.stderr
src/test/ui/type/type-params-in-different-spaces-1.stderr
src/test/ui/type/type-params-in-different-spaces-3.stderr
src/test/ui/type/type-recursive.stderr
src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr
src/test/ui/union/union-derive-clone.mirunsafeck.stderr
src/test/ui/union/union-derive-clone.thirunsafeck.stderr
src/test/ui/union/union-repr-c.stderr
src/test/ui/unique-object-noncopyable.stderr
src/test/ui/unique-pinned-nocopy.stderr
src/test/ui/unspecified-self-in-trait-ref.stderr
src/test/ui/use/use-from-trait-xc.stderr
src/test/ui/variance/variance-associated-consts.stderr
src/test/ui/variance/variance-associated-types.stderr
src/test/ui/variance/variance-object-types.stderr
src/test/ui/variance/variance-regions-direct.stderr
src/test/ui/variance/variance-regions-indirect.stderr
src/test/ui/variance/variance-trait-bounds.stderr
src/test/ui/variance/variance-trait-object-bound.stderr
src/test/ui/variance/variance-types-bounds.stderr
src/test/ui/variance/variance-types.stderr
src/test/ui/wasm-custom-section-relocations.stderr
src/test/ui/wf/wf-in-foreign-fn-decls-issue-80468.stderr
src/test/ui/xcrate/xcrate-private-by-default.stderr
src/tools/clippy/clippy_lints/src/operators/numeric_arithmetic.rs
src/tools/clippy/tests/ui/crashes/ice-6252.stderr
src/tools/clippy/tests/ui/derive_hash_xor_eq.stderr
src/tools/clippy/tests/ui/derive_ord_xor_partial_ord.stderr
src/tools/clippy/tests/ui/needless_pass_by_value.stderr

index a27b8470e9573bf14d018fa51eb02ce9fd11719a..c3768d5b2d6911b2110174a15e3bc5d0d4698da0 100644 (file)
@@ -934,28 +934,105 @@ pub fn attrs(self, id: HirId) -> &'hir [ast::Attribute] {
     }
 
     /// Gets the span of the definition of the specified HIR node.
-    /// This is used by `tcx.get_span`
+    /// This is used by `tcx.def_span`.
     pub fn span(self, hir_id: HirId) -> Span {
         self.opt_span(hir_id)
             .unwrap_or_else(|| bug!("hir::map::Map::span: id not in map: {:?}", hir_id))
     }
 
     pub fn opt_span(self, hir_id: HirId) -> Option<Span> {
+        fn until_within(outer: Span, end: Span) -> Span {
+            if let Some(end) = end.find_ancestor_inside(outer) {
+                outer.with_hi(end.hi())
+            } else {
+                outer
+            }
+        }
+
+        fn named_span(item_span: Span, ident: Ident, generics: Option<&Generics<'_>>) -> Span {
+            if ident.name != kw::Empty {
+                let mut span = until_within(item_span, ident.span);
+                if let Some(g) = generics
+                    && !g.span.is_dummy()
+                    && let Some(g_span) = g.span.find_ancestor_inside(item_span)
+                {
+                    span = span.to(g_span);
+                }
+                span
+            } else {
+                item_span
+            }
+        }
+
         let span = match self.find(hir_id)? {
-            Node::Param(param) => param.span,
+            // Function-like.
+            Node::Item(Item { kind: ItemKind::Fn(sig, ..), .. })
+            | Node::TraitItem(TraitItem { kind: TraitItemKind::Fn(sig, ..), .. })
+            | Node::ImplItem(ImplItem { kind: ImplItemKind::Fn(sig, ..), .. }) => sig.span,
+            // Constants and Statics.
+            Node::Item(Item {
+                kind:
+                    ItemKind::Const(ty, ..)
+                    | ItemKind::Static(ty, ..)
+                    | ItemKind::Impl(Impl { self_ty: ty, .. }),
+                span: outer_span,
+                ..
+            })
+            | Node::TraitItem(TraitItem {
+                kind: TraitItemKind::Const(ty, ..),
+                span: outer_span,
+                ..
+            })
+            | Node::ImplItem(ImplItem {
+                kind: ImplItemKind::Const(ty, ..),
+                span: outer_span,
+                ..
+            })
+            | Node::ForeignItem(ForeignItem {
+                kind: ForeignItemKind::Static(ty, ..),
+                span: outer_span,
+                ..
+            }) => until_within(*outer_span, ty.span),
+            // With generics and bounds.
+            Node::Item(Item {
+                kind: ItemKind::Trait(_, _, generics, bounds, _),
+                span: outer_span,
+                ..
+            })
+            | Node::TraitItem(TraitItem {
+                kind: TraitItemKind::Type(bounds, _),
+                generics,
+                span: outer_span,
+                ..
+            }) => {
+                let end = if let Some(b) = bounds.last() { b.span() } else { generics.span };
+                until_within(*outer_span, end)
+            }
+            // Other cases.
             Node::Item(item) => match &item.kind {
-                ItemKind::Fn(sig, _, _) => sig.span,
-                _ => item.span,
+                ItemKind::Use(path, _) => path.span,
+                _ => named_span(item.span, item.ident, item.kind.generics()),
             },
-            Node::ForeignItem(foreign_item) => foreign_item.span,
-            Node::TraitItem(trait_item) => match &trait_item.kind {
-                TraitItemKind::Fn(sig, _) => sig.span,
-                _ => trait_item.span,
-            },
-            Node::ImplItem(impl_item) => match &impl_item.kind {
-                ImplItemKind::Fn(sig, _) => sig.span,
-                _ => impl_item.span,
+            Node::ImplItem(item) => named_span(item.span, item.ident, Some(item.generics)),
+            Node::ForeignItem(item) => match item.kind {
+                ForeignItemKind::Fn(decl, _, _) => until_within(item.span, decl.output.span()),
+                _ => named_span(item.span, item.ident, None),
             },
+            Node::Ctor(..) => return self.opt_span(self.get_parent_node(hir_id)),
+            _ => self.span_with_body(hir_id),
+        };
+        Some(span)
+    }
+
+    /// Like `hir.span()`, but includes the body of items
+    /// (instead of just the item header)
+    pub fn span_with_body(self, hir_id: HirId) -> Span {
+        match self.get(hir_id) {
+            Node::Param(param) => param.span,
+            Node::Item(item) => item.span,
+            Node::ForeignItem(foreign_item) => foreign_item.span,
+            Node::TraitItem(trait_item) => trait_item.span,
+            Node::ImplItem(impl_item) => impl_item.span,
             Node::Variant(variant) => variant.span,
             Node::Field(field) => field.span,
             Node::AnonConst(constant) => self.body(constant.body).value.span,
@@ -973,29 +1050,12 @@ pub fn opt_span(self, hir_id: HirId) -> Option<Span> {
             Node::Pat(pat) => pat.span,
             Node::Arm(arm) => arm.span,
             Node::Block(block) => block.span,
-            Node::Ctor(..) => match self.find(self.get_parent_node(hir_id))? {
-                Node::Item(item) => item.span,
-                Node::Variant(variant) => variant.span,
-                _ => unreachable!(),
-            },
+            Node::Ctor(..) => self.span_with_body(self.get_parent_node(hir_id)),
             Node::Lifetime(lifetime) => lifetime.span,
             Node::GenericParam(param) => param.span,
             Node::Infer(i) => i.span,
             Node::Local(local) => local.span,
             Node::Crate(item) => item.spans.inner_span,
-        };
-        Some(span)
-    }
-
-    /// Like `hir.span()`, but includes the body of function items
-    /// (instead of just the function header)
-    pub fn span_with_body(self, hir_id: HirId) -> Span {
-        match self.find(hir_id) {
-            Some(Node::TraitItem(item)) => item.span,
-            Some(Node::ImplItem(impl_item)) => impl_item.span,
-            Some(Node::Item(item)) => item.span,
-            Some(_) => self.span(hir_id),
-            _ => bug!("hir::map::Map::span_with_body: id not in map: {:?}", hir_id),
         }
     }
 
index 448ce367b8c6b5b3216635c4f1f9a42ed807477f..97cbfe408f261c6b939228d1ed6ba89a461e5e8d 100644 (file)
@@ -10,6 +10,6 @@ enum A {
 
 #[cfg(cfail)]
 struct C(A);
-//[cfail]~^ ERROR 12:1: 12:13: recursive type `C` has infinite size [E0072]
+//[cfail]~^ ERROR 12:1: 12:9: recursive type `C` has infinite size [E0072]
 
 fn main() {}
index 816c598059dd5dd0530f36e551b673547dd6604e..268d8f464646f56a9a31936536c95bae92845f9d 100644 (file)
 -         StorageDead(_5);                 // scope 0 at $DIR/const-promotion-extern-static.rs:9:43: 9:44
 -         StorageDead(_3);                 // scope 0 at $DIR/const-promotion-extern-static.rs:9:43: 9:44
           StorageDead(_1);                 // scope 0 at $DIR/const-promotion-extern-static.rs:9:43: 9:44
-          return;                          // scope 0 at $DIR/const-promotion-extern-static.rs:9:1: 9:45
+          return;                          // scope 0 at $DIR/const-promotion-extern-static.rs:9:1: 9:28
       }
   
       bb2 (cleanup): {
-          resume;                          // scope 0 at $DIR/const-promotion-extern-static.rs:9:1: 9:45
+          resume;                          // scope 0 at $DIR/const-promotion-extern-static.rs:9:1: 9:28
       }
 - }
 - 
index 4d24387afc761f99008f91730149b3d3cd98ef90..2e63c2c25fac325ac7f3552ba3edb21b20ea11c8 100644 (file)
@@ -12,6 +12,6 @@ static BOP: &i32 = {
         _1 = &_2;                        // scope 0 at $DIR/const-promotion-extern-static.rs:16:20: 16:23
         _0 = &(*_1);                     // scope 0 at $DIR/const-promotion-extern-static.rs:16:20: 16:23
         StorageDead(_1);                 // scope 0 at $DIR/const-promotion-extern-static.rs:16:22: 16:23
-        return;                          // scope 0 at $DIR/const-promotion-extern-static.rs:16:1: 16:24
+        return;                          // scope 0 at $DIR/const-promotion-extern-static.rs:16:1: 16:17
     }
 }
index 096b427bb758b0fd53646b74f290d0d981fd1b23..322a1b206f9489d81f0bb900f8289865dae92f1d 100644 (file)
 -         StorageDead(_5);                 // scope 0 at $DIR/const-promotion-extern-static.rs:13:54: 13:55
 -         StorageDead(_3);                 // scope 0 at $DIR/const-promotion-extern-static.rs:13:54: 13:55
           StorageDead(_1);                 // scope 0 at $DIR/const-promotion-extern-static.rs:13:54: 13:55
-          return;                          // scope 0 at $DIR/const-promotion-extern-static.rs:13:1: 13:56
+          return;                          // scope 0 at $DIR/const-promotion-extern-static.rs:13:1: 13:28
       }
   
       bb2 (cleanup): {
-          resume;                          // scope 0 at $DIR/const-promotion-extern-static.rs:13:1: 13:56
+          resume;                          // scope 0 at $DIR/const-promotion-extern-static.rs:13:1: 13:28
       }
   }
 - 
index db9caf843145bba9aaba0c9fe8ed59e66e2e5220..701e291f46ecfd163ce79d14e26abb43e40f7d60 100644 (file)
@@ -1,6 +1,6 @@
-// MIR for `<impl at $DIR/issue-41697.rs:18:1: 22:2>::{constant#0}` after SimplifyCfg-promote-consts
+// MIR for `<impl at $DIR/issue-41697.rs:18:1: 18:23>::{constant#0}` after SimplifyCfg-promote-consts
 
-<impl at $DIR/issue-41697.rs:18:1: 22:2>::{constant#0}: usize = {
+<impl at $DIR/issue-41697.rs:18:1: 18:23>::{constant#0}: usize = {
     let mut _0: usize;                   // return place in scope 0 at $DIR/issue-41697.rs:18:19: 18:22
     let mut _1: (usize, bool);           // in scope 0 at $DIR/issue-41697.rs:18:19: 18:22
 
index db9caf843145bba9aaba0c9fe8ed59e66e2e5220..701e291f46ecfd163ce79d14e26abb43e40f7d60 100644 (file)
@@ -1,6 +1,6 @@
-// MIR for `<impl at $DIR/issue-41697.rs:18:1: 22:2>::{constant#0}` after SimplifyCfg-promote-consts
+// MIR for `<impl at $DIR/issue-41697.rs:18:1: 18:23>::{constant#0}` after SimplifyCfg-promote-consts
 
-<impl at $DIR/issue-41697.rs:18:1: 22:2>::{constant#0}: usize = {
+<impl at $DIR/issue-41697.rs:18:1: 18:23>::{constant#0}: usize = {
     let mut _0: usize;                   // return place in scope 0 at $DIR/issue-41697.rs:18:19: 18:22
     let mut _1: (usize, bool);           // in scope 0 at $DIR/issue-41697.rs:18:19: 18:22
 
index f9ed3932d33356399aecaff84c1c2ee7a9d6f251..980f07d5f109607e9093124bee0dfc70363b67ed 100644 (file)
@@ -1,6 +1,6 @@
-// MIR for `<impl at $DIR/retag.rs:11:1: 19:2>::foo` after SimplifyCfg-elaborate-drops
+// MIR for `<impl at $DIR/retag.rs:11:1: 11:10>::foo` after SimplifyCfg-elaborate-drops
 
-fn <impl at $DIR/retag.rs:11:1: 19:2>::foo(_1: &Test, _2: &mut i32) -> &mut i32 {
+fn <impl at $DIR/retag.rs:11:1: 11:10>::foo(_1: &Test, _2: &mut i32) -> &mut i32 {
     debug self => _1;                    // in scope 0 at $DIR/retag.rs:13:16: 13:21
     debug x => _2;                       // in scope 0 at $DIR/retag.rs:13:23: 13:24
     let mut _0: &mut i32;                // return place in scope 0 at $DIR/retag.rs:13:42: 13:53
index 87a8603a931da0ea4892abe8e876aa3ff9ff620b..9c252d63fc72cbcc2851e639670d2962d976c1f1 100644 (file)
@@ -1,6 +1,6 @@
-// MIR for `<impl at $DIR/retag.rs:11:1: 19:2>::foo_shr` after SimplifyCfg-elaborate-drops
+// MIR for `<impl at $DIR/retag.rs:11:1: 11:10>::foo_shr` after SimplifyCfg-elaborate-drops
 
-fn <impl at $DIR/retag.rs:11:1: 19:2>::foo_shr(_1: &Test, _2: &i32) -> &i32 {
+fn <impl at $DIR/retag.rs:11:1: 11:10>::foo_shr(_1: &Test, _2: &i32) -> &i32 {
     debug self => _1;                    // in scope 0 at $DIR/retag.rs:16:20: 16:25
     debug x => _2;                       // in scope 0 at $DIR/retag.rs:16:27: 16:28
     let mut _0: &i32;                    // return place in scope 0 at $DIR/retag.rs:16:42: 16:49
index e0875ab0069e761263807a3c30e460ee9567bc5d..2c4738aa86618b45f911273c3eef65febb048135 100644 (file)
@@ -198,6 +198,6 @@ static XXX: &Foo = {
         _0 = &(*_1);                     // scope 0 at $DIR/storage_live_dead_in_statics.rs:5:28: 23:2
         StorageDead(_5);                 // scope 0 at $DIR/storage_live_dead_in_statics.rs:23:1: 23:2
         StorageDead(_1);                 // scope 0 at $DIR/storage_live_dead_in_statics.rs:23:1: 23:2
-        return;                          // scope 0 at $DIR/storage_live_dead_in_statics.rs:5:1: 23:3
+        return;                          // scope 0 at $DIR/storage_live_dead_in_statics.rs:5:1: 5:25
     }
 }
index a046a89bc8cf216db48b9980e6f64acd6f3c5cfc..c41fe61d48bf10d14019d37f65cd7e75d9bf50ec 100644 (file)
@@ -1,10 +1,10 @@
-// MIR for `<impl at $DIR/unusual-item-types.rs:9:1: 11:2>::ASSOCIATED_CONSTANT` 0 mir_map
+// MIR for `<impl at $DIR/unusual-item-types.rs:9:1: 9:7>::ASSOCIATED_CONSTANT` 0 mir_map
 
-const <impl at $DIR/unusual-item-types.rs:9:1: 11:2>::ASSOCIATED_CONSTANT: i32 = {
+const <impl at $DIR/unusual-item-types.rs:9:1: 9:7>::ASSOCIATED_CONSTANT: i32 = {
     let mut _0: i32;                     // return place in scope 0 at $DIR/unusual-item-types.rs:10:32: 10:35
 
     bb0: {
         _0 = const 2_i32;                // scope 0 at $DIR/unusual-item-types.rs:10:38: 10:39
-        return;                          // scope 0 at $DIR/unusual-item-types.rs:10:5: 10:40
+        return;                          // scope 0 at $DIR/unusual-item-types.rs:10:5: 10:35
     }
 }
index a046a89bc8cf216db48b9980e6f64acd6f3c5cfc..c41fe61d48bf10d14019d37f65cd7e75d9bf50ec 100644 (file)
@@ -1,10 +1,10 @@
-// MIR for `<impl at $DIR/unusual-item-types.rs:9:1: 11:2>::ASSOCIATED_CONSTANT` 0 mir_map
+// MIR for `<impl at $DIR/unusual-item-types.rs:9:1: 9:7>::ASSOCIATED_CONSTANT` 0 mir_map
 
-const <impl at $DIR/unusual-item-types.rs:9:1: 11:2>::ASSOCIATED_CONSTANT: i32 = {
+const <impl at $DIR/unusual-item-types.rs:9:1: 9:7>::ASSOCIATED_CONSTANT: i32 = {
     let mut _0: i32;                     // return place in scope 0 at $DIR/unusual-item-types.rs:10:32: 10:35
 
     bb0: {
         _0 = const 2_i32;                // scope 0 at $DIR/unusual-item-types.rs:10:38: 10:39
-        return;                          // scope 0 at $DIR/unusual-item-types.rs:10:5: 10:40
+        return;                          // scope 0 at $DIR/unusual-item-types.rs:10:5: 10:35
     }
 }
index 371579785428168088b70c5615341c8287ba992a..9e51ecd2ba017f3e273d1d211e1f3ddb0d5d72e7 100644 (file)
@@ -1,9 +1,8 @@
 error: missing code example in this documentation
   --> $DIR/lint-missing-doc-code-example.rs:19:1
    |
-LL | / pub mod module1 {
-LL | | }
-   | |_^
+LL | pub mod module1 {
+   | ^^^^^^^^^^^^^^^
    |
 note: the lint level is defined here
   --> $DIR/lint-missing-doc-code-example.rs:2:9
index 12c5df2871cf5cc0f49f8dd2a5499328f713f082..ec44e1bc65c90b955792864b658c9d173c171a76 100644 (file)
 #[path = "auxiliary/source-code-bar.rs"]
 pub mod bar;
 
-// @count - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#5-7"]' 4
+// @count - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#5"]' 4
 use bar::Bar;
-// @has - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#13-17"]' 'self'
-// @has - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#14-16"]' 'Trait'
+// @has - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#13"]' 'self'
+// @has - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#14"]' 'Trait'
 use bar::sub::{self, Trait};
 
 pub struct Foo;
@@ -42,8 +42,8 @@ pub fn foo(a: u32, b: &str, c: String, d: Foo, e: bar::Bar, f: source_code::Sour
     y.hello();
 }
 
-// @has - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#14-16"]' 'bar::sub::Trait'
-// @has - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#14-16"]' 'Trait'
+// @has - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#14"]' 'bar::sub::Trait'
+// @has - '//a[@href="../../src/foo/auxiliary/source-code-bar.rs.html#14"]' 'Trait'
 pub fn foo2<T: bar::sub::Trait, V: Trait>(t: &T, v: &V, b: bool) {}
 
 pub trait AnotherTrait {}
index 13b4c3c7f61a47604d16920cdd03f653d758345d..5daa0d4baad6316e25d9cbee998146057771afb3 100644 (file)
@@ -15,5 +15,5 @@
 // @has - '//*[@class="docblock"]' 'docs for my_macro'
 // @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.2.3: text'
 // @has - '//*[@class="stab unstable"]' 'macro_test'
-// @has - '//a/@href' '../src/macros/macros.rs.html#8-10'
+// @has - '//a/@href' '../src/macros/macros.rs.html#8'
 pub use macros::my_macro;
index b44251efdea42cab06e388df0e585fc54a80f3df..4832398713dbe7276e25bc0f656a5a6e7aae325e 100644 (file)
@@ -2,9 +2,7 @@ error: any use of this value will cause an error
   --> $DIR/array_const_index-0.rs:2:16
    |
 LL | const B: i32 = (&A)[1];
-   | ---------------^^^^^^^-
-   |                |
-   |                index out of bounds: the length is 0 but the index is 1
+   | ------------   ^^^^^^^ index out of bounds: the length is 0 but the index is 1
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -17,9 +15,7 @@ error: any use of this value will cause an error
   --> $DIR/array_const_index-0.rs:2:16
    |
 LL | const B: i32 = (&A)[1];
-   | ---------------^^^^^^^-
-   |                |
-   |                index out of bounds: the length is 0 but the index is 1
+   | ------------   ^^^^^^^ index out of bounds: the length is 0 but the index is 1
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index 8beebafb04c32a5179b115025fd28c171db5c54c..361f518c052f01f205aeb80a1eab4353dddc42cc 100644 (file)
@@ -2,9 +2,7 @@ error: any use of this value will cause an error
   --> $DIR/array_const_index-1.rs:2:16
    |
 LL | const B: i32 = A[1];
-   | ---------------^^^^-
-   |                |
-   |                index out of bounds: the length is 0 but the index is 1
+   | ------------   ^^^^ index out of bounds: the length is 0 but the index is 1
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -17,9 +15,7 @@ error: any use of this value will cause an error
   --> $DIR/array_const_index-1.rs:2:16
    |
 LL | const B: i32 = A[1];
-   | ---------------^^^^-
-   |                |
-   |                index out of bounds: the length is 0 but the index is 1
+   | ------------   ^^^^ index out of bounds: the length is 0 but the index is 1
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index 703245145ce4e0576bcf7fe213e705b550921571..58a8aceca2f24fc6d83c510fd3c91bf56a04e033 100644 (file)
@@ -8,7 +8,7 @@ note: associated constant defined here does not match type
   --> $DIR/assoc-const-ty-mismatch.rs:5:3
    |
 LL |   const N: usize;
-   |   ^^^^^^^^^^^^^^^
+   |   ^^^^^^^^^^^^^^
 
 error: mismatch in bind of associated type, got const
   --> $DIR/assoc-const-ty-mismatch.rs:25:18
@@ -20,7 +20,7 @@ note: associated type defined here does not match const
   --> $DIR/assoc-const-ty-mismatch.rs:9:3
    |
 LL |   type T;
-   |   ^^^^^^^
+   |   ^^^^^^
 
 error: aborting due to 2 previous errors
 
index 60cf9a533cd72cb1aa8884fdafec6e6e7ac06cfc..5435f22321c921d71a5bb72195a8b70853042190 100644 (file)
@@ -8,12 +8,12 @@ note: candidate #1 is defined in an impl of the trait `Foo` for the type `i32`
   --> $DIR/associated-const-ambiguity-report.rs:10:5
    |
 LL |     const ID: i32 = 1;
-   |     ^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^
 note: candidate #2 is defined in an impl of the trait `Bar` for the type `i32`
   --> $DIR/associated-const-ambiguity-report.rs:14:5
    |
 LL |     const ID: i32 = 3;
-   |     ^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^
 help: disambiguate the associated constant for candidate #1
    |
 LL | const X: i32 = <i32 as Foo>::ID;
index aa356c596f8a05586ff3d63f9aa68418ca31b4d5..a3fa3002e1efb9029fbc6bc44fbb10a7eab0b853 100644 (file)
@@ -2,7 +2,7 @@ error[E0624]: associated constant `ID` is private
   --> $DIR/associated-const-private-impl.rs:13:30
    |
 LL |             const ID: i32 = 1;
-   |             ------------------ private associated constant defined here
+   |             ------------- private associated constant defined here
 ...
 LL |     assert_eq!(1, bar1::Foo::ID);
    |                              ^^ private associated constant
index c4cd9c2a49fd7562bee5c160cdba4580ecec8a5c..582473905cfdd6cc2f9668aa8a849a76ff7d7e00 100644 (file)
@@ -2,13 +2,13 @@ error[E0391]: cycle detected when const-evaluating + checking `Tr::A`
   --> $DIR/defaults-cyclic-fail.rs:5:5
    |
 LL |     const A: u8 = Self::B;
-   |     ^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^
    |
 note: ...which requires const-evaluating + checking `Tr::B`...
   --> $DIR/defaults-cyclic-fail.rs:8:5
    |
 LL |     const B: u8 = Self::A;
-   |     ^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^
    = note: ...which again requires const-evaluating + checking `Tr::A`, completing the cycle
 note: cycle used when const-evaluating + checking `main::promoted[1]`
   --> $DIR/defaults-cyclic-fail.rs:16:16
index f04ea0b74770551a7a41c95587af07e86b190ca9..66ee6031c7156c6fd06b0a4381831aeee378f8ef 100644 (file)
@@ -2,9 +2,7 @@ error: any use of this value will cause an error
   --> $DIR/defaults-not-assumed-fail.rs:8:19
    |
 LL |     const B: u8 = Self::A + 1;
-   |     --------------^^^^^^^^^^^-
-   |                   |
-   |                   attempt to compute `u8::MAX + 1_u8`, which would overflow
+   |     -----------   ^^^^^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -34,9 +32,7 @@ error: any use of this value will cause an error
   --> $DIR/defaults-not-assumed-fail.rs:8:19
    |
 LL |     const B: u8 = Self::A + 1;
-   |     --------------^^^^^^^^^^^-
-   |                   |
-   |                   attempt to compute `u8::MAX + 1_u8`, which would overflow
+   |     -----------   ^^^^^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index b4dc730d8631fbb7ad779db2817007094298baf1..51a50cfdaf981ac7e1e3677c4d46e83eb2ecb08b 100644 (file)
@@ -1,4 +1,4 @@
-error[E0391]: cycle detected when elaborating drops for `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 13:2>::BAR`
+error[E0391]: cycle detected when elaborating drops for `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 11:19>::BAR`
   --> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:12:22
    |
 LL |     const BAR: u32 = IMPL_REF_BAR;
@@ -8,23 +8,23 @@ note: ...which requires const-evaluating + checking `IMPL_REF_BAR`...
   --> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:7:1
    |
 LL | const IMPL_REF_BAR: u32 = GlobalImplRef::BAR;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^
 note: ...which requires const-evaluating + checking `IMPL_REF_BAR`...
   --> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:7:1
    |
 LL | const IMPL_REF_BAR: u32 = GlobalImplRef::BAR;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-note: ...which requires const-evaluating + checking `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 13:2>::BAR`...
+   | ^^^^^^^^^^^^^^^^^^^^^^^
+note: ...which requires const-evaluating + checking `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 11:19>::BAR`...
   --> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:12:5
    |
 LL |     const BAR: u32 = IMPL_REF_BAR;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-note: ...which requires caching mir of `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 13:2>::BAR` for CTFE...
+   |     ^^^^^^^^^^^^^^
+note: ...which requires caching mir of `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 11:19>::BAR` for CTFE...
   --> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:12:5
    |
 LL |     const BAR: u32 = IMPL_REF_BAR;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = note: ...which again requires elaborating drops for `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 13:2>::BAR`, completing the cycle
+   |     ^^^^^^^^^^^^^^
+   = note: ...which again requires elaborating drops for `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 11:19>::BAR`, completing the cycle
    = note: cycle used when running analysis passes on this crate
 
 error: aborting due to previous error
index 97ede6ad388f26a646a6d0621476eac43c6833d3..b9d1808feb367e4d776f492c4105d51bcd2b4d4c 100644 (file)
@@ -8,22 +8,22 @@ note: ...which requires const-evaluating + checking `DEFAULT_REF_BAR`...
   --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:11:1
    |
 LL | const DEFAULT_REF_BAR: u32 = <GlobalDefaultRef>::BAR;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
 note: ...which requires const-evaluating + checking `DEFAULT_REF_BAR`...
   --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:11:1
    |
 LL | const DEFAULT_REF_BAR: u32 = <GlobalDefaultRef>::BAR;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
 note: ...which requires const-evaluating + checking `FooDefault::BAR`...
   --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:8:5
    |
 LL |     const BAR: u32 = DEFAULT_REF_BAR;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^
 note: ...which requires caching mir of `FooDefault::BAR` for CTFE...
   --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:8:5
    |
 LL |     const BAR: u32 = DEFAULT_REF_BAR;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^
    = note: ...which again requires elaborating drops for `FooDefault::BAR`, completing the cycle
    = note: cycle used when running analysis passes on this crate
 
index bd97c31229ecc5a6edf18ff6b78be2759ee0bc34..271e69206cd7a91dd574413a7d117c2e488df11f 100644 (file)
@@ -1,4 +1,4 @@
-error[E0391]: cycle detected when elaborating drops for `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 13:2>::BAR`
+error[E0391]: cycle detected when elaborating drops for `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 11:28>::BAR`
   --> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:12:22
    |
 LL |     const BAR: u32 = TRAIT_REF_BAR;
@@ -8,23 +8,23 @@ note: ...which requires const-evaluating + checking `TRAIT_REF_BAR`...
   --> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:7:1
    |
 LL | const TRAIT_REF_BAR: u32 = <GlobalTraitRef>::BAR;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
 note: ...which requires const-evaluating + checking `TRAIT_REF_BAR`...
   --> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:7:1
    |
 LL | const TRAIT_REF_BAR: u32 = <GlobalTraitRef>::BAR;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-note: ...which requires const-evaluating + checking `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 13:2>::BAR`...
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
+note: ...which requires const-evaluating + checking `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 11:28>::BAR`...
   --> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:12:5
    |
 LL |     const BAR: u32 = TRAIT_REF_BAR;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-note: ...which requires caching mir of `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 13:2>::BAR` for CTFE...
+   |     ^^^^^^^^^^^^^^
+note: ...which requires caching mir of `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 11:28>::BAR` for CTFE...
   --> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:12:5
    |
 LL |     const BAR: u32 = TRAIT_REF_BAR;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = note: ...which again requires elaborating drops for `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 13:2>::BAR`, completing the cycle
+   |     ^^^^^^^^^^^^^^
+   = note: ...which again requires elaborating drops for `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 11:28>::BAR`, completing the cycle
    = note: cycle used when running analysis passes on this crate
 
 error: aborting due to previous error
index ad21b38d07eb98813ad0ded877fd1b1aaf48dbd1..f4efd131248ce2dac8e917f2e3af21025c9ee863 100644 (file)
@@ -2,7 +2,7 @@ error[E0201]: duplicate definitions with name `bar`:
   --> $DIR/associated-item-duplicate-names-2.rs:5:5
    |
 LL |     const bar: bool = true;
-   |     ----------------------- previous definition of `bar` here
+   |     --------------- previous definition of `bar` here
 LL |     fn bar() {}
    |     ^^^^^^^^ duplicate definition
 
index 57495863c98914f0bcc18cce57fa1404ad9e9f39..03782f663480003af7bf5da87f7cb202a2a61c67 100644 (file)
@@ -2,9 +2,9 @@ error[E0201]: duplicate definitions with name `Bar`:
   --> $DIR/associated-item-duplicate-names-3.rs:14:5
    |
 LL |     type Bar = i16;
-   |     --------------- previous definition of `Bar` here
+   |     -------- previous definition of `Bar` here
 LL |     type Bar = u16;
-   |     ^^^^^^^^^^^^^^^ duplicate definition
+   |     ^^^^^^^^ duplicate definition
 
 error: aborting due to previous error
 
index f4af9e02939507fc748ef1ad4856b5840d6fe522..c9119c10271118ec1cb8e706eeb8054049e2b2c6 100644 (file)
@@ -2,17 +2,17 @@ error[E0201]: duplicate definitions with name `Ty`:
   --> $DIR/associated-item-duplicate-names.rs:11:5
    |
 LL |     type Ty = ();
-   |     ------------- previous definition of `Ty` here
+   |     ------- previous definition of `Ty` here
 LL |     type Ty = usize;
-   |     ^^^^^^^^^^^^^^^^ duplicate definition
+   |     ^^^^^^^ duplicate definition
 
 error[E0201]: duplicate definitions with name `BAR`:
   --> $DIR/associated-item-duplicate-names.rs:13:5
    |
 LL |     const BAR: u32 = 7;
-   |     ------------------- previous definition of `BAR` here
+   |     -------------- previous definition of `BAR` here
 LL |     const BAR: u32 = 8;
-   |     ^^^^^^^^^^^^^^^^^^^ duplicate definition
+   |     ^^^^^^^^^^^^^^ duplicate definition
 
 error: aborting due to 2 previous errors
 
index 19fc2f652c6be1907ee73b5ae7f6ea9cab45d205..236552baf9287b82e9ebf7f7821c024143870fea 100644 (file)
@@ -2,10 +2,10 @@ error[E0221]: ambiguous associated type `Color` in bounds of `C`
   --> $DIR/associated-type-projection-ambig-between-bound-and-where-clause.rs:16:24
    |
 LL |     type Color;
-   |     ----------- ambiguous `Color` from `Vehicle`
+   |     ---------- ambiguous `Color` from `Vehicle`
 ...
 LL |     type Color;
-   |     ----------- ambiguous `Color` from `Box`
+   |     ---------- ambiguous `Color` from `Box`
 ...
 LL | fn a<C:Vehicle+Box>(_: C::Color) {
    |                        ^^^^^^^^ ambiguous associated type `Color`
@@ -23,10 +23,10 @@ error[E0221]: ambiguous associated type `Color` in bounds of `C`
   --> $DIR/associated-type-projection-ambig-between-bound-and-where-clause.rs:20:12
    |
 LL |     type Color;
-   |     ----------- ambiguous `Color` from `Vehicle`
+   |     ---------- ambiguous `Color` from `Vehicle`
 ...
 LL |     type Color;
-   |     ----------- ambiguous `Color` from `Box`
+   |     ---------- ambiguous `Color` from `Box`
 ...
 LL | fn b<C>(_: C::Color) where C : Vehicle+Box {
    |            ^^^^^^^^ ambiguous associated type `Color`
@@ -44,10 +44,10 @@ error[E0221]: ambiguous associated type `Color` in bounds of `C`
   --> $DIR/associated-type-projection-ambig-between-bound-and-where-clause.rs:24:12
    |
 LL |     type Color;
-   |     ----------- ambiguous `Color` from `Vehicle`
+   |     ---------- ambiguous `Color` from `Vehicle`
 ...
 LL |     type Color;
-   |     ----------- ambiguous `Color` from `Box`
+   |     ---------- ambiguous `Color` from `Box`
 ...
 LL | fn c<C>(_: C::Color) where C : Vehicle, C : Box {
    |            ^^^^^^^^ ambiguous associated type `Color`
@@ -65,10 +65,10 @@ error[E0221]: ambiguous associated type `Color` in bounds of `X`
   --> $DIR/associated-type-projection-ambig-between-bound-and-where-clause.rs:35:20
    |
 LL |     type Color;
-   |     ----------- ambiguous `Color` from `Vehicle`
+   |     ---------- ambiguous `Color` from `Vehicle`
 ...
 LL |     type Color;
-   |     ----------- ambiguous `Color` from `Box`
+   |     ---------- ambiguous `Color` from `Box`
 ...
 LL |     fn e(&self, _: X::Color) where X : Box;
    |                    ^^^^^^^^ ambiguous associated type `Color`
@@ -86,10 +86,10 @@ error[E0221]: ambiguous associated type `Color` in bounds of `X`
   --> $DIR/associated-type-projection-ambig-between-bound-and-where-clause.rs:38:20
    |
 LL |     type Color;
-   |     ----------- ambiguous `Color` from `Vehicle`
+   |     ---------- ambiguous `Color` from `Vehicle`
 ...
 LL |     type Color;
-   |     ----------- ambiguous `Color` from `Box`
+   |     ---------- ambiguous `Color` from `Box`
 ...
 LL |     fn f(&self, _: X::Color) where X : Box { }
    |                    ^^^^^^^^ ambiguous associated type `Color`
@@ -107,10 +107,10 @@ error[E0221]: ambiguous associated type `Color` in bounds of `X`
   --> $DIR/associated-type-projection-ambig-between-bound-and-where-clause.rs:30:20
    |
 LL |     type Color;
-   |     ----------- ambiguous `Color` from `Vehicle`
+   |     ---------- ambiguous `Color` from `Vehicle`
 ...
 LL |     type Color;
-   |     ----------- ambiguous `Color` from `Box`
+   |     ---------- ambiguous `Color` from `Box`
 ...
 LL |     fn d(&self, _: X::Color) where X : Box { }
    |                    ^^^^^^^^ ambiguous associated type `Color`
index 66a4899c77fef706e4fd36606b2993e42535f0d2..e765f932398411b5f099d018fbd89195bb6aeb5b 100644 (file)
@@ -10,10 +10,10 @@ error[E0221]: ambiguous associated type `Color` in bounds of `C`
   --> $DIR/associated-type-projection-from-multiple-supertraits.rs:19:32
    |
 LL |     type Color;
-   |     ----------- ambiguous `Color` from `Vehicle`
+   |     ---------- ambiguous `Color` from `Vehicle`
 ...
 LL |     type Color;
-   |     ----------- ambiguous `Color` from `Box`
+   |     ---------- ambiguous `Color` from `Box`
 ...
 LL | fn dent<C:BoxCar>(c: C, color: C::Color) {
    |                                ^^^^^^^^ ambiguous associated type `Color`
@@ -31,10 +31,10 @@ error[E0222]: ambiguous associated type `Color` in bounds of `BoxCar`
   --> $DIR/associated-type-projection-from-multiple-supertraits.rs:23:37
    |
 LL |     type Color;
-   |     ----------- ambiguous `Color` from `Vehicle`
+   |     ---------- ambiguous `Color` from `Vehicle`
 ...
 LL |     type Color;
-   |     ----------- ambiguous `Color` from `Box`
+   |     ---------- ambiguous `Color` from `Box`
 ...
 LL | fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) {
    |                                     ^^^^^^^^^^^ ambiguous associated type `Color`
@@ -49,10 +49,10 @@ error[E0191]: the value of the associated types `Color` (from trait `Box`), `Col
   --> $DIR/associated-type-projection-from-multiple-supertraits.rs:23:30
    |
 LL |     type Color;
-   |     ----------- `Vehicle::Color` defined here
+   |     ---------- `Vehicle::Color` defined here
 ...
 LL |     type Color;
-   |     ----------- `Box::Color` defined here
+   |     ---------- `Box::Color` defined here
 ...
 LL | fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) {
    |                              ^^^^^^^^^^^^^^^^^^^ associated types `Color` (from trait `Vehicle`), `Color` (from trait `Box`) must be specified
@@ -63,10 +63,10 @@ error[E0221]: ambiguous associated type `Color` in bounds of `C`
   --> $DIR/associated-type-projection-from-multiple-supertraits.rs:28:29
    |
 LL |     type Color;
-   |     ----------- ambiguous `Color` from `Vehicle`
+   |     ---------- ambiguous `Color` from `Vehicle`
 ...
 LL |     type Color;
-   |     ----------- ambiguous `Color` from `Box`
+   |     ---------- ambiguous `Color` from `Box`
 ...
 LL | fn paint<C:BoxCar>(c: C, d: C::Color) {
    |                             ^^^^^^^^ ambiguous associated type `Color`
@@ -84,10 +84,10 @@ error[E0191]: the value of the associated types `Color` (from trait `Box`), `Col
   --> $DIR/associated-type-projection-from-multiple-supertraits.rs:32:32
    |
 LL |     type Color;
-   |     ----------- `Vehicle::Color` defined here
+   |     ---------- `Vehicle::Color` defined here
 ...
 LL |     type Color;
-   |     ----------- `Box::Color` defined here
+   |     ---------- `Box::Color` defined here
 ...
 LL | fn dent_object_2<COLOR>(c: dyn BoxCar) where <dyn BoxCar as Vehicle>::Color = COLOR {
    |                                ^^^^^^ associated types `Color` (from trait `Vehicle`), `Color` (from trait `Box`) must be specified
index 211613b3714920a9a7989a56cc58abe6215d04ff..40c02dca32f0d163cd2d01852d9986d338c4e808 100644 (file)
@@ -2,19 +2,19 @@ error[E0119]: conflicting implementations of trait `IntoCow<'_, _>` for type `Co
   --> $DIR/associated-types-coherence-failure.rs:21:1
    |
 LL | impl<'a, B: ?Sized> IntoCow<'a, B> for <B as ToOwned>::Owned where B: ToOwned {
-   | ----------------------------------------------------------------------------- first implementation here
+   | ------------------------------------------------------------ first implementation here
 ...
 LL | impl<'a, B: ?Sized> IntoCow<'a, B> for Cow<'a, B> where B: ToOwned {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Cow<'_, _>`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Cow<'_, _>`
 
 error[E0119]: conflicting implementations of trait `IntoCow<'_, _>` for type `&_`
   --> $DIR/associated-types-coherence-failure.rs:28:1
    |
 LL | impl<'a, B: ?Sized> IntoCow<'a, B> for <B as ToOwned>::Owned where B: ToOwned {
-   | ----------------------------------------------------------------------------- first implementation here
+   | ------------------------------------------------------------ first implementation here
 ...
 LL | impl<'a, B: ?Sized> IntoCow<'a, B> for &'a B where B: ToOwned {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
 
 error: aborting due to 2 previous errors
 
index 24732271c420f0932a79cd379dcd287035bcd714..32866c714680520fce6139b7e5fd91ffdb84d49d 100644 (file)
@@ -2,7 +2,7 @@ error[E0191]: the value of the associated type `B` (from trait `Foo`) must be sp
   --> $DIR/associated-types-incomplete-object.rs:23:30
    |
 LL |     type B;
-   |     ------- `B` defined here
+   |     ------ `B` defined here
 ...
 LL |     let b = &42isize as &dyn Foo<A=usize>;
    |                              ^^^^^^^^^^^^ help: specify the associated type: `Foo<A=usize, B = Type>`
@@ -11,7 +11,7 @@ error[E0191]: the value of the associated type `A` (from trait `Foo`) must be sp
   --> $DIR/associated-types-incomplete-object.rs:26:30
    |
 LL |     type A;
-   |     ------- `A` defined here
+   |     ------ `A` defined here
 ...
 LL |     let c = &42isize as &dyn Foo<B=char>;
    |                              ^^^^^^^^^^^ help: specify the associated type: `Foo<B=char, A = Type>`
@@ -20,9 +20,9 @@ error[E0191]: the value of the associated types `A` (from trait `Foo`), `B` (fro
   --> $DIR/associated-types-incomplete-object.rs:29:30
    |
 LL |     type A;
-   |     ------- `A` defined here
+   |     ------ `A` defined here
 LL |     type B;
-   |     ------- `B` defined here
+   |     ------ `B` defined here
 ...
 LL |     let d = &42isize as &dyn Foo;
    |                              ^^^ help: specify the associated types: `Foo<A = Type, B = Type>`
index 575a072c558bda3605d5a095b67c863c30120d57..9e40d8095862b3421f1bb1f3958ef9fc251de591 100644 (file)
@@ -2,7 +2,7 @@ error[E0046]: not all trait items implemented, missing: `Type`
   --> $DIR/associated-types-issue-17359.rs:8:1
    |
 LL |     type Type;
-   |     ---------- `Type` from trait
+   |     --------- `Type` from trait
 ...
 LL | impl Trait for isize {}
    | ^^^^^^^^^^^^^^^^^^^^ missing `Type` in implementation
index 6512d60b2c2951ab28c2c3c329e3aa2b0012c870..a67f77e37c707481ad6576d2af93593a5bb5d33a 100644 (file)
@@ -8,10 +8,10 @@ error[E0221]: ambiguous associated type `A` in bounds of `T`
   --> $DIR/associated-types-path-1.rs:11:34
    |
 LL |     type A;
-   |     ------- ambiguous `A` from `Foo`
+   |     ------ ambiguous `A` from `Foo`
 ...
 LL |     type A;
-   |     ------- ambiguous `A` from `Bar`
+   |     ------ ambiguous `A` from `Bar`
 ...
 LL | pub fn f2<T: Foo + Bar>(a: T, x: T::A) {}
    |                                  ^^^^ ambiguous associated type `A`
index 69ddd5f2326d1305d9035b0c7f5f039d8811e11a..0f4a6968c70dd3f0362f11b1c99fabeba078ec44 100644 (file)
@@ -2,7 +2,7 @@ error[E0046]: not all trait items implemented, missing: `Bar`
   --> $DIR/defaults-mixed.rs:11:1
    |
 LL |     type Bar;
-   |     --------- `Bar` from trait
+   |     -------- `Bar` from trait
 ...
 LL | impl Trait for () {}
    | ^^^^^^^^^^^^^^^^^ missing `Bar` in implementation
@@ -11,7 +11,7 @@ error[E0046]: not all trait items implemented, missing: `Bar`
   --> $DIR/defaults-mixed.rs:14:1
    |
 LL |     type Bar;
-   |     --------- `Bar` from trait
+   |     -------- `Bar` from trait
 ...
 LL | impl Trait for bool {
    | ^^^^^^^^^^^^^^^^^^^ missing `Bar` in implementation
index 1d3b7097da6614b841ce0608ac6cce39b5c82d4f..e007f5a163b41f7f2dac4aee481f46a7e7a2a06e 100644 (file)
@@ -1,13 +1,8 @@
 error[E0275]: overflow evaluating the requirement `for<'b> u32: X<'b>`
   --> $DIR/hr-associated-type-bound-2.rs:11:1
    |
-LL | / impl X<'_> for u32
-LL | | where
-LL | |     for<'b> <Self as X<'b>>::U: Clone,
-LL | | {
-LL | |     type U = str;
-LL | | }
-   | |_^
+LL | impl X<'_> for u32
+   | ^^^^^^^^^^^^^^^^^^
    |
    = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`hr_associated_type_bound_2`)
 note: required because of the requirements on the impl of `for<'b> X<'b>` for `u32`
index 6f60128b8efe453b67947afb72188c961b7be65f..939c9bbdb6b86470a77bc03fc966b0d485507487 100644 (file)
@@ -1,14 +1,8 @@
 error[E0275]: overflow evaluating the requirement `<(T,) as Grault>::A == _`
   --> $DIR/impl-wf-cycle-1.rs:15:1
    |
-LL | / impl<T: Grault> Grault for (T,)
-LL | |
-LL | | where
-LL | |     Self::A: Baz,
-...  |
-LL | |     type B = bool;
-LL | | }
-   | |_^
+LL | impl<T: Grault> Grault for (T,)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: required because of the requirements on the impl of `Grault` for `(T,)`
   --> $DIR/impl-wf-cycle-1.rs:15:17
index ba14ffefae5390c4e35195c0b19fca2972c4c387..d02ed2cacdf85854b4aa9491cc309467d641e306 100644 (file)
@@ -1,14 +1,8 @@
 error[E0275]: overflow evaluating the requirement `<(T,) as Grault>::A == _`
   --> $DIR/impl-wf-cycle-2.rs:7:1
    |
-LL | / impl<T: Grault> Grault for (T,)
-LL | |
-LL | | where
-LL | |     Self::A: Copy,
-LL | | {
-LL | |     type A = ();
-LL | | }
-   | |_^
+LL | impl<T: Grault> Grault for (T,)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: required because of the requirements on the impl of `Grault` for `(T,)`
   --> $DIR/impl-wf-cycle-2.rs:7:17
index 71655d54baa2c21253c8f16453e94d8390637b78..700923c1b3f58686b1b138ba0ff1d11044cb8a5a 100644 (file)
@@ -1,26 +1,22 @@
 error[E0393]: the type parameter `Rhs` must be explicitly specified
   --> $DIR/issue-22560.rs:9:23
    |
-LL | / trait Sub<Rhs=Self> {
-LL | |     type Output;
-LL | | }
-   | |_- type parameter `Rhs` must be specified for this
-LL |
-LL |   type Test = dyn Add + Sub;
-   |                         ^^^ help: set the type parameter to the desired type: `Sub<Rhs>`
+LL | trait Sub<Rhs=Self> {
+   | ------------------- type parameter `Rhs` must be specified for this
+...
+LL | type Test = dyn Add + Sub;
+   |                       ^^^ help: set the type parameter to the desired type: `Sub<Rhs>`
    |
    = note: because of the default `Self` reference, type parameters must be specified on object types
 
 error[E0393]: the type parameter `Rhs` must be explicitly specified
   --> $DIR/issue-22560.rs:9:17
    |
-LL | / trait Add<Rhs=Self> {
-LL | |     type Output;
-LL | | }
-   | |_- type parameter `Rhs` must be specified for this
+LL | trait Add<Rhs=Self> {
+   | ------------------- type parameter `Rhs` must be specified for this
 ...
-LL |   type Test = dyn Add + Sub;
-   |                   ^^^ help: set the type parameter to the desired type: `Add<Rhs>`
+LL | type Test = dyn Add + Sub;
+   |                 ^^^ help: set the type parameter to the desired type: `Add<Rhs>`
    |
    = note: because of the default `Self` reference, type parameters must be specified on object types
 
@@ -39,10 +35,10 @@ error[E0191]: the value of the associated types `Output` (from trait `Add`), `Ou
   --> $DIR/issue-22560.rs:9:17
    |
 LL |     type Output;
-   |     ------------ `Output` defined here
+   |     ----------- `Output` defined here
 ...
 LL |     type Output;
-   |     ------------ `Output` defined here
+   |     ----------- `Output` defined here
 ...
 LL | type Test = dyn Add + Sub;
    |                 ^^^   ^^^ associated type `Output` must be specified
index bb455684ee3ef63374eaabeb20da46779567c172..4307477a56afe49df9aeceeb4998de16cb8ec56a 100644 (file)
@@ -2,14 +2,11 @@ error[E0191]: the value of the associated types `ChildKey` (from trait `Hierarch
   --> $DIR/issue-23595-1.rs:8:58
    |
 LL |     type Value;
-   |     ----------- `Value` defined here
+   |     ---------- `Value` defined here
 LL |     type ChildKey;
-   |     -------------- `ChildKey` defined here
+   |     ------------- `ChildKey` defined here
 LL |     type Children = dyn Index<Self::ChildKey, Output=dyn Hierarchy>;
-   |     -----------------------------------------------------^^^^^^^^^--
-   |     |                                                    |
-   |     |                                                    help: specify the associated types: `Hierarchy<Value = Type, ChildKey = Type, Children = Type>`
-   |     `Children` defined here
+   |     ------------- `Children` defined here                ^^^^^^^^^ help: specify the associated types: `Hierarchy<Value = Type, ChildKey = Type, Children = Type>`
 
 error: aborting due to previous error
 
index 5cd781d9a0cc408c69bd1f95ef08f13550592cd3..a84b599b52b68d2c28913dfdb70c5d08f8714bf6 100644 (file)
@@ -5,10 +5,7 @@ LL | / pub trait ThriftService<Bug: NotFoo>:
 LL | |
 LL | |
 LL | |     Service<AssocType = <Bug as Foo>::OnlyFoo>
-...  |
-LL | |
-LL | | }
-   | |_^ the trait `Foo` is not implemented for `Bug`
+   | |______________________________________________^ the trait `Foo` is not implemented for `Bug`
    |
 help: consider further restricting this bound
    |
index 142f3c411ec5c28e3c7388a3fe1ddc99c47722fc..bddd1dce8e647ed5e35198fb98d85e3f21847400 100644 (file)
@@ -2,7 +2,7 @@ error: layout error: NormalizationFailure(<[E] as std::borrow::ToOwned>::Owned,
   --> $DIR/issue-85103.rs:6:1
    |
 LL | type Edges<'a, E> = Cow<'a, [E]>;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 8c52736b02c4c8a03f5d89f44c7d1b930009827b..f617df984ae35e2b1b2a1fb05c2c5b330d82d176 100644 (file)
@@ -13,7 +13,7 @@ error[E0191]: the value of the associated types `A` (from trait `Y`), `Output` (
   --> $DIR/missing-associated-types.rs:12:21
    |
 LL |     type A;
-   |     ------- `A` defined here
+   |     ------ `A` defined here
 ...
 LL | type Foo<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Y<Rhs>;
    |                     ^^^^^^^^   ^^^^^^^^   ^^^^^^   ^^^^^^ associated type `A` must be specified
@@ -42,9 +42,9 @@ error[E0191]: the value of the associated types `A` (from trait `Z`), `B` (from
   --> $DIR/missing-associated-types.rs:15:21
    |
 LL |     type A;
-   |     ------- `A` defined here
+   |     ------ `A` defined here
 LL |     type B;
-   |     ------- `B` defined here
+   |     ------ `B` defined here
 ...
 LL | type Bar<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs>;
    |                     ^^^^^^^^   ^^^^^^^^   ^^^^^^   ^^^^^^ associated types `A`, `B`, `Output` must be specified
@@ -78,7 +78,7 @@ error[E0191]: the value of the associated types `A` (from trait `Y`), `Output` (
   --> $DIR/missing-associated-types.rs:18:21
    |
 LL |     type A;
-   |     ------- `A` defined here
+   |     ------ `A` defined here
 ...
 LL | type Baz<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Y<Rhs>;
    |                     ^^^^^^^^   ^^^^^^^^   ^^^^^^ associated type `A` must be specified
index 03460b28dcd5a4e155768ead2e1baf39901f99a1..97b2d7221fdb57b8b34b7544b4ad262f4d4df2ac 100644 (file)
@@ -2,7 +2,7 @@ error: cross-crate traits with a default impl, like `Send`, should not be specia
   --> $DIR/suspicious-impls-lint.rs:9:1
    |
 LL | unsafe impl<T: Send> Send for MayImplementSendErr<&T> {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: the lint level is defined here
   --> $DIR/suspicious-impls-lint.rs:1:9
@@ -16,13 +16,13 @@ note: try using the same sequence of generic parameters as the struct definition
   --> $DIR/suspicious-impls-lint.rs:8:1
    |
 LL | struct MayImplementSendErr<T>(T);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: cross-crate traits with a default impl, like `Send`, should not be specialized
   --> $DIR/suspicious-impls-lint.rs:21:1
    |
 LL | unsafe impl Send for ContainsVec<i32> {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this will change its meaning in a future release!
    = note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
@@ -31,13 +31,13 @@ note: try using the same sequence of generic parameters as the struct definition
   --> $DIR/suspicious-impls-lint.rs:20:1
    |
 LL | struct ContainsVec<T>(Vec<T>);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^
 
 error: cross-crate traits with a default impl, like `Send`, should not be specialized
   --> $DIR/suspicious-impls-lint.rs:32:1
    |
 LL | unsafe impl<T: Send> Send for TwoParamsSame<T, T> {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this will change its meaning in a future release!
    = note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
@@ -46,13 +46,13 @@ note: try using the same sequence of generic parameters as the struct definition
   --> $DIR/suspicious-impls-lint.rs:31:1
    |
 LL | struct TwoParamsSame<T, U>(T, U);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: cross-crate traits with a default impl, like `Send`, should not be specialized
   --> $DIR/suspicious-impls-lint.rs:40:1
    |
 LL | unsafe impl<T> Send for WithPhantomDataSend<*const T, i8> {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this will change its meaning in a future release!
    = note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
@@ -61,13 +61,13 @@ note: try using the same sequence of generic parameters as the struct definition
   --> $DIR/suspicious-impls-lint.rs:39:1
    |
 LL | pub struct WithPhantomDataSend<T, U>(PhantomData<T>, U);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: cross-crate traits with a default impl, like `Sync`, should not be specialized
   --> $DIR/suspicious-impls-lint.rs:46:1
    |
 LL | unsafe impl<T> Sync for WithLifetime<'static, Vec<T>> {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this will change its meaning in a future release!
    = note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
@@ -76,7 +76,7 @@ note: try using the same sequence of generic parameters as the struct definition
   --> $DIR/suspicious-impls-lint.rs:44:1
    |
 LL | pub struct WithLifetime<'a, T>(&'a (), T);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 5 previous errors
 
index 1875ea06a06d5adf1f83b98c059b94a4a8d46f43..b9c7e1bea706a0d8f08036f950cb9d83548fdf50 100644 (file)
@@ -10,18 +10,12 @@ note: an implementation of `Add<_>` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^^ must implement `Add<_>`
+   | ^^^^^^^^ must implement `Add<_>`
 note: the following trait must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
    |
-LL | / pub trait Add<Rhs = Self> {
-LL | |     /// The resulting type after applying the `+` operator.
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-LL | |     type Output;
-...  |
-LL | |     fn add(self, rhs: Rhs) -> Self::Output;
-LL | | }
-   | |_^
+LL | pub trait Add<Rhs = Self> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0369]: cannot subtract `A` from `A`
   --> $DIR/issue-28837.rs:8:7
@@ -35,18 +29,12 @@ note: an implementation of `Sub<_>` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^^ must implement `Sub<_>`
+   | ^^^^^^^^ must implement `Sub<_>`
 note: the following trait must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
    |
-LL | / pub trait Sub<Rhs = Self> {
-LL | |     /// The resulting type after applying the `-` operator.
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-LL | |     type Output;
-...  |
-LL | |     fn sub(self, rhs: Rhs) -> Self::Output;
-LL | | }
-   | |_^
+LL | pub trait Sub<Rhs = Self> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0369]: cannot multiply `A` by `A`
   --> $DIR/issue-28837.rs:10:7
@@ -60,18 +48,12 @@ note: an implementation of `Mul<_>` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^^ must implement `Mul<_>`
+   | ^^^^^^^^ must implement `Mul<_>`
 note: the following trait must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
    |
-LL | / pub trait Mul<Rhs = Self> {
-LL | |     /// The resulting type after applying the `*` operator.
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-LL | |     type Output;
-...  |
-LL | |     fn mul(self, rhs: Rhs) -> Self::Output;
-LL | | }
-   | |_^
+LL | pub trait Mul<Rhs = Self> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0369]: cannot divide `A` by `A`
   --> $DIR/issue-28837.rs:12:7
@@ -85,18 +67,12 @@ note: an implementation of `Div<_>` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^^ must implement `Div<_>`
+   | ^^^^^^^^ must implement `Div<_>`
 note: the following trait must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
    |
-LL | / pub trait Div<Rhs = Self> {
-LL | |     /// The resulting type after applying the `/` operator.
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-LL | |     type Output;
-...  |
-LL | |     fn div(self, rhs: Rhs) -> Self::Output;
-LL | | }
-   | |_^
+LL | pub trait Div<Rhs = Self> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0369]: cannot mod `A` by `A`
   --> $DIR/issue-28837.rs:14:7
@@ -110,18 +86,12 @@ note: an implementation of `Rem<_>` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^^ must implement `Rem<_>`
+   | ^^^^^^^^ must implement `Rem<_>`
 note: the following trait must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
    |
-LL | / pub trait Rem<Rhs = Self> {
-LL | |     /// The resulting type after applying the `%` operator.
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-LL | |     type Output;
-...  |
-LL | |     fn rem(self, rhs: Rhs) -> Self::Output;
-LL | | }
-   | |_^
+LL | pub trait Rem<Rhs = Self> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0369]: no implementation for `A & A`
   --> $DIR/issue-28837.rs:16:7
@@ -135,18 +105,12 @@ note: an implementation of `BitAnd<_>` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^^ must implement `BitAnd<_>`
+   | ^^^^^^^^ must implement `BitAnd<_>`
 note: the following trait must be implemented
   --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
    |
-LL | / pub trait BitAnd<Rhs = Self> {
-LL | |     /// The resulting type after applying the `&` operator.
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-LL | |     type Output;
-...  |
-LL | |     fn bitand(self, rhs: Rhs) -> Self::Output;
-LL | | }
-   | |_^
+LL | pub trait BitAnd<Rhs = Self> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0369]: no implementation for `A | A`
   --> $DIR/issue-28837.rs:18:7
@@ -160,18 +124,12 @@ note: an implementation of `BitOr<_>` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^^ must implement `BitOr<_>`
+   | ^^^^^^^^ must implement `BitOr<_>`
 note: the following trait must be implemented
   --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
    |
-LL | / pub trait BitOr<Rhs = Self> {
-LL | |     /// The resulting type after applying the `|` operator.
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-LL | |     type Output;
-...  |
-LL | |     fn bitor(self, rhs: Rhs) -> Self::Output;
-LL | | }
-   | |_^
+LL | pub trait BitOr<Rhs = Self> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0369]: no implementation for `A << A`
   --> $DIR/issue-28837.rs:20:7
@@ -185,18 +143,12 @@ note: an implementation of `Shl<_>` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^^ must implement `Shl<_>`
+   | ^^^^^^^^ must implement `Shl<_>`
 note: the following trait must be implemented
   --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
    |
-LL | / pub trait Shl<Rhs = Self> {
-LL | |     /// The resulting type after applying the `<<` operator.
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-LL | |     type Output;
-...  |
-LL | |     fn shl(self, rhs: Rhs) -> Self::Output;
-LL | | }
-   | |_^
+LL | pub trait Shl<Rhs = Self> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0369]: no implementation for `A >> A`
   --> $DIR/issue-28837.rs:22:7
@@ -210,18 +162,12 @@ note: an implementation of `Shr<_>` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^^ must implement `Shr<_>`
+   | ^^^^^^^^ must implement `Shr<_>`
 note: the following trait must be implemented
   --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
    |
-LL | / pub trait Shr<Rhs = Self> {
-LL | |     /// The resulting type after applying the `>>` operator.
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-LL | |     type Output;
-...  |
-LL | |     fn shr(self, rhs: Rhs) -> Self::Output;
-LL | | }
-   | |_^
+LL | pub trait Shr<Rhs = Self> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0369]: binary operation `==` cannot be applied to type `A`
   --> $DIR/issue-28837.rs:24:7
@@ -235,7 +181,7 @@ note: an implementation of `PartialEq<_>` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^ must implement `PartialEq<_>`
 help: consider annotating `A` with `#[derive(PartialEq)]`
    |
 LL | #[derive(PartialEq)]
@@ -253,7 +199,7 @@ note: an implementation of `PartialEq<_>` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^ must implement `PartialEq<_>`
 help: consider annotating `A` with `#[derive(PartialEq)]`
    |
 LL | #[derive(PartialEq)]
@@ -271,7 +217,7 @@ note: an implementation of `PartialOrd<_>` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^^ must implement `PartialOrd<_>`
+   | ^^^^^^^^ must implement `PartialOrd<_>`
 help: consider annotating `A` with `#[derive(PartialEq, PartialOrd)]`
    |
 LL | #[derive(PartialEq, PartialOrd)]
@@ -289,7 +235,7 @@ note: an implementation of `PartialOrd<_>` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^^ must implement `PartialOrd<_>`
+   | ^^^^^^^^ must implement `PartialOrd<_>`
 help: consider annotating `A` with `#[derive(PartialEq, PartialOrd)]`
    |
 LL | #[derive(PartialEq, PartialOrd)]
@@ -307,7 +253,7 @@ note: an implementation of `PartialOrd<_>` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^^ must implement `PartialOrd<_>`
+   | ^^^^^^^^ must implement `PartialOrd<_>`
 help: consider annotating `A` with `#[derive(PartialEq, PartialOrd)]`
    |
 LL | #[derive(PartialEq, PartialOrd)]
@@ -325,7 +271,7 @@ note: an implementation of `PartialOrd<_>` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^^ must implement `PartialOrd<_>`
+   | ^^^^^^^^ must implement `PartialOrd<_>`
 help: consider annotating `A` with `#[derive(PartialEq, PartialOrd)]`
    |
 LL | #[derive(PartialEq, PartialOrd)]
index d5c24e1bb6cdb347b2e01280466603c442af8a40..f21f890691120cdd4e50c07fda0f9324e52aa4d5 100644 (file)
@@ -14,14 +14,8 @@ LL | struct Thing {
 note: the following trait must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
    |
-LL | / pub trait Mul<Rhs = Self> {
-LL | |     /// The resulting type after applying the `*` operator.
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-LL | |     type Output;
-...  |
-LL | |     fn mul(self, rhs: Rhs) -> Self::Output;
-LL | | }
-   | |_^
+LL | pub trait Mul<Rhs = Self> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index dd83f6edf62a43e6269af258c25f2e1227c1e2d8..eb64fea9433981b6080feb36df5f357e8b404a5b 100644 (file)
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/blind-item-block-middle.rs:6:9
    |
 LL | mod foo { pub struct bar; }
-   |           --------------- unit struct defined here
+   |           -------------- unit struct defined here
 ...
 LL |     let bar = 5;
    |         ^^^   - this expression has type `{integer}`
index ef88d7f14a39bdd9f1321cc5eeb692528b4dbe2d..d79394834dcad615cab6f1d3dfc8a0c0f63b8392 100644 (file)
@@ -13,7 +13,7 @@ note: deref defined here
   --> $DIR/issue-81365-1.rs:12:5
    |
 LL |     type Target = DerefTarget;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^
 
 error: aborting due to previous error
 
index e71edb509649fde9a0be83ee79ef1ec51e63a28b..764eaaa7cc7b4cb253846e71101af7b2e13c60f8 100644 (file)
@@ -13,7 +13,7 @@ note: deref defined here
   --> $DIR/issue-81365-2.rs:12:5
    |
 LL |     type Target = DerefTarget;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 70bb6bb93a94b17ddb84f933e0eb975646c4e9d0..9447174fd21ea2e7dbb1568f38ea9f1f688e110a 100644 (file)
@@ -13,7 +13,7 @@ note: deref defined here
   --> $DIR/issue-81365-3.rs:23:5
    |
 LL |     type Target = Container;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^
 
 error: aborting due to previous error
 
index e714bb86d1cd2d666718c2cd2961f1ab8be22444..0ab3fa92706b059b525a522237778c9f741ce922 100644 (file)
@@ -13,7 +13,7 @@ note: deref defined here
   --> $DIR/issue-81365-4.rs:24:5
    |
 LL |     type Target = Container;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 8201894c6db4cae6182b1791b9e00e90d2a9538a..20ff229ffe7dd3ed1c6e9aedd1980c0eefe8dd26 100644 (file)
@@ -13,7 +13,7 @@ note: deref defined here
   --> $DIR/issue-81365-5.rs:19:5
    |
 LL |     type Target = DerefTarget;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 85ed6acca3d41a6f68a543822f0d52680e9a9760..575aed73b4663107b2a0232e864cd429e741c0a9 100644 (file)
@@ -13,7 +13,7 @@ note: deref defined here
   --> $DIR/issue-81365-6.rs:9:5
    |
 LL |     type Target = [()];
-   |     ^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 506732ec0c5b491e53beac1d01442847903b3aee..52d2d9e75a9515c317fa7cc8d7bb550d090427ea 100644 (file)
@@ -13,7 +13,7 @@ note: deref defined here
   --> $DIR/issue-81365-7.rs:12:5
    |
 LL |     type Target = DerefTarget;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 716b6e9b51fd02a12d02feb32646f407f48da34c..fd83e10a295dc10f47913308cacdc8c58c94c28d 100644 (file)
@@ -13,7 +13,7 @@ note: deref defined here
   --> $DIR/issue-81365-8.rs:12:5
    |
 LL |     type Target = DerefTarget;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^
 
 error: aborting due to previous error
 
index e7345ff3f9a6436f2ad779ee9171f469135eb560..29288be49341c50c5a259575ac8046290da509fe 100644 (file)
@@ -16,9 +16,7 @@ error: any use of this value will cause an error
   --> $DIR/issue-81899.rs:4:23
    |
 LL | const _CONST: &[u8] = &f(&[], |_| {});
-   | ----------------------^^^^^^^^^^^^^^^-
-   |                       |
-   |                       referenced constant has errors
+   | -------------------   ^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -32,9 +30,7 @@ error: any use of this value will cause an error
   --> $DIR/issue-81899.rs:4:23
    |
 LL | const _CONST: &[u8] = &f(&[], |_| {});
-   | ----------------------^^^^^^^^^^^^^^^-
-   |                       |
-   |                       referenced constant has errors
+   | -------------------   ^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index 47d83c653558323aa3d5db84ad589a467902068c..daded200bd9204f112d29cf03e7395ac25ad038f 100644 (file)
@@ -16,9 +16,7 @@ error: any use of this value will cause an error
   --> $DIR/issue-88434-minimal-example.rs:3:21
    |
 LL | const _CONST: &() = &f(&|_| {});
-   | --------------------^^^^^^^^^^^-
-   |                     |
-   |                     referenced constant has errors
+   | -----------------   ^^^^^^^^^^^ referenced constant has errors
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -32,9 +30,7 @@ error: any use of this value will cause an error
   --> $DIR/issue-88434-minimal-example.rs:3:21
    |
 LL | const _CONST: &() = &f(&|_| {});
-   | --------------------^^^^^^^^^^^-
-   |                     |
-   |                     referenced constant has errors
+   | -----------------   ^^^^^^^^^^^ referenced constant has errors
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index b08a7cfc7fe1a01a6650821aec3f59df0ef97aaa..ce6a37ee418f92a1841718917742c38b14a5c6d1 100644 (file)
@@ -16,9 +16,7 @@ error: any use of this value will cause an error
   --> $DIR/issue-88434-removal-index-should-be-less.rs:3:23
    |
 LL | const _CONST: &[u8] = &f(&[], |_| {});
-   | ----------------------^^^^^^^^^^^^^^^-
-   |                       |
-   |                       referenced constant has errors
+   | -------------------   ^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -32,9 +30,7 @@ error: any use of this value will cause an error
   --> $DIR/issue-88434-removal-index-should-be-less.rs:3:23
    |
 LL | const _CONST: &[u8] = &f(&[], |_| {});
-   | ----------------------^^^^^^^^^^^^^^^-
-   |                       |
-   |                       referenced constant has errors
+   | -------------------   ^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index 32d36274ff6ef7aed9b85878e020c4f044814e21..e0678bc718fa00612b5fc719f4e59fad71772b9f 100644 (file)
@@ -25,7 +25,7 @@ note: `E1` defined here
   --> $DIR/auxiliary/match_non_exhaustive_lib.rs:2:1
    |
 LL | pub enum E1 {}
-   | ^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^
    = note: the matched value is of type `E1`, which is marked as non-exhaustive
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
@@ -44,7 +44,7 @@ note: `E2` defined here
   --> $DIR/auxiliary/match_non_exhaustive_lib.rs:5:1
    |
 LL | pub enum E2 { A, B }
-   | ^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^
    = note: the matched value is of type `E2`, which is marked as non-exhaustive
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
index 9ab099489d9e582af5e92e2f7d2f914b713642e0..7f373e595a35f1881f1b601189a4ededa4391978 100644 (file)
@@ -10,7 +10,7 @@ error[E0119]: conflicting implementations of trait `Foo<_>` for type `i32`
   --> $DIR/coherence-overlap-downstream.rs:14:1
    |
 LL | impl<X, T> Foo<X> for T where T: Bar<X> {}
-   | --------------------------------------- first implementation here
+   | ----------------------- first implementation here
 LL | impl<X> Foo<X> for i32 {}
    | ^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32`
    |
index 8272c8875860792ffb6ca196935c6684a586eaa3..f6145c1883a09951a001e7849a956913cd22a4f3 100644 (file)
@@ -2,7 +2,7 @@ error[E0119]: conflicting implementations of trait `Foo` for type `i16`
   --> $DIR/coherence-overlap-upstream.rs:13:1
    |
 LL | impl<T> Foo for T where T: Remote {}
-   | --------------------------------- first implementation here
+   | ----------------- first implementation here
 LL | impl Foo for i16 {}
    | ^^^^^^^^^^^^^^^^ conflicting implementation for `i16`
    |
index 432646e5321eb86eb20f72013252e66f8e5cda37..aa74e2315392da59f745ff44601ed8f11d1c9f62 100644 (file)
@@ -1,22 +1,11 @@
 error: conflicting implementations of trait `IntoWasmAbi` for type `&dyn std::ops::Fn(&_) -> _`
   --> $DIR/coherence-wasm-bindgen.rs:28:1
    |
-LL | / impl<'a, 'b, A, R> IntoWasmAbi for &'a (dyn Fn(A) -> R + 'b)
-LL | | where
-LL | |     A: FromWasmAbi,
-LL | |     R: ReturnWasmAbi,
-LL | | {
-LL | | }
-   | |_- first implementation here
+LL | impl<'a, 'b, A, R> IntoWasmAbi for &'a (dyn Fn(A) -> R + 'b)
+   | ------------------------------------------------------------ first implementation here
 ...
-LL | / impl<'a, 'b, A, R> IntoWasmAbi for &'a (dyn for<'x> Fn(&'x A) -> R + 'b)
-LL | | where
-LL | |     A: RefFromWasmAbi,
-LL | |     R: ReturnWasmAbi,
-...  |
-LL | |
-LL | | }
-   | |_^ conflicting implementation for `&dyn std::ops::Fn(&_) -> _`
+LL | impl<'a, 'b, A, R> IntoWasmAbi for &'a (dyn for<'x> Fn(&'x A) -> R + 'b)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&dyn std::ops::Fn(&_) -> _`
    |
 note: the lint level is defined here
   --> $DIR/coherence-wasm-bindgen.rs:10:9
index 0f32fc0481bc6e251c2a581675d76a3ffa02ce63..0c7c50d67300c1e10bf34b03a7606e5f679282c8 100644 (file)
@@ -21,72 +21,61 @@ error[E0587]: type has conflicting packed and align representation hints
   --> $DIR/conflicting-repr-hints.rs:29:1
    |
 LL | struct F(i32);
-   | ^^^^^^^^^^^^^^
+   | ^^^^^^^^
 
 error[E0587]: type has conflicting packed and align representation hints
   --> $DIR/conflicting-repr-hints.rs:33:1
    |
 LL | struct G(i32);
-   | ^^^^^^^^^^^^^^
+   | ^^^^^^^^
 
 error[E0587]: type has conflicting packed and align representation hints
   --> $DIR/conflicting-repr-hints.rs:37:1
    |
 LL | struct H(i32);
-   | ^^^^^^^^^^^^^^
+   | ^^^^^^^^
 
 error[E0634]: type has conflicting packed representation hints
   --> $DIR/conflicting-repr-hints.rs:40:1
    |
 LL | struct I(i32);
-   | ^^^^^^^^^^^^^^
+   | ^^^^^^^^
 
 error[E0634]: type has conflicting packed representation hints
   --> $DIR/conflicting-repr-hints.rs:44:1
    |
 LL | struct J(i32);
-   | ^^^^^^^^^^^^^^
+   | ^^^^^^^^
 
 error[E0587]: type has conflicting packed and align representation hints
   --> $DIR/conflicting-repr-hints.rs:50:1
    |
-LL | / union X {
-LL | |
-LL | |     i: i32,
-LL | | }
-   | |_^
+LL | union X {
+   | ^^^^^^^
 
 error[E0587]: type has conflicting packed and align representation hints
   --> $DIR/conflicting-repr-hints.rs:57:1
    |
-LL | / union Y {
-LL | |
-LL | |     i: i32,
-LL | | }
-   | |_^
+LL | union Y {
+   | ^^^^^^^
 
 error[E0587]: type has conflicting packed and align representation hints
   --> $DIR/conflicting-repr-hints.rs:64:1
    |
-LL | / union Z {
-LL | |
-LL | |     i: i32,
-LL | | }
-   | |_^
+LL | union Z {
+   | ^^^^^^^
 
 error[E0587]: type has conflicting packed and align representation hints
   --> $DIR/conflicting-repr-hints.rs:70:1
    |
 LL | pub struct S(u16);
-   | ^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0587]: type has conflicting packed and align representation hints
   --> $DIR/conflicting-repr-hints.rs:73:1
    |
-LL | / pub union U {
-LL | |     u: u16
-LL | | }
-   | |_^
+LL | pub union U {
+   | ^^^^^^^^^^^
 
 error: aborting due to 12 previous errors
 
index c6b0ce931450deeb96c8fa5a8bbf42ae5ada398c..2d9de8805bb55257748ada9a18c2edd40b033f48 100644 (file)
@@ -2,7 +2,7 @@ error[E0446]: private type `fn(u8) -> u8 {my_const_fn}` in public interface
   --> $DIR/eval-privacy.rs:16:5
    |
 LL |     type AssocTy = Const<{ my_const_fn(U) }>;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
+   |     ^^^^^^^^^^^^ can't leak private type
 ...
 LL | const fn my_const_fn(val: u8) -> u8 {
    | ----------------------------------- `fn(u8) -> u8 {my_const_fn}` declared as private
index 98931a3936f52eb3fe2f4bab4715000d561d5ce8..28ddddf1be62bbd5bb32d4ed2384a1fb3a153b18 100644 (file)
@@ -2,7 +2,7 @@ error[E0391]: cycle detected when resolving instance `<LazyUpdim<T, { T::DIM },
   --> $DIR/issue-83765.rs:5:5
    |
 LL |     const DIM: usize;
-   |     ^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^
    |
 note: ...which requires checking if `TensorDimension` fulfills its obligations...
   --> $DIR/issue-83765.rs:4:1
index d29e020339b7397cd308586681c64da6151ac3e0..ce281797e566639f0687d0b6fb901abeb0efdf5f 100644 (file)
@@ -44,7 +44,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/forbidden_slices.rs:26:1
    |
 LL | pub static S4: &[u8] = unsafe { from_raw_parts((&D1) as *const _ as _, 1) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized bytes
+   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -55,7 +55,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/forbidden_slices.rs:28:1
    |
 LL | pub static S5: &[u8] = unsafe { from_raw_parts((&D3) as *const _ as _, size_of::<&u32>()) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered a pointer, but expected plain (non-pointer) bytes
+   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered a pointer, but expected plain (non-pointer) bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -66,7 +66,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/forbidden_slices.rs:30:1
    |
 LL | pub static S6: &[bool] = unsafe { from_raw_parts((&D0) as *const _ as _, 4) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -76,13 +76,8 @@ LL | pub static S6: &[bool] = unsafe { from_raw_parts((&D0) as *const _ as _, 4)
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/forbidden_slices.rs:33:1
    |
-LL | / pub static S7: &[u16] = unsafe {
-LL | |
-LL | |     let ptr = (&D2 as *const Struct as *const u16).byte_add(1);
-LL | |
-LL | |     from_raw_parts(ptr, 4)
-LL | | };
-   | |__^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
+LL | pub static S7: &[u16] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -163,12 +158,8 @@ LL |     from_ptr_range(ptr..ptr.add(2))
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/forbidden_slices.rs:53:1
    |
-LL | / pub static R4: &[u8] = unsafe {
-LL | |
-LL | |     let ptr = (&D1) as *const MaybeUninit<&u32> as *const u8;
-LL | |     from_ptr_range(ptr..ptr.add(1))
-LL | | };
-   | |__^ constructing invalid value at .<deref>[0]: encountered uninitialized bytes
+LL | pub static R4: &[u8] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -178,12 +169,8 @@ LL | | };
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/forbidden_slices.rs:58:1
    |
-LL | / pub static R5: &[u8] = unsafe {
-LL | |
-LL | |     let ptr = &D3 as *const &u32;
-LL | |     from_ptr_range(ptr.cast()..ptr.add(1).cast())
-LL | | };
-   | |__^ constructing invalid value at .<deref>: encountered a pointer, but expected plain (non-pointer) bytes
+LL | pub static R5: &[u8] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered a pointer, but expected plain (non-pointer) bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -193,12 +180,8 @@ LL | | };
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/forbidden_slices.rs:63:1
    |
-LL | / pub static R6: &[bool] = unsafe {
-LL | |
-LL | |     let ptr = &D0 as *const u32 as *const bool;
-LL | |     from_ptr_range(ptr..ptr.add(4))
-LL | | };
-   | |__^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
+LL | pub static R6: &[bool] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -208,12 +191,8 @@ LL | | };
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/forbidden_slices.rs:68:1
    |
-LL | / pub static R7: &[u16] = unsafe {
-LL | |
-LL | |     let ptr = (&D2 as *const Struct as *const u16).byte_add(1);
-LL | |     from_ptr_range(ptr..ptr.add(4))
-LL | | };
-   | |__^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
+LL | pub static R7: &[u16] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
index f22a708e3391ab7de4a8f50a1d0e75e8c6a44116..6c484f7c95bfa7cf3cb45aa5564025baa464565c 100644 (file)
@@ -44,7 +44,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/forbidden_slices.rs:26:1
    |
 LL | pub static S4: &[u8] = unsafe { from_raw_parts((&D1) as *const _ as _, 1) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized bytes
+   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -55,7 +55,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/forbidden_slices.rs:28:1
    |
 LL | pub static S5: &[u8] = unsafe { from_raw_parts((&D3) as *const _ as _, size_of::<&u32>()) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered a pointer, but expected plain (non-pointer) bytes
+   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered a pointer, but expected plain (non-pointer) bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -66,7 +66,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/forbidden_slices.rs:30:1
    |
 LL | pub static S6: &[bool] = unsafe { from_raw_parts((&D0) as *const _ as _, 4) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -76,13 +76,8 @@ LL | pub static S6: &[bool] = unsafe { from_raw_parts((&D0) as *const _ as _, 4)
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/forbidden_slices.rs:33:1
    |
-LL | / pub static S7: &[u16] = unsafe {
-LL | |
-LL | |     let ptr = (&D2 as *const Struct as *const u16).byte_add(1);
-LL | |
-LL | |     from_raw_parts(ptr, 4)
-LL | | };
-   | |__^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
+LL | pub static S7: &[u16] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -163,12 +158,8 @@ LL |     from_ptr_range(ptr..ptr.add(2))
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/forbidden_slices.rs:53:1
    |
-LL | / pub static R4: &[u8] = unsafe {
-LL | |
-LL | |     let ptr = (&D1) as *const MaybeUninit<&u32> as *const u8;
-LL | |     from_ptr_range(ptr..ptr.add(1))
-LL | | };
-   | |__^ constructing invalid value at .<deref>[0]: encountered uninitialized bytes
+LL | pub static R4: &[u8] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -178,12 +169,8 @@ LL | | };
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/forbidden_slices.rs:58:1
    |
-LL | / pub static R5: &[u8] = unsafe {
-LL | |
-LL | |     let ptr = &D3 as *const &u32;
-LL | |     from_ptr_range(ptr.cast()..ptr.add(1).cast())
-LL | | };
-   | |__^ constructing invalid value at .<deref>: encountered a pointer, but expected plain (non-pointer) bytes
+LL | pub static R5: &[u8] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered a pointer, but expected plain (non-pointer) bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -193,12 +180,8 @@ LL | | };
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/forbidden_slices.rs:63:1
    |
-LL | / pub static R6: &[bool] = unsafe {
-LL | |
-LL | |     let ptr = &D0 as *const u32 as *const bool;
-LL | |     from_ptr_range(ptr..ptr.add(4))
-LL | | };
-   | |__^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
+LL | pub static R6: &[bool] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -208,12 +191,8 @@ LL | | };
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/forbidden_slices.rs:68:1
    |
-LL | / pub static R7: &[u16] = unsafe {
-LL | |
-LL | |     let ptr = (&D2 as *const Struct as *const u16).byte_add(1);
-LL | |     from_ptr_range(ptr..ptr.add(4))
-LL | | };
-   | |__^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
+LL | pub static R7: &[u16] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
index 89f8f2ffc55cb88e40b96a6f79c8d36ec12307aa..f3b9170d428af716b83d66ffda88c65356aee4ea 100644 (file)
@@ -1,11 +1,10 @@
 error: any use of this value will cause an error
   --> $DIR/assert-type-intrinsics.rs:14:9
    |
-LL | /     const _BAD1: () = unsafe {
-LL | |         MaybeUninit::<!>::uninit().assume_init();
-   | |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to instantiate uninhabited type `!`
-LL | |     };
-   | |______-
+LL |     const _BAD1: () = unsafe {
+   |     ---------------
+LL |         MaybeUninit::<!>::uninit().assume_init();
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to instantiate uninhabited type `!`
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -14,11 +13,10 @@ LL | |     };
 error: any use of this value will cause an error
   --> $DIR/assert-type-intrinsics.rs:17:9
    |
-LL | /     const _BAD2: () = unsafe {
-LL | |         intrinsics::assert_uninit_valid::<bool>();
-   | |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to leave type `bool` uninitialized, which is invalid
-LL | |     };
-   | |______-
+LL |     const _BAD2: () = unsafe {
+   |     ---------------
+LL |         intrinsics::assert_uninit_valid::<bool>();
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to leave type `bool` uninitialized, which is invalid
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -26,11 +24,10 @@ LL | |     };
 error: any use of this value will cause an error
   --> $DIR/assert-type-intrinsics.rs:20:9
    |
-LL | /     const _BAD3: () = unsafe {
-LL | |         intrinsics::assert_zero_valid::<&'static i32>();
-   | |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to zero-initialize type `&i32`, which is invalid
-LL | |     };
-   | |______-
+LL |     const _BAD3: () = unsafe {
+   |     ---------------
+LL |         intrinsics::assert_zero_valid::<&'static i32>();
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to zero-initialize type `&i32`, which is invalid
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -41,11 +38,10 @@ Future incompatibility report: Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/assert-type-intrinsics.rs:14:9
    |
-LL | /     const _BAD1: () = unsafe {
-LL | |         MaybeUninit::<!>::uninit().assume_init();
-   | |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to instantiate uninhabited type `!`
-LL | |     };
-   | |______-
+LL |     const _BAD1: () = unsafe {
+   |     ---------------
+LL |         MaybeUninit::<!>::uninit().assume_init();
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to instantiate uninhabited type `!`
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -55,11 +51,10 @@ Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/assert-type-intrinsics.rs:17:9
    |
-LL | /     const _BAD2: () = unsafe {
-LL | |         intrinsics::assert_uninit_valid::<bool>();
-   | |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to leave type `bool` uninitialized, which is invalid
-LL | |     };
-   | |______-
+LL |     const _BAD2: () = unsafe {
+   |     ---------------
+LL |         intrinsics::assert_uninit_valid::<bool>();
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to leave type `bool` uninitialized, which is invalid
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -69,11 +64,10 @@ Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/assert-type-intrinsics.rs:20:9
    |
-LL | /     const _BAD3: () = unsafe {
-LL | |         intrinsics::assert_zero_valid::<&'static i32>();
-   | |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to zero-initialize type `&i32`, which is invalid
-LL | |     };
-   | |______-
+LL |     const _BAD3: () = unsafe {
+   |     ---------------
+LL |         intrinsics::assert_zero_valid::<&'static i32>();
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to zero-initialize type `&i32`, which is invalid
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index cccf62a8ff6d3b6f44ee5bb9cb93a93227c261d2..17cbaef1f06d75b87295cac994ca92af46ac2299 100644 (file)
@@ -2,9 +2,7 @@ warning: any use of this value will cause an error
   --> $DIR/assoc_const_generic_impl.rs:11:34
    |
 LL |     const I_AM_ZERO_SIZED: ()  = [()][std::mem::size_of::<Self>()];
-   |     -----------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                                  |
-   |                                  index out of bounds: the length is 1 but the index is 4
+   |     -------------------------    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ index out of bounds: the length is 1 but the index is 4
    |
 note: the lint level is defined here
   --> $DIR/assoc_const_generic_impl.rs:3:9
@@ -27,9 +25,7 @@ warning: any use of this value will cause an error
   --> $DIR/assoc_const_generic_impl.rs:11:34
    |
 LL |     const I_AM_ZERO_SIZED: ()  = [()][std::mem::size_of::<Self>()];
-   |     -----------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                                  |
-   |                                  index out of bounds: the length is 1 but the index is 4
+   |     -------------------------    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ index out of bounds: the length is 1 but the index is 4
    |
 note: the lint level is defined here
   --> $DIR/assoc_const_generic_impl.rs:3:9
index b8dd4134b284dda2dec640000b090ad19e602247..6c51ed89393a5d70009278df1e77150981a5d16f 100644 (file)
@@ -2,7 +2,7 @@ error[E0618]: expected function, found `usize`
   --> $DIR/const-as-fn.rs:4:5
    |
 LL | const FOO: usize = 0;
-   | --------------------- `FOO` defined here
+   | ---------------- `FOO` defined here
 ...
 LL |     FOO();
    |     ^^^--
index 385e770eb4f0128e973515aa90e37eafdd257183..1b94aa080dda5bd720eac8a97f73f8cba548697d 100644 (file)
@@ -2,9 +2,7 @@ error: any use of this value will cause an error
   --> $DIR/const-err-early.rs:3:19
    |
 LL | pub const A: i8 = -i8::MIN;
-   | ------------------^^^^^^^^-
-   |                   |
-   |                   attempt to negate `i8::MIN`, which would overflow
+   | ---------------   ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-err-early.rs:1:9
@@ -18,9 +16,7 @@ error: any use of this value will cause an error
   --> $DIR/const-err-early.rs:5:19
    |
 LL | pub const B: u8 = 200u8 + 200u8;
-   | ------------------^^^^^^^^^^^^^-
-   |                   |
-   |                   attempt to compute `200_u8 + 200_u8`, which would overflow
+   | ---------------   ^^^^^^^^^^^^^ attempt to compute `200_u8 + 200_u8`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -29,9 +25,7 @@ error: any use of this value will cause an error
   --> $DIR/const-err-early.rs:7:19
    |
 LL | pub const C: u8 = 200u8 * 4;
-   | ------------------^^^^^^^^^-
-   |                   |
-   |                   attempt to compute `200_u8 * 4_u8`, which would overflow
+   | ---------------   ^^^^^^^^^ attempt to compute `200_u8 * 4_u8`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -40,9 +34,7 @@ error: any use of this value will cause an error
   --> $DIR/const-err-early.rs:9:19
    |
 LL | pub const D: u8 = 42u8 - (42u8 + 1);
-   | ------------------^^^^^^^^^^^^^^^^^-
-   |                   |
-   |                   attempt to compute `42_u8 - 43_u8`, which would overflow
+   | ---------------   ^^^^^^^^^^^^^^^^^ attempt to compute `42_u8 - 43_u8`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -51,9 +43,7 @@ error: any use of this value will cause an error
   --> $DIR/const-err-early.rs:11:19
    |
 LL | pub const E: u8 = [5u8][1];
-   | ------------------^^^^^^^^-
-   |                   |
-   |                   index out of bounds: the length is 1 but the index is 1
+   | ---------------   ^^^^^^^^ index out of bounds: the length is 1 but the index is 1
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -65,9 +55,7 @@ error: any use of this value will cause an error
   --> $DIR/const-err-early.rs:3:19
    |
 LL | pub const A: i8 = -i8::MIN;
-   | ------------------^^^^^^^^-
-   |                   |
-   |                   attempt to negate `i8::MIN`, which would overflow
+   | ---------------   ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-err-early.rs:1:9
@@ -82,9 +70,7 @@ error: any use of this value will cause an error
   --> $DIR/const-err-early.rs:5:19
    |
 LL | pub const B: u8 = 200u8 + 200u8;
-   | ------------------^^^^^^^^^^^^^-
-   |                   |
-   |                   attempt to compute `200_u8 + 200_u8`, which would overflow
+   | ---------------   ^^^^^^^^^^^^^ attempt to compute `200_u8 + 200_u8`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-err-early.rs:1:9
@@ -99,9 +85,7 @@ error: any use of this value will cause an error
   --> $DIR/const-err-early.rs:7:19
    |
 LL | pub const C: u8 = 200u8 * 4;
-   | ------------------^^^^^^^^^-
-   |                   |
-   |                   attempt to compute `200_u8 * 4_u8`, which would overflow
+   | ---------------   ^^^^^^^^^ attempt to compute `200_u8 * 4_u8`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-err-early.rs:1:9
@@ -116,9 +100,7 @@ error: any use of this value will cause an error
   --> $DIR/const-err-early.rs:9:19
    |
 LL | pub const D: u8 = 42u8 - (42u8 + 1);
-   | ------------------^^^^^^^^^^^^^^^^^-
-   |                   |
-   |                   attempt to compute `42_u8 - 43_u8`, which would overflow
+   | ---------------   ^^^^^^^^^^^^^^^^^ attempt to compute `42_u8 - 43_u8`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-err-early.rs:1:9
@@ -133,9 +115,7 @@ error: any use of this value will cause an error
   --> $DIR/const-err-early.rs:11:19
    |
 LL | pub const E: u8 = [5u8][1];
-   | ------------------^^^^^^^^-
-   |                   |
-   |                   index out of bounds: the length is 1 but the index is 1
+   | ---------------   ^^^^^^^^ index out of bounds: the length is 1 but the index is 1
    |
 note: the lint level is defined here
   --> $DIR/const-err-early.rs:1:9
index a195459ff0884e40d3a32cbeb4bcf6a60579e09a..f179843654e9ba449d7e54fbdc363b5db5a63e50 100644 (file)
@@ -2,9 +2,7 @@ error: any use of this value will cause an error
   --> $DIR/const-err-multi.rs:3:19
    |
 LL | pub const A: i8 = -i8::MIN;
-   | ------------------^^^^^^^^-
-   |                   |
-   |                   attempt to negate `i8::MIN`, which would overflow
+   | ---------------   ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-err-multi.rs:1:9
@@ -18,9 +16,7 @@ error: any use of this value will cause an error
   --> $DIR/const-err-multi.rs:6:19
    |
 LL | pub const B: i8 = A;
-   | ------------------^-
-   |                   |
-   |                   referenced constant has errors
+   | ---------------   ^ referenced constant has errors
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -29,9 +25,7 @@ error: any use of this value will cause an error
   --> $DIR/const-err-multi.rs:9:19
    |
 LL | pub const C: u8 = A as u8;
-   | ------------------^-------
-   |                   |
-   |                   referenced constant has errors
+   | ---------------   ^ referenced constant has errors
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -40,9 +34,7 @@ error: any use of this value will cause an error
   --> $DIR/const-err-multi.rs:12:24
    |
 LL | pub const D: i8 = 50 - A;
-   | -----------------------^-
-   |                        |
-   |                        referenced constant has errors
+   | ---------------        ^ referenced constant has errors
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -54,9 +46,7 @@ error: any use of this value will cause an error
   --> $DIR/const-err-multi.rs:3:19
    |
 LL | pub const A: i8 = -i8::MIN;
-   | ------------------^^^^^^^^-
-   |                   |
-   |                   attempt to negate `i8::MIN`, which would overflow
+   | ---------------   ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-err-multi.rs:1:9
@@ -71,9 +61,7 @@ error: any use of this value will cause an error
   --> $DIR/const-err-multi.rs:6:19
    |
 LL | pub const B: i8 = A;
-   | ------------------^-
-   |                   |
-   |                   referenced constant has errors
+   | ---------------   ^ referenced constant has errors
    |
 note: the lint level is defined here
   --> $DIR/const-err-multi.rs:1:9
@@ -88,9 +76,7 @@ error: any use of this value will cause an error
   --> $DIR/const-err-multi.rs:9:19
    |
 LL | pub const C: u8 = A as u8;
-   | ------------------^-------
-   |                   |
-   |                   referenced constant has errors
+   | ---------------   ^ referenced constant has errors
    |
 note: the lint level is defined here
   --> $DIR/const-err-multi.rs:1:9
@@ -105,9 +91,7 @@ error: any use of this value will cause an error
   --> $DIR/const-err-multi.rs:12:24
    |
 LL | pub const D: i8 = 50 - A;
-   | -----------------------^-
-   |                        |
-   |                        referenced constant has errors
+   | ---------------        ^ referenced constant has errors
    |
 note: the lint level is defined here
   --> $DIR/const-err-multi.rs:1:9
index 3b03e702dc4aec7d6342f1bcdef32d743d568aa3..e3b0d29c853241dffead0933d1e2ab8cc611d598 100644 (file)
@@ -2,9 +2,7 @@ warning: any use of this value will cause an error
   --> $DIR/const-err.rs:11:17
    |
 LL | const FOO: u8 = [5u8][1];
-   | ----------------^^^^^^^^-
-   |                 |
-   |                 index out of bounds: the length is 1 but the index is 1
+   | -------------   ^^^^^^^^ index out of bounds: the length is 1 but the index is 1
    |
 note: the lint level is defined here
   --> $DIR/const-err.rs:5:9
@@ -34,9 +32,7 @@ warning: any use of this value will cause an error
   --> $DIR/const-err.rs:11:17
    |
 LL | const FOO: u8 = [5u8][1];
-   | ----------------^^^^^^^^-
-   |                 |
-   |                 index out of bounds: the length is 1 but the index is 1
+   | -------------   ^^^^^^^^ index out of bounds: the length is 1 but the index is 1
    |
 note: the lint level is defined here
   --> $DIR/const-err.rs:5:9
index f88bf4454260bc1d09587ae021863993ba787c57..2312e2a45db5b780bbf886c46c2c251be2284636 100644 (file)
@@ -2,9 +2,7 @@ warning: any use of this value will cause an error
   --> $DIR/conditional_array_execution.rs:7:19
    |
 LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
-   | ------------------^^^^^---------------------------
-   |                   |
-   |                   attempt to compute `5_u32 - 6_u32`, which would overflow
+   | --------------    ^^^^^ attempt to compute `5_u32 - 6_u32`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/conditional_array_execution.rs:3:9
@@ -38,9 +36,7 @@ warning: any use of this value will cause an error
   --> $DIR/conditional_array_execution.rs:7:19
    |
 LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
-   | ------------------^^^^^---------------------------
-   |                   |
-   |                   attempt to compute `5_u32 - 6_u32`, which would overflow
+   | --------------    ^^^^^ attempt to compute `5_u32 - 6_u32`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/conditional_array_execution.rs:3:9
index 1c74b978827c64a830254800e224aa1803331d71..cf50c19caa7ddfa45f13d980ca0356f5884525c4 100644 (file)
@@ -17,9 +17,7 @@ warning: any use of this value will cause an error
   --> $DIR/const-eval-overflow-2.rs:11:25
    |
 LL | const NEG_NEG_128: i8 = -NEG_128;
-   | ------------------------^^^^^^^^-
-   |                         |
-   |                         attempt to negate `i8::MIN`, which would overflow
+   | ---------------------   ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow-2.rs:4:36
index 948ead521ea34100c9e50461c81136a315730427..dab9a76c7d42337450fe4bb4d37ea68fda5582f1 100644 (file)
@@ -1,12 +1,11 @@
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2.rs:14:6
    |
-LL | / const VALS_I8: (i8,) =
-LL | |     (
-LL | |      i8::MIN - 1,
-   | |      ^^^^^^^^^^^ attempt to compute `i8::MIN - 1_i8`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I8: (i8,) =
+   | --------------------
+LL |     (
+LL |      i8::MIN - 1,
+   |      ^^^^^^^^^^^ attempt to compute `i8::MIN - 1_i8`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2.rs:8:9
@@ -19,12 +18,11 @@ LL | #![deny(const_err)]
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2.rs:21:6
    |
-LL | / const VALS_I16: (i16,) =
-LL | |     (
-LL | |      i16::MIN - 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `i16::MIN - 1_i16`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I16: (i16,) =
+   | ----------------------
+LL |     (
+LL |      i16::MIN - 1,
+   |      ^^^^^^^^^^^^ attempt to compute `i16::MIN - 1_i16`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -32,12 +30,11 @@ LL | |      );
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2.rs:28:6
    |
-LL | / const VALS_I32: (i32,) =
-LL | |     (
-LL | |      i32::MIN - 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `i32::MIN - 1_i32`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I32: (i32,) =
+   | ----------------------
+LL |     (
+LL |      i32::MIN - 1,
+   |      ^^^^^^^^^^^^ attempt to compute `i32::MIN - 1_i32`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -45,12 +42,11 @@ LL | |      );
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2.rs:35:6
    |
-LL | / const VALS_I64: (i64,) =
-LL | |     (
-LL | |      i64::MIN - 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `i64::MIN - 1_i64`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I64: (i64,) =
+   | ----------------------
+LL |     (
+LL |      i64::MIN - 1,
+   |      ^^^^^^^^^^^^ attempt to compute `i64::MIN - 1_i64`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -58,12 +54,11 @@ LL | |      );
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2.rs:42:6
    |
-LL | / const VALS_U8: (u8,) =
-LL | |     (
-LL | |      u8::MIN - 1,
-   | |      ^^^^^^^^^^^ attempt to compute `0_u8 - 1_u8`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U8: (u8,) =
+   | --------------------
+LL |     (
+LL |      u8::MIN - 1,
+   |      ^^^^^^^^^^^ attempt to compute `0_u8 - 1_u8`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -71,11 +66,10 @@ LL | |      );
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2.rs:48:6
    |
-LL | / const VALS_U16: (u16,) = (
-LL | |      u16::MIN - 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `0_u16 - 1_u16`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U16: (u16,) = (
+   | ----------------------
+LL |      u16::MIN - 1,
+   |      ^^^^^^^^^^^^ attempt to compute `0_u16 - 1_u16`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -83,11 +77,10 @@ LL | |      );
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2.rs:54:6
    |
-LL | / const VALS_U32: (u32,) = (
-LL | |      u32::MIN - 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U32: (u32,) = (
+   | ----------------------
+LL |      u32::MIN - 1,
+   |      ^^^^^^^^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -95,12 +88,11 @@ LL | |      );
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2.rs:61:6
    |
-LL | / const VALS_U64: (u64,) =
-LL | |     (
-LL | |      u64::MIN - 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `0_u64 - 1_u64`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U64: (u64,) =
+   | ----------------------
+LL |     (
+LL |      u64::MIN - 1,
+   |      ^^^^^^^^^^^^ attempt to compute `0_u64 - 1_u64`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -111,12 +103,11 @@ Future incompatibility report: Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2.rs:14:6
    |
-LL | / const VALS_I8: (i8,) =
-LL | |     (
-LL | |      i8::MIN - 1,
-   | |      ^^^^^^^^^^^ attempt to compute `i8::MIN - 1_i8`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I8: (i8,) =
+   | --------------------
+LL |     (
+LL |      i8::MIN - 1,
+   |      ^^^^^^^^^^^ attempt to compute `i8::MIN - 1_i8`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2.rs:8:9
@@ -130,12 +121,11 @@ Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2.rs:21:6
    |
-LL | / const VALS_I16: (i16,) =
-LL | |     (
-LL | |      i16::MIN - 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `i16::MIN - 1_i16`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I16: (i16,) =
+   | ----------------------
+LL |     (
+LL |      i16::MIN - 1,
+   |      ^^^^^^^^^^^^ attempt to compute `i16::MIN - 1_i16`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2.rs:8:9
@@ -149,12 +139,11 @@ Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2.rs:28:6
    |
-LL | / const VALS_I32: (i32,) =
-LL | |     (
-LL | |      i32::MIN - 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `i32::MIN - 1_i32`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I32: (i32,) =
+   | ----------------------
+LL |     (
+LL |      i32::MIN - 1,
+   |      ^^^^^^^^^^^^ attempt to compute `i32::MIN - 1_i32`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2.rs:8:9
@@ -168,12 +157,11 @@ Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2.rs:35:6
    |
-LL | / const VALS_I64: (i64,) =
-LL | |     (
-LL | |      i64::MIN - 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `i64::MIN - 1_i64`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I64: (i64,) =
+   | ----------------------
+LL |     (
+LL |      i64::MIN - 1,
+   |      ^^^^^^^^^^^^ attempt to compute `i64::MIN - 1_i64`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2.rs:8:9
@@ -187,12 +175,11 @@ Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2.rs:42:6
    |
-LL | / const VALS_U8: (u8,) =
-LL | |     (
-LL | |      u8::MIN - 1,
-   | |      ^^^^^^^^^^^ attempt to compute `0_u8 - 1_u8`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U8: (u8,) =
+   | --------------------
+LL |     (
+LL |      u8::MIN - 1,
+   |      ^^^^^^^^^^^ attempt to compute `0_u8 - 1_u8`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2.rs:8:9
@@ -206,11 +193,10 @@ Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2.rs:48:6
    |
-LL | / const VALS_U16: (u16,) = (
-LL | |      u16::MIN - 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `0_u16 - 1_u16`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U16: (u16,) = (
+   | ----------------------
+LL |      u16::MIN - 1,
+   |      ^^^^^^^^^^^^ attempt to compute `0_u16 - 1_u16`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2.rs:8:9
@@ -224,11 +210,10 @@ Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2.rs:54:6
    |
-LL | / const VALS_U32: (u32,) = (
-LL | |      u32::MIN - 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U32: (u32,) = (
+   | ----------------------
+LL |      u32::MIN - 1,
+   |      ^^^^^^^^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2.rs:8:9
@@ -242,12 +227,11 @@ Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2.rs:61:6
    |
-LL | / const VALS_U64: (u64,) =
-LL | |     (
-LL | |      u64::MIN - 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `0_u64 - 1_u64`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U64: (u64,) =
+   | ----------------------
+LL |     (
+LL |      u64::MIN - 1,
+   |      ^^^^^^^^^^^^ attempt to compute `0_u64 - 1_u64`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2.rs:8:9
index 5db6a49a98b0c23d44d082a15aa9def30cd97931..5fe9917437e008b04be1030ca2e094a53ef9208f 100644 (file)
@@ -1,12 +1,11 @@
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2b.rs:14:6
    |
-LL | / const VALS_I8: (i8,) =
-LL | |     (
-LL | |      i8::MAX + 1,
-   | |      ^^^^^^^^^^^ attempt to compute `i8::MAX + 1_i8`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I8: (i8,) =
+   | --------------------
+LL |     (
+LL |      i8::MAX + 1,
+   |      ^^^^^^^^^^^ attempt to compute `i8::MAX + 1_i8`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2b.rs:8:9
@@ -19,12 +18,11 @@ LL | #![deny(const_err)]
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2b.rs:21:6
    |
-LL | / const VALS_I16: (i16,) =
-LL | |     (
-LL | |      i16::MAX + 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `i16::MAX + 1_i16`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I16: (i16,) =
+   | ----------------------
+LL |     (
+LL |      i16::MAX + 1,
+   |      ^^^^^^^^^^^^ attempt to compute `i16::MAX + 1_i16`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -32,12 +30,11 @@ LL | |      );
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2b.rs:28:6
    |
-LL | / const VALS_I32: (i32,) =
-LL | |     (
-LL | |      i32::MAX + 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `i32::MAX + 1_i32`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I32: (i32,) =
+   | ----------------------
+LL |     (
+LL |      i32::MAX + 1,
+   |      ^^^^^^^^^^^^ attempt to compute `i32::MAX + 1_i32`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -45,12 +42,11 @@ LL | |      );
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2b.rs:35:6
    |
-LL | / const VALS_I64: (i64,) =
-LL | |     (
-LL | |      i64::MAX + 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `i64::MAX + 1_i64`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I64: (i64,) =
+   | ----------------------
+LL |     (
+LL |      i64::MAX + 1,
+   |      ^^^^^^^^^^^^ attempt to compute `i64::MAX + 1_i64`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -58,12 +54,11 @@ LL | |      );
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2b.rs:42:6
    |
-LL | / const VALS_U8: (u8,) =
-LL | |     (
-LL | |      u8::MAX + 1,
-   | |      ^^^^^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U8: (u8,) =
+   | --------------------
+LL |     (
+LL |      u8::MAX + 1,
+   |      ^^^^^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -71,11 +66,10 @@ LL | |      );
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2b.rs:48:6
    |
-LL | / const VALS_U16: (u16,) = (
-LL | |      u16::MAX + 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `u16::MAX + 1_u16`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U16: (u16,) = (
+   | ----------------------
+LL |      u16::MAX + 1,
+   |      ^^^^^^^^^^^^ attempt to compute `u16::MAX + 1_u16`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -83,11 +77,10 @@ LL | |      );
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2b.rs:54:6
    |
-LL | / const VALS_U32: (u32,) = (
-LL | |      u32::MAX + 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `u32::MAX + 1_u32`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U32: (u32,) = (
+   | ----------------------
+LL |      u32::MAX + 1,
+   |      ^^^^^^^^^^^^ attempt to compute `u32::MAX + 1_u32`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -95,12 +88,11 @@ LL | |      );
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2b.rs:61:6
    |
-LL | / const VALS_U64: (u64,) =
-LL | |     (
-LL | |      u64::MAX + 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `u64::MAX + 1_u64`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U64: (u64,) =
+   | ----------------------
+LL |     (
+LL |      u64::MAX + 1,
+   |      ^^^^^^^^^^^^ attempt to compute `u64::MAX + 1_u64`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -111,12 +103,11 @@ Future incompatibility report: Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2b.rs:14:6
    |
-LL | / const VALS_I8: (i8,) =
-LL | |     (
-LL | |      i8::MAX + 1,
-   | |      ^^^^^^^^^^^ attempt to compute `i8::MAX + 1_i8`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I8: (i8,) =
+   | --------------------
+LL |     (
+LL |      i8::MAX + 1,
+   |      ^^^^^^^^^^^ attempt to compute `i8::MAX + 1_i8`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2b.rs:8:9
@@ -130,12 +121,11 @@ Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2b.rs:21:6
    |
-LL | / const VALS_I16: (i16,) =
-LL | |     (
-LL | |      i16::MAX + 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `i16::MAX + 1_i16`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I16: (i16,) =
+   | ----------------------
+LL |     (
+LL |      i16::MAX + 1,
+   |      ^^^^^^^^^^^^ attempt to compute `i16::MAX + 1_i16`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2b.rs:8:9
@@ -149,12 +139,11 @@ Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2b.rs:28:6
    |
-LL | / const VALS_I32: (i32,) =
-LL | |     (
-LL | |      i32::MAX + 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `i32::MAX + 1_i32`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I32: (i32,) =
+   | ----------------------
+LL |     (
+LL |      i32::MAX + 1,
+   |      ^^^^^^^^^^^^ attempt to compute `i32::MAX + 1_i32`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2b.rs:8:9
@@ -168,12 +157,11 @@ Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2b.rs:35:6
    |
-LL | / const VALS_I64: (i64,) =
-LL | |     (
-LL | |      i64::MAX + 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `i64::MAX + 1_i64`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I64: (i64,) =
+   | ----------------------
+LL |     (
+LL |      i64::MAX + 1,
+   |      ^^^^^^^^^^^^ attempt to compute `i64::MAX + 1_i64`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2b.rs:8:9
@@ -187,12 +175,11 @@ Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2b.rs:42:6
    |
-LL | / const VALS_U8: (u8,) =
-LL | |     (
-LL | |      u8::MAX + 1,
-   | |      ^^^^^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U8: (u8,) =
+   | --------------------
+LL |     (
+LL |      u8::MAX + 1,
+   |      ^^^^^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2b.rs:8:9
@@ -206,11 +193,10 @@ Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2b.rs:48:6
    |
-LL | / const VALS_U16: (u16,) = (
-LL | |      u16::MAX + 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `u16::MAX + 1_u16`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U16: (u16,) = (
+   | ----------------------
+LL |      u16::MAX + 1,
+   |      ^^^^^^^^^^^^ attempt to compute `u16::MAX + 1_u16`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2b.rs:8:9
@@ -224,11 +210,10 @@ Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2b.rs:54:6
    |
-LL | / const VALS_U32: (u32,) = (
-LL | |      u32::MAX + 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `u32::MAX + 1_u32`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U32: (u32,) = (
+   | ----------------------
+LL |      u32::MAX + 1,
+   |      ^^^^^^^^^^^^ attempt to compute `u32::MAX + 1_u32`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2b.rs:8:9
@@ -242,12 +227,11 @@ Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2b.rs:61:6
    |
-LL | / const VALS_U64: (u64,) =
-LL | |     (
-LL | |      u64::MAX + 1,
-   | |      ^^^^^^^^^^^^ attempt to compute `u64::MAX + 1_u64`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U64: (u64,) =
+   | ----------------------
+LL |     (
+LL |      u64::MAX + 1,
+   |      ^^^^^^^^^^^^ attempt to compute `u64::MAX + 1_u64`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2b.rs:8:9
index ec3f3c110596bb2f5bd4d0b0f290173c18ca3136..d5f3a0fb1c3f4d15ab8d89ab82df3ac962a34383 100644 (file)
@@ -1,12 +1,11 @@
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2c.rs:14:6
    |
-LL | / const VALS_I8: (i8,) =
-LL | |     (
-LL | |      i8::MIN * 2,
-   | |      ^^^^^^^^^^^ attempt to compute `i8::MIN * 2_i8`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I8: (i8,) =
+   | --------------------
+LL |     (
+LL |      i8::MIN * 2,
+   |      ^^^^^^^^^^^ attempt to compute `i8::MIN * 2_i8`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2c.rs:8:9
@@ -19,12 +18,11 @@ LL | #![deny(const_err)]
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2c.rs:21:6
    |
-LL | / const VALS_I16: (i16,) =
-LL | |     (
-LL | |      i16::MIN * 2,
-   | |      ^^^^^^^^^^^^ attempt to compute `i16::MIN * 2_i16`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I16: (i16,) =
+   | ----------------------
+LL |     (
+LL |      i16::MIN * 2,
+   |      ^^^^^^^^^^^^ attempt to compute `i16::MIN * 2_i16`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -32,12 +30,11 @@ LL | |      );
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2c.rs:28:6
    |
-LL | / const VALS_I32: (i32,) =
-LL | |     (
-LL | |      i32::MIN * 2,
-   | |      ^^^^^^^^^^^^ attempt to compute `i32::MIN * 2_i32`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I32: (i32,) =
+   | ----------------------
+LL |     (
+LL |      i32::MIN * 2,
+   |      ^^^^^^^^^^^^ attempt to compute `i32::MIN * 2_i32`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -45,12 +42,11 @@ LL | |      );
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2c.rs:35:6
    |
-LL | / const VALS_I64: (i64,) =
-LL | |     (
-LL | |      i64::MIN * 2,
-   | |      ^^^^^^^^^^^^ attempt to compute `i64::MIN * 2_i64`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I64: (i64,) =
+   | ----------------------
+LL |     (
+LL |      i64::MIN * 2,
+   |      ^^^^^^^^^^^^ attempt to compute `i64::MIN * 2_i64`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -58,12 +54,11 @@ LL | |      );
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2c.rs:42:6
    |
-LL | / const VALS_U8: (u8,) =
-LL | |     (
-LL | |      u8::MAX * 2,
-   | |      ^^^^^^^^^^^ attempt to compute `u8::MAX * 2_u8`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U8: (u8,) =
+   | --------------------
+LL |     (
+LL |      u8::MAX * 2,
+   |      ^^^^^^^^^^^ attempt to compute `u8::MAX * 2_u8`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -71,11 +66,10 @@ LL | |      );
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2c.rs:48:6
    |
-LL | / const VALS_U16: (u16,) = (
-LL | |      u16::MAX * 2,
-   | |      ^^^^^^^^^^^^ attempt to compute `u16::MAX * 2_u16`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U16: (u16,) = (
+   | ----------------------
+LL |      u16::MAX * 2,
+   |      ^^^^^^^^^^^^ attempt to compute `u16::MAX * 2_u16`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -83,11 +77,10 @@ LL | |      );
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2c.rs:54:6
    |
-LL | / const VALS_U32: (u32,) = (
-LL | |      u32::MAX * 2,
-   | |      ^^^^^^^^^^^^ attempt to compute `u32::MAX * 2_u32`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U32: (u32,) = (
+   | ----------------------
+LL |      u32::MAX * 2,
+   |      ^^^^^^^^^^^^ attempt to compute `u32::MAX * 2_u32`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -95,12 +88,11 @@ LL | |      );
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2c.rs:61:6
    |
-LL | / const VALS_U64: (u64,) =
-LL | |     (
-LL | |      u64::MAX * 2,
-   | |      ^^^^^^^^^^^^ attempt to compute `u64::MAX * 2_u64`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U64: (u64,) =
+   | ----------------------
+LL |     (
+LL |      u64::MAX * 2,
+   |      ^^^^^^^^^^^^ attempt to compute `u64::MAX * 2_u64`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -111,12 +103,11 @@ Future incompatibility report: Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2c.rs:14:6
    |
-LL | / const VALS_I8: (i8,) =
-LL | |     (
-LL | |      i8::MIN * 2,
-   | |      ^^^^^^^^^^^ attempt to compute `i8::MIN * 2_i8`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I8: (i8,) =
+   | --------------------
+LL |     (
+LL |      i8::MIN * 2,
+   |      ^^^^^^^^^^^ attempt to compute `i8::MIN * 2_i8`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2c.rs:8:9
@@ -130,12 +121,11 @@ Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2c.rs:21:6
    |
-LL | / const VALS_I16: (i16,) =
-LL | |     (
-LL | |      i16::MIN * 2,
-   | |      ^^^^^^^^^^^^ attempt to compute `i16::MIN * 2_i16`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I16: (i16,) =
+   | ----------------------
+LL |     (
+LL |      i16::MIN * 2,
+   |      ^^^^^^^^^^^^ attempt to compute `i16::MIN * 2_i16`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2c.rs:8:9
@@ -149,12 +139,11 @@ Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2c.rs:28:6
    |
-LL | / const VALS_I32: (i32,) =
-LL | |     (
-LL | |      i32::MIN * 2,
-   | |      ^^^^^^^^^^^^ attempt to compute `i32::MIN * 2_i32`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I32: (i32,) =
+   | ----------------------
+LL |     (
+LL |      i32::MIN * 2,
+   |      ^^^^^^^^^^^^ attempt to compute `i32::MIN * 2_i32`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2c.rs:8:9
@@ -168,12 +157,11 @@ Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2c.rs:35:6
    |
-LL | / const VALS_I64: (i64,) =
-LL | |     (
-LL | |      i64::MIN * 2,
-   | |      ^^^^^^^^^^^^ attempt to compute `i64::MIN * 2_i64`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_I64: (i64,) =
+   | ----------------------
+LL |     (
+LL |      i64::MIN * 2,
+   |      ^^^^^^^^^^^^ attempt to compute `i64::MIN * 2_i64`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2c.rs:8:9
@@ -187,12 +175,11 @@ Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2c.rs:42:6
    |
-LL | / const VALS_U8: (u8,) =
-LL | |     (
-LL | |      u8::MAX * 2,
-   | |      ^^^^^^^^^^^ attempt to compute `u8::MAX * 2_u8`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U8: (u8,) =
+   | --------------------
+LL |     (
+LL |      u8::MAX * 2,
+   |      ^^^^^^^^^^^ attempt to compute `u8::MAX * 2_u8`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2c.rs:8:9
@@ -206,11 +193,10 @@ Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2c.rs:48:6
    |
-LL | / const VALS_U16: (u16,) = (
-LL | |      u16::MAX * 2,
-   | |      ^^^^^^^^^^^^ attempt to compute `u16::MAX * 2_u16`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U16: (u16,) = (
+   | ----------------------
+LL |      u16::MAX * 2,
+   |      ^^^^^^^^^^^^ attempt to compute `u16::MAX * 2_u16`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2c.rs:8:9
@@ -224,11 +210,10 @@ Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2c.rs:54:6
    |
-LL | / const VALS_U32: (u32,) = (
-LL | |      u32::MAX * 2,
-   | |      ^^^^^^^^^^^^ attempt to compute `u32::MAX * 2_u32`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U32: (u32,) = (
+   | ----------------------
+LL |      u32::MAX * 2,
+   |      ^^^^^^^^^^^^ attempt to compute `u32::MAX * 2_u32`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2c.rs:8:9
@@ -242,12 +227,11 @@ Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const-eval-overflow2c.rs:61:6
    |
-LL | / const VALS_U64: (u64,) =
-LL | |     (
-LL | |      u64::MAX * 2,
-   | |      ^^^^^^^^^^^^ attempt to compute `u64::MAX * 2_u64`, which would overflow
-LL | |      );
-   | |_______-
+LL | const VALS_U64: (u64,) =
+   | ----------------------
+LL |     (
+LL |      u64::MAX * 2,
+   |      ^^^^^^^^^^^^ attempt to compute `u64::MAX * 2_u64`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/const-eval-overflow2c.rs:8:9
index bbec2a830e64b42082881e7925210f51fc336cb2..0ae7bfa86bc761c1f522b41031ea5c8ef2c8573e 100644 (file)
@@ -2,9 +2,7 @@ warning: any use of this value will cause an error
   --> $DIR/const-eval-query-stack.rs:19:16
    |
 LL | const X: i32 = 1 / 0;
-   | ---------------^^^^^-
-   |                |
-   |                attempt to divide `1_i32` by zero
+   | ------------   ^^^^^ attempt to divide `1_i32` by zero
    |
 note: the lint level is defined here
   --> $DIR/const-eval-query-stack.rs:18:8
@@ -40,9 +38,7 @@ warning: any use of this value will cause an error
   --> $DIR/const-eval-query-stack.rs:19:16
    |
 LL | const X: i32 = 1 / 0;
-   | ---------------^^^^^-
-   |                |
-   |                attempt to divide `1_i32` by zero
+   | ------------   ^^^^^ attempt to divide `1_i32` by zero
    |
 note: the lint level is defined here
   --> $DIR/const-eval-query-stack.rs:18:8
index 8cbc6a399af219a088c9d5984ee024c231fc0e24..655a7d520545c0dbadf09820bd001f644132afa0 100644 (file)
@@ -2,9 +2,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:26:49
    |
 LL |     const I32_REF_USIZE_UNION: usize = unsafe { Nonsense { int_32_ref: &3 }.u };
-   |     --------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                                 |
-   |                                                 unable to turn pointer into raw bytes
+   |     --------------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -14,9 +12,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:30:43
    |
 LL |     const I32_REF_U8_UNION: u8 = unsafe { Nonsense { int_32_ref: &3 }.uint_8 };
-   |     --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                           |
-   |                                           unable to turn pointer into raw bytes
+   |     --------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -25,9 +21,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:34:45
    |
 LL |     const I32_REF_U16_UNION: u16 = unsafe { Nonsense { int_32_ref: &3 }.uint_16 };
-   |     ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                             |
-   |                                             unable to turn pointer into raw bytes
+   |     ----------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -36,9 +30,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:38:45
    |
 LL |     const I32_REF_U32_UNION: u32 = unsafe { Nonsense { int_32_ref: &3 }.uint_32 };
-   |     ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                             |
-   |                                             unable to turn pointer into raw bytes
+   |     ----------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -47,9 +39,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:42:45
    |
 LL |     const I32_REF_U64_UNION: u64 = unsafe { Nonsense { int_32_ref: &3 }.uint_64 };
-   |     ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                             |
-   |                                             unable to turn pointer into raw bytes
+   |     ----------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -58,7 +48,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/const-pointer-values-in-various-types.rs:46:5
    |
 LL |     const I32_REF_U128_UNION: u128 = unsafe { Nonsense { int_32_ref: &3 }.uint_128 };
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected initialized bytes
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected initialized bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -69,9 +59,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:49:43
    |
 LL |     const I32_REF_I8_UNION: i8 = unsafe { Nonsense { int_32_ref: &3 }.int_8 };
-   |     --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                           |
-   |                                           unable to turn pointer into raw bytes
+   |     --------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -80,9 +68,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:53:45
    |
 LL |     const I32_REF_I16_UNION: i16 = unsafe { Nonsense { int_32_ref: &3 }.int_16 };
-   |     ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                             |
-   |                                             unable to turn pointer into raw bytes
+   |     ----------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -91,9 +77,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:57:45
    |
 LL |     const I32_REF_I32_UNION: i32 = unsafe { Nonsense { int_32_ref: &3 }.int_32 };
-   |     ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                             |
-   |                                             unable to turn pointer into raw bytes
+   |     ----------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -102,9 +86,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:61:45
    |
 LL |     const I32_REF_I64_UNION: i64 = unsafe { Nonsense { int_32_ref: &3 }.int_64 };
-   |     ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                             |
-   |                                             unable to turn pointer into raw bytes
+   |     ----------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -113,7 +95,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/const-pointer-values-in-various-types.rs:65:5
    |
 LL |     const I32_REF_I128_UNION: i128 = unsafe { Nonsense { int_32_ref: &3 }.int_128 };
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected initialized bytes
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected initialized bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -124,9 +106,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:68:45
    |
 LL |     const I32_REF_F32_UNION: f32 = unsafe { Nonsense { int_32_ref: &3 }.float_32 };
-   |     ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                             |
-   |                                             unable to turn pointer into raw bytes
+   |     ----------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -135,9 +115,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:72:45
    |
 LL |     const I32_REF_F64_UNION: f64 = unsafe { Nonsense { int_32_ref: &3 }.float_64 };
-   |     ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                             |
-   |                                             unable to turn pointer into raw bytes
+   |     ----------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -146,9 +124,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:76:47
    |
 LL |     const I32_REF_BOOL_UNION: bool = unsafe { Nonsense { int_32_ref: &3 }.truthy_falsey };
-   |     ------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                               |
-   |                                               unable to turn pointer into raw bytes
+   |     ------------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -157,9 +133,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:80:47
    |
 LL |     const I32_REF_CHAR_UNION: char = unsafe { Nonsense { int_32_ref: &3 }.character };
-   |     ------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                               |
-   |                                               unable to turn pointer into raw bytes
+   |     ------------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -168,9 +142,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:84:39
    |
 LL |     const STR_U8_UNION: u8 = unsafe { Nonsense { stringy: "3" }.uint_8 };
-   |     ----------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                       |
-   |                                       unable to turn pointer into raw bytes
+   |     ----------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -179,9 +151,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:88:41
    |
 LL |     const STR_U16_UNION: u16 = unsafe { Nonsense { stringy: "3" }.uint_16 };
-   |     ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                         |
-   |                                         unable to turn pointer into raw bytes
+   |     ------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -190,9 +160,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:92:41
    |
 LL |     const STR_U32_UNION: u32 = unsafe { Nonsense { stringy: "3" }.uint_32 };
-   |     ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                         |
-   |                                         unable to turn pointer into raw bytes
+   |     ------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -201,9 +169,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:96:41
    |
 LL |     const STR_U64_UNION: u64 = unsafe { Nonsense { stringy: "3" }.uint_64 };
-   |     ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                         |
-   |                                         unable to turn pointer into raw bytes
+   |     ------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -212,9 +178,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:100:43
    |
 LL |     const STR_U128_UNION: u128 = unsafe { Nonsense { stringy: "3" }.uint_128 };
-   |     --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                           |
-   |                                           unable to turn pointer into raw bytes
+   |     --------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -223,9 +187,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:104:39
    |
 LL |     const STR_I8_UNION: i8 = unsafe { Nonsense { stringy: "3" }.int_8 };
-   |     ----------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                       |
-   |                                       unable to turn pointer into raw bytes
+   |     ----------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -234,9 +196,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:108:41
    |
 LL |     const STR_I16_UNION: i16 = unsafe { Nonsense { stringy: "3" }.int_16 };
-   |     ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                         |
-   |                                         unable to turn pointer into raw bytes
+   |     ------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -245,9 +205,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:112:41
    |
 LL |     const STR_I32_UNION: i32 = unsafe { Nonsense { stringy: "3" }.int_32 };
-   |     ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                         |
-   |                                         unable to turn pointer into raw bytes
+   |     ------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -256,9 +214,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:116:41
    |
 LL |     const STR_I64_UNION: i64 = unsafe { Nonsense { stringy: "3" }.int_64 };
-   |     ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                         |
-   |                                         unable to turn pointer into raw bytes
+   |     ------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -267,9 +223,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:120:43
    |
 LL |     const STR_I128_UNION: i128 = unsafe { Nonsense { stringy: "3" }.int_128 };
-   |     --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                           |
-   |                                           unable to turn pointer into raw bytes
+   |     --------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -278,9 +232,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:124:41
    |
 LL |     const STR_F32_UNION: f32 = unsafe { Nonsense { stringy: "3" }.float_32 };
-   |     ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                         |
-   |                                         unable to turn pointer into raw bytes
+   |     ------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -289,9 +241,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:128:41
    |
 LL |     const STR_F64_UNION: f64 = unsafe { Nonsense { stringy: "3" }.float_64 };
-   |     ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                         |
-   |                                         unable to turn pointer into raw bytes
+   |     ------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -300,9 +250,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:132:43
    |
 LL |     const STR_BOOL_UNION: bool = unsafe { Nonsense { stringy: "3" }.truthy_falsey };
-   |     --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                           |
-   |                                           unable to turn pointer into raw bytes
+   |     --------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -311,9 +259,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:136:43
    |
 LL |     const STR_CHAR_UNION: char = unsafe { Nonsense { stringy: "3" }.character };
-   |     --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                           |
-   |                                           unable to turn pointer into raw bytes
+   |     --------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -326,9 +272,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:26:49
    |
 LL |     const I32_REF_USIZE_UNION: usize = unsafe { Nonsense { int_32_ref: &3 }.u };
-   |     --------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                                 |
-   |                                                 unable to turn pointer into raw bytes
+   |     --------------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -339,9 +283,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:30:43
    |
 LL |     const I32_REF_U8_UNION: u8 = unsafe { Nonsense { int_32_ref: &3 }.uint_8 };
-   |     --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                           |
-   |                                           unable to turn pointer into raw bytes
+   |     --------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -352,9 +294,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:34:45
    |
 LL |     const I32_REF_U16_UNION: u16 = unsafe { Nonsense { int_32_ref: &3 }.uint_16 };
-   |     ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                             |
-   |                                             unable to turn pointer into raw bytes
+   |     ----------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -365,9 +305,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:38:45
    |
 LL |     const I32_REF_U32_UNION: u32 = unsafe { Nonsense { int_32_ref: &3 }.uint_32 };
-   |     ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                             |
-   |                                             unable to turn pointer into raw bytes
+   |     ----------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -378,9 +316,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:42:45
    |
 LL |     const I32_REF_U64_UNION: u64 = unsafe { Nonsense { int_32_ref: &3 }.uint_64 };
-   |     ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                             |
-   |                                             unable to turn pointer into raw bytes
+   |     ----------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -391,9 +327,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:49:43
    |
 LL |     const I32_REF_I8_UNION: i8 = unsafe { Nonsense { int_32_ref: &3 }.int_8 };
-   |     --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                           |
-   |                                           unable to turn pointer into raw bytes
+   |     --------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -404,9 +338,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:53:45
    |
 LL |     const I32_REF_I16_UNION: i16 = unsafe { Nonsense { int_32_ref: &3 }.int_16 };
-   |     ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                             |
-   |                                             unable to turn pointer into raw bytes
+   |     ----------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -417,9 +349,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:57:45
    |
 LL |     const I32_REF_I32_UNION: i32 = unsafe { Nonsense { int_32_ref: &3 }.int_32 };
-   |     ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                             |
-   |                                             unable to turn pointer into raw bytes
+   |     ----------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -430,9 +360,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:61:45
    |
 LL |     const I32_REF_I64_UNION: i64 = unsafe { Nonsense { int_32_ref: &3 }.int_64 };
-   |     ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                             |
-   |                                             unable to turn pointer into raw bytes
+   |     ----------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -443,9 +371,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:68:45
    |
 LL |     const I32_REF_F32_UNION: f32 = unsafe { Nonsense { int_32_ref: &3 }.float_32 };
-   |     ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                             |
-   |                                             unable to turn pointer into raw bytes
+   |     ----------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -456,9 +382,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:72:45
    |
 LL |     const I32_REF_F64_UNION: f64 = unsafe { Nonsense { int_32_ref: &3 }.float_64 };
-   |     ----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                             |
-   |                                             unable to turn pointer into raw bytes
+   |     ----------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -469,9 +393,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:76:47
    |
 LL |     const I32_REF_BOOL_UNION: bool = unsafe { Nonsense { int_32_ref: &3 }.truthy_falsey };
-   |     ------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                               |
-   |                                               unable to turn pointer into raw bytes
+   |     ------------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -482,9 +404,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:80:47
    |
 LL |     const I32_REF_CHAR_UNION: char = unsafe { Nonsense { int_32_ref: &3 }.character };
-   |     ------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                               |
-   |                                               unable to turn pointer into raw bytes
+   |     ------------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -495,9 +415,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:84:39
    |
 LL |     const STR_U8_UNION: u8 = unsafe { Nonsense { stringy: "3" }.uint_8 };
-   |     ----------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                       |
-   |                                       unable to turn pointer into raw bytes
+   |     ----------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -508,9 +426,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:88:41
    |
 LL |     const STR_U16_UNION: u16 = unsafe { Nonsense { stringy: "3" }.uint_16 };
-   |     ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                         |
-   |                                         unable to turn pointer into raw bytes
+   |     ------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -521,9 +437,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:92:41
    |
 LL |     const STR_U32_UNION: u32 = unsafe { Nonsense { stringy: "3" }.uint_32 };
-   |     ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                         |
-   |                                         unable to turn pointer into raw bytes
+   |     ------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -534,9 +448,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:96:41
    |
 LL |     const STR_U64_UNION: u64 = unsafe { Nonsense { stringy: "3" }.uint_64 };
-   |     ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                         |
-   |                                         unable to turn pointer into raw bytes
+   |     ------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -547,9 +459,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:100:43
    |
 LL |     const STR_U128_UNION: u128 = unsafe { Nonsense { stringy: "3" }.uint_128 };
-   |     --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                           |
-   |                                           unable to turn pointer into raw bytes
+   |     --------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -560,9 +470,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:104:39
    |
 LL |     const STR_I8_UNION: i8 = unsafe { Nonsense { stringy: "3" }.int_8 };
-   |     ----------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                       |
-   |                                       unable to turn pointer into raw bytes
+   |     ----------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -573,9 +481,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:108:41
    |
 LL |     const STR_I16_UNION: i16 = unsafe { Nonsense { stringy: "3" }.int_16 };
-   |     ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                         |
-   |                                         unable to turn pointer into raw bytes
+   |     ------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -586,9 +492,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:112:41
    |
 LL |     const STR_I32_UNION: i32 = unsafe { Nonsense { stringy: "3" }.int_32 };
-   |     ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                         |
-   |                                         unable to turn pointer into raw bytes
+   |     ------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -599,9 +503,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:116:41
    |
 LL |     const STR_I64_UNION: i64 = unsafe { Nonsense { stringy: "3" }.int_64 };
-   |     ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                         |
-   |                                         unable to turn pointer into raw bytes
+   |     ------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -612,9 +514,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:120:43
    |
 LL |     const STR_I128_UNION: i128 = unsafe { Nonsense { stringy: "3" }.int_128 };
-   |     --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                           |
-   |                                           unable to turn pointer into raw bytes
+   |     --------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -625,9 +525,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:124:41
    |
 LL |     const STR_F32_UNION: f32 = unsafe { Nonsense { stringy: "3" }.float_32 };
-   |     ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                         |
-   |                                         unable to turn pointer into raw bytes
+   |     ------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -638,9 +536,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:128:41
    |
 LL |     const STR_F64_UNION: f64 = unsafe { Nonsense { stringy: "3" }.float_64 };
-   |     ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                         |
-   |                                         unable to turn pointer into raw bytes
+   |     ------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -651,9 +547,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:132:43
    |
 LL |     const STR_BOOL_UNION: bool = unsafe { Nonsense { stringy: "3" }.truthy_falsey };
-   |     --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                           |
-   |                                           unable to turn pointer into raw bytes
+   |     --------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -664,9 +558,7 @@ error: any use of this value will cause an error
   --> $DIR/const-pointer-values-in-various-types.rs:136:43
    |
 LL |     const STR_CHAR_UNION: char = unsafe { Nonsense { stringy: "3" }.character };
-   |     --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                           |
-   |                                           unable to turn pointer into raw bytes
+   |     --------------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index daf3d8927c19a3a99380dc14e2a5b2b9321e4871..f6ffa1ef2969e1ef29df84283ef8c6a602aafcaf 100644 (file)
@@ -33,7 +33,7 @@ LL |     x(y)
    |     inside `Y` at $DIR/const_fn_ptr_fail2.rs:15:18
 ...
 LL | const Y: usize = bar(X, 2); // FIXME: should fail to typeck someday
-   | ---------------------------
+   | --------------
    |
 note: the lint level is defined here
   --> $DIR/const_fn_ptr_fail2.rs:4:10
@@ -55,7 +55,7 @@ LL |     x(y)
    |     inside `Z` at $DIR/const_fn_ptr_fail2.rs:16:18
 ...
 LL | const Z: usize = bar(double, 2); // FIXME: should fail to typeck someday
-   | --------------------------------
+   | --------------
    |
 note: the lint level is defined here
   --> $DIR/const_fn_ptr_fail2.rs:4:10
index 9057b58ded9da6d1b30d6e07c29577ab55e28c22..adfb4cc61cc6239274bed94f035ba5a0eeb1ed3d 100644 (file)
@@ -14,9 +14,7 @@ warning: any use of this value will cause an error
   --> $DIR/erroneous-const.rs:6:22
    |
 LL |     const VOID: () = [()][2];
-   |     -----------------^^^^^^^-
-   |                      |
-   |                      index out of bounds: the length is 1 but the index is 2
+   |     --------------   ^^^^^^^ index out of bounds: the length is 1 but the index is 2
    |
 note: the lint level is defined here
   --> $DIR/erroneous-const.rs:2:9
@@ -46,9 +44,7 @@ warning: any use of this value will cause an error
   --> $DIR/erroneous-const.rs:6:22
    |
 LL |     const VOID: () = [()][2];
-   |     -----------------^^^^^^^-
-   |                      |
-   |                      index out of bounds: the length is 1 but the index is 2
+   |     --------------   ^^^^^^^ index out of bounds: the length is 1 but the index is 2
    |
 note: the lint level is defined here
   --> $DIR/erroneous-const.rs:2:9
index bf6cc8410a7ee1905db27277210ab4a66c686b61..e947d93e4058213e65b60b3f7603cefe925e5aab 100644 (file)
@@ -14,9 +14,7 @@ warning: any use of this value will cause an error
   --> $DIR/erroneous-const2.rs:6:22
    |
 LL |     const VOID: () = [()][2];
-   |     -----------------^^^^^^^-
-   |                      |
-   |                      index out of bounds: the length is 1 but the index is 2
+   |     --------------   ^^^^^^^ index out of bounds: the length is 1 but the index is 2
    |
 note: the lint level is defined here
   --> $DIR/erroneous-const2.rs:2:9
@@ -40,9 +38,7 @@ warning: any use of this value will cause an error
   --> $DIR/erroneous-const2.rs:6:22
    |
 LL |     const VOID: () = [()][2];
-   |     -----------------^^^^^^^-
-   |                      |
-   |                      index out of bounds: the length is 1 but the index is 2
+   |     --------------   ^^^^^^^ index out of bounds: the length is 1 but the index is 2
    |
 note: the lint level is defined here
   --> $DIR/erroneous-const2.rs:2:9
index adaa4716f1532dd5c28fc3dc79ed0e8c2cbb82d7..00ab0dfc557dd354ba241071007bbceb8bde01ba 100644 (file)
@@ -2,7 +2,7 @@ error: untyped pointers are not allowed in constant
   --> $DIR/alloc_intrinsic_nontransient_fail.rs:6:1
    |
 LL | const FOO: *const i32 = foo();
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 8ce92f7226124353df2726420284878f4f903e54..f1a780926e74b28feb1ccc17f1c6907de89320dc 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/alloc_intrinsic_uninit.rs:8:1
    |
 LL | const BAR: &i32 = unsafe { &*(intrinsics::const_allocate(4, 4) as *mut i32) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered uninitialized bytes, but expected initialized bytes
+   | ^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered uninitialized bytes, but expected initialized bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
index cf95842530b626fb8429afb27a29ae278ae9c65f..2eb401226f876154865740aa342a6f04c2e16ce1 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/alloc_intrinsic_uninit.rs:8:1
    |
 LL | const BAR: &i32 = unsafe { &*(intrinsics::const_allocate(4, 4) as *mut i32) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered uninitialized bytes, but expected initialized bytes
+   | ^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered uninitialized bytes, but expected initialized bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
index 8f4fea96c593dc4197e4e7aeae02935aafa9a798..36002b850b7e7340bb6c4600e318f93ad79b70bc 100644 (file)
@@ -2,7 +2,7 @@ error: untyped pointers are not allowed in constant
   --> $DIR/alloc_intrinsic_untyped.rs:6:1
    |
 LL | const BAR: *mut i32 = unsafe { intrinsics::const_allocate(4, 4) as *mut i32};
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 7b3e46fccca7b8e8fce0c96c8bc51dce4fedbc40..da4a21e08ab177ac103738abdf3c46ba818f4664 100644 (file)
@@ -2,9 +2,7 @@ warning: any use of this value will cause an error
   --> $DIR/index-out-of-bounds-never-type.rs:10:61
    |
 LL |     const VOID: ! = { let x = 0 * std::mem::size_of::<T>(); [][x] };
-   |     --------------------------------------------------------^^^^^---
-   |                                                             |
-   |                                                             index out of bounds: the length is 0 but the index is 0
+   |     -------------                                           ^^^^^ index out of bounds: the length is 0 but the index is 0
    |
 note: the lint level is defined here
   --> $DIR/index-out-of-bounds-never-type.rs:4:9
@@ -27,9 +25,7 @@ warning: any use of this value will cause an error
   --> $DIR/index-out-of-bounds-never-type.rs:10:61
    |
 LL |     const VOID: ! = { let x = 0 * std::mem::size_of::<T>(); [][x] };
-   |     --------------------------------------------------------^^^^^---
-   |                                                             |
-   |                                                             index out of bounds: the length is 0 but the index is 0
+   |     -------------                                           ^^^^^ index out of bounds: the length is 0 but the index is 0
    |
 note: the lint level is defined here
   --> $DIR/index-out-of-bounds-never-type.rs:4:9
index 53ed32638ced2333834af9e06c4b0bef55a1d6ee..91065f416825685d3b66c25797dd5ac171e01ebb 100644 (file)
@@ -2,9 +2,7 @@ warning: any use of this value will cause an error
   --> $DIR/issue-43197.rs:10:20
    |
 LL |     const X: u32 = 0 - 1;
-   |     ---------------^^^^^-
-   |                    |
-   |                    attempt to compute `0_u32 - 1_u32`, which would overflow
+   |     ------------   ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/issue-43197.rs:3:9
@@ -18,9 +16,7 @@ warning: any use of this value will cause an error
   --> $DIR/issue-43197.rs:13:24
    |
 LL |     const Y: u32 = foo(0 - 1);
-   |     -------------------^^^^^--
-   |                        |
-   |                        attempt to compute `0_u32 - 1_u32`, which would overflow
+   |     ------------       ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -65,9 +61,7 @@ warning: any use of this value will cause an error
   --> $DIR/issue-43197.rs:10:20
    |
 LL |     const X: u32 = 0 - 1;
-   |     ---------------^^^^^-
-   |                    |
-   |                    attempt to compute `0_u32 - 1_u32`, which would overflow
+   |     ------------   ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/issue-43197.rs:3:9
@@ -82,9 +76,7 @@ warning: any use of this value will cause an error
   --> $DIR/issue-43197.rs:13:24
    |
 LL |     const Y: u32 = foo(0 - 1);
-   |     -------------------^^^^^--
-   |                        |
-   |                        attempt to compute `0_u32 - 1_u32`, which would overflow
+   |     ------------       ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/issue-43197.rs:3:9
index 5ecdb7ef5568b497315b9de06f2e6389b573f230..81e563b4f54605753b44c689bc5d2842f29443b4 100644 (file)
@@ -12,9 +12,7 @@ warning: any use of this value will cause an error
   --> $DIR/issue-44578.rs:15:24
    |
 LL |     const AMT: usize = [A::AMT][(A::AMT > B::AMT) as usize];
-   |     -------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                        |
-   |                        index out of bounds: the length is 1 but the index is 1
+   |     ----------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ index out of bounds: the length is 1 but the index is 1
    |
 note: the lint level is defined here
   --> $DIR/issue-44578.rs:3:10
index 67af3b2b1d3aee8b00ba331850678d7ff87295da..cc19caca72414a6168508eb7597ff7e2f8162d34 100644 (file)
@@ -2,9 +2,7 @@ error: any use of this value will cause an error
   --> $DIR/issue-50814-2.rs:14:24
    |
 LL |     const BAR: usize = [5, 6, 7][T::BOO];
-   |     -------------------^^^^^^^^^^^^^^^^^-
-   |                        |
-   |                        index out of bounds: the length is 3 but the index is 42
+   |     ----------------   ^^^^^^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 42
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -30,9 +28,7 @@ error: any use of this value will cause an error
   --> $DIR/issue-50814-2.rs:14:24
    |
 LL |     const BAR: usize = [5, 6, 7][T::BOO];
-   |     -------------------^^^^^^^^^^^^^^^^^-
-   |                        |
-   |                        index out of bounds: the length is 3 but the index is 42
+   |     ----------------   ^^^^^^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 42
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index b82bc9ca2f81ac867032a7a81536fd7f088f1050..6ceef91a042aa21edb55783dd20f1fe1c58a6513 100644 (file)
@@ -2,9 +2,7 @@ error: any use of this value will cause an error
   --> $DIR/issue-50814.rs:15:21
    |
 LL |     const MAX: u8 = A::MAX + B::MAX;
-   |     ----------------^^^^^^^^^^^^^^^-
-   |                     |
-   |                     attempt to compute `u8::MAX + u8::MAX`, which would overflow
+   |     -------------   ^^^^^^^^^^^^^^^ attempt to compute `u8::MAX + u8::MAX`, which would overflow
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -30,9 +28,7 @@ error: any use of this value will cause an error
   --> $DIR/issue-50814.rs:15:21
    |
 LL |     const MAX: u8 = A::MAX + B::MAX;
-   |     ----------------^^^^^^^^^^^^^^^-
-   |                     |
-   |                     attempt to compute `u8::MAX + u8::MAX`, which would overflow
+   |     -------------   ^^^^^^^^^^^^^^^ attempt to compute `u8::MAX + u8::MAX`, which would overflow
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index 1a7d386142097d61943ecfdfac17cdf057d4bd64..b007dda246de333b5c7fce8f338e5210d4d88e6f 100644 (file)
@@ -1,16 +1,11 @@
 error: any use of this value will cause an error
   --> $DIR/partial_ptr_overwrite.rs:8:9
    |
-LL | / const PARTIAL_OVERWRITE: () = {
-LL | |     let mut p = &42;
-LL | |     unsafe {
-LL | |         let ptr: *mut _ = &mut p;
-LL | |         *(ptr as *mut u8) = 123;
-   | |         ^^^^^^^^^^^^^^^^^^^^^^^ unable to overwrite parts of a pointer in memory at alloc4
-...  |
-LL | |     let x = *p;
-LL | | };
-   | |__-
+LL | const PARTIAL_OVERWRITE: () = {
+   | ---------------------------
+...
+LL |         *(ptr as *mut u8) = 123;
+   |         ^^^^^^^^^^^^^^^^^^^^^^^ unable to overwrite parts of a pointer in memory at alloc4
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -22,16 +17,11 @@ Future incompatibility report: Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/partial_ptr_overwrite.rs:8:9
    |
-LL | / const PARTIAL_OVERWRITE: () = {
-LL | |     let mut p = &42;
-LL | |     unsafe {
-LL | |         let ptr: *mut _ = &mut p;
-LL | |         *(ptr as *mut u8) = 123;
-   | |         ^^^^^^^^^^^^^^^^^^^^^^^ unable to overwrite parts of a pointer in memory at alloc4
-...  |
-LL | |     let x = *p;
-LL | | };
-   | |__-
+LL | const PARTIAL_OVERWRITE: () = {
+   | ---------------------------
+...
+LL |         *(ptr as *mut u8) = 123;
+   |         ^^^^^^^^^^^^^^^^^^^^^^^ unable to overwrite parts of a pointer in memory at alloc4
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index be845339dfe67d80efe22237bc3c6ec1b8428550..cfca8ef07464fa5ae10aa6bbfddb9ce0146181cf 100644 (file)
@@ -43,21 +43,15 @@ LL |     [1, 2, 3][4]
 warning: any use of this value will cause an error
   --> $DIR/promoted_errors.rs:15:5
    |
-LL |       0 - 1
-   |       ^^^^^
-   |       |
-   |       attempt to compute `0_u32 - 1_u32`, which would overflow
-   |       inside `overflow` at $DIR/promoted_errors.rs:15:5
-   |       inside `X` at $DIR/promoted_errors.rs:43:29
+LL |     0 - 1
+   |     ^^^^^
+   |     |
+   |     attempt to compute `0_u32 - 1_u32`, which would overflow
+   |     inside `overflow` at $DIR/promoted_errors.rs:15:5
+   |     inside `X` at $DIR/promoted_errors.rs:43:29
 ...
-LL | / const X: () = {
-LL | |     let _x: &'static u32 = &overflow();
-LL | |
-LL | |
-...  |
-LL | |     let _x: &'static i32 = &oob();
-LL | | };
-   | |__-
+LL | const X: () = {
+   | -----------
    |
 note: the lint level is defined here
   --> $DIR/promoted_errors.rs:11:9
@@ -70,15 +64,10 @@ LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
 warning: any use of this value will cause an error
   --> $DIR/promoted_errors.rs:43:28
    |
-LL | / const X: () = {
-LL | |     let _x: &'static u32 = &overflow();
-   | |                            ^^^^^^^^^^^ referenced constant has errors
-LL | |
-LL | |
-...  |
-LL | |     let _x: &'static i32 = &oob();
-LL | | };
-   | |__-
+LL | const X: () = {
+   | -----------
+LL |     let _x: &'static u32 = &overflow();
+   |                            ^^^^^^^^^^^ referenced constant has errors
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -89,21 +78,15 @@ Future incompatibility report: Future breakage diagnostic:
 warning: any use of this value will cause an error
   --> $DIR/promoted_errors.rs:15:5
    |
-LL |       0 - 1
-   |       ^^^^^
-   |       |
-   |       attempt to compute `0_u32 - 1_u32`, which would overflow
-   |       inside `overflow` at $DIR/promoted_errors.rs:15:5
-   |       inside `X` at $DIR/promoted_errors.rs:43:29
+LL |     0 - 1
+   |     ^^^^^
+   |     |
+   |     attempt to compute `0_u32 - 1_u32`, which would overflow
+   |     inside `overflow` at $DIR/promoted_errors.rs:15:5
+   |     inside `X` at $DIR/promoted_errors.rs:43:29
 ...
-LL | / const X: () = {
-LL | |     let _x: &'static u32 = &overflow();
-LL | |
-LL | |
-...  |
-LL | |     let _x: &'static i32 = &oob();
-LL | | };
-   | |__-
+LL | const X: () = {
+   | -----------
    |
 note: the lint level is defined here
   --> $DIR/promoted_errors.rs:11:9
@@ -117,15 +100,10 @@ Future breakage diagnostic:
 warning: any use of this value will cause an error
   --> $DIR/promoted_errors.rs:43:28
    |
-LL | / const X: () = {
-LL | |     let _x: &'static u32 = &overflow();
-   | |                            ^^^^^^^^^^^ referenced constant has errors
-LL | |
-LL | |
-...  |
-LL | |     let _x: &'static i32 = &oob();
-LL | | };
-   | |__-
+LL | const X: () = {
+   | -----------
+LL |     let _x: &'static u32 = &overflow();
+   |                            ^^^^^^^^^^^ referenced constant has errors
    |
 note: the lint level is defined here
   --> $DIR/promoted_errors.rs:11:9
index c91d52336c36d9f997f2f443d1bee837744c541a..984484a850f46467edc4db6dad62367d2bdfb899 100644 (file)
@@ -43,21 +43,15 @@ LL |     [1, 2, 3][4]
 warning: any use of this value will cause an error
   --> $DIR/promoted_errors.rs:21:5
    |
-LL |       1 / 0
-   |       ^^^^^
-   |       |
-   |       attempt to divide `1_i32` by zero
-   |       inside `div_by_zero1` at $DIR/promoted_errors.rs:21:5
-   |       inside `X` at $DIR/promoted_errors.rs:46:29
+LL |     1 / 0
+   |     ^^^^^
+   |     |
+   |     attempt to divide `1_i32` by zero
+   |     inside `div_by_zero1` at $DIR/promoted_errors.rs:21:5
+   |     inside `X` at $DIR/promoted_errors.rs:46:29
 ...
-LL | / const X: () = {
-LL | |     let _x: &'static u32 = &overflow();
-LL | |
-LL | |
-...  |
-LL | |     let _x: &'static i32 = &oob();
-LL | | };
-   | |__-
+LL | const X: () = {
+   | -----------
    |
 note: the lint level is defined here
   --> $DIR/promoted_errors.rs:11:9
@@ -70,16 +64,11 @@ LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
 warning: any use of this value will cause an error
   --> $DIR/promoted_errors.rs:46:28
    |
-LL | / const X: () = {
-LL | |     let _x: &'static u32 = &overflow();
-LL | |
-LL | |
-LL | |     let _x: &'static i32 = &div_by_zero1();
-   | |                            ^^^^^^^^^^^^^^^ referenced constant has errors
-...  |
-LL | |     let _x: &'static i32 = &oob();
-LL | | };
-   | |__-
+LL | const X: () = {
+   | -----------
+...
+LL |     let _x: &'static i32 = &div_by_zero1();
+   |                            ^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -90,21 +79,15 @@ Future incompatibility report: Future breakage diagnostic:
 warning: any use of this value will cause an error
   --> $DIR/promoted_errors.rs:21:5
    |
-LL |       1 / 0
-   |       ^^^^^
-   |       |
-   |       attempt to divide `1_i32` by zero
-   |       inside `div_by_zero1` at $DIR/promoted_errors.rs:21:5
-   |       inside `X` at $DIR/promoted_errors.rs:46:29
+LL |     1 / 0
+   |     ^^^^^
+   |     |
+   |     attempt to divide `1_i32` by zero
+   |     inside `div_by_zero1` at $DIR/promoted_errors.rs:21:5
+   |     inside `X` at $DIR/promoted_errors.rs:46:29
 ...
-LL | / const X: () = {
-LL | |     let _x: &'static u32 = &overflow();
-LL | |
-LL | |
-...  |
-LL | |     let _x: &'static i32 = &oob();
-LL | | };
-   | |__-
+LL | const X: () = {
+   | -----------
    |
 note: the lint level is defined here
   --> $DIR/promoted_errors.rs:11:9
@@ -118,16 +101,11 @@ Future breakage diagnostic:
 warning: any use of this value will cause an error
   --> $DIR/promoted_errors.rs:46:28
    |
-LL | / const X: () = {
-LL | |     let _x: &'static u32 = &overflow();
-LL | |
-LL | |
-LL | |     let _x: &'static i32 = &div_by_zero1();
-   | |                            ^^^^^^^^^^^^^^^ referenced constant has errors
-...  |
-LL | |     let _x: &'static i32 = &oob();
-LL | | };
-   | |__-
+LL | const X: () = {
+   | -----------
+...
+LL |     let _x: &'static i32 = &div_by_zero1();
+   |                            ^^^^^^^^^^^^^^^ referenced constant has errors
    |
 note: the lint level is defined here
   --> $DIR/promoted_errors.rs:11:9
index be845339dfe67d80efe22237bc3c6ec1b8428550..cfca8ef07464fa5ae10aa6bbfddb9ce0146181cf 100644 (file)
@@ -43,21 +43,15 @@ LL |     [1, 2, 3][4]
 warning: any use of this value will cause an error
   --> $DIR/promoted_errors.rs:15:5
    |
-LL |       0 - 1
-   |       ^^^^^
-   |       |
-   |       attempt to compute `0_u32 - 1_u32`, which would overflow
-   |       inside `overflow` at $DIR/promoted_errors.rs:15:5
-   |       inside `X` at $DIR/promoted_errors.rs:43:29
+LL |     0 - 1
+   |     ^^^^^
+   |     |
+   |     attempt to compute `0_u32 - 1_u32`, which would overflow
+   |     inside `overflow` at $DIR/promoted_errors.rs:15:5
+   |     inside `X` at $DIR/promoted_errors.rs:43:29
 ...
-LL | / const X: () = {
-LL | |     let _x: &'static u32 = &overflow();
-LL | |
-LL | |
-...  |
-LL | |     let _x: &'static i32 = &oob();
-LL | | };
-   | |__-
+LL | const X: () = {
+   | -----------
    |
 note: the lint level is defined here
   --> $DIR/promoted_errors.rs:11:9
@@ -70,15 +64,10 @@ LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
 warning: any use of this value will cause an error
   --> $DIR/promoted_errors.rs:43:28
    |
-LL | / const X: () = {
-LL | |     let _x: &'static u32 = &overflow();
-   | |                            ^^^^^^^^^^^ referenced constant has errors
-LL | |
-LL | |
-...  |
-LL | |     let _x: &'static i32 = &oob();
-LL | | };
-   | |__-
+LL | const X: () = {
+   | -----------
+LL |     let _x: &'static u32 = &overflow();
+   |                            ^^^^^^^^^^^ referenced constant has errors
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -89,21 +78,15 @@ Future incompatibility report: Future breakage diagnostic:
 warning: any use of this value will cause an error
   --> $DIR/promoted_errors.rs:15:5
    |
-LL |       0 - 1
-   |       ^^^^^
-   |       |
-   |       attempt to compute `0_u32 - 1_u32`, which would overflow
-   |       inside `overflow` at $DIR/promoted_errors.rs:15:5
-   |       inside `X` at $DIR/promoted_errors.rs:43:29
+LL |     0 - 1
+   |     ^^^^^
+   |     |
+   |     attempt to compute `0_u32 - 1_u32`, which would overflow
+   |     inside `overflow` at $DIR/promoted_errors.rs:15:5
+   |     inside `X` at $DIR/promoted_errors.rs:43:29
 ...
-LL | / const X: () = {
-LL | |     let _x: &'static u32 = &overflow();
-LL | |
-LL | |
-...  |
-LL | |     let _x: &'static i32 = &oob();
-LL | | };
-   | |__-
+LL | const X: () = {
+   | -----------
    |
 note: the lint level is defined here
   --> $DIR/promoted_errors.rs:11:9
@@ -117,15 +100,10 @@ Future breakage diagnostic:
 warning: any use of this value will cause an error
   --> $DIR/promoted_errors.rs:43:28
    |
-LL | / const X: () = {
-LL | |     let _x: &'static u32 = &overflow();
-   | |                            ^^^^^^^^^^^ referenced constant has errors
-LL | |
-LL | |
-...  |
-LL | |     let _x: &'static i32 = &oob();
-LL | | };
-   | |__-
+LL | const X: () = {
+   | -----------
+LL |     let _x: &'static u32 = &overflow();
+   |                            ^^^^^^^^^^^ referenced constant has errors
    |
 note: the lint level is defined here
   --> $DIR/promoted_errors.rs:11:9
index 56d66827626b9a9476ac0463d0cc5fbdab1efb78..36197a7ab598ea637f4223de8ec9f545cd63f668 100644 (file)
@@ -2,9 +2,7 @@ warning: any use of this value will cause an error
   --> $DIR/pub_const_err.rs:6:20
    |
 LL | pub const Z: u32 = 0 - 1;
-   | -------------------^^^^^-
-   |                    |
-   |                    attempt to compute `0_u32 - 1_u32`, which would overflow
+   | ----------------   ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/pub_const_err.rs:2:9
@@ -21,9 +19,7 @@ warning: any use of this value will cause an error
   --> $DIR/pub_const_err.rs:6:20
    |
 LL | pub const Z: u32 = 0 - 1;
-   | -------------------^^^^^-
-   |                    |
-   |                    attempt to compute `0_u32 - 1_u32`, which would overflow
+   | ----------------   ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/pub_const_err.rs:2:9
index 202ea781e975df18d5b8ac9222b2b89890c0a409..2eef3b8f5c4187cdb4551f251b3f9bd60da851fa 100644 (file)
@@ -2,9 +2,7 @@ warning: any use of this value will cause an error
   --> $DIR/pub_const_err_bin.rs:4:20
    |
 LL | pub const Z: u32 = 0 - 1;
-   | -------------------^^^^^-
-   |                    |
-   |                    attempt to compute `0_u32 - 1_u32`, which would overflow
+   | ----------------   ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/pub_const_err_bin.rs:2:9
@@ -21,9 +19,7 @@ warning: any use of this value will cause an error
   --> $DIR/pub_const_err_bin.rs:4:20
    |
 LL | pub const Z: u32 = 0 - 1;
-   | -------------------^^^^^-
-   |                    |
-   |                    attempt to compute `0_u32 - 1_u32`, which would overflow
+   | ----------------   ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
    |
 note: the lint level is defined here
   --> $DIR/pub_const_err_bin.rs:2:9
index a55fd8c156e07833a7be1ee42f75a5ea17f48fb8..0e3743588100983b534c15dd97e7602469a258b0 100644 (file)
@@ -2,9 +2,7 @@ error: any use of this value will cause an error
   --> $DIR/ref_to_int_match.rs:25:27
    |
 LL | const BAR: Int = unsafe { Foo { r: &42 }.f };
-   | --------------------------^^^^^^^^^^^^^^^^---
-   |                           |
-   |                           unable to turn pointer into raw bytes
+   | --------------            ^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -29,9 +27,7 @@ error: any use of this value will cause an error
   --> $DIR/ref_to_int_match.rs:25:27
    |
 LL | const BAR: Int = unsafe { Foo { r: &42 }.f };
-   | --------------------------^^^^^^^^^^^^^^^^---
-   |                           |
-   |                           unable to turn pointer into raw bytes
+   | --------------            ^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index a55fd8c156e07833a7be1ee42f75a5ea17f48fb8..0e3743588100983b534c15dd97e7602469a258b0 100644 (file)
@@ -2,9 +2,7 @@ error: any use of this value will cause an error
   --> $DIR/ref_to_int_match.rs:25:27
    |
 LL | const BAR: Int = unsafe { Foo { r: &42 }.f };
-   | --------------------------^^^^^^^^^^^^^^^^---
-   |                           |
-   |                           unable to turn pointer into raw bytes
+   | --------------            ^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -29,9 +27,7 @@ error: any use of this value will cause an error
   --> $DIR/ref_to_int_match.rs:25:27
    |
 LL | const BAR: Int = unsafe { Foo { r: &42 }.f };
-   | --------------------------^^^^^^^^^^^^^^^^---
-   |                           |
-   |                           unable to turn pointer into raw bytes
+   | --------------            ^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index ba4c3799158f036ca7f28ec04770d3b0c011a281..09fd79986958de5e096eccab5d17667c393a111c 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/transmute-const.rs:4:1
    |
 LL | static FOO: bool = unsafe { mem::transmute(3u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x03, but expected a boolean
+   | ^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x03, but expected a boolean
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 1, align: 1) {
index ba4c3799158f036ca7f28ec04770d3b0c011a281..09fd79986958de5e096eccab5d17667c393a111c 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/transmute-const.rs:4:1
    |
 LL | static FOO: bool = unsafe { mem::transmute(3u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x03, but expected a boolean
+   | ^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x03, but expected a boolean
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 1, align: 1) {
index 7c4ae1c56f61cece0a0e5049c93833d3d67afdb8..8560112ae3b70ab1af872f0c45989e3baa176043 100644 (file)
@@ -1,14 +1,8 @@
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-enum-overwrite.rs:8:1
    |
-LL | / const _: u8 = {
-LL | |
-LL | |     let mut e = E::A(1);
-LL | |     let p = if let E::A(x) = &mut e { x as *mut u8 } else { unreachable!() };
-...  |
-LL | |     unsafe { *p }
-LL | | };
-   | |__^ constructing invalid value: encountered uninitialized bytes, but expected initialized bytes
+LL | const _: u8 = {
+   | ^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected initialized bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 1, align: 1) {
index c1cf22c8839b6e69338409952eb7010436e9293f..2f8b44da0fc9b7b481d03d1bbd88232bde8c67e9 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-enum.rs:23:1
    |
 LL | const BAD_ENUM: Enum = unsafe { mem::transmute(1usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x00000001, but expected a valid enum tag
+   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x00000001, but expected a valid enum tag
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -13,7 +13,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-enum.rs:26:1
    |
 LL | const BAD_ENUM_PTR: Enum = unsafe { mem::transmute(&1) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -23,7 +23,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-enum.rs:30:1
    |
 LL | const BAD_ENUM_WRAPPED: Wrap<Enum> = unsafe { mem::transmute(&1) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -32,7 +32,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-enum.rs:43:1
    |
 LL | const BAD_ENUM2: Enum2 = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x00000000, but expected a valid enum tag
+   | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x00000000, but expected a valid enum tag
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -43,7 +43,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-enum.rs:45:1
    |
 LL | const BAD_ENUM2_PTR: Enum2 = unsafe { mem::transmute(&0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -52,7 +52,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-enum.rs:49:1
    |
 LL | const BAD_ENUM2_WRAPPED: Wrap<Enum2> = unsafe { mem::transmute(&0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -61,7 +61,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-enum.rs:59:1
    |
 LL | const BAD_ENUM2_UNDEF : Enum2 = unsafe { MaybeUninit { uninit: () }.init };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered uninitialized bytes, but expected initialized bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered uninitialized bytes, but expected initialized bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -72,7 +72,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-enum.rs:63:1
    |
 LL | const BAD_ENUM2_OPTION_PTR: Option<Enum2> = unsafe { mem::transmute(&0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -81,7 +81,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-enum.rs:81:1
    |
 LL | const BAD_UNINHABITED_VARIANT1: UninhDiscriminant = unsafe { mem::transmute(1u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(B)>.0: encountered a value of the never type `!`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(B)>.0: encountered a value of the never type `!`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 1, align: 1) {
@@ -92,7 +92,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-enum.rs:83:1
    |
 LL | const BAD_UNINHABITED_VARIANT2: UninhDiscriminant = unsafe { mem::transmute(3u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(D)>.0: encountered a value of uninhabited type Never
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(D)>.0: encountered a value of uninhabited type Never
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 1, align: 1) {
@@ -103,7 +103,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-enum.rs:91:1
    |
 LL | const BAD_OPTION_CHAR: Option<(char, char)> = Some(('x', unsafe { mem::transmute(!0u32) }));
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0.1: encountered 0xffffffff, but expected a valid unicode scalar value (in `0..=0x10FFFF` but not in `0xD800..=0xDFFF`)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0.1: encountered 0xffffffff, but expected a valid unicode scalar value (in `0..=0x10FFFF` but not in `0xD800..=0xDFFF`)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -130,7 +130,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-enum.rs:26:1
    |
 LL | const BAD_ENUM_PTR: Enum = unsafe { mem::transmute(&1) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -141,7 +141,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-enum.rs:30:1
    |
 LL | const BAD_ENUM_WRAPPED: Wrap<Enum> = unsafe { mem::transmute(&1) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -152,7 +152,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-enum.rs:45:1
    |
 LL | const BAD_ENUM2_PTR: Enum2 = unsafe { mem::transmute(&0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -163,7 +163,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-enum.rs:49:1
    |
 LL | const BAD_ENUM2_WRAPPED: Wrap<Enum2> = unsafe { mem::transmute(&0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -174,7 +174,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-enum.rs:63:1
    |
 LL | const BAD_ENUM2_OPTION_PTR: Option<Enum2> = unsafe { mem::transmute(&0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index 5e749a6e735ecdb5b37034cc10beccc27d2d37ad..3a05a5150f1a7a6025ac3c138801c3b1fc18a40a 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-enum.rs:23:1
    |
 LL | const BAD_ENUM: Enum = unsafe { mem::transmute(1usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x0000000000000001, but expected a valid enum tag
+   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x0000000000000001, but expected a valid enum tag
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -13,7 +13,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-enum.rs:26:1
    |
 LL | const BAD_ENUM_PTR: Enum = unsafe { mem::transmute(&1) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -23,7 +23,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-enum.rs:30:1
    |
 LL | const BAD_ENUM_WRAPPED: Wrap<Enum> = unsafe { mem::transmute(&1) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -32,7 +32,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-enum.rs:43:1
    |
 LL | const BAD_ENUM2: Enum2 = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x0000000000000000, but expected a valid enum tag
+   | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x0000000000000000, but expected a valid enum tag
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -43,7 +43,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-enum.rs:45:1
    |
 LL | const BAD_ENUM2_PTR: Enum2 = unsafe { mem::transmute(&0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -52,7 +52,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-enum.rs:49:1
    |
 LL | const BAD_ENUM2_WRAPPED: Wrap<Enum2> = unsafe { mem::transmute(&0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -61,7 +61,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-enum.rs:59:1
    |
 LL | const BAD_ENUM2_UNDEF : Enum2 = unsafe { MaybeUninit { uninit: () }.init };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered uninitialized bytes, but expected initialized bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered uninitialized bytes, but expected initialized bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -72,7 +72,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-enum.rs:63:1
    |
 LL | const BAD_ENUM2_OPTION_PTR: Option<Enum2> = unsafe { mem::transmute(&0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -81,7 +81,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-enum.rs:81:1
    |
 LL | const BAD_UNINHABITED_VARIANT1: UninhDiscriminant = unsafe { mem::transmute(1u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(B)>.0: encountered a value of the never type `!`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(B)>.0: encountered a value of the never type `!`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 1, align: 1) {
@@ -92,7 +92,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-enum.rs:83:1
    |
 LL | const BAD_UNINHABITED_VARIANT2: UninhDiscriminant = unsafe { mem::transmute(3u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(D)>.0: encountered a value of uninhabited type Never
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(D)>.0: encountered a value of uninhabited type Never
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 1, align: 1) {
@@ -103,7 +103,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-enum.rs:91:1
    |
 LL | const BAD_OPTION_CHAR: Option<(char, char)> = Some(('x', unsafe { mem::transmute(!0u32) }));
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0.1: encountered 0xffffffff, but expected a valid unicode scalar value (in `0..=0x10FFFF` but not in `0xD800..=0xDFFF`)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0.1: encountered 0xffffffff, but expected a valid unicode scalar value (in `0..=0x10FFFF` but not in `0xD800..=0xDFFF`)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -130,7 +130,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-enum.rs:26:1
    |
 LL | const BAD_ENUM_PTR: Enum = unsafe { mem::transmute(&1) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -141,7 +141,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-enum.rs:30:1
    |
 LL | const BAD_ENUM_WRAPPED: Wrap<Enum> = unsafe { mem::transmute(&1) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -152,7 +152,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-enum.rs:45:1
    |
 LL | const BAD_ENUM2_PTR: Enum2 = unsafe { mem::transmute(&0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -163,7 +163,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-enum.rs:49:1
    |
 LL | const BAD_ENUM2_WRAPPED: Wrap<Enum2> = unsafe { mem::transmute(&0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -174,7 +174,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-enum.rs:63:1
    |
 LL | const BAD_ENUM2_OPTION_PTR: Option<Enum2> = unsafe { mem::transmute(&0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index 1da829ad1251ae93d9647f4950e71afec92ba860..c6422447a4b79b88519efce3a0883a7aec7b7cb2 100644 (file)
@@ -13,9 +13,8 @@ LL |     unsafe { std::mem::transmute((&92u8, &[1usize, usize::MAX, 1usize])) };
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-incorrect-vtable.rs:34:1
    |
-LL | / const INVALID_VTABLE_ALIGNMENT_UB: W<&dyn Trait> =
-LL | |     unsafe { std::mem::transmute((&92u8, &(drop_me as fn(*mut usize), 1usize, 1000usize))) };
-   | |_____________________________________________________________________________________________^ constructing invalid value at .0: encountered invalid vtable: alignment `1000` is not a power of 2
+LL | const INVALID_VTABLE_ALIGNMENT_UB: W<&dyn Trait> =
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered invalid vtable: alignment `1000` is not a power of 2
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -25,9 +24,8 @@ LL | |     unsafe { std::mem::transmute((&92u8, &(drop_me as fn(*mut usize), 1us
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-incorrect-vtable.rs:39:1
    |
-LL | / const INVALID_VTABLE_SIZE_UB: W<&dyn Trait> =
-LL | |     unsafe { std::mem::transmute((&92u8, &(drop_me as fn(*mut usize), usize::MAX, 1usize))) };
-   | |______________________________________________________________________________________________^ constructing invalid value at .0: encountered invalid vtable: size is bigger than largest supported object
+LL | const INVALID_VTABLE_SIZE_UB: W<&dyn Trait> =
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered invalid vtable: size is bigger than largest supported object
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
index 1139976f390fc638362059039a26ef99d24ffee8..e594ad71b5b48c8b7f20118a7cd8d80d2c8caf8e 100644 (file)
@@ -13,9 +13,8 @@ LL |     unsafe { std::mem::transmute((&92u8, &[1usize, usize::MAX, 1usize])) };
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-incorrect-vtable.rs:34:1
    |
-LL | / const INVALID_VTABLE_ALIGNMENT_UB: W<&dyn Trait> =
-LL | |     unsafe { std::mem::transmute((&92u8, &(drop_me as fn(*mut usize), 1usize, 1000usize))) };
-   | |_____________________________________________________________________________________________^ constructing invalid value at .0: encountered invalid vtable: alignment `1000` is not a power of 2
+LL | const INVALID_VTABLE_ALIGNMENT_UB: W<&dyn Trait> =
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered invalid vtable: alignment `1000` is not a power of 2
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -25,9 +24,8 @@ LL | |     unsafe { std::mem::transmute((&92u8, &(drop_me as fn(*mut usize), 1us
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-incorrect-vtable.rs:39:1
    |
-LL | / const INVALID_VTABLE_SIZE_UB: W<&dyn Trait> =
-LL | |     unsafe { std::mem::transmute((&92u8, &(drop_me as fn(*mut usize), usize::MAX, 1usize))) };
-   | |______________________________________________________________________________________________^ constructing invalid value at .0: encountered invalid vtable: size is bigger than largest supported object
+LL | const INVALID_VTABLE_SIZE_UB: W<&dyn Trait> =
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered invalid vtable: size is bigger than largest supported object
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
index 5964d494a14f50a5f6fc10fc2d82db3d5ead0f3a..8eece9e30e4b0d98ecdd26da1a1f289ed9da4f02 100644 (file)
@@ -1,14 +1,8 @@
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-int-array.rs:14:1
    |
-LL | / const UNINIT_INT_0: [u32; 3] = unsafe {
-LL | |
-LL | |
-LL | |     [
-...  |
-LL | |     ]
-LL | | };
-   | |__^ constructing invalid value at [0]: encountered uninitialized bytes
+LL | const UNINIT_INT_0: [u32; 3] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at [0]: encountered uninitialized bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 12, align: 4) {
@@ -18,14 +12,8 @@ LL | | };
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-int-array.rs:23:1
    |
-LL | / const UNINIT_INT_1: [u32; 3] = unsafe {
-LL | |
-LL | |
-LL | |     mem::transmute(
-...  |
-LL | |     )
-LL | | };
-   | |__^ constructing invalid value at [1]: encountered uninitialized bytes
+LL | const UNINIT_INT_1: [u32; 3] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at [1]: encountered uninitialized bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 12, align: 4) {
@@ -35,14 +23,8 @@ LL | | };
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-int-array.rs:43:1
    |
-LL | / const UNINIT_INT_2: [u32; 3] = unsafe {
-LL | |
-LL | |
-LL | |     mem::transmute(
-...  |
-LL | |     )
-LL | | };
-   | |__^ constructing invalid value at [2]: encountered uninitialized bytes
+LL | const UNINIT_INT_2: [u32; 3] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at [2]: encountered uninitialized bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 12, align: 4) {
index 5964d494a14f50a5f6fc10fc2d82db3d5ead0f3a..8eece9e30e4b0d98ecdd26da1a1f289ed9da4f02 100644 (file)
@@ -1,14 +1,8 @@
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-int-array.rs:14:1
    |
-LL | / const UNINIT_INT_0: [u32; 3] = unsafe {
-LL | |
-LL | |
-LL | |     [
-...  |
-LL | |     ]
-LL | | };
-   | |__^ constructing invalid value at [0]: encountered uninitialized bytes
+LL | const UNINIT_INT_0: [u32; 3] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at [0]: encountered uninitialized bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 12, align: 4) {
@@ -18,14 +12,8 @@ LL | | };
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-int-array.rs:23:1
    |
-LL | / const UNINIT_INT_1: [u32; 3] = unsafe {
-LL | |
-LL | |
-LL | |     mem::transmute(
-...  |
-LL | |     )
-LL | | };
-   | |__^ constructing invalid value at [1]: encountered uninitialized bytes
+LL | const UNINIT_INT_1: [u32; 3] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at [1]: encountered uninitialized bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 12, align: 4) {
@@ -35,14 +23,8 @@ LL | | };
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-int-array.rs:43:1
    |
-LL | / const UNINIT_INT_2: [u32; 3] = unsafe {
-LL | |
-LL | |
-LL | |     mem::transmute(
-...  |
-LL | |     )
-LL | | };
-   | |__^ constructing invalid value at [2]: encountered uninitialized bytes
+LL | const UNINIT_INT_2: [u32; 3] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at [2]: encountered uninitialized bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 12, align: 4) {
index 6c1a9d25f2307fbb5da3f5d571d6fc9617f2c657..d450a814cfa73880eea3f61245da0b525bb1cc59 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-nonnull.rs:12:1
    |
 LL | const NULL_PTR: NonNull<u8> = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -19,7 +19,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-nonnull.rs:23:1
    |
 LL | const NULL_U8: NonZeroU8 = unsafe { mem::transmute(0u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 1, align: 1) {
@@ -30,7 +30,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-nonnull.rs:25:1
    |
 LL | const NULL_USIZE: NonZeroUsize = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -41,7 +41,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-nonnull.rs:33:1
    |
 LL | const UNINIT: NonZeroU8 = unsafe { MaybeUninit { uninit: () }.init };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered uninitialized bytes, but expected initialized bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered uninitialized bytes, but expected initialized bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 1, align: 1) {
@@ -52,7 +52,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-nonnull.rs:41:1
    |
 LL | const BAD_RANGE1: RestrictedRange1 = unsafe { RestrictedRange1(42) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 42, but expected something in the range 10..=30
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 42, but expected something in the range 10..=30
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -63,7 +63,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-nonnull.rs:47:1
    |
 LL | const BAD_RANGE2: RestrictedRange2 = unsafe { RestrictedRange2(20) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 20, but expected something less or equal to 10, or greater or equal to 30
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 20, but expected something less or equal to 10, or greater or equal to 30
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
index f38274737376e9de4d8b5f5826884bf71a03cf90..ed0d91aabd33b53c890331e11b4db6a608e580d9 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-nonnull.rs:12:1
    |
 LL | const NULL_PTR: NonNull<u8> = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -19,7 +19,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-nonnull.rs:23:1
    |
 LL | const NULL_U8: NonZeroU8 = unsafe { mem::transmute(0u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 1, align: 1) {
@@ -30,7 +30,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-nonnull.rs:25:1
    |
 LL | const NULL_USIZE: NonZeroUsize = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -41,7 +41,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-nonnull.rs:33:1
    |
 LL | const UNINIT: NonZeroU8 = unsafe { MaybeUninit { uninit: () }.init };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered uninitialized bytes, but expected initialized bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered uninitialized bytes, but expected initialized bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 1, align: 1) {
@@ -52,7 +52,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-nonnull.rs:41:1
    |
 LL | const BAD_RANGE1: RestrictedRange1 = unsafe { RestrictedRange1(42) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 42, but expected something in the range 10..=30
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 42, but expected something in the range 10..=30
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -63,7 +63,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-nonnull.rs:47:1
    |
 LL | const BAD_RANGE2: RestrictedRange2 = unsafe { RestrictedRange2(20) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 20, but expected something less or equal to 10, or greater or equal to 30
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 20, but expected something less or equal to 10, or greater or equal to 30
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
index c9e101cb6e4623f6fa2d474c4395295b537c677a..b60e3337b444ae764913232b08bb7f135639e63f 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref-ptr.rs:13:1
    |
 LL | const UNALIGNED: &u16 = unsafe { mem::transmute(&[0u8; 4]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
+   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -13,7 +13,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref-ptr.rs:17:1
    |
 LL | const UNALIGNED_BOX: Box<u16> = unsafe { mem::transmute(&[0u8; 4]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned box (required 2 byte alignment but found 1)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned box (required 2 byte alignment but found 1)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -24,7 +24,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref-ptr.rs:21:1
    |
 LL | const NULL: &u16 = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null reference
+   | ^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null reference
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -35,7 +35,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref-ptr.rs:24:1
    |
 LL | const NULL_BOX: Box<u16> = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null box
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null box
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -46,7 +46,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-ref-ptr.rs:31:1
    |
 LL | const REF_AS_USIZE: usize = unsafe { mem::transmute(&0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -56,9 +56,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-ref-ptr.rs:35:39
    |
 LL | const REF_AS_USIZE_SLICE: &[usize] = &[unsafe { mem::transmute(&0) }];
-   | --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                                       |
-   |                                       unable to turn pointer into raw bytes
+   | ----------------------------------    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -67,9 +65,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-ref-ptr.rs:35:38
    |
 LL | const REF_AS_USIZE_SLICE: &[usize] = &[unsafe { mem::transmute(&0) }];
-   | -------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                                      |
-   |                                      referenced constant has errors
+   | ----------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -78,9 +74,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-ref-ptr.rs:41:86
    |
 LL | const REF_AS_USIZE_BOX_SLICE: Box<[usize]> = unsafe { mem::transmute::<&[usize], _>(&[mem::transmute(&0)]) };
-   | -------------------------------------------------------------------------------------^^^^^^^^^^^^^^^^^^^^----
-   |                                                                                      |
-   |                                                                                      unable to turn pointer into raw bytes
+   | ------------------------------------------                                           ^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -89,9 +83,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-ref-ptr.rs:41:85
    |
 LL | const REF_AS_USIZE_BOX_SLICE: Box<[usize]> = unsafe { mem::transmute::<&[usize], _>(&[mem::transmute(&0)]) };
-   | ------------------------------------------------------------------------------------^^^^^^^^^^^^^^^^^^^^^----
-   |                                                                                     |
-   |                                                                                     referenced constant has errors
+   | ------------------------------------------                                          ^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -100,7 +92,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref-ptr.rs:47:1
    |
 LL | const USIZE_AS_REF: &'static u8 = unsafe { mem::transmute(1337usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (address 0x539 is unallocated)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (address 0x539 is unallocated)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -111,7 +103,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref-ptr.rs:50:1
    |
 LL | const USIZE_AS_BOX: Box<u8> = unsafe { mem::transmute(1337usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling box (address 0x539 is unallocated)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling box (address 0x539 is unallocated)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -122,7 +114,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref-ptr.rs:53:1
    |
 LL | const UNINIT_PTR: *const i32 = unsafe { MaybeUninit { uninit: () }.init };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized raw pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized raw pointer
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -133,7 +125,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref-ptr.rs:56:1
    |
 LL | const NULL_FN_PTR: fn() = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null function pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null function pointer
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -144,7 +136,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref-ptr.rs:58:1
    |
 LL | const UNINIT_FN_PTR: fn() = unsafe { MaybeUninit { uninit: () }.init };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected a proper pointer or integer value
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected a proper pointer or integer value
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -155,7 +147,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref-ptr.rs:60:1
    |
 LL | const DANGLING_FN_PTR: fn() = unsafe { mem::transmute(13usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x0000000d, but expected a function pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x0000000d, but expected a function pointer
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -166,7 +158,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref-ptr.rs:62:1
    |
 LL | const DATA_FN_PTR: fn() = unsafe { mem::transmute(&13) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered pointer to alloc43, but expected a function pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered pointer to alloc43, but expected a function pointer
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -181,7 +173,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-ref-ptr.rs:31:1
    |
 LL | const REF_AS_USIZE: usize = unsafe { mem::transmute(&0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -192,9 +184,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-ref-ptr.rs:35:39
    |
 LL | const REF_AS_USIZE_SLICE: &[usize] = &[unsafe { mem::transmute(&0) }];
-   | --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                                       |
-   |                                       unable to turn pointer into raw bytes
+   | ----------------------------------    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -205,9 +195,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-ref-ptr.rs:35:38
    |
 LL | const REF_AS_USIZE_SLICE: &[usize] = &[unsafe { mem::transmute(&0) }];
-   | -------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                                      |
-   |                                      referenced constant has errors
+   | ----------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -218,9 +206,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-ref-ptr.rs:41:86
    |
 LL | const REF_AS_USIZE_BOX_SLICE: Box<[usize]> = unsafe { mem::transmute::<&[usize], _>(&[mem::transmute(&0)]) };
-   | -------------------------------------------------------------------------------------^^^^^^^^^^^^^^^^^^^^----
-   |                                                                                      |
-   |                                                                                      unable to turn pointer into raw bytes
+   | ------------------------------------------                                           ^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -231,9 +217,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-ref-ptr.rs:41:85
    |
 LL | const REF_AS_USIZE_BOX_SLICE: Box<[usize]> = unsafe { mem::transmute::<&[usize], _>(&[mem::transmute(&0)]) };
-   | ------------------------------------------------------------------------------------^^^^^^^^^^^^^^^^^^^^^----
-   |                                                                                     |
-   |                                                                                     referenced constant has errors
+   | ------------------------------------------                                          ^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index b3d9500333aa7201d402f19f91fb477513013012..505ef2dd7d782cd6e5a144978626cbe4278a39b2 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref-ptr.rs:13:1
    |
 LL | const UNALIGNED: &u16 = unsafe { mem::transmute(&[0u8; 4]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
+   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -13,7 +13,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref-ptr.rs:17:1
    |
 LL | const UNALIGNED_BOX: Box<u16> = unsafe { mem::transmute(&[0u8; 4]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned box (required 2 byte alignment but found 1)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned box (required 2 byte alignment but found 1)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -24,7 +24,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref-ptr.rs:21:1
    |
 LL | const NULL: &u16 = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null reference
+   | ^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null reference
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -35,7 +35,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref-ptr.rs:24:1
    |
 LL | const NULL_BOX: Box<u16> = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null box
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null box
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -46,7 +46,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-ref-ptr.rs:31:1
    |
 LL | const REF_AS_USIZE: usize = unsafe { mem::transmute(&0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -56,9 +56,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-ref-ptr.rs:35:39
    |
 LL | const REF_AS_USIZE_SLICE: &[usize] = &[unsafe { mem::transmute(&0) }];
-   | --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                                       |
-   |                                       unable to turn pointer into raw bytes
+   | ----------------------------------    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -67,9 +65,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-ref-ptr.rs:35:38
    |
 LL | const REF_AS_USIZE_SLICE: &[usize] = &[unsafe { mem::transmute(&0) }];
-   | -------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                                      |
-   |                                      referenced constant has errors
+   | ----------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -78,9 +74,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-ref-ptr.rs:41:86
    |
 LL | const REF_AS_USIZE_BOX_SLICE: Box<[usize]> = unsafe { mem::transmute::<&[usize], _>(&[mem::transmute(&0)]) };
-   | -------------------------------------------------------------------------------------^^^^^^^^^^^^^^^^^^^^----
-   |                                                                                      |
-   |                                                                                      unable to turn pointer into raw bytes
+   | ------------------------------------------                                           ^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -89,9 +83,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-ref-ptr.rs:41:85
    |
 LL | const REF_AS_USIZE_BOX_SLICE: Box<[usize]> = unsafe { mem::transmute::<&[usize], _>(&[mem::transmute(&0)]) };
-   | ------------------------------------------------------------------------------------^^^^^^^^^^^^^^^^^^^^^----
-   |                                                                                     |
-   |                                                                                     referenced constant has errors
+   | ------------------------------------------                                          ^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -100,7 +92,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref-ptr.rs:47:1
    |
 LL | const USIZE_AS_REF: &'static u8 = unsafe { mem::transmute(1337usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (address 0x539 is unallocated)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (address 0x539 is unallocated)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -111,7 +103,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref-ptr.rs:50:1
    |
 LL | const USIZE_AS_BOX: Box<u8> = unsafe { mem::transmute(1337usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling box (address 0x539 is unallocated)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling box (address 0x539 is unallocated)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -122,7 +114,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref-ptr.rs:53:1
    |
 LL | const UNINIT_PTR: *const i32 = unsafe { MaybeUninit { uninit: () }.init };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized raw pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized raw pointer
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -133,7 +125,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref-ptr.rs:56:1
    |
 LL | const NULL_FN_PTR: fn() = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null function pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null function pointer
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -144,7 +136,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref-ptr.rs:58:1
    |
 LL | const UNINIT_FN_PTR: fn() = unsafe { MaybeUninit { uninit: () }.init };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected a proper pointer or integer value
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected a proper pointer or integer value
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -155,7 +147,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref-ptr.rs:60:1
    |
 LL | const DANGLING_FN_PTR: fn() = unsafe { mem::transmute(13usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x000000000000000d, but expected a function pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x000000000000000d, but expected a function pointer
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -166,7 +158,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref-ptr.rs:62:1
    |
 LL | const DATA_FN_PTR: fn() = unsafe { mem::transmute(&13) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered pointer to alloc43, but expected a function pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered pointer to alloc43, but expected a function pointer
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -181,7 +173,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-ref-ptr.rs:31:1
    |
 LL | const REF_AS_USIZE: usize = unsafe { mem::transmute(&0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -192,9 +184,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-ref-ptr.rs:35:39
    |
 LL | const REF_AS_USIZE_SLICE: &[usize] = &[unsafe { mem::transmute(&0) }];
-   | --------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                                       |
-   |                                       unable to turn pointer into raw bytes
+   | ----------------------------------    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -205,9 +195,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-ref-ptr.rs:35:38
    |
 LL | const REF_AS_USIZE_SLICE: &[usize] = &[unsafe { mem::transmute(&0) }];
-   | -------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                                      |
-   |                                      referenced constant has errors
+   | ----------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -218,9 +206,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-ref-ptr.rs:41:86
    |
 LL | const REF_AS_USIZE_BOX_SLICE: Box<[usize]> = unsafe { mem::transmute::<&[usize], _>(&[mem::transmute(&0)]) };
-   | -------------------------------------------------------------------------------------^^^^^^^^^^^^^^^^^^^^----
-   |                                                                                      |
-   |                                                                                      unable to turn pointer into raw bytes
+   | ------------------------------------------                                           ^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -231,9 +217,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-ref-ptr.rs:41:85
    |
 LL | const REF_AS_USIZE_BOX_SLICE: Box<[usize]> = unsafe { mem::transmute::<&[usize], _>(&[mem::transmute(&0)]) };
-   | ------------------------------------------------------------------------------------^^^^^^^^^^^^^^^^^^^^^----
-   |                                                                                     |
-   |                                                                                     referenced constant has errors
+   | ------------------------------------------                                          ^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index 38c71c20fa52f5a654124ff9935990b486adaf79..7f0feb13004943d268208c8fb3ec52789dfd7db5 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-uninhabit.rs:15:1
    |
 LL | const BAD_BAD_BAD: Bar = unsafe { MaybeUninit { uninit: () }.init };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a value of uninhabited type Bar
+   | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a value of uninhabited type Bar
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 0, align: 1) {}
@@ -11,7 +11,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-uninhabit.rs:18:1
    |
 LL | const BAD_BAD_REF: &Bar = unsafe { mem::transmute(1usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to uninhabited type Bar
+   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to uninhabited type Bar
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -22,7 +22,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-uninhabit.rs:21:1
    |
 LL | const BAD_BAD_ARRAY: [Bar; 1] = unsafe { MaybeUninit { uninit: () }.init };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at [0]: encountered a value of uninhabited type Bar
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at [0]: encountered a value of uninhabited type Bar
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 0, align: 1) {}
index 7cfa888b1a1533afdb4de62cf848e41a54a3e664..4dcbbc2f5e41b879a840c29539fae2ab25b45565 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-uninhabit.rs:15:1
    |
 LL | const BAD_BAD_BAD: Bar = unsafe { MaybeUninit { uninit: () }.init };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a value of uninhabited type Bar
+   | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a value of uninhabited type Bar
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 0, align: 1) {}
@@ -11,7 +11,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-uninhabit.rs:18:1
    |
 LL | const BAD_BAD_REF: &Bar = unsafe { mem::transmute(1usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to uninhabited type Bar
+   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to uninhabited type Bar
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -22,7 +22,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-uninhabit.rs:21:1
    |
 LL | const BAD_BAD_ARRAY: [Bar; 1] = unsafe { MaybeUninit { uninit: () }.init };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at [0]: encountered a value of uninhabited type Bar
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at [0]: encountered a value of uninhabited type Bar
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 0, align: 1) {}
index d7de743afa91ddad94f6ca1f3b7b01c56cd6d78e..43f73f6ec7f2792a00bfe5fc06f74dbfda847947 100644 (file)
@@ -1,12 +1,8 @@
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-upvars.rs:6:1
    |
-LL | / const BAD_UPVAR: &dyn FnOnce() = &{
-LL | |     let bad_ref: &'static u16 = unsafe { mem::transmute(0usize) };
-LL | |     let another_var = 13;
-LL | |     move || { let _ = bad_ref; let _ = another_var; }
-LL | | };
-   | |__^ constructing invalid value at .<deref>.<dyn-downcast>.<captured-var(bad_ref)>: encountered a null reference
+LL | const BAD_UPVAR: &dyn FnOnce() = &{
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.<dyn-downcast>.<captured-var(bad_ref)>: encountered a null reference
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
index 6df58f6eaae3ba24a90a35dab3f15e685052b107..64185a063629733372ce4b842bbe1a9322ea7f37 100644 (file)
@@ -1,12 +1,8 @@
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-upvars.rs:6:1
    |
-LL | / const BAD_UPVAR: &dyn FnOnce() = &{
-LL | |     let bad_ref: &'static u16 = unsafe { mem::transmute(0usize) };
-LL | |     let another_var = 13;
-LL | |     move || { let _ = bad_ref; let _ = another_var; }
-LL | | };
-   | |__^ constructing invalid value at .<deref>.<dyn-downcast>.<captured-var(bad_ref)>: encountered a null reference
+LL | const BAD_UPVAR: &dyn FnOnce() = &{
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.<dyn-downcast>.<captured-var(bad_ref)>: encountered a null reference
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
index 25062a5a396876f249f5a9516b4a9debfa8a5239..74f21c7c34fc8bc98c93c106d5477ff2a325b17f 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:37:1
    |
 LL | const STR_TOO_LONG: &str = unsafe { mem::transmute((&42u8, 999usize)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -13,7 +13,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:39:1
    |
 LL | const NESTED_STR_MUCH_TOO_LONG: (&str,) = (unsafe { mem::transmute((&42, usize::MAX)) },);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered invalid reference metadata: slice is bigger than largest supported object
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered invalid reference metadata: slice is bigger than largest supported object
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -24,7 +24,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:42:1
    |
 LL | const STR_LENGTH_PTR: &str = unsafe { mem::transmute((&42u8, &3)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -34,7 +34,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:46:1
    |
 LL | const MY_STR_LENGTH_PTR: &MyStr = unsafe { mem::transmute((&42u8, &3)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -43,7 +43,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:49:1
    |
 LL | const MY_STR_MUCH_TOO_LONG: &MyStr = unsafe { mem::transmute((&42u8, usize::MAX)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -54,7 +54,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:53:1
    |
 LL | const STR_NO_INIT: &str = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit::<u8> { uninit: () }]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered uninitialized data in `str`
+   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered uninitialized data in `str`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -65,7 +65,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:56:1
    |
 LL | const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit::<u8> { uninit: () }]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered uninitialized data in `str`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered uninitialized data in `str`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -75,12 +75,8 @@ LL | const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[MaybeUni
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:63:1
    |
-LL | / const SLICE_LENGTH_UNINIT: &[u8] = unsafe {
-LL | |
-LL | |     let uninit_len = MaybeUninit::<usize> { uninit: () };
-LL | |     mem::transmute((42, uninit_len))
-LL | | };
-   | |__^ constructing invalid value: encountered uninitialized reference
+LL | const SLICE_LENGTH_UNINIT: &[u8] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized reference
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -91,7 +87,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:69:1
    |
 LL | const SLICE_TOO_LONG: &[u8] = unsafe { mem::transmute((&42u8, 999usize)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -102,7 +98,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:72:1
    |
 LL | const SLICE_TOO_LONG_OVERFLOW: &[u32] = unsafe { mem::transmute((&42u32, isize::MAX)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -113,7 +109,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:75:1
    |
 LL | const SLICE_LENGTH_PTR: &[u8] = unsafe { mem::transmute((&42u8, &3)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -122,7 +118,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:79:1
    |
 LL | const SLICE_TOO_LONG_BOX: Box<[u8]> = unsafe { mem::transmute((&42u8, 999usize)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling box (going beyond the bounds of its allocation)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling box (going beyond the bounds of its allocation)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -133,7 +129,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:82:1
    |
 LL | const SLICE_LENGTH_PTR_BOX: Box<[u8]> = unsafe { mem::transmute((&42u8, &3)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -142,7 +138,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:87:1
    |
 LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x03, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x03, but expected a boolean
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -153,9 +149,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:87:40
    |
 LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
-   | ---------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                                        |
-   |                                        referenced constant has errors
+   | ------------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -164,7 +158,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:95:1
    |
 LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3u8) }, [false]);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered 0x03, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered 0x03, but expected a boolean
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -175,9 +169,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:95:42
    |
 LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3u8) }, [false]);
-   | -----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                                          |
-   |                                          referenced constant has errors
+   | --------------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -186,7 +178,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:100:1
    |
 LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.1[0]: encountered 0x03, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.1[0]: encountered 0x03, but expected a boolean
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -197,9 +189,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:100:42
    |
 LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]);
-   | -----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                                          |
-   |                                          referenced constant has errors
+   | --------------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -207,12 +197,8 @@ LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::tran
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:109:1
    |
-LL | / const RAW_SLICE_LENGTH_UNINIT: *const [u8] = unsafe {
-LL | |
-LL | |     let uninit_len = MaybeUninit::<usize> { uninit: () };
-LL | |     mem::transmute((42, uninit_len))
-LL | | };
-   | |__^ constructing invalid value: encountered uninitialized raw pointer
+LL | const RAW_SLICE_LENGTH_UNINIT: *const [u8] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized raw pointer
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -223,7 +209,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:117:1
    |
 LL | const TRAIT_OBJ_SHORT_VTABLE_1: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u8))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered too small vtable
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered too small vtable
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -234,7 +220,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:120:1
    |
 LL | const TRAIT_OBJ_SHORT_VTABLE_2: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u64))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered too small vtable
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered too small vtable
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -245,7 +231,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:123:1
    |
 LL | const TRAIT_OBJ_INT_VTABLE: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, 4usize))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered dangling vtable pointer in wide pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered dangling vtable pointer in wide pointer
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -256,7 +242,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:125:1
    |
 LL | const TRAIT_OBJ_UNALIGNED_VTABLE: &dyn Trait = unsafe { mem::transmute((&92u8, &[0u8; 128])) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered unaligned vtable pointer in wide pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered unaligned vtable pointer in wide pointer
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -267,7 +253,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:127:1
    |
 LL | const TRAIT_OBJ_BAD_DROP_FN_NULL: &dyn Trait = unsafe { mem::transmute((&92u8, &[0usize; 8])) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid drop function pointer in vtable (not pointing to a function)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid drop function pointer in vtable (not pointing to a function)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -278,7 +264,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:129:1
    |
 LL | const TRAIT_OBJ_BAD_DROP_FN_INT: &dyn Trait = unsafe { mem::transmute((&92u8, &[1usize; 8])) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid drop function pointer in vtable (not pointing to a function)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid drop function pointer in vtable (not pointing to a function)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -289,7 +275,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:131:1
    |
 LL | const TRAIT_OBJ_BAD_DROP_FN_NOT_FN_PTR: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &[&42u8; 8]))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered invalid drop function pointer in vtable (not pointing to a function)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered invalid drop function pointer in vtable (not pointing to a function)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -300,7 +286,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:135:1
    |
 LL | const TRAIT_OBJ_CONTENT_INVALID: &dyn Trait = unsafe { mem::transmute::<_, &bool>(&3u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.<dyn-downcast>: encountered 0x03, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.<dyn-downcast>: encountered 0x03, but expected a boolean
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -311,7 +297,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:139:1
    |
 LL | const RAW_TRAIT_OBJ_VTABLE_NULL: *const dyn Trait = unsafe { mem::transmute((&92u8, 0usize)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered dangling vtable pointer in wide pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered dangling vtable pointer in wide pointer
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -322,7 +308,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:141:1
    |
 LL | const RAW_TRAIT_OBJ_VTABLE_INVALID: *const dyn Trait = unsafe { mem::transmute((&92u8, &3u64)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered too small vtable
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered too small vtable
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -349,7 +335,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:42:1
    |
 LL | const STR_LENGTH_PTR: &str = unsafe { mem::transmute((&42u8, &3)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -360,7 +346,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:46:1
    |
 LL | const MY_STR_LENGTH_PTR: &MyStr = unsafe { mem::transmute((&42u8, &3)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -371,7 +357,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:75:1
    |
 LL | const SLICE_LENGTH_PTR: &[u8] = unsafe { mem::transmute((&42u8, &3)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -382,7 +368,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:82:1
    |
 LL | const SLICE_LENGTH_PTR_BOX: Box<[u8]> = unsafe { mem::transmute((&42u8, &3)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -393,9 +379,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:87:40
    |
 LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
-   | ---------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                                        |
-   |                                        referenced constant has errors
+   | ------------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -406,9 +390,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:95:42
    |
 LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3u8) }, [false]);
-   | -----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                                          |
-   |                                          referenced constant has errors
+   | --------------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -419,9 +401,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:100:42
    |
 LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]);
-   | -----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                                          |
-   |                                          referenced constant has errors
+   | --------------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index e3a9214b1a59ee3676e13b35963569d0dde1cf34..1775b0dc2ed9097925a13688a42a14e3b5d09772 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:37:1
    |
 LL | const STR_TOO_LONG: &str = unsafe { mem::transmute((&42u8, 999usize)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -13,7 +13,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:39:1
    |
 LL | const NESTED_STR_MUCH_TOO_LONG: (&str,) = (unsafe { mem::transmute((&42, usize::MAX)) },);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered invalid reference metadata: slice is bigger than largest supported object
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered invalid reference metadata: slice is bigger than largest supported object
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -24,7 +24,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:42:1
    |
 LL | const STR_LENGTH_PTR: &str = unsafe { mem::transmute((&42u8, &3)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -34,7 +34,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:46:1
    |
 LL | const MY_STR_LENGTH_PTR: &MyStr = unsafe { mem::transmute((&42u8, &3)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -43,7 +43,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:49:1
    |
 LL | const MY_STR_MUCH_TOO_LONG: &MyStr = unsafe { mem::transmute((&42u8, usize::MAX)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -54,7 +54,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:53:1
    |
 LL | const STR_NO_INIT: &str = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit::<u8> { uninit: () }]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered uninitialized data in `str`
+   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered uninitialized data in `str`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -65,7 +65,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:56:1
    |
 LL | const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit::<u8> { uninit: () }]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered uninitialized data in `str`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered uninitialized data in `str`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -75,12 +75,8 @@ LL | const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[MaybeUni
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:63:1
    |
-LL | / const SLICE_LENGTH_UNINIT: &[u8] = unsafe {
-LL | |
-LL | |     let uninit_len = MaybeUninit::<usize> { uninit: () };
-LL | |     mem::transmute((42, uninit_len))
-LL | | };
-   | |__^ constructing invalid value: encountered uninitialized reference
+LL | const SLICE_LENGTH_UNINIT: &[u8] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized reference
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -91,7 +87,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:69:1
    |
 LL | const SLICE_TOO_LONG: &[u8] = unsafe { mem::transmute((&42u8, 999usize)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -102,7 +98,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:72:1
    |
 LL | const SLICE_TOO_LONG_OVERFLOW: &[u32] = unsafe { mem::transmute((&42u32, isize::MAX)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -113,7 +109,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:75:1
    |
 LL | const SLICE_LENGTH_PTR: &[u8] = unsafe { mem::transmute((&42u8, &3)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -122,7 +118,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:79:1
    |
 LL | const SLICE_TOO_LONG_BOX: Box<[u8]> = unsafe { mem::transmute((&42u8, 999usize)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling box (going beyond the bounds of its allocation)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling box (going beyond the bounds of its allocation)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -133,7 +129,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:82:1
    |
 LL | const SLICE_LENGTH_PTR_BOX: Box<[u8]> = unsafe { mem::transmute((&42u8, &3)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -142,7 +138,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:87:1
    |
 LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x03, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x03, but expected a boolean
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -153,9 +149,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:87:40
    |
 LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
-   | ---------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                                        |
-   |                                        referenced constant has errors
+   | ------------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -164,7 +158,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:95:1
    |
 LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3u8) }, [false]);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered 0x03, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered 0x03, but expected a boolean
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -175,9 +169,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:95:42
    |
 LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3u8) }, [false]);
-   | -----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                                          |
-   |                                          referenced constant has errors
+   | --------------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -186,7 +178,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:100:1
    |
 LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.1[0]: encountered 0x03, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.1[0]: encountered 0x03, but expected a boolean
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -197,9 +189,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:100:42
    |
 LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]);
-   | -----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                                          |
-   |                                          referenced constant has errors
+   | --------------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -207,12 +197,8 @@ LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::tran
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:109:1
    |
-LL | / const RAW_SLICE_LENGTH_UNINIT: *const [u8] = unsafe {
-LL | |
-LL | |     let uninit_len = MaybeUninit::<usize> { uninit: () };
-LL | |     mem::transmute((42, uninit_len))
-LL | | };
-   | |__^ constructing invalid value: encountered uninitialized raw pointer
+LL | const RAW_SLICE_LENGTH_UNINIT: *const [u8] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized raw pointer
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -223,7 +209,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:117:1
    |
 LL | const TRAIT_OBJ_SHORT_VTABLE_1: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u8))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered too small vtable
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered too small vtable
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -234,7 +220,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:120:1
    |
 LL | const TRAIT_OBJ_SHORT_VTABLE_2: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u64))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered too small vtable
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered too small vtable
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -245,7 +231,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:123:1
    |
 LL | const TRAIT_OBJ_INT_VTABLE: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, 4usize))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered dangling vtable pointer in wide pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered dangling vtable pointer in wide pointer
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -256,7 +242,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:125:1
    |
 LL | const TRAIT_OBJ_UNALIGNED_VTABLE: &dyn Trait = unsafe { mem::transmute((&92u8, &[0u8; 128])) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered unaligned vtable pointer in wide pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered unaligned vtable pointer in wide pointer
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -267,7 +253,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:127:1
    |
 LL | const TRAIT_OBJ_BAD_DROP_FN_NULL: &dyn Trait = unsafe { mem::transmute((&92u8, &[0usize; 8])) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid drop function pointer in vtable (not pointing to a function)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid drop function pointer in vtable (not pointing to a function)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -278,7 +264,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:129:1
    |
 LL | const TRAIT_OBJ_BAD_DROP_FN_INT: &dyn Trait = unsafe { mem::transmute((&92u8, &[1usize; 8])) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid drop function pointer in vtable (not pointing to a function)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid drop function pointer in vtable (not pointing to a function)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -289,7 +275,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:131:1
    |
 LL | const TRAIT_OBJ_BAD_DROP_FN_NOT_FN_PTR: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &[&42u8; 8]))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered invalid drop function pointer in vtable (not pointing to a function)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered invalid drop function pointer in vtable (not pointing to a function)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -300,7 +286,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:135:1
    |
 LL | const TRAIT_OBJ_CONTENT_INVALID: &dyn Trait = unsafe { mem::transmute::<_, &bool>(&3u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.<dyn-downcast>: encountered 0x03, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.<dyn-downcast>: encountered 0x03, but expected a boolean
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -311,7 +297,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:139:1
    |
 LL | const RAW_TRAIT_OBJ_VTABLE_NULL: *const dyn Trait = unsafe { mem::transmute((&92u8, 0usize)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered dangling vtable pointer in wide pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered dangling vtable pointer in wide pointer
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -322,7 +308,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:141:1
    |
 LL | const RAW_TRAIT_OBJ_VTABLE_INVALID: *const dyn Trait = unsafe { mem::transmute((&92u8, &3u64)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered too small vtable
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered too small vtable
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -349,7 +335,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:42:1
    |
 LL | const STR_LENGTH_PTR: &str = unsafe { mem::transmute((&42u8, &3)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -360,7 +346,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:46:1
    |
 LL | const MY_STR_LENGTH_PTR: &MyStr = unsafe { mem::transmute((&42u8, &3)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -371,7 +357,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:75:1
    |
 LL | const SLICE_LENGTH_PTR: &[u8] = unsafe { mem::transmute((&42u8, &3)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -382,7 +368,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:82:1
    |
 LL | const SLICE_LENGTH_PTR_BOX: Box<[u8]> = unsafe { mem::transmute((&42u8, &3)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -393,9 +379,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:87:40
    |
 LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
-   | ---------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                                        |
-   |                                        referenced constant has errors
+   | ------------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -406,9 +390,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:95:42
    |
 LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3u8) }, [false]);
-   | -----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                                          |
-   |                                          referenced constant has errors
+   | --------------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -419,9 +401,7 @@ error: any use of this value will cause an error
   --> $DIR/ub-wide-ptr.rs:100:42
    |
 LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]);
-   | -----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                                          |
-   |                                          referenced constant has errors
+   | --------------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index f962afadffb15b6e39bb1840dab32c5013eac5f7..c512e6825042ff1fe3f82f80dd346a6dec829672 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/union-const-eval-field.rs:28:5
    |
 LL |     const FIELD3: Field3 = unsafe { UNION.field3 };
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected initialized bytes
+   |     ^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected initialized bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
index 6f1fce3f980d68c2f149314089fef40c867532bc..21a54550900bb923d78d5be6a3c42d98e3dbfd78 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/union-ice.rs:14:1
    |
 LL | const FIELD3: Field3 = unsafe { UNION.field3 };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected initialized bytes
+   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected initialized bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -12,11 +12,8 @@ LL | const FIELD3: Field3 = unsafe { UNION.field3 };
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/union-ice.rs:16:1
    |
-LL | / const FIELD_PATH: Struct = Struct {
-LL | |     a: 42,
-LL | |     b: unsafe { UNION.field3 },
-LL | | };
-   | |__^ constructing invalid value at .b: encountered uninitialized bytes, but expected initialized bytes
+LL | const FIELD_PATH: Struct = Struct {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .b: encountered uninitialized bytes, but expected initialized bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -26,14 +23,8 @@ LL | | };
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/union-ice.rs:26:1
    |
-LL | / const FIELD_PATH2: Struct2 = Struct2 {
-LL | |     b: [
-LL | |         21,
-LL | |         unsafe { UNION.field3 },
-...  |
-LL | |     a: 42,
-LL | | };
-   | |__^ constructing invalid value at .b[1]: encountered uninitialized bytes
+LL | const FIELD_PATH2: Struct2 = Struct2 {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .b[1]: encountered uninitialized bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 40, align: 8) {
index c1b84ef330eb17ac1bcd5ec6234b9bfeb3af74b2..baf6825966007859f037b131cb09e494e79dadb5 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/union-ub.rs:33:1
    |
 LL | const BAD_BOOL: bool = unsafe { DummyUnion { u8: 42 }.bool};
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x2a, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x2a, but expected a boolean
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 1, align: 1) {
@@ -13,7 +13,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/union-ub.rs:35:1
    |
 LL | const UNINIT_BOOL: bool = unsafe { DummyUnion { unit: () }.bool};
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected a boolean
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 1, align: 1) {
index c1b84ef330eb17ac1bcd5ec6234b9bfeb3af74b2..baf6825966007859f037b131cb09e494e79dadb5 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/union-ub.rs:33:1
    |
 LL | const BAD_BOOL: bool = unsafe { DummyUnion { u8: 42 }.bool};
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x2a, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x2a, but expected a boolean
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 1, align: 1) {
@@ -13,7 +13,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/union-ub.rs:35:1
    |
 LL | const UNINIT_BOOL: bool = unsafe { DummyUnion { unit: () }.bool};
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected a boolean
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 1, align: 1) {
index bfc076aa5e64f1b6b48f940ab86753a275fe99a7..df5bd524f2727f02fc9c50082e55dec5b80245bc 100644 (file)
@@ -2,9 +2,7 @@ error: any use of this value will cause an error
   --> $DIR/unused-broken-const.rs:5:18
    |
 LL | const FOO: i32 = [][0];
-   | -----------------^^^^^-
-   |                  |
-   |                  index out of bounds: the length is 0 but the index is 0
+   | --------------   ^^^^^ index out of bounds: the length is 0 but the index is 0
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -17,9 +15,7 @@ error: any use of this value will cause an error
   --> $DIR/unused-broken-const.rs:5:18
    |
 LL | const FOO: i32 = [][0];
-   | -----------------^^^^^-
-   |                  |
-   |                  index out of bounds: the length is 0 but the index is 0
+   | --------------   ^^^^^ index out of bounds: the length is 0 but the index is 0
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index 22afc9779e859ab9fc2daf6d7496a02490455a29..bdaeb4a0fbee0b5d48a2be5d0fcb367f822de35c 100644 (file)
@@ -26,7 +26,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/validate_uninhabited_zsts.rs:23:1
    |
 LL | const BAR: [empty::Empty; 3] = [unsafe { std::mem::transmute(()) }; 3];
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at [0].0: encountered a value of uninhabited type empty::Void
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at [0].0: encountered a value of uninhabited type empty::Void
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 0, align: 1) {}
index 22afc9779e859ab9fc2daf6d7496a02490455a29..bdaeb4a0fbee0b5d48a2be5d0fcb367f822de35c 100644 (file)
@@ -26,7 +26,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/validate_uninhabited_zsts.rs:23:1
    |
 LL | const BAR: [empty::Empty; 3] = [unsafe { std::mem::transmute(()) }; 3];
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at [0].0: encountered a value of uninhabited type empty::Void
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at [0].0: encountered a value of uninhabited type empty::Void
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 0, align: 1) {}
index d822171df7234dc8f4fe1fdcc26276f64db0e40f..b77c6591d4975d4ea15d53333069d2a11025179e 100644 (file)
@@ -60,7 +60,7 @@ error: any use of this value will cause an error
   --> $DIR/const-float-bits-reject-conv.rs:30:34
    |
 LL |             const _: () = assert!($a);
-   |             --------------------------
+   |             -----------
 ...
 LL |     const_assert!(f32::from_bits(MASKED_NAN1).is_nan());
    |                                  ^^^^^^^^^^^ referenced constant has errors
@@ -73,7 +73,7 @@ error: any use of this value will cause an error
   --> $DIR/const-float-bits-reject-conv.rs:33:34
    |
 LL |             const _: () = assert!($a);
-   |             --------------------------
+   |             -----------
 ...
 LL |     const_assert!(f32::from_bits(MASKED_NAN1).is_nan());
    |                                  ^^^^^^^^^^^ referenced constant has errors
@@ -85,7 +85,7 @@ error: any use of this value will cause an error
   --> $DIR/const-float-bits-reject-conv.rs:41:38
    |
 LL |             const _: () = assert!($a == $b);
-   |             --------------------------------
+   |             -----------
 ...
 LL |         const_assert!(f32::from_bits(MASKED_NAN1).to_bits(), MASKED_NAN1);
    |                                      ^^^^^^^^^^^ referenced constant has errors
@@ -97,7 +97,7 @@ error: any use of this value will cause an error
   --> $DIR/const-float-bits-reject-conv.rs:44:38
    |
 LL |             const _: () = assert!($a == $b);
-   |             --------------------------------
+   |             -----------
 ...
 LL |         const_assert!(f32::from_bits(MASKED_NAN2).to_bits(), MASKED_NAN2);
    |                                      ^^^^^^^^^^^ referenced constant has errors
@@ -167,7 +167,7 @@ error: any use of this value will cause an error
   --> $DIR/const-float-bits-reject-conv.rs:57:34
    |
 LL |             const _: () = assert!($a);
-   |             --------------------------
+   |             -----------
 ...
 LL |     const_assert!(f64::from_bits(MASKED_NAN1).is_nan());
    |                                  ^^^^^^^^^^^ referenced constant has errors
@@ -179,7 +179,7 @@ error: any use of this value will cause an error
   --> $DIR/const-float-bits-reject-conv.rs:60:34
    |
 LL |             const _: () = assert!($a);
-   |             --------------------------
+   |             -----------
 ...
 LL |     const_assert!(f64::from_bits(MASKED_NAN1).is_nan());
    |                                  ^^^^^^^^^^^ referenced constant has errors
@@ -191,7 +191,7 @@ error: any use of this value will cause an error
   --> $DIR/const-float-bits-reject-conv.rs:66:38
    |
 LL |             const _: () = assert!($a == $b);
-   |             --------------------------------
+   |             -----------
 ...
 LL |         const_assert!(f64::from_bits(MASKED_NAN1).to_bits(), MASKED_NAN1);
    |                                      ^^^^^^^^^^^ referenced constant has errors
@@ -203,7 +203,7 @@ error: any use of this value will cause an error
   --> $DIR/const-float-bits-reject-conv.rs:69:38
    |
 LL |             const _: () = assert!($a == $b);
-   |             --------------------------------
+   |             -----------
 ...
 LL |         const_assert!(f64::from_bits(MASKED_NAN2).to_bits(), MASKED_NAN2);
    |                                      ^^^^^^^^^^^ referenced constant has errors
@@ -219,7 +219,7 @@ error: any use of this value will cause an error
   --> $DIR/const-float-bits-reject-conv.rs:30:34
    |
 LL |             const _: () = assert!($a);
-   |             --------------------------
+   |             -----------
 ...
 LL |     const_assert!(f32::from_bits(MASKED_NAN1).is_nan());
    |                                  ^^^^^^^^^^^ referenced constant has errors
@@ -233,7 +233,7 @@ error: any use of this value will cause an error
   --> $DIR/const-float-bits-reject-conv.rs:33:34
    |
 LL |             const _: () = assert!($a);
-   |             --------------------------
+   |             -----------
 ...
 LL |     const_assert!(f32::from_bits(MASKED_NAN1).is_nan());
    |                                  ^^^^^^^^^^^ referenced constant has errors
@@ -247,7 +247,7 @@ error: any use of this value will cause an error
   --> $DIR/const-float-bits-reject-conv.rs:41:38
    |
 LL |             const _: () = assert!($a == $b);
-   |             --------------------------------
+   |             -----------
 ...
 LL |         const_assert!(f32::from_bits(MASKED_NAN1).to_bits(), MASKED_NAN1);
    |                                      ^^^^^^^^^^^ referenced constant has errors
@@ -261,7 +261,7 @@ error: any use of this value will cause an error
   --> $DIR/const-float-bits-reject-conv.rs:44:38
    |
 LL |             const _: () = assert!($a == $b);
-   |             --------------------------------
+   |             -----------
 ...
 LL |         const_assert!(f32::from_bits(MASKED_NAN2).to_bits(), MASKED_NAN2);
    |                                      ^^^^^^^^^^^ referenced constant has errors
@@ -275,7 +275,7 @@ error: any use of this value will cause an error
   --> $DIR/const-float-bits-reject-conv.rs:57:34
    |
 LL |             const _: () = assert!($a);
-   |             --------------------------
+   |             -----------
 ...
 LL |     const_assert!(f64::from_bits(MASKED_NAN1).is_nan());
    |                                  ^^^^^^^^^^^ referenced constant has errors
@@ -289,7 +289,7 @@ error: any use of this value will cause an error
   --> $DIR/const-float-bits-reject-conv.rs:60:34
    |
 LL |             const _: () = assert!($a);
-   |             --------------------------
+   |             -----------
 ...
 LL |     const_assert!(f64::from_bits(MASKED_NAN1).is_nan());
    |                                  ^^^^^^^^^^^ referenced constant has errors
@@ -303,7 +303,7 @@ error: any use of this value will cause an error
   --> $DIR/const-float-bits-reject-conv.rs:66:38
    |
 LL |             const _: () = assert!($a == $b);
-   |             --------------------------------
+   |             -----------
 ...
 LL |         const_assert!(f64::from_bits(MASKED_NAN1).to_bits(), MASKED_NAN1);
    |                                      ^^^^^^^^^^^ referenced constant has errors
@@ -317,7 +317,7 @@ error: any use of this value will cause an error
   --> $DIR/const-float-bits-reject-conv.rs:69:38
    |
 LL |             const _: () = assert!($a == $b);
-   |             --------------------------------
+   |             -----------
 ...
 LL |         const_assert!(f64::from_bits(MASKED_NAN2).to_bits(), MASKED_NAN2);
    |                                      ^^^^^^^^^^^ referenced constant has errors
index 0c10783476abc6d666b0a4d15d4049e66913e8ee..d1bf4b92e6a506e4dc3033c7f71e0badeb64710a 100644 (file)
@@ -2,9 +2,7 @@ error: any use of this value will cause an error
   --> $DIR/const-len-underflow-separate-spans.rs:7:20
    |
 LL | const LEN: usize = ONE - TWO;
-   | -------------------^^^^^^^^^-
-   |                    |
-   |                    attempt to compute `1_usize - 2_usize`, which would overflow
+   | ----------------   ^^^^^^^^^ attempt to compute `1_usize - 2_usize`, which would overflow
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -24,9 +22,7 @@ error: any use of this value will cause an error
   --> $DIR/const-len-underflow-separate-spans.rs:7:20
    |
 LL | const LEN: usize = ONE - TWO;
-   | -------------------^^^^^^^^^-
-   |                    |
-   |                    attempt to compute `1_usize - 2_usize`, which would overflow
+   | ----------------   ^^^^^^^^^ attempt to compute `1_usize - 2_usize`, which would overflow
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index 9c1733e827d1963e9b5efe9850fb7c8f15f5e584..f2aec37a72922d1dab907fd7509fa8951387eac5 100644 (file)
@@ -14,7 +14,7 @@ error: encountered dangling pointer in final constant
   --> $DIR/mut_ref_in_final_dynamic_check.rs:25:1
    |
 LL | const B: Option<&mut i32> = helper2();
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
index 3e3bc1979a2e0e4c762965956d088172d0971318..a2b8f072c6ea7f43bb238b58fa7fabbf7ddeba35 100644 (file)
@@ -2,7 +2,7 @@ error[E0005]: refutable pattern in local binding: `0_u8..=1_u8` and `3_u8..=u8::
   --> $DIR/const-pattern-irrefutable.rs:12:9
    |
 LL | const a: u8 = 2;
-   | ---------------- constant defined here
+   | ----------- constant defined here
 ...
 LL |     let a = 4;
    |         ^
@@ -16,7 +16,7 @@ error[E0005]: refutable pattern in local binding: `0_u8..=1_u8` and `3_u8..=u8::
   --> $DIR/const-pattern-irrefutable.rs:13:9
    |
 LL |     pub const b: u8 = 2;
-   |     -------------------- constant defined here
+   |     --------------- constant defined here
 ...
 LL |     let c = 4;
    |         ^
@@ -30,7 +30,7 @@ error[E0005]: refutable pattern in local binding: `0_u8..=1_u8` and `3_u8..=u8::
   --> $DIR/const-pattern-irrefutable.rs:14:9
    |
 LL |     pub const d: u8 = 2;
-   |     -------------------- constant defined here
+   |     --------------- constant defined here
 ...
 LL |     let d = 4;
    |         ^
index db7d489ade7f2cc49e2c6889739a59a07306947d..97825dd0eb5170b9c5ef868d18176e901ca9b3fc 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/const-points-to-static.rs:6:1
    |
 LL | const TEST: &u8 = &MY_STATIC;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to a static variable
+   | ^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to a static variable
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
index de5e02ae58f7a70adce48fd4ff862549646df6e7..0d4a5a8ce4f332860ee62613fe442a7c01c5fae9 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/const-points-to-static.rs:6:1
    |
 LL | const TEST: &u8 = &MY_STATIC;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to a static variable
+   | ^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to a static variable
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
index a60cd16f05a18968aef3936f9be238a406fe2bf5..ea5ad24b0b1357871a5c7cee2940911f89b782c2 100644 (file)
@@ -2,9 +2,7 @@ error: any use of this value will cause an error
   --> $DIR/const-prop-read-static-in-const.rs:5:18
    |
 LL | const TEST: u8 = MY_STATIC;
-   | -----------------^^^^^^^^^-
-   |                  |
-   |                  constant accesses static
+   | --------------   ^^^^^^^^^ constant accesses static
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -25,9 +23,7 @@ error: any use of this value will cause an error
   --> $DIR/const-prop-read-static-in-const.rs:5:18
    |
 LL | const TEST: u8 = MY_STATIC;
-   | -----------------^^^^^^^^^-
-   |                  |
-   |                  constant accesses static
+   | --------------   ^^^^^^^^^ constant accesses static
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index c6e0b321124b1e52792a49f2c379fdd1bdf8b7c2..d19a89378eca1b34f459df43b047a7010eefe73f 100644 (file)
@@ -2,9 +2,7 @@ error: any use of this value will cause an error
   --> $DIR/const-size_of_val-align_of_val-extern-type.rs:11:31
    |
 LL | const _SIZE: usize = unsafe { size_of_val(&4 as *const i32 as *const Opaque) };
-   | ------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                               |
-   |                               `extern type` does not have known layout
+   | ------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `extern type` does not have known layout
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -14,9 +12,7 @@ error: any use of this value will cause an error
   --> $DIR/const-size_of_val-align_of_val-extern-type.rs:13:32
    |
 LL | const _ALIGN: usize = unsafe { min_align_of_val(&4 as *const i32 as *const Opaque) };
-   | -------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                |
-   |                                `extern type` does not have known layout
+   | -------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `extern type` does not have known layout
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -28,9 +24,7 @@ error: any use of this value will cause an error
   --> $DIR/const-size_of_val-align_of_val-extern-type.rs:11:31
    |
 LL | const _SIZE: usize = unsafe { size_of_val(&4 as *const i32 as *const Opaque) };
-   | ------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                               |
-   |                               `extern type` does not have known layout
+   | ------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `extern type` does not have known layout
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -41,9 +35,7 @@ error: any use of this value will cause an error
   --> $DIR/const-size_of_val-align_of_val-extern-type.rs:13:32
    |
 LL | const _ALIGN: usize = unsafe { min_align_of_val(&4 as *const i32 as *const Opaque) };
-   | -------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                                |
-   |                                `extern type` does not have known layout
+   | -------------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `extern type` does not have known layout
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index c9f949727bc633d62e863668b82067efc9b71fea..27c21e7af149b793b74d3089350638ec583d28ec 100644 (file)
@@ -2,9 +2,7 @@ error: any use of this value will cause an error
   --> $DIR/const-slice-oob.rs:4:18
    |
 LL | const BAR: u32 = FOO[5];
-   | -----------------^^^^^^-
-   |                  |
-   |                  index out of bounds: the length is 3 but the index is 5
+   | --------------   ^^^^^^ index out of bounds: the length is 3 but the index is 5
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -17,9 +15,7 @@ error: any use of this value will cause an error
   --> $DIR/const-slice-oob.rs:4:18
    |
 LL | const BAR: u32 = FOO[5];
-   | -----------------^^^^^^-
-   |                  |
-   |                  index out of bounds: the length is 3 but the index is 5
+   | --------------   ^^^^^^ index out of bounds: the length is 3 but the index is 5
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index ee95b0d518050a95a67d387329aaf70f2be3fceb..e450f4aa3bd518f7841902eabb247475f87a9298 100644 (file)
@@ -1,15 +1,11 @@
 error: any use of this value will cause an error
   --> $DIR/const_eval_limit_reached.rs:6:11
    |
-LL | / const X: usize = {
-LL | |     let mut x = 0;
-LL | |     while x != 1000 {
-   | |           ^^^^^^^^^ exceeded interpreter step limit (see `#[const_eval_limit]`)
-LL | |
-...  |
-LL | |     x
-LL | | };
-   | |__-
+LL | const X: usize = {
+   | --------------
+LL |     let mut x = 0;
+LL |     while x != 1000 {
+   |           ^^^^^^^^^ exceeded interpreter step limit (see `#[const_eval_limit]`)
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -21,15 +17,11 @@ Future incompatibility report: Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $DIR/const_eval_limit_reached.rs:6:11
    |
-LL | / const X: usize = {
-LL | |     let mut x = 0;
-LL | |     while x != 1000 {
-   | |           ^^^^^^^^^ exceeded interpreter step limit (see `#[const_eval_limit]`)
-LL | |
-...  |
-LL | |     x
-LL | | };
-   | |__-
+LL | const X: usize = {
+   | --------------
+LL |     let mut x = 0;
+LL |     while x != 1000 {
+   |           ^^^^^^^^^ exceeded interpreter step limit (see `#[const_eval_limit]`)
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index 24f57449872250a4434d1558b0eb214611030ae6..8410034c041daaed520371f865ae3871ba578469 100644 (file)
@@ -1,12 +1,8 @@
 error: encountered dangling pointer in final constant
   --> $DIR/dangling-alloc-id-ice.rs:9:1
    |
-LL | / const FOO: &() = {
-LL | |
-LL | |     let y = ();
-LL | |     unsafe { Foo { y: &y }.long_live_the_unit }
-LL | | };
-   | |__^
+LL | const FOO: &() = {
+   | ^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index a79ac62d5cdbdcce13ea7947f244036b8ab13317..bdfe1e4effe3ed4b5a8d3955f9404e3eed0c6e58 100644 (file)
@@ -1,11 +1,8 @@
 error: encountered dangling pointer in final constant
   --> $DIR/dangling_raw_ptr.rs:1:1
    |
-LL | / const FOO: *const u32 = {
-LL | |     let x = 42;
-LL | |     &x
-LL | | };
-   | |__^
+LL | const FOO: *const u32 = {
+   | ^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 9ac6c984cb0cdd8fedb3f9883455c20c40e68d65..4797d10b7a80c719b80a91bdf6dd7708c03553f3 100644 (file)
@@ -8,7 +8,7 @@ note: ...which requires const-evaluating + checking `A`...
   --> $DIR/issue-36163.rs:1:1
    |
 LL | const A: isize = Foo::B as isize;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^
    = note: ...which again requires const-evaluating + checking `Foo::B::{constant#0}`, completing the cycle
 note: cycle used when simplifying constant for the type system `Foo::B::{constant#0}`
   --> $DIR/issue-36163.rs:4:9
index 0d77083758269084e87a648b604764208162b9b6..755c7fb7d4d9f122d7a593da8d32c690fdfc00ce 100644 (file)
@@ -1,14 +1,8 @@
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/issue-63952.rs:17:1
    |
-LL | / const SLICE_WAY_TOO_LONG: &[u8] = unsafe {
-LL | |     SliceTransmute {
-LL | |         repr: SliceRepr {
-LL | |             ptr: &42,
-...  |
-LL | |     .slice
-LL | | };
-   | |__^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
+LL | const SLICE_WAY_TOO_LONG: &[u8] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
index 9b0f45920d600fc440c0633eb342ff5e20aa8f44..abdb9a4f7920d10dca4e0d3b248c0a87f636a4c5 100644 (file)
@@ -1,14 +1,8 @@
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/issue-63952.rs:17:1
    |
-LL | / const SLICE_WAY_TOO_LONG: &[u8] = unsafe {
-LL | |     SliceTransmute {
-LL | |         repr: SliceRepr {
-LL | |             ptr: &42,
-...  |
-LL | |     .slice
-LL | | };
-   | |__^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
+LL | const SLICE_WAY_TOO_LONG: &[u8] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
index 14c42d893c34ba4db3b82966759c81d80945ab6f..c7aba555370885a60024628fcb644178b4d83362 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/issue-79690.rs:30:1
    |
 LL | const G: Fat = unsafe { Transmute { t: FOO }.u };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .1.<deref>.size.foo: encountered (potentially part of) a pointer, but expected plain (non-pointer) bytes
+   | ^^^^^^^^^^^^ constructing invalid value at .1.<deref>.size.foo: encountered (potentially part of) a pointer, but expected plain (non-pointer) bytes
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
index fdd56bce9581ab8a19bbb357844fc7360cf6513d..c810c8a7848c7d17bff33c4bea80d372f49c13f5 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/issue-83182.rs:5:1
    |
 LL | const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[&()]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered a pointer in `str`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered a pointer in `str`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
index 284c1da3b3eddea15a4e350824e6cb2e90d7eb8f..5fc2c934474dc37f3c26d176056c838f632e868f 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/issue-83182.rs:5:1
    |
 LL | const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[&()]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered a pointer in `str`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered a pointer in `str`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
index e76a1f96b46a568919502c273ba523b431c0c19d..afcf11bd5f2479826fe774d35988eba465de8d23 100644 (file)
@@ -1,22 +1,18 @@
 error: any use of this value will cause an error
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
    |
-LL |           copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
-   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |           |
-   |           unable to turn pointer into raw bytes
-   |           inside `std::ptr::read::<u8>` at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
-   |           inside `ptr::const_ptr::<impl *const u8>::read` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
-   |           inside `C` at $DIR/issue-miri-1910.rs:7:5
+LL |         copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         |
+   |         unable to turn pointer into raw bytes
+   |         inside `std::ptr::read::<u8>` at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+   |         inside `ptr::const_ptr::<impl *const u8>::read` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
+   |         inside `C` at $DIR/issue-miri-1910.rs:7:5
    |
   ::: $DIR/issue-miri-1910.rs:4:1
    |
-LL | / const C: () = unsafe {
-LL | |     let foo = Some(&42 as *const i32);
-LL | |     let one_and_a_half_pointers = std::mem::size_of::<*const i32>()/2*3;
-LL | |     (&foo as *const _ as *const u8).add(one_and_a_half_pointers).read();
-LL | | };
-   | |__-
+LL | const C: () = unsafe {
+   | -----------
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -28,22 +24,18 @@ Future incompatibility report: Future breakage diagnostic:
 error: any use of this value will cause an error
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
    |
-LL |           copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
-   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |           |
-   |           unable to turn pointer into raw bytes
-   |           inside `std::ptr::read::<u8>` at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
-   |           inside `ptr::const_ptr::<impl *const u8>::read` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
-   |           inside `C` at $DIR/issue-miri-1910.rs:7:5
+LL |         copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         |
+   |         unable to turn pointer into raw bytes
+   |         inside `std::ptr::read::<u8>` at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+   |         inside `ptr::const_ptr::<impl *const u8>::read` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
+   |         inside `C` at $DIR/issue-miri-1910.rs:7:5
    |
   ::: $DIR/issue-miri-1910.rs:4:1
    |
-LL | / const C: () = unsafe {
-LL | |     let foo = Some(&42 as *const i32);
-LL | |     let one_and_a_half_pointers = std::mem::size_of::<*const i32>()/2*3;
-LL | |     (&foo as *const _ as *const u8).add(one_and_a_half_pointers).read();
-LL | | };
-   | |__-
+LL | const C: () = unsafe {
+   | -----------
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index 1765c9ed10a30725d4c6a00c64c4c54266269774..1f82ac827ad1d42173e3a3c1b4baf039041d6a3e 100644 (file)
@@ -30,7 +30,7 @@ LL | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
   ::: $DIR/assoc_const.rs:14:5
    |
 LL |     const F: u32 = (U::X, 42).1;
-   |     ----------------------------
+   |     ------------
    |
 note: the lint level is defined here
   --> $DIR/assoc_const.rs:4:10
index f7be42de03fd646e12651817842cc1f0ca525863..cbf02199f5bf5be85cfa2b2cfce7e5266c7eaad2 100644 (file)
@@ -12,9 +12,7 @@ warning: any use of this value will cause an error
   --> $DIR/assoc_const_2.rs:12:20
    |
 LL |     const F: u32 = 100 / U::X;
-   |     ---------------^^^^^^^^^^-
-   |                    |
-   |                    attempt to divide `100_u32` by zero
+   |     ------------   ^^^^^^^^^^ attempt to divide `100_u32` by zero
    |
 note: the lint level is defined here
   --> $DIR/assoc_const_2.rs:3:10
index 98d4dff648a5f1e52f9560cb95fcf8b6e1109b16..fa2088124b0bb18acf0d83489c8ae3df0b25320a 100644 (file)
@@ -51,12 +51,11 @@ Future incompatibility report: Future breakage diagnostic:
 warning: any use of this value will cause an error
   --> $DIR/const_refers_to_static.rs:13:5
    |
-LL | / const MUTATE_INTERIOR_MUT: usize = {
-LL | |     static FOO: AtomicUsize = AtomicUsize::new(0);
-LL | |     FOO.fetch_add(1, Ordering::Relaxed)
-   | |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling non-const function `AtomicUsize::fetch_add`
-LL | | };
-   | |__-
+LL | const MUTATE_INTERIOR_MUT: usize = {
+   | --------------------------------
+LL |     static FOO: AtomicUsize = AtomicUsize::new(0);
+LL |     FOO.fetch_add(1, Ordering::Relaxed)
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling non-const function `AtomicUsize::fetch_add`
    |
 note: the lint level is defined here
   --> $DIR/const_refers_to_static.rs:3:10
@@ -70,12 +69,11 @@ Future breakage diagnostic:
 warning: any use of this value will cause an error
   --> $DIR/const_refers_to_static.rs:18:14
    |
-LL | / const READ_INTERIOR_MUT: usize = {
-LL | |     static FOO: AtomicUsize = AtomicUsize::new(0);
-LL | |     unsafe { *(&FOO as *const _ as *const usize) }
-   | |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
-LL | | };
-   | |__-
+LL | const READ_INTERIOR_MUT: usize = {
+   | ------------------------------
+LL |     static FOO: AtomicUsize = AtomicUsize::new(0);
+LL |     unsafe { *(&FOO as *const _ as *const usize) }
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
    |
 note: the lint level is defined here
   --> $DIR/const_refers_to_static.rs:3:10
@@ -90,9 +88,7 @@ warning: any use of this value will cause an error
   --> $DIR/const_refers_to_static.rs:22:32
    |
 LL | const READ_MUT: u32 = unsafe { MUTABLE };
-   | -------------------------------^^^^^^^---
-   |                                |
-   |                                constant accesses static
+   | -------------------            ^^^^^^^ constant accesses static
    |
 note: the lint level is defined here
   --> $DIR/const_refers_to_static.rs:3:10
index 9eda2f60c8f2a5b0f8e6ee1df892d02b7793a9cb..b3ad81e49bc16af5742031127cf3f9bdd8493e9b 100644 (file)
@@ -1,12 +1,8 @@
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/const_refers_to_static2.rs:11:1
    |
-LL | / const REF_INTERIOR_MUT: &usize = {
-LL | |
-LL | |     static FOO: AtomicUsize = AtomicUsize::new(0);
-LL | |     unsafe { &*(&FOO as *const _ as *const usize) }
-LL | | };
-   | |__^ constructing invalid value: encountered a reference pointing to a static variable
+LL | const REF_INTERIOR_MUT: &usize = {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to a static variable
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -16,12 +12,8 @@ LL | | };
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/const_refers_to_static2.rs:18:1
    |
-LL | / const READ_IMMUT: &usize = {
-LL | |
-LL | |     static FOO: usize = 0;
-LL | |     &FOO
-LL | | };
-   | |__^ constructing invalid value: encountered a reference pointing to a static variable
+LL | const READ_IMMUT: &usize = {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to a static variable
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
index 7aa826dbb764b645df6a244d6a145447e632f88f..24bd0709282655887858f614ca58dc615230fcc6 100644 (file)
@@ -1,12 +1,8 @@
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/const_refers_to_static2.rs:11:1
    |
-LL | / const REF_INTERIOR_MUT: &usize = {
-LL | |
-LL | |     static FOO: AtomicUsize = AtomicUsize::new(0);
-LL | |     unsafe { &*(&FOO as *const _ as *const usize) }
-LL | | };
-   | |__^ constructing invalid value: encountered a reference pointing to a static variable
+LL | const REF_INTERIOR_MUT: &usize = {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to a static variable
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -16,12 +12,8 @@ LL | | };
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/const_refers_to_static2.rs:18:1
    |
-LL | / const READ_IMMUT: &usize = {
-LL | |
-LL | |     static FOO: usize = 0;
-LL | |     &FOO
-LL | | };
-   | |__^ constructing invalid value: encountered a reference pointing to a static variable
+LL | const READ_IMMUT: &usize = {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to a static variable
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
index b5d8872e633a5914bd8e59ced704acc815375c7f..20a96b57f29b94458e505a878063e0c2c1f34089 100644 (file)
@@ -1,11 +1,8 @@
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/const_refers_to_static_cross_crate.rs:12:1
    |
-LL | / const SLICE_MUT: &[u8; 1] = {
-LL | |
-LL | |     unsafe { &static_cross_crate::ZERO }
-LL | | };
-   | |__^ constructing invalid value: encountered a reference pointing to a static variable
+LL | const SLICE_MUT: &[u8; 1] = {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to a static variable
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -21,11 +18,8 @@ LL |         SLICE_MUT => true,
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/const_refers_to_static_cross_crate.rs:17:1
    |
-LL | / const U8_MUT: &u8 = {
-LL | |
-LL | |     unsafe { &static_cross_crate::ZERO[0] }
-LL | | };
-   | |__^ constructing invalid value: encountered a reference pointing to a static variable
+LL | const U8_MUT: &u8 = {
+   | ^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to a static variable
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -41,14 +35,10 @@ LL |         U8_MUT => true,
 warning: any use of this value will cause an error
   --> $DIR/const_refers_to_static_cross_crate.rs:25:15
    |
-LL | / const U8_MUT2: &u8 = {
-LL | |     unsafe { &(*static_cross_crate::ZERO_REF)[0] }
-   | |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
-LL | |
-LL | |
-LL | |
-LL | | };
-   | |__-
+LL | const U8_MUT2: &u8 = {
+   | ------------------
+LL |     unsafe { &(*static_cross_crate::ZERO_REF)[0] }
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
    |
 note: the lint level is defined here
   --> $DIR/const_refers_to_static_cross_crate.rs:23:8
@@ -67,14 +57,10 @@ LL |         U8_MUT2 => true,
 warning: any use of this value will cause an error
   --> $DIR/const_refers_to_static_cross_crate.rs:32:20
    |
-LL | / const U8_MUT3: &u8 = {
-LL | |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
-   | |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
-LL | |
-LL | |
-LL | |
-LL | | };
-   | |__-
+LL | const U8_MUT3: &u8 = {
+   | ------------------
+LL |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
+   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
    |
 note: the lint level is defined here
   --> $DIR/const_refers_to_static_cross_crate.rs:30:8
@@ -174,14 +160,10 @@ Future incompatibility report: Future breakage diagnostic:
 warning: any use of this value will cause an error
   --> $DIR/const_refers_to_static_cross_crate.rs:25:15
    |
-LL | / const U8_MUT2: &u8 = {
-LL | |     unsafe { &(*static_cross_crate::ZERO_REF)[0] }
-   | |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
-LL | |
-LL | |
-LL | |
-LL | | };
-   | |__-
+LL | const U8_MUT2: &u8 = {
+   | ------------------
+LL |     unsafe { &(*static_cross_crate::ZERO_REF)[0] }
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
    |
 note: the lint level is defined here
   --> $DIR/const_refers_to_static_cross_crate.rs:23:8
@@ -195,14 +177,10 @@ Future breakage diagnostic:
 warning: any use of this value will cause an error
   --> $DIR/const_refers_to_static_cross_crate.rs:32:20
    |
-LL | / const U8_MUT3: &u8 = {
-LL | |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
-   | |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
-LL | |
-LL | |
-LL | |
-LL | | };
-   | |__-
+LL | const U8_MUT3: &u8 = {
+   | ------------------
+LL |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
+   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
    |
 note: the lint level is defined here
   --> $DIR/const_refers_to_static_cross_crate.rs:30:8
index ec3eeb912b21e20bb8eab847a9328892ae5a8976..dfa0f76baa1865f2ac436c8fe8cae3fb23e23c07 100644 (file)
@@ -1,11 +1,8 @@
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/const_refers_to_static_cross_crate.rs:12:1
    |
-LL | / const SLICE_MUT: &[u8; 1] = {
-LL | |
-LL | |     unsafe { &static_cross_crate::ZERO }
-LL | | };
-   | |__^ constructing invalid value: encountered a reference pointing to a static variable
+LL | const SLICE_MUT: &[u8; 1] = {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to a static variable
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -21,11 +18,8 @@ LL |         SLICE_MUT => true,
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/const_refers_to_static_cross_crate.rs:17:1
    |
-LL | / const U8_MUT: &u8 = {
-LL | |
-LL | |     unsafe { &static_cross_crate::ZERO[0] }
-LL | | };
-   | |__^ constructing invalid value: encountered a reference pointing to a static variable
+LL | const U8_MUT: &u8 = {
+   | ^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to a static variable
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -41,14 +35,10 @@ LL |         U8_MUT => true,
 warning: any use of this value will cause an error
   --> $DIR/const_refers_to_static_cross_crate.rs:25:15
    |
-LL | / const U8_MUT2: &u8 = {
-LL | |     unsafe { &(*static_cross_crate::ZERO_REF)[0] }
-   | |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
-LL | |
-LL | |
-LL | |
-LL | | };
-   | |__-
+LL | const U8_MUT2: &u8 = {
+   | ------------------
+LL |     unsafe { &(*static_cross_crate::ZERO_REF)[0] }
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
    |
 note: the lint level is defined here
   --> $DIR/const_refers_to_static_cross_crate.rs:23:8
@@ -67,14 +57,10 @@ LL |         U8_MUT2 => true,
 warning: any use of this value will cause an error
   --> $DIR/const_refers_to_static_cross_crate.rs:32:20
    |
-LL | / const U8_MUT3: &u8 = {
-LL | |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
-   | |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
-LL | |
-LL | |
-LL | |
-LL | | };
-   | |__-
+LL | const U8_MUT3: &u8 = {
+   | ------------------
+LL |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
+   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
    |
 note: the lint level is defined here
   --> $DIR/const_refers_to_static_cross_crate.rs:30:8
@@ -174,14 +160,10 @@ Future incompatibility report: Future breakage diagnostic:
 warning: any use of this value will cause an error
   --> $DIR/const_refers_to_static_cross_crate.rs:25:15
    |
-LL | / const U8_MUT2: &u8 = {
-LL | |     unsafe { &(*static_cross_crate::ZERO_REF)[0] }
-   | |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
-LL | |
-LL | |
-LL | |
-LL | | };
-   | |__-
+LL | const U8_MUT2: &u8 = {
+   | ------------------
+LL |     unsafe { &(*static_cross_crate::ZERO_REF)[0] }
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
    |
 note: the lint level is defined here
   --> $DIR/const_refers_to_static_cross_crate.rs:23:8
@@ -195,14 +177,10 @@ Future breakage diagnostic:
 warning: any use of this value will cause an error
   --> $DIR/const_refers_to_static_cross_crate.rs:32:20
    |
-LL | / const U8_MUT3: &u8 = {
-LL | |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
-   | |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
-LL | |
-LL | |
-LL | |
-LL | | };
-   | |__-
+LL | const U8_MUT3: &u8 = {
+   | ------------------
+LL |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
+   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
    |
 note: the lint level is defined here
   --> $DIR/const_refers_to_static_cross_crate.rs:30:8
index 70ce8db482a3dd09cf4fd77e26acba01953140cf..bb8636f1225ad6e6ddaae1eeb4fd8911ca2f7170 100644 (file)
@@ -1,10 +1,8 @@
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/mutable_references_err.rs:17:1
    |
-LL | / const MUH: Meh = Meh {
-LL | |     x: &UnsafeCell::new(42),
-LL | | };
-   | |__^ constructing invalid value at .x.<deref>: encountered `UnsafeCell` in a `const`
+LL | const MUH: Meh = Meh {
+   | ^^^^^^^^^^^^^^ constructing invalid value at .x.<deref>: encountered `UnsafeCell` in a `const`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -15,7 +13,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/mutable_references_err.rs:27:1
    |
 LL | const SNEAKY: &dyn Sync = &Synced { x: UnsafeCell::new(42) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.<dyn-downcast>.x: encountered `UnsafeCell` in a `const`
+   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.<dyn-downcast>.x: encountered `UnsafeCell` in a `const`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -26,7 +24,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/mutable_references_err.rs:31:1
    |
 LL | const BLUNT: &mut i32 = &mut 42;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered mutable reference in a `const`
+   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered mutable reference in a `const`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
index 8ea00aace3daafc55954c8fda5ade465026c5392..f1652da922a57456c7a1f14ee78ad09a804a424c 100644 (file)
@@ -1,10 +1,8 @@
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/mutable_references_err.rs:17:1
    |
-LL | / const MUH: Meh = Meh {
-LL | |     x: &UnsafeCell::new(42),
-LL | | };
-   | |__^ constructing invalid value at .x.<deref>: encountered `UnsafeCell` in a `const`
+LL | const MUH: Meh = Meh {
+   | ^^^^^^^^^^^^^^ constructing invalid value at .x.<deref>: encountered `UnsafeCell` in a `const`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -15,7 +13,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/mutable_references_err.rs:27:1
    |
 LL | const SNEAKY: &dyn Sync = &Synced { x: UnsafeCell::new(42) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.<dyn-downcast>.x: encountered `UnsafeCell` in a `const`
+   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.<dyn-downcast>.x: encountered `UnsafeCell` in a `const`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -26,7 +24,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/mutable_references_err.rs:31:1
    |
 LL | const BLUNT: &mut i32 = &mut 42;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered mutable reference in a `const`
+   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered mutable reference in a `const`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
index b5b5a965295a720fe7b4d2dc826cc469146d4240..e145f6dd2ef58602d09855c2714800b8462b00b1 100644 (file)
@@ -2,7 +2,7 @@ error: untyped pointers are not allowed in constant
   --> $DIR/raw_mutable_const.rs:7:1
    |
 LL | const MUTABLE_BEHIND_RAW: *mut i32 = &UnsafeCell::new(42) as *const _ as *mut _;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: skipping const checks
    |
index 594576fe2cf3d8adf81353e0156787efaacc728d..69936ee6c13e88328fa9fda9b9cd8e77d63f3fff 100644 (file)
@@ -22,9 +22,7 @@ error: any use of this value will cause an error
   --> $DIR/ptr_comparisons.rs:65:27
    |
 LL | const _: usize = unsafe { std::mem::transmute::<*const usize, usize>(FOO) + 4 };
-   | --------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                           |
-   |                           unable to turn pointer into raw bytes
+   | --------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -34,9 +32,7 @@ error: any use of this value will cause an error
   --> $DIR/ptr_comparisons.rs:70:27
    |
 LL | const _: usize = unsafe { *std::mem::transmute::<&&usize, &usize>(&FOO) + 4 };
-   | --------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-------
-   |                           |
-   |                           unable to turn pointer into raw bytes
+   | --------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
@@ -49,9 +45,7 @@ error: any use of this value will cause an error
   --> $DIR/ptr_comparisons.rs:65:27
    |
 LL | const _: usize = unsafe { std::mem::transmute::<*const usize, usize>(FOO) + 4 };
-   | --------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
-   |                           |
-   |                           unable to turn pointer into raw bytes
+   | --------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -62,9 +56,7 @@ error: any use of this value will cause an error
   --> $DIR/ptr_comparisons.rs:70:27
    |
 LL | const _: usize = unsafe { *std::mem::transmute::<&&usize, &usize>(&FOO) + 4 };
-   | --------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-------
-   |                           |
-   |                           unable to turn pointer into raw bytes
+   | --------------            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index 974b1c3ff45b55c891d2af81e1d7007f39051846..0ebe1e95ca3efab5ebd13417e815bcc3aaa13234 100644 (file)
@@ -2,7 +2,7 @@ error: untyped pointers are not allowed in constant
   --> $DIR/raw-ptr-const.rs:7:1
    |
 LL | const CONST_RAW: *const Vec<i32> = &Vec::new() as *const _;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 104899f490012ba433ae6d65b6997781347f3b1b..d68960b0972138e956d2b2ec4cd258e4a9b840ec 100644 (file)
@@ -2,7 +2,7 @@ error[E0391]: cycle detected when const-evaluating + checking `FOO`
   --> $DIR/recursive-zst-static.rs:10:1
    |
 LL | static FOO: () = FOO;
-   | ^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^
    |
 note: ...which requires const-evaluating + checking `FOO`...
   --> $DIR/recursive-zst-static.rs:10:18
index 104899f490012ba433ae6d65b6997781347f3b1b..d68960b0972138e956d2b2ec4cd258e4a9b840ec 100644 (file)
@@ -2,7 +2,7 @@ error[E0391]: cycle detected when const-evaluating + checking `FOO`
   --> $DIR/recursive-zst-static.rs:10:1
    |
 LL | static FOO: () = FOO;
-   | ^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^
    |
 note: ...which requires const-evaluating + checking `FOO`...
   --> $DIR/recursive-zst-static.rs:10:18
index 8d1e10d4176fff4fcc392ba64dda72ce19bb0159..647ed1db20bdc62d900a36c8186c9bb994a35c41 100644 (file)
@@ -21,7 +21,7 @@ LL |     f(x);
    |     inside `X` at $DIR/recursive.rs:9:15
 ...
 LL | const X: () = f(1);
-   | -------------------
+   | -----------
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -42,7 +42,7 @@ LL |     f(x);
    |     inside `X` at $DIR/recursive.rs:9:15
 ...
 LL | const X: () = f(1);
-   | -------------------
+   | -----------
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index 33e574b170875a4435a21609c74f6c3111f502ac..79efcd3f62eedb951a1a7d239e1ed2172a687a45 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/alloc.rs:9:1
    |
 LL | const LAYOUT_INVALID_ZERO: Layout = unsafe { Layout::from_size_align_unchecked(0x1000, 0x00) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .align.0.<enum-tag>: encountered 0x00000000, but expected a valid enum tag
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .align.0.<enum-tag>: encountered 0x00000000, but expected a valid enum tag
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -13,7 +13,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/alloc.rs:13:1
    |
 LL | const LAYOUT_INVALID_THREE: Layout = unsafe { Layout::from_size_align_unchecked(9, 3) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .align.0.<enum-tag>: encountered 0x00000003, but expected a valid enum tag
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .align.0.<enum-tag>: encountered 0x00000003, but expected a valid enum tag
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
index 9556e30334d2e47aed86784e6a0cfeb49fff243d..cb477b72b312173d518b60aae687b2c764483a43 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/alloc.rs:9:1
    |
 LL | const LAYOUT_INVALID_ZERO: Layout = unsafe { Layout::from_size_align_unchecked(0x1000, 0x00) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .align.0.<enum-tag>: encountered 0x0000000000000000, but expected a valid enum tag
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .align.0.<enum-tag>: encountered 0x0000000000000000, but expected a valid enum tag
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -13,7 +13,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/alloc.rs:13:1
    |
 LL | const LAYOUT_INVALID_THREE: Layout = unsafe { Layout::from_size_align_unchecked(9, 3) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .align.0.<enum-tag>: encountered 0x0000000000000003, but expected a valid enum tag
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .align.0.<enum-tag>: encountered 0x0000000000000003, but expected a valid enum tag
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
index 355c326f0b6f12d6038f33c929e3ddc6f75df195..937fa7db0c8c08e6d18ea97474c9f97acb039d55 100644 (file)
@@ -2,25 +2,25 @@ error: encountered dangling pointer in final constant
   --> $DIR/cell.rs:6:1
    |
 LL | static FOO: Wrap<*mut u32> = Wrap(Cell::new(42).as_ptr());
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: encountered dangling pointer in final constant
   --> $DIR/cell.rs:8:1
    |
 LL | const FOO_CONST: Wrap<*mut u32> = Wrap(Cell::new(42).as_ptr());
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: encountered dangling pointer in final constant
   --> $DIR/cell.rs:22:1
    |
 LL | const FOO4_CONST: Wrap<*mut u32> = Wrap(FOO3_CONST.0.as_ptr());
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: encountered dangling pointer in final constant
   --> $DIR/cell.rs:27:1
    |
 LL | const FOO2: *mut u32 = Cell::new(42).as_ptr();
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 4 previous errors
 
index 17dd6131436c39b01fa590986b9ef134eaea96f0..d3177784789fcbb39890982df4dcbeca5acfe08c 100644 (file)
@@ -135,7 +135,7 @@ LL |     hint_unreachable()
    |     inside `<i32 as Const>::CONSTANT` at $DIR/uninhabited-const-issue-61744.rs:13:36
 ...
 LL |     const CONSTANT: i32 = unsafe { fake_type() };
-   |     ---------------------------------------------
+   |     -------------------
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -288,7 +288,7 @@ LL |     hint_unreachable()
    |     inside `<i32 as Const>::CONSTANT` at $DIR/uninhabited-const-issue-61744.rs:13:36
 ...
 LL |     const CONSTANT: i32 = unsafe { fake_type() };
-   |     ---------------------------------------------
+   |     -------------------
    |
    = note: `#[deny(const_err)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index fe36d9d2a28bd98269f591272f5e67fa79ff81be..a5dbc718145ca3254692f156e99d58843a29854f 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/validate_never_arrays.rs:4:1
    |
 LL | const _: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to uninhabited type [!; 1]
+   | ^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to uninhabited type [!; 1]
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 4, align: 4) {
@@ -13,7 +13,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/validate_never_arrays.rs:7:1
    |
 LL | const _: &[!] = unsafe { &*(1_usize as *const [!; 1]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
+   | ^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
@@ -24,7 +24,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/validate_never_arrays.rs:8:1
    |
 LL | const _: &[!] = unsafe { &*(1_usize as *const [!; 42]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
+   | ^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
index 9c545ac154642c86d98b2a2dd9ab7412dbf1f066..dac4e200a89deaa30680e65f144c2750676be117 100644 (file)
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/validate_never_arrays.rs:4:1
    |
 LL | const _: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to uninhabited type [!; 1]
+   | ^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to uninhabited type [!; 1]
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
@@ -13,7 +13,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/validate_never_arrays.rs:7:1
    |
 LL | const _: &[!] = unsafe { &*(1_usize as *const [!; 1]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
+   | ^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
@@ -24,7 +24,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/validate_never_arrays.rs:8:1
    |
 LL | const _: &[!] = unsafe { &*(1_usize as *const [!; 42]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
+   | ^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
index 8d5113cbfd9f5175551f20c96d9874cc97f808f2..395b2d42f97a3be7d73fcabc40fe17f57b15734d 100644 (file)
@@ -8,7 +8,7 @@ error[E0391]: cycle detected when const-evaluating + checking `C`
   --> $DIR/write-to-static-mut-in-static.rs:5:1
    |
 LL | pub static mut C: u32 = unsafe { C = 1; 0 };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^
    |
 note: ...which requires const-evaluating + checking `C`...
   --> $DIR/write-to-static-mut-in-static.rs:5:34
index 592cc0ae90f7ca5408a292cc00f3869b6d92bcef..55847aeec559f05012a5020eb97f9f1b20d166ce 100644 (file)
@@ -8,7 +8,7 @@ LL | struct Bar<T: Foo> {
    | doesn't satisfy `Bar<NotClone>: Clone`
 ...
 LL | struct NotClone;
-   | ---------------- doesn't satisfy `NotClone: Clone`
+   | --------------- doesn't satisfy `NotClone: Clone`
 ...
 LL |     Bar::<NotClone> { x: 1 }.clone();
    |                              ^^^^^ method cannot be called on `Bar<NotClone>` due to unsatisfied trait bounds
index 19d2425ff23f739020d4e2413e6b164a73cc956c..f655600b76004ffaedc9d6e30d6ad18ab3b4eb7b 100644 (file)
@@ -11,7 +11,7 @@ note: an implementation of `PartialEq<_>` might be missing for `Error`
   --> $DIR/derives-span-PartialEq-enum-struct-variant.rs:4:1
    |
 LL | struct Error;
-   | ^^^^^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^^^^^ must implement `PartialEq<_>`
    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider annotating `Error` with `#[derive(PartialEq)]`
    |
@@ -31,7 +31,7 @@ note: an implementation of `PartialEq<_>` might be missing for `Error`
   --> $DIR/derives-span-PartialEq-enum-struct-variant.rs:4:1
    |
 LL | struct Error;
-   | ^^^^^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^^^^^ must implement `PartialEq<_>`
    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider annotating `Error` with `#[derive(PartialEq)]`
    |
index 419832817ca18bb073ec0302f795dbb0ee4aa4ff..ce4b00bfbf574cd32ac377dee97d88c6d422ed50 100644 (file)
@@ -11,7 +11,7 @@ note: an implementation of `PartialEq<_>` might be missing for `Error`
   --> $DIR/derives-span-PartialEq-enum.rs:4:1
    |
 LL | struct Error;
-   | ^^^^^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^^^^^ must implement `PartialEq<_>`
    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider annotating `Error` with `#[derive(PartialEq)]`
    |
@@ -31,7 +31,7 @@ note: an implementation of `PartialEq<_>` might be missing for `Error`
   --> $DIR/derives-span-PartialEq-enum.rs:4:1
    |
 LL | struct Error;
-   | ^^^^^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^^^^^ must implement `PartialEq<_>`
    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider annotating `Error` with `#[derive(PartialEq)]`
    |
index 0000f882542ae15942c2a3c2420ad051b2763006..c5c8f255fb3dbf90e3fe2bc5b063bb117b1b2152 100644 (file)
@@ -11,7 +11,7 @@ note: an implementation of `PartialEq<_>` might be missing for `Error`
   --> $DIR/derives-span-PartialEq-struct.rs:4:1
    |
 LL | struct Error;
-   | ^^^^^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^^^^^ must implement `PartialEq<_>`
    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider annotating `Error` with `#[derive(PartialEq)]`
    |
@@ -31,7 +31,7 @@ note: an implementation of `PartialEq<_>` might be missing for `Error`
   --> $DIR/derives-span-PartialEq-struct.rs:4:1
    |
 LL | struct Error;
-   | ^^^^^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^^^^^ must implement `PartialEq<_>`
    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider annotating `Error` with `#[derive(PartialEq)]`
    |
index 07fa900a8c8295d2dad5fdd3b3bc397048e07bef..f5d609cb33fe6ba10fc82938b841f6da9752c0e5 100644 (file)
@@ -11,7 +11,7 @@ note: an implementation of `PartialEq<_>` might be missing for `Error`
   --> $DIR/derives-span-PartialEq-tuple-struct.rs:4:1
    |
 LL | struct Error;
-   | ^^^^^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^^^^^ must implement `PartialEq<_>`
    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider annotating `Error` with `#[derive(PartialEq)]`
    |
@@ -31,7 +31,7 @@ note: an implementation of `PartialEq<_>` might be missing for `Error`
   --> $DIR/derives-span-PartialEq-tuple-struct.rs:4:1
    |
 LL | struct Error;
-   | ^^^^^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^^^^^ must implement `PartialEq<_>`
    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider annotating `Error` with `#[derive(PartialEq)]`
    |
index bfb673f86f4183b327c530783f09379347c21262..f3ff95a85da1a3b314ed0a30af84a166a279f54f 100644 (file)
@@ -7,7 +7,7 @@ LL | #[derive(Eqr)]
   ::: $SRC_DIR/core/src/cmp.rs:LL:COL
    |
 LL | pub macro Eq($item:item) {
-   | ------------------------ similarly named derive macro `Eq` defined here
+   | ------------ similarly named derive macro `Eq` defined here
 
 error: cannot find derive macro `Eqr` in this scope
   --> $DIR/deriving-meta-unknown-trait.rs:1:10
@@ -18,7 +18,7 @@ LL | #[derive(Eqr)]
   ::: $SRC_DIR/core/src/cmp.rs:LL:COL
    |
 LL | pub macro Eq($item:item) {
-   | ------------------------ similarly named derive macro `Eq` defined here
+   | ------------ similarly named derive macro `Eq` defined here
 
 error: aborting due to 2 previous errors
 
index 451058cd0ee01b7be0c341ebfab35e309a173766..7875f07235661894e54733d292bd998365a47990 100644 (file)
@@ -11,7 +11,7 @@ note: an implementation of `PartialEq<_>` might be missing for `NoCloneOrEq`
   --> $DIR/deriving-no-inner-impl-error-message.rs:1:1
    |
 LL | struct NoCloneOrEq;
-   | ^^^^^^^^^^^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^^^^^^^^^^^ must implement `PartialEq<_>`
    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider annotating `NoCloneOrEq` with `#[derive(PartialEq)]`
    |
@@ -31,7 +31,7 @@ note: an implementation of `PartialEq<_>` might be missing for `NoCloneOrEq`
   --> $DIR/deriving-no-inner-impl-error-message.rs:1:1
    |
 LL | struct NoCloneOrEq;
-   | ^^^^^^^^^^^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^^^^^^^^^^^ must implement `PartialEq<_>`
    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider annotating `NoCloneOrEq` with `#[derive(PartialEq)]`
    |
index e479b539fec2d0accc5e7022b5c7844e879fbb02..5b4feaeb52a329cb3f00a1b335021b7f678e7a5b 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: the method `extend_from_slice` exists for mutable reference `&mut
   --> $DIR/issue-91492.rs:4:9
    |
 LL | pub struct NoDerives;
-   | --------------------- doesn't satisfy `NoDerives: Clone`
+   | -------------------- doesn't satisfy `NoDerives: Clone`
 LL | fn fun1(foo: &mut Vec<NoDerives>, bar: &[NoDerives]) {
 LL |     foo.extend_from_slice(bar);
    |         ^^^^^^^^^^^^^^^^^
@@ -18,7 +18,7 @@ error[E0599]: the method `extend_from_slice` exists for mutable reference `&mut
   --> $DIR/issue-91492.rs:12:9
    |
 LL | pub struct SomeDerives;
-   | ----------------------- doesn't satisfy `SomeDerives: Clone`
+   | ---------------------- doesn't satisfy `SomeDerives: Clone`
 LL | fn fun2(foo: &mut Vec<SomeDerives>, bar: &[SomeDerives]) {
 LL |     foo.extend_from_slice(bar);
    |         ^^^^^^^^^^^^^^^^^
@@ -34,7 +34,7 @@ error[E0599]: the method `use_clone` exists for struct `Object<NoDerives, SomeDe
   --> $DIR/issue-91492.rs:22:9
    |
 LL | pub struct NoDerives;
-   | --------------------- doesn't satisfy `NoDerives: Clone`
+   | -------------------- doesn't satisfy `NoDerives: Clone`
 ...
 LL | struct Object<T, A>(T, A);
    |        ------ method `use_clone` not found for this struct
index b1bec5432e3e16063618872511ae09c46f7f088e..3608052e2ffcfb5bdb9e0a14c38a95b92dc8d21b 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: the method `insert` exists for struct `HashSet<Value>`, but its tr
   --> $DIR/issue-91550.rs:8:8
    |
 LL | struct Value(u32);
-   | ------------------
+   | ------------
    | |
    | doesn't satisfy `Value: Eq`
    | doesn't satisfy `Value: Hash`
@@ -22,7 +22,7 @@ error[E0599]: the method `use_eq` exists for struct `Object<NoDerives>`, but its
   --> $DIR/issue-91550.rs:26:9
    |
 LL | pub struct NoDerives;
-   | --------------------- doesn't satisfy `NoDerives: Eq`
+   | -------------------- doesn't satisfy `NoDerives: Eq`
 LL |
 LL | struct Object<T>(T);
    |        ------ method `use_eq` not found for this struct
@@ -41,7 +41,7 @@ error[E0599]: the method `use_ord` exists for struct `Object<NoDerives>`, but it
   --> $DIR/issue-91550.rs:27:9
    |
 LL | pub struct NoDerives;
-   | --------------------- doesn't satisfy `NoDerives: Ord`
+   | -------------------- doesn't satisfy `NoDerives: Ord`
 LL |
 LL | struct Object<T>(T);
    |        ------ method `use_ord` not found for this struct
@@ -60,7 +60,7 @@ error[E0599]: the method `use_ord_and_partial_ord` exists for struct `Object<NoD
   --> $DIR/issue-91550.rs:28:9
    |
 LL | pub struct NoDerives;
-   | ---------------------
+   | --------------------
    | |
    | doesn't satisfy `NoDerives: Ord`
    | doesn't satisfy `NoDerives: PartialOrd`
index 3e2282743bfce636b0f45eac01402118f42d8a83..e45344aa51fc335c3db50d7d8b91bee8c2d7be90 100644 (file)
@@ -52,14 +52,8 @@ LL | struct S { x: u8, y: u8 }
 note: the following trait must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
    |
-LL | / pub trait AddAssign<Rhs = Self> {
-LL | |     /// Performs the `+=` operation.
-LL | |     ///
-LL | |     /// # Example
-...  |
-LL | |     fn add_assign(&mut self, rhs: Rhs);
-LL | | }
-   | |_^
+LL | pub trait AddAssign<Rhs = Self> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0067]: invalid left-hand side of assignment
   --> $DIR/note-unsupported.rs:17:22
index a4c77e08efe1996908742b9489997610cb76ec2b..473468af6eef8a6eacaf637d654786c5edf1dc9f 100644 (file)
@@ -15,7 +15,7 @@ error[E0308]: mismatched types
   --> $DIR/compatible-variants-in-pat.rs:21:9
    |
 LL | struct S;
-   | --------- unit struct defined here
+   | -------- unit struct defined here
 ...
 LL |     match s {
    |           - this expression has type `Option<S>`
@@ -40,7 +40,7 @@ error[E0308]: mismatched types
   --> $DIR/compatible-variants-in-pat.rs:32:9
    |
 LL | struct S;
-   | --------- unit struct defined here
+   | -------- unit struct defined here
 ...
 LL |     match s {
    |           - this expression has type `Result<S, S>`
index f267abc0bfa7989c07012fad855d747287123219..ec81c2ea646f83ef295b5d0c9f018807a4bb48eb 100644 (file)
@@ -1,21 +1,15 @@
 error[E0366]: `Drop` impls cannot be specialized
   --> $DIR/issue-38868.rs:5:1
    |
-LL | / impl Drop for List<i32> {
-LL | |     fn drop(&mut self) {
-LL | |         panic!()
-LL | |     }
-LL | | }
-   | |_^
+LL | impl Drop for List<i32> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `i32` is not a generic parameter
 note: use the same sequence of generic lifetime, type and const parameters as the struct definition
   --> $DIR/issue-38868.rs:1:1
    |
-LL | / pub struct List<T> {
-LL | |     head: T,
-LL | | }
-   | |_^
+LL | pub struct List<T> {
+   | ^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 7f50cf5ab15d27bfb6d1464da69161116d20a24f..ebd484b880001bc254c7f259a66fb8f76abbf597 100644 (file)
@@ -8,7 +8,7 @@ note: the implementor must specify the same requirement
   --> $DIR/reject-specialized-drops-8142.rs:4:1
    |
 LL | struct K<'l1,'l2> { x: &'l1 i8, y: &'l2 u8 }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^
 
 error[E0367]: `Drop` impl requires `'adds_bnd: 'al` but the struct it is implemented for does not
   --> $DIR/reject-specialized-drops-8142.rs:28:67
@@ -20,33 +20,33 @@ note: the implementor must specify the same requirement
   --> $DIR/reject-specialized-drops-8142.rs:5:1
    |
 LL | struct L<'l1,'l2> { x: &'l1 i8, y: &'l2 u8 }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^
 
 error[E0366]: `Drop` impls cannot be specialized
   --> $DIR/reject-specialized-drops-8142.rs:34:1
    |
 LL | impl                    Drop for N<'static>     { fn drop(&mut self) { } } // REJECT
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `'static` is not a generic parameter
 note: use the same sequence of generic lifetime, type and const parameters as the struct definition
   --> $DIR/reject-specialized-drops-8142.rs:7:1
    |
 LL | struct N<'n> { x: &'n i8 }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0366]: `Drop` impls cannot be specialized
   --> $DIR/reject-specialized-drops-8142.rs:39:1
    |
 LL | impl              Drop for P<i8>          { fn drop(&mut self) { } } // REJECT
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `i8` is not a generic parameter
 note: use the same sequence of generic lifetime, type and const parameters as the struct definition
   --> $DIR/reject-specialized-drops-8142.rs:9:1
    |
 LL | struct P<Tp> { x: *const Tp }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the struct it is implemented for does not
   --> $DIR/reject-specialized-drops-8142.rs:42:14
@@ -58,7 +58,7 @@ note: the implementor must specify the same requirement
   --> $DIR/reject-specialized-drops-8142.rs:10:1
    |
 LL | struct Q<Tq> { x: *const Tq }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0367]: `Drop` impl requires `AddsRBnd: 'rbnd` but the struct it is implemented for does not
   --> $DIR/reject-specialized-drops-8142.rs:45:21
@@ -70,59 +70,59 @@ note: the implementor must specify the same requirement
   --> $DIR/reject-specialized-drops-8142.rs:11:1
    |
 LL | struct R<Tr> { x: *const Tr }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0366]: `Drop` impls cannot be specialized
   --> $DIR/reject-specialized-drops-8142.rs:54:1
    |
 LL | impl<One>         Drop for V<One,One>     { fn drop(&mut self) { } } // REJECT
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `One` is mentioned multiple times
 note: use the same sequence of generic lifetime, type and const parameters as the struct definition
   --> $DIR/reject-specialized-drops-8142.rs:15:1
    |
 LL | struct V<Tva, Tvb> { x: *const Tva, y: *const Tvb }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^
 
 error[E0366]: `Drop` impls cannot be specialized
   --> $DIR/reject-specialized-drops-8142.rs:57:1
    |
 LL | impl<'lw>         Drop for W<'lw,'lw>     { fn drop(&mut self) { } } // REJECT
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `'lw` is mentioned multiple times
 note: use the same sequence of generic lifetime, type and const parameters as the struct definition
   --> $DIR/reject-specialized-drops-8142.rs:16:1
    |
 LL | struct W<'l1, 'l2> { x: &'l1 i8, y: &'l2 u8 }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^
 
 error[E0366]: `Drop` impls cannot be specialized
   --> $DIR/reject-specialized-drops-8142.rs:60:1
    |
 LL | impl              Drop for X<3>           { fn drop(&mut self) { } } // REJECT
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `3_usize` is not a generic parameter
 note: use the same sequence of generic lifetime, type and const parameters as the struct definition
   --> $DIR/reject-specialized-drops-8142.rs:17:1
    |
 LL | struct X<const Ca: usize>;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0366]: `Drop` impls cannot be specialized
   --> $DIR/reject-specialized-drops-8142.rs:63:1
    |
 LL | impl<const Ca: usize> Drop for Y<Ca, Ca>     { fn drop(&mut self) { } } // REJECT
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `Ca` is mentioned multiple times
 note: use the same sequence of generic lifetime, type and const parameters as the struct definition
   --> $DIR/reject-specialized-drops-8142.rs:18:1
    |
 LL | struct Y<const Ca: usize, const Cb: usize>;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the enum it is implemented for does not
   --> $DIR/reject-specialized-drops-8142.rs:66:14
@@ -134,7 +134,7 @@ note: the implementor must specify the same requirement
   --> $DIR/reject-specialized-drops-8142.rs:20:1
    |
 LL | enum Enum<T> { Variant(T) }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the struct it is implemented for does not
   --> $DIR/reject-specialized-drops-8142.rs:69:14
@@ -146,7 +146,7 @@ note: the implementor must specify the same requirement
   --> $DIR/reject-specialized-drops-8142.rs:21:1
    |
 LL | struct TupleStruct<T>(T);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^
 
 error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the union it is implemented for does not
   --> $DIR/reject-specialized-drops-8142.rs:72:21
@@ -158,7 +158,7 @@ note: the implementor must specify the same requirement
   --> $DIR/reject-specialized-drops-8142.rs:22:1
    |
 LL | union Union<T: Copy> { f: T }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 13 previous errors
 
index 5176684e15340a5a75262698ad3735e88aa52929..3d9685db683f64504c1d842eff7debb1bb9c475b 100644 (file)
@@ -7,10 +7,8 @@ LL |     T: 'static,
 note: the implementor must specify the same requirement
   --> $DIR/relate_lt_in_type_outlives_bound.rs:1:1
    |
-LL | / struct Wrapper<'a, T>(&'a T)
-LL | | where
-LL | |     T: 'a;
-   | |__________^
+LL | struct Wrapper<'a, T>(&'a T)
+   | ^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 8d5b7fb35bf0bfd4ce8fea43b14aa25f9d4a61eb..6692a63dce8f9a890d467873ca8ab99f57f96a8a 100644 (file)
@@ -2,7 +2,7 @@ error: symbol `fail` is already defined
   --> $DIR/dupe-symbols-6.rs:10:1
    |
 LL | static HELLO_TWICE: u16 = 0;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 48e5ea8ec866cd866e50db26dd788382f3fe9273..5fc0a916a09c1c8b3e2d620583758dcc836dd767 100644 (file)
@@ -10,7 +10,7 @@ LL |     let e1 = Empty1;
   ::: $DIR/auxiliary/empty-struct.rs:2:1
    |
 LL | pub struct XEmpty2;
-   | ------------------- similarly named unit struct `XEmpty2` defined here
+   | ------------------ similarly named unit struct `XEmpty2` defined here
    |
 help: use struct literal syntax instead
    |
@@ -33,7 +33,7 @@ LL |     let e1 = Empty1();
   ::: $DIR/auxiliary/empty-struct.rs:2:1
    |
 LL | pub struct XEmpty2;
-   | ------------------- similarly named unit struct `XEmpty2` defined here
+   | ------------------ similarly named unit struct `XEmpty2` defined here
    |
 help: use struct literal syntax instead
    |
@@ -73,7 +73,7 @@ LL |     let xe1 = XEmpty1;
 LL | pub struct XEmpty1 {}
    | ------------------ `XEmpty1` defined here
 LL | pub struct XEmpty2;
-   | ------------------- similarly named unit struct `XEmpty2` defined here
+   | ------------------ similarly named unit struct `XEmpty2` defined here
    |
 help: use struct literal syntax instead
    |
@@ -95,7 +95,7 @@ LL |     let xe1 = XEmpty1();
 LL | pub struct XEmpty1 {}
    | ------------------ `XEmpty1` defined here
 LL | pub struct XEmpty2;
-   | ------------------- similarly named unit struct `XEmpty2` defined here
+   | ------------------ similarly named unit struct `XEmpty2` defined here
    |
 help: use struct literal syntax instead
    |
index 28191615afda4849b7553debfddad2652ccd222c..7fb5cb2034a8313f32920ed7251ddd10c3da9f79 100644 (file)
@@ -10,7 +10,7 @@ LL |         Empty1() => ()
   ::: $DIR/auxiliary/empty-struct.rs:3:1
    |
 LL | pub struct XEmpty6();
-   | --------------------- similarly named tuple struct `XEmpty6` defined here
+   | ------------------ similarly named tuple struct `XEmpty6` defined here
    |
 help: use struct pattern syntax instead
    |
@@ -33,7 +33,7 @@ LL | pub struct XEmpty1 {}
    | ------------------ `XEmpty1` defined here
 LL | pub struct XEmpty2;
 LL | pub struct XEmpty6();
-   | --------------------- similarly named tuple struct `XEmpty6` defined here
+   | ------------------ similarly named tuple struct `XEmpty6` defined here
    |
 help: use struct pattern syntax instead
    |
@@ -56,7 +56,7 @@ LL |         Empty1(..) => ()
   ::: $DIR/auxiliary/empty-struct.rs:3:1
    |
 LL | pub struct XEmpty6();
-   | --------------------- similarly named tuple struct `XEmpty6` defined here
+   | ------------------ similarly named tuple struct `XEmpty6` defined here
    |
 help: use struct pattern syntax instead
    |
@@ -79,7 +79,7 @@ LL | pub struct XEmpty1 {}
    | ------------------ `XEmpty1` defined here
 LL | pub struct XEmpty2;
 LL | pub struct XEmpty6();
-   | --------------------- similarly named tuple struct `XEmpty6` defined here
+   | ------------------ similarly named tuple struct `XEmpty6` defined here
    |
 help: use struct pattern syntax instead
    |
index c15253ba9cd7882bdbf5084884d81751f2edb95d..cd51274dce81b9b6247d709bf834c599fe7474fb 100644 (file)
@@ -2,7 +2,7 @@ error[E0618]: expected function, found `Empty2`
   --> $DIR/empty-struct-unit-expr.rs:15:14
    |
 LL | struct Empty2;
-   | -------------- `Empty2` defined here
+   | ------------- `Empty2` defined here
 ...
 LL |     let e2 = Empty2();
    |              ^^^^^^--
index b1b253385fd34e8bbe0a465e8d8609ed10afde8a..acd1070d5d6f2665560afba81b0b0e0738fc42e5 100644 (file)
@@ -10,7 +10,7 @@ LL |         Empty2() => ()
   ::: $DIR/auxiliary/empty-struct.rs:3:1
    |
 LL | pub struct XEmpty6();
-   | --------------------- similarly named tuple struct `XEmpty6` defined here
+   | ------------------ similarly named tuple struct `XEmpty6` defined here
    |
 help: use this syntax instead
    |
@@ -30,9 +30,9 @@ LL |         XEmpty2() => ()
   ::: $DIR/auxiliary/empty-struct.rs:2:1
    |
 LL | pub struct XEmpty2;
-   | ------------------- `XEmpty2` defined here
+   | ------------------ `XEmpty2` defined here
 LL | pub struct XEmpty6();
-   | --------------------- similarly named tuple struct `XEmpty6` defined here
+   | ------------------ similarly named tuple struct `XEmpty6` defined here
    |
 help: use this syntax instead
    |
@@ -55,7 +55,7 @@ LL |         Empty2(..) => ()
   ::: $DIR/auxiliary/empty-struct.rs:3:1
    |
 LL | pub struct XEmpty6();
-   | --------------------- similarly named tuple struct `XEmpty6` defined here
+   | ------------------ similarly named tuple struct `XEmpty6` defined here
    |
 help: use this syntax instead
    |
@@ -75,9 +75,9 @@ LL |         XEmpty2(..) => ()
   ::: $DIR/auxiliary/empty-struct.rs:2:1
    |
 LL | pub struct XEmpty2;
-   | ------------------- `XEmpty2` defined here
+   | ------------------ `XEmpty2` defined here
 LL | pub struct XEmpty6();
-   | --------------------- similarly named tuple struct `XEmpty6` defined here
+   | ------------------ similarly named tuple struct `XEmpty6` defined here
    |
 help: use this syntax instead
    |
index d4519af540859078b7587ba20c30a2ea998e9610..6f5bb4309c350e77fb6160671bab8620e0eff6c7 100644 (file)
@@ -7,17 +7,14 @@ LL |     match x { }
 note: `Option<i32>` defined here
   --> $SRC_DIR/core/src/option.rs:LL:COL
    |
-LL | / pub enum Option<T> {
-LL | |     /// No value.
-LL | |     #[lang = "None"]
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-LL | |     None,
-   | |     ^^^^ not covered
-...  |
-LL | |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
-   | |     ^^^^ not covered
-LL | | }
-   | |_-
+LL | pub enum Option<T> {
+   | ------------------
+...
+LL |     None,
+   |     ^^^^ not covered
+...
+LL |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+   |     ^^^^ not covered
    = note: the matched value is of type `Option<i32>`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
index 55b1112b5f8ecb4e0f1993894fb6241c3f1f65e6..f01a77bd374b60dc06b10c9964980f965f37175e 100644 (file)
@@ -9,16 +9,11 @@ LL |     let Some(y) = x;
 note: `Option<i32>` defined here
   --> $SRC_DIR/core/src/option.rs:LL:COL
    |
-LL | / pub enum Option<T> {
-LL | |     /// No value.
-LL | |     #[lang = "None"]
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-LL | |     None,
-   | |     ^^^^ not covered
-...  |
-LL | |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
-LL | | }
-   | |_-
+LL | pub enum Option<T> {
+   | ------------------
+...
+LL |     None,
+   |     ^^^^ not covered
    = note: the matched value is of type `Option<i32>`
 help: you might want to use `if let` to ignore the variant that isn't matched
    |
index 7d959b6d148ed22a7b093c1548d33aee494e938b..830e4db345ac0e726634ee81109a61c4716cd8ee 100644 (file)
@@ -11,7 +11,7 @@ note: `const` item defined here
   --> $DIR/E0017.rs:2:1
    |
 LL | const C: i32 = 2;
-   | ^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0764]: mutable references are not allowed in the final value of constants
   --> $DIR/E0017.rs:5:30
@@ -52,7 +52,7 @@ note: `const` item defined here
   --> $DIR/E0017.rs:2:1
    |
 LL | const C: i32 = 2;
-   | ^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0764]: mutable references are not allowed in the final value of statics
   --> $DIR/E0017.rs:11:38
index d8b90d0691dadfc171cefc8d83f768016b302ea1..3f927726a030fd733813c252bdebcb28982ca0bf 100644 (file)
@@ -2,7 +2,7 @@ error[E0075]: SIMD vector cannot be empty
   --> $DIR/E0075.rs:4:1
    |
 LL | struct Bad;
-   | ^^^^^^^^^^^
+   | ^^^^^^^^^^
 
 error: aborting due to previous error
 
index 2c2842d152b5ea65508ceebcffc8f61cc7f05eea..7d4ff8798168633f88e58771bb3046b570488150 100644 (file)
@@ -2,7 +2,7 @@ error[E0076]: SIMD vector should be homogeneous
   --> $DIR/E0076.rs:4:1
    |
 LL | struct Bad(u16, u32, u32);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ SIMD elements must have the same type
+   | ^^^^^^^^^^ SIMD elements must have the same type
 
 error: aborting due to previous error
 
index 1938a9a272a16a6f9895521bef8a9497f47e6cbb..9a84b2ec4069f6252bf4b4d9a5d9baece4c2133f 100644 (file)
@@ -2,7 +2,7 @@ error[E0077]: SIMD vector element type should be a primitive scalar (integer/flo
   --> $DIR/E0077.rs:4:1
    |
 LL | struct Bad(String);
-   | ^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^
 
 error: aborting due to previous error
 
index 5cdfe1cc5562d408e166bd3aa8aa391564953f6f..29f7e4ad683d3a593142b7cdd79168e32ef8d66e 100644 (file)
@@ -2,7 +2,7 @@ error[E0152]: found duplicate lang item `owned_box`
   --> $DIR/E0152.rs:5:1
    |
 LL | struct Foo<T>(T);
-   | ^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^
    |
    = note: the lang item is first defined in crate `alloc` (which `std` depends on)
    = note: first definition in `alloc` loaded from SYSROOT/liballoc-*.rlib
index d69a14916e1981df8641c543679335bc0d7a8238..cf80c9c46ca2c07950872465c6184969c4a7af68 100644 (file)
@@ -2,7 +2,7 @@ error[E0191]: the value of the associated type `Bar` (from trait `Trait`) must b
   --> $DIR/E0191.rs:5:16
    |
 LL |     type Bar;
-   |     --------- `Bar` defined here
+   |     -------- `Bar` defined here
 ...
 LL | type Foo = dyn Trait;
    |                ^^^^^ help: specify the associated type: `Trait<Bar = Type>`
index af029603fa17a4988a67d221be9f85975dba85ba..94e06894144ca66019d123606dbd8b7261574590 100644 (file)
@@ -18,10 +18,10 @@ error[E0201]: duplicate definitions with name `Quux`:
   --> $DIR/E0201.rs:18:5
    |
 LL |     type Quux = u32;
-   |     ---------------- previous definition of `Quux` here
+   |     --------- previous definition of `Quux` here
 ...
 LL |     type Quux = u32;
-   |     ^^^^^^^^^^^^^^^^ duplicate definition
+   |     ^^^^^^^^^ duplicate definition
 
 error: aborting due to 3 previous errors
 
index 4fa83d8bf6e82d1b91daebe6f0db7ed82161d85d..11763ce788dacdc05e7f66bf4e868d0654efede1 100644 (file)
@@ -8,7 +8,7 @@ error[E0191]: the value of the associated type `Bar` (from trait `Trait`) must b
   --> $DIR/E0220.rs:5:16
    |
 LL |     type Bar;
-   |     --------- `Bar` defined here
+   |     -------- `Bar` defined here
 ...
 LL | type Foo = dyn Trait<F=i32>;
    |                ^^^^^^^^^^^^ help: specify the associated type: `Trait<F=i32, Bar = Type>`
index f3dbf122de3baa73ec1e4af724187343af15938c..5414d77ad7c5163b1f425cde32a2b6a700fd32a8 100644 (file)
@@ -2,10 +2,10 @@ error[E0221]: ambiguous associated type `A` in bounds of `Self`
   --> $DIR/E0221.rs:11:16
    |
 LL |     type A: T1;
-   |     ----------- ambiguous `A` from `Foo`
+   |     ---------- ambiguous `A` from `Foo`
 ...
 LL |     type A: T2;
-   |     ----------- ambiguous `A` from `Bar`
+   |     ---------- ambiguous `A` from `Bar`
 LL |     fn do_something() {
 LL |         let _: Self::A;
    |                ^^^^^^^ ambiguous associated type `A`
@@ -23,7 +23,7 @@ error[E0221]: ambiguous associated type `Err` in bounds of `Self`
   --> $DIR/E0221.rs:21:16
    |
 LL |     type Err: T3;
-   |     ------------- ambiguous `Err` from `My`
+   |     ------------ ambiguous `Err` from `My`
 LL |     fn test() {
 LL |         let _: Self::Err;
    |                ^^^^^^^^^ ambiguous associated type `Err`
index 403c0aa4146c74938f7ee6e05b58c2316c9c6a0f..e8e35a12cbb497200d482bd9d8d0d0313248c968 100644 (file)
@@ -2,7 +2,7 @@ error[E0264]: unknown external lang item: `cake`
   --> $DIR/E0264.rs:5:5
    |
 LL |     fn cake();
-   |     ^^^^^^^^^^
+   |     ^^^^^^^^^
 
 error: aborting due to previous error
 
index 95d95003c616f60e5cf0e5bfd46673aad2afa656..693b079238d71d47f0a53b6a9a6aeaad83ab2efb 100644 (file)
@@ -7,16 +7,11 @@ LL |     for Some(x) in xs {}
 note: `Option<i32>` defined here
   --> $SRC_DIR/core/src/option.rs:LL:COL
    |
-LL | / pub enum Option<T> {
-LL | |     /// No value.
-LL | |     #[lang = "None"]
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-LL | |     None,
-   | |     ^^^^ not covered
-...  |
-LL | |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
-LL | | }
-   | |_-
+LL | pub enum Option<T> {
+   | ------------------
+...
+LL |     None,
+   |     ^^^^ not covered
    = note: the matched value is of type `Option<i32>`
 
 error: aborting due to previous error
index 7ab0f82fc236089b654459c6abc827d68b009329..68e15e6f8fe81e765190c40272041bf171686943 100644 (file)
@@ -1,9 +1,8 @@
 error[E0374]: the trait `CoerceUnsized` may only be implemented for a coercion between structures with one field being coerced, none found
   --> $DIR/E0374.rs:8:1
    |
-LL | / impl<T, U> CoerceUnsized<Foo<U>> for Foo<T>
-LL | |     where T: CoerceUnsized<U> {}
-   | |________________________________^
+LL | impl<T, U> CoerceUnsized<Foo<U>> for Foo<T>
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 015448c39eaaac879d80570383f4512f401d1346..e91efb045c156ac7a9f3ed641460367f90c9f8be 100644 (file)
@@ -2,7 +2,7 @@ error[E0376]: the trait `CoerceUnsized` may only be implemented for a coercion b
   --> $DIR/E0376.rs:8:1
    |
 LL | impl<T, U> CoerceUnsized<U> for Foo<T> {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 4886a156d2ea597e9478e44815e1c6414c0b1b47..106efc19ac9cf5e297828f635c5449b33e665ecb 100644 (file)
@@ -11,7 +11,7 @@ note: `const` item defined here
   --> $DIR/E0388.rs:2:1
    |
 LL | const C: i32 = 2;
-   | ^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0764]: mutable references are not allowed in the final value of constants
   --> $DIR/E0388.rs:4:30
@@ -52,7 +52,7 @@ note: `const` item defined here
   --> $DIR/E0388.rs:2:1
    |
 LL | const C: i32 = 2;
-   | ^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0764]: mutable references are not allowed in the final value of statics
   --> $DIR/E0388.rs:10:38
index 8aadf5c8b47126a928f00f75307ddf6d671d71af..d9f70b729301645c683f4e5b711fc3d22696344a 100644 (file)
@@ -2,7 +2,7 @@ error[E0393]: the type parameter `T` must be explicitly specified
   --> $DIR/E0393.rs:3:47
    |
 LL | trait A<T=Self> {}
-   | ------------------ type parameter `T` must be specified for this
+   | --------------- type parameter `T` must be specified for this
 LL |
 LL | fn together_we_will_rule_the_galaxy(son: &dyn A) {}
    |                                               ^ help: set the type parameter to the desired type: `A<T>`
index 1a66e0a2f975800c51b0e825c52dff0ae3da9c20..23b7a335047672e35dff63271be333171b9fa246 100644 (file)
@@ -5,7 +5,7 @@ LL | trait Foo {
    | --------- `Foo` declared as private
 ...
 LL | pub trait Bar : Foo {}
-   | ^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
+   | ^^^^^^^^^^^^^^^^^^^ can't leak private trait
 
 error[E0445]: private trait `Foo` in public interface
   --> $DIR/E0445.rs:7:1
@@ -14,7 +14,7 @@ LL | trait Foo {
    | --------- `Foo` declared as private
 ...
 LL | pub struct Bar2<T: Foo>(pub T);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
+   | ^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
 
 error[E0445]: private trait `Foo` in public interface
   --> $DIR/E0445.rs:9:1
index 35e79e448d5acf1d672c82ed5eabb3df1a9955da..b6a195c40a93a12e6b7d5772887922b50a8d562d 100644 (file)
@@ -2,7 +2,7 @@ error[E0446]: private type `Bar` in public interface
   --> $DIR/E0446.rs:4:5
    |
 LL |     struct Bar(u32);
-   |     ---------------- `Bar` declared as private
+   |     ---------- `Bar` declared as private
 LL |
 LL |     pub fn bar() -> Bar {
    |     ^^^^^^^^^^^^^^^^^^^ can't leak private type
index be7b95465a5f7db77f87023d7ac35bfb8c8c8c06..65ebfcdbe32ca79853b093031dab165e404a6234 100644 (file)
@@ -11,13 +11,11 @@ LL | #![feature(specialization)]
 error[E0520]: `fly` specializes an item from a parent `impl`, but that item is not marked `default`
   --> $DIR/E0520.rs:17:5
    |
-LL | / impl<T: Clone> SpaceLlama for T {
-LL | |     fn fly(&self) {}
-LL | | }
-   | |_- parent `impl` is here
+LL | impl<T: Clone> SpaceLlama for T {
+   | ------------------------------- parent `impl` is here
 ...
-LL |       default fn fly(&self) {}
-   |       ^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `fly`
+LL |     default fn fly(&self) {}
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `fly`
    |
    = note: to specialize, `fly` in the parent `impl` must be marked `default`
 
index 81aa268cacc5cd62c11f9d082247d321361c3958..43122c13efba88cdca97cd3f0176bf6d082a20f7 100644 (file)
@@ -44,14 +44,8 @@ LL | enum Question {
 note: the following trait must be implemented
   --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
    |
-LL | / pub trait Not {
-LL | |     /// The resulting type after applying the `!` operator.
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-LL | |     type Output;
-...  |
-LL | |     fn not(self) -> Self::Output;
-LL | | }
-   | |_^
+LL | pub trait Not {
+   | ^^^^^^^^^^^^^
 
 error[E0604]: only `u8` can be cast as `char`, not `u32`
   --> $DIR/error-festival.rs:25:5
index cd3de227dcffe13b17f2afd74d5e053daf31654f..18dfddc46bd366b5042e7b25c3d2359a6b04c65d 100644 (file)
@@ -2,7 +2,7 @@ error: the `main` function cannot be declared in an `extern` block
   --> $DIR/extern-main-issue-86110.rs:4:5
    |
 LL |     fn main();
-   |     ^^^^^^^^^^
+   |     ^^^^^^^^^
 
 error: aborting due to previous error
 
index f69629232aed1123ac691d08159fea475431edd0..ca25aa64eb8be0454d435a49a6000b06c10bc26e 100644 (file)
@@ -2,9 +2,9 @@ error[E0308]: mismatched types
   --> $DIR/extern-types-distinct-types.rs:9:5
    |
 LL |     type A;
-   |     ------- the found foreign type
+   |     ------ the found foreign type
 LL |     type B;
-   |     ------- the expected foreign type
+   |     ------ the expected foreign type
 ...
 LL | fn foo(r: &A) -> &B {
    |                  -- expected `&B` because of return type
index 21180f31bbd26a11a59631f1f1966072ee34cbab..f8349391a0fe78bc586d5b442ab79029953182f0 100644 (file)
@@ -9,15 +9,11 @@ LL |     let Ok(_x) = foo();
 note: `Result<u32, !>` defined here
   --> $SRC_DIR/core/src/result.rs:LL:COL
    |
-LL | / pub enum Result<T, E> {
-LL | |     /// Contains the success value
-LL | |     #[lang = "Ok"]
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-...  |
-LL | |     Err(#[stable(feature = "rust1", since = "1.0.0")] E),
-   | |     ^^^ not covered
-LL | | }
-   | |_-
+LL | pub enum Result<T, E> {
+   | ---------------------
+...
+LL |     Err(#[stable(feature = "rust1", since = "1.0.0")] E),
+   |     ^^^ not covered
    = note: the matched value is of type `Result<u32, !>`
 help: you might want to use `if let` to ignore the variant that isn't matched
    |
index 68594bba48632bac76e779867e79291c93785b90..c7ebb9880f710a0734d39e69abc301ef2cce61da 100644 (file)
@@ -14,10 +14,10 @@ error[E0276]: impl has stricter requirements than trait
   --> $DIR/generic-associated-types-where.rs:22:5
    |
 LL |     type Assoc3<T>;
-   |     --------------- definition of `Assoc3` from trait
+   |     -------------- definition of `Assoc3` from trait
 ...
 LL |     type Assoc3<T> = Vec<T> where T: Iterator;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Iterator`
+   |     ^^^^^^^^^^^^^^ impl has extra requirement `T: Iterator`
 
 error: aborting due to 2 previous errors
 
index 3d90471e398e613f78684270075664dbb1942b50..6aa52b179a3c68a363f298faa24935db67f9bf8e 100644 (file)
@@ -2,25 +2,25 @@ error: `impl` associated type signature for `A` doesn't match `trait` associated
   --> $DIR/impl_bounds.rs:15:5
    |
 LL |     type A<'a> where Self: 'a;
-   |     -------------------------- expected
+   |     ---------- expected
 ...
 LL |     type A<'a> = (&'a ()) where Self: 'static;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found
+   |     ^^^^^^^^^^ found
 
 error: `impl` associated type signature for `B` doesn't match `trait` associated type signature
   --> $DIR/impl_bounds.rs:17:5
    |
 LL |     type B<'a, 'b> where 'a: 'b;
-   |     ---------------------------- expected
+   |     -------------- expected
 ...
 LL |     type B<'a, 'b> = (&'a(), &'b ()) where 'b: 'a;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found
+   |     ^^^^^^^^^^^^^^ found
 
 error[E0478]: lifetime bound not satisfied
   --> $DIR/impl_bounds.rs:17:22
    |
 LL |     type B<'a, 'b> where 'a: 'b;
-   |     ---------------------------- definition of `B` from trait
+   |     -------------- definition of `B` from trait
 ...
 LL |     type B<'a, 'b> = (&'a(), &'b ()) where 'b: 'a;
    |                      ^^^^^^^^^^^^^^^             - help: try copying this clause from the trait: `, 'a: 'b`
@@ -40,7 +40,7 @@ error[E0277]: the trait bound `T: Copy` is not satisfied
   --> $DIR/impl_bounds.rs:20:5
    |
 LL |     type C = String where Self: Copy;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `T`
+   |     ^^^^^^ the trait `Copy` is not implemented for `T`
    |
 note: required because of the requirements on the impl of `Copy` for `Fooy<T>`
   --> $DIR/impl_bounds.rs:11:10
@@ -54,7 +54,7 @@ LL | trait Foo {
    |       --- in this trait
 ...
 LL |     type C where Self: Clone;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ this trait associated type doesn't have the requirement `Fooy<T>: Copy`
+   |     ^^^^^^ this trait associated type doesn't have the requirement `Fooy<T>: Copy`
    = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider restricting type parameter `T`
    |
index 39beac38c0b6151951ff84594ff6a07f95b7b0d2..c560e2405d5a77c8d6b94d1860233642aafd783e 100644 (file)
@@ -2,10 +2,10 @@ error[E0276]: impl has stricter requirements than trait
   --> $DIR/issue-47206-where-clause.rs:12:5
    |
 LL |     type Assoc3<T>;
-   |     --------------- definition of `Assoc3` from trait
+   |     -------------- definition of `Assoc3` from trait
 ...
 LL |     type Assoc3<T> = Vec<T> where T: Iterator;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Iterator`
+   |     ^^^^^^^^^^^^^^ impl has extra requirement `T: Iterator`
 
 error: aborting due to previous error
 
index c4a7d8faa41195d04dc098512bd59e003c2c774e..d487f19ba74906d57f33c7e1a8476d7e013a9683 100644 (file)
@@ -45,7 +45,7 @@ note: ...does not necessarily outlive the static lifetime introduced by the comp
   --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:21:1
    |
 LL | impl C for Box<dyn A + 'static> {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: incompatible lifetime on type
   --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:37:18
index 51fe3360c7eb256195dc61d53dbc08a083a8e844..457c582e8c8d8c2288ce0b06e143020dda19d8cc 100644 (file)
@@ -2,7 +2,7 @@ error[E0477]: the type `&mut ()` does not fulfill the required lifetime
   --> $DIR/issue-90014.rs:14:20
    |
 LL |     type Fut<'a> where Self: 'a;
-   |     ---------------------------- definition of `Fut` from trait
+   |     ------------ definition of `Fut` from trait
 ...
 LL |     type Fut<'a> = impl Future<Output = ()>;
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^- help: try copying this clause from the trait: `where Self: 'a`
index ed700876e02dd97016a57e6befce474011ad5424..baf4889cc1dd52e8fa7183e63d667902699c5224 100644 (file)
@@ -1,14 +1,11 @@
 error[E0478]: lifetime bound not satisfied
   --> $DIR/issue-91883.rs:32:24
    |
-LL | /     type Cursor<'tx>: Cursor<'tx>
-LL | |     where
-LL | |         'db: 'tx,
-LL | |         Self: 'tx;
-   | |__________________- definition of `Cursor` from trait
+LL |     type Cursor<'tx>: Cursor<'tx>
+   |     ----------------------------- definition of `Cursor` from trait
 ...
-LL |       type Cursor<'tx> = CursorImpl<'tx>;
-   |                          ^^^^^^^^^^^^^^^- help: try copying these clauses from the trait: `where 'db: 'tx, Self: 'tx`
+LL |     type Cursor<'tx> = CursorImpl<'tx>;
+   |                        ^^^^^^^^^^^^^^^- help: try copying these clauses from the trait: `where 'db: 'tx, Self: 'tx`
    |
 note: lifetime parameter instantiated with the lifetime `'db` as defined here
   --> $DIR/issue-91883.rs:31:6
index 5b90199b8091f6cf94d7837dab99df1fcd910277..6dd901027d7bab249ae483c6934485626377b53b 100644 (file)
@@ -1,13 +1,11 @@
 error[E0477]: the type `&'s Texture` does not fulfill the required lifetime
   --> $DIR/issue-92033.rs:22:28
    |
-LL | /     type TextureIter<'a>: Iterator<Item = &'a Texture>
-LL | |     where
-LL | |         Self: 'a;
-   | |_________________- definition of `TextureIter` from trait
+LL |     type TextureIter<'a>: Iterator<Item = &'a Texture>
+   |     -------------------------------------------------- definition of `TextureIter` from trait
 ...
-LL |       type TextureIter<'a> = std::option::IntoIter<&'a Texture>;
-   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try copying this clause from the trait: `where Self: 'a`
+LL |     type TextureIter<'a> = std::option::IntoIter<&'a Texture>;
+   |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try copying this clause from the trait: `where Self: 'a`
    |
 note: type must outlive the lifetime `'a` as defined here
   --> $DIR/issue-92033.rs:22:22
index 1322914797b18b0b6b653643430ecf4baf8c31ec..2804364890f01371843dc0199ecd404a49ee5982 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: the method `f` exists for struct `S`, but its trait bounds were no
   --> $DIR/method-unsatified-assoc-type-predicate.rs:30:7
    |
 LL | struct S;
-   | ---------
+   | --------
    | |      |
    | |      method `f` not found for this struct
    | doesn't satisfy `<S as X>::Y<i32> = i32`
index 9e0896127a8a3e11aeb4ccc8007581c432cbf9f3..0256d2f20fc1e0d9d8ac50c8dbe0c9766c86e2af 100644 (file)
@@ -2,10 +2,10 @@ error: `impl` associated type signature for `Assoc` doesn't match `trait` associ
   --> $DIR/missing-where-clause-on-trait.rs:9:5
    |
 LL |     type Assoc<'a, 'b>;
-   |     ------------------- expected
+   |     ------------------ expected
 ...
 LL |     type Assoc<'a, 'b> = () where 'a: 'b;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found
+   |     ^^^^^^^^^^^^^^^^^^ found
 
 error: aborting due to previous error
 
index 44d775b695ee8d49b8c67ebd809e035c0620b398..2d14faf76775d67e6f33c86d10e85d88fd7a59bc 100644 (file)
@@ -18,7 +18,7 @@ LL |     WrongImpl::<()>::foo(0i32);
    |                      ^^^ function or associated item cannot be called on `SafeImpl<(), RawImpl<()>>` due to unsatisfied trait bounds
 ...
 LL | pub struct RawImpl<T>(PhantomData<T>);
-   | -------------------------------------- doesn't satisfy `RawImpl<()>: Raw<()>`
+   | --------------------- doesn't satisfy `RawImpl<()>: Raw<()>`
 ...
 LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
    |            -------- function or associated item `foo` not found for this struct
@@ -28,10 +28,8 @@ LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
 note: the following trait must be implemented
   --> $DIR/issue-62742.rs:12:1
    |
-LL | / pub trait Raw<T: ?Sized> {
-LL | |     type Value;
-LL | | }
-   | |_^
+LL | pub trait Raw<T: ?Sized> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0277]: the trait bound `RawImpl<()>: Raw<()>` is not satisfied
   --> $DIR/issue-62742.rs:6:5
index 383e13fd4b09d02a4aeb169c241312c9e42ce5dc..214be091ccece5510e4a21915758ca580af63712 100644 (file)
@@ -2,9 +2,8 @@ error[E0072]: recursive type `Take` has infinite size
   --> $DIR/infinite-struct.rs:1:1
    |
 LL | struct Take(Take);
-   | ^^^^^^^^^^^^----^^
-   | |           |
-   | |           recursive without indirection
+   | ^^^^^^^^^^^ ---- recursive without indirection
+   | |
    | recursive type has infinite size
    |
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Take` representable
@@ -16,7 +15,7 @@ error[E0391]: cycle detected when computing drop-check constraints for `Take`
   --> $DIR/infinite-struct.rs:1:1
    |
 LL | struct Take(Take);
-   | ^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^
    |
    = note: ...which immediately requires computing drop-check constraints for `Take` again
    = note: cycle used when computing dropck types for `Canonical { max_universe: U0, variables: [], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst }, value: Take } }`
index 5ecaedb3cb2cd6cc46d09c132b6d9cb3a6d45f7d..b925b3b018c0a6bae1876043577eff6d446e135f 100644 (file)
@@ -2,7 +2,7 @@ error[E0391]: cycle detected when computing the super predicates of `T1`
   --> $DIR/infinite-trait-alias-recursion.rs:3:1
    |
 LL | trait T1 = T2;
-   | ^^^^^^^^^^^^^^
+   | ^^^^^^^^
    |
 note: ...which requires computing the super traits of `T1`...
   --> $DIR/infinite-trait-alias-recursion.rs:3:12
@@ -13,7 +13,7 @@ note: ...which requires computing the super predicates of `T2`...
   --> $DIR/infinite-trait-alias-recursion.rs:6:1
    |
 LL | trait T2 = T3;
-   | ^^^^^^^^^^^^^^
+   | ^^^^^^^^
 note: ...which requires computing the super traits of `T2`...
   --> $DIR/infinite-trait-alias-recursion.rs:6:12
    |
@@ -23,7 +23,7 @@ note: ...which requires computing the super predicates of `T3`...
   --> $DIR/infinite-trait-alias-recursion.rs:8:1
    |
 LL | trait T3 = T1 + T3;
-   | ^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^
 note: ...which requires computing the super traits of `T3`...
   --> $DIR/infinite-trait-alias-recursion.rs:8:12
    |
index 6d62d4fd0711ddaa6e3042634bbbc18d9dbfd7b8..b5b32d2f0bd36e33a2b6ce40399a285148e77e46 100644 (file)
@@ -1,22 +1,16 @@
 error[E0378]: the trait `DispatchFromDyn` may only be implemented for structs containing the field being coerced, ZST fields with 1 byte alignment, and nothing else
   --> $DIR/invalid_dispatch_from_dyn_impls.rs:10:1
    |
-LL | / impl<T, U> DispatchFromDyn<WrapperWithExtraField<U>> for WrapperWithExtraField<T>
-LL | | where
-LL | |     T: DispatchFromDyn<U>,
-LL | | {}
-   | |__^
+LL | impl<T, U> DispatchFromDyn<WrapperWithExtraField<U>> for WrapperWithExtraField<T>
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: extra field `1` of type `i32` is not allowed
 
 error[E0378]: implementing the `DispatchFromDyn` trait requires multiple coercions
   --> $DIR/invalid_dispatch_from_dyn_impls.rs:21:1
    |
-LL | / impl<T: ?Sized, U: ?Sized> DispatchFromDyn<MultiplePointers<U>> for MultiplePointers<T>
-LL | | where
-LL | |     T: Unsize<U>,
-LL | | {}
-   | |__^
+LL | impl<T: ?Sized, U: ?Sized> DispatchFromDyn<MultiplePointers<U>> for MultiplePointers<T>
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: the trait `DispatchFromDyn` may only be implemented for a coercion between structures with a single field being coerced
    = note: currently, 2 fields need coercions: `ptr1` (`*const T` to `*const U`), `ptr2` (`*const T` to `*const U`)
@@ -25,25 +19,19 @@ error[E0378]: the trait `DispatchFromDyn` may only be implemented for a coercion
   --> $DIR/invalid_dispatch_from_dyn_impls.rs:31:1
    |
 LL | impl<T: ?Sized, U: ?Sized> DispatchFromDyn<NothingToCoerce<T>> for NothingToCoerce<U> {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0378]: structs implementing `DispatchFromDyn` may not have `#[repr(packed)]` or `#[repr(C)]`
   --> $DIR/invalid_dispatch_from_dyn_impls.rs:37:1
    |
-LL | / impl<T: ?Sized, U: ?Sized> DispatchFromDyn<HasReprC<U>> for HasReprC<T>
-LL | | where
-LL | |     T: Unsize<U>,
-LL | | {}
-   | |__^
+LL | impl<T: ?Sized, U: ?Sized> DispatchFromDyn<HasReprC<U>> for HasReprC<T>
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0378]: the trait `DispatchFromDyn` may only be implemented for structs containing the field being coerced, ZST fields with 1 byte alignment, and nothing else
   --> $DIR/invalid_dispatch_from_dyn_impls.rs:46:1
    |
-LL | / impl<T: ?Sized, U: ?Sized> DispatchFromDyn<OverAligned<U>> for OverAligned<T>
-LL | |     where
-LL | |         T: Unsize<U>,
-LL | | {}
-   | |__^
+LL | impl<T: ?Sized, U: ?Sized> DispatchFromDyn<OverAligned<U>> for OverAligned<T>
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: extra field `1` of type `OverAlignedZst` is not allowed
 
index fbfa6e1abb2dac01410cf59ab3981db34a2c98c6..a191afd7980c65865392a4367b064fea46a8cff4 100644 (file)
@@ -8,18 +8,12 @@ note: an implementation of `Not` might be missing for `BytePos`
   --> $DIR/issue-14091-2.rs:6:1
    |
 LL | pub struct BytePos(pub u32);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ must implement `Not`
+   | ^^^^^^^^^^^^^^^^^^ must implement `Not`
 note: the following trait must be implemented
   --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
    |
-LL | / pub trait Not {
-LL | |     /// The resulting type after applying the `!` operator.
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-LL | |     type Output;
-...  |
-LL | |     fn not(self) -> Self::Output;
-LL | | }
-   | |_^
+LL | pub trait Not {
+   | ^^^^^^^^^^^^^
    = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to previous error
index 45f854f93ecb92bb56ba2bed822a04240efb8ba1..ae3b7f334c65a7e1c95d61892c81e4c2b1a8e42f 100644 (file)
@@ -16,7 +16,7 @@ note: the type is defined here
   --> $DIR/issue-16250.rs:3:1
    |
 LL | pub struct Foo;
-   | ^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 84359803bbae7c7ceb0d4a0e78f20b218a4b2e53..5f6eae73e585043022fd4af08af8b4a291afe517 100644 (file)
@@ -8,7 +8,7 @@ note: the function `bar` is defined here
   --> $DIR/auxiliary/issue-16725.rs:2:5
    |
 LL |     fn bar();
-   |     ^^^^^^^^^
+   |     ^^^^^^^^
 
 error: aborting due to previous error
 
index 4856418ed600229d153ce311781e0b01196b158c..3a629e1ebf47206d4529257c81ccf4c42e69374c 100644 (file)
@@ -2,7 +2,7 @@ error[E0391]: cycle detected when const-evaluating + checking `FOO`
   --> $DIR/issue-17252.rs:1:1
    |
 LL | const FOO: usize = FOO;
-   | ^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^
    |
    = note: ...which immediately requires const-evaluating + checking `FOO` again
 note: cycle used when const-evaluating + checking `main::{constant#0}`
index d4595be749034b5a7d774299998500ad71422459..133a6360bf9a0b3ffc8f69c20cad9a84dc6da20c 100644 (file)
@@ -20,7 +20,7 @@ note: the constant `BAR` is defined here
   --> $DIR/auxiliary/issue-17718-const-privacy.rs:4:1
    |
 LL | const BAR: usize = 3;
-   | ^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
index f00356f602e93aa5e2e83dddd1eb4a6055fe6f0c..fb795febf795459f9eb10f34448835a64caf7ab2 100644 (file)
@@ -7,10 +7,8 @@ LL | impl<T> Drop for G<T> {
 note: the implementor must specify the same requirement
   --> $DIR/issue-17959.rs:7:1
    |
-LL | / struct G<T: ?Sized> {
-LL | |     _ptr: *const T
-LL | | }
-   | |_^
+LL | struct G<T: ?Sized> {
+   | ^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index dc476f5edc700f2314fb391d56b004704510190f..6ce78c45d6e5afa33748d2c6ae81af4b07190b41 100644 (file)
@@ -8,9 +8,7 @@ LL | / pub trait Public: Private<
 LL | |
 LL | |     <Self as Public>::P,
 LL | |     <Self as Public>::R
-...  |
-LL | |     fn call_inner(&self);
-LL | | }
+LL | | > {
    | |_^ can't leak private trait
 
 error: aborting due to previous error
index 42a5a01596905102a519df0f9fa525ef17a12135..d51cc1f081e2d32cd2784bb033e4abad362a8be1 100644 (file)
@@ -2,7 +2,7 @@ error[E0191]: the value of the associated type `A` (from trait `Foo`) must be sp
   --> $DIR/issue-19482.rs:10:16
    |
 LL |     type A;
-   |     ------- `A` defined here
+   |     ------ `A` defined here
 ...
 LL | fn bar(x: &dyn Foo) {}
    |                ^^^ help: specify the associated type: `Foo<A = Type>`
index 456aff05750dde31dbc18796826979ab0ef8247e..2d88ce5e51107a6eb61486d4f7f82162a57adf38 100644 (file)
@@ -2,7 +2,7 @@ error[E0618]: expected function, found `G`
   --> $DIR/issue-20714.rs:4:13
    |
 LL | struct G;
-   | --------- `G` defined here
+   | -------- `G` defined here
 ...
 LL |     let g = G();
    |             ^--
index c964dc41dceafece79bb65ab6295a9ce6bfd650d..22b9f5bd4cb9f0d8a544d07719894bd693605059 100644 (file)
@@ -1,19 +1,15 @@
 error[E0391]: cycle detected when computing the super traits of `T` with associated type name `Item`
   --> $DIR/issue-20772.rs:1:1
    |
-LL | / trait T : Iterator<Item=Self::Item>
-LL | |
-LL | | {}
-   | |__^
+LL | trait T : Iterator<Item=Self::Item>
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: ...which immediately requires computing the super traits of `T` with associated type name `Item` again
 note: cycle used when computing the super traits of `T`
   --> $DIR/issue-20772.rs:1:1
    |
-LL | / trait T : Iterator<Item=Self::Item>
-LL | |
-LL | | {}
-   | |__^
+LL | trait T : Iterator<Item=Self::Item>
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 0405ce551b0ab5db73097001fb0f075851e3c8a1..ada6f44319dec4089de15e49db649f540e06c9a6 100644 (file)
@@ -12,7 +12,7 @@ error[E0618]: expected function, found `Bar`
   --> $DIR/issue-21701.rs:9:13
    |
 LL | struct Bar;
-   | ----------- `Bar` defined here
+   | ---------- `Bar` defined here
 ...
 LL |     let f = Bar();
    |             ^^^--
index 93c2444f884de0bcea87ddbdd17c3e374f82c0e3..4909398bb848f6b6ce02b9597b7c806b1e46fca8 100644 (file)
@@ -1,13 +1,11 @@
 error[E0393]: the type parameter `Rhs` must be explicitly specified
   --> $DIR/issue-21950.rs:10:25
    |
-LL | / trait Add<Rhs=Self> {
-LL | |     type Output;
-LL | | }
-   | |_- type parameter `Rhs` must be specified for this
+LL | trait Add<Rhs=Self> {
+   | ------------------- type parameter `Rhs` must be specified for this
 ...
-LL |       let x = &10 as &dyn Add;
-   |                           ^^^ help: set the type parameter to the desired type: `Add<Rhs>`
+LL |     let x = &10 as &dyn Add;
+   |                         ^^^ help: set the type parameter to the desired type: `Add<Rhs>`
    |
    = note: because of the default `Self` reference, type parameters must be specified on object types
 
@@ -15,7 +13,7 @@ error[E0191]: the value of the associated type `Output` (from trait `Add`) must
   --> $DIR/issue-21950.rs:10:25
    |
 LL |     type Output;
-   |     ------------ `Output` defined here
+   |     ----------- `Output` defined here
 ...
 LL |     let x = &10 as &dyn Add;
    |                         ^^^ help: specify the associated type: `Add<Output = Type>`
index 4da346f56ab7607f2627e9a6f4ac9303f604c7df..cd27c4e4e4edfce4a6e7a01801dc5a727fdc935f 100644 (file)
@@ -2,7 +2,7 @@ error[E0393]: the type parameter `T` must be explicitly specified
   --> $DIR/issue-22370.rs:3:14
    |
 LL | trait A<T=Self> {}
-   | ------------------ type parameter `T` must be specified for this
+   | --------------- type parameter `T` must be specified for this
 LL |
 LL | fn f(a: &dyn A) {}
    |              ^ help: set the type parameter to the desired type: `A<T>`
index 79b9d85610bcecd0908b15094227647fe74a7d73..b97fa2503b8a8672552b9bd91aa4e16bd94a424e 100644 (file)
@@ -2,7 +2,7 @@ error[E0191]: the value of the associated type `A` (from trait `Foo`) must be sp
   --> $DIR/issue-22434.rs:5:23
    |
 LL |     type A;
-   |     ------- `A` defined here
+   |     ------ `A` defined here
 ...
 LL | type I<'a> = &'a (dyn Foo + 'a);
    |                       ^^^ help: specify the associated type: `Foo<A = Type>`
index 1a07d4a95bcfacca5b69d2f7d3467b211118b8ff..dcb99605da01236325c6502ddd02d5620d71c97e 100644 (file)
@@ -2,19 +2,19 @@ error[E0391]: cycle detected when const-evaluating + checking `A`
   --> $DIR/issue-23302-3.rs:1:1
    |
 LL | const A: i32 = B;
-   | ^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
    |
 note: ...which requires const-evaluating + checking `B`...
   --> $DIR/issue-23302-3.rs:3:1
    |
 LL | const B: i32 = A;
-   | ^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
    = note: ...which again requires const-evaluating + checking `A`, completing the cycle
 note: cycle used when simplifying constant for the type system `A`
   --> $DIR/issue-23302-3.rs:1:1
    |
 LL | const A: i32 = B;
-   | ^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 5c35250bc3f39e86454a4b4a3ed4f4c0749d39b1..e933745c44e87a09e9d73a8f7903d22fb86636eb 100644 (file)
@@ -9,7 +9,7 @@ note: deref defined here
   --> $DIR/issue-25901.rs:10:5
    |
 LL |     type Target = B;
-   |     ^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^
 note: impl defined here, but it is not `const`
   --> $DIR/issue-25901.rs:9:1
    |
index 4aec27f9684f995b699f5642efe61370a5c31f2c..c6e703f4876f8d640445d13918aff8eba4b2b750 100644 (file)
@@ -2,9 +2,8 @@ error[E0072]: recursive type `Pong` has infinite size
   --> $DIR/issue-2718-a.rs:8:5
    |
 LL |     pub struct Pong(SendPacket<Ping>);
-   |     ^^^^^^^^^^^^^^^^----------------^^
-   |     |               |
-   |     |               recursive without indirection
+   |     ^^^^^^^^^^^^^^^ ---------------- recursive without indirection
+   |     |
    |     recursive type has infinite size
    |
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Pong` representable
index ec15525ed0601ee8220ab6b08b9cf96e8f2b42ee..d9e7c3b16e76ebbe13455289ddc6e8ca5a82f82d 100644 (file)
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-33504.rs:7:13
    |
 LL | struct Test;
-   | ------------ unit struct defined here
+   | ----------- unit struct defined here
 ...
 LL |         let Test = 1;
    |             ^^^^   - this expression has type `{integer}`
index 319886f878384e7c6d30a215452680f11c282212..a66289a1cf8eb6b79d50ce92911b31f3c7b3ff2f 100644 (file)
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-35241.rs:3:20
    |
 LL | struct Foo(u32);
-   | ---------------- fn(u32) -> Foo {Foo} defined here
+   | ---------- fn(u32) -> Foo {Foo} defined here
 LL |
 LL | fn test() -> Foo { Foo }
    |              ---   ^^^ expected struct `Foo`, found fn item
index e9d229f74e8d4b524af35e14e50d305e4cf850f7..23090c1ed7866ce448e5f19427d7009be18f6d97 100644 (file)
@@ -14,7 +14,7 @@ note: the module `sys` is defined here
   --> $SRC_DIR/std/src/lib.rs:LL:COL
    |
 LL | mod sys;
-   | ^^^^^^^^
+   | ^^^^^^^
 
 error: aborting due to 2 previous errors
 
index 23d8ed1848f59202335f8d51c914f2357c47e719..531130fecab1ef1104a678c91f98a84e6fe2051e 100644 (file)
@@ -2,7 +2,7 @@ error[E0119]: conflicting implementations of trait `Trait1<std::boxed::Box<_>>`
   --> $DIR/issue-43355.rs:13:1
    |
 LL | impl<X, T> Trait1<X> for T where T: Trait2<X> {
-   | --------------------------------------------- first implementation here
+   | -------------------------- first implementation here
 ...
 LL | impl<X> Trait1<Box<X>> for A {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `A`
index a37b56489595dfffdb51eb371ab37e8bef108fac..512827b2dbdcd837c64644eeca99fcdb35097502 100644 (file)
@@ -2,7 +2,7 @@ error[E0618]: expected function, found `Foo`
   --> $DIR/issue-46771.rs:3:23
    |
 LL |     struct Foo;
-   |     ----------- `Foo` defined here
+   |     ---------- `Foo` defined here
 LL |     (1 .. 2).find(|_| Foo(0) == 0);
    |                       ^^^---
    |                       |
index 57ff7fe09e5b951ce4d5e24a167befd2e327f1c8..bbaca4ed28f5b8bc6f584a4c72e4731812210fef 100644 (file)
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-4968.rs:5:16
    |
 LL | const A: (isize,isize) = (4,2);
-   | ------------------------------- constant defined here
+   | ---------------------- constant defined here
 LL | fn main() {
 LL |     match 42 { A => () }
    |           --   ^
index cb5b397849c06334fd95724b85d41571ea078e79..2c2cd5c5244cf865d0f0b6e5401bc614acc4bc80 100644 (file)
@@ -8,7 +8,7 @@ error[E0046]: not all trait items implemented, missing: `MyA`
   --> $DIR/issue-69602-type-err-during-codegen-ice.rs:16:1
    |
 LL |     type MyA: TraitA;
-   |     ----------------- `MyA` from trait
+   |     ---------------- `MyA` from trait
 ...
 LL | impl TraitB for B {
    | ^^^^^^^^^^^^^^^^^ missing `MyA` in implementation
index 5a548378c2687c7c7e7d2220d1d02b6ecae66d67..4b8b979665cc347828143b992de93c5374820017 100644 (file)
@@ -1,19 +1,14 @@
 error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
   --> $DIR/issue-73112.rs:9:5
    |
-LL | /     struct SomeStruct {
-LL | |
-LL | |         page_table: PageTable,
-LL | |     }
-   | |_____^
+LL |     struct SomeStruct {
+   |     ^^^^^^^^^^^^^^^^^
    |
 note: `PageTable` has a `#[repr(align)]` attribute
   --> $DIR/auxiliary/issue-73112.rs:8:1
    |
-LL | / pub struct PageTable {
-LL | |     entries: [PageTableEntry; 512],
-LL | | }
-   | |_^
+LL | pub struct PageTable {
+   | ^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index fb8ed43674f28c11c30542fdafb79a0e852b80e1..13749804796b2c653d3df6bb5e00ef96793960e2 100644 (file)
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-76191.rs:13:9
    |
 LL | const RANGE: RangeInclusive<i32> = 0..=255;
-   | ------------------------------------------- constant defined here
+   | -------------------------------- constant defined here
 ...
 LL |     match n {
    |           - this expression has type `i32`
@@ -23,7 +23,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-76191.rs:15:9
    |
 LL | const RANGE2: RangeInclusive<i32> = panic!();
-   | --------------------------------------------- constant defined here
+   | --------------------------------- constant defined here
 ...
 LL |     match n {
    |           - this expression has type `i32`
index c986e47fb5589f3b71081ba9184d7153508c45f6..a55ac23e3ed9f4b8215bdccf7c62df54bbd87cda 100644 (file)
@@ -21,7 +21,7 @@ error[E0046]: not all trait items implemented, missing: `VAL`
   --> $DIR/issue-77919.rs:12:1
    |
 LL |     const VAL: T;
-   |     ------------- `VAL` from trait
+   |     ------------ `VAL` from trait
 ...
 LL | impl<N, M> TypeVal<usize> for Multiply<N, M> where N: TypeVal<VAL> {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `VAL` in implementation
index fd101b32b4c9c0c2e30c12fea48376c30de10de4..419652e13492f5c7fc179e8ffc9e77ec90f7ddfd 100644 (file)
@@ -18,9 +18,8 @@ error[E0072]: recursive type `Foo` has infinite size
   --> $DIR/keyword-self-as-type-param.rs:3:1
    |
 LL | struct Foo<Self>(Self);
-   | ^^^^^^^^^^^^^^^^^----^^
-   | |                |
-   | |                recursive without indirection
+   | ^^^^^^^^^^^^^^^^ ---- recursive without indirection
+   | |
    | recursive type has infinite size
    |
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable
index 7dbcc151855016fa5ab0545924ccb3693ee6385d..7ba9657fcd6f1b090ceaad3ed6ceb7178cd2a75b 100644 (file)
@@ -84,7 +84,7 @@ error: layout_of(E) = Layout {
   --> $DIR/debug.rs:6:1
    |
 LL | enum E { Foo, Bar(!, i32, i32) }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^
 
 error: layout_of(S) = Layout {
            fields: Arbitrary {
@@ -128,7 +128,7 @@ error: layout_of(S) = Layout {
   --> $DIR/debug.rs:9:1
    |
 LL | struct S { f1: i32, f2: (), f3: i32 }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^
 
 error: layout_of(U) = Layout {
            fields: Union(
@@ -150,7 +150,7 @@ error: layout_of(U) = Layout {
   --> $DIR/debug.rs:12:1
    |
 LL | union U { f1: (i32, i32), f3: i32 }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^
 
 error: layout_of(std::result::Result<i32, i32>) = Layout {
            fields: Arbitrary {
@@ -279,7 +279,7 @@ error: layout_of(std::result::Result<i32, i32>) = Layout {
   --> $DIR/debug.rs:15:1
    |
 LL | type Test = Result<i32, i32>;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^
 
 error: layout_of(i32) = Layout {
            fields: Primitive,
@@ -305,7 +305,7 @@ error: layout_of(i32) = Layout {
   --> $DIR/debug.rs:18:1
    |
 LL | type T = impl std::fmt::Debug;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^
 
 error: aborting due to 5 previous errors
 
index ba919df771fca096b73467a13a44f08b7f2fc5ca..f3123cb0ad22ee2f7b4f4bf0b54d14746cbb97be 100644 (file)
@@ -66,7 +66,7 @@ error: layout_of(A) = Layout {
   --> $DIR/hexagon-enum.rs:16:1
    |
 LL | enum A { Apple }
-   | ^^^^^^^^^^^^^^^^
+   | ^^^^^^
 
 error: layout_of(B) = Layout {
            fields: Arbitrary {
@@ -136,7 +136,7 @@ error: layout_of(B) = Layout {
   --> $DIR/hexagon-enum.rs:20:1
    |
 LL | enum B { Banana = 255, }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^
 
 error: layout_of(C) = Layout {
            fields: Arbitrary {
@@ -206,7 +206,7 @@ error: layout_of(C) = Layout {
   --> $DIR/hexagon-enum.rs:24:1
    |
 LL | enum C { Chaenomeles = 256, }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^
 
 error: layout_of(P) = Layout {
            fields: Arbitrary {
@@ -276,7 +276,7 @@ error: layout_of(P) = Layout {
   --> $DIR/hexagon-enum.rs:28:1
    |
 LL | enum P { Peach = 0x1000_0000isize, }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^
 
 error: layout_of(T) = Layout {
            fields: Arbitrary {
@@ -346,7 +346,7 @@ error: layout_of(T) = Layout {
   --> $DIR/hexagon-enum.rs:34:1
    |
 LL | enum T { Tangerine = TANGERINE as isize }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^
 
 error: aborting due to 5 previous errors
 
index 6c97a09b0c666bf9f0a37b4cc5365d3c5c686182..e19216a99dbe581e7b7063ab0660f928e692dc32 100644 (file)
@@ -2,13 +2,13 @@ error: homogeneous_aggregate: Ok(Homogeneous(Reg { kind: Float, size: Size(4 byt
   --> $DIR/homogeneous-aggr-zero-sized-c-struct.rs:22:1
    |
 LL | pub type TestMiddle = Middle;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^
 
 error: homogeneous_aggregate: Ok(Homogeneous(Reg { kind: Float, size: Size(4 bytes) }))
   --> $DIR/homogeneous-aggr-zero-sized-c-struct.rs:33:1
    |
 LL | pub type TestFinal = Final;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
index 322948ff7839978e7f59d5427e72cd36fed9d288..17d639da0240a2a67ed97c71c33beebb771cebdb 100644 (file)
@@ -2,31 +2,31 @@ error: homogeneous_aggregate: Ok(Homogeneous(Reg { kind: Float, size: Size(4 byt
   --> $DIR/homogeneous-aggr-zero-sized-repr-rust.rs:53:1
    |
 LL | pub type Test1 = BaseCase;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^
 
 error: homogeneous_aggregate: Ok(Homogeneous(Reg { kind: Float, size: Size(4 bytes) }))
   --> $DIR/homogeneous-aggr-zero-sized-repr-rust.rs:57:1
    |
 LL | pub type Test2 = WithPhantomData;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^
 
 error: homogeneous_aggregate: Ok(Homogeneous(Reg { kind: Float, size: Size(4 bytes) }))
   --> $DIR/homogeneous-aggr-zero-sized-repr-rust.rs:61:1
    |
 LL | pub type Test3 = WithEmptyRustStruct;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^
 
 error: homogeneous_aggregate: Ok(Homogeneous(Reg { kind: Float, size: Size(4 bytes) }))
   --> $DIR/homogeneous-aggr-zero-sized-repr-rust.rs:65:1
    |
 LL | pub type Test4 = WithTransitivelyEmptyRustStruct;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^
 
 error: homogeneous_aggregate: Ok(Homogeneous(Reg { kind: Float, size: Size(4 bytes) }))
   --> $DIR/homogeneous-aggr-zero-sized-repr-rust.rs:69:1
    |
 LL | pub type Test5 = WithEmptyRustEnum;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^
 
 error: aborting due to 5 previous errors
 
index 33dfa307c1d271a9ac819e53ebf5cd2967f60a4c..84d8bc799b93f3749d5aa030dddd3b9dfd761646 100644 (file)
@@ -105,11 +105,8 @@ error: layout_of(MissingPayloadField) = Layout {
        }
   --> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:16:1
    |
-LL | / pub enum MissingPayloadField {
-LL | |     Some(u8),
-LL | |     None
-LL | | }
-   | |_^
+LL | pub enum MissingPayloadField {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: layout_of(CommonPayloadField) = Layout {
            fields: Arbitrary {
@@ -237,11 +234,8 @@ error: layout_of(CommonPayloadField) = Layout {
        }
   --> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:25:1
    |
-LL | / pub enum CommonPayloadField {
-LL | |     A(u8),
-LL | |     B(u8),
-LL | | }
-   | |_^
+LL | pub enum CommonPayloadField {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: layout_of(CommonPayloadFieldIsMaybeUninit) = Layout {
            fields: Arbitrary {
@@ -366,11 +360,8 @@ error: layout_of(CommonPayloadFieldIsMaybeUninit) = Layout {
        }
   --> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:33:1
    |
-LL | / pub enum CommonPayloadFieldIsMaybeUninit {
-LL | |     A(u8),
-LL | |     B(MaybeUninit<u8>),
-LL | | }
-   | |_^
+LL | pub enum CommonPayloadFieldIsMaybeUninit {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: layout_of(NicheFirst) = Layout {
            fields: Arbitrary {
@@ -513,12 +504,8 @@ error: layout_of(NicheFirst) = Layout {
        }
   --> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:41:1
    |
-LL | / pub enum NicheFirst {
-LL | |     A(HasNiche, u8),
-LL | |     B,
-LL | |     C
-LL | | }
-   | |_^
+LL | pub enum NicheFirst {
+   | ^^^^^^^^^^^^^^^^^^^
 
 error: layout_of(NicheSecond) = Layout {
            fields: Arbitrary {
@@ -661,12 +648,8 @@ error: layout_of(NicheSecond) = Layout {
        }
   --> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:50:1
    |
-LL | / pub enum NicheSecond {
-LL | |     A(u8, HasNiche),
-LL | |     B,
-LL | |     C,
-LL | | }
-   | |_^
+LL | pub enum NicheSecond {
+   | ^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 5 previous errors
 
index 9db9ad5a784862023e646a018da233d100e18c7c..e6ed626d5f1aae32e3d3769a2fdf1e8a1e326946 100644 (file)
@@ -66,7 +66,7 @@ error: layout_of(A) = Layout {
   --> $DIR/thumb-enum.rs:16:1
    |
 LL | enum A { Apple }
-   | ^^^^^^^^^^^^^^^^
+   | ^^^^^^
 
 error: layout_of(B) = Layout {
            fields: Arbitrary {
@@ -136,7 +136,7 @@ error: layout_of(B) = Layout {
   --> $DIR/thumb-enum.rs:20:1
    |
 LL | enum B { Banana = 255, }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^
 
 error: layout_of(C) = Layout {
            fields: Arbitrary {
@@ -206,7 +206,7 @@ error: layout_of(C) = Layout {
   --> $DIR/thumb-enum.rs:24:1
    |
 LL | enum C { Chaenomeles = 256, }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^
 
 error: layout_of(P) = Layout {
            fields: Arbitrary {
@@ -276,7 +276,7 @@ error: layout_of(P) = Layout {
   --> $DIR/thumb-enum.rs:28:1
    |
 LL | enum P { Peach = 0x1000_0000isize, }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^
 
 error: layout_of(T) = Layout {
            fields: Arbitrary {
@@ -346,7 +346,7 @@ error: layout_of(T) = Layout {
   --> $DIR/thumb-enum.rs:34:1
    |
 LL | enum T { Tangerine = TANGERINE as isize }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^
 
 error: aborting due to 5 previous errors
 
index 8faf8593294cc78724faccf3fc19493b2168a2db..de2b863e4caa519d6f5bcb60d464b730af0a0563 100644 (file)
@@ -2,25 +2,25 @@ error: homogeneous_aggregate: Ok(Homogeneous(Reg { kind: Float, size: Size(4 byt
   --> $DIR/zero-sized-array-union.rs:59:1
    |
 LL | type TestBaz1 = Baz1;
-   | ^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^
 
 error: homogeneous_aggregate: Ok(Homogeneous(Reg { kind: Float, size: Size(4 bytes) }))
   --> $DIR/zero-sized-array-union.rs:70:1
    |
 LL | type TestBaz2 = Baz2;
-   | ^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^
 
 error: homogeneous_aggregate: Ok(Homogeneous(Reg { kind: Float, size: Size(4 bytes) }))
   --> $DIR/zero-sized-array-union.rs:81:1
    |
 LL | type TestBaz3 = Baz3;
-   | ^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^
 
 error: homogeneous_aggregate: Ok(Homogeneous(Reg { kind: Float, size: Size(4 bytes) }))
   --> $DIR/zero-sized-array-union.rs:92:1
    |
 LL | type TestBaz4 = Baz4;
-   | ^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^
 
 error: aborting due to 4 previous errors
 
index f26ef280b20b78e76742335f7a92029b1e0d1413..e6b9c67627893cd0f768530b9f6c38102f0ed6c6 100644 (file)
@@ -2,13 +2,13 @@ error[E0080]: values of the type `[u8; 2305843009213693951]` are too big for the
   --> $DIR/issue-56762.rs:19:1
    |
 LL | static MY_TOO_BIG_ARRAY_1: TooBigArray = TooBigArray::new();
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0080]: values of the type `[u8; 2305843009213693951]` are too big for the current architecture
   --> $DIR/issue-56762.rs:21:1
    |
 LL | static MY_TOO_BIG_ARRAY_2: [u8; HUGE_SIZE] = [0x00; HUGE_SIZE];
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
index dcb954a4bc0c15afc8d8002358f11da2812665ee..06a070822630e7d7e0b9c143113aaf0394bfbc2a 100644 (file)
@@ -2,7 +2,7 @@ error: symbol `collision` is already defined
   --> $DIR/auxiliary/def_colliding_external.rs:6:5
    |
 LL |     pub static collision: *const i32;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 7e395e67378f8f58362db8719bd6118b527ed882..e0be1ac2117bdeaaa61de6a781c9a6ae75734540 100644 (file)
@@ -2,7 +2,7 @@ error: symbol `collision` is already defined
   --> $DIR/linkage-detect-local-generated-name-collision.rs:10:9
    |
 LL |         pub static collision: *const i32;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index a80b495f97fa33c378d168308ac6376ee15fffb6..5abbe745c6a215d043d43e8ad1f5da93a908c319 100644 (file)
@@ -2,7 +2,7 @@ error: must have type `*const T` or `*mut T` due to `#[linkage]` attribute
   --> $DIR/auxiliary/def_illtyped_external.rs:5:1
    |
 LL | pub static EXTERN: u32 = 0;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 6ffe07170ede7bca14815e0aaa80846b31a0bd5f..a6ac0aad077874d6b70ce71adced4dab7bad5e65 100644 (file)
@@ -2,7 +2,7 @@ error: must have type `*const T` or `*mut T` due to `#[linkage]` attribute
   --> $DIR/linkage2.rs:12:5
    |
 LL |     static foo: i32;
-   |     ^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 0cbac28349d5aea6dd532bbee61cc29ae2851ab2..f2579c6e850f784678102370ebef5050ed1c6319 100644 (file)
@@ -2,7 +2,7 @@ error: invalid linkage specified
   --> $DIR/linkage3.rs:11:5
    |
 LL |     static foo: *const i32;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index c14529a7d090a2106eae46719360bf77f4fa04bc..915b3b86fe80ec0e9353fe11a9252d2bcae3477a 100644 (file)
@@ -2,9 +2,7 @@ warning: any use of this value will cause an error
   --> $DIR/allowed-cli-deny-by-default-lint.rs:6:16
    |
 LL | const C: i32 = 1 / 0;
-   | ---------------^^^^^-
-   |                |
-   |                attempt to divide `1_i32` by zero
+   | ------------   ^^^^^ attempt to divide `1_i32` by zero
    |
    = note: requested on the command line with `--force-warn const-err`
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -17,9 +15,7 @@ warning: any use of this value will cause an error
   --> $DIR/allowed-cli-deny-by-default-lint.rs:6:16
    |
 LL | const C: i32 = 1 / 0;
-   | ---------------^^^^^-
-   |                |
-   |                attempt to divide `1_i32` by zero
+   | ------------   ^^^^^ attempt to divide `1_i32` by zero
    |
    = note: requested on the command line with `--force-warn const-err`
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index dd71a168960ab0b9070182c9a5fdcf9b1aa59641..3b36d1d0227192c4ff5279d36bff33bab856c0d3 100644 (file)
@@ -2,9 +2,7 @@ warning: any use of this value will cause an error
   --> $DIR/allowed-deny-by-default-lint.rs:7:16
    |
 LL | const C: i32 = 1 / 0;
-   | ---------------^^^^^-
-   |                |
-   |                attempt to divide `1_i32` by zero
+   | ------------   ^^^^^ attempt to divide `1_i32` by zero
    |
    = note: requested on the command line with `--force-warn const-err`
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -17,9 +15,7 @@ warning: any use of this value will cause an error
   --> $DIR/allowed-deny-by-default-lint.rs:7:16
    |
 LL | const C: i32 = 1 / 0;
-   | ---------------^^^^^-
-   |                |
-   |                attempt to divide `1_i32` by zero
+   | ------------   ^^^^^ attempt to divide `1_i32` by zero
    |
    = note: requested on the command line with `--force-warn const-err`
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index d4e80584669aecda80963e2b4ccd60617ac5a72f..a2e5baa8b9d42c3e2e6f847cc35f8343cdf34ff6 100644 (file)
@@ -2,9 +2,7 @@ warning: any use of this value will cause an error
   --> $DIR/deny-by-default-lint.rs:5:16
    |
 LL | const C: i32 = 1 / 0;
-   | ---------------^^^^^-
-   |                |
-   |                attempt to divide `1_i32` by zero
+   | ------------   ^^^^^ attempt to divide `1_i32` by zero
    |
    = note: requested on the command line with `--force-warn const-err`
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -17,9 +15,7 @@ warning: any use of this value will cause an error
   --> $DIR/deny-by-default-lint.rs:5:16
    |
 LL | const C: i32 = 1 / 0;
-   | ---------------^^^^^-
-   |                |
-   |                attempt to divide `1_i32` by zero
+   | ------------   ^^^^^ attempt to divide `1_i32` by zero
    |
    = note: requested on the command line with `--force-warn const-err`
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
index 799991f7ee4baeaabac128e5ec1298ce9ad48986..a9538b5e3a49e76cb6a4a7914c7c33d0129509ce 100644 (file)
@@ -14,10 +14,8 @@ LL | #![deny(improper_ctypes)]
 note: the type is defined here
   --> $DIR/issue-14309.rs:4:1
    |
-LL | / struct A {
-LL | |     x: i32
-LL | | }
-   | |_^
+LL | struct A {
+   | ^^^^^^^^
 
 error: `extern` block uses type `A`, which is not FFI-safe
   --> $DIR/issue-14309.rs:31:15
@@ -30,10 +28,8 @@ LL |     fn bar(x: B);
 note: the type is defined here
   --> $DIR/issue-14309.rs:4:1
    |
-LL | / struct A {
-LL | |     x: i32
-LL | | }
-   | |_^
+LL | struct A {
+   | ^^^^^^^^
 
 error: `extern` block uses type `A`, which is not FFI-safe
   --> $DIR/issue-14309.rs:33:15
@@ -46,10 +42,8 @@ LL |     fn qux(x: A2);
 note: the type is defined here
   --> $DIR/issue-14309.rs:4:1
    |
-LL | / struct A {
-LL | |     x: i32
-LL | | }
-   | |_^
+LL | struct A {
+   | ^^^^^^^^
 
 error: `extern` block uses type `A`, which is not FFI-safe
   --> $DIR/issue-14309.rs:34:16
@@ -62,10 +56,8 @@ LL |     fn quux(x: B2);
 note: the type is defined here
   --> $DIR/issue-14309.rs:4:1
    |
-LL | / struct A {
-LL | |     x: i32
-LL | | }
-   | |_^
+LL | struct A {
+   | ^^^^^^^^
 
 error: `extern` block uses type `A`, which is not FFI-safe
   --> $DIR/issue-14309.rs:36:16
@@ -78,10 +70,8 @@ LL |     fn fred(x: D);
 note: the type is defined here
   --> $DIR/issue-14309.rs:4:1
    |
-LL | / struct A {
-LL | |     x: i32
-LL | | }
-   | |_^
+LL | struct A {
+   | ^^^^^^^^
 
 error: aborting due to 5 previous errors
 
index 540e076c7e4c62b1f1eaadbadf0154c193f22f16..94d876423e7491c67401406c96d28be75a82d6d0 100644 (file)
@@ -10,7 +10,7 @@ note: `const` item defined here
   --> $DIR/lint-const-item-mutation.rs:26:1
    |
 LL | const ARRAY: [u8; 1] = [25];
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^
 
 warning: attempting to modify a `const` item
   --> $DIR/lint-const-item-mutation.rs:38:5
@@ -23,7 +23,7 @@ note: `const` item defined here
   --> $DIR/lint-const-item-mutation.rs:27:1
    |
 LL | const MY_STRUCT: MyStruct = MyStruct { field: true, inner_array: ['a'], raw_ptr: 2 as *mut u8 };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: attempting to modify a `const` item
   --> $DIR/lint-const-item-mutation.rs:39:5
@@ -36,7 +36,7 @@ note: `const` item defined here
   --> $DIR/lint-const-item-mutation.rs:27:1
    |
 LL | const MY_STRUCT: MyStruct = MyStruct { field: true, inner_array: ['a'], raw_ptr: 2 as *mut u8 };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: taking a mutable reference to a `const` item
   --> $DIR/lint-const-item-mutation.rs:40:5
@@ -55,7 +55,7 @@ note: `const` item defined here
   --> $DIR/lint-const-item-mutation.rs:27:1
    |
 LL | const MY_STRUCT: MyStruct = MyStruct { field: true, inner_array: ['a'], raw_ptr: 2 as *mut u8 };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: taking a mutable reference to a `const` item
   --> $DIR/lint-const-item-mutation.rs:41:5
@@ -69,7 +69,7 @@ note: `const` item defined here
   --> $DIR/lint-const-item-mutation.rs:27:1
    |
 LL | const MY_STRUCT: MyStruct = MyStruct { field: true, inner_array: ['a'], raw_ptr: 2 as *mut u8 };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: taking a mutable reference to a `const` item
   --> $DIR/lint-const-item-mutation.rs:42:5
@@ -83,7 +83,7 @@ note: `const` item defined here
   --> $DIR/lint-const-item-mutation.rs:27:1
    |
 LL | const MY_STRUCT: MyStruct = MyStruct { field: true, inner_array: ['a'], raw_ptr: 2 as *mut u8 };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: attempting to modify a `const` item
   --> $DIR/lint-const-item-mutation.rs:54:5
@@ -96,7 +96,7 @@ note: `const` item defined here
   --> $DIR/lint-const-item-mutation.rs:30:1
    |
 LL | const MUTABLE2: Mutable2 = Mutable2 { msg: "", other: String::new() };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: taking a mutable reference to a `const` item
   --> $DIR/lint-const-item-mutation.rs:55:5
@@ -115,7 +115,7 @@ note: `const` item defined here
   --> $DIR/lint-const-item-mutation.rs:31:1
    |
 LL | const VEC: Vec<i32> = Vec::new();
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^
 
 warning: 8 warnings emitted
 
index 1601bd9d62927f4fe9fa202d8c8247f43bd43115..de532f69ac0a558103ee00fb865b1f9e742e1959 100644 (file)
@@ -14,10 +14,8 @@ LL | #![deny(improper_ctypes)]
 note: the type is defined here
   --> $DIR/lint-ctypes-enum.rs:9:1
    |
-LL | / enum U {
-LL | |     A,
-LL | | }
-   | |_^
+LL | enum U {
+   | ^^^^^^
 
 error: `extern` block uses type `B`, which is not FFI-safe
   --> $DIR/lint-ctypes-enum.rs:61:13
@@ -30,11 +28,8 @@ LL |    fn bf(x: B);
 note: the type is defined here
   --> $DIR/lint-ctypes-enum.rs:12:1
    |
-LL | / enum B {
-LL | |     C,
-LL | |     D,
-LL | | }
-   | |_^
+LL | enum B {
+   | ^^^^^^
 
 error: `extern` block uses type `T`, which is not FFI-safe
   --> $DIR/lint-ctypes-enum.rs:62:13
@@ -47,12 +42,8 @@ LL |    fn tf(x: T);
 note: the type is defined here
   --> $DIR/lint-ctypes-enum.rs:16:1
    |
-LL | / enum T {
-LL | |     E,
-LL | |     F,
-LL | |     G,
-LL | | }
-   | |_^
+LL | enum T {
+   | ^^^^^^
 
 error: `extern` block uses type `u128`, which is not FFI-safe
   --> $DIR/lint-ctypes-enum.rs:74:23
index 740075ca7dfff3f7da4bf52d1ecc4ff2dbbd371b..6f8d76411aaebbf406dea27d5710d88f121a4435 100644 (file)
@@ -100,7 +100,7 @@ note: the type is defined here
   --> $DIR/lint-ctypes-fn.rs:28:1
    |
 LL | pub struct ZeroSize;
-   | ^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^
 
 error: `extern` fn uses type `ZeroSizeWithPhantomData`, which is not FFI-safe
   --> $DIR/lint-ctypes-fn.rs:110:40
@@ -113,7 +113,7 @@ note: the type is defined here
   --> $DIR/lint-ctypes-fn.rs:63:1
    |
 LL | pub struct ZeroSizeWithPhantomData(PhantomData<i32>);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `extern` fn uses type `PhantomData<bool>`, which is not FFI-safe
   --> $DIR/lint-ctypes-fn.rs:113:51
index 342b6bfc6f87a225871d4841590504975a5107bf..bfec40e1955357e6d56cc18ade0b18d01ccee6ef 100644 (file)
@@ -15,7 +15,7 @@ note: the type is defined here
   --> $DIR/lint-ctypes.rs:26:1
    |
 LL | pub struct Foo;
-   | ^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^
 
 error: `extern` block uses type `Foo`, which is not FFI-safe
   --> $DIR/lint-ctypes.rs:49:28
@@ -29,7 +29,7 @@ note: the type is defined here
   --> $DIR/lint-ctypes.rs:26:1
    |
 LL | pub struct Foo;
-   | ^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^
 
 error: `extern` block uses type `((),)`, which is not FFI-safe
   --> $DIR/lint-ctypes.rs:51:25
@@ -139,7 +139,7 @@ note: the type is defined here
   --> $DIR/lint-ctypes.rs:22:1
    |
 LL | pub struct ZeroSize;
-   | ^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^
 
 error: `extern` block uses type `ZeroSizeWithPhantomData`, which is not FFI-safe
   --> $DIR/lint-ctypes.rs:64:33
@@ -152,7 +152,7 @@ note: the type is defined here
   --> $DIR/lint-ctypes.rs:45:1
    |
 LL | pub struct ZeroSizeWithPhantomData(::std::marker::PhantomData<i32>);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `extern` block uses type `PhantomData<bool>`, which is not FFI-safe
   --> $DIR/lint-ctypes.rs:67:12
index b6a66f0a95ad193890718915dc427ee0515cf964..88121a1836da4144c10a71df9e31da7d3cc3e736 100644 (file)
@@ -400,11 +400,8 @@ LL |         let _val: Fruit = mem::uninitialized();
 note: enums have to be initialized to a variant
   --> $DIR/uninitialized-zeroed.rs:26:1
    |
-LL | / enum Fruit {
-LL | |     Apple,
-LL | |     Banana,
-LL | | }
-   | |_^
+LL | enum Fruit {
+   | ^^^^^^^^^^
 
 error: the type `[bool; 2]` does not permit being left uninitialized
   --> $DIR/uninitialized-zeroed.rs:101:31
index 1d57b32d47e86d3c541fab0b55cebe3468b7caec..bf85a2d75db23e406b8b7feba43d271ac632c64d 100644 (file)
@@ -13,70 +13,60 @@ LL |       pong!();
 error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
   --> $DIR/main.rs:10:20
    |
-LL | /  macro_rules! pong {
-LL | |      () => { syntax error };
-   | |                     ^^^^^ expected one of 8 possible tokens
-LL | |  }
-   | |__- in this expansion of `pong!` (#2)
+LL | / macro_rules! pong {
+LL | |     () => { syntax error };
+   | |                    ^^^^^ expected one of 8 possible tokens
+LL | | }
+   | |_- in this expansion of `pong!` (#2)
 ...
-LL |        ping!();
-   |        ------- in this macro invocation (#1)
+LL |       ping!();
+   |       ------- in this macro invocation (#1)
    |
   ::: $DIR/auxiliary/ping.rs:5:1
    |
-LL |  / macro_rules! ping {
-LL |  |     () => {
-LL |  |         pong!();
-   |  |         ------- in this macro invocation (#2)
-LL |  |     }
-LL |  | }
-   |  |_- in this expansion of `ping!` (#1)
+LL |   macro_rules! ping {
+   |   ----------------- in this expansion of `ping!` (#1)
+LL |       () => {
+LL |           pong!();
+   |           ------- in this macro invocation (#2)
 
 error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
   --> $DIR/main.rs:10:20
    |
-LL | /  macro_rules! pong {
-LL | |      () => { syntax error };
-   | |                     ^^^^^ expected one of 8 possible tokens
-LL | |  }
-   | |__- in this expansion of `pong!` (#5)
+LL | / macro_rules! pong {
+LL | |     () => { syntax error };
+   | |                    ^^^^^ expected one of 8 possible tokens
+LL | | }
+   | |_- in this expansion of `pong!` (#5)
 ...
-LL |        deep!();
-   |        ------- in this macro invocation (#1)
+LL |       deep!();
+   |       ------- in this macro invocation (#1)
    |
   ::: $DIR/auxiliary/ping.rs:5:1
    |
-LL |  / macro_rules! ping {
-LL |  |     () => {
-LL |  |         pong!();
-   |  |         ------- in this macro invocation (#5)
-LL |  |     }
-LL |  | }
-   |  |_- in this expansion of `ping!` (#4)
+LL |   macro_rules! ping {
+   |   ----------------- in this expansion of `ping!` (#4)
+LL |       () => {
+LL |           pong!();
+   |           ------- in this macro invocation (#5)
 ...
-LL | /  macro_rules! deep {
-LL | |      () => {
-LL | |          foo!();
-   | |          ------ in this macro invocation (#2)
-LL | |      }
-LL | |  }
-   | |__- in this expansion of `deep!` (#1)
+LL |   macro_rules! deep {
+   |   ----------------- in this expansion of `deep!` (#1)
+LL |       () => {
+LL |           foo!();
+   |           ------ in this macro invocation (#2)
 ...
-LL | /  macro_rules! foo {
-LL | |      () => {
-LL | |          bar!();
-   | |          ------ in this macro invocation (#3)
-LL | |      }
-LL | |  }
-   | |__- in this expansion of `foo!` (#2)
+LL |   macro_rules! foo {
+   |   ---------------- in this expansion of `foo!` (#2)
+LL |       () => {
+LL |           bar!();
+   |           ------ in this macro invocation (#3)
 ...
-LL | /  macro_rules! bar {
-LL | |      () => {
-LL | |          ping!();
-   | |          ------- in this macro invocation (#4)
-LL | |      }
-LL | |  }
-   | |__- in this expansion of `bar!` (#3)
+LL |   macro_rules! bar {
+   |   ---------------- in this expansion of `bar!` (#3)
+LL |       () => {
+LL |           ping!();
+   |           ------- in this macro invocation (#4)
 
 error: aborting due to 3 previous errors
 
index 7b04e05293ea1f12ef8ed6c12dd06dcd4318488c..8f9dba16578eb9b4ad184f86c3f6b4f575c7359c 100644 (file)
@@ -7,12 +7,8 @@ LL | macro_rules! unknown { () => () }
 error[E0773]: attempted to define built-in macro more than once
   --> $SRC_DIR/core/src/macros/mod.rs:LL:COL
    |
-LL | /     macro_rules! line {
-LL | |         () => {
-LL | |             /* compiler built-in */
-LL | |         };
-LL | |     }
-   | |_____^
+LL |     macro_rules! line {
+   |     ^^^^^^^^^^^^^^^^^
    |
 note: previously defined here
   --> $DIR/unknown-builtin.rs:9:1
index ae7d5a98b0872afbc74d210803552ff6f3ff70fc..ac218e30b9b85db96dee7db87af88bc3cb260775 100644 (file)
@@ -2,13 +2,13 @@ error[E0714]: marker traits cannot have associated items
   --> $DIR/marker-trait-with-associated-items.rs:6:5
    |
 LL |     const N: usize;
-   |     ^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^
 
 error[E0714]: marker traits cannot have associated items
   --> $DIR/marker-trait-with-associated-items.rs:12:5
    |
 LL |     type Output;
-   |     ^^^^^^^^^^^^
+   |     ^^^^^^^^^^^
 
 error[E0714]: marker traits cannot have associated items
   --> $DIR/marker-trait-with-associated-items.rs:18:5
@@ -20,13 +20,13 @@ error[E0714]: marker traits cannot have associated items
   --> $DIR/marker-trait-with-associated-items.rs:24:5
    |
 LL |     const N: usize = 43;
-   |     ^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^
 
 error[E0714]: marker traits cannot have associated items
   --> $DIR/marker-trait-with-associated-items.rs:30:5
    |
 LL |     type Output = ();
-   |     ^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^
 
 error[E0714]: marker traits cannot have associated items
   --> $DIR/marker-trait-with-associated-items.rs:36:5
index 6206dc85ea05f81c72ab6854ef03416a232cbcb5..9d92f8fdbb4b3760e38f4ade5525447c5e94a350 100644 (file)
@@ -25,7 +25,7 @@ note: `E1` defined here
   --> $DIR/auxiliary/match_non_exhaustive_lib.rs:2:1
    |
 LL | pub enum E1 {}
-   | ^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^
    = note: the matched value is of type `E1`, which is marked as non-exhaustive
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
@@ -44,7 +44,7 @@ note: `E2` defined here
   --> $DIR/auxiliary/match_non_exhaustive_lib.rs:5:1
    |
 LL | pub enum E2 { A, B }
-   | ^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^
    = note: the matched value is of type `E2`, which is marked as non-exhaustive
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
index 57662e1e265aec21e69880ffe6211b59168b8c6e..4be588fe7f92ac9cb132837b3b88c170d62fcefa 100644 (file)
@@ -50,7 +50,7 @@ error[E0599]: `Foo` is not an iterator
   --> $DIR/method-call-err-msg.rs:19:7
    |
 LL | pub struct Foo;
-   | ---------------
+   | --------------
    | |          |
    | |          method `take` not found for this struct
    | doesn't satisfy `Foo: Iterator`
@@ -64,14 +64,8 @@ LL |      .take()
 note: the following trait must be implemented
   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
    |
-LL | / pub trait Iterator {
-LL | |     /// The type of the elements being iterated over.
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-LL | |     type Item;
-...  |
-LL | |     }
-LL | | }
-   | |_^
+LL | pub trait Iterator {
+   | ^^^^^^^^^^^^^^^^^^
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `take`, perhaps you need to implement it:
            candidate #1: `Iterator`
index 73c9f86e0022088e63e56a288523330ebe0a89ae..ffd95b48ac2b72992ba581014f459a8becfc47df 100644 (file)
@@ -10,18 +10,12 @@ note: an implementation of `AddAssign<_>` might be missing for `Foo`
   --> $DIR/assignment-operator-unimplemented.rs:1:1
    |
 LL | struct Foo;
-   | ^^^^^^^^^^^ must implement `AddAssign<_>`
+   | ^^^^^^^^^^ must implement `AddAssign<_>`
 note: the following trait must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
    |
-LL | / pub trait AddAssign<Rhs = Self> {
-LL | |     /// Performs the `+=` operation.
-LL | |     ///
-LL | |     /// # Example
-...  |
-LL | |     fn add_assign(&mut self, rhs: Rhs);
-LL | | }
-   | |_^
+LL | pub trait AddAssign<Rhs = Self> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index fed47e0f1747179ba5fe92d5a06ddabfd0e4074c..3968774e35793515f31e02f5ce4693244aa8c2a1 100644 (file)
@@ -188,7 +188,7 @@ LL |     call(Foo);
    |     required by a bound introduced by this call
 ...
 LL | struct Foo(u8);
-   | --------------- takes 1 argument
+   | ---------- takes 1 argument
    |
 note: required by a bound in `call`
   --> $DIR/closure-arg-count.rs:42:30
index 6395bca300c92da47aff438a5ff942e5a919c36c..980d9dd167d2035e2b69f5f967f5b9c8e21e56c3 100644 (file)
@@ -7,7 +7,7 @@ LL |     let _ = Struct::<A>::new().clone();
   ::: $DIR/auxiliary/issue-69725.rs:2:1
    |
 LL | pub struct Struct<A>(A);
-   | ------------------------ doesn't satisfy `Struct<A>: Clone`
+   | -------------------- doesn't satisfy `Struct<A>: Clone`
    |
    = note: the following trait bounds were not satisfied:
            `A: Clone`
index f3c6b39e62ed0fc9b406edb56f2a7c21d394b230..9e94aa2c7b3b9916efb01ea902a8b2694992383e 100644 (file)
@@ -30,7 +30,7 @@ error[E0599]: the method `foo` exists for reference `&Fin<T>`, but its trait bou
   --> $DIR/missing-trait-bounds-for-method-call.rs:27:14
    |
 LL | struct Fin<T> where T: Bar {
-   | -------------------------- doesn't satisfy `Fin<T>: Bar`
+   | ------------- doesn't satisfy `Fin<T>: Bar`
 ...
 LL |         self.foo();
    |              ^^^ method cannot be called on `&Fin<T>` due to unsatisfied trait bounds
index e3bdf6d78320734e4cf7e06e0081061037ceb017..5760f4a7fdc35d659b434924c4e47bc8e85ac44d 100644 (file)
@@ -12,7 +12,7 @@ note: deref defined here
   --> $DIR/move-deref-coercion.rs:17:5
    |
 LL |     type Target = NotCopy;
-   |     ^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^
 
 error[E0382]: borrow of partially moved value: `val`
   --> $DIR/move-deref-coercion.rs:30:5
@@ -28,7 +28,7 @@ note: deref defined here
   --> $DIR/move-deref-coercion.rs:17:5
    |
 LL |     type Target = NotCopy;
-   |     ^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
index ccdd4dd272e9b534338768122e67b84451bbe7c1..fbd86bdb661f207f8b1115c01edd516d7b1e799d 100644 (file)
@@ -33,7 +33,7 @@ LL |     check(xm1::S);
   ::: $DIR/auxiliary/namespace-mix.rs:3:5
    |
 LL |     pub struct TS();
-   |     ---------------- similarly named tuple struct `TS` defined here
+   |     ------------- similarly named tuple struct `TS` defined here
    |
    = note: can't use a type alias as a constructor
 help: a tuple struct with a similar name exists
index 871c512052821eae062ebdc38e666d299c6badf8..f9f7c787ecbc3bc9e4867d560c843334ce061c34 100644 (file)
@@ -5,7 +5,7 @@ LL | impl MyTrait for MyFoo {}
    | ---------------------- first implementation here
 LL | // This will conflict with the first impl if we impl `for<T> T: From<!>`.
 LL | impl<T> MyTrait for T where T: From<!> {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyFoo`
+   | ^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyFoo`
    |
    = note: permitting this impl would forbid us from adding `impl<T> From<!> for T` later; see rust-lang/rust#64715 for details
 
index 7fa2090e3e614d348c3a2b0374a2842712148221..9ae41e78c227dc769e9b2bde8ea00f4a6dcb6131 100644 (file)
@@ -17,7 +17,7 @@ note: deref defined here
   --> $SRC_DIR/alloc/src/sync.rs:LL:COL
    |
 LL |     type Target = T;
-   |     ^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^
 
 error: aborting due to previous error
 
index bcc4506dc8d1c928c36755ff634d9643a2369390..564b05854740ccfc6b63771872fc52337c71d500 100644 (file)
@@ -17,7 +17,7 @@ note: deref defined here
   --> $SRC_DIR/alloc/src/sync.rs:LL:COL
    |
 LL |     type Target = T;
-   |     ^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^
 
 error: aborting due to previous error
 
index c94adfe4ab38aa8815bb665d93a6db3454fc002d..920720a4f53e2558afea17f400dfa896c3ee91cc 100644 (file)
@@ -38,14 +38,8 @@ LL | enum E { A, B }
 note: the following trait must be implemented
   --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
    |
-LL | / pub trait BitOr<Rhs = Self> {
-LL | |     /// The resulting type after applying the `|` operator.
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-LL | |     type Output;
-...  |
-LL | |     fn bitor(self, rhs: Rhs) -> Self::Output;
-LL | | }
-   | |_^
+LL | pub trait BitOr<Rhs = Self> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 5 previous errors
 
index bd3b9181123bb7b0485a9b342c9045aa0ad5f98d..75d27c614e2028192f063c6179f8bae2b956001d 100644 (file)
@@ -234,30 +234,30 @@ LL |         const async unsafe extern "C" fn ft5();
 LL |         const async unsafe extern "C" fn ft5() {}
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `(): Future`
 
-error[E0391]: cycle detected when computing type of `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 40:6>::ft5::{opaque#0}`
+error[E0391]: cycle detected when computing type of `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5::{opaque#0}`
   --> $DIR/fn-header-semantic-fail.rs:34:48
    |
 LL |         const async unsafe extern "C" fn ft5() {}
    |                                                ^
    |
-note: ...which requires borrow-checking `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 40:6>::ft5`...
+note: ...which requires borrow-checking `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5`...
   --> $DIR/fn-header-semantic-fail.rs:34:9
    |
 LL |         const async unsafe extern "C" fn ft5() {}
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-note: ...which requires processing `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 40:6>::ft5`...
+note: ...which requires processing `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5`...
   --> $DIR/fn-header-semantic-fail.rs:34:9
    |
 LL |         const async unsafe extern "C" fn ft5() {}
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-note: ...which requires const checking `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 40:6>::ft5`...
+note: ...which requires const checking `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5`...
   --> $DIR/fn-header-semantic-fail.rs:34:9
    |
 LL |         const async unsafe extern "C" fn ft5() {}
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: ...which requires computing whether `impl core::future::future::Future<Output = ()>` is freeze...
    = note: ...which requires evaluating trait selection obligation `impl core::future::future::Future<Output = ()>: core::marker::Freeze`...
-   = note: ...which again requires computing type of `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 40:6>::ft5::{opaque#0}`, completing the cycle
+   = note: ...which again requires computing type of `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5::{opaque#0}`, completing the cycle
 note: cycle used when checking item types in top-level module
   --> $DIR/fn-header-semantic-fail.rs:5:1
    |
@@ -270,30 +270,30 @@ LL | |     }
 LL | | }
    | |_^
 
-error[E0391]: cycle detected when computing type of `main::<impl at $DIR/fn-header-semantic-fail.rs:42:5: 50:6>::fi5::{opaque#0}`
+error[E0391]: cycle detected when computing type of `main::<impl at $DIR/fn-header-semantic-fail.rs:42:5: 42:11>::fi5::{opaque#0}`
   --> $DIR/fn-header-semantic-fail.rs:47:48
    |
 LL |         const async unsafe extern "C" fn fi5() {}
    |                                                ^
    |
-note: ...which requires borrow-checking `main::<impl at $DIR/fn-header-semantic-fail.rs:42:5: 50:6>::fi5`...
+note: ...which requires borrow-checking `main::<impl at $DIR/fn-header-semantic-fail.rs:42:5: 42:11>::fi5`...
   --> $DIR/fn-header-semantic-fail.rs:47:9
    |
 LL |         const async unsafe extern "C" fn fi5() {}
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-note: ...which requires processing `main::<impl at $DIR/fn-header-semantic-fail.rs:42:5: 50:6>::fi5`...
+note: ...which requires processing `main::<impl at $DIR/fn-header-semantic-fail.rs:42:5: 42:11>::fi5`...
   --> $DIR/fn-header-semantic-fail.rs:47:9
    |
 LL |         const async unsafe extern "C" fn fi5() {}
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-note: ...which requires const checking `main::<impl at $DIR/fn-header-semantic-fail.rs:42:5: 50:6>::fi5`...
+note: ...which requires const checking `main::<impl at $DIR/fn-header-semantic-fail.rs:42:5: 42:11>::fi5`...
   --> $DIR/fn-header-semantic-fail.rs:47:9
    |
 LL |         const async unsafe extern "C" fn fi5() {}
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: ...which requires computing whether `impl core::future::future::Future<Output = ()>` is freeze...
    = note: ...which requires evaluating trait selection obligation `impl core::future::future::Future<Output = ()>: core::marker::Freeze`...
-   = note: ...which again requires computing type of `main::<impl at $DIR/fn-header-semantic-fail.rs:42:5: 50:6>::fi5::{opaque#0}`, completing the cycle
+   = note: ...which again requires computing type of `main::<impl at $DIR/fn-header-semantic-fail.rs:42:5: 42:11>::fi5::{opaque#0}`, completing the cycle
 note: cycle used when checking item types in top-level module
   --> $DIR/fn-header-semantic-fail.rs:5:1
    |
index 07b678bc8731a299730bcfff836803d2196385f5..019cd414d2e99e856874742635f0ad634d04a3e4 100644 (file)
@@ -16,9 +16,9 @@ LL |         Z0() => {}
   ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:1:1
    |
 LL | pub struct Z0;
-   | -------------- `Z0` defined here
+   | ------------- `Z0` defined here
 LL | pub struct Z1();
-   | ---------------- similarly named tuple struct `Z1` defined here
+   | ------------- similarly named tuple struct `Z1` defined here
    |
 help: use this syntax instead
    |
@@ -38,9 +38,9 @@ LL |         Z0(x) => {}
   ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:1:1
    |
 LL | pub struct Z0;
-   | -------------- `Z0` defined here
+   | ------------- `Z0` defined here
 LL | pub struct Z1();
-   | ---------------- similarly named tuple struct `Z1` defined here
+   | ------------- similarly named tuple struct `Z1` defined here
    |
 help: use this syntax instead
    |
@@ -126,7 +126,7 @@ LL |         Z1(x) => {}
   ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:2:1
    |
 LL | pub struct Z1();
-   | ---------------- tuple struct has 0 fields
+   | ------------- tuple struct has 0 fields
 
 error[E0023]: this pattern has 0 fields, but the corresponding tuple struct has 3 fields
   --> $DIR/pat-tuple-field-count-cross.rs:18:9
index 1c44f7e5f6f1fa8e1015628fc662c57ffa388a10..9e13a2dc9fbfe209162e3df5ff5064c13e2b85e7 100644 (file)
@@ -271,7 +271,7 @@ error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 0
   --> $DIR/pat-tuple-overfield.rs:59:12
    |
 LL | struct Z1();
-   | ------------ tuple struct has 0 fields
+   | --------- tuple struct has 0 fields
 ...
 LL |         Z1(_) => {}
    |            ^ expected 0 fields, found 1
@@ -280,7 +280,7 @@ error[E0023]: this pattern has 2 fields, but the corresponding tuple struct has
   --> $DIR/pat-tuple-overfield.rs:60:12
    |
 LL | struct Z1();
-   | ------------ tuple struct has 0 fields
+   | --------- tuple struct has 0 fields
 ...
 LL |         Z1(_, _) => {}
    |            ^  ^ expected 0 fields, found 2
index 296465eb81838f6056d6dd75b3701d356a028ec1..643e734f9d4fa7109d5489fb8f81f6ed1c095851 100644 (file)
@@ -7,13 +7,8 @@ LL |     match HiddenEnum::A {
 note: `HiddenEnum` defined here
   --> $DIR/auxiliary/hidden.rs:1:1
    |
-LL | / pub enum HiddenEnum {
-LL | |     A,
-LL | |     B,
-LL | |     #[doc(hidden)]
-LL | |     C,
-LL | | }
-   | |_^
+LL | pub enum HiddenEnum {
+   | ^^^^^^^^^^^^^^^^^^^
    = note: the matched value is of type `HiddenEnum`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
@@ -30,14 +25,11 @@ LL |     match HiddenEnum::A {
 note: `HiddenEnum` defined here
   --> $DIR/auxiliary/hidden.rs:3:5
    |
-LL | / pub enum HiddenEnum {
-LL | |     A,
-LL | |     B,
-   | |     ^ not covered
-LL | |     #[doc(hidden)]
-LL | |     C,
-LL | | }
-   | |_-
+LL | pub enum HiddenEnum {
+   | -------------------
+LL |     A,
+LL |     B,
+   |     ^ not covered
    = note: the matched value is of type `HiddenEnum`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
@@ -54,14 +46,11 @@ LL |     match HiddenEnum::A {
 note: `HiddenEnum` defined here
   --> $DIR/auxiliary/hidden.rs:3:5
    |
-LL | / pub enum HiddenEnum {
-LL | |     A,
-LL | |     B,
-   | |     ^ not covered
-LL | |     #[doc(hidden)]
-LL | |     C,
-LL | | }
-   | |_-
+LL | pub enum HiddenEnum {
+   | -------------------
+LL |     A,
+LL |     B,
+   |     ^ not covered
    = note: the matched value is of type `HiddenEnum`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
@@ -78,15 +67,11 @@ LL |     match None {
 note: `Option<HiddenEnum>` defined here
   --> $SRC_DIR/core/src/option.rs:LL:COL
    |
-LL | / pub enum Option<T> {
-LL | |     /// No value.
-LL | |     #[lang = "None"]
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-...  |
-LL | |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
-   | |     ^^^^ not covered
-LL | | }
-   | |_-
+LL | pub enum Option<T> {
+   | ------------------
+...
+LL |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+   |     ^^^^ not covered
    = note: the matched value is of type `Option<HiddenEnum>`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
index 717bb53c32750e0df2dfc527505bb4d3296b1494..2247b818d4385943266555f1bc6536c2a016ce9a 100644 (file)
@@ -108,14 +108,8 @@ LL |     match Some(A) {
 note: `Option<Enum>` defined here
   --> $SRC_DIR/core/src/option.rs:LL:COL
    |
-LL | / pub enum Option<T> {
-LL | |     /// No value.
-LL | |     #[lang = "None"]
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-...  |
-LL | |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
-LL | | }
-   | |_^
+LL | pub enum Option<T> {
+   | ^^^^^^^^^^^^^^^^^^
    = note: the matched value is of type `Option<Enum>`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown, or multiple match arms
    |
index 4e0adcc1ba2a538af4aaa509610a9deb3ce432d0..eb8c63919b6445fbd4576ffec0af6968e62a3a7f 100644 (file)
@@ -11,7 +11,7 @@ LL | / pub struct Box<
 LL | |     T: ?Sized,
 LL | |     #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
 LL | | >(Unique<T>, A);
-   | |________________^
+   | |_^
    = note: the matched value is of type `Box<ElementKind>`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
index 3326e6b85a471734c11bd6e3930a368be393202c..a2b66f5ed67523cb62ea0f35b63fae7bf36b3751 100644 (file)
@@ -20,18 +20,14 @@ LL |     match Some(Some(North)) {
 note: `Option<Option<Direction>>` defined here
   --> $SRC_DIR/core/src/option.rs:LL:COL
    |
-LL | / pub enum Option<T> {
-LL | |     /// No value.
-LL | |     #[lang = "None"]
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-...  |
-LL | |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
-   | |     ^^^^
-   | |     |
-   | |     not covered
-   | |     not covered
-LL | | }
-   | |_-
+LL | pub enum Option<T> {
+   | ------------------
+...
+LL |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+   |     ^^^^
+   |     |
+   |     not covered
+   |     not covered
    = note: the matched value is of type `Option<Option<Direction>>`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
index 88178d6429197eac5850ce0b9cc5c5d098ef3631..4607cfaae1719db36dfec2abc9bc7270ab8fb073 100644 (file)
@@ -7,15 +7,11 @@ LL |     match private::DATA {
 note: `Option<Private>` defined here
   --> $SRC_DIR/core/src/option.rs:LL:COL
    |
-LL | / pub enum Option<T> {
-LL | |     /// No value.
-LL | |     #[lang = "None"]
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-...  |
-LL | |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
-   | |     ^^^^ not covered
-LL | | }
-   | |_-
+LL | pub enum Option<T> {
+   | ------------------
+...
+LL |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+   |     ^^^^ not covered
    = note: the matched value is of type `Option<Private>`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
index 89b4e06efdacd7c7afb34a730a817aae628ec1f3..f2362c316dfb988971b45314c186949dbb4061cb 100644 (file)
@@ -37,15 +37,11 @@ LL |     match Some(10) {
 note: `Option<i32>` defined here
   --> $SRC_DIR/core/src/option.rs:LL:COL
    |
-LL | / pub enum Option<T> {
-LL | |     /// No value.
-LL | |     #[lang = "None"]
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-...  |
-LL | |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
-   | |     ^^^^ not covered
-LL | | }
-   | |_-
+LL | pub enum Option<T> {
+   | ------------------
+...
+LL |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+   |     ^^^^ not covered
    = note: the matched value is of type `Option<i32>`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
index 559539178cbe3931f486006010b19f2612d1f877..98c75953add89304a4b2ea828f3733ab8f6000bc 100644 (file)
@@ -7,16 +7,11 @@ LL |     match UnstableEnum::Stable {
 note: `UnstableEnum` defined here
   --> $DIR/auxiliary/unstable.rs:9:5
    |
-LL | / pub enum UnstableEnum {
-LL | |     #[stable(feature = "stable_test_feature", since = "1.0.0")]
-LL | |     Stable,
-LL | |     #[stable(feature = "stable_test_feature", since = "1.0.0")]
-LL | |     Stable2,
-   | |     ^^^^^^^ not covered
-LL | |     #[unstable(feature = "unstable_test_feature", issue = "none")]
-LL | |     Unstable,
-LL | | }
-   | |_-
+LL | pub enum UnstableEnum {
+   | ---------------------
+...
+LL |     Stable2,
+   |     ^^^^^^^ not covered
    = note: the matched value is of type `UnstableEnum`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
@@ -33,14 +28,8 @@ LL |     match UnstableEnum::Stable {
 note: `UnstableEnum` defined here
   --> $DIR/auxiliary/unstable.rs:5:1
    |
-LL | / pub enum UnstableEnum {
-LL | |     #[stable(feature = "stable_test_feature", since = "1.0.0")]
-LL | |     Stable,
-LL | |     #[stable(feature = "stable_test_feature", since = "1.0.0")]
-...  |
-LL | |     Unstable,
-LL | | }
-   | |_^
+LL | pub enum UnstableEnum {
+   | ^^^^^^^^^^^^^^^^^^^^^
    = note: the matched value is of type `UnstableEnum`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
index b5f1805deef118b893f06a5e4d331eed07837ae1..f07a25ca89b27541ec16bb1df377a1f441337c10 100644 (file)
@@ -7,15 +7,11 @@ LL |     match UnstableEnum::Stable {
 note: `UnstableEnum` defined here
   --> $DIR/auxiliary/unstable.rs:11:5
    |
-LL | / pub enum UnstableEnum {
-LL | |     #[stable(feature = "stable_test_feature", since = "1.0.0")]
-LL | |     Stable,
-LL | |     #[stable(feature = "stable_test_feature", since = "1.0.0")]
-...  |
-LL | |     Unstable,
-   | |     ^^^^^^^^ not covered
-LL | | }
-   | |_-
+LL | pub enum UnstableEnum {
+   | ---------------------
+...
+LL |     Unstable,
+   |     ^^^^^^^^ not covered
    = note: the matched value is of type `UnstableEnum`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
index e40b19420593aa3fd7c63700cff8804eac26f8f7..dc98cfe3bb6c47cf1640fcec5156f1a3e35711c1 100644 (file)
@@ -12,19 +12,19 @@ error[E0446]: private type `m2::Priv` in public interface
   --> $DIR/issue-30079.rs:18:9
    |
 LL |     struct Priv;
-   |     ------------ `m2::Priv` declared as private
+   |     ----------- `m2::Priv` declared as private
 LL |     impl ::std::ops::Deref for ::SemiPriv {
 LL |         type Target = Priv;
-   |         ^^^^^^^^^^^^^^^^^^^ can't leak private type
+   |         ^^^^^^^^^^^ can't leak private type
 
 error[E0446]: private type `m3::Priv` in public interface
   --> $DIR/issue-30079.rs:35:9
    |
 LL |     struct Priv;
-   |     ------------ `m3::Priv` declared as private
+   |     ----------- `m3::Priv` declared as private
 LL |     impl ::SemiPrivTrait for () {
 LL |         type Assoc = Priv;
-   |         ^^^^^^^^^^^^^^^^^^ can't leak private type
+   |         ^^^^^^^^^^ can't leak private type
 
 error: aborting due to 2 previous errors; 1 warning emitted
 
index d0c0c6b8bb593526c39a7bb0917999fed933040e..680161272cefb79bee11c011c1025589baf822a4 100644 (file)
@@ -373,7 +373,7 @@ note: the tuple struct constructor `A` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:1:1
    |
 LL | pub struct A(());
-   | ^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `B` is private
   --> $DIR/privacy5.rs:91:20
@@ -390,7 +390,7 @@ note: the tuple struct constructor `B` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:2:1
    |
 LL | pub struct B(isize);
-   | ^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:92:20
@@ -407,7 +407,7 @@ note: the tuple struct constructor `C` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:3:1
    |
 LL | pub struct C(pub isize, isize);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `A` is private
   --> $DIR/privacy5.rs:95:16
@@ -424,7 +424,7 @@ note: the tuple struct constructor `A` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:1:1
    |
 LL | pub struct A(());
-   | ^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `A` is private
   --> $DIR/privacy5.rs:96:16
@@ -441,7 +441,7 @@ note: the tuple struct constructor `A` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:1:1
    |
 LL | pub struct A(());
-   | ^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `A` is private
   --> $DIR/privacy5.rs:97:22
@@ -458,7 +458,7 @@ note: the tuple struct constructor `A` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:1:1
    |
 LL | pub struct A(());
-   | ^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `A` is private
   --> $DIR/privacy5.rs:98:22
@@ -475,7 +475,7 @@ note: the tuple struct constructor `A` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:1:1
    |
 LL | pub struct A(());
-   | ^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `B` is private
   --> $DIR/privacy5.rs:100:16
@@ -492,7 +492,7 @@ note: the tuple struct constructor `B` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:2:1
    |
 LL | pub struct B(isize);
-   | ^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `B` is private
   --> $DIR/privacy5.rs:101:16
@@ -509,7 +509,7 @@ note: the tuple struct constructor `B` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:2:1
    |
 LL | pub struct B(isize);
-   | ^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `B` is private
   --> $DIR/privacy5.rs:102:22
@@ -526,7 +526,7 @@ note: the tuple struct constructor `B` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:2:1
    |
 LL | pub struct B(isize);
-   | ^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `B` is private
   --> $DIR/privacy5.rs:103:22
@@ -543,7 +543,7 @@ note: the tuple struct constructor `B` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:2:1
    |
 LL | pub struct B(isize);
-   | ^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `B` is private
   --> $DIR/privacy5.rs:104:22
@@ -560,7 +560,7 @@ note: the tuple struct constructor `B` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:2:1
    |
 LL | pub struct B(isize);
-   | ^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `B` is private
   --> $DIR/privacy5.rs:105:16
@@ -577,7 +577,7 @@ note: the tuple struct constructor `B` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:2:1
    |
 LL | pub struct B(isize);
-   | ^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:107:16
@@ -594,7 +594,7 @@ note: the tuple struct constructor `C` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:3:1
    |
 LL | pub struct C(pub isize, isize);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:108:16
@@ -611,7 +611,7 @@ note: the tuple struct constructor `C` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:3:1
    |
 LL | pub struct C(pub isize, isize);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:109:16
@@ -628,7 +628,7 @@ note: the tuple struct constructor `C` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:3:1
    |
 LL | pub struct C(pub isize, isize);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:110:16
@@ -645,7 +645,7 @@ note: the tuple struct constructor `C` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:3:1
    |
 LL | pub struct C(pub isize, isize);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:111:22
@@ -662,7 +662,7 @@ note: the tuple struct constructor `C` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:3:1
    |
 LL | pub struct C(pub isize, isize);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:112:22
@@ -679,7 +679,7 @@ note: the tuple struct constructor `C` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:3:1
    |
 LL | pub struct C(pub isize, isize);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:113:22
@@ -696,7 +696,7 @@ note: the tuple struct constructor `C` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:3:1
    |
 LL | pub struct C(pub isize, isize);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:114:22
@@ -713,7 +713,7 @@ note: the tuple struct constructor `C` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:3:1
    |
 LL | pub struct C(pub isize, isize);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `A` is private
   --> $DIR/privacy5.rs:122:21
@@ -730,7 +730,7 @@ note: the tuple struct constructor `A` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:1:1
    |
 LL | pub struct A(());
-   | ^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `B` is private
   --> $DIR/privacy5.rs:123:21
@@ -747,7 +747,7 @@ note: the tuple struct constructor `B` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:2:1
    |
 LL | pub struct B(isize);
-   | ^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `C` is private
   --> $DIR/privacy5.rs:124:21
@@ -764,7 +764,7 @@ note: the tuple struct constructor `C` is defined here
   --> $DIR/auxiliary/privacy_tuple_struct.rs:3:1
    |
 LL | pub struct C(pub isize, isize);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error: aborting due to 48 previous errors
 
index ba62a228b09fe66c60213fbce885f78f18f91707..1abeafe398f4d462f3a5290f114aa3c2bc7f4a5b 100644 (file)
@@ -2,16 +2,16 @@ error[E0446]: private type `Priv` in public interface
   --> $DIR/private-in-public-assoc-ty.rs:17:9
    |
 LL |     struct Priv;
-   |     ------------ `Priv` declared as private
+   |     ----------- `Priv` declared as private
 ...
 LL |         type A = Priv;
-   |         ^^^^^^^^^^^^^^ can't leak private type
+   |         ^^^^^^ can't leak private type
 
 warning: private trait `PrivTr` in public interface (error E0445)
   --> $DIR/private-in-public-assoc-ty.rs:24:9
    |
 LL |         type Alias1: PrivTr;
-   |         ^^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(private_in_public)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -21,7 +21,7 @@ warning: private type `Priv` in public interface (error E0446)
   --> $DIR/private-in-public-assoc-ty.rs:27:9
    |
 LL |         type Alias2: PubTrAux1<Priv> = u8;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
@@ -30,7 +30,7 @@ warning: private type `Priv` in public interface (error E0446)
   --> $DIR/private-in-public-assoc-ty.rs:30:9
    |
 LL |         type Alias3: PubTrAux2<A = Priv> = u8;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
@@ -39,19 +39,19 @@ error[E0446]: private type `Priv` in public interface
   --> $DIR/private-in-public-assoc-ty.rs:34:9
    |
 LL |     struct Priv;
-   |     ------------ `Priv` declared as private
+   |     ----------- `Priv` declared as private
 ...
 LL |         type Alias4 = Priv;
-   |         ^^^^^^^^^^^^^^^^^^^ can't leak private type
+   |         ^^^^^^^^^^^ can't leak private type
 
 error[E0446]: private type `Priv` in public interface
   --> $DIR/private-in-public-assoc-ty.rs:41:9
    |
 LL |     struct Priv;
-   |     ------------ `Priv` declared as private
+   |     ----------- `Priv` declared as private
 ...
 LL |         type Alias1 = Priv;
-   |         ^^^^^^^^^^^^^^^^^^^ can't leak private type
+   |         ^^^^^^^^^^^ can't leak private type
 
 error[E0445]: private trait `PrivTr` in public interface
   --> $DIR/private-in-public-assoc-ty.rs:44:9
@@ -60,7 +60,7 @@ LL |     trait PrivTr {}
    |     ------------ `PrivTr` declared as private
 ...
 LL |         type Exist = impl PrivTr;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
+   |         ^^^^^^^^^^ can't leak private trait
 
 error: aborting due to 4 previous errors; 3 warnings emitted
 
index dd5f5b6f8f8f739cd5bfffc18a88dcfcb5940461..1e98e3bed147c4a9b6c741bce91d169fb7ec54f6 100644 (file)
@@ -2,7 +2,7 @@ error[E0446]: private type `m1::Priv` in public interface
   --> $DIR/private-in-public-lint.rs:6:9
    |
 LL |     struct Priv;
-   |     ------------ `m1::Priv` declared as private
+   |     ----------- `m1::Priv` declared as private
 ...
 LL |         pub fn f() -> Priv {Priv}
    |         ^^^^^^^^^^^^^^^^^^ can't leak private type
@@ -11,7 +11,7 @@ error[E0446]: private type `m2::Priv` in public interface
   --> $DIR/private-in-public-lint.rs:15:9
    |
 LL |     struct Priv;
-   |     ------------ `m2::Priv` declared as private
+   |     ----------- `m2::Priv` declared as private
 ...
 LL |         pub fn f() -> Priv {Priv}
    |         ^^^^^^^^^^^^^^^^^^ can't leak private type
index 5f2c4935bad374d36da16f12a8e7a9575091845f..f2ff6cf2fdbc4867f948a3b6898db63fd3d1dd73 100644 (file)
@@ -2,7 +2,7 @@ error: private type `types::Priv` in public interface (error E0446)
   --> $DIR/private-in-public-warn.rs:15:5
    |
 LL |     pub type Alias = Priv;
-   |     ^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^
    |
 note: the lint level is defined here
   --> $DIR/private-in-public-warn.rs:5:9
@@ -34,7 +34,7 @@ error: private type `types::Priv` in public interface (error E0446)
   --> $DIR/private-in-public-warn.rs:24:9
    |
 LL |         const C: Priv = Priv;
-   |         ^^^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
@@ -43,10 +43,10 @@ error[E0446]: private type `types::Priv` in public interface
   --> $DIR/private-in-public-warn.rs:26:9
    |
 LL |     struct Priv;
-   |     ------------ `types::Priv` declared as private
+   |     ----------- `types::Priv` declared as private
 ...
 LL |         type Alias = Priv;
-   |         ^^^^^^^^^^^^^^^^^^ can't leak private type
+   |         ^^^^^^^^^^ can't leak private type
 
 error: private type `types::Priv` in public interface (error E0446)
   --> $DIR/private-in-public-warn.rs:27:9
@@ -70,7 +70,7 @@ error: private type `types::Priv` in public interface (error E0446)
   --> $DIR/private-in-public-warn.rs:33:9
    |
 LL |         pub static ES: Priv;
-   |         ^^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
@@ -79,7 +79,7 @@ error: private type `types::Priv` in public interface (error E0446)
   --> $DIR/private-in-public-warn.rs:35:9
    |
 LL |         pub fn ef1(arg: Priv);
-   |         ^^^^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
@@ -88,7 +88,7 @@ error: private type `types::Priv` in public interface (error E0446)
   --> $DIR/private-in-public-warn.rs:37:9
    |
 LL |         pub fn ef2() -> Priv;
-   |         ^^^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
@@ -97,16 +97,16 @@ error[E0446]: private type `types::Priv` in public interface
   --> $DIR/private-in-public-warn.rs:41:9
    |
 LL |     struct Priv;
-   |     ------------ `types::Priv` declared as private
+   |     ----------- `types::Priv` declared as private
 ...
 LL |         type Alias = Priv;
-   |         ^^^^^^^^^^^^^^^^^^ can't leak private type
+   |         ^^^^^^^^^^ can't leak private type
 
 error: private trait `traits::PrivTr` in public interface (error E0445)
   --> $DIR/private-in-public-warn.rs:50:5
    |
 LL |     pub type Alias<T: PrivTr> = T;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
@@ -115,7 +115,7 @@ error: private trait `traits::PrivTr` in public interface (error E0445)
   --> $DIR/private-in-public-warn.rs:53:5
    |
 LL |     pub trait Tr1: PrivTr {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
@@ -124,7 +124,7 @@ error: private trait `traits::PrivTr` in public interface (error E0445)
   --> $DIR/private-in-public-warn.rs:55:5
    |
 LL |     pub trait Tr2<T: PrivTr> {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
@@ -133,7 +133,7 @@ error: private trait `traits::PrivTr` in public interface (error E0445)
   --> $DIR/private-in-public-warn.rs:58:9
    |
 LL |         type Alias: PrivTr;
-   |         ^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
@@ -151,7 +151,7 @@ error: private trait `traits::PrivTr` in public interface (error E0445)
   --> $DIR/private-in-public-warn.rs:64:5
    |
 LL |     impl<T: PrivTr> Pub<T> {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
@@ -160,7 +160,7 @@ error: private trait `traits_where::PrivTr` in public interface (error E0445)
   --> $DIR/private-in-public-warn.rs:74:5
    |
 LL |     pub type Alias<T> where T: PrivTr = T;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
@@ -169,7 +169,7 @@ error: private trait `traits_where::PrivTr` in public interface (error E0445)
   --> $DIR/private-in-public-warn.rs:78:5
    |
 LL |     pub trait Tr2<T> where T: PrivTr {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
@@ -187,7 +187,7 @@ error: private trait `traits_where::PrivTr` in public interface (error E0445)
   --> $DIR/private-in-public-warn.rs:86:5
    |
 LL |     impl<T> Pub<T> where T: PrivTr {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
@@ -196,7 +196,7 @@ error: private trait `generics::PrivTr<generics::Pub>` in public interface (erro
   --> $DIR/private-in-public-warn.rs:98:5
    |
 LL |     pub trait Tr1: PrivTr<Pub> {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
@@ -205,7 +205,7 @@ error: private type `generics::Priv` in public interface (error E0446)
   --> $DIR/private-in-public-warn.rs:101:5
    |
 LL |     pub trait Tr2: PubTr<Priv> {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
@@ -214,7 +214,7 @@ error: private type `generics::Priv` in public interface (error E0446)
   --> $DIR/private-in-public-warn.rs:103:5
    |
 LL |     pub trait Tr3: PubTr<[Priv; 1]> {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
@@ -223,7 +223,7 @@ error: private type `generics::Priv` in public interface (error E0446)
   --> $DIR/private-in-public-warn.rs:105:5
    |
 LL |     pub trait Tr4: PubTr<Pub<Priv>> {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
@@ -232,10 +232,10 @@ error[E0446]: private type `impls::Priv` in public interface
   --> $DIR/private-in-public-warn.rs:132:9
    |
 LL |     struct Priv;
-   |     ------------ `impls::Priv` declared as private
+   |     ----------- `impls::Priv` declared as private
 ...
 LL |         type Alias = Priv;
-   |         ^^^^^^^^^^^^^^^^^^ can't leak private type
+   |         ^^^^^^^^^^ can't leak private type
 
 error: private type `aliases_pub::Priv` in public interface (error E0446)
   --> $DIR/private-in-public-warn.rs:203:9
@@ -250,43 +250,43 @@ error[E0446]: private type `aliases_pub::Priv` in public interface
   --> $DIR/private-in-public-warn.rs:207:9
    |
 LL |     struct Priv;
-   |     ------------ `aliases_pub::Priv` declared as private
+   |     ----------- `aliases_pub::Priv` declared as private
 ...
 LL |         type Check = Priv;
-   |         ^^^^^^^^^^^^^^^^^^ can't leak private type
+   |         ^^^^^^^^^^ can't leak private type
 
 error[E0446]: private type `aliases_pub::Priv` in public interface
   --> $DIR/private-in-public-warn.rs:210:9
    |
 LL |     struct Priv;
-   |     ------------ `aliases_pub::Priv` declared as private
+   |     ----------- `aliases_pub::Priv` declared as private
 ...
 LL |         type Check = Priv;
-   |         ^^^^^^^^^^^^^^^^^^ can't leak private type
+   |         ^^^^^^^^^^ can't leak private type
 
 error[E0446]: private type `aliases_pub::Priv` in public interface
   --> $DIR/private-in-public-warn.rs:213:9
    |
 LL |     struct Priv;
-   |     ------------ `aliases_pub::Priv` declared as private
+   |     ----------- `aliases_pub::Priv` declared as private
 ...
 LL |         type Check = Priv;
-   |         ^^^^^^^^^^^^^^^^^^ can't leak private type
+   |         ^^^^^^^^^^ can't leak private type
 
 error[E0446]: private type `aliases_pub::Priv` in public interface
   --> $DIR/private-in-public-warn.rs:216:9
    |
 LL |     struct Priv;
-   |     ------------ `aliases_pub::Priv` declared as private
+   |     ----------- `aliases_pub::Priv` declared as private
 ...
 LL |         type Check = Priv;
-   |         ^^^^^^^^^^^^^^^^^^ can't leak private type
+   |         ^^^^^^^^^^ can't leak private type
 
 error: private trait `PrivTr1` in public interface (error E0445)
   --> $DIR/private-in-public-warn.rs:246:5
    |
 LL |     pub trait Tr1: PrivUseAliasTr {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
@@ -295,7 +295,7 @@ error: private trait `PrivTr1<Priv2>` in public interface (error E0445)
   --> $DIR/private-in-public-warn.rs:249:5
    |
 LL |     pub trait Tr2: PrivUseAliasTr<PrivAlias> {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
@@ -304,7 +304,7 @@ error: private type `Priv2` in public interface (error E0446)
   --> $DIR/private-in-public-warn.rs:249:5
    |
 LL |     pub trait Tr2: PrivUseAliasTr<PrivAlias> {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
index e8bb2cde4be8f1abbfb1fa4d16574fab84108218..887eebf53efac7cb58adde5c62877c28738a81e7 100644 (file)
@@ -2,25 +2,25 @@ error[E0446]: private type `types::Priv` in public interface
   --> $DIR/private-in-public.rs:13:5
    |
 LL |     struct Priv;
-   |     ------------ `types::Priv` declared as private
+   |     ----------- `types::Priv` declared as private
 ...
 LL |     pub const C: Priv = Priv;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
+   |     ^^^^^^^^^^^^^^^^^ can't leak private type
 
 error[E0446]: private type `types::Priv` in public interface
   --> $DIR/private-in-public.rs:14:5
    |
 LL |     struct Priv;
-   |     ------------ `types::Priv` declared as private
+   |     ----------- `types::Priv` declared as private
 ...
 LL |     pub static S: Priv = Priv;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
+   |     ^^^^^^^^^^^^^^^^^^ can't leak private type
 
 error[E0446]: private type `types::Priv` in public interface
   --> $DIR/private-in-public.rs:15:5
    |
 LL |     struct Priv;
-   |     ------------ `types::Priv` declared as private
+   |     ----------- `types::Priv` declared as private
 ...
 LL |     pub fn f1(arg: Priv) {}
    |     ^^^^^^^^^^^^^^^^^^^^ can't leak private type
@@ -29,7 +29,7 @@ error[E0446]: private type `types::Priv` in public interface
   --> $DIR/private-in-public.rs:16:5
    |
 LL |     struct Priv;
-   |     ------------ `types::Priv` declared as private
+   |     ----------- `types::Priv` declared as private
 ...
 LL |     pub fn f2() -> Priv { panic!() }
    |     ^^^^^^^^^^^^^^^^^^^ can't leak private type
@@ -38,7 +38,7 @@ error[E0446]: private type `types::Priv` in public interface
   --> $DIR/private-in-public.rs:17:19
    |
 LL |     struct Priv;
-   |     ------------ `types::Priv` declared as private
+   |     ----------- `types::Priv` declared as private
 ...
 LL |     pub struct S1(pub Priv);
    |                   ^^^^^^^^ can't leak private type
@@ -47,7 +47,7 @@ error[E0446]: private type `types::Priv` in public interface
   --> $DIR/private-in-public.rs:18:21
    |
 LL |     struct Priv;
-   |     ------------ `types::Priv` declared as private
+   |     ----------- `types::Priv` declared as private
 ...
 LL |     pub struct S2 { pub field: Priv }
    |                     ^^^^^^^^^^^^^^^ can't leak private type
@@ -56,16 +56,16 @@ error[E0446]: private type `types::Priv` in public interface
   --> $DIR/private-in-public.rs:20:9
    |
 LL |     struct Priv;
-   |     ------------ `types::Priv` declared as private
+   |     ----------- `types::Priv` declared as private
 ...
 LL |         pub const C: Priv = Priv;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
+   |         ^^^^^^^^^^^^^^^^^ can't leak private type
 
 error[E0446]: private type `types::Priv` in public interface
   --> $DIR/private-in-public.rs:21:9
    |
 LL |     struct Priv;
-   |     ------------ `types::Priv` declared as private
+   |     ----------- `types::Priv` declared as private
 ...
 LL |         pub fn f1(arg: Priv) {}
    |         ^^^^^^^^^^^^^^^^^^^^ can't leak private type
@@ -74,7 +74,7 @@ error[E0446]: private type `types::Priv` in public interface
   --> $DIR/private-in-public.rs:22:9
    |
 LL |     struct Priv;
-   |     ------------ `types::Priv` declared as private
+   |     ----------- `types::Priv` declared as private
 ...
 LL |         pub fn f2() -> Priv { panic!() }
    |         ^^^^^^^^^^^^^^^^^^^ can't leak private type
@@ -86,7 +86,7 @@ LL |     trait PrivTr {}
    |     ------------ `traits::PrivTr` declared as private
 ...
 LL |     pub enum E<T: PrivTr> { V(T) }
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
+   |     ^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
 
 error[E0445]: private trait `traits::PrivTr` in public interface
   --> $DIR/private-in-public.rs:32:5
@@ -104,18 +104,16 @@ LL |     trait PrivTr {}
    |     ------------ `traits::PrivTr` declared as private
 ...
 LL |     pub struct S1<T: PrivTr>(T);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
 
 error[E0445]: private trait `traits::PrivTr` in public interface
   --> $DIR/private-in-public.rs:34:5
    |
-LL |       trait PrivTr {}
-   |       ------------ `traits::PrivTr` declared as private
+LL |     trait PrivTr {}
+   |     ------------ `traits::PrivTr` declared as private
 ...
-LL | /     impl<T: PrivTr> Pub<T> {
-LL | |         pub fn f<U: PrivTr>(arg: U) {}
-LL | |     }
-   | |_____^ can't leak private trait
+LL |     impl<T: PrivTr> Pub<T> {
+   |     ^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
 
 error[E0445]: private trait `traits::PrivTr` in public interface
   --> $DIR/private-in-public.rs:35:9
@@ -133,7 +131,7 @@ LL |     trait PrivTr {}
    |     ------------ `traits_where::PrivTr` declared as private
 ...
 LL |     pub enum E<T> where T: PrivTr { V(T) }
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
+   |     ^^^^^^^^^^^^^ can't leak private trait
 
 error[E0445]: private trait `traits_where::PrivTr` in public interface
   --> $DIR/private-in-public.rs:46:5
@@ -151,20 +149,16 @@ LL |     trait PrivTr {}
    |     ------------ `traits_where::PrivTr` declared as private
 ...
 LL |     pub struct S1<T>(T) where T: PrivTr;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
+   |     ^^^^^^^^^^^^^^^^ can't leak private trait
 
 error[E0445]: private trait `traits_where::PrivTr` in public interface
   --> $DIR/private-in-public.rs:50:5
    |
-LL |       trait PrivTr {}
-   |       ------------ `traits_where::PrivTr` declared as private
+LL |     trait PrivTr {}
+   |     ------------ `traits_where::PrivTr` declared as private
 ...
-LL | /     impl<T> Pub<T> where T: PrivTr {
-LL | |
-LL | |         pub fn f<U>(arg: U) where U: PrivTr {}
-LL | |
-LL | |     }
-   | |_____^ can't leak private trait
+LL |     impl<T> Pub<T> where T: PrivTr {
+   |     ^^^^^^^^^^^^^^ can't leak private trait
 
 error[E0445]: private trait `traits_where::PrivTr` in public interface
   --> $DIR/private-in-public.rs:52:9
@@ -179,7 +173,7 @@ error[E0446]: private type `generics::Priv` in public interface
   --> $DIR/private-in-public.rs:63:5
    |
 LL |     struct Priv<T = u8>(T);
-   |     ----------------------- `generics::Priv` declared as private
+   |     ------------------- `generics::Priv` declared as private
 ...
 LL |     pub fn f1(arg: [Priv; 1]) {}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
@@ -188,7 +182,7 @@ error[E0446]: private type `generics::Priv` in public interface
   --> $DIR/private-in-public.rs:64:5
    |
 LL |     struct Priv<T = u8>(T);
-   |     ----------------------- `generics::Priv` declared as private
+   |     ------------------- `generics::Priv` declared as private
 ...
 LL |     pub fn f2(arg: Pub<Priv>) {}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
@@ -197,7 +191,7 @@ error[E0446]: private type `generics::Priv<generics::Pub>` in public interface
   --> $DIR/private-in-public.rs:65:5
    |
 LL |     struct Priv<T = u8>(T);
-   |     ----------------------- `generics::Priv<generics::Pub>` declared as private
+   |     ------------------- `generics::Priv<generics::Pub>` declared as private
 ...
 LL |     pub fn f3(arg: Priv<Pub>) {}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
@@ -206,7 +200,7 @@ error[E0446]: private type `impls::Priv` in public interface
   --> $DIR/private-in-public.rs:80:9
    |
 LL |     struct Priv;
-   |     ------------ `impls::Priv` declared as private
+   |     ----------- `impls::Priv` declared as private
 ...
 LL |         pub fn f(arg: Priv) {}
    |         ^^^^^^^^^^^^^^^^^^^ can't leak private type
@@ -224,7 +218,7 @@ error[E0446]: private type `aliases_pub::Priv` in public interface
   --> $DIR/private-in-public.rs:104:5
    |
 LL |     struct Priv;
-   |     ------------ `aliases_pub::Priv` declared as private
+   |     ----------- `aliases_pub::Priv` declared as private
 ...
 LL |     pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
@@ -233,7 +227,7 @@ error[E0446]: private type `aliases_pub::Priv` in public interface
   --> $DIR/private-in-public.rs:109:9
    |
 LL |     struct Priv;
-   |     ------------ `aliases_pub::Priv` declared as private
+   |     ----------- `aliases_pub::Priv` declared as private
 ...
 LL |         pub fn f(arg: Priv) {}
    |         ^^^^^^^^^^^^^^^^^^^ can't leak private type
@@ -242,7 +236,7 @@ error[E0446]: private type `Priv1` in public interface
   --> $DIR/private-in-public.rs:131:5
    |
 LL |     struct Priv1;
-   |     ------------- `Priv1` declared as private
+   |     ------------ `Priv1` declared as private
 ...
 LL |     pub fn f1(arg: PrivUseAlias) {}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
@@ -251,7 +245,7 @@ error[E0446]: private type `Priv2` in public interface
   --> $DIR/private-in-public.rs:132:5
    |
 LL |     struct Priv2;
-   |     ------------- `Priv2` declared as private
+   |     ------------ `Priv2` declared as private
 ...
 LL |     pub fn f2(arg: PrivAlias) {}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
@@ -269,7 +263,7 @@ error[E0446]: private type `aliases_priv::Priv` in public interface
   --> $DIR/private-in-public.rs:133:5
    |
 LL |     struct Priv;
-   |     ------------ `aliases_priv::Priv` declared as private
+   |     ----------- `aliases_priv::Priv` declared as private
 ...
 LL |     pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
@@ -278,7 +272,7 @@ error[E0446]: private type `aliases_params::Priv` in public interface
   --> $DIR/private-in-public.rs:143:5
    |
 LL |     struct Priv;
-   |     ------------ `aliases_params::Priv` declared as private
+   |     ----------- `aliases_params::Priv` declared as private
 ...
 LL |     pub fn f2(arg: PrivAliasGeneric) {}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
@@ -287,7 +281,7 @@ error[E0446]: private type `aliases_params::Priv` in public interface
   --> $DIR/private-in-public.rs:145:5
    |
 LL |     struct Priv;
-   |     ------------ `aliases_params::Priv` declared as private
+   |     ----------- `aliases_params::Priv` declared as private
 ...
 LL |     pub fn f3(arg: Result<u8>) {}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
index e7e968839b6faacee986c09cd15f508c94a01dbd..aecd8b58c83110f039d6a5e6127ee1297412edbc 100644 (file)
@@ -2,19 +2,19 @@ error[E0446]: private type `Priv` in public interface
   --> $DIR/private-inferred-type.rs:61:36
    |
 LL |     struct Priv;
-   |     ------------ `Priv` declared as private
+   |     ----------- `Priv` declared as private
 ...
 LL |     impl TraitWithAssocTy for u8 { type AssocTy = Priv; }
-   |                                    ^^^^^^^^^^^^^^^^^^^^ can't leak private type
+   |                                    ^^^^^^^^^^^^ can't leak private type
 
 error[E0446]: private type `S2` in public interface
   --> $DIR/private-inferred-type.rs:83:9
    |
 LL |     struct S2;
-   |     ---------- `S2` declared as private
+   |     --------- `S2` declared as private
 ...
 LL |         type Target = S2Alias;
-   |         ^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
+   |         ^^^^^^^^^^^ can't leak private type
 
 error: type `Priv` is private
   --> $DIR/private-inferred-type.rs:97:9
index f64b8569015d8fc881c2c50dd5d44cdd20a21b04..e62a440d8f5682522f6c90aa3e5143c657d267f0 100644 (file)
@@ -20,7 +20,7 @@ error: trait `OtherTrait` from private dependency 'priv_dep' in public interface
   --> $DIR/pub-priv1.rs:35:5
    |
 LL |     type Foo: OtherTrait;
-   |     ^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 3 previous errors
 
index ee9c031ebff231752494c1997c9c8127d82cbfa7..65d996f0f070940b8b5add3dfa0d6a0a7e1c1bc5 100644 (file)
@@ -2,7 +2,7 @@ error[E0446]: private type `Priv` in public interface
   --> $DIR/private-in-public.rs:6:9
    |
 LL |     struct Priv;
-   |     ------------ `Priv` declared as private
+   |     ----------- `Priv` declared as private
 ...
 LL |         pub(crate) fn g(_: Priv) {}
    |         ^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
@@ -11,7 +11,7 @@ error[E0446]: private type `Priv` in public interface
   --> $DIR/private-in-public.rs:7:9
    |
 LL |     struct Priv;
-   |     ------------ `Priv` declared as private
+   |     ----------- `Priv` declared as private
 ...
 LL |         pub(crate) fn h(_: Priv) {}
    |         ^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
index c81520c35cd41d1ac27b36964c6549ac389d02be..1acd221b42c5f1136f688a0035546f3a926d0d17 100644 (file)
@@ -34,7 +34,7 @@ note: the struct `Crate` is defined here
   --> $DIR/auxiliary/pub_restricted.rs:1:1
    |
 LL | pub(crate) struct Crate;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0603]: function `f` is private
   --> $DIR/test.rs:30:19
index 378c14810d92d7c82334a9acf649e15f16e32ff3..7eb71346ae9c800b6c025619e8252aa43c1c782d 100644 (file)
@@ -1,13 +1,8 @@
 warning: private type `PrivTy` in public interface (error E0446)
   --> $DIR/where-priv-type.rs:19:1
    |
-LL | / pub struct S
-LL | |
-LL | |
-LL | | where
-LL | |     PrivTy:
-LL | | {}
-   | |__^
+LL | pub struct S
+   | ^^^^^^^^^^^^
    |
    = note: `#[warn(private_in_public)]` on by default
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
@@ -16,13 +11,8 @@ LL | | {}
 warning: private type `PrivTy` in public interface (error E0446)
   --> $DIR/where-priv-type.rs:27:1
    |
-LL | / pub enum E
-LL | |
-LL | |
-LL | | where
-LL | |     PrivTy:
-LL | | {}
-   | |__^
+LL | pub enum E
+   | ^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
@@ -43,17 +33,11 @@ LL | |     PrivTy:
 error[E0446]: private type `PrivTy` in public interface
   --> $DIR/where-priv-type.rs:43:1
    |
-LL |   struct PrivTy;
-   |   -------------- `PrivTy` declared as private
+LL | struct PrivTy;
+   | ------------- `PrivTy` declared as private
 ...
-LL | / impl S
-LL | |
-LL | | where
-LL | |     PrivTy:
-...  |
-LL | |     {}
-LL | | }
-   | |_^ can't leak private type
+LL | impl S
+   | ^^^^^^ can't leak private type
 
 warning: private type `PrivTy` in public interface (error E0446)
   --> $DIR/where-priv-type.rs:48:5
@@ -72,7 +56,7 @@ error[E0446]: private type `fn(u8) -> u8 {my_const_fn}` in public interface
   --> $DIR/where-priv-type.rs:80:5
    |
 LL |     type AssocTy = Const<{ my_const_fn(U) }>;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
+   |     ^^^^^^^^^^^^ can't leak private type
 ...
 LL | const fn my_const_fn(val: u8) -> u8 {
    | ----------------------------------- `fn(u8) -> u8 {my_const_fn}` declared as private
index 9ce7b9a139f5e7b29f0029351f90fb44a37f72e3..a433cebbbc090a2f3e6fde98da1cc6a8eff6d5ef 100644 (file)
@@ -1,28 +1,20 @@
 error[E0445]: private trait `PrivTr` in public interface
   --> $DIR/where-pub-type-impls-priv-trait.rs:19:1
    |
-LL |   trait PrivTr {}
-   |   ------------ `PrivTr` declared as private
+LL | trait PrivTr {}
+   | ------------ `PrivTr` declared as private
 ...
-LL | / pub struct S
-LL | |
-LL | | where
-LL | |     PubTy: PrivTr
-LL | | {}
-   | |__^ can't leak private trait
+LL | pub struct S
+   | ^^^^^^^^^^^^ can't leak private trait
 
 error[E0445]: private trait `PrivTr` in public interface
   --> $DIR/where-pub-type-impls-priv-trait.rs:26:1
    |
-LL |   trait PrivTr {}
-   |   ------------ `PrivTr` declared as private
+LL | trait PrivTr {}
+   | ------------ `PrivTr` declared as private
 ...
-LL | / pub enum E
-LL | |
-LL | | where
-LL | |     PubTy: PrivTr
-LL | | {}
-   | |__^ can't leak private trait
+LL | pub enum E
+   | ^^^^^^^^^^ can't leak private trait
 
 error[E0445]: private trait `PrivTr` in public interface
   --> $DIR/where-pub-type-impls-priv-trait.rs:33:1
@@ -39,17 +31,11 @@ LL | |     PubTy: PrivTr
 error[E0445]: private trait `PrivTr` in public interface
   --> $DIR/where-pub-type-impls-priv-trait.rs:40:1
    |
-LL |   trait PrivTr {}
-   |   ------------ `PrivTr` declared as private
+LL | trait PrivTr {}
+   | ------------ `PrivTr` declared as private
 ...
-LL | / impl S
-LL | |
-LL | | where
-LL | |     PubTy: PrivTr
-...  |
-LL | |     {}
-LL | | }
-   | |_^ can't leak private trait
+LL | impl S
+   | ^^^^^^ can't leak private trait
 
 error[E0445]: private trait `PrivTr` in public interface
   --> $DIR/where-pub-type-impls-priv-trait.rs:45:5
index e518c6ab8003232a8e3a70e62ba1b00213d570f8..a534b9d5377adbecec406d3010981e73a020bf65 100644 (file)
@@ -76,7 +76,7 @@ LL | #[derive(Dlone)]
   ::: $SRC_DIR/core/src/clone.rs:LL:COL
    |
 LL | pub macro Clone($item:item) {
-   | --------------------------- similarly named derive macro `Clone` defined here
+   | --------------- similarly named derive macro `Clone` defined here
 
 error: cannot find derive macro `Dlone` in this scope
   --> $DIR/resolve-error.rs:35:10
@@ -87,7 +87,7 @@ LL | #[derive(Dlone)]
   ::: $SRC_DIR/core/src/clone.rs:LL:COL
    |
 LL | pub macro Clone($item:item) {
-   | --------------------------- similarly named derive macro `Clone` defined here
+   | --------------- similarly named derive macro `Clone` defined here
 
 error: cannot find attribute `FooWithLongNan` in this scope
   --> $DIR/resolve-error.rs:32:3
index 29d45858ff15ce31a6326209a423e1b54054b406..39d4f5ac8d3cf30fa76e0508a87294d5c5d4f843 100644 (file)
@@ -2,28 +2,28 @@ error[E0446]: private type `Snail` in public interface
   --> $DIR/issue-33174-restricted-type-in-public-interface.rs:18:1
    |
 LL | pub(crate) struct Snail;
-   | ------------------------ `Snail` declared as private
+   | ----------------------- `Snail` declared as private
 ...
 LL | pub type Helix_pomatia = Shell<Snail>;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
+   | ^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
 
 error[E0446]: crate-private type `Turtle` in public interface
   --> $DIR/issue-33174-restricted-type-in-public-interface.rs:21:1
    |
 LL |     pub(super) struct Turtle;
-   |     ------------------------- `Turtle` declared as crate-private
+   |     ------------------------ `Turtle` declared as crate-private
 ...
 LL | pub type Dermochelys_coriacea = Shell<sea::Turtle>;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak crate-private type
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak crate-private type
 
 error[E0446]: private type `Tortoise` in public interface
   --> $DIR/issue-33174-restricted-type-in-public-interface.rs:24:1
    |
 LL | struct Tortoise;
-   | ---------------- `Tortoise` declared as private
+   | --------------- `Tortoise` declared as private
 ...
 LL | pub type Testudo_graeca = Shell<Tortoise>;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
+   | ^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
 
 error: aborting due to 3 previous errors
 
index d4d2c8c3d9ccd63bc5ddac52f9e7f9201b4874e5..1359761457a662c25605865350e6ba5b91bbf207 100644 (file)
@@ -2,7 +2,7 @@ error[E0391]: cycle detected when const-evaluating + checking `FOO`
   --> $DIR/recursive-static-definition.rs:1:1
    |
 LL | pub static FOO: u32 = FOO;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^
    |
 note: ...which requires const-evaluating + checking `FOO`...
   --> $DIR/recursive-static-definition.rs:1:23
index a9159562d9d512858354816138493869f75349e5..acbd0d05984f12eaf6afa7e9459e57e40de9b601 100644 (file)
@@ -9,15 +9,11 @@ LL |     let Ok(x) = res;
 note: `Result<u32, &R>` defined here
   --> $SRC_DIR/core/src/result.rs:LL:COL
    |
-LL | / pub enum Result<T, E> {
-LL | |     /// Contains the success value
-LL | |     #[lang = "Ok"]
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-...  |
-LL | |     Err(#[stable(feature = "rust1", since = "1.0.0")] E),
-   | |     ^^^ not covered
-LL | | }
-   | |_-
+LL | pub enum Result<T, E> {
+   | ---------------------
+...
+LL |     Err(#[stable(feature = "rust1", since = "1.0.0")] E),
+   |     ^^^ not covered
    = note: the matched value is of type `Result<u32, &R>`
 help: you might want to use `if let` to ignore the variant that isn't matched
    |
index 32f9bb8bf33d9705ebc2bc018fd4b4d7661e279f..531004e8e202bea3fc26e5de37ee83c8dc83cd09 100644 (file)
@@ -2,25 +2,25 @@ error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
   --> $DIR/repr-packed-contains-align.rs:19:1
    |
 LL | struct SC(SA);
-   | ^^^^^^^^^^^^^^
+   | ^^^^^^^^^
    |
 note: `SA` has a `#[repr(align)]` attribute
   --> $DIR/repr-packed-contains-align.rs:5:1
    |
 LL | struct SA(i32);
-   | ^^^^^^^^^^^^^^^
+   | ^^^^^^^^^
 
 error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
   --> $DIR/repr-packed-contains-align.rs:22:1
    |
 LL | struct SD(SB);
-   | ^^^^^^^^^^^^^^
+   | ^^^^^^^^^
    |
 note: `SA` has a `#[repr(align)]` attribute
   --> $DIR/repr-packed-contains-align.rs:5:1
    |
 LL | struct SA(i32);
-   | ^^^^^^^^^^^^^^^
+   | ^^^^^^^^^
 note: `SD` contains a field of type `SB`
   --> $DIR/repr-packed-contains-align.rs:22:11
    |
@@ -36,29 +36,25 @@ error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
   --> $DIR/repr-packed-contains-align.rs:25:1
    |
 LL | struct SE(UA);
-   | ^^^^^^^^^^^^^^
+   | ^^^^^^^^^
    |
 note: `UA` has a `#[repr(align)]` attribute
   --> $DIR/repr-packed-contains-align.rs:10:1
    |
-LL | / union UA {
-LL | |     i: i32
-LL | | }
-   | |_^
+LL | union UA {
+   | ^^^^^^^^
 
 error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
   --> $DIR/repr-packed-contains-align.rs:28:1
    |
 LL | struct SF(UB);
-   | ^^^^^^^^^^^^^^
+   | ^^^^^^^^^
    |
 note: `UA` has a `#[repr(align)]` attribute
   --> $DIR/repr-packed-contains-align.rs:10:1
    |
-LL | / union UA {
-LL | |     i: i32
-LL | | }
-   | |_^
+LL | union UA {
+   | ^^^^^^^^
 note: `SF` contains a field of type `UB`
   --> $DIR/repr-packed-contains-align.rs:28:11
    |
@@ -73,34 +69,26 @@ LL |     a: UA
 error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
   --> $DIR/repr-packed-contains-align.rs:31:1
    |
-LL | / union UC {
-LL | |     a: UA
-LL | | }
-   | |_^
+LL | union UC {
+   | ^^^^^^^^
    |
 note: `UA` has a `#[repr(align)]` attribute
   --> $DIR/repr-packed-contains-align.rs:10:1
    |
-LL | / union UA {
-LL | |     i: i32
-LL | | }
-   | |_^
+LL | union UA {
+   | ^^^^^^^^
 
 error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
   --> $DIR/repr-packed-contains-align.rs:36:1
    |
-LL | / union UD {
-LL | |     n: UB
-LL | | }
-   | |_^
+LL | union UD {
+   | ^^^^^^^^
    |
 note: `UA` has a `#[repr(align)]` attribute
   --> $DIR/repr-packed-contains-align.rs:10:1
    |
-LL | / union UA {
-LL | |     i: i32
-LL | | }
-   | |_^
+LL | union UA {
+   | ^^^^^^^^
 note: `UD` contains a field of type `UB`
   --> $DIR/repr-packed-contains-align.rs:37:5
    |
@@ -115,30 +103,26 @@ LL |     a: UA
 error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
   --> $DIR/repr-packed-contains-align.rs:41:1
    |
-LL | / union UE {
-LL | |     a: SA
-LL | | }
-   | |_^
+LL | union UE {
+   | ^^^^^^^^
    |
 note: `SA` has a `#[repr(align)]` attribute
   --> $DIR/repr-packed-contains-align.rs:5:1
    |
 LL | struct SA(i32);
-   | ^^^^^^^^^^^^^^^
+   | ^^^^^^^^^
 
 error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
   --> $DIR/repr-packed-contains-align.rs:46:1
    |
-LL | / union UF {
-LL | |     n: SB
-LL | | }
-   | |_^
+LL | union UF {
+   | ^^^^^^^^
    |
 note: `SA` has a `#[repr(align)]` attribute
   --> $DIR/repr-packed-contains-align.rs:5:1
    |
 LL | struct SA(i32);
-   | ^^^^^^^^^^^^^^^
+   | ^^^^^^^^^
 note: `UF` contains a field of type `SB`
   --> $DIR/repr-packed-contains-align.rs:47:5
    |
index c488755cc242c389db7744bf35d0b685d0b6c4ce..3dc13b1c13c97685b64db0f58e8021bf3835d97c 100644 (file)
@@ -10,7 +10,7 @@ note: the type is defined here
   --> $DIR/repr-transparent-issue-87496.rs:6:1
    |
 LL | struct TransparentCustomZst(());
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: 1 warning emitted
 
index 001a181881f14cf5775fc3b9e0b73c89e0b86e8b..6ff3641bc15d0008c5bcd1d1a30cb6c7a76a6a1f 100644 (file)
@@ -2,9 +2,8 @@ error[E0690]: transparent struct needs at most one non-zero-sized field, but has
   --> $DIR/repr-transparent.rs:26:1
    |
 LL | struct MultipleNonZst(u8, u8);
-   | ^^^^^^^^^^^^^^^^^^^^^^--^^--^^
-   | |                     |   |
-   | |                     |   this field is non-zero-sized
+   | ^^^^^^^^^^^^^^^^^^^^^ --  -- this field is non-zero-sized
+   | |                     |
    | |                     this field is non-zero-sized
    | needs at most one non-zero-sized field, but has 2
 
@@ -12,9 +11,8 @@ error[E0690]: transparent struct needs at most one non-zero-sized field, but has
   --> $DIR/repr-transparent.rs:32:1
    |
 LL | pub struct StructWithProjection(f32, <f32 as Mirror>::It);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---^^-------------------^^
-   | |                               |    |
-   | |                               |    this field is non-zero-sized
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---  ------------------- this field is non-zero-sized
+   | |                               |
    | |                               this field is non-zero-sized
    | needs at most one non-zero-sized field, but has 2
 
index 0dcf0184db107005eea351fffa5a01fb6408d08d..f839bd4243229d7d46109ab44bf0e883ae51b31c 100644 (file)
@@ -1,10 +1,10 @@
-error[E0391]: cycle detected when computing type of `<impl at $DIR/issue-23305.rs:5:1: 5:24>`
+error[E0391]: cycle detected when computing type of `<impl at $DIR/issue-23305.rs:5:1: 5:21>`
   --> $DIR/issue-23305.rs:5:16
    |
 LL | impl dyn ToNbt<Self> {}
    |                ^^^^
    |
-   = note: ...which immediately requires computing type of `<impl at $DIR/issue-23305.rs:5:1: 5:24>` again
+   = note: ...which immediately requires computing type of `<impl at $DIR/issue-23305.rs:5:1: 5:21>` again
 note: cycle used when collecting item types in top-level module
   --> $DIR/issue-23305.rs:1:1
    |
index ada053014ef5eb38e064fcf7c2c7c54ab94d6d09..17a666a401ce85a6387ab82d08d31f9aa7191132 100644 (file)
@@ -114,7 +114,7 @@ note: the tuple struct constructor `S` is defined here
   --> $DIR/auxiliary/privacy-struct-ctor.rs:2:5
    |
 LL |     pub struct S(u8);
-   |     ^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^
 
 error[E0603]: tuple struct constructor `Z` is private
   --> $DIR/privacy-struct-ctor.rs:45:19
@@ -131,7 +131,7 @@ note: the tuple struct constructor `Z` is defined here
   --> $DIR/auxiliary/privacy-struct-ctor.rs:5:9
    |
 LL |         pub(in m) struct Z(pub(in m::n) u8);
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 10 previous errors
 
index 7f623e47353b93844e778705354cfd6ac99bc1bf..aa99c1a33352e2d79cef5533154da4120f7225cf 100644 (file)
@@ -1,10 +1,10 @@
-error[E0391]: cycle detected when computing type of `<impl at $DIR/resolve-self-in-impl.rs:14:1: 14:20>`
+error[E0391]: cycle detected when computing type of `<impl at $DIR/resolve-self-in-impl.rs:14:1: 14:17>`
   --> $DIR/resolve-self-in-impl.rs:14:13
    |
 LL | impl Tr for Self {}
    |             ^^^^
    |
-   = note: ...which immediately requires computing type of `<impl at $DIR/resolve-self-in-impl.rs:14:1: 14:20>` again
+   = note: ...which immediately requires computing type of `<impl at $DIR/resolve-self-in-impl.rs:14:1: 14:17>` again
 note: cycle used when collecting item types in top-level module
   --> $DIR/resolve-self-in-impl.rs:1:1
    |
@@ -17,13 +17,13 @@ LL | |
 LL | | fn main() {}
    | |____________^
 
-error[E0391]: cycle detected when computing type of `<impl at $DIR/resolve-self-in-impl.rs:15:1: 15:23>`
+error[E0391]: cycle detected when computing type of `<impl at $DIR/resolve-self-in-impl.rs:15:1: 15:20>`
   --> $DIR/resolve-self-in-impl.rs:15:15
    |
 LL | impl Tr for S<Self> {}
    |               ^^^^
    |
-   = note: ...which immediately requires computing type of `<impl at $DIR/resolve-self-in-impl.rs:15:1: 15:23>` again
+   = note: ...which immediately requires computing type of `<impl at $DIR/resolve-self-in-impl.rs:15:1: 15:20>` again
 note: cycle used when collecting item types in top-level module
   --> $DIR/resolve-self-in-impl.rs:1:1
    |
@@ -36,13 +36,13 @@ LL | |
 LL | | fn main() {}
    | |____________^
 
-error[E0391]: cycle detected when computing type of `<impl at $DIR/resolve-self-in-impl.rs:16:1: 16:13>`
+error[E0391]: cycle detected when computing type of `<impl at $DIR/resolve-self-in-impl.rs:16:1: 16:10>`
   --> $DIR/resolve-self-in-impl.rs:16:6
    |
 LL | impl Self {}
    |      ^^^^
    |
-   = note: ...which immediately requires computing type of `<impl at $DIR/resolve-self-in-impl.rs:16:1: 16:13>` again
+   = note: ...which immediately requires computing type of `<impl at $DIR/resolve-self-in-impl.rs:16:1: 16:10>` again
 note: cycle used when collecting item types in top-level module
   --> $DIR/resolve-self-in-impl.rs:1:1
    |
@@ -55,13 +55,13 @@ LL | |
 LL | | fn main() {}
    | |____________^
 
-error[E0391]: cycle detected when computing type of `<impl at $DIR/resolve-self-in-impl.rs:17:1: 17:16>`
+error[E0391]: cycle detected when computing type of `<impl at $DIR/resolve-self-in-impl.rs:17:1: 17:13>`
   --> $DIR/resolve-self-in-impl.rs:17:8
    |
 LL | impl S<Self> {}
    |        ^^^^
    |
-   = note: ...which immediately requires computing type of `<impl at $DIR/resolve-self-in-impl.rs:17:1: 17:16>` again
+   = note: ...which immediately requires computing type of `<impl at $DIR/resolve-self-in-impl.rs:17:1: 17:13>` again
 note: cycle used when collecting item types in top-level module
   --> $DIR/resolve-self-in-impl.rs:1:1
    |
@@ -74,13 +74,13 @@ LL | |
 LL | | fn main() {}
    | |____________^
 
-error[E0391]: cycle detected when computing trait implemented by `<impl at $DIR/resolve-self-in-impl.rs:18:1: 18:26>`
+error[E0391]: cycle detected when computing trait implemented by `<impl at $DIR/resolve-self-in-impl.rs:18:1: 18:23>`
   --> $DIR/resolve-self-in-impl.rs:18:1
    |
 LL | impl Tr<Self::A> for S {}
    | ^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: ...which immediately requires computing trait implemented by `<impl at $DIR/resolve-self-in-impl.rs:18:1: 18:26>` again
+   = note: ...which immediately requires computing trait implemented by `<impl at $DIR/resolve-self-in-impl.rs:18:1: 18:23>` again
 note: cycle used when collecting item types in top-level module
   --> $DIR/resolve-self-in-impl.rs:1:1
    |
index 10d30ec1a1b189941d8143a2b559d264b3718895..0f567125432b2115dbf4606bbe9684ca8d3694df 100644 (file)
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/const.rs:14:9
    |
 LL | const FOO: Foo = Foo{bar: 5};
-   | ----------------------------- constant defined here
+   | -------------- constant defined here
 ...
 LL |     match &f {
    |           -- this expression has type `&Foo`
index 5ef078c20057df6faeb2dd592a53b16358fb7f21..872cb9b8bc68e92603308e4c3707661a7380e984 100644 (file)
@@ -8,7 +8,7 @@ note: `EmptyNonExhaustiveEnum` defined here
   --> $DIR/auxiliary/enums.rs:18:1
    |
 LL | pub enum EmptyNonExhaustiveEnum {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: the matched value is of type `EmptyNonExhaustiveEnum`, which is marked as non-exhaustive
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
@@ -26,12 +26,8 @@ LL |     match enum_unit {
 note: `NonExhaustiveEnum` defined here
   --> $DIR/auxiliary/enums.rs:4:1
    |
-LL | / pub enum NonExhaustiveEnum {
-LL | |     Unit,
-LL | |     Tuple(u32),
-LL | |     Struct { field: u32 },
-LL | | }
-   | |_^
+LL | pub enum NonExhaustiveEnum {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: the matched value is of type `NonExhaustiveEnum`, which is marked as non-exhaustive
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
@@ -48,12 +44,8 @@ LL |     match enum_unit {};
 note: `NonExhaustiveEnum` defined here
   --> $DIR/auxiliary/enums.rs:4:1
    |
-LL | / pub enum NonExhaustiveEnum {
-LL | |     Unit,
-LL | |     Tuple(u32),
-LL | |     Struct { field: u32 },
-LL | | }
-   | |_^
+LL | pub enum NonExhaustiveEnum {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: the matched value is of type `NonExhaustiveEnum`, which is marked as non-exhaustive
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
index 272b2ef6ee1d1c33e4ca036e16264c4805f795a5..2b34d0711793f61e64a9a40bfc3887a791edd431 100644 (file)
@@ -25,7 +25,7 @@ note: the tuple struct constructor `TupleStruct` is defined here
   --> $DIR/auxiliary/structs.rs:12:1
    |
 LL | pub struct TupleStruct(pub u16, pub u16);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0603]: unit struct `UnitStruct` is private
   --> $DIR/struct.rs:32:32
@@ -37,7 +37,7 @@ note: the unit struct `UnitStruct` is defined here
   --> $DIR/auxiliary/structs.rs:9:1
    |
 LL | pub struct UnitStruct;
-   | ^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^
 
 error[E0639]: cannot create non-exhaustive struct using struct expression
   --> $DIR/struct.rs:7:14
index 2dc4eabb8630a141b551cc9cb65cae9e40e399f7..66e93291c72a0b2ee87f928da08fafab25d1d16c 100644 (file)
@@ -8,7 +8,7 @@ note: `IndirectUninhabitedEnum` defined here
   --> $DIR/auxiliary/uninhabited.rs:26:1
    |
 LL | pub struct IndirectUninhabitedEnum(UninhabitedEnum);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: the matched value is of type `IndirectUninhabitedEnum`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
@@ -27,7 +27,7 @@ note: `IndirectUninhabitedStruct` defined here
   --> $DIR/auxiliary/uninhabited.rs:28:1
    |
 LL | pub struct IndirectUninhabitedStruct(UninhabitedStruct);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: the matched value is of type `IndirectUninhabitedStruct`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
@@ -46,7 +46,7 @@ note: `IndirectUninhabitedTupleStruct` defined here
   --> $DIR/auxiliary/uninhabited.rs:30:1
    |
 LL | pub struct IndirectUninhabitedTupleStruct(UninhabitedTupleStruct);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: the matched value is of type `IndirectUninhabitedTupleStruct`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
@@ -65,7 +65,7 @@ note: `IndirectUninhabitedVariants` defined here
   --> $DIR/auxiliary/uninhabited.rs:32:1
    |
 LL | pub struct IndirectUninhabitedVariants(UninhabitedVariants);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: the matched value is of type `IndirectUninhabitedVariants`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
index f0cb13de3f799b9043fd0aea3ba3afdfd46c1208..ef97c1fa17f3955f53374a06001571e8fc69be9c 100644 (file)
@@ -8,7 +8,7 @@ note: `IndirectUninhabitedEnum` defined here
   --> $DIR/auxiliary/uninhabited.rs:26:1
    |
 LL | pub struct IndirectUninhabitedEnum(UninhabitedEnum);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: the matched value is of type `IndirectUninhabitedEnum`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
@@ -27,7 +27,7 @@ note: `IndirectUninhabitedStruct` defined here
   --> $DIR/auxiliary/uninhabited.rs:28:1
    |
 LL | pub struct IndirectUninhabitedStruct(UninhabitedStruct);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: the matched value is of type `IndirectUninhabitedStruct`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
@@ -46,7 +46,7 @@ note: `IndirectUninhabitedTupleStruct` defined here
   --> $DIR/auxiliary/uninhabited.rs:30:1
    |
 LL | pub struct IndirectUninhabitedTupleStruct(UninhabitedTupleStruct);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: the matched value is of type `IndirectUninhabitedTupleStruct`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
@@ -65,7 +65,7 @@ note: `IndirectUninhabitedVariants` defined here
   --> $DIR/auxiliary/uninhabited.rs:32:1
    |
 LL | pub struct IndirectUninhabitedVariants(UninhabitedVariants);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: the matched value is of type `IndirectUninhabitedVariants`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
index 49febd9241dc6e9cceb1e5dd6511c8910b6afbae..32a5c07f19688ddb90690eda5ca2ca9932a8011d 100644 (file)
@@ -7,9 +7,8 @@ LL |     match x {}
 note: `UninhabitedEnum` defined here
   --> $DIR/auxiliary/uninhabited.rs:5:1
    |
-LL | / pub enum UninhabitedEnum {
-LL | | }
-   | |_^
+LL | pub enum UninhabitedEnum {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
    = note: the matched value is of type `UninhabitedEnum`, which is marked as non-exhaustive
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
@@ -27,10 +26,8 @@ LL |     match x {}
 note: `UninhabitedStruct` defined here
   --> $DIR/auxiliary/uninhabited.rs:9:1
    |
-LL | / pub struct UninhabitedStruct {
-LL | |     _priv: !,
-LL | | }
-   | |_^
+LL | pub struct UninhabitedStruct {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: the matched value is of type `UninhabitedStruct`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
@@ -49,7 +46,7 @@ note: `UninhabitedTupleStruct` defined here
   --> $DIR/auxiliary/uninhabited.rs:14:1
    |
 LL | pub struct UninhabitedTupleStruct(!);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: the matched value is of type `UninhabitedTupleStruct`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
@@ -67,13 +64,12 @@ LL |     match x {}
 note: `UninhabitedVariants` defined here
   --> $DIR/auxiliary/uninhabited.rs:17:23
    |
-LL | / pub enum UninhabitedVariants {
-LL | |     #[non_exhaustive] Tuple(!),
-   | |                       ^^^^^ not covered
-LL | |     #[non_exhaustive] Struct { x: ! }
-   | |                       ^^^^^^ not covered
-LL | | }
-   | |_-
+LL | pub enum UninhabitedVariants {
+   | ----------------------------
+LL |     #[non_exhaustive] Tuple(!),
+   |                       ^^^^^ not covered
+LL |     #[non_exhaustive] Struct { x: ! }
+   |                       ^^^^^^ not covered
    = note: the matched value is of type `UninhabitedVariants`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
index e18c2678d323c2f4d60498067b71fc817171f02c..d854ea28ff68dbcb7da566545d20d4e735b371ac 100644 (file)
@@ -7,9 +7,8 @@ LL |     match x {}
 note: `UninhabitedEnum` defined here
   --> $DIR/auxiliary/uninhabited.rs:5:1
    |
-LL | / pub enum UninhabitedEnum {
-LL | | }
-   | |_^
+LL | pub enum UninhabitedEnum {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
    = note: the matched value is of type `UninhabitedEnum`, which is marked as non-exhaustive
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
@@ -27,10 +26,8 @@ LL |     match x {}
 note: `UninhabitedStruct` defined here
   --> $DIR/auxiliary/uninhabited.rs:9:1
    |
-LL | / pub struct UninhabitedStruct {
-LL | |     _priv: !,
-LL | | }
-   | |_^
+LL | pub struct UninhabitedStruct {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: the matched value is of type `UninhabitedStruct`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
@@ -49,7 +46,7 @@ note: `UninhabitedTupleStruct` defined here
   --> $DIR/auxiliary/uninhabited.rs:14:1
    |
 LL | pub struct UninhabitedTupleStruct(!);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: the matched value is of type `UninhabitedTupleStruct`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
@@ -67,13 +64,12 @@ LL |     match x {}
 note: `UninhabitedVariants` defined here
   --> $DIR/auxiliary/uninhabited.rs:17:23
    |
-LL | / pub enum UninhabitedVariants {
-LL | |     #[non_exhaustive] Tuple(!),
-   | |                       ^^^^^ not covered
-LL | |     #[non_exhaustive] Struct { x: ! }
-   | |                       ^^^^^^ not covered
-LL | | }
-   | |_-
+LL | pub enum UninhabitedVariants {
+   | ----------------------------
+LL |     #[non_exhaustive] Tuple(!),
+   |                       ^^^^^ not covered
+LL |     #[non_exhaustive] Struct { x: ! }
+   |                       ^^^^^^ not covered
    = note: the matched value is of type `UninhabitedVariants`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
index 1da8e648251ad0d71ed6cad3e8995b7336f1fb1f..76300cce55cd42d198273ac716135d9d464d9c4d 100644 (file)
@@ -1,10 +1,8 @@
 error: rustc_outlives
   --> $DIR/cross-crate.rs:4:1
    |
-LL | / struct Foo<'a, T> {
-LL | |     bar: std::slice::IterMut<'a, T>
-LL | | }
-   | |_^
+LL | struct Foo<'a, T> {
+   | ^^^^^^^^^^^^^^^^^
    |
    = note: T: 'a
 
index 868ca2c4587d12159c1176d11ec3264b23a8195b..b6ce2450e22aa16912786d8f7da62deed0c13c7c 100644 (file)
@@ -1,30 +1,24 @@
 error: rustc_outlives
   --> $DIR/enum.rs:7:1
    |
-LL | / enum Foo<'a, T> {
-LL | |     One(Bar<'a, T>)
-LL | | }
-   | |_^
+LL | enum Foo<'a, T> {
+   | ^^^^^^^^^^^^^^^
    |
    = note: T: 'a
 
 error: rustc_outlives
   --> $DIR/enum.rs:13:1
    |
-LL | / struct Bar<'b, U> {
-LL | |     field2: &'b U
-LL | | }
-   | |_^
+LL | struct Bar<'b, U> {
+   | ^^^^^^^^^^^^^^^^^
    |
    = note: U: 'b
 
 error: rustc_outlives
   --> $DIR/enum.rs:19:1
    |
-LL | / enum Ying<'c, K> {
-LL | |     One(&'c Yang<K>)
-LL | | }
-   | |_^
+LL | enum Ying<'c, K> {
+   | ^^^^^^^^^^^^^^^^
    |
    = note: K: 'c
 
index 4608962c7c3f8bff490c21c3912989741d9500c0..595a5c28088d6188f805170a756ae575849d78f2 100644 (file)
@@ -1,11 +1,8 @@
 error: rustc_outlives
   --> $DIR/explicit-dyn.rs:7:1
    |
-LL | / struct Foo<'a, A>
-LL | | {
-LL | |     foo: Box<dyn Trait<'a, A>>
-LL | | }
-   | |_^
+LL | struct Foo<'a, A>
+   | ^^^^^^^^^^^^^^^^^
    |
    = note: A: 'a
 
index 062f5d5e9a73d340aea99756ba8c90b8a613516c..3059f95aefbd1f2a1c695ff6aba99fed5f53a7ec 100644 (file)
@@ -1,10 +1,8 @@
 error: rustc_outlives
   --> $DIR/explicit-enum.rs:4:1
    |
-LL | / enum Foo<'a, U> {
-LL | |     One(Bar<'a, U>)
-LL | | }
-   | |_^
+LL | enum Foo<'a, U> {
+   | ^^^^^^^^^^^^^^^
    |
    = note: U: 'a
 
index a85aa3d7565bab7af4c41ee97cc6174996007ec6..589e95899132d9870ef5ecffc8f8b9c21b9d8b4b 100644 (file)
@@ -1,11 +1,8 @@
 error: rustc_outlives
   --> $DIR/explicit-projection.rs:8:1
    |
-LL | / struct Foo<'a, A, B> where A: Trait<'a, B>
-LL | | {
-LL | |     foo: <A as Trait<'a, B>>::Type
-LL | | }
-   | |_^
+LL | struct Foo<'a, A, B> where A: Trait<'a, B>
+   | ^^^^^^^^^^^^^^^^^^^^
    |
    = note: B: 'a
 
index 309c54bb44934004a48811165bb9023795f872fd..9912e36b29c1add3144094ea05e7479279c52f94 100644 (file)
@@ -1,10 +1,8 @@
 error: rustc_outlives
   --> $DIR/explicit-struct.rs:4:1
    |
-LL | / struct Foo<'b, U> {
-LL | |     bar: Bar<'b, U>
-LL | | }
-   | |_^
+LL | struct Foo<'b, U> {
+   | ^^^^^^^^^^^^^^^^^
    |
    = note: U: 'b
 
index 47c283faf5073b09f6442517e022e1eba60d1f71..2c6d06aa8c7f526a5f96153487eda414b5b13c13 100644 (file)
@@ -1,10 +1,8 @@
 error: rustc_outlives
   --> $DIR/explicit-union.rs:5:1
    |
-LL | / union Foo<'b, U: Copy> {
-LL | |     bar: Bar<'b, U>
-LL | | }
-   | |_^
+LL | union Foo<'b, U: Copy> {
+   | ^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: U: 'b
 
index 10387f51b1e448dcfb785cc53ef7846e2303a970..4350e6e8beec25a2488e6639b46e1dd4473ed6d6 100644 (file)
@@ -1,11 +1,8 @@
 error: rustc_outlives
   --> $DIR/nested-enum.rs:4:1
    |
-LL | / enum Foo<'a, T> {
-LL | |
-LL | |     One(Bar<'a, T>)
-LL | | }
-   | |_^
+LL | enum Foo<'a, T> {
+   | ^^^^^^^^^^^^^^^
    |
    = note: T: 'a
 
index ffdd5542bb4b51a956e475d8b628e9d7132e4d98..c08add7ededec54a5179306e1cf5b5a7055d0ccf 100644 (file)
@@ -1,10 +1,8 @@
 error: rustc_outlives
   --> $DIR/nested-regions.rs:4:1
    |
-LL | / struct Foo<'a, 'b, T> {
-LL | |     x: &'a &'b T
-LL | | }
-   | |_^
+LL | struct Foo<'a, 'b, T> {
+   | ^^^^^^^^^^^^^^^^^^^^^
    |
    = note: 'b: 'a
    = note: T: 'a
index 86bcbe640e4bc1b5c3316b74d4810a3000aaa923..76955523443706859161d7ade34e4b5273664455 100644 (file)
@@ -1,10 +1,8 @@
 error: rustc_outlives
   --> $DIR/nested-structs.rs:4:1
    |
-LL | / struct Foo<'a, T> {
-LL | |     field1: Bar<'a, T>
-LL | | }
-   | |_^
+LL | struct Foo<'a, T> {
+   | ^^^^^^^^^^^^^^^^^
    |
    = note: T: 'a
 
index e0f248fa38a049334fde2a1f122c63841374b986..0116a2a68ceb252f07bad6f13ea83ab6efeacef8 100644 (file)
@@ -1,10 +1,8 @@
 error: rustc_outlives
   --> $DIR/nested-union.rs:5:1
    |
-LL | / union Foo<'a, T: Copy> {
-LL | |     field1: Bar<'a, T>
-LL | | }
-   | |_^
+LL | union Foo<'a, T: Copy> {
+   | ^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: T: 'a
 
index 840676e796671c5f4ab3264dcf959a224747db8e..d9342013f554f84b0d3e569174e1e93f49c3e5e7 100644 (file)
@@ -1,10 +1,8 @@
 error: rustc_outlives
   --> $DIR/projection.rs:4:1
    |
-LL | / struct Foo<'a, T: Iterator> {
-LL | |     bar: &'a T::Item
-LL | | }
-   | |_^
+LL | struct Foo<'a, T: Iterator> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: <T as Iterator>::Item: 'a
 
index d69aaf6f849facea00f8d8ffef94ec1068904070..5081143578177edcf1ddb8ed700a17a5caa046c0 100644 (file)
@@ -1,10 +1,8 @@
 error: rustc_outlives
   --> $DIR/reference.rs:4:1
    |
-LL | / struct Foo<'a, T> {
-LL | |     bar: &'a T,
-LL | | }
-   | |_^
+LL | struct Foo<'a, T> {
+   | ^^^^^^^^^^^^^^^^^
    |
    = note: T: 'a
 
index 7836b3f5aabedf0eed84b8bd851570a80aeb6763..9c836b190cff994e77dd8beeb69400d3e372719a 100644 (file)
@@ -1,11 +1,8 @@
 error: rustc_outlives
   --> $DIR/self-dyn.rs:8:1
    |
-LL | / struct Foo<'a, 'b, A>
-LL | | {
-LL | |     foo: Box<dyn Trait<'a, 'b, A>>
-LL | | }
-   | |_^
+LL | struct Foo<'a, 'b, A>
+   | ^^^^^^^^^^^^^^^^^^^^^
    |
    = note: A: 'a
 
index b972ad8446602c062fbe2ae98b8651063cac55a2..2b4625f77a5e384f7699975ae21976d945202d04 100644 (file)
@@ -1,10 +1,8 @@
 error: rustc_outlives
   --> $DIR/self-structs.rs:4:1
    |
-LL | / struct Foo<'a, 'b, T> {
-LL | |     field1: dyn Bar<'a, 'b, T>
-LL | | }
-   | |_^
+LL | struct Foo<'a, 'b, T> {
+   | ^^^^^^^^^^^^^^^^^^^^^
    |
    = note: T: 'a
 
index f122d8bb0dc6724668caa4d6e32d121f1cf979f9..2a6bd1b0fd58af1e4c1a54fa55f48759bc3ef637 100644 (file)
@@ -2,37 +2,37 @@ error[E0075]: SIMD vector cannot be empty
   --> $DIR/type-len.rs:6:1
    |
 LL | struct empty;
-   | ^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0075]: SIMD vector cannot be empty
   --> $DIR/type-len.rs:9:1
    |
 LL | struct empty2([f32; 0]);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^
 
 error[E0076]: SIMD vector should be homogeneous
   --> $DIR/type-len.rs:15:1
    |
 LL | struct i64f64(i64, f64);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^ SIMD elements must have the same type
+   | ^^^^^^^^^^^^^ SIMD elements must have the same type
 
 error[E0077]: SIMD vector element type should be a primitive scalar (integer/float/pointer) type
   --> $DIR/type-len.rs:20:1
    |
 LL | struct FooV(Foo, Foo);
-   | ^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^
 
 error[E0077]: SIMD vector element type should be a primitive scalar (integer/float/pointer) type
   --> $DIR/type-len.rs:23:1
    |
 LL | struct FooV2([Foo; 2]);
-   | ^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0075]: SIMD vector cannot have more than 32768 elements
   --> $DIR/type-len.rs:26:1
    |
 LL | struct TooBig([f32; 65536]);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^
 
 error: aborting due to 6 previous errors
 
index 82ef13f3362d461a9eeee3f3c542059a2e9f4921..f919092f9ee9289712b127311d66cee41046c388 100644 (file)
@@ -38,7 +38,7 @@ error[E0046]: not all trait items implemented, missing: `MY_CONST`
   --> $DIR/impl-wrong-item-for-trait.rs:19:1
    |
 LL |     const MY_CONST: u32;
-   |     -------------------- `MY_CONST` from trait
+   |     ------------------- `MY_CONST` from trait
 ...
 LL | impl Foo for FooMethodForConst {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `MY_CONST` in implementation
index e0cfe04cf418efd0abd29a058b358fe089387b42..eea94643e0a0aeb427d4472e6226097c3d6d60b3 100644 (file)
@@ -29,14 +29,8 @@ LL | enum World {
 note: the following trait must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
    |
-LL | / pub trait Add<Rhs = Self> {
-LL | |     /// The resulting type after applying the `+` operator.
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-LL | |     type Output;
-...  |
-LL | |     fn add(self, rhs: Rhs) -> Self::Output;
-LL | | }
-   | |_^
+LL | pub trait Add<Rhs = Self> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0369]: cannot add `String` to `&str`
   --> $DIR/issue-39018.rs:11:22
index acfc60b51f330892710429c476ccfbc1ba26f27e..79b13f45fd8ee9d7e22cd5fba490a56a6e24842b 100644 (file)
@@ -3,12 +3,10 @@ error[E0072]: recursive type `ListNode` has infinite size
    |
 LL | / struct
 LL | | ListNode
-LL | | {
-LL | |     head: u8,
-LL | |     tail: Option<ListNode>,
-   | |           ---------------- recursive without indirection
-LL | | }
-   | |_^ recursive type has infinite size
+   | |________^ recursive type has infinite size
+...
+LL |       tail: Option<ListNode>,
+   |             ---------------- recursive without indirection
    |
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `ListNode` representable
    |
index 2b3dfc5c135339669f31921a99de001b72c3b98a..4dc3e57211605bad455b4b0184e0d4f2049b4503 100644 (file)
@@ -1,19 +1,18 @@
 error: expected one of `!` or `::`, found `error`
   --> $DIR/auxiliary/transitive_dep_three.rs:6:27
    |
-LL | /         macro_rules! parse_error {
-LL | |             () => { parse error }
-   | |                           ^^^^^ expected one of `!` or `::`
-LL | |         }
-   | |_________- in this expansion of `transitive_dep_two::parse_error!`
+LL |         macro_rules! parse_error {
+   |         ------------------------ in this expansion of `transitive_dep_two::parse_error!`
+LL |             () => { parse error }
+   |                           ^^^^^ expected one of `!` or `::`
    |
   ::: $DIR/transitive-dep-span.rs:13:1
    |
-LL |   transitive_dep_two::parse_error!();
-   |   ----------------------------------
-   |   |
-   |   in this macro invocation
-   |   in this macro invocation
+LL | transitive_dep_two::parse_error!();
+   | ----------------------------------
+   | |
+   | in this macro invocation
+   | in this macro invocation
 
 error: aborting due to previous error
 
index 3f1a5495e212f573b9b491b63fb8c958515b899c..360b7bc787a2efc21689f37ff69d790c6a5ca901 100644 (file)
@@ -11,67 +11,55 @@ LL | #![feature(specialization)]
 error[E0520]: `foo` specializes an item from a parent `impl`, but that item is not marked `default`
   --> $DIR/specialization-no-default.rs:20:5
    |
-LL | / impl<T> Foo for T {
-LL | |     fn foo(&self) {}
-LL | |     fn bar(&self) {}
-LL | | }
-   | |_- parent `impl` is here
+LL | impl<T> Foo for T {
+   | ----------------- parent `impl` is here
 ...
-LL |       fn foo(&self) {}
-   |       ^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
+LL |     fn foo(&self) {}
+   |     ^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
    |
    = note: to specialize, `foo` in the parent `impl` must be marked `default`
 
 error[E0520]: `bar` specializes an item from a parent `impl`, but that item is not marked `default`
   --> $DIR/specialization-no-default.rs:23:5
    |
-LL | / impl<T> Foo for T {
-LL | |     fn foo(&self) {}
-LL | |     fn bar(&self) {}
-LL | | }
-   | |_- parent `impl` is here
+LL | impl<T> Foo for T {
+   | ----------------- parent `impl` is here
 ...
-LL |       fn bar(&self) {}
-   |       ^^^^^^^^^^^^^^^^ cannot specialize default item `bar`
+LL |     fn bar(&self) {}
+   |     ^^^^^^^^^^^^^^^^ cannot specialize default item `bar`
    |
    = note: to specialize, `bar` in the parent `impl` must be marked `default`
 
 error[E0520]: `T` specializes an item from a parent `impl`, but that item is not marked `default`
   --> $DIR/specialization-no-default.rs:37:5
    |
-LL | / impl<T> Bar for T {
-LL | |     type T = u8;
-LL | | }
-   | |_- parent `impl` is here
+LL | impl<T> Bar for T {
+   | ----------------- parent `impl` is here
 ...
-LL |       type T = ();
-   |       ^^^^^^^^^^^^ cannot specialize default item `T`
+LL |     type T = ();
+   |     ^^^^^^^^^^^^ cannot specialize default item `T`
    |
    = note: to specialize, `T` in the parent `impl` must be marked `default`
 
 error[E0520]: `baz` specializes an item from a parent `impl`, but that item is not marked `default`
   --> $DIR/specialization-no-default.rs:55:5
    |
-LL | / impl<T: Clone> Baz for T {
-LL | |     fn baz(&self) {}
-LL | | }
-   | |_- parent `impl` is here
+LL | impl<T: Clone> Baz for T {
+   | ------------------------ parent `impl` is here
 ...
-LL |       fn baz(&self) {}
-   |       ^^^^^^^^^^^^^^^^ cannot specialize default item `baz`
+LL |     fn baz(&self) {}
+   |     ^^^^^^^^^^^^^^^^ cannot specialize default item `baz`
    |
    = note: to specialize, `baz` in the parent `impl` must be marked `default`
 
 error[E0520]: `redundant` specializes an item from a parent `impl`, but that item is not marked `default`
   --> $DIR/specialization-no-default.rs:74:5
    |
-LL | / impl<T: Clone> Redundant for T {
-LL | |     fn redundant(&self) {}
-LL | | }
-   | |_- parent `impl` is here
+LL | impl<T: Clone> Redundant for T {
+   | ------------------------------ parent `impl` is here
 ...
-LL |       fn redundant(&self) {}
-   |       ^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `redundant`
+LL |     fn redundant(&self) {}
+   |     ^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `redundant`
    |
    = note: to specialize, `redundant` in the parent `impl` must be marked `default`
 
index d2350bc7e4f91fb46c5b99041d2f51b3ca7bcabe..53a22305e816bc97fc0b5877269f0f6b278a3a65 100644 (file)
@@ -12,7 +12,7 @@ error[E0599]: the method `foo_one` exists for struct `MyStruct`, but its trait b
   --> $DIR/specialization-trait-not-implemented.rs:22:29
    |
 LL | struct MyStruct;
-   | ----------------
+   | ---------------
    | |      |
    | |      method `foo_one` not found for this struct
    | doesn't satisfy `MyStruct: Foo`
@@ -21,18 +21,17 @@ LL |     println!("{}", MyStruct.foo_one());
    |                             ^^^^^^^ method cannot be called on `MyStruct` due to unsatisfied trait bounds
    |
 note: trait bound `MyStruct: Foo` was not satisfied
-  --> $DIR/specialization-trait-not-implemented.rs:14:17
+  --> $DIR/specialization-trait-not-implemented.rs:14:1
    |
 LL | default impl<T> Foo for T {
-   |                 ^^^     ^
+   | ^^^^^^^^^^^^^^^^---^^^^^-
+   | |
+   | unsatisfied trait bound introduced here
 note: the following trait must be implemented
   --> $DIR/specialization-trait-not-implemented.rs:7:1
    |
-LL | / trait Foo {
-LL | |     fn foo_one(&self) -> &'static str;
-LL | |     fn foo_two(&self) -> &'static str;
-LL | | }
-   | |_^
+LL | trait Foo {
+   | ^^^^^^^^^
    = help: items from traits can only be used if the trait is implemented and in scope
 note: `Foo` defines an item `foo_one`, perhaps you need to implement it
   --> $DIR/specialization-trait-not-implemented.rs:7:1
index 8e7c5037eff8fd1e3e938d8e798e1d822a8bf9c8..7249ad73871c99fd6457dd2acf0d12e07255d2b6 100644 (file)
@@ -11,13 +11,11 @@ LL | #![feature(specialization)]
 error[E0520]: `foo` specializes an item from a parent `impl`, but that item is not marked `default`
   --> $DIR/issue-50452-fail.rs:10:5
    |
-LL |       fn foo() {}
-   |       ^^^^^^^^^^^ cannot specialize default item `foo`
+LL |     fn foo() {}
+   |     ^^^^^^^^^^^ cannot specialize default item `foo`
 ...
-LL | / impl<T> Foo for T {
-LL | |     fn foo() {}
-LL | | }
-   | |_- parent `impl` is here
+LL | impl<T> Foo for T {
+   | ----------------- parent `impl` is here
    |
    = note: to specialize, `foo` in the parent `impl` must be marked `default`
 
index 8732b10d8f803bca0c227696354318472ddf5d29..6d24997a5bf52733ac2a99acc4e96937384063ba 100644 (file)
@@ -11,15 +11,11 @@ LL | #![feature(specialization)]
 error[E0119]: conflicting implementations of trait `IntoPyDictPointer` for type `()`
   --> $DIR/issue-52050.rs:28:1
    |
-LL | / impl<I> IntoPyDictPointer for I
-LL | | where
-LL | |     I: Iterator,
-LL | | {
-LL | | }
-   | |_- first implementation here
-LL |
-LL |   impl IntoPyDictPointer for ()
-   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `()`
+LL | impl<I> IntoPyDictPointer for I
+   | ------------------------------- first implementation here
+...
+LL | impl IntoPyDictPointer for ()
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `()`
    |
    = note: upstream crates may add a new impl of trait `std::iter::Iterator` for type `()` in future versions
 
index 6345cee2c3781ee529b387a016071ad2d9aafece..db5558f16be08bc223d672c61f1cb6be8b184f31 100644 (file)
@@ -1,20 +1,14 @@
 error: specializing impl repeats parameter `T`
   --> $DIR/dyn-trait-assoc-types.rs:22:1
    |
-LL | / impl<'a, T> Specializable for dyn B<T, Y = T> + 'a {
-LL | |
-LL | |     fn f() {}
-LL | | }
-   | |_^
+LL | impl<'a, T> Specializable for dyn B<T, Y = T> + 'a {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: specializing impl repeats parameter `T`
   --> $DIR/dyn-trait-assoc-types.rs:27:1
    |
-LL | / impl<'a, T> Specializable for dyn C<Y = (T, T)> + 'a {
-LL | |
-LL | |     fn f() {}
-LL | | }
-   | |_^
+LL | impl<'a, T> Specializable for dyn C<Y = (T, T)> + 'a {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
index 1a7eb82c95b3d85f9373439a5944b52d77afba7e..450984aacc787a151a387f934bdb65d42c265cce 100644 (file)
@@ -1,11 +1,8 @@
 error: cannot specialize on `Binder(ProjectionPredicate(ProjectionTy { substs: [V], item_def_id: DefId(0:6 ~ repeated_projection_type[54ea]::Id::This) }, Ty((I,))), [])`
   --> $DIR/repeated_projection_type.rs:19:1
    |
-LL | / impl<I, V: Id<This = (I,)>> X for V {
-LL | |
-LL | |     fn f() {}
-LL | | }
-   | |_^
+LL | impl<I, V: Id<This = (I,)>> X for V {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index ce9309f70122b90b8f0cf9c35abc72b6f55fbb42..16dccb10b45304195d43afa813ece16495d6019c 100644 (file)
@@ -1,11 +1,8 @@
 error: specializing impl repeats parameter `'a`
   --> $DIR/repeating_lifetimes.rs:14:1
    |
-LL | / impl<'a> X for (&'a u8, &'a u8) {
-LL | |
-LL | |     fn f() {}
-LL | | }
-   | |_^
+LL | impl<'a> X for (&'a u8, &'a u8) {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 8b4be1c499537b1e2160e51ce778b40e0e29980a..5e6adf723b54e54d7753310b29f4a293461d5267 100644 (file)
@@ -1,11 +1,8 @@
 error: specializing impl repeats parameter `T`
   --> $DIR/repeating_param.rs:12:1
    |
-LL | / impl<T> X for (T, T) {
-LL | |
-LL | |     fn f() {}
-LL | | }
-   | |_^
+LL | impl<T> X for (T, T) {
+   | ^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 964109dd10f4741e9b9043cc522f60143c506b06..b1ab58551e68048c3be415e0b06f47c39b9de177 100644 (file)
@@ -1,13 +1,8 @@
 error: cannot specialize on trait `HasMethod`
   --> $DIR/spec-marker-supertraits.rs:22:1
    |
-LL | / impl<T: Marker> Spec for T {
-LL | |
-LL | |     fn spec_me(&self) {
-LL | |         self.method();
-LL | |     }
-LL | | }
-   | |_^
+LL | impl<T: Marker> Spec for T {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index ffeced198211f0d148aa5ec6f3334be3a7727c74..b47c14f3c9fd1569c9a418ee36a520b38402c13b 100644 (file)
@@ -8,7 +8,7 @@ error[E0714]: marker traits cannot have associated items
   --> $DIR/specialization_marker.rs:13:5
    |
 LL |     type X;
-   |     ^^^^^^^
+   |     ^^^^^^
 
 error: aborting due to 2 previous errors
 
index 5782ad01b39f6e1bb9d4f6fa1b3dcf218180c504..1f2ff99d415680f8a00c9816a771ddde4dbf82de 100644 (file)
@@ -1,11 +1,8 @@
 error: cannot specialize on trait `Default`
   --> $DIR/specialization_super_trait.rs:13:1
    |
-LL | / impl<T: Default> SpecMarker for T {
-LL | |
-LL | |     fn f() {}
-LL | | }
-   | |_^
+LL | impl<T: Default> SpecMarker for T {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 8a70d6cc1bf21b8565fcacbba6a4416369730322..ecb07ba908eb79e59d4775166d620a49a96ddf0e 100644 (file)
@@ -1,29 +1,20 @@
 error: cannot specialize on `'static` lifetime
   --> $DIR/specialization_trait.rs:11:1
    |
-LL | / impl SpecMarker for &'static u8 {
-LL | |
-LL | |     fn f() {}
-LL | | }
-   | |_^
+LL | impl SpecMarker for &'static u8 {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: specializing impl repeats parameter `T`
   --> $DIR/specialization_trait.rs:16:1
    |
-LL | / impl<T> SpecMarker for (T, T) {
-LL | |
-LL | |     fn f() {}
-LL | | }
-   | |_^
+LL | impl<T> SpecMarker for (T, T) {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: cannot specialize on trait `Clone`
   --> $DIR/specialization_trait.rs:21:1
    |
-LL | / impl<T: Clone> SpecMarker for [T] {
-LL | |
-LL | |     fn f() {}
-LL | | }
-   | |_^
+LL | impl<T: Clone> SpecMarker for [T] {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 3 previous errors
 
index d1809d6dfbb527ef80ed8acd6dc7430f29977f89..9a16798f15cd1e77389972013bb0be5ba22dcd82 100644 (file)
@@ -1,11 +1,8 @@
 error: cannot specialize on `'static` lifetime
   --> $DIR/specialize_on_static.rs:13:1
    |
-LL | / impl X for &'static u8 {
-LL | |
-LL | |     fn f() {}
-LL | | }
-   | |_^
+LL | impl X for &'static u8 {
+   | ^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 35445fd09b949ce606225270583d5bf07be1e620..92daddbd8008f09dbcc00c7aae76dc3c56554c84 100644 (file)
@@ -1,11 +1,8 @@
 error: cannot specialize on trait `SpecMarker`
   --> $DIR/specialize_on_trait.rs:15:1
    |
-LL | / impl<T: SpecMarker> X for T {
-LL | |
-LL | |     fn f() {}
-LL | | }
-   | |_^
+LL | impl<T: SpecMarker> X for T {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 85ccbd809b02d0a1c30d40cad85d22f9a7b13ad3..8b7d6797275bb177bf17d9e17335e4e0403c23c3 100644 (file)
@@ -11,45 +11,33 @@ LL | #![feature(specialization, associated_type_defaults)]
 error[E0520]: `Ty` specializes an item from a parent `impl`, but that item is not marked `default`
   --> $DIR/non-defaulted-item-fail.rs:30:5
    |
-LL | / impl<T> Foo for Box<T> {
-LL | |     type Ty = bool;
-LL | |     const CONST: u8 = 0;
-LL | |     fn foo(&self) -> bool { false }
-LL | | }
-   | |_- parent `impl` is here
+LL | impl<T> Foo for Box<T> {
+   | ---------------------- parent `impl` is here
 ...
-LL |       type Ty = Vec<()>;
-   |       ^^^^^^^^^^^^^^^^^^ cannot specialize default item `Ty`
+LL |     type Ty = Vec<()>;
+   |     ^^^^^^^^^^^^^^^^^^ cannot specialize default item `Ty`
    |
    = note: to specialize, `Ty` in the parent `impl` must be marked `default`
 
 error[E0520]: `CONST` specializes an item from a parent `impl`, but that item is not marked `default`
   --> $DIR/non-defaulted-item-fail.rs:32:5
    |
-LL | / impl<T> Foo for Box<T> {
-LL | |     type Ty = bool;
-LL | |     const CONST: u8 = 0;
-LL | |     fn foo(&self) -> bool { false }
-LL | | }
-   | |_- parent `impl` is here
+LL | impl<T> Foo for Box<T> {
+   | ---------------------- parent `impl` is here
 ...
-LL |       const CONST: u8 = 42;
-   |       ^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `CONST`
+LL |     const CONST: u8 = 42;
+   |     ^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `CONST`
    |
    = note: to specialize, `CONST` in the parent `impl` must be marked `default`
 
 error[E0520]: `foo` specializes an item from a parent `impl`, but that item is not marked `default`
   --> $DIR/non-defaulted-item-fail.rs:34:5
    |
-LL | / impl<T> Foo for Box<T> {
-LL | |     type Ty = bool;
-LL | |     const CONST: u8 = 0;
-LL | |     fn foo(&self) -> bool { false }
-LL | | }
-   | |_- parent `impl` is here
+LL | impl<T> Foo for Box<T> {
+   | ---------------------- parent `impl` is here
 ...
-LL |       fn foo(&self) -> bool { true }
-   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
+LL |     fn foo(&self) -> bool { true }
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
    |
    = note: to specialize, `foo` in the parent `impl` must be marked `default`
 
@@ -57,7 +45,7 @@ error[E0520]: `Ty` specializes an item from a parent `impl`, but that item is no
   --> $DIR/non-defaulted-item-fail.rs:46:5
    |
 LL | impl<T> Foo for Vec<T> {}
-   | ------------------------- parent `impl` is here
+   | ---------------------- parent `impl` is here
 ...
 LL |     type Ty = Vec<()>;
    |     ^^^^^^^^^^^^^^^^^^ cannot specialize default item `Ty`
@@ -68,7 +56,7 @@ error[E0520]: `CONST` specializes an item from a parent `impl`, but that item is
   --> $DIR/non-defaulted-item-fail.rs:48:5
    |
 LL | impl<T> Foo for Vec<T> {}
-   | ------------------------- parent `impl` is here
+   | ---------------------- parent `impl` is here
 ...
 LL |     const CONST: u8 = 42;
    |     ^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `CONST`
@@ -79,7 +67,7 @@ error[E0520]: `foo` specializes an item from a parent `impl`, but that item is n
   --> $DIR/non-defaulted-item-fail.rs:50:5
    |
 LL | impl<T> Foo for Vec<T> {}
-   | ------------------------- parent `impl` is here
+   | ---------------------- parent `impl` is here
 ...
 LL |     fn foo(&self) -> bool { true }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
index 711c1fda1499d092d9a153493d6b4ceb10ecd2f0..28c869a70559b188c94373a24cddb042a661fe65 100644 (file)
@@ -11,67 +11,55 @@ LL | #![feature(specialization)]
 error[E0520]: `foo` specializes an item from a parent `impl`, but that item is not marked `default`
   --> $DIR/specialization-no-default.rs:20:5
    |
-LL | / impl<T> Foo for T {
-LL | |     fn foo(&self) {}
-LL | |     fn bar(&self) {}
-LL | | }
-   | |_- parent `impl` is here
+LL | impl<T> Foo for T {
+   | ----------------- parent `impl` is here
 ...
-LL |       fn foo(&self) {}
-   |       ^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
+LL |     fn foo(&self) {}
+   |     ^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
    |
    = note: to specialize, `foo` in the parent `impl` must be marked `default`
 
 error[E0520]: `bar` specializes an item from a parent `impl`, but that item is not marked `default`
   --> $DIR/specialization-no-default.rs:23:5
    |
-LL | / impl<T> Foo for T {
-LL | |     fn foo(&self) {}
-LL | |     fn bar(&self) {}
-LL | | }
-   | |_- parent `impl` is here
+LL | impl<T> Foo for T {
+   | ----------------- parent `impl` is here
 ...
-LL |       fn bar(&self) {}
-   |       ^^^^^^^^^^^^^^^^ cannot specialize default item `bar`
+LL |     fn bar(&self) {}
+   |     ^^^^^^^^^^^^^^^^ cannot specialize default item `bar`
    |
    = note: to specialize, `bar` in the parent `impl` must be marked `default`
 
 error[E0520]: `T` specializes an item from a parent `impl`, but that item is not marked `default`
   --> $DIR/specialization-no-default.rs:37:5
    |
-LL | / impl<T> Bar for T {
-LL | |     type T = u8;
-LL | | }
-   | |_- parent `impl` is here
+LL | impl<T> Bar for T {
+   | ----------------- parent `impl` is here
 ...
-LL |       type T = ();
-   |       ^^^^^^^^^^^^ cannot specialize default item `T`
+LL |     type T = ();
+   |     ^^^^^^^^^^^^ cannot specialize default item `T`
    |
    = note: to specialize, `T` in the parent `impl` must be marked `default`
 
 error[E0520]: `baz` specializes an item from a parent `impl`, but that item is not marked `default`
   --> $DIR/specialization-no-default.rs:55:5
    |
-LL | / impl<T: Clone> Baz for T {
-LL | |     fn baz(&self) {}
-LL | | }
-   | |_- parent `impl` is here
+LL | impl<T: Clone> Baz for T {
+   | ------------------------ parent `impl` is here
 ...
-LL |       fn baz(&self) {}
-   |       ^^^^^^^^^^^^^^^^ cannot specialize default item `baz`
+LL |     fn baz(&self) {}
+   |     ^^^^^^^^^^^^^^^^ cannot specialize default item `baz`
    |
    = note: to specialize, `baz` in the parent `impl` must be marked `default`
 
 error[E0520]: `redundant` specializes an item from a parent `impl`, but that item is not marked `default`
   --> $DIR/specialization-no-default.rs:74:5
    |
-LL | / impl<T: Clone> Redundant for T {
-LL | |     fn redundant(&self) {}
-LL | | }
-   | |_- parent `impl` is here
+LL | impl<T: Clone> Redundant for T {
+   | ------------------------------ parent `impl` is here
 ...
-LL |       default fn redundant(&self) {}
-   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `redundant`
+LL |     default fn redundant(&self) {}
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `redundant`
    |
    = note: to specialize, `redundant` in the parent `impl` must be marked `default`
 
index d731da79246ee643589b4bc8613ebbf213b7424c..b14e096d62a02f43481bf607110c63143764d567 100644 (file)
@@ -20,7 +20,7 @@ note: the static `private` is defined here
   --> $DIR/auxiliary/static_priv_by_default.rs:3:1
    |
 LL | static private: isize = 0;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
index 855e5dca92a7c1102a0c5e5ee9a0e2cf06870f53..10b86bb49869466f975f67402049bb8bf15f52c8 100644 (file)
@@ -27,7 +27,7 @@ error: static of uninhabited type
   --> $DIR/uninhabited-static.rs:12:1
    |
 LL | static VOID2: Void = unsafe { std::mem::transmute(()) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #74840 <https://github.com/rust-lang/rust/issues/74840>
@@ -37,7 +37,7 @@ error: static of uninhabited type
   --> $DIR/uninhabited-static.rs:16:1
    |
 LL | static NEVER2: Void = unsafe { std::mem::transmute(()) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #74840 <https://github.com/rust-lang/rust/issues/74840>
index d6163a5a7cfe3d2900d51421bd8816c56558b5d8..54122cb7360b438912caf6e4aafc7bcdf7f050b9 100644 (file)
@@ -19,7 +19,7 @@ LL | #[tests]
   ::: $SRC_DIR/core/src/macros/mod.rs:LL:COL
    |
 LL |     pub macro test($item:item) {
-   |     -------------------------- similarly named attribute macro `test` defined here
+   |     -------------- similarly named attribute macro `test` defined here
 
 error: cannot find attribute `deprcated` in this scope
   --> $DIR/attribute-typos.rs:1:3
index 784f1bdb6cf3d825e45693277dec41540828201b..c8b93f3dc48f43d8b457e65bb7b38ccaee4c37d2 100644 (file)
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/const-in-struct-pat.rs:8:17
    |
 LL | struct foo;
-   | ----------- unit struct defined here
+   | ---------- unit struct defined here
 ...
 LL |     let Thing { foo } = t;
    |                 ^^^     - this expression has type `Thing`
index af64c09d5cadb5e6d3858b6c7603c46a271165c8..618bcaca14c4de2c6e035a149f20ca9b7e74c3c5 100644 (file)
@@ -8,7 +8,7 @@ LL |     let A = 3;
    |         help: introduce a variable instead: `a_var`
 ...
 LL |     const A: i32 = 2;
-   |     ----------------- constant defined here
+   |     ------------ constant defined here
    |
    = note: the matched value is of type `i32`
 
index 65167ce4a29e010b642f384242d0b2803638d1e8..0ec57fabdad65210dc1c45dc681181d6fda3b6d4 100644 (file)
@@ -23,14 +23,8 @@ LL |     let y = x.test();
 note: the following trait must be implemented
   --> $SRC_DIR/core/src/default.rs:LL:COL
    |
-LL | / pub trait Default: Sized {
-LL | |     /// Returns the "default value" for a type.
-LL | |     ///
-LL | |     /// Default values are often some kind of initial value, identity value, or anything else that
-...  |
-LL | |     fn default() -> Self;
-LL | | }
-   | |_^
+LL | pub trait Default: Sized {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
 help: consider annotating `Enum` with `#[derive(Clone)]`
    |
 LL | #[derive(Clone)]
@@ -79,7 +73,7 @@ LL |     let y = x.test();
   ::: $SRC_DIR/std/src/time.rs:LL:COL
    |
 LL | pub struct Instant(time::Instant);
-   | ---------------------------------- doesn't satisfy `Instant: Default`
+   | ------------------ doesn't satisfy `Instant: Default`
    |
   ::: $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
    |
index 25ce458f6d8133a81672a6837c27be2a61211655..505ed2ad7b37ad0d5a88d750f0ad96fe01c60a78 100644 (file)
@@ -40,7 +40,7 @@ error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:30:16
    |
 LL | struct S(usize, usize);
-   | ----------------------- fn(usize, usize) -> S {S} defined here
+   | -------- fn(usize, usize) -> S {S} defined here
 ...
 LL |     let _: S = S;
    |            -   ^ expected struct `S`, found fn item
@@ -76,7 +76,7 @@ error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:32:16
    |
 LL | struct V();
-   | ----------- fn() -> V {V} defined here
+   | -------- fn() -> V {V} defined here
 ...
 LL |     let _: V = V;
    |            -   ^ expected struct `V`, found fn item
index 94bd2d41565826bc3576d77ae014067ff055979e..08502dfeb2d59211062e9e2396c5876eb33d85ed 100644 (file)
@@ -10,7 +10,7 @@ note: an implementation of `PartialEq<_>` might be missing for `S<T>`
   --> $DIR/invalid-bin-op.rs:5:1
    |
 LL | struct S<T>(T);
-   | ^^^^^^^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^^^^ must implement `PartialEq<_>`
 help: consider annotating `S<T>` with `#[derive(PartialEq)]`
    |
 LL | #[derive(PartialEq)]
index ee29a56f3f8c56d82214b189cc34f52ea27e4852..4c75fbe4c786b2956f080e63442b72a3265a22b1 100644 (file)
@@ -2,7 +2,7 @@ error[E0046]: not all trait items implemented, missing: `Type`, `bar`, `baz`
   --> $DIR/missing-assoc-fn-applicable-suggestions.rs:15:1
    |
 LL |     type Type;
-   |     ---------- `Type` from trait
+   |     --------- `Type` from trait
 LL |     fn bar<T>(_: T) -> Self;
    |     ------------------------ `bar` from trait
 LL |     fn baz<T>(_: T) -> Self where T: TraitB, <T as TraitB>::Item: Copy;
index 4abc34466106dc2af12fc90ae85fc50e625bbe2a..8bc3df7b817e30f30da8b50c44d11883cf730b4e 100644 (file)
@@ -47,7 +47,7 @@ error[E0046]: not all trait items implemented, missing: `Type`, `foo`, `bar`, `q
   --> $DIR/suggest-trait-items.rs:11:1
    |
 LL |     type Type;
-   |     ---------- `Type` from trait
+   |     --------- `Type` from trait
 LL |
 LL |     fn foo();
    |     --------- `foo` from trait
@@ -63,7 +63,7 @@ error[E0046]: not all trait items implemented, missing: `Const`
   --> $DIR/suggest-trait-items.rs:40:1
    |
 LL |     const Const: i32;
-   |     ----------------- `Const` from trait
+   |     ---------------- `Const` from trait
 ...
 LL | impl Bar for B {
    | ^^^^^^^^^^^^^^ missing `Const` in implementation
index 5409e32c436fbd9ff1e26dc88901e133362c55f3..7038a572bec07fc7905761cdc0bbee11eb8f86fc 100644 (file)
@@ -18,10 +18,10 @@ error[E0191]: the value of the associated types `A` (from trait `T`), `C` (from
   --> $DIR/use-type-argument-instead-of-assoc-type.rs:7:16
    |
 LL |     type A;
-   |     ------- `A` defined here
+   |     ------ `A` defined here
 LL |     type B;
 LL |     type C;
-   |     ------- `C` defined here
+   |     ------ `C` defined here
 ...
 LL |     i: Box<dyn T<usize, usize, usize, usize, B=usize>>,
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated types `A`, `C` must be specified
index 06c707e4332a5694a6defadce9e2da4dcb3db2a8..175ec8120ecc6c0e1523db96b0faf40ce444f9ae 100644 (file)
@@ -2,7 +2,7 @@ error[E0224]: at least one trait is required for an object type
   --> $DIR/only-maybe-bound.rs:13:12
    |
 LL | trait _1 = _0;
-   | -------------- this alias does not contain a trait
+   | -------- this alias does not contain a trait
 ...
 LL | type _T0 = dyn _1;
    |            ^^^^^^
@@ -11,7 +11,7 @@ error[E0224]: at least one trait is required for an object type
   --> $DIR/only-maybe-bound.rs:19:12
    |
 LL | trait _2 = _1 + _1;
-   | ------------------- this alias does not contain a trait
+   | -------- this alias does not contain a trait
 LL |
 LL | type _T1 = dyn _2;
    |            ^^^^^^
index ef39a70066db622077178a7e123dc96756681397..f66cad77fcd1e21e7cce65f59b148993dda0c72f 100644 (file)
@@ -10,7 +10,7 @@ help: trait impl with same name found
   --> $DIR/auxiliary/crate_a2.rs:5:1
    |
 LL | impl Bar for Foo {}
-   | ^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `crate_a2` are being used?
    = help: the trait `main::a::Bar` is implemented for `ImplementsTraitForUsize<usize>`
 note: required by a bound in `try_foo`
@@ -46,7 +46,7 @@ help: trait impl with same name found
   --> $DIR/auxiliary/crate_a2.rs:13:1
    |
 LL | impl Bar for ImplementsWrongTraitConditionally<isize> {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `crate_a2` are being used?
    = help: the trait `main::a::Bar` is implemented for `ImplementsTraitForUsize<usize>`
 note: required by a bound in `try_foo`
index cc540ea905a10da10d66e659b83178b237d1e05f..afdad160919f9570edfd80a67c57809f2c20af69 100644 (file)
@@ -2,7 +2,7 @@ error[E0277]: the trait bound `T: TraitFoo` is not satisfied
   --> $DIR/copy-impl-cannot-normalize.rs:22:1
    |
 LL | impl<T> Copy for Foo<T> {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `TraitFoo` is not implemented for `T`
+   | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `TraitFoo` is not implemented for `T`
    |
 help: consider restricting type parameter `T`
    |
index c87f1ff1f3f15130121b99318ccbc293ba8f03f4..62cfca545b2616f910d5867339ee756332b46607 100644 (file)
@@ -60,7 +60,7 @@ error[E0119]: conflicting implementations of trait `Trait5` for type `(dyn std::
 LL | impl Trait5 for dyn Send {}
    | ------------------------ first implementation here
 LL | impl Trait5 for dyn Send where u32: Copy {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + 'static)`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + 'static)`
 
 error: aborting due to 8 previous errors
 
index 71f3a0e7c7caa115060fff02eb74a12a83092e23..8f01d7c53e7715c4197334d712438dc3ee861e1a 100644 (file)
@@ -2,7 +2,7 @@ error[E0224]: at least one trait is required for an object type
   --> $DIR/issue-65673.rs:9:16
    |
 LL | trait Alias<T> = where T: Trait;
-   | -------------------------------- this alias does not contain a trait
+   | -------------- this alias does not contain a trait
 ...
 LL |     type Ctx = dyn Alias<T>;
    |                ^^^^^^^^^^^^
index db1f6946660852109e1c1e93f5782bd170723349..3ee6db40e8736e45fefb109a6424b4ddcee21153 100644 (file)
@@ -2,7 +2,7 @@ error[E0277]: the trait bound `&'a T: Unsize<&'a U>` is not satisfied
   --> $DIR/issue-71036.rs:11:1
    |
 LL | impl<'a, T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Foo<'a, U>> for Foo<'a, T> {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Unsize<&'a U>` is not implemented for `&'a T`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Unsize<&'a U>` is not implemented for `&'a T`
    |
    = note: all implementations of `Unsize` are provided automatically by the compiler, see <https://doc.rust-lang.org/stable/std/marker/trait.Unsize.html> for more information
    = note: required because of the requirements on the impl of `DispatchFromDyn<&'a &'a U>` for `&'a &'a T`
index 7574c9107d9accc620e897eea69b132a1f07fd81..7e781016e1f0ffee5da278b374d1659117ff944e 100644 (file)
@@ -54,7 +54,7 @@ error[E0378]: the trait `DispatchFromDyn` may only be implemented for a coercion
   --> $DIR/issue-78372.rs:3:1
    |
 LL | impl<T> DispatchFromDyn<Smaht<U, MISC>> for T {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 6 previous errors
 
index a7954f7b245951d16f269c2b3568ca29a98a6752..06ed5ac081dce9bbbc4a8ad8f538d4b13de5bc2a 100644 (file)
@@ -116,7 +116,7 @@ error[E0624]: associated constant `A` is private
   --> $DIR/item-privacy.rs:101:14
    |
 LL |         const A: u8 = 0;
-   |         ---------------- private associated constant defined here
+   |         ----------- private associated constant defined here
 ...
 LL |     <dyn C>::A;
    |              ^ private associated constant
index 45978a84068de75c7bfa137937f64eb95ed052d2..641bfe236660b55a755009c1af2be36425a64a6d 100644 (file)
@@ -2,7 +2,7 @@ error[E0191]: the value of the associated type `Output` (from trait `Base`) must
   --> $DIR/with-self-in-projection-output-bad.rs:45:21
    |
 LL |     type Output;
-   |     ------------ `Output` defined here
+   |     ----------- `Output` defined here
 ...
 LL |     let _x: Box<dyn Helper<Target=i32>> = Box::new(2u32);
    |                     ^^^^^^^^^^^^^^^^^^ help: specify the associated type: `Helper<Target=i32, Output = Type>`
@@ -11,7 +11,7 @@ error[E0191]: the value of the associated type `Output` (from trait `Base`) must
   --> $DIR/with-self-in-projection-output-bad.rs:48:21
    |
 LL |     type Output;
-   |     ------------ `Output` defined here
+   |     ----------- `Output` defined here
 ...
 LL |     let _y: Box<dyn NormalizableHelper<Target=i32>> = Box::new(2u32);
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: specify the associated type: `NormalizableHelper<Target=i32, Output = Type>`
index f71bed84d5627fdd7d9422e1eb16475207e91e1f..f3718c5d852f0b2fbf221797aa230db641daad2a 100644 (file)
@@ -10,11 +10,8 @@ error: vtable entries for `<S as D>`: [
        ]
   --> $DIR/vtable-diamond.rs:21:1
    |
-LL | / trait D: B + C {
-LL | |
-LL | |     fn foo_d(&self) {}
-LL | | }
-   | |_^
+LL | trait D: B + C {
+   | ^^^^^^^^^^^^^^
 
 error: vtable entries for `<S as C>`: [
            MetadataDropInPlace,
@@ -25,11 +22,8 @@ error: vtable entries for `<S as C>`: [
        ]
   --> $DIR/vtable-diamond.rs:15:1
    |
-LL | / trait C: A {
-LL | |
-LL | |     fn foo_c(&self) {}
-LL | | }
-   | |_^
+LL | trait C: A {
+   | ^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
index 915fd701b03365b8108962905f2cd0fa602fc035..d4d7a8fa3a470ec51120f3981c50de557a98e8b1 100644 (file)
@@ -31,11 +31,8 @@ error: vtable entries for `<S as O>`: [
        ]
   --> $DIR/vtable-multi-level.rs:95:1
    |
-LL | / trait O: G + N {
-LL | |
-LL | |     fn foo_o(&self) {}
-LL | | }
-   | |_^
+LL | trait O: G + N {
+   | ^^^^^^^^^^^^^^
 
 error: vtable entries for `<S as B>`: [
            MetadataDropInPlace,
@@ -45,11 +42,8 @@ error: vtable entries for `<S as B>`: [
        ]
   --> $DIR/vtable-multi-level.rs:19:1
    |
-LL | / trait B {
-LL | |
-LL | |     fn foo_b(&self) {}
-LL | | }
-   | |_^
+LL | trait B {
+   | ^^^^^^^
 
 error: vtable entries for `<S as D>`: [
            MetadataDropInPlace,
@@ -59,11 +53,8 @@ error: vtable entries for `<S as D>`: [
        ]
   --> $DIR/vtable-multi-level.rs:30:1
    |
-LL | / trait D {
-LL | |
-LL | |     fn foo_d(&self) {}
-LL | | }
-   | |_^
+LL | trait D {
+   | ^^^^^^^
 
 error: vtable entries for `<S as E>`: [
            MetadataDropInPlace,
@@ -73,11 +64,8 @@ error: vtable entries for `<S as E>`: [
        ]
   --> $DIR/vtable-multi-level.rs:36:1
    |
-LL | / trait E {
-LL | |
-LL | |     fn foo_e(&self) {}
-LL | | }
-   | |_^
+LL | trait E {
+   | ^^^^^^^
 
 error: vtable entries for `<S as F>`: [
            MetadataDropInPlace,
@@ -90,11 +78,8 @@ error: vtable entries for `<S as F>`: [
        ]
   --> $DIR/vtable-multi-level.rs:42:1
    |
-LL | / trait F: D + E {
-LL | |
-LL | |     fn foo_f(&self) {}
-LL | | }
-   | |_^
+LL | trait F: D + E {
+   | ^^^^^^^^^^^^^^
 
 error: vtable entries for `<S as H>`: [
            MetadataDropInPlace,
@@ -104,11 +89,8 @@ error: vtable entries for `<S as H>`: [
        ]
   --> $DIR/vtable-multi-level.rs:53:1
    |
-LL | / trait H {
-LL | |
-LL | |     fn foo_h(&self) {}
-LL | | }
-   | |_^
+LL | trait H {
+   | ^^^^^^^
 
 error: vtable entries for `<S as I>`: [
            MetadataDropInPlace,
@@ -118,11 +100,8 @@ error: vtable entries for `<S as I>`: [
        ]
   --> $DIR/vtable-multi-level.rs:59:1
    |
-LL | / trait I {
-LL | |
-LL | |     fn foo_i(&self) {}
-LL | | }
-   | |_^
+LL | trait I {
+   | ^^^^^^^
 
 error: vtable entries for `<S as J>`: [
            MetadataDropInPlace,
@@ -135,11 +114,8 @@ error: vtable entries for `<S as J>`: [
        ]
   --> $DIR/vtable-multi-level.rs:65:1
    |
-LL | / trait J: H + I {
-LL | |
-LL | |     fn foo_j(&self) {}
-LL | | }
-   | |_^
+LL | trait J: H + I {
+   | ^^^^^^^^^^^^^^
 
 error: vtable entries for `<S as K>`: [
            MetadataDropInPlace,
@@ -149,11 +125,8 @@ error: vtable entries for `<S as K>`: [
        ]
   --> $DIR/vtable-multi-level.rs:71:1
    |
-LL | / trait K {
-LL | |
-LL | |     fn foo_k(&self) {}
-LL | | }
-   | |_^
+LL | trait K {
+   | ^^^^^^^
 
 error: vtable entries for `<S as L>`: [
            MetadataDropInPlace,
@@ -163,11 +136,8 @@ error: vtable entries for `<S as L>`: [
        ]
   --> $DIR/vtable-multi-level.rs:77:1
    |
-LL | / trait L {
-LL | |
-LL | |     fn foo_l(&self) {}
-LL | | }
-   | |_^
+LL | trait L {
+   | ^^^^^^^
 
 error: vtable entries for `<S as M>`: [
            MetadataDropInPlace,
@@ -180,11 +150,8 @@ error: vtable entries for `<S as M>`: [
        ]
   --> $DIR/vtable-multi-level.rs:83:1
    |
-LL | / trait M: K + L {
-LL | |
-LL | |     fn foo_m(&self) {}
-LL | | }
-   | |_^
+LL | trait M: K + L {
+   | ^^^^^^^^^^^^^^
 
 error: vtable entries for `<S as N>`: [
            MetadataDropInPlace,
@@ -204,11 +171,8 @@ error: vtable entries for `<S as N>`: [
        ]
   --> $DIR/vtable-multi-level.rs:89:1
    |
-LL | / trait N: J + M {
-LL | |
-LL | |     fn foo_n(&self) {}
-LL | | }
-   | |_^
+LL | trait N: J + M {
+   | ^^^^^^^^^^^^^^
 
 error: aborting due to 12 previous errors
 
index f1c8947f9069f76e1b46becaa4fae1b69cb743c9..0dcd84433090c8fe0faa043c84768b841e1d932f 100644 (file)
@@ -9,11 +9,8 @@ error: vtable entries for `<S as C>`: [
        ]
   --> $DIR/vtable-multiple.rs:16:1
    |
-LL | / trait C: A + B {
-LL | |
-LL | |     fn foo_c(&self) {}
-LL | | }
-   | |_^
+LL | trait C: A + B {
+   | ^^^^^^^^^^^^^^
 
 error: vtable entries for `<S as B>`: [
            MetadataDropInPlace,
@@ -23,11 +20,8 @@ error: vtable entries for `<S as B>`: [
        ]
   --> $DIR/vtable-multiple.rs:10:1
    |
-LL | / trait B {
-LL | |
-LL | |     fn foo_b(&self) {}
-LL | | }
-   | |_^
+LL | trait B {
+   | ^^^^^^^
 
 error: aborting due to 2 previous errors
 
index bbfbde222f3344fde1ef1a0b67325f9af535e8eb..9345c2711978a71bd8296c04ce8d852bbb5bc114 100644 (file)
@@ -10,7 +10,7 @@ error: vtable entries for `<std::vec::IntoIter<u8> as A>`: [
   --> $DIR/vtable-non-object-safe.rs:8:1
    |
 LL | trait A: Iterator {}
-   | ^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index c8cf58399723cea1c3bee793631e1e7800a032fa..5346a702716359a2f52dfe48d63713401f941450 100644 (file)
@@ -9,12 +9,8 @@ error: vtable entries for `<S as B>`: [
        ]
   --> $DIR/vtable-vacant.rs:15:1
    |
-LL | / trait B: A {
-LL | |
-LL | |     fn foo_b1(&self) {}
-LL | |     fn foo_b2(&self) where Self: Send {}
-LL | | }
-   | |_^
+LL | trait B: A {
+   | ^^^^^^^^^^
 
 error: aborting due to previous error
 
index f007f71a73c4532323fdaf2324211e1f290d9c9b..aaa3159e0b04745c75d92c2228a176973ec99dea 100644 (file)
@@ -16,7 +16,7 @@ note: `V` could also refer to the associated type defined here
   --> $DIR/enum-variant-priority-lint-ambiguous_associated_items.rs:26:5
    |
 LL |     type V;
-   |     ^^^^^^^
+   |     ^^^^^^
 
 error: ambiguous associated item
   --> $DIR/enum-variant-priority-lint-ambiguous_associated_items.rs:32:15
@@ -35,7 +35,7 @@ note: `V` could also refer to the associated type defined here
   --> $DIR/enum-variant-priority-lint-ambiguous_associated_items.rs:26:5
    |
 LL |     type V;
-   |     ^^^^^^^
+   |     ^^^^^^
 
 error: aborting due to 2 previous errors
 
index f4a0cdb1625b80f236326a980e59743fbbcbc9af..6745b8ef69cc90b7bfbff655d5a3268ad10702dd 100644 (file)
@@ -8,7 +8,7 @@ note: ...which requires type-checking `CONST_BUG`...
   --> $DIR/issue-53092-2.rs:6:1
    |
 LL | const CONST_BUG: Bug<u8, ()> = unsafe { std::mem::transmute(|_: u8| ()) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: ...which requires computing layout of `Bug<u8, ()>`...
    = note: ...which requires normalizing `Bug<u8, ()>`...
    = note: ...which again requires computing type of `Bug::{opaque#0}`, completing the cycle
index ebce257b278bb43b8aea0bf609ab6e257a46e597..a8139063db1d8aea857cdd2354cd1ac65d4250ab 100644 (file)
@@ -32,18 +32,12 @@ note: an implementation of `std::ops::Neg` might be missing for `Z`
   --> $DIR/type-ascription-precedence.rs:9:1
    |
 LL | struct Z;
-   | ^^^^^^^^^ must implement `std::ops::Neg`
+   | ^^^^^^^^ must implement `std::ops::Neg`
 note: the following trait must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
    |
-LL | / pub trait Neg {
-LL | |     /// The resulting type after applying the `-` operator.
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-LL | |     type Output;
-...  |
-LL | |     fn neg(self) -> Self::Output;
-LL | | }
-   | |_^
+LL | pub trait Neg {
+   | ^^^^^^^^^^^^^
 
 error[E0308]: mismatched types
   --> $DIR/type-ascription-precedence.rs:45:5
index ea259cf3d378590b089c002c541601b2c8513c30..67a4745b399d6873da73789e571765660d87c3a8 100644 (file)
@@ -1,13 +1,11 @@
 error[E0393]: the type parameter `T` must be explicitly specified
   --> $DIR/type-parameter-defaults-referencing-Self.rs:8:16
    |
-LL | / trait Foo<T=Self> {
-LL | |     fn method(&self);
-LL | | }
-   | |_- type parameter `T` must be specified for this
-LL |
-LL |   fn foo(x: &dyn Foo) { }
-   |                  ^^^ help: set the type parameter to the desired type: `Foo<T>`
+LL | trait Foo<T=Self> {
+   | ----------------- type parameter `T` must be specified for this
+...
+LL | fn foo(x: &dyn Foo) { }
+   |                ^^^ help: set the type parameter to the desired type: `Foo<T>`
    |
    = note: because of the default `Self` reference, type parameters must be specified on object types
 
index eeb09a9f02ea3e99593c46d1e78a2def95d25784..4e73e10a3014382815b80cb672e1b359c1a694e5 100644 (file)
@@ -1,16 +1,12 @@
 error[E0308]: mismatched types
   --> $DIR/type-params-in-different-spaces-1.rs:5:17
    |
-LL | / trait BrokenAdd: Copy + Add<Output=Self> {
-LL | |     fn broken_add<T>(&self, rhs: T) -> Self {
-   | |                   - found type parameter
-LL | |         *self + rhs
-   | |                 ^^^ expected type parameter `Self`, found type parameter `T`
-LL | |
-...  |
-LL | |     }
-LL | | }
-   | |_- expected type parameter
+LL | trait BrokenAdd: Copy + Add<Output=Self> {
+   | ---------------------------------------- expected type parameter
+LL |     fn broken_add<T>(&self, rhs: T) -> Self {
+   |                   - found type parameter
+LL |         *self + rhs
+   |                 ^^^ expected type parameter `Self`, found type parameter `T`
    |
    = note: expected type parameter `Self`
               found type parameter `T`
index 880c138d287623332558066daf09a69523300935..c538d67316c6a8ec7ad7279363d0e573362e65b4 100644 (file)
@@ -1,16 +1,14 @@
 error[E0308]: mismatched types
   --> $DIR/type-params-in-different-spaces-3.rs:3:9
    |
-LL | / trait Tr : Sized {
-LL | |     fn test<X>(u: X) -> Self {
-   | |             -           ---- expected `Self` because of return type
-   | |             |
-   | |             found type parameter
-LL | |         u
-   | |         ^ expected type parameter `Self`, found type parameter `X`
-LL | |     }
-LL | | }
-   | |_- expected type parameter
+LL | trait Tr : Sized {
+   | ---------------- expected type parameter
+LL |     fn test<X>(u: X) -> Self {
+   |             -           ---- expected `Self` because of return type
+   |             |
+   |             found type parameter
+LL |         u
+   |         ^ expected type parameter `Self`, found type parameter `X`
    |
    = note: expected type parameter `Self`
               found type parameter `X`
index 04392f7390dfc3fd52cbc764c46909f62116111b..3202710286e1ad80ad9d713c453b7046c40b34c6 100644 (file)
@@ -42,9 +42,8 @@ error[E0072]: recursive type `T4` has infinite size
   --> $DIR/type-recursive.rs:16:1
    |
 LL | struct T4(Option<T4>);
-   | ^^^^^^^^^^----------^^
-   | |         |
-   | |         recursive without indirection
+   | ^^^^^^^^^ ---------- recursive without indirection
+   | |
    | recursive type has infinite size
    |
 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `T4` representable
index 74216d265d03416e218903443c3a6c5d46a9ef0c..2c107b1f7a47b840b63d87be18f1f4f95160a1f3 100644 (file)
@@ -7,15 +7,11 @@ LL |     let _ = match x {
 note: `Result<u32, &Void>` defined here
   --> $SRC_DIR/core/src/result.rs:LL:COL
    |
-LL | / pub enum Result<T, E> {
-LL | |     /// Contains the success value
-LL | |     #[lang = "Ok"]
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-...  |
-LL | |     Err(#[stable(feature = "rust1", since = "1.0.0")] E),
-   | |     ^^^ not covered
-LL | | }
-   | |_-
+LL | pub enum Result<T, E> {
+   | ---------------------
+...
+LL |     Err(#[stable(feature = "rust1", since = "1.0.0")] E),
+   |     ^^^ not covered
    = note: the matched value is of type `Result<u32, &Void>`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
@@ -93,15 +89,11 @@ LL |     let _ = match x {
 note: `Result<u32, Void>` defined here
   --> $SRC_DIR/core/src/result.rs:LL:COL
    |
-LL | / pub enum Result<T, E> {
-LL | |     /// Contains the success value
-LL | |     #[lang = "Ok"]
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-...  |
-LL | |     Err(#[stable(feature = "rust1", since = "1.0.0")] E),
-   | |     ^^^ not covered
-LL | | }
-   | |_-
+LL | pub enum Result<T, E> {
+   | ---------------------
+...
+LL |     Err(#[stable(feature = "rust1", since = "1.0.0")] E),
+   |     ^^^ not covered
    = note: the matched value is of type `Result<u32, Void>`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
@@ -120,15 +112,11 @@ LL |     let Ok(x) = x;
 note: `Result<u32, Void>` defined here
   --> $SRC_DIR/core/src/result.rs:LL:COL
    |
-LL | / pub enum Result<T, E> {
-LL | |     /// Contains the success value
-LL | |     #[lang = "Ok"]
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-...  |
-LL | |     Err(#[stable(feature = "rust1", since = "1.0.0")] E),
-   | |     ^^^ not covered
-LL | | }
-   | |_-
+LL | pub enum Result<T, E> {
+   | ---------------------
+...
+LL |     Err(#[stable(feature = "rust1", since = "1.0.0")] E),
+   |     ^^^ not covered
    = note: the matched value is of type `Result<u32, Void>`
 help: you might want to use `if let` to ignore the variant that isn't matched
    |
index b5c72aa524779a53fcf6a1786baee50fd0d5d561..c277d5b761d8e5f068c9ce1ae9eb44e12d565703 100644 (file)
@@ -8,7 +8,7 @@ LL | union U5<T> {
    | doesn't satisfy `U5<CloneNoCopy>: Clone`
 ...
 LL | struct CloneNoCopy;
-   | ------------------- doesn't satisfy `CloneNoCopy: Copy`
+   | ------------------ doesn't satisfy `CloneNoCopy: Copy`
 ...
 LL |     let w = u.clone();
    |               ^^^^^ method cannot be called on `U5<CloneNoCopy>` due to unsatisfied trait bounds
index b5c72aa524779a53fcf6a1786baee50fd0d5d561..c277d5b761d8e5f068c9ce1ae9eb44e12d565703 100644 (file)
@@ -8,7 +8,7 @@ LL | union U5<T> {
    | doesn't satisfy `U5<CloneNoCopy>: Clone`
 ...
 LL | struct CloneNoCopy;
-   | ------------------- doesn't satisfy `CloneNoCopy: Copy`
+   | ------------------ doesn't satisfy `CloneNoCopy: Copy`
 ...
 LL |     let w = u.clone();
    |               ^^^^^ method cannot be called on `U5<CloneNoCopy>` due to unsatisfied trait bounds
index ae84cc7811bb39378f05152a3d4d515d6c03297b..9abf440f735695e07cf09de81364c12a24309b02 100644 (file)
@@ -14,10 +14,8 @@ LL | #![deny(improper_ctypes)]
 note: the type is defined here
   --> $DIR/union-repr-c.rs:9:1
    |
-LL | / union W {
-LL | |     a: u8,
-LL | | }
-   | |_^
+LL | union W {
+   | ^^^^^^^
 
 error: aborting due to previous error
 
index 5c40787febfb76498c19eff2762d28aa7f36af45..98a9bd07ed21d0ca5d3bfee529a37cd3c42d9635 100644 (file)
@@ -16,7 +16,7 @@ LL | / pub struct Box<
 LL | |     T: ?Sized,
 LL | |     #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
 LL | | >(Unique<T>, A);
-   | |________________- doesn't satisfy `Box<dyn Foo>: Clone`
+   | |_- doesn't satisfy `Box<dyn Foo>: Clone`
    |
    = note: the following trait bounds were not satisfied:
            `dyn Foo: Sized`
index 02ce371c8d5efa136448224f9615cf977cc8a7ae..7af9c684b72e3b7e3e809085e1b3f53e015a4b5e 100644 (file)
@@ -13,7 +13,7 @@ LL | / pub struct Box<
 LL | |     T: ?Sized,
 LL | |     #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
 LL | | >(Unique<T>, A);
-   | |________________- doesn't satisfy `Box<R>: Clone`
+   | |_- doesn't satisfy `Box<R>: Clone`
    |
    = note: the following trait bounds were not satisfied:
            `R: Clone`
index 2ba921871577304f8aa6b0b486d3bf9d411697c2..7869176bb3ad2a3ffc6fa2cd74caec27d72d66d5 100644 (file)
@@ -91,13 +91,11 @@ LL |     let e = <dyn Bar::<usize>>::lol();
 error[E0393]: the type parameter `A` must be explicitly specified
   --> $DIR/unspecified-self-in-trait-ref.rs:26:13
    |
-LL | / pub trait Bar<X=usize, A=Self> {
-LL | |     fn foo(&self);
-LL | | }
-   | |_- type parameter `A` must be specified for this
+LL | pub trait Bar<X=usize, A=Self> {
+   | ------------------------------ type parameter `A` must be specified for this
 ...
-LL |       let e = Bar::<usize>::lol();
-   |               ^^^^^^^^^^^^ missing reference to `A`
+LL |     let e = Bar::<usize>::lol();
+   |             ^^^^^^^^^^^^ missing reference to `A`
    |
    = note: because of the default `Self` reference, type parameters must be specified on object types
 
index 14523afbdac05f75baf12a9077ecafb4d3f469da..4c4c2f6225f1a537ad3008e1f165795e449db899 100644 (file)
@@ -50,7 +50,7 @@ note: the struct `Foo` is defined here
   --> $DIR/auxiliary/use-from-trait-xc.rs:9:1
    |
 LL | struct Foo;
-   | ^^^^^^^^^^^
+   | ^^^^^^^^^^
 
 error[E0603]: struct `Foo` is private
   --> $DIR/use-from-trait-xc.rs:17:24
@@ -62,7 +62,7 @@ note: the struct `Foo` is defined here
   --> $DIR/auxiliary/use-from-trait-xc.rs:9:1
    |
 LL | struct Foo;
-   | ^^^^^^^^^^^
+   | ^^^^^^^^^^
 
 error: aborting due to 9 previous errors
 
index d1bf34781dfb29ff62196cdb761f2c227e46c140..219f5bca9e3015a87e4d3b5bff5e5a107c3e8299 100644 (file)
@@ -1,10 +1,8 @@
 error[E0208]: [o]
   --> $DIR/variance-associated-consts.rs:13:1
    |
-LL | / struct Foo<T: Trait> {
-LL | |     field: [u8; <T as Trait>::Const]
-LL | | }
-   | |_^
+LL | struct Foo<T: Trait> {
+   | ^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index b9aa9695f62240d83d983bb35ef9cb5290c238ef..94f770eda33efbf1fef3446fd2b6ac4c3de955a6 100644 (file)
@@ -1,18 +1,14 @@
 error[E0208]: [-, +]
   --> $DIR/variance-associated-types.rs:13:1
    |
-LL | / struct Foo<'a, T : Trait<'a>> {
-LL | |     field: (T, &'a ())
-LL | | }
-   | |_^
+LL | struct Foo<'a, T : Trait<'a>> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0208]: [o, o]
   --> $DIR/variance-associated-types.rs:18:1
    |
-LL | / struct Bar<'a, T : Trait<'a>> {
-LL | |     field: <T as Trait<'a>>::Type
-LL | | }
-   | |_^
+LL | struct Bar<'a, T : Trait<'a>> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
index 2a5d8f91e1ec99738541373c79b85f6ff251548e..ceee53aff105db74ea25f2b3fefe5b597baefdca 100644 (file)
@@ -1,10 +1,8 @@
 error[E0208]: [o]
   --> $DIR/variance-object-types.rs:7:1
    |
-LL | / struct Foo<'a> {
-LL | |     x: Box<dyn Fn(i32) -> &'a i32 + 'static>
-LL | | }
-   | |_^
+LL | struct Foo<'a> {
+   | ^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 8c9c89955bd34c6d707b01cb9b539f6fb0ba9e70..25fb22732151cc90b653c2606ccca4e034827d37 100644 (file)
@@ -1,64 +1,44 @@
 error[E0208]: [-, -, -]
   --> $DIR/variance-regions-direct.rs:9:1
    |
-LL | / struct Test2<'a, 'b, 'c> {
-LL | |     x: &'a isize,
-LL | |     y: &'b [isize],
-LL | |     c: &'c str
-LL | | }
-   | |_^
+LL | struct Test2<'a, 'b, 'c> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0208]: [+, +, +]
   --> $DIR/variance-regions-direct.rs:18:1
    |
-LL | / struct Test3<'a, 'b, 'c> {
-LL | |     x: extern "Rust" fn(&'a isize),
-LL | |     y: extern "Rust" fn(&'b [isize]),
-LL | |     c: extern "Rust" fn(&'c str),
-LL | | }
-   | |_^
+LL | struct Test3<'a, 'b, 'c> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0208]: [-, o]
   --> $DIR/variance-regions-direct.rs:27:1
    |
-LL | / struct Test4<'a, 'b:'a> {
-LL | |     x: &'a mut &'b isize,
-LL | | }
-   | |_^
+LL | struct Test4<'a, 'b:'a> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0208]: [+, o]
   --> $DIR/variance-regions-direct.rs:35:1
    |
-LL | / struct Test5<'a, 'b:'a> {
-LL | |     x: extern "Rust" fn(&'a mut &'b isize),
-LL | | }
-   | |_^
+LL | struct Test5<'a, 'b:'a> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0208]: [-, o]
   --> $DIR/variance-regions-direct.rs:45:1
    |
-LL | / struct Test6<'a, 'b:'a> {
-LL | |     x: &'a mut extern "Rust" fn(&'b isize),
-LL | | }
-   | |_^
+LL | struct Test6<'a, 'b:'a> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0208]: [*]
   --> $DIR/variance-regions-direct.rs:52:1
    |
-LL | / struct Test7<'a> {
-LL | |     x: isize
-LL | | }
-   | |_^
+LL | struct Test7<'a> {
+   | ^^^^^^^^^^^^^^^^
 
 error[E0208]: [+, -, o]
   --> $DIR/variance-regions-direct.rs:59:1
    |
-LL | / enum Test8<'a, 'b, 'c:'b> {
-LL | |     Test8A(extern "Rust" fn(&'a isize)),
-LL | |     Test8B(&'b [isize]),
-LL | |     Test8C(&'b mut &'c str),
-LL | | }
-   | |_^
+LL | enum Test8<'a, 'b, 'c:'b> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 7 previous errors
 
index 17efc6231d5e7529a71bea6afd830e5ecfa06e55..fc52492d7efddfbd632c50140c44cc51e521029f 100644 (file)
@@ -1,44 +1,32 @@
 error[E0208]: [+, -, o, *]
   --> $DIR/variance-regions-indirect.rs:8:1
    |
-LL | / enum Base<'a, 'b, 'c:'b, 'd> {
-LL | |     Test8A(extern "Rust" fn(&'a isize)),
-LL | |     Test8B(&'b [isize]),
-LL | |     Test8C(&'b mut &'c str),
-LL | | }
-   | |_^
+LL | enum Base<'a, 'b, 'c:'b, 'd> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0208]: [*, o, -, +]
   --> $DIR/variance-regions-indirect.rs:15:1
    |
-LL | / struct Derived1<'w, 'x:'y, 'y, 'z> {
-LL | |     f: Base<'z, 'y, 'x, 'w>
-LL | | }
-   | |_^
+LL | struct Derived1<'w, 'x:'y, 'y, 'z> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0208]: [o, o, *]
   --> $DIR/variance-regions-indirect.rs:20:1
    |
-LL | / struct Derived2<'a, 'b:'a, 'c> {
-LL | |     f: Base<'a, 'a, 'b, 'c>
-LL | | }
-   | |_^
+LL | struct Derived2<'a, 'b:'a, 'c> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0208]: [o, -, *]
   --> $DIR/variance-regions-indirect.rs:25:1
    |
-LL | / struct Derived3<'a:'b, 'b, 'c> {
-LL | |     f: Base<'a, 'b, 'a, 'c>
-LL | | }
-   | |_^
+LL | struct Derived3<'a:'b, 'b, 'c> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0208]: [+, -, o]
   --> $DIR/variance-regions-indirect.rs:30:1
    |
-LL | / struct Derived4<'a, 'b, 'c:'b> {
-LL | |     f: Base<'a, 'b, 'c, 'a>
-LL | | }
-   | |_^
+LL | struct Derived4<'a, 'b, 'c:'b> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 5 previous errors
 
index 98bc1b003c39d50cb15e6ac0312898df49cb6afa..e3ef339f423bcdb8dd4169815d203523aa68ca9c 100644 (file)
@@ -1,34 +1,26 @@
 error[E0208]: [+, +]
   --> $DIR/variance-trait-bounds.rs:16:1
    |
-LL | / struct TestStruct<U,T:Setter<U>> {
-LL | |     t: T, u: U
-LL | | }
-   | |_^
+LL | struct TestStruct<U,T:Setter<U>> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0208]: [*, +]
   --> $DIR/variance-trait-bounds.rs:21:1
    |
-LL | / enum TestEnum<U,T:Setter<U>> {
-LL | |     Foo(T)
-LL | | }
-   | |_^
+LL | enum TestEnum<U,T:Setter<U>> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0208]: [*, +]
   --> $DIR/variance-trait-bounds.rs:26:1
    |
-LL | / struct TestContraStruct<U,T:Setter<U>> {
-LL | |     t: T
-LL | | }
-   | |_^
+LL | struct TestContraStruct<U,T:Setter<U>> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0208]: [*, +]
   --> $DIR/variance-trait-bounds.rs:31:1
    |
-LL | / struct TestBox<U,T:Getter<U>+Setter<U>> {
-LL | |     t: T
-LL | | }
-   | |_^
+LL | struct TestBox<U,T:Getter<U>+Setter<U>> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 4 previous errors
 
index fb0fab1950cef5437e9742f49ab7aa881affaf99..c86cf1f82b45dcc5e02964a511efe03ad5792f92 100644 (file)
@@ -1,10 +1,8 @@
 error[E0208]: [-]
   --> $DIR/variance-trait-object-bound.rs:14:1
    |
-LL | / struct TOption<'a> {
-LL | |     v: Option<Box<dyn T + 'a>>,
-LL | | }
-   | |_^
+LL | struct TOption<'a> {
+   | ^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 5cffdffc7f2d42196a807a8ace4f20f7a6e0442a..dbe8af75d5178d20dd1f76cce42c26d807326d3f 100644 (file)
@@ -1,46 +1,32 @@
 error[E0208]: [+, +]
   --> $DIR/variance-types-bounds.rs:7:1
    |
-LL | / struct TestImm<A, B> {
-LL | |     x: A,
-LL | |     y: B,
-LL | | }
-   | |_^
+LL | struct TestImm<A, B> {
+   | ^^^^^^^^^^^^^^^^^^^^
 
 error[E0208]: [+, o]
   --> $DIR/variance-types-bounds.rs:13:1
    |
-LL | / struct TestMut<A, B:'static> {
-LL | |     x: A,
-LL | |     y: &'static mut B,
-LL | | }
-   | |_^
+LL | struct TestMut<A, B:'static> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0208]: [+, o]
   --> $DIR/variance-types-bounds.rs:19:1
    |
-LL | / struct TestIndirect<A:'static, B:'static> {
-LL | |     m: TestMut<A, B>
-LL | | }
-   | |_^
+LL | struct TestIndirect<A:'static, B:'static> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0208]: [o, o]
   --> $DIR/variance-types-bounds.rs:24:1
    |
-LL | / struct TestIndirect2<A:'static, B:'static> {
-LL | |     n: TestMut<A, B>,
-LL | |     m: TestMut<B, A>
-LL | | }
-   | |_^
+LL | struct TestIndirect2<A:'static, B:'static> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0208]: [o, o]
   --> $DIR/variance-types-bounds.rs:38:1
    |
-LL | / struct TestObject<A, R> {
-LL | |     n: Box<dyn Setter<A>+Send>,
-LL | |     m: Box<dyn Getter<R>+Send>,
-LL | | }
-   | |_^
+LL | struct TestObject<A, R> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 5 previous errors
 
index 05bd4747cf1681c2b9732f0767f060e2fb0dc703..8358b18b73ce202ad3690a262d03f4f66ed0605e 100644 (file)
@@ -1,52 +1,38 @@
 error[E0208]: [-, o, o]
   --> $DIR/variance-types.rs:10:1
    |
-LL | / struct InvariantMut<'a,A:'a,B:'a> {
-LL | |     t: &'a mut (A,B)
-LL | | }
-   | |_^
+LL | struct InvariantMut<'a,A:'a,B:'a> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0208]: [o]
   --> $DIR/variance-types.rs:15:1
    |
-LL | / struct InvariantCell<A> {
-LL | |     t: Cell<A>
-LL | | }
-   | |_^
+LL | struct InvariantCell<A> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0208]: [o]
   --> $DIR/variance-types.rs:20:1
    |
-LL | / struct InvariantIndirect<A> {
-LL | |     t: InvariantCell<A>
-LL | | }
-   | |_^
+LL | struct InvariantIndirect<A> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0208]: [+]
   --> $DIR/variance-types.rs:25:1
    |
-LL | / struct Covariant<A> {
-LL | |     t: A, u: fn() -> A
-LL | | }
-   | |_^
+LL | struct Covariant<A> {
+   | ^^^^^^^^^^^^^^^^^^^
 
 error[E0208]: [-]
   --> $DIR/variance-types.rs:30:1
    |
-LL | / struct Contravariant<A> {
-LL | |     t: fn(A)
-LL | | }
-   | |_^
+LL | struct Contravariant<A> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0208]: [+, -, o]
   --> $DIR/variance-types.rs:35:1
    |
-LL | / enum Enum<A,B,C> {
-LL | |     Foo(Covariant<A>),
-LL | |     Bar(Contravariant<B>),
-LL | |     Zed(Covariant<C>,Contravariant<C>)
-LL | | }
-   | |_^
+LL | enum Enum<A,B,C> {
+   | ^^^^^^^^^^^^^^^^
 
 error: aborting due to 6 previous errors
 
index eb8ab2644a330e1451278477495750eb3c2dd541..a37edc51d1975a48c51de04d490057c0d1eecd30 100644 (file)
@@ -2,13 +2,13 @@ error: statics with a custom `#[link_section]` must be a simple list of bytes on
   --> $DIR/wasm-custom-section-relocations.rs:4:1
    |
 LL | pub static A: &[u8] = &[1];
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^
 
 error: statics with a custom `#[link_section]` must be a simple list of bytes on the wasm target with no extra levels of indirection such as references
   --> $DIR/wasm-custom-section-relocations.rs:13:1
    |
 LL | pub static D: &usize = &C;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
index 16d198725523e0436817ef0c5144e3a3a3fa1311..f976466841c8cffcd8f918edcbca94c212f228e1 100644 (file)
@@ -25,12 +25,12 @@ note: the anonymous lifetime #1 defined here...
   --> $DIR/wf-in-foreign-fn-decls-issue-80468.rs:16:5
    |
 LL |     pub fn repro(_: Wrapper<Ref>);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 note: ...does not necessarily outlive the static lifetime introduced by the compatible `impl`
   --> $DIR/wf-in-foreign-fn-decls-issue-80468.rs:13:1
    |
 LL | impl Trait for Ref {}
-   | ^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
index a97f55de5f8330fcfac88d7fff883f01c2313c84..0bdd4002f40aec2ed509dc2cb640c46094f25e49 100644 (file)
@@ -8,7 +8,7 @@ note: the static `j` is defined here
   --> $DIR/auxiliary/static_priv_by_default.rs:47:1
    |
 LL | static j: isize = 0;
-   | ^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^
 
 error[E0603]: function `k` is private
   --> $DIR/xcrate-private-by-default.rs:25:29
@@ -32,7 +32,7 @@ note: the unit struct `l` is defined here
   --> $DIR/auxiliary/static_priv_by_default.rs:49:1
    |
 LL | struct l;
-   | ^^^^^^^^^
+   | ^^^^^^^^
 
 error[E0603]: enum `m` is private
   --> $DIR/xcrate-private-by-default.rs:29:35
@@ -56,7 +56,7 @@ note: the type alias `n` is defined here
   --> $DIR/auxiliary/static_priv_by_default.rs:51:1
    |
 LL | type n = isize;
-   | ^^^^^^^^^^^^^^^
+   | ^^^^^^
 
 error[E0603]: module `foo` is private
   --> $DIR/xcrate-private-by-default.rs:35:29
index 82f454d02f713ad6bf90522c4ba779126294f5bc..b6097710dc689064c317e9827b945bbd69d41492 100644 (file)
@@ -96,11 +96,12 @@ pub fn expr_post(&mut self, id: hir::HirId) {
     }
 
     pub fn enter_body(&mut self, cx: &LateContext<'_>, body: &hir::Body<'_>) {
-        let body_owner = cx.tcx.hir().body_owner_def_id(body.id());
+        let body_owner = cx.tcx.hir().body_owner(body.id());
+        let body_owner_def_id = cx.tcx.hir().local_def_id(body_owner);
 
-        match cx.tcx.hir().body_owner_kind(body_owner) {
+        match cx.tcx.hir().body_owner_kind(body_owner_def_id) {
             hir::BodyOwnerKind::Static(_) | hir::BodyOwnerKind::Const => {
-                let body_span = cx.tcx.def_span(body_owner);
+                let body_span = cx.tcx.hir().span_with_body(body_owner);
 
                 if let Some(span) = self.const_span {
                     if span.contains(body_span) {
@@ -115,7 +116,7 @@ pub fn enter_body(&mut self, cx: &LateContext<'_>, body: &hir::Body<'_>) {
 
     pub fn body_post(&mut self, cx: &LateContext<'_>, body: &hir::Body<'_>) {
         let body_owner = cx.tcx.hir().body_owner(body.id());
-        let body_span = cx.tcx.hir().span(body_owner);
+        let body_span = cx.tcx.hir().span_with_body(body_owner);
 
         if let Some(span) = self.const_span {
             if span.contains(body_span) {
index d930d486fde654220d9cc9c93533fbfb01523d3f..a6a767483ed45d2b969d0ea09f2767cdacc97461 100644 (file)
@@ -25,7 +25,7 @@ error[E0046]: not all trait items implemented, missing: `VAL`
   --> $DIR/ice-6252.rs:10:1
    |
 LL |     const VAL: T;
-   |     ------------- `VAL` from trait
+   |     ------------ `VAL` from trait
 ...
 LL | impl<N, M> TypeVal<usize> for Multiply<N, M> where N: TypeVal<VAL> {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `VAL` in implementation
index e5184bd1407c0417e655d12f3668157c2f699bb2..2a4abb0c5193aabda7946080b98322df565e5375 100644 (file)
@@ -8,12 +8,8 @@ LL | #[derive(Hash)]
 note: `PartialEq` implemented here
   --> $DIR/derive_hash_xor_eq.rs:15:1
    |
-LL | / impl PartialEq for Bar {
-LL | |     fn eq(&self, _: &Bar) -> bool {
-LL | |         true
-LL | |     }
-LL | | }
-   | |_^
+LL | impl PartialEq for Bar {
+   | ^^^^^^^^^^^^^^^^^^^^^^
    = note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: you are deriving `Hash` but have implemented `PartialEq` explicitly
@@ -25,12 +21,8 @@ LL | #[derive(Hash)]
 note: `PartialEq` implemented here
   --> $DIR/derive_hash_xor_eq.rs:24:1
    |
-LL | / impl PartialEq<Baz> for Baz {
-LL | |     fn eq(&self, _: &Baz) -> bool {
-LL | |         true
-LL | |     }
-LL | | }
-   | |_^
+LL | impl PartialEq<Baz> for Baz {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: you are implementing `Hash` explicitly but have derived `PartialEq`
index 32896c99dad0ac687923836ea865b7302d937a8c..baf8341aba908d1b409e60000241a4496d9b446e 100644 (file)
@@ -8,12 +8,8 @@ LL | #[derive(Ord, PartialEq, Eq)]
 note: `PartialOrd` implemented here
   --> $DIR/derive_ord_xor_partial_ord.rs:24:1
    |
-LL | / impl PartialOrd for DeriveOrd {
-LL | |     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
-LL | |         Some(other.cmp(self))
-LL | |     }
-LL | | }
-   | |_^
+LL | impl PartialOrd for DeriveOrd {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: you are deriving `Ord` but have implemented `PartialOrd` explicitly
@@ -25,12 +21,8 @@ LL | #[derive(Ord, PartialEq, Eq)]
 note: `PartialOrd` implemented here
   --> $DIR/derive_ord_xor_partial_ord.rs:33:1
    |
-LL | / impl PartialOrd<DeriveOrdWithExplicitTypeVariable> for DeriveOrdWithExplicitTypeVariable {
-LL | |     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
-LL | |         Some(other.cmp(self))
-LL | |     }
-LL | | }
-   | |_^
+LL | impl PartialOrd<DeriveOrdWithExplicitTypeVariable> for DeriveOrdWithExplicitTypeVariable {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: you are implementing `Ord` explicitly but have derived `PartialOrd`
index d960c86a9f0ef257e1bc27ca0ae63d9335d14c5f..38f33c53f128b87ec239bb45d30bd925f8e1c336 100644 (file)
@@ -124,7 +124,7 @@ help: consider marking this type as `Copy`
   --> $DIR/needless_pass_by_value.rs:123:1
    |
 LL | struct CopyWrapper(u32);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^
 
 error: this argument is passed by value, but not consumed in the function body
   --> $DIR/needless_pass_by_value.rs:131:29
@@ -136,7 +136,7 @@ help: consider marking this type as `Copy`
   --> $DIR/needless_pass_by_value.rs:123:1
    |
 LL | struct CopyWrapper(u32);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^
 
 error: this argument is passed by value, but not consumed in the function body
   --> $DIR/needless_pass_by_value.rs:131:45
@@ -148,7 +148,7 @@ help: consider marking this type as `Copy`
   --> $DIR/needless_pass_by_value.rs:123:1
    |
 LL | struct CopyWrapper(u32);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^
 
 error: this argument is passed by value, but not consumed in the function body
   --> $DIR/needless_pass_by_value.rs:131:61
@@ -160,7 +160,7 @@ help: consider marking this type as `Copy`
   --> $DIR/needless_pass_by_value.rs:123:1
    |
 LL | struct CopyWrapper(u32);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^
 
 error: this argument is passed by value, but not consumed in the function body
   --> $DIR/needless_pass_by_value.rs:143:40