summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:25:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:25:56 +0000
commit018c4950b9406055dec02ef0fb52f132e2bb1e2c (patch)
treea835ebdf2088ef88fa681f8fad45f09922c1ae9a /tests
parentAdding debian version 1.75.0+dfsg1-5. (diff)
downloadrustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.tar.xz
rustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.zip
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/assembly/asm/loongarch-type.rs3
-rw-r--r--tests/assembly/dwarf4.rs24
-rw-r--r--tests/assembly/dwarf5.rs1
-rw-r--r--tests/assembly/stack-probes.rs (renamed from tests/assembly/x86-stack-probes.rs)13
-rw-r--r--tests/assembly/stack-protector/stack-protector-target-support.rs7
-rw-r--r--tests/assembly/thin-lto.rs8
-rw-r--r--tests/assembly/x86_64-function-return.rs30
-rw-r--r--tests/codegen/ascii-char.rs2
-rw-r--r--tests/codegen/debug-accessibility/crate-enum.rs26
-rw-r--r--tests/codegen/debug-accessibility/crate-struct.rs23
-rw-r--r--tests/codegen/debug-accessibility/private-enum.rs21
-rw-r--r--tests/codegen/debug-accessibility/private-struct.rs17
-rw-r--r--tests/codegen/debug-accessibility/public-enum.rs21
-rw-r--r--tests/codegen/debug-accessibility/public-struct.rs17
-rw-r--r--tests/codegen/debug-accessibility/struct-fields.rs30
-rw-r--r--tests/codegen/debug-accessibility/super-enum.rs27
-rw-r--r--tests/codegen/debug-accessibility/super-struct.rs23
-rw-r--r--tests/codegen/debug-accessibility/tuple-fields.rs24
-rw-r--r--tests/codegen/default-hidden-visibility.rs31
-rw-r--r--tests/codegen/ehcontguard_disabled.rs10
-rw-r--r--tests/codegen/ehcontguard_enabled.rs10
-rw-r--r--tests/codegen/function-return.rs28
-rw-r--r--tests/codegen/issues/issue-101048.rs1
-rw-r--r--tests/codegen/issues/issue-101082.rs1
-rw-r--r--tests/codegen/issues/issue-101814.rs1
-rw-r--r--tests/codegen/issues/issue-103132.rs1
-rw-r--r--tests/codegen/issues/issue-103327.rs1
-rw-r--r--tests/codegen/issues/issue-103840.rs1
-rw-r--r--tests/codegen/issues/issue-116878.rs13
-rw-r--r--tests/codegen/issues/issue-75978.rs1
-rw-r--r--tests/codegen/issues/issue-86106.rs28
-rw-r--r--tests/codegen/issues/issue-99960.rs1
-rw-r--r--tests/codegen/llvm_module_flags.rs7
-rw-r--r--tests/codegen/overaligned-constant.rs36
-rw-r--r--tests/codegen/sanitizer/cfi-normalize-integers.rs77
-rw-r--r--tests/codegen/sanitizer/kasan-emits-instrumentation.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-load.rs34
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-store.rs32
-rw-r--r--tests/codegen/simd/simd-wide-sum.rs2
-rw-r--r--tests/codegen/slice-iter-fold.rs1
-rw-r--r--tests/codegen/stack-probes-call.rs24
-rw-r--r--tests/codegen/stack-probes-inline.rs6
-rw-r--r--tests/codegen/thin-lto.rs7
-rw-r--r--tests/codegen/unchecked_shifts.rs4
-rw-r--r--tests/codegen/vec-in-place.rs1
-rw-r--r--tests/coverage/assert_not.cov-map16
-rw-r--r--tests/coverage/assert_not.coverage12
-rw-r--r--tests/coverage/assert_not.rs11
-rw-r--r--tests/coverage/async.cov-map174
-rw-r--r--tests/coverage/async.coverage43
-rw-r--r--tests/coverage/async.rs26
-rw-r--r--tests/coverage/async2.cov-map96
-rw-r--r--tests/coverage/async2.coverage80
-rw-r--r--tests/coverage/async2.rs24
-rw-r--r--tests/coverage/async_block.cov-map32
-rw-r--r--tests/coverage/async_block.coverage37
-rw-r--r--tests/coverage/async_block.rs35
-rw-r--r--tests/coverage/closure_macro_async.cov-map16
-rw-r--r--tests/coverage/closure_macro_async.coverage26
-rw-r--r--tests/coverage/closure_macro_async.rs26
-rw-r--r--tests/coverage/conditions.cov-map10
-rw-r--r--tests/coverage/continue.cov-map46
-rw-r--r--tests/coverage/coroutine.cov-map8
-rw-r--r--tests/coverage/if_not.cov-map39
-rw-r--r--tests/coverage/if_not.coverage38
-rw-r--r--tests/coverage/if_not.rs37
-rw-r--r--tests/coverage/inline.cov-map4
-rw-r--r--tests/coverage/inline.coverage2
-rw-r--r--tests/coverage/lazy_boolean.cov-map8
-rw-r--r--tests/coverage/lazy_boolean.coverage2
-rw-r--r--tests/coverage/loops_branches.cov-map90
-rw-r--r--tests/coverage/no_spans.cov-map8
-rw-r--r--tests/coverage/no_spans.coverage30
-rw-r--r--tests/coverage/no_spans.rs29
-rw-r--r--tests/coverage/no_spans_if_not.cov-map8
-rw-r--r--tests/coverage/no_spans_if_not.coverage30
-rw-r--r--tests/coverage/no_spans_if_not.rs29
-rw-r--r--tests/coverage/thin-lto.cov-map8
-rw-r--r--tests/coverage/thin-lto.coverage5
-rw-r--r--tests/coverage/thin-lto.rs4
-rw-r--r--tests/coverage/try_error_result.cov-map18
-rw-r--r--tests/coverage/unreachable.cov-map12
-rw-r--r--tests/coverage/unreachable.coverage4
-rw-r--r--tests/incremental/commandline-args.rs1
-rw-r--r--tests/incremental/delayed_span_bug.rs4
-rw-r--r--tests/incremental/remapped_paths_cc/main.rs1
-rw-r--r--tests/incremental/span_hash_stable/main.rs1
-rw-r--r--tests/incremental/spans_in_type_debuginfo.rs1
-rw-r--r--tests/incremental/spans_significant_w_debuginfo.rs1
-rw-r--r--tests/incremental/thinlto/cgu_invalidated_via_import.rs6
-rw-r--r--tests/incremental/thinlto/cgu_keeps_identical_fn.rs14
-rw-r--r--tests/incremental/thinlto/independent_cgus_dont_affect_each_other.rs10
-rw-r--r--tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir11
-rw-r--r--tests/mir-opt/building/custom/terminators.rs8
-rw-r--r--tests/mir-opt/building/custom/unwind_action.rs68
-rw-r--r--tests/mir-opt/building/custom/unwind_terminate.rs34
-rw-r--r--tests/mir-opt/const_allocation.main.ConstProp.after.32bit.mir14
-rw-r--r--tests/mir-opt/const_allocation.main.ConstProp.after.64bit.mir18
-rw-r--r--tests/mir-opt/const_allocation2.main.ConstProp.after.32bit.mir12
-rw-r--r--tests/mir-opt/const_allocation2.main.ConstProp.after.64bit.mir14
-rw-r--r--tests/mir-opt/const_allocation3.main.ConstProp.after.32bit.mir6
-rw-r--r--tests/mir-opt/const_allocation3.main.ConstProp.after.64bit.mir6
-rw-r--r--tests/mir-opt/const_prop/address_of_pair.rs15
-rw-r--r--tests/mir-opt/const_prop/aggregate.foo.PreCodegen.after.panic-abort.mir49
-rw-r--r--tests/mir-opt/const_prop/aggregate.foo.PreCodegen.after.panic-unwind.mir49
-rw-r--r--tests/mir-opt/const_prop/aggregate.main.PreCodegen.after.panic-abort.mir36
-rw-r--r--tests/mir-opt/const_prop/aggregate.main.PreCodegen.after.panic-unwind.mir36
-rw-r--r--tests/mir-opt/const_prop/aggregate.rs18
-rw-r--r--tests/mir-opt/const_prop/array_index.rs6
-rw-r--r--tests/mir-opt/const_prop/bad_op_div_by_zero.rs10
-rw-r--r--tests/mir-opt/const_prop/bad_op_mod_by_zero.rs9
-rw-r--r--tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs5
-rw-r--r--tests/mir-opt/const_prop/boolean_identities.rs12
-rw-r--r--tests/mir-opt/const_prop/boolean_identities.test.ConstProp.diff32
-rw-r--r--tests/mir-opt/const_prop/boxes.rs6
-rw-r--r--tests/mir-opt/const_prop/cast.rs7
-rw-r--r--tests/mir-opt/const_prop/checked_add.rs5
-rw-r--r--tests/mir-opt/const_prop/const_prop_fails_gracefully.rs12
-rw-r--r--tests/mir-opt/const_prop/discriminant.rs15
-rw-r--r--tests/mir-opt/const_prop/indirect.rs4
-rw-r--r--tests/mir-opt/const_prop/inherit_overflow.main.ConstProp.panic-abort.diff2
-rw-r--r--tests/mir-opt/const_prop/inherit_overflow.main.ConstProp.panic-unwind.diff2
-rw-r--r--tests/mir-opt/const_prop/inherit_overflow.rs9
-rw-r--r--tests/mir-opt/const_prop/issue_66971.main.ConstProp.panic-abort.diff11
-rw-r--r--tests/mir-opt/const_prop/issue_66971.main.ConstProp.panic-unwind.diff11
-rw-r--r--tests/mir-opt/const_prop/issue_66971.rs4
-rw-r--r--tests/mir-opt/const_prop/issue_67019.main.ConstProp.panic-abort.diff3
-rw-r--r--tests/mir-opt/const_prop/issue_67019.main.ConstProp.panic-unwind.diff3
-rw-r--r--tests/mir-opt/const_prop/issue_67019.rs4
-rw-r--r--tests/mir-opt/const_prop/mult_by_zero.rs7
-rw-r--r--tests/mir-opt/const_prop/mutable_variable.rs7
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_aggregate.rs7
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs9
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs8
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_no_prop.rs9
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs14
-rw-r--r--tests/mir-opt/const_prop/pointer_expose_address.main.ConstProp.panic-abort.diff (renamed from tests/mir-opt/const_prop/const_prop_fails_gracefully.main.ConstProp.panic-abort.diff)0
-rw-r--r--tests/mir-opt/const_prop/pointer_expose_address.main.ConstProp.panic-unwind.diff (renamed from tests/mir-opt/const_prop/const_prop_fails_gracefully.main.ConstProp.panic-unwind.diff)0
-rw-r--r--tests/mir-opt/const_prop/pointer_expose_address.rs18
-rw-r--r--tests/mir-opt/const_prop/read_immutable_static.rs4
-rw-r--r--tests/mir-opt/const_prop/ref_deref.main.ConstProp.diff5
-rw-r--r--tests/mir-opt/const_prop/ref_deref.rs8
-rw-r--r--tests/mir-opt/const_prop/ref_deref_project.main.ConstProp.diff5
-rw-r--r--tests/mir-opt/const_prop/ref_deref_project.rs9
-rw-r--r--tests/mir-opt/const_prop/reify_fn_ptr.rs5
-rw-r--r--tests/mir-opt/const_prop/repeat.rs4
-rw-r--r--tests/mir-opt/const_prop/return_place.rs3
-rw-r--r--tests/mir-opt/const_prop/scalar_literal_propagation.rs4
-rw-r--r--tests/mir-opt/const_prop/slice_len.main.ConstProp.32bit.panic-abort.diff5
-rw-r--r--tests/mir-opt/const_prop/slice_len.main.ConstProp.32bit.panic-unwind.diff5
-rw-r--r--tests/mir-opt/const_prop/slice_len.main.ConstProp.64bit.panic-abort.diff5
-rw-r--r--tests/mir-opt/const_prop/slice_len.main.ConstProp.64bit.panic-unwind.diff5
-rw-r--r--tests/mir-opt/const_prop/slice_len.rs9
-rw-r--r--tests/mir-opt/const_prop/switch_int.rs9
-rw-r--r--tests/mir-opt/const_prop/tuple_literal_propagation.rs5
-rw-r--r--tests/mir-opt/const_prop/while_let_loops.rs3
-rw-r--r--tests/mir-opt/copy-prop/borrowed_local.rs4
-rw-r--r--tests/mir-opt/copy-prop/calls.rs2
-rw-r--r--tests/mir-opt/copy-prop/custom_move_arg.rs4
-rw-r--r--tests/mir-opt/copy-prop/move_projection.rs4
-rw-r--r--tests/mir-opt/coroutine_tiny.main-{closure#0}.coroutine_resume.0.mir3
-rw-r--r--tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.32bit.panic-abort.diff8
-rw-r--r--tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.32bit.panic-unwind.diff8
-rw-r--r--tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.64bit.panic-abort.diff8
-rw-r--r--tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.64bit.panic-unwind.diff8
-rw-r--r--tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-abort.diff8
-rw-r--r--tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-unwind.diff8
-rw-r--r--tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-abort.diff8
-rw-r--r--tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-unwind.diff8
-rw-r--r--tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.32bit.diff2
-rw-r--r--tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.64bit.diff2
-rw-r--r--tests/mir-opt/dataflow-const-prop/inherit_overflow.main.DataflowConstProp.panic-abort.diff2
-rw-r--r--tests/mir-opt/dataflow-const-prop/inherit_overflow.main.DataflowConstProp.panic-unwind.diff2
-rw-r--r--tests/mir-opt/dataflow-const-prop/sibling_ptr.main.DataflowConstProp.panic-abort.diff2
-rw-r--r--tests/mir-opt/dataflow-const-prop/sibling_ptr.main.DataflowConstProp.panic-unwind.diff2
-rw-r--r--tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.32bit.diff8
-rw-r--r--tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.64bit.diff8
-rw-r--r--tests/mir-opt/dead-store-elimination/call_arg_copy.rs2
-rw-r--r--tests/mir-opt/dead-store-elimination/cycle.rs4
-rw-r--r--tests/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir14
-rw-r--r--tests/mir-opt/gvn.constant_index_overflow.GVN.panic-abort.diff104
-rw-r--r--tests/mir-opt/gvn.constant_index_overflow.GVN.panic-unwind.diff104
-rw-r--r--tests/mir-opt/gvn.rs30
-rw-r--r--tests/mir-opt/inline/exponential_runtime.main.Inline.panic-abort.diff44
-rw-r--r--tests/mir-opt/inline/exponential_runtime.main.Inline.panic-unwind.diff44
-rw-r--r--tests/mir-opt/inline/indirect_destination.rs42
-rw-r--r--tests/mir-opt/inline/inline_coroutine.main.Inline.panic-abort.diff23
-rw-r--r--tests/mir-opt/inline/inline_coroutine.main.Inline.panic-unwind.diff75
-rw-r--r--tests/mir-opt/inline/inline_into_box_place.main.Inline.panic-abort.diff209
-rw-r--r--tests/mir-opt/inline/inline_into_box_place.main.Inline.panic-unwind.diff222
-rw-r--r--tests/mir-opt/inline/inline_into_box_place.rs11
-rw-r--r--tests/mir-opt/jump_threading.identity.JumpThreading.panic-abort.diff36
-rw-r--r--tests/mir-opt/jump_threading.identity.JumpThreading.panic-unwind.diff36
-rw-r--r--tests/mir-opt/jump_threading.rs18
-rw-r--r--tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.panic-abort.diff48
-rw-r--r--tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.panic-unwind.diff48
-rw-r--r--tests/mir-opt/lower_intrinsics.rs12
-rw-r--r--tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir28
-rw-r--r--tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-abort.diff4
-rw-r--r--tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-unwind.diff4
-rw-r--r--tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-abort.diff4
-rw-r--r--tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-unwind.diff4
-rw-r--r--tests/mir-opt/pre-codegen/loops.int_range.PreCodegen.after.mir2
-rw-r--r--tests/mir-opt/pre-codegen/mem_replace.mem_replace.PreCodegen.after.mir10
-rw-r--r--tests/mir-opt/pre-codegen/range_iter.forward_loop.PreCodegen.after.panic-abort.mir2
-rw-r--r--tests/mir-opt/pre-codegen/range_iter.forward_loop.PreCodegen.after.panic-unwind.mir2
-rw-r--r--tests/mir-opt/pre-codegen/range_iter.range_iter_next.PreCodegen.after.panic-abort.mir2
-rw-r--r--tests/mir-opt/pre-codegen/range_iter.range_iter_next.PreCodegen.after.panic-unwind.mir2
-rw-r--r--tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir16
-rw-r--r--tests/mir-opt/pre-codegen/slice_index.slice_get_mut_usize.PreCodegen.after.panic-abort.mir43
-rw-r--r--tests/mir-opt/pre-codegen/slice_index.slice_get_mut_usize.PreCodegen.after.panic-unwind.mir43
-rw-r--r--tests/mir-opt/pre-codegen/slice_index.slice_get_unchecked_mut_range.PreCodegen.after.panic-abort.mir85
-rw-r--r--tests/mir-opt/pre-codegen/slice_index.slice_get_unchecked_mut_range.PreCodegen.after.panic-unwind.mir85
-rw-r--r--tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-abort.mir10
-rw-r--r--tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-unwind.mir10
-rw-r--r--tests/mir-opt/pre-codegen/slice_iter.forward_loop.PreCodegen.after.panic-abort.mir10
-rw-r--r--tests/mir-opt/pre-codegen/slice_iter.forward_loop.PreCodegen.after.panic-unwind.mir10
-rw-r--r--tests/mir-opt/pre-codegen/slice_iter.range_loop.PreCodegen.after.panic-abort.mir2
-rw-r--r--tests/mir-opt/pre-codegen/slice_iter.range_loop.PreCodegen.after.panic-unwind.mir2
-rw-r--r--tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-abort.mir10
-rw-r--r--tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-unwind.mir10
-rw-r--r--tests/mir-opt/reference_prop.rs10
-rw-r--r--tests/mir-opt/retag.array_casts.SimplifyCfg-elaborate-drops.after.panic-abort.mir4
-rw-r--r--tests/mir-opt/retag.array_casts.SimplifyCfg-elaborate-drops.after.panic-unwind.mir4
-rw-r--r--tests/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff26
-rw-r--r--tests/pretty/cast-lt.pp2
-rw-r--r--tests/run-make-fulldeps/issue-19371/foo.rs5
-rw-r--r--tests/run-make-fulldeps/obtain-borrowck/driver.rs2
-rw-r--r--tests/run-make/compressed-debuginfo/Makefile1
-rw-r--r--tests/run-make/emit-to-stdout/emit-link.stderr2
-rw-r--r--tests/run-make/emit-to-stdout/emit-llvm-bc.stderr2
-rw-r--r--tests/run-make/emit-to-stdout/emit-metadata.stderr2
-rw-r--r--tests/run-make/emit-to-stdout/emit-multiple-types.stderr2
-rw-r--r--tests/run-make/emit-to-stdout/emit-obj.stderr2
-rw-r--r--tests/run-make/jobserver-error/Makefile12
-rw-r--r--tests/run-make/jobserver-error/cannot_open_fd.stderr6
-rw-r--r--tests/run-make/jobserver-error/not_a_pipe.stderr4
-rw-r--r--tests/run-make/jobserver-error/poisoned_pipe.stderr (renamed from tests/run-make/jobserver-error/jobserver.stderr)2
-rw-r--r--tests/run-make/overwrite-input/file.stderr2
-rw-r--r--tests/run-make/overwrite-input/folder.stderr2
-rw-r--r--tests/run-make/overwrite-input/main.stderr2
-rw-r--r--tests/run-make/pass-linker-flags-flavor/Makefile11
-rw-r--r--tests/run-make/pass-linker-flags-flavor/attribute.rs12
-rw-r--r--tests/run-make/pass-linker-flags-flavor/empty.rs (renamed from tests/run-make/pass-linker-flags/rs.rs)0
-rw-r--r--tests/run-make/pass-linker-flags-from-dep/Makefile6
-rw-r--r--tests/run-make/pass-linker-flags-from-dep/rust_dep_attr.rs14
-rw-r--r--tests/run-make/pass-linker-flags-from-dep/rust_dep_flag.rs (renamed from tests/run-make/pass-linker-flags-from-dep/rust_dep.rs)0
-rw-r--r--tests/run-make/pass-linker-flags/Makefile3
-rw-r--r--tests/run-make/pass-linker-flags/attribute.rs11
-rw-r--r--tests/run-make/pass-linker-flags/empty.rs1
-rw-r--r--tests/run-make/rustc-macro-dep-files/foo.rs2
-rw-r--r--tests/run-make/unknown-mod-stdin/unknown-mod.stderr2
-rw-r--r--tests/run-make/valid-print-requests/valid-print-requests.stderr2
-rw-r--r--tests/rustdoc-gui/font-weight.goml2
-rw-r--r--tests/rustdoc-gui/globals.goml24
-rw-r--r--tests/rustdoc-gui/headers-color.goml2
-rw-r--r--tests/rustdoc-gui/hide-mobile-topbar.goml20
-rw-r--r--tests/rustdoc-gui/item-decl-comment-highlighting.goml73
-rw-r--r--tests/rustdoc-gui/item-info.goml15
-rw-r--r--tests/rustdoc-gui/links-color.goml4
-rw-r--r--tests/rustdoc-gui/search-tab.goml2
-rw-r--r--tests/rustdoc-gui/sidebar-links-color.goml4
-rw-r--r--tests/rustdoc-gui/sidebar-resize-setting.goml23
-rw-r--r--tests/rustdoc-gui/sidebar-resize-window.goml37
-rw-r--r--tests/rustdoc-gui/sidebar-resize.goml28
-rw-r--r--tests/rustdoc-gui/sidebar-source-code.goml5
-rw-r--r--tests/rustdoc-gui/sidebar.goml4
-rw-r--r--tests/rustdoc-gui/src/lib2/Cargo.toml7
-rw-r--r--tests/rustdoc-gui/src/lib2/lib.rs9
-rw-r--r--tests/rustdoc-gui/src/proc_macro_test/Cargo.lock7
-rw-r--r--tests/rustdoc-gui/src/proc_macro_test/Cargo.toml8
-rw-r--r--tests/rustdoc-gui/src/proc_macro_test/lib.rs11
-rw-r--r--tests/rustdoc-gui/src/test_docs/lib.rs18
-rw-r--r--tests/rustdoc-gui/src/theme_css/custom-theme.css2
-rw-r--r--tests/rustdoc-gui/tooltip-over-sidebar.goml12
-rw-r--r--tests/rustdoc-gui/where-whitespace.goml8
-rw-r--r--tests/rustdoc-js-std/iterator-type-signatures.js29
-rw-r--r--tests/rustdoc-js-std/keyword.js4
-rw-r--r--tests/rustdoc-js-std/macro-check.js4
-rw-r--r--tests/rustdoc-js-std/parser-bindings.js245
-rw-r--r--tests/rustdoc-js-std/parser-errors.js47
-rw-r--r--tests/rustdoc-js-std/parser-filter.js22
-rw-r--r--tests/rustdoc-js-std/parser-ident.js6
-rw-r--r--tests/rustdoc-js-std/parser-paths.js48
-rw-r--r--tests/rustdoc-js-std/parser-returned.js2
-rw-r--r--tests/rustdoc-js-std/parser-separators.js22
-rw-r--r--tests/rustdoc-js-std/parser-slice-array.js20
-rw-r--r--tests/rustdoc-js-std/parser-weird-queries.js4
-rw-r--r--tests/rustdoc-js-std/simd-type-signatures.js20
-rw-r--r--tests/rustdoc-js/assoc-type-backtrack.js163
-rw-r--r--tests/rustdoc-js/assoc-type-backtrack.rs38
-rw-r--r--tests/rustdoc-js/assoc-type-loop.js9
-rw-r--r--tests/rustdoc-js/assoc-type-loop.rs35
-rw-r--r--tests/rustdoc-js/assoc-type.js56
-rw-r--r--tests/rustdoc-js/assoc-type.rs12
-rw-r--r--tests/rustdoc-js/big-result.js39
-rw-r--r--tests/rustdoc-js/big-result.rs61
-rw-r--r--tests/rustdoc-js/enum-variant-not-type.js70
-rw-r--r--tests/rustdoc-js/enum-variant-not-type.rs14
-rw-r--r--tests/rustdoc-js/full-path-function.js4
-rw-r--r--tests/rustdoc-js/gat.js57
-rw-r--r--tests/rustdoc-js/gat.rs8
-rw-r--r--tests/rustdoc-js/generics.js1
-rw-r--r--tests/rustdoc-js/generics2.js22
-rw-r--r--tests/rustdoc-js/generics2.rs13
-rw-r--r--tests/rustdoc-js/impl-trait.js2
-rw-r--r--tests/rustdoc-js/never-search.js10
-rw-r--r--tests/rustdoc-js/substring.js22
-rw-r--r--tests/rustdoc-js/substring.rs2
-rw-r--r--tests/rustdoc-js/trait-methods.js12
-rw-r--r--tests/rustdoc-js/trait-methods.rs4
-rw-r--r--tests/rustdoc-js/type-parameters.js19
-rw-r--r--tests/rustdoc-ui/apit-46976.rs4
-rw-r--r--tests/rustdoc-ui/auxiliary/issue-36031.rs (renamed from tests/rustdoc/auxiliary/issue-36031.rs)0
-rw-r--r--tests/rustdoc-ui/auxiliary/issue-40936.rs (renamed from tests/rustdoc/auxiliary/issue-40936.rs)0
-rw-r--r--tests/rustdoc-ui/auxiliary/issue-48414.rs (renamed from tests/rustdoc/auxiliary/issue-48414.rs)0
-rw-r--r--tests/rustdoc-ui/bounded-hr-lifetime.stderr2
-rw-r--r--tests/rustdoc-ui/check-cfg/check-cfg.stderr2
-rw-r--r--tests/rustdoc-ui/circular-intra-doc-link-48414.rs (renamed from tests/rustdoc/issue-48414.rs)3
-rw-r--r--tests/rustdoc-ui/const-evalutation-ice.stderr2
-rw-r--r--tests/rustdoc-ui/const_arg_in_type_position.stderr2
-rw-r--r--tests/rustdoc-ui/diagnostic-width.stderr2
-rw-r--r--tests/rustdoc-ui/doc-alias-assoc-const.stderr2
-rw-r--r--tests/rustdoc-ui/doc-alias-same-name.stderr2
-rw-r--r--tests/rustdoc-ui/doctest/check-attr-test.stderr36
-rw-r--r--tests/rustdoc-ui/doctest/check-cfg-test.stderr2
-rw-r--r--tests/rustdoc-ui/doctest/doctest-edition.stderr2
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.stdout2
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-missing-codes.stdout2
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-output-windows.stdout2
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-output.stdout2
-rw-r--r--tests/rustdoc-ui/doctest/nocapture-fail.stderr2
-rw-r--r--tests/rustdoc-ui/doctest/private-item-doc-test.stderr2
-rw-r--r--tests/rustdoc-ui/doctest/private-public-item-doc-test.stderr2
-rw-r--r--tests/rustdoc-ui/doctest/test-compile-fail1.stderr2
-rw-r--r--tests/rustdoc-ui/doctest/test-compile-fail2.stderr2
-rw-r--r--tests/rustdoc-ui/doctest/test-compile-fail3.stderr2
-rw-r--r--tests/rustdoc-ui/doctest/unparseable-doc-test.stdout2
-rw-r--r--tests/rustdoc-ui/error-in-impl-trait/README.md2
-rw-r--r--tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-2.stderr2
-rw-r--r--tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-impl-trait-return.stderr2
-rw-r--r--tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type.stderr2
-rw-r--r--tests/rustdoc-ui/feature-gate-doc_cfg_hide.stderr2
-rw-r--r--tests/rustdoc-ui/hidden-trait-method-34423.rs (renamed from tests/rustdoc/issue-34423.rs)3
-rw-r--r--tests/rustdoc-ui/infinite-recursive-type.stderr2
-rw-r--r--tests/rustdoc-ui/inherent-assoc-consts-36031.rs (renamed from tests/rustdoc/issue-36031.rs)3
-rw-r--r--tests/rustdoc-ui/intra-doc/alias-ice.stderr2
-rw-r--r--tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.stderr2
-rw-r--r--tests/rustdoc-ui/intra-doc/crate-nonexistent.stderr2
-rw-r--r--tests/rustdoc-ui/intra-doc/deny-intra-link-resolution-failure.stderr2
-rw-r--r--tests/rustdoc-ui/intra-doc/field-ice.stderr2
-rw-r--r--tests/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.stderr2
-rw-r--r--tests/rustdoc-ui/intra-doc/issue-108653-associated-items-4.stderr2
-rw-r--r--tests/rustdoc-ui/intra-doc/issue-108653-associated-items-5.stderr2
-rw-r--r--tests/rustdoc-ui/intra-doc/issue-108653-associated-items-6.stderr2
-rw-r--r--tests/rustdoc-ui/intra-doc/issue-108653-associated-items-7.stderr2
-rw-r--r--tests/rustdoc-ui/intra-doc/issue-108653-associated-items-8.stderr2
-rw-r--r--tests/rustdoc-ui/intra-doc/pub-export-lint.stderr2
-rw-r--r--tests/rustdoc-ui/intra-doc/reference-links.stderr2
-rw-r--r--tests/rustdoc-ui/intra-doc/span-ice-55723.stderr2
-rw-r--r--tests/rustdoc-ui/intra-doc/unresolved-import-recovery.stderr2
-rw-r--r--tests/rustdoc-ui/intra-doc/unused-extern-crate.stderr2
-rw-r--r--tests/rustdoc-ui/invalid-keyword.stderr2
-rw-r--r--tests/rustdoc-ui/invalid_associated_const.stderr2
-rw-r--r--tests/rustdoc-ui/issue-102467.stderr2
-rw-r--r--tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr2
-rw-r--r--tests/rustdoc-ui/issues/issue-102986.stderr2
-rw-r--r--tests/rustdoc-ui/issues/issue-105334.stderr2
-rw-r--r--tests/rustdoc-ui/issues/issue-105737.stderr2
-rw-r--r--tests/rustdoc-ui/issues/issue-106213.stderr2
-rw-r--r--tests/rustdoc-ui/issues/issue-106226.stderr2
-rw-r--r--tests/rustdoc-ui/issues/issue-61592-2.stderr2
-rw-r--r--tests/rustdoc-ui/issues/issue-61592.stderr2
-rw-r--r--tests/rustdoc-ui/issues/issue-61732.stderr2
-rw-r--r--tests/rustdoc-ui/issues/issue-79465.stderr2
-rw-r--r--tests/rustdoc-ui/issues/issue-79467.stderr2
-rw-r--r--tests/rustdoc-ui/issues/issue-79494.stderr2
-rw-r--r--tests/rustdoc-ui/issues/issue-81662-shortness.stdout2
-rw-r--r--tests/rustdoc-ui/issues/issue-96287.stderr2
-rw-r--r--tests/rustdoc-ui/lints/check-attr.rs17
-rw-r--r--tests/rustdoc-ui/lints/check-attr.stderr80
-rw-r--r--tests/rustdoc-ui/lints/check-fail.stderr6
-rw-r--r--tests/rustdoc-ui/lints/deny-missing-docs-macro.stderr2
-rw-r--r--tests/rustdoc-ui/lints/doc-spotlight.stderr2
-rw-r--r--tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.stderr2
-rw-r--r--tests/rustdoc-ui/lints/no-crate-level-doc-lint.stderr2
-rw-r--r--tests/rustdoc-ui/mismatched_arg_count.stderr2
-rw-r--r--tests/rustdoc-ui/nested-extern-crate-46271.rs (renamed from tests/rustdoc/issue-46271.rs)3
-rw-r--r--tests/rustdoc-ui/nested-macro-rules-47639.rs (renamed from tests/rustdoc/issue-47639.rs)3
-rw-r--r--tests/rustdoc-ui/not-wf-ambiguous-normalization.stderr2
-rw-r--r--tests/rustdoc-ui/proc_macro_bug.stderr2
-rw-r--r--tests/rustdoc-ui/rustc-check-passes.stderr2
-rw-r--r--tests/rustdoc-ui/super-glob-40936.rs (renamed from tests/rustdoc/issue-40936.rs)3
-rw-r--r--tests/rustdoc-ui/track-diagnostics.stderr2
-rw-r--r--tests/rustdoc-ui/tuple-variadic-check.stderr2
-rw-r--r--tests/rustdoc-ui/unescaped_backticks.rs2
-rw-r--r--tests/rustdoc-ui/unescaped_backticks.stderr14
-rw-r--r--tests/rustdoc/async-fn-opaque-item.rs4
-rw-r--r--tests/rustdoc/compiler-derive-proc-macro.rs6
-rw-r--r--tests/rustdoc/deprecated-future-staged-api.rs2
-rw-r--r--tests/rustdoc/doctest/auxiliary/empty.rs1
-rw-r--r--tests/rustdoc/doctest/doctest-cfg-feature-30252.rs (renamed from tests/rustdoc/doctest-cfg-feature-30252.rs)0
-rw-r--r--tests/rustdoc/doctest/doctest-crate-attributes-38129.rs (renamed from tests/rustdoc/issue-38129.rs)0
-rw-r--r--tests/rustdoc/doctest/doctest-hide-empty-line-23106.rs (renamed from tests/rustdoc/doctest-hide-empty-line-23106.rs)0
-rw-r--r--tests/rustdoc/doctest/doctest-ignore-32556.rs (renamed from tests/rustdoc/doctest-ignore-32556.rs)0
-rw-r--r--tests/rustdoc/doctest/doctest-include-43153.rs (renamed from tests/rustdoc/issue-43153.rs)2
-rw-r--r--tests/rustdoc/doctest/doctest-macro-38219.rs (renamed from tests/rustdoc/issue-38219.rs)2
-rw-r--r--tests/rustdoc/doctest/doctest-manual-crate-name.rs (renamed from tests/rustdoc/doctest-manual-crate-name.rs)0
-rw-r--r--tests/rustdoc/doctest/doctest-markdown-inline-parse-23744.rs (renamed from tests/rustdoc/doctest-markdown-inline-parse-23744.rs)0
-rw-r--r--tests/rustdoc/doctest/doctest-markdown-trailing-docblock-48377.rs (renamed from tests/rustdoc/issue-48377.rs)2
-rw-r--r--tests/rustdoc/doctest/doctest-multi-line-string-literal-25944.rs (renamed from tests/rustdoc/doctest-multi-line-string-literal-25944.rs)0
-rw-r--r--tests/rustdoc/enum-variant-fields-heading.rs18
-rw-r--r--tests/rustdoc/enum-variant-fields-heading.variants.html3
-rw-r--r--tests/rustdoc/enum-variant-private-46767.rs (renamed from tests/rustdoc/issue-46767.rs)1
-rw-r--r--tests/rustdoc/foreign-implementors-js-43701.rs (renamed from tests/rustdoc/issue-43701.rs)1
-rw-r--r--tests/rustdoc/inline-private-with-intermediate-doc-hidden.rs4
-rw-r--r--tests/rustdoc/inline-rename-34473.rs (renamed from tests/rustdoc/issue-34473.rs)2
-rw-r--r--tests/rustdoc/inline_local/enum-variant-reexport-46766.rs (renamed from tests/rustdoc/issue-46766.rs)1
-rw-r--r--tests/rustdoc/issue-105735-overlapping-reexport-2.rs6
-rw-r--r--tests/rustdoc/issue-105735-overlapping-reexport.rs6
-rw-r--r--tests/rustdoc/issue-109258-missing-private-inlining.rs10
-rw-r--r--tests/rustdoc/issue-109449-doc-hidden-reexports.rs12
-rw-r--r--tests/rustdoc/issue-110422-inner-private.rs18
-rw-r--r--tests/rustdoc/issue-118180-empty-tuple-struct.rs9
-rw-r--r--tests/rustdoc/issue-43893.rs19
-rw-r--r--tests/rustdoc/issue-46976.rs1
-rw-r--r--tests/rustdoc/issue-60522-duplicated-glob-reexport.rs4
-rw-r--r--tests/rustdoc/nested-items-issue-111415.rs8
-rw-r--r--tests/rustdoc/notable-trait/doc-notable_trait-slice.bare_fn_matches.html2
-rw-r--r--tests/rustdoc/notable-trait/doc-notable_trait.bare-fn.html2
-rw-r--r--tests/rustdoc/notable-trait/doc-notable_trait.some-struct-new.html2
-rw-r--r--tests/rustdoc/notable-trait/doc-notable_trait.wrap-me.html2
-rw-r--r--tests/rustdoc/notable-trait/spotlight-from-dependency.odd.html2
-rw-r--r--tests/rustdoc/private-use-decl-macro-47038.rs (renamed from tests/rustdoc/issue-47038.rs)2
-rw-r--r--tests/rustdoc/pub-reexport-of-pub-reexport-46506.rs (renamed from tests/rustdoc/issue-46506-pub-reexport-of-pub-reexport.rs)8
-rw-r--r--tests/rustdoc/reexport-cfg.rs30
-rw-r--r--tests/rustdoc/reexport-stability-tags-deprecated-and-portability.rs4
-rw-r--r--tests/rustdoc/reexport-stability-tags-unstable-and-portability.rs4
-rw-r--r--tests/rustdoc/rfc-2632-const-trait-impl.rs10
-rw-r--r--tests/rustdoc/src-links-implementor-43893.rs21
-rw-r--r--tests/rustdoc/stability.rs11
-rw-r--r--tests/rustdoc/trait-implementations-duplicate-self-45584.rs (renamed from tests/rustdoc/issue-45584.rs)2
-rw-r--r--tests/rustdoc/tuple-struct-where-clause-34928.rs (renamed from tests/rustdoc/issue-34928.rs)2
-rw-r--r--tests/rustdoc/typedef-inner-variants-lazy_type_alias.rs6
-rw-r--r--tests/rustdoc/typedef-inner-variants.rs4
-rw-r--r--tests/rustdoc/where.SWhere_Echo_impl.html4
-rw-r--r--tests/rustdoc/where.SWhere_Simd_item-decl.html4
-rw-r--r--tests/rustdoc/where.alpha_trait_decl.html2
-rw-r--r--tests/rustdoc/where.bravo_trait_decl.html4
-rw-r--r--tests/rustdoc/where.charlie_fn_decl.html4
-rw-r--r--tests/rustdoc/where.golf_type_alias_decl.html4
-rw-r--r--tests/rustdoc/whitespace-after-where-clause.enum.html4
-rw-r--r--tests/rustdoc/whitespace-after-where-clause.struct.html4
-rw-r--r--tests/rustdoc/whitespace-after-where-clause.trait.html4
-rw-r--r--tests/rustdoc/whitespace-after-where-clause.union.html6
-rw-r--r--tests/rustdoc/whitespace-after-where-clause.union2.html2
-rw-r--r--tests/ui-fulldeps/dropck-tarena-cycle-checked.rs2
-rw-r--r--tests/ui-fulldeps/dropck-tarena-cycle-checked.stderr4
-rw-r--r--tests/ui-fulldeps/dropck-tarena-unsound-drop.rs2
-rw-r--r--tests/ui-fulldeps/dropck-tarena-unsound-drop.stderr4
-rw-r--r--tests/ui-fulldeps/fluent-messages/test.rs43
-rw-r--r--tests/ui-fulldeps/fluent-messages/test.stderr78
-rw-r--r--tests/ui-fulldeps/internal-lints/diagnostics.rs23
-rw-r--r--tests/ui-fulldeps/internal-lints/diagnostics.stderr26
-rw-r--r--tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.rs3
-rw-r--r--tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.stderr6
-rw-r--r--tests/ui-fulldeps/pathless-extern-unstable.rs1
-rw-r--r--tests/ui-fulldeps/pathless-extern-unstable.stderr4
-rw-r--r--tests/ui-fulldeps/pprust-expr-roundtrip.rs4
-rw-r--r--tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs3
-rw-r--r--tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.stderr4
-rw-r--r--tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs3
-rw-r--r--tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr182
-rw-r--r--tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs1
-rw-r--r--tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.stderr4
-rw-r--r--tests/ui-fulldeps/session-diagnostic/invalid-variable.rs3
-rw-r--r--tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs3
-rw-r--r--tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.stderr182
-rw-r--r--tests/ui-fulldeps/stable-mir/check_abi.rs143
-rw-r--r--tests/ui-fulldeps/stable-mir/check_allocation.rs277
-rw-r--r--tests/ui-fulldeps/stable-mir/check_defs.rs132
-rw-r--r--tests/ui-fulldeps/stable-mir/check_instance.rs21
-rw-r--r--tests/ui-fulldeps/stable-mir/check_item_kind.rs84
-rw-r--r--tests/ui-fulldeps/stable-mir/check_ty_fold.rs115
-rw-r--r--tests/ui-fulldeps/stable-mir/crate-info.rs12
-rw-r--r--tests/ui-fulldeps/stable-mir/projections.rs180
-rw-r--r--tests/ui-fulldeps/stable-mir/smir_visitor.rs5
-rw-r--r--tests/ui/abi/abi-typo-unstable.stderr2
-rw-r--r--tests/ui/abi/arm-unadjusted-intrinsic.rs54
-rw-r--r--tests/ui/abi/compatibility.rs45
-rw-r--r--tests/ui/abi/issue-94223.rs8
-rw-r--r--tests/ui/abi/riscv-discoverability-guidance.rs4
-rw-r--r--tests/ui/abi/stack-probes-lto.rs4
-rw-r--r--tests/ui/abi/stack-probes.rs4
-rw-r--r--tests/ui/abi/unsized-args-in-c-abi-issues-94223-115845.rs30
-rw-r--r--tests/ui/abi/variadic-ffi.rs5
-rw-r--r--tests/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr2
-rw-r--r--tests/ui/allocator/allocator-args.stderr2
-rw-r--r--tests/ui/allocator/function-allocator.stderr2
-rw-r--r--tests/ui/allocator/two-allocators.stderr2
-rw-r--r--tests/ui/allocator/two-allocators2.stderr2
-rw-r--r--tests/ui/allocator/two-allocators3.stderr2
-rw-r--r--tests/ui/argument-suggestions/complex.stderr2
-rw-r--r--tests/ui/argument-suggestions/display-is-suggestable.stderr2
-rw-r--r--tests/ui/argument-suggestions/issue-112507.stderr2
-rw-r--r--tests/ui/argument-suggestions/issue-96638.stderr2
-rw-r--r--tests/ui/argument-suggestions/issue-97197.stderr2
-rw-r--r--tests/ui/argument-suggestions/issue-97484.stderr2
-rw-r--r--tests/ui/argument-suggestions/issue-98894.stderr2
-rw-r--r--tests/ui/argument-suggestions/issue-98897.stderr2
-rw-r--r--tests/ui/argument-suggestions/issue-99482.stderr2
-rw-r--r--tests/ui/argument-suggestions/too-long.stderr2
-rw-r--r--tests/ui/argument-suggestions/two-mismatch-notes.stderr2
-rw-r--r--tests/ui/array-slice-vec/array_const_index-0.stderr2
-rw-r--r--tests/ui/array-slice-vec/array_const_index-1.stderr2
-rw-r--r--tests/ui/array-slice-vec/match_arr_unknown_len.stderr2
-rw-r--r--tests/ui/array-slice-vec/slice-mut-2.stderr2
-rw-r--r--tests/ui/array-slice-vec/slice-mut.stderr2
-rw-r--r--tests/ui/array-slice-vec/slice-to-vec-comparison.stderr2
-rw-r--r--tests/ui/array-slice-vec/vec-macro-with-comma-only.stderr2
-rw-r--r--tests/ui/array-slice-vec/vec-mut-iter-borrow.stderr2
-rw-r--r--tests/ui/array-slice-vec/vec-res-add.stderr2
-rw-r--r--tests/ui/array-slice-vec/vector-no-ann.stderr2
-rw-r--r--tests/ui/asm/aarch64/bad-reg.rs6
-rw-r--r--tests/ui/asm/aarch64/bad-reg.stderr12
-rw-r--r--tests/ui/asm/const-error.rs15
-rw-r--r--tests/ui/asm/const-error.stderr9
-rw-r--r--tests/ui/asm/issue-113788.stderr2
-rw-r--r--tests/ui/asm/issue-72570.stderr2
-rw-r--r--tests/ui/asm/issue-85247.rwpi.stderr2
-rw-r--r--tests/ui/asm/issue-87802.stderr2
-rw-r--r--tests/ui/asm/issue-99071.stderr2
-rw-r--r--tests/ui/asm/issue-99122.stderr2
-rw-r--r--tests/ui/asm/reg-conflict.stderr2
-rw-r--r--tests/ui/asm/x86_64/bad-reg.rs4
-rw-r--r--tests/ui/asm/x86_64/bad-reg.stderr10
-rw-r--r--tests/ui/assign-imm-local-twice.stderr2
-rw-r--r--tests/ui/associated-consts/assoc-const-eq-ambiguity.rs19
-rw-r--r--tests/ui/associated-consts/assoc-const-eq-ambiguity.stderr38
-rw-r--r--tests/ui/associated-consts/assoc-const-eq-missing.rs13
-rw-r--r--tests/ui/associated-consts/assoc-const-eq-missing.stderr20
-rw-r--r--tests/ui/associated-consts/assoc-const-eq-ty-alias-noninteracting.rs21
-rw-r--r--tests/ui/associated-consts/assoc-const-ty-mismatch.rs20
-rw-r--r--tests/ui/associated-consts/assoc-const-ty-mismatch.stderr36
-rw-r--r--tests/ui/associated-consts/associated-const-ambiguity-report.stderr2
-rw-r--r--tests/ui/associated-consts/associated-const-array-len.stderr2
-rw-r--r--tests/ui/associated-consts/associated-const-dead-code.stderr2
-rw-r--r--tests/ui/associated-consts/associated-const-generic-obligations.stderr2
-rw-r--r--tests/ui/associated-consts/associated-const-impl-wrong-lifetime.stderr6
-rw-r--r--tests/ui/associated-consts/associated-const-impl-wrong-type.stderr2
-rw-r--r--tests/ui/associated-consts/associated-const-in-trait.stderr2
-rw-r--r--tests/ui/associated-consts/associated-const-no-item.stderr2
-rw-r--r--tests/ui/associated-consts/associated-const-private-impl.stderr2
-rw-r--r--tests/ui/associated-consts/associated-const-type-parameter-arrays-2.stderr2
-rw-r--r--tests/ui/associated-consts/associated-const-type-parameter-arrays.stderr4
-rw-r--r--tests/ui/associated-consts/defaults-cyclic-fail.stderr2
-rw-r--r--tests/ui/associated-consts/defaults-not-assumed-fail.stderr2
-rw-r--r--tests/ui/associated-consts/double-elided.stderr2
-rw-r--r--tests/ui/associated-consts/infer-placeholder-in-non-suggestable-pos.stderr2
-rw-r--r--tests/ui/associated-consts/issue-102335-const.stderr2
-rw-r--r--tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr2
-rw-r--r--tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr2
-rw-r--r--tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr2
-rw-r--r--tests/ui/associated-consts/issue-47814.stderr2
-rw-r--r--tests/ui/associated-consts/projection-unspecified-but-bounded.stderr2
-rw-r--r--tests/ui/associated-consts/shadowed-const.rs2
-rw-r--r--tests/ui/associated-consts/shadowed-const.stderr14
-rw-r--r--tests/ui/associated-inherent-types/ambiguity.stderr2
-rw-r--r--tests/ui/associated-inherent-types/assoc-inherent-late-bound.rs14
-rw-r--r--tests/ui/associated-inherent-types/assoc-inherent-no-body.stderr2
-rw-r--r--tests/ui/associated-inherent-types/assoc-inherent-unstable.stderr2
-rw-r--r--tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr2
-rw-r--r--tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr2
-rw-r--r--tests/ui/associated-inherent-types/generic-associated-types-bad.local.stderr2
-rw-r--r--tests/ui/associated-inherent-types/generic-associated-types-bad.region.stderr2
-rw-r--r--tests/ui/associated-inherent-types/inference-fail.stderr2
-rw-r--r--tests/ui/associated-inherent-types/inference.rs2
-rw-r--r--tests/ui/associated-inherent-types/issue-109299-1.stderr2
-rw-r--r--tests/ui/associated-inherent-types/issue-109299.stderr2
-rw-r--r--tests/ui/associated-inherent-types/issue-111404-1.rs1
-rw-r--r--tests/ui/associated-inherent-types/issue-111404-1.stderr10
-rw-r--r--tests/ui/associated-inherent-types/issue-111879-0.stderr2
-rw-r--r--tests/ui/associated-inherent-types/issue-111879-1.stderr2
-rw-r--r--tests/ui/associated-inherent-types/late-bound-regions.stderr2
-rw-r--r--tests/ui/associated-inherent-types/normalization-overflow.stderr2
-rw-r--r--tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.shadowed.stderr2
-rw-r--r--tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.uncovered.stderr2
-rw-r--r--tests/ui/associated-inherent-types/not-found-unsatisfied-bounds-1.stderr2
-rw-r--r--tests/ui/associated-inherent-types/not-found-unsatisfied-bounds-in-multiple-impls.stderr2
-rw-r--r--tests/ui/associated-inherent-types/regionck-0.stderr2
-rw-r--r--tests/ui/associated-inherent-types/regionck-2.stderr2
-rw-r--r--tests/ui/associated-inherent-types/style.stderr2
-rw-r--r--tests/ui/associated-inherent-types/unsatisfied-bounds-inferred-type.stderr2
-rw-r--r--tests/ui/associated-inherent-types/unsatisfied-bounds-where-clause-on-assoc-ty.stderr2
-rw-r--r--tests/ui/associated-item/ambiguous-associated-type-with-generics.stderr2
-rw-r--r--tests/ui/associated-item/associated-item-duplicate-bounds.stderr4
-rw-r--r--tests/ui/associated-item/associated-item-duplicate-names-2.stderr2
-rw-r--r--tests/ui/associated-item/impl-duplicate-methods.stderr2
-rw-r--r--tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr2
-rw-r--r--tests/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.stderr2
-rw-r--r--tests/ui/associated-type-bounds/bad-universal-in-dyn-in-where-clause.stderr2
-rw-r--r--tests/ui/associated-type-bounds/bad-universal-in-impl-sig.stderr2
-rw-r--r--tests/ui/associated-type-bounds/binder-on-bound.stderr2
-rw-r--r--tests/ui/associated-type-bounds/const-projection-err.gce.stderr2
-rw-r--r--tests/ui/associated-type-bounds/const-projection-err.stock.stderr2
-rw-r--r--tests/ui/associated-type-bounds/consts.rs2
-rw-r--r--tests/ui/associated-type-bounds/consts.stderr14
-rw-r--r--tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.stderr2
-rw-r--r--tests/ui/associated-type-bounds/issue-102335-ty.stderr2
-rw-r--r--tests/ui/associated-type-bounds/issue-104916.stderr2
-rw-r--r--tests/ui/associated-type-bounds/issue-71443-1.stderr2
-rw-r--r--tests/ui/associated-type-bounds/issue-99828.rs2
-rw-r--r--tests/ui/associated-type-bounds/issue-99828.stderr10
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/basic.current_without.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/basic.next_without.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/equality.current.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/equality.next.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/equality.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/missing.rs2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/missing.stderr7
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/non-rpitit.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stderr2
-rw-r--r--tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr2
-rw-r--r--tests/ui/associated-types/associated-type-macro.stderr2
-rw-r--r--tests/ui/associated-types/associated-type-shadowed-from-non-local-supertrait.rs15
-rw-r--r--tests/ui/associated-types/associated-type-shadowed-from-non-local-supertrait.stderr12
-rw-r--r--tests/ui/associated-types/associated-type-shadowed-from-supertrait.rs19
-rw-r--r--tests/ui/associated-types/associated-type-shadowed-from-supertrait.stderr15
-rw-r--r--tests/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.stderr2
-rw-r--r--tests/ui/associated-types/associated-types-bound-failure.stderr2
-rw-r--r--tests/ui/associated-types/associated-types-eq-1.stderr2
-rw-r--r--tests/ui/associated-types/associated-types-eq-2.stderr2
-rw-r--r--tests/ui/associated-types/associated-types-eq-expr-path.stderr2
-rw-r--r--tests/ui/associated-types/associated-types-for-unimpl-trait.stderr2
-rw-r--r--tests/ui/associated-types/associated-types-invalid-trait-ref-issue-18865.stderr2
-rw-r--r--tests/ui/associated-types/associated-types-issue-17359.stderr2
-rw-r--r--tests/ui/associated-types/associated-types-issue-20346.stderr2
-rw-r--r--tests/ui/associated-types/associated-types-no-suitable-bound.stderr2
-rw-r--r--tests/ui/associated-types/associated-types-no-suitable-supertrait-2.stderr2
-rw-r--r--tests/ui/associated-types/associated-types-outlives.stderr2
-rw-r--r--tests/ui/associated-types/associated-types-overridden-binding-2.stderr2
-rw-r--r--tests/ui/associated-types/associated-types-project-from-hrtb-in-fn.stderr2
-rw-r--r--tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.stderr2
-rw-r--r--tests/ui/associated-types/associated-types-unconstrained.stderr2
-rw-r--r--tests/ui/associated-types/associated-types-unsized.stderr2
-rw-r--r--tests/ui/associated-types/bound-lifetime-in-binding-only.elision.stderr9
-rw-r--r--tests/ui/associated-types/bound-lifetime-in-binding-only.ok.stderr2
-rw-r--r--tests/ui/associated-types/bound-lifetime-in-return-only.elision.stderr9
-rw-r--r--tests/ui/associated-types/bound-lifetime-in-return-only.local.stderr2
-rw-r--r--tests/ui/associated-types/bound-lifetime-in-return-only.ok.stderr2
-rw-r--r--tests/ui/associated-types/bound-lifetime-in-return-only.structure.stderr2
-rw-r--r--tests/ui/associated-types/cache/project-fn-ret-contravariant.transmute.stderr2
-rw-r--r--tests/ui/associated-types/cache/project-fn-ret-invariant.transmute.stderr2
-rw-r--r--tests/ui/associated-types/defaults-wf.stderr2
-rw-r--r--tests/ui/associated-types/dont-suggest-cyclic-constraint.stderr6
-rw-r--r--tests/ui/associated-types/higher-ranked-projection.bad.stderr2
-rw-r--r--tests/ui/associated-types/hr-associated-type-bound-1.stderr2
-rw-r--r--tests/ui/associated-types/hr-associated-type-bound-2.stderr2
-rw-r--r--tests/ui/associated-types/hr-associated-type-bound-object.stderr2
-rw-r--r--tests/ui/associated-types/hr-associated-type-bound-param-1.stderr2
-rw-r--r--tests/ui/associated-types/hr-associated-type-bound-param-3.stderr2
-rw-r--r--tests/ui/associated-types/hr-associated-type-bound-param-4.stderr2
-rw-r--r--tests/ui/associated-types/hr-associated-type-bound-param-6.stderr2
-rw-r--r--tests/ui/associated-types/hr-associated-type-projection-1.stderr2
-rw-r--r--tests/ui/associated-types/impl-trait-return-missing-constraint.stderr2
-rw-r--r--tests/ui/associated-types/impl-wf-cycle-1.stderr2
-rw-r--r--tests/ui/associated-types/impl-wf-cycle-2.stderr2
-rw-r--r--tests/ui/associated-types/issue-19883.stderr2
-rw-r--r--tests/ui/associated-types/issue-20005.stderr2
-rw-r--r--tests/ui/associated-types/issue-20825.stderr2
-rw-r--r--tests/ui/associated-types/issue-22037.stderr2
-rw-r--r--tests/ui/associated-types/issue-23595-1.stderr2
-rw-r--r--tests/ui/associated-types/issue-23595-2.stderr2
-rw-r--r--tests/ui/associated-types/issue-25700.stderr2
-rw-r--r--tests/ui/associated-types/issue-26681.stderr2
-rw-r--r--tests/ui/associated-types/issue-27675-unchecked-bounds.stderr2
-rw-r--r--tests/ui/associated-types/issue-32323.stderr2
-rw-r--r--tests/ui/associated-types/issue-36499.rs2
-rw-r--r--tests/ui/associated-types/issue-36499.stderr2
-rw-r--r--tests/ui/associated-types/issue-38821.stderr2
-rw-r--r--tests/ui/associated-types/issue-43784-associated-type.stderr2
-rw-r--r--tests/ui/associated-types/issue-44153.stderr2
-rw-r--r--tests/ui/associated-types/issue-47814.stderr2
-rw-r--r--tests/ui/associated-types/issue-54108.stderr2
-rw-r--r--tests/ui/associated-types/issue-62200.stderr2
-rw-r--r--tests/ui/associated-types/issue-63593.stderr2
-rw-r--r--tests/ui/associated-types/issue-64855.stderr2
-rw-r--r--tests/ui/associated-types/issue-72806.stderr2
-rw-r--r--tests/ui/associated-types/issue-85103-layout-debug.stderr2
-rw-r--r--tests/ui/associated-types/missing-associated-types.stderr4
-rw-r--r--tests/ui/associated-types/point-at-type-on-obligation-failure.stderr2
-rw-r--r--tests/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr2
-rw-r--r--tests/ui/async-await/async-borrowck-escaping-closure-error.stderr2
-rw-r--r--tests/ui/async-await/async-fn-path-elision.stderr2
-rw-r--r--tests/ui/async-await/async-is-unwindsafe.stderr2
-rw-r--r--tests/ui/async-await/await-keyword/post_expansion_error.stderr2
-rw-r--r--tests/ui/async-await/awaiting-unsized-param.stderr2
-rw-r--r--tests/ui/async-await/clone-suggestion.stderr2
-rw-r--r--tests/ui/async-await/const-async-fn-in-main.stderr2
-rw-r--r--tests/ui/async-await/dont-print-desugared-async.stderr2
-rw-r--r--tests/ui/async-await/dont-suggest-await-on-method-return-mismatch.stderr2
-rw-r--r--tests/ui/async-await/dont-suggest-missing-await.stderr2
-rw-r--r--tests/ui/async-await/drop-track-field-assign-nonsend.stderr2
-rw-r--r--tests/ui/async-await/feature-async-closure.stderr2
-rw-r--r--tests/ui/async-await/feature-self-return-type.stderr2
-rw-r--r--tests/ui/async-await/field-assign-nonsend.stderr2
-rw-r--r--tests/ui/async-await/future-contains-err-issue-115188.stderr2
-rw-r--r--tests/ui/async-await/future-sizes/async-awaiting-fut.stdout6
-rw-r--r--tests/ui/async-await/in-trait/async-default-fn-overridden.rs24
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.stderr6
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-boxed.stderr2
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-manual.stderr2
-rw-r--r--tests/ui/async-await/in-trait/async-recursive-generic.stderr2
-rw-r--r--tests/ui/async-await/in-trait/async-recursive.stderr2
-rw-r--r--tests/ui/async-await/in-trait/dont-project-to-specializable-projection.rs25
-rw-r--r--tests/ui/async-await/in-trait/dont-project-to-specializable-projection.stderr26
-rw-r--r--tests/ui/async-await/in-trait/fn-not-async-err.stderr2
-rw-r--r--tests/ui/async-await/in-trait/generics-mismatch.stderr2
-rw-r--r--tests/ui/async-await/in-trait/indirect-recursion-issue-112047.stderr10
-rw-r--r--tests/ui/async-await/in-trait/lifetime-mismatch.stderr2
-rw-r--r--tests/ui/async-await/in-trait/missing-send-bound.stderr2
-rw-r--r--tests/ui/async-await/in-trait/object-safety.stderr2
-rw-r--r--tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.stderr2
-rw-r--r--tests/ui/async-await/in-trait/return-type-suggestion.stderr2
-rw-r--r--tests/ui/async-await/in-trait/send-on-foreign-async-fn-in-trait.stderr2
-rw-r--r--tests/ui/async-await/in-trait/unconstrained-impl-region.stderr2
-rw-r--r--tests/ui/async-await/in-trait/warn.stderr2
-rw-r--r--tests/ui/async-await/incorrect-move-async-order-issue-79694.stderr2
-rw-r--r--tests/ui/async-await/issue-101715.stderr2
-rw-r--r--tests/ui/async-await/issue-108572.stderr2
-rw-r--r--tests/ui/async-await/issue-60709.rs1
-rw-r--r--tests/ui/async-await/issue-64130-1-sync.stderr2
-rw-r--r--tests/ui/async-await/issue-64130-2-send.stderr2
-rw-r--r--tests/ui/async-await/issue-64130-3-other.stderr2
-rw-r--r--tests/ui/async-await/issue-64130-non-send-future-diags.stderr2
-rw-r--r--tests/ui/async-await/issue-66387-if-without-else.stderr2
-rw-r--r--tests/ui/async-await/issue-67252-unnamed-future.stderr2
-rw-r--r--tests/ui/async-await/issue-67651.stderr2
-rw-r--r--tests/ui/async-await/issue-67765-async-diagnostic.stderr2
-rw-r--r--tests/ui/async-await/issue-68523-start.stderr2
-rw-r--r--tests/ui/async-await/issue-68523.stderr2
-rw-r--r--tests/ui/async-await/issue-69446-fnmut-capture.stderr2
-rw-r--r--tests/ui/async-await/issue-70594.rs3
-rw-r--r--tests/ui/async-await/issue-70594.stderr37
-rw-r--r--tests/ui/async-await/issue-70818.stderr2
-rw-r--r--tests/ui/async-await/issue-70935-complex-spans.stderr2
-rw-r--r--tests/ui/async-await/issue-71137.stderr2
-rw-r--r--tests/ui/async-await/issue-72442.stderr2
-rw-r--r--tests/ui/async-await/issue-73541-1.stderr2
-rw-r--r--tests/ui/async-await/issue-73541-2.stderr2
-rw-r--r--tests/ui/async-await/issue-73541-3.stderr2
-rw-r--r--tests/ui/async-await/issue-73541.stderr2
-rw-r--r--tests/ui/async-await/issue-73741-type-err.stderr2
-rw-r--r--tests/ui/async-await/issue-74047.stderr2
-rw-r--r--tests/ui/async-await/issue-74497-lifetime-in-opaque.stderr2
-rw-r--r--tests/ui/async-await/issue-75785-confusing-named-region.stderr2
-rw-r--r--tests/ui/async-await/issue-77993-2.stderr2
-rw-r--r--tests/ui/async-await/issue-86507.stderr2
-rw-r--r--tests/ui/async-await/issues/issue-102206.stderr2
-rw-r--r--tests/ui/async-await/issues/issue-107280.stderr2
-rw-r--r--tests/ui/async-await/issues/issue-112225-2.stderr2
-rw-r--r--tests/ui/async-await/issues/issue-51719.stderr2
-rw-r--r--tests/ui/async-await/issues/issue-51751.stderr2
-rw-r--r--tests/ui/async-await/issues/issue-60674.stdout6
-rw-r--r--tests/ui/async-await/issues/issue-61187.stderr2
-rw-r--r--tests/ui/async-await/issues/issue-62009-1.rs1
-rw-r--r--tests/ui/async-await/issues/issue-62009-1.stderr18
-rw-r--r--tests/ui/async-await/issues/issue-62009-2.stderr2
-rw-r--r--tests/ui/async-await/issues/issue-63388-1.stderr2
-rw-r--r--tests/ui/async-await/issues/issue-65159.stderr2
-rw-r--r--tests/ui/async-await/issues/issue-66958-non-copy-infered-type-arg.stderr2
-rw-r--r--tests/ui/async-await/issues/issue-67893.stderr2
-rw-r--r--tests/ui/async-await/issues/issue-72312.stderr2
-rw-r--r--tests/ui/async-await/issues/issue-78938-async-block.stderr2
-rw-r--r--tests/ui/async-await/issues/non-async-enclosing-span.stderr2
-rw-r--r--tests/ui/async-await/no-const-async.stderr2
-rw-r--r--tests/ui/async-await/no-move-across-await-struct.stderr2
-rw-r--r--tests/ui/async-await/no-move-across-await-tuple.stderr2
-rw-r--r--tests/ui/async-await/no-non-guaranteed-initialization.stderr2
-rw-r--r--tests/ui/async-await/no-params-non-move-async-closure.stderr2
-rw-r--r--tests/ui/async-await/normalize-output-in-signature-deduction.rs2
-rw-r--r--tests/ui/async-await/partial-drop-partial-reinit.stderr2
-rw-r--r--tests/ui/async-await/pin-needed-to-poll-2.stderr2
-rw-r--r--tests/ui/async-await/pin-needed-to-poll.stderr2
-rw-r--r--tests/ui/async-await/proper-span-for-type-error.stderr2
-rw-r--r--tests/ui/async-await/recursive-async-impl-trait-type.stderr2
-rw-r--r--tests/ui/async-await/return-type-notation/normalizing-self-auto-trait-issue-109924.current.stderr2
-rw-r--r--tests/ui/async-await/return-type-notation/normalizing-self-auto-trait-issue-109924.rs2
-rw-r--r--tests/ui/async-await/return-type-notation/rtn-in-impl-signature.stderr2
-rw-r--r--tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs2
-rw-r--r--tests/ui/async-await/return-type-notation/super-method-bound-ambig.stderr15
-rw-r--r--tests/ui/async-await/suggest-missing-await-closure.stderr2
-rw-r--r--tests/ui/async-await/suggest-switching-edition-on-await-cargo.rs2
-rw-r--r--tests/ui/async-await/suggest-switching-edition-on-await-cargo.stderr12
-rw-r--r--tests/ui/async-await/suggest-switching-edition-on-await.rs2
-rw-r--r--tests/ui/async-await/suggest-switching-edition-on-await.stderr12
-rw-r--r--tests/ui/async-await/unreachable-lint-1.stderr2
-rw-r--r--tests/ui/async-await/unresolved_type_param.stderr2
-rw-r--r--tests/ui/async-await/unsized-across-await.stderr2
-rw-r--r--tests/ui/atomic-from-mut-not-available.stderr2
-rw-r--r--tests/ui/attr-bad-crate-attr.stderr2
-rw-r--r--tests/ui/attributes/attr-eq-token-tree.stderr2
-rw-r--r--tests/ui/attributes/attrs-with-no-formal-in-generics-1.stderr2
-rw-r--r--tests/ui/attributes/attrs-with-no-formal-in-generics-2.stderr2
-rw-r--r--tests/ui/attributes/attrs-with-no-formal-in-generics-3.stderr2
-rw-r--r--tests/ui/attributes/doc-test-literal.stderr2
-rw-r--r--tests/ui/attributes/extented-attribute-macro-error.stderr2
-rw-r--r--tests/ui/attributes/invalid-repr.stderr2
-rw-r--r--tests/ui/attributes/issue-100631.stderr2
-rw-r--r--tests/ui/attributes/issue-90873.rs4
-rw-r--r--tests/ui/attributes/issue-90873.stderr9
-rw-r--r--tests/ui/attributes/key-value-expansion-on-mac.rs4
-rw-r--r--tests/ui/attributes/key-value-expansion-on-mac.stderr4
-rw-r--r--tests/ui/attributes/key-value-expansion.rs6
-rw-r--r--tests/ui/attributes/key-value-expansion.stderr6
-rw-r--r--tests/ui/attributes/key-value-non-ascii.stderr2
-rw-r--r--tests/ui/attributes/macro_export_on_decl_macro.stderr2
-rw-r--r--tests/ui/attributes/main-removed-1.stderr2
-rw-r--r--tests/ui/attributes/no-mangle-closure.stderr2
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-crate.stderr2
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-duplicates.stderr2
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-list.stderr2
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-main-fn.stderr2
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-root-main.stderr2
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-start.stderr2
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-struct.stderr2
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-wrong.stderr2
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe.stderr2
-rw-r--r--tests/ui/attributes/unused-item-in-attr.rs2
-rw-r--r--tests/ui/attributes/unused-item-in-attr.stderr4
-rw-r--r--tests/ui/attributes/used_with_multi_args.stderr2
-rw-r--r--tests/ui/auto-traits/bad-generics-on-dyn.stderr2
-rw-r--r--tests/ui/auto-traits/has-arguments.stderr2
-rw-r--r--tests/ui/auto-traits/issue-117789.rs7
-rw-r--r--tests/ui/auto-traits/issue-117789.stderr21
-rw-r--r--tests/ui/auto-traits/issue-23080-2.current.stderr2
-rw-r--r--tests/ui/auto-traits/issue-23080-2.next.stderr2
-rw-r--r--tests/ui/auto-traits/issue-23080-2.rs2
-rw-r--r--tests/ui/auto-traits/issue-23080.stderr2
-rw-r--r--tests/ui/auto-traits/issue-83857-ub.stderr2
-rw-r--r--tests/ui/auto-traits/issue-84075.stderr2
-rw-r--r--tests/ui/auto-traits/str-contains-slice-conceptually.stderr2
-rw-r--r--tests/ui/auto-traits/typeck-auto-trait-no-supertraits.stderr2
-rw-r--r--tests/ui/auto-traits/typeck-default-trait-impl-constituent-types-2.stderr2
-rw-r--r--tests/ui/auto-traits/typeck-default-trait-impl-constituent-types.stderr2
-rw-r--r--tests/ui/auto-traits/typeck-default-trait-impl-precedence.stderr2
-rw-r--r--tests/ui/autoref-autoderef/deref-ambiguity-becomes-nonambiguous.stderr2
-rw-r--r--tests/ui/bare-fn-implements-fn-mut.rs2
-rw-r--r--tests/ui/binding/const-param.stderr2
-rw-r--r--tests/ui/binding/match-arm-statics.rs1
-rw-r--r--tests/ui/binop/binary-op-on-double-ref.stderr2
-rw-r--r--tests/ui/binop/binary-op-suggest-deref.fixed8
-rw-r--r--tests/ui/binop/binary-op-suggest-deref.rs8
-rw-r--r--tests/ui/binop/binary-op-suggest-deref.stderr14
-rw-r--r--tests/ui/binop/binop-bitxor-str.stderr2
-rw-r--r--tests/ui/binop/binop-mul-bool.stderr2
-rw-r--r--tests/ui/binop/binop-mul-i32-f32.stderr2
-rw-r--r--tests/ui/binop/binop-typeck.stderr2
-rw-r--r--tests/ui/binop/eq-arr.stderr2
-rw-r--r--tests/ui/binop/eq-vec.stderr2
-rw-r--r--tests/ui/binop/false-binop-caused-by-missing-semi.stderr2
-rw-r--r--tests/ui/binop/issue-3820.stderr2
-rw-r--r--tests/ui/binop/issue-77910-2.stderr2
-rw-r--r--tests/ui/binop/issue-93927.stderr2
-rw-r--r--tests/ui/binop/placement-syntax.stderr2
-rw-r--r--tests/ui/blind/blind-item-block-item-shadow.stderr2
-rw-r--r--tests/ui/blind/blind-item-block-middle.stderr2
-rw-r--r--tests/ui/blind/blind-item-item-shadow.stderr2
-rw-r--r--tests/ui/block-result/block-must-not-have-result-do.stderr2
-rw-r--r--tests/ui/block-result/block-must-not-have-result-res.stderr2
-rw-r--r--tests/ui/block-result/block-must-not-have-result-while.stderr2
-rw-r--r--tests/ui/block-result/issue-11714.stderr2
-rw-r--r--tests/ui/block-result/issue-3563.stderr2
-rw-r--r--tests/ui/block-result/issue-5500.stderr2
-rw-r--r--tests/ui/block-result/unexpected-return-on-unit.stderr2
-rw-r--r--tests/ui/bogus-tag.stderr2
-rw-r--r--tests/ui/borrowck/access-mode-in-closures.stderr2
-rw-r--r--tests/ui/borrowck/accidentally-cloning-ref-borrow-error.rs38
-rw-r--r--tests/ui/borrowck/accidentally-cloning-ref-borrow-error.stderr30
-rw-r--r--tests/ui/borrowck/alias-liveness/escaping-bounds-2.stderr2
-rw-r--r--tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.stderr2
-rw-r--r--tests/ui/borrowck/alias-liveness/opaque-type-param.stderr2
-rw-r--r--tests/ui/borrowck/anonymous-region-in-apit.stderr2
-rw-r--r--tests/ui/borrowck/borrow-immutable-upvar-mutation-impl-trait.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-and-init.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-anon-fields-struct.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-anon-fields-tuple.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-assign-to-constants.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-auto-mut-ref-to-immut-var.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-autoref-3261.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-block-uninit.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-borrow-from-temporary.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-borrow-immut-deref-of-box-as-mut.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-borrow-mut-object-twice.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-borrowed-uniq-rvalue.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-break-uninit-2.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-break-uninit.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-closures-mut-of-mut.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-closures-unique-imm.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-closures-use-after-free.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-consume-unsize-vec.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-consume-upcast-box.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-escaping-closure-error-1.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-escaping-closure-error-2.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-fn-in-const-a.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-fn-in-const-c.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-for-loop-uninitialized-binding.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-if-no-else.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-if-with-else.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-in-static.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-init-in-called-fn-expr.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-init-in-fn-expr.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-init-in-fru.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-init-op-equal.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-init-plus-equal.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-issue-2657-1.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-issue-2657-2.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-lend-flow-if.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-lend-flow-match.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-lend-flow.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-loan-blocks-move.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-loan-blocks-mut-uniq.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-loan-in-overloaded-op.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-loan-of-static-data-issue-27616.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-loan-vec-content.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-local-borrow-outlives-fn.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-move-by-capture.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-move-from-unsafe-ptr.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-move-moved-value-into-closure.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-move-mut-base-ptr.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.fixed7
-rw-r--r--tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.rs1
-rw-r--r--tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.stderr8
-rw-r--r--tests/ui/borrowck/borrowck-move-out-of-overloaded-deref.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-move-out-of-static-item.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-move-out-of-vec-tail.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-move-subcomponent.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-mut-addr-of-imm-var.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-mut-slice-of-imm-vec.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-no-cycle-in-exchange-heap.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-or-init.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-overloaded-index-and-overloaded-deref.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-overloaded-index-move-from-vec.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-partial-reinit-2.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-partial-reinit-3.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-partial-reinit-4.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-pat-reassign-binding.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-reborrow-from-shorter-lived-andmut.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-ref-mut-of-imm.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-reinit.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-return-variable-on-stack-via-clone.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-return.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-storage-dead.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-swap-mut-base-ptr.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-unary-move.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-uninit-after-item.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-uninit.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-union-borrow-nested.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-union-move-assign.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-use-uninitialized-in-cast.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-vec-pattern-loan-from-mut.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-vec-pattern-move-tail.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-vec-pattern-tail-element-loan.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-while-break.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-while-cond.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-while.stderr2
-rw-r--r--tests/ui/borrowck/clone-span-on-try-operator.fixed2
-rw-r--r--tests/ui/borrowck/clone-span-on-try-operator.stderr6
-rw-r--r--tests/ui/borrowck/copy-suggestion-region-vid.stderr2
-rw-r--r--tests/ui/borrowck/do-not-suggest-adding-move-when-closure-is-already-marked-as-move.stderr2
-rw-r--r--tests/ui/borrowck/drop-in-loop.stderr2
-rw-r--r--tests/ui/borrowck/generic_const_early_param.rs16
-rw-r--r--tests/ui/borrowck/generic_const_early_param.stderr42
-rw-r--r--tests/ui/borrowck/immutable-arg.stderr2
-rw-r--r--tests/ui/borrowck/index-mut-help-with-impl.stderr2
-rw-r--r--tests/ui/borrowck/issue-101119.stderr2
-rw-r--r--tests/ui/borrowck/issue-103250.stderr2
-rw-r--r--tests/ui/borrowck/issue-114374-invalid-help-fmt-args.stderr4
-rw-r--r--tests/ui/borrowck/issue-11493.stderr2
-rw-r--r--tests/ui/borrowck/issue-115259-suggest-iter-mut.stderr2
-rw-r--r--tests/ui/borrowck/issue-17545.stderr2
-rw-r--r--tests/ui/borrowck/issue-17718-static-move.stderr2
-rw-r--r--tests/ui/borrowck/issue-25793.stderr2
-rw-r--r--tests/ui/borrowck/issue-33819.stderr2
-rw-r--r--tests/ui/borrowck/issue-36082.stderr2
-rw-r--r--tests/ui/borrowck/issue-41962.stderr2
-rw-r--r--tests/ui/borrowck/issue-42344.stderr2
-rw-r--r--tests/ui/borrowck/issue-45983.stderr2
-rw-r--r--tests/ui/borrowck/issue-46471.stderr2
-rw-r--r--tests/ui/borrowck/issue-47215-ice-from-drop-elab.stderr2
-rw-r--r--tests/ui/borrowck/issue-47646.stderr2
-rw-r--r--tests/ui/borrowck/issue-51117.stderr2
-rw-r--r--tests/ui/borrowck/issue-51301.stderr2
-rw-r--r--tests/ui/borrowck/issue-51415.stderr2
-rw-r--r--tests/ui/borrowck/issue-52713-bug.stderr2
-rw-r--r--tests/ui/borrowck/issue-53432-nested-closure-outlives-borrowed-value.stderr2
-rw-r--r--tests/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr2
-rw-r--r--tests/ui/borrowck/issue-58776-borrowck-scans-children.stderr2
-rw-r--r--tests/ui/borrowck/issue-62107-match-arm-scopes.stderr2
-rw-r--r--tests/ui/borrowck/issue-62387-suggest-iter-mut-2.stderr2
-rw-r--r--tests/ui/borrowck/issue-69789-iterator-mut-suggestion.stderr2
-rw-r--r--tests/ui/borrowck/issue-7573.stderr2
-rw-r--r--tests/ui/borrowck/issue-81365-1.stderr2
-rw-r--r--tests/ui/borrowck/issue-81365-10.stderr2
-rw-r--r--tests/ui/borrowck/issue-81365-11.stderr2
-rw-r--r--tests/ui/borrowck/issue-81365-2.stderr2
-rw-r--r--tests/ui/borrowck/issue-81365-3.stderr2
-rw-r--r--tests/ui/borrowck/issue-81365-4.stderr2
-rw-r--r--tests/ui/borrowck/issue-81365-5.stderr2
-rw-r--r--tests/ui/borrowck/issue-81365-6.stderr2
-rw-r--r--tests/ui/borrowck/issue-81365-7.stderr2
-rw-r--r--tests/ui/borrowck/issue-81365-8.stderr2
-rw-r--r--tests/ui/borrowck/issue-81365-9.stderr2
-rw-r--r--tests/ui/borrowck/issue-81899.stderr2
-rw-r--r--tests/ui/borrowck/issue-82032.stderr2
-rw-r--r--tests/ui/borrowck/issue-82462.stderr2
-rw-r--r--tests/ui/borrowck/issue-83309-ice-immut-in-for-loop.stderr2
-rw-r--r--tests/ui/borrowck/issue-83760.fixed47
-rw-r--r--tests/ui/borrowck/issue-83760.rs15
-rw-r--r--tests/ui/borrowck/issue-83760.stderr42
-rw-r--r--tests/ui/borrowck/issue-83924.stderr2
-rw-r--r--tests/ui/borrowck/issue-85581.stderr2
-rw-r--r--tests/ui/borrowck/issue-85765-closure.rs1
-rw-r--r--tests/ui/borrowck/issue-85765-closure.stderr13
-rw-r--r--tests/ui/borrowck/issue-85765.rs1
-rw-r--r--tests/ui/borrowck/issue-85765.stderr13
-rw-r--r--tests/ui/borrowck/issue-87456-point-to-closure.stderr2
-rw-r--r--tests/ui/borrowck/issue-88434-minimal-example.stderr2
-rw-r--r--tests/ui/borrowck/issue-88434-removal-index-should-be-less.stderr2
-rw-r--r--tests/ui/borrowck/issue-91206.rs1
-rw-r--r--tests/ui/borrowck/issue-91206.stderr9
-rw-r--r--tests/ui/borrowck/issue-92015.stderr2
-rw-r--r--tests/ui/borrowck/issue-92157.stderr2
-rw-r--r--tests/ui/borrowck/issue-93078.stderr2
-rw-r--r--tests/ui/borrowck/issue-93093.stderr2
-rw-r--r--tests/ui/borrowck/many-mutable-borrows.stderr2
-rw-r--r--tests/ui/borrowck/move-error-in-promoted-2.stderr2
-rw-r--r--tests/ui/borrowck/move-error-in-promoted.stderr2
-rw-r--r--tests/ui/borrowck/move-error-snippets.stderr2
-rw-r--r--tests/ui/borrowck/move-in-pattern-mut-in-loop.stderr2
-rw-r--r--tests/ui/borrowck/mut-borrow-in-loop-2.stderr2
-rw-r--r--tests/ui/borrowck/reborrow-sugg-move-then-borrow.stderr2
-rw-r--r--tests/ui/borrowck/regions-bound-missing-bound-in-impl.stderr8
-rw-r--r--tests/ui/borrowck/regions-escape-bound-fn-2.stderr2
-rw-r--r--tests/ui/borrowck/regions-escape-bound-fn.stderr2
-rw-r--r--tests/ui/borrowck/regions-escape-unboxed-closure.stderr2
-rw-r--r--tests/ui/borrowck/return-local-binding-from-desugaring.stderr2
-rw-r--r--tests/ui/borrowck/suggest-as-ref-on-mut-closure.stderr4
-rw-r--r--tests/ui/borrowck/suggest-local-var-for-vector.stderr2
-rw-r--r--tests/ui/borrowck/suggest-mut-iterator.stderr2
-rw-r--r--tests/ui/borrowck/suggest-storing-local-var-for-vector.stderr2
-rw-r--r--tests/ui/borrowck/tainted-promoteds.stderr2
-rw-r--r--tests/ui/borrowck/two-phase-across-loop.stderr2
-rw-r--r--tests/ui/borrowck/two-phase-cannot-nest-mut-self-calls.stderr2
-rw-r--r--tests/ui/borrowck/two-phase-reservation-sharing-interference.nll_target.stderr2
-rw-r--r--tests/ui/borrowck/two-phase-sneaky.stderr2
-rw-r--r--tests/ui/borrowck/two-phase-surprise-no-conflict.stderr4
-rw-r--r--tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.fixed2
-rw-r--r--tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr6
-rw-r--r--tests/ui/box/alloc-unstable-fail.stderr2
-rw-r--r--tests/ui/box/alloc-unstable.rs3
-rw-r--r--tests/ui/box/into-boxed-slice.rs2
-rw-r--r--tests/ui/box/issue-82446.stderr6
-rw-r--r--tests/ui/box/leak-alloc.stderr2
-rw-r--r--tests/ui/box/new-box-syntax.rs2
-rw-r--r--tests/ui/box/unit/unique-kinds.rs1
-rw-r--r--tests/ui/box/unit/unique-object-noncopyable.stderr2
-rw-r--r--tests/ui/box/unit/unique-pinned-nocopy.stderr2
-rw-r--r--tests/ui/btreemap/btreemap-index-mut-2.stderr2
-rw-r--r--tests/ui/btreemap/btreemap-index-mut.stderr2
-rw-r--r--tests/ui/btreemap/btreemap_dropck.stderr2
-rw-r--r--tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr2
-rw-r--r--tests/ui/builtin-superkinds/builtin-superkinds-self-type.stderr2
-rw-r--r--tests/ui/builtin-superkinds/builtin-superkinds-simple.stderr2
-rw-r--r--tests/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr2
-rw-r--r--tests/ui/c-variadic/issue-32201.stderr2
-rw-r--r--tests/ui/c-variadic/issue-86053-2.stderr2
-rw-r--r--tests/ui/c-variadic/variadic-ffi-2.stderr2
-rw-r--r--tests/ui/c-variadic/variadic-ffi-6.stderr13
-rw-r--r--tests/ui/c-variadic/variadic-ffi-no-fixed-args.stderr2
-rw-r--r--tests/ui/capture1.stderr2
-rw-r--r--tests/ui/cast/cast-errors-issue-43825.stderr2
-rw-r--r--tests/ui/cast/cast-from-nil.stderr2
-rw-r--r--tests/ui/cast/cast-macro-lhs.stderr2
-rw-r--r--tests/ui/cast/cast-rfc0401-2.stderr2
-rw-r--r--tests/ui/cast/cast-to-nil.stderr2
-rw-r--r--tests/ui/cast/casts-differing-anon.stderr2
-rw-r--r--tests/ui/cast/casts-issue-46365.stderr2
-rw-r--r--tests/ui/cast/issue-10991.stderr2
-rw-r--r--tests/ui/cast/issue-17444.stderr2
-rw-r--r--tests/ui/cast/issue-85586.stderr2
-rw-r--r--tests/ui/cast/issue-88621.stderr2
-rw-r--r--tests/ui/cast/issue-89497.stderr2
-rw-r--r--tests/ui/cast/unsized-struct-cast.stderr2
-rw-r--r--tests/ui/cast/unsupported-cast.stderr2
-rw-r--r--tests/ui/cenum_impl_drop_cast.stderr2
-rw-r--r--tests/ui/cfg/conditional-compile-arch.rs3
-rw-r--r--tests/ui/cfg/diagnostics-not-a-def.stderr2
-rw-r--r--tests/ui/check-cfg/allow-same-level.stderr4
-rw-r--r--tests/ui/check-cfg/cargo-feature.none.stderr31
-rw-r--r--tests/ui/check-cfg/cargo-feature.rs27
-rw-r--r--tests/ui/check-cfg/cargo-feature.some.stderr35
-rw-r--r--tests/ui/check-cfg/compact-names.stderr4
-rw-r--r--tests/ui/check-cfg/compact-values.rs2
-rw-r--r--tests/ui/check-cfg/compact-values.stderr8
-rw-r--r--tests/ui/check-cfg/concat-values.stderr4
-rw-r--r--tests/ui/check-cfg/diagnotics.cargo.stderr71
-rw-r--r--tests/ui/check-cfg/diagnotics.rs3
-rw-r--r--tests/ui/check-cfg/diagnotics.rustc.stderr74
-rw-r--r--tests/ui/check-cfg/diagnotics.stderr61
-rw-r--r--tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr30
-rw-r--r--tests/ui/check-cfg/exhaustive-names-values.empty_names_values.stderr25
-rw-r--r--tests/ui/check-cfg/exhaustive-names-values.feature.stderr20
-rw-r--r--tests/ui/check-cfg/exhaustive-names-values.full.stderr20
-rw-r--r--tests/ui/check-cfg/exhaustive-names-values.rs14
-rw-r--r--tests/ui/check-cfg/exhaustive-names.empty_names.stderr15
-rw-r--r--tests/ui/check-cfg/exhaustive-names.exhaustive_names.stderr15
-rw-r--r--tests/ui/check-cfg/exhaustive-names.rs4
-rw-r--r--tests/ui/check-cfg/exhaustive-names.stderr13
-rw-r--r--tests/ui/check-cfg/exhaustive-values.empty_cfg.stderr10
-rw-r--r--tests/ui/check-cfg/exhaustive-values.empty_values.stderr13
-rw-r--r--tests/ui/check-cfg/exhaustive-values.rs3
-rw-r--r--tests/ui/check-cfg/exhaustive-values.without_names.stderr4
-rw-r--r--tests/ui/check-cfg/invalid-arguments.names_simple_ident.stderr2
-rw-r--r--tests/ui/check-cfg/invalid-arguments.rs5
-rw-r--r--tests/ui/check-cfg/invalid-arguments.values_simple_ident.stderr2
-rw-r--r--tests/ui/check-cfg/invalid-arguments.values_string_literals.stderr2
-rw-r--r--tests/ui/check-cfg/mix.cfg.stderr192
-rw-r--r--tests/ui/check-cfg/mix.names_values.stderr192
-rw-r--r--tests/ui/check-cfg/mix.rs9
-rw-r--r--tests/ui/check-cfg/mix.stderr249
-rw-r--r--tests/ui/check-cfg/no-expected-values.empty.stderr8
-rw-r--r--tests/ui/check-cfg/no-expected-values.mixed.stderr8
-rw-r--r--tests/ui/check-cfg/no-expected-values.rs3
-rw-r--r--tests/ui/check-cfg/no-expected-values.simple.stderr8
-rw-r--r--tests/ui/check-cfg/no-expected-values.values.stderr23
-rw-r--r--tests/ui/check-cfg/order-independant.names_after.stderr19
-rw-r--r--tests/ui/check-cfg/order-independant.names_before.stderr19
-rw-r--r--tests/ui/check-cfg/order-independant.rs11
-rw-r--r--tests/ui/check-cfg/order-independant.values_after.stderr13
-rw-r--r--tests/ui/check-cfg/order-independant.values_before.stderr13
-rw-r--r--tests/ui/check-cfg/stmt-no-ice.stderr4
-rw-r--r--tests/ui/check-cfg/unexpected-cfg-name.exhaustive.stderr10
-rw-r--r--tests/ui/check-cfg/unexpected-cfg-name.names.stderr10
-rw-r--r--tests/ui/check-cfg/unexpected-cfg-name.rs5
-rw-r--r--tests/ui/check-cfg/unexpected-cfg-name.stderr12
-rw-r--r--tests/ui/check-cfg/unexpected-cfg-value.cfg.stderr25
-rw-r--r--tests/ui/check-cfg/unexpected-cfg-value.rs8
-rw-r--r--tests/ui/check-cfg/unexpected-cfg-value.stderr25
-rw-r--r--tests/ui/check-cfg/unexpected-cfg-value.values.stderr25
-rw-r--r--tests/ui/check-cfg/values-target-json.rs6
-rw-r--r--tests/ui/check-cfg/values-target-json.stderr13
-rw-r--r--tests/ui/check-cfg/well-known-names.rs1
-rw-r--r--tests/ui/check-cfg/well-known-names.stderr26
-rw-r--r--tests/ui/check-cfg/well-known-values.rs109
-rw-r--r--tests/ui/check-cfg/well-known-values.stderr300
-rw-r--r--tests/ui/check-static-immutable-mut-slices.stderr2
-rw-r--r--tests/ui/class-cast-to-trait.stderr2
-rw-r--r--tests/ui/class-method-missing.stderr2
-rw-r--r--tests/ui/cleanup-rvalue-for-scope.rs3
-rw-r--r--tests/ui/cleanup-rvalue-scopes.rs2
-rw-r--r--tests/ui/closure-expected-type/expect-fn-supply-fn.stderr12
-rw-r--r--tests/ui/closure-expected-type/expect-infer-var-appearing-twice.stderr2
-rw-r--r--tests/ui/closure-expected-type/expect-two-infer-vars-supply-ty-with-bound-region.stderr2
-rw-r--r--tests/ui/closure_context/issue-26046-fn-mut.stderr2
-rw-r--r--tests/ui/closure_context/issue-26046-fn-once.stderr2
-rw-r--r--tests/ui/closure_context/issue-42065.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-1.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-2.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-4.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-closures-mut-and-imm.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm-borrow.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-array-diagnostics.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-multi-variant-diagnostics.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-single-variant-diagnostics.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-struct-diagnostics.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/diagnostics/multilevel-path.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/diagnostics/simple-struct-min-capture.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/diagnostics/union.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/issue-118144.rs16
-rw-r--r--tests/ui/closures/2229_closure_analysis/issue-118144.stderr11
-rw-r--r--tests/ui/closures/2229_closure_analysis/issue-90465.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/match/match-edge-cases_2.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/migrations/macro.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-1.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-2.stderr2
-rw-r--r--tests/ui/closures/add_semicolon_non_block_closure.stderr2
-rw-r--r--tests/ui/closures/binder/const-bound.stderr2
-rw-r--r--tests/ui/closures/binder/disallow-const.stderr2
-rw-r--r--tests/ui/closures/binder/disallow-ty.stderr2
-rw-r--r--tests/ui/closures/binder/implicit-return.stderr2
-rw-r--r--tests/ui/closures/binder/type-bound-2.stderr2
-rw-r--r--tests/ui/closures/binder/type-bound.stderr2
-rw-r--r--tests/ui/closures/cannot-call-unsized-via-ptr.stderr2
-rw-r--r--tests/ui/closures/capture-unsized-by-move.stderr2
-rw-r--r--tests/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr2
-rw-r--r--tests/ui/closures/closure-bounds-subtype.stderr2
-rw-r--r--tests/ui/closures/closure-expected.stderr2
-rw-r--r--tests/ui/closures/closure-immutable-outer-variable.stderr2
-rw-r--r--tests/ui/closures/closure-move-sync.stderr2
-rw-r--r--tests/ui/closures/closure-no-fn-1.stderr2
-rw-r--r--tests/ui/closures/closure-no-fn-2.stderr2
-rw-r--r--tests/ui/closures/closure-no-fn-3.stderr2
-rw-r--r--tests/ui/closures/closure-no-fn-4.stderr2
-rw-r--r--tests/ui/closures/closure-no-fn-5.stderr2
-rw-r--r--tests/ui/closures/closure-referencing-itself-issue-25954.stderr2
-rw-r--r--tests/ui/closures/closure-reform-bad.stderr2
-rw-r--r--tests/ui/closures/closure-wrong-kind.stderr2
-rw-r--r--tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.mir.stderr2
-rw-r--r--tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.thir.stderr2
-rw-r--r--tests/ui/closures/coerce-unsafe-to-closure.stderr2
-rw-r--r--tests/ui/closures/infer-signature-from-impl.next.stderr2
-rw-r--r--tests/ui/closures/infer-signature-from-impl.rs2
-rw-r--r--tests/ui/closures/issue-10398.stderr2
-rw-r--r--tests/ui/closures/issue-112547.stderr2
-rw-r--r--tests/ui/closures/issue-113087.stderr2
-rw-r--r--tests/ui/closures/issue-11873.stderr2
-rw-r--r--tests/ui/closures/issue-25439.stderr2
-rw-r--r--tests/ui/closures/issue-67123.stderr2
-rw-r--r--tests/ui/closures/issue-6801.stderr2
-rw-r--r--tests/ui/closures/issue-80313-mutable-borrow-in-closure.stderr2
-rw-r--r--tests/ui/closures/issue-80313-mutable-borrow-in-move-closure.stderr2
-rw-r--r--tests/ui/closures/issue-80313-mutation-in-closure.stderr2
-rw-r--r--tests/ui/closures/issue-80313-mutation-in-move-closure.stderr2
-rw-r--r--tests/ui/closures/issue-81700-mut-borrow.stderr2
-rw-r--r--tests/ui/closures/issue-82438-mut-without-upvar.stderr2
-rw-r--r--tests/ui/closures/issue-84044-drop-non-mut.stderr2
-rw-r--r--tests/ui/closures/issue-84128.stderr2
-rw-r--r--tests/ui/closures/issue-868.rs1
-rw-r--r--tests/ui/closures/issue-99565.stderr2
-rw-r--r--tests/ui/closures/multiple-fn-bounds.stderr6
-rw-r--r--tests/ui/closures/old-closure-expression-remove-semicolon.stderr2
-rw-r--r--tests/ui/closures/print/closure-print-generic-1.stderr2
-rw-r--r--tests/ui/closures/print/closure-print-generic-2.stderr2
-rw-r--r--tests/ui/closures/print/closure-print-generic-trim-off-verbose-2.stderr2
-rw-r--r--tests/ui/closures/print/closure-print-generic-verbose-1.stderr2
-rw-r--r--tests/ui/closures/print/closure-print-generic-verbose-2.stderr2
-rw-r--r--tests/ui/closures/print/closure-print-verbose.stderr2
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.stderr2
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-stack.stderr2
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.stderr2
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.stderr2
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/issue-83475.stderr2
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.stderr2
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.stderr2
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/wrong-abi.stderr2
-rw-r--r--tests/ui/codegen/const-bool-bitcast.rs15
-rw-r--r--tests/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr2
-rw-r--r--tests/ui/codemap_tests/empty_span.stderr2
-rw-r--r--tests/ui/codemap_tests/huge_multispan_highlight.stderr2
-rw-r--r--tests/ui/codemap_tests/issue-11715.stderr2
-rw-r--r--tests/ui/codemap_tests/issue-28308.stderr2
-rw-r--r--tests/ui/codemap_tests/one_line.stderr2
-rw-r--r--tests/ui/codemap_tests/tab_2.stderr2
-rw-r--r--tests/ui/codemap_tests/tab_3.stderr2
-rw-r--r--tests/ui/codemap_tests/two_files.stderr2
-rw-r--r--tests/ui/codemap_tests/unicode.normal.stderr2
-rw-r--r--tests/ui/coercion/coerce-block-tail-26978.stderr2
-rw-r--r--tests/ui/coercion/coerce-block-tail-57749.stderr2
-rw-r--r--tests/ui/coercion/coerce-block-tail-83783.stderr2
-rw-r--r--tests/ui/coercion/coerce-block-tail-83850.stderr2
-rw-r--r--tests/ui/coercion/coerce-block-tail.stderr2
-rw-r--r--tests/ui/coercion/coerce-mut.stderr2
-rw-r--r--tests/ui/coercion/coerce-reborrow-multi-arg-fail.stderr2
-rw-r--r--tests/ui/coercion/coercion-slice.stderr2
-rw-r--r--tests/ui/coercion/issue-53475.stderr2
-rw-r--r--tests/ui/coercion/retslot-cast.stderr2
-rw-r--r--tests/ui/coherence/coherence-all-remote.stderr2
-rw-r--r--tests/ui/coherence/coherence-bigint-param.stderr2
-rw-r--r--tests/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.stderr2
-rw-r--r--tests/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.stderr2
-rw-r--r--tests/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.stderr2
-rw-r--r--tests/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.stderr2
-rw-r--r--tests/ui/coherence/coherence-blanket-conflicts-with-specific-trait.stderr2
-rw-r--r--tests/ui/coherence/coherence-blanket-conflicts-with-specific.stderr2
-rw-r--r--tests/ui/coherence/coherence-cow.re_a.stderr2
-rw-r--r--tests/ui/coherence/coherence-cow.re_b.stderr2
-rw-r--r--tests/ui/coherence/coherence-cow.re_c.stderr2
-rw-r--r--tests/ui/coherence/coherence-cross-crate-conflict.stderr2
-rw-r--r--tests/ui/coherence/coherence-error-suppression.stderr2
-rw-r--r--tests/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr2
-rw-r--r--tests/ui/coherence/coherence-fn-implied-bounds.stderr2
-rw-r--r--tests/ui/coherence/coherence-fn-inputs.stderr2
-rw-r--r--tests/ui/coherence/coherence-free-vs-bound-region.stderr2
-rw-r--r--tests/ui/coherence/coherence-fundamental-trait-objects.stderr2
-rw-r--r--tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr2
-rw-r--r--tests/ui/coherence/coherence-inherited-subtyping.stderr2
-rw-r--r--tests/ui/coherence/coherence-lone-type-parameter.stderr2
-rw-r--r--tests/ui/coherence/coherence-negative-impls-safe-rpass.rs2
-rw-r--r--tests/ui/coherence/coherence-negative-impls-safe.stderr2
-rw-r--r--tests/ui/coherence/coherence-negative-outlives-lifetimes.rs4
-rw-r--r--tests/ui/coherence/coherence-negative-outlives-lifetimes.stock.stderr4
-rw-r--r--tests/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr4
-rw-r--r--tests/ui/coherence/coherence-no-direct-lifetime-dispatch.stderr2
-rw-r--r--tests/ui/coherence/coherence-overlap-all-t-and-tuple.stderr2
-rw-r--r--tests/ui/coherence/coherence-overlap-downstream-inherent.rs2
-rw-r--r--tests/ui/coherence/coherence-overlap-downstream.rs2
-rw-r--r--tests/ui/coherence/coherence-overlap-issue-23516-inherent.next.stderr2
-rw-r--r--tests/ui/coherence/coherence-overlap-issue-23516-inherent.old.stderr2
-rw-r--r--tests/ui/coherence/coherence-overlap-issue-23516-inherent.rs2
-rw-r--r--tests/ui/coherence/coherence-overlap-issue-23516.next.stderr2
-rw-r--r--tests/ui/coherence/coherence-overlap-issue-23516.old.stderr2
-rw-r--r--tests/ui/coherence/coherence-overlap-issue-23516.rs2
-rw-r--r--tests/ui/coherence/coherence-overlap-negate-not-use-feature-gate.stderr2
-rw-r--r--tests/ui/coherence/coherence-overlap-trait-alias.stderr2
-rw-r--r--tests/ui/coherence/coherence-overlap-upstream-inherent.stderr2
-rw-r--r--tests/ui/coherence/coherence-overlap-upstream.stderr2
-rw-r--r--tests/ui/coherence/coherence-overlap-with-regions.rs8
-rw-r--r--tests/ui/coherence/coherence-overlap-with-regions.stderr11
-rw-r--r--tests/ui/coherence/coherence-overlapping-pairs.stderr2
-rw-r--r--tests/ui/coherence/coherence-pair-covered-uncovered-1.stderr2
-rw-r--r--tests/ui/coherence/coherence-pair-covered-uncovered.stderr2
-rw-r--r--tests/ui/coherence/coherence-projection-conflict-orphan.stderr2
-rw-r--r--tests/ui/coherence/coherence-projection-conflict-ty-param.stderr2
-rw-r--r--tests/ui/coherence/coherence-projection-conflict.stderr2
-rw-r--r--tests/ui/coherence/coherence-tuple-conflict.stderr2
-rw-r--r--tests/ui/coherence/coherence-unsafe-trait-object-impl.stderr2
-rw-r--r--tests/ui/coherence/coherence-vec-local-2.stderr2
-rw-r--r--tests/ui/coherence/coherence-vec-local.stderr2
-rw-r--r--tests/ui/coherence/coherence-wasm-bindgen.stderr2
-rw-r--r--tests/ui/coherence/coherence-where-clause.rs2
-rw-r--r--tests/ui/coherence/coherence-with-closure.stderr2
-rw-r--r--tests/ui/coherence/coherence-with-coroutine.stock.stderr2
-rw-r--r--tests/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.stderr2
-rw-r--r--tests/ui/coherence/coherence_copy_like_err_struct.stderr2
-rw-r--r--tests/ui/coherence/coherence_copy_like_err_tuple.stderr2
-rw-r--r--tests/ui/coherence/coherence_inherent.stderr2
-rw-r--r--tests/ui/coherence/coherence_inherent_cc.stderr2
-rw-r--r--tests/ui/coherence/coherence_local_err_struct.stderr2
-rw-r--r--tests/ui/coherence/coherence_local_err_tuple.stderr2
-rw-r--r--tests/ui/coherence/deep-bad-copy-reason.stderr2
-rw-r--r--tests/ui/coherence/illegal-copy-bad-projection.stderr2
-rw-r--r--tests/ui/coherence/impl-foreign-for-foreign.stderr2
-rw-r--r--tests/ui/coherence/impl-foreign[foreign]-for-foreign.stderr2
-rw-r--r--tests/ui/coherence/impl[t]-foreign-for-fundamental[t].stderr2
-rw-r--r--tests/ui/coherence/impl[t]-foreign[foreign]-for-t.stderr2
-rw-r--r--tests/ui/coherence/impl[t]-foreign[local]-for-t.stderr2
-rw-r--r--tests/ui/coherence/impl[t]-foreign[t]-for-foreign.stderr2
-rw-r--r--tests/ui/coherence/impl[t]-foreign[t]-for-t.stderr2
-rw-r--r--tests/ui/coherence/inter-crate-ambiguity-causes-notes.next.stderr2
-rw-r--r--tests/ui/coherence/inter-crate-ambiguity-causes-notes.old.stderr2
-rw-r--r--tests/ui/coherence/inter-crate-ambiguity-causes-notes.rs2
-rw-r--r--tests/ui/coherence/negative-coherence-check-placeholder-outlives.rs14
-rw-r--r--tests/ui/coherence/negative-coherence-check-placeholder-outlives.stderr (renamed from tests/ui/coherence/negative-coherence-considering-regions.static_lt.stderr)11
-rw-r--r--tests/ui/coherence/negative-coherence-considering-regions.any_lt.stderr4
-rw-r--r--tests/ui/coherence/negative-coherence-considering-regions.rs8
-rw-r--r--tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.explicit.stderr19
-rw-r--r--tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.rs25
-rw-r--r--tests/ui/coherence/normalize-for-errors.current.stderr14
-rw-r--r--tests/ui/coherence/normalize-for-errors.next.stderr14
-rw-r--r--tests/ui/coherence/normalize-for-errors.rs21
-rw-r--r--tests/ui/coherence/occurs-check/associated-type.next.stderr25
-rw-r--r--tests/ui/coherence/occurs-check/associated-type.old.stderr25
-rw-r--r--tests/ui/coherence/occurs-check/associated-type.rs45
-rw-r--r--tests/ui/coherence/occurs-check/opaques.next.stderr12
-rw-r--r--tests/ui/coherence/occurs-check/opaques.rs37
-rw-r--r--tests/ui/coherence/strict-coherence-needs-negative-coherence.stderr2
-rw-r--r--tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr2
-rw-r--r--tests/ui/coinduction/canonicalization-rerun.rs2
-rw-r--r--tests/ui/command-line-diagnostics.stderr2
-rw-r--r--tests/ui/command/need-crate-arg-ignore-tidy.x.stderr2
-rw-r--r--tests/ui/compare-method/proj-outlives-region.stderr2
-rw-r--r--tests/ui/compare-method/region-extra-2.stderr2
-rw-r--r--tests/ui/compare-method/region-extra.stderr2
-rw-r--r--tests/ui/compare-method/region-unrelated.stderr2
-rw-r--r--tests/ui/compare-method/reordered-type-param.stderr2
-rw-r--r--tests/ui/compare-method/trait-bound-on-type-parameter.stderr2
-rw-r--r--tests/ui/compare-method/traits-misc-mismatch-2.stderr2
-rw-r--r--tests/ui/compile_error_macro.stderr2
-rw-r--r--tests/ui/conditional-compilation/cfg-attr-cfg-2.stderr2
-rw-r--r--tests/ui/conditional-compilation/cfg-attr-crate-2.stderr2
-rw-r--r--tests/ui/conditional-compilation/cfg-attr-invalid-predicate.stderr2
-rw-r--r--tests/ui/conditional-compilation/cfg-attr-multi-invalid-1.stderr2
-rw-r--r--tests/ui/conditional-compilation/cfg-attr-multi-invalid-2.stderr2
-rw-r--r--tests/ui/conditional-compilation/cfg-attr-unknown-attribute-macro-expansion.stderr2
-rw-r--r--tests/ui/conditional-compilation/cfg-in-crate-1.stderr2
-rw-r--r--tests/ui/conditional-compilation/cfg_accessible-stuck.stderr2
-rw-r--r--tests/ui/conditional-compilation/cfg_accessible-unstable.stderr2
-rw-r--r--tests/ui/conditional-compilation/test-cfg.stderr2
-rw-r--r--tests/ui/confuse-field-and-method/issue-18343.stderr2
-rw-r--r--tests/ui/confuse-field-and-method/issue-32128.stderr2
-rw-r--r--tests/ui/confuse-field-and-method/private-field.stderr2
-rw-r--r--tests/ui/conservative_impl_trait.stderr2
-rw-r--r--tests/ui/const-generics/adt_const_params/const_param_ty_bad_empty_array.stderr2
-rw-r--r--tests/ui/const-generics/assoc_const_eq_diagnostic.rs6
-rw-r--r--tests/ui/const-generics/assoc_const_eq_diagnostic.stderr28
-rw-r--r--tests/ui/const-generics/associated-type-bound-fail.stderr2
-rw-r--r--tests/ui/const-generics/bad-generic-in-copy-impl.stderr2
-rw-r--r--tests/ui/const-generics/bad-subst-const-kind.stderr2
-rw-r--r--tests/ui/const-generics/const-arg-in-const-arg.min.stderr46
-rw-r--r--tests/ui/const-generics/const-arg-type-arg-misordered.stderr2
-rw-r--r--tests/ui/const-generics/const-argument-if-length.min.stderr2
-rw-r--r--tests/ui/const-generics/const-argument-non-static-lifetime.min.stderr4
-rw-r--r--tests/ui/const-generics/const-generic-default-wont-borrowck.stderr2
-rw-r--r--tests/ui/const-generics/const-param-before-other-params.stderr2
-rw-r--r--tests/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr2
-rw-r--r--tests/ui/const-generics/const-param-type-depends-on-type-param.full.stderr2
-rw-r--r--tests/ui/const-generics/const-param-type-depends-on-type-param.min.stderr2
-rw-r--r--tests/ui/const-generics/const-param-with-additional-obligations.stderr2
-rw-r--r--tests/ui/const-generics/const-parameter-uppercase-lint.stderr2
-rw-r--r--tests/ui/const-generics/defaults/complex-generic-default-expr.min.stderr4
-rw-r--r--tests/ui/const-generics/defaults/default-on-impl.stderr2
-rw-r--r--tests/ui/const-generics/defaults/default-param-wf-concrete.next.stderr2
-rw-r--r--tests/ui/const-generics/defaults/default-param-wf-concrete.old.stderr2
-rw-r--r--tests/ui/const-generics/defaults/default-param-wf-concrete.rs2
-rw-r--r--tests/ui/const-generics/defaults/doesnt_infer.stderr2
-rw-r--r--tests/ui/const-generics/defaults/generic-expr-default-concrete.stderr2
-rw-r--r--tests/ui/const-generics/defaults/generic-expr-default-mismatched-types.stderr2
-rw-r--r--tests/ui/const-generics/defaults/param-order-err-pretty-prints-default.stderr2
-rw-r--r--tests/ui/const-generics/defaults/self-referential.stderr2
-rw-r--r--tests/ui/const-generics/different_generic_args.full.stderr2
-rw-r--r--tests/ui/const-generics/different_generic_args.min.stderr2
-rw-r--r--tests/ui/const-generics/different_generic_args_array.stderr2
-rw-r--r--tests/ui/const-generics/dont-evaluate-array-len-on-err-1.stderr2
-rw-r--r--tests/ui/const-generics/early/const-expression-parameter.stderr2
-rw-r--r--tests/ui/const-generics/early/const-param-from-outer-fn.stderr2
-rw-r--r--tests/ui/const-generics/early/const-param-shadowing.stderr2
-rw-r--r--tests/ui/const-generics/early/macro_rules-braces.stderr8
-rw-r--r--tests/ui/const-generics/ensure_is_evaluatable.stderr2
-rw-r--r--tests/ui/const-generics/exhaustive-value.stderr2
-rw-r--r--tests/ui/const-generics/float-generic.adt_const_params.stderr2
-rw-r--r--tests/ui/const-generics/float-generic.simple.stderr2
-rw-r--r--tests/ui/const-generics/fn-const-param-infer.full.stderr2
-rw-r--r--tests/ui/const-generics/fn-const-param-infer.min.stderr2
-rw-r--r--tests/ui/const-generics/fn_with_two_const_inputs.stderr2
-rw-r--r--tests/ui/const-generics/forbid-non-structural_match-types.stderr2
-rw-r--r--tests/ui/const-generics/generic-param-mismatch.stderr2
-rw-r--r--tests/ui/const-generics/generic_arg_infer/issue-91614.stderr10
-rw-r--r--tests/ui/const-generics/generic_const_exprs/abstract-consts-as-cast-5.stderr2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/array-size-in-generic-struct-param.min.stderr4
-rw-r--r--tests/ui/const-generics/generic_const_exprs/assoc_const_unification/doesnt_unify_evaluatable.stderr2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/closures.stderr2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/const-block-is-poly.stderr2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.rs25
-rw-r--r--tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.stderr64
-rw-r--r--tests/ui/const-generics/generic_const_exprs/dependence_lint.full.stderr4
-rw-r--r--tests/ui/const-generics/generic_const_exprs/eval-privacy.stderr2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/feature-gate-generic_const_exprs.stderr4
-rw-r--r--tests/ui/const-generics/generic_const_exprs/from-sig-fail.stderr2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/issue-105608.stderr2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/issue-72787.min.stderr8
-rw-r--r--tests/ui/const-generics/generic_const_exprs/issue-72819-generic-in-const-eval.min.stderr4
-rw-r--r--tests/ui/const-generics/generic_const_exprs/issue-74713.stderr2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/issue-76595.stderr2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/issue-79518-default_trait_method_normalization.stderr2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/issue-80742.stderr2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/issue-94287.stderr2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/mismatched-gat-subst-kind.stderr2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/needs_where_clause.stderr2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/no_where_clause.stderr2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/non_local_anon_const_diagnostics.stderr2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/object-safety-err-ret.stderr3
-rw-r--r--tests/ui/const-generics/generic_const_exprs/object-safety-err-where-bounds.stderr2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/object-safety-ok-infer-err.stderr2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/obligation-cause.stderr2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/type_mismatch.stderr2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/typeid-equality-by-subtyping.stderr2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/unresolved_lifetimes_error.stderr2
-rw-r--r--tests/ui/const-generics/ice-118285-fn-ptr-value.rs5
-rw-r--r--tests/ui/const-generics/ice-118285-fn-ptr-value.stderr10
-rw-r--r--tests/ui/const-generics/ice-68875.stderr2
-rw-r--r--tests/ui/const-generics/ice-const-generic-function-return-ty.stderr2
-rw-r--r--tests/ui/const-generics/infer/cannot-infer-const-args.stderr2
-rw-r--r--tests/ui/const-generics/infer/issue-77092.stderr2
-rw-r--r--tests/ui/const-generics/infer/method-chain.stderr2
-rw-r--r--tests/ui/const-generics/infer/one-param-uninferred.stderr2
-rw-r--r--tests/ui/const-generics/infer/uninferred-consts.stderr2
-rw-r--r--tests/ui/const-generics/intrinsics-type_name-as-const-argument.min.stderr2
-rw-r--r--tests/ui/const-generics/invalid-constant-in-args.stderr2
-rw-r--r--tests/ui/const-generics/invariant.stderr2
-rw-r--r--tests/ui/const-generics/issue-112505-overflow.stderr2
-rw-r--r--tests/ui/const-generics/issue-46511.stderr2
-rw-r--r--tests/ui/const-generics/issue-66451.stderr2
-rw-r--r--tests/ui/const-generics/issue-80471.stderr2
-rw-r--r--tests/ui/const-generics/issue-93647.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-56445-1.full.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-56445-2.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-56445-3.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-61336-2.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-61336.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-62878.full.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-63322-forbid-dyn.full.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-63322-forbid-dyn.min.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-67375.full.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-67375.min.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-67739.full.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-67739.min.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-67945-1.full.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-67945-1.min.stderr4
-rw-r--r--tests/ui/const-generics/issues/issue-67945-2.full.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-67945-2.min.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-67945-3.full.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-67945-3.min.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-67945-4.full.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-67945-4.min.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-68366.min.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-68615-adt.min.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-68615-array.min.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-71169.full.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-71202.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-71382.full.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-71382.min.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-71611.full.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-72352.full.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-72352.min.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-72845.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-73491.min.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-73727-static-reference-array-const-param.min.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-74255.min.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-75047.min.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-76701-ty-param-in-const.stderr4
-rw-r--r--tests/ui/const-generics/issues/issue-79674.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-80062.stderr4
-rw-r--r--tests/ui/const-generics/issues/issue-80375.stderr4
-rw-r--r--tests/ui/const-generics/issues/issue-82956.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-83249.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-83466.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-83765.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-84659.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-86530.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-86820.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-90364.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-90455.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-97278.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-98629.stderr2
-rw-r--r--tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.stderr2
-rw-r--r--tests/ui/const-generics/late-bound-vars/late-bound-in-where-issue-83993.stderr2
-rw-r--r--tests/ui/const-generics/legacy-const-generics-bad.stderr2
-rw-r--r--tests/ui/const-generics/min_const_generics/complex-expression.stderr14
-rw-r--r--tests/ui/const-generics/min_const_generics/const_default_first.stderr2
-rw-r--r--tests/ui/const-generics/min_const_generics/default_function_param.stderr2
-rw-r--r--tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr4
-rw-r--r--tests/ui/const-generics/min_const_generics/forbid-self-no-normalize.stderr2
-rw-r--r--tests/ui/const-generics/min_const_generics/self-ty-in-const-1.stderr2
-rw-r--r--tests/ui/const-generics/min_const_generics/self-ty-in-const-2.stderr2
-rw-r--r--tests/ui/const-generics/nested-type.full.stderr2
-rw-r--r--tests/ui/const-generics/occurs-check/unify-n-nplusone.stderr2
-rw-r--r--tests/ui/const-generics/occurs-check/unused-substs-1.stderr2
-rw-r--r--tests/ui/const-generics/occurs-check/unused-substs-2.stderr2
-rw-r--r--tests/ui/const-generics/occurs-check/unused-substs-3.stderr2
-rw-r--r--tests/ui/const-generics/occurs-check/unused-substs-4.stderr2
-rw-r--r--tests/ui/const-generics/occurs-check/unused-substs-5.stderr2
-rw-r--r--tests/ui/const-generics/outer-lifetime-in-const-generic-default.stderr4
-rw-r--r--tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.min.stderr2
-rw-r--r--tests/ui/const-generics/parent_generics_of_encoding_impl_trait.stderr2
-rw-r--r--tests/ui/const-generics/parser-error-recovery/issue-89013-no-assoc.stderr2
-rw-r--r--tests/ui/const-generics/parser-error-recovery/issue-89013-type.stderr2
-rw-r--r--tests/ui/const-generics/projection-as-arg-const.stderr2
-rw-r--r--tests/ui/const-generics/raw-ptr-const-param.full.stderr2
-rw-r--r--tests/ui/const-generics/raw-ptr-const-param.min.stderr2
-rw-r--r--tests/ui/const-generics/struct-with-invalid-const-param.stderr2
-rw-r--r--tests/ui/const-generics/transmute-const-param-static-reference.min.stderr2
-rw-r--r--tests/ui/const-generics/type-dependent/issue-71382.stderr2
-rw-r--r--tests/ui/const-generics/type-dependent/type-mismatch.full.stderr2
-rw-r--r--tests/ui/const-generics/type-dependent/type-mismatch.min.stderr2
-rw-r--r--tests/ui/const-generics/unify_with_nested_expr.stderr2
-rw-r--r--tests/ui/const-generics/unknown_adt.stderr2
-rw-r--r--tests/ui/const-generics/unused-type-param-suggestion.stderr2
-rw-r--r--tests/ui/const-generics/wrong-normalization.stderr2
-rw-r--r--tests/ui/const-ptr/forbidden_slices.rs2
-rw-r--r--tests/ui/const-ptr/forbidden_slices.stderr12
-rw-r--r--tests/ui/const-ptr/out_of_bounds_read.stderr4
-rw-r--r--tests/ui/const_prop/apfloat-f64-roundtrip.rs1
-rw-r--r--tests/ui/const_prop/const-prop-ice.stderr2
-rw-r--r--tests/ui/const_prop/const-prop-ice2.stderr2
-rw-r--r--tests/ui/const_prop/const-prop-read-static-in-const.stderr2
-rw-r--r--tests/ui/consts/array-literal-len-mismatch.stderr2
-rw-r--r--tests/ui/consts/assoc_const_generic_impl.stderr2
-rw-r--r--tests/ui/consts/async-block.with_feature.stderr2
-rw-r--r--tests/ui/consts/const-array-oob.stderr2
-rw-r--r--tests/ui/consts/const-as-fn.stderr2
-rw-r--r--tests/ui/consts/const-block-const-bound.stderr2
-rw-r--r--tests/ui/consts/const-block.rs2
-rw-r--r--tests/ui/consts/const-blocks/fn-call-in-non-const.stderr2
-rw-r--r--tests/ui/consts/const-blocks/trait-error.stderr2
-rw-r--r--tests/ui/consts/const-call.stderr2
-rw-r--r--tests/ui/consts/const-cast-wrong-type.stderr2
-rw-r--r--tests/ui/consts/const-deref-ptr.stderr2
-rw-r--r--tests/ui/consts/const-err-multi.stderr2
-rw-r--r--tests/ui/consts/const-err4.32bit.stderr2
-rw-r--r--tests/ui/consts/const-err4.64bit.stderr2
-rw-r--r--tests/ui/consts/const-eval/assign-to-static-within-other-static.stderr2
-rw-r--r--tests/ui/consts/const-eval/conditional_array_execution.stderr2
-rw-r--r--tests/ui/consts/const-eval/const-eval-intrinsic-promotion.stderr2
-rw-r--r--tests/ui/consts/const-eval/const-eval-overflow-3.stderr2
-rw-r--r--tests/ui/consts/const-eval/const-eval-overflow-4.stderr2
-rw-r--r--tests/ui/consts/const-eval/const-eval-span.stderr2
-rw-r--r--tests/ui/consts/const-eval/const_fn_target_feature.stderr2
-rw-r--r--tests/ui/consts/const-eval/const_panic-normalize-tabs-115498.stderr2
-rw-r--r--tests/ui/consts/const-eval/const_panic_stability.e2021.stderr2
-rw-r--r--tests/ui/consts/const-eval/const_panic_track_caller.stderr2
-rw-r--r--tests/ui/consts/const-eval/erroneous-const.stderr2
-rw-r--r--tests/ui/consts/const-eval/erroneous-const2.stderr2
-rw-r--r--tests/ui/consts/const-eval/heap/alloc_intrinsic_errors.stderr2
-rw-r--r--tests/ui/consts/const-eval/heap/alloc_intrinsic_nontransient_fail.stderr2
-rw-r--r--tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.32bit.stderr4
-rw-r--r--tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.64bit.stderr4
-rw-r--r--tests/ui/consts/const-eval/heap/alloc_intrinsic_untyped.stderr2
-rw-r--r--tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.stderr2
-rw-r--r--tests/ui/consts/const-eval/index-out-of-bounds-never-type.stderr2
-rw-r--r--tests/ui/consts/const-eval/index_out_of_bounds.stderr2
-rw-r--r--tests/ui/consts/const-eval/index_out_of_bounds_propagated.stderr2
-rw-r--r--tests/ui/consts/const-eval/infinite_loop.stderr2
-rw-r--r--tests/ui/consts/const-eval/issue-44578.stderr2
-rw-r--r--tests/ui/consts/const-eval/issue-49296.stderr2
-rw-r--r--tests/ui/consts/const-eval/issue-50814-2.mir-opt.stderr2
-rw-r--r--tests/ui/consts/const-eval/issue-50814-2.normal.stderr2
-rw-r--r--tests/ui/consts/const-eval/issue-50814.stderr2
-rw-r--r--tests/ui/consts/const-eval/issue-52475.stderr2
-rw-r--r--tests/ui/consts/const-eval/issue-70723.stderr2
-rw-r--r--tests/ui/consts/const-eval/issue-85155.stderr2
-rw-r--r--tests/ui/consts/const-eval/issue-85907.stderr2
-rw-r--r--tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.rs43
-rw-r--r--tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.stderr9
-rw-r--r--tests/ui/consts/const-eval/issue-91827-extern-types.rs59
-rw-r--r--tests/ui/consts/const-eval/livedrop.stderr2
-rw-r--r--tests/ui/consts/const-eval/match-test-ptr-null.stderr2
-rw-r--r--tests/ui/consts/const-eval/mod-static-with-const-fn.stderr2
-rw-r--r--tests/ui/consts/const-eval/nonnull_as_ref_ub.stderr2
-rw-r--r--tests/ui/consts/const-eval/panic-assoc-never-type.stderr2
-rw-r--r--tests/ui/consts/const-eval/panic-never-type.stderr2
-rw-r--r--tests/ui/consts/const-eval/partial_ptr_overwrite.stderr2
-rw-r--r--tests/ui/consts/const-eval/promoted_const_fn_fail.stderr2
-rw-r--r--tests/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.stderr2
-rw-r--r--tests/ui/consts/const-eval/raw-bytes.32bit.stderr140
-rw-r--r--tests/ui/consts/const-eval/raw-bytes.64bit.stderr140
-rw-r--r--tests/ui/consts/const-eval/raw-bytes.rs16
-rw-r--r--tests/ui/consts/const-eval/raw-pointer-ub.stderr2
-rw-r--r--tests/ui/consts/const-eval/shift_overflow.stderr2
-rw-r--r--tests/ui/consts/const-eval/size-of-t.stderr4
-rw-r--r--tests/ui/consts/const-eval/stable-metric/ctfe-fn-call.stderr2
-rw-r--r--tests/ui/consts/const-eval/stable-metric/ctfe-labelled-loop.stderr2
-rw-r--r--tests/ui/consts/const-eval/stable-metric/ctfe-recursion.stderr2
-rw-r--r--tests/ui/consts/const-eval/transmute-const-promotion.stderr2
-rw-r--r--tests/ui/consts/const-eval/transmute-const.32bit.stderr2
-rw-r--r--tests/ui/consts/const-eval/transmute-const.64bit.stderr2
-rw-r--r--tests/ui/consts/const-eval/ub-enum-overwrite.stderr2
-rw-r--r--tests/ui/consts/const-eval/ub-incorrect-vtable.32bit.stderr22
-rw-r--r--tests/ui/consts/const-eval/ub-incorrect-vtable.64bit.stderr22
-rw-r--r--tests/ui/consts/const-eval/ub-nonnull.chalk.64bit.stderr2
-rw-r--r--tests/ui/consts/const-eval/ub-ref-ptr.rs2
-rw-r--r--tests/ui/consts/const-eval/ub-ref-ptr.stderr4
-rw-r--r--tests/ui/consts/const-eval/ub-slice-get-unchecked.stderr2
-rw-r--r--tests/ui/consts/const-eval/ub-upvars.32bit.stderr4
-rw-r--r--tests/ui/consts/const-eval/ub-upvars.64bit.stderr4
-rw-r--r--tests/ui/consts/const-eval/ub-wide-ptr.chalk.64bit.stderr2
-rw-r--r--tests/ui/consts/const-eval/ub-wide-ptr.rs2
-rw-r--r--tests/ui/consts/const-eval/ub-wide-ptr.stderr16
-rw-r--r--tests/ui/consts/const-eval/ub-write-through-immutable.rs30
-rw-r--r--tests/ui/consts/const-eval/ub-write-through-immutable.stderr55
-rw-r--r--tests/ui/consts/const-eval/union-const-eval-field.stderr2
-rw-r--r--tests/ui/consts/const-eval/union_promotion.stderr2
-rw-r--r--tests/ui/consts/const-eval/unused-broken-const-late.stderr2
-rw-r--r--tests/ui/consts/const-eval/unused-broken-const.stderr2
-rw-r--r--tests/ui/consts/const-eval/unwind-abort.stderr2
-rw-r--r--tests/ui/consts/const-extern-fn/issue-68062-const-extern-fns-dont-need-fn-specifier-2.stderr2
-rw-r--r--tests/ui/consts/const-extern-fn/issue-68062-const-extern-fns-dont-need-fn-specifier.stderr2
-rw-r--r--tests/ui/consts/const-external-macro-const-err.stderr2
-rw-r--r--tests/ui/consts/const-float-classify.stderr2
-rw-r--r--tests/ui/consts/const-fn-mismatch.stderr2
-rw-r--r--tests/ui/consts/const-for-feature-gate.stderr2
-rw-r--r--tests/ui/consts/const-int-unchecked.stderr40
-rw-r--r--tests/ui/consts/const-len-underflow-separate-spans.next.stderr2
-rw-r--r--tests/ui/consts/const-len-underflow-separate-spans.old.stderr2
-rw-r--r--tests/ui/consts/const-len-underflow-separate-spans.rs2
-rw-r--r--tests/ui/consts/const-len-underflow-subspans.stderr2
-rw-r--r--tests/ui/consts/const-match-check.eval1.stderr2
-rw-r--r--tests/ui/consts/const-match-check.eval2.stderr2
-rw-r--r--tests/ui/consts/const-mut-refs/feature-gate-const_mut_refs.stderr2
-rw-r--r--tests/ui/consts/const-points-to-static.32bit.stderr4
-rw-r--r--tests/ui/consts/const-points-to-static.64bit.stderr4
-rw-r--r--tests/ui/consts/const-ptr-unique.stderr2
-rw-r--r--tests/ui/consts/const-size_of-cycle.stderr2
-rw-r--r--tests/ui/consts/const-slice-oob.stderr2
-rw-r--r--tests/ui/consts/const-suggest-feature.stderr2
-rw-r--r--tests/ui/consts/const-try-feature-gate.stderr2
-rw-r--r--tests/ui/consts/const-tup-index-span.stderr2
-rw-r--r--tests/ui/consts/const-unwrap.stderr2
-rw-r--r--tests/ui/consts/const_fn_floating_point_arithmetic.gated.stderr2
-rw-r--r--tests/ui/consts/const_in_pattern/incomplete-slice.stderr2
-rw-r--r--tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.rs8
-rw-r--r--tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.stderr13
-rw-r--r--tests/ui/consts/const_in_pattern/issue-78057.stderr2
-rw-r--r--tests/ui/consts/const_in_pattern/no-eq-branch-fail.stderr2
-rw-r--r--tests/ui/consts/const_in_pattern/reject_non_partial_eq.stderr2
-rw-r--r--tests/ui/consts/const_let_refutable.stderr2
-rw-r--r--tests/ui/consts/const_unsafe_unreachable_ub.stderr2
-rw-r--r--tests/ui/consts/control-flow/assert.stderr2
-rw-r--r--tests/ui/consts/control-flow/issue-46843.stderr2
-rw-r--r--tests/ui/consts/control-flow/issue-50577.stderr2
-rw-r--r--tests/ui/consts/control-flow/try.stderr2
-rw-r--r--tests/ui/consts/ct-var-in-collect_all_mismatches.stderr2
-rw-r--r--tests/ui/consts/dangling-alloc-id-ice.stderr2
-rw-r--r--tests/ui/consts/dangling_raw_ptr.stderr2
-rw-r--r--tests/ui/consts/drop_box.stderr2
-rw-r--r--tests/ui/consts/drop_zst.stderr2
-rw-r--r--tests/ui/consts/effect_param.rs4
-rw-r--r--tests/ui/consts/effect_param.stderr20
-rw-r--r--tests/ui/consts/escaping-bound-var.stderr2
-rw-r--r--tests/ui/consts/fn_trait_refs.stderr8
-rw-r--r--tests/ui/consts/gate-do-not-const-check.stderr2
-rw-r--r--tests/ui/consts/inline_asm.stderr2
-rw-r--r--tests/ui/consts/intrinsic_without_const_stab.stderr2
-rw-r--r--tests/ui/consts/intrinsic_without_const_stab_fail.stderr2
-rw-r--r--tests/ui/consts/invalid-const-in-body.stderr2
-rw-r--r--tests/ui/consts/invalid-inline-const-in-match-arm.stderr2
-rw-r--r--tests/ui/consts/invalid-union.32bit.stderr8
-rw-r--r--tests/ui/consts/invalid-union.64bit.stderr8
-rw-r--r--tests/ui/consts/invalid-union.rs12
-rw-r--r--tests/ui/consts/issue-104609.stderr2
-rw-r--r--tests/ui/consts/issue-104768.stderr2
-rw-r--r--tests/ui/consts/issue-17458.stderr2
-rw-r--r--tests/ui/consts/issue-17718-constants-not-static.stderr2
-rw-r--r--tests/ui/consts/issue-18294.stderr2
-rw-r--r--tests/ui/consts/issue-25826.stderr2
-rw-r--r--tests/ui/consts/issue-28113.stderr2
-rw-r--r--tests/ui/consts/issue-32829.stderr2
-rw-r--r--tests/ui/consts/issue-3521.stderr2
-rw-r--r--tests/ui/consts/issue-36163.stderr2
-rw-r--r--tests/ui/consts/issue-44415.stderr2
-rw-r--r--tests/ui/consts/issue-52023-array-size-pointer-cast.stderr2
-rw-r--r--tests/ui/consts/issue-52060.stderr2
-rw-r--r--tests/ui/consts/issue-63952.32bit.stderr4
-rw-r--r--tests/ui/consts/issue-63952.64bit.stderr4
-rw-r--r--tests/ui/consts/issue-64506.stderr2
-rw-r--r--tests/ui/consts/issue-68542-closure-in-array-len.stderr2
-rw-r--r--tests/ui/consts/issue-70942-trait-vs-impl-mismatch.stderr2
-rw-r--r--tests/ui/consts/issue-73976-monomorphic.stderr2
-rw-r--r--tests/ui/consts/issue-76064.stderr2
-rw-r--r--tests/ui/consts/issue-79137-toogeneric.stderr2
-rw-r--r--tests/ui/consts/issue-79690.64bit.stderr4
-rw-r--r--tests/ui/consts/issue-87046.stderr2
-rw-r--r--tests/ui/consts/issue-90878-2.rs2
-rw-r--r--tests/ui/consts/issue-90878-2.stderr2
-rw-r--r--tests/ui/consts/issue-90878-3.stderr2
-rw-r--r--tests/ui/consts/issue-90878.stderr2
-rw-r--r--tests/ui/consts/issue-miri-1910.stderr4
-rw-r--r--tests/ui/consts/match_ice.stderr2
-rw-r--r--tests/ui/consts/min_const_fn/cmp_fn_pointers.stderr2
-rw-r--r--tests/ui/consts/mir_check_nonconst.stderr2
-rw-r--r--tests/ui/consts/miri_unleashed/abi-mismatch.stderr2
-rw-r--r--tests/ui/consts/miri_unleashed/assoc_const.stderr2
-rw-r--r--tests/ui/consts/miri_unleashed/assoc_const_2.stderr2
-rw-r--r--tests/ui/consts/miri_unleashed/box.stderr2
-rw-r--r--tests/ui/consts/miri_unleashed/const_refers_to_static.32bit.stderr4
-rw-r--r--tests/ui/consts/miri_unleashed/const_refers_to_static.64bit.stderr4
-rw-r--r--tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr4
-rw-r--r--tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr4
-rw-r--r--tests/ui/consts/miri_unleashed/drop.stderr2
-rw-r--r--tests/ui/consts/miri_unleashed/feature-gate-unleash_the_miri_inside_of_you.stderr2
-rw-r--r--tests/ui/consts/miri_unleashed/inline_asm.stderr2
-rw-r--r--tests/ui/consts/miri_unleashed/mutable_references.stderr2
-rw-r--r--tests/ui/consts/miri_unleashed/mutating_global.stderr2
-rw-r--r--tests/ui/consts/miri_unleashed/non_const_fn.stderr2
-rw-r--r--tests/ui/consts/miri_unleashed/raw_mutable_const.stderr2
-rw-r--r--tests/ui/consts/missing-larger-array-impl.stderr2
-rw-r--r--tests/ui/consts/missing_span_in_backtrace.stderr4
-rw-r--r--tests/ui/consts/nested_erroneous_ctfe.stderr2
-rw-r--r--tests/ui/consts/offset_from_ub.stderr6
-rw-r--r--tests/ui/consts/offset_ub.stderr24
-rw-r--r--tests/ui/consts/partial_qualif.stderr2
-rw-r--r--tests/ui/consts/precise-drop-with-promoted.rs7
-rw-r--r--tests/ui/consts/precise-drop-with-promoted.stderr6
-rw-r--r--tests/ui/consts/qualif_overwrite.stderr2
-rw-r--r--tests/ui/consts/qualif_overwrite_2.stderr2
-rw-r--r--tests/ui/consts/raw-ptr-const.rs2
-rw-r--r--tests/ui/consts/raw-ptr-const.stderr2
-rw-r--r--tests/ui/consts/recursive-zst-static.default.stderr2
-rw-r--r--tests/ui/consts/recursive-zst-static.unleash.stderr2
-rw-r--r--tests/ui/consts/recursive.stderr2
-rw-r--r--tests/ui/consts/stable-precise-live-drops-in-libcore.stderr2
-rw-r--r--tests/ui/consts/static_mut_containing_mut_ref2.mut_refs.stderr2
-rw-r--r--tests/ui/consts/static_mut_containing_mut_ref2.stock.stderr2
-rw-r--r--tests/ui/consts/static_mut_containing_mut_ref3.stderr2
-rw-r--r--tests/ui/consts/std/alloc.32bit.stderr25
-rw-r--r--tests/ui/consts/std/alloc.64bit.stderr25
-rw-r--r--tests/ui/consts/std/alloc.rs18
-rw-r--r--tests/ui/consts/timeout.stderr2
-rw-r--r--tests/ui/consts/transmute-size-mismatch-before-typeck.stderr2
-rw-r--r--tests/ui/consts/try-operator.stderr2
-rw-r--r--tests/ui/consts/uninhabited-const-issue-61744.stderr2
-rw-r--r--tests/ui/consts/unstable-const-fn-in-libcore.stderr2
-rw-r--r--tests/ui/copy-a-resource.stderr2
-rw-r--r--tests/ui/coroutine/async-coroutine-issue-67158.stderr2
-rw-r--r--tests/ui/coroutine/async-gen-deduce-yield.rs14
-rw-r--r--tests/ui/coroutine/async-gen-yield-ty-is-unit.rs17
-rw-r--r--tests/ui/coroutine/async_gen_fn.e2024.stderr12
-rw-r--r--tests/ui/coroutine/async_gen_fn.none.stderr18
-rw-r--r--tests/ui/coroutine/async_gen_fn.rs9
-rw-r--r--tests/ui/coroutine/async_gen_fn_iter.rs86
-rw-r--r--tests/ui/coroutine/clone-rpit.rs17
-rw-r--r--tests/ui/coroutine/control-flow.rs1
-rw-r--r--tests/ui/coroutine/coroutine-region-requirements.migrate.stderr2
-rw-r--r--tests/ui/coroutine/coroutine-region-requirements.stderr2
-rw-r--r--tests/ui/coroutine/coroutine-with-nll.stderr2
-rw-r--r--tests/ui/coroutine/discriminant.rs2
-rw-r--r--tests/ui/coroutine/drop-yield-twice.stderr2
-rw-r--r--tests/ui/coroutine/dropck-resume.stderr2
-rw-r--r--tests/ui/coroutine/gen_block_is_iter.rs2
-rw-r--r--tests/ui/coroutine/gen_block_is_no_future.stderr2
-rw-r--r--tests/ui/coroutine/gen_block_iterate.rs2
-rw-r--r--tests/ui/coroutine/gen_block_move.stderr2
-rw-r--r--tests/ui/coroutine/gen_fn.e2024.stderr8
-rw-r--r--tests/ui/coroutine/gen_fn.none.stderr2
-rw-r--r--tests/ui/coroutine/gen_fn.rs2
-rw-r--r--tests/ui/coroutine/gen_fn_iter.rs20
-rw-r--r--tests/ui/coroutine/gen_fn_lifetime_capture.rs19
-rw-r--r--tests/ui/coroutine/issue-102645.stderr2
-rw-r--r--tests/ui/coroutine/issue-45729-unsafe-in-coroutine.mir.stderr2
-rw-r--r--tests/ui/coroutine/issue-45729-unsafe-in-coroutine.thir.stderr2
-rw-r--r--tests/ui/coroutine/issue-48048.stderr2
-rw-r--r--tests/ui/coroutine/issue-57084.rs2
-rw-r--r--tests/ui/coroutine/issue-58888.rs1
-rw-r--r--tests/ui/coroutine/issue-64620-yield-array-element.stderr2
-rw-r--r--tests/ui/coroutine/issue-88653.stderr2
-rw-r--r--tests/ui/coroutine/issue-91477.stderr2
-rw-r--r--tests/ui/coroutine/iterator-count.rs1
-rw-r--r--tests/ui/coroutine/layout-error.stderr2
-rw-r--r--tests/ui/coroutine/metadata-sufficient-for-layout.stderr2
-rw-r--r--tests/ui/coroutine/non-static-is-unpin.rs4
-rw-r--r--tests/ui/coroutine/pattern-borrow.stderr2
-rw-r--r--tests/ui/coroutine/print/coroutine-print-verbose-3.stderr2
-rw-r--r--tests/ui/coroutine/ref-escapes-but-not-over-yield.stderr2
-rw-r--r--tests/ui/coroutine/resume-arg-late-bound.stderr2
-rw-r--r--tests/ui/coroutine/retain-resume-ref.stderr2
-rw-r--r--tests/ui/coroutine/return-types-diverge.rs20
-rw-r--r--tests/ui/coroutine/return-types.rs21
-rw-r--r--tests/ui/coroutine/return-types.stderr31
-rw-r--r--tests/ui/coroutine/self_referential_gen_block.stderr2
-rw-r--r--tests/ui/coroutine/size-moved-locals.rs1
-rw-r--r--tests/ui/coroutine/smoke-resume-args.rs1
-rw-r--r--tests/ui/coroutine/static-not-unpin.current.stderr2
-rw-r--r--tests/ui/coroutine/static-not-unpin.next.stderr2
-rw-r--r--tests/ui/coroutine/static-not-unpin.rs2
-rw-r--r--tests/ui/coroutine/too-many-parameters.stderr2
-rw-r--r--tests/ui/coroutine/type-mismatch-error.stderr2
-rw-r--r--tests/ui/coroutine/uninhabited-field.rs37
-rw-r--r--tests/ui/coroutine/unresolved-ct-var.stderr2
-rw-r--r--tests/ui/coroutine/unsized-capture-across-yield.stderr2
-rw-r--r--tests/ui/coroutine/unsized-local-across-yield.stderr2
-rw-r--r--tests/ui/coroutine/yield-in-args.stderr2
-rw-r--r--tests/ui/coroutine/yield-in-const.stderr2
-rw-r--r--tests/ui/coroutine/yield-in-function.stderr2
-rw-r--r--tests/ui/coroutine/yield-in-static.stderr2
-rw-r--r--tests/ui/coroutine/yield-while-ref-reborrowed.stderr2
-rw-r--r--tests/ui/crate-loading/crateresolve1.stderr2
-rw-r--r--tests/ui/crate-loading/crateresolve2.stderr2
-rw-r--r--tests/ui/crate-name-mismatch.stderr2
-rw-r--r--tests/ui/cross/cross-borrow-trait.stderr2
-rw-r--r--tests/ui/cross/cross-crate-macro-backtrace/main.stderr2
-rw-r--r--tests/ui/cross/cross-file-errors/main.stderr2
-rw-r--r--tests/ui/cross/cross-fn-cache-hole.stderr2
-rw-r--r--tests/ui/custom-attribute-multisegment.stderr2
-rw-r--r--tests/ui/custom_test_frameworks/mismatch.stderr2
-rw-r--r--tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr2
-rw-r--r--tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr2
-rw-r--r--tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr2
-rw-r--r--tests/ui/cycle-trait/issue-12511.stderr2
-rw-r--r--tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-1.stderr2
-rw-r--r--tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.stderr2
-rw-r--r--tests/ui/dep-graph/dep-graph-assoc-type-codegen.stderr2
-rw-r--r--tests/ui/dep-graph/dep-graph-trait-impl-two-traits.rs2
-rw-r--r--tests/ui/dep-graph/dep-graph-trait-impl-two-traits.stderr2
-rw-r--r--tests/ui/dep-graph/dep-graph-variance-alias.stderr2
-rw-r--r--tests/ui/deprecation/deprecated_no_stack_check.stderr2
-rw-r--r--tests/ui/deprecation/deprecation-lint-2.stderr2
-rw-r--r--tests/ui/deprecation/deprecation-lint-3.stderr2
-rw-r--r--tests/ui/deprecation/feature-gate-deprecated_suggestion.stderr2
-rw-r--r--tests/ui/deprecation/invalid-literal.stderr2
-rw-r--r--tests/ui/deprecation/issue-66340-deprecated-attr-non-meta-grammar.stderr2
-rw-r--r--tests/ui/deref-non-pointer.stderr2
-rw-r--r--tests/ui/deref-patterns/gate.stderr2
-rw-r--r--tests/ui/derived-errors/issue-30580.stderr9
-rw-r--r--tests/ui/derived-errors/issue-31997-1.stderr2
-rw-r--r--tests/ui/derived-errors/issue-31997.stderr2
-rw-r--r--tests/ui/derives/clone-debug-dead-code-in-the-same-struct.stderr2
-rw-r--r--tests/ui/derives/derive-assoc-type-not-impl.stderr2
-rw-r--r--tests/ui/derives/derive-deadlock.stderr2
-rw-r--r--tests/ui/derives/derives-span-Clone-enum-struct-variant.stderr2
-rw-r--r--tests/ui/derives/derives-span-Clone-enum.stderr2
-rw-r--r--tests/ui/derives/derives-span-Clone-struct.stderr2
-rw-r--r--tests/ui/derives/derives-span-Clone-tuple-struct.stderr2
-rw-r--r--tests/ui/derives/derives-span-Debug-enum-struct-variant.stderr2
-rw-r--r--tests/ui/derives/derives-span-Debug-enum.stderr2
-rw-r--r--tests/ui/derives/derives-span-Debug-struct.stderr2
-rw-r--r--tests/ui/derives/derives-span-Debug-tuple-struct.stderr2
-rw-r--r--tests/ui/derives/derives-span-Default-struct.stderr2
-rw-r--r--tests/ui/derives/derives-span-Default-tuple-struct.stderr2
-rw-r--r--tests/ui/derives/derives-span-Eq-enum-struct-variant.stderr2
-rw-r--r--tests/ui/derives/derives-span-Eq-enum.stderr2
-rw-r--r--tests/ui/derives/derives-span-Eq-struct.stderr2
-rw-r--r--tests/ui/derives/derives-span-Eq-tuple-struct.stderr2
-rw-r--r--tests/ui/derives/derives-span-Hash-enum-struct-variant.stderr2
-rw-r--r--tests/ui/derives/derives-span-Hash-enum.stderr2
-rw-r--r--tests/ui/derives/derives-span-Hash-struct.stderr2
-rw-r--r--tests/ui/derives/derives-span-Hash-tuple-struct.stderr2
-rw-r--r--tests/ui/derives/derives-span-Ord-enum-struct-variant.stderr2
-rw-r--r--tests/ui/derives/derives-span-Ord-enum.stderr2
-rw-r--r--tests/ui/derives/derives-span-Ord-struct.stderr2
-rw-r--r--tests/ui/derives/derives-span-Ord-tuple-struct.stderr2
-rw-r--r--tests/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr2
-rw-r--r--tests/ui/derives/derives-span-PartialEq-enum.stderr2
-rw-r--r--tests/ui/derives/derives-span-PartialEq-struct.stderr2
-rw-r--r--tests/ui/derives/derives-span-PartialEq-tuple-struct.stderr2
-rw-r--r--tests/ui/derives/derives-span-PartialOrd-enum-struct-variant.stderr2
-rw-r--r--tests/ui/derives/derives-span-PartialOrd-enum.stderr2
-rw-r--r--tests/ui/derives/derives-span-PartialOrd-struct.stderr2
-rw-r--r--tests/ui/derives/derives-span-PartialOrd-tuple-struct.stderr2
-rw-r--r--tests/ui/derives/deriving-with-repr-packed-2.stderr2
-rw-r--r--tests/ui/derives/deriving-with-repr-packed.stderr2
-rw-r--r--tests/ui/derives/issue-97343.stderr2
-rw-r--r--tests/ui/deriving/issue-103157.stderr2
-rw-r--r--tests/ui/deriving/issue-105101.rs9
-rw-r--r--tests/ui/deriving/issue-105101.stderr29
-rw-r--r--tests/ui/deriving/multiple-defaults.rs41
-rw-r--r--tests/ui/deriving/multiple-defaults.stderr62
-rw-r--r--tests/ui/destructuring-assignment/bad-expr-lhs.rs2
-rw-r--r--tests/ui/destructuring-assignment/bad-expr-lhs.stderr10
-rw-r--r--tests/ui/destructuring-assignment/default-match-bindings-forbidden.stderr2
-rw-r--r--tests/ui/destructuring-assignment/non-exhaustive-destructure.rs4
-rw-r--r--tests/ui/destructuring-assignment/non-exhaustive-destructure.stderr17
-rw-r--r--tests/ui/destructuring-assignment/struct-or-enum-variant-path.rs6
-rw-r--r--tests/ui/diagnostic-flags/terminal_urls.stderr2
-rw-r--r--tests/ui/diagnostic-width/E0271.stderr2
-rw-r--r--tests/ui/diagnostic-width/flag-human.stderr2
-rw-r--r--tests/ui/diagnostic-width/flag-json.stderr6
-rw-r--r--tests/ui/diagnostic-width/long-E0308.stderr10
-rw-r--r--tests/ui/diagnostic-width/non-1-width-unicode-multiline-label.stderr2
-rw-r--r--tests/ui/diagnostic-width/non-whitespace-trimming-2.stderr2
-rw-r--r--tests/ui/diagnostic-width/non-whitespace-trimming-unicode.stderr2
-rw-r--r--tests/ui/diagnostic-width/non-whitespace-trimming.stderr2
-rw-r--r--tests/ui/diagnostic-width/tab-column-numbers.stderr2
-rw-r--r--tests/ui/diagnostic-width/tabs-trimming.stderr2
-rw-r--r--tests/ui/diagnostic-width/whitespace-trimming-2.stderr2
-rw-r--r--tests/ui/diagnostic-width/whitespace-trimming.stderr2
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.rs67
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.stderr305
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.rs8
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr54
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/feature-gate-diagnostic_on_unimplemented.stderr2
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.rs2
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.stderr28
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/on_unimplemented_simple.stderr2
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/report_warning_on_duplicated_options.rs25
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/report_warning_on_duplicated_options.stderr67
-rw-r--r--tests/ui/diagnostic_namespace/requires_path.stderr2
-rw-r--r--tests/ui/did_you_mean/dont-suggest-doc-hidden-fields.rs2
-rw-r--r--tests/ui/did_you_mean/dont-suggest-doc-hidden-fields.stderr2
-rw-r--r--tests/ui/did_you_mean/dont-suggest-hygienic-fields.stderr6
-rw-r--r--tests/ui/did_you_mean/issue-114112.stderr2
-rw-r--r--tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-1.stderr2
-rw-r--r--tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.stderr2
-rw-r--r--tests/ui/did_you_mean/issue-34337.stderr2
-rw-r--r--tests/ui/did_you_mean/issue-36798.stderr9
-rw-r--r--tests/ui/did_you_mean/issue-36798_unknown_field.stderr4
-rw-r--r--tests/ui/did_you_mean/issue-37139.stderr2
-rw-r--r--tests/ui/did_you_mean/issue-38147-1.stderr2
-rw-r--r--tests/ui/did_you_mean/issue-38147-3.stderr2
-rw-r--r--tests/ui/did_you_mean/issue-38147-4.stderr2
-rw-r--r--tests/ui/did_you_mean/issue-40823.stderr2
-rw-r--r--tests/ui/did_you_mean/issue-42599_available_fields_note.stderr14
-rw-r--r--tests/ui/did_you_mean/issue-46718-struct-pattern-dotdotdot.stderr2
-rw-r--r--tests/ui/did_you_mean/println-typo.stderr2
-rw-r--r--tests/ui/did_you_mean/pub-macro-rules.stderr2
-rw-r--r--tests/ui/did_you_mean/recursion_limit.stderr2
-rw-r--r--tests/ui/did_you_mean/recursion_limit_macro.stderr2
-rw-r--r--tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.stderr2
-rw-r--r--tests/ui/directory_ownership/macro-expanded-mod.stderr2
-rw-r--r--tests/ui/directory_ownership/non-inline-mod-restriction.stderr2
-rw-r--r--tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.stderr2
-rw-r--r--tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.stderr2
-rw-r--r--tests/ui/diverging-fn-tail-35849.stderr2
-rw-r--r--tests/ui/does-nothing.stderr2
-rw-r--r--tests/ui/dont-suggest-private-trait-method.stderr2
-rw-r--r--tests/ui/double-type-import.stderr2
-rw-r--r--tests/ui/drop/drop-foreign-fundamental.stderr2
-rw-r--r--tests/ui/dropck/drop-with-active-borrows-1.stderr2
-rw-r--r--tests/ui/dropck/drop-with-active-borrows-2.stderr2
-rw-r--r--tests/ui/dropck/dropck-union.stderr2
-rw-r--r--tests/ui/dropck/dropck_no_diverge_on_nonregular_1.stderr2
-rw-r--r--tests/ui/dropck/dropck_no_diverge_on_nonregular_2.stderr2
-rw-r--r--tests/ui/dropck/dropck_trait_cycle_checked.stderr12
-rw-r--r--tests/ui/dropck/explicit-implied-outlives.bad1.stderr2
-rw-r--r--tests/ui/dropck/explicit-implied-outlives.bad2.stderr2
-rw-r--r--tests/ui/dropck/issue-38868.stderr2
-rw-r--r--tests/ui/dropck/negative.stderr2
-rw-r--r--tests/ui/dropck/relate_lt_in_type_outlives_bound.stderr2
-rw-r--r--tests/ui/dropck/reservation.stderr2
-rw-r--r--tests/ui/dropck/transitive-outlives.bad.stderr2
-rw-r--r--tests/ui/dst/dst-bad-assign-2.stderr2
-rw-r--r--tests/ui/dst/dst-bad-deep-2.stderr2
-rw-r--r--tests/ui/dst/dst-bad-deep.stderr2
-rw-r--r--tests/ui/dst/issue-113447.stderr2
-rw-r--r--tests/ui/duplicate/dupe-symbols-1.stderr2
-rw-r--r--tests/ui/duplicate/dupe-symbols-2.stderr2
-rw-r--r--tests/ui/duplicate/dupe-symbols-3.stderr2
-rw-r--r--tests/ui/duplicate/dupe-symbols-4.stderr2
-rw-r--r--tests/ui/duplicate/dupe-symbols-5.stderr2
-rw-r--r--tests/ui/duplicate/dupe-symbols-6.stderr2
-rw-r--r--tests/ui/duplicate/dupe-symbols-7.stderr2
-rw-r--r--tests/ui/duplicate/dupe-symbols-8.stderr2
-rw-r--r--tests/ui/duplicate/duplicate-check-macro-exports.stderr2
-rw-r--r--tests/ui/duplicate/duplicate-parameter.stderr2
-rw-r--r--tests/ui/duplicate_entry_error.stderr9
-rw-r--r--tests/ui/dyn-keyword/dyn-angle-brackets.stderr2
-rw-r--r--tests/ui/dyn-star/align.normal.stderr2
-rw-r--r--tests/ui/dyn-star/align.over_aligned.stderr2
-rw-r--r--tests/ui/dyn-star/box.rs2
-rw-r--r--tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.current.stderr2
-rw-r--r--tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.next.stderr2
-rw-r--r--tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs2
-rw-r--r--tests/ui/dyn-star/check-size-at-cast.stderr2
-rw-r--r--tests/ui/dyn-star/dispatch-on-pin-mut.rs24
-rw-r--r--tests/ui/dyn-star/dyn-to-rigid.stderr2
-rw-r--r--tests/ui/dyn-star/error.stderr2
-rw-r--r--tests/ui/dyn-star/feature-gate-dyn_star.stderr2
-rw-r--r--tests/ui/dyn-star/gated-span.stderr2
-rw-r--r--tests/ui/dyn-star/no-explicit-dyn-star.stderr2
-rw-r--r--tests/ui/dyn-star/no-implicit-dyn-star.stderr2
-rw-r--r--tests/ui/dyn-star/no-unsize-coerce-dyn-trait.stderr2
-rw-r--r--tests/ui/dyn-star/param-env-region-infer.current.stderr2
-rw-r--r--tests/ui/dyn-star/param-env-region-infer.rs2
-rw-r--r--tests/ui/dyn-star/unsize-into-ref-dyn-star.stderr2
-rw-r--r--tests/ui/dyn-star/upcast.stderr2
-rw-r--r--tests/ui/editions/dyn-trait-sugg-2021.stderr2
-rw-r--r--tests/ui/editions/edition-cstr-2015-2018.rs62
-rw-r--r--tests/ui/editions/edition-cstr-2015-2018.stderr67
-rw-r--r--tests/ui/editions/edition-feature-ok.rs5
-rw-r--r--tests/ui/editions/edition-feature-redundant.rs7
-rw-r--r--tests/ui/editions/edition-feature-redundant.stderr9
-rw-r--r--tests/ui/editions/edition-imports-2015.stderr2
-rw-r--r--tests/ui/editions/edition-imports-2018.stderr2
-rw-r--r--tests/ui/editions/edition-imports-virtual-2015-gated.stderr2
-rw-r--r--tests/ui/editions/edition-keywords-2015-2018-expansion.stderr2
-rw-r--r--tests/ui/editions/edition-keywords-2018-2018-expansion.stderr2
-rw-r--r--tests/ui/editions/edition-raw-pointer-method-2015.stderr2
-rw-r--r--tests/ui/editions/edition-raw-pointer-method-2018.stderr2
-rw-r--r--tests/ui/editions/epoch-gate-feature.rs15
-rw-r--r--tests/ui/elide-errors-on-mismatched-tuple.stderr2
-rw-r--r--tests/ui/elided-test.stderr2
-rw-r--r--tests/ui/empty/empty-comment.stderr2
-rw-r--r--tests/ui/empty/empty-linkname.stderr2
-rw-r--r--tests/ui/empty/empty-macro-use.stderr2
-rw-r--r--tests/ui/empty/empty-never-array.stderr2
-rw-r--r--tests/ui/entry-point/imported_main_conflict.stderr2
-rw-r--r--tests/ui/entry-point/imported_main_const_fn_item_type_forbidden.stderr2
-rw-r--r--tests/ui/entry-point/imported_main_const_forbidden.stderr2
-rw-r--r--tests/ui/entry-point/imported_main_from_extern_crate_wrong_type.stderr2
-rw-r--r--tests/ui/entry-point/issue-118772.rs3
-rw-r--r--tests/ui/entry-point/issue-118772.stderr12
-rw-r--r--tests/ui/enum-discriminant/arbitrary_enum_discriminant-no-repr.stderr2
-rw-r--r--tests/ui/enum-discriminant/forbidden-discriminant-kind-impl.stderr2
-rw-r--r--tests/ui/enum-discriminant/issue-41394.stderr2
-rw-r--r--tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice-2.stderr2
-rw-r--r--tests/ui/enum-discriminant/issue-70453-polymorphic-ctfe.stderr2
-rw-r--r--tests/ui/enum-discriminant/issue-72554.stderr2
-rw-r--r--tests/ui/enum/enum-and-module-in-same-scope.stderr2
-rw-r--r--tests/ui/enum/enum-discrim-autosizing.stderr2
-rw-r--r--tests/ui/enum/enum-in-scope.stderr2
-rw-r--r--tests/ui/enum/enum-variant-type-2.stderr2
-rw-r--r--tests/ui/enum/suggest-default-attribute.stderr2
-rw-r--r--tests/ui/error-codes/E0001.stderr2
-rw-r--r--tests/ui/error-codes/E0004-2.stderr2
-rw-r--r--tests/ui/error-codes/E0004.stderr2
-rw-r--r--tests/ui/error-codes/E0005.stderr2
-rw-r--r--tests/ui/error-codes/E0013.stderr2
-rw-r--r--tests/ui/error-codes/E0015.stderr2
-rw-r--r--tests/ui/error-codes/E0025.stderr2
-rw-r--r--tests/ui/error-codes/E0026-teach.stderr2
-rw-r--r--tests/ui/error-codes/E0026.stderr2
-rw-r--r--tests/ui/error-codes/E0029-teach.stderr2
-rw-r--r--tests/ui/error-codes/E0029.stderr2
-rw-r--r--tests/ui/error-codes/E0030-teach.stderr2
-rw-r--r--tests/ui/error-codes/E0030.stderr2
-rw-r--r--tests/ui/error-codes/E0033-teach.stderr2
-rw-r--r--tests/ui/error-codes/E0033.stderr2
-rw-r--r--tests/ui/error-codes/E0034.stderr2
-rw-r--r--tests/ui/error-codes/E0038.stderr2
-rw-r--r--tests/ui/error-codes/E0040.stderr2
-rw-r--r--tests/ui/error-codes/E0044.stderr2
-rw-r--r--tests/ui/error-codes/E0045.stderr2
-rw-r--r--tests/ui/error-codes/E0054.stderr2
-rw-r--r--tests/ui/error-codes/E0055.stderr2
-rw-r--r--tests/ui/error-codes/E0059.stderr2
-rw-r--r--tests/ui/error-codes/E0060.stderr2
-rw-r--r--tests/ui/error-codes/E0062.stderr2
-rw-r--r--tests/ui/error-codes/E0069.stderr2
-rw-r--r--tests/ui/error-codes/E0071.stderr2
-rw-r--r--tests/ui/error-codes/E0075.stderr2
-rw-r--r--tests/ui/error-codes/E0076.stderr2
-rw-r--r--tests/ui/error-codes/E0077.stderr2
-rw-r--r--tests/ui/error-codes/E0084.stderr2
-rw-r--r--tests/ui/error-codes/E0092.stderr2
-rw-r--r--tests/ui/error-codes/E0093.stderr2
-rw-r--r--tests/ui/error-codes/E0094.stderr2
-rw-r--r--tests/ui/error-codes/E0109.stderr2
-rw-r--r--tests/ui/error-codes/E0110.stderr2
-rw-r--r--tests/ui/error-codes/E0116.stderr2
-rw-r--r--tests/ui/error-codes/E0118.stderr2
-rw-r--r--tests/ui/error-codes/E0119.stderr2
-rw-r--r--tests/ui/error-codes/E0120.stderr2
-rw-r--r--tests/ui/error-codes/E0124.stderr2
-rw-r--r--tests/ui/error-codes/E0128.stderr2
-rw-r--r--tests/ui/error-codes/E0130.stderr2
-rw-r--r--tests/ui/error-codes/E0131.stderr2
-rw-r--r--tests/ui/error-codes/E0132.stderr2
-rw-r--r--tests/ui/error-codes/E0133.mir.stderr2
-rw-r--r--tests/ui/error-codes/E0133.thir.stderr2
-rw-r--r--tests/ui/error-codes/E0138.stderr2
-rw-r--r--tests/ui/error-codes/E0152.stderr4
-rw-r--r--tests/ui/error-codes/E0161.base.stderr2
-rw-r--r--tests/ui/error-codes/E0164.stderr2
-rw-r--r--tests/ui/error-codes/E0184.stderr2
-rw-r--r--tests/ui/error-codes/E0185.stderr2
-rw-r--r--tests/ui/error-codes/E0186.stderr2
-rw-r--r--tests/ui/error-codes/E0191.stderr2
-rw-r--r--tests/ui/error-codes/E0194.stderr2
-rw-r--r--tests/ui/error-codes/E0195.stderr2
-rw-r--r--tests/ui/error-codes/E0197.stderr2
-rw-r--r--tests/ui/error-codes/E0198.stderr2
-rw-r--r--tests/ui/error-codes/E0199.stderr2
-rw-r--r--tests/ui/error-codes/E0200.stderr2
-rw-r--r--tests/ui/error-codes/E0206.stderr2
-rw-r--r--tests/ui/error-codes/E0207.stderr2
-rw-r--r--tests/ui/error-codes/E0208.stderr2
-rw-r--r--tests/ui/error-codes/E0214.stderr2
-rw-r--r--tests/ui/error-codes/E0221.stderr2
-rw-r--r--tests/ui/error-codes/E0223.stderr2
-rw-r--r--tests/ui/error-codes/E0227.stderr2
-rw-r--r--tests/ui/error-codes/E0229.stderr2
-rw-r--r--tests/ui/error-codes/E0252.stderr2
-rw-r--r--tests/ui/error-codes/E0253.stderr2
-rw-r--r--tests/ui/error-codes/E0254.stderr2
-rw-r--r--tests/ui/error-codes/E0255.stderr2
-rw-r--r--tests/ui/error-codes/E0259.stderr2
-rw-r--r--tests/ui/error-codes/E0260.stderr2
-rw-r--r--tests/ui/error-codes/E0262.stderr2
-rw-r--r--tests/ui/error-codes/E0263.stderr2
-rw-r--r--tests/ui/error-codes/E0264.stderr4
-rw-r--r--tests/ui/error-codes/E0267.stderr2
-rw-r--r--tests/ui/error-codes/E0268.stderr2
-rw-r--r--tests/ui/error-codes/E0271.stderr2
-rw-r--r--tests/ui/error-codes/E0275.stderr2
-rw-r--r--tests/ui/error-codes/E0276.stderr2
-rw-r--r--tests/ui/error-codes/E0277-2.stderr2
-rw-r--r--tests/ui/error-codes/E0277-3.stderr2
-rw-r--r--tests/ui/error-codes/E0282.stderr2
-rw-r--r--tests/ui/error-codes/E0297.stderr2
-rw-r--r--tests/ui/error-codes/E0308-2.stderr2
-rw-r--r--tests/ui/error-codes/E0308-4.stderr2
-rw-r--r--tests/ui/error-codes/E0308.stderr2
-rw-r--r--tests/ui/error-codes/E0311.stderr2
-rw-r--r--tests/ui/error-codes/E0328.stderr2
-rw-r--r--tests/ui/error-codes/E0365.stderr2
-rw-r--r--tests/ui/error-codes/E0370.stderr2
-rw-r--r--tests/ui/error-codes/E0374.stderr2
-rw-r--r--tests/ui/error-codes/E0375.stderr2
-rw-r--r--tests/ui/error-codes/E0376.stderr2
-rw-r--r--tests/ui/error-codes/E0377.stderr2
-rw-r--r--tests/ui/error-codes/E0389.stderr2
-rw-r--r--tests/ui/error-codes/E0392.stderr2
-rw-r--r--tests/ui/error-codes/E0393.stderr2
-rw-r--r--tests/ui/error-codes/E0396-fixed.stderr2
-rw-r--r--tests/ui/error-codes/E0401.stderr2
-rw-r--r--tests/ui/error-codes/E0403.stderr2
-rw-r--r--tests/ui/error-codes/E0405.stderr2
-rw-r--r--tests/ui/error-codes/E0407.stderr2
-rw-r--r--tests/ui/error-codes/E0408.stderr2
-rw-r--r--tests/ui/error-codes/E0411.stderr2
-rw-r--r--tests/ui/error-codes/E0412.stderr2
-rw-r--r--tests/ui/error-codes/E0415.stderr2
-rw-r--r--tests/ui/error-codes/E0416.stderr2
-rw-r--r--tests/ui/error-codes/E0425.stderr2
-rw-r--r--tests/ui/error-codes/E0426.stderr2
-rw-r--r--tests/ui/error-codes/E0428.stderr2
-rw-r--r--tests/ui/error-codes/E0429.stderr2
-rw-r--r--tests/ui/error-codes/E0431.stderr2
-rw-r--r--tests/ui/error-codes/E0432.stderr2
-rw-r--r--tests/ui/error-codes/E0433.stderr2
-rw-r--r--tests/ui/error-codes/E0434.stderr2
-rw-r--r--tests/ui/error-codes/E0435.stderr2
-rw-r--r--tests/ui/error-codes/E0437.stderr2
-rw-r--r--tests/ui/error-codes/E0438.stderr2
-rw-r--r--tests/ui/error-codes/E0454.stderr2
-rw-r--r--tests/ui/error-codes/E0458.stderr2
-rw-r--r--tests/ui/error-codes/E0459.stderr2
-rw-r--r--tests/ui/error-codes/E0462.stderr2
-rw-r--r--tests/ui/error-codes/E0464.stderr2
-rw-r--r--tests/ui/error-codes/E0476.next.stderr (renamed from tests/ui/error-codes/E0476.stderr)8
-rw-r--r--tests/ui/error-codes/E0476.old.stderr31
-rw-r--r--tests/ui/error-codes/E0476.rs2
-rw-r--r--tests/ui/error-codes/E0478.stderr2
-rw-r--r--tests/ui/error-codes/E0496.stderr2
-rw-r--r--tests/ui/error-codes/E0499.stderr2
-rw-r--r--tests/ui/error-codes/E0502.stderr2
-rw-r--r--tests/ui/error-codes/E0503.stderr2
-rw-r--r--tests/ui/error-codes/E0504.stderr2
-rw-r--r--tests/ui/error-codes/E0505.stderr2
-rw-r--r--tests/ui/error-codes/E0506.stderr2
-rw-r--r--tests/ui/error-codes/E0507.stderr2
-rw-r--r--tests/ui/error-codes/E0508-fail.stderr2
-rw-r--r--tests/ui/error-codes/E0508.stderr2
-rw-r--r--tests/ui/error-codes/E0509.stderr2
-rw-r--r--tests/ui/error-codes/E0511.stderr2
-rw-r--r--tests/ui/error-codes/E0512.stderr2
-rw-r--r--tests/ui/error-codes/E0516.stderr2
-rw-r--r--tests/ui/error-codes/E0519.stderr2
-rw-r--r--tests/ui/error-codes/E0520.stderr2
-rw-r--r--tests/ui/error-codes/E0522.stderr2
-rw-r--r--tests/ui/error-codes/E0523.stderr2
-rw-r--r--tests/ui/error-codes/E0527.stderr2
-rw-r--r--tests/ui/error-codes/E0528.stderr2
-rw-r--r--tests/ui/error-codes/E0529.stderr2
-rw-r--r--tests/ui/error-codes/E0530.stderr2
-rw-r--r--tests/ui/error-codes/E0532.stderr2
-rw-r--r--tests/ui/error-codes/E0534.stderr2
-rw-r--r--tests/ui/error-codes/E0559.stderr2
-rw-r--r--tests/ui/error-codes/E0560.stderr2
-rw-r--r--tests/ui/error-codes/E0565-1.stderr2
-rw-r--r--tests/ui/error-codes/E0565-2.stderr2
-rw-r--r--tests/ui/error-codes/E0565.stderr2
-rw-r--r--tests/ui/error-codes/E0572.stderr2
-rw-r--r--tests/ui/error-codes/E0583.stderr2
-rw-r--r--tests/ui/error-codes/E0585.stderr2
-rw-r--r--tests/ui/error-codes/E0586.stderr2
-rw-r--r--tests/ui/error-codes/E0594.stderr2
-rw-r--r--tests/ui/error-codes/E0596.stderr2
-rw-r--r--tests/ui/error-codes/E0597.stderr2
-rw-r--r--tests/ui/error-codes/E0599.stderr2
-rw-r--r--tests/ui/error-codes/E0600.stderr2
-rw-r--r--tests/ui/error-codes/E0601.stderr2
-rw-r--r--tests/ui/error-codes/E0603.stderr2
-rw-r--r--tests/ui/error-codes/E0604.stderr2
-rw-r--r--tests/ui/error-codes/E0607.stderr2
-rw-r--r--tests/ui/error-codes/E0608.stderr2
-rw-r--r--tests/ui/error-codes/E0609-private-method.stderr2
-rw-r--r--tests/ui/error-codes/E0609.stderr2
-rw-r--r--tests/ui/error-codes/E0610.stderr2
-rw-r--r--tests/ui/error-codes/E0614.stderr2
-rw-r--r--tests/ui/error-codes/E0615.stderr2
-rw-r--r--tests/ui/error-codes/E0616.stderr2
-rw-r--r--tests/ui/error-codes/E0620.stderr2
-rw-r--r--tests/ui/error-codes/E0621-does-not-trigger-for-closures.stderr2
-rw-r--r--tests/ui/error-codes/E0622.stderr2
-rw-r--r--tests/ui/error-codes/E0624.stderr2
-rw-r--r--tests/ui/error-codes/E0646.stderr2
-rw-r--r--tests/ui/error-codes/E0647.stderr2
-rw-r--r--tests/ui/error-codes/E0648.stderr2
-rw-r--r--tests/ui/error-codes/E0658.stderr2
-rw-r--r--tests/ui/error-codes/E0659.stderr2
-rw-r--r--tests/ui/error-codes/E0705.rs10
-rw-r--r--tests/ui/error-codes/E0705.stderr9
-rw-r--r--tests/ui/error-codes/E0718.stderr2
-rw-r--r--tests/ui/error-codes/E0730.stderr2
-rw-r--r--tests/ui/error-codes/E0771.stderr2
-rw-r--r--tests/ui/error-codes/E0778.stderr2
-rw-r--r--tests/ui/error-codes/E0779.stderr2
-rw-r--r--tests/ui/error-codes/e0119/complex-impl.stderr2
-rw-r--r--tests/ui/error-codes/e0119/issue-23563.stderr2
-rw-r--r--tests/ui/error-codes/e0119/issue-27403.stderr2
-rw-r--r--tests/ui/error-codes/e0119/issue-28981.stderr2
-rw-r--r--tests/ui/error-codes/e0119/so-37347311.stderr2
-rw-r--r--tests/ui/error-codes/ex-E0611.stderr2
-rw-r--r--tests/ui/error-codes/ex-E0612.stderr9
-rw-r--r--tests/ui/error-emitter/highlighting.not-windows.stderr22
-rw-r--r--tests/ui/error-emitter/highlighting.rs27
-rw-r--r--tests/ui/error-emitter/highlighting.windows.stderr22
-rw-r--r--tests/ui/error-emitter/multiline-multipart-suggestion.not-windows.stderr (renamed from tests/ui/suggestions/multiline-multipart-suggestion.stderr)14
-rw-r--r--tests/ui/error-emitter/multiline-multipart-suggestion.rs (renamed from tests/ui/suggestions/multiline-multipart-suggestion.rs)12
-rw-r--r--tests/ui/error-emitter/multiline-multipart-suggestion.windows.stderr46
-rw-r--r--tests/ui/error-should-say-copy-not-pod.stderr2
-rw-r--r--tests/ui/errors/issue-104621-extern-not-file.stderr2
-rw-r--r--tests/ui/errors/remap-path-prefix-reverse.local-self.stderr2
-rw-r--r--tests/ui/errors/remap-path-prefix-reverse.remapped-self.stderr2
-rw-r--r--tests/ui/errors/remap-path-prefix.normal.stderr2
-rw-r--r--tests/ui/errors/remap-path-prefix.with-diagnostic-scope.stderr2
-rw-r--r--tests/ui/errors/remap-path-prefix.without-diagnostic-scope.stderr2
-rw-r--r--tests/ui/explicit-tail-calls/become-outside.array.stderr2
-rw-r--r--tests/ui/explicit-tail-calls/become-outside.constant.stderr2
-rw-r--r--tests/ui/explicit/explicit-call-to-dtor.stderr2
-rw-r--r--tests/ui/explicit/explicit-call-to-supertrait-dtor.stderr2
-rw-r--r--tests/ui/expr/if/attrs/bad-cfg.stderr2
-rw-r--r--tests/ui/expr/if/attrs/stmt-expr-gated.stderr2
-rw-r--r--tests/ui/expr/if/bad-if-let-suggestion.rs3
-rw-r--r--tests/ui/expr/if/bad-if-let-suggestion.stderr22
-rw-r--r--tests/ui/expr/if/if-branch-types.stderr2
-rw-r--r--tests/ui/expr/if/if-let-arm-types.stderr2
-rw-r--r--tests/ui/expr/if/if-typeck.stderr2
-rw-r--r--tests/ui/expr/if/if-without-block.stderr2
-rw-r--r--tests/ui/expr/if/if-without-else-result.stderr2
-rw-r--r--tests/ui/expr/if/issue-4201.stderr2
-rw-r--r--tests/ui/expr/malformed_closure/block_instead_of_closure_in_arg.stderr2
-rw-r--r--tests/ui/expr/malformed_closure/missing_block_in_let_binding.stderr2
-rw-r--r--tests/ui/expr/malformed_closure/ruby_style_closure.stderr2
-rw-r--r--tests/ui/expr/malformed_closure/ruby_style_closure_successful_parse.stderr2
-rw-r--r--tests/ui/ext-nonexistent.stderr2
-rw-r--r--tests/ui/extenv/extenv-arg-2-not-string-literal.stderr2
-rw-r--r--tests/ui/extenv/extenv-env-overload.rs9
-rw-r--r--tests/ui/extenv/extenv-env.rs5
-rw-r--r--tests/ui/extenv/extenv-escaped-var.stderr2
-rw-r--r--tests/ui/extenv/extenv-no-args.stderr2
-rw-r--r--tests/ui/extenv/extenv-not-defined-custom.stderr2
-rw-r--r--tests/ui/extenv/extenv-not-defined-default.stderr2
-rw-r--r--tests/ui/extenv/extenv-not-env.rs7
-rw-r--r--tests/ui/extenv/extenv-not-string-literal.stderr2
-rw-r--r--tests/ui/extenv/extenv-too-many-args.stderr2
-rw-r--r--tests/ui/extern-flag/multiple-opts.stderr2
-rw-r--r--tests/ui/extern-flag/no-nounused.stderr2
-rw-r--r--tests/ui/extern-flag/noprelude.stderr2
-rw-r--r--tests/ui/extern-flag/public-and-private.stderr2
-rw-r--r--tests/ui/extern/extern-const.fixed1
-rw-r--r--tests/ui/extern/extern-const.rs1
-rw-r--r--tests/ui/extern/extern-const.stderr4
-rw-r--r--tests/ui/extern/extern-crate-rename.stderr2
-rw-r--r--tests/ui/extern/extern-ffi-fn-with-body.stderr2
-rw-r--r--tests/ui/extern/extern-macro.stderr2
-rw-r--r--tests/ui/extern/extern-main-fn.stderr2
-rw-r--r--tests/ui/extern/extern-main-issue-86110.stderr2
-rw-r--r--tests/ui/extern/extern-type-diag-not-similar.stderr2
-rw-r--r--tests/ui/extern/extern-types-distinct-types.stderr2
-rw-r--r--tests/ui/extern/extern-types-field-offset.rs33
-rw-r--r--tests/ui/extern/extern-types-field-offset.run.stderr4
-rw-r--r--tests/ui/extern/extern-types-size_of_val.align.run.stderr4
-rw-r--r--tests/ui/extern/extern-types-size_of_val.rs14
-rw-r--r--tests/ui/extern/extern-types-size_of_val.size.run.stderr4
-rw-r--r--tests/ui/extern/extern-with-type-bounds.stderr2
-rw-r--r--tests/ui/extern/extern-wrong-value-type.stderr2
-rw-r--r--tests/ui/extern/issue-116203.rs21
-rw-r--r--tests/ui/extern/issue-116203.stderr46
-rw-r--r--tests/ui/extern/issue-13655.rs2
-rw-r--r--tests/ui/extern/issue-28324.mir.stderr2
-rw-r--r--tests/ui/extern/issue-28324.thir.stderr2
-rw-r--r--tests/ui/extern/issue-36122-accessing-externed-dst.stderr2
-rw-r--r--tests/ui/extoption_env-no-args.stderr2
-rw-r--r--tests/ui/extoption_env-not-string-literal.stderr2
-rw-r--r--tests/ui/extoption_env-too-many-args.stderr2
-rw-r--r--tests/ui/fail-simple.stderr2
-rw-r--r--tests/ui/feature-gates/allow-features.stderr2
-rw-r--r--tests/ui/feature-gates/doc-rust-logo.stderr2
-rw-r--r--tests/ui/feature-gates/env-flag.rs3
-rw-r--r--tests/ui/feature-gates/env-flag.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-abi_unadjusted.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-adt_const_params.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-alloc-error-handler.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-allocator_internals.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-allow-internal-unsafe-nested-macro.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-allow-internal-unstable.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-asm_experimental_arch.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-asm_unwind.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-assoc-type-defaults.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-associated_const_equality.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-box_patterns.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-builtin_syntax.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-c_variadic.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-cfg-relocation-model.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-cfg-target-thread-local.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-cfg_overflow_checks.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-cfg_sanitize.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-cfi_encoding.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-check-cfg.rs2
-rw-r--r--tests/ui/feature-gates/feature-gate-collapse_debuginfo.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-compiler-builtins.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-concat_bytes.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-custom_mir.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-decl_macro.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-dispatch-from-dyn-cell.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-doc_cfg.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-doc_masked.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-doc_notable_trait.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-exclusive-range-pattern.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-exhaustive-patterns.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-extern_absolute_paths.stderr12
-rw-r--r--tests/ui/feature-gates/feature-gate-extern_prelude.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-extern_types.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-feature-gate.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-ffi_const.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-ffi_pure.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-ffi_returns_twice.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-fn_align.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-fn_delegation.rs3
-rw-r--r--tests/ui/feature-gates/feature-gate-fn_delegation.stderr13
-rw-r--r--tests/ui/feature-gates/feature-gate-format_args_nl.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-fundamental.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-gen_blocks.e2024.stderr32
-rw-r--r--tests/ui/feature-gates/feature-gate-gen_blocks.none.stderr14
-rw-r--r--tests/ui/feature-gates/feature-gate-gen_blocks.rs15
-rw-r--r--tests/ui/feature-gates/feature-gate-generic_associated_types_extended.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-imported_main.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-inherent_associated_types.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-inline_const.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-inline_const_pat.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-large-assignments.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-lifetime-capture-rules-2024.rs6
-rw-r--r--tests/ui/feature-gates/feature-gate-lifetime-capture-rules-2024.stderr18
-rw-r--r--tests/ui/feature-gates/feature-gate-link-arg-attribute.rs5
-rw-r--r--tests/ui/feature-gates/feature-gate-link-arg-attribute.stderr12
-rw-r--r--tests/ui/feature-gates/feature-gate-link_cfg.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-link_llvm_intrinsics.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-linkage.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-log_syntax.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-log_syntax2.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-marker_trait_attr.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-may-dangle.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-native_link_modifiers_as_needed.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-needs-allocator.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-negative_bounds.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-never_patterns.rs74
-rw-r--r--tests/ui/feature-gates/feature-gate-never_patterns.stderr117
-rw-r--r--tests/ui/feature-gates/feature-gate-no_core.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-no_sanitize.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-non_lifetime_binders.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-overlapping_marker_traits.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-prelude_import.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-proc_macro_byte_character.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-profiler-runtime.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-register_tool.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-repr128.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-return_type_notation.cfg.stderr13
-rw-r--r--tests/ui/feature-gates/feature-gate-return_type_notation.rs2
-rw-r--r--tests/ui/feature-gates/feature-gate-rustc-allow-const-fn-unstable.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-rustc_const_unstable.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-simd.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-start.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-stmt_expr_attributes.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-thread_local.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-trace_macros.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-trait-alias.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-trait_upcasting.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-transparent_unions.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-trivial_bounds.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-try_blocks.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-type_ascription.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-unix_sigpipe.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-unsafe_pin_internals.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-unsized_locals.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-unsized_tuple_coercion.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-with_negative_coherence.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gated-feature-in-macro-arg.stderr2
-rw-r--r--tests/ui/feature-gates/issue-49983-see-issue-0.stderr2
-rw-r--r--tests/ui/feature-gates/rustc-private.stderr2
-rw-r--r--tests/ui/feature-gates/unknown-feature.stderr2
-rw-r--r--tests/ui/ffi_const2.stderr2
-rw-r--r--tests/ui/fmt/closing-brace-as-fill.stderr2
-rw-r--r--tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.stderr2
-rw-r--r--tests/ui/fmt/format-raw-string-error.stderr2
-rw-r--r--tests/ui/fmt/ifmt-unimpl.stderr2
-rw-r--r--tests/ui/fmt/ifmt-unknown-trait.stderr2
-rw-r--r--tests/ui/fmt/issue-104142.stderr2
-rw-r--r--tests/ui/fmt/issue-75307.stderr2
-rw-r--r--tests/ui/fmt/issue-86085.stderr2
-rw-r--r--tests/ui/fmt/issue-89173.stderr2
-rw-r--r--tests/ui/fmt/issue-91556.stderr2
-rw-r--r--tests/ui/fmt/send-sync.stderr10
-rw-r--r--tests/ui/fn-in-pat.stderr2
-rw-r--r--tests/ui/fn/bad-main.stderr2
-rw-r--r--tests/ui/fn/fn-bad-block-type.stderr2
-rw-r--r--tests/ui/fn/fn-closure-mutable-capture.stderr2
-rw-r--r--tests/ui/fn/fn-pointer-mismatch.rs12
-rw-r--r--tests/ui/fn/fn-pointer-mismatch.stderr16
-rw-r--r--tests/ui/fn/implied-bounds-unnorm-associated-type-2.stderr2
-rw-r--r--tests/ui/fn/implied-bounds-unnorm-associated-type-4.stderr2
-rw-r--r--tests/ui/fn/implied-bounds-unnorm-associated-type-5.stderr2
-rw-r--r--tests/ui/fn/implied-bounds-unnorm-associated-type.stderr2
-rw-r--r--tests/ui/fn/issue-3044.stderr2
-rw-r--r--tests/ui/fn/issue-3099.stderr2
-rw-r--r--tests/ui/fn/issue-39259.stderr2
-rw-r--r--tests/ui/fn/signature-error-reporting-under-verbose.stderr2
-rw-r--r--tests/ui/for-loop-while/break-while-condition.stderr2
-rw-r--r--tests/ui/for-loop-while/while-prelude-drop.rs3
-rw-r--r--tests/ui/for/for-c-in-str.stderr2
-rw-r--r--tests/ui/for/for-else-err.stderr2
-rw-r--r--tests/ui/for/for-else-let-else-err.stderr2
-rw-r--r--tests/ui/for/for-expn.stderr2
-rw-r--r--tests/ui/for/for-loop-bogosity.stderr2
-rw-r--r--tests/ui/for/for-loop-refutable-pattern-error-message.stderr2
-rw-r--r--tests/ui/for/for-loop-type-error.stderr2
-rw-r--r--tests/ui/for/for-loop-unconstrained-element-type.stderr2
-rw-r--r--tests/ui/for/issue-20605.current.stderr2
-rw-r--r--tests/ui/for/issue-20605.rs4
-rw-r--r--tests/ui/foreign-fn-return-lifetime.fixed8
-rw-r--r--tests/ui/foreign-fn-return-lifetime.rs2
-rw-r--r--tests/ui/foreign-fn-return-lifetime.stderr11
-rw-r--r--tests/ui/foreign/issue-74120-lowering-of-ffi-block-bodies.stderr2
-rw-r--r--tests/ui/foreign/issue-91370-foreign-fn-block-impl.stderr2
-rw-r--r--tests/ui/fully-qualified-type/fully-qualified-type-name1.stderr2
-rw-r--r--tests/ui/fully-qualified-type/fully-qualified-type-name2.stderr2
-rw-r--r--tests/ui/fully-qualified-type/fully-qualified-type-name4.stderr2
-rw-r--r--tests/ui/function-pointer/unsized-ret.stderr2
-rw-r--r--tests/ui/functional-struct-update/functional-struct-update-noncopyable.stderr2
-rw-r--r--tests/ui/functional-struct-update/functional-struct-update-respects-privacy.stderr2
-rw-r--r--tests/ui/future-incompatible-lint-group.stderr2
-rw-r--r--tests/ui/generic-associated-types/assume-gat-normalization-for-nested-goals.stderr2
-rw-r--r--tests/ui/generic-associated-types/bugs/hrtb-implied-1.stderr2
-rw-r--r--tests/ui/generic-associated-types/bugs/hrtb-implied-2.stderr2
-rw-r--r--tests/ui/generic-associated-types/bugs/hrtb-implied-3.stderr2
-rw-r--r--tests/ui/generic-associated-types/bugs/issue-87735.stderr2
-rw-r--r--tests/ui/generic-associated-types/bugs/issue-87755.stderr2
-rw-r--r--tests/ui/generic-associated-types/bugs/issue-87803.stderr2
-rw-r--r--tests/ui/generic-associated-types/bugs/issue-88382.stderr6
-rw-r--r--tests/ui/generic-associated-types/bugs/issue-88460.stderr2
-rw-r--r--tests/ui/generic-associated-types/bugs/issue-88526.stderr2
-rw-r--r--tests/ui/generic-associated-types/bugs/issue-91762.stderr2
-rw-r--r--tests/ui/generic-associated-types/collections-project-default.stderr2
-rw-r--r--tests/ui/generic-associated-types/collectivity-regression.stderr2
-rw-r--r--tests/ui/generic-associated-types/const_params_have_right_type.stderr2
-rw-r--r--tests/ui/generic-associated-types/constraint-assoc-type-suggestion.stderr2
-rw-r--r--tests/ui/generic-associated-types/cross-crate-bounds.stderr2
-rw-r--r--tests/ui/generic-associated-types/empty_generics.stderr2
-rw-r--r--tests/ui/generic-associated-types/extended/lending_iterator.base.stderr2
-rw-r--r--tests/ui/generic-associated-types/extended/lending_iterator_2.base.stderr2
-rw-r--r--tests/ui/generic-associated-types/gat-bounds-not-checked-with-right-substitutions.stderr2
-rw-r--r--tests/ui/generic-associated-types/gat-in-trait-path.base.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-101020.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-102114.current.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-102114.next.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-102114.rs2
-rw-r--r--tests/ui/generic-associated-types/issue-102335-gat.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-47206-where-clause.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-67510-pass.base.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-68641-check-gat-bounds.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-68643-broken-mir.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-68644-codegen-selection.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-68648-2.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-68656-unsized-values.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-70304.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-71176.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-74684-1.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-74684-2.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-76535.extended.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-78671.extended.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-79636-1.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-79636-2.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-80433.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-81712-cyclic-traits.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-81862.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-87258_a.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-87258_b.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-87429-associated-type-default.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-87429-specialization.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-88287.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-88360.stderr6
-rw-r--r--tests/ui/generic-associated-types/issue-88595.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-90014-tait.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-90014-tait2.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-90014.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-91139.migrate.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-91883.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-92033.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-92096.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-95305.stderr2
-rw-r--r--tests/ui/generic-associated-types/method-unsatisfied-assoc-type-predicate.stderr2
-rw-r--r--tests/ui/generic-associated-types/mismatched-where-clause-regions.stderr2
-rw-r--r--tests/ui/generic-associated-types/missing-item-sugg.stderr2
-rw-r--r--tests/ui/generic-associated-types/missing-where-clause-on-trait.stderr2
-rw-r--r--tests/ui/generic-associated-types/missing_lifetime_const.stderr2
-rw-r--r--tests/ui/generic-associated-types/multiple-type-params-with-unmet-bounds.stderr2
-rw-r--r--tests/ui/generic-associated-types/own-bound-span.stderr2
-rw-r--r--tests/ui/generic-associated-types/parse/trait-path-expected-token.stderr6
-rw-r--r--tests/ui/generic-associated-types/parse/trait-path-expressions.stderr4
-rw-r--r--tests/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr4
-rw-r--r--tests/ui/generic-associated-types/parse/trait-path-segments.stderr12
-rw-r--r--tests/ui/generic-associated-types/parse/trait-path-types.stderr12
-rw-r--r--tests/ui/generic-associated-types/projection-bound-cycle-generic.stderr2
-rw-r--r--tests/ui/generic-associated-types/projection-bound-cycle.stderr2
-rw-r--r--tests/ui/generic-associated-types/trait-objects.base.stderr2
-rw-r--r--tests/ui/generic-associated-types/trait-objects.extended.stderr2
-rw-r--r--tests/ui/generic-const-items/const-trait-impl.rs4
-rw-r--r--tests/ui/generic-const-items/const-trait-impl.stderr8
-rw-r--r--tests/ui/generic-const-items/evaluatable-bounds.unconstrained.stderr2
-rw-r--r--tests/ui/generic-const-items/parameter-defaults.stderr2
-rw-r--r--tests/ui/generic-const-items/reference-outlives-referent.stderr2
-rw-r--r--tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr2
-rw-r--r--tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.stderr2
-rw-r--r--tests/ui/generic-const-items/unsatisfied-evaluatable-bounds.stderr2
-rw-r--r--tests/ui/generics/generic-extern.stderr2
-rw-r--r--tests/ui/generics/generic-function-item-where-type.stderr2
-rw-r--r--tests/ui/generics/generic-impl-less-params-with-defaults.stderr2
-rw-r--r--tests/ui/generics/generic-impl-more-params-with-defaults.stderr2
-rw-r--r--tests/ui/generics/generic-lifetime-trait-impl.stderr2
-rw-r--r--tests/ui/generics/generic-type-less-params-with-defaults.stderr2
-rw-r--r--tests/ui/generics/generic-type-more-params-with-defaults.stderr2
-rw-r--r--tests/ui/generics/generic-type-params-forward-mention.stderr2
-rw-r--r--tests/ui/generics/issue-59508-1.stderr2
-rw-r--r--tests/ui/generics/issue-59508.stderr2
-rw-r--r--tests/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr2
-rw-r--r--tests/ui/generics/issue-79605.stderr2
-rw-r--r--tests/ui/generics/issue-80512-param-reordering-with-defaults.stderr2
-rw-r--r--tests/ui/generics/issue-83556.stderr2
-rw-r--r--tests/ui/generics/issue-95208-ignore-qself.stderr2
-rw-r--r--tests/ui/generics/issue-95208.stderr2
-rw-r--r--tests/ui/generics/issue-98432.stderr2
-rw-r--r--tests/ui/generics/param-in-ct-in-ty-param-default.stderr4
-rw-r--r--tests/ui/generics/single-colon-path-not-const-generics.stderr2
-rw-r--r--tests/ui/generics/slightly-nice-generic-literal-messages.stderr2
-rw-r--r--tests/ui/generics/unclosed-generics-in-impl-def.rs2
-rw-r--r--tests/ui/generics/unclosed-generics-in-impl-def.stderr13
-rw-r--r--tests/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision.stderr2
-rw-r--r--tests/ui/half-open-range-patterns/feature-gate-half-open-range-patterns-in-slices.stderr2
-rw-r--r--tests/ui/half-open-range-patterns/half-open-range-pats-inclusive-match-arrow.stderr2
-rw-r--r--tests/ui/half-open-range-patterns/pat-tuple-5.stderr2
-rw-r--r--tests/ui/half-open-range-patterns/range_pat_interactions1.rs2
-rw-r--r--tests/ui/half-open-range-patterns/range_pat_interactions1.stderr4
-rw-r--r--tests/ui/half-open-range-patterns/range_pat_interactions2.rs2
-rw-r--r--tests/ui/half-open-range-patterns/range_pat_interactions2.stderr4
-rw-r--r--tests/ui/half-open-range-patterns/slice_pattern_syntax_problem0.stderr2
-rw-r--r--tests/ui/hashmap/hashmap-index-mut.stderr2
-rw-r--r--tests/ui/hashmap/hashmap-iter-value-lifetime.stderr2
-rw-r--r--tests/ui/hashmap/hashmap-lifetimes.stderr2
-rw-r--r--tests/ui/higher-ranked/higher-ranked-lifetime-error.rs14
-rw-r--r--tests/ui/higher-ranked/higher-ranked-lifetime-error.stderr12
-rw-r--r--tests/ui/higher-ranked/leak-check-in-selection.rs2
-rw-r--r--tests/ui/higher-ranked/subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr6
-rw-r--r--tests/ui/higher-ranked/subtype/hr-subtype.bound_a_vs_free_x.stderr6
-rw-r--r--tests/ui/higher-ranked/subtype/hr-subtype.free_x_vs_free_y.stderr2
-rw-r--r--tests/ui/higher-ranked/subtype/placeholder-pattern-fail.stderr2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/due-to-where-clause.stderr2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/fn-ptr.classic.stderr2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/fn-ptr.rs2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/future.rs2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/hang-on-deeply-nested-dyn.stderr2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/hrtb-cache-issue-54302.stderr2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/hrtb-debruijn-in-receiver.stderr2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/hrtb-exists-forall-fn.stderr6
-rw-r--r--tests/ui/higher-ranked/trait-bounds/hrtb-exists-forall-trait-contravariant.stderr2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/hrtb-exists-forall-trait-invariant.stderr2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits-transitive.stderr2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/hrtb-identity-fn-borrows.stderr2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/hrtb-perfect-forwarding.polonius.stderr2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/issue-46989.stderr2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/issue-58451.stderr2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/issue-95230.next.stderr2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/issue-95230.rs2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-3.stderr2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-71955.stderr16
-rw-r--r--tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90950.stderr2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution.stderr2
-rw-r--r--tests/ui/hygiene/arguments.stderr2
-rw-r--r--tests/ui/hygiene/cross-crate-define-and-use.rs1
-rw-r--r--tests/ui/hygiene/cross-crate-glob-hygiene.stderr2
-rw-r--r--tests/ui/hygiene/cross-crate-name-hiding-2.stderr2
-rw-r--r--tests/ui/hygiene/cross-crate-name-hiding.stderr2
-rw-r--r--tests/ui/hygiene/cross-crate-redefine.stderr2
-rw-r--r--tests/ui/hygiene/expansion-info-reset.stderr2
-rw-r--r--tests/ui/hygiene/extern-prelude-from-opaque-fail-2018.stderr2
-rw-r--r--tests/ui/hygiene/fields-definition.stderr2
-rw-r--r--tests/ui/hygiene/fields-numeric-borrowck.stderr2
-rw-r--r--tests/ui/hygiene/for-loop.stderr2
-rw-r--r--tests/ui/hygiene/hygienic-label-1.stderr2
-rw-r--r--tests/ui/hygiene/hygienic-label-2.stderr2
-rw-r--r--tests/ui/hygiene/hygienic-label-3.stderr2
-rw-r--r--tests/ui/hygiene/hygienic-label-4.stderr2
-rw-r--r--tests/ui/hygiene/impl_items-2.stderr2
-rw-r--r--tests/ui/hygiene/impl_items.stderr2
-rw-r--r--tests/ui/hygiene/intercrate.stderr2
-rw-r--r--tests/ui/hygiene/missing-self-diag.stderr2
-rw-r--r--tests/ui/hygiene/nested_macro_privacy.stderr2
-rw-r--r--tests/ui/hygiene/no_implicit_prelude-2018.stderr2
-rw-r--r--tests/ui/hygiene/panic-location.run.stderr2
-rw-r--r--tests/ui/hygiene/pattern-macro.stderr2
-rw-r--r--tests/ui/hygiene/privacy-early.stderr2
-rw-r--r--tests/ui/hygiene/privacy.stderr2
-rw-r--r--tests/ui/hygiene/trait_items.stderr2
-rw-r--r--tests/ui/hygiene/unpretty-debug.stdout2
-rw-r--r--tests/ui/illegal-sized-bound/mutability-mismatch-arg.stderr2
-rw-r--r--tests/ui/illegal-ufcs-drop.stderr2
-rw-r--r--tests/ui/impl-header-lifetime-elision/dyn-trait.stderr2
-rw-r--r--tests/ui/impl-header-lifetime-elision/path-elided.stderr2
-rw-r--r--tests/ui/impl-header-lifetime-elision/trait-elided.stderr2
-rw-r--r--tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.stderr2
-rw-r--r--tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.stderr2
-rw-r--r--tests/ui/impl-trait/alias-liveness/tait-hidden-erased-unsoundness.stderr2
-rw-r--r--tests/ui/impl-trait/arg-position-impl-trait-too-long.stderr2
-rw-r--r--tests/ui/impl-trait/auto-trait-coherence.next.stderr2
-rw-r--r--tests/ui/impl-trait/auto-trait-coherence.old.stderr2
-rw-r--r--tests/ui/impl-trait/auto-trait-coherence.rs2
-rw-r--r--tests/ui/impl-trait/auto-trait-leak.stderr2
-rw-r--r--tests/ui/impl-trait/autoderef.rs2
-rw-r--r--tests/ui/impl-trait/coherence-treats-tait-ambig.current.stderr2
-rw-r--r--tests/ui/impl-trait/coherence-treats-tait-ambig.stderr2
-rw-r--r--tests/ui/impl-trait/diagnostics/fully-qualified-path-impl-trait.stderr2
-rw-r--r--tests/ui/impl-trait/does-not-live-long-enough.stderr2
-rw-r--r--tests/ui/impl-trait/dont-suggest-box-on-empty-else-arm.stderr2
-rw-r--r--tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr4
-rw-r--r--tests/ui/impl-trait/equality-in-canonical-query.clone.stderr2
-rw-r--r--tests/ui/impl-trait/erased-regions-in-hidden-ty.current.stderr2
-rw-r--r--tests/ui/impl-trait/erased-regions-in-hidden-ty.next.stderr2
-rw-r--r--tests/ui/impl-trait/erased-regions-in-hidden-ty.rs2
-rw-r--r--tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args-for-impl.stderr2
-rw-r--r--tests/ui/impl-trait/explicit-generic-args-with-impl-trait/not-enough-args.stderr2
-rw-r--r--tests/ui/impl-trait/extra-item.stderr2
-rw-r--r--tests/ui/impl-trait/fallback_inference.stderr2
-rw-r--r--tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr2
-rw-r--r--tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr2
-rw-r--r--tests/ui/impl-trait/impl-fn-hrtb-bounds-2.stderr2
-rw-r--r--tests/ui/impl-trait/impl-fn-hrtb-bounds.stderr2
-rw-r--r--tests/ui/impl-trait/impl-generic-mismatch-ab.stderr2
-rw-r--r--tests/ui/impl-trait/impl-trait-in-macro.stderr2
-rw-r--r--tests/ui/impl-trait/implicit-capture-late.rs14
-rw-r--r--tests/ui/impl-trait/implicit-capture-late.stderr9
-rw-r--r--tests/ui/impl-trait/in-assoc-type.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/async-and-ret-ref.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/bad-item-bound-within-rpitit.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/check-wf-on-non-defaulted-rpitit.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/deep-match.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/default-body-type-err-2.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/default-body-type-err.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/doesnt-satisfy.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/generics-mismatch.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/issue-102571.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/method-signature-matches.lt.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/method-signature-matches.mismatch.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/method-signature-matches.mismatch_async.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/method-signature-matches.too_few.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/method-signature-matches.too_many.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/missing-lt-outlives-in-rpitit-114274.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/object-safety-sized.rs2
-rw-r--r--tests/ui/impl-trait/in-trait/opaque-in-impl-is-opaque.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/opaque-variances.rs2
-rw-r--r--tests/ui/impl-trait/in-trait/placeholder-implied-bounds.rs14
-rw-r--r--tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/rpitit-hidden-types-self-implied-wf-via-param.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/rpitit-hidden-types-self-implied-wf.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/rpitit-shadowed-by-missing-adt.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/sibling-function-constraint.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/signature-mismatch.failure.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/specialization-broken.stderr4
-rw-r--r--tests/ui/impl-trait/in-trait/suggest-missing-item.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/trait-more-generics-than-impl.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/unconstrained-lt.stderr2
-rw-r--r--tests/ui/impl-trait/issue-100075-2.stderr2
-rw-r--r--tests/ui/impl-trait/issue-100075.stderr2
-rw-r--r--tests/ui/impl-trait/issue-103181-1.current.stderr2
-rw-r--r--tests/ui/impl-trait/issue-103181-1.next.stderr2
-rw-r--r--tests/ui/impl-trait/issue-103181-1.rs2
-rw-r--r--tests/ui/impl-trait/issue-103181-2.stderr2
-rw-r--r--tests/ui/impl-trait/issue-35668.stderr2
-rw-r--r--tests/ui/impl-trait/issue-54966.stderr2
-rw-r--r--tests/ui/impl-trait/issue-55872-3.stderr2
-rw-r--r--tests/ui/impl-trait/issue-55872.stderr2
-rw-r--r--tests/ui/impl-trait/issue-86465.stderr2
-rw-r--r--tests/ui/impl-trait/issue-87450.stderr2
-rw-r--r--tests/ui/impl-trait/issue-99914.stderr2
-rw-r--r--tests/ui/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.stderr2
-rw-r--r--tests/ui/impl-trait/issues/issue-54600.stderr2
-rw-r--r--tests/ui/impl-trait/issues/issue-54840.stderr2
-rw-r--r--tests/ui/impl-trait/issues/issue-54895.stderr2
-rw-r--r--tests/ui/impl-trait/issues/issue-57979-deeply-nested-impl-trait-in-assoc-proj.stderr2
-rw-r--r--tests/ui/impl-trait/issues/issue-57979-impl-trait-in-path.stderr2
-rw-r--r--tests/ui/impl-trait/issues/issue-57979-nested-impl-trait-in-assoc-proj.stderr2
-rw-r--r--tests/ui/impl-trait/issues/issue-58504.stderr2
-rw-r--r--tests/ui/impl-trait/issues/issue-67830.stderr2
-rw-r--r--tests/ui/impl-trait/issues/issue-70877.stderr2
-rw-r--r--tests/ui/impl-trait/issues/issue-70971.stderr2
-rw-r--r--tests/ui/impl-trait/issues/issue-82139.stderr2
-rw-r--r--tests/ui/impl-trait/issues/issue-83919.stderr2
-rw-r--r--tests/ui/impl-trait/issues/issue-84073.stderr2
-rw-r--r--tests/ui/impl-trait/issues/issue-84919.stderr2
-rw-r--r--tests/ui/impl-trait/issues/issue-86642.stderr2
-rw-r--r--tests/ui/impl-trait/issues/issue-87295.stderr2
-rw-r--r--tests/ui/impl-trait/issues/issue-87340.stderr2
-rw-r--r--tests/ui/impl-trait/issues/issue-88236.stderr2
-rw-r--r--tests/ui/impl-trait/issues/issue-92305.stderr2
-rw-r--r--tests/ui/impl-trait/issues/issue-99348-impl-compatibility.stderr2
-rw-r--r--tests/ui/impl-trait/method-suggestion-no-duplication.stderr2
-rw-r--r--tests/ui/impl-trait/multiple-defining-usages-in-body.stderr2
-rw-r--r--tests/ui/impl-trait/multiple-lifetimes/error-handling-2.stderr2
-rw-r--r--tests/ui/impl-trait/multiple-lifetimes/error-handling.polonius.stderr2
-rw-r--r--tests/ui/impl-trait/multiple-lifetimes/error-handling.stderr2
-rw-r--r--tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.stderr2
-rw-r--r--tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.stderr2
-rw-r--r--tests/ui/impl-trait/negative-reasoning.stderr2
-rw-r--r--tests/ui/impl-trait/nested-return-type4.stderr2
-rw-r--r--tests/ui/impl-trait/nested-rpit-hrtb-2.stderr2
-rw-r--r--tests/ui/impl-trait/no-trait.stderr2
-rw-r--r--tests/ui/impl-trait/normalize-tait-in-const.stderr2
-rw-r--r--tests/ui/impl-trait/opaque-cast-field-access-in-future.stderr2
-rw-r--r--tests/ui/impl-trait/projection-mismatch-in-impl-where-clause.stderr2
-rw-r--r--tests/ui/impl-trait/recursive-coroutine.current.stderr (renamed from tests/ui/impl-trait/recursive-coroutine.stderr)4
-rw-r--r--tests/ui/impl-trait/recursive-coroutine.next.stderr12
-rw-r--r--tests/ui/impl-trait/recursive-coroutine.rs2
-rw-r--r--tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr8
-rw-r--r--tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration.stderr2
-rw-r--r--tests/ui/impl-trait/region-escape-via-bound.stderr2
-rw-r--r--tests/ui/impl-trait/reveal-during-codegen.rs2
-rw-r--r--tests/ui/impl-trait/rpit-not-sized.stderr2
-rw-r--r--tests/ui/impl-trait/suggest-calling-rpit-closure.stderr2
-rw-r--r--tests/ui/impl-trait/two_tait_defining_each_other.current.stderr (renamed from tests/ui/impl-trait/two_tait_defining_each_other.stderr)8
-rw-r--r--tests/ui/impl-trait/two_tait_defining_each_other.rs6
-rw-r--r--tests/ui/impl-trait/two_tait_defining_each_other2.current.stderr (renamed from tests/ui/impl-trait/two_tait_defining_each_other2.stderr)8
-rw-r--r--tests/ui/impl-trait/two_tait_defining_each_other2.next.stderr9
-rw-r--r--tests/ui/impl-trait/two_tait_defining_each_other2.rs7
-rw-r--r--tests/ui/impl-trait/two_tait_defining_each_other3.current.stderr (renamed from tests/ui/impl-trait/two_tait_defining_each_other3.stderr)8
-rw-r--r--tests/ui/impl-trait/two_tait_defining_each_other3.rs5
-rw-r--r--tests/ui/impl-trait/type-arg-mismatch-due-to-impl-trait.stderr2
-rw-r--r--tests/ui/impl-trait/type_parameters_captured.stderr2
-rw-r--r--tests/ui/impl-trait/unactionable_diagnostic.stderr2
-rw-r--r--tests/ui/impl-trait/universal-mismatched-type.stderr2
-rw-r--r--tests/ui/impl-trait/universal-two-impl-traits.stderr2
-rw-r--r--tests/ui/impl-trait/universal_wrong_hrtb.stderr2
-rw-r--r--tests/ui/impl-trait/variance.e2024.stderr26
-rw-r--r--tests/ui/impl-trait/variance.new.stderr26
-rw-r--r--tests/ui/impl-trait/variance.old.stderr (renamed from tests/ui/impl-trait/variance.stderr)8
-rw-r--r--tests/ui/impl-trait/variance.rs16
-rw-r--r--tests/ui/impl-trait/where-allowed-2.stderr2
-rw-r--r--tests/ui/impl-unused-rps-in-assoc-type.stderr2
-rw-r--r--tests/ui/implicit-method-bind.stderr2
-rw-r--r--tests/ui/implied-bounds/assoc-ty-wf-used-to-get-assoc-ty.stderr2
-rw-r--r--tests/ui/implied-bounds/auxiliary/bevy_ecs.rs18
-rw-r--r--tests/ui/implied-bounds/bevy_world_query.rs11
-rw-r--r--tests/ui/implied-bounds/from-trait-impl.rs24
-rw-r--r--tests/ui/implied-bounds/gluon_salsa.rs31
-rw-r--r--tests/ui/implied-bounds/hrlt-implied-trait-bounds-guard.rs2
-rw-r--r--tests/ui/implied-bounds/impl-header-unnormalized-types.stderr2
-rw-r--r--tests/ui/implied-bounds/impl-implied-bounds-compatibility-unnormalized.rs5
-rw-r--r--tests/ui/implied-bounds/impl-implied-bounds-compatibility-unnormalized.stderr43
-rw-r--r--tests/ui/implied-bounds/impl-implied-bounds-compatibility.rs5
-rw-r--r--tests/ui/implied-bounds/impl-implied-bounds-compatibility.stderr45
-rw-r--r--tests/ui/implied-bounds/issue-100690.stderr6
-rw-r--r--tests/ui/implied-bounds/issue-110161.stderr2
-rw-r--r--tests/ui/implied-bounds/normalization-nested.lifetime.stderr29
-rw-r--r--tests/ui/implied-bounds/normalization-nested.rs4
-rw-r--r--tests/ui/implied-bounds/normalization-placeholder-leak.fail.stderr15
-rw-r--r--tests/ui/implied-bounds/normalization-placeholder-leak.rs56
-rw-r--r--tests/ui/implied-bounds/normalization-preserve-equality.borrowck.stderr28
-rw-r--r--tests/ui/implied-bounds/normalization-preserve-equality.rs28
-rw-r--r--tests/ui/implied-bounds/references-err.stderr2
-rw-r--r--tests/ui/implied-bounds/sod_service_chain.rs37
-rw-r--r--tests/ui/imports/ambiguous-11.stderr2
-rw-r--r--tests/ui/imports/ambiguous-7.stderr2
-rw-r--r--tests/ui/imports/ambiguous-8.stderr2
-rw-r--r--tests/ui/imports/double-import.stderr2
-rw-r--r--tests/ui/imports/extern-crate-used.stderr2
-rw-r--r--tests/ui/imports/extern-with-ambiguous-1.stderr2
-rw-r--r--tests/ui/imports/import-crate-var.stderr2
-rw-r--r--tests/ui/imports/import-from-missing.stderr2
-rw-r--r--tests/ui/imports/import-glob-0.stderr2
-rw-r--r--tests/ui/imports/import-glob-circular.stderr2
-rw-r--r--tests/ui/imports/import-loop-2.stderr2
-rw-r--r--tests/ui/imports/import-loop.stderr2
-rw-r--r--tests/ui/imports/import-prefix-macro-1.stderr2
-rw-r--r--tests/ui/imports/import-prefix-macro-2.stderr2
-rw-r--r--tests/ui/imports/import-trait-method.stderr2
-rw-r--r--tests/ui/imports/import2.stderr2
-rw-r--r--tests/ui/imports/import3.stderr2
-rw-r--r--tests/ui/imports/import4.stderr2
-rw-r--r--tests/ui/imports/issue-109148.stderr2
-rw-r--r--tests/ui/imports/issue-109343.stderr2
-rw-r--r--tests/ui/imports/issue-113953.stderr2
-rw-r--r--tests/ui/imports/issue-13404.stderr2
-rw-r--r--tests/ui/imports/issue-1697.stderr2
-rw-r--r--tests/ui/imports/issue-28388-1.stderr2
-rw-r--r--tests/ui/imports/issue-28388-2.stderr2
-rw-r--r--tests/ui/imports/issue-2937.stderr2
-rw-r--r--tests/ui/imports/issue-32354-suggest-import-rename.stderr2
-rw-r--r--tests/ui/imports/issue-32833.stderr2
-rw-r--r--tests/ui/imports/issue-36881.stderr2
-rw-r--r--tests/ui/imports/issue-4366.stderr2
-rw-r--r--tests/ui/imports/issue-45799-bad-extern-crate-rename-suggestion-formatting.stderr2
-rw-r--r--tests/ui/imports/issue-45829/import-twice.stderr2
-rw-r--r--tests/ui/imports/issue-45829/issue-45829.stderr2
-rw-r--r--tests/ui/imports/issue-45829/rename-extern-vs-use.stderr2
-rw-r--r--tests/ui/imports/issue-45829/rename-extern-with-tab.stderr2
-rw-r--r--tests/ui/imports/issue-45829/rename-extern.stderr2
-rw-r--r--tests/ui/imports/issue-45829/rename-use-vs-extern.stderr2
-rw-r--r--tests/ui/imports/issue-45829/rename-use-with-tabs.stderr2
-rw-r--r--tests/ui/imports/issue-45829/rename-with-path.stderr2
-rw-r--r--tests/ui/imports/issue-45829/rename.stderr2
-rw-r--r--tests/ui/imports/issue-47623.stderr2
-rw-r--r--tests/ui/imports/issue-53512.stderr2
-rw-r--r--tests/ui/imports/issue-55884-1.stderr2
-rw-r--r--tests/ui/imports/issue-55884-2.stderr12
-rw-r--r--tests/ui/imports/issue-57015.stderr2
-rw-r--r--tests/ui/imports/issue-57539.stderr2
-rw-r--r--tests/ui/imports/issue-81413.stderr2
-rw-r--r--tests/ui/imports/issue-85992.stderr2
-rw-r--r--tests/ui/imports/issue-8640.stderr2
-rw-r--r--tests/ui/imports/issue-99695-b.stderr2
-rw-r--r--tests/ui/imports/issue-99695.stderr2
-rw-r--r--tests/ui/imports/no-pub-reexports-but-used.rs15
-rw-r--r--tests/ui/imports/no-pub-reexports-but-used.stderr20
-rw-r--r--tests/ui/imports/no-std-inject.stderr2
-rw-r--r--tests/ui/imports/overlapping_pub_trait.stderr2
-rw-r--r--tests/ui/imports/private-std-reexport-suggest-public.fixed9
-rw-r--r--tests/ui/imports/private-std-reexport-suggest-public.rs9
-rw-r--r--tests/ui/imports/private-std-reexport-suggest-public.stderr23
-rw-r--r--tests/ui/imports/reexports.rs2
-rw-r--r--tests/ui/imports/reexports.stderr9
-rw-r--r--tests/ui/imports/resolve-other-libc.stderr2
-rw-r--r--tests/ui/imports/rfc-1560-warning-cycle.stderr2
-rw-r--r--tests/ui/imports/unnamed_pub_trait.stderr2
-rw-r--r--tests/ui/imports/unused-import-issue-87973.stderr2
-rw-r--r--tests/ui/imports/unused.stderr2
-rw-r--r--tests/ui/indexing/index-bot.stderr2
-rw-r--r--tests/ui/indexing/index-help.stderr2
-rw-r--r--tests/ui/indexing/index_message.stderr2
-rw-r--r--tests/ui/indexing/indexing-requires-a-uint.stderr2
-rw-r--r--tests/ui/indexing/point-at-index-for-obligation-failure.rs7
-rw-r--r--tests/ui/indexing/point-at-index-for-obligation-failure.stderr13
-rw-r--r--tests/ui/inference/ambiguous_type_parameter.stderr2
-rw-r--r--tests/ui/inference/cannot-infer-async.stderr2
-rw-r--r--tests/ui/inference/cannot-infer-closure-circular.stderr2
-rw-r--r--tests/ui/inference/cannot-infer-closure.stderr2
-rw-r--r--tests/ui/inference/cannot-infer-partial-try-return.stderr2
-rw-r--r--tests/ui/inference/inference_unstable_featured.stderr2
-rw-r--r--tests/ui/inference/inference_unstable_forced.stderr2
-rw-r--r--tests/ui/inference/issue-103587.stderr6
-rw-r--r--tests/ui/inference/issue-104649.stderr2
-rw-r--r--tests/ui/inference/issue-113354.stderr2
-rw-r--r--tests/ui/inference/issue-70082.stderr2
-rw-r--r--tests/ui/inference/issue-71309.stderr2
-rw-r--r--tests/ui/inference/issue-71584.stderr2
-rw-r--r--tests/ui/inference/issue-71732.stderr2
-rw-r--r--tests/ui/inference/issue-80816.stderr2
-rw-r--r--tests/ui/inference/issue-83606.stderr2
-rw-r--r--tests/ui/inference/issue-86162-1.stderr2
-rw-r--r--tests/ui/inference/issue-86162-2.stderr2
-rw-r--r--tests/ui/inference/multiple-impl-apply.stderr2
-rw-r--r--tests/ui/inference/need_type_info/concrete-impl.stderr2
-rw-r--r--tests/ui/inference/need_type_info/do-not-suggest-generic-arguments-for-turbofish.stderr2
-rw-r--r--tests/ui/inference/need_type_info/expr-struct-type-relative-enum.stderr2
-rw-r--r--tests/ui/inference/need_type_info/expr-struct-type-relative-gat.stderr2
-rw-r--r--tests/ui/inference/need_type_info/expr-struct-type-relative.stderr2
-rw-r--r--tests/ui/inference/need_type_info/infer-var-for-self-param.stderr2
-rw-r--r--tests/ui/inference/need_type_info/issue-103053.stderr2
-rw-r--r--tests/ui/inference/need_type_info/issue-107745-avoid-expr-from-macro-expansion.stderr2
-rw-r--r--tests/ui/inference/need_type_info/issue-113264-incorrect-impl-trait-in-path-suggestion.stderr2
-rw-r--r--tests/ui/inference/need_type_info/self-ty-in-path.stderr2
-rw-r--r--tests/ui/inference/need_type_info/type-alias-indirect.stderr2
-rw-r--r--tests/ui/inference/question-mark-type-infer.stderr2
-rw-r--r--tests/ui/inference/type-infer-generalize-ty-var.rs2
-rw-r--r--tests/ui/infinite/infinite-alias.stderr2
-rw-r--r--tests/ui/infinite/infinite-instantiation.polonius.stderr2
-rw-r--r--tests/ui/infinite/infinite-instantiation.stderr2
-rw-r--r--tests/ui/infinite/infinite-macro-expansion.stderr2
-rw-r--r--tests/ui/infinite/infinite-recursion-const-fn.stderr2
-rw-r--r--tests/ui/infinite/infinite-tag-type-recursion.stderr2
-rw-r--r--tests/ui/infinite/infinite-trait-alias-recursion.stderr2
-rw-r--r--tests/ui/infinite/infinite-type-alias-mutual-recursion.gated.stderr2
-rw-r--r--tests/ui/infinite/infinite-vec-type-recursion.feature.stderr2
-rw-r--r--tests/ui/infinite/infinite-vec-type-recursion.gated.stderr2
-rw-r--r--tests/ui/infinite/issue-41731-infinite-macro-print.stderr8
-rw-r--r--tests/ui/infinite/issue-41731-infinite-macro-println.stderr8
-rw-r--r--tests/ui/inline-const/const-expr-generic-err2.stderr2
-rw-r--r--tests/ui/inline-const/const-expr-lifetime-err.stderr2
-rw-r--r--tests/ui/inline-const/expr-unsafe-err.mir.stderr2
-rw-r--r--tests/ui/inline-const/expr-unsafe-err.thir.stderr2
-rw-r--r--tests/ui/inline-const/expr-with-block-err.stderr2
-rw-r--r--tests/ui/inline-const/pat-match-fndef.stderr2
-rw-r--r--tests/ui/inline-const/promotion.stderr2
-rw-r--r--tests/ui/inline-const/required-const.stderr2
-rw-r--r--tests/ui/inline-disallow-on-variant.stderr2
-rw-r--r--tests/ui/instrument-xray/target-not-supported.stderr2
-rw-r--r--tests/ui/integral-variable-unification-error.stderr2
-rw-r--r--tests/ui/interior-mutability/interior-mutability.stderr2
-rw-r--r--tests/ui/internal-lints/existing_doc_keyword.stderr2
-rw-r--r--tests/ui/internal/internal-unstable-const.stderr2
-rw-r--r--tests/ui/internal/internal-unstable-thread-local.stderr2
-rw-r--r--tests/ui/intrinsics/const-eval-select-bad.stderr36
-rw-r--r--tests/ui/intrinsics/const-eval-select-stability.stderr2
-rw-r--r--tests/ui/intrinsics/issue-28575.mir.stderr2
-rw-r--r--tests/ui/intrinsics/issue-28575.thir.stderr2
-rw-r--r--tests/ui/invalid-compile-flags/branch-protection-missing-pac-ret.BADTARGET.stderr2
-rw-r--r--tests/ui/invalid-compile-flags/fuel.rs11
-rw-r--r--tests/ui/invalid-compile-flags/function-return/requires-x86-or-x86_64.aarch64.stderr4
-rw-r--r--tests/ui/invalid-compile-flags/function-return/requires-x86-or-x86_64.rs20
-rw-r--r--tests/ui/invalid-compile-flags/function-return/thunk-extern-requires-non-large-code-model.large.stderr4
-rw-r--r--tests/ui/invalid-compile-flags/function-return/thunk-extern-requires-non-large-code-model.rs21
-rw-r--r--tests/ui/invalid-compile-flags/invalid-llvm-passes.stderr2
-rw-r--r--tests/ui/invalid-module-declaration/invalid-module-declaration.stderr2
-rw-r--r--tests/ui/invalid-self-argument/bare-fn-start.stderr2
-rw-r--r--tests/ui/invalid-self-argument/bare-fn.stderr2
-rw-r--r--tests/ui/invalid-self-argument/trait-fn.stderr2
-rw-r--r--tests/ui/invalid/invalid-crate-type-macro.stderr2
-rw-r--r--tests/ui/invalid/invalid-debugger-visualizer-target.stderr2
-rw-r--r--tests/ui/invalid/invalid-macro-matcher.stderr2
-rw-r--r--tests/ui/invalid/invalid-no-sanitize.stderr2
-rw-r--r--tests/ui/invalid/invalid-path-in-const.stderr2
-rw-r--r--tests/ui/invalid_crate_type_syntax.stderr2
-rw-r--r--tests/ui/io-checks/non-ice-error-on-worker-io-fail.stderr2
-rw-r--r--tests/ui/issues/issue-10291.stderr2
-rw-r--r--tests/ui/issues/issue-102964.stderr2
-rw-r--r--tests/ui/issues/issue-10465.stderr2
-rw-r--r--tests/ui/issues/issue-10545.stderr2
-rw-r--r--tests/ui/issues/issue-10656.stderr2
-rw-r--r--tests/ui/issues/issue-10764.stderr2
-rw-r--r--tests/ui/issues/issue-11004.stderr6
-rw-r--r--tests/ui/issues/issue-11192.stderr2
-rw-r--r--tests/ui/issues/issue-11374.stderr2
-rw-r--r--tests/ui/issues/issue-11593.stderr2
-rw-r--r--tests/ui/issues/issue-11681.stderr2
-rw-r--r--tests/ui/issues/issue-11692-1.stderr2
-rw-r--r--tests/ui/issues/issue-11692-2.stderr2
-rw-r--r--tests/ui/issues/issue-11844.stderr2
-rw-r--r--tests/ui/issues/issue-12028.stderr2
-rw-r--r--tests/ui/issues/issue-12041.stderr2
-rw-r--r--tests/ui/issues/issue-12127.stderr2
-rw-r--r--tests/ui/issues/issue-12187-1.stderr2
-rw-r--r--tests/ui/issues/issue-12187-2.stderr2
-rw-r--r--tests/ui/issues/issue-12863.stderr2
-rw-r--r--tests/ui/issues/issue-13058.stderr2
-rw-r--r--tests/ui/issues/issue-13167.rs2
-rw-r--r--tests/ui/issues/issue-13407.rs4
-rw-r--r--tests/ui/issues/issue-13407.stderr15
-rw-r--r--tests/ui/issues/issue-13446.stderr2
-rw-r--r--tests/ui/issues/issue-13482-2.stderr2
-rw-r--r--tests/ui/issues/issue-13482.stderr2
-rw-r--r--tests/ui/issues/issue-13497-2.stderr2
-rw-r--r--tests/ui/issues/issue-13497.stderr8
-rw-r--r--tests/ui/issues/issue-1362.stderr2
-rw-r--r--tests/ui/issues/issue-13847.stderr4
-rw-r--r--tests/ui/issues/issue-14091-2.stderr2
-rw-r--r--tests/ui/issues/issue-14091.stderr2
-rw-r--r--tests/ui/issues/issue-14092.stderr2
-rw-r--r--tests/ui/issues/issue-14285.stderr2
-rw-r--r--tests/ui/issues/issue-14366.stderr2
-rw-r--r--tests/ui/issues/issue-1448-2.stderr2
-rw-r--r--tests/ui/issues/issue-14541.stderr2
-rw-r--r--tests/ui/issues/issue-14721.stderr4
-rw-r--r--tests/ui/issues/issue-1476.stderr2
-rw-r--r--tests/ui/issues/issue-14853.stderr2
-rw-r--r--tests/ui/issues/issue-14915.stderr2
-rw-r--r--tests/ui/issues/issue-15034.stderr2
-rw-r--r--tests/ui/issues/issue-15094.stderr2
-rw-r--r--tests/ui/issues/issue-15207.stderr2
-rw-r--r--tests/ui/issues/issue-15381.stderr2
-rw-r--r--tests/ui/issues/issue-15734.rs2
-rw-r--r--tests/ui/issues/issue-15756.stderr2
-rw-r--r--tests/ui/issues/issue-15783.stderr2
-rw-r--r--tests/ui/issues/issue-15896.stderr2
-rw-r--r--tests/ui/issues/issue-15965.stderr2
-rw-r--r--tests/ui/issues/issue-16149.stderr2
-rw-r--r--tests/ui/issues/issue-16250.stderr2
-rw-r--r--tests/ui/issues/issue-16338.stderr2
-rw-r--r--tests/ui/issues/issue-16401.stderr2
-rw-r--r--tests/ui/issues/issue-16562.stderr2
-rw-r--r--tests/ui/issues/issue-16683.stderr2
-rw-r--r--tests/ui/issues/issue-16725.stderr2
-rw-r--r--tests/ui/issues/issue-16939.stderr2
-rw-r--r--tests/ui/issues/issue-16966.stderr2
-rw-r--r--tests/ui/issues/issue-17001.stderr2
-rw-r--r--tests/ui/issues/issue-17033.stderr2
-rw-r--r--tests/ui/issues/issue-17252.stderr2
-rw-r--r--tests/ui/issues/issue-17336.rs3
-rw-r--r--tests/ui/issues/issue-17337.stderr2
-rw-r--r--tests/ui/issues/issue-17373.stderr2
-rw-r--r--tests/ui/issues/issue-17405.stderr2
-rw-r--r--tests/ui/issues/issue-17551.stderr2
-rw-r--r--tests/ui/issues/issue-17651.stderr2
-rw-r--r--tests/ui/issues/issue-17758.stderr2
-rw-r--r--tests/ui/issues/issue-17800.stderr2
-rw-r--r--tests/ui/issues/issue-17904-2.stderr2
-rw-r--r--tests/ui/issues/issue-17905-2.stderr8
-rw-r--r--tests/ui/issues/issue-17933.stderr2
-rw-r--r--tests/ui/issues/issue-17954.stderr2
-rw-r--r--tests/ui/issues/issue-17959.stderr2
-rw-r--r--tests/ui/issues/issue-17994.stderr2
-rw-r--r--tests/ui/issues/issue-18058.stderr2
-rw-r--r--tests/ui/issues/issue-18107.stderr2
-rw-r--r--tests/ui/issues/issue-18159.stderr2
-rw-r--r--tests/ui/issues/issue-18183.stderr2
-rw-r--r--tests/ui/issues/issue-18423.stderr2
-rw-r--r--tests/ui/issues/issue-18446.stderr2
-rw-r--r--tests/ui/issues/issue-18532.stderr2
-rw-r--r--tests/ui/issues/issue-18566.stderr2
-rw-r--r--tests/ui/issues/issue-18611.stderr2
-rw-r--r--tests/ui/issues/issue-18804/main.rs1
-rw-r--r--tests/ui/issues/issue-18819.stderr2
-rw-r--r--tests/ui/issues/issue-18919.stderr2
-rw-r--r--tests/ui/issues/issue-18959.stderr2
-rw-r--r--tests/ui/issues/issue-1900.stderr2
-rw-r--r--tests/ui/issues/issue-19086.stderr2
-rw-r--r--tests/ui/issues/issue-1920-1.stderr2
-rw-r--r--tests/ui/issues/issue-1920-2.stderr2
-rw-r--r--tests/ui/issues/issue-1920-3.stderr2
-rw-r--r--tests/ui/issues/issue-19244-1.stderr4
-rw-r--r--tests/ui/issues/issue-19244-2.stderr4
-rw-r--r--tests/ui/issues/issue-19482.stderr2
-rw-r--r--tests/ui/issues/issue-19521.stderr2
-rw-r--r--tests/ui/issues/issue-1962.stderr2
-rw-r--r--tests/ui/issues/issue-19692.stderr2
-rw-r--r--tests/ui/issues/issue-19734.stderr2
-rw-r--r--tests/ui/issues/issue-19922.stderr2
-rw-r--r--tests/ui/issues/issue-19991.stderr2
-rw-r--r--tests/ui/issues/issue-20162.stderr2
-rw-r--r--tests/ui/issues/issue-20225.stderr12
-rw-r--r--tests/ui/issues/issue-20261.stderr2
-rw-r--r--tests/ui/issues/issue-20313.stderr2
-rw-r--r--tests/ui/issues/issue-20433.stderr2
-rw-r--r--tests/ui/issues/issue-20714.stderr2
-rw-r--r--tests/ui/issues/issue-20772.stderr2
-rw-r--r--tests/ui/issues/issue-20831-debruijn.stderr2
-rw-r--r--tests/ui/issues/issue-20847.rs2
-rw-r--r--tests/ui/issues/issue-20939.stderr2
-rw-r--r--tests/ui/issues/issue-21160.stderr2
-rw-r--r--tests/ui/issues/issue-21174.stderr2
-rw-r--r--tests/ui/issues/issue-21177.stderr2
-rw-r--r--tests/ui/issues/issue-21202.stderr2
-rw-r--r--tests/ui/issues/issue-21332.stderr2
-rw-r--r--tests/ui/issues/issue-21449.stderr2
-rw-r--r--tests/ui/issues/issue-2150.stderr2
-rw-r--r--tests/ui/issues/issue-2151.stderr2
-rw-r--r--tests/ui/issues/issue-21554.stderr2
-rw-r--r--tests/ui/issues/issue-21596.stderr2
-rw-r--r--tests/ui/issues/issue-21763.stderr4
-rw-r--r--tests/ui/issues/issue-21837.stderr2
-rw-r--r--tests/ui/issues/issue-21946.stderr2
-rw-r--r--tests/ui/issues/issue-21974.stderr2
-rw-r--r--tests/ui/issues/issue-22034.stderr2
-rw-r--r--tests/ui/issues/issue-22289.stderr2
-rw-r--r--tests/ui/issues/issue-22312.stderr2
-rw-r--r--tests/ui/issues/issue-22370.stderr2
-rw-r--r--tests/ui/issues/issue-22434.stderr2
-rw-r--r--tests/ui/issues/issue-22468.stderr5
-rw-r--r--tests/ui/issues/issue-22599.stderr2
-rw-r--r--tests/ui/issues/issue-22638.polonius.stderr2
-rw-r--r--tests/ui/issues/issue-22638.rs1
-rw-r--r--tests/ui/issues/issue-22638.stderr6
-rw-r--r--tests/ui/issues/issue-22684.stderr2
-rw-r--r--tests/ui/issues/issue-22706.stderr2
-rw-r--r--tests/ui/issues/issue-2281-part1.stderr2
-rw-r--r--tests/ui/issues/issue-22872.stderr2
-rw-r--r--tests/ui/issues/issue-22874.stderr2
-rw-r--r--tests/ui/issues/issue-22886.stderr2
-rw-r--r--tests/ui/issues/issue-22933-2.stderr2
-rw-r--r--tests/ui/issues/issue-23041.stderr2
-rw-r--r--tests/ui/issues/issue-23046.stderr2
-rw-r--r--tests/ui/issues/issue-23073.stderr2
-rw-r--r--tests/ui/issues/issue-23122-1.stderr2
-rw-r--r--tests/ui/issues/issue-23122-2.stderr2
-rw-r--r--tests/ui/issues/issue-23189.stderr2
-rw-r--r--tests/ui/issues/issue-23217.stderr2
-rw-r--r--tests/ui/issues/issue-23253.stderr4
-rw-r--r--tests/ui/issues/issue-23281.stderr2
-rw-r--r--tests/ui/issues/issue-23302-1.stderr2
-rw-r--r--tests/ui/issues/issue-23302-2.stderr2
-rw-r--r--tests/ui/issues/issue-23302-3.stderr2
-rw-r--r--tests/ui/issues/issue-23477.rs1
-rw-r--r--tests/ui/issues/issue-23543.stderr2
-rw-r--r--tests/ui/issues/issue-23544.stderr2
-rw-r--r--tests/ui/issues/issue-23966.stderr2
-rw-r--r--tests/ui/issues/issue-24013.stderr2
-rw-r--r--tests/ui/issues/issue-24322.stderr6
-rw-r--r--tests/ui/issues/issue-24352.stderr2
-rw-r--r--tests/ui/issues/issue-24357.stderr2
-rw-r--r--tests/ui/issues/issue-24365.stderr6
-rw-r--r--tests/ui/issues/issue-24424.stderr2
-rw-r--r--tests/ui/issues/issue-24687-embed-debuginfo/main.rs1
-rw-r--r--tests/ui/issues/issue-24819.stderr2
-rw-r--r--tests/ui/issues/issue-24945-repeat-dash-opts.rs1
-rw-r--r--tests/ui/issues/issue-25076.stderr2
-rw-r--r--tests/ui/issues/issue-25368.stderr2
-rw-r--r--tests/ui/issues/issue-25386.stderr2
-rw-r--r--tests/ui/issues/issue-2590.stderr2
-rw-r--r--tests/ui/issues/issue-25901.stderr2
-rw-r--r--tests/ui/issues/issue-26056.stderr2
-rw-r--r--tests/ui/issues/issue-26217.stderr2
-rw-r--r--tests/ui/issues/issue-26237.stderr2
-rw-r--r--tests/ui/issues/issue-26484.rs1
-rw-r--r--tests/ui/issues/issue-26619.stderr2
-rw-r--r--tests/ui/issues/issue-26812.stderr2
-rw-r--r--tests/ui/issues/issue-26905.stderr2
-rw-r--r--tests/ui/issues/issue-26948.stderr2
-rw-r--r--tests/ui/issues/issue-27008.stderr2
-rw-r--r--tests/ui/issues/issue-27078.stderr2
-rw-r--r--tests/ui/issues/issue-27340.stderr2
-rw-r--r--tests/ui/issues/issue-27433.stderr2
-rw-r--r--tests/ui/issues/issue-2823.stderr2
-rw-r--r--tests/ui/issues/issue-2848.stderr2
-rw-r--r--tests/ui/issues/issue-2849.stderr2
-rw-r--r--tests/ui/issues/issue-28568.stderr2
-rw-r--r--tests/ui/issues/issue-28586.stderr2
-rw-r--r--tests/ui/issues/issue-28625.stderr2
-rw-r--r--tests/ui/issues/issue-28776.mir.stderr2
-rw-r--r--tests/ui/issues/issue-28776.thir.stderr2
-rw-r--r--tests/ui/issues/issue-28971.stderr2
-rw-r--r--tests/ui/issues/issue-29147.stderr2
-rw-r--r--tests/ui/issues/issue-2951.stderr2
-rw-r--r--tests/ui/issues/issue-29861.stderr2
-rw-r--r--tests/ui/issues/issue-2995.stderr2
-rw-r--r--tests/ui/issues/issue-30007.stderr2
-rw-r--r--tests/ui/issues/issue-30123.stderr2
-rw-r--r--tests/ui/issues/issue-3021-b.stderr2
-rw-r--r--tests/ui/issues/issue-30236.stderr2
-rw-r--r--tests/ui/issues/issue-30589.stderr2
-rw-r--r--tests/ui/issues/issue-31011.stderr4
-rw-r--r--tests/ui/issues/issue-31511.stderr2
-rw-r--r--tests/ui/issues/issue-3154.stderr2
-rw-r--r--tests/ui/issues/issue-31910.stderr2
-rw-r--r--tests/ui/issues/issue-32122-1.stderr2
-rw-r--r--tests/ui/issues/issue-32122-2.stderr2
-rw-r--r--tests/ui/issues/issue-32326.stderr2
-rw-r--r--tests/ui/issues/issue-32377.stderr2
-rw-r--r--tests/ui/issues/issue-32782.stderr2
-rw-r--r--tests/ui/issues/issue-33096.rs1
-rw-r--r--tests/ui/issues/issue-33293.stderr2
-rw-r--r--tests/ui/issues/issue-3344.stderr2
-rw-r--r--tests/ui/issues/issue-33504.stderr2
-rw-r--r--tests/ui/issues/issue-33525.stderr4
-rw-r--r--tests/ui/issues/issue-34047.stderr2
-rw-r--r--tests/ui/issues/issue-34209.stderr2
-rw-r--r--tests/ui/issues/issue-34229.stderr2
-rw-r--r--tests/ui/issues/issue-34334.stderr5
-rw-r--r--tests/ui/issues/issue-34349.stderr2
-rw-r--r--tests/ui/issues/issue-34373.stderr2
-rw-r--r--tests/ui/issues/issue-34569.rs1
-rw-r--r--tests/ui/issues/issue-3477.stderr2
-rw-r--r--tests/ui/issues/issue-35139.stderr2
-rw-r--r--tests/ui/issues/issue-3521-2.stderr2
-rw-r--r--tests/ui/issues/issue-35241.stderr2
-rw-r--r--tests/ui/issues/issue-35570.stderr2
-rw-r--r--tests/ui/issues/issue-35976.unimported.stderr2
-rw-r--r--tests/ui/issues/issue-35988.stderr2
-rw-r--r--tests/ui/issues/issue-36400.stderr2
-rw-r--r--tests/ui/issues/issue-3668-2.stderr2
-rw-r--r--tests/ui/issues/issue-3668.stderr2
-rw-r--r--tests/ui/issues/issue-3680.stderr2
-rw-r--r--tests/ui/issues/issue-36836.stderr2
-rw-r--r--tests/ui/issues/issue-36856.rs1
-rw-r--r--tests/ui/issues/issue-3702-2.stderr2
-rw-r--r--tests/ui/issues/issue-37311-type-length-limit/issue-37311.polonius.stderr2
-rw-r--r--tests/ui/issues/issue-37311-type-length-limit/issue-37311.stderr2
-rw-r--r--tests/ui/issues/issue-37665.stderr2
-rw-r--r--tests/ui/issues/issue-3779.stderr2
-rw-r--r--tests/ui/issues/issue-37884.stderr6
-rw-r--r--tests/ui/issues/issue-38412.stderr2
-rw-r--r--tests/ui/issues/issue-38458.stderr2
-rw-r--r--tests/ui/issues/issue-38919.stderr2
-rw-r--r--tests/ui/issues/issue-38954.stderr2
-rw-r--r--tests/ui/issues/issue-39175.stderr2
-rw-r--r--tests/ui/issues/issue-39211.stderr2
-rw-r--r--tests/ui/issues/issue-39687.stderr2
-rw-r--r--tests/ui/issues/issue-39848.rs2
-rw-r--r--tests/ui/issues/issue-39848.stderr4
-rw-r--r--tests/ui/issues/issue-3993.stderr2
-rw-r--r--tests/ui/issues/issue-39970.stderr2
-rw-r--r--tests/ui/issues/issue-40288.stderr2
-rw-r--r--tests/ui/issues/issue-40402-ref-hints/issue-40402-1.stderr2
-rw-r--r--tests/ui/issues/issue-40402-ref-hints/issue-40402-2.stderr2
-rw-r--r--tests/ui/issues/issue-40510-1.migrate.stderr2
-rw-r--r--tests/ui/issues/issue-40510-1.stderr2
-rw-r--r--tests/ui/issues/issue-40510-3.migrate.stderr2
-rw-r--r--tests/ui/issues/issue-40510-3.stderr2
-rw-r--r--tests/ui/issues/issue-40610.stderr2
-rw-r--r--tests/ui/issues/issue-40749.stderr2
-rw-r--r--tests/ui/issues/issue-40861.stderr2
-rw-r--r--tests/ui/issues/issue-41139.stderr2
-rw-r--r--tests/ui/issues/issue-41229-ref-str.stderr2
-rw-r--r--tests/ui/issues/issue-41549.stderr2
-rw-r--r--tests/ui/issues/issue-41652/issue-41652.stderr2
-rw-r--r--tests/ui/issues/issue-41726.stderr2
-rw-r--r--tests/ui/issues/issue-41742.stderr2
-rw-r--r--tests/ui/issues/issue-41880.stderr2
-rw-r--r--tests/ui/issues/issue-42106.stderr2
-rw-r--r--tests/ui/issues/issue-42210.rs1
-rw-r--r--tests/ui/issues/issue-4265.stderr2
-rw-r--r--tests/ui/issues/issue-42755.stderr2
-rw-r--r--tests/ui/issues/issue-42796.stderr2
-rw-r--r--tests/ui/issues/issue-42880.stderr2
-rw-r--r--tests/ui/issues/issue-4335.stderr2
-rw-r--r--tests/ui/issues/issue-43355.stderr2
-rw-r--r--tests/ui/issues/issue-43420-no-over-suggest.stderr2
-rw-r--r--tests/ui/issues/issue-43424.stderr2
-rw-r--r--tests/ui/issues/issue-43431.stderr2
-rw-r--r--tests/ui/issues/issue-43925.stderr2
-rw-r--r--tests/ui/issues/issue-43926.stderr2
-rw-r--r--tests/ui/issues/issue-44023.stderr2
-rw-r--r--tests/ui/issues/issue-44078.stderr2
-rw-r--r--tests/ui/issues/issue-44239.stderr2
-rw-r--r--tests/ui/issues/issue-44405.stderr2
-rw-r--r--tests/ui/issues/issue-4517.stderr2
-rw-r--r--tests/ui/issues/issue-45562.stderr2
-rw-r--r--tests/ui/issues/issue-45731.rs1
-rw-r--r--tests/ui/issues/issue-45801.stderr2
-rw-r--r--tests/ui/issues/issue-45965.stderr2
-rw-r--r--tests/ui/issues/issue-46302.stderr2
-rw-r--r--tests/ui/issues/issue-46311.stderr2
-rw-r--r--tests/ui/issues/issue-46332.stderr2
-rw-r--r--tests/ui/issues/issue-46438.stderr2
-rw-r--r--tests/ui/issues/issue-46471-1.stderr2
-rw-r--r--tests/ui/issues/issue-46472.stderr2
-rw-r--r--tests/ui/issues/issue-46771.stderr2
-rw-r--r--tests/ui/issues/issue-46983.stderr2
-rw-r--r--tests/ui/issues/issue-47073-zero-padded-tuple-struct-indices.stderr7
-rw-r--r--tests/ui/issues/issue-47184.stderr2
-rw-r--r--tests/ui/issues/issue-4736.stderr2
-rw-r--r--tests/ui/issues/issue-47377.stderr2
-rw-r--r--tests/ui/issues/issue-47380.stderr2
-rw-r--r--tests/ui/issues/issue-47725.stderr2
-rw-r--r--tests/ui/issues/issue-48364.stderr2
-rw-r--r--tests/ui/issues/issue-48728.stderr2
-rw-r--r--tests/ui/issues/issue-48838.stderr2
-rw-r--r--tests/ui/issues/issue-4935.stderr2
-rw-r--r--tests/ui/issues/issue-4968.stderr2
-rw-r--r--tests/ui/issues/issue-4972.stderr2
-rw-r--r--tests/ui/issues/issue-49824.stderr2
-rw-r--r--tests/ui/issues/issue-49919.stderr2
-rw-r--r--tests/ui/issues/issue-50264-inner-deref-trait/option-as_deref.stderr2
-rw-r--r--tests/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.stderr2
-rw-r--r--tests/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr2
-rw-r--r--tests/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr2
-rw-r--r--tests/ui/issues/issue-50403.stderr2
-rw-r--r--tests/ui/issues/issue-50571.stderr2
-rw-r--r--tests/ui/issues/issue-50581.stderr2
-rw-r--r--tests/ui/issues/issue-50600.stderr2
-rw-r--r--tests/ui/issues/issue-50618.stderr2
-rw-r--r--tests/ui/issues/issue-5062.stderr2
-rw-r--r--tests/ui/issues/issue-50688.stderr2
-rw-r--r--tests/ui/issues/issue-50714-1.stderr2
-rw-r--r--tests/ui/issues/issue-50714.stderr2
-rw-r--r--tests/ui/issues/issue-50781.stderr2
-rw-r--r--tests/ui/issues/issue-50802.stderr2
-rw-r--r--tests/ui/issues/issue-51022.stderr2
-rw-r--r--tests/ui/issues/issue-51116.stderr2
-rw-r--r--tests/ui/issues/issue-51154.stderr2
-rw-r--r--tests/ui/issues/issue-5153.stderr2
-rw-r--r--tests/ui/issues/issue-51632-try-desugar-incompatible-types.stderr2
-rw-r--r--tests/ui/issues/issue-51874.stderr2
-rw-r--r--tests/ui/issues/issue-52049.stderr2
-rw-r--r--tests/ui/issues/issue-52126-assign-op-invariance.stderr2
-rw-r--r--tests/ui/issues/issue-52262.stderr2
-rw-r--r--tests/ui/issues/issue-5239-1.stderr2
-rw-r--r--tests/ui/issues/issue-52489.stderr2
-rw-r--r--tests/ui/issues/issue-52533.stderr2
-rw-r--r--tests/ui/issues/issue-52717.stderr2
-rw-r--r--tests/ui/issues/issue-53300.stderr2
-rw-r--r--tests/ui/issues/issue-53348.stderr2
-rw-r--r--tests/ui/issues/issue-53498.stderr2
-rw-r--r--tests/ui/issues/issue-5358-1.stderr2
-rw-r--r--tests/ui/issues/issue-54062.stderr2
-rw-r--r--tests/ui/issues/issue-5439.stderr2
-rw-r--r--tests/ui/issues/issue-54410.stderr2
-rw-r--r--tests/ui/issues/issue-5554.rs1
-rw-r--r--tests/ui/issues/issue-55587.stderr2
-rw-r--r--tests/ui/issues/issue-55731.stderr2
-rw-r--r--tests/ui/issues/issue-56806.stderr2
-rw-r--r--tests/ui/issues/issue-56943.stderr2
-rw-r--r--tests/ui/issues/issue-57271.stderr2
-rw-r--r--tests/ui/issues/issue-57362-1.stderr2
-rw-r--r--tests/ui/issues/issue-57362-2.stderr2
-rw-r--r--tests/ui/issues/issue-57924.stderr2
-rw-r--r--tests/ui/issues/issue-5844.mir.stderr2
-rw-r--r--tests/ui/issues/issue-5844.thir.stderr2
-rw-r--r--tests/ui/issues/issue-58463.rs1
-rw-r--r--tests/ui/issues/issue-58734.stderr2
-rw-r--r--tests/ui/issues/issue-5883.stderr2
-rw-r--r--tests/ui/issues/issue-58857.stderr2
-rw-r--r--tests/ui/issues/issue-59494.stderr2
-rw-r--r--tests/ui/issues/issue-59756.stderr2
-rw-r--r--tests/ui/issues/issue-5997-enum.stderr2
-rw-r--r--tests/ui/issues/issue-5997-struct.stderr2
-rw-r--r--tests/ui/issues/issue-60218.stderr2
-rw-r--r--tests/ui/issues/issue-61106.stderr2
-rw-r--r--tests/ui/issues/issue-61108.stderr2
-rw-r--r--tests/ui/issues/issue-61623.stderr2
-rw-r--r--tests/ui/issues/issue-62375.stderr2
-rw-r--r--tests/ui/issues/issue-64430.stderr2
-rw-r--r--tests/ui/issues/issue-64559.stderr2
-rw-r--r--tests/ui/issues/issue-64792-bad-unicode-ctor.stderr2
-rw-r--r--tests/ui/issues/issue-65131.stderr2
-rw-r--r--tests/ui/issues/issue-65230.stderr2
-rw-r--r--tests/ui/issues/issue-65634-raw-ident-suggestion.edition2015.stderr2
-rw-r--r--tests/ui/issues/issue-65634-raw-ident-suggestion.edition2018.stderr2
-rw-r--r--tests/ui/issues/issue-6596-2.stderr2
-rw-r--r--tests/ui/issues/issue-66706.stderr4
-rw-r--r--tests/ui/issues/issue-67039-unsound-pin-partialeq.stderr2
-rw-r--r--tests/ui/issues/issue-6738.stderr2
-rw-r--r--tests/ui/issues/issue-67552.polonius.stderr2
-rw-r--r--tests/ui/issues/issue-67552.rs1
-rw-r--r--tests/ui/issues/issue-67552.stderr6
-rw-r--r--tests/ui/issues/issue-70381.stderr2
-rw-r--r--tests/ui/issues/issue-7044.stderr2
-rw-r--r--tests/ui/issues/issue-7061.stderr2
-rw-r--r--tests/ui/issues/issue-7092.stderr2
-rw-r--r--tests/ui/issues/issue-71406.stderr2
-rw-r--r--tests/ui/issues/issue-71676-2.stderr2
-rw-r--r--tests/ui/issues/issue-72076.stderr2
-rw-r--r--tests/ui/issues/issue-7246.stderr2
-rw-r--r--tests/ui/issues/issue-72839-error-overflow.stderr2
-rw-r--r--tests/ui/issues/issue-73112.stderr2
-rw-r--r--tests/ui/issues/issue-7364.stderr2
-rw-r--r--tests/ui/issues/issue-74236/main.stderr2
-rw-r--r--tests/ui/issues/issue-75283.stderr2
-rw-r--r--tests/ui/issues/issue-7607-1.stderr2
-rw-r--r--tests/ui/issues/issue-76077.stderr4
-rw-r--r--tests/ui/issues/issue-77218/issue-77218-2.stderr2
-rw-r--r--tests/ui/issues/issue-77218/issue-77218.stderr2
-rw-r--r--tests/ui/issues/issue-78622.stderr2
-rw-r--r--tests/ui/issues/issue-7867.stderr2
-rw-r--r--tests/ui/issues/issue-7950.stderr2
-rw-r--r--tests/ui/issues/issue-7970a.stderr2
-rw-r--r--tests/ui/issues/issue-80607.stderr2
-rw-r--r--tests/ui/issues/issue-81584.stderr2
-rw-r--r--tests/ui/issues/issue-83048.stderr2
-rw-r--r--tests/ui/issues/issue-87199.stderr2
-rw-r--r--tests/ui/issues/issue-8727.polonius.stderr2
-rw-r--r--tests/ui/issues/issue-8727.stderr2
-rw-r--r--tests/ui/issues/issue-87490.stderr2
-rw-r--r--tests/ui/issues/issue-8767.stderr2
-rw-r--r--tests/ui/issues/issue-8783.rs2
-rw-r--r--tests/ui/issues/issue-9575.stderr2
-rw-r--r--tests/ui/issues/issue-9814.stderr2
-rw-r--r--tests/ui/issues/issue-98299.stderr2
-rw-r--r--tests/ui/iterators/bound.stderr2
-rw-r--r--tests/ui/iterators/collect-into-array.stderr2
-rw-r--r--tests/ui/iterators/float_iterator_hint.stderr2
-rw-r--r--tests/ui/iterators/invalid-iterator-chain-with-int-infer.stderr2
-rw-r--r--tests/ui/iterators/vec-on-unimplemented.stderr2
-rw-r--r--tests/ui/json/json-bom-plus-crlf-multifile.stderr10
-rw-r--r--tests/ui/json/json-bom-plus-crlf.stderr10
-rw-r--r--tests/ui/json/json-multiple.stderr2
-rw-r--r--tests/ui/json/json-options.stderr2
-rw-r--r--tests/ui/json/json-short.stderr4
-rw-r--r--tests/ui/keyword/extern/keyword-extern-as-identifier-expr.stderr2
-rw-r--r--tests/ui/keyword/extern/keyword-extern-as-identifier-pat.stderr2
-rw-r--r--tests/ui/keyword/extern/keyword-extern-as-identifier-type.stderr2
-rw-r--r--tests/ui/keyword/keyword-false-as-identifier.stderr2
-rw-r--r--tests/ui/keyword/keyword-self-as-identifier.stderr2
-rw-r--r--tests/ui/keyword/keyword-super-as-identifier.stderr2
-rw-r--r--tests/ui/keyword/keyword-super.stderr2
-rw-r--r--tests/ui/keyword/keyword-true-as-identifier.stderr2
-rw-r--r--tests/ui/kindck/kindck-impl-type-params-2.stderr2
-rw-r--r--tests/ui/kindck/kindck-nonsendable-1.stderr2
-rw-r--r--tests/ui/kindck/kindck-send-object1.stderr2
-rw-r--r--tests/ui/kindck/kindck-send-owned.stderr2
-rw-r--r--tests/ui/lang-items/bad-add-impl.stderr2
-rw-r--r--tests/ui/lang-items/issue-19660.stderr2
-rw-r--r--tests/ui/lang-items/issue-86238.stderr2
-rw-r--r--tests/ui/lang-items/lang-item-generic-requirements.rs3
-rw-r--r--tests/ui/lang-items/lang-item-generic-requirements.stderr37
-rw-r--r--tests/ui/lang-items/lang-item-missing.stderr2
-rw-r--r--tests/ui/lang-items/missing-clone-for-suggestion.stderr2
-rw-r--r--tests/ui/lang-items/required-lang-item.stderr2
-rw-r--r--tests/ui/lang-items/start_lang_item_args.argc.stderr2
-rw-r--r--tests/ui/lang-items/start_lang_item_args.argv.stderr2
-rw-r--r--tests/ui/lang-items/start_lang_item_args.argv_inner_ptr.stderr2
-rw-r--r--tests/ui/lang-items/start_lang_item_args.main_args.stderr2
-rw-r--r--tests/ui/lang-items/start_lang_item_args.main_ret.stderr2
-rw-r--r--tests/ui/lang-items/start_lang_item_args.main_ty.stderr2
-rw-r--r--tests/ui/lang-items/start_lang_item_args.missing_all_args.stderr2
-rw-r--r--tests/ui/lang-items/start_lang_item_args.missing_ret.stderr2
-rw-r--r--tests/ui/lang-items/start_lang_item_args.missing_sigpipe_arg.stderr2
-rw-r--r--tests/ui/lang-items/start_lang_item_args.sigpipe.stderr2
-rw-r--r--tests/ui/lang-items/start_lang_item_args.start_ret.stderr2
-rw-r--r--tests/ui/lang-items/start_lang_item_args.too_many_args.stderr2
-rw-r--r--tests/ui/lang-items/start_lang_item_with_target_feature.stderr2
-rw-r--r--tests/ui/late-bound-lifetimes/issue-80618.stderr2
-rw-r--r--tests/ui/late-bound-lifetimes/mismatched_arg_count.stderr2
-rw-r--r--tests/ui/layout/cannot-transmute-unnormalizable-type.stderr2
-rw-r--r--tests/ui/layout/malformed-unsized-type-in-union.stderr2
-rw-r--r--tests/ui/layout/too-big-with-padding.stderr2
-rw-r--r--tests/ui/layout/transmute-to-tail-with-err.stderr2
-rw-r--r--tests/ui/lazy-type-alias-impl-trait/branches.stderr2
-rw-r--r--tests/ui/lazy-type-alias/coerce-behind-lazy.rs2
-rw-r--r--tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.locally_eager.stderr2
-rw-r--r--tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.locally_lazy.stderr2
-rw-r--r--tests/ui/lazy-type-alias/leading-where-clause.stderr2
-rw-r--r--tests/ui/lazy-type-alias/trailing-where-clause.stderr2
-rw-r--r--tests/ui/lazy-type-alias/unsatisfied-bounds-type-alias-body.stderr2
-rw-r--r--tests/ui/let-else/accidental-if.stderr2
-rw-r--r--tests/ui/let-else/issue-94176.stderr2
-rw-r--r--tests/ui/let-else/let-else-allow-unused.stderr2
-rw-r--r--tests/ui/let-else/let-else-binding-explicit-mut-annotated.stderr8
-rw-r--r--tests/ui/let-else/let-else-binding-explicit-mut-borrow.stderr2
-rw-r--r--tests/ui/let-else/let-else-binding-immutable.stderr2
-rw-r--r--tests/ui/let-else/let-else-if.stderr2
-rw-r--r--tests/ui/let-else/let-else-no-double-error.stderr2
-rw-r--r--tests/ui/let-else/let-else-scope.stderr2
-rw-r--r--tests/ui/let-else/let-else-slicing-error.stderr2
-rw-r--r--tests/ui/let-else/let-else-then-diverge.stderr2
-rw-r--r--tests/ui/lexer/lex-bad-char-literals-2.stderr2
-rw-r--r--tests/ui/lexer/lex-bad-char-literals-4.stderr2
-rw-r--r--tests/ui/lexer/lex-bad-token.stderr2
-rw-r--r--tests/ui/lexer/lex-stray-backslash.stderr2
-rw-r--r--tests/ui/lexer/unterminated-comment.stderr2
-rw-r--r--tests/ui/lexer/unterminated-nested-comment.stderr2
-rw-r--r--tests/ui/lifetimes/borrowck-let-suggestion.stderr2
-rw-r--r--tests/ui/lifetimes/conflicting-bounds.stderr2
-rw-r--r--tests/ui/lifetimes/copy_modulo_regions.stderr2
-rw-r--r--tests/ui/lifetimes/issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.stderr2
-rw-r--r--tests/ui/lifetimes/issue-105675.stderr16
-rw-r--r--tests/ui/lifetimes/issue-107492-default-value-for-lifetime.stderr2
-rw-r--r--tests/ui/lifetimes/issue-17728.stderr2
-rw-r--r--tests/ui/lifetimes/issue-26638.stderr16
-rw-r--r--tests/ui/lifetimes/issue-34979.stderr2
-rw-r--r--tests/ui/lifetimes/issue-64173-unused-lifetimes.stderr2
-rw-r--r--tests/ui/lifetimes/issue-79187-2.stderr12
-rw-r--r--tests/ui/lifetimes/issue-79187.stderr4
-rw-r--r--tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.stderr2
-rw-r--r--tests/ui/lifetimes/issue-91763.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr29
-rw-r--r--tests/ui/lifetimes/lifetime-elision-return-type-trait.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.stderr2
-rw-r--r--tests/ui/lifetimes/lifetime-errors/issue_74400.stderr4
-rw-r--r--tests/ui/lifetimes/lifetime-mismatch-between-trait-and-impl.stderr2
-rw-r--r--tests/ui/lifetimes/nested-binder-print.stderr2
-rw-r--r--tests/ui/lifetimes/re-empty-in-error.stderr2
-rw-r--r--tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.stderr2
-rw-r--r--tests/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.stderr2
-rw-r--r--tests/ui/limits/huge-array-simple-32.stderr2
-rw-r--r--tests/ui/limits/huge-array-simple-64.stderr2
-rw-r--r--tests/ui/limits/huge-array.stderr2
-rw-r--r--tests/ui/limits/huge-enum.stderr2
-rw-r--r--tests/ui/limits/huge-struct.stderr2
-rw-r--r--tests/ui/limits/issue-15919-32.stderr2
-rw-r--r--tests/ui/limits/issue-15919-64.stderr2
-rw-r--r--tests/ui/limits/issue-17913.stderr2
-rw-r--r--tests/ui/limits/issue-55878.stderr2
-rw-r--r--tests/ui/limits/issue-69485-var-size-diffs-too-large.stderr2
-rw-r--r--tests/ui/limits/issue-75158-64.stderr2
-rw-r--r--tests/ui/linkage-attr/incompatible-flavor.stderr2
-rw-r--r--tests/ui/linkage-attr/issue-109144.stderr2
-rw-r--r--tests/ui/linkage-attr/linkage-detect-extern-generated-name-collision.stderr2
-rw-r--r--tests/ui/linkage-attr/linkage-detect-local-generated-name-collision.stderr2
-rw-r--r--tests/ui/linkage-attr/linkage2.stderr2
-rw-r--r--tests/ui/linkage-attr/linkage3.stderr2
-rw-r--r--tests/ui/linkage-attr/linkage4.stderr2
-rw-r--r--tests/ui/lint-group-forbid-always-trumps-cli.stderr2
-rw-r--r--tests/ui/lint/bad-lint-cap2.stderr2
-rw-r--r--tests/ui/lint/bare-trait-objects-path.stderr2
-rw-r--r--tests/ui/lint/cli-lint-override.forbid_warn.stderr2
-rw-r--r--tests/ui/lint/cli-lint-override.warn_deny.stderr2
-rw-r--r--tests/ui/lint/command-line-lint-group-deny.stderr2
-rw-r--r--tests/ui/lint/command-line-lint-group-forbid.stderr2
-rw-r--r--tests/ui/lint/dead-code/basic.stderr2
-rw-r--r--tests/ui/lint/dead-code/closure-bang.stderr2
-rw-r--r--tests/ui/lint/dead-code/empty-unused-enum.stderr2
-rw-r--r--tests/ui/lint/dead-code/impl-trait.stderr2
-rw-r--r--tests/ui/lint/dead-code/type-alias.stderr2
-rw-r--r--tests/ui/lint/dead-code/unused-assoc-fns.stderr2
-rw-r--r--tests/ui/lint/dead-code/unused-struct-variant.stderr2
-rw-r--r--tests/ui/lint/dead-code/unused-variant.stderr2
-rw-r--r--tests/ui/lint/dead-code/with-core-crate.stderr2
-rw-r--r--tests/ui/lint/enable-unstable-lib-feature.stderr2
-rw-r--r--tests/ui/lint/expr_attr_paren_order.stderr2
-rw-r--r--tests/ui/lint/forbid-group-group-1.stderr2
-rw-r--r--tests/ui/lint/future-incompat-json-test.rs10
-rw-r--r--tests/ui/lint/future-incompat-json-test.stderr10
-rw-r--r--tests/ui/lint/internal_features.rs11
-rw-r--r--tests/ui/lint/internal_features.stderr23
-rw-r--r--tests/ui/lint/issue-103435-extra-parentheses.fixed3
-rw-r--r--tests/ui/lint/issue-103435-extra-parentheses.rs7
-rw-r--r--tests/ui/lint/issue-103435-extra-parentheses.stderr16
-rw-r--r--tests/ui/lint/issue-104897.stderr2
-rw-r--r--tests/ui/lint/issue-106991.stderr2
-rw-r--r--tests/ui/lint/issue-109152.stderr2
-rw-r--r--tests/ui/lint/issue-63364.stderr2
-rw-r--r--tests/ui/lint/issue-70819-dont-override-forbid-in-same-scope.stderr2
-rw-r--r--tests/ui/lint/issue-79744.stderr2
-rw-r--r--tests/ui/lint/issue-99387.stderr2
-rw-r--r--tests/ui/lint/let_underscore/let_underscore_lock.stderr2
-rw-r--r--tests/ui/lint/lint-attr-non-item-node.stderr2
-rw-r--r--tests/ui/lint/lint-ctypes-73249-2.stderr2
-rw-r--r--tests/ui/lint/lint-ctypes-73249-3.stderr2
-rw-r--r--tests/ui/lint/lint-ctypes-73249-5.stderr2
-rw-r--r--tests/ui/lint/lint-ctypes-73251-1.stderr2
-rw-r--r--tests/ui/lint/lint-ctypes-73251-2.stderr2
-rw-r--r--tests/ui/lint/lint-ctypes-option-nonnull-unsized.stderr2
-rw-r--r--tests/ui/lint/lint-forbid-internal-unsafe.stderr2
-rw-r--r--tests/ui/lint/lint-match-arms.stderr2
-rw-r--r--tests/ui/lint/lint-missing-copy-implementations.stderr2
-rw-r--r--tests/ui/lint/lint-non-snake-case-crate-2.stderr2
-rw-r--r--tests/ui/lint/lint-non-snake-case-crate.stderr2
-rw-r--r--tests/ui/lint/lint-non-snake-case-lifetimes.stderr2
-rw-r--r--tests/ui/lint/lint-non-snake-case-modules.stderr2
-rw-r--r--tests/ui/lint/lint-non-uppercase-associated-const.stderr2
-rw-r--r--tests/ui/lint/lint-non-uppercase-trait-assoc-const.stderr2
-rw-r--r--tests/ui/lint/lint-nonstandard-style-unicode-3.stderr2
-rw-r--r--tests/ui/lint/lint-qualification.stderr2
-rw-r--r--tests/ui/lint/lint-removed-allow.stderr2
-rw-r--r--tests/ui/lint/lint-removed-cmdline.stderr2
-rw-r--r--tests/ui/lint/lint-removed.stderr2
-rw-r--r--tests/ui/lint/lint-renamed-allow.stderr2
-rw-r--r--tests/ui/lint/lint-renamed-cmdline.stderr2
-rw-r--r--tests/ui/lint/lint-renamed.stderr2
-rw-r--r--tests/ui/lint/lint-stability2.stderr2
-rw-r--r--tests/ui/lint/lint-stability3.stderr2
-rw-r--r--tests/ui/lint/lint-strict-provenance-fuzzy-casts.stderr2
-rw-r--r--tests/ui/lint/lint-struct-necessary.stderr2
-rw-r--r--tests/ui/lint/lint-temporary-cstring-as-param.stderr2
-rw-r--r--tests/ui/lint/lint-type-limits2.stderr2
-rw-r--r--tests/ui/lint/lint-type-limits3.stderr2
-rw-r--r--tests/ui/lint/lint-unconditional-drop-recursion.stderr2
-rw-r--r--tests/ui/lint/lint-unnecessary-import-braces.stderr2
-rw-r--r--tests/ui/lint/must_not_suspend/boxed.stderr2
-rw-r--r--tests/ui/lint/must_not_suspend/dedup.stderr2
-rw-r--r--tests/ui/lint/must_not_suspend/feature-gate-must_not_suspend.stderr2
-rw-r--r--tests/ui/lint/must_not_suspend/mutex.stderr2
-rw-r--r--tests/ui/lint/must_not_suspend/other_items.stderr2
-rw-r--r--tests/ui/lint/must_not_suspend/ref.stderr2
-rw-r--r--tests/ui/lint/must_not_suspend/return.stderr2
-rw-r--r--tests/ui/lint/must_not_suspend/tuple-mismatch.stderr2
-rw-r--r--tests/ui/lint/must_not_suspend/unit.stderr2
-rw-r--r--tests/ui/lint/opaque-ty-ffi-normalization-cycle.stderr2
-rw-r--r--tests/ui/lint/opaque-ty-ffi-unsafe.stderr2
-rw-r--r--tests/ui/lint/ptr_null_checks.rs2
-rw-r--r--tests/ui/lint/ptr_null_checks.stderr54
-rw-r--r--tests/ui/lint/reference_casting.rs9
-rw-r--r--tests/ui/lint/reference_casting.stderr102
-rw-r--r--tests/ui/lint/renamed-lints-still-apply.stderr2
-rw-r--r--tests/ui/lint/rfc-2383-lint-reason/expect_missing_feature_gate.stderr2
-rw-r--r--tests/ui/lint/rfc-2383-lint-reason/expect_nested_lint_levels.stderr2
-rw-r--r--tests/ui/lint/rustdoc-renamed.stderr2
-rw-r--r--tests/ui/lint/unaligned_references_external_macro.stderr2
-rw-r--r--tests/ui/lint/unconditional_panic_98444.stderr2
-rw-r--r--tests/ui/lint/unused/assoc-types.assoc_ty.stderr15
-rw-r--r--tests/ui/lint/unused/assoc-types.rpitit.stderr15
-rw-r--r--tests/ui/lint/unused/assoc-types.rs23
-rw-r--r--tests/ui/lint/unused/issue-105061.stderr2
-rw-r--r--tests/ui/lint/unused/issue-30730.stderr2
-rw-r--r--tests/ui/lint/unused/issue-46576.stderr2
-rw-r--r--tests/ui/lint/unused/issue-59896.stderr2
-rw-r--r--tests/ui/lint/unused/issue-85913.stderr2
-rw-r--r--tests/ui/lint/unused/lint-unused-mut-variables.stderr2
-rw-r--r--tests/ui/lint/unused/must_use-pin.rs45
-rw-r--r--tests/ui/lint/unused/must_use-pin.stderr20
-rw-r--r--tests/ui/lint/unused/unused-macro-rules-malformed-rule.stderr2
-rw-r--r--tests/ui/lint/unused/unused-macro-with-bad-frag-spec.stderr2
-rw-r--r--tests/ui/lint/unused/unused-macro-with-follow-violation.stderr2
-rw-r--r--tests/ui/lint/unused/unused-mut-warning-captured-var.stderr2
-rw-r--r--tests/ui/lint/unused/unused-supertrait.stderr2
-rw-r--r--tests/ui/lint/unused_parens_json_suggestion.stderr4
-rw-r--r--tests/ui/lint/unused_parens_multibyte_recovery.stderr2
-rw-r--r--tests/ui/lint/unused_parens_remove_json_suggestion.stderr20
-rw-r--r--tests/ui/lint/unused_variables-issue-82488.stderr2
-rw-r--r--tests/ui/lint/use_suggestion_json.stderr2
-rw-r--r--tests/ui/lint/wide_pointer_comparisons.rs138
-rw-r--r--tests/ui/lint/wide_pointer_comparisons.stderr452
-rw-r--r--tests/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.stderr2
-rw-r--r--tests/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.stderr2
-rw-r--r--tests/ui/liveness/liveness-assign/liveness-assign-imm-local-with-drop.stderr2
-rw-r--r--tests/ui/liveness/liveness-assign/liveness-assign-imm-local-with-init.stderr2
-rw-r--r--tests/ui/liveness/liveness-closure-require-ret.stderr2
-rw-r--r--tests/ui/liveness/liveness-forgot-ret.stderr2
-rw-r--r--tests/ui/liveness/liveness-issue-2163.stderr2
-rw-r--r--tests/ui/liveness/liveness-missing-ret2.stderr2
-rw-r--r--tests/ui/liveness/liveness-move-call-arg-2.stderr2
-rw-r--r--tests/ui/liveness/liveness-move-call-arg.stderr2
-rw-r--r--tests/ui/liveness/liveness-move-in-loop.stderr2
-rw-r--r--tests/ui/liveness/liveness-move-in-while.stderr2
-rw-r--r--tests/ui/liveness/liveness-use-after-move.stderr2
-rw-r--r--tests/ui/liveness/liveness-use-after-send.stderr2
-rw-r--r--tests/ui/loops/issue-82916.stderr2
-rw-r--r--tests/ui/loops/loop-break-value-no-repeat.stderr2
-rw-r--r--tests/ui/loops/loop-else-break-with-value.stderr2
-rw-r--r--tests/ui/loops/loop-else-err.stderr2
-rw-r--r--tests/ui/loops/loop-else-let-else-err.stderr2
-rw-r--r--tests/ui/loops/loop-proper-liveness.stderr2
-rw-r--r--tests/ui/loops/loop-properly-diverging-2.stderr2
-rw-r--r--tests/ui/lto/debuginfo-lto.rs1
-rw-r--r--tests/ui/lto/issue-11154.stderr2
-rw-r--r--tests/ui/lto/lto-duplicate-symbols.stderr2
-rw-r--r--tests/ui/lub-glb/old-lub-glb-hr-noteq1.baseleak.stderr2
-rw-r--r--tests/ui/lub-glb/old-lub-glb-hr-noteq1.basenoleak.stderr2
-rw-r--r--tests/ui/lub-glb/old-lub-glb-hr-noteq1.leak.stderr6
-rw-r--r--tests/ui/lub-glb/old-lub-glb-hr-noteq1.noleak.stderr6
-rw-r--r--tests/ui/lub-glb/old-lub-glb-hr-noteq2.leak.stderr6
-rw-r--r--tests/ui/macros/bad-concat.stderr2
-rw-r--r--tests/ui/macros/bang-after-name.stderr2
-rw-r--r--tests/ui/macros/best-failure.stderr2
-rw-r--r--tests/ui/macros/derive-in-eager-expansion-hang.stderr2
-rw-r--r--tests/ui/macros/duplicate-builtin.stderr2
-rw-r--r--tests/ui/macros/include-single-expr.stderr2
-rw-r--r--tests/ui/macros/issue-100199.stderr2
-rw-r--r--tests/ui/macros/issue-102878.stderr2
-rw-r--r--tests/ui/macros/issue-105011.stderr2
-rw-r--r--tests/ui/macros/issue-109237.stderr2
-rw-r--r--tests/ui/macros/issue-118048.rs10
-rw-r--r--tests/ui/macros/issue-118048.stderr21
-rw-r--r--tests/ui/macros/issue-118786.rs16
-rw-r--r--tests/ui/macros/issue-118786.stderr47
-rw-r--r--tests/ui/macros/issue-16098.stderr2
-rw-r--r--tests/ui/macros/issue-19163.stderr2
-rw-r--r--tests/ui/macros/issue-21356.stderr2
-rw-r--r--tests/ui/macros/issue-26094.stderr2
-rw-r--r--tests/ui/macros/issue-29084.stderr2
-rw-r--r--tests/ui/macros/issue-35450.stderr2
-rw-r--r--tests/ui/macros/issue-39388.stderr2
-rw-r--r--tests/ui/macros/issue-39404.stderr2
-rw-r--r--tests/ui/macros/issue-41776.stderr2
-rw-r--r--tests/ui/macros/issue-42954.stderr2
-rw-r--r--tests/ui/macros/issue-54441.stderr2
-rw-r--r--tests/ui/macros/issue-58490.stderr2
-rw-r--r--tests/ui/macros/issue-61053-duplicate-binder.stderr2
-rw-r--r--tests/ui/macros/issue-6596-1.stderr2
-rw-r--r--tests/ui/macros/issue-78325-inconsistent-resolution.stderr2
-rw-r--r--tests/ui/macros/issue-83340.stderr2
-rw-r--r--tests/ui/macros/issue-83344.stderr2
-rw-r--r--tests/ui/macros/issue-84195-lint-anon-const.stderr2
-rw-r--r--tests/ui/macros/issue-84632-eager-expansion-recursion-limit.stderr2
-rw-r--r--tests/ui/macros/issue-92267.stderr2
-rw-r--r--tests/ui/macros/macro-attribute.stderr2
-rw-r--r--tests/ui/macros/macro-backtrace-println.stderr2
-rw-r--r--tests/ui/macros/macro-crate-nonterminal-non-root.stderr2
-rw-r--r--tests/ui/macros/macro-in-expression-context-2.stderr2
-rw-r--r--tests/ui/macros/macro-in-expression-context.stderr2
-rw-r--r--tests/ui/macros/macro-inner-attributes.stderr2
-rw-r--r--tests/ui/macros/macro-interpolation.stderr2
-rw-r--r--tests/ui/macros/macro-invalid-fragment-spec.stderr2
-rw-r--r--tests/ui/macros/macro-local-data-key-priv.stderr2
-rw-r--r--tests/ui/macros/macro-missing-delimiters.stderr2
-rw-r--r--tests/ui/macros/macro-missing-fragment.stderr2
-rw-r--r--tests/ui/macros/macro-name-typo.stderr2
-rw-r--r--tests/ui/macros/macro-non-lifetime.stderr2
-rw-r--r--tests/ui/macros/macro-outer-attributes.stderr2
-rw-r--r--tests/ui/macros/macro-parameter-span.stderr2
-rw-r--r--tests/ui/macros/macro-path-prelude-fail-2.stderr2
-rw-r--r--tests/ui/macros/macro-path-prelude-fail-3.stderr2
-rw-r--r--tests/ui/macros/macro-path-prelude-fail-4.stderr2
-rw-r--r--tests/ui/macros/macro-path-prelude-shadowing.stderr2
-rw-r--r--tests/ui/macros/macro-use-bad-args-1.stderr2
-rw-r--r--tests/ui/macros/macro-use-bad-args-2.stderr2
-rw-r--r--tests/ui/macros/macro-use-undef.stderr2
-rw-r--r--tests/ui/macros/macro-use-wrong-name.stderr2
-rw-r--r--tests/ui/macros/macro_path_as_generic_bound.stderr2
-rw-r--r--tests/ui/macros/macro_undefined.stderr2
-rw-r--r--tests/ui/macros/malformed_macro_lhs.stderr2
-rw-r--r--tests/ui/macros/meta-variable-depth-outside-repeat.stderr2
-rw-r--r--tests/ui/macros/nonterminal-matching.stderr4
-rw-r--r--tests/ui/macros/not-utf8.stderr2
-rw-r--r--tests/ui/macros/out-of-order-shadowing.stderr2
-rw-r--r--tests/ui/macros/recovery-allowed.stderr2
-rw-r--r--tests/ui/macros/rfc-3086-metavar-expr/count-and-length-are-distinct.rs60
-rw-r--r--tests/ui/macros/rfc-3086-metavar-expr/feature-gate-macro_metavar_expr.rs28
-rw-r--r--tests/ui/macros/rfc-3086-metavar-expr/issue-111904.rs2
-rw-r--r--tests/ui/macros/rfc-3086-metavar-expr/issue-111904.stderr4
-rw-r--r--tests/ui/macros/rfc-3086-metavar-expr/macro-expansion.rs14
-rw-r--r--tests/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.rs14
-rw-r--r--tests/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.stderr10
-rw-r--r--tests/ui/macros/rfc-3086-metavar-expr/required-feature.rs8
-rw-r--r--tests/ui/macros/rfc-3086-metavar-expr/required-feature.stderr28
-rw-r--r--tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.rs34
-rw-r--r--tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.stderr206
-rw-r--r--tests/ui/macros/span-covering-argument-1.stderr2
-rw-r--r--tests/ui/macros/stringify.rs378
-rw-r--r--tests/ui/macros/syntax-error-recovery.rs2
-rw-r--r--tests/ui/macros/syntax-error-recovery.stderr2
-rw-r--r--tests/ui/macros/syntax-extension-source-utils.rs4
-rw-r--r--tests/ui/macros/trace-macro.stderr2
-rw-r--r--tests/ui/macros/trace_faulty_macros.rs11
-rw-r--r--tests/ui/macros/trace_faulty_macros.stderr49
-rw-r--r--tests/ui/macros/unreachable-arg.edition_2021.stderr2
-rw-r--r--tests/ui/macros/unreachable-format-args.edition_2015.stderr2
-rw-r--r--tests/ui/macros/vec-macro-in-pattern.stderr2
-rw-r--r--tests/ui/main-wrong-location.stderr2
-rw-r--r--tests/ui/main-wrong-type.stderr2
-rw-r--r--tests/ui/malformed/issue-107423-unused-delim-only-one-no-pair.stderr2
-rw-r--r--tests/ui/malformed/issue-69341-malformed-derive-inert.stderr2
-rw-r--r--tests/ui/malformed/malformed-interpolated.rs4
-rw-r--r--tests/ui/malformed/malformed-interpolated.stderr4
-rw-r--r--tests/ui/manual/manual-link-framework.stderr2
-rw-r--r--tests/ui/marker_trait_attr/overlap-marker-trait.stderr2
-rw-r--r--tests/ui/marker_trait_attr/overlapping-impl-1-modulo-regions.stderr2
-rw-r--r--tests/ui/marker_trait_attr/unsound-overlap.stderr2
-rw-r--r--tests/ui/match/issue-11319.stderr2
-rw-r--r--tests/ui/match/issue-70972-dyn-trait.stderr2
-rw-r--r--tests/ui/match/issue-74050-end-span.stderr2
-rw-r--r--tests/ui/match/issue-91058.stderr2
-rw-r--r--tests/ui/match/issue-92100.stderr7
-rw-r--r--tests/ui/match/match-arm-resolving-to-never.stderr2
-rw-r--r--tests/ui/match/match-ill-type2.stderr2
-rw-r--r--tests/ui/match/match-join.stderr2
-rw-r--r--tests/ui/match/match-no-arms-unreachable-after.stderr2
-rw-r--r--tests/ui/match/match-pattern-field-mismatch-2.stderr2
-rw-r--r--tests/ui/match/match-pattern-field-mismatch.stderr2
-rw-r--r--tests/ui/match/match-ref-mut-invariance.stderr2
-rw-r--r--tests/ui/match/match-ref-mut-let-invariance.stderr2
-rw-r--r--tests/ui/match/match-struct.stderr2
-rw-r--r--tests/ui/match/match-tag-nullary.stderr2
-rw-r--r--tests/ui/match/match-tag-unary.stderr2
-rw-r--r--tests/ui/match/match-tail-expr-never-type-error.rs16
-rw-r--r--tests/ui/match/match-tail-expr-never-type-error.stderr21
-rw-r--r--tests/ui/match/match-unresolved-one-arm.stderr2
-rw-r--r--tests/ui/match/match-vec-mismatch-2.stderr2
-rw-r--r--tests/ui/match/non-first-arm-doesnt-match-expected-return-type.stderr2
-rw-r--r--tests/ui/match/single-line.stderr2
-rw-r--r--tests/ui/meta/expected-error-correct-rev.a.stderr2
-rw-r--r--tests/ui/meta/meta-expected-error-wrong-rev.a.stderr2
-rw-r--r--tests/ui/methods/issue-3707.stderr2
-rw-r--r--tests/ui/methods/issues/issue-84495.stderr2
-rw-r--r--tests/ui/methods/issues/issue-94581.stderr2
-rw-r--r--tests/ui/methods/method-ambig-two-traits-cross-crate.stderr2
-rw-r--r--tests/ui/methods/method-ambig-two-traits-from-bounds.stderr2
-rw-r--r--tests/ui/methods/method-ambig-two-traits-from-impls.stderr2
-rw-r--r--tests/ui/methods/method-ambig-two-traits-from-impls2.stderr2
-rw-r--r--tests/ui/methods/method-ambig-two-traits-with-default-method.stderr2
-rw-r--r--tests/ui/methods/method-ambiguity-no-rcvr.rs14
-rw-r--r--tests/ui/methods/method-ambiguity-no-rcvr.stderr32
-rw-r--r--tests/ui/methods/method-call-lifetime-args-unresolved.stderr2
-rw-r--r--tests/ui/methods/method-call-type-binding.stderr2
-rw-r--r--tests/ui/methods/method-macro-backtrace.stderr2
-rw-r--r--tests/ui/methods/method-not-found-but-doc-alias.stderr2
-rw-r--r--tests/ui/methods/method-resolvable-path-in-pattern.stderr2
-rw-r--r--tests/ui/methods/suggest-method-on-call-with-macro-rcvr.stderr2
-rw-r--r--tests/ui/minus-string.stderr2
-rw-r--r--tests/ui/mir/build-async-error-body-correctly.stderr2
-rw-r--r--tests/ui/mir/field-projection-mutating-context.stderr6
-rw-r--r--tests/ui/mir/field-projection-mutating-context2.stderr2
-rw-r--r--tests/ui/mir/issue-102389.stderr2
-rw-r--r--tests/ui/mir/issue-106062.stderr2
-rw-r--r--tests/ui/mir/issue-75053.stderr2
-rw-r--r--tests/ui/mir/issue-92893.stderr2
-rw-r--r--tests/ui/mir/mir_raw_fat_ptr.rs2
-rw-r--r--tests/ui/mir/ssa_call_ret.rs30
-rw-r--r--tests/ui/mir/validate/critical-edge.rs31
-rw-r--r--tests/ui/mir/validate/noncleanup-cleanup.rs21
-rw-r--r--tests/ui/mir/validate/noncleanup-resume.rs17
-rw-r--r--tests/ui/mir/validate/noncleanup-terminate.rs17
-rw-r--r--tests/ui/mismatched_types/E0631.stderr8
-rw-r--r--tests/ui/mismatched_types/assignment-operator-unimplemented.stderr2
-rw-r--r--tests/ui/mismatched_types/cast-rfc0401.stderr2
-rw-r--r--tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.stderr2
-rw-r--r--tests/ui/mismatched_types/closure-arg-type-mismatch.stderr4
-rw-r--r--tests/ui/mismatched_types/closure-mismatch.stderr8
-rw-r--r--tests/ui/mismatched_types/closure-ref-114180.stderr6
-rw-r--r--tests/ui/mismatched_types/dont-point-return-on-E0308.stderr2
-rw-r--r--tests/ui/mismatched_types/fn-variance-1.stderr8
-rw-r--r--tests/ui/mismatched_types/for-loop-has-unit-body.stderr2
-rw-r--r--tests/ui/mismatched_types/issue-106182.stderr2
-rw-r--r--tests/ui/mismatched_types/issue-112036.stderr2
-rw-r--r--tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.fixed20
-rw-r--r--tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.rs20
-rw-r--r--tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.stderr29
-rw-r--r--tests/ui/mismatched_types/issue-118510.rs10
-rw-r--r--tests/ui/mismatched_types/issue-118510.stderr26
-rw-r--r--tests/ui/mismatched_types/issue-13033.stderr2
-rw-r--r--tests/ui/mismatched_types/issue-19109.stderr2
-rw-r--r--tests/ui/mismatched_types/issue-35030.stderr2
-rw-r--r--tests/ui/mismatched_types/issue-36053-2.stderr4
-rw-r--r--tests/ui/mismatched_types/issue-47706-trait.stderr2
-rw-r--r--tests/ui/mismatched_types/issue-75361-mismatched-impl.stderr2
-rw-r--r--tests/ui/mismatched_types/main.stderr2
-rw-r--r--tests/ui/mismatched_types/method-help-unsatisfied-bound.stderr2
-rw-r--r--tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.fixed77
-rw-r--r--tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.rs77
-rw-r--r--tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.stderr80
-rw-r--r--tests/ui/mismatched_types/normalize-fn-sig.stderr6
-rw-r--r--tests/ui/mismatched_types/recovered-block.stderr2
-rw-r--r--tests/ui/mismatched_types/show_module.stderr2
-rw-r--r--tests/ui/mismatched_types/similar_paths.stderr2
-rw-r--r--tests/ui/mismatched_types/similar_paths_primitive.stderr2
-rw-r--r--tests/ui/mismatched_types/suggest-option-asderef-inference-var.stderr6
-rw-r--r--tests/ui/mismatched_types/suggest-option-asderef-unfixable.stderr8
-rw-r--r--tests/ui/mismatched_types/suggest-option-asderef.fixed39
-rw-r--r--tests/ui/mismatched_types/suggest-option-asderef.rs6
-rw-r--r--tests/ui/mismatched_types/suggest-option-asderef.stderr22
-rw-r--r--tests/ui/mismatched_types/trait-bounds-cant-coerce.stderr2
-rw-r--r--tests/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr6
-rw-r--r--tests/ui/missing-trait-bounds/issue-35677.stderr2
-rw-r--r--tests/ui/missing-trait-bounds/issue-69725.stderr2
-rw-r--r--tests/ui/missing-trait-bounds/missing-trait-bound-for-op.stderr2
-rw-r--r--tests/ui/missing/missing-allocator.stderr2
-rw-r--r--tests/ui/missing/missing-comma-in-match.stderr2
-rw-r--r--tests/ui/missing/missing-derivable-attr.stderr2
-rw-r--r--tests/ui/missing/missing-fields-in-struct-pattern.stderr2
-rw-r--r--tests/ui/missing/missing-items/m2.stderr2
-rw-r--r--tests/ui/missing/missing-items/missing-type-parameter.stderr2
-rw-r--r--tests/ui/missing/missing-macro-use.stderr2
-rw-r--r--tests/ui/missing/missing-main.stderr2
-rw-r--r--tests/ui/missing/missing-return.stderr2
-rw-r--r--tests/ui/missing_non_modrs_mod/missing_non_modrs_mod.stderr2
-rw-r--r--tests/ui/missing_non_modrs_mod/missing_non_modrs_mod_inline.stderr2
-rw-r--r--tests/ui/mod-subitem-as-enum-variant.stderr2
-rw-r--r--tests/ui/module-macro_use-arguments.stderr2
-rw-r--r--tests/ui/modules/issue-107649.stderr2
-rw-r--r--tests/ui/modules/path-invalid-form.stderr2
-rw-r--r--tests/ui/modules/path-macro.stderr2
-rw-r--r--tests/ui/modules/path-no-file-name.stderr2
-rw-r--r--tests/ui/modules_and_files_visibility/mod_file_correct_spans.stderr2
-rw-r--r--tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.fixed30
-rw-r--r--tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.rs29
-rw-r--r--tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.stderr25
-rw-r--r--tests/ui/moves/issue-34721.stderr2
-rw-r--r--tests/ui/moves/issue-46099-move-in-macro.stderr2
-rw-r--r--tests/ui/moves/issue-75904-move-closure-loop.stderr2
-rw-r--r--tests/ui/moves/issue-99470-move-out-of-some.stderr2
-rw-r--r--tests/ui/moves/move-fn-self-receiver.stderr8
-rw-r--r--tests/ui/moves/move-guard-same-consts.stderr2
-rw-r--r--tests/ui/moves/move-in-guard-1.stderr2
-rw-r--r--tests/ui/moves/move-in-guard-2.stderr2
-rw-r--r--tests/ui/moves/move-into-dead-array-1.stderr2
-rw-r--r--tests/ui/moves/move-into-dead-array-2.stderr2
-rw-r--r--tests/ui/moves/move-of-addr-of-mut.stderr2
-rw-r--r--tests/ui/moves/move-out-of-array-1.stderr2
-rw-r--r--tests/ui/moves/move-out-of-field.rs2
-rw-r--r--tests/ui/moves/move-out-of-slice-1.stderr2
-rw-r--r--tests/ui/moves/moves-based-on-type-access-to-field.stderr2
-rw-r--r--tests/ui/moves/moves-based-on-type-block-bad.stderr2
-rw-r--r--tests/ui/moves/moves-based-on-type-capture-clause-bad.stderr2
-rw-r--r--tests/ui/moves/moves-based-on-type-cyclic-types-issue-4821.stderr2
-rw-r--r--tests/ui/moves/moves-based-on-type-match-bindings.stderr2
-rw-r--r--tests/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr2
-rw-r--r--tests/ui/moves/moves-based-on-type-tuple.stderr2
-rw-r--r--tests/ui/moves/moves-sru-moved-field.stderr2
-rw-r--r--tests/ui/moves/needs-clone-through-deref.fixed18
-rw-r--r--tests/ui/moves/needs-clone-through-deref.rs18
-rw-r--r--tests/ui/moves/needs-clone-through-deref.stderr18
-rw-r--r--tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.stderr2
-rw-r--r--tests/ui/moves/pin-mut-reborrow.stderr2
-rw-r--r--tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.fixed28
-rw-r--r--tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.rs27
-rw-r--r--tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.stderr23
-rw-r--r--tests/ui/moves/suggest-clone.fixed2
-rw-r--r--tests/ui/moves/suggest-clone.stderr6
-rw-r--r--tests/ui/moves/use_of_moved_value_clone_suggestions.stderr2
-rw-r--r--tests/ui/mut/mut-cant-alias.stderr2
-rw-r--r--tests/ui/mut/mut-cross-borrowing.stderr2
-rw-r--r--tests/ui/mut/mut-ref.stderr2
-rw-r--r--tests/ui/mut/mutable-class-fields-2.stderr2
-rw-r--r--tests/ui/mut/mutable-class-fields.stderr2
-rw-r--r--tests/ui/mut/mutable-enum-indirect.stderr2
-rw-r--r--tests/ui/native-library-link-flags/link-arg-from-rs.rs9
-rw-r--r--tests/ui/native-library-link-flags/link-arg-from-rs.stderr18
-rw-r--r--tests/ui/native-library-link-flags/modifiers-override-3.stderr2
-rw-r--r--tests/ui/native-library-link-flags/suggest-libname-only-1.stderr2
-rw-r--r--tests/ui/native-library-link-flags/suggest-libname-only-2.stderr2
-rw-r--r--tests/ui/nested-cfg-attrs.stderr2
-rw-r--r--tests/ui/never_type/call-fn-never-arg-wrong-type.stderr2
-rw-r--r--tests/ui/never_type/defaulted-never-note.fallback.stderr2
-rw-r--r--tests/ui/never_type/diverging-fallback-no-leak.fallback.stderr2
-rw-r--r--tests/ui/never_type/diverging-fallback-unconstrained-return.rs4
-rw-r--r--tests/ui/never_type/exhaustive_patterns.stderr2
-rw-r--r--tests/ui/never_type/fallback-closure-wrap.fallback.stderr2
-rw-r--r--tests/ui/never_type/feature-gate-never_type_fallback.stderr2
-rw-r--r--tests/ui/never_type/impl_trait_fallback3.stderr2
-rw-r--r--tests/ui/never_type/impl_trait_fallback4.stderr2
-rw-r--r--tests/ui/never_type/issue-10176.stderr2
-rw-r--r--tests/ui/never_type/issue-13352.stderr2
-rw-r--r--tests/ui/never_type/issue-51506.stderr2
-rw-r--r--tests/ui/never_type/never-assign-wrong-type.stderr2
-rw-r--r--tests/ui/never_type/never-from-impl-is-reserved.current.stderr (renamed from tests/ui/never_type/never-from-impl-is-reserved.stderr)4
-rw-r--r--tests/ui/never_type/never-from-impl-is-reserved.next.stderr14
-rw-r--r--tests/ui/never_type/never-from-impl-is-reserved.rs3
-rw-r--r--tests/ui/never_type/never-value-fallback-issue-66757.nofallback.stderr2
-rw-r--r--tests/ui/nll/borrowed-local-error.stderr2
-rw-r--r--tests/ui/nll/borrowed-match-issue-45045.stderr2
-rw-r--r--tests/ui/nll/borrowed-referent-issue-38899.stderr2
-rw-r--r--tests/ui/nll/borrowed-temporary-error.stderr2
-rw-r--r--tests/ui/nll/borrowed-universal-error-2.stderr2
-rw-r--r--tests/ui/nll/borrowed-universal-error.stderr2
-rw-r--r--tests/ui/nll/capture-mut-ref.stderr2
-rw-r--r--tests/ui/nll/capture-ref-in-struct.stderr2
-rw-r--r--tests/ui/nll/closure-requirements/escape-argument-callee.stderr4
-rw-r--r--tests/ui/nll/closure-requirements/escape-argument.stderr4
-rw-r--r--tests/ui/nll/closure-requirements/escape-upvar-nested.stderr2
-rw-r--r--tests/ui/nll/closure-requirements/escape-upvar-ref.stderr2
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr4
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-ref.stderr4
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr4
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr4
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr4
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-val.stderr4
-rw-r--r--tests/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr2
-rw-r--r--tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr4
-rw-r--r--tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr4
-rw-r--r--tests/ui/nll/closure-requirements/propagate-from-trait-match.stderr2
-rw-r--r--tests/ui/nll/closure-requirements/propagate-multiple-requirements.stderr2
-rw-r--r--tests/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr2
-rw-r--r--tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr2
-rw-r--r--tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr2
-rw-r--r--tests/ui/nll/closure-requirements/return-wrong-bound-region.stderr4
-rw-r--r--tests/ui/nll/constant-thread-locals-issue-47053.stderr2
-rw-r--r--tests/ui/nll/continue-after-missing-main.stderr2
-rw-r--r--tests/ui/nll/coroutine-upvar-mutability.stderr2
-rw-r--r--tests/ui/nll/decl-macro-illegal-copy.stderr2
-rw-r--r--tests/ui/nll/do-not-ignore-lifetime-bounds-in-copy-proj.stderr2
-rw-r--r--tests/ui/nll/do-not-ignore-lifetime-bounds-in-copy.stderr2
-rw-r--r--tests/ui/nll/get_default.polonius.stderr2
-rw-r--r--tests/ui/nll/issue-27282-mutate-before-diverging-arm-1.stderr2
-rw-r--r--tests/ui/nll/issue-27282-mutate-before-diverging-arm-2.stderr2
-rw-r--r--tests/ui/nll/issue-27282-mutate-before-diverging-arm-3.stderr2
-rw-r--r--tests/ui/nll/issue-27868.stderr2
-rw-r--r--tests/ui/nll/issue-30438-a.stderr2
-rw-r--r--tests/ui/nll/issue-30438-b.stderr2
-rw-r--r--tests/ui/nll/issue-30438-c.stderr2
-rw-r--r--tests/ui/nll/issue-31567.stderr2
-rw-r--r--tests/ui/nll/issue-45157.stderr2
-rw-r--r--tests/ui/nll/issue-46023.stderr2
-rw-r--r--tests/ui/nll/issue-46036.stderr2
-rw-r--r--tests/ui/nll/issue-46589.stderr2
-rw-r--r--tests/ui/nll/issue-47388.stderr2
-rw-r--r--tests/ui/nll/issue-47470.stderr2
-rw-r--r--tests/ui/nll/issue-48238.stderr2
-rw-r--r--tests/ui/nll/issue-48697.stderr2
-rw-r--r--tests/ui/nll/issue-48803.stderr2
-rw-r--r--tests/ui/nll/issue-50716.stderr2
-rw-r--r--tests/ui/nll/issue-51244.stderr2
-rw-r--r--tests/ui/nll/issue-51268.stderr2
-rw-r--r--tests/ui/nll/issue-51512.stderr2
-rw-r--r--tests/ui/nll/issue-52113.stderr2
-rw-r--r--tests/ui/nll/issue-52213.stderr2
-rw-r--r--tests/ui/nll/issue-52533-1.stderr2
-rw-r--r--tests/ui/nll/issue-52534-2.stderr2
-rw-r--r--tests/ui/nll/issue-52663-span-decl-captured-variable.stderr2
-rw-r--r--tests/ui/nll/issue-52663-trait-object.stderr2
-rw-r--r--tests/ui/nll/issue-52669.stderr2
-rw-r--r--tests/ui/nll/issue-52742.stderr2
-rw-r--r--tests/ui/nll/issue-53040.stderr2
-rw-r--r--tests/ui/nll/issue-53119.rs2
-rw-r--r--tests/ui/nll/issue-53773.stderr2
-rw-r--r--tests/ui/nll/issue-53807.stderr2
-rw-r--r--tests/ui/nll/issue-54189.stderr2
-rw-r--r--tests/ui/nll/issue-54302.stderr2
-rw-r--r--tests/ui/nll/issue-54382-use-span-of-tail-of-block.stderr2
-rw-r--r--tests/ui/nll/issue-54556-niconii.stderr2
-rw-r--r--tests/ui/nll/issue-54556-stephaneyfx.stderr2
-rw-r--r--tests/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr2
-rw-r--r--tests/ui/nll/issue-54556-wrap-it-up.stderr2
-rw-r--r--tests/ui/nll/issue-54779-anon-static-lifetime.stderr2
-rw-r--r--tests/ui/nll/issue-54943.stderr2
-rw-r--r--tests/ui/nll/issue-55394.stderr2
-rw-r--r--tests/ui/nll/issue-55401.stderr2
-rw-r--r--tests/ui/nll/issue-55511.stderr2
-rw-r--r--tests/ui/nll/issue-57265-return-type-wf-check.stderr2
-rw-r--r--tests/ui/nll/issue-57280-1-flipped.stderr2
-rw-r--r--tests/ui/nll/issue-57843.stderr2
-rw-r--r--tests/ui/nll/issue-61424.stderr2
-rw-r--r--tests/ui/nll/issue-67007-escaping-data.stderr2
-rw-r--r--tests/ui/nll/issue-68550.stderr2
-rw-r--r--tests/ui/nll/issue-69114-static-ty.stderr2
-rw-r--r--tests/ui/nll/issue-73159-rpit-static.stderr2
-rw-r--r--tests/ui/nll/issue-75777.stderr2
-rw-r--r--tests/ui/nll/issue-95272.stderr2
-rw-r--r--tests/ui/nll/issue-98693.stderr2
-rw-r--r--tests/ui/nll/loan_ends_mid_block_pair.stderr2
-rw-r--r--tests/ui/nll/match-cfg-fake-edges2.stderr2
-rw-r--r--tests/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr2
-rw-r--r--tests/ui/nll/maybe-initialized-drop-with-fragment.stderr2
-rw-r--r--tests/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.stderr2
-rw-r--r--tests/ui/nll/maybe-initialized-drop.stderr2
-rw-r--r--tests/ui/nll/mir_check_cast_closure.stderr2
-rw-r--r--tests/ui/nll/mir_check_cast_reify.stderr2
-rw-r--r--tests/ui/nll/mir_check_cast_unsafe_fn.stderr2
-rw-r--r--tests/ui/nll/mir_check_cast_unsize.stderr2
-rw-r--r--tests/ui/nll/missing-universe-cause-issue-114907.stderr8
-rw-r--r--tests/ui/nll/move-subpaths-moves-root.stderr2
-rw-r--r--tests/ui/nll/normalization-bounds-error.stderr2
-rw-r--r--tests/ui/nll/polonius/location-insensitive-scopes-liveness.rs46
-rw-r--r--tests/ui/nll/polonius/subset-relations.stderr2
-rw-r--r--tests/ui/nll/promoted-bounds.stderr2
-rw-r--r--tests/ui/nll/promoted-closure-pair.stderr2
-rw-r--r--tests/ui/nll/reference-carried-through-struct-field.stderr2
-rw-r--r--tests/ui/nll/region-ends-after-if-condition.stderr2
-rw-r--r--tests/ui/nll/relate_tys/fn-subtype.stderr2
-rw-r--r--tests/ui/nll/relate_tys/hr-fn-aaa-as-aba.stderr8
-rw-r--r--tests/ui/nll/relate_tys/opaque-hrtb.stderr2
-rw-r--r--tests/ui/nll/relate_tys/trait-hrtb.stderr2
-rw-r--r--tests/ui/nll/relate_tys/universe-violation.stderr6
-rw-r--r--tests/ui/nll/relate_tys/var-appears-twice.stderr2
-rw-r--r--tests/ui/nll/return-ref-mut-issue-46557.stderr2
-rw-r--r--tests/ui/nll/return_from_loop.stderr2
-rw-r--r--tests/ui/nll/snocat-regression.stderr2
-rw-r--r--tests/ui/nll/trait-associated-constant.stderr6
-rw-r--r--tests/ui/nll/ty-outlives/impl-trait-captures.stderr12
-rw-r--r--tests/ui/nll/ty-outlives/projection-implied-bounds.stderr2
-rw-r--r--tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr2
-rw-r--r--tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr2
-rw-r--r--tests/ui/nll/ty-outlives/projection-where-clause-none.stderr2
-rw-r--r--tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr6
-rw-r--r--tests/ui/nll/ty-outlives/ty-param-fn-body.stderr2
-rw-r--r--tests/ui/nll/unused-mut-issue-50343.stderr2
-rw-r--r--tests/ui/nll/user-annotations/ascribed-type-wf.stderr2
-rw-r--r--tests/ui/nll/user-annotations/cast_static_lifetime.stderr2
-rw-r--r--tests/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr2
-rw-r--r--tests/ui/nll/user-annotations/constant-in-expr-normalize.stderr2
-rw-r--r--tests/ui/nll/user-annotations/constant-in-expr-trait-item-1.stderr2
-rw-r--r--tests/ui/nll/user-annotations/constant-in-expr-trait-item-2.stderr2
-rw-r--r--tests/ui/nll/user-annotations/constant-in-expr-trait-item-3.stderr2
-rw-r--r--tests/ui/nll/user-annotations/dump-adt-brace-struct.stderr2
-rw-r--r--tests/ui/nll/user-annotations/inherent-associated-constants.stderr2
-rw-r--r--tests/ui/nll/user-annotations/method-ufcs-inherent-1.stderr2
-rw-r--r--tests/ui/nll/user-annotations/method-ufcs-inherent-3.stderr2
-rw-r--r--tests/ui/nll/user-annotations/promoted-annotation.stderr2
-rw-r--r--tests/ui/nll/user-annotations/type_ascription_static_lifetime.stderr2
-rw-r--r--tests/ui/nll/user-annotations/wf-self-type.stderr2
-rw-r--r--tests/ui/nll/where_clauses_in_functions.stderr2
-rw-r--r--tests/ui/nll/where_clauses_in_structs.stderr2
-rw-r--r--tests/ui/no-capture-arc.stderr2
-rw-r--r--tests/ui/no-link-unknown-crate.stderr2
-rw-r--r--tests/ui/no-reuse-move-arc.stderr2
-rw-r--r--tests/ui/no-send-res-ports.stderr2
-rw-r--r--tests/ui/no_crate_type.stderr2
-rw-r--r--tests/ui/no_send-enum.stderr2
-rw-r--r--tests/ui/no_send-rc.stderr2
-rw-r--r--tests/ui/no_share-enum.stderr2
-rw-r--r--tests/ui/no_share-struct.stderr2
-rw-r--r--tests/ui/noexporttypeexe.stderr2
-rw-r--r--tests/ui/non-constant-expr-for-arr-len.stderr2
-rw-r--r--tests/ui/non-copyable-void.stderr2
-rw-r--r--tests/ui/noncopyable-class.stderr2
-rw-r--r--tests/ui/nonscalar-cast.stderr2
-rw-r--r--tests/ui/not-clone-closure.stderr2
-rw-r--r--tests/ui/not-copy-closure.stderr2
-rw-r--r--tests/ui/not-panic/not-panic-safe-5.stderr2
-rw-r--r--tests/ui/not-panic/not-panic-safe.stderr2
-rw-r--r--tests/ui/numbers-arithmetic/issue-105626.rs1
-rw-r--r--tests/ui/numbers-arithmetic/location-add-assign-overflow.rs8
-rw-r--r--tests/ui/numbers-arithmetic/location-add-overflow.rs7
-rw-r--r--tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs8
-rw-r--r--tests/ui/numbers-arithmetic/location-divide-by-zero.rs9
-rw-r--r--tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs8
-rw-r--r--tests/ui/numbers-arithmetic/location-mod-by-zero.rs7
-rw-r--r--tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs8
-rw-r--r--tests/ui/numbers-arithmetic/location-mul-overflow.rs7
-rw-r--r--tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs8
-rw-r--r--tests/ui/numbers-arithmetic/location-sub-overflow.rs7
-rw-r--r--tests/ui/numbers-arithmetic/overflowing-lsh-1.stderr2
-rw-r--r--tests/ui/numbers-arithmetic/overflowing-lsh-2.stderr2
-rw-r--r--tests/ui/numbers-arithmetic/overflowing-lsh-3.stderr2
-rw-r--r--tests/ui/numbers-arithmetic/overflowing-lsh-4.stderr2
-rw-r--r--tests/ui/numbers-arithmetic/overflowing-rsh-1.stderr2
-rw-r--r--tests/ui/numbers-arithmetic/overflowing-rsh-2.stderr2
-rw-r--r--tests/ui/numbers-arithmetic/overflowing-rsh-3.stderr2
-rw-r--r--tests/ui/numbers-arithmetic/overflowing-rsh-4.stderr2
-rw-r--r--tests/ui/numbers-arithmetic/overflowing-rsh-5.stderr2
-rw-r--r--tests/ui/numbers-arithmetic/overflowing-rsh-6.stderr2
-rw-r--r--tests/ui/numeric/len.stderr2
-rw-r--r--tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic1.stderr2
-rw-r--r--tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic2.stderr2
-rw-r--r--tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic3.stderr2
-rw-r--r--tests/ui/object-lifetime/object-lifetime-default-elision.stderr2
-rw-r--r--tests/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr2
-rw-r--r--tests/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr2
-rw-r--r--tests/ui/object-safety/assoc_type_bounds_implicit_sized.stderr2
-rw-r--r--tests/ui/object-safety/call-when-assoc-ty-is-sized.rs2
-rw-r--r--tests/ui/object-safety/issue-102762.stderr2
-rw-r--r--tests/ui/object-safety/object-safety-associated-consts.curr.stderr2
-rw-r--r--tests/ui/object-safety/object-safety-associated-consts.object_safe_for_dispatch.stderr2
-rw-r--r--tests/ui/object-safety/object-safety-bounds.stderr2
-rw-r--r--tests/ui/object-safety/object-safety-by-value-self-use.stderr2
-rw-r--r--tests/ui/object-safety/object-safety-issue-22040.stderr2
-rw-r--r--tests/ui/object-safety/object-safety-no-static.curr.stderr2
-rw-r--r--tests/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr2
-rw-r--r--tests/ui/object-safety/object-safety-sized-2.curr.stderr2
-rw-r--r--tests/ui/object-safety/object-safety-sized-2.object_safe_for_dispatch.stderr2
-rw-r--r--tests/ui/object-safety/object-safety-sized.curr.stderr2
-rw-r--r--tests/ui/object-safety/object-safety-sized.object_safe_for_dispatch.stderr2
-rw-r--r--tests/ui/object-safety/object-safety-supertrait-mentions-Self.stderr2
-rw-r--r--tests/ui/occurs-check-2.stderr2
-rw-r--r--tests/ui/occurs-check-3.stderr2
-rw-r--r--tests/ui/occurs-check.stderr2
-rw-r--r--tests/ui/offset-of/offset-of-inference.stderr2
-rw-r--r--tests/ui/offset-of/offset-of-self.stderr4
-rw-r--r--tests/ui/on-unimplemented/expected-comma-found-token.stderr2
-rw-r--r--tests/ui/on-unimplemented/feature-gate-on-unimplemented.stderr2
-rw-r--r--tests/ui/on-unimplemented/impl-substs.stderr2
-rw-r--r--tests/ui/on-unimplemented/issue-104140.stderr2
-rw-r--r--tests/ui/once-cant-call-twice-on-heap.stderr2
-rw-r--r--tests/ui/operator-recovery/less-than-greater-than.stderr2
-rw-r--r--tests/ui/operator-recovery/spaceship.stderr2
-rw-r--r--tests/ui/or-patterns/exhaustiveness-pass.rs11
-rw-r--r--tests/ui/or-patterns/exhaustiveness-unreachable-pattern.rs10
-rw-r--r--tests/ui/or-patterns/exhaustiveness-unreachable-pattern.stderr72
-rw-r--r--tests/ui/or-patterns/fn-param-wrap-parens.stderr2
-rw-r--r--tests/ui/or-patterns/inconsistent-modes.stderr4
-rw-r--r--tests/ui/or-patterns/inner-or-pat.or3.stderr2
-rw-r--r--tests/ui/or-patterns/inner-or-pat.or4.stderr2
-rw-r--r--tests/ui/or-patterns/while-parsing-this-or-pattern.stderr2
-rw-r--r--tests/ui/order-dependent-cast-inference.stderr2
-rw-r--r--tests/ui/orphan-check-diagnostics.stderr2
-rw-r--r--tests/ui/osx-frameworks.stderr2
-rw-r--r--tests/ui/overloaded/overloaded-calls-param-vtables.rs1
-rw-r--r--tests/ui/overloaded/overloaded-calls-simple.rs2
-rw-r--r--tests/ui/overloaded/overloaded-calls-zero-args.rs2
-rw-r--r--tests/ui/overloaded/overloaded-deref-count.rs1
-rw-r--r--tests/ui/overloaded/overloaded-deref.rs1
-rw-r--r--tests/ui/packed/dyn-trait.rs21
-rw-r--r--tests/ui/packed/issue-118537-field-offset-ice.rs39
-rw-r--r--tests/ui/packed/issue-118537-field-offset.rs36
-rw-r--r--tests/ui/packed/issue-27060-2.stderr2
-rw-r--r--tests/ui/packed/packed-struct-borrow-element-64bit.stderr2
-rw-r--r--tests/ui/packed/packed-struct-generic-transmute.rs (renamed from tests/ui/packed-struct/packed-struct-generic-transmute.rs)0
-rw-r--r--tests/ui/packed/packed-struct-generic-transmute.stderr (renamed from tests/ui/packed-struct/packed-struct-generic-transmute.stderr)2
-rw-r--r--tests/ui/packed/packed-struct-transmute.rs (renamed from tests/ui/packed-struct/packed-struct-transmute.rs)0
-rw-r--r--tests/ui/packed/packed-struct-transmute.stderr (renamed from tests/ui/packed-struct/packed-struct-transmute.stderr)2
-rw-r--r--tests/ui/panic-handler/panic-handler-bad-signature-1.stderr2
-rw-r--r--tests/ui/panic-handler/panic-handler-bad-signature-2.stderr2
-rw-r--r--tests/ui/panic-handler/panic-handler-bad-signature-3.stderr2
-rw-r--r--tests/ui/panic-handler/panic-handler-bad-signature-4.stderr2
-rw-r--r--tests/ui/panic-handler/panic-handler-bad-signature-5.stderr2
-rw-r--r--tests/ui/panic-handler/panic-handler-duplicate.stderr14
-rw-r--r--tests/ui/panic-handler/panic-handler-requires-panic-info.stderr2
-rw-r--r--tests/ui/panic-handler/panic-handler-std.stderr8
-rw-r--r--tests/ui/panic-handler/panic-handler-with-target-feature.stderr2
-rw-r--r--tests/ui/panic-runtime/abort-link-to-unwind-dylib.stderr2
-rw-r--r--tests/ui/panic-runtime/need-abort-got-unwind.stderr2
-rw-r--r--tests/ui/panic-runtime/need-unwind-got-abort.stderr2
-rw-r--r--tests/ui/panic-runtime/want-unwind-got-abort.stderr2
-rw-r--r--tests/ui/panics/abort-on-panic.rs2
-rw-r--r--tests/ui/paren-span.stderr2
-rw-r--r--tests/ui/parser/assoc/assoc-oddities-1.stderr2
-rw-r--r--tests/ui/parser/assoc/assoc-oddities-2.stderr2
-rw-r--r--tests/ui/parser/assoc/assoc-type-in-type-arg.stderr2
-rw-r--r--tests/ui/parser/attribute/attr-bad-meta-2.stderr2
-rw-r--r--tests/ui/parser/attribute/attr-bad-meta-3.stderr2
-rw-r--r--tests/ui/parser/attribute/attr-bad-meta.stderr2
-rw-r--r--tests/ui/parser/attribute/attr-before-eof.stderr2
-rw-r--r--tests/ui/parser/attribute/attr-dangling-in-fn.stderr2
-rw-r--r--tests/ui/parser/attribute/attr-dangling-in-mod.stderr2
-rw-r--r--tests/ui/parser/attribute/attr-stmt-expr-attr-bad.rs6
-rw-r--r--tests/ui/parser/attribute/attr-stmt-expr-attr-bad.stderr12
-rw-r--r--tests/ui/parser/attribute/attr-with-a-semicolon.stderr2
-rw-r--r--tests/ui/parser/attribute/attr.stderr2
-rw-r--r--tests/ui/parser/attribute/attribute-with-no-generics-in-parameter-list.stderr2
-rw-r--r--tests/ui/parser/attribute/attrs-after-extern-mod.stderr2
-rw-r--r--tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.rs19
-rw-r--r--tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.stderr54
-rw-r--r--tests/ui/parser/bad-escape-suggest-raw-string.stderr2
-rw-r--r--tests/ui/parser/bad-let-as-field.stderr2
-rw-r--r--tests/ui/parser/bad-let-else-statement.rs164
-rw-r--r--tests/ui/parser/bad-let-else-statement.stderr232
-rw-r--r--tests/ui/parser/bad-lit-suffixes.rs5
-rw-r--r--tests/ui/parser/bad-lit-suffixes.stderr27
-rw-r--r--tests/ui/parser/bad-match.stderr2
-rw-r--r--tests/ui/parser/bad-name.stderr2
-rw-r--r--tests/ui/parser/bad-pointer-type.stderr6
-rw-r--r--tests/ui/parser/bad-struct-following-where.stderr2
-rw-r--r--tests/ui/parser/bad-value-ident-false.stderr2
-rw-r--r--tests/ui/parser/bad-value-ident-true.stderr2
-rw-r--r--tests/ui/parser/better-expected.stderr2
-rw-r--r--tests/ui/parser/bind-struct-early-modifiers.stderr2
-rw-r--r--tests/ui/parser/bound-single-question-mark.stderr2
-rw-r--r--tests/ui/parser/bounds-lifetime-1.stderr2
-rw-r--r--tests/ui/parser/bounds-lifetime-2.stderr2
-rw-r--r--tests/ui/parser/bounds-lifetime-where-1.stderr2
-rw-r--r--tests/ui/parser/bounds-lifetime-where.stderr2
-rw-r--r--tests/ui/parser/bounds-lifetime.stderr2
-rw-r--r--tests/ui/parser/bounds-type-where.stderr2
-rw-r--r--tests/ui/parser/brace-in-let-chain.rs58
-rw-r--r--tests/ui/parser/brace-in-let-chain.stderr65
-rw-r--r--tests/ui/parser/can-begin-expr-check.stderr2
-rw-r--r--tests/ui/parser/char/whitespace-character-literal.stderr2
-rw-r--r--tests/ui/parser/class-implements-bad-trait.stderr2
-rw-r--r--tests/ui/parser/closure-return-syntax.stderr2
-rw-r--r--tests/ui/parser/column-offset-1-based.stderr2
-rw-r--r--tests/ui/parser/deep-unmatched-angle-brackets.stderr2
-rw-r--r--tests/ui/parser/defaultness-invalid-places-fail-semantic.rs (renamed from tests/ui/parser/trait-item-with-defaultness-fail-semantic.rs)4
-rw-r--r--tests/ui/parser/defaultness-invalid-places-fail-semantic.stderr (renamed from tests/ui/parser/trait-item-with-defaultness-fail-semantic.stderr)40
-rw-r--r--tests/ui/parser/deli-ident-issue-1.stderr2
-rw-r--r--tests/ui/parser/diff-markers/enum-2.stderr2
-rw-r--r--tests/ui/parser/diff-markers/enum.stderr2
-rw-r--r--tests/ui/parser/diff-markers/fn-arg.stderr2
-rw-r--r--tests/ui/parser/diff-markers/item-with-attr.stderr2
-rw-r--r--tests/ui/parser/diff-markers/item.stderr2
-rw-r--r--tests/ui/parser/diff-markers/statement.stderr2
-rw-r--r--tests/ui/parser/diff-markers/struct-expr.stderr2
-rw-r--r--tests/ui/parser/diff-markers/struct.stderr2
-rw-r--r--tests/ui/parser/diff-markers/trait-item.stderr2
-rw-r--r--tests/ui/parser/diff-markers/tuple-struct.stderr2
-rw-r--r--tests/ui/parser/diff-markers/unclosed-delims-in-macro.stderr2
-rw-r--r--tests/ui/parser/diff-markers/unclosed-delims.stderr2
-rw-r--r--tests/ui/parser/diff-markers/use-statement.stderr2
-rw-r--r--tests/ui/parser/do-not-suggest-semicolon-before-array.stderr2
-rw-r--r--tests/ui/parser/do-not-suggest-semicolon-between-macro-without-exclamation-mark-and-array.stderr2
-rw-r--r--tests/ui/parser/doc-before-attr.stderr2
-rw-r--r--tests/ui/parser/doc-before-eof.stderr2
-rw-r--r--tests/ui/parser/doc-before-extern-rbrace.stderr2
-rw-r--r--tests/ui/parser/doc-before-fn-rbrace.stderr2
-rw-r--r--tests/ui/parser/doc-before-identifier.stderr2
-rw-r--r--tests/ui/parser/doc-before-mod-rbrace.stderr2
-rw-r--r--tests/ui/parser/doc-before-rbrace.stderr2
-rw-r--r--tests/ui/parser/doc-before-semi.stderr2
-rw-r--r--tests/ui/parser/doc-before-struct-rbrace-1.stderr2
-rw-r--r--tests/ui/parser/doc-before-struct-rbrace-2.stderr2
-rw-r--r--tests/ui/parser/doc-inside-trait-item.stderr2
-rw-r--r--tests/ui/parser/dotdotdot-expr.stderr2
-rw-r--r--tests/ui/parser/double-pointer.stderr6
-rw-r--r--tests/ui/parser/duplicate-visibility.stderr2
-rw-r--r--tests/ui/parser/empty-impl-semicolon.stderr2
-rw-r--r--tests/ui/parser/extern-crate-unexpected-token.stderr2
-rw-r--r--tests/ui/parser/extern-expected-fn-or-brace.stderr2
-rw-r--r--tests/ui/parser/extern-foreign-crate.stderr2
-rw-r--r--tests/ui/parser/extern-no-fn.stderr2
-rw-r--r--tests/ui/parser/float-field-interpolated.rs4
-rw-r--r--tests/ui/parser/float-field-interpolated.stderr4
-rw-r--r--tests/ui/parser/float-field.stderr6
-rw-r--r--tests/ui/parser/fn-colon-return-type.stderr2
-rw-r--r--tests/ui/parser/fn-defined-using-def.stderr2
-rw-r--r--tests/ui/parser/fn-defined-using-fun.stderr2
-rw-r--r--tests/ui/parser/fn-defined-using-func.stderr2
-rw-r--r--tests/ui/parser/fn-defined-using-function.stderr2
-rw-r--r--tests/ui/parser/generic-statics.stderr2
-rw-r--r--tests/ui/parser/if-in-in.stderr2
-rw-r--r--tests/ui/parser/impl-item-const-semantic-fail.stderr2
-rw-r--r--tests/ui/parser/impl-item-fn-no-body-semantic-fail.stderr2
-rw-r--r--tests/ui/parser/impl-on-unsized-typo.stderr2
-rw-r--r--tests/ui/parser/import-from-path.stderr2
-rw-r--r--tests/ui/parser/import-from-rename.stderr2
-rw-r--r--tests/ui/parser/import-glob-path.stderr2
-rw-r--r--tests/ui/parser/import-glob-rename.stderr2
-rw-r--r--tests/ui/parser/inner-attr-after-doc-comment.stderr2
-rw-r--r--tests/ui/parser/inner-attr.stderr2
-rw-r--r--tests/ui/parser/int-literal-too-large-span.stderr2
-rw-r--r--tests/ui/parser/integer-literal-start-ident.stderr2
-rw-r--r--tests/ui/parser/intersection-patterns-2.stderr2
-rw-r--r--tests/ui/parser/issues/issue-100197-mut-let.stderr2
-rw-r--r--tests/ui/parser/issues/issue-101477-let.stderr2
-rw-r--r--tests/ui/parser/issues/issue-101540.stderr2
-rw-r--r--tests/ui/parser/issues/issue-102182-impl-trait-recover.stderr2
-rw-r--r--tests/ui/parser/issues/issue-103451.stderr2
-rw-r--r--tests/ui/parser/issues/issue-10392-2.stderr2
-rw-r--r--tests/ui/parser/issues/issue-10392.stderr2
-rw-r--r--tests/ui/parser/issues/issue-104620.rs2
-rw-r--r--tests/ui/parser/issues/issue-104620.stderr8
-rw-r--r--tests/ui/parser/issues/issue-105366.stderr2
-rw-r--r--tests/ui/parser/issues/issue-10636-1.stderr2
-rw-r--r--tests/ui/parser/issues/issue-10636-2.stderr2
-rw-r--r--tests/ui/parser/issues/issue-107705.stderr2
-rw-r--r--tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.stderr2
-rw-r--r--tests/ui/parser/issues/issue-108242-semicolon-recovery.stderr2
-rw-r--r--tests/ui/parser/issues/issue-111148.stderr2
-rw-r--r--tests/ui/parser/issues/issue-111416.stderr2
-rw-r--r--tests/ui/parser/issues/issue-113110-non-item-at-module-root.stderr2
-rw-r--r--tests/ui/parser/issues/issue-113203.stderr2
-rw-r--r--tests/ui/parser/issues/issue-113342.stderr2
-rw-r--r--tests/ui/parser/issues/issue-114219.stderr2
-rw-r--r--tests/ui/parser/issues/issue-118530-ice.rs15
-rw-r--r--tests/ui/parser/issues/issue-118530-ice.stderr43
-rw-r--r--tests/ui/parser/issues/issue-118531-ice.rs10
-rw-r--r--tests/ui/parser/issues/issue-118531-ice.stderr38
-rw-r--r--tests/ui/parser/issues/issue-14303-fncall.full.stderr2
-rw-r--r--tests/ui/parser/issues/issue-14303-fncall.generic_arg.stderr2
-rw-r--r--tests/ui/parser/issues/issue-15914.stderr2
-rw-r--r--tests/ui/parser/issues/issue-15980.stderr2
-rw-r--r--tests/ui/parser/issues/issue-1655.stderr2
-rw-r--r--tests/ui/parser/issues/issue-17718-const-mut.stderr2
-rw-r--r--tests/ui/parser/issues/issue-17904-2.stderr2
-rw-r--r--tests/ui/parser/issues/issue-17904.stderr2
-rw-r--r--tests/ui/parser/issues/issue-1802-1.stderr2
-rw-r--r--tests/ui/parser/issues/issue-1802-2.stderr2
-rw-r--r--tests/ui/parser/issues/issue-19398.stderr2
-rw-r--r--tests/ui/parser/issues/issue-20616-1.stderr2
-rw-r--r--tests/ui/parser/issues/issue-20616-2.stderr2
-rw-r--r--tests/ui/parser/issues/issue-20616-3.stderr2
-rw-r--r--tests/ui/parser/issues/issue-20616-4.stderr2
-rw-r--r--tests/ui/parser/issues/issue-20616-5.stderr2
-rw-r--r--tests/ui/parser/issues/issue-20616-6.stderr2
-rw-r--r--tests/ui/parser/issues/issue-20616-7.stderr2
-rw-r--r--tests/ui/parser/issues/issue-20616-8.stderr2
-rw-r--r--tests/ui/parser/issues/issue-20616-9.stderr2
-rw-r--r--tests/ui/parser/issues/issue-20711-2.stderr2
-rw-r--r--tests/ui/parser/issues/issue-20711.stderr2
-rw-r--r--tests/ui/parser/issues/issue-21146.stderr2
-rw-r--r--tests/ui/parser/issues/issue-21153.stderr2
-rw-r--r--tests/ui/parser/issues/issue-22647.stderr2
-rw-r--r--tests/ui/parser/issues/issue-22712.stderr2
-rw-r--r--tests/ui/parser/issues/issue-2354-1.stderr2
-rw-r--r--tests/ui/parser/issues/issue-2354.stderr2
-rw-r--r--tests/ui/parser/issues/issue-24197.stderr2
-rw-r--r--tests/ui/parser/issues/issue-24375.rs2
-rw-r--r--tests/ui/parser/issues/issue-24375.stderr6
-rw-r--r--tests/ui/parser/issues/issue-24780.stderr2
-rw-r--r--tests/ui/parser/issues/issue-3036.stderr2
-rw-r--r--tests/ui/parser/issues/issue-31804.stderr2
-rw-r--r--tests/ui/parser/issues/issue-32214.stderr2
-rw-r--r--tests/ui/parser/issues/issue-32446.stderr2
-rw-r--r--tests/ui/parser/issues/issue-32501.stderr4
-rw-r--r--tests/ui/parser/issues/issue-33262.stderr2
-rw-r--r--tests/ui/parser/issues/issue-33455.stderr2
-rw-r--r--tests/ui/parser/issues/issue-34222-1.stderr2
-rw-r--r--tests/ui/parser/issues/issue-34255-1.stderr2
-rw-r--r--tests/ui/parser/issues/issue-39616.stderr2
-rw-r--r--tests/ui/parser/issues/issue-43692.stderr2
-rw-r--r--tests/ui/parser/issues/issue-44021.stderr2
-rw-r--r--tests/ui/parser/issues/issue-44406.stderr2
-rw-r--r--tests/ui/parser/issues/issue-45296.stderr2
-rw-r--r--tests/ui/parser/issues/issue-46186.stderr2
-rw-r--r--tests/ui/parser/issues/issue-48508.rs1
-rw-r--r--tests/ui/parser/issues/issue-48636.stderr2
-rw-r--r--tests/ui/parser/issues/issue-51602.stderr2
-rw-r--r--tests/ui/parser/issues/issue-5544-a.stderr2
-rw-r--r--tests/ui/parser/issues/issue-5544-b.stderr2
-rw-r--r--tests/ui/parser/issues/issue-56031.stderr2
-rw-r--r--tests/ui/parser/issues/issue-57198.stderr2
-rw-r--r--tests/ui/parser/issues/issue-5806.stderr2
-rw-r--r--tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs2
-rw-r--r--tests/ui/parser/issues/issue-58094-missing-right-square-bracket.stderr2
-rw-r--r--tests/ui/parser/issues/issue-58856-1.stderr2
-rw-r--r--tests/ui/parser/issues/issue-58856-2.stderr2
-rw-r--r--tests/ui/parser/issues/issue-60075.stderr2
-rw-r--r--tests/ui/parser/issues/issue-61858.stderr2
-rw-r--r--tests/ui/parser/issues/issue-62524.rs2
-rw-r--r--tests/ui/parser/issues/issue-62524.stderr2
-rw-r--r--tests/ui/parser/issues/issue-62546.stderr2
-rw-r--r--tests/ui/parser/issues/issue-62554.stderr2
-rw-r--r--tests/ui/parser/issues/issue-62660.stderr2
-rw-r--r--tests/ui/parser/issues/issue-62881.stderr2
-rw-r--r--tests/ui/parser/issues/issue-62894.stderr2
-rw-r--r--tests/ui/parser/issues/issue-63135.rs2
-rw-r--r--tests/ui/parser/issues/issue-63135.stderr2
-rw-r--r--tests/ui/parser/issues/issue-65122-mac-invoc-in-mut-patterns.stderr4
-rw-r--r--tests/ui/parser/issues/issue-6610.stderr2
-rw-r--r--tests/ui/parser/issues/issue-66357-unexpected-unreachable.stderr2
-rw-r--r--tests/ui/parser/issues/issue-68091-unicode-ident-after-if.stderr2
-rw-r--r--tests/ui/parser/issues/issue-68092-unicode-ident-after-incomplete-expr.stderr2
-rw-r--r--tests/ui/parser/issues/issue-68890.stderr6
-rw-r--r--tests/ui/parser/issues/issue-68987-unmatch-issue-1.stderr2
-rw-r--r--tests/ui/parser/issues/issue-68987-unmatch-issue.stderr2
-rw-r--r--tests/ui/parser/issues/issue-69259.stderr2
-rw-r--r--tests/ui/parser/issues/issue-70552-ascription-in-parens-after-call.stderr2
-rw-r--r--tests/ui/parser/issues/issue-70583-block-is-empty-1.stderr2
-rw-r--r--tests/ui/parser/issues/issue-70583-block-is-empty-2.stderr2
-rw-r--r--tests/ui/parser/issues/issue-72253.stderr2
-rw-r--r--tests/ui/parser/issues/issue-72373.stderr2
-rw-r--r--tests/ui/parser/issues/issue-76437-async.stderr2
-rw-r--r--tests/ui/parser/issues/issue-76437-const-async-unsafe.stderr2
-rw-r--r--tests/ui/parser/issues/issue-76437-const-async.stderr2
-rw-r--r--tests/ui/parser/issues/issue-76437-const.stderr2
-rw-r--r--tests/ui/parser/issues/issue-76437-pub-crate-unsafe.stderr2
-rw-r--r--tests/ui/parser/issues/issue-76437-unsafe.stderr2
-rw-r--r--tests/ui/parser/issues/issue-76597.stderr2
-rw-r--r--tests/ui/parser/issues/issue-7970b.stderr2
-rw-r--r--tests/ui/parser/issues/issue-81806.stderr2
-rw-r--r--tests/ui/parser/issues/issue-83639.stderr2
-rw-r--r--tests/ui/parser/issues/issue-84104.stderr2
-rw-r--r--tests/ui/parser/issues/issue-84148-2.stderr2
-rw-r--r--tests/ui/parser/issues/issue-8537.stderr2
-rw-r--r--tests/ui/parser/issues/issue-86895.stderr2
-rw-r--r--tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.stderr2
-rw-r--r--tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.stderr2
-rw-r--r--tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.stderr2
-rw-r--r--tests/ui/parser/issues/issue-87694-duplicated-pub.stderr2
-rw-r--r--tests/ui/parser/issues/issue-87694-misplaced-pub.stderr2
-rw-r--r--tests/ui/parser/issues/issue-87812-path.stderr2
-rw-r--r--tests/ui/parser/issues/issue-87812.stderr2
-rw-r--r--tests/ui/parser/issues/issue-88770.stderr2
-rw-r--r--tests/ui/parser/issues/issue-88818.stderr2
-rw-r--r--tests/ui/parser/issues/issue-89388.stderr2
-rw-r--r--tests/ui/parser/issues/issue-89574.stderr2
-rw-r--r--tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.stderr2
-rw-r--r--tests/ui/parser/issues/issue-91421.stderr2
-rw-r--r--tests/ui/parser/issues/issue-93867.stderr2
-rw-r--r--tests/ui/parser/issues/issue-98601-delimiter-error-1.stderr2
-rw-r--r--tests/ui/parser/issues/issue-98601-delimiter-error-unexpected-close.stderr2
-rw-r--r--tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.stderr2
-rw-r--r--tests/ui/parser/issues/recover-ge-as-fat-arrow.fixed7
-rw-r--r--tests/ui/parser/issues/recover-ge-as-fat-arrow.rs7
-rw-r--r--tests/ui/parser/issues/recover-ge-as-fat-arrow.stderr25
-rw-r--r--tests/ui/parser/keyword-abstract.stderr2
-rw-r--r--tests/ui/parser/keyword-as-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-break-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-const-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-continue-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-else-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-enum-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-final.stderr2
-rw-r--r--tests/ui/parser/keyword-fn-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-for-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-if-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-impl-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-in-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-let-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-loop-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-match-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-mod-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-move-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-mut-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-override.stderr2
-rw-r--r--tests/ui/parser/keyword-pub-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-ref-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-return-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-static-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-struct-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-trait-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-try-as-identifier-edition2018.stderr2
-rw-r--r--tests/ui/parser/keyword-type-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-typeof.stderr2
-rw-r--r--tests/ui/parser/keyword-unsafe-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-use-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-where-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword-while-as-identifier.stderr2
-rw-r--r--tests/ui/parser/keyword.stderr2
-rw-r--r--tests/ui/parser/lifetime-semicolon.stderr2
-rw-r--r--tests/ui/parser/lit-err-in-macro.stderr2
-rw-r--r--tests/ui/parser/macro-bad-delimiter-ident.stderr2
-rw-r--r--tests/ui/parser/macro-keyword.stderr2
-rw-r--r--tests/ui/parser/macro-mismatched-delim-brace-paren.stderr2
-rw-r--r--tests/ui/parser/macro/bad-macro-argument.stderr2
-rw-r--r--tests/ui/parser/macro/issue-37113.stderr2
-rw-r--r--tests/ui/parser/macro/issue-37234.stderr2
-rw-r--r--tests/ui/parser/macro/macro-doc-comments-1.stderr2
-rw-r--r--tests/ui/parser/macro/macro-doc-comments-2.stderr2
-rw-r--r--tests/ui/parser/macro/macro-expand-to-match-arm.rs8
-rw-r--r--tests/ui/parser/macro/macro-expand-to-match-arm.stderr18
-rw-r--r--tests/ui/parser/match-arm-without-body.rs77
-rw-r--r--tests/ui/parser/match-arm-without-body.stderr110
-rw-r--r--tests/ui/parser/match-arrows-block-then-binop.stderr2
-rw-r--r--tests/ui/parser/match-refactor-to-expr.stderr2
-rw-r--r--tests/ui/parser/mbe_missing_right_paren.stderr2
-rw-r--r--tests/ui/parser/method-call-on-struct-literal-in-if-condition.stderr2
-rw-r--r--tests/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.stderr2
-rw-r--r--tests/ui/parser/mismatched-braces/missing-close-brace-in-struct.stderr2
-rw-r--r--tests/ui/parser/mismatched-braces/missing-close-brace-in-trait.stderr2
-rw-r--r--tests/ui/parser/mismatched-delim-brace-empty-block.stderr2
-rw-r--r--tests/ui/parser/missing-closing-angle-bracket-eq-constraint.stderr10
-rw-r--r--tests/ui/parser/missing-closing-angle-bracket-struct-field-ty.stderr2
-rw-r--r--tests/ui/parser/missing-expression-in-for-loop.stderr2
-rw-r--r--tests/ui/parser/missing-semicolon.stderr2
-rw-r--r--tests/ui/parser/missing_right_paren.rs2
-rw-r--r--tests/ui/parser/missing_right_paren.stderr2
-rw-r--r--tests/ui/parser/misspelled-macro-rules.stderr2
-rw-r--r--tests/ui/parser/mod_file_with_path_attr.stderr2
-rw-r--r--tests/ui/parser/multiline-comment-line-tracking.stderr2
-rw-r--r--tests/ui/parser/multitrait.stderr2
-rw-r--r--tests/ui/parser/mut-patterns.rs2
-rw-r--r--tests/ui/parser/mut-patterns.stderr8
-rw-r--r--tests/ui/parser/nested-bad-turbofish.stderr2
-rw-r--r--tests/ui/parser/nested-missing-closing-angle-bracket.stderr2
-rw-r--r--tests/ui/parser/new-unicode-escapes-1.stderr2
-rw-r--r--tests/ui/parser/new-unicode-escapes-2.stderr2
-rw-r--r--tests/ui/parser/new-unicode-escapes-4.stderr2
-rw-r--r--tests/ui/parser/obsolete-syntax-impl-for-dotdot.stderr2
-rw-r--r--tests/ui/parser/omitted-arg-in-item-fn.stderr2
-rw-r--r--tests/ui/parser/paamayim-nekudotayim.stderr2
-rw-r--r--tests/ui/parser/parser-recovery-1.stderr2
-rw-r--r--tests/ui/parser/parser-recovery-2.stderr2
-rw-r--r--tests/ui/parser/pat-lt-bracket-1.rs2
-rw-r--r--tests/ui/parser/pat-lt-bracket-1.stderr6
-rw-r--r--tests/ui/parser/pat-lt-bracket-2.stderr2
-rw-r--r--tests/ui/parser/pat-lt-bracket-3.stderr2
-rw-r--r--tests/ui/parser/pat-lt-bracket-4.stderr2
-rw-r--r--tests/ui/parser/pat-lt-bracket-5.stderr2
-rw-r--r--tests/ui/parser/pat-ranges-1.stderr2
-rw-r--r--tests/ui/parser/pat-ranges-2.stderr2
-rw-r--r--tests/ui/parser/pat-ranges-3.stderr2
-rw-r--r--tests/ui/parser/pat-ranges-4.stderr2
-rw-r--r--tests/ui/parser/pat-ref-enum.stderr2
-rw-r--r--tests/ui/parser/pat-tuple-1.stderr2
-rw-r--r--tests/ui/parser/pat-tuple-3.stderr2
-rw-r--r--tests/ui/parser/pub-method-macro.stderr2
-rw-r--r--tests/ui/parser/public-instead-of-pub-1.stderr2
-rw-r--r--tests/ui/parser/public-instead-of-pub-2.stderr2
-rw-r--r--tests/ui/parser/public-instead-of-pub-3.stderr2
-rw-r--r--tests/ui/parser/public-instead-of-pub.stderr2
-rw-r--r--tests/ui/parser/qualified-path-in-turbofish.stderr2
-rw-r--r--tests/ui/parser/range-3.stderr2
-rw-r--r--tests/ui/parser/range-4.stderr2
-rw-r--r--tests/ui/parser/range-inclusive-extra-equals.stderr2
-rw-r--r--tests/ui/parser/range_inclusive.stderr2
-rw-r--r--tests/ui/parser/raw/issue-70677-panic-on-unterminated-raw-str-at-eof.stderr2
-rw-r--r--tests/ui/parser/raw/raw-byte-string-eof.stderr2
-rw-r--r--tests/ui/parser/raw/raw-literal-self.stderr2
-rw-r--r--tests/ui/parser/raw/raw-literal-underscore.stderr2
-rw-r--r--tests/ui/parser/raw/raw-str-delim.stderr2
-rw-r--r--tests/ui/parser/raw/raw-str-unterminated.stderr2
-rw-r--r--tests/ui/parser/raw/raw-string-2.stderr2
-rw-r--r--tests/ui/parser/raw/raw-string.stderr2
-rw-r--r--tests/ui/parser/raw/too-many-hash.stderr2
-rw-r--r--tests/ui/parser/recover-enum2.stderr16
-rw-r--r--tests/ui/parser/recover-for-loop-parens-around-head.stderr27
-rw-r--r--tests/ui/parser/recover-hrtb-before-dyn-impl-kw.rs13
-rw-r--r--tests/ui/parser/recover-hrtb-before-dyn-impl-kw.stderr32
-rw-r--r--tests/ui/parser/recover/binding-name-starting-with-number.rs (renamed from tests/ui/parser/issues/issue-104088.rs)6
-rw-r--r--tests/ui/parser/recover/binding-name-starting-with-number.stderr (renamed from tests/ui/parser/issues/issue-104088.stderr)18
-rw-r--r--tests/ui/parser/recover/recover-assoc-const-constraint.rs (renamed from tests/ui/parser/recover-assoc-const-constraint.rs)0
-rw-r--r--tests/ui/parser/recover/recover-assoc-const-constraint.stderr (renamed from tests/ui/parser/recover-assoc-const-constraint.stderr)0
-rw-r--r--tests/ui/parser/recover/recover-assoc-eq-missing-term.rs (renamed from tests/ui/parser/recover-assoc-eq-missing-term.rs)0
-rw-r--r--tests/ui/parser/recover/recover-assoc-eq-missing-term.stderr (renamed from tests/ui/parser/recover-assoc-eq-missing-term.stderr)2
-rw-r--r--tests/ui/parser/recover/recover-assoc-lifetime-constraint.rs (renamed from tests/ui/parser/recover-assoc-lifetime-constraint.rs)0
-rw-r--r--tests/ui/parser/recover/recover-assoc-lifetime-constraint.stderr (renamed from tests/ui/parser/recover-assoc-lifetime-constraint.stderr)2
-rw-r--r--tests/ui/parser/recover/recover-const-async-fn-ptr.rs (renamed from tests/ui/parser/recover-const-async-fn-ptr.rs)0
-rw-r--r--tests/ui/parser/recover/recover-const-async-fn-ptr.stderr (renamed from tests/ui/parser/recover-const-async-fn-ptr.stderr)0
-rw-r--r--tests/ui/parser/recover/recover-enum.rs (renamed from tests/ui/parser/recover-enum.rs)0
-rw-r--r--tests/ui/parser/recover/recover-enum.stderr (renamed from tests/ui/parser/recover-enum.stderr)0
-rw-r--r--tests/ui/parser/recover/recover-enum2.rs (renamed from tests/ui/parser/recover-enum2.rs)3
-rw-r--r--tests/ui/parser/recover/recover-enum2.stderr37
-rw-r--r--tests/ui/parser/recover/recover-field-extra-angle-brackets-in-struct-with-a-field.rs (renamed from tests/ui/parser/recover-field-extra-angle-brackets-in-struct-with-a-field.rs)0
-rw-r--r--tests/ui/parser/recover/recover-field-extra-angle-brackets-in-struct-with-a-field.stderr (renamed from tests/ui/parser/recover-field-extra-angle-brackets-in-struct-with-a-field.stderr)2
-rw-r--r--tests/ui/parser/recover/recover-field-extra-angle-brackets.rs (renamed from tests/ui/parser/recover-field-extra-angle-brackets.rs)0
-rw-r--r--tests/ui/parser/recover/recover-field-extra-angle-brackets.stderr (renamed from tests/ui/parser/recover-field-extra-angle-brackets.stderr)2
-rw-r--r--tests/ui/parser/recover/recover-field-semi.rs (renamed from tests/ui/parser/recover-field-semi.rs)0
-rw-r--r--tests/ui/parser/recover/recover-field-semi.stderr (renamed from tests/ui/parser/recover-field-semi.stderr)0
-rw-r--r--tests/ui/parser/recover/recover-fn-ptr-with-generics.rs (renamed from tests/ui/parser/recover-fn-ptr-with-generics.rs)0
-rw-r--r--tests/ui/parser/recover/recover-fn-ptr-with-generics.stderr (renamed from tests/ui/parser/recover-fn-ptr-with-generics.stderr)0
-rw-r--r--tests/ui/parser/recover/recover-fn-trait-from-fn-kw.rs (renamed from tests/ui/parser/recover-fn-trait-from-fn-kw.rs)0
-rw-r--r--tests/ui/parser/recover/recover-fn-trait-from-fn-kw.stderr (renamed from tests/ui/parser/recover-fn-trait-from-fn-kw.stderr)0
-rw-r--r--tests/ui/parser/recover/recover-for-loop-parens-around-head.fixed15
-rw-r--r--tests/ui/parser/recover/recover-for-loop-parens-around-head.rs (renamed from tests/ui/parser/recover-for-loop-parens-around-head.rs)8
-rw-r--r--tests/ui/parser/recover/recover-for-loop-parens-around-head.stderr26
-rw-r--r--tests/ui/parser/recover/recover-from-bad-variant.rs (renamed from tests/ui/parser/recover-from-bad-variant.rs)0
-rw-r--r--tests/ui/parser/recover/recover-from-bad-variant.stderr (renamed from tests/ui/parser/recover-from-bad-variant.stderr)0
-rw-r--r--tests/ui/parser/recover/recover-from-homoglyph.rs (renamed from tests/ui/parser/recover-from-homoglyph.rs)0
-rw-r--r--tests/ui/parser/recover/recover-from-homoglyph.stderr (renamed from tests/ui/parser/recover-from-homoglyph.stderr)0
-rw-r--r--tests/ui/parser/recover/recover-labeled-non-block-expr.fixed (renamed from tests/ui/parser/recover-labeled-non-block-expr.fixed)0
-rw-r--r--tests/ui/parser/recover/recover-labeled-non-block-expr.rs (renamed from tests/ui/parser/recover-labeled-non-block-expr.rs)0
-rw-r--r--tests/ui/parser/recover/recover-labeled-non-block-expr.stderr (renamed from tests/ui/parser/recover-labeled-non-block-expr.stderr)0
-rw-r--r--tests/ui/parser/recover/recover-missing-semi-before-item.fixed (renamed from tests/ui/parser/recover-missing-semi-before-item.fixed)0
-rw-r--r--tests/ui/parser/recover/recover-missing-semi-before-item.rs (renamed from tests/ui/parser/recover-missing-semi-before-item.rs)0
-rw-r--r--tests/ui/parser/recover/recover-missing-semi-before-item.stderr (renamed from tests/ui/parser/recover-missing-semi-before-item.stderr)0
-rw-r--r--tests/ui/parser/recover/recover-missing-semi.rs (renamed from tests/ui/parser/recover-missing-semi.rs)0
-rw-r--r--tests/ui/parser/recover/recover-missing-semi.stderr (renamed from tests/ui/parser/recover-missing-semi.stderr)0
-rw-r--r--tests/ui/parser/recover/recover-parens-around-match-arm-head.fixed12
-rw-r--r--tests/ui/parser/recover/recover-parens-around-match-arm-head.rs12
-rw-r--r--tests/ui/parser/recover/recover-parens-around-match-arm-head.stderr28
-rw-r--r--tests/ui/parser/recover/recover-quantified-closure.rs (renamed from tests/ui/parser/recover-quantified-closure.rs)0
-rw-r--r--tests/ui/parser/recover/recover-quantified-closure.stderr (renamed from tests/ui/parser/recover-quantified-closure.stderr)0
-rw-r--r--tests/ui/parser/recover/recover-range-pats.rs (renamed from tests/ui/parser/recover-range-pats.rs)0
-rw-r--r--tests/ui/parser/recover/recover-range-pats.stderr (renamed from tests/ui/parser/recover-range-pats.stderr)0
-rw-r--r--tests/ui/parser/recover/recover-ref-dyn-mut.rs (renamed from tests/ui/parser/recover-ref-dyn-mut.rs)0
-rw-r--r--tests/ui/parser/recover/recover-ref-dyn-mut.stderr (renamed from tests/ui/parser/recover-ref-dyn-mut.stderr)0
-rw-r--r--tests/ui/parser/recover/recover-struct.rs (renamed from tests/ui/parser/recover-struct.rs)0
-rw-r--r--tests/ui/parser/recover/recover-struct.stderr (renamed from tests/ui/parser/recover-struct.stderr)2
-rw-r--r--tests/ui/parser/recover/recover-tuple-pat.rs (renamed from tests/ui/parser/recover-tuple-pat.rs)0
-rw-r--r--tests/ui/parser/recover/recover-tuple-pat.stderr (renamed from tests/ui/parser/recover-tuple-pat.stderr)2
-rw-r--r--tests/ui/parser/recover/recover-tuple.rs (renamed from tests/ui/parser/recover-tuple.rs)0
-rw-r--r--tests/ui/parser/recover/recover-tuple.stderr (renamed from tests/ui/parser/recover-tuple.stderr)0
-rw-r--r--tests/ui/parser/recover/recover-unticked-labels.fixed (renamed from tests/ui/parser/recover-unticked-labels.fixed)0
-rw-r--r--tests/ui/parser/recover/recover-unticked-labels.rs (renamed from tests/ui/parser/recover-unticked-labels.rs)0
-rw-r--r--tests/ui/parser/recover/recover-unticked-labels.stderr (renamed from tests/ui/parser/recover-unticked-labels.stderr)0
-rw-r--r--tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed (renamed from tests/ui/parser/recover-where-clause-before-tuple-struct-body-0.fixed)0
-rw-r--r--tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs (renamed from tests/ui/parser/recover-where-clause-before-tuple-struct-body-0.rs)0
-rw-r--r--tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.stderr (renamed from tests/ui/parser/recover-where-clause-before-tuple-struct-body-0.stderr)0
-rw-r--r--tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-1.rs (renamed from tests/ui/parser/recover-where-clause-before-tuple-struct-body-1.rs)0
-rw-r--r--tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-1.stderr (renamed from tests/ui/parser/recover-where-clause-before-tuple-struct-body-1.stderr)0
-rw-r--r--tests/ui/parser/recovered-struct-variant.stderr2
-rw-r--r--tests/ui/parser/regions-out-of-scope-slice.stderr2
-rw-r--r--tests/ui/parser/removed-syntax-closure-lifetime.stderr2
-rw-r--r--tests/ui/parser/removed-syntax-enum-newtype.stderr2
-rw-r--r--tests/ui/parser/removed-syntax-field-let.stderr2
-rw-r--r--tests/ui/parser/removed-syntax-field-semicolon.stderr2
-rw-r--r--tests/ui/parser/removed-syntax-fixed-vec.stderr2
-rw-r--r--tests/ui/parser/removed-syntax-mode.stderr2
-rw-r--r--tests/ui/parser/removed-syntax-mut-vec-expr.stderr2
-rw-r--r--tests/ui/parser/removed-syntax-mut-vec-ty.stderr2
-rw-r--r--tests/ui/parser/removed-syntax-ptr-lifetime.stderr2
-rw-r--r--tests/ui/parser/removed-syntax-record.stderr2
-rw-r--r--tests/ui/parser/removed-syntax-uniq-mut-expr.stderr2
-rw-r--r--tests/ui/parser/removed-syntax-uniq-mut-ty.stderr2
-rw-r--r--tests/ui/parser/removed-syntax-with-1.stderr2
-rw-r--r--tests/ui/parser/self-in-function-arg.stderr2
-rw-r--r--tests/ui/parser/shebang/issue-71471-ignore-tidy.stderr2
-rw-r--r--tests/ui/parser/shebang/shebang-doc-comment.stderr2
-rw-r--r--tests/ui/parser/shebang/shebang-must-start-file.stderr2
-rw-r--r--tests/ui/parser/similar-tokens.stderr2
-rw-r--r--tests/ui/parser/struct-filed-with-attr.stderr2
-rw-r--r--tests/ui/parser/struct-literal-in-match-discriminant.stderr2
-rw-r--r--tests/ui/parser/suggest-assoc-const.stderr2
-rw-r--r--tests/ui/parser/suggest-const-for-global-var.stderr2
-rw-r--r--tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.stderr2
-rw-r--r--tests/ui/parser/suggest-semi-in-array.stderr2
-rw-r--r--tests/ui/parser/suggest-semicolon-before-array.stderr2
-rw-r--r--tests/ui/parser/suggest_misplaced_generics/enum.stderr2
-rw-r--r--tests/ui/parser/suggest_misplaced_generics/existing_generics.stderr2
-rw-r--r--tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.stderr2
-rw-r--r--tests/ui/parser/suggest_misplaced_generics/fn-invalid-generics.stderr2
-rw-r--r--tests/ui/parser/suggest_misplaced_generics/fn-simple.stderr2
-rw-r--r--tests/ui/parser/suggest_misplaced_generics/struct.stderr2
-rw-r--r--tests/ui/parser/suggest_misplaced_generics/trait.stderr2
-rw-r--r--tests/ui/parser/suggest_misplaced_generics/type.stderr2
-rw-r--r--tests/ui/parser/trailing-carriage-return-in-string.stderr2
-rw-r--r--tests/ui/parser/trailing-question-in-macro-type.stderr2
-rw-r--r--tests/ui/parser/trait-bounds-not-on-impl.stderr2
-rw-r--r--tests/ui/parser/trait-object-polytrait-priority.stderr2
-rw-r--r--tests/ui/parser/trait-pub-assoc-const.stderr2
-rw-r--r--tests/ui/parser/trait-pub-assoc-ty.stderr2
-rw-r--r--tests/ui/parser/trait-pub-method.stderr2
-rw-r--r--tests/ui/parser/unbalanced-doublequote.stderr2
-rw-r--r--tests/ui/parser/unclosed-braces.stderr2
-rw-r--r--tests/ui/parser/unclosed-delimiter-in-dep.stderr2
-rw-r--r--tests/ui/parser/unclosed_delim_mod.stderr2
-rw-r--r--tests/ui/parser/unmatched-delimiter-at-end-of-file.stderr2
-rw-r--r--tests/ui/parser/unmatched-langle-2.stderr2
-rw-r--r--tests/ui/parser/unsafe-foreign-mod.stderr2
-rw-r--r--tests/ui/parser/unsized.stderr2
-rw-r--r--tests/ui/parser/unsized2.stderr2
-rw-r--r--tests/ui/parser/use-ends-with-mod-sep.stderr2
-rw-r--r--tests/ui/parser/use-unclosed-brace.stderr2
-rw-r--r--tests/ui/parser/virtual-structs.stderr2
-rw-r--r--tests/ui/parser/where-clauses-no-bounds-or-predicates.stderr2
-rw-r--r--tests/ui/parser/while-if-let-without-body.stderr2
-rw-r--r--tests/ui/pattern/bindings-after-at/bind-by-move-no-subbindings-fun-param.stderr2
-rw-r--r--tests/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse-promotion.stderr2
-rw-r--r--tests/ui/pattern/bindings-after-at/copy-and-move-mixed.stderr2
-rw-r--r--tests/ui/pattern/issue-114896.stderr2
-rw-r--r--tests/ui/pattern/issue-115599.stderr2
-rw-r--r--tests/ui/pattern/issue-52240.stderr2
-rw-r--r--tests/ui/pattern/issue-66270-pat-struct-parser-recovery.stderr2
-rw-r--r--tests/ui/pattern/issue-72565.stderr2
-rw-r--r--tests/ui/pattern/issue-80186-mut-binding-help-suggestion.stderr2
-rw-r--r--tests/ui/pattern/issue-94866.stderr2
-rw-r--r--tests/ui/pattern/issue-95878.stderr2
-rw-r--r--tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes-fixable.stderr2
-rw-r--r--tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes.stderr2
-rw-r--r--tests/ui/pattern/never_patterns.rs99
-rw-r--r--tests/ui/pattern/never_patterns.stderr51
-rw-r--r--tests/ui/pattern/pat-shadow-in-nested-binding.stderr2
-rw-r--r--tests/ui/pattern/pat-struct-field-expr-has-type.stderr2
-rw-r--r--tests/ui/pattern/pat-type-err-formal-param.stderr2
-rw-r--r--tests/ui/pattern/pattern-bad-ref-box-order.fixed14
-rw-r--r--tests/ui/pattern/pattern-bad-ref-box-order.rs14
-rw-r--r--tests/ui/pattern/pattern-bad-ref-box-order.stderr8
-rw-r--r--tests/ui/pattern/pattern-ident-path-generics.stderr2
-rw-r--r--tests/ui/pattern/pattern-tyvar-2.stderr2
-rw-r--r--tests/ui/pattern/pattern-tyvar.stderr2
-rw-r--r--tests/ui/pattern/range-pattern-meant-to-be-slice-rest-pattern.rs9
-rw-r--r--tests/ui/pattern/range-pattern-meant-to-be-slice-rest-pattern.stderr30
-rw-r--r--tests/ui/pattern/slice-patterns-irrefutable.stderr2
-rw-r--r--tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.stderr2
-rw-r--r--tests/ui/pattern/usefulness/const-partial_eq-fallback-ice.stderr2
-rw-r--r--tests/ui/pattern/usefulness/empty-match-check-notes.exhaustive_patterns.stderr63
-rw-r--r--tests/ui/pattern/usefulness/empty-match-check-notes.normal.stderr62
-rw-r--r--tests/ui/pattern/usefulness/empty-match-check-notes.rs52
-rw-r--r--tests/ui/pattern/usefulness/empty-match.exhaustive_patterns.stderr284
-rw-r--r--tests/ui/pattern/usefulness/empty-match.normal.stderr283
-rw-r--r--tests/ui/pattern/usefulness/empty-match.rs178
-rw-r--r--tests/ui/pattern/usefulness/empty-types.exhaustive_patterns.stderr393
-rw-r--r--tests/ui/pattern/usefulness/empty-types.normal.stderr617
-rw-r--r--tests/ui/pattern/usefulness/empty-types.rs665
-rw-r--r--tests/ui/pattern/usefulness/guards.stderr2
-rw-r--r--tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.allow.stderr17
-rw-r--r--tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.deny.stderr66
-rw-r--r--tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.rs54
-rw-r--r--tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.stderr2
-rw-r--r--tests/ui/pattern/usefulness/integer-ranges/reachability.rs5
-rw-r--r--tests/ui/pattern/usefulness/integer-ranges/reachability.stderr56
-rw-r--r--tests/ui/pattern/usefulness/issue-105479-str-non-exhaustiveness.stderr2
-rw-r--r--tests/ui/pattern/usefulness/issue-118437-exponential-time-on-diagonal-match.rs72
-rw-r--r--tests/ui/pattern/usefulness/issue-12116.stderr2
-rw-r--r--tests/ui/pattern/usefulness/issue-12369.stderr2
-rw-r--r--tests/ui/pattern/usefulness/issue-13727.stderr2
-rw-r--r--tests/ui/pattern/usefulness/issue-15129.stderr2
-rw-r--r--tests/ui/pattern/usefulness/issue-2111.stderr2
-rw-r--r--tests/ui/pattern/usefulness/issue-30240-b.stderr2
-rw-r--r--tests/ui/pattern/usefulness/issue-3096-1.stderr2
-rw-r--r--tests/ui/pattern/usefulness/issue-3096-2.stderr2
-rw-r--r--tests/ui/pattern/usefulness/issue-31561.stderr2
-rw-r--r--tests/ui/pattern/usefulness/issue-3601.rs2
-rw-r--r--tests/ui/pattern/usefulness/issue-3601.stderr8
-rw-r--r--tests/ui/pattern/usefulness/issue-39362.stderr2
-rw-r--r--tests/ui/pattern/usefulness/issue-40221.stderr2
-rw-r--r--tests/ui/pattern/usefulness/issue-4321.stderr2
-rw-r--r--tests/ui/pattern/usefulness/issue-50900.stderr2
-rw-r--r--tests/ui/pattern/usefulness/issue-56379.stderr2
-rw-r--r--tests/ui/pattern/usefulness/issue-72377.stderr2
-rw-r--r--tests/ui/pattern/usefulness/issue-78123-non-exhaustive-reference.stderr2
-rw-r--r--tests/ui/pattern/usefulness/issue-82772-match-box-as-struct.stderr2
-rw-r--r--tests/ui/pattern/usefulness/issue-85222-types-containing-non-exhaustive-types.stderr8
-rw-r--r--tests/ui/pattern/usefulness/match-non-exhaustive.stderr10
-rw-r--r--tests/ui/pattern/usefulness/match-privately-empty.stderr2
-rw-r--r--tests/ui/pattern/usefulness/match-ref-ice.stderr2
-rw-r--r--tests/ui/pattern/usefulness/match-slice-patterns.stderr2
-rw-r--r--tests/ui/pattern/usefulness/nested-non-exhaustive-enums.stderr2
-rw-r--r--tests/ui/pattern/usefulness/refutable-pattern-in-fn-arg.stderr2
-rw-r--r--tests/ui/pattern/usefulness/slice-patterns-exhaustiveness.rs4
-rw-r--r--tests/ui/pattern/usefulness/slice-patterns-exhaustiveness.stderr42
-rw-r--r--tests/ui/pattern/usefulness/slice_of_empty.rs6
-rw-r--r--tests/ui/pattern/usefulness/slice_of_empty.stderr31
-rw-r--r--tests/ui/pattern/usefulness/struct-like-enum-nonexhaustive.stderr2
-rw-r--r--tests/ui/pattern/usefulness/struct-pattern-match-useless.stderr2
-rw-r--r--tests/ui/pattern/usefulness/tuple-struct-nonexhaustive.stderr2
-rw-r--r--tests/ui/pattern/usefulness/unstable-gated-patterns.stderr2
-rw-r--r--tests/ui/pin-macro/cant_access_internals.stderr2
-rw-r--r--tests/ui/point-to-type-err-cause-on-impl-trait-return-2.stderr2
-rw-r--r--tests/ui/polymorphization/const_parameters/functions.stderr2
-rw-r--r--tests/ui/polymorphization/promoted-function-1.stderr2
-rw-r--r--tests/ui/polymorphization/promoted-function-2.stderr2
-rw-r--r--tests/ui/print_type_sizes/coroutine_discr_placement.stdout6
-rw-r--r--tests/ui/print_type_sizes/niche-filling.rs1
-rw-r--r--tests/ui/privacy/auxiliary/issue-117997.rs35
-rw-r--r--tests/ui/privacy/decl-macro.stderr2
-rw-r--r--tests/ui/privacy/export-tag-variant.stderr2
-rw-r--r--tests/ui/privacy/import-list-stem-visibility-issue-119126.rs14
-rw-r--r--tests/ui/privacy/issue-111220-2-tuple-struct-fields-projection.stderr2
-rw-r--r--tests/ui/privacy/issue-117997.rs8
-rw-r--r--tests/ui/privacy/issue-46209-private-enum-variant-reexport.stderr26
-rw-r--r--tests/ui/privacy/issue-75062-fieldless-tuple-struct.stderr2
-rw-r--r--tests/ui/privacy/issue-75906.stderr2
-rw-r--r--tests/ui/privacy/issue-79593.stderr2
-rw-r--r--tests/ui/privacy/legacy-ctor-visibility.stderr2
-rw-r--r--tests/ui/privacy/privacy-ufcs.stderr2
-rw-r--r--tests/ui/privacy/privacy2.stderr2
-rw-r--r--tests/ui/privacy/privacy4.stderr2
-rw-r--r--tests/ui/privacy/private-field-ty-err.stderr2
-rw-r--r--tests/ui/privacy/private-impl-method.stderr2
-rw-r--r--tests/ui/privacy/private-in-public-non-principal-2.stderr2
-rw-r--r--tests/ui/privacy/private-in-public-non-principal.stderr2
-rw-r--r--tests/ui/privacy/private-in-public.rs2
-rw-r--r--tests/ui/privacy/private-in-public.stderr50
-rw-r--r--tests/ui/privacy/private-item-simple.stderr2
-rw-r--r--tests/ui/privacy/private-method-cross-crate.stderr2
-rw-r--r--tests/ui/privacy/private-method-inherited.stderr2
-rw-r--r--tests/ui/privacy/private-method.stderr2
-rw-r--r--tests/ui/privacy/private-struct-field-cross-crate.stderr2
-rw-r--r--tests/ui/privacy/private-struct-field-ctor.stderr2
-rw-r--r--tests/ui/privacy/private-struct-field-pattern.stderr2
-rw-r--r--tests/ui/privacy/private-struct-field.stderr2
-rw-r--r--tests/ui/privacy/private-variant-reexport.stderr8
-rw-r--r--tests/ui/privacy/restricted/struct-literal-field.stderr2
-rw-r--r--tests/ui/privacy/sealed-traits/private-trait-non-local.stderr2
-rw-r--r--tests/ui/privacy/sealed-traits/private-trait.stderr2
-rw-r--r--tests/ui/privacy/sealed-traits/re-exported-trait.stderr2
-rw-r--r--tests/ui/privacy/suggest-box-new.fixed15
-rw-r--r--tests/ui/privacy/suggest-box-new.rs6
-rw-r--r--tests/ui/privacy/suggest-box-new.stderr90
-rw-r--r--tests/ui/privacy/union-field-privacy-2.stderr2
-rw-r--r--tests/ui/privacy/unresolved-trait-impl-item.rs15
-rw-r--r--tests/ui/privacy/unresolved-trait-impl-item.stderr22
-rw-r--r--tests/ui/privacy/where-priv-type.stderr2
-rw-r--r--tests/ui/proc-macro/allowed-attr-stmt-expr.stdout15
-rw-r--r--tests/ui/proc-macro/ambiguous-builtin-attrs-test.stderr2
-rw-r--r--tests/ui/proc-macro/attr-complex-fn.stdout7
-rw-r--r--tests/ui/proc-macro/attr-stmt-expr.stdout9
-rw-r--r--tests/ui/proc-macro/attribute-after-derive.stdout6
-rw-r--r--tests/ui/proc-macro/attribute-spans-preserved.stdout2
-rw-r--r--tests/ui/proc-macro/auxiliary/attr-stmt-expr-rpass.rs7
-rw-r--r--tests/ui/proc-macro/auxiliary/attr-stmt-expr.rs2
-rw-r--r--tests/ui/proc-macro/auxiliary/derive-a.rs2
-rw-r--r--tests/ui/proc-macro/auxiliary/derive-atob.rs2
-rw-r--r--tests/ui/proc-macro/auxiliary/derive-b-rpass.rs2
-rw-r--r--tests/ui/proc-macro/auxiliary/derive-ctod.rs2
-rw-r--r--tests/ui/proc-macro/auxiliary/derive-same-struct.rs4
-rw-r--r--tests/ui/proc-macro/auxiliary/derive-union.rs2
-rw-r--r--tests/ui/proc-macro/auxiliary/edition-gated-async-move-syntax.rs39
-rw-r--r--tests/ui/proc-macro/auxiliary/env.rs28
-rw-r--r--tests/ui/proc-macro/auxiliary/expand-with-a-macro.rs2
-rw-r--r--tests/ui/proc-macro/auxiliary/issue-79825.rs2
-rw-r--r--tests/ui/proc-macro/capture-macro-rules-invoke.stdout2
-rw-r--r--tests/ui/proc-macro/capture-unglued-token.stdout2
-rw-r--r--tests/ui/proc-macro/cfg-eval-fail.stderr2
-rw-r--r--tests/ui/proc-macro/cfg-eval-inner.stdout20
-rw-r--r--tests/ui/proc-macro/cfg-eval.stdout3
-rw-r--r--tests/ui/proc-macro/custom-attr-only-one-derive.rs2
-rw-r--r--tests/ui/proc-macro/define-two.stderr2
-rw-r--r--tests/ui/proc-macro/derive-helper-legacy-limits.stderr2
-rw-r--r--tests/ui/proc-macro/derive-same-struct.stdout2
-rw-r--r--tests/ui/proc-macro/derive-still-gated.stderr2
-rw-r--r--tests/ui/proc-macro/disappearing-resolution.stderr6
-rw-r--r--tests/ui/proc-macro/doc-comment-preserved.stdout2
-rw-r--r--tests/ui/proc-macro/dollar-crate-issue-57089.stdout6
-rw-r--r--tests/ui/proc-macro/dollar-crate-issue-62325.stdout6
-rw-r--r--tests/ui/proc-macro/dollar-crate.stdout18
-rw-r--r--tests/ui/proc-macro/edition-gated-async-move-syntax-issue89699.rs10
-rw-r--r--tests/ui/proc-macro/edition-gated-async-move-syntax-issue89699.stderr8
-rw-r--r--tests/ui/proc-macro/env.rs17
-rw-r--r--tests/ui/proc-macro/expand-to-derive.stdout5
-rw-r--r--tests/ui/proc-macro/expand-to-unstable.stderr2
-rw-r--r--tests/ui/proc-macro/export-macro.stderr2
-rw-r--r--tests/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout11
-rw-r--r--tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.stderr2
-rw-r--r--tests/ui/proc-macro/import.stderr2
-rw-r--r--tests/ui/proc-macro/inert-attribute-order.stdout12
-rw-r--r--tests/ui/proc-macro/inner-attr-non-inline-mod.stdout3
-rw-r--r--tests/ui/proc-macro/inner-attrs.stdout26
-rw-r--r--tests/ui/proc-macro/invalid-punct-ident-1.stderr2
-rw-r--r--tests/ui/proc-macro/invalid-punct-ident-2.stderr2
-rw-r--r--tests/ui/proc-macro/invalid-punct-ident-3.stderr2
-rw-r--r--tests/ui/proc-macro/issue-107113-wrap.stderr2
-rw-r--r--tests/ui/proc-macro/issue-37788.stderr2
-rw-r--r--tests/ui/proc-macro/issue-38586.stderr2
-rw-r--r--tests/ui/proc-macro/issue-50493.stderr2
-rw-r--r--tests/ui/proc-macro/issue-59191-replace-root-with-fn.stderr2
-rw-r--r--tests/ui/proc-macro/issue-66286.stderr2
-rw-r--r--tests/ui/proc-macro/issue-75734-pp-paren.stdout3
-rw-r--r--tests/ui/proc-macro/issue-75801.stderr2
-rw-r--r--tests/ui/proc-macro/issue-75930-derive-cfg.stdout65
-rw-r--r--tests/ui/proc-macro/issue-76270-panic-in-libproc-macro.stderr2
-rw-r--r--tests/ui/proc-macro/issue-78675-captured-inner-attrs.stdout2
-rw-r--r--tests/ui/proc-macro/issue-79148.stderr2
-rw-r--r--tests/ui/proc-macro/issue-81543-item-parse-err.stderr2
-rw-r--r--tests/ui/proc-macro/issue-83469-global-alloc-invalid-stmt.stderr2
-rw-r--r--tests/ui/proc-macro/issue-86781-bad-inner-doc.stderr2
-rw-r--r--tests/ui/proc-macro/item-error.stderr2
-rw-r--r--tests/ui/proc-macro/keep-expr-tokens.stdout3
-rw-r--r--tests/ui/proc-macro/lifetimes.stderr2
-rw-r--r--tests/ui/proc-macro/lints_in_proc_macros.stderr2
-rw-r--r--tests/ui/proc-macro/load-panic-backtrace.stderr2
-rw-r--r--tests/ui/proc-macro/load-panic.stderr2
-rw-r--r--tests/ui/proc-macro/macro-brackets.stderr2
-rw-r--r--tests/ui/proc-macro/macro-rules-derive-cfg.stdout11
-rw-r--r--tests/ui/proc-macro/macro-rules-derive.stderr2
-rw-r--r--tests/ui/proc-macro/macros-in-extern-derive.stderr2
-rw-r--r--tests/ui/proc-macro/meta-macro-hygiene.stdout4
-rw-r--r--tests/ui/proc-macro/nested-derive-cfg.stdout2
-rw-r--r--tests/ui/proc-macro/no-macro-use-attr.stderr2
-rw-r--r--tests/ui/proc-macro/non-root.stderr2
-rw-r--r--tests/ui/proc-macro/nonterminal-expansion.stdout2
-rw-r--r--tests/ui/proc-macro/nonterminal-token-hygiene.stdout8
-rw-r--r--tests/ui/proc-macro/pretty-print-tts.stdout3
-rw-r--r--tests/ui/proc-macro/raw-ident.stderr2
-rw-r--r--tests/ui/proc-macro/shadow.stderr2
-rw-r--r--tests/ui/proc-macro/signature.stderr2
-rw-r--r--tests/ui/proc-macro/test-same-crate.stderr2
-rw-r--r--tests/ui/proc-macro/trailing-plus.stdout3
-rw-r--r--tests/ui/proc-macro/two-crate-types-1.stderr2
-rw-r--r--tests/ui/proc-macro/two-crate-types-2.stderr2
-rw-r--r--tests/ui/proc-macro/weird-braces.stdout34
-rw-r--r--tests/ui/pub/pub-ident-fn-2.stderr2
-rw-r--r--tests/ui/pub/pub-ident-fn-or-struct.stderr2
-rw-r--r--tests/ui/pub/pub-ident-fn-with-lifetime-2.stderr2
-rw-r--r--tests/ui/pub/pub-ident-fn-with-lifetime.stderr2
-rw-r--r--tests/ui/pub/pub-ident-fn.stderr2
-rw-r--r--tests/ui/pub/pub-ident-struct-2.stderr2
-rw-r--r--tests/ui/pub/pub-ident-struct-3.stderr2
-rw-r--r--tests/ui/pub/pub-ident-struct-4.stderr2
-rw-r--r--tests/ui/pub/pub-ident-struct-with-lifetime.stderr2
-rw-r--r--tests/ui/pub/pub-ident-struct.stderr2
-rw-r--r--tests/ui/pub/pub-ident-with-lifetime-incomplete.stderr2
-rw-r--r--tests/ui/pub/pub-restricted-error.stderr2
-rw-r--r--tests/ui/pub/pub-restricted-non-path.stderr2
-rw-r--r--tests/ui/qualified/qualified-path-params-2.stderr2
-rw-r--r--tests/ui/query-system/fn-sig-cycle-arity.stderr2
-rw-r--r--tests/ui/query-system/no-query-in-printing-during-query-descr.stderr2
-rw-r--r--tests/ui/query-system/query_depth.stderr2
-rw-r--r--tests/ui/range/issue-73553-misinterp-range-literal.stderr4
-rw-r--r--tests/ui/range/range-inclusive-pattern-precedence.stderr2
-rw-r--r--tests/ui/range/range-inclusive-pattern-precedence2.stderr2
-rw-r--r--tests/ui/range/range_traits-2.stderr2
-rw-r--r--tests/ui/range/range_traits-3.stderr2
-rw-r--r--tests/ui/range/range_traits-6.stderr2
-rw-r--r--tests/ui/reachable/expr_add.stderr2
-rw-r--r--tests/ui/reachable/expr_again.stderr2
-rw-r--r--tests/ui/reachable/expr_repeat.stderr2
-rw-r--r--tests/ui/reachable/expr_return.stderr2
-rw-r--r--tests/ui/reachable/expr_return_in_macro.stderr2
-rw-r--r--tests/ui/reachable/expr_type.stderr2
-rw-r--r--tests/ui/reachable/unreachable-arm.stderr2
-rw-r--r--tests/ui/reachable/unreachable-code-ret.stderr2
-rw-r--r--tests/ui/reachable/unreachable-code.stderr2
-rw-r--r--tests/ui/reachable/unreachable-loop-patterns.stderr2
-rw-r--r--tests/ui/reachable/unreachable-variant.stderr2
-rw-r--r--tests/ui/recursion/issue-26548-recursion-via-normalize.stderr2
-rw-r--r--tests/ui/recursion/issue-38591-non-regular-dropck-recursion.polonius.stderr2
-rw-r--r--tests/ui/recursion/issue-38591-non-regular-dropck-recursion.stderr2
-rw-r--r--tests/ui/recursion/issue-83150.stderr2
-rw-r--r--tests/ui/recursion/issue-95134.rs1
-rw-r--r--tests/ui/recursion/recursion.polonius.stderr2
-rw-r--r--tests/ui/recursion/recursion.stderr2
-rw-r--r--tests/ui/recursion/recursive-enum.stderr2
-rw-r--r--tests/ui/recursion/recursive-reexports.stderr2
-rw-r--r--tests/ui/recursion/recursive-static-definition.stderr2
-rw-r--r--tests/ui/recursion/recursive-types-are-not-uninhabited.stderr2
-rw-r--r--tests/ui/recursion_limit/invalid_digit_type.stderr2
-rw-r--r--tests/ui/recursion_limit/invalid_macro.stderr2
-rw-r--r--tests/ui/recursion_limit/issue-105700.stderr2
-rw-r--r--tests/ui/recursion_limit/no-value.stderr2
-rw-r--r--tests/ui/recursion_limit/zero-overflow.stderr2
-rw-r--r--tests/ui/recursion_limit/zero.stderr2
-rw-r--r--tests/ui/regions/do-not-suggest-adding-bound-to-opaque-type.stderr2
-rw-r--r--tests/ui/regions/forall-wf-ref-reflexive.stderr2
-rw-r--r--tests/ui/regions/issue-101280.stderr6
-rw-r--r--tests/ui/regions/issue-102374.stderr2
-rw-r--r--tests/ui/regions/issue-102392.stderr2
-rw-r--r--tests/ui/regions/issue-12470.stderr2
-rw-r--r--tests/ui/regions/issue-28848.stderr2
-rw-r--r--tests/ui/regions/issue-78262.base.stderr2
-rw-r--r--tests/ui/regions/issue-78262.polonius.stderr2
-rw-r--r--tests/ui/regions/outlives-with-missing.stderr2
-rw-r--r--tests/ui/regions/region-bound-on-closure-outlives-call.stderr2
-rw-r--r--tests/ui/regions/region-invariant-static-error-reporting.stderr2
-rw-r--r--tests/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr6
-rw-r--r--tests/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr6
-rw-r--r--tests/ui/regions/region-object-lifetime-2.stderr2
-rw-r--r--tests/ui/regions/region-object-lifetime-4.stderr2
-rw-r--r--tests/ui/regions/region-object-lifetime-5.stderr2
-rw-r--r--tests/ui/regions/regions-addr-of-self.stderr2
-rw-r--r--tests/ui/regions/regions-assoc-type-in-supertrait-outlives-container.stderr2
-rw-r--r--tests/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.stderr2
-rw-r--r--tests/ui/regions/regions-bounded-method-type-parameters-cross-crate.stderr2
-rw-r--r--tests/ui/regions/regions-bounded-method-type-parameters-trait-bound.stderr2
-rw-r--r--tests/ui/regions/regions-bounded-method-type-parameters.stderr2
-rw-r--r--tests/ui/regions/regions-close-object-into-object-1.stderr2
-rw-r--r--tests/ui/regions/regions-close-object-into-object-3.stderr2
-rw-r--r--tests/ui/regions/regions-close-over-type-parameter-multiple.stderr2
-rw-r--r--tests/ui/regions/regions-creating-enums3.stderr2
-rw-r--r--tests/ui/regions/regions-creating-enums4.stderr2
-rw-r--r--tests/ui/regions/regions-early-bound-error-method.stderr2
-rw-r--r--tests/ui/regions/regions-early-bound-error.stderr2
-rw-r--r--tests/ui/regions/regions-escape-method.stderr2
-rw-r--r--tests/ui/regions/regions-escape-via-trait-or-not.stderr2
-rw-r--r--tests/ui/regions/regions-fn-subtyping-return-static-fail.stderr2
-rw-r--r--tests/ui/regions/regions-free-region-ordering-callee-4.stderr2
-rw-r--r--tests/ui/regions/regions-free-region-ordering-incorrect.stderr2
-rw-r--r--tests/ui/regions/regions-glb-free-free.stderr2
-rw-r--r--tests/ui/regions/regions-implied-bounds-projection-gap-1.stderr2
-rw-r--r--tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr2
-rw-r--r--tests/ui/regions/regions-in-enums-anon.stderr2
-rw-r--r--tests/ui/regions/regions-in-structs-anon.stderr2
-rw-r--r--tests/ui/regions/regions-infer-at-fn-not-param.stderr2
-rw-r--r--tests/ui/regions/regions-infer-borrow-scope-too-big.stderr2
-rw-r--r--tests/ui/regions/regions-infer-bound-from-trait-self.stderr2
-rw-r--r--tests/ui/regions/regions-infer-call-3.stderr2
-rw-r--r--tests/ui/regions/regions-infer-contravariance-due-to-decl.stderr2
-rw-r--r--tests/ui/regions/regions-infer-covariance-due-to-decl.stderr2
-rw-r--r--tests/ui/regions/regions-infer-invariance-due-to-decl.stderr2
-rw-r--r--tests/ui/regions/regions-infer-invariance-due-to-mutability-3.stderr2
-rw-r--r--tests/ui/regions/regions-infer-invariance-due-to-mutability-4.stderr2
-rw-r--r--tests/ui/regions/regions-infer-paramd-indirect.stderr2
-rw-r--r--tests/ui/regions/regions-infer-proc-static-upvar.stderr2
-rw-r--r--tests/ui/regions/regions-lifetime-bounds-on-fns.stderr6
-rw-r--r--tests/ui/regions/regions-lifetime-static-items-enclosing-scopes.rs3
-rw-r--r--tests/ui/regions/regions-name-duplicated.stderr2
-rw-r--r--tests/ui/regions/regions-name-static.stderr2
-rw-r--r--tests/ui/regions/regions-nested-fns-2.stderr2
-rw-r--r--tests/ui/regions/regions-normalize-in-where-clause-list.stderr2
-rw-r--r--tests/ui/regions/regions-outlives-projection-container-wc.stderr2
-rw-r--r--tests/ui/regions/regions-pattern-typing-issue-19552.stderr2
-rw-r--r--tests/ui/regions/regions-pattern-typing-issue-19997.stderr2
-rw-r--r--tests/ui/regions/regions-proc-bound-capture.stderr2
-rw-r--r--tests/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.stderr2
-rw-r--r--tests/ui/regions/regions-reborrow-from-shorter-mut-ref.stderr2
-rw-r--r--tests/ui/regions/regions-ret-borrowed-1.stderr2
-rw-r--r--tests/ui/regions/regions-ret-borrowed.stderr2
-rw-r--r--tests/ui/regions/regions-ret.stderr2
-rw-r--r--tests/ui/regions/regions-return-ref-to-upvar-issue-17403.stderr2
-rw-r--r--tests/ui/regions/regions-return-stack-allocated-vec.stderr2
-rw-r--r--tests/ui/regions/regions-steal-closure.stderr2
-rw-r--r--tests/ui/regions/regions-trait-variance.stderr2
-rw-r--r--tests/ui/regions/regions-var-type-out-of-scope.stderr2
-rw-r--r--tests/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.stderr2
-rw-r--r--tests/ui/regions/regions-variance-contravariant-use-covariant.stderr2
-rw-r--r--tests/ui/regions/regions-variance-covariant-use-contravariant.stderr2
-rw-r--r--tests/ui/regions/regions-variance-invariant-use-contravariant.stderr2
-rw-r--r--tests/ui/regions/regions-variance-invariant-use-covariant.stderr2
-rw-r--r--tests/ui/regions/regions-wf-trait-object.stderr2
-rw-r--r--tests/ui/regions/resolve-re-error-ice.rs6
-rw-r--r--tests/ui/regions/resolve-re-error-ice.stderr42
-rw-r--r--tests/ui/repeat-expr/repeat-to-run-dtor-twice.stderr2
-rw-r--r--tests/ui/repr/malformed-repr-hints.rs (renamed from tests/ui/repr/issue-83921-ice.rs)9
-rw-r--r--tests/ui/repr/malformed-repr-hints.stderr (renamed from tests/ui/repr/issue-83921-ice.stderr)34
-rw-r--r--tests/ui/repr/repr-disallow-on-variant.stderr2
-rw-r--r--tests/ui/repr/transparent-enum-too-many-variants.stderr2
-rw-r--r--tests/ui/reserved/reserved-become.stderr2
-rw-r--r--tests/ui/resolve/bad-type-env-capture.stderr2
-rw-r--r--tests/ui/resolve/crate-called-as-function.stderr2
-rw-r--r--tests/ui/resolve/crate-in-paths.stderr2
-rw-r--r--tests/ui/resolve/disambiguate-identical-names.stderr2
-rw-r--r--tests/ui/resolve/enums-pats-not-idents.stderr2
-rw-r--r--tests/ui/resolve/explicit-self-lowercase-param.stderr2
-rw-r--r--tests/ui/resolve/export-fully-qualified-2018.stderr2
-rw-r--r--tests/ui/resolve/export-fully-qualified.stderr2
-rw-r--r--tests/ui/resolve/fn-new-doesnt-exist.stderr2
-rw-r--r--tests/ui/resolve/impl-items-vis-unresolved.stderr2
-rw-r--r--tests/ui/resolve/issue-101749-2.stderr2
-rw-r--r--tests/ui/resolve/issue-101749.stderr2
-rw-r--r--tests/ui/resolve/issue-10200.stderr2
-rw-r--r--tests/ui/resolve/issue-103202.stderr2
-rw-r--r--tests/ui/resolve/issue-105069.stderr2
-rw-r--r--tests/ui/resolve/issue-108529.stderr2
-rw-r--r--tests/ui/resolve/issue-109153.stderr2
-rw-r--r--tests/ui/resolve/issue-109250.stderr2
-rw-r--r--tests/ui/resolve/issue-111312.stderr2
-rw-r--r--tests/ui/resolve/issue-111727.stderr2
-rw-r--r--tests/ui/resolve/issue-116164.stderr2
-rw-r--r--tests/ui/resolve/issue-117920.rs11
-rw-r--r--tests/ui/resolve/issue-117920.stderr9
-rw-r--r--tests/ui/resolve/issue-118295.rs5
-rw-r--r--tests/ui/resolve/issue-118295.stderr14
-rw-r--r--tests/ui/resolve/issue-12796.stderr2
-rw-r--r--tests/ui/resolve/issue-16058.stderr2
-rw-r--r--tests/ui/resolve/issue-17518.stderr2
-rw-r--r--tests/ui/resolve/issue-18252.stderr2
-rw-r--r--tests/ui/resolve/issue-21221-2.stderr2
-rw-r--r--tests/ui/resolve/issue-21221-3.stderr2
-rw-r--r--tests/ui/resolve/issue-21221-4.stderr2
-rw-r--r--tests/ui/resolve/issue-2330.stderr2
-rw-r--r--tests/ui/resolve/issue-23305.stderr2
-rw-r--r--tests/ui/resolve/issue-26545.stderr2
-rw-r--r--tests/ui/resolve/issue-3021.stderr2
-rw-r--r--tests/ui/resolve/issue-30535.stderr2
-rw-r--r--tests/ui/resolve/issue-3099-a.stderr2
-rw-r--r--tests/ui/resolve/issue-3099-b.stderr2
-rw-r--r--tests/ui/resolve/issue-31845.stderr2
-rw-r--r--tests/ui/resolve/issue-33876.stderr2
-rw-r--r--tests/ui/resolve/issue-3907-2.stderr2
-rw-r--r--tests/ui/resolve/issue-3907.stderr2
-rw-r--r--tests/ui/resolve/issue-39226.stderr2
-rw-r--r--tests/ui/resolve/issue-39559.stderr4
-rw-r--r--tests/ui/resolve/issue-5035-2.stderr2
-rw-r--r--tests/ui/resolve/issue-50599.stderr2
-rw-r--r--tests/ui/resolve/issue-65025-extern-static-parent-generics.stderr2
-rw-r--r--tests/ui/resolve/issue-6642.stderr2
-rw-r--r--tests/ui/resolve/issue-6702.stderr2
-rw-r--r--tests/ui/resolve/issue-69401-trait-fn-no-body-ty-local.stderr2
-rw-r--r--tests/ui/resolve/issue-80079.stderr2
-rw-r--r--tests/ui/resolve/issue-82156.stderr2
-rw-r--r--tests/ui/resolve/issue-90113.stderr2
-rw-r--r--tests/ui/resolve/missing-in-namespace.stderr2
-rw-r--r--tests/ui/resolve/name-clash-nullary.stderr2
-rw-r--r--tests/ui/resolve/point-at-type-parameter-shadowing-another-type.stderr2
-rw-r--r--tests/ui/resolve/raw-ident-in-path.stderr2
-rw-r--r--tests/ui/resolve/resolve-bad-import-prefix.stderr2
-rw-r--r--tests/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.stderr2
-rw-r--r--tests/ui/resolve/resolve-conflict-import-vs-extern-crate.stderr2
-rw-r--r--tests/ui/resolve/resolve-conflict-import-vs-import.stderr2
-rw-r--r--tests/ui/resolve/resolve-conflict-item-vs-extern-crate.stderr2
-rw-r--r--tests/ui/resolve/resolve-conflict-item-vs-import.stderr2
-rw-r--r--tests/ui/resolve/resolve-conflict-type-vs-import.stderr2
-rw-r--r--tests/ui/resolve/resolve-dont-hint-macro.rs4
-rw-r--r--tests/ui/resolve/resolve-dont-hint-macro.stderr9
-rw-r--r--tests/ui/resolve/resolve-inconsistent-binding-mode.stderr4
-rw-r--r--tests/ui/resolve/resolve-label.stderr2
-rw-r--r--tests/ui/resolve/suggest-import-without-clobbering-attrs.stderr2
-rw-r--r--tests/ui/resolve/token-error-correct-2.stderr2
-rw-r--r--tests/ui/resolve/token-error-correct-3.stderr2
-rw-r--r--tests/ui/resolve/token-error-correct-4.stderr2
-rw-r--r--tests/ui/resolve/token-error-correct.stderr2
-rw-r--r--tests/ui/resolve/tool-import.stderr2
-rw-r--r--tests/ui/resolve/unresolved-segments-visibility.stderr2
-rw-r--r--tests/ui/resolve/unresolved_static_type_field.stderr2
-rw-r--r--tests/ui/resolve/use-self-in-inner-fn.stderr2
-rw-r--r--tests/ui/ret-non-nil.stderr2
-rw-r--r--tests/ui/return-disjoint-regions.stderr2
-rw-r--r--tests/ui/return/issue-64620.stderr2
-rw-r--r--tests/ui/return/issue-82612-return-mutable-reference.stderr2
-rw-r--r--tests/ui/return/return-from-diverging.stderr2
-rw-r--r--tests/ui/return/return-type.stderr2
-rw-r--r--tests/ui/return/return-unit-from-diverging.stderr2
-rw-r--r--tests/ui/rfcs/rfc-0000-never_patterns/check.rs33
-rw-r--r--tests/ui/rfcs/rfc-0000-never_patterns/check.stderr35
-rw-r--r--tests/ui/rfcs/rfc-0000-never_patterns/parse.rs71
-rw-r--r--tests/ui/rfcs/rfc-0000-never_patterns/parse.stderr44
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-embedded.stderr2
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-param.stderr2
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.with_gate.stderr2
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.stderr2
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-forbidden-without-eq.stderr2
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-nonempty-array-forbidden-without-eq.stderr2
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-requires-both-partialeq-and-eq.stderr2
-rw-r--r--tests/ui/rfcs/rfc-1623-static/rfc1623-2.stderr8
-rw-r--r--tests/ui/rfcs/rfc-1717-dllimport/missing-link-attr.stderr2
-rw-r--r--tests/ui/rfcs/rfc-1717-dllimport/multiple-renames.stderr2
-rw-r--r--tests/ui/rfcs/rfc-1717-dllimport/rename-modifiers.stderr2
-rw-r--r--tests/ui/rfcs/rfc-1717-dllimport/rename-to-empty.stderr2
-rw-r--r--tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-1.stderr2
-rw-r--r--tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.current.stderr2
-rw-r--r--tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.next.stderr2
-rw-r--r--tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.stderr2
-rw-r--r--tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-impl-trait.stderr2
-rw-r--r--tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-in-test-should-panic.stderr2
-rw-r--r--tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-main-i32.stderr2
-rw-r--r--tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-main-wrong-type.stderr2
-rw-r--r--tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-not-satisfied.stderr2
-rw-r--r--tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2005-default-binding-mode/borrowck-issue-49631.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2005-default-binding-mode/const.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2005-default-binding-mode/for.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2005-default-binding-mode/issue-44912-or.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2005-default-binding-mode/lit.stderr4
-rw-r--r--tests/ui/rfcs/rfc-2005-default-binding-mode/no-double-error.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2005-default-binding-mode/slice.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/borrowck-non-exhaustive.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/enum-as-cast.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.normal.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.rs77
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.stderr138
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/stable-omitted-patterns.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/issue-65157-repeated-match-arm.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.rs2
-rw-r--r--tests/ui/rfcs/rfc-2091-track-caller/error-odd-syntax.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2091-track-caller/error-with-main.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2091-track-caller/error-with-start.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2091-track-caller/only-for-fns.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2093-infer-outlives/cross-crate.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2093-infer-outlives/dont-infer-static.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2093-infer-outlives/explicit-dyn.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2093-infer-outlives/explicit-enum.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2093-infer-outlives/explicit-projection.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2093-infer-outlives/explicit-struct.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2093-infer-outlives/explicit-union.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2093-infer-outlives/nested-enum.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2093-infer-outlives/nested-regions.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2093-infer-outlives/nested-structs.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2093-infer-outlives/nested-union.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2093-infer-outlives/projection.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2093-infer-outlives/reference.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2093-infer-outlives/self-dyn.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2093-infer-outlives/self-structs.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2126-crate-paths/keyword-crate-as-identifier.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-1.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-2.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-3.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2126-extern-absolute-paths/not-allowed.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2294-if-let-guard/guard-lifetime-1.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2294-if-let-guard/guard-mutability-1.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2294-if-let-guard/guard-mutability-2.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2294-if-let-guard/macro-expanded.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-expected-behavior.run.stderr30
-rw-r--r--tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2396-target_feature-11/feature-gate-target_feature_11.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.mir.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.thir.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-main.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-start.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.mir.stderr78
-rw-r--r--tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.rs20
-rw-r--r--tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.thir.stderr78
-rw-r--r--tests/ui/rfcs/rfc-2397-do-not-recommend/feature-gate-do_not_recommend.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2397-do-not-recommend/unstable-feature.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2457-non-ascii-idents/crate_name_nonascii_forbidden.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2497-if-let-chains/avoid-invalid-mir.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2497-if-let-chains/invalid-let-in-a-valid-let-context.stderr8
-rw-r--r--tests/ui/rfcs/rfc-2528-type-changing-struct-update/issue-92010-trait-bound-not-satisfied.stderr6
-rw-r--r--tests/ui/rfcs/rfc-2528-type-changing-struct-update/lifetime-update.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2565-param-attrs/auxiliary/param-attrs.rs39
-rw-r--r--tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-2018.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2627-raw-dylib/dlltool-failed.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-invalid-format.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-multiple.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-unknown-value.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-x86-only.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2627-raw-dylib/invalid-dlltool.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2627-raw-dylib/multiple-declarations.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2627-raw-dylib/raw-dylib-windows-only.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2627-raw-dylib/unsupported-abi.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.stderr10
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.stderr10
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-fail.stderr4
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-in-impl.rs2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-in-impl.stderr8
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-chain.rs4
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-chain.stderr14
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-dup-bound.rs4
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-dup-bound.stderr14
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-fail.rs5
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-fail.stderr (renamed from tests/ui/rfcs/rfc-2632-const-trait-impl/tilde_const_on_impl_bound.stderr)8
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst.rs7
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst.stderr18
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-pass.rs4
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-pass.stderr8
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-bound-on-not-const-associated-fn.rs (renamed from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const-bound-on-not-const-associated-fn.rs)2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-bound-on-not-const-associated-fn.stderr (renamed from tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const-bound-on-not-const-associated-fn.stderr)4
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-check-fns-in-const-impl.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-parse-not-item.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method-fail.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-default-method-bodies.stderr4
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-bound.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.stock.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.precise.stderr21
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs1
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.stock.stderr21
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-norecover.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs1
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr49
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-gate.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.rs3
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.stderr31
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.rs4
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.stderr10
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.gatednc.stderr4
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.stock.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.stderr4
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/effect-param-infer.rs15
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/helloworld.rs13
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs39
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.stderr32
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/feature-gate.gated.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/generic-bound.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/hir-const-check.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/impl-tilde-const-trait.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/impl-with-default-fn-fail.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102156.stderr13
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102985.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/issue-79450.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/issue-90052.rs9
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/issue-90052.stderr14
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92111.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.gated.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.stock.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-const-closure-non-const-outer.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-in-closure-in-const.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs6
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-impl-non-const-specialized-impl.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/non-const-default-const-specialized.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness-2.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api-user-crate.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.gated.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.stock.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.nn.stderr14
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr17
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yy.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.nn.stderr16
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs1
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yn.stderr16
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yy.stderr4
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-and-const-params.stderr4
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.rs57
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr258
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-maybe-trait.rs6
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-maybe-trait.stderr8
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-twice.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/tilde_const_on_impl_bound.rs7
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause.stderr4
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/without-tilde.stderr2
-rw-r--r--tests/ui/rfcs/rfc-3348-c-string-literals/no-nuls.rsbin623 -> 767 bytes
-rw-r--r--tests/ui/rmeta/emit-artifact-notifications.stderr2
-rw-r--r--tests/ui/rmeta/no_optitimized_mir.stderr2
-rw-r--r--tests/ui/rmeta/rmeta.stderr2
-rw-r--r--tests/ui/rmeta/rmeta_lib.stderr2
-rw-r--r--tests/ui/rmeta/rmeta_meta_main.stderr9
-rw-r--r--tests/ui/rust-2018/async-ident-allowed.stderr2
-rw-r--r--tests/ui/rust-2018/dyn-keyword.stderr2
-rw-r--r--tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed1
-rw-r--r--tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs1
-rw-r--r--tests/ui/rust-2018/edition-lint-fully-qualified-paths.stderr8
-rw-r--r--tests/ui/rust-2018/edition-lint-nested-empty-paths.fixed1
-rw-r--r--tests/ui/rust-2018/edition-lint-nested-empty-paths.rs1
-rw-r--r--tests/ui/rust-2018/edition-lint-nested-empty-paths.stderr12
-rw-r--r--tests/ui/rust-2018/edition-lint-nested-paths.fixed1
-rw-r--r--tests/ui/rust-2018/edition-lint-nested-paths.rs1
-rw-r--r--tests/ui/rust-2018/edition-lint-nested-paths.stderr10
-rw-r--r--tests/ui/rust-2018/edition-lint-paths.fixed1
-rw-r--r--tests/ui/rust-2018/edition-lint-paths.rs1
-rw-r--r--tests/ui/rust-2018/edition-lint-paths.stderr20
-rw-r--r--tests/ui/rust-2018/extern-crate-idiomatic-in-2018.stderr2
-rw-r--r--tests/ui/rust-2018/extern-crate-idiomatic.fixed1
-rw-r--r--tests/ui/rust-2018/extern-crate-idiomatic.rs1
-rw-r--r--tests/ui/rust-2018/extern-crate-referenced-by-self-path.fixed1
-rw-r--r--tests/ui/rust-2018/extern-crate-referenced-by-self-path.rs1
-rw-r--r--tests/ui/rust-2018/extern-crate-rename.fixed1
-rw-r--r--tests/ui/rust-2018/extern-crate-rename.rs1
-rw-r--r--tests/ui/rust-2018/extern-crate-rename.stderr6
-rw-r--r--tests/ui/rust-2018/extern-crate-submod.fixed1
-rw-r--r--tests/ui/rust-2018/extern-crate-submod.rs1
-rw-r--r--tests/ui/rust-2018/extern-crate-submod.stderr6
-rw-r--r--tests/ui/rust-2018/issue-51008-1.rs2
-rw-r--r--tests/ui/rust-2018/issue-51008.rs2
-rw-r--r--tests/ui/rust-2018/issue-52202-use-suggestions.stderr2
-rw-r--r--tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr2
-rw-r--r--tests/ui/rust-2018/local-path-suggestions-2015.stderr2
-rw-r--r--tests/ui/rust-2018/proc-macro-crate-in-paths.rs1
-rw-r--r--tests/ui/rust-2018/suggestions-not-always-applicable.fixed1
-rw-r--r--tests/ui/rust-2018/suggestions-not-always-applicable.rs1
-rw-r--r--tests/ui/rust-2018/uniform-paths/ambiguity-macros-nested.stderr2
-rw-r--r--tests/ui/rust-2018/uniform-paths/ambiguity-macros.stderr2
-rw-r--r--tests/ui/rust-2018/uniform-paths/issue-54253.stderr2
-rw-r--r--tests/ui/rust-2018/uniform-paths/issue-56596.stderr2
-rw-r--r--tests/ui/rust-2018/uniform-paths/issue-87932.stderr2
-rw-r--r--tests/ui/rust-2018/uniform-paths/macro-rules.stderr2
-rw-r--r--tests/ui/rust-2018/uniform-paths/prelude-fail.stderr2
-rw-r--r--tests/ui/rust-2018/unresolved-asterisk-imports.stderr2
-rw-r--r--tests/ui/rust-2021/future-prelude-collision-shadow.stderr2
-rw-r--r--tests/ui/rustc-error.stderr2
-rw-r--r--tests/ui/rustdoc/cfg-rustdoc.stderr2
-rw-r--r--tests/ui/rustdoc/deny-invalid-doc-attrs.stderr2
-rw-r--r--tests/ui/rustdoc/doc-alias-same-name.stderr2
-rw-r--r--tests/ui/rustdoc/doc-inline-extern-crate.stderr2
-rw-r--r--tests/ui/rustdoc/doc-primitive.stderr2
-rw-r--r--tests/ui/rustdoc/feature-gate-doc_primitive.stderr2
-rw-r--r--tests/ui/rustdoc/unterminated-doc-comment.stderr2
-rw-r--r--tests/ui/sanitize/cfg-kasan.rs2
-rw-r--r--tests/ui/sanitize/crt-static.stderr2
-rw-r--r--tests/ui/sanitize/incompatible.stderr2
-rw-r--r--tests/ui/sanitize/sanitizer-cfi-canonical-jump-tables-require-cfi.stderr2
-rw-r--r--tests/ui/sanitize/sanitizer-cfi-generalize-pointers-require-cfi.stderr2
-rw-r--r--tests/ui/sanitize/sanitizer-cfi-invalid-attr-cfi-encoding.stderr2
-rw-r--r--tests/ui/sanitize/sanitizer-cfi-normalize-integers-require-cfi.stderr2
-rw-r--r--tests/ui/sanitize/sanitizer-cfi-requires-lto.stderr2
-rw-r--r--tests/ui/sanitize/sanitizer-cfi-with-rustc-lto-requires-single-codegen-unit.stderr2
-rw-r--r--tests/ui/sanitize/split-lto-unit-requires-lto.stderr2
-rw-r--r--tests/ui/sanitize/unsupported-target.stderr2
-rw-r--r--tests/ui/self/arbitrary-self-from-method-substs.default.stderr2
-rw-r--r--tests/ui/self/arbitrary-self-from-method-substs.feature.stderr2
-rw-r--r--tests/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr2
-rw-r--r--tests/ui/self/arbitrary_self_types_needing_mut_pin.stderr2
-rw-r--r--tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr2
-rw-r--r--tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr2
-rw-r--r--tests/ui/self/elision/nested-item.stderr11
-rw-r--r--tests/ui/self/issue-61882-2.stderr2
-rw-r--r--tests/ui/self/point-at-arbitrary-self-type-method.stderr2
-rw-r--r--tests/ui/self/point-at-arbitrary-self-type-trait-method.stderr2
-rw-r--r--tests/ui/self/self-vs-path-ambiguity.stderr2
-rw-r--r--tests/ui/self/self_type_keyword.stderr2
-rw-r--r--tests/ui/sepcomp/sepcomp-lib-lto.rs1
-rw-r--r--tests/ui/shadowed/shadowed-trait-methods.stderr2
-rw-r--r--tests/ui/simd/libm_no_std_cant_float.rs2
-rw-r--r--tests/ui/simd/libm_std_can_float.rs2
-rw-r--r--tests/ui/simd/masked-load-store-build-fail.rs74
-rw-r--r--tests/ui/simd/masked-load-store-build-fail.stderr83
-rw-r--r--tests/ui/simd/masked-load-store-check-fail.rs32
-rw-r--r--tests/ui/simd/masked-load-store-check-fail.stderr59
-rw-r--r--tests/ui/simd/masked-load-store.rs33
-rw-r--r--tests/ui/simd/monomorphize-heterogeneous.stderr2
-rw-r--r--tests/ui/simd/monomorphize-shuffle-index.generic.stderr2
-rw-r--r--tests/ui/simd/portable-intrinsics-arent-exposed.stderr7
-rw-r--r--tests/ui/simd/repr_packed.rs59
-rw-r--r--tests/ui/simd/type-generic-monomorphisation-empty.stderr2
-rw-r--r--tests/ui/simd/type-generic-monomorphisation-non-primitive.stderr2
-rw-r--r--tests/ui/simd/type-generic-monomorphisation-oversized.stderr2
-rw-r--r--tests/ui/simd/type-generic-monomorphisation-wide-ptr.stderr2
-rw-r--r--tests/ui/simd/type-generic-monomorphisation.stderr2
-rw-r--r--tests/ui/simd/type-wide-ptr.stderr2
-rw-r--r--tests/ui/single-use-lifetime/one-use-in-inherent-impl-header.stderr2
-rw-r--r--tests/ui/single-use-lifetime/one-use-in-inherent-method-return.stderr2
-rw-r--r--tests/ui/single-use-lifetime/one-use-in-trait-method-argument.stderr2
-rw-r--r--tests/ui/single-use-lifetime/two-uses-in-inherent-method-argument-and-return.stderr2
-rw-r--r--tests/ui/single-use-lifetime/zero-uses-in-impl.stderr2
-rw-r--r--tests/ui/sized-cycle-note.stderr2
-rw-r--r--tests/ui/sized/recursive-type-2.stderr2
-rw-r--r--tests/ui/sized/unsized-binding.stderr2
-rw-r--r--tests/ui/span/E0046.stderr2
-rw-r--r--tests/ui/span/E0072.stderr2
-rw-r--r--tests/ui/span/E0493.stderr2
-rw-r--r--tests/ui/span/E0535.stderr2
-rw-r--r--tests/ui/span/E0536.stderr2
-rw-r--r--tests/ui/span/E0537.stderr2
-rw-r--r--tests/ui/span/borrowck-call-method-from-mut-aliasable.stderr2
-rw-r--r--tests/ui/span/borrowck-fn-in-const-b.stderr2
-rw-r--r--tests/ui/span/borrowck-ref-into-rvalue.stderr2
-rw-r--r--tests/ui/span/destructor-restrictions.stderr2
-rw-r--r--tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.stderr2
-rw-r--r--tests/ui/span/dropck-object-cycle.stderr2
-rw-r--r--tests/ui/span/gated-features-attr-spans.stderr2
-rw-r--r--tests/ui/span/issue-11925.stderr2
-rw-r--r--tests/ui/span/issue-15480.stderr2
-rw-r--r--tests/ui/span/issue-23729.stderr2
-rw-r--r--tests/ui/span/issue-23827.stderr2
-rw-r--r--tests/ui/span/issue-24356.stderr2
-rw-r--r--tests/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr2
-rw-r--r--tests/ui/span/issue-24895-copy-clone-dropck.stderr2
-rw-r--r--tests/ui/span/issue-25199.stderr2
-rw-r--r--tests/ui/span/issue-26656.stderr2
-rw-r--r--tests/ui/span/issue-27522.stderr2
-rw-r--r--tests/ui/span/issue-29595.stderr2
-rw-r--r--tests/ui/span/issue-33884.stderr2
-rw-r--r--tests/ui/span/issue-35987.stderr2
-rw-r--r--tests/ui/span/issue-36537.stderr2
-rw-r--r--tests/ui/span/issue-40157.stderr2
-rw-r--r--tests/ui/span/issue28498-reject-ex1.stderr2
-rw-r--r--tests/ui/span/issue28498-reject-lifetime-param.stderr2
-rw-r--r--tests/ui/span/issue28498-reject-passed-to-fn.stderr2
-rw-r--r--tests/ui/span/issue28498-reject-trait-bound.stderr2
-rw-r--r--tests/ui/span/move-closure.stderr2
-rw-r--r--tests/ui/span/multiline-span-E0072.stderr2
-rw-r--r--tests/ui/span/multiline-span-simple.stderr2
-rw-r--r--tests/ui/span/mut-ptr-cant-outlive-ref.stderr2
-rw-r--r--tests/ui/span/non-existing-module-import.stderr2
-rw-r--r--tests/ui/span/recursive-type-field.stderr2
-rw-r--r--tests/ui/span/regionck-unboxed-closure-lifetimes.stderr2
-rw-r--r--tests/ui/span/regions-close-over-borrowed-ref-in-obj.stderr2
-rw-r--r--tests/ui/span/regions-close-over-type-parameter-2.stderr2
-rw-r--r--tests/ui/span/regions-escape-loop-via-variable.stderr2
-rw-r--r--tests/ui/span/regions-infer-borrow-scope-within-loop.stderr2
-rw-r--r--tests/ui/span/slice-borrow.stderr2
-rw-r--r--tests/ui/span/suggestion-non-ascii.stderr2
-rw-r--r--tests/ui/span/transitive-dep-span.stderr2
-rw-r--r--tests/ui/span/type-annotations-needed-expr.stderr2
-rw-r--r--tests/ui/span/type-binding.stderr2
-rw-r--r--tests/ui/span/wf-method-late-bound-regions.stderr2
-rw-r--r--tests/ui/specialization/default-associated-type-bound-1.stderr2
-rw-r--r--tests/ui/specialization/default-associated-type-bound-2.stderr2
-rw-r--r--tests/ui/specialization/default-generic-associated-type-bound.stderr2
-rw-r--r--tests/ui/specialization/defaultimpl/specialization-feature-gate-default.stderr2
-rw-r--r--tests/ui/specialization/defaultimpl/specialization-trait-item-not-implemented.stderr2
-rw-r--r--tests/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr2
-rw-r--r--tests/ui/specialization/defaultimpl/specialization-wfcheck.stderr2
-rw-r--r--tests/ui/specialization/issue-111232.stderr2
-rw-r--r--tests/ui/specialization/issue-33017.stderr2
-rw-r--r--tests/ui/specialization/issue-38091-2.stderr2
-rw-r--r--tests/ui/specialization/issue-38091.stderr2
-rw-r--r--tests/ui/specialization/issue-39448.stderr2
-rw-r--r--tests/ui/specialization/issue-43037.current.stderr2
-rw-r--r--tests/ui/specialization/issue-43037.negative.stderr2
-rw-r--r--tests/ui/specialization/issue-44861.stderr2
-rw-r--r--tests/ui/specialization/issue-45814.current.stderr2
-rw-r--r--tests/ui/specialization/issue-45814.negative.stderr2
-rw-r--r--tests/ui/specialization/issue-50452-fail.stderr2
-rw-r--r--tests/ui/specialization/issue-51892.stderr2
-rw-r--r--tests/ui/specialization/issue-52050.stderr2
-rw-r--r--tests/ui/specialization/issue-59435.stderr2
-rw-r--r--tests/ui/specialization/issue-68830-spurious-diagnostics.stderr2
-rw-r--r--tests/ui/specialization/min_specialization/bad-const-wf-doesnt-specialize.stderr2
-rw-r--r--tests/ui/specialization/min_specialization/impl-on-nonexisting.stderr2
-rw-r--r--tests/ui/specialization/min_specialization/impl_specialization_trait.stderr2
-rw-r--r--tests/ui/specialization/min_specialization/repeated_projection_type.stderr2
-rw-r--r--tests/ui/specialization/min_specialization/repeating_lifetimes.stderr2
-rw-r--r--tests/ui/specialization/min_specialization/repeating_param.stderr2
-rw-r--r--tests/ui/specialization/min_specialization/spec-marker-supertraits.stderr2
-rw-r--r--tests/ui/specialization/min_specialization/specialization_super_trait.stderr2
-rw-r--r--tests/ui/specialization/min_specialization/specialize_nothing.stderr2
-rw-r--r--tests/ui/specialization/min_specialization/specialize_on_static.stderr2
-rw-r--r--tests/ui/specialization/min_specialization/specialize_on_trait.stderr2
-rw-r--r--tests/ui/specialization/min_specialization/specialize_on_type_error.stderr2
-rw-r--r--tests/ui/specialization/specialization-default-items-drop-coherence.coherence.stderr2
-rw-r--r--tests/ui/specialization/specialization-default-items-drop-coherence.next.stderr2
-rw-r--r--tests/ui/specialization/specialization-default-items-drop-coherence.rs4
-rw-r--r--tests/ui/specialization/specialization-feature-gate-default.stderr2
-rw-r--r--tests/ui/specialization/specialization-feature-gate-overlap.stderr2
-rw-r--r--tests/ui/specialization/specialization-overlap-hygiene.stderr2
-rw-r--r--tests/ui/specialization/specialization-overlap-negative.stderr2
-rw-r--r--tests/ui/specialization/specialization-translate-projections.rs1
-rw-r--r--tests/ui/stability-attribute/accidental-stable-in-unstable.stderr2
-rw-r--r--tests/ui/stability-attribute/allowed-through-unstable.stderr2
-rw-r--r--tests/ui/stability-attribute/const-stability-attribute-implies-missing.stderr2
-rw-r--r--tests/ui/stability-attribute/const-stability-attribute-implies-no-feature.stderr2
-rw-r--r--tests/ui/stability-attribute/const-stability-attribute-implies-using-stable.stderr2
-rw-r--r--tests/ui/stability-attribute/const-stability-attribute-implies-using-unstable.stderr2
-rw-r--r--tests/ui/stability-attribute/generics-default-stability-where.stderr2
-rw-r--r--tests/ui/stability-attribute/issue-28075.stderr2
-rw-r--r--tests/ui/stability-attribute/issue-28388-3.stderr2
-rw-r--r--tests/ui/stability-attribute/missing-stability-attr-at-top-level.stderr2
-rw-r--r--tests/ui/stability-attribute/stability-attribute-implies-missing.stderr2
-rw-r--r--tests/ui/stability-attribute/stability-attribute-implies-using-stable.stderr2
-rw-r--r--tests/ui/stability-attribute/stability-attribute-implies-using-unstable.stderr2
-rw-r--r--tests/ui/stability-attribute/stability-attribute-sanity-3.stderr2
-rw-r--r--tests/ui/stability-attribute/stability-in-private-module.stderr2
-rw-r--r--tests/ui/stability-attribute/unresolved_stability_lint.stderr2
-rw-r--r--tests/ui/stable-mir-print/basic_function.rs15
-rw-r--r--tests/ui/stable-mir-print/basic_function.stdout234
-rw-r--r--tests/ui/static/bad-const-type.stderr2
-rw-r--r--tests/ui/static/issue-18118-2.stderr2
-rw-r--r--tests/ui/static/issue-18118.stderr2
-rw-r--r--tests/ui/static/static-closures.stderr2
-rw-r--r--tests/ui/static/static-items-cant-move.stderr2
-rw-r--r--tests/ui/static/static-lifetime-bound.stderr2
-rw-r--r--tests/ui/static/static-lifetime.stderr2
-rw-r--r--tests/ui/static/static-method-privacy.stderr2
-rw-r--r--tests/ui/static/static-mut-bad-types.stderr2
-rw-r--r--tests/ui/static/static-mut-not-constant.stderr2
-rw-r--r--tests/ui/static/static-reference-to-fn-1.stderr6
-rw-r--r--tests/ui/static/static-region-bound.stderr2
-rw-r--r--tests/ui/static/static-vec-repeat-not-constant.stderr2
-rw-r--r--tests/ui/statics/issue-14227.mir.stderr2
-rw-r--r--tests/ui/statics/issue-14227.thir.stderr2
-rw-r--r--tests/ui/statics/issue-17718-static-sync.stderr2
-rw-r--r--tests/ui/statics/issue-44373.stderr2
-rw-r--r--tests/ui/stats/hir-stats.stderr58
-rw-r--r--tests/ui/stdlib-unit-tests/istr.rs2
-rw-r--r--tests/ui/stdlib-unit-tests/minmax-stability-issue-23687.rs2
-rw-r--r--tests/ui/str/str-as-char.stderr2
-rw-r--r--tests/ui/str/str-concat-on-double-ref.stderr2
-rw-r--r--tests/ui/structs-enums/class-cast-to-trait-cross-crate-2.rs1
-rw-r--r--tests/ui/structs-enums/enum-nullable-const-null-with-fields.rs3
-rw-r--r--tests/ui/structs-enums/enum-rec/issue-17431-6.stderr2
-rw-r--r--tests/ui/structs-enums/enum-rec/issue-17431-7.stderr2
-rw-r--r--tests/ui/structs-enums/issue-103869.stderr2
-rw-r--r--tests/ui/structs-enums/issue-2718-a.stderr2
-rw-r--r--tests/ui/structs-enums/issue-3008-1.stderr2
-rw-r--r--tests/ui/structs-enums/issue-3008-2.stderr2
-rw-r--r--tests/ui/structs-enums/issue-3008-3.stderr2
-rw-r--r--tests/ui/structs-enums/struct-enum-ignoring-field-with-underscore.stderr2
-rw-r--r--tests/ui/structs-enums/struct-rec/issue-17431-1.stderr2
-rw-r--r--tests/ui/structs-enums/struct-rec/issue-17431-2.stderr2
-rw-r--r--tests/ui/structs-enums/struct-rec/issue-17431-3.stderr2
-rw-r--r--tests/ui/structs-enums/struct-rec/issue-17431-4.stderr2
-rw-r--r--tests/ui/structs-enums/struct-rec/issue-17431-5.stderr2
-rw-r--r--tests/ui/structs-enums/struct-rec/issue-74224.stderr2
-rw-r--r--tests/ui/structs-enums/struct-rec/issue-84611.stderr2
-rw-r--r--tests/ui/structs-enums/type-sizes.rs1
-rw-r--r--tests/ui/structs/incomplete-fn-in-struct-definition.stderr2
-rw-r--r--tests/ui/structs/issue-80853.stderr2
-rw-r--r--tests/ui/structs/method-chain-expression-failure.stderr2
-rw-r--r--tests/ui/structs/multi-line-fru-suggestion.stderr2
-rw-r--r--tests/ui/structs/struct-duplicate-comma.stderr2
-rw-r--r--tests/ui/structs/struct-fields-decl-dupe.stderr2
-rw-r--r--tests/ui/structs/struct-fields-dupe.stderr2
-rw-r--r--tests/ui/structs/struct-fields-hints-no-dupe.stderr9
-rw-r--r--tests/ui/structs/struct-fields-hints.stderr9
-rw-r--r--tests/ui/structs/struct-fields-missing.stderr2
-rw-r--r--tests/ui/structs/struct-fields-shorthand-unresolved.stderr2
-rw-r--r--tests/ui/structs/struct-fields-shorthand.stderr2
-rw-r--r--tests/ui/structs/struct-fields-too-many.stderr2
-rw-r--r--tests/ui/structs/struct-fields-typo.stderr9
-rw-r--r--tests/ui/structs/struct-missing-comma.stderr2
-rw-r--r--tests/ui/structs/struct-pat-derived-error.stderr7
-rw-r--r--tests/ui/structs/struct-path-alias-bounds.stderr2
-rw-r--r--tests/ui/structs/struct-path-self-type-mismatch.stderr8
-rw-r--r--tests/ui/structs/suggest-private-fields.stderr21
-rw-r--r--tests/ui/structs/unresolved-struct-with-fru.stderr2
-rw-r--r--tests/ui/suggestions/abi-typo.stderr2
-rw-r--r--tests/ui/suggestions/as-ref-2.stderr11
-rw-r--r--tests/ui/suggestions/as-ref.stderr12
-rw-r--r--tests/ui/suggestions/assoc-const-as-field.stderr2
-rw-r--r--tests/ui/suggestions/assoc-const-as-fn.stderr2
-rw-r--r--tests/ui/suggestions/assoc-const-without-self.stderr2
-rw-r--r--tests/ui/suggestions/assoc-type-in-method-return.stderr2
-rw-r--r--tests/ui/suggestions/bad-infer-in-trait-impl.stderr2
-rw-r--r--tests/ui/suggestions/box-future-wrong-output.stderr2
-rw-r--r--tests/ui/suggestions/boxed-variant-field.stderr2
-rw-r--r--tests/ui/suggestions/call-boxed.stderr2
-rw-r--r--tests/ui/suggestions/call-on-missing.stderr4
-rw-r--r--tests/ui/suggestions/call-on-unimplemented-ctor.stderr2
-rw-r--r--tests/ui/suggestions/call-on-unimplemented-fn-ptr.stderr2
-rw-r--r--tests/ui/suggestions/call-on-unimplemented-with-autoderef.stderr2
-rw-r--r--tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.stderr4
-rw-r--r--tests/ui/suggestions/const-in-struct-pat.stderr2
-rw-r--r--tests/ui/suggestions/const-pat-non-exaustive-let-new-var.stderr2
-rw-r--r--tests/ui/suggestions/constrain-suggest-ice.stderr2
-rw-r--r--tests/ui/suggestions/core-std-import-order-issue-83564.stderr2
-rw-r--r--tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.stderr2
-rw-r--r--tests/ui/suggestions/crate-or-module-typo.rs2
-rw-r--r--tests/ui/suggestions/crate-or-module-typo.stderr4
-rw-r--r--tests/ui/suggestions/deref-path-method.stderr2
-rw-r--r--tests/ui/suggestions/derive-clone-for-eq.fixed2
-rw-r--r--tests/ui/suggestions/derive-clone-for-eq.rs2
-rw-r--r--tests/ui/suggestions/derive-clone-for-eq.stderr6
-rw-r--r--tests/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr2
-rw-r--r--tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-child.stderr2
-rw-r--r--tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-parent.stderr2
-rw-r--r--tests/ui/suggestions/dont-suggest-pin-array-dot-set.stderr2
-rw-r--r--tests/ui/suggestions/dont-suggest-try_into-in-macros.stderr2
-rw-r--r--tests/ui/suggestions/dont-suggest-ufcs-for-const.stderr2
-rw-r--r--tests/ui/suggestions/dont-wrap-ambiguous-receivers.stderr2
-rw-r--r--tests/ui/suggestions/enum-variant-arg-mismatch.stderr6
-rw-r--r--tests/ui/suggestions/field-access-considering-privacy.stderr2
-rw-r--r--tests/ui/suggestions/field-has-method.stderr2
-rw-r--r--tests/ui/suggestions/fn-needing-specified-return-type-param.stderr2
-rw-r--r--tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr2
-rw-r--r--tests/ui/suggestions/imm-ref-trait-object.stderr2
-rw-r--r--tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr66
-rw-r--r--tests/ui/suggestions/impl-trait-missing-lifetime.stderr22
-rw-r--r--tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.stderr2
-rw-r--r--tests/ui/suggestions/import-trait-for-method-call.rs2
-rw-r--r--tests/ui/suggestions/into-str.stderr2
-rw-r--r--tests/ui/suggestions/invalid-bin-op.stderr6
-rw-r--r--tests/ui/suggestions/issue-101065.stderr2
-rw-r--r--tests/ui/suggestions/issue-101421.stderr2
-rw-r--r--tests/ui/suggestions/issue-101465.stderr2
-rw-r--r--tests/ui/suggestions/issue-101623.stderr2
-rw-r--r--tests/ui/suggestions/issue-101984.stderr2
-rw-r--r--tests/ui/suggestions/issue-102354.stderr2
-rw-r--r--tests/ui/suggestions/issue-103112.stderr2
-rw-r--r--tests/ui/suggestions/issue-103646.stderr2
-rw-r--r--tests/ui/suggestions/issue-104327.stderr2
-rw-r--r--tests/ui/suggestions/issue-104328.stderr2
-rw-r--r--tests/ui/suggestions/issue-105645.stderr2
-rw-r--r--tests/ui/suggestions/issue-107860.stderr2
-rw-r--r--tests/ui/suggestions/issue-109291.stderr2
-rw-r--r--tests/ui/suggestions/issue-109436.stderr2
-rw-r--r--tests/ui/suggestions/issue-109854.stderr2
-rw-r--r--tests/ui/suggestions/issue-114701.stderr2
-rw-r--r--tests/ui/suggestions/issue-117669.rs4
-rw-r--r--tests/ui/suggestions/issue-117669.stderr18
-rw-r--r--tests/ui/suggestions/issue-51055-missing-semicolon-between-call-and-tuple.stderr2
-rw-r--r--tests/ui/suggestions/issue-61226.stderr2
-rw-r--r--tests/ui/suggestions/issue-62843.stderr2
-rw-r--r--tests/ui/suggestions/issue-66968-suggest-sorted-words.stderr2
-rw-r--r--tests/ui/suggestions/issue-68049-1.stderr2
-rw-r--r--tests/ui/suggestions/issue-71394-no-from-impl.stderr4
-rw-r--r--tests/ui/suggestions/issue-72766.stderr2
-rw-r--r--tests/ui/suggestions/issue-81839.stderr2
-rw-r--r--tests/ui/suggestions/issue-83892.stderr2
-rw-r--r--tests/ui/suggestions/issue-83943.stderr2
-rw-r--r--tests/ui/suggestions/issue-84592.stderr2
-rw-r--r--tests/ui/suggestions/issue-84973-2.stderr2
-rw-r--r--tests/ui/suggestions/issue-84973.stderr2
-rw-r--r--tests/ui/suggestions/issue-85943-no-suggest-unsized-indirection-in-where-clause.stderr2
-rw-r--r--tests/ui/suggestions/issue-85945-check-where-clause-before-suggesting-unsized.stderr2
-rw-r--r--tests/ui/suggestions/issue-88696.stderr2
-rw-r--r--tests/ui/suggestions/issue-89333.stderr2
-rw-r--r--tests/ui/suggestions/issue-89640.stderr2
-rw-r--r--tests/ui/suggestions/issue-90213-expected-boxfuture-self-ice.stderr2
-rw-r--r--tests/ui/suggestions/issue-90974.stderr2
-rw-r--r--tests/ui/suggestions/issue-96223.stderr2
-rw-r--r--tests/ui/suggestions/issue-97677.stderr2
-rw-r--r--tests/ui/suggestions/issue-97704.stderr2
-rw-r--r--tests/ui/suggestions/issue-97760.stderr2
-rw-r--r--tests/ui/suggestions/issue-98500.stderr2
-rw-r--r--tests/ui/suggestions/issue-98562.stderr2
-rw-r--r--tests/ui/suggestions/issue-99080.stderr2
-rw-r--r--tests/ui/suggestions/issue-99240-2.stderr2
-rw-r--r--tests/ui/suggestions/issue-99240.stderr2
-rw-r--r--tests/ui/suggestions/issue-99597.stderr2
-rw-r--r--tests/ui/suggestions/js-style-comparison-op-separate-eq-token.stderr2
-rw-r--r--tests/ui/suggestions/late-bound-in-borrow-closure-sugg.stderr6
-rw-r--r--tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.stderr2
-rw-r--r--tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.stderr2
-rw-r--r--tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.fixed11
-rw-r--r--tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.rs (renamed from tests/ui/issues/issue-16922.rs)1
-rw-r--r--tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.stderr (renamed from tests/ui/issues/issue-16922.stderr)4
-rw-r--r--tests/ui/suggestions/many-type-ascription.stderr2
-rw-r--r--tests/ui/suggestions/method-access-to-range-literal-typo.stderr4
-rw-r--r--tests/ui/suggestions/mismatched-types-numeric-from.stderr2
-rw-r--r--tests/ui/suggestions/missing-assoc-fn-applicable-suggestions.stderr2
-rw-r--r--tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.stderr2
-rw-r--r--tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.stderr2
-rw-r--r--tests/ui/suggestions/missing-bound-in-derive-copy-impl.stderr2
-rw-r--r--tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.stderr2
-rw-r--r--tests/ui/suggestions/missing-bound-in-manual-copy-impl.stderr2
-rw-r--r--tests/ui/suggestions/missing-lifetime-specifier.stderr10
-rw-r--r--tests/ui/suggestions/missing-type-param-used-in-param.stderr2
-rw-r--r--tests/ui/suggestions/move-generic-to-trait-in-method-with-params.stderr2
-rw-r--r--tests/ui/suggestions/mut-ref-reassignment.stderr4
-rw-r--r--tests/ui/suggestions/no-extern-crate-in-type.stderr2
-rw-r--r--tests/ui/suggestions/non-existent-field-present-in-subfield-recursion-limit.stderr2
-rw-r--r--tests/ui/suggestions/non-existent-field-present-in-subfield.stderr2
-rw-r--r--tests/ui/suggestions/non_ascii_ident.rs7
-rw-r--r--tests/ui/suggestions/non_ascii_ident.stderr15
-rw-r--r--tests/ui/suggestions/opaque-type-error.stderr2
-rw-r--r--tests/ui/suggestions/option-content-move-from-tuple-match.stderr2
-rw-r--r--tests/ui/suggestions/option-content-move.fixed38
-rw-r--r--tests/ui/suggestions/option-content-move.rs1
-rw-r--r--tests/ui/suggestions/option-content-move.stderr12
-rw-r--r--tests/ui/suggestions/option-content-move2.stderr2
-rw-r--r--tests/ui/suggestions/option-to-bool.stderr2
-rw-r--r--tests/ui/suggestions/parenthesized-deref-suggestion.stderr5
-rw-r--r--tests/ui/suggestions/path-by-value.stderr2
-rw-r--r--tests/ui/suggestions/private-field.stderr4
-rw-r--r--tests/ui/suggestions/range-index-instead-of-colon.rs7
-rw-r--r--tests/ui/suggestions/range-index-instead-of-colon.stderr13
-rw-r--r--tests/ui/suggestions/remove-question-symbol-with-paren.stderr2
-rw-r--r--tests/ui/suggestions/restrict-type-not-param.stderr2
-rw-r--r--tests/ui/suggestions/return-cycle-2.stderr2
-rw-r--r--tests/ui/suggestions/return-cycle.stderr2
-rw-r--r--tests/ui/suggestions/return-elided-lifetime.stderr22
-rw-r--r--tests/ui/suggestions/shadowed-lplace-method-2.stderr2
-rw-r--r--tests/ui/suggestions/shadowed-lplace-method.stderr2
-rw-r--r--tests/ui/suggestions/silenced-binding-typo.stderr2
-rw-r--r--tests/ui/suggestions/sugg-else-for-closure.stderr2
-rw-r--r--tests/ui/suggestions/sugg_with_positional_args_and_debug_fmt.stderr2
-rw-r--r--tests/ui/suggestions/suggest-assoc-fn-call-deref.stderr2
-rw-r--r--tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish-placeholder.stderr2
-rw-r--r--tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish-through-deref.stderr2
-rw-r--r--tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.fixed30
-rw-r--r--tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.rs30
-rw-r--r--tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.stderr79
-rw-r--r--tests/ui/suggestions/suggest-box.stderr2
-rw-r--r--tests/ui/suggestions/suggest-closure-return-type-1.stderr2
-rw-r--r--tests/ui/suggestions/suggest-closure-return-type-2.stderr2
-rw-r--r--tests/ui/suggestions/suggest-closure-return-type-3.stderr2
-rw-r--r--tests/ui/suggestions/suggest-dereferencing-index.stderr4
-rw-r--r--tests/ui/suggestions/suggest-field-through-deref.fixed21
-rw-r--r--tests/ui/suggestions/suggest-field-through-deref.rs21
-rw-r--r--tests/ui/suggestions/suggest-field-through-deref.stderr69
-rw-r--r--tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.stderr2
-rw-r--r--tests/ui/suggestions/suggest-full-enum-variant-for-local-module.stderr2
-rw-r--r--tests/ui/suggestions/suggest-impl-trait-lifetime.stderr2
-rw-r--r--tests/ui/suggestions/suggest-let-for-assignment.fixed6
-rw-r--r--tests/ui/suggestions/suggest-let-for-assignment.rs6
-rw-r--r--tests/ui/suggestions/suggest-let-for-assignment.stderr42
-rw-r--r--tests/ui/suggestions/suggest-mut-method-for-loop-closure.stderr2
-rw-r--r--tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.stderr2
-rw-r--r--tests/ui/suggestions/suggest-mut-method-for-loop.stderr2
-rw-r--r--tests/ui/suggestions/suggest-pin-macro.stderr2
-rw-r--r--tests/ui/suggestions/suggest-remove-refs-1.stderr2
-rw-r--r--tests/ui/suggestions/suggest-remove-refs-2.stderr2
-rw-r--r--tests/ui/suggestions/suggest-remove-refs-3.stderr2
-rw-r--r--tests/ui/suggestions/suggest-remove-refs-4.stderr2
-rw-r--r--tests/ui/suggestions/suggest-ret-on-async-w-late.stderr2
-rw-r--r--tests/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.stderr2
-rw-r--r--tests/ui/suggestions/suggest-split-at-mut.stderr2
-rw-r--r--tests/ui/suggestions/suggest-trait-in-ufcs-in-hrtb.stderr2
-rw-r--r--tests/ui/suggestions/suggest-tryinto-edition-change.stderr6
-rw-r--r--tests/ui/suggestions/suggest_print_over_printf.stderr2
-rw-r--r--tests/ui/suggestions/too-many-field-suggestions.stderr1
-rw-r--r--tests/ui/suggestions/type-ascription-and-other-error.stderr2
-rw-r--r--tests/ui/suggestions/type-ascription-instead-of-let.stderr2
-rw-r--r--tests/ui/suggestions/type-ascription-instead-of-method.stderr2
-rw-r--r--tests/ui/suggestions/type-ascription-instead-of-path-2.stderr2
-rw-r--r--tests/ui/suggestions/type-ascription-instead-of-path.stderr2
-rw-r--r--tests/ui/suggestions/type-ascription-instead-of-variant.stderr2
-rw-r--r--tests/ui/suggestions/type-mismatch-struct-field-shorthand-2.stderr7
-rw-r--r--tests/ui/suggestions/undeclared-module-alloc.stderr2
-rw-r--r--tests/ui/suggestions/use-placement-resolve.stderr2
-rw-r--r--tests/ui/suggestions/use-placement-typeck.stderr2
-rw-r--r--tests/ui/super-at-top-level.stderr2
-rw-r--r--tests/ui/svh/changing-crates.stderr2
-rw-r--r--tests/ui/svh/svh-change-lit.stderr2
-rw-r--r--tests/ui/svh/svh-change-significant-cfg.stderr2
-rw-r--r--tests/ui/svh/svh-change-trait-bound.stderr2
-rw-r--r--tests/ui/svh/svh-change-type-arg.stderr2
-rw-r--r--tests/ui/svh/svh-change-type-ret.stderr2
-rw-r--r--tests/ui/svh/svh-change-type-static.stderr2
-rw-r--r--tests/ui/svh/svh-use-trait.stderr2
-rw-r--r--tests/ui/switched-expectations.stderr2
-rw-r--r--tests/ui/symbol-names/foreign-types.stderr2
-rw-r--r--tests/ui/symbol-names/impl2.stderr2
-rw-r--r--tests/ui/sync/mutexguard-sync.stderr2
-rw-r--r--tests/ui/sync/suggest-once-cell.stderr2
-rw-r--r--tests/ui/sync/suggest-ref-cell.stderr2
-rw-r--r--tests/ui/tag-type-args.stderr2
-rw-r--r--tests/ui/tag-variant-cast-non-nullary.stderr2
-rw-r--r--tests/ui/tail-typeck.stderr2
-rw-r--r--tests/ui/target-feature/gate.stderr2
-rw-r--r--tests/ui/target-feature/tied-features-cli.one.stderr2
-rw-r--r--tests/ui/target-feature/tied-features-cli.three.stderr2
-rw-r--r--tests/ui/target-feature/tied-features-cli.two.stderr2
-rw-r--r--tests/ui/test-attrs/custom-test-frameworks/issue-107454.stderr2
-rw-r--r--tests/ui/test-attrs/issue-109816.stderr2
-rw-r--r--tests/ui/test-attrs/issue-12997-2.stderr2
-rw-r--r--tests/ui/test-attrs/test-panic-abort-disabled.stderr2
-rw-r--r--tests/ui/test-attrs/test-warns-dead-code.stderr2
-rw-r--r--tests/ui/thir-print/thir-flat-const-variant.stdout61
-rw-r--r--tests/ui/thir-print/thir-flat.stdout13
-rw-r--r--tests/ui/thir-print/thir-tree-match.stdout365
-rw-r--r--tests/ui/thir-print/thir-tree.stdout30
-rw-r--r--tests/ui/thread-local/thread-local-mutation.stderr2
-rw-r--r--tests/ui/tool-attributes/diagnostic_item.stderr2
-rw-r--r--tests/ui/tool-attributes/tool-attributes-shadowing.stderr2
-rw-r--r--tests/ui/tool_lints-fail.stderr2
-rw-r--r--tests/ui/tool_lints_2018_preview.rs1
-rw-r--r--tests/ui/track-diagnostics/track2.stderr2
-rw-r--r--tests/ui/track-diagnostics/track4.stderr2
-rw-r--r--tests/ui/track-diagnostics/track5.stderr2
-rw-r--r--tests/ui/track-diagnostics/track6.stderr2
-rw-r--r--tests/ui/trait-bounds/enum-unit-variant-trait-bound.stderr2
-rw-r--r--tests/ui/trait-bounds/impl-derived-implicit-sized-bound-2.stderr2
-rw-r--r--tests/ui/trait-bounds/impl-derived-implicit-sized-bound.stderr2
-rw-r--r--tests/ui/trait-bounds/issue-82038.stderr2
-rw-r--r--tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.stderr2
-rw-r--r--tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.stderr2
-rw-r--r--tests/ui/trait-impl-bound-suggestions.stderr2
-rw-r--r--tests/ui/trait-method-number-parameters.stderr2
-rw-r--r--tests/ui/traits/alias/ambiguous.stderr2
-rw-r--r--tests/ui/traits/alias/dont-elaborate-non-self.stderr2
-rw-r--r--tests/ui/traits/alias/impl.stderr2
-rw-r--r--tests/ui/traits/alias/issue-108072-unmet-trait-alias-bound.stderr2
-rw-r--r--tests/ui/traits/alias/issue-108132-unmet-trait-alias-bound-on-generic-impl.stderr2
-rw-r--r--tests/ui/traits/alias/issue-83613.stderr2
-rw-r--r--tests/ui/traits/alias/self-in-const-generics.stderr2
-rw-r--r--tests/ui/traits/alias/self-in-generics.stderr2
-rw-r--r--tests/ui/traits/alias/suggest-trait-alias-instead-of-type.stderr2
-rw-r--r--tests/ui/traits/alias/wf.stderr2
-rw-r--r--tests/ui/traits/as-struct-constructor.stderr2
-rw-r--r--tests/ui/traits/assoc-type-in-superbad.stderr2
-rw-r--r--tests/ui/traits/associated_type_bound/check-trait-object-bounds-1.stderr2
-rw-r--r--tests/ui/traits/associated_type_bound/check-trait-object-bounds-2.stderr2
-rw-r--r--tests/ui/traits/associated_type_bound/check-trait-object-bounds-3.stderr2
-rw-r--r--tests/ui/traits/associated_type_bound/check-trait-object-bounds-4.stderr2
-rw-r--r--tests/ui/traits/associated_type_bound/check-trait-object-bounds-5.stderr2
-rw-r--r--tests/ui/traits/associated_type_bound/check-trait-object-bounds-6.stderr2
-rw-r--r--tests/ui/traits/bad-method-typaram-kind.stderr2
-rw-r--r--tests/ui/traits/bound/assoc-fn-bound-root-obligation.stderr2
-rw-r--r--tests/ui/traits/bound/not-on-bare-trait.stderr2
-rw-r--r--tests/ui/traits/bound/on-structs-and-enums-in-impls.stderr2
-rw-r--r--tests/ui/traits/bound/sugar.stderr2
-rw-r--r--tests/ui/traits/cache-reached-depth-ice.stderr2
-rw-r--r--tests/ui/traits/coercion-generic-bad.stderr2
-rw-r--r--tests/ui/traits/coercion-generic-regions.stderr2
-rw-r--r--tests/ui/traits/copy-guessing.stderr2
-rw-r--r--tests/ui/traits/copy-impl-cannot-normalize.stderr2
-rw-r--r--tests/ui/traits/copy-is-not-modulo-regions.not_static.stderr2
-rw-r--r--tests/ui/traits/cycle-cache-err-60010.stderr2
-rw-r--r--tests/ui/traits/default-method/rustc_must_implement_one_of.stderr2
-rw-r--r--tests/ui/traits/default-method/rustc_must_implement_one_of_gated.stderr2
-rw-r--r--tests/ui/traits/deny-builtin-object-impl.current.stderr2
-rw-r--r--tests/ui/traits/deny-builtin-object-impl.next.stderr2
-rw-r--r--tests/ui/traits/deny-builtin-object-impl.rs2
-rw-r--r--tests/ui/traits/do-not-mention-type-params-by-name-in-suggestion-issue-96292.stderr2
-rw-r--r--tests/ui/traits/duplicate-methods.stderr2
-rw-r--r--tests/ui/traits/ice-with-dyn-pointee-errors.stderr2
-rw-r--r--tests/ui/traits/ignore-err-impls.stderr2
-rw-r--r--tests/ui/traits/impl-1.stderr2
-rw-r--r--tests/ui/traits/impl-bounds-checking.stderr2
-rw-r--r--tests/ui/traits/impl-different-num-params.stderr2
-rw-r--r--tests/ui/traits/impl-for-module.stderr2
-rw-r--r--tests/ui/traits/impl-method-mismatch.stderr6
-rw-r--r--tests/ui/traits/impl-of-supertrait-has-wrong-lifetime-parameters.stderr2
-rw-r--r--tests/ui/traits/inductive-overflow/lifetime.stderr2
-rw-r--r--tests/ui/traits/inductive-overflow/simultaneous.stderr2
-rw-r--r--tests/ui/traits/inductive-overflow/supertrait.stderr2
-rw-r--r--tests/ui/traits/inheritance/num0.rs2
-rw-r--r--tests/ui/traits/inheritance/overloading-simple.rs1
-rw-r--r--tests/ui/traits/inheritance/overloading.rs1
-rw-r--r--tests/ui/traits/invalid_operator_trait.stderr2
-rw-r--r--tests/ui/traits/issue-102989.rs1
-rw-r--r--tests/ui/traits/issue-102989.stderr22
-rw-r--r--tests/ui/traits/issue-117794.rs10
-rw-r--r--tests/ui/traits/issue-117794.stderr9
-rw-r--r--tests/ui/traits/issue-18400.stderr2
-rw-r--r--tests/ui/traits/issue-22019.rs2
-rw-r--r--tests/ui/traits/issue-22384.stderr2
-rw-r--r--tests/ui/traits/issue-24010.rs2
-rw-r--r--tests/ui/traits/issue-28576.stderr2
-rw-r--r--tests/ui/traits/issue-43784-supertrait.stderr2
-rw-r--r--tests/ui/traits/issue-52893.stderr2
-rw-r--r--tests/ui/traits/issue-65284-suggest-generic-trait-bound.stderr2
-rw-r--r--tests/ui/traits/issue-65673.stderr2
-rw-r--r--tests/ui/traits/issue-68295.stderr2
-rw-r--r--tests/ui/traits/issue-7013.stderr2
-rw-r--r--tests/ui/traits/issue-71036.stderr2
-rw-r--r--tests/ui/traits/issue-71136.stderr2
-rw-r--r--tests/ui/traits/issue-72410.stderr2
-rw-r--r--tests/ui/traits/issue-75627.stderr2
-rw-r--r--tests/ui/traits/issue-79458.stderr2
-rw-r--r--tests/ui/traits/issue-8153.stderr2
-rw-r--r--tests/ui/traits/issue-85735.stderr6
-rw-r--r--tests/ui/traits/issue-90662-projection-caching.rs10
-rw-r--r--tests/ui/traits/issue-91594.stderr2
-rw-r--r--tests/ui/traits/issue-91949-hangs-on-recursion.stderr2
-rw-r--r--tests/ui/traits/issue-95898.stderr2
-rw-r--r--tests/ui/traits/issue-97576.stderr2
-rw-r--r--tests/ui/traits/map-types.stderr2
-rw-r--r--tests/ui/traits/method-private.stderr2
-rw-r--r--tests/ui/traits/multidispatch-bad.stderr2
-rw-r--r--tests/ui/traits/multidispatch-convert-ambig-dest.stderr2
-rw-r--r--tests/ui/traits/multidispatch2.rs1
-rw-r--r--tests/ui/traits/mutual-recursion-issue-75860.stderr2
-rw-r--r--tests/ui/traits/negative-impls/feature-gate-negative_impls.stderr2
-rw-r--r--tests/ui/traits/negative-impls/negated-auto-traits-error.stderr8
-rw-r--r--tests/ui/traits/negative-impls/negated-auto-traits-rpass.rs2
-rw-r--r--tests/ui/traits/negative-impls/negative-default-impls.stderr2
-rw-r--r--tests/ui/traits/negative-impls/negative-specializes-positive-item.stderr2
-rw-r--r--tests/ui/traits/negative-impls/negative-specializes-positive.stderr2
-rw-r--r--tests/ui/traits/negative-impls/no-items.stderr2
-rw-r--r--tests/ui/traits/negative-impls/pin-unsound-issue-66544-clone.stderr2
-rw-r--r--tests/ui/traits/negative-impls/pin-unsound-issue-66544-derefmut.stderr2
-rw-r--r--tests/ui/traits/negative-impls/positive-specializes-negative.stderr2
-rw-r--r--tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-norm-overflow.stderr18
-rw-r--r--tests/ui/traits/new-solver/equating-projection-cyclically.stderr9
-rw-r--r--tests/ui/traits/next-solver/alias-bound-preference.rs (renamed from tests/ui/traits/new-solver/alias-bound-preference.rs)2
-rw-r--r--tests/ui/traits/next-solver/alias-bound-unsound.rs (renamed from tests/ui/traits/new-solver/alias-bound-unsound.rs)3
-rw-r--r--tests/ui/traits/next-solver/alias-bound-unsound.stderr (renamed from tests/ui/traits/new-solver/alias-bound-unsound.stderr)10
-rw-r--r--tests/ui/traits/next-solver/alias-eq-in-canonical-response.rs (renamed from tests/ui/traits/new-solver/alias-eq-in-canonical-response.rs)2
-rw-r--r--tests/ui/traits/next-solver/alias-relate/deeply-nested-no-hang.rs22
-rw-r--r--tests/ui/traits/next-solver/alias-relate/opaque-hidden-ty-is-rigid-alias.rs8
-rw-r--r--tests/ui/traits/next-solver/alias-sub.rs (renamed from tests/ui/traits/new-solver/alias-sub.rs)2
-rw-r--r--tests/ui/traits/next-solver/alias_eq_cant_be_furthur_normalized.rs (renamed from tests/ui/traits/new-solver/alias_eq_cant_be_furthur_normalized.rs)2
-rw-r--r--tests/ui/traits/next-solver/alias_eq_dont_use_normalizes_to_if_substs_eq.rs (renamed from tests/ui/traits/new-solver/alias_eq_dont_use_normalizes_to_if_substs_eq.rs)2
-rw-r--r--tests/ui/traits/next-solver/alias_eq_simple.rs (renamed from tests/ui/traits/new-solver/alias_eq_simple.rs)2
-rw-r--r--tests/ui/traits/next-solver/alias_eq_substs_eq_not_intercrate.rs (renamed from tests/ui/traits/new-solver/alias_eq_substs_eq_not_intercrate.rs)2
-rw-r--r--tests/ui/traits/next-solver/alias_eq_substs_eq_not_intercrate.stderr (renamed from tests/ui/traits/new-solver/alias_eq_substs_eq_not_intercrate.stderr)2
-rw-r--r--tests/ui/traits/next-solver/array-default.rs (renamed from tests/ui/traits/new-solver/array-default.rs)2
-rw-r--r--tests/ui/traits/next-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs (renamed from tests/ui/traits/new-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs)2
-rw-r--r--tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.rs (renamed from tests/ui/traits/new-solver/assembly/runaway-impl-candidate-selection.rs)2
-rw-r--r--tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.stderr (renamed from tests/ui/traits/new-solver/assembly/runaway-impl-candidate-selection.stderr)2
-rw-r--r--tests/ui/traits/next-solver/async.fail.stderr (renamed from tests/ui/traits/new-solver/async.fail.stderr)2
-rw-r--r--tests/ui/traits/next-solver/async.rs (renamed from tests/ui/traits/new-solver/async.rs)2
-rw-r--r--tests/ui/traits/next-solver/auto-with-drop_tracking_mir.fail.stderr (renamed from tests/ui/traits/new-solver/auto-with-drop_tracking_mir.fail.stderr)2
-rw-r--r--tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs (renamed from tests/ui/traits/new-solver/auto-with-drop_tracking_mir.rs)2
-rw-r--r--tests/ui/traits/next-solver/borrowck-error.rs (renamed from tests/ui/traits/new-solver/borrowck-error.rs)2
-rw-r--r--tests/ui/traits/next-solver/borrowck-error.stderr (renamed from tests/ui/traits/new-solver/borrowck-error.stderr)2
-rw-r--r--tests/ui/traits/next-solver/builtin-fn-must-return-sized.rs (renamed from tests/ui/traits/new-solver/builtin-fn-must-return-sized.rs)2
-rw-r--r--tests/ui/traits/next-solver/builtin-fn-must-return-sized.stderr (renamed from tests/ui/traits/new-solver/builtin-fn-must-return-sized.stderr)2
-rw-r--r--tests/ui/traits/next-solver/canonical-int-var-eq-in-response.rs (renamed from tests/ui/traits/new-solver/canonical-int-var-eq-in-response.rs)2
-rw-r--r--tests/ui/traits/next-solver/canonical-ty-var-eq-in-response.rs (renamed from tests/ui/traits/new-solver/canonical-ty-var-eq-in-response.rs)2
-rw-r--r--tests/ui/traits/next-solver/canonicalize-effect-var.rs (renamed from tests/ui/traits/new-solver/canonicalize-effect-var.rs)2
-rw-r--r--tests/ui/traits/next-solver/cast-checks-handling-projections.rs (renamed from tests/ui/traits/new-solver/cast-checks-handling-projections.rs)2
-rw-r--r--tests/ui/traits/next-solver/closure-inference-guidance.rs (renamed from tests/ui/traits/new-solver/closure-inference-guidance.rs)2
-rw-r--r--tests/ui/traits/next-solver/closure-signature-inference-2.rs21
-rw-r--r--tests/ui/traits/next-solver/closure-signature-inference.rs15
-rw-r--r--tests/ui/traits/next-solver/closure-substs-ambiguity.rs (renamed from tests/ui/traits/new-solver/closure-substs-ambiguity.rs)2
-rw-r--r--tests/ui/traits/next-solver/coerce-ambig-alias-to-rigid-alias.rs15
-rw-r--r--tests/ui/traits/next-solver/coherence/issue-102048.rs (renamed from tests/ui/traits/new-solver/coherence/issue-102048.rs)2
-rw-r--r--tests/ui/traits/next-solver/coherence/issue-102048.stderr (renamed from tests/ui/traits/new-solver/coherence/issue-102048.stderr)2
-rw-r--r--tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.rs (renamed from tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-norm-overflow.rs)2
-rw-r--r--tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.stderr12
-rw-r--r--tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-1.rs (renamed from tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-normalization-1.rs)2
-rw-r--r--tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-2.rs (renamed from tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-normalization-2.rs)2
-rw-r--r--tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-3.rs (renamed from tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-normalization-3.rs)2
-rw-r--r--tests/ui/traits/next-solver/const-param-placeholder.fail.stderr (renamed from tests/ui/traits/new-solver/const-param-placeholder.fail.stderr)2
-rw-r--r--tests/ui/traits/next-solver/const-param-placeholder.rs (renamed from tests/ui/traits/new-solver/const-param-placeholder.rs)2
-rw-r--r--tests/ui/traits/next-solver/coroutine.fail.stderr (renamed from tests/ui/traits/new-solver/coroutine.fail.stderr)0
-rw-r--r--tests/ui/traits/next-solver/coroutine.rs (renamed from tests/ui/traits/new-solver/coroutine.rs)2
-rw-r--r--tests/ui/traits/next-solver/cycles/coinduction/fixpoint-exponential-growth.rs (renamed from tests/ui/traits/new-solver/cycles/coinduction/fixpoint-exponential-growth.rs)10
-rw-r--r--tests/ui/traits/next-solver/cycles/coinduction/fixpoint-exponential-growth.stderr (renamed from tests/ui/traits/new-solver/cycles/coinduction/fixpoint-exponential-growth.stderr)6
-rw-r--r--tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs (renamed from tests/ui/traits/new-solver/cycles/coinduction/incompleteness-unstable-result.rs)2
-rw-r--r--tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.stderr (renamed from tests/ui/traits/new-solver/cycles/coinduction/incompleteness-unstable-result.stderr)2
-rw-r--r--tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.rs (renamed from tests/ui/traits/new-solver/cycles/double-cycle-inductive-coinductive.rs)2
-rw-r--r--tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.stderr (renamed from tests/ui/traits/new-solver/cycles/double-cycle-inductive-coinductive.stderr)0
-rw-r--r--tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.rs (renamed from tests/ui/traits/new-solver/cycles/fixpoint-rerun-all-cycle-heads.rs)2
-rw-r--r--tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.stderr (renamed from tests/ui/traits/new-solver/cycles/fixpoint-rerun-all-cycle-heads.stderr)2
-rw-r--r--tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.rs (renamed from tests/ui/traits/new-solver/cycles/inductive-cycle-but-err.rs)2
-rw-r--r--tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.stderr (renamed from tests/ui/traits/new-solver/cycles/inductive-cycle-but-err.stderr)2
-rw-r--r--tests/ui/traits/next-solver/cycles/inductive-cycle-but-ok.rs (renamed from tests/ui/traits/new-solver/cycles/inductive-cycle-but-ok.rs)2
-rw-r--r--tests/ui/traits/next-solver/cycles/inductive-cycle-discarded-coinductive-constraints.rs (renamed from tests/ui/traits/new-solver/cycles/inductive-cycle-discarded-coinductive-constraints.rs)2
-rw-r--r--tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.rs33
-rw-r--r--tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.stderr16
-rw-r--r--tests/ui/traits/next-solver/cycles/inductive-not-on-stack.rs (renamed from tests/ui/traits/new-solver/cycles/inductive-not-on-stack.rs)2
-rw-r--r--tests/ui/traits/next-solver/cycles/inductive-not-on-stack.stderr (renamed from tests/ui/traits/new-solver/cycles/inductive-not-on-stack.stderr)0
-rw-r--r--tests/ui/traits/next-solver/cycles/leak-check-coinductive-cycle.rs (renamed from tests/ui/traits/new-solver/cycles/leak-check-coinductive-cycle.rs)2
-rw-r--r--tests/ui/traits/next-solver/cycles/provisional-result-done.rs (renamed from tests/ui/traits/new-solver/cycles/provisional-result-done.rs)2
-rw-r--r--tests/ui/traits/next-solver/deduce-closure-signature-after-normalization.rs (renamed from tests/ui/traits/new-solver/deduce-closure-signature-after-normalization.rs)2
-rw-r--r--tests/ui/traits/next-solver/deduce-ty-from-object.rs (renamed from tests/ui/traits/new-solver/deduce-ty-from-object.rs)2
-rw-r--r--tests/ui/traits/next-solver/dedup-regions.rs (renamed from tests/ui/traits/new-solver/dedup-regions.rs)2
-rw-r--r--tests/ui/traits/next-solver/destruct.rs (renamed from tests/ui/traits/new-solver/destruct.rs)2
-rw-r--r--tests/ui/traits/next-solver/dont-coerce-infer-to-dyn.rs (renamed from tests/ui/traits/new-solver/dont-coerce-infer-to-dyn.rs)2
-rw-r--r--tests/ui/traits/next-solver/dont-elaborate-for-projections.rs (renamed from tests/ui/traits/new-solver/dont-elaborate-for-projections.rs)2
-rw-r--r--tests/ui/traits/next-solver/dont-ice-on-assoc-projection.rs (renamed from tests/ui/traits/new-solver/dont-ice-on-assoc-projection.rs)2
-rw-r--r--tests/ui/traits/next-solver/dont-ice-on-assoc-projection.stderr (renamed from tests/ui/traits/new-solver/dont-ice-on-assoc-projection.stderr)0
-rw-r--r--tests/ui/traits/next-solver/dont-loop-fulfill-on-region-constraints.rs (renamed from tests/ui/traits/new-solver/dont-loop-fulfill-on-region-constraints.rs)2
-rw-r--r--tests/ui/traits/next-solver/dont-normalize-proj-with-error.rs (renamed from tests/ui/traits/new-solver/dont-normalize-proj-with-error.rs)2
-rw-r--r--tests/ui/traits/next-solver/dont-normalize-proj-with-error.stderr (renamed from tests/ui/traits/new-solver/dont-normalize-proj-with-error.stderr)2
-rw-r--r--tests/ui/traits/next-solver/dont-remap-tait-substs.rs (renamed from tests/ui/traits/new-solver/dont-remap-tait-substs.rs)2
-rw-r--r--tests/ui/traits/next-solver/dont-type_of-tait-in-defining-scope.not_send.stderr (renamed from tests/ui/traits/new-solver/dont-type_of-tait-in-defining-scope.not_send.stderr)2
-rw-r--r--tests/ui/traits/next-solver/dont-type_of-tait-in-defining-scope.rs (renamed from tests/ui/traits/new-solver/dont-type_of-tait-in-defining-scope.rs)2
-rw-r--r--tests/ui/traits/next-solver/dyn-any-dont-prefer-impl.rs (renamed from tests/ui/traits/new-solver/dyn-any-dont-prefer-impl.rs)2
-rw-r--r--tests/ui/traits/next-solver/elaborate-item-bounds.rs (renamed from tests/ui/traits/new-solver/elaborate-item-bounds.rs)2
-rw-r--r--tests/ui/traits/next-solver/equating-projection-cyclically.rs (renamed from tests/ui/traits/new-solver/equating-projection-cyclically.rs)7
-rw-r--r--tests/ui/traits/next-solver/escaping-bound-vars-in-writeback-normalization.rs (renamed from tests/ui/traits/new-solver/escaping-bound-vars-in-writeback-normalization.rs)2
-rw-r--r--tests/ui/traits/next-solver/float-canonical.rs (renamed from tests/ui/traits/new-solver/float-canonical.rs)2
-rw-r--r--tests/ui/traits/next-solver/fn-trait-closure.rs (renamed from tests/ui/traits/new-solver/fn-trait-closure.rs)2
-rw-r--r--tests/ui/traits/next-solver/fn-trait.rs (renamed from tests/ui/traits/new-solver/fn-trait.rs)2
-rw-r--r--tests/ui/traits/next-solver/fn-trait.stderr (renamed from tests/ui/traits/new-solver/fn-trait.stderr)0
-rw-r--r--tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-1.rs (renamed from tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-1.rs)2
-rw-r--r--tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-2.rs (renamed from tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-2.rs)2
-rw-r--r--tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-2.stderr (renamed from tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-2.stderr)7
-rw-r--r--tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.next.stderr11
-rw-r--r--tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.rs38
-rw-r--r--tests/ui/traits/next-solver/higher-ranked-dyn-bounds.rs (renamed from tests/ui/traits/new-solver/higher-ranked-dyn-bounds.rs)2
-rw-r--r--tests/ui/traits/next-solver/int-var-alias-eq.rs (renamed from tests/ui/traits/new-solver/int-var-alias-eq.rs)2
-rw-r--r--tests/ui/traits/next-solver/int-var-is-send.rs (renamed from tests/ui/traits/new-solver/int-var-is-send.rs)2
-rw-r--r--tests/ui/traits/next-solver/issue-118950-root-region.rs22
-rw-r--r--tests/ui/traits/next-solver/issue-118950-root-region.stderr36
-rw-r--r--tests/ui/traits/next-solver/iter-filter-projection.rs (renamed from tests/ui/traits/new-solver/iter-filter-projection.rs)2
-rw-r--r--tests/ui/traits/next-solver/lazy-nested-obligations-1.rs (renamed from tests/ui/traits/new-solver/lazy-nested-obligations-1.rs)2
-rw-r--r--tests/ui/traits/next-solver/lazy-nested-obligations-2.rs (renamed from tests/ui/traits/new-solver/lazy-nested-obligations-2.rs)2
-rw-r--r--tests/ui/traits/next-solver/lazy-nested-obligations-3.rs (renamed from tests/ui/traits/new-solver/lazy-nested-obligations-3.rs)2
-rw-r--r--tests/ui/traits/next-solver/member-constraints-in-root-universe.rs (renamed from tests/ui/traits/new-solver/member-constraints-in-root-universe.rs)2
-rw-r--r--tests/ui/traits/next-solver/more-object-bound.rs (renamed from tests/ui/traits/new-solver/more-object-bound.rs)2
-rw-r--r--tests/ui/traits/next-solver/more-object-bound.stderr (renamed from tests/ui/traits/new-solver/more-object-bound.stderr)2
-rw-r--r--tests/ui/traits/next-solver/negative-coherence-bounds.rs (renamed from tests/ui/traits/new-solver/negative-coherence-bounds.rs)0
-rw-r--r--tests/ui/traits/next-solver/negative-coherence-bounds.stderr (renamed from tests/ui/traits/new-solver/negative-coherence-bounds.stderr)0
-rw-r--r--tests/ui/traits/next-solver/nested-alias-bound.rs (renamed from tests/ui/traits/new-solver/nested-alias-bound.rs)2
-rw-r--r--tests/ui/traits/next-solver/nested-obligations-with-bound-vars-gat.rs (renamed from tests/ui/traits/new-solver/nested-obligations-with-bound-vars-gat.rs)2
-rw-r--r--tests/ui/traits/next-solver/normalize-async-closure-in-trait.rs (renamed from tests/ui/traits/new-solver/normalize-async-closure-in-trait.rs)2
-rw-r--r--tests/ui/traits/next-solver/normalize-param-env-1.rs (renamed from tests/ui/traits/new-solver/normalize-param-env-1.rs)2
-rw-r--r--tests/ui/traits/next-solver/normalize-param-env-2.rs (renamed from tests/ui/traits/new-solver/normalize-param-env-2.rs)2
-rw-r--r--tests/ui/traits/next-solver/normalize-param-env-3.rs (renamed from tests/ui/traits/new-solver/normalize-param-env-3.rs)2
-rw-r--r--tests/ui/traits/next-solver/normalize-rcvr-for-inherent.rs (renamed from tests/ui/traits/new-solver/normalize-rcvr-for-inherent.rs)2
-rw-r--r--tests/ui/traits/next-solver/normalize-unsize-rhs.rs (renamed from tests/ui/traits/new-solver/normalize-unsize-rhs.rs)3
-rw-r--r--tests/ui/traits/next-solver/normalized-const-built-in-op.rs (renamed from tests/ui/traits/new-solver/normalized-const-built-in-op.rs)2
-rw-r--r--tests/ui/traits/next-solver/normalizes_to_ignores_unnormalizable_candidate.rs (renamed from tests/ui/traits/new-solver/normalizes_to_ignores_unnormalizable_candidate.rs)4
-rw-r--r--tests/ui/traits/next-solver/normalizes_to_ignores_unnormalizable_candidate.self_infer.stderr (renamed from tests/ui/traits/new-solver/normalizes_to_ignores_unnormalizable_candidate.self_infer.stderr)2
-rw-r--r--tests/ui/traits/next-solver/object-soundness-requires-generalization.rs (renamed from tests/ui/traits/new-solver/object-soundness-requires-generalization.rs)2
-rw-r--r--tests/ui/traits/next-solver/object-unsafety.rs (renamed from tests/ui/traits/new-solver/object-unsafety.rs)5
-rw-r--r--tests/ui/traits/next-solver/object-unsafety.stderr (renamed from tests/ui/traits/new-solver/object-unsafety.stderr)16
-rw-r--r--tests/ui/traits/next-solver/opportunistic-region-resolve.rs (renamed from tests/ui/traits/new-solver/opportunistic-region-resolve.rs)2
-rw-r--r--tests/ui/traits/next-solver/overflow/exponential-trait-goals.rs (renamed from tests/ui/traits/new-solver/overflow/exponential-trait-goals.rs)2
-rw-r--r--tests/ui/traits/next-solver/overflow/exponential-trait-goals.stderr (renamed from tests/ui/traits/new-solver/overflow/exponential-trait-goals.stderr)2
-rw-r--r--tests/ui/traits/next-solver/overflow/global-cache.rs (renamed from tests/ui/traits/new-solver/overflow/global-cache.rs)2
-rw-r--r--tests/ui/traits/next-solver/overflow/global-cache.stderr (renamed from tests/ui/traits/new-solver/overflow/global-cache.stderr)2
-rw-r--r--tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs25
-rw-r--r--tests/ui/traits/next-solver/overflow/recursion-limit-zero-issue-115351.rs (renamed from tests/ui/traits/new-solver/overflow/recursion-limit-zero-issue-115351.rs)2
-rw-r--r--tests/ui/traits/next-solver/overflow/recursion-limit-zero-issue-115351.stderr (renamed from tests/ui/traits/new-solver/overflow/recursion-limit-zero-issue-115351.stderr)0
-rw-r--r--tests/ui/traits/next-solver/overflow/recursive-self-normalization-2.rs (renamed from tests/ui/traits/new-solver/overflow/recursive-self-normalization-2.rs)4
-rw-r--r--tests/ui/traits/next-solver/overflow/recursive-self-normalization-2.stderr (renamed from tests/ui/traits/new-solver/overflow/recursive-self-normalization-2.stderr)8
-rw-r--r--tests/ui/traits/next-solver/overflow/recursive-self-normalization.rs (renamed from tests/ui/traits/new-solver/overflow/recursive-self-normalization.rs)4
-rw-r--r--tests/ui/traits/next-solver/overflow/recursive-self-normalization.stderr (renamed from tests/ui/traits/new-solver/overflow/recursive-self-normalization.stderr)8
-rw-r--r--tests/ui/traits/next-solver/param-candidate-doesnt-shadow-project.rs (renamed from tests/ui/traits/new-solver/param-candidate-doesnt-shadow-project.rs)2
-rw-r--r--tests/ui/traits/next-solver/param-discr-kind.rs (renamed from tests/ui/traits/new-solver/param-discr-kind.rs)2
-rw-r--r--tests/ui/traits/next-solver/pointee.rs (renamed from tests/ui/traits/new-solver/pointee.rs)2
-rw-r--r--tests/ui/traits/next-solver/pointer-like.rs (renamed from tests/ui/traits/new-solver/pointer-like.rs)2
-rw-r--r--tests/ui/traits/next-solver/pointer-like.stderr (renamed from tests/ui/traits/new-solver/pointer-like.stderr)2
-rw-r--r--tests/ui/traits/next-solver/prefer-candidate-no-constraints.rs (renamed from tests/ui/traits/new-solver/prefer-candidate-no-constraints.rs)2
-rw-r--r--tests/ui/traits/next-solver/prefer-param-env-on-ambiguity.rs (renamed from tests/ui/traits/new-solver/prefer-param-env-on-ambiguity.rs)2
-rw-r--r--tests/ui/traits/next-solver/projection-discr-kind.rs (renamed from tests/ui/traits/new-solver/projection-discr-kind.rs)2
-rw-r--r--tests/ui/traits/next-solver/projection-discr-kind.stderr (renamed from tests/ui/traits/new-solver/projection-discr-kind.stderr)2
-rw-r--r--tests/ui/traits/next-solver/projection/param-env-trait-candidate-1.rs14
-rw-r--r--tests/ui/traits/next-solver/projection/param-env-trait-candidate-2.rs29
-rw-r--r--tests/ui/traits/next-solver/slice-match-byte-lit.rs (renamed from tests/ui/traits/new-solver/slice-match-byte-lit.rs)2
-rw-r--r--tests/ui/traits/next-solver/specialization-transmute.rs (renamed from tests/ui/traits/new-solver/specialization-transmute.rs)2
-rw-r--r--tests/ui/traits/next-solver/specialization-transmute.stderr (renamed from tests/ui/traits/new-solver/specialization-transmute.stderr)6
-rw-r--r--tests/ui/traits/next-solver/specialization-unconstrained.rs (renamed from tests/ui/traits/new-solver/specialization-unconstrained.rs)2
-rw-r--r--tests/ui/traits/next-solver/specialization-unconstrained.stderr (renamed from tests/ui/traits/new-solver/specialization-unconstrained.stderr)0
-rw-r--r--tests/ui/traits/next-solver/stall-num-var-auto-trait.fallback.stderr (renamed from tests/ui/traits/new-solver/stall-num-var-auto-trait.fallback.stderr)2
-rw-r--r--tests/ui/traits/next-solver/stall-num-var-auto-trait.rs (renamed from tests/ui/traits/new-solver/stall-num-var-auto-trait.rs)2
-rw-r--r--tests/ui/traits/next-solver/structural-resolve-field.rs (renamed from tests/ui/traits/new-solver/structural-resolve-field.rs)2
-rw-r--r--tests/ui/traits/next-solver/tait-eq-proj-2.rs (renamed from tests/ui/traits/new-solver/tait-eq-proj-2.rs)4
-rw-r--r--tests/ui/traits/next-solver/tait-eq-proj.rs (renamed from tests/ui/traits/new-solver/tait-eq-proj.rs)2
-rw-r--r--tests/ui/traits/next-solver/tait-eq-tait.rs (renamed from tests/ui/traits/new-solver/tait-eq-tait.rs)2
-rw-r--r--tests/ui/traits/next-solver/temporary-ambiguity.rs (renamed from tests/ui/traits/new-solver/temporary-ambiguity.rs)2
-rw-r--r--tests/ui/traits/next-solver/trait-upcast-lhs-needs-normalization.rs (renamed from tests/ui/traits/new-solver/trait-upcast-lhs-needs-normalization.rs)3
-rw-r--r--tests/ui/traits/next-solver/try-example.rs (renamed from tests/ui/traits/new-solver/try-example.rs)2
-rw-r--r--tests/ui/traits/next-solver/two-projection-param-candidates-are-ambiguous.rs (renamed from tests/ui/traits/new-solver/two-projection-param-candidates-are-ambiguous.rs)2
-rw-r--r--tests/ui/traits/next-solver/two-projection-param-candidates-are-ambiguous.stderr (renamed from tests/ui/traits/new-solver/two-projection-param-candidates-are-ambiguous.stderr)2
-rw-r--r--tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.fails.stderr (renamed from tests/ui/traits/new-solver/unevaluated-const-impl-trait-ref.fails.stderr)2
-rw-r--r--tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.rs (renamed from tests/ui/traits/new-solver/unevaluated-const-impl-trait-ref.rs)2
-rw-r--r--tests/ui/traits/next-solver/unsafe-auto-trait-impl.rs (renamed from tests/ui/traits/new-solver/unsafe-auto-trait-impl.rs)2
-rw-r--r--tests/ui/traits/next-solver/unsize-although-ambiguous.rs (renamed from tests/ui/traits/new-solver/unsize-although-ambiguous.rs)2
-rw-r--r--tests/ui/traits/next-solver/unsize-good.rs (renamed from tests/ui/traits/new-solver/unsize-good.rs)2
-rw-r--r--tests/ui/traits/next-solver/upcast-right-substs.rs (renamed from tests/ui/traits/new-solver/upcast-right-substs.rs)3
-rw-r--r--tests/ui/traits/next-solver/upcast-wrong-substs.rs (renamed from tests/ui/traits/new-solver/upcast-wrong-substs.rs)4
-rw-r--r--tests/ui/traits/next-solver/upcast-wrong-substs.stderr (renamed from tests/ui/traits/new-solver/upcast-wrong-substs.stderr)4
-rw-r--r--tests/ui/traits/next-solver/winnow-specializing-impls.rs (renamed from tests/ui/traits/new-solver/winnow-specializing-impls.rs)2
-rw-r--r--tests/ui/traits/no-fallback-multiple-impls.stderr2
-rw-r--r--tests/ui/traits/no_send-struct.stderr2
-rw-r--r--tests/ui/traits/non-lifetime-via-dyn-builtin.rs2
-rw-r--r--tests/ui/traits/non_lifetime_binders/bad-copy-cond.stderr2
-rw-r--r--tests/ui/traits/non_lifetime_binders/capture-late-ct-in-anon.stderr2
-rw-r--r--tests/ui/traits/non_lifetime_binders/drop-impl-pred.no.stderr2
-rw-r--r--tests/ui/traits/non_lifetime_binders/foreach-partial-eq.stderr2
-rw-r--r--tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.stderr2
-rw-r--r--tests/ui/traits/non_lifetime_binders/missing-assoc-item.stderr2
-rw-r--r--tests/ui/traits/non_lifetime_binders/nested-apit-mentioning-outer-bound-var.stderr2
-rw-r--r--tests/ui/traits/non_lifetime_binders/on-dyn.stderr2
-rw-r--r--tests/ui/traits/non_lifetime_binders/on-ptr.stderr2
-rw-r--r--tests/ui/traits/non_lifetime_binders/placeholders-dont-outlive-static.bad.stderr26
-rw-r--r--tests/ui/traits/non_lifetime_binders/placeholders-dont-outlive-static.good.stderr26
-rw-r--r--tests/ui/traits/non_lifetime_binders/placeholders-dont-outlive-static.rs22
-rw-r--r--tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.rs3
-rw-r--r--tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.stderr17
-rw-r--r--tests/ui/traits/non_lifetime_binders/universe-error1.stderr2
-rw-r--r--tests/ui/traits/not-suggest-non-existing-fully-qualified-path.stderr2
-rw-r--r--tests/ui/traits/object-does-not-impl-trait.stderr2
-rw-r--r--tests/ui/traits/object/auto-dedup-in-impl.stderr2
-rw-r--r--tests/ui/traits/object/enforce-supertrait-projection.stderr2
-rw-r--r--tests/ui/traits/object/issue-44454-1.stderr2
-rw-r--r--tests/ui/traits/object/issue-44454-2.stderr2
-rw-r--r--tests/ui/traits/object/issue-44454-3.stderr2
-rw-r--r--tests/ui/traits/object/object-unsafe-missing-assoc-type.stderr2
-rw-r--r--tests/ui/traits/object/supertrait-lifetime-bound.stderr2
-rw-r--r--tests/ui/traits/object/vs-lifetime-2.stderr2
-rw-r--r--tests/ui/traits/overlap-not-permitted-for-builtin-trait.stderr2
-rw-r--r--tests/ui/traits/param-without-lifetime-constraint.stderr2
-rw-r--r--tests/ui/traits/project-modulo-regions.with_clause.stderr2
-rw-r--r--tests/ui/traits/project-modulo-regions.without_clause.stderr2
-rw-r--r--tests/ui/traits/question-mark-result-err-mismatch.rs59
-rw-r--r--tests/ui/traits/question-mark-result-err-mismatch.stderr62
-rw-r--r--tests/ui/traits/reservation-impl/coherence-conflict.next.stderr4
-rw-r--r--tests/ui/traits/reservation-impl/coherence-conflict.old.stderr2
-rw-r--r--tests/ui/traits/reservation-impl/coherence-conflict.rs2
-rw-r--r--tests/ui/traits/reservation-impl/no-use.next.stderr2
-rw-r--r--tests/ui/traits/reservation-impl/no-use.old.stderr2
-rw-r--r--tests/ui/traits/reservation-impl/no-use.rs2
-rw-r--r--tests/ui/traits/reservation-impl/non-lattice-ok.rs2
-rw-r--r--tests/ui/traits/reservation-impl/ok.rs2
-rw-r--r--tests/ui/traits/resolution-in-overloaded-op.stderr2
-rw-r--r--tests/ui/traits/safety-fn-body.mir.stderr2
-rw-r--r--tests/ui/traits/safety-fn-body.thir.stderr2
-rw-r--r--tests/ui/traits/safety-inherent-impl.stderr2
-rw-r--r--tests/ui/traits/safety-trait-impl-cc.stderr2
-rw-r--r--tests/ui/traits/self-without-lifetime-constraint.stderr2
-rw-r--r--tests/ui/traits/solver-cycles/cycle-via-builtin-auto-trait-impl.stderr2
-rw-r--r--tests/ui/traits/static-method-generic-inference.stderr2
-rw-r--r--tests/ui/traits/staticness-mismatch.stderr2
-rw-r--r--tests/ui/traits/subtype-recursion-limit.rs17
-rw-r--r--tests/ui/traits/subtype-recursion-limit.stderr9
-rw-r--r--tests/ui/traits/suggest-dereferences/dont-suggest-unsize-deref.stderr2
-rw-r--r--tests/ui/traits/suggest-dereferences/issue-39029.stderr2
-rw-r--r--tests/ui/traits/suggest-dereferences/issue-62530.stderr2
-rw-r--r--tests/ui/traits/suggest-dereferences/multiple-0.stderr2
-rw-r--r--tests/ui/traits/suggest-dereferences/multiple-1.stderr2
-rw-r--r--tests/ui/traits/suggest-dereferences/root-obligation.stderr2
-rw-r--r--tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.stderr2
-rw-r--r--tests/ui/traits/suggest-fully-qualified-closure.stderr2
-rw-r--r--tests/ui/traits/test.stderr2
-rw-r--r--tests/ui/traits/trait-object-lifetime-default-note.rs16
-rw-r--r--tests/ui/traits/trait-object-lifetime-default-note.stderr19
-rw-r--r--tests/ui/traits/trait-or-new-type-instead.stderr2
-rw-r--r--tests/ui/traits/trait-upcasting/alias-where-clause-isnt-supertrait.stderr2
-rw-r--r--tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr2
-rw-r--r--tests/ui/traits/trait-upcasting/deref-upcast-behavioral-change.rs35
-rw-r--r--tests/ui/traits/trait-upcasting/deref-upcast-behavioral-change.stderr19
-rw-r--r--tests/ui/traits/trait-upcasting/fewer-associated.rs2
-rw-r--r--tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.current.stderr2
-rw-r--r--tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.next.stderr2
-rw-r--r--tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.rs2
-rw-r--r--tests/ui/traits/trait-upcasting/inference-behavior-change-deref.rs36
-rw-r--r--tests/ui/traits/trait-upcasting/inference-behavior-change-deref.stderr16
-rw-r--r--tests/ui/traits/trait-upcasting/issue-11515.current.stderr2
-rw-r--r--tests/ui/traits/trait-upcasting/issue-11515.next.stderr2
-rw-r--r--tests/ui/traits/trait-upcasting/issue-11515.rs2
-rw-r--r--tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.rs18
-rw-r--r--tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.stderr19
-rw-r--r--tests/ui/traits/trait-upcasting/migrate-lint-deny.rs8
-rw-r--r--tests/ui/traits/trait-upcasting/migrate-lint-deny.stderr12
-rw-r--r--tests/ui/traits/trait-upcasting/migrate-lint-different-substs.rs21
-rw-r--r--tests/ui/traits/trait-upcasting/migrate-lint-different-substs.stderr15
-rw-r--r--tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguousity.stderr2
-rw-r--r--tests/ui/traits/trait-upcasting/multiple_supertrait_upcastable.stderr2
-rw-r--r--tests/ui/traits/trait-upcasting/normalization.rs2
-rw-r--r--tests/ui/traits/trait-upcasting/type-checking-test-1.current.stderr2
-rw-r--r--tests/ui/traits/trait-upcasting/type-checking-test-1.next.stderr2
-rw-r--r--tests/ui/traits/trait-upcasting/type-checking-test-1.rs2
-rw-r--r--tests/ui/traits/trait-upcasting/upcast-through-struct-tail.current.stderr2
-rw-r--r--tests/ui/traits/trait-upcasting/upcast-through-struct-tail.next.stderr2
-rw-r--r--tests/ui/traits/trait-upcasting/upcast-through-struct-tail.rs2
-rw-r--r--tests/ui/traits/trivial_impl.stderr2
-rw-r--r--tests/ui/traits/trivial_impl2.stderr2
-rw-r--r--tests/ui/traits/trivial_impl3.stderr2
-rw-r--r--tests/ui/traits/trivial_impl4.stderr2
-rw-r--r--tests/ui/traits/unsend-future.stderr2
-rw-r--r--tests/ui/traits/upcast_soundness_bug.rs69
-rw-r--r--tests/ui/traits/vtable-res-trait-param.stderr2
-rw-r--r--tests/ui/traits/vtable/issue-97381.stderr2
-rw-r--r--tests/ui/traits/vtable/vtable-non-object-safe.stderr2
-rw-r--r--tests/ui/traits/vtable/vtable-vacant.stderr2
-rw-r--r--tests/ui/traits/well-formed-recursion-limit.rs27
-rw-r--r--tests/ui/traits/well-formed-recursion-limit.stderr22
-rw-r--r--tests/ui/traits/wf-object/reverse-order.rs2
-rw-r--r--tests/ui/traits/wrong-mul-method-signature.stderr4
-rw-r--r--tests/ui/transmutability/alignment/align-fail.stderr2
-rw-r--r--tests/ui/transmutability/arrays/issue-103783-array-length.stderr2
-rw-r--r--tests/ui/transmutability/enums/should_pad_variants.stderr2
-rw-r--r--tests/ui/transmutability/enums/should_respect_endianness.stderr2
-rw-r--r--tests/ui/transmutability/issue-101739-2.stderr2
-rw-r--r--tests/ui/transmutability/malformed-program-gracefulness/unknown_dst.stderr2
-rw-r--r--tests/ui/transmutability/malformed-program-gracefulness/unknown_src.stderr2
-rw-r--r--tests/ui/transmutability/primitives/bool-mut.rs2
-rw-r--r--tests/ui/transmutability/primitives/bool-mut.stderr2
-rw-r--r--tests/ui/transmutability/primitives/bool.current.stderr2
-rw-r--r--tests/ui/transmutability/primitives/bool.next.stderr2
-rw-r--r--tests/ui/transmutability/primitives/bool.rs2
-rw-r--r--tests/ui/transmutability/primitives/numbers.rs2
-rw-r--r--tests/ui/transmutability/primitives/unit.current.stderr2
-rw-r--r--tests/ui/transmutability/primitives/unit.next.stderr2
-rw-r--r--tests/ui/transmutability/primitives/unit.rs2
-rw-r--r--tests/ui/transmutability/references/recursive-wrapper-types-bit-compatible-mut.stderr2
-rw-r--r--tests/ui/transmutability/references/recursive-wrapper-types-bit-incompatible.stderr2
-rw-r--r--tests/ui/transmutability/references/unit-to-u8.stderr2
-rw-r--r--tests/ui/transmutability/region-infer.stderr2
-rw-r--r--tests/ui/transmutability/unions/should_pad_variants.stderr2
-rw-r--r--tests/ui/transmutability/unions/should_reject_contraction.stderr2
-rw-r--r--tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_unreachable_ty.stderr2
-rw-r--r--tests/ui/transmutability/visibility/should_accept_if_src_has_unreachable_ty.stderr2
-rw-r--r--tests/ui/transmutability/visibility/should_reject_if_dst_has_private_field.stderr2
-rw-r--r--tests/ui/transmutability/visibility/should_reject_if_dst_has_private_variant.stderr2
-rw-r--r--tests/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_field.stderr2
-rw-r--r--tests/ui/transmute/transmute-impl.stderr2
-rw-r--r--tests/ui/transmute/transmute-imut-to-mut.stderr2
-rw-r--r--tests/ui/transmute/transmute-padding-ice.stderr2
-rw-r--r--tests/ui/treat-err-as-bug/span_delayed_bug.rs (renamed from tests/ui/treat-err-as-bug/delay_span_bug.rs)4
-rw-r--r--tests/ui/treat-err-as-bug/span_delayed_bug.stderr (renamed from tests/ui/treat-err-as-bug/delay_span_bug.stderr)6
-rw-r--r--tests/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr2
-rw-r--r--tests/ui/trivial-bounds/trivial-bounds-leak-copy.stderr2
-rw-r--r--tests/ui/try-block/try-block-bad-type.stderr4
-rw-r--r--tests/ui/try-block/try-block-catch.stderr2
-rw-r--r--tests/ui/try-block/try-block-in-while.stderr2
-rw-r--r--tests/ui/try-block/try-block-opt-init.stderr2
-rw-r--r--tests/ui/try-trait/bad-interconversion.stderr4
-rw-r--r--tests/ui/try-trait/issue-32709.stderr6
-rw-r--r--tests/ui/tuple/array-diagnostics.stderr2
-rw-r--r--tests/ui/tuple/index-invalid.stderr6
-rw-r--r--tests/ui/tuple/tuple-index-not-tuple.stderr7
-rw-r--r--tests/ui/tuple/tuple-index-out-of-bounds.stderr9
-rw-r--r--tests/ui/tuple/wrong_argument_ice-2.stderr2
-rw-r--r--tests/ui/tuple/wrong_argument_ice-3.stderr2
-rw-r--r--tests/ui/tuple/wrong_argument_ice-4.stderr2
-rw-r--r--tests/ui/tuple/wrong_argument_ice.stderr2
-rw-r--r--tests/ui/type-alias-enum-variants/incorrect-variant-form-through-Self-issue-58006.stderr2
-rw-r--r--tests/ui/type-alias-enum-variants/no-type-application-on-aliased-enum-variant.stderr2
-rw-r--r--tests/ui/type-alias-enum-variants/resolve-to-enum-variant-in-type-namespace-and-error.stderr2
-rw-r--r--tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/assoc-type-const.rs4
-rw-r--r--tests/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/auto-trait-leakage2.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/bounds-are-checked-2.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/bounds-are-checked.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/bounds-are-checked3.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/coherence.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/coherence_cross_crate.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/coherence_different_hidden_ty.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/constrain_inputs_unsound.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/cross_inference.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/declared_but_never_defined.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/different_defining_uses.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/different_defining_uses_never_type-2.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/different_defining_uses_never_type-3.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/different_defining_uses_never_type.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/different_defining_uses_never_type3.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/different_lifetimes_defining_uses.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/escaping-bound-var.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/fallback.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/future.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/generic_different_defining_uses.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/generic_duplicate_param_use2.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/generic_duplicate_param_use4.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/hidden_behind_projection_behind_struct_field.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/hidden_type_mismatch.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/higher_kinded_params2.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/impl-with-unconstrained-param.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/impl_for_weak_alias.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound2.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/implied_bounds.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/implied_bounds_closure.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/implied_bounds_from_types.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/implied_lifetime_wf_check4_static.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/incomplete-inference.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.stderr28
-rw-r--r--tests/ui/type-alias-impl-trait/inference-cycle.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/invalid_impl_trait_in_assoc_ty.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-104817.stock.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-109054.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-52843-closure-constrain.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-52843.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-53092.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-53096.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-53598.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-57700.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-57961.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-60407.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-65384.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-70121.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-74244.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-74280.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-77179.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-78450.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-84660-unsoundness.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-89686.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-90400-1.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-90400-2.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-94429.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-96572-unconstrained-mismatch.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-98604.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-98608.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/missing_lifetime_bound.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/multi-error.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-infer.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn2.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn3.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/mututally-recursive-overflow.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/nested-tait-inference.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/nested-tait-inference2.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/nested-tait-inference3.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/nested.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/nested_type_alias_impl_trait.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/no_inferrable_concrete_type.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/non-defining-method.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/normalize-hidden-types.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/not-matching-trait-refs-isnt-defining.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/not_well_formed.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/recursive-fn-tait.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn-2.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.current.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/self-referential-2.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/self-referential-3.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/self-referential-3.stderr4
-rw-r--r--tests/ui/type-alias-impl-trait/self-referential-4.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/self-referential-4.stderr6
-rw-r--r--tests/ui/type-alias-impl-trait/self-referential.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/self-referential.stderr6
-rw-r--r--tests/ui/type-alias-impl-trait/structural-match-no-leak.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/structural-match.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/type-alias-impl-trait-fn-type.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/unconstrained-due-to-bad-pattern.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/unconstrained-impl-param.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/under-binder.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/underconstrained_generic.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/underconstrained_lifetime.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/wf-check-fn-def.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/wf-in-associated-type.fail.stderr4
-rw-r--r--tests/ui/type-alias-impl-trait/wf-in-associated-type.rs6
-rw-r--r--tests/ui/type-alias-impl-trait/wf-nested.fail.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/wf-nested.pass_sound.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/wf_check_closures.stderr2
-rw-r--r--tests/ui/type-alias/issue-62263-self-in-atb.stderr2
-rw-r--r--tests/ui/type-alias/issue-62305-self-assoc-ty.stderr2
-rw-r--r--tests/ui/type-alias/issue-62364-self-ty-arg.stderr2
-rw-r--r--tests/ui/type-inference/generalize-subtyped-variables.rs25
-rw-r--r--tests/ui/type-inference/issue-30225.stderr2
-rw-r--r--tests/ui/type-inference/or_else-multiple-type-params.stderr2
-rw-r--r--tests/ui/type-inference/sort_by_key.stderr2
-rw-r--r--tests/ui/type-inference/unbounded-associated-type.stderr2
-rw-r--r--tests/ui/type-inference/unbounded-type-param-in-fn-with-assoc-type.stderr2
-rw-r--r--tests/ui/type-inference/unbounded-type-param-in-fn.stderr2
-rw-r--r--tests/ui/type/ascription/issue-34255-1.stderr2
-rw-r--r--tests/ui/type/ascription/issue-47666.stderr2
-rw-r--r--tests/ui/type/ascription/issue-54516.stderr2
-rw-r--r--tests/ui/type/ascription/issue-60933.stderr2
-rw-r--r--tests/ui/type/closure-with-wrong-borrows.stderr2
-rw-r--r--tests/ui/type/issue-101866.stderr2
-rw-r--r--tests/ui/type/issue-58355.stderr2
-rw-r--r--tests/ui/type/issue-91268.stderr2
-rw-r--r--tests/ui/type/missing-let-in-binding-2.stderr2
-rw-r--r--tests/ui/type/missing-let-in-binding-3.stderr2
-rw-r--r--tests/ui/type/missing-let-in-binding-4.stderr2
-rw-r--r--tests/ui/type/missing-let-in-binding.stderr2
-rw-r--r--tests/ui/type/type-annotation-needed.stderr2
-rw-r--r--tests/ui/type/type-ascription-with-fn-call.stderr2
-rw-r--r--tests/ui/type/type-check/cannot_infer_local_or_array.stderr2
-rw-r--r--tests/ui/type/type-check/cannot_infer_local_or_vec.stderr2
-rw-r--r--tests/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.stderr2
-rw-r--r--tests/ui/type/type-check/issue-116967-cannot-coerce-returned-result.stderr2
-rw-r--r--tests/ui/type/type-check/issue-22897.stderr2
-rw-r--r--tests/ui/type/type-check/issue-40294.stderr2
-rw-r--r--tests/ui/type/type-check/issue-41314.stderr2
-rw-r--r--tests/ui/type/type-check/issue-67273-assignment-match-prior-arm-bool-expected-unit.stderr2
-rw-r--r--tests/ui/type/type-check/issue-88577-check-fn-with-more-than-65535-arguments.stderr2
-rw-r--r--tests/ui/type/type-check/point-at-inference-2.stderr8
-rw-r--r--tests/ui/type/type-check/point-at-inference-3.stderr2
-rw-r--r--tests/ui/type/type-check/point-at-inference-issue-116155.stderr2
-rw-r--r--tests/ui/type/type-check/point-at-inference.stderr2
-rw-r--r--tests/ui/type/type-dependent-def-issue-49241.stderr2
-rw-r--r--tests/ui/type/type-error-break-tail.stderr2
-rw-r--r--tests/ui/type/type-mismatch.stderr24
-rw-r--r--tests/ui/type/type-parameter-defaults-referencing-Self.stderr2
-rw-r--r--tests/ui/type/type-parameter-names.stderr2
-rw-r--r--tests/ui/type/type-params-in-different-spaces-1.stderr2
-rw-r--r--tests/ui/type/type-params-in-different-spaces-3.stderr2
-rw-r--r--tests/ui/type/type-recursive-box-shadowed.stderr2
-rw-r--r--tests/ui/type/type-shadow.stderr2
-rw-r--r--tests/ui/type/type-unsatisfiable.usage.stderr2
-rw-r--r--tests/ui/type_length_limit.polonius.stderr2
-rw-r--r--tests/ui/type_length_limit.stderr2
-rw-r--r--tests/ui/typeck/apit-with-error-type-in-sig.stderr2
-rw-r--r--tests/ui/typeck/assign-non-lval-needs-deref.stderr2
-rw-r--r--tests/ui/typeck/autoderef-with-param-env-error.stderr2
-rw-r--r--tests/ui/typeck/bad-index-due-to-nested.stderr8
-rw-r--r--tests/ui/typeck/bad-index-modulo-higher-ranked-regions.rs29
-rw-r--r--tests/ui/typeck/bad-index-modulo-higher-ranked-regions.stderr9
-rw-r--r--tests/ui/typeck/bad-type-in-vec-contains.stderr2
-rw-r--r--tests/ui/typeck/call-block.stderr2
-rw-r--r--tests/ui/typeck/check-args-on-fn-err.stderr2
-rw-r--r--tests/ui/typeck/derive-sugg-arg-arity.stderr2
-rw-r--r--tests/ui/typeck/dont-record-adjustments-when-pointing-at-arg.stderr2
-rw-r--r--tests/ui/typeck/escaping_bound_vars.stderr2
-rw-r--r--tests/ui/typeck/issue-100246.stderr2
-rw-r--r--tests/ui/typeck/issue-100285.rs8
-rw-r--r--tests/ui/typeck/issue-100285.stderr33
-rw-r--r--tests/ui/typeck/issue-10401.stderr2
-rw-r--r--tests/ui/typeck/issue-104510-ice.stderr2
-rw-r--r--tests/ui/typeck/issue-105946.stderr5
-rw-r--r--tests/ui/typeck/issue-106929.stderr2
-rw-r--r--tests/ui/typeck/issue-107087.stderr2
-rw-r--r--tests/ui/typeck/issue-107775.stderr2
-rw-r--r--tests/ui/typeck/issue-110052.stderr2
-rw-r--r--tests/ui/typeck/issue-112385-while-assign-lhs-place-expr-ice.stderr2
-rw-r--r--tests/ui/typeck/issue-114529-illegal-break-with-value.rs6
-rw-r--r--tests/ui/typeck/issue-114529-illegal-break-with-value.stderr17
-rw-r--r--tests/ui/typeck/issue-114918/const-in-fn-return-type.stderr2
-rw-r--r--tests/ui/typeck/issue-114918/const-in-struct-type-arg.stderr2
-rw-r--r--tests/ui/typeck/issue-114918/const-in-trait-fn-return-type.stderr2
-rw-r--r--tests/ui/typeck/issue-13853-2.stderr2
-rw-r--r--tests/ui/typeck/issue-13853-5.stderr2
-rw-r--r--tests/ui/typeck/issue-1871.stderr2
-rw-r--r--tests/ui/typeck/issue-18937.stderr2
-rw-r--r--tests/ui/typeck/issue-33575.stderr2
-rw-r--r--tests/ui/typeck/issue-36708.stderr2
-rw-r--r--tests/ui/typeck/issue-43189.stderr2
-rw-r--r--tests/ui/typeck/issue-46112.stderr2
-rw-r--r--tests/ui/typeck/issue-50687-ice-on-borrow.stderr2
-rw-r--r--tests/ui/typeck/issue-52082-type-param-shadows-existing-type.stderr16
-rw-r--r--tests/ui/typeck/issue-53712.stderr5
-rw-r--r--tests/ui/typeck/issue-57404.stderr2
-rw-r--r--tests/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr2
-rw-r--r--tests/ui/typeck/issue-65611.stderr2
-rw-r--r--tests/ui/typeck/issue-69378-ice-on-invalid-type-node-after-recovery.stderr2
-rw-r--r--tests/ui/typeck/issue-7813.stderr2
-rw-r--r--tests/ui/typeck/issue-83621-placeholder-static-in-extern.stderr2
-rw-r--r--tests/ui/typeck/issue-84160.stderr2
-rw-r--r--tests/ui/typeck/issue-86721-return-expr-ice.rev1.stderr2
-rw-r--r--tests/ui/typeck/issue-86721-return-expr-ice.rev2.stderr2
-rw-r--r--tests/ui/typeck/issue-87181/empty-tuple-method.stderr2
-rw-r--r--tests/ui/typeck/issue-87181/enum-variant.stderr2
-rw-r--r--tests/ui/typeck/issue-87181/tuple-field.stderr4
-rw-r--r--tests/ui/typeck/issue-87181/tuple-method.stderr2
-rw-r--r--tests/ui/typeck/issue-87771-ice-assign-assign-to-bool.stderr2
-rw-r--r--tests/ui/typeck/issue-87872-missing-inaccessible-field-literal.stderr4
-rw-r--r--tests/ui/typeck/issue-87872-missing-inaccessible-field-pattern.stderr2
-rw-r--r--tests/ui/typeck/issue-88803-call-expr-method.stderr2
-rw-r--r--tests/ui/typeck/issue-88844.stderr2
-rw-r--r--tests/ui/typeck/issue-89044-wrapped-expr-method.stderr2
-rw-r--r--tests/ui/typeck/issue-89275.stderr2
-rw-r--r--tests/ui/typeck/issue-89806.stderr2
-rw-r--r--tests/ui/typeck/issue-90101.stderr2
-rw-r--r--tests/ui/typeck/issue-90164.stderr2
-rw-r--r--tests/ui/typeck/issue-90319.stderr2
-rw-r--r--tests/ui/typeck/issue-90483-inaccessible-field-adjustment.stderr2
-rw-r--r--tests/ui/typeck/issue-90804-incorrect-reference-suggestion.stderr2
-rw-r--r--tests/ui/typeck/issue-91210-ptr-method.stderr2
-rw-r--r--tests/ui/typeck/issue-92481.stderr2
-rw-r--r--tests/ui/typeck/issue-93486.stderr2
-rw-r--r--tests/ui/typeck/issue-96530.stderr2
-rw-r--r--tests/ui/typeck/issue-96738.stderr2
-rw-r--r--tests/ui/typeck/issue-98260.stderr2
-rw-r--r--tests/ui/typeck/issue-98982.rs8
-rw-r--r--tests/ui/typeck/issue-98982.stderr18
-rw-r--r--tests/ui/typeck/mismatched-map-under-self.stderr8
-rw-r--r--tests/ui/typeck/missing-private-fields-in-struct-literal.stderr4
-rw-r--r--tests/ui/typeck/no-type-for-node-ice.stderr4
-rw-r--r--tests/ui/typeck/nonexistent-field-not-ambiguous.stderr2
-rw-r--r--tests/ui/typeck/output-type-mismatch.stderr2
-rw-r--r--tests/ui/typeck/path-to-method-sugg-unresolved-expr.stderr2
-rw-r--r--tests/ui/typeck/point-at-type-param-in-path-expr.stderr2
-rw-r--r--tests/ui/typeck/point-at-type-parameter-definition.stderr2
-rw-r--r--tests/ui/typeck/ptr-null-mutability-suggestions.stderr2
-rw-r--r--tests/ui/typeck/quiet-type-err-let-binding.stderr2
-rw-r--r--tests/ui/typeck/remove-extra-argument.stderr2
-rw-r--r--tests/ui/typeck/repeat-expr-checks-wf.stderr2
-rw-r--r--tests/ui/typeck/return-dyn-type-mismatch-2.stderr2
-rw-r--r--tests/ui/typeck/return-dyn-type-mismatch.stderr2
-rw-r--r--tests/ui/typeck/return_type_containing_closure.stderr2
-rw-r--r--tests/ui/typeck/suppressed-error.stderr2
-rw-r--r--tests/ui/typeck/tag-that-dare-not-speak-its-name.stderr2
-rw-r--r--tests/ui/typeck/terr-in-field.stderr2
-rw-r--r--tests/ui/typeck/terr-sorts.stderr2
-rw-r--r--tests/ui/typeck/typeck-cast-pointer-to-float.stderr2
-rw-r--r--tests/ui/typeck/typeck-default-trait-impl-assoc-type.stderr2
-rw-r--r--tests/ui/typeck/typeck-default-trait-impl-negation-send.stderr2
-rw-r--r--tests/ui/typeck/typeck-default-trait-impl-send-param.stderr2
-rw-r--r--tests/ui/typeck/typeck_type_placeholder_lifetime_1.stderr2
-rw-r--r--tests/ui/typeck/typeck_type_placeholder_lifetime_2.stderr2
-rw-r--r--tests/ui/typeck/while-loop-block-cond.stderr2
-rw-r--r--tests/ui/typeck/while-type-error.stderr2
-rw-r--r--tests/ui/typeck/wrong-ret-type.stderr2
-rw-r--r--tests/ui/typeof/issue-100183.stderr2
-rw-r--r--tests/ui/typeof/issue-29184.stderr2
-rw-r--r--tests/ui/ufcs/ufcs-explicit-self-bad.rs8
-rw-r--r--tests/ui/ufcs/ufcs-explicit-self-bad.stderr20
-rw-r--r--tests/ui/ufcs/ufcs-polymorphic-paths.rs3
-rw-r--r--tests/ui/unboxed-closures/issue-30906.stderr2
-rw-r--r--tests/ui/unboxed-closures/non-tupled-arg-mismatch.stderr2
-rw-r--r--tests/ui/unboxed-closures/non-tupled-call.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-feature-gate.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-region.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-default.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-equiv.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-region.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-3.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-1.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-borrow-conflict.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-boxed.rs1
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-call-sugar-autoderef.rs2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-call-sugar-object-autoderef.rs2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-call-sugar-object.rs2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-extern-fn.rs1
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-2.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-fn-as-fnmut-and-fnonce.rs2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-fnmut-as-fn.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-generic.rs2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-infer-fn-once-move-from-projection.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-infer-fnonce-call-twice.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-infer-fnonce-move-call-twice.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-recursive-fn-using-fn-mut.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-unique-type-id.rs1
-rw-r--r--tests/ui/unconstrained-none.stderr2
-rw-r--r--tests/ui/unconstrained-ref.stderr2
-rw-r--r--tests/ui/underscore-ident-matcher.stderr2
-rw-r--r--tests/ui/underscore-imports/shadow.stderr2
-rw-r--r--tests/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr2
-rw-r--r--tests/ui/underscore-lifetime/dyn-trait-underscore.stderr2
-rw-r--r--tests/ui/underscore-lifetime/in-fn-return-illegal.stderr2
-rw-r--r--tests/ui/underscore-lifetime/underscore-lifetime-binders.stderr2
-rw-r--r--tests/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.stderr2
-rw-r--r--tests/ui/underscore-lifetime/underscore-outlives-bounds.stderr2
-rw-r--r--tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.stderr2
-rw-r--r--tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.stderr2
-rw-r--r--tests/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2015.stderr2
-rw-r--r--tests/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2018.stderr2
-rw-r--r--tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.stderr2
-rw-r--r--tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.stderr2
-rw-r--r--tests/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2015.stderr2
-rw-r--r--tests/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2018.stderr2
-rw-r--r--tests/ui/unevaluated_fixed_size_array_len.stderr2
-rw-r--r--tests/ui/uninhabited/privately-uninhabited-mir-call.stderr2
-rw-r--r--tests/ui/uninhabited/uninhabited-irrefutable.stderr2
-rw-r--r--tests/ui/uninhabited/uninhabited-patterns.rs12
-rw-r--r--tests/ui/uninhabited/uninhabited-patterns.stderr26
-rw-r--r--tests/ui/union/issue-41073.stderr2
-rw-r--r--tests/ui/union/projection-as-union-type-error-2.stderr2
-rw-r--r--tests/ui/union/projection-as-union-type-error.stderr2
-rw-r--r--tests/ui/union/union-const-pat.stderr2
-rw-r--r--tests/ui/union/union-copy.stderr2
-rw-r--r--tests/ui/union/union-derive-eq.mirunsafeck.stderr2
-rw-r--r--tests/ui/union/union-derive-eq.thirunsafeck.stderr2
-rw-r--r--tests/ui/union/union-empty.stderr2
-rw-r--r--tests/ui/union/union-lint-dead-code.mirunsafeck.stderr2
-rw-r--r--tests/ui/union/union-lint-dead-code.thirunsafeck.stderr2
-rw-r--r--tests/ui/union/union-nonrepresentable.stderr2
-rw-r--r--tests/ui/union/union-repr-c.stderr2
-rw-r--r--tests/ui/union/union-suggest-field.mirunsafeck.stderr14
-rw-r--r--tests/ui/union/union-suggest-field.thirunsafeck.stderr14
-rw-r--r--tests/ui/union/unresolved-field-isnt-copy.stderr2
-rw-r--r--tests/ui/unknown-language-item.stderr2
-rw-r--r--tests/ui/unknown-tool-name.stderr2
-rw-r--r--tests/ui/unop-neg-bool.stderr2
-rw-r--r--tests/ui/unpretty/avoid-crash.stderr2
-rw-r--r--tests/ui/unpretty/bad-literal.stderr2
-rw-r--r--tests/ui/unpretty/mir-unpretty.stderr2
-rw-r--r--tests/ui/unresolved/unresolved-asterisk-imports.stderr2
-rw-r--r--tests/ui/unresolved/unresolved-extern-mod-suggestion.stderr2
-rw-r--r--tests/ui/unresolved/unresolved-import-recovery.stderr2
-rw-r--r--tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.stderr2
-rw-r--r--tests/ui/unsafe/foreign-unsafe-fn-called.mir.stderr2
-rw-r--r--tests/ui/unsafe/foreign-unsafe-fn-called.thir.stderr2
-rw-r--r--tests/ui/unsafe/initializing-ranged-via-ctor.stderr2
-rw-r--r--tests/ui/unsafe/inline_asm.mir.stderr2
-rw-r--r--tests/ui/unsafe/inline_asm.thir.stderr2
-rw-r--r--tests/ui/unsafe/issue-115348-false-positive-warning-of-unnecessary-unsafe.stderr2
-rw-r--r--tests/ui/unsafe/issue-3080.mir.stderr2
-rw-r--r--tests/ui/unsafe/issue-3080.thir.stderr2
-rw-r--r--tests/ui/unsafe/ranged-ctor-as-fn-ptr.stderr2
-rw-r--r--tests/ui/unsafe/ranged_ints.mir.stderr2
-rw-r--r--tests/ui/unsafe/ranged_ints.thir.stderr2
-rw-r--r--tests/ui/unsafe/ranged_ints3.mirunsafeck.stderr2
-rw-r--r--tests/ui/unsafe/ranged_ints3.thirunsafeck.stderr2
-rw-r--r--tests/ui/unsafe/ranged_ints4.mirunsafeck.stderr2
-rw-r--r--tests/ui/unsafe/ranged_ints4.thirunsafeck.stderr2
-rw-r--r--tests/ui/unsafe/ranged_ints4_const.mirunsafeck.stderr2
-rw-r--r--tests/ui/unsafe/ranged_ints4_const.thirunsafeck.stderr2
-rw-r--r--tests/ui/unsafe/ranged_ints_const.mir.stderr2
-rw-r--r--tests/ui/unsafe/ranged_ints_const.thir.stderr2
-rw-r--r--tests/ui/unsafe/unsafe-assign.mirunsafeck.stderr2
-rw-r--r--tests/ui/unsafe/unsafe-assign.thirunsafeck.stderr2
-rw-r--r--tests/ui/unsafe/unsafe-block-without-braces.stderr2
-rw-r--r--tests/ui/unsafe/unsafe-const-fn.mir.stderr2
-rw-r--r--tests/ui/unsafe/unsafe-const-fn.thir.stderr2
-rw-r--r--tests/ui/unsafe/unsafe-fn-assign-deref-ptr.mir.stderr2
-rw-r--r--tests/ui/unsafe/unsafe-fn-assign-deref-ptr.thir.stderr2
-rw-r--r--tests/ui/unsafe/unsafe-fn-autoderef.stderr5
-rw-r--r--tests/ui/unsafe/unsafe-fn-called-from-safe.mir.stderr2
-rw-r--r--tests/ui/unsafe/unsafe-fn-called-from-safe.thir.stderr2
-rw-r--r--tests/ui/unsafe/unsafe-fn-used-as-value.mir.stderr2
-rw-r--r--tests/ui/unsafe/unsafe-fn-used-as-value.thir.stderr2
-rw-r--r--tests/ui/unsafe/unsafe-subtyping.stderr2
-rw-r--r--tests/ui/unsafe/unsafe-trait-impl.rs4
-rw-r--r--tests/ui/unsafe/unsafe-trait-impl.stderr6
-rw-r--r--tests/ui/unsafe/unsafe-unstable-const-fn.mir.stderr2
-rw-r--r--tests/ui/unsafe/unsafe-unstable-const-fn.thir.stderr2
-rw-r--r--tests/ui/unsized-locals/by-value-trait-object-safety.stderr2
-rw-r--r--tests/ui/unsized-locals/issue-30276-feature-flagged.stderr2
-rw-r--r--tests/ui/unsized-locals/issue-30276.stderr2
-rw-r--r--tests/ui/unsized-locals/issue-50940-with-feature.stderr2
-rw-r--r--tests/ui/unsized-locals/issue-50940.stderr2
-rw-r--r--tests/ui/unsized-locals/issue-67981.stderr2
-rw-r--r--tests/ui/unsized-locals/rust-call.stderr2
-rw-r--r--tests/ui/unsized-locals/unsized-exprs2.stderr2
-rw-r--r--tests/ui/unsized-locals/unsized-exprs3.stderr2
-rw-r--r--tests/ui/unsized/box-instead-of-dyn-fn.stderr2
-rw-r--r--tests/ui/unsized/issue-30355.stderr2
-rw-r--r--tests/ui/unsized/issue-71659.current.stderr2
-rw-r--r--tests/ui/unsized/issue-71659.next.stderr2
-rw-r--r--tests/ui/unsized/issue-71659.rs2
-rw-r--r--tests/ui/unsized/issue-75707.stderr2
-rw-r--r--tests/ui/unsized/issue-75899.rs2
-rw-r--r--tests/ui/unsized/issue-91801.stderr2
-rw-r--r--tests/ui/unsized/issue-91803.stderr2
-rw-r--r--tests/ui/unsized/param-mentioned-by-different-field.stderr2
-rw-r--r--tests/ui/unsized/return-unsized-from-trait-method.stderr2
-rw-r--r--tests/ui/unsized/unsized-bare-typaram.stderr2
-rw-r--r--tests/ui/unsized/unsized-enum.stderr2
-rw-r--r--tests/ui/unsized/unsized-fn-arg.stderr2
-rw-r--r--tests/ui/unsized/unsized-inherent-impl-self-type.stderr2
-rw-r--r--tests/ui/unused-crate-deps/deny-attr.stderr2
-rw-r--r--tests/ui/unused-crate-deps/deny-cmdline-json-silent.stderr2
-rw-r--r--tests/ui/unused-crate-deps/deny-cmdline-json.stderr2
-rw-r--r--tests/ui/unused-crate-deps/deny-cmdline.stderr2
-rw-r--r--tests/ui/unused-crate-deps/warn-cmdline-json.stderr2
-rw-r--r--tests/ui/use/issue-18986.stderr2
-rw-r--r--tests/ui/use/use-after-move-based-on-type.stderr2
-rw-r--r--tests/ui/use/use-after-move-implicity-coerced-object.stderr2
-rw-r--r--tests/ui/use/use-after-move-self-based-on-type.stderr2
-rw-r--r--tests/ui/use/use-after-move-self.stderr2
-rw-r--r--tests/ui/use/use-associated-const.stderr2
-rw-r--r--tests/ui/use/use-crate-self.stderr2
-rw-r--r--tests/ui/use/use-meta-mismatch.stderr2
-rw-r--r--tests/ui/use/use-mod/use-mod-5.stderr2
-rw-r--r--tests/ui/use/use-mod/use-mod-6.stderr2
-rw-r--r--tests/ui/use/use-nested-groups-error.stderr2
-rw-r--r--tests/ui/use/use-paths-as-items.stderr2
-rw-r--r--tests/ui/usize-generic-argument-parent.stderr2
-rw-r--r--tests/ui/variance/variance-associated-consts.stderr2
-rw-r--r--tests/ui/variance/variance-associated-types2.stderr2
-rw-r--r--tests/ui/variance/variance-cell-is-invariant.stderr2
-rw-r--r--tests/ui/variance/variance-object-types.stderr2
-rw-r--r--tests/ui/variance/variance-trait-matching.stderr2
-rw-r--r--tests/ui/variance/variance-trait-object-bound.stderr2
-rw-r--r--tests/ui/variance/variance-use-contravariant-struct-1.stderr2
-rw-r--r--tests/ui/variance/variance-use-covariant-struct-1.stderr2
-rw-r--r--tests/ui/variants/variant-size-differences.stderr2
-rw-r--r--tests/ui/walk-struct-literal-with.stderr2
-rw-r--r--tests/ui/wf/issue-103573.stderr2
-rw-r--r--tests/ui/wf/issue-87495.stderr2
-rw-r--r--tests/ui/wf/issue-95665.stderr2
-rw-r--r--tests/ui/wf/issue-96810.stderr2
-rw-r--r--tests/ui/wf/wf-array-elem-sized.stderr2
-rw-r--r--tests/ui/wf/wf-complex-assoc-type.stderr2
-rw-r--r--tests/ui/wf/wf-enum-bound.stderr2
-rw-r--r--tests/ui/wf/wf-enum-fields-struct-variant.stderr2
-rw-r--r--tests/ui/wf/wf-enum-fields.stderr2
-rw-r--r--tests/ui/wf/wf-impl-associated-type-region.stderr2
-rw-r--r--tests/ui/wf/wf-impl-associated-type-trait.stderr2
-rw-r--r--tests/ui/wf/wf-impl-self-type.stderr2
-rw-r--r--tests/ui/wf/wf-in-fn-arg.stderr2
-rw-r--r--tests/ui/wf/wf-in-fn-ret.stderr2
-rw-r--r--tests/ui/wf/wf-in-fn-type-arg.stderr2
-rw-r--r--tests/ui/wf/wf-in-fn-type-ret.stderr2
-rw-r--r--tests/ui/wf/wf-in-fn-where-clause.stderr2
-rw-r--r--tests/ui/wf/wf-in-foreign-fn-decls-issue-80468.stderr2
-rw-r--r--tests/ui/wf/wf-in-obj-type-static.stderr2
-rw-r--r--tests/ui/wf/wf-in-obj-type-trait.stderr2
-rw-r--r--tests/ui/wf/wf-inherent-impl-method-where-clause.stderr2
-rw-r--r--tests/ui/wf/wf-inherent-impl-where-clause.stderr2
-rw-r--r--tests/ui/wf/wf-object-safe.stderr2
-rw-r--r--tests/ui/wf/wf-packed-on-proj-of-type-as-unimpl-trait.stderr2
-rw-r--r--tests/ui/wf/wf-struct-bound.stderr2
-rw-r--r--tests/ui/wf/wf-struct-field.stderr2
-rw-r--r--tests/ui/wf/wf-trait-associated-type-bound.stderr2
-rw-r--r--tests/ui/wf/wf-trait-associated-type-region.stderr2
-rw-r--r--tests/ui/wf/wf-trait-associated-type-trait.stderr2
-rw-r--r--tests/ui/wf/wf-trait-bound.stderr2
-rw-r--r--tests/ui/wf/wf-trait-default-fn-arg.stderr2
-rw-r--r--tests/ui/wf/wf-trait-default-fn-ret.stderr2
-rw-r--r--tests/ui/wf/wf-trait-default-fn-where-clause.stderr2
-rw-r--r--tests/ui/wf/wf-trait-fn-arg.stderr2
-rw-r--r--tests/ui/wf/wf-trait-fn-ret.stderr2
-rw-r--r--tests/ui/wf/wf-trait-fn-where-clause.stderr2
-rw-r--r--tests/ui/wf/wf-trait-superbound.stderr2
-rw-r--r--tests/ui/where-clauses/higher-ranked-fn-type.quiet.stderr2
-rw-r--r--tests/ui/where-clauses/higher-ranked-fn-type.verbose.stderr6
-rw-r--r--tests/ui/where-clauses/ignore-err-clauses.stderr2
-rw-r--r--tests/ui/where-clauses/self-in-where-clause-allowed.stderr2
-rw-r--r--tests/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr2
-rw-r--r--tests/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr2
-rw-r--r--tests/ui/where-clauses/where-clause-method-substituion.stderr2
-rw-r--r--tests/ui/where-clauses/where-clauses-method-unsatisfied.stderr2
-rw-r--r--tests/ui/where-clauses/where-clauses-unsatisfied.stderr2
-rw-r--r--tests/ui/where-clauses/where-for-self-2.stderr2
-rw-r--r--tests/ui/where-clauses/where-for-self.stderr2
-rw-r--r--tests/ui/while/while-else-err.stderr2
-rw-r--r--tests/ui/while/while-else-let-else-err.stderr2
-rw-r--r--tests/ui/windows-subsystem-invalid.stderr2
-rw-r--r--tests/ui/writing-to-immutable-vec.stderr2
-rw-r--r--tests/ui/xcrate/auxiliary/xcrate_unit_struct.rs5
-rw-r--r--tests/ui/xcrate/xcrate-unit-struct.rs2
-rw-r--r--tests/ui/xcrate/xcrate-unit-struct.stderr13
-rw-r--r--tests/ui/zero-sized/zero-sized-binary-heap-push.rs1
-rw-r--r--tests/ui/zero-sized/zero-sized-linkedlist-push.rs1
6773 files changed, 27391 insertions, 12876 deletions
diff --git a/tests/assembly/asm/loongarch-type.rs b/tests/assembly/asm/loongarch-type.rs
index 4e296f3ad..4aeecf92d 100644
--- a/tests/assembly/asm/loongarch-type.rs
+++ b/tests/assembly/asm/loongarch-type.rs
@@ -1,4 +1,3 @@
-// min-llvm-version: 16.0
// assembly-output: emit-asm
// compile-flags: --target loongarch64-unknown-linux-gnu
// needs-llvm-components: loongarch
@@ -42,7 +41,7 @@ extern "C" {
// Hack to avoid function merging
extern "Rust" {
- fn dont_merge(s: &str);
+ fn dont_merge(s: &str);
}
// CHECK-LABEL: sym_fn:
diff --git a/tests/assembly/dwarf4.rs b/tests/assembly/dwarf4.rs
new file mode 100644
index 000000000..6e1584458
--- /dev/null
+++ b/tests/assembly/dwarf4.rs
@@ -0,0 +1,24 @@
+// Makes sure that `-Z dwarf-version=4` causes `rustc` to emit DWARF version 4.
+// assembly-output: emit-asm
+// compile-flags: -g --target x86_64-unknown-linux-gnu -Z dwarf-version=4 -Copt-level=0
+// needs-llvm-components: x86
+
+#![feature(no_core, lang_items)]
+#![crate_type = "rlib"]
+#![no_core]
+
+#[lang = "sized"]
+trait Sized {}
+#[lang = "copy"]
+trait Copy {}
+
+pub fn wibble() {}
+
+pub struct X;
+
+// CHECK: .section .debug_info
+// CHECK-NOT: .short 2
+// CHECK-NOT: .short 5
+// CHECK: .short 4
+// CHECK-NOT: .section .debug_pubnames
+// CHECK-NOT: .section .debug_pubtypes
diff --git a/tests/assembly/dwarf5.rs b/tests/assembly/dwarf5.rs
index 253baafb8..46d4e84b4 100644
--- a/tests/assembly/dwarf5.rs
+++ b/tests/assembly/dwarf5.rs
@@ -18,3 +18,4 @@ pub fn wibble() {}
// CHECK-NOT: .short 2
// CHECK-NOT: .short 4
// CHECK: .short 5
+// CHECK: .section .debug_names
diff --git a/tests/assembly/x86-stack-probes.rs b/tests/assembly/stack-probes.rs
index c7141fb20..6466df3ff 100644
--- a/tests/assembly/x86-stack-probes.rs
+++ b/tests/assembly/stack-probes.rs
@@ -1,11 +1,12 @@
-// min-llvm-version: 16
-// revisions: x86_64 i686
+// revisions: x86_64 i686 aarch64
// assembly-output: emit-asm
-//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu
+//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu -C llvm-args=-x86-asm-syntax=intel
//[x86_64] needs-llvm-components: x86
-//[i686] compile-flags: --target i686-unknown-linux-gnu
+//[i686] compile-flags: --target i686-unknown-linux-gnu -C llvm-args=-x86-asm-syntax=intel
//[i686] needs-llvm-components: x86
-// compile-flags: -C llvm-args=-x86-asm-syntax=intel
+//[aarch64] compile-flags: --target aarch64-unknown-linux-gnu
+//[aarch64] needs-llvm-components: aarch64
+//[aarch64] min-llvm-version: 18
#![feature(no_core, lang_items)]
#![crate_type = "lib"]
@@ -29,6 +30,7 @@ pub fn small_stack_probe(x: u8, f: fn(&mut [u8; 8192])) {
// CHECK-NOT: __rust_probestack
// x86_64: sub rsp, 4096
// i686: sub esp, 4096
+ // aarch64: sub sp, sp, #1, lsl #12
f(&mut [x; 8192]);
}
@@ -38,5 +40,6 @@ pub fn big_stack_probe(x: u8, f: fn(&[u8; 65536])) {
// CHECK-NOT: __rust_probestack
// x86_64: sub rsp, 4096
// i686: sub esp, 4096
+ // aarch64: sub sp, sp, #1, lsl #12
f(&mut [x; 65536]);
}
diff --git a/tests/assembly/stack-protector/stack-protector-target-support.rs b/tests/assembly/stack-protector/stack-protector-target-support.rs
index e5cbace80..6d87fd191 100644
--- a/tests/assembly/stack-protector/stack-protector-target-support.rs
+++ b/tests/assembly/stack-protector/stack-protector-target-support.rs
@@ -2,7 +2,7 @@
// targets, with the exception of nvptx64-nvidia-cuda
//
// revisions: r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23
-// revisions: r24 r25 r26 r27 r28 r29 r30 r31 r32 r33 r34 r35 r36 r37 r38 r39 r40 r41 r42 r43 r44
+// revisions: r24 r25 r26 r27 r28 r29 r30 r31 r32 r33 r35 r36 r37 r38 r39 r40 r41 r42 r43 r44
// revisions: r45 r46 r47 r48 r49 r50 r51 r52 r53 r54 r55 r56 r57 r58 r59 r60 r61 r62 r63 r64 r65
// revisions: r66 r67 r68 r69 r70 r71 r72 r73 r74 r75 r76 r77 r78 r79 r80 r81 r82 r83 r84
// assembly-output: emit-asm
@@ -72,8 +72,7 @@
// [r32] needs-llvm-components: arm
// [r33] compile-flags: --target armv7-unknown-linux-musleabihf
// [r33] needs-llvm-components: arm
-// [r34] compile-flags: --target asmjs-unknown-emscripten
-// [r34] needs-llvm-components: webassembly
+
// [r35] compile-flags: --target i586-pc-windows-msvc
// [r35] needs-llvm-components: x86
// [r36] compile-flags: --target i586-unknown-linux-gnu
@@ -162,7 +161,7 @@
// [r77] needs-llvm-components: x86
// [r78] compile-flags:--target x86_64-linux-android
// [r78] needs-llvm-components: x86
-// [r79] compile-flags:--target x86_64-sun-solaris
+// [r79] compile-flags:--target x86_64-pc-solaris
// [r79] needs-llvm-components: x86
// [r80] compile-flags:--target x86_64-unknown-freebsd
// [r80] needs-llvm-components: x86
diff --git a/tests/assembly/thin-lto.rs b/tests/assembly/thin-lto.rs
new file mode 100644
index 000000000..deb8fd21d
--- /dev/null
+++ b/tests/assembly/thin-lto.rs
@@ -0,0 +1,8 @@
+// compile-flags: -O -C lto=thin -C prefer-dynamic=no
+// only-x86_64-unknown-linux-gnu
+// assembly-output: emit-asm
+
+// CHECK: main
+
+pub fn main() {
+}
diff --git a/tests/assembly/x86_64-function-return.rs b/tests/assembly/x86_64-function-return.rs
new file mode 100644
index 000000000..0fcaca2d4
--- /dev/null
+++ b/tests/assembly/x86_64-function-return.rs
@@ -0,0 +1,30 @@
+// Test that the function return is (not) converted into a jump to the thunk
+// when the `-Zfunction-return={keep,thunk-extern}` flag is (not) set.
+
+// revisions: unset keep thunk-extern keep-thunk-extern thunk-extern-keep
+// assembly-output: emit-asm
+// compile-flags: -O
+// [keep] compile-flags: -Zfunction-return=keep
+// [thunk-extern] compile-flags: -Zfunction-return=thunk-extern
+// [keep-thunk-extern] compile-flags: -Zfunction-return=keep -Zfunction-return=thunk-extern
+// [thunk-extern-keep] compile-flags: -Zfunction-return=thunk-extern -Zfunction-return=keep
+// only-x86_64
+// ignore-x86_64-apple-darwin Symbol is called `___x86_return_thunk` (Darwin's extra underscore)
+// ignore-sgx Tests incompatible with LVI mitigations
+
+#![crate_type = "lib"]
+
+// CHECK-LABEL: foo:
+#[no_mangle]
+pub unsafe fn foo() {
+ // unset: ret
+ // unset-NOT: jmp __x86_return_thunk
+ // keep: ret
+ // keep-NOT: jmp __x86_return_thunk
+ // thunk-extern: jmp __x86_return_thunk
+ // thunk-extern-NOT: ret
+ // keep-thunk-extern: jmp __x86_return_thunk
+ // keep-thunk-extern-NOT: ret
+ // thunk-extern-keep: ret
+ // thunk-extern-keep-NOT: jmp __x86_return_thunk
+}
diff --git a/tests/codegen/ascii-char.rs b/tests/codegen/ascii-char.rs
index 4167becf5..711ffe7e1 100644
--- a/tests/codegen/ascii-char.rs
+++ b/tests/codegen/ascii-char.rs
@@ -14,7 +14,7 @@ pub fn unwrap_digit_from_remainder(v: u32) -> AsciiChar {
// CHECK: %[[R:.+]] = urem i32 %v, 10
// CHECK-NEXT: %[[T:.+]] = trunc i32 %[[R]] to i8
- // CHECK-NEXT: %[[D:.+]] = or i8 %[[T]], 48
+ // CHECK-NEXT: %[[D:.+]] = or{{( disjoint)?}} i8 %[[T]], 48
// CHECK-NEXT: ret i8 %[[D]]
// CHECK-NOT: icmp
diff --git a/tests/codegen/debug-accessibility/crate-enum.rs b/tests/codegen/debug-accessibility/crate-enum.rs
new file mode 100644
index 000000000..eeea18dd8
--- /dev/null
+++ b/tests/codegen/debug-accessibility/crate-enum.rs
@@ -0,0 +1,26 @@
+// compile-flags: -C debuginfo=2
+// ignore-tidy-linelength
+
+#![allow(dead_code)]
+
+// Checks that visibility information is present in the debuginfo for crate-visibility enums.
+
+mod module {
+ use std::hint::black_box;
+
+ pub(crate) enum CrateFooEnum {
+ A,
+ B(u32),
+ C { x: u32 },
+ }
+
+ // NONMSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "CrateFooEnum"{{.*}}flags: DIFlagProtected{{.*}})
+ // MSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_union_type, name: "enum2$<crate_enum::module::CrateFooEnum>"{{.*}}flags: DIFlagProtected{{.*}})
+ pub fn use_everything() {
+ black_box(CrateFooEnum::A);
+ }
+}
+
+fn main() {
+ module::use_everything();
+}
diff --git a/tests/codegen/debug-accessibility/crate-struct.rs b/tests/codegen/debug-accessibility/crate-struct.rs
new file mode 100644
index 000000000..68d126a34
--- /dev/null
+++ b/tests/codegen/debug-accessibility/crate-struct.rs
@@ -0,0 +1,23 @@
+// compile-flags: -C debuginfo=2
+
+#![allow(dead_code)]
+
+// Checks that visibility information is present in the debuginfo for crate-visibility structs.
+
+mod module {
+ use std::hint::black_box;
+
+ pub(crate) struct CrateFooStruct {
+ x: u32,
+ }
+
+ // CHECK: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "CrateFooStruct"{{.*}}flags: DIFlagProtected{{.*}})
+
+ pub fn use_everything() {
+ black_box(CrateFooStruct { x: 2 });
+ }
+}
+
+fn main() {
+ module::use_everything();
+}
diff --git a/tests/codegen/debug-accessibility/private-enum.rs b/tests/codegen/debug-accessibility/private-enum.rs
new file mode 100644
index 000000000..7f81026dd
--- /dev/null
+++ b/tests/codegen/debug-accessibility/private-enum.rs
@@ -0,0 +1,21 @@
+// compile-flags: -C debuginfo=2
+// ignore-tidy-linelength
+
+#![allow(dead_code)]
+
+// Checks that visibility information is present in the debuginfo for private enums.
+
+use std::hint::black_box;
+
+enum PrivateFooEnum {
+ A,
+ B(u32),
+ C { x: u32 },
+}
+
+// NONMSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "PrivateFooEnum"{{.*}}flags: DIFlagPrivate{{.*}})
+// MSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_union_type, name: "enum2$<private_enum::PrivateFooEnum>"{{.*}}flags: DIFlagPrivate{{.*}})
+
+fn main() {
+ black_box(PrivateFooEnum::A);
+}
diff --git a/tests/codegen/debug-accessibility/private-struct.rs b/tests/codegen/debug-accessibility/private-struct.rs
new file mode 100644
index 000000000..43b260f90
--- /dev/null
+++ b/tests/codegen/debug-accessibility/private-struct.rs
@@ -0,0 +1,17 @@
+// compile-flags: -C debuginfo=2
+
+#![allow(dead_code)]
+
+// Checks that visibility information is present in the debuginfo for private structs.
+
+use std::hint::black_box;
+
+struct PrivateFooStruct {
+ x: u32,
+}
+
+// CHECK: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "PrivateFooStruct"{{.*}}flags: DIFlagPrivate{{.*}})
+
+fn main() {
+ black_box(PrivateFooStruct { x: 1 });
+}
diff --git a/tests/codegen/debug-accessibility/public-enum.rs b/tests/codegen/debug-accessibility/public-enum.rs
new file mode 100644
index 000000000..29ae5fd64
--- /dev/null
+++ b/tests/codegen/debug-accessibility/public-enum.rs
@@ -0,0 +1,21 @@
+// compile-flags: -C debuginfo=2
+// ignore-tidy-linelength
+
+#![allow(dead_code)]
+
+// Checks that visibility information is present in the debuginfo for types and their fields.
+
+use std::hint::black_box;
+
+pub enum PublicFooEnum {
+ A,
+ B(u32),
+ C { x: u32 },
+}
+
+// NONMSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "PublicFooEnum"{{.*}}flags: DIFlagPublic{{.*}})
+// MSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_union_type, name: "enum2$<public_enum::PublicFooEnum>"{{.*}}flags: DIFlagPublic{{.*}})
+
+fn main() {
+ black_box(PublicFooEnum::A);
+}
diff --git a/tests/codegen/debug-accessibility/public-struct.rs b/tests/codegen/debug-accessibility/public-struct.rs
new file mode 100644
index 000000000..e7cd9b40d
--- /dev/null
+++ b/tests/codegen/debug-accessibility/public-struct.rs
@@ -0,0 +1,17 @@
+// compile-flags: -C debuginfo=2
+
+#![allow(dead_code)]
+
+// Checks that visibility information is present in the debuginfo for public structs.
+
+use std::hint::black_box;
+
+pub struct PublicFooStruct {
+ x: u32,
+}
+
+// CHECK: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "PublicFooStruct"{{.*}}flags: DIFlagPublic{{.*}})
+
+fn main() {
+ black_box(PublicFooStruct { x: 4 });
+}
diff --git a/tests/codegen/debug-accessibility/struct-fields.rs b/tests/codegen/debug-accessibility/struct-fields.rs
new file mode 100644
index 000000000..76831bdc6
--- /dev/null
+++ b/tests/codegen/debug-accessibility/struct-fields.rs
@@ -0,0 +1,30 @@
+// compile-flags: -C debuginfo=2
+
+#![allow(dead_code)]
+
+// Checks that visibility information is present in the debuginfo for struct fields.
+
+mod module {
+ use std::hint::black_box;
+
+ struct StructFields {
+ a: u32,
+ pub(crate) b: u32,
+ pub(super) c: u32,
+ pub d: u32,
+ }
+
+ // CHECK: [[StructFields:!.*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "StructFields"{{.*}}flags: DIFlagPrivate{{.*}})
+ // CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: [[StructFields]]{{.*}}flags: DIFlagPrivate{{.*}})
+ // CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: [[StructFields]]{{.*}}flags: DIFlagProtected{{.*}})
+ // CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: [[StructFields]]{{.*}}flags: DIFlagProtected{{.*}})
+ // CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "d", scope: [[StructFields]]{{.*}}flags: DIFlagPublic{{.*}})
+
+ pub fn use_everything() {
+ black_box(StructFields { a: 1, b: 2, c: 3, d: 4 });
+ }
+}
+
+fn main() {
+ module::use_everything();
+}
diff --git a/tests/codegen/debug-accessibility/super-enum.rs b/tests/codegen/debug-accessibility/super-enum.rs
new file mode 100644
index 000000000..9d83fb45b
--- /dev/null
+++ b/tests/codegen/debug-accessibility/super-enum.rs
@@ -0,0 +1,27 @@
+// compile-flags: -C debuginfo=2
+// ignore-tidy-linelength
+
+#![allow(dead_code)]
+
+// Checks that visibility information is present in the debuginfo for super-visibility enums.
+
+mod module {
+ use std::hint::black_box;
+
+ pub(super) enum SuperFooEnum {
+ A,
+ B(u32),
+ C { x: u32 },
+ }
+
+ // NONMSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "SuperFooEnum"{{.*}}flags: DIFlagProtected{{.*}})
+ // MSVC: {{!.*}} = !DICompositeType(tag: DW_TAG_union_type, name: "enum2$<super_enum::module::SuperFooEnum>"{{.*}}flags: DIFlagProtected{{.*}})
+
+ pub fn use_everything() {
+ black_box(SuperFooEnum::A);
+ }
+}
+
+fn main() {
+ module::use_everything();
+}
diff --git a/tests/codegen/debug-accessibility/super-struct.rs b/tests/codegen/debug-accessibility/super-struct.rs
new file mode 100644
index 000000000..481006c39
--- /dev/null
+++ b/tests/codegen/debug-accessibility/super-struct.rs
@@ -0,0 +1,23 @@
+// compile-flags: -C debuginfo=2
+
+#![allow(dead_code)]
+
+// Checks that visibility information is present in the debuginfo for super-visibility structs.
+
+mod module {
+ use std::hint::black_box;
+
+ pub(super) struct SuperFooStruct {
+ x: u32,
+ }
+
+ // CHECK: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "SuperFooStruct"{{.*}}flags: DIFlagProtected{{.*}})
+
+ pub fn use_everything() {
+ black_box(SuperFooStruct { x: 3 });
+ }
+}
+
+fn main() {
+ module::use_everything();
+}
diff --git a/tests/codegen/debug-accessibility/tuple-fields.rs b/tests/codegen/debug-accessibility/tuple-fields.rs
new file mode 100644
index 000000000..1163ba2c7
--- /dev/null
+++ b/tests/codegen/debug-accessibility/tuple-fields.rs
@@ -0,0 +1,24 @@
+// compile-flags: -C debuginfo=2
+
+#![allow(dead_code)]
+
+// Checks that visibility information is present in the debuginfo for tuple struct fields.
+
+mod module {
+ use std::hint::black_box;
+
+ struct TupleFields(u32, pub(crate) u32, pub(super) u32, pub u32);
+
+ // CHECK: [[TupleFields:!.*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "TupleFields"{{.*}}flags: DIFlagPrivate{{.*}})
+ // CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "__0", scope: [[TupleFields]]{{.*}}flags: DIFlagPrivate{{.*}})
+ // CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "__1", scope: [[TupleFields]]{{.*}}flags: DIFlagProtected{{.*}})
+ // CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "__2", scope: [[TupleFields]]{{.*}}flags: DIFlagProtected{{.*}})
+ // CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "__3", scope: [[TupleFields]]{{.*}}flags: DIFlagPublic{{.*}})
+ pub fn use_everything() {
+ black_box(TupleFields(1, 2, 3, 4));
+ }
+}
+
+fn main() {
+ module::use_everything();
+}
diff --git a/tests/codegen/default-hidden-visibility.rs b/tests/codegen/default-hidden-visibility.rs
new file mode 100644
index 000000000..9e5e545f0
--- /dev/null
+++ b/tests/codegen/default-hidden-visibility.rs
@@ -0,0 +1,31 @@
+// Verifies that `Session::default_hidden_visibility` is affected when using the related cmdline
+// flag. This is a regression test for https://github.com/rust-lang/compiler-team/issues/656. See
+// also https://github.com/rust-lang/rust/issues/73295 and
+// https://github.com/rust-lang/rust/issues/37530.
+
+// revisions:DEFAULT YES NO
+//[YES] compile-flags: -Zdefault-hidden-visibility=yes
+//[NO] compile-flags: -Zdefault-hidden-visibility=no
+
+// The test scenario is specifically about visibility of symbols exported out of dynamically linked
+// libraries.
+#![crate_type = "dylib"]
+
+// The test scenario needs to use a Rust-public, but non-explicitly-exported symbol
+// (e.g. the test doesn't use `#[no_mangle]`, because currently it implies that
+// the symbol should be exported; we don't want that - we want to test the *default*
+// export setting instead).
+#[used]
+pub static tested_symbol: [u8; 6] = *b"foobar";
+
+// Exact LLVM IR differs depending on the target triple (e.g. `hidden constant`
+// vs `internal constant` vs `constant`). Because of this, we only apply the
+// specific test expectations below to one specific target triple. If needed,
+// additional targets can be covered by adding copies of this test file with
+// a different `only-X` directive.
+//
+// only-x86_64-unknown-linux-gnu
+
+// DEFAULT: @{{.*}}default_hidden_visibility{{.*}}tested_symbol{{.*}} = constant
+// YES: @{{.*}}default_hidden_visibility{{.*}}tested_symbol{{.*}} = hidden constant
+// NO: @{{.*}}default_hidden_visibility{{.*}}tested_symbol{{.*}} = constant
diff --git a/tests/codegen/ehcontguard_disabled.rs b/tests/codegen/ehcontguard_disabled.rs
new file mode 100644
index 000000000..7773384e5
--- /dev/null
+++ b/tests/codegen/ehcontguard_disabled.rs
@@ -0,0 +1,10 @@
+// compile-flags:
+
+#![crate_type = "lib"]
+
+// A basic test function.
+pub fn test() {
+}
+
+// Ensure the module flag ehcontguard is not present
+// CHECK-NOT: !"ehcontguard"
diff --git a/tests/codegen/ehcontguard_enabled.rs b/tests/codegen/ehcontguard_enabled.rs
new file mode 100644
index 000000000..03aaa342b
--- /dev/null
+++ b/tests/codegen/ehcontguard_enabled.rs
@@ -0,0 +1,10 @@
+// compile-flags: -Z ehcont-guard
+
+#![crate_type = "lib"]
+
+// A basic test function.
+pub fn test() {
+}
+
+// Ensure the module flag ehcontguard=1 is present
+// CHECK: !"ehcontguard", i32 1
diff --git a/tests/codegen/function-return.rs b/tests/codegen/function-return.rs
new file mode 100644
index 000000000..d832d19ac
--- /dev/null
+++ b/tests/codegen/function-return.rs
@@ -0,0 +1,28 @@
+// Test that the `fn_ret_thunk_extern` function attribute is (not) emitted when
+// the `-Zfunction-return={keep,thunk-extern}` flag is (not) set.
+
+// revisions: unset keep thunk-extern keep-thunk-extern thunk-extern-keep
+// needs-llvm-components: x86
+// compile-flags: --target x86_64-unknown-linux-gnu
+// [keep] compile-flags: -Zfunction-return=keep
+// [thunk-extern] compile-flags: -Zfunction-return=thunk-extern
+// [keep-thunk-extern] compile-flags: -Zfunction-return=keep -Zfunction-return=thunk-extern
+// [thunk-extern-keep] compile-flags: -Zfunction-return=thunk-extern -Zfunction-return=keep
+
+#![crate_type = "lib"]
+#![feature(no_core, lang_items)]
+#![no_core]
+
+#[lang = "sized"]
+trait Sized {}
+
+#[no_mangle]
+pub fn foo() {
+ // CHECK: @foo() unnamed_addr #0
+
+ // unset-NOT: fn_ret_thunk_extern
+ // keep-NOT: fn_ret_thunk_extern
+ // thunk-extern: attributes #0 = { {{.*}}fn_ret_thunk_extern{{.*}} }
+ // keep-thunk-extern: attributes #0 = { {{.*}}fn_ret_thunk_extern{{.*}} }
+ // thunk-extern-keep-NOT: fn_ret_thunk_extern
+}
diff --git a/tests/codegen/issues/issue-101048.rs b/tests/codegen/issues/issue-101048.rs
index efa4db93e..e4712cf9c 100644
--- a/tests/codegen/issues/issue-101048.rs
+++ b/tests/codegen/issues/issue-101048.rs
@@ -1,5 +1,4 @@
// compile-flags: -O
-// min-llvm-version: 16
#![crate_type = "lib"]
diff --git a/tests/codegen/issues/issue-101082.rs b/tests/codegen/issues/issue-101082.rs
index 2cbe99942..58fcd75a8 100644
--- a/tests/codegen/issues/issue-101082.rs
+++ b/tests/codegen/issues/issue-101082.rs
@@ -1,5 +1,4 @@
// compile-flags: -O
-// min-llvm-version: 16
// ignore-debug: the debug assertions get in the way
#![crate_type = "lib"]
diff --git a/tests/codegen/issues/issue-101814.rs b/tests/codegen/issues/issue-101814.rs
index 13796352c..63a8cebcb 100644
--- a/tests/codegen/issues/issue-101814.rs
+++ b/tests/codegen/issues/issue-101814.rs
@@ -1,5 +1,4 @@
// compile-flags: -O
-// min-llvm-version: 16
// ignore-debug: the debug assertions get in the way
#![crate_type = "lib"]
diff --git a/tests/codegen/issues/issue-103132.rs b/tests/codegen/issues/issue-103132.rs
index cc87d7cd2..521d424c2 100644
--- a/tests/codegen/issues/issue-103132.rs
+++ b/tests/codegen/issues/issue-103132.rs
@@ -1,5 +1,4 @@
// compile-flags: -O -C overflow-checks
-// min-llvm-version: 16
#![crate_type = "lib"]
diff --git a/tests/codegen/issues/issue-103327.rs b/tests/codegen/issues/issue-103327.rs
index cee00facc..021f1ca0c 100644
--- a/tests/codegen/issues/issue-103327.rs
+++ b/tests/codegen/issues/issue-103327.rs
@@ -1,5 +1,4 @@
// compile-flags: -O
-// min-llvm-version: 16
#![crate_type = "lib"]
diff --git a/tests/codegen/issues/issue-103840.rs b/tests/codegen/issues/issue-103840.rs
index da64692d2..f19d7031b 100644
--- a/tests/codegen/issues/issue-103840.rs
+++ b/tests/codegen/issues/issue-103840.rs
@@ -1,5 +1,4 @@
// compile-flags: -O
-// min-llvm-version: 16.0
#![crate_type = "lib"]
pub fn foo(t: &mut Vec<usize>) {
diff --git a/tests/codegen/issues/issue-116878.rs b/tests/codegen/issues/issue-116878.rs
new file mode 100644
index 000000000..d5f679459
--- /dev/null
+++ b/tests/codegen/issues/issue-116878.rs
@@ -0,0 +1,13 @@
+// no-system-llvm
+// compile-flags: -O
+// ignore-debug: the debug assertions get in the way
+#![crate_type = "lib"]
+
+/// Make sure no bounds checks are emitted after a `get_unchecked`.
+// CHECK-LABEL: @unchecked_slice_no_bounds_check
+#[no_mangle]
+pub unsafe fn unchecked_slice_no_bounds_check(s: &[u8]) -> u8 {
+ let a = *s.get_unchecked(1);
+ // CHECK-NOT: panic_bounds_check
+ a + s[0]
+}
diff --git a/tests/codegen/issues/issue-75978.rs b/tests/codegen/issues/issue-75978.rs
index f335e92c3..abfafc35f 100644
--- a/tests/codegen/issues/issue-75978.rs
+++ b/tests/codegen/issues/issue-75978.rs
@@ -1,5 +1,4 @@
// compile-flags: -O
-// min-llvm-version: 16
#![crate_type = "lib"]
diff --git a/tests/codegen/issues/issue-86106.rs b/tests/codegen/issues/issue-86106.rs
index 15aef344a..5f71d46fb 100644
--- a/tests/codegen/issues/issue-86106.rs
+++ b/tests/codegen/issues/issue-86106.rs
@@ -9,9 +9,12 @@
// CHECK-LABEL: define {{(dso_local )?}}void @string_new
#[no_mangle]
pub fn string_new() -> String {
- // CHECK: store ptr inttoptr
+ // CHECK-NOT: load i8
+ // CHECK: store i{{32|64}}
// CHECK-NEXT: getelementptr
- // CHECK-NEXT: call void @llvm.memset
+ // CHECK-NEXT: store ptr
+ // CHECK-NEXT: getelementptr
+ // CHECK-NEXT: store i{{32|64}}
// CHECK-NEXT: ret void
String::new()
}
@@ -19,9 +22,12 @@ pub fn string_new() -> String {
// CHECK-LABEL: define {{(dso_local )?}}void @empty_to_string
#[no_mangle]
pub fn empty_to_string() -> String {
- // CHECK: store ptr inttoptr
+ // CHECK-NOT: load i8
+ // CHECK: store i{{32|64}}
+ // CHECK-NEXT: getelementptr
+ // CHECK-NEXT: store ptr
// CHECK-NEXT: getelementptr
- // CHECK-NEXT: call void @llvm.memset
+ // CHECK-NEXT: store i{{32|64}}
// CHECK-NEXT: ret void
"".to_string()
}
@@ -32,9 +38,12 @@ pub fn empty_to_string() -> String {
// CHECK-LABEL: @empty_vec
#[no_mangle]
pub fn empty_vec() -> Vec<u8> {
- // CHECK: store ptr inttoptr
+ // CHECK: store i{{32|64}}
+ // CHECK-NOT: load i8
// CHECK-NEXT: getelementptr
- // CHECK-NEXT: call void @llvm.memset
+ // CHECK-NEXT: store ptr
+ // CHECK-NEXT: getelementptr
+ // CHECK-NEXT: store i{{32|64}}
// CHECK-NEXT: ret void
vec![]
}
@@ -42,9 +51,12 @@ pub fn empty_vec() -> Vec<u8> {
// CHECK-LABEL: @empty_vec_clone
#[no_mangle]
pub fn empty_vec_clone() -> Vec<u8> {
- // CHECK: store ptr inttoptr
+ // CHECK: store i{{32|64}}
+ // CHECK-NOT: load i8
+ // CHECK-NEXT: getelementptr
+ // CHECK-NEXT: store ptr
// CHECK-NEXT: getelementptr
- // CHECK-NEXT: call void @llvm.memset
+ // CHECK-NEXT: store i{{32|64}}
// CHECK-NEXT: ret void
vec![].clone()
}
diff --git a/tests/codegen/issues/issue-99960.rs b/tests/codegen/issues/issue-99960.rs
index e9c9367fa..ad0315a82 100644
--- a/tests/codegen/issues/issue-99960.rs
+++ b/tests/codegen/issues/issue-99960.rs
@@ -1,5 +1,4 @@
// compile-flags: -O
-// min-llvm-version: 16
#![crate_type = "lib"]
diff --git a/tests/codegen/llvm_module_flags.rs b/tests/codegen/llvm_module_flags.rs
new file mode 100644
index 000000000..acc035086
--- /dev/null
+++ b/tests/codegen/llvm_module_flags.rs
@@ -0,0 +1,7 @@
+// Test for -Z llvm_module_flags
+// compile-flags: -Z llvm_module_flag=foo:u32:123:error -Z llvm_module_flag=bar:u32:42:max
+
+fn main() {}
+
+// CHECK: !{i32 1, !"foo", i32 123}
+// CHECK: !{i32 7, !"bar", i32 42}
diff --git a/tests/codegen/overaligned-constant.rs b/tests/codegen/overaligned-constant.rs
new file mode 100644
index 000000000..c94dfd85e
--- /dev/null
+++ b/tests/codegen/overaligned-constant.rs
@@ -0,0 +1,36 @@
+// GVN may create indirect constants with higher alignment than their type requires. Verify that we
+// do not ICE during codegen, and that the LLVM constant has the higher alignment.
+//
+// compile-flags: -Zmir-opt-level=0 -Zmir-enable-passes=+GVN
+// compile-flags: -Cno-prepopulate-passes
+// only-64bit
+
+struct S(i32);
+
+struct SmallStruct(f32, Option<S>, &'static [f32]);
+
+// CHECK: @0 = private unnamed_addr constant
+// CHECK-SAME: , align 8
+
+fn main() {
+ // CHECK-LABEL: @_ZN20overaligned_constant4main
+ // CHECK: [[full:%_.*]] = alloca %SmallStruct, align 8
+ // CHECK: call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[full]], ptr align 8 @0, i64 32, i1 false)
+ // CHECK: %b.0 = load i32, ptr @0, align 4,
+ // CHECK: %b.1 = load i32, ptr getelementptr inbounds ({ i32, i32 }, ptr @0, i32 0, i32 1), align 4
+ let mut s = S(1);
+
+ s.0 = 3;
+
+ // SMALL_VAL corresponds to a MIR allocation with alignment 8.
+ const SMALL_VAL: SmallStruct = SmallStruct(4., Some(S(1)), &[]);
+
+ // In pre-codegen MIR:
+ // `a` is a scalar 4.
+ // `b` is an indirect constant at `SMALL_VAL`'s alloc with 0 offset.
+ // `c` is the empty slice.
+ //
+ // As a consequence, during codegen, we create a LLVM allocation for `SMALL_VAL`, with
+ // alignment 8, but only use the `Option<S>` field, at offset 0 with alignment 4.
+ let SmallStruct(a, b, c) = SMALL_VAL;
+}
diff --git a/tests/codegen/sanitizer/cfi-normalize-integers.rs b/tests/codegen/sanitizer/cfi-normalize-integers.rs
index 9663aa54c..d3cece4c7 100644
--- a/tests/codegen/sanitizer/cfi-normalize-integers.rs
+++ b/tests/codegen/sanitizer/cfi-normalize-integers.rs
@@ -6,78 +6,41 @@
#![crate_type="lib"]
extern crate core;
-use core::ffi::*;
pub fn foo0(_: bool) { }
// CHECK: define{{.*}}foo0{{.*}}!type ![[TYPE0:[0-9]+]] !type !{{[0-9]+}}
-pub fn foo1(_: bool, _: c_uchar) { }
+pub fn foo1(_: bool, _: bool) { }
// CHECK: define{{.*}}foo1{{.*}}!type ![[TYPE1:[0-9]+]] !type !{{[0-9]+}}
-pub fn foo2(_: bool, _: c_uchar, _: c_uchar) { }
+pub fn foo2(_: bool, _: bool, _: bool) { }
// CHECK: define{{.*}}foo2{{.*}}!type ![[TYPE2:[0-9]+]] !type !{{[0-9]+}}
-pub fn foo3(_: isize) { }
+pub fn foo3(_: char) { }
// CHECK: define{{.*}}foo3{{.*}}!type ![[TYPE3:[0-9]+]] !type !{{[0-9]+}}
-pub fn foo4(_: isize, _: c_long) { }
+pub fn foo4(_: char, _: char) { }
// CHECK: define{{.*}}foo4{{.*}}!type ![[TYPE4:[0-9]+]] !type !{{[0-9]+}}
-pub fn foo5(_: isize, _: c_long, _: c_longlong) { }
+pub fn foo5(_: char, _: char, _: char) { }
// CHECK: define{{.*}}foo5{{.*}}!type ![[TYPE5:[0-9]+]] !type !{{[0-9]+}}
-pub fn foo6(_: usize) { }
+pub fn foo6(_: isize) { }
// CHECK: define{{.*}}foo6{{.*}}!type ![[TYPE6:[0-9]+]] !type !{{[0-9]+}}
-pub fn foo7(_: usize, _: c_ulong) { }
+pub fn foo7(_: isize, _: isize) { }
// CHECK: define{{.*}}foo7{{.*}}!type ![[TYPE7:[0-9]+]] !type !{{[0-9]+}}
-pub fn foo8(_: usize, _: c_ulong, _: c_ulonglong) { }
+pub fn foo8(_: isize, _: isize, _: isize) { }
// CHECK: define{{.*}}foo8{{.*}}!type ![[TYPE8:[0-9]+]] !type !{{[0-9]+}}
-pub fn foo9(_: c_schar) { }
+pub fn foo9(_: (), _: usize) { }
// CHECK: define{{.*}}foo9{{.*}}!type ![[TYPE9:[0-9]+]] !type !{{[0-9]+}}
-pub fn foo10(_: c_char, _: c_schar) { }
+pub fn foo10(_: (), _: usize, _: usize) { }
// CHECK: define{{.*}}foo10{{.*}}!type ![[TYPE10:[0-9]+]] !type !{{[0-9]+}}
-pub fn foo11(_: c_char, _: c_schar, _: c_schar) { }
+pub fn foo11(_: (), _: usize, _: usize, _: usize) { }
// CHECK: define{{.*}}foo11{{.*}}!type ![[TYPE11:[0-9]+]] !type !{{[0-9]+}}
-pub fn foo12(_: c_int) { }
-// CHECK: define{{.*}}foo12{{.*}}!type ![[TYPE12:[0-9]+]] !type !{{[0-9]+}}
-pub fn foo13(_: c_int, _: c_int) { }
-// CHECK: define{{.*}}foo13{{.*}}!type ![[TYPE13:[0-9]+]] !type !{{[0-9]+}}
-pub fn foo14(_: c_int, _: c_int, _: c_int) { }
-// CHECK: define{{.*}}foo14{{.*}}!type ![[TYPE14:[0-9]+]] !type !{{[0-9]+}}
-pub fn foo15(_: c_short) { }
-// CHECK: define{{.*}}foo15{{.*}}!type ![[TYPE15:[0-9]+]] !type !{{[0-9]+}}
-pub fn foo16(_: c_short, _: c_short) { }
-// CHECK: define{{.*}}foo16{{.*}}!type ![[TYPE16:[0-9]+]] !type !{{[0-9]+}}
-pub fn foo17(_: c_short, _: c_short, _: c_short) { }
-// CHECK: define{{.*}}foo17{{.*}}!type ![[TYPE17:[0-9]+]] !type !{{[0-9]+}}
-pub fn foo18(_: c_uint) { }
-// CHECK: define{{.*}}foo18{{.*}}!type ![[TYPE18:[0-9]+]] !type !{{[0-9]+}}
-pub fn foo19(_: c_uint, _: c_uint) { }
-// CHECK: define{{.*}}foo19{{.*}}!type ![[TYPE19:[0-9]+]] !type !{{[0-9]+}}
-pub fn foo20(_: c_uint, _: c_uint, _: c_uint) { }
-// CHECK: define{{.*}}foo20{{.*}}!type ![[TYPE20:[0-9]+]] !type !{{[0-9]+}}
-pub fn foo21(_: c_ushort) { }
-// CHECK: define{{.*}}foo21{{.*}}!type ![[TYPE21:[0-9]+]] !type !{{[0-9]+}}
-pub fn foo22(_: c_ushort, _: c_ushort) { }
-// CHECK: define{{.*}}foo22{{.*}}!type ![[TYPE22:[0-9]+]] !type !{{[0-9]+}}
-pub fn foo23(_: c_ushort, _: c_ushort, _: c_ushort) { }
-// CHECK: define{{.*}}foo23{{.*}}!type ![[TYPE23:[0-9]+]] !type !{{[0-9]+}}
// CHECK: ![[TYPE0]] = !{i64 0, !"_ZTSFvu2u8E.normalized"}
// CHECK: ![[TYPE1]] = !{i64 0, !"_ZTSFvu2u8S_E.normalized"}
// CHECK: ![[TYPE2]] = !{i64 0, !"_ZTSFvu2u8S_S_E.normalized"}
-// CHECK: ![[TYPE3]] = !{i64 0, !"_ZTSFv{{u3i16|u3i32|u3i64}}E.normalized"}
-// CHECK: ![[TYPE4]] = !{i64 0, !"_ZTSFv{{u3i16|u3i32|u3i64}}{{u3i32|u3i64|S_}}E.normalized"}
-// CHECK: ![[TYPE5]] = !{i64 0, !"_ZTSFv{{u3i16|u3i32|u3i64}}{{u3i32|u3i64|S_}}{{u3i64|S_|S0_}}E.normalized"}
-// CHECK: ![[TYPE6]] = !{i64 0, !"_ZTSFv{{u3u16|u3u32|u3u64}}E.normalized"}
-// CHECK: ![[TYPE7]] = !{i64 0, !"_ZTSFv{{u3u16|u3u32|u3u64}}{{u3u32|u3u64|S_}}E.normalized"}
-// CHECK: ![[TYPE8]] = !{i64 0, !"_ZTSFv{{u3u16|u3u32|u3u64}}{{u3u32|u3u64|S_}}{{u3u64|S_|S0_}}E.normalized"}
-// CHECK: ![[TYPE9]] = !{i64 0, !"_ZTSFvu2i8E.normalized"}
-// CHECK: ![[TYPE10]] = !{i64 0, !"_ZTSFv{{u2i8S_|u2u8u2i8}}E.normalized"}
-// CHECK: ![[TYPE11]] = !{i64 0, !"_ZTSFv{{u2i8S_S_|u2u8u2i8S0_}}E.normalized"}
-// CHECK: ![[TYPE12]] = !{i64 0, !"_ZTSFv{{u3i16|u3i32|u3i64}}E.normalized"}
-// CHECK: ![[TYPE13]] = !{i64 0, !"_ZTSFv{{u3i16|u3i32|u3i64}}S_E.normalized"}
-// CHECK: ![[TYPE14]] = !{i64 0, !"_ZTSFv{{u3i16|u3i32|u3i64}}S_S_E.normalized"}
-// CHECK: ![[TYPE15]] = !{i64 0, !"_ZTSFvu3i16E.normalized"}
-// CHECK: ![[TYPE16]] = !{i64 0, !"_ZTSFvu3i16S_E.normalized"}
-// CHECK: ![[TYPE17]] = !{i64 0, !"_ZTSFvu3i16S_S_E.normalized"}
-// CHECK: ![[TYPE18]] = !{i64 0, !"_ZTSFv{{u3u16|u3u32|u3u64}}E.normalized"}
-// CHECK: ![[TYPE19]] = !{i64 0, !"_ZTSFv{{u3u16|u3u32|u3u64}}S_E.normalized"}
-// CHECK: ![[TYPE20]] = !{i64 0, !"_ZTSFv{{u3u16|u3u32|u3u64}}S_S_E.normalized"}
-// CHECK: ![[TYPE21]] = !{i64 0, !"_ZTSFvu3u16E.normalized"}
-// CHECK: ![[TYPE22]] = !{i64 0, !"_ZTSFvu3u16S_E.normalized"}
-// CHECK: ![[TYPE23]] = !{i64 0, !"_ZTSFvu3u16S_S_E.normalized"}
+// CHECK: ![[TYPE3]] = !{i64 0, !"_ZTSFvu3u32E.normalized"}
+// CHECK: ![[TYPE4]] = !{i64 0, !"_ZTSFvu3u32S_E.normalized"}
+// CHECK: ![[TYPE5]] = !{i64 0, !"_ZTSFvu3u32S_S_E.normalized"}
+// CHECK: ![[TYPE6]] = !{i64 0, !"_ZTSFv{{u3i16|u3i32|u3i64|u4i128}}E.normalized"}
+// CHECK: ![[TYPE7]] = !{i64 0, !"_ZTSFv{{u3i16|u3i32|u3i64|u4i128}}S_E.normalized"}
+// CHECK: ![[TYPE8]] = !{i64 0, !"_ZTSFv{{u3i16|u3i32|u3i64|u4i128}}S_S_E.normalized"}
+// CHECK: ![[TYPE9]] = !{i64 0, !"_ZTSFvv{{u3u16|u3u32|u3u64|u4u128}}E.normalized"}
+// CHECK: ![[TYPE10]] = !{i64 0, !"_ZTSFvv{{u3u16|u3u32|u3u64|u4u128}}S_E.normalized"}
+// CHECK: ![[TYPE11]] = !{i64 0, !"_ZTSFvv{{u3u16|u3u32|u3u64|u4u128}}S_S_E.normalized"}
diff --git a/tests/codegen/sanitizer/kasan-emits-instrumentation.rs b/tests/codegen/sanitizer/kasan-emits-instrumentation.rs
index 29d50d8df..18d315c95 100644
--- a/tests/codegen/sanitizer/kasan-emits-instrumentation.rs
+++ b/tests/codegen/sanitizer/kasan-emits-instrumentation.rs
@@ -6,10 +6,8 @@
//[aarch64] needs-llvm-components: aarch64
//[riscv64imac] compile-flags: --target riscv64imac-unknown-none-elf
//[riscv64imac] needs-llvm-components: riscv
-//[riscv64imac] min-llvm-version: 16
//[riscv64gc] compile-flags: --target riscv64gc-unknown-none-elf
//[riscv64gc] needs-llvm-components: riscv
-//[riscv64gc] min-llvm-version: 16
//[x86_64] compile-flags: --target x86_64-unknown-none
//[x86_64] needs-llvm-components: x86
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-load.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-load.rs
new file mode 100644
index 000000000..e573b7d21
--- /dev/null
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-load.rs
@@ -0,0 +1,34 @@
+// compile-flags: -C no-prepopulate-passes
+
+#![crate_type = "lib"]
+
+#![feature(repr_simd, platform_intrinsics)]
+#![allow(non_camel_case_types)]
+
+#[repr(simd)]
+#[derive(Copy, Clone, PartialEq, Debug)]
+pub struct Vec2<T>(pub T, pub T);
+
+#[repr(simd)]
+#[derive(Copy, Clone, PartialEq, Debug)]
+pub struct Vec4<T>(pub T, pub T, pub T, pub T);
+
+extern "platform-intrinsic" {
+ fn simd_masked_load<M, P, T>(mask: M, pointer: P, values: T) -> T;
+}
+
+// CHECK-LABEL: @load_f32x2
+#[no_mangle]
+pub unsafe fn load_f32x2(mask: Vec2<i32>, pointer: *const f32,
+ values: Vec2<f32>) -> Vec2<f32> {
+ // CHECK: call <2 x float> @llvm.masked.load.v2f32.p0(ptr {{.*}}, i32 4, <2 x i1> {{.*}}, <2 x float> {{.*}})
+ simd_masked_load(mask, pointer, values)
+}
+
+// CHECK-LABEL: @load_pf32x4
+#[no_mangle]
+pub unsafe fn load_pf32x4(mask: Vec4<i32>, pointer: *const *const f32,
+ values: Vec4<*const f32>) -> Vec4<*const f32> {
+ // CHECK: call <4 x ptr> @llvm.masked.load.v4p0.p0(ptr {{.*}}, i32 {{.*}}, <4 x i1> {{.*}}, <4 x ptr> {{.*}})
+ simd_masked_load(mask, pointer, values)
+}
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-store.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-store.rs
new file mode 100644
index 000000000..916566222
--- /dev/null
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-store.rs
@@ -0,0 +1,32 @@
+// compile-flags: -C no-prepopulate-passes
+
+#![crate_type = "lib"]
+
+#![feature(repr_simd, platform_intrinsics)]
+#![allow(non_camel_case_types)]
+
+#[repr(simd)]
+#[derive(Copy, Clone, PartialEq, Debug)]
+pub struct Vec2<T>(pub T, pub T);
+
+#[repr(simd)]
+#[derive(Copy, Clone, PartialEq, Debug)]
+pub struct Vec4<T>(pub T, pub T, pub T, pub T);
+
+extern "platform-intrinsic" {
+ fn simd_masked_store<M, P, T>(mask: M, pointer: P, values: T) -> ();
+}
+
+// CHECK-LABEL: @store_f32x2
+#[no_mangle]
+pub unsafe fn store_f32x2(mask: Vec2<i32>, pointer: *mut f32, values: Vec2<f32>) {
+ // CHECK: call void @llvm.masked.store.v2f32.p0(<2 x float> {{.*}}, ptr {{.*}}, i32 4, <2 x i1> {{.*}})
+ simd_masked_store(mask, pointer, values)
+}
+
+// CHECK-LABEL: @store_pf32x4
+#[no_mangle]
+pub unsafe fn store_pf32x4(mask: Vec4<i32>, pointer: *mut *const f32, values: Vec4<*const f32>) {
+ // CHECK: call void @llvm.masked.store.v4p0.p0(<4 x ptr> {{.*}}, ptr {{.*}}, i32 {{.*}}, <4 x i1> {{.*}})
+ simd_masked_store(mask, pointer, values)
+}
diff --git a/tests/codegen/simd/simd-wide-sum.rs b/tests/codegen/simd/simd-wide-sum.rs
index 6e7d3d931..109d53813 100644
--- a/tests/codegen/simd/simd-wide-sum.rs
+++ b/tests/codegen/simd/simd-wide-sum.rs
@@ -10,7 +10,7 @@
#![crate_type = "lib"]
#![feature(portable_simd)]
-use std::simd::{Simd, SimdUint};
+use std::simd::prelude::*;
const N: usize = 16;
#[no_mangle]
diff --git a/tests/codegen/slice-iter-fold.rs b/tests/codegen/slice-iter-fold.rs
index 9391c1761..a55425cb6 100644
--- a/tests/codegen/slice-iter-fold.rs
+++ b/tests/codegen/slice-iter-fold.rs
@@ -1,6 +1,5 @@
// ignore-debug: the debug assertions get in the way
// compile-flags: -O
-// min-llvm-version: 16
#![crate_type = "lib"]
// CHECK-LABEL: @slice_fold_to_last
diff --git a/tests/codegen/stack-probes-call.rs b/tests/codegen/stack-probes-call.rs
deleted file mode 100644
index a18fd41c2..000000000
--- a/tests/codegen/stack-probes-call.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// Check the "probe-stack" attribute for targets with `StackProbeType::Call`,
-// or `StackProbeType::InlineOrCall` when running on older LLVM.
-
-// compile-flags: -C no-prepopulate-passes
-// revisions: i686 x86_64
-//[i686] compile-flags: --target i686-unknown-linux-gnu
-//[i686] needs-llvm-components: x86
-//[i686] ignore-llvm-version: 16 - 99
-//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu
-//[x86_64] needs-llvm-components: x86
-//[x86_64] ignore-llvm-version: 16 - 99
-
-#![crate_type = "rlib"]
-#![feature(no_core, lang_items)]
-#![no_core]
-
-#[lang = "sized"]
-trait Sized {}
-
-#[no_mangle]
-pub fn foo() {
-// CHECK: @foo() unnamed_addr #0
-// CHECK: attributes #0 = { {{.*}}"probe-stack"="__rust_probestack"{{.*}} }
-}
diff --git a/tests/codegen/stack-probes-inline.rs b/tests/codegen/stack-probes-inline.rs
index a6b781de5..34027e918 100644
--- a/tests/codegen/stack-probes-inline.rs
+++ b/tests/codegen/stack-probes-inline.rs
@@ -2,7 +2,9 @@
// or `StackProbeType::InlineOrCall` when running on newer LLVM.
// compile-flags: -C no-prepopulate-passes
-// revisions: powerpc powerpc64 powerpc64le s390x i686 x86_64
+// revisions: aarch64 powerpc powerpc64 powerpc64le s390x i686 x86_64
+//[aarch64] compile-flags: --target aarch64-unknown-linux-gnu
+//[aarch64] needs-llvm-components: aarch64
//[powerpc] compile-flags: --target powerpc-unknown-linux-gnu
//[powerpc] needs-llvm-components: powerpc
//[powerpc64] compile-flags: --target powerpc64-unknown-linux-gnu
@@ -13,10 +15,8 @@
//[s390x] needs-llvm-components: systemz
//[i686] compile-flags: --target i686-unknown-linux-gnu
//[i686] needs-llvm-components: x86
-//[i686] min-llvm-version: 16
//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu
//[x86_64] needs-llvm-components: x86
-//[x86_64] min-llvm-version: 16
#![crate_type = "rlib"]
#![feature(no_core, lang_items)]
diff --git a/tests/codegen/thin-lto.rs b/tests/codegen/thin-lto.rs
new file mode 100644
index 000000000..7991cad7a
--- /dev/null
+++ b/tests/codegen/thin-lto.rs
@@ -0,0 +1,7 @@
+// compile-flags: -O -C lto=thin -C prefer-dynamic=no
+// only-x86_64-unknown-linux-gnu
+
+// CHECK: main
+
+pub fn main() {
+}
diff --git a/tests/codegen/unchecked_shifts.rs b/tests/codegen/unchecked_shifts.rs
index aca9bec77..eded894c6 100644
--- a/tests/codegen/unchecked_shifts.rs
+++ b/tests/codegen/unchecked_shifts.rs
@@ -31,7 +31,7 @@ pub unsafe fn unchecked_shl_unsigned_smaller(a: u16, b: u32) -> u16 {
#[no_mangle]
pub unsafe fn unchecked_shl_unsigned_bigger(a: u64, b: u32) -> u64 {
// CHECK-NOT: assume
- // CHECK: %[[EXT:.+]] = zext i32 %b to i64
+ // CHECK: %[[EXT:.+]] = zext{{( nneg)?}} i32 %b to i64
// CHECK: shl i64 %a, %[[EXT]]
a.unchecked_shl(b)
}
@@ -63,7 +63,7 @@ pub unsafe fn unchecked_shr_signed_smaller(a: i16, b: u32) -> i16 {
#[no_mangle]
pub unsafe fn unchecked_shr_signed_bigger(a: i64, b: u32) -> i64 {
// CHECK-NOT: assume
- // CHECK: %[[EXT:.+]] = zext i32 %b to i64
+ // CHECK: %[[EXT:.+]] = zext{{( nneg)?}} i32 %b to i64
// CHECK: ashr i64 %a, %[[EXT]]
a.unchecked_shr(b)
}
diff --git a/tests/codegen/vec-in-place.rs b/tests/codegen/vec-in-place.rs
index d68067ceb..5cf7add83 100644
--- a/tests/codegen/vec-in-place.rs
+++ b/tests/codegen/vec-in-place.rs
@@ -1,6 +1,5 @@
// ignore-debug: the debug assertions get in the way
// compile-flags: -O -Z merge-functions=disabled
-// min-llvm-version: 16
#![crate_type = "lib"]
// Ensure that trivial casts of vec elements are O(1)
diff --git a/tests/coverage/assert_not.cov-map b/tests/coverage/assert_not.cov-map
new file mode 100644
index 000000000..788bc5dbf
--- /dev/null
+++ b/tests/coverage/assert_not.cov-map
@@ -0,0 +1,16 @@
+Function name: assert_not::main
+Raw bytes (33): 0x[01, 01, 02, 05, 00, 0d, 00, 05, 01, 06, 01, 01, 12, 05, 02, 05, 00, 14, 02, 01, 05, 00, 14, 0d, 01, 05, 00, 16, 06, 01, 01, 00, 02]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 2
+- expression 0 operands: lhs = Counter(1), rhs = Zero
+- expression 1 operands: lhs = Counter(3), rhs = Zero
+Number of file 0 mappings: 5
+- Code(Counter(0)) at (prev + 6, 1) to (start + 1, 18)
+- Code(Counter(1)) at (prev + 2, 5) to (start + 0, 20)
+- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 20)
+ = (c1 - Zero)
+- Code(Counter(3)) at (prev + 1, 5) to (start + 0, 22)
+- Code(Expression(1, Sub)) at (prev + 1, 1) to (start + 0, 2)
+ = (c3 - Zero)
+
diff --git a/tests/coverage/assert_not.coverage b/tests/coverage/assert_not.coverage
new file mode 100644
index 000000000..4cfdab974
--- /dev/null
+++ b/tests/coverage/assert_not.coverage
@@ -0,0 +1,12 @@
+ LL| |// edition: 2021
+ LL| |
+ LL| |// Regression test for <https://github.com/rust-lang/rust/issues/118904>.
+ LL| |// `assert!(true)` and `assert!(!false)` should have similar coverage spans.
+ LL| |
+ LL| 1|fn main() {
+ LL| 1| assert!(true);
+ LL| 1| assert!(!false);
+ LL| 1| assert!(!!true);
+ LL| 1| assert!(!!!false);
+ LL| 1|}
+
diff --git a/tests/coverage/assert_not.rs b/tests/coverage/assert_not.rs
new file mode 100644
index 000000000..95204fcad
--- /dev/null
+++ b/tests/coverage/assert_not.rs
@@ -0,0 +1,11 @@
+// edition: 2021
+
+// Regression test for <https://github.com/rust-lang/rust/issues/118904>.
+// `assert!(true)` and `assert!(!false)` should have similar coverage spans.
+
+fn main() {
+ assert!(true);
+ assert!(!false);
+ assert!(!!true);
+ assert!(!!!false);
+}
diff --git a/tests/coverage/async.cov-map b/tests/coverage/async.cov-map
index 598791537..6bdcca40e 100644
--- a/tests/coverage/async.cov-map
+++ b/tests/coverage/async.cov-map
@@ -1,20 +1,20 @@
Function name: async::c
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 05, 01, 00, 19]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 07, 01, 00, 19]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 5, 1) to (start + 0, 25)
+- Code(Counter(0)) at (prev + 7, 1) to (start + 0, 25)
Function name: async::c::{closure#0}
-Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 05, 19, 01, 0e, 05, 02, 09, 00, 0a, 02, 02, 09, 00, 0a, 07, 02, 01, 00, 02]
+Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 07, 19, 01, 0e, 05, 02, 09, 00, 0a, 02, 02, 09, 00, 0a, 07, 02, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 2
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub)
Number of file 0 mappings: 4
-- Code(Counter(0)) at (prev + 5, 25) to (start + 1, 14)
+- Code(Counter(0)) at (prev + 7, 25) to (start + 1, 14)
- Code(Counter(1)) at (prev + 2, 9) to (start + 0, 10)
- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 10)
= (c0 - c1)
@@ -22,136 +22,84 @@ Number of file 0 mappings: 4
= (c1 + (c0 - c1))
Function name: async::d
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 0d, 01, 00, 14]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 0f, 01, 00, 14]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 13, 1) to (start + 0, 20)
+- Code(Counter(0)) at (prev + 15, 1) to (start + 0, 20)
Function name: async::d::{closure#0}
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 0d, 14, 00, 19]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 0f, 14, 00, 19]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 13, 20) to (start + 0, 25)
+- Code(Counter(0)) at (prev + 15, 20) to (start + 0, 25)
Function name: async::e (unused)
-Raw bytes (9): 0x[01, 01, 00, 01, 00, 0f, 01, 00, 14]
+Raw bytes (9): 0x[01, 01, 00, 01, 00, 11, 01, 00, 14]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Zero) at (prev + 15, 1) to (start + 0, 20)
+- Code(Zero) at (prev + 17, 1) to (start + 0, 20)
Function name: async::e::{closure#0} (unused)
-Raw bytes (9): 0x[01, 01, 00, 01, 00, 0f, 14, 00, 19]
+Raw bytes (9): 0x[01, 01, 00, 01, 00, 11, 14, 00, 19]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Zero) at (prev + 15, 20) to (start + 0, 25)
-
-Function name: async::executor::block_on::<core::pin::Pin<&mut async::i::{closure#0}>>
-Raw bytes (40): 0x[01, 01, 03, 0b, 05, 01, 05, 01, 05, 06, 01, 6e, 05, 0a, 36, 02, 0d, 20, 00, 23, 0b, 00, 27, 00, 49, 02, 01, 17, 00, 1a, 05, 01, 0e, 00, 0f, 02, 02, 05, 00, 06]
-Number of files: 1
-- file 0 => global file 1
-Number of expressions: 3
-- expression 0 operands: lhs = Expression(2, Add), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(1)
-Number of file 0 mappings: 6
-- Code(Counter(0)) at (prev + 110, 5) to (start + 10, 54)
-- Code(Expression(0, Sub)) at (prev + 13, 32) to (start + 0, 35)
- = ((c0 + c1) - c1)
-- Code(Expression(2, Add)) at (prev + 0, 39) to (start + 0, 73)
- = (c0 + c1)
-- Code(Expression(0, Sub)) at (prev + 1, 23) to (start + 0, 26)
- = ((c0 + c1) - c1)
-- Code(Counter(1)) at (prev + 1, 14) to (start + 0, 15)
-- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 6)
- = ((c0 + c1) - c1)
-
-Function name: async::executor::block_on::VTABLE::{closure#0}
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 72, 11, 00, 33]
-Number of files: 1
-- file 0 => global file 1
-Number of expressions: 0
-Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 114, 17) to (start + 0, 51)
-
-Function name: async::executor::block_on::VTABLE::{closure#1}
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 73, 11, 00, 33]
-Number of files: 1
-- file 0 => global file 1
-Number of expressions: 0
-Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 115, 17) to (start + 0, 51)
-
-Function name: async::executor::block_on::VTABLE::{closure#2}
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 74, 11, 00, 33]
-Number of files: 1
-- file 0 => global file 1
-Number of expressions: 0
-Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 116, 17) to (start + 0, 51)
-
-Function name: async::executor::block_on::VTABLE::{closure#3}
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 75, 11, 00, 13]
-Number of files: 1
-- file 0 => global file 1
-Number of expressions: 0
-Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 117, 17) to (start + 0, 19)
+- Code(Zero) at (prev + 17, 20) to (start + 0, 25)
Function name: async::f
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 11, 01, 00, 14]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 13, 01, 00, 14]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 17, 1) to (start + 0, 20)
+- Code(Counter(0)) at (prev + 19, 1) to (start + 0, 20)
Function name: async::f::{closure#0}
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 11, 14, 00, 19]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 13, 14, 00, 19]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 17, 20) to (start + 0, 25)
+- Code(Counter(0)) at (prev + 19, 20) to (start + 0, 25)
Function name: async::foo (unused)
-Raw bytes (9): 0x[01, 01, 00, 01, 00, 13, 01, 00, 1e]
+Raw bytes (9): 0x[01, 01, 00, 01, 00, 15, 01, 00, 1e]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Zero) at (prev + 19, 1) to (start + 0, 30)
+- Code(Zero) at (prev + 21, 1) to (start + 0, 30)
Function name: async::foo::{closure#0} (unused)
-Raw bytes (9): 0x[01, 01, 00, 01, 00, 13, 1e, 00, 2d]
+Raw bytes (9): 0x[01, 01, 00, 01, 00, 15, 1e, 00, 2d]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Zero) at (prev + 19, 30) to (start + 0, 45)
+- Code(Zero) at (prev + 21, 30) to (start + 0, 45)
Function name: async::g
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 15, 01, 00, 17]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 17, 01, 00, 17]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 21, 1) to (start + 0, 23)
+- Code(Counter(0)) at (prev + 23, 1) to (start + 0, 23)
Function name: async::g::{closure#0} (unused)
-Raw bytes (69): 0x[01, 01, 00, 0d, 00, 15, 17, 01, 0c, 00, 02, 09, 00, 0a, 00, 00, 0e, 00, 11, 00, 00, 12, 00, 17, 00, 00, 1b, 00, 1c, 00, 00, 20, 00, 22, 00, 01, 09, 00, 0a, 00, 00, 0e, 00, 11, 00, 00, 12, 00, 17, 00, 00, 1b, 00, 1c, 00, 00, 20, 00, 22, 00, 01, 0e, 00, 10, 00, 02, 01, 00, 02]
+Raw bytes (69): 0x[01, 01, 00, 0d, 00, 17, 17, 01, 0c, 00, 02, 09, 00, 0a, 00, 00, 0e, 00, 11, 00, 00, 12, 00, 17, 00, 00, 1b, 00, 1c, 00, 00, 20, 00, 22, 00, 01, 09, 00, 0a, 00, 00, 0e, 00, 11, 00, 00, 12, 00, 17, 00, 00, 1b, 00, 1c, 00, 00, 20, 00, 22, 00, 01, 0e, 00, 10, 00, 02, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 13
-- Code(Zero) at (prev + 21, 23) to (start + 1, 12)
+- Code(Zero) at (prev + 23, 23) to (start + 1, 12)
- Code(Zero) at (prev + 2, 9) to (start + 0, 10)
- Code(Zero) at (prev + 0, 14) to (start + 0, 17)
- Code(Zero) at (prev + 0, 18) to (start + 0, 23)
@@ -166,20 +114,20 @@ Number of file 0 mappings: 13
- Code(Zero) at (prev + 2, 1) to (start + 0, 2)
Function name: async::h
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 1d, 01, 00, 16]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 1f, 01, 00, 16]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 29, 1) to (start + 0, 22)
+- Code(Counter(0)) at (prev + 31, 1) to (start + 0, 22)
Function name: async::h::{closure#0} (unused)
-Raw bytes (44): 0x[01, 01, 00, 08, 00, 1d, 16, 03, 0c, 00, 04, 09, 00, 0a, 00, 00, 0e, 00, 13, 00, 00, 14, 00, 19, 00, 00, 1a, 00, 1b, 00, 00, 20, 00, 22, 00, 01, 0e, 00, 10, 00, 02, 01, 00, 02]
+Raw bytes (44): 0x[01, 01, 00, 08, 00, 1f, 16, 03, 0c, 00, 04, 09, 00, 0a, 00, 00, 0e, 00, 13, 00, 00, 14, 00, 19, 00, 00, 1a, 00, 1b, 00, 00, 20, 00, 22, 00, 01, 0e, 00, 10, 00, 02, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 8
-- Code(Zero) at (prev + 29, 22) to (start + 3, 12)
+- Code(Zero) at (prev + 31, 22) to (start + 3, 12)
- Code(Zero) at (prev + 4, 9) to (start + 0, 10)
- Code(Zero) at (prev + 0, 14) to (start + 0, 19)
- Code(Zero) at (prev + 0, 20) to (start + 0, 25)
@@ -189,22 +137,22 @@ Number of file 0 mappings: 8
- Code(Zero) at (prev + 2, 1) to (start + 0, 2)
Function name: async::i
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 26, 01, 00, 13]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 28, 01, 00, 13]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 38, 1) to (start + 0, 19)
+- Code(Counter(0)) at (prev + 40, 1) to (start + 0, 19)
Function name: async::i::{closure#0}
-Raw bytes (78): 0x[01, 01, 02, 19, 07, 1d, 21, 0e, 01, 26, 13, 04, 0c, 0d, 05, 09, 00, 0a, 01, 00, 0e, 00, 12, 05, 00, 13, 00, 18, 09, 00, 1c, 00, 21, 0d, 00, 27, 00, 2a, 15, 00, 2b, 00, 30, 1d, 01, 09, 00, 0a, 11, 00, 0e, 00, 11, 25, 00, 12, 00, 17, 29, 00, 1b, 00, 20, 1d, 00, 24, 00, 26, 21, 01, 0e, 00, 10, 03, 02, 01, 00, 02]
+Raw bytes (78): 0x[01, 01, 02, 07, 21, 19, 1d, 0e, 01, 28, 13, 04, 0c, 0d, 05, 09, 00, 0a, 01, 00, 0e, 00, 12, 05, 00, 13, 00, 18, 09, 00, 1c, 00, 21, 0d, 00, 27, 00, 2a, 15, 00, 2b, 00, 30, 1d, 01, 09, 00, 0a, 11, 00, 0e, 00, 11, 25, 00, 12, 00, 17, 29, 00, 1b, 00, 20, 1d, 00, 24, 00, 26, 21, 01, 0e, 00, 10, 03, 02, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 2
-- expression 0 operands: lhs = Counter(6), rhs = Expression(1, Add)
-- expression 1 operands: lhs = Counter(7), rhs = Counter(8)
+- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(8)
+- expression 1 operands: lhs = Counter(6), rhs = Counter(7)
Number of file 0 mappings: 14
-- Code(Counter(0)) at (prev + 38, 19) to (start + 4, 12)
+- Code(Counter(0)) at (prev + 40, 19) to (start + 4, 12)
- Code(Counter(3)) at (prev + 5, 9) to (start + 0, 10)
- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 18)
- Code(Counter(1)) at (prev + 0, 19) to (start + 0, 24)
@@ -218,17 +166,17 @@ Number of file 0 mappings: 14
- Code(Counter(7)) at (prev + 0, 36) to (start + 0, 38)
- Code(Counter(8)) at (prev + 1, 14) to (start + 0, 16)
- Code(Expression(0, Add)) at (prev + 2, 1) to (start + 0, 2)
- = (c6 + (c7 + c8))
+ = ((c6 + c7) + c8)
Function name: async::j
-Raw bytes (53): 0x[01, 01, 02, 05, 07, 09, 0d, 09, 01, 31, 01, 13, 0c, 05, 14, 09, 00, 0a, 01, 00, 0e, 00, 1b, 05, 00, 1f, 00, 27, 09, 01, 09, 00, 0a, 11, 00, 0e, 00, 1a, 09, 00, 1e, 00, 20, 0d, 01, 0e, 00, 10, 03, 02, 01, 00, 02]
+Raw bytes (53): 0x[01, 01, 02, 07, 0d, 05, 09, 09, 01, 33, 01, 13, 0c, 05, 14, 09, 00, 0a, 01, 00, 0e, 00, 1b, 05, 00, 1f, 00, 27, 09, 01, 09, 00, 0a, 11, 00, 0e, 00, 1a, 09, 00, 1e, 00, 20, 0d, 01, 0e, 00, 10, 03, 02, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 2
-- expression 0 operands: lhs = Counter(1), rhs = Expression(1, Add)
-- expression 1 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(3)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
Number of file 0 mappings: 9
-- Code(Counter(0)) at (prev + 49, 1) to (start + 19, 12)
+- Code(Counter(0)) at (prev + 51, 1) to (start + 19, 12)
- Code(Counter(1)) at (prev + 20, 9) to (start + 0, 10)
- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 27)
- Code(Counter(1)) at (prev + 0, 31) to (start + 0, 39)
@@ -237,17 +185,17 @@ Number of file 0 mappings: 9
- Code(Counter(2)) at (prev + 0, 30) to (start + 0, 32)
- Code(Counter(3)) at (prev + 1, 14) to (start + 0, 16)
- Code(Expression(0, Add)) at (prev + 2, 1) to (start + 0, 2)
- = (c1 + (c2 + c3))
+ = ((c1 + c2) + c3)
Function name: async::j::c
-Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 33, 05, 01, 12, 05, 02, 0d, 00, 0e, 02, 0a, 0d, 00, 0e, 07, 02, 05, 00, 06]
+Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 35, 05, 01, 12, 05, 02, 0d, 00, 0e, 02, 0a, 0d, 00, 0e, 07, 02, 05, 00, 06]
Number of files: 1
- file 0 => global file 1
Number of expressions: 2
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub)
Number of file 0 mappings: 4
-- Code(Counter(0)) at (prev + 51, 5) to (start + 1, 18)
+- Code(Counter(0)) at (prev + 53, 5) to (start + 1, 18)
- Code(Counter(1)) at (prev + 2, 13) to (start + 0, 14)
- Code(Expression(0, Sub)) at (prev + 10, 13) to (start + 0, 14)
= (c0 - c1)
@@ -255,72 +203,72 @@ Number of file 0 mappings: 4
= (c1 + (c0 - c1))
Function name: async::j::d
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 42, 05, 00, 17]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 44, 05, 00, 17]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 66, 5) to (start + 0, 23)
+- Code(Counter(0)) at (prev + 68, 5) to (start + 0, 23)
Function name: async::j::f
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 43, 05, 00, 17]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 45, 05, 00, 17]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 67, 5) to (start + 0, 23)
+- Code(Counter(0)) at (prev + 69, 5) to (start + 0, 23)
Function name: async::k (unused)
-Raw bytes (29): 0x[01, 01, 00, 05, 00, 4b, 01, 01, 0c, 00, 02, 0e, 00, 10, 00, 01, 0e, 00, 10, 00, 01, 0e, 00, 10, 00, 02, 01, 00, 02]
+Raw bytes (29): 0x[01, 01, 00, 05, 00, 4d, 01, 01, 0c, 00, 02, 0e, 00, 10, 00, 01, 0e, 00, 10, 00, 01, 0e, 00, 10, 00, 02, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 5
-- Code(Zero) at (prev + 75, 1) to (start + 1, 12)
+- Code(Zero) at (prev + 77, 1) to (start + 1, 12)
- Code(Zero) at (prev + 2, 14) to (start + 0, 16)
- Code(Zero) at (prev + 1, 14) to (start + 0, 16)
- Code(Zero) at (prev + 1, 14) to (start + 0, 16)
- Code(Zero) at (prev + 2, 1) to (start + 0, 2)
Function name: async::l
-Raw bytes (37): 0x[01, 01, 04, 01, 07, 09, 05, 09, 0f, 05, 02, 05, 01, 53, 01, 01, 0c, 02, 02, 0e, 00, 10, 05, 01, 0e, 00, 10, 09, 01, 0e, 00, 10, 0b, 02, 01, 00, 02]
+Raw bytes (37): 0x[01, 01, 04, 01, 07, 05, 09, 0f, 02, 09, 05, 05, 01, 55, 01, 01, 0c, 02, 02, 0e, 00, 10, 05, 01, 0e, 00, 10, 09, 01, 0e, 00, 10, 0b, 02, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 4
- expression 0 operands: lhs = Counter(0), rhs = Expression(1, Add)
-- expression 1 operands: lhs = Counter(2), rhs = Counter(1)
-- expression 2 operands: lhs = Counter(2), rhs = Expression(3, Add)
-- expression 3 operands: lhs = Counter(1), rhs = Expression(0, Sub)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 2 operands: lhs = Expression(3, Add), rhs = Expression(0, Sub)
+- expression 3 operands: lhs = Counter(2), rhs = Counter(1)
Number of file 0 mappings: 5
-- Code(Counter(0)) at (prev + 83, 1) to (start + 1, 12)
+- Code(Counter(0)) at (prev + 85, 1) to (start + 1, 12)
- Code(Expression(0, Sub)) at (prev + 2, 14) to (start + 0, 16)
- = (c0 - (c2 + c1))
+ = (c0 - (c1 + c2))
- Code(Counter(1)) at (prev + 1, 14) to (start + 0, 16)
- Code(Counter(2)) at (prev + 1, 14) to (start + 0, 16)
- Code(Expression(2, Add)) at (prev + 2, 1) to (start + 0, 2)
- = (c2 + (c1 + (c0 - (c2 + c1))))
+ = ((c2 + c1) + (c0 - (c1 + c2)))
Function name: async::m
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 5b, 01, 00, 19]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 5d, 01, 00, 19]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 91, 1) to (start + 0, 25)
+- Code(Counter(0)) at (prev + 93, 1) to (start + 0, 25)
Function name: async::m::{closure#0} (unused)
-Raw bytes (9): 0x[01, 01, 00, 01, 00, 5b, 19, 00, 22]
+Raw bytes (9): 0x[01, 01, 00, 01, 00, 5d, 19, 00, 22]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Zero) at (prev + 91, 25) to (start + 0, 34)
+- Code(Zero) at (prev + 93, 25) to (start + 0, 34)
Function name: async::main
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 5d, 01, 08, 02]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 5f, 01, 08, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 93, 1) to (start + 8, 2)
+- Code(Counter(0)) at (prev + 95, 1) to (start + 8, 2)
diff --git a/tests/coverage/async.coverage b/tests/coverage/async.coverage
index 07bc16c2d..015e03d51 100644
--- a/tests/coverage/async.coverage
+++ b/tests/coverage/async.coverage
@@ -1,6 +1,8 @@
+ LL| |#![feature(coverage_attribute)]
+ LL| |#![feature(noop_waker)]
LL| |#![allow(unused_assignments, dead_code)]
- LL| |
- LL| |// compile-flags: --edition=2018 -C opt-level=1
+ LL| |// edition: 2018
+ LL| |// compile-flags: -Copt-level=1
LL| |
LL| 1|async fn c(x: u8) -> u8 {
LL| 1| if x == 8 {
@@ -108,32 +110,21 @@
LL| 1|}
LL| |
LL| |mod executor {
- LL| | use core::{
- LL| | future::Future,
- LL| | pin::Pin,
- LL| | task::{Context, Poll, RawWaker, RawWakerVTable, Waker},
- LL| | };
- LL| |
- LL| 1| pub fn block_on<F: Future>(mut future: F) -> F::Output {
- LL| 1| let mut future = unsafe { Pin::new_unchecked(&mut future) };
- LL| 1| use std::hint::unreachable_unchecked;
- LL| 1| static VTABLE: RawWakerVTable = RawWakerVTable::new(
- LL| 1| |_| unsafe { unreachable_unchecked() }, // clone
- ^0
- LL| 1| |_| unsafe { unreachable_unchecked() }, // wake
- ^0
- LL| 1| |_| unsafe { unreachable_unchecked() }, // wake_by_ref
- ^0
- LL| 1| |_| (),
- LL| 1| );
- LL| 1| let waker = unsafe { Waker::from_raw(RawWaker::new(core::ptr::null(), &VTABLE)) };
- LL| 1| let mut context = Context::from_waker(&waker);
+ LL| | use core::future::Future;
+ LL| | use core::pin::pin;
+ LL| | use core::task::{Context, Poll, Waker};
+ LL| |
+ LL| | #[coverage(off)]
+ LL| | pub fn block_on<F: Future>(mut future: F) -> F::Output {
+ LL| | let mut future = pin!(future);
+ LL| | let waker = Waker::noop();
+ LL| | let mut context = Context::from_waker(&waker);
LL| |
LL| | loop {
- LL| 1| if let Poll::Ready(val) = future.as_mut().poll(&mut context) {
- LL| 1| break val;
- LL| 0| }
+ LL| | if let Poll::Ready(val) = future.as_mut().poll(&mut context) {
+ LL| | break val;
+ LL| | }
LL| | }
- LL| 1| }
+ LL| | }
LL| |}
diff --git a/tests/coverage/async.rs b/tests/coverage/async.rs
index efd9e62d6..abc9e5f7f 100644
--- a/tests/coverage/async.rs
+++ b/tests/coverage/async.rs
@@ -1,6 +1,8 @@
+#![feature(coverage_attribute)]
+#![feature(noop_waker)]
#![allow(unused_assignments, dead_code)]
-
-// compile-flags: --edition=2018 -C opt-level=1
+// edition: 2018
+// compile-flags: -Copt-level=1
async fn c(x: u8) -> u8 {
if x == 8 {
@@ -101,22 +103,14 @@ fn main() {
}
mod executor {
- use core::{
- future::Future,
- pin::Pin,
- task::{Context, Poll, RawWaker, RawWakerVTable, Waker},
- };
+ use core::future::Future;
+ use core::pin::pin;
+ use core::task::{Context, Poll, Waker};
+ #[coverage(off)]
pub fn block_on<F: Future>(mut future: F) -> F::Output {
- let mut future = unsafe { Pin::new_unchecked(&mut future) };
- use std::hint::unreachable_unchecked;
- static VTABLE: RawWakerVTable = RawWakerVTable::new(
- |_| unsafe { unreachable_unchecked() }, // clone
- |_| unsafe { unreachable_unchecked() }, // wake
- |_| unsafe { unreachable_unchecked() }, // wake_by_ref
- |_| (),
- );
- let waker = unsafe { Waker::from_raw(RawWaker::new(core::ptr::null(), &VTABLE)) };
+ let mut future = pin!(future);
+ let waker = Waker::noop();
let mut context = Context::from_waker(&waker);
loop {
diff --git a/tests/coverage/async2.cov-map b/tests/coverage/async2.cov-map
index cc7aed9ae..b120e28c4 100644
--- a/tests/coverage/async2.cov-map
+++ b/tests/coverage/async2.cov-map
@@ -1,20 +1,20 @@
Function name: async2::async_func
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 0b, 01, 00, 17]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 0d, 01, 00, 17]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 11, 1) to (start + 0, 23)
+- Code(Counter(0)) at (prev + 13, 1) to (start + 0, 23)
Function name: async2::async_func::{closure#0}
-Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 0b, 17, 03, 09, 05, 03, 0a, 02, 06, 02, 02, 06, 00, 07, 07, 01, 01, 00, 02]
+Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 0d, 17, 03, 09, 05, 03, 0a, 02, 06, 02, 02, 06, 00, 07, 07, 01, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 2
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub)
Number of file 0 mappings: 4
-- Code(Counter(0)) at (prev + 11, 23) to (start + 3, 9)
+- Code(Counter(0)) at (prev + 13, 23) to (start + 3, 9)
- Code(Counter(1)) at (prev + 3, 10) to (start + 2, 6)
- Code(Expression(0, Sub)) at (prev + 2, 6) to (start + 0, 7)
= (c0 - c1)
@@ -22,109 +22,37 @@ Number of file 0 mappings: 4
= (c1 + (c0 - c1))
Function name: async2::async_func_just_println
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 13, 01, 00, 24]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 15, 01, 00, 24]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 19, 1) to (start + 0, 36)
+- Code(Counter(0)) at (prev + 21, 1) to (start + 0, 36)
Function name: async2::async_func_just_println::{closure#0}
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 13, 24, 02, 02]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 15, 24, 02, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 19, 36) to (start + 2, 2)
-
-Function name: async2::executor::block_on::<async2::async_func::{closure#0}>
-Raw bytes (40): 0x[01, 01, 03, 0b, 05, 01, 05, 01, 05, 06, 01, 27, 05, 0a, 36, 02, 0d, 20, 00, 23, 0b, 00, 27, 00, 49, 02, 01, 17, 00, 1a, 05, 01, 0e, 00, 0f, 02, 02, 05, 00, 06]
-Number of files: 1
-- file 0 => global file 1
-Number of expressions: 3
-- expression 0 operands: lhs = Expression(2, Add), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(1)
-Number of file 0 mappings: 6
-- Code(Counter(0)) at (prev + 39, 5) to (start + 10, 54)
-- Code(Expression(0, Sub)) at (prev + 13, 32) to (start + 0, 35)
- = ((c0 + c1) - c1)
-- Code(Expression(2, Add)) at (prev + 0, 39) to (start + 0, 73)
- = (c0 + c1)
-- Code(Expression(0, Sub)) at (prev + 1, 23) to (start + 0, 26)
- = ((c0 + c1) - c1)
-- Code(Counter(1)) at (prev + 1, 14) to (start + 0, 15)
-- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 6)
- = ((c0 + c1) - c1)
-
-Function name: async2::executor::block_on::<async2::async_func_just_println::{closure#0}>
-Raw bytes (40): 0x[01, 01, 03, 0b, 05, 01, 05, 01, 05, 06, 01, 27, 05, 0a, 36, 02, 0d, 20, 00, 23, 0b, 00, 27, 00, 49, 02, 01, 17, 00, 1a, 05, 01, 0e, 00, 0f, 02, 02, 05, 00, 06]
-Number of files: 1
-- file 0 => global file 1
-Number of expressions: 3
-- expression 0 operands: lhs = Expression(2, Add), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(1)
-Number of file 0 mappings: 6
-- Code(Counter(0)) at (prev + 39, 5) to (start + 10, 54)
-- Code(Expression(0, Sub)) at (prev + 13, 32) to (start + 0, 35)
- = ((c0 + c1) - c1)
-- Code(Expression(2, Add)) at (prev + 0, 39) to (start + 0, 73)
- = (c0 + c1)
-- Code(Expression(0, Sub)) at (prev + 1, 23) to (start + 0, 26)
- = ((c0 + c1) - c1)
-- Code(Counter(1)) at (prev + 1, 14) to (start + 0, 15)
-- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 6)
- = ((c0 + c1) - c1)
-
-Function name: async2::executor::block_on::VTABLE::{closure#0}
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 2b, 11, 00, 33]
-Number of files: 1
-- file 0 => global file 1
-Number of expressions: 0
-Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 43, 17) to (start + 0, 51)
-
-Function name: async2::executor::block_on::VTABLE::{closure#1}
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 2c, 11, 00, 33]
-Number of files: 1
-- file 0 => global file 1
-Number of expressions: 0
-Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 44, 17) to (start + 0, 51)
-
-Function name: async2::executor::block_on::VTABLE::{closure#2}
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 2d, 11, 00, 33]
-Number of files: 1
-- file 0 => global file 1
-Number of expressions: 0
-Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 45, 17) to (start + 0, 51)
-
-Function name: async2::executor::block_on::VTABLE::{closure#3}
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 2e, 11, 00, 13]
-Number of files: 1
-- file 0 => global file 1
-Number of expressions: 0
-Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 46, 17) to (start + 0, 19)
+- Code(Counter(0)) at (prev + 21, 36) to (start + 2, 2)
Function name: async2::main
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 17, 01, 07, 02]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 19, 01, 07, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 23, 1) to (start + 7, 2)
+- Code(Counter(0)) at (prev + 25, 1) to (start + 7, 2)
Function name: async2::non_async_func
-Raw bytes (26): 0x[01, 01, 01, 05, 00, 04, 01, 03, 01, 03, 09, 05, 03, 0a, 02, 06, 00, 02, 06, 00, 07, 03, 01, 01, 00, 02]
+Raw bytes (26): 0x[01, 01, 01, 05, 00, 04, 01, 05, 01, 03, 09, 05, 03, 0a, 02, 06, 00, 02, 06, 00, 07, 03, 01, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 1
- expression 0 operands: lhs = Counter(1), rhs = Zero
Number of file 0 mappings: 4
-- Code(Counter(0)) at (prev + 3, 1) to (start + 3, 9)
+- Code(Counter(0)) at (prev + 5, 1) to (start + 3, 9)
- Code(Counter(1)) at (prev + 3, 10) to (start + 2, 6)
- Code(Zero) at (prev + 2, 6) to (start + 0, 7)
- Code(Expression(0, Add)) at (prev + 1, 1) to (start + 0, 2)
diff --git a/tests/coverage/async2.coverage b/tests/coverage/async2.coverage
index fcb0a3aed..acd83de94 100644
--- a/tests/coverage/async2.coverage
+++ b/tests/coverage/async2.coverage
@@ -1,4 +1,6 @@
- LL| |// compile-flags: --edition=2018
+ LL| |#![feature(coverage_attribute)]
+ LL| |#![feature(noop_waker)]
+ LL| |// edition: 2018
LL| |
LL| 1|fn non_async_func() {
LL| 1| println!("non_async_func was covered");
@@ -32,73 +34,21 @@
LL| 1|}
LL| |
LL| |mod executor {
- LL| | use core::{
- LL| | future::Future,
- LL| | pin::Pin,
- LL| | task::{Context, Poll, RawWaker, RawWakerVTable, Waker},
- LL| | };
+ LL| | use core::future::Future;
+ LL| | use core::pin::pin;
+ LL| | use core::task::{Context, Poll, Waker};
LL| |
- LL| 2| pub fn block_on<F: Future>(mut future: F) -> F::Output {
- LL| 2| let mut future = unsafe { Pin::new_unchecked(&mut future) };
- LL| 2| use std::hint::unreachable_unchecked;
- LL| 2| static VTABLE: RawWakerVTable = RawWakerVTable::new(
- LL| 2| |_| unsafe { unreachable_unchecked() }, // clone
- ^0
- LL| 2| |_| unsafe { unreachable_unchecked() }, // wake
- ^0
- LL| 2| |_| unsafe { unreachable_unchecked() }, // wake_by_ref
- ^0
- LL| 2| |_| (),
- LL| 2| );
- LL| 2| let waker = unsafe { Waker::from_raw(RawWaker::new(core::ptr::null(), &VTABLE)) };
- LL| 2| let mut context = Context::from_waker(&waker);
+ LL| | #[coverage(off)]
+ LL| | pub fn block_on<F: Future>(mut future: F) -> F::Output {
+ LL| | let mut future = pin!(future);
+ LL| | let waker = Waker::noop();
+ LL| | let mut context = Context::from_waker(&waker);
LL| |
LL| | loop {
- LL| 2| if let Poll::Ready(val) = future.as_mut().poll(&mut context) {
- LL| 2| break val;
- LL| 0| }
+ LL| | if let Poll::Ready(val) = future.as_mut().poll(&mut context) {
+ LL| | break val;
+ LL| | }
LL| | }
- LL| 2| }
- ------------------
- | async2::executor::block_on::<async2::async_func::{closure#0}>:
- | LL| 1| pub fn block_on<F: Future>(mut future: F) -> F::Output {
- | LL| 1| let mut future = unsafe { Pin::new_unchecked(&mut future) };
- | LL| 1| use std::hint::unreachable_unchecked;
- | LL| 1| static VTABLE: RawWakerVTable = RawWakerVTable::new(
- | LL| 1| |_| unsafe { unreachable_unchecked() }, // clone
- | LL| 1| |_| unsafe { unreachable_unchecked() }, // wake
- | LL| 1| |_| unsafe { unreachable_unchecked() }, // wake_by_ref
- | LL| 1| |_| (),
- | LL| 1| );
- | LL| 1| let waker = unsafe { Waker::from_raw(RawWaker::new(core::ptr::null(), &VTABLE)) };
- | LL| 1| let mut context = Context::from_waker(&waker);
- | LL| |
- | LL| | loop {
- | LL| 1| if let Poll::Ready(val) = future.as_mut().poll(&mut context) {
- | LL| 1| break val;
- | LL| 0| }
- | LL| | }
- | LL| 1| }
- ------------------
- | async2::executor::block_on::<async2::async_func_just_println::{closure#0}>:
- | LL| 1| pub fn block_on<F: Future>(mut future: F) -> F::Output {
- | LL| 1| let mut future = unsafe { Pin::new_unchecked(&mut future) };
- | LL| 1| use std::hint::unreachable_unchecked;
- | LL| 1| static VTABLE: RawWakerVTable = RawWakerVTable::new(
- | LL| 1| |_| unsafe { unreachable_unchecked() }, // clone
- | LL| 1| |_| unsafe { unreachable_unchecked() }, // wake
- | LL| 1| |_| unsafe { unreachable_unchecked() }, // wake_by_ref
- | LL| 1| |_| (),
- | LL| 1| );
- | LL| 1| let waker = unsafe { Waker::from_raw(RawWaker::new(core::ptr::null(), &VTABLE)) };
- | LL| 1| let mut context = Context::from_waker(&waker);
- | LL| |
- | LL| | loop {
- | LL| 1| if let Poll::Ready(val) = future.as_mut().poll(&mut context) {
- | LL| 1| break val;
- | LL| 0| }
- | LL| | }
- | LL| 1| }
- ------------------
+ LL| | }
LL| |}
diff --git a/tests/coverage/async2.rs b/tests/coverage/async2.rs
index 2884ff297..393573f7d 100644
--- a/tests/coverage/async2.rs
+++ b/tests/coverage/async2.rs
@@ -1,4 +1,6 @@
-// compile-flags: --edition=2018
+#![feature(coverage_attribute)]
+#![feature(noop_waker)]
+// edition: 2018
fn non_async_func() {
println!("non_async_func was covered");
@@ -30,22 +32,14 @@ fn main() {
}
mod executor {
- use core::{
- future::Future,
- pin::Pin,
- task::{Context, Poll, RawWaker, RawWakerVTable, Waker},
- };
+ use core::future::Future;
+ use core::pin::pin;
+ use core::task::{Context, Poll, Waker};
+ #[coverage(off)]
pub fn block_on<F: Future>(mut future: F) -> F::Output {
- let mut future = unsafe { Pin::new_unchecked(&mut future) };
- use std::hint::unreachable_unchecked;
- static VTABLE: RawWakerVTable = RawWakerVTable::new(
- |_| unsafe { unreachable_unchecked() }, // clone
- |_| unsafe { unreachable_unchecked() }, // wake
- |_| unsafe { unreachable_unchecked() }, // wake_by_ref
- |_| (),
- );
- let waker = unsafe { Waker::from_raw(RawWaker::new(core::ptr::null(), &VTABLE)) };
+ let mut future = pin!(future);
+ let waker = Waker::noop();
let mut context = Context::from_waker(&waker);
loop {
diff --git a/tests/coverage/async_block.cov-map b/tests/coverage/async_block.cov-map
new file mode 100644
index 000000000..104133f6e
--- /dev/null
+++ b/tests/coverage/async_block.cov-map
@@ -0,0 +1,32 @@
+Function name: async_block::main
+Raw bytes (38): 0x[01, 01, 02, 01, 05, 03, 05, 06, 01, 05, 01, 00, 0b, 05, 01, 09, 00, 0a, 03, 00, 0e, 00, 13, 05, 00, 14, 01, 16, 05, 07, 0a, 02, 06, 06, 03, 01, 00, 02]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 2
+- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 1 operands: lhs = Expression(0, Add), rhs = Counter(1)
+Number of file 0 mappings: 6
+- Code(Counter(0)) at (prev + 5, 1) to (start + 0, 11)
+- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 10)
+- Code(Expression(0, Add)) at (prev + 0, 14) to (start + 0, 19)
+ = (c0 + c1)
+- Code(Counter(1)) at (prev + 0, 20) to (start + 1, 22)
+- Code(Counter(1)) at (prev + 7, 10) to (start + 2, 6)
+- Code(Expression(1, Sub)) at (prev + 3, 1) to (start + 0, 2)
+ = ((c0 + c1) - c1)
+
+Function name: async_block::main::{closure#0}
+Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 07, 1c, 01, 17, 05, 01, 18, 02, 0e, 02, 02, 14, 02, 0e, 07, 03, 09, 00, 0a]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 2
+- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub)
+Number of file 0 mappings: 4
+- Code(Counter(0)) at (prev + 7, 28) to (start + 1, 23)
+- Code(Counter(1)) at (prev + 1, 24) to (start + 2, 14)
+- Code(Expression(0, Sub)) at (prev + 2, 20) to (start + 2, 14)
+ = (c0 - c1)
+- Code(Expression(1, Add)) at (prev + 3, 9) to (start + 0, 10)
+ = (c1 + (c0 - c1))
+
diff --git a/tests/coverage/async_block.coverage b/tests/coverage/async_block.coverage
new file mode 100644
index 000000000..297397ca2
--- /dev/null
+++ b/tests/coverage/async_block.coverage
@@ -0,0 +1,37 @@
+ LL| |#![feature(coverage_attribute)]
+ LL| |#![feature(noop_waker)]
+ LL| |// edition: 2021
+ LL| |
+ LL| 1|fn main() {
+ LL| 17| for i in 0..16 {
+ ^16
+ LL| 16| let future = async {
+ LL| 16| if i >= 12 {
+ LL| 4| println!("big");
+ LL| 12| } else {
+ LL| 12| println!("small");
+ LL| 12| }
+ LL| 16| };
+ LL| 16| executor::block_on(future);
+ LL| 16| }
+ LL| 1|}
+ LL| |
+ LL| |mod executor {
+ LL| | use core::future::Future;
+ LL| | use core::pin::pin;
+ LL| | use core::task::{Context, Poll, Waker};
+ LL| |
+ LL| | #[coverage(off)]
+ LL| | pub fn block_on<F: Future>(mut future: F) -> F::Output {
+ LL| | let mut future = pin!(future);
+ LL| | let waker = Waker::noop();
+ LL| | let mut context = Context::from_waker(&waker);
+ LL| |
+ LL| | loop {
+ LL| | if let Poll::Ready(val) = future.as_mut().poll(&mut context) {
+ LL| | break val;
+ LL| | }
+ LL| | }
+ LL| | }
+ LL| |}
+
diff --git a/tests/coverage/async_block.rs b/tests/coverage/async_block.rs
new file mode 100644
index 000000000..9d8647bf1
--- /dev/null
+++ b/tests/coverage/async_block.rs
@@ -0,0 +1,35 @@
+#![feature(coverage_attribute)]
+#![feature(noop_waker)]
+// edition: 2021
+
+fn main() {
+ for i in 0..16 {
+ let future = async {
+ if i >= 12 {
+ println!("big");
+ } else {
+ println!("small");
+ }
+ };
+ executor::block_on(future);
+ }
+}
+
+mod executor {
+ use core::future::Future;
+ use core::pin::pin;
+ use core::task::{Context, Poll, Waker};
+
+ #[coverage(off)]
+ pub fn block_on<F: Future>(mut future: F) -> F::Output {
+ let mut future = pin!(future);
+ let waker = Waker::noop();
+ let mut context = Context::from_waker(&waker);
+
+ loop {
+ if let Poll::Ready(val) = future.as_mut().poll(&mut context) {
+ break val;
+ }
+ }
+ }
+}
diff --git a/tests/coverage/closure_macro_async.cov-map b/tests/coverage/closure_macro_async.cov-map
index 7f8666948..14b1525ca 100644
--- a/tests/coverage/closure_macro_async.cov-map
+++ b/tests/coverage/closure_macro_async.cov-map
@@ -1,28 +1,28 @@
Function name: closure_macro_async::load_configuration_files
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 1d, 01, 02, 02]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 1e, 01, 02, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 29, 1) to (start + 2, 2)
+- Code(Counter(0)) at (prev + 30, 1) to (start + 2, 2)
Function name: closure_macro_async::test
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 21, 01, 00, 2b]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 22, 01, 00, 2b]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 33, 1) to (start + 0, 43)
+- Code(Counter(0)) at (prev + 34, 1) to (start + 0, 43)
Function name: closure_macro_async::test::{closure#0}
-Raw bytes (43): 0x[01, 01, 02, 01, 05, 05, 02, 07, 01, 21, 2b, 01, 21, 02, 02, 09, 00, 0f, 05, 00, 12, 00, 13, 02, 00, 12, 00, 13, 05, 00, 54, 00, 55, 02, 02, 09, 02, 0b, 07, 03, 01, 00, 02]
+Raw bytes (43): 0x[01, 01, 02, 01, 05, 05, 02, 07, 01, 22, 2b, 01, 21, 02, 02, 09, 00, 0f, 05, 00, 12, 00, 13, 02, 00, 12, 00, 13, 05, 00, 54, 00, 55, 02, 02, 09, 02, 0b, 07, 03, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 2
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub)
Number of file 0 mappings: 7
-- Code(Counter(0)) at (prev + 33, 43) to (start + 1, 33)
+- Code(Counter(0)) at (prev + 34, 43) to (start + 1, 33)
- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 15)
= (c0 - c1)
- Code(Counter(1)) at (prev + 0, 18) to (start + 0, 19)
@@ -35,10 +35,10 @@ Number of file 0 mappings: 7
= (c1 + (c0 - c1))
Function name: closure_macro_async::test::{closure#0}::{closure#0}
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 23, 12, 00, 54]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 24, 12, 00, 54]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 35, 18) to (start + 0, 84)
+- Code(Counter(0)) at (prev + 36, 18) to (start + 0, 84)
diff --git a/tests/coverage/closure_macro_async.coverage b/tests/coverage/closure_macro_async.coverage
index 74247f1bc..2c9bd4ac9 100644
--- a/tests/coverage/closure_macro_async.coverage
+++ b/tests/coverage/closure_macro_async.coverage
@@ -1,5 +1,6 @@
- LL| |// compile-flags: --edition=2018
LL| |#![feature(coverage_attribute)]
+ LL| |#![feature(noop_waker)]
+ LL| |// edition: 2018
LL| |
LL| |macro_rules! bail {
LL| | ($msg:literal $(,)?) => {
@@ -46,27 +47,14 @@
LL| |}
LL| |
LL| |mod executor {
- LL| | use core::{
- LL| | future::Future,
- LL| | pin::Pin,
- LL| | task::{Context, Poll, RawWaker, RawWakerVTable, Waker},
- LL| | };
+ LL| | use core::future::Future;
+ LL| | use core::pin::pin;
+ LL| | use core::task::{Context, Poll, Waker};
LL| |
LL| | #[coverage(off)]
LL| | pub fn block_on<F: Future>(mut future: F) -> F::Output {
- LL| | let mut future = unsafe { Pin::new_unchecked(&mut future) };
- LL| | use std::hint::unreachable_unchecked;
- LL| | static VTABLE: RawWakerVTable = RawWakerVTable::new(
- LL| | #[coverage(off)]
- LL| | |_| unsafe { unreachable_unchecked() }, // clone
- LL| | #[coverage(off)]
- LL| | |_| unsafe { unreachable_unchecked() }, // wake
- LL| | #[coverage(off)]
- LL| | |_| unsafe { unreachable_unchecked() }, // wake_by_ref
- LL| | #[coverage(off)]
- LL| | |_| (),
- LL| | );
- LL| | let waker = unsafe { Waker::from_raw(RawWaker::new(core::ptr::null(), &VTABLE)) };
+ LL| | let mut future = pin!(future);
+ LL| | let waker = Waker::noop();
LL| | let mut context = Context::from_waker(&waker);
LL| |
LL| | loop {
diff --git a/tests/coverage/closure_macro_async.rs b/tests/coverage/closure_macro_async.rs
index b4275599e..a7f0cabb4 100644
--- a/tests/coverage/closure_macro_async.rs
+++ b/tests/coverage/closure_macro_async.rs
@@ -1,5 +1,6 @@
-// compile-flags: --edition=2018
#![feature(coverage_attribute)]
+#![feature(noop_waker)]
+// edition: 2018
macro_rules! bail {
($msg:literal $(,)?) => {
@@ -45,27 +46,14 @@ fn main() {
}
mod executor {
- use core::{
- future::Future,
- pin::Pin,
- task::{Context, Poll, RawWaker, RawWakerVTable, Waker},
- };
+ use core::future::Future;
+ use core::pin::pin;
+ use core::task::{Context, Poll, Waker};
#[coverage(off)]
pub fn block_on<F: Future>(mut future: F) -> F::Output {
- let mut future = unsafe { Pin::new_unchecked(&mut future) };
- use std::hint::unreachable_unchecked;
- static VTABLE: RawWakerVTable = RawWakerVTable::new(
- #[coverage(off)]
- |_| unsafe { unreachable_unchecked() }, // clone
- #[coverage(off)]
- |_| unsafe { unreachable_unchecked() }, // wake
- #[coverage(off)]
- |_| unsafe { unreachable_unchecked() }, // wake_by_ref
- #[coverage(off)]
- |_| (),
- );
- let waker = unsafe { Waker::from_raw(RawWaker::new(core::ptr::null(), &VTABLE)) };
+ let mut future = pin!(future);
+ let waker = Waker::noop();
let mut context = Context::from_waker(&waker);
loop {
diff --git a/tests/coverage/conditions.cov-map b/tests/coverage/conditions.cov-map
index 7600d2d96..cfee55ed3 100644
--- a/tests/coverage/conditions.cov-map
+++ b/tests/coverage/conditions.cov-map
@@ -1,5 +1,5 @@
Function name: conditions::main
-Raw bytes (784): 0x[01, 01, 8e, 01, 09, 33, 37, 41, 3b, 3d, 35, 39, 05, 00, b7, 04, 09, 05, 00, 0d, 35, 26, 39, 0d, 35, 3b, 3d, 35, 39, 37, 41, 3b, 3d, 35, 39, b2, 04, 0d, b7, 04, 09, 05, 00, 45, 00, 83, 01, 49, 45, 00, 7e, 31, 83, 01, 49, 45, 00, 7a, 4d, 7e, 31, 83, 01, 49, 45, 00, 76, 51, 7a, 4d, 7e, 31, 83, 01, 49, 45, 00, a7, 01, 55, 4d, 51, a3, 01, 59, a7, 01, 55, 4d, 51, 49, 9f, 01, a3, 01, 59, a7, 01, 55, 4d, 51, 61, 00, e3, 01, 65, 61, 00, de, 01, 2d, e3, 01, 65, 61, 00, da, 01, 69, de, 01, 2d, e3, 01, 65, 61, 00, d6, 01, 6d, da, 01, 69, de, 01, 2d, e3, 01, 65, 61, 00, 8b, 02, 71, 69, 6d, 87, 02, 75, 8b, 02, 71, 69, 6d, ff, 01, 00, 65, 83, 02, 87, 02, 75, 8b, 02, 71, 69, 6d, 7d, eb, 03, ef, 03, 8d, 01, f3, 03, 89, 01, 81, 01, 85, 01, 79, 00, d7, 02, 7d, 79, 00, d2, 02, 29, d7, 02, 7d, 79, 00, ce, 02, 81, 01, d2, 02, 29, d7, 02, 7d, 79, 00, ca, 02, 85, 01, ce, 02, 81, 01, d2, 02, 29, d7, 02, 7d, 79, 00, f3, 03, 89, 01, 81, 01, 85, 01, ef, 03, 8d, 01, f3, 03, 89, 01, 81, 01, 85, 01, 11, 93, 04, 97, 04, 21, 9b, 04, 1d, 15, 19, 7d, eb, 03, ef, 03, 8d, 01, f3, 03, 89, 01, 81, 01, 85, 01, e7, 03, 11, 7d, eb, 03, ef, 03, 8d, 01, f3, 03, 89, 01, 81, 01, 85, 01, e2, 03, 25, e7, 03, 11, 7d, eb, 03, ef, 03, 8d, 01, f3, 03, 89, 01, 81, 01, 85, 01, de, 03, 15, e2, 03, 25, e7, 03, 11, 7d, eb, 03, ef, 03, 8d, 01, f3, 03, 89, 01, 81, 01, 85, 01, da, 03, 19, de, 03, 15, e2, 03, 25, e7, 03, 11, 7d, eb, 03, ef, 03, 8d, 01, f3, 03, 89, 01, 81, 01, 85, 01, 9b, 04, 1d, 15, 19, 97, 04, 21, 9b, 04, 1d, 15, 19, 8f, 04, 9f, 04, 11, 93, 04, 97, 04, 21, 9b, 04, 1d, 15, 19, a3, 04, ae, 04, a7, 04, ab, 04, 25, 29, 2d, 31, b2, 04, 0d, b7, 04, 09, 05, 00, 44, 01, 03, 01, 02, 0c, 05, 02, 0d, 02, 06, 00, 02, 06, 00, 07, 03, 03, 09, 00, 0a, b7, 04, 00, 10, 00, 1d, 09, 01, 09, 01, 0a, b2, 04, 02, 0f, 00, 1c, 0d, 01, 0c, 00, 19, 26, 00, 1d, 00, 2a, 22, 00, 2e, 00, 3c, 37, 00, 3d, 02, 0a, 41, 02, 0a, 00, 0b, 33, 01, 09, 01, 12, ae, 04, 03, 09, 00, 0f, 03, 03, 09, 01, 0c, 45, 01, 0d, 02, 06, 00, 02, 06, 00, 07, 83, 01, 02, 08, 00, 15, 49, 00, 16, 02, 06, 7e, 02, 0f, 00, 1c, 7a, 01, 0c, 00, 19, 76, 00, 1d, 00, 2a, 72, 00, 2e, 00, 3c, a3, 01, 00, 3d, 02, 0a, 59, 02, 0a, 00, 0b, 9f, 01, 01, 09, 00, 17, 31, 02, 09, 00, 0f, 9b, 01, 03, 08, 00, 0c, 5d, 01, 0d, 01, 10, 61, 01, 11, 02, 0a, 00, 02, 0a, 00, 0b, e3, 01, 02, 0c, 00, 19, 65, 00, 1a, 02, 0a, de, 01, 03, 11, 00, 1e, da, 01, 01, 10, 00, 1d, d6, 01, 00, 21, 00, 2e, d2, 01, 00, 32, 00, 40, 87, 02, 00, 41, 02, 0e, 75, 02, 0e, 00, 0f, 83, 02, 01, 0d, 00, 1b, 2d, 02, 0d, 00, 13, 00, 02, 06, 00, 07, fb, 01, 02, 09, 01, 0c, 79, 01, 0d, 02, 06, 00, 02, 06, 00, 07, e7, 03, 02, 09, 00, 0a, d7, 02, 00, 10, 00, 1d, 7d, 00, 1e, 02, 06, d2, 02, 02, 0f, 00, 1c, ce, 02, 01, 0c, 00, 19, ca, 02, 00, 1d, 00, 2a, c6, 02, 00, 2e, 00, 3c, ef, 03, 00, 3d, 02, 0a, 8d, 01, 02, 0a, 00, 0b, eb, 03, 01, 09, 00, 17, 29, 02, 0d, 02, 0f, 8f, 04, 05, 09, 00, 0a, e7, 03, 00, 10, 00, 1d, 11, 00, 1e, 02, 06, e2, 03, 02, 0f, 00, 1c, de, 03, 01, 0c, 00, 19, da, 03, 00, 1d, 00, 2a, d6, 03, 00, 2e, 00, 3c, 97, 04, 00, 3d, 02, 0a, 21, 02, 0a, 00, 0b, 93, 04, 01, 09, 00, 17, 25, 02, 09, 00, 0f, 8b, 04, 02, 01, 00, 02]
+Raw bytes (784): 0x[01, 01, 8e, 01, 09, 33, 37, 41, 3b, 3d, 35, 39, 05, 00, b7, 04, 09, 05, 00, 0d, 35, 26, 39, 0d, 35, 3b, 3d, 35, 39, 37, 41, 3b, 3d, 35, 39, b2, 04, 0d, b7, 04, 09, 05, 00, 45, 00, 83, 01, 49, 45, 00, 7e, 31, 83, 01, 49, 45, 00, 7a, 4d, 7e, 31, 83, 01, 49, 45, 00, 76, 51, 7a, 4d, 7e, 31, 83, 01, 49, 45, 00, a7, 01, 55, 4d, 51, a3, 01, 59, a7, 01, 55, 4d, 51, 49, 9f, 01, a3, 01, 59, a7, 01, 55, 4d, 51, 61, 00, e3, 01, 65, 61, 00, de, 01, 2d, e3, 01, 65, 61, 00, da, 01, 69, de, 01, 2d, e3, 01, 65, 61, 00, d6, 01, 6d, da, 01, 69, de, 01, 2d, e3, 01, 65, 61, 00, 8b, 02, 71, 69, 6d, 87, 02, 75, 8b, 02, 71, 69, 6d, ff, 01, 00, 65, 83, 02, 87, 02, 75, 8b, 02, 71, 69, 6d, 7d, eb, 03, ef, 03, 8d, 01, f3, 03, 89, 01, 81, 01, 85, 01, 79, 00, d7, 02, 7d, 79, 00, d2, 02, 29, d7, 02, 7d, 79, 00, ce, 02, 81, 01, d2, 02, 29, d7, 02, 7d, 79, 00, ca, 02, 85, 01, ce, 02, 81, 01, d2, 02, 29, d7, 02, 7d, 79, 00, f3, 03, 89, 01, 81, 01, 85, 01, ef, 03, 8d, 01, f3, 03, 89, 01, 81, 01, 85, 01, 11, 93, 04, 97, 04, 21, 9b, 04, 1d, 15, 19, 7d, eb, 03, ef, 03, 8d, 01, f3, 03, 89, 01, 81, 01, 85, 01, e7, 03, 11, 7d, eb, 03, ef, 03, 8d, 01, f3, 03, 89, 01, 81, 01, 85, 01, e2, 03, 25, e7, 03, 11, 7d, eb, 03, ef, 03, 8d, 01, f3, 03, 89, 01, 81, 01, 85, 01, de, 03, 15, e2, 03, 25, e7, 03, 11, 7d, eb, 03, ef, 03, 8d, 01, f3, 03, 89, 01, 81, 01, 85, 01, da, 03, 19, de, 03, 15, e2, 03, 25, e7, 03, 11, 7d, eb, 03, ef, 03, 8d, 01, f3, 03, 89, 01, 81, 01, 85, 01, 9b, 04, 1d, 15, 19, 97, 04, 21, 9b, 04, 1d, 15, 19, 8f, 04, 9f, 04, 11, 93, 04, 97, 04, 21, 9b, 04, 1d, 15, 19, a3, 04, ae, 04, a7, 04, 31, ab, 04, 2d, 25, 29, b2, 04, 0d, b7, 04, 09, 05, 00, 44, 01, 03, 01, 02, 0c, 05, 02, 0d, 02, 06, 00, 02, 06, 00, 07, 03, 03, 09, 00, 0a, b7, 04, 00, 10, 00, 1d, 09, 01, 09, 01, 0a, b2, 04, 02, 0f, 00, 1c, 0d, 01, 0c, 00, 19, 26, 00, 1d, 00, 2a, 22, 00, 2e, 00, 3c, 37, 00, 3d, 02, 0a, 41, 02, 0a, 00, 0b, 33, 01, 09, 01, 12, ae, 04, 03, 09, 00, 0f, 03, 03, 09, 01, 0c, 45, 01, 0d, 02, 06, 00, 02, 06, 00, 07, 83, 01, 02, 08, 00, 15, 49, 00, 16, 02, 06, 7e, 02, 0f, 00, 1c, 7a, 01, 0c, 00, 19, 76, 00, 1d, 00, 2a, 72, 00, 2e, 00, 3c, a3, 01, 00, 3d, 02, 0a, 59, 02, 0a, 00, 0b, 9f, 01, 01, 09, 00, 17, 31, 02, 09, 00, 0f, 9b, 01, 03, 08, 00, 0c, 5d, 01, 0d, 01, 10, 61, 01, 11, 02, 0a, 00, 02, 0a, 00, 0b, e3, 01, 02, 0c, 00, 19, 65, 00, 1a, 02, 0a, de, 01, 03, 11, 00, 1e, da, 01, 01, 10, 00, 1d, d6, 01, 00, 21, 00, 2e, d2, 01, 00, 32, 00, 40, 87, 02, 00, 41, 02, 0e, 75, 02, 0e, 00, 0f, 83, 02, 01, 0d, 00, 1b, 2d, 02, 0d, 00, 13, 00, 02, 06, 00, 07, fb, 01, 02, 09, 01, 0c, 79, 01, 0d, 02, 06, 00, 02, 06, 00, 07, e7, 03, 02, 09, 00, 0a, d7, 02, 00, 10, 00, 1d, 7d, 00, 1e, 02, 06, d2, 02, 02, 0f, 00, 1c, ce, 02, 01, 0c, 00, 19, ca, 02, 00, 1d, 00, 2a, c6, 02, 00, 2e, 00, 3c, ef, 03, 00, 3d, 02, 0a, 8d, 01, 02, 0a, 00, 0b, eb, 03, 01, 09, 00, 17, 29, 02, 0d, 02, 0f, 8f, 04, 05, 09, 00, 0a, e7, 03, 00, 10, 00, 1d, 11, 00, 1e, 02, 06, e2, 03, 02, 0f, 00, 1c, de, 03, 01, 0c, 00, 19, da, 03, 00, 1d, 00, 2a, d6, 03, 00, 2e, 00, 3c, 97, 04, 00, 3d, 02, 0a, 21, 02, 0a, 00, 0b, 93, 04, 01, 09, 00, 17, 25, 02, 09, 00, 0f, 8b, 04, 02, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 142
@@ -139,9 +139,9 @@ Number of expressions: 142
- expression 133 operands: lhs = Expression(134, Add), rhs = Counter(7)
- expression 134 operands: lhs = Counter(5), rhs = Counter(6)
- expression 135 operands: lhs = Expression(136, Add), rhs = Expression(139, Sub)
-- expression 136 operands: lhs = Expression(137, Add), rhs = Expression(138, Add)
-- expression 137 operands: lhs = Counter(9), rhs = Counter(10)
-- expression 138 operands: lhs = Counter(11), rhs = Counter(12)
+- expression 136 operands: lhs = Expression(137, Add), rhs = Counter(12)
+- expression 137 operands: lhs = Expression(138, Add), rhs = Counter(11)
+- expression 138 operands: lhs = Counter(9), rhs = Counter(10)
- expression 139 operands: lhs = Expression(140, Sub), rhs = Counter(3)
- expression 140 operands: lhs = Expression(141, Add), rhs = Counter(2)
- expression 141 operands: lhs = Counter(1), rhs = Zero
@@ -255,5 +255,5 @@ Number of file 0 mappings: 68
= (((c5 + c6) + c7) + c8)
- Code(Counter(9)) at (prev + 2, 9) to (start + 0, 15)
- Code(Expression(130, Add)) at (prev + 2, 1) to (start + 0, 2)
- = ((c4 + (((c5 + c6) + c7) + c8)) + (((c9 + c10) + (c11 + c12)) + (((c1 + Zero) - c2) - c3)))
+ = ((c4 + (((c5 + c6) + c7) + c8)) + ((((c9 + c10) + c11) + c12) + (((c1 + Zero) - c2) - c3)))
diff --git a/tests/coverage/continue.cov-map b/tests/coverage/continue.cov-map
index 82f3d7c60..810694d7f 100644
--- a/tests/coverage/continue.cov-map
+++ b/tests/coverage/continue.cov-map
@@ -1,26 +1,26 @@
Function name: continue::main
-Raw bytes (210): 0x[01, 01, 1c, 01, 07, 05, 09, 03, 0d, 0d, 1f, 11, 15, 1b, 19, 0d, 1f, 11, 15, 19, 33, 1d, 21, 2f, 25, 19, 33, 1d, 21, 25, 47, 29, 2d, 43, 31, 25, 47, 29, 2d, 31, 5f, 35, 39, 57, 3d, 31, 5f, 35, 39, 35, 39, 3d, 41, 6b, 45, 3d, 41, 49, 45, 1e, 01, 03, 01, 03, 12, 03, 04, 0e, 00, 13, 0a, 01, 0f, 00, 16, 05, 02, 11, 00, 19, 09, 02, 12, 04, 0e, 1b, 06, 0e, 00, 13, 16, 01, 0f, 00, 16, 15, 01, 16, 02, 0e, 11, 04, 11, 00, 19, 15, 03, 09, 00, 0e, 2f, 02, 0e, 00, 13, 2a, 01, 0f, 00, 16, 1d, 01, 15, 02, 0e, 21, 04, 11, 00, 19, 1d, 03, 09, 00, 0e, 43, 02, 0e, 00, 13, 3e, 01, 0c, 00, 13, 29, 01, 0d, 00, 15, 2d, 01, 0a, 01, 0e, 57, 03, 0e, 00, 13, 52, 01, 0f, 00, 16, 39, 01, 16, 02, 0e, 35, 03, 12, 02, 0e, 5f, 04, 09, 00, 0e, 6b, 02, 0e, 00, 13, 66, 01, 0f, 00, 16, 41, 01, 16, 02, 0e, 49, 04, 11, 00, 16, 41, 03, 09, 00, 0e, 6f, 02, 0d, 01, 02]
+Raw bytes (210): 0x[01, 01, 1c, 07, 09, 01, 05, 03, 0d, 1f, 15, 0d, 11, 1b, 19, 1f, 15, 0d, 11, 33, 21, 19, 1d, 2f, 25, 33, 21, 19, 1d, 47, 2d, 25, 29, 43, 31, 47, 2d, 25, 29, 31, 5f, 35, 39, 57, 3d, 31, 5f, 35, 39, 35, 39, 3d, 41, 6b, 45, 3d, 41, 49, 45, 1e, 01, 03, 01, 03, 12, 03, 04, 0e, 00, 13, 0a, 01, 0f, 00, 16, 05, 02, 11, 00, 19, 09, 02, 12, 04, 0e, 1b, 06, 0e, 00, 13, 16, 01, 0f, 00, 16, 15, 01, 16, 02, 0e, 11, 04, 11, 00, 19, 15, 03, 09, 00, 0e, 2f, 02, 0e, 00, 13, 2a, 01, 0f, 00, 16, 1d, 01, 15, 02, 0e, 21, 04, 11, 00, 19, 1d, 03, 09, 00, 0e, 43, 02, 0e, 00, 13, 3e, 01, 0c, 00, 13, 29, 01, 0d, 00, 15, 2d, 01, 0a, 01, 0e, 57, 03, 0e, 00, 13, 52, 01, 0f, 00, 16, 39, 01, 16, 02, 0e, 35, 03, 12, 02, 0e, 5f, 04, 09, 00, 0e, 6b, 02, 0e, 00, 13, 66, 01, 0f, 00, 16, 41, 01, 16, 02, 0e, 49, 04, 11, 00, 16, 41, 03, 09, 00, 0e, 6f, 02, 0d, 01, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 28
-- expression 0 operands: lhs = Counter(0), rhs = Expression(1, Add)
-- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(2)
+- expression 1 operands: lhs = Counter(0), rhs = Counter(1)
- expression 2 operands: lhs = Expression(0, Add), rhs = Counter(3)
-- expression 3 operands: lhs = Counter(3), rhs = Expression(7, Add)
-- expression 4 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 3 operands: lhs = Expression(7, Add), rhs = Counter(5)
+- expression 4 operands: lhs = Counter(3), rhs = Counter(4)
- expression 5 operands: lhs = Expression(6, Add), rhs = Counter(6)
-- expression 6 operands: lhs = Counter(3), rhs = Expression(7, Add)
-- expression 7 operands: lhs = Counter(4), rhs = Counter(5)
-- expression 8 operands: lhs = Counter(6), rhs = Expression(12, Add)
-- expression 9 operands: lhs = Counter(7), rhs = Counter(8)
+- expression 6 operands: lhs = Expression(7, Add), rhs = Counter(5)
+- expression 7 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 8 operands: lhs = Expression(12, Add), rhs = Counter(8)
+- expression 9 operands: lhs = Counter(6), rhs = Counter(7)
- expression 10 operands: lhs = Expression(11, Add), rhs = Counter(9)
-- expression 11 operands: lhs = Counter(6), rhs = Expression(12, Add)
-- expression 12 operands: lhs = Counter(7), rhs = Counter(8)
-- expression 13 operands: lhs = Counter(9), rhs = Expression(17, Add)
-- expression 14 operands: lhs = Counter(10), rhs = Counter(11)
+- expression 11 operands: lhs = Expression(12, Add), rhs = Counter(8)
+- expression 12 operands: lhs = Counter(6), rhs = Counter(7)
+- expression 13 operands: lhs = Expression(17, Add), rhs = Counter(11)
+- expression 14 operands: lhs = Counter(9), rhs = Counter(10)
- expression 15 operands: lhs = Expression(16, Add), rhs = Counter(12)
-- expression 16 operands: lhs = Counter(9), rhs = Expression(17, Add)
-- expression 17 operands: lhs = Counter(10), rhs = Counter(11)
+- expression 16 operands: lhs = Expression(17, Add), rhs = Counter(11)
+- expression 17 operands: lhs = Counter(9), rhs = Counter(10)
- expression 18 operands: lhs = Counter(12), rhs = Expression(23, Add)
- expression 19 operands: lhs = Counter(13), rhs = Counter(14)
- expression 20 operands: lhs = Expression(21, Add), rhs = Counter(15)
@@ -34,29 +34,29 @@ Number of expressions: 28
Number of file 0 mappings: 30
- Code(Counter(0)) at (prev + 3, 1) to (start + 3, 18)
- Code(Expression(0, Add)) at (prev + 4, 14) to (start + 0, 19)
- = (c0 + (c1 + c2))
+ = ((c0 + c1) + c2)
- Code(Expression(2, Sub)) at (prev + 1, 15) to (start + 0, 22)
- = ((c0 + (c1 + c2)) - c3)
+ = (((c0 + c1) + c2) - c3)
- Code(Counter(1)) at (prev + 2, 17) to (start + 0, 25)
- Code(Counter(2)) at (prev + 2, 18) to (start + 4, 14)
- Code(Expression(6, Add)) at (prev + 6, 14) to (start + 0, 19)
- = (c3 + (c4 + c5))
+ = ((c3 + c4) + c5)
- Code(Expression(5, Sub)) at (prev + 1, 15) to (start + 0, 22)
- = ((c3 + (c4 + c5)) - c6)
+ = (((c3 + c4) + c5) - c6)
- Code(Counter(5)) at (prev + 1, 22) to (start + 2, 14)
- Code(Counter(4)) at (prev + 4, 17) to (start + 0, 25)
- Code(Counter(5)) at (prev + 3, 9) to (start + 0, 14)
- Code(Expression(11, Add)) at (prev + 2, 14) to (start + 0, 19)
- = (c6 + (c7 + c8))
+ = ((c6 + c7) + c8)
- Code(Expression(10, Sub)) at (prev + 1, 15) to (start + 0, 22)
- = ((c6 + (c7 + c8)) - c9)
+ = (((c6 + c7) + c8) - c9)
- Code(Counter(7)) at (prev + 1, 21) to (start + 2, 14)
- Code(Counter(8)) at (prev + 4, 17) to (start + 0, 25)
- Code(Counter(7)) at (prev + 3, 9) to (start + 0, 14)
- Code(Expression(16, Add)) at (prev + 2, 14) to (start + 0, 19)
- = (c9 + (c10 + c11))
+ = ((c9 + c10) + c11)
- Code(Expression(15, Sub)) at (prev + 1, 12) to (start + 0, 19)
- = ((c9 + (c10 + c11)) - c12)
+ = (((c9 + c10) + c11) - c12)
- Code(Counter(10)) at (prev + 1, 13) to (start + 0, 21)
- Code(Counter(11)) at (prev + 1, 10) to (start + 1, 14)
- Code(Expression(21, Add)) at (prev + 3, 14) to (start + 0, 19)
diff --git a/tests/coverage/coroutine.cov-map b/tests/coverage/coroutine.cov-map
index 2f4936d9a..8dd03acc2 100644
--- a/tests/coverage/coroutine.cov-map
+++ b/tests/coverage/coroutine.cov-map
@@ -14,12 +14,12 @@ Number of file 0 mappings: 4
= (c1 + (c0 - c1))
Function name: coroutine::main
-Raw bytes (65): 0x[01, 01, 08, 05, 07, 09, 0d, 11, 15, 1e, 19, 11, 15, 15, 19, 1e, 19, 11, 15, 09, 01, 0f, 01, 02, 16, 01, 07, 0b, 00, 2e, 11, 01, 2b, 00, 2d, 03, 01, 0e, 00, 35, 11, 02, 0b, 00, 2e, 1e, 01, 22, 00, 27, 1a, 00, 2c, 00, 2e, 17, 01, 0e, 00, 35, 1a, 02, 01, 00, 02]
+Raw bytes (65): 0x[01, 01, 08, 07, 0d, 05, 09, 11, 15, 1e, 19, 11, 15, 15, 19, 1e, 19, 11, 15, 09, 01, 0f, 01, 02, 16, 01, 07, 0b, 00, 2e, 11, 01, 2b, 00, 2d, 03, 01, 0e, 00, 35, 11, 02, 0b, 00, 2e, 1e, 01, 22, 00, 27, 1a, 00, 2c, 00, 2e, 17, 01, 0e, 00, 35, 1a, 02, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 8
-- expression 0 operands: lhs = Counter(1), rhs = Expression(1, Add)
-- expression 1 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(3)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
- expression 2 operands: lhs = Counter(4), rhs = Counter(5)
- expression 3 operands: lhs = Expression(7, Sub), rhs = Counter(6)
- expression 4 operands: lhs = Counter(4), rhs = Counter(5)
@@ -31,7 +31,7 @@ Number of file 0 mappings: 9
- Code(Counter(0)) at (prev + 7, 11) to (start + 0, 46)
- Code(Counter(4)) at (prev + 1, 43) to (start + 0, 45)
- Code(Expression(0, Add)) at (prev + 1, 14) to (start + 0, 53)
- = (c1 + (c2 + c3))
+ = ((c1 + c2) + c3)
- Code(Counter(4)) at (prev + 2, 11) to (start + 0, 46)
- Code(Expression(7, Sub)) at (prev + 1, 34) to (start + 0, 39)
= (c4 - c5)
diff --git a/tests/coverage/if_not.cov-map b/tests/coverage/if_not.cov-map
new file mode 100644
index 000000000..fb893e379
--- /dev/null
+++ b/tests/coverage/if_not.cov-map
@@ -0,0 +1,39 @@
+Function name: if_not::if_not
+Raw bytes (86): 0x[01, 01, 10, 01, 05, 05, 02, 3f, 09, 05, 02, 09, 3a, 3f, 09, 05, 02, 37, 0d, 09, 3a, 3f, 09, 05, 02, 0d, 32, 37, 0d, 09, 3a, 3f, 09, 05, 02, 0a, 01, 04, 01, 03, 0d, 02, 04, 05, 02, 06, 05, 02, 06, 00, 07, 3f, 03, 09, 01, 0d, 3a, 02, 05, 02, 06, 09, 02, 06, 00, 07, 37, 03, 09, 01, 0d, 32, 02, 05, 02, 06, 0d, 02, 0c, 02, 06, 2f, 03, 01, 00, 02]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 16
+- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub)
+- expression 2 operands: lhs = Expression(15, Add), rhs = Counter(2)
+- expression 3 operands: lhs = Counter(1), rhs = Expression(0, Sub)
+- expression 4 operands: lhs = Counter(2), rhs = Expression(14, Sub)
+- expression 5 operands: lhs = Expression(15, Add), rhs = Counter(2)
+- expression 6 operands: lhs = Counter(1), rhs = Expression(0, Sub)
+- expression 7 operands: lhs = Expression(13, Add), rhs = Counter(3)
+- expression 8 operands: lhs = Counter(2), rhs = Expression(14, Sub)
+- expression 9 operands: lhs = Expression(15, Add), rhs = Counter(2)
+- expression 10 operands: lhs = Counter(1), rhs = Expression(0, Sub)
+- expression 11 operands: lhs = Counter(3), rhs = Expression(12, Sub)
+- expression 12 operands: lhs = Expression(13, Add), rhs = Counter(3)
+- expression 13 operands: lhs = Counter(2), rhs = Expression(14, Sub)
+- expression 14 operands: lhs = Expression(15, Add), rhs = Counter(2)
+- expression 15 operands: lhs = Counter(1), rhs = Expression(0, Sub)
+Number of file 0 mappings: 10
+- Code(Counter(0)) at (prev + 4, 1) to (start + 3, 13)
+- Code(Expression(0, Sub)) at (prev + 4, 5) to (start + 2, 6)
+ = (c0 - c1)
+- Code(Counter(1)) at (prev + 2, 6) to (start + 0, 7)
+- Code(Expression(15, Add)) at (prev + 3, 9) to (start + 1, 13)
+ = (c1 + (c0 - c1))
+- Code(Expression(14, Sub)) at (prev + 2, 5) to (start + 2, 6)
+ = ((c1 + (c0 - c1)) - c2)
+- Code(Counter(2)) at (prev + 2, 6) to (start + 0, 7)
+- Code(Expression(13, Add)) at (prev + 3, 9) to (start + 1, 13)
+ = (c2 + ((c1 + (c0 - c1)) - c2))
+- Code(Expression(12, Sub)) at (prev + 2, 5) to (start + 2, 6)
+ = ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)
+- Code(Counter(3)) at (prev + 2, 12) to (start + 2, 6)
+- Code(Expression(11, Add)) at (prev + 3, 1) to (start + 0, 2)
+ = (c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3))
+
diff --git a/tests/coverage/if_not.coverage b/tests/coverage/if_not.coverage
new file mode 100644
index 000000000..41838b851
--- /dev/null
+++ b/tests/coverage/if_not.coverage
@@ -0,0 +1,38 @@
+ LL| |#![feature(coverage_attribute)]
+ LL| |// edition: 2021
+ LL| |
+ LL| 12|fn if_not(cond: bool) {
+ LL| 12| if
+ LL| 12| !
+ LL| 12| cond
+ LL| 4| {
+ LL| 4| println!("cond was false");
+ LL| 8| }
+ LL| |
+ LL| | if
+ LL| 12| !
+ LL| 12| cond
+ LL| 4| {
+ LL| 4| println!("cond was false");
+ LL| 8| }
+ LL| |
+ LL| | if
+ LL| 12| !
+ LL| 12| cond
+ LL| 4| {
+ LL| 4| println!("cond was false");
+ LL| 8| } else {
+ LL| 8| println!("cond was true");
+ LL| 8| }
+ LL| 12|}
+ LL| |
+ LL| |#[coverage(off)]
+ LL| |fn main() {
+ LL| | for _ in 0..8 {
+ LL| | if_not(std::hint::black_box(true));
+ LL| | }
+ LL| | for _ in 0..4 {
+ LL| | if_not(std::hint::black_box(false));
+ LL| | }
+ LL| |}
+
diff --git a/tests/coverage/if_not.rs b/tests/coverage/if_not.rs
new file mode 100644
index 000000000..4f45ae0b3
--- /dev/null
+++ b/tests/coverage/if_not.rs
@@ -0,0 +1,37 @@
+#![feature(coverage_attribute)]
+// edition: 2021
+
+fn if_not(cond: bool) {
+ if
+ !
+ cond
+ {
+ println!("cond was false");
+ }
+
+ if
+ !
+ cond
+ {
+ println!("cond was false");
+ }
+
+ if
+ !
+ cond
+ {
+ println!("cond was false");
+ } else {
+ println!("cond was true");
+ }
+}
+
+#[coverage(off)]
+fn main() {
+ for _ in 0..8 {
+ if_not(std::hint::black_box(true));
+ }
+ for _ in 0..4 {
+ if_not(std::hint::black_box(false));
+ }
+}
diff --git a/tests/coverage/inline.cov-map b/tests/coverage/inline.cov-map
index 72b10fd0c..001c333ae 100644
--- a/tests/coverage/inline.cov-map
+++ b/tests/coverage/inline.cov-map
@@ -15,12 +15,12 @@ Number of file 0 mappings: 5
= ((c0 + c1) - c1)
Function name: inline::error
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 31, 01, 02, 02]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 31, 01, 01, 14]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 49, 1) to (start + 2, 2)
+- Code(Counter(0)) at (prev + 49, 1) to (start + 1, 20)
Function name: inline::length::<char>
Raw bytes (9): 0x[01, 01, 00, 01, 01, 1e, 01, 02, 02]
diff --git a/tests/coverage/inline.coverage b/tests/coverage/inline.coverage
index 6efd9a083..68a2e4083 100644
--- a/tests/coverage/inline.coverage
+++ b/tests/coverage/inline.coverage
@@ -50,5 +50,5 @@
LL| |#[inline(always)]
LL| 0|fn error() {
LL| 0| panic!("error");
- LL| 0|}
+ LL| |}
diff --git a/tests/coverage/lazy_boolean.cov-map b/tests/coverage/lazy_boolean.cov-map
index 0ad393c40..2d1ff24e6 100644
--- a/tests/coverage/lazy_boolean.cov-map
+++ b/tests/coverage/lazy_boolean.cov-map
@@ -1,5 +1,5 @@
Function name: lazy_boolean::main
-Raw bytes (636): 0x[01, 01, a4, 01, 01, 05, 09, 8a, 05, 8f, 05, 09, 05, 02, 05, 02, 8f, 05, 09, 05, 02, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 09, 8a, 05, 8f, 05, 09, 05, 02, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 19, ea, 04, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, e7, 04, 1d, 19, ea, 04, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 1d, e2, 04, e7, 04, 1d, 19, ea, 04, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, df, 04, 21, 1d, e2, 04, e7, 04, 1d, 19, ea, 04, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 21, da, 04, df, 04, 21, 1d, e2, 04, e7, 04, 1d, 19, ea, 04, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, d7, 04, 25, 21, da, 04, df, 04, 21, 1d, e2, 04, e7, 04, 1d, 19, ea, 04, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 25, d2, 04, d7, 04, 25, 21, da, 04, df, 04, 21, 1d, e2, 04, e7, 04, 1d, 19, ea, 04, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 1c, 01, 03, 01, 07, 0f, 05, 07, 10, 04, 06, 02, 04, 06, 00, 07, 87, 05, 02, 09, 00, 11, 8f, 05, 02, 0d, 00, 12, 8a, 05, 02, 0d, 00, 12, ff, 04, 03, 09, 00, 11, 87, 05, 02, 0d, 00, 12, 82, 05, 02, 0d, 00, 12, f7, 04, 02, 09, 00, 11, ff, 04, 00, 14, 00, 19, 11, 00, 1d, 00, 22, ef, 04, 01, 09, 00, 11, f7, 04, 00, 14, 00, 19, 15, 00, 1d, 00, 22, ef, 04, 04, 09, 00, 10, ea, 04, 01, 05, 03, 06, 19, 03, 06, 00, 07, e7, 04, 03, 09, 00, 10, 1d, 01, 05, 03, 06, e2, 04, 05, 05, 03, 06, df, 04, 05, 09, 00, 10, da, 04, 00, 11, 02, 06, 21, 02, 06, 00, 07, d7, 04, 02, 08, 00, 0f, 25, 00, 10, 02, 06, d2, 04, 02, 0c, 02, 06, cf, 04, 03, 01, 00, 02]
+Raw bytes (636): 0x[01, 01, a4, 01, 01, 05, 09, 8a, 05, 8f, 05, 09, 05, 02, 05, 02, 8f, 05, 09, 05, 02, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 09, 8a, 05, 8f, 05, 09, 05, 02, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 19, ea, 04, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, e7, 04, 1d, 19, ea, 04, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 1d, e2, 04, e7, 04, 1d, 19, ea, 04, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, df, 04, 21, 1d, e2, 04, e7, 04, 1d, 19, ea, 04, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 21, da, 04, df, 04, 21, 1d, e2, 04, e7, 04, 1d, 19, ea, 04, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, d7, 04, 25, 21, da, 04, df, 04, 21, 1d, e2, 04, e7, 04, 1d, 19, ea, 04, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 25, d2, 04, d7, 04, 25, 21, da, 04, df, 04, 21, 1d, e2, 04, e7, 04, 1d, 19, ea, 04, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 1c, 01, 03, 01, 07, 0f, 05, 07, 10, 04, 06, 02, 04, 06, 00, 07, 87, 05, 02, 09, 00, 11, 8f, 05, 02, 0d, 00, 12, 8a, 05, 02, 0d, 00, 12, ff, 04, 03, 09, 00, 11, 87, 05, 02, 0d, 00, 12, 82, 05, 02, 0d, 00, 12, f7, 04, 02, 09, 00, 11, ff, 04, 00, 14, 00, 19, 11, 00, 1d, 00, 22, ef, 04, 01, 09, 00, 11, f7, 04, 00, 14, 00, 19, 15, 00, 1d, 00, 22, ef, 04, 03, 09, 01, 10, ea, 04, 02, 05, 03, 06, 19, 03, 06, 00, 07, e7, 04, 03, 09, 00, 10, 1d, 01, 05, 03, 06, e2, 04, 05, 05, 03, 06, df, 04, 05, 08, 00, 10, da, 04, 00, 11, 02, 06, 21, 02, 06, 00, 07, d7, 04, 02, 08, 00, 0f, 25, 00, 10, 02, 06, d2, 04, 02, 0c, 02, 06, cf, 04, 03, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 164
@@ -194,9 +194,9 @@ Number of file 0 mappings: 28
- Code(Expression(157, Add)) at (prev + 0, 20) to (start + 0, 25)
= (c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4))
- Code(Counter(5)) at (prev + 0, 29) to (start + 0, 34)
-- Code(Expression(155, Add)) at (prev + 4, 9) to (start + 0, 16)
+- Code(Expression(155, Add)) at (prev + 3, 9) to (start + 1, 16)
= (c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5))
-- Code(Expression(154, Sub)) at (prev + 1, 5) to (start + 3, 6)
+- Code(Expression(154, Sub)) at (prev + 2, 5) to (start + 3, 6)
= ((c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) - c6)
- Code(Counter(6)) at (prev + 3, 6) to (start + 0, 7)
- Code(Expression(153, Add)) at (prev + 3, 9) to (start + 0, 16)
@@ -204,7 +204,7 @@ Number of file 0 mappings: 28
- Code(Counter(7)) at (prev + 1, 5) to (start + 3, 6)
- Code(Expression(152, Sub)) at (prev + 5, 5) to (start + 3, 6)
= ((c6 + ((c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) - c6)) - c7)
-- Code(Expression(151, Add)) at (prev + 5, 9) to (start + 0, 16)
+- Code(Expression(151, Add)) at (prev + 5, 8) to (start + 0, 16)
= (c7 + ((c6 + ((c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) - c6)) - c7))
- Code(Expression(150, Sub)) at (prev + 0, 17) to (start + 2, 6)
= ((c7 + ((c6 + ((c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) - c6)) - c7)) - c8)
diff --git a/tests/coverage/lazy_boolean.coverage b/tests/coverage/lazy_boolean.coverage
index 8f14082ef..2d927a083 100644
--- a/tests/coverage/lazy_boolean.coverage
+++ b/tests/coverage/lazy_boolean.coverage
@@ -32,7 +32,7 @@
^0
LL| |
LL| | if
- LL| | !
+ LL| 1| !
LL| 1| is_true
LL| 0| {
LL| 0| a = 2
diff --git a/tests/coverage/loops_branches.cov-map b/tests/coverage/loops_branches.cov-map
index 813583a9d..8dc353211 100644
--- a/tests/coverage/loops_branches.cov-map
+++ b/tests/coverage/loops_branches.cov-map
@@ -1,5 +1,5 @@
Function name: <loops_branches::DebugTest as core::fmt::Debug>::fmt
-Raw bytes (249): 0x[01, 01, 31, 05, 00, 00, 02, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, bf, 01, c3, 01, 0d, 00, 11, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, b6, 01, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, b2, 01, 00, b6, 01, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, 00, ae, 01, b2, 01, 00, b6, 01, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, ab, 01, 11, 00, ae, 01, b2, 01, 00, b6, 01, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, 25, a3, 01, a6, 01, 19, ab, 01, 11, 00, ae, 01, b2, 01, 00, b6, 01, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, 14, 01, 09, 05, 01, 10, 05, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 02, 01, 0e, 00, 0f, 07, 01, 0d, 00, 1e, 25, 00, 1e, 00, 1f, 00, 01, 10, 01, 0a, b6, 01, 03, 0d, 00, 0e, bb, 01, 00, 12, 00, 17, b6, 01, 01, 10, 00, 14, b2, 01, 01, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, ae, 01, 01, 12, 00, 13, ab, 01, 01, 11, 00, 22, a6, 01, 00, 22, 00, 23, 00, 01, 14, 01, 0e, 19, 03, 09, 00, 0f, 9f, 01, 01, 05, 00, 06]
+Raw bytes (249): 0x[01, 01, 31, 05, 00, 00, 02, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, bf, 01, c3, 01, 0d, 00, 11, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, b6, 01, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, b2, 01, 00, b6, 01, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, 00, ae, 01, b2, 01, 00, b6, 01, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, ab, 01, 11, 00, ae, 01, b2, 01, 00, b6, 01, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, a3, 01, 19, 25, a6, 01, ab, 01, 11, 00, ae, 01, b2, 01, 00, b6, 01, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, 14, 01, 09, 05, 01, 10, 05, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 02, 01, 0e, 00, 0f, 07, 01, 0d, 00, 1e, 25, 00, 1e, 00, 1f, 00, 01, 10, 01, 0a, b6, 01, 03, 0d, 00, 0e, bb, 01, 00, 12, 00, 17, b6, 01, 01, 10, 00, 14, b2, 01, 01, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, ae, 01, 01, 12, 00, 13, ab, 01, 01, 11, 00, 22, a6, 01, 00, 22, 00, 23, 00, 01, 14, 01, 0e, 19, 03, 09, 00, 0f, 9f, 01, 01, 05, 00, 06]
Number of files: 1
- file 0 => global file 1
Number of expressions: 49
@@ -42,8 +42,8 @@ Number of expressions: 49
- expression 36 operands: lhs = Expression(47, Add), rhs = Expression(48, Add)
- expression 37 operands: lhs = Counter(3), rhs = Zero
- expression 38 operands: lhs = Counter(4), rhs = Zero
-- expression 39 operands: lhs = Counter(9), rhs = Expression(40, Add)
-- expression 40 operands: lhs = Expression(41, Sub), rhs = Counter(6)
+- expression 39 operands: lhs = Expression(40, Add), rhs = Counter(6)
+- expression 40 operands: lhs = Counter(9), rhs = Expression(41, Sub)
- expression 41 operands: lhs = Expression(42, Add), rhs = Counter(4)
- expression 42 operands: lhs = Zero, rhs = Expression(43, Sub)
- expression 43 operands: lhs = Expression(44, Sub), rhs = Zero
@@ -82,10 +82,10 @@ Number of file 0 mappings: 20
- Code(Zero) at (prev + 1, 20) to (start + 1, 14)
- Code(Counter(6)) at (prev + 3, 9) to (start + 0, 15)
- Code(Expression(39, Add)) at (prev + 1, 5) to (start + 0, 6)
- = (c9 + (((Zero + (((((c3 + Zero) + (c4 + Zero)) - c6) - Zero) - Zero)) - c4) + c6))
+ = ((c9 + ((Zero + (((((c3 + Zero) + (c4 + Zero)) - c6) - Zero) - Zero)) - c4)) + c6)
Function name: <loops_branches::DisplayTest as core::fmt::Display>::fmt
-Raw bytes (253): 0x[01, 01, 33, 01, 00, 02, 00, 00, 0e, 02, 00, bf, 01, 19, c3, 01, c7, 01, 00, 0d, 00, 15, c3, 01, c7, 01, 00, 0d, 00, 15, bf, 01, 19, c3, 01, c7, 01, 00, 0d, 00, 15, ba, 01, 00, bf, 01, 19, c3, 01, c7, 01, 00, 0d, 00, 15, b6, 01, 00, ba, 01, 00, bf, 01, 19, c3, 01, c7, 01, 00, 0d, 00, 15, 00, b2, 01, b6, 01, 00, ba, 01, 00, bf, 01, 19, c3, 01, c7, 01, 00, 0d, 00, 15, af, 01, 15, 00, b2, 01, b6, 01, 00, ba, 01, 00, bf, 01, 19, c3, 01, c7, 01, 00, 0d, 00, 15, aa, 01, cb, 01, af, 01, 15, 00, b2, 01, b6, 01, 00, ba, 01, 00, bf, 01, 19, c3, 01, c7, 01, 00, 0d, 00, 15, 19, 25, 14, 01, 22, 05, 01, 11, 00, 01, 12, 01, 0a, 02, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 0e, 01, 0e, 00, 0f, 0b, 01, 0d, 00, 1e, 25, 00, 1e, 00, 1f, ba, 01, 02, 0d, 00, 0e, bf, 01, 00, 12, 00, 17, ba, 01, 01, 10, 00, 15, 00, 00, 16, 01, 0e, b6, 01, 02, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, b2, 01, 01, 12, 00, 13, af, 01, 01, 11, 00, 22, aa, 01, 00, 22, 00, 23, 19, 03, 09, 00, 0f, a7, 01, 01, 05, 00, 06]
+Raw bytes (253): 0x[01, 01, 33, 01, 00, 02, 00, 00, 0e, 02, 00, c3, 01, 19, c7, 01, cb, 01, 00, 0d, 00, 15, c7, 01, cb, 01, 00, 0d, 00, 15, c3, 01, 19, c7, 01, cb, 01, 00, 0d, 00, 15, be, 01, 00, c3, 01, 19, c7, 01, cb, 01, 00, 0d, 00, 15, ba, 01, 00, be, 01, 00, c3, 01, 19, c7, 01, cb, 01, 00, 0d, 00, 15, 00, b6, 01, ba, 01, 00, be, 01, 00, c3, 01, 19, c7, 01, cb, 01, 00, 0d, 00, 15, b3, 01, 15, 00, b6, 01, ba, 01, 00, be, 01, 00, c3, 01, 19, c7, 01, cb, 01, 00, 0d, 00, 15, ab, 01, 25, ae, 01, 19, b3, 01, 15, 00, b6, 01, ba, 01, 00, be, 01, 00, c3, 01, 19, c7, 01, cb, 01, 00, 0d, 00, 15, 14, 01, 22, 05, 01, 11, 00, 01, 12, 01, 0a, 02, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 0e, 01, 0e, 00, 0f, 0b, 01, 0d, 00, 1e, 25, 00, 1e, 00, 1f, be, 01, 02, 0d, 00, 0e, c3, 01, 00, 12, 00, 17, be, 01, 01, 10, 00, 15, 00, 00, 16, 01, 0e, ba, 01, 02, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, b6, 01, 01, 12, 00, 13, b3, 01, 01, 11, 00, 22, ae, 01, 00, 22, 00, 23, 19, 03, 09, 00, 0f, a7, 01, 01, 05, 00, 06]
Number of files: 1
- file 0 => global file 1
Number of expressions: 51
@@ -93,53 +93,53 @@ Number of expressions: 51
- expression 1 operands: lhs = Expression(0, Sub), rhs = Zero
- expression 2 operands: lhs = Zero, rhs = Expression(3, Sub)
- expression 3 operands: lhs = Expression(0, Sub), rhs = Zero
-- expression 4 operands: lhs = Expression(47, Add), rhs = Counter(6)
-- expression 5 operands: lhs = Expression(48, Add), rhs = Expression(49, Add)
+- expression 4 operands: lhs = Expression(48, Add), rhs = Counter(6)
+- expression 5 operands: lhs = Expression(49, Add), rhs = Expression(50, Add)
- expression 6 operands: lhs = Zero, rhs = Counter(3)
- expression 7 operands: lhs = Zero, rhs = Counter(5)
-- expression 8 operands: lhs = Expression(48, Add), rhs = Expression(49, Add)
+- expression 8 operands: lhs = Expression(49, Add), rhs = Expression(50, Add)
- expression 9 operands: lhs = Zero, rhs = Counter(3)
- expression 10 operands: lhs = Zero, rhs = Counter(5)
-- expression 11 operands: lhs = Expression(47, Add), rhs = Counter(6)
-- expression 12 operands: lhs = Expression(48, Add), rhs = Expression(49, Add)
+- expression 11 operands: lhs = Expression(48, Add), rhs = Counter(6)
+- expression 12 operands: lhs = Expression(49, Add), rhs = Expression(50, Add)
- expression 13 operands: lhs = Zero, rhs = Counter(3)
- expression 14 operands: lhs = Zero, rhs = Counter(5)
-- expression 15 operands: lhs = Expression(46, Sub), rhs = Zero
-- expression 16 operands: lhs = Expression(47, Add), rhs = Counter(6)
-- expression 17 operands: lhs = Expression(48, Add), rhs = Expression(49, Add)
+- expression 15 operands: lhs = Expression(47, Sub), rhs = Zero
+- expression 16 operands: lhs = Expression(48, Add), rhs = Counter(6)
+- expression 17 operands: lhs = Expression(49, Add), rhs = Expression(50, Add)
- expression 18 operands: lhs = Zero, rhs = Counter(3)
- expression 19 operands: lhs = Zero, rhs = Counter(5)
-- expression 20 operands: lhs = Expression(45, Sub), rhs = Zero
-- expression 21 operands: lhs = Expression(46, Sub), rhs = Zero
-- expression 22 operands: lhs = Expression(47, Add), rhs = Counter(6)
-- expression 23 operands: lhs = Expression(48, Add), rhs = Expression(49, Add)
+- expression 20 operands: lhs = Expression(46, Sub), rhs = Zero
+- expression 21 operands: lhs = Expression(47, Sub), rhs = Zero
+- expression 22 operands: lhs = Expression(48, Add), rhs = Counter(6)
+- expression 23 operands: lhs = Expression(49, Add), rhs = Expression(50, Add)
- expression 24 operands: lhs = Zero, rhs = Counter(3)
- expression 25 operands: lhs = Zero, rhs = Counter(5)
-- expression 26 operands: lhs = Zero, rhs = Expression(44, Sub)
-- expression 27 operands: lhs = Expression(45, Sub), rhs = Zero
-- expression 28 operands: lhs = Expression(46, Sub), rhs = Zero
-- expression 29 operands: lhs = Expression(47, Add), rhs = Counter(6)
-- expression 30 operands: lhs = Expression(48, Add), rhs = Expression(49, Add)
+- expression 26 operands: lhs = Zero, rhs = Expression(45, Sub)
+- expression 27 operands: lhs = Expression(46, Sub), rhs = Zero
+- expression 28 operands: lhs = Expression(47, Sub), rhs = Zero
+- expression 29 operands: lhs = Expression(48, Add), rhs = Counter(6)
+- expression 30 operands: lhs = Expression(49, Add), rhs = Expression(50, Add)
- expression 31 operands: lhs = Zero, rhs = Counter(3)
- expression 32 operands: lhs = Zero, rhs = Counter(5)
-- expression 33 operands: lhs = Expression(43, Add), rhs = Counter(5)
-- expression 34 operands: lhs = Zero, rhs = Expression(44, Sub)
-- expression 35 operands: lhs = Expression(45, Sub), rhs = Zero
-- expression 36 operands: lhs = Expression(46, Sub), rhs = Zero
-- expression 37 operands: lhs = Expression(47, Add), rhs = Counter(6)
-- expression 38 operands: lhs = Expression(48, Add), rhs = Expression(49, Add)
+- expression 33 operands: lhs = Expression(44, Add), rhs = Counter(5)
+- expression 34 operands: lhs = Zero, rhs = Expression(45, Sub)
+- expression 35 operands: lhs = Expression(46, Sub), rhs = Zero
+- expression 36 operands: lhs = Expression(47, Sub), rhs = Zero
+- expression 37 operands: lhs = Expression(48, Add), rhs = Counter(6)
+- expression 38 operands: lhs = Expression(49, Add), rhs = Expression(50, Add)
- expression 39 operands: lhs = Zero, rhs = Counter(3)
- expression 40 operands: lhs = Zero, rhs = Counter(5)
-- expression 41 operands: lhs = Expression(42, Sub), rhs = Expression(50, Add)
-- expression 42 operands: lhs = Expression(43, Add), rhs = Counter(5)
-- expression 43 operands: lhs = Zero, rhs = Expression(44, Sub)
-- expression 44 operands: lhs = Expression(45, Sub), rhs = Zero
+- expression 41 operands: lhs = Expression(42, Add), rhs = Counter(9)
+- expression 42 operands: lhs = Expression(43, Sub), rhs = Counter(6)
+- expression 43 operands: lhs = Expression(44, Add), rhs = Counter(5)
+- expression 44 operands: lhs = Zero, rhs = Expression(45, Sub)
- expression 45 operands: lhs = Expression(46, Sub), rhs = Zero
-- expression 46 operands: lhs = Expression(47, Add), rhs = Counter(6)
-- expression 47 operands: lhs = Expression(48, Add), rhs = Expression(49, Add)
-- expression 48 operands: lhs = Zero, rhs = Counter(3)
-- expression 49 operands: lhs = Zero, rhs = Counter(5)
-- expression 50 operands: lhs = Counter(6), rhs = Counter(9)
+- expression 46 operands: lhs = Expression(47, Sub), rhs = Zero
+- expression 47 operands: lhs = Expression(48, Add), rhs = Counter(6)
+- expression 48 operands: lhs = Expression(49, Add), rhs = Expression(50, Add)
+- expression 49 operands: lhs = Zero, rhs = Counter(3)
+- expression 50 operands: lhs = Zero, rhs = Counter(5)
Number of file 0 mappings: 20
- Code(Counter(0)) at (prev + 34, 5) to (start + 1, 17)
- Code(Zero) at (prev + 1, 18) to (start + 1, 10)
@@ -152,26 +152,26 @@ Number of file 0 mappings: 20
- Code(Expression(2, Add)) at (prev + 1, 13) to (start + 0, 30)
= (Zero + ((c0 - Zero) - Zero))
- Code(Counter(9)) at (prev + 0, 30) to (start + 0, 31)
-- Code(Expression(46, Sub)) at (prev + 2, 13) to (start + 0, 14)
+- Code(Expression(47, Sub)) at (prev + 2, 13) to (start + 0, 14)
= (((Zero + c3) + (Zero + c5)) - c6)
-- Code(Expression(47, Add)) at (prev + 0, 18) to (start + 0, 23)
+- Code(Expression(48, Add)) at (prev + 0, 18) to (start + 0, 23)
= ((Zero + c3) + (Zero + c5))
-- Code(Expression(46, Sub)) at (prev + 1, 16) to (start + 0, 21)
+- Code(Expression(47, Sub)) at (prev + 1, 16) to (start + 0, 21)
= (((Zero + c3) + (Zero + c5)) - c6)
- Code(Zero) at (prev + 0, 22) to (start + 1, 14)
-- Code(Expression(45, Sub)) at (prev + 2, 20) to (start + 0, 25)
+- Code(Expression(46, Sub)) at (prev + 2, 20) to (start + 0, 25)
= ((((Zero + c3) + (Zero + c5)) - c6) - Zero)
- Code(Zero) at (prev + 1, 27) to (start + 0, 31)
- Code(Zero) at (prev + 0, 32) to (start + 0, 34)
-- Code(Expression(44, Sub)) at (prev + 1, 18) to (start + 0, 19)
+- Code(Expression(45, Sub)) at (prev + 1, 18) to (start + 0, 19)
= (((((Zero + c3) + (Zero + c5)) - c6) - Zero) - Zero)
-- Code(Expression(43, Add)) at (prev + 1, 17) to (start + 0, 34)
+- Code(Expression(44, Add)) at (prev + 1, 17) to (start + 0, 34)
= (Zero + (((((Zero + c3) + (Zero + c5)) - c6) - Zero) - Zero))
-- Code(Expression(42, Sub)) at (prev + 0, 34) to (start + 0, 35)
+- Code(Expression(43, Sub)) at (prev + 0, 34) to (start + 0, 35)
= ((Zero + (((((Zero + c3) + (Zero + c5)) - c6) - Zero) - Zero)) - c5)
- Code(Counter(6)) at (prev + 3, 9) to (start + 0, 15)
- Code(Expression(41, Add)) at (prev + 1, 5) to (start + 0, 6)
- = (((Zero + (((((Zero + c3) + (Zero + c5)) - c6) - Zero) - Zero)) - c5) + (c6 + c9))
+ = ((((Zero + (((((Zero + c3) + (Zero + c5)) - c6) - Zero) - Zero)) - c5) + c6) + c9)
Function name: loops_branches::main
Raw bytes (9): 0x[01, 01, 00, 01, 01, 37, 01, 05, 02]
diff --git a/tests/coverage/no_spans.cov-map b/tests/coverage/no_spans.cov-map
new file mode 100644
index 000000000..9915fc52e
--- /dev/null
+++ b/tests/coverage/no_spans.cov-map
@@ -0,0 +1,8 @@
+Function name: no_spans::affected_function::{closure#0}
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 1b, 0c, 00, 0e]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 0
+Number of file 0 mappings: 1
+- Code(Counter(0)) at (prev + 27, 12) to (start + 0, 14)
+
diff --git a/tests/coverage/no_spans.coverage b/tests/coverage/no_spans.coverage
new file mode 100644
index 000000000..e55177698
--- /dev/null
+++ b/tests/coverage/no_spans.coverage
@@ -0,0 +1,30 @@
+ LL| |#![feature(coverage_attribute)]
+ LL| |// edition: 2021
+ LL| |
+ LL| |// If the span extractor can't find any relevant spans for a function, the
+ LL| |// refinement loop will terminate with nothing in its `prev` slot. If the
+ LL| |// subsequent code tries to unwrap `prev`, it will panic.
+ LL| |//
+ LL| |// This scenario became more likely after #118525 started discarding spans that
+ LL| |// can't be un-expanded back to within the function body.
+ LL| |//
+ LL| |// Regression test for "invalid attempt to unwrap a None some_prev", as seen
+ LL| |// in issues such as #118643 and #118662.
+ LL| |
+ LL| |#[coverage(off)]
+ LL| |fn main() {
+ LL| | affected_function()();
+ LL| |}
+ LL| |
+ LL| |macro_rules! macro_that_defines_a_function {
+ LL| | (fn $name:ident () $body:tt) => {
+ LL| | fn $name () -> impl Fn() $body
+ LL| | }
+ LL| |}
+ LL| |
+ LL| |macro_that_defines_a_function! {
+ LL| | fn affected_function() {
+ LL| 1| || ()
+ LL| | }
+ LL| |}
+
diff --git a/tests/coverage/no_spans.rs b/tests/coverage/no_spans.rs
new file mode 100644
index 000000000..a5234bc6b
--- /dev/null
+++ b/tests/coverage/no_spans.rs
@@ -0,0 +1,29 @@
+#![feature(coverage_attribute)]
+// edition: 2021
+
+// If the span extractor can't find any relevant spans for a function, the
+// refinement loop will terminate with nothing in its `prev` slot. If the
+// subsequent code tries to unwrap `prev`, it will panic.
+//
+// This scenario became more likely after #118525 started discarding spans that
+// can't be un-expanded back to within the function body.
+//
+// Regression test for "invalid attempt to unwrap a None some_prev", as seen
+// in issues such as #118643 and #118662.
+
+#[coverage(off)]
+fn main() {
+ affected_function()();
+}
+
+macro_rules! macro_that_defines_a_function {
+ (fn $name:ident () $body:tt) => {
+ fn $name () -> impl Fn() $body
+ }
+}
+
+macro_that_defines_a_function! {
+ fn affected_function() {
+ || ()
+ }
+}
diff --git a/tests/coverage/no_spans_if_not.cov-map b/tests/coverage/no_spans_if_not.cov-map
new file mode 100644
index 000000000..5277267ec
--- /dev/null
+++ b/tests/coverage/no_spans_if_not.cov-map
@@ -0,0 +1,8 @@
+Function name: no_spans_if_not::main
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 0b, 01, 02, 02]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 0
+Number of file 0 mappings: 1
+- Code(Counter(0)) at (prev + 11, 1) to (start + 2, 2)
+
diff --git a/tests/coverage/no_spans_if_not.coverage b/tests/coverage/no_spans_if_not.coverage
new file mode 100644
index 000000000..1b6bbc75a
--- /dev/null
+++ b/tests/coverage/no_spans_if_not.coverage
@@ -0,0 +1,30 @@
+ LL| |// edition: 2021
+ LL| |
+ LL| |// If the span extractor can't find any relevant spans for a function,
+ LL| |// but the function contains coverage span-marker statements (e.g. inserted
+ LL| |// for `if !`), coverage codegen may think that it is instrumented and
+ LL| |// consequently complain that it has no spans.
+ LL| |//
+ LL| |// Regression test for <https://github.com/rust-lang/rust/issues/118850>,
+ LL| |// "A used function should have had coverage mapping data but did not".
+ LL| |
+ LL| 1|fn main() {
+ LL| 1| affected_function();
+ LL| 1|}
+ LL| |
+ LL| |macro_rules! macro_that_defines_a_function {
+ LL| | (fn $name:ident () $body:tt) => {
+ LL| | fn $name () $body
+ LL| | }
+ LL| |}
+ LL| |
+ LL| |macro_that_defines_a_function! {
+ LL| | fn affected_function() {
+ LL| | if !false {
+ LL| | ()
+ LL| | } else {
+ LL| | ()
+ LL| | }
+ LL| | }
+ LL| |}
+
diff --git a/tests/coverage/no_spans_if_not.rs b/tests/coverage/no_spans_if_not.rs
new file mode 100644
index 000000000..2bbdc11cd
--- /dev/null
+++ b/tests/coverage/no_spans_if_not.rs
@@ -0,0 +1,29 @@
+// edition: 2021
+
+// If the span extractor can't find any relevant spans for a function,
+// but the function contains coverage span-marker statements (e.g. inserted
+// for `if !`), coverage codegen may think that it is instrumented and
+// consequently complain that it has no spans.
+//
+// Regression test for <https://github.com/rust-lang/rust/issues/118850>,
+// "A used function should have had coverage mapping data but did not".
+
+fn main() {
+ affected_function();
+}
+
+macro_rules! macro_that_defines_a_function {
+ (fn $name:ident () $body:tt) => {
+ fn $name () $body
+ }
+}
+
+macro_that_defines_a_function! {
+ fn affected_function() {
+ if !false {
+ ()
+ } else {
+ ()
+ }
+ }
+}
diff --git a/tests/coverage/thin-lto.cov-map b/tests/coverage/thin-lto.cov-map
new file mode 100644
index 000000000..7e84e398f
--- /dev/null
+++ b/tests/coverage/thin-lto.cov-map
@@ -0,0 +1,8 @@
+Function name: thin_lto::main
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 03, 01, 01, 02]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 0
+Number of file 0 mappings: 1
+- Code(Counter(0)) at (prev + 3, 1) to (start + 1, 2)
+
diff --git a/tests/coverage/thin-lto.coverage b/tests/coverage/thin-lto.coverage
new file mode 100644
index 000000000..21abb5dce
--- /dev/null
+++ b/tests/coverage/thin-lto.coverage
@@ -0,0 +1,5 @@
+ LL| |// compile-flags: -O -C lto=thin -C prefer-dynamic=no
+ LL| |
+ LL| 1|pub fn main() {
+ LL| 1|}
+
diff --git a/tests/coverage/thin-lto.rs b/tests/coverage/thin-lto.rs
new file mode 100644
index 000000000..050aac263
--- /dev/null
+++ b/tests/coverage/thin-lto.rs
@@ -0,0 +1,4 @@
+// compile-flags: -O -C lto=thin -C prefer-dynamic=no
+
+pub fn main() {
+}
diff --git a/tests/coverage/try_error_result.cov-map b/tests/coverage/try_error_result.cov-map
index 8367103a2..a9a18a180 100644
--- a/tests/coverage/try_error_result.cov-map
+++ b/tests/coverage/try_error_result.cov-map
@@ -59,7 +59,7 @@ Number of file 0 mappings: 4
= (c1 + (c0 - c1))
Function name: try_error_result::test1
-Raw bytes (77): 0x[01, 01, 09, 01, 07, 05, 09, 03, 0d, 1d, 11, 16, 1d, 03, 0d, 1f, 0d, 11, 23, 15, 19, 0b, 01, 0c, 01, 02, 17, 03, 07, 09, 00, 0e, 16, 02, 09, 04, 1a, 1d, 06, 0d, 00, 29, 11, 00, 29, 00, 2a, 0e, 01, 0d, 00, 2a, 15, 00, 2a, 00, 2b, 12, 04, 0d, 00, 2a, 19, 00, 2a, 00, 2b, 0d, 03, 05, 00, 0b, 1b, 01, 01, 00, 02]
+Raw bytes (77): 0x[01, 01, 09, 01, 07, 05, 09, 03, 0d, 1d, 11, 16, 1d, 03, 0d, 1f, 0d, 23, 19, 11, 15, 0b, 01, 0c, 01, 02, 17, 03, 07, 09, 00, 0e, 16, 02, 09, 04, 1a, 1d, 06, 0d, 00, 29, 11, 00, 29, 00, 2a, 0e, 01, 0d, 00, 2a, 15, 00, 2a, 00, 2b, 12, 04, 0d, 00, 2a, 19, 00, 2a, 00, 2b, 0d, 03, 05, 00, 0b, 1b, 01, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 9
@@ -70,8 +70,8 @@ Number of expressions: 9
- expression 4 operands: lhs = Expression(5, Sub), rhs = Counter(7)
- expression 5 operands: lhs = Expression(0, Add), rhs = Counter(3)
- expression 6 operands: lhs = Expression(7, Add), rhs = Counter(3)
-- expression 7 operands: lhs = Counter(4), rhs = Expression(8, Add)
-- expression 8 operands: lhs = Counter(5), rhs = Counter(6)
+- expression 7 operands: lhs = Expression(8, Add), rhs = Counter(6)
+- expression 8 operands: lhs = Counter(4), rhs = Counter(5)
Number of file 0 mappings: 11
- Code(Counter(0)) at (prev + 12, 1) to (start + 2, 23)
- Code(Expression(0, Add)) at (prev + 7, 9) to (start + 0, 14)
@@ -88,10 +88,10 @@ Number of file 0 mappings: 11
- Code(Counter(6)) at (prev + 0, 42) to (start + 0, 43)
- Code(Counter(3)) at (prev + 3, 5) to (start + 0, 11)
- Code(Expression(6, Add)) at (prev + 1, 1) to (start + 0, 2)
- = ((c4 + (c5 + c6)) + c3)
+ = (((c4 + c5) + c6) + c3)
Function name: try_error_result::test2
-Raw bytes (358): 0x[01, 01, 3b, 01, 07, 05, 09, 03, 0d, 41, 11, 4a, 15, 41, 11, 42, 1d, 46, 19, 4a, 15, 41, 11, 4a, 15, 41, 11, 46, 19, 4a, 15, 41, 11, 42, 1d, 46, 19, 4a, 15, 41, 11, 5e, 25, 49, 21, 49, 21, 5e, 25, 49, 21, 8a, 01, 2d, 8e, 01, 29, 92, 01, 41, 03, 0d, 92, 01, 41, 03, 0d, 8e, 01, 29, 92, 01, 41, 03, 0d, 8a, 01, 2d, 8e, 01, 29, 92, 01, 41, 03, 0d, a6, 01, 35, 45, 31, 45, 31, a6, 01, 35, 45, 31, ba, 01, 3d, 4d, 39, 4d, 39, ba, 01, 3d, 4d, 39, c3, 01, 0d, 11, c7, 01, cb, 01, db, 01, 15, cf, 01, d3, 01, d7, 01, 19, 1d, 21, 25, df, 01, e3, 01, 29, 2d, e7, 01, eb, 01, 31, 35, 39, 3d, 28, 01, 3c, 01, 03, 17, 03, 08, 09, 00, 0e, 92, 01, 02, 09, 04, 1a, 41, 06, 0d, 00, 2f, 11, 00, 2f, 00, 30, 4a, 00, 31, 03, 35, 15, 04, 11, 00, 12, 46, 02, 11, 04, 12, 3e, 05, 11, 00, 14, 46, 00, 17, 00, 41, 19, 00, 41, 00, 42, 42, 00, 43, 00, 5f, 1d, 00, 5f, 00, 60, 3e, 01, 0d, 00, 20, 5a, 01, 11, 00, 14, 49, 00, 17, 00, 41, 21, 00, 41, 00, 42, 5e, 00, 43, 00, 60, 25, 00, 60, 00, 61, 5a, 01, 0d, 00, 20, 86, 01, 04, 11, 00, 14, 8e, 01, 00, 17, 00, 42, 29, 00, 42, 00, 43, 8a, 01, 00, 44, 00, 61, 2d, 00, 61, 00, 62, 86, 01, 01, 0d, 00, 20, a2, 01, 01, 11, 00, 14, 45, 00, 17, 01, 36, 31, 01, 36, 00, 37, a6, 01, 01, 12, 00, 2f, 35, 00, 2f, 00, 30, a2, 01, 01, 0d, 00, 20, b6, 01, 01, 11, 00, 14, 4d, 00, 17, 01, 36, 39, 02, 11, 00, 12, ba, 01, 01, 12, 00, 2f, 3d, 01, 11, 00, 12, b6, 01, 02, 0d, 00, 20, 0d, 03, 05, 00, 0b, bf, 01, 01, 01, 00, 02]
+Raw bytes (358): 0x[01, 01, 3b, 01, 07, 05, 09, 03, 0d, 41, 11, 4a, 15, 41, 11, 42, 1d, 46, 19, 4a, 15, 41, 11, 4a, 15, 41, 11, 46, 19, 4a, 15, 41, 11, 42, 1d, 46, 19, 4a, 15, 41, 11, 5e, 25, 49, 21, 49, 21, 5e, 25, 49, 21, 8a, 01, 2d, 8e, 01, 29, 92, 01, 41, 03, 0d, 92, 01, 41, 03, 0d, 8e, 01, 29, 92, 01, 41, 03, 0d, 8a, 01, 2d, 8e, 01, 29, 92, 01, 41, 03, 0d, a6, 01, 35, 45, 31, 45, 31, a6, 01, 35, 45, 31, ba, 01, 3d, 4d, 39, 4d, 39, ba, 01, 3d, 4d, 39, c3, 01, 0d, c7, 01, db, 01, cb, 01, cf, 01, 11, 15, d3, 01, d7, 01, 19, 1d, 21, 25, df, 01, e3, 01, 29, 2d, e7, 01, eb, 01, 31, 35, 39, 3d, 28, 01, 3c, 01, 03, 17, 03, 08, 09, 00, 0e, 92, 01, 02, 09, 04, 1a, 41, 06, 0d, 00, 2f, 11, 00, 2f, 00, 30, 4a, 00, 31, 03, 35, 15, 04, 11, 00, 12, 46, 02, 11, 04, 12, 3e, 05, 11, 00, 14, 46, 00, 17, 00, 41, 19, 00, 41, 00, 42, 42, 00, 43, 00, 5f, 1d, 00, 5f, 00, 60, 3e, 01, 0d, 00, 20, 5a, 01, 11, 00, 14, 49, 00, 17, 00, 41, 21, 00, 41, 00, 42, 5e, 00, 43, 00, 60, 25, 00, 60, 00, 61, 5a, 01, 0d, 00, 20, 86, 01, 04, 11, 00, 14, 8e, 01, 00, 17, 00, 42, 29, 00, 42, 00, 43, 8a, 01, 00, 44, 00, 61, 2d, 00, 61, 00, 62, 86, 01, 01, 0d, 00, 20, a2, 01, 01, 11, 00, 14, 45, 00, 17, 01, 36, 31, 01, 36, 00, 37, a6, 01, 01, 12, 00, 2f, 35, 00, 2f, 00, 30, a2, 01, 01, 0d, 00, 20, b6, 01, 01, 11, 00, 14, 4d, 00, 17, 01, 36, 39, 02, 11, 00, 12, ba, 01, 01, 12, 00, 2f, 3d, 01, 11, 00, 12, b6, 01, 02, 0d, 00, 20, 0d, 03, 05, 00, 0b, bf, 01, 01, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 59
@@ -143,9 +143,9 @@ Number of expressions: 59
- expression 45 operands: lhs = Expression(46, Sub), rhs = Counter(15)
- expression 46 operands: lhs = Counter(19), rhs = Counter(14)
- expression 47 operands: lhs = Expression(48, Add), rhs = Counter(3)
-- expression 48 operands: lhs = Counter(4), rhs = Expression(49, Add)
-- expression 49 operands: lhs = Expression(50, Add), rhs = Expression(54, Add)
-- expression 50 operands: lhs = Counter(5), rhs = Expression(51, Add)
+- expression 48 operands: lhs = Expression(49, Add), rhs = Expression(54, Add)
+- expression 49 operands: lhs = Expression(50, Add), rhs = Expression(51, Add)
+- expression 50 operands: lhs = Counter(4), rhs = Counter(5)
- expression 51 operands: lhs = Expression(52, Add), rhs = Expression(53, Add)
- expression 52 operands: lhs = Counter(6), rhs = Counter(7)
- expression 53 operands: lhs = Counter(8), rhs = Counter(9)
@@ -216,5 +216,5 @@ Number of file 0 mappings: 40
= ((c19 - c14) - c15)
- Code(Counter(3)) at (prev + 3, 5) to (start + 0, 11)
- Code(Expression(47, Add)) at (prev + 1, 1) to (start + 0, 2)
- = ((c4 + ((c5 + ((c6 + c7) + (c8 + c9))) + ((c10 + c11) + ((c12 + c13) + (c14 + c15))))) + c3)
+ = ((((c4 + c5) + ((c6 + c7) + (c8 + c9))) + ((c10 + c11) + ((c12 + c13) + (c14 + c15)))) + c3)
diff --git a/tests/coverage/unreachable.cov-map b/tests/coverage/unreachable.cov-map
index 495419820..55d124a16 100644
--- a/tests/coverage/unreachable.cov-map
+++ b/tests/coverage/unreachable.cov-map
@@ -1,24 +1,24 @@
Function name: unreachable::UNREACHABLE_CLOSURE::{closure#0}
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 0f, 27, 00, 49]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 0f, 27, 00, 47]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 15, 39) to (start + 0, 73)
+- Code(Counter(0)) at (prev + 15, 39) to (start + 0, 71)
Function name: unreachable::unreachable_function
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 11, 01, 02, 02]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 11, 01, 01, 25]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 17, 1) to (start + 2, 2)
+- Code(Counter(0)) at (prev + 17, 1) to (start + 1, 37)
Function name: unreachable::unreachable_intrinsic
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 16, 01, 02, 02]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 16, 01, 01, 2c]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 22, 1) to (start + 2, 2)
+- Code(Counter(0)) at (prev + 22, 1) to (start + 1, 44)
diff --git a/tests/coverage/unreachable.coverage b/tests/coverage/unreachable.coverage
index fa0ac9ccf..7015bb90a 100644
--- a/tests/coverage/unreachable.coverage
+++ b/tests/coverage/unreachable.coverage
@@ -16,12 +16,12 @@
LL| |
LL| 0|fn unreachable_function() {
LL| 0| unsafe { unreachable_unchecked() }
- LL| 0|}
+ LL| |}
LL| |
LL| |// Use an intrinsic to more reliably trigger unreachable-propagation.
LL| 0|fn unreachable_intrinsic() {
LL| 0| unsafe { std::intrinsics::unreachable() }
- LL| 0|}
+ LL| |}
LL| |
LL| |#[coverage(off)]
LL| |fn main() {
diff --git a/tests/incremental/commandline-args.rs b/tests/incremental/commandline-args.rs
index 35b7183db..e17e6feae 100644
--- a/tests/incremental/commandline-args.rs
+++ b/tests/incremental/commandline-args.rs
@@ -1,7 +1,6 @@
// Test that changing a tracked commandline argument invalidates
// the cache while changing an untracked one doesn't.
-// ignore-asmjs wasm2js does not support source maps yet
// revisions:rpass1 rpass2 rpass3 rpass4
// compile-flags: -Z query-dep-graph
diff --git a/tests/incremental/delayed_span_bug.rs b/tests/incremental/delayed_span_bug.rs
index 2529e531e..cc9831fff 100644
--- a/tests/incremental/delayed_span_bug.rs
+++ b/tests/incremental/delayed_span_bug.rs
@@ -1,8 +1,8 @@
// revisions: cfail1 cfail2
// should-ice
-// error-pattern: delayed span bug triggered by #[rustc_error(delay_span_bug_from_inside_query)]
+// error-pattern: delayed span bug triggered by #[rustc_error(span_delayed_bug_from_inside_query)]
#![feature(rustc_attrs)]
-#[rustc_error(delay_span_bug_from_inside_query)]
+#[rustc_error(span_delayed_bug_from_inside_query)]
fn main() {}
diff --git a/tests/incremental/remapped_paths_cc/main.rs b/tests/incremental/remapped_paths_cc/main.rs
index b01f02444..12411a928 100644
--- a/tests/incremental/remapped_paths_cc/main.rs
+++ b/tests/incremental/remapped_paths_cc/main.rs
@@ -2,7 +2,6 @@
// compile-flags: -Z query-dep-graph -g
// aux-build:extern_crate.rs
-// ignore-asmjs wasm2js does not support source maps yet
// This test case makes sure that we detect if paths emitted into debuginfo
// are changed, even when the change happens in an external crate.
diff --git a/tests/incremental/span_hash_stable/main.rs b/tests/incremental/span_hash_stable/main.rs
index 367416430..f1d7de145 100644
--- a/tests/incremental/span_hash_stable/main.rs
+++ b/tests/incremental/span_hash_stable/main.rs
@@ -3,7 +3,6 @@
// the spans and this test makes sure that we handle them correctly by hashing
// file:line:column instead of raw byte offset.
-// ignore-asmjs wasm2js does not support source maps yet
// revisions:rpass1 rpass2
// compile-flags: -g -Z query-dep-graph
diff --git a/tests/incremental/spans_in_type_debuginfo.rs b/tests/incremental/spans_in_type_debuginfo.rs
index f5cae15a4..8ed469db6 100644
--- a/tests/incremental/spans_in_type_debuginfo.rs
+++ b/tests/incremental/spans_in_type_debuginfo.rs
@@ -1,7 +1,6 @@
// Test that moving a type definition within a source file does not affect
// re-compilation.
-// ignore-asmjs wasm2js does not support source maps yet
// revisions:rpass1 rpass2
// compile-flags: -Z query-dep-graph -g
diff --git a/tests/incremental/spans_significant_w_debuginfo.rs b/tests/incremental/spans_significant_w_debuginfo.rs
index 38ab28461..a036d3e69 100644
--- a/tests/incremental/spans_significant_w_debuginfo.rs
+++ b/tests/incremental/spans_significant_w_debuginfo.rs
@@ -3,7 +3,6 @@
// revisions:rpass1 rpass2
-// ignore-asmjs wasm2js does not support source maps yet
// compile-flags: -g -Z query-dep-graph
#![feature(rustc_attrs)]
diff --git a/tests/incremental/thinlto/cgu_invalidated_via_import.rs b/tests/incremental/thinlto/cgu_invalidated_via_import.rs
index 5fe435d79..a81b4f7e9 100644
--- a/tests/incremental/thinlto/cgu_invalidated_via_import.rs
+++ b/tests/incremental/thinlto/cgu_invalidated_via_import.rs
@@ -4,7 +4,7 @@
// revisions: cfail1 cfail2 cfail3
// compile-flags: -Z query-dep-graph -O
-// build-pass (FIXME(62277): could be check-pass?)
+// build-pass
#![feature(rustc_attrs)]
#![crate_type="rlib"]
@@ -14,14 +14,14 @@
kind="no")]
#![rustc_expected_cgu_reuse(module="cgu_invalidated_via_import-foo",
cfg="cfail3",
- kind="post-lto")]
+ kind="pre-lto")] // Should be "post-lto", see issue #119076
#![rustc_expected_cgu_reuse(module="cgu_invalidated_via_import-bar",
cfg="cfail2",
kind="pre-lto")]
#![rustc_expected_cgu_reuse(module="cgu_invalidated_via_import-bar",
cfg="cfail3",
- kind="post-lto")]
+ kind="pre-lto")] // Should be "post-lto", see issue #119076
mod foo {
diff --git a/tests/incremental/thinlto/cgu_keeps_identical_fn.rs b/tests/incremental/thinlto/cgu_keeps_identical_fn.rs
index 368a726ea..9e840f67a 100644
--- a/tests/incremental/thinlto/cgu_keeps_identical_fn.rs
+++ b/tests/incremental/thinlto/cgu_keeps_identical_fn.rs
@@ -5,25 +5,29 @@
// revisions: cfail1 cfail2 cfail3
// compile-flags: -Z query-dep-graph -O
-// build-pass (FIXME(62277): could be check-pass?)
+// build-pass
#![feature(rustc_attrs)]
#![crate_type = "rlib"]
-#![rustc_expected_cgu_reuse(module = "cgu_keeps_identical_fn-foo", cfg = "cfail2", kind = "no")]
+#![rustc_expected_cgu_reuse(
+ module = "cgu_keeps_identical_fn-foo",
+ cfg = "cfail2",
+ kind = "pre-lto"
+)]
#![rustc_expected_cgu_reuse(
module = "cgu_keeps_identical_fn-foo",
cfg = "cfail3",
- kind = "post-lto"
+ kind = "pre-lto" // Should be "post-lto", see issue #119076
)]
#![rustc_expected_cgu_reuse(
module = "cgu_keeps_identical_fn-bar",
cfg = "cfail2",
- kind = "post-lto"
+ kind = "pre-lto" // Should be "post-lto", see issue #119076
)]
#![rustc_expected_cgu_reuse(
module = "cgu_keeps_identical_fn-bar",
cfg = "cfail3",
- kind = "post-lto"
+ kind = "pre-lto" // Should be "post-lto", see issue #119076
)]
mod foo {
diff --git a/tests/incremental/thinlto/independent_cgus_dont_affect_each_other.rs b/tests/incremental/thinlto/independent_cgus_dont_affect_each_other.rs
index 045f20119..45eb13828 100644
--- a/tests/incremental/thinlto/independent_cgus_dont_affect_each_other.rs
+++ b/tests/incremental/thinlto/independent_cgus_dont_affect_each_other.rs
@@ -3,7 +3,7 @@
// revisions: cfail1 cfail2 cfail3
// compile-flags: -Z query-dep-graph -O
-// build-pass (FIXME(62277): could be check-pass?)
+// build-pass
#![feature(rustc_attrs)]
#![crate_type="rlib"]
@@ -13,21 +13,21 @@
kind="no")]
#![rustc_expected_cgu_reuse(module="independent_cgus_dont_affect_each_other-foo",
cfg="cfail3",
- kind="post-lto")]
+ kind="pre-lto")] // Should be "post-lto", see issue #119076
#![rustc_expected_cgu_reuse(module="independent_cgus_dont_affect_each_other-bar",
cfg="cfail2",
kind="pre-lto")]
#![rustc_expected_cgu_reuse(module="independent_cgus_dont_affect_each_other-bar",
cfg="cfail3",
- kind="post-lto")]
+ kind="pre-lto")] // Should be "post-lto", see issue #119076
#![rustc_expected_cgu_reuse(module="independent_cgus_dont_affect_each_other-baz",
cfg="cfail2",
- kind="post-lto")]
+ kind="pre-lto")] // Should be "post-lto", see issue #119076
#![rustc_expected_cgu_reuse(module="independent_cgus_dont_affect_each_other-baz",
cfg="cfail3",
- kind="post-lto")]
+ kind="pre-lto")] // Should be "post-lto", see issue #119076
mod foo {
#[cfg(cfail1)]
diff --git a/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir b/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir
index 396e4a378..59e275124 100644
--- a/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir
+++ b/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir
@@ -14,7 +14,7 @@
Static,
),
source_info: SourceInfo {
- span: $DIR/async_await.rs:16:9: 16:14 (#8),
+ span: $DIR/async_await.rs:16:5: 16:14 (#9),
scope: scope[0],
},
ignore_for_traits: false,
@@ -32,7 +32,7 @@
Static,
),
source_info: SourceInfo {
- span: $DIR/async_await.rs:17:9: 17:14 (#10),
+ span: $DIR/async_await.rs:17:5: 17:14 (#11),
scope: scope[0],
},
ignore_for_traits: false,
@@ -178,6 +178,10 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:15:18: 18:2}>,
StorageLive(_20);
_20 = ();
_0 = Poll::<()>::Pending;
+ StorageDead(_3);
+ StorageDead(_4);
+ StorageDead(_19);
+ StorageDead(_20);
discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2}))) = 3;
return;
}
@@ -276,6 +280,9 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:15:18: 18:2}>,
StorageLive(_36);
_36 = ();
_0 = Poll::<()>::Pending;
+ StorageDead(_21);
+ StorageDead(_35);
+ StorageDead(_36);
discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2}))) = 4;
return;
}
diff --git a/tests/mir-opt/building/custom/terminators.rs b/tests/mir-opt/building/custom/terminators.rs
index 9e442e0f9..a83a6c074 100644
--- a/tests/mir-opt/building/custom/terminators.rs
+++ b/tests/mir-opt/building/custom/terminators.rs
@@ -13,7 +13,7 @@ fn ident<T>(t: T) -> T {
fn direct_call(x: i32) -> i32 {
mir!(
{
- Call(RET = ident(x), retblock)
+ Call(RET = ident(x), retblock, UnwindContinue())
}
retblock = {
@@ -27,7 +27,7 @@ fn direct_call(x: i32) -> i32 {
fn indirect_call(x: i32, f: fn(i32) -> i32) -> i32 {
mir!(
{
- Call(RET = f(x), retblock)
+ Call(RET = f(x), retblock, UnwindContinue())
}
retblock = {
@@ -49,7 +49,7 @@ impl<'a> Drop for WriteOnDrop<'a> {
fn drop_first<'a>(a: WriteOnDrop<'a>, b: WriteOnDrop<'a>) {
mir!(
{
- Drop(a, retblock)
+ Drop(a, retblock, UnwindContinue())
}
retblock = {
@@ -64,7 +64,7 @@ fn drop_first<'a>(a: WriteOnDrop<'a>, b: WriteOnDrop<'a>) {
fn drop_second<'a>(a: WriteOnDrop<'a>, b: WriteOnDrop<'a>) {
mir!(
{
- Drop(b, retblock)
+ Drop(b, retblock, UnwindContinue())
}
retblock = {
diff --git a/tests/mir-opt/building/custom/unwind_action.rs b/tests/mir-opt/building/custom/unwind_action.rs
new file mode 100644
index 000000000..e3c4ffac3
--- /dev/null
+++ b/tests/mir-opt/building/custom/unwind_action.rs
@@ -0,0 +1,68 @@
+// compile-flags: --crate-type=lib
+// edition:2021
+// needs-unwind
+#![feature(custom_mir, core_intrinsics)]
+use core::intrinsics::mir::*;
+
+// CHECK-LABEL: fn a()
+// CHECK: bb0: {
+// CHECK-NEXT: a() -> [return: bb1, unwind unreachable];
+#[custom_mir(dialect = "runtime", phase = "optimized")]
+pub fn a() {
+ mir!(
+ {
+ Call(RET = a(), bb1, UnwindUnreachable())
+ }
+ bb1 = {
+ Return()
+ }
+ )
+}
+
+// CHECK-LABEL: fn b()
+// CHECK: bb0: {
+// CHECK-NEXT: b() -> [return: bb1, unwind continue];
+#[custom_mir(dialect = "runtime", phase = "optimized")]
+pub fn b() {
+ mir!(
+ {
+ Call(RET = b(), bb1, UnwindContinue())
+ }
+ bb1 = {
+ Return()
+ }
+ )
+}
+
+// CHECK-LABEL: fn c()
+// CHECK: bb0: {
+// CHECK-NEXT: c() -> [return: bb1, unwind terminate(abi)];
+#[custom_mir(dialect = "runtime", phase = "optimized")]
+pub fn c() {
+ mir!(
+ {
+ Call(RET = c(), bb1, UnwindTerminate(ReasonAbi))
+ }
+ bb1 = {
+ Return()
+ }
+ )
+}
+
+// CHECK-LABEL: fn d()
+// CHECK: bb0: {
+// CHECK-NEXT: d() -> [return: bb1, unwind: bb2];
+#[custom_mir(dialect = "runtime", phase = "optimized")]
+pub fn d() {
+ mir!(
+ {
+ Call(RET = d(), bb1, UnwindCleanup(bb2))
+ }
+ bb1 = {
+ Return()
+ }
+ bb2 (cleanup) = {
+ UnwindResume()
+ }
+ )
+}
diff --git a/tests/mir-opt/building/custom/unwind_terminate.rs b/tests/mir-opt/building/custom/unwind_terminate.rs
new file mode 100644
index 000000000..efdf2ddb1
--- /dev/null
+++ b/tests/mir-opt/building/custom/unwind_terminate.rs
@@ -0,0 +1,34 @@
+// compile-flags: --crate-type=lib
+// edition:2021
+#![feature(custom_mir, core_intrinsics)]
+use core::intrinsics::mir::*;
+
+// CHECK-LABEL: fn f()
+// CHECK: bb1 (cleanup): {
+// CHECK-NEXT: terminate(abi);
+#[custom_mir(dialect = "runtime", phase = "optimized")]
+pub fn f() {
+ mir!(
+ {
+ Return()
+ }
+ bb1(cleanup) = {
+ UnwindTerminate(ReasonAbi)
+ }
+ )
+}
+
+// CHECK-LABEL: fn g()
+// CHECK: bb1 (cleanup): {
+// CHECK-NEXT: terminate(cleanup);
+#[custom_mir(dialect = "runtime", phase = "optimized")]
+pub fn g() {
+ mir!(
+ {
+ Return()
+ }
+ bb1(cleanup) = {
+ UnwindTerminate(ReasonInCleanup)
+ }
+ )
+}
diff --git a/tests/mir-opt/const_allocation.main.ConstProp.after.32bit.mir b/tests/mir-opt/const_allocation.main.ConstProp.after.32bit.mir
index f20bfef8c..9cc4c7c4d 100644
--- a/tests/mir-opt/const_allocation.main.ConstProp.after.32bit.mir
+++ b/tests/mir-opt/const_allocation.main.ConstProp.after.32bit.mir
@@ -18,19 +18,19 @@ fn main() -> () {
}
ALLOC9 (static: FOO, size: 8, align: 4) {
- ╾ALLOC0╼ 03 00 00 00 │ ╾──╼....
+ ╾ALLOC0<imm>╼ 03 00 00 00 │ ╾──╼....
}
ALLOC0 (size: 48, align: 4) {
- 0x00 │ 00 00 00 00 __ __ __ __ ╾ALLOC1╼ 00 00 00 00 │ ....░░░░╾──╼....
- 0x10 │ 00 00 00 00 __ __ __ __ ╾ALLOC2╼ 02 00 00 00 │ ....░░░░╾──╼....
- 0x20 │ 01 00 00 00 2a 00 00 00 ╾ALLOC3╼ 03 00 00 00 │ ....*...╾──╼....
+ 0x00 │ 00 00 00 00 __ __ __ __ ╾ALLOC1<imm>╼ 00 00 00 00 │ ....░░░░╾──╼....
+ 0x10 │ 00 00 00 00 __ __ __ __ ╾ALLOC2<imm>╼ 02 00 00 00 │ ....░░░░╾──╼....
+ 0x20 │ 01 00 00 00 2a 00 00 00 ╾ALLOC3<imm>╼ 03 00 00 00 │ ....*...╾──╼....
}
ALLOC1 (size: 0, align: 4) {}
ALLOC2 (size: 16, align: 4) {
- ╾ALLOC4╼ 03 00 00 00 ╾ALLOC5╼ 03 00 00 00 │ ╾──╼....╾──╼....
+ ╾ALLOC4<imm>╼ 03 00 00 00 ╾ALLOC5<imm>╼ 03 00 00 00 │ ╾──╼....╾──╼....
}
ALLOC4 (size: 3, align: 1) {
@@ -42,8 +42,8 @@ ALLOC5 (size: 3, align: 1) {
}
ALLOC3 (size: 24, align: 4) {
- 0x00 │ ╾ALLOC6╼ 03 00 00 00 ╾ALLOC7╼ 03 00 00 00 │ ╾──╼....╾──╼....
- 0x10 │ ╾ALLOC8╼ 04 00 00 00 │ ╾──╼....
+ 0x00 │ ╾ALLOC6<imm>╼ 03 00 00 00 ╾ALLOC7<imm>╼ 03 00 00 00 │ ╾──╼....╾──╼....
+ 0x10 │ ╾ALLOC8<imm>╼ 04 00 00 00 │ ╾──╼....
}
ALLOC6 (size: 3, align: 1) {
diff --git a/tests/mir-opt/const_allocation.main.ConstProp.after.64bit.mir b/tests/mir-opt/const_allocation.main.ConstProp.after.64bit.mir
index 263cae2f3..faa9d20f2 100644
--- a/tests/mir-opt/const_allocation.main.ConstProp.after.64bit.mir
+++ b/tests/mir-opt/const_allocation.main.ConstProp.after.64bit.mir
@@ -18,22 +18,22 @@ fn main() -> () {
}
ALLOC9 (static: FOO, size: 16, align: 8) {
- ╾ALLOC0╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
+ ╾ALLOC0<imm>╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
}
ALLOC0 (size: 72, align: 8) {
- 0x00 │ 00 00 00 00 __ __ __ __ ╾ALLOC1╼ │ ....░░░░╾──────╼
+ 0x00 │ 00 00 00 00 __ __ __ __ ╾ALLOC1<imm>╼ │ ....░░░░╾──────╼
0x10 │ 00 00 00 00 00 00 00 00 00 00 00 00 __ __ __ __ │ ............░░░░
- 0x20 │ ╾ALLOC2╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
- 0x30 │ 01 00 00 00 2a 00 00 00 ╾ALLOC3╼ │ ....*...╾──────╼
+ 0x20 │ ╾ALLOC2<imm>╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
+ 0x30 │ 01 00 00 00 2a 00 00 00 ╾ALLOC3<imm>╼ │ ....*...╾──────╼
0x40 │ 03 00 00 00 00 00 00 00 │ ........
}
ALLOC1 (size: 0, align: 8) {}
ALLOC2 (size: 32, align: 8) {
- 0x00 │ ╾ALLOC4╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
- 0x10 │ ╾ALLOC5╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
+ 0x00 │ ╾ALLOC4<imm>╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
+ 0x10 │ ╾ALLOC5<imm>╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
}
ALLOC4 (size: 3, align: 1) {
@@ -45,9 +45,9 @@ ALLOC5 (size: 3, align: 1) {
}
ALLOC3 (size: 48, align: 8) {
- 0x00 │ ╾ALLOC6╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
- 0x10 │ ╾ALLOC7╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
- 0x20 │ ╾ALLOC8╼ 04 00 00 00 00 00 00 00 │ ╾──────╼........
+ 0x00 │ ╾ALLOC6<imm>╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
+ 0x10 │ ╾ALLOC7<imm>╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
+ 0x20 │ ╾ALLOC8<imm>╼ 04 00 00 00 00 00 00 00 │ ╾──────╼........
}
ALLOC6 (size: 3, align: 1) {
diff --git a/tests/mir-opt/const_allocation2.main.ConstProp.after.32bit.mir b/tests/mir-opt/const_allocation2.main.ConstProp.after.32bit.mir
index 713abb264..898835b46 100644
--- a/tests/mir-opt/const_allocation2.main.ConstProp.after.32bit.mir
+++ b/tests/mir-opt/const_allocation2.main.ConstProp.after.32bit.mir
@@ -18,19 +18,19 @@ fn main() -> () {
}
ALLOC9 (static: FOO, size: 8, align: 4) {
- ╾ALLOC0╼ 03 00 00 00 │ ╾──╼....
+ ╾ALLOC0<imm>╼ 03 00 00 00 │ ╾──╼....
}
ALLOC0 (size: 48, align: 4) {
- 0x00 │ 00 00 00 00 __ __ __ __ ╾ALLOC1╼ 00 00 00 00 │ ....░░░░╾──╼....
- 0x10 │ 00 00 00 00 __ __ __ __ ╾ALLOC2╼ 02 00 00 00 │ ....░░░░╾──╼....
- 0x20 │ 01 00 00 00 2a 00 00 00 ╾ALLOC3╼ 03 00 00 00 │ ....*...╾──╼....
+ 0x00 │ 00 00 00 00 __ __ __ __ ╾ALLOC1<imm>╼ 00 00 00 00 │ ....░░░░╾──╼....
+ 0x10 │ 00 00 00 00 __ __ __ __ ╾ALLOC2<imm>╼ 02 00 00 00 │ ....░░░░╾──╼....
+ 0x20 │ 01 00 00 00 2a 00 00 00 ╾ALLOC3<imm>╼ 03 00 00 00 │ ....*...╾──╼....
}
ALLOC1 (size: 0, align: 4) {}
ALLOC2 (size: 8, align: 4) {
- ╾ALLOC4╼ ╾ALLOC5╼ │ ╾──╼╾──╼
+ ╾ALLOC4<imm>╼ ╾ALLOC5<imm>╼ │ ╾──╼╾──╼
}
ALLOC4 (size: 1, align: 1) {
@@ -42,7 +42,7 @@ ALLOC5 (size: 1, align: 1) {
}
ALLOC3 (size: 12, align: 4) {
- ╾ALLOC6+0x3╼ ╾ALLOC7╼ ╾ALLOC8+0x2╼ │ ╾──╼╾──╼╾──╼
+ ╾ALLOC6+0x3<imm>╼ ╾ALLOC7<imm>╼ ╾ALLOC8+0x2<imm>╼ │ ╾──╼╾──╼╾──╼
}
ALLOC6 (size: 4, align: 1) {
diff --git a/tests/mir-opt/const_allocation2.main.ConstProp.after.64bit.mir b/tests/mir-opt/const_allocation2.main.ConstProp.after.64bit.mir
index e9d61ef12..f5352c2ae 100644
--- a/tests/mir-opt/const_allocation2.main.ConstProp.after.64bit.mir
+++ b/tests/mir-opt/const_allocation2.main.ConstProp.after.64bit.mir
@@ -18,21 +18,21 @@ fn main() -> () {
}
ALLOC9 (static: FOO, size: 16, align: 8) {
- ╾ALLOC0╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
+ ╾ALLOC0<imm>╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
}
ALLOC0 (size: 72, align: 8) {
- 0x00 │ 00 00 00 00 __ __ __ __ ╾ALLOC1╼ │ ....░░░░╾──────╼
+ 0x00 │ 00 00 00 00 __ __ __ __ ╾ALLOC1<imm>╼ │ ....░░░░╾──────╼
0x10 │ 00 00 00 00 00 00 00 00 00 00 00 00 __ __ __ __ │ ............░░░░
- 0x20 │ ╾ALLOC2╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
- 0x30 │ 01 00 00 00 2a 00 00 00 ╾ALLOC3╼ │ ....*...╾──────╼
+ 0x20 │ ╾ALLOC2<imm>╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
+ 0x30 │ 01 00 00 00 2a 00 00 00 ╾ALLOC3<imm>╼ │ ....*...╾──────╼
0x40 │ 03 00 00 00 00 00 00 00 │ ........
}
ALLOC1 (size: 0, align: 8) {}
ALLOC2 (size: 16, align: 8) {
- ╾ALLOC4╼ ╾ALLOC5╼ │ ╾──────╼╾──────╼
+ ╾ALLOC4<imm>╼ ╾ALLOC5<imm>╼ │ ╾──────╼╾──────╼
}
ALLOC4 (size: 1, align: 1) {
@@ -44,8 +44,8 @@ ALLOC5 (size: 1, align: 1) {
}
ALLOC3 (size: 24, align: 8) {
- 0x00 │ ╾ALLOC6+0x3╼ ╾ALLOC7╼ │ ╾──────╼╾──────╼
- 0x10 │ ╾ALLOC8+0x2╼ │ ╾──────╼
+ 0x00 │ ╾ALLOC6+0x3<imm>╼ ╾ALLOC7<imm>╼ │ ╾──────╼╾──────╼
+ 0x10 │ ╾ALLOC8+0x2<imm>╼ │ ╾──────╼
}
ALLOC6 (size: 4, align: 1) {
diff --git a/tests/mir-opt/const_allocation3.main.ConstProp.after.32bit.mir b/tests/mir-opt/const_allocation3.main.ConstProp.after.32bit.mir
index c18c067c7..624047f5b 100644
--- a/tests/mir-opt/const_allocation3.main.ConstProp.after.32bit.mir
+++ b/tests/mir-opt/const_allocation3.main.ConstProp.after.32bit.mir
@@ -18,12 +18,12 @@ fn main() -> () {
}
ALLOC4 (static: FOO, size: 4, align: 4) {
- ╾ALLOC0╼ │ ╾──╼
+ ╾ALLOC0<imm>╼ │ ╾──╼
}
ALLOC0 (size: 168, align: 1) {
0x00 │ ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab │ ................
- 0x10 │ ab ab ab ab ab ab ab ab ab ab ab ab ╾ALLOC1╼ │ ............╾──╼
+ 0x10 │ ab ab ab ab ab ab ab ab ab ab ab ab ╾ALLOC1<imm>╼ │ ............╾──╼
0x20 │ 01 ef cd ab 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
0x30 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
0x40 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
@@ -31,7 +31,7 @@ ALLOC0 (size: 168, align: 1) {
0x60 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
0x70 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
0x80 │ 00 00 00 00 00 00 00 00 00 00 ╾ALLOC2╼ 00 00 │ ..........╾──╼..
- 0x90 │ ╾ALLOC3+0x63╼ 00 00 00 00 00 00 00 00 00 00 00 00 │ ╾──╼............
+ 0x90 │ ╾ALLOC3+0x63<imm>╼ 00 00 00 00 00 00 00 00 00 00 00 00 │ ╾──╼............
0xa0 │ 00 00 00 00 00 00 00 00 │ ........
}
diff --git a/tests/mir-opt/const_allocation3.main.ConstProp.after.64bit.mir b/tests/mir-opt/const_allocation3.main.ConstProp.after.64bit.mir
index 6af0e3cbd..cdd4758e1 100644
--- a/tests/mir-opt/const_allocation3.main.ConstProp.after.64bit.mir
+++ b/tests/mir-opt/const_allocation3.main.ConstProp.after.64bit.mir
@@ -18,12 +18,12 @@ fn main() -> () {
}
ALLOC2 (static: FOO, size: 8, align: 8) {
- ╾ALLOC0╼ │ ╾──────╼
+ ╾ALLOC0<imm>╼ │ ╾──────╼
}
ALLOC0 (size: 180, align: 1) {
0x00 │ ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab │ ................
- 0x10 │ ab ab ab ab ab ab ab ab ab ab ab ab ╾──ALLOC3── │ ............╾───
+ 0x10 │ ab ab ab ab ab ab ab ab ab ab ab ab ╾ALLOC3<imm> (8 ptr bytes) │ ............╾───
0x20 │ ──────────╼ 01 ef cd ab 00 00 00 00 00 00 00 00 │ ───╼............
0x30 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
0x40 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
@@ -31,7 +31,7 @@ ALLOC0 (size: 180, align: 1) {
0x60 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
0x70 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
0x80 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ╾──── │ ..............╾─
- 0x90 │ ─────ALLOC4─────╼ 00 00 ╾ALLOC1+0x63╼ │ ─────╼..╾──────╼
+ 0x90 │ ─────ALLOC4─────╼ 00 00 ╾ALLOC1+0x63<imm>╼ │ ─────╼..╾──────╼
0xa0 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
0xb0 │ 00 00 00 00 │ ....
}
diff --git a/tests/mir-opt/const_prop/address_of_pair.rs b/tests/mir-opt/const_prop/address_of_pair.rs
index 169469a07..730ebe2ca 100644
--- a/tests/mir-opt/const_prop/address_of_pair.rs
+++ b/tests/mir-opt/const_prop/address_of_pair.rs
@@ -1,8 +1,21 @@
-// skip-filecheck
// unit-test: ConstProp
// EMIT_MIR address_of_pair.fn0.ConstProp.diff
pub fn fn0() -> bool {
+ // CHECK-LABEL: fn fn0(
+ // CHECK: debug pair => [[pair:_.*]];
+ // CHECK: debug ptr => [[ptr:_.*]];
+ // CHECK: debug ret => [[ret:_.*]];
+ // CHECK: (*[[ptr]]) = const true;
+ // CHECK-NOT: = const false;
+ // CHECK-NOT: = const true;
+ // CHECK: [[tmp:_.*]] = ([[pair]].1: bool);
+ // CHECK-NOT: = const false;
+ // CHECK-NOT: = const true;
+ // CHECK: [[ret]] = Not(move [[tmp]]);
+ // CHECK-NOT: = const false;
+ // CHECK-NOT: = const true;
+ // CHECK: _0 = [[ret]];
let mut pair = (1, false);
let ptr = core::ptr::addr_of_mut!(pair.1);
pair = (1, false);
diff --git a/tests/mir-opt/const_prop/aggregate.foo.PreCodegen.after.panic-abort.mir b/tests/mir-opt/const_prop/aggregate.foo.PreCodegen.after.panic-abort.mir
deleted file mode 100644
index b9c5859ca..000000000
--- a/tests/mir-opt/const_prop/aggregate.foo.PreCodegen.after.panic-abort.mir
+++ /dev/null
@@ -1,49 +0,0 @@
-// MIR for `foo` after PreCodegen
-
-fn foo(_1: u8) -> () {
- debug x => _1;
- let mut _0: ();
- let _2: i32;
- let mut _3: i32;
- let mut _4: (i32, u8);
- let mut _5: u8;
- let mut _7: i32;
- let mut _8: (u8, i32);
- let mut _9: u8;
- scope 1 {
- debug first => _2;
- let _6: i32;
- scope 2 {
- debug second => _6;
- }
- }
-
- bb0: {
- StorageLive(_2);
- StorageLive(_3);
- StorageLive(_4);
- StorageLive(_5);
- _5 = _1;
- _4 = (const 0_i32, move _5);
- StorageDead(_5);
- _3 = const 0_i32;
- _2 = const 1_i32;
- StorageDead(_3);
- StorageDead(_4);
- StorageLive(_6);
- StorageLive(_7);
- StorageLive(_8);
- StorageLive(_9);
- _9 = _1;
- _8 = (move _9, const 1_i32);
- StorageDead(_9);
- _7 = const 1_i32;
- _6 = const 3_i32;
- StorageDead(_7);
- StorageDead(_8);
- _0 = const ();
- StorageDead(_6);
- StorageDead(_2);
- return;
- }
-}
diff --git a/tests/mir-opt/const_prop/aggregate.foo.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/const_prop/aggregate.foo.PreCodegen.after.panic-unwind.mir
deleted file mode 100644
index b9c5859ca..000000000
--- a/tests/mir-opt/const_prop/aggregate.foo.PreCodegen.after.panic-unwind.mir
+++ /dev/null
@@ -1,49 +0,0 @@
-// MIR for `foo` after PreCodegen
-
-fn foo(_1: u8) -> () {
- debug x => _1;
- let mut _0: ();
- let _2: i32;
- let mut _3: i32;
- let mut _4: (i32, u8);
- let mut _5: u8;
- let mut _7: i32;
- let mut _8: (u8, i32);
- let mut _9: u8;
- scope 1 {
- debug first => _2;
- let _6: i32;
- scope 2 {
- debug second => _6;
- }
- }
-
- bb0: {
- StorageLive(_2);
- StorageLive(_3);
- StorageLive(_4);
- StorageLive(_5);
- _5 = _1;
- _4 = (const 0_i32, move _5);
- StorageDead(_5);
- _3 = const 0_i32;
- _2 = const 1_i32;
- StorageDead(_3);
- StorageDead(_4);
- StorageLive(_6);
- StorageLive(_7);
- StorageLive(_8);
- StorageLive(_9);
- _9 = _1;
- _8 = (move _9, const 1_i32);
- StorageDead(_9);
- _7 = const 1_i32;
- _6 = const 3_i32;
- StorageDead(_7);
- StorageDead(_8);
- _0 = const ();
- StorageDead(_6);
- StorageDead(_2);
- return;
- }
-}
diff --git a/tests/mir-opt/const_prop/aggregate.main.PreCodegen.after.panic-abort.mir b/tests/mir-opt/const_prop/aggregate.main.PreCodegen.after.panic-abort.mir
deleted file mode 100644
index 44a85a563..000000000
--- a/tests/mir-opt/const_prop/aggregate.main.PreCodegen.after.panic-abort.mir
+++ /dev/null
@@ -1,36 +0,0 @@
-// MIR for `main` after PreCodegen
-
-fn main() -> () {
- let mut _0: ();
- let _1: u8;
- let mut _2: u8;
- let mut _3: (i32, u8, i32);
- let _4: ();
- let mut _5: u8;
- scope 1 {
- debug x => _1;
- }
-
- bb0: {
- StorageLive(_1);
- StorageLive(_2);
- StorageLive(_3);
- _3 = (const 0_i32, const 1_u8, const 2_i32);
- _2 = const 1_u8;
- _1 = const 1_u8;
- StorageDead(_2);
- StorageDead(_3);
- StorageLive(_4);
- StorageLive(_5);
- _5 = const 1_u8;
- _4 = foo(const 1_u8) -> [return: bb1, unwind unreachable];
- }
-
- bb1: {
- StorageDead(_5);
- StorageDead(_4);
- _0 = const ();
- StorageDead(_1);
- return;
- }
-}
diff --git a/tests/mir-opt/const_prop/aggregate.main.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/const_prop/aggregate.main.PreCodegen.after.panic-unwind.mir
deleted file mode 100644
index 2c7bdbb50..000000000
--- a/tests/mir-opt/const_prop/aggregate.main.PreCodegen.after.panic-unwind.mir
+++ /dev/null
@@ -1,36 +0,0 @@
-// MIR for `main` after PreCodegen
-
-fn main() -> () {
- let mut _0: ();
- let _1: u8;
- let mut _2: u8;
- let mut _3: (i32, u8, i32);
- let _4: ();
- let mut _5: u8;
- scope 1 {
- debug x => _1;
- }
-
- bb0: {
- StorageLive(_1);
- StorageLive(_2);
- StorageLive(_3);
- _3 = (const 0_i32, const 1_u8, const 2_i32);
- _2 = const 1_u8;
- _1 = const 1_u8;
- StorageDead(_2);
- StorageDead(_3);
- StorageLive(_4);
- StorageLive(_5);
- _5 = const 1_u8;
- _4 = foo(const 1_u8) -> [return: bb1, unwind continue];
- }
-
- bb1: {
- StorageDead(_5);
- StorageDead(_4);
- _0 = const ();
- StorageDead(_1);
- return;
- }
-}
diff --git a/tests/mir-opt/const_prop/aggregate.rs b/tests/mir-opt/const_prop/aggregate.rs
index 2e043af08..fa716b084 100644
--- a/tests/mir-opt/const_prop/aggregate.rs
+++ b/tests/mir-opt/const_prop/aggregate.rs
@@ -1,19 +1,29 @@
-// skip-filecheck
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// unit-test: ConstProp
// compile-flags: -O
// EMIT_MIR aggregate.main.ConstProp.diff
-// EMIT_MIR aggregate.main.PreCodegen.after.mir
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: debug x => [[x:_.*]];
+ // CHECK-NOT: = Add(
+ // CHECK: [[x]] = const 1_u8;
+ // CHECK-NOT: = Add(
+ // CHECK: foo(const 1_u8)
let x = (0, 1, 2).1 + 0;
foo(x);
}
+// Verify that we still propagate if part of the aggregate is not known.
// EMIT_MIR aggregate.foo.ConstProp.diff
-// EMIT_MIR aggregate.foo.PreCodegen.after.mir
fn foo(x: u8) {
- // Verify that we still propagate if part of the aggregate is not known.
+ // CHECK-LABEL: fn foo(
+ // CHECK: debug first => [[first:_.*]];
+ // CHECK: debug second => [[second:_.*]];
+ // CHECK-NOT: = Add(
+ // CHECK: [[first]] = const 1_i32;
+ // CHECK-NOT: = Add(
+ // CHECK: [[second]] = const 3_i32;
let first = (0, x).0 + 1;
let second = (x, 1).1 + 2;
}
diff --git a/tests/mir-opt/const_prop/array_index.rs b/tests/mir-opt/const_prop/array_index.rs
index 3bd232165..c4c46d78f 100644
--- a/tests/mir-opt/const_prop/array_index.rs
+++ b/tests/mir-opt/const_prop/array_index.rs
@@ -1,9 +1,11 @@
-// skip-filecheck
-// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// unit-test: ConstProp
+// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// EMIT_MIR_FOR_EACH_BIT_WIDTH
// EMIT_MIR array_index.main.ConstProp.diff
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: debug x => [[x:_.*]];
+ // CHECK: [[x]] = const 2_u32;
let x: u32 = [0, 1, 2, 3][2];
}
diff --git a/tests/mir-opt/const_prop/bad_op_div_by_zero.rs b/tests/mir-opt/const_prop/bad_op_div_by_zero.rs
index ab41f64a5..0e8765a07 100644
--- a/tests/mir-opt/const_prop/bad_op_div_by_zero.rs
+++ b/tests/mir-opt/const_prop/bad_op_div_by_zero.rs
@@ -1,9 +1,15 @@
-// skip-filecheck
-// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// unit-test: ConstProp
+// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+
// EMIT_MIR bad_op_div_by_zero.main.ConstProp.diff
#[allow(unconditional_panic)]
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: debug y => [[y:_.*]];
+ // CHECK: debug _z => [[z:_.*]];
+ // CHECK: assert(!const true, "attempt to divide `{}` by zero", const 1_i32)
+ // CHECK: assert(!const false, "attempt to compute `{} / {}`, which would overflow", const 1_i32, const 0_i32)
+ // CHECK: [[z]] = Div(const 1_i32, const 0_i32);
let y = 0;
let _z = 1 / y;
}
diff --git a/tests/mir-opt/const_prop/bad_op_mod_by_zero.rs b/tests/mir-opt/const_prop/bad_op_mod_by_zero.rs
index e747b21cf..d895d9e21 100644
--- a/tests/mir-opt/const_prop/bad_op_mod_by_zero.rs
+++ b/tests/mir-opt/const_prop/bad_op_mod_by_zero.rs
@@ -1,9 +1,16 @@
-// skip-filecheck
// unit-test: ConstProp
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+
// EMIT_MIR bad_op_mod_by_zero.main.ConstProp.diff
#[allow(unconditional_panic)]
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: debug y => [[y:_.*]];
+ // CHECK: debug _z => [[z:_.*]];
+ // CHECK: assert(!const true, "attempt to calculate the remainder of `{}` with a divisor of
+ // zero", const 1_i32)
+ // CHECK: assert(!const false, "attempt to compute the remainder of `{} % {}`, which would overflow", const 1_i32, const 0_i32)
+ // CHECK: [[z]] = Rem(const 1_i32, const 0_i32);
let y = 0;
let _z = 1 % y;
}
diff --git a/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs b/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs
index 38c97a4cf..266105c11 100644
--- a/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs
+++ b/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs
@@ -1,4 +1,3 @@
-// skip-filecheck
// unit-test: ConstProp
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// EMIT_MIR_FOR_EACH_BIT_WIDTH
@@ -6,6 +5,10 @@
// EMIT_MIR bad_op_unsafe_oob_for_slices.main.ConstProp.diff
#[allow(unconditional_panic)]
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: debug a => [[a:_.*]];
+ // CHECK: debug _b => [[b:_.*]];
+ // CHECK: [[b]] = (*[[a]])[3 of 4];
let a: *const [_] = &[1, 2, 3];
unsafe {
let _b = (*a)[3];
diff --git a/tests/mir-opt/const_prop/boolean_identities.rs b/tests/mir-opt/const_prop/boolean_identities.rs
index 781cce8c7..2aa038034 100644
--- a/tests/mir-opt/const_prop/boolean_identities.rs
+++ b/tests/mir-opt/const_prop/boolean_identities.rs
@@ -1,10 +1,16 @@
-// skip-filecheck
// unit-test: ConstProp
-// compile-flags: -O -Zmir-opt-level=4
// EMIT_MIR boolean_identities.test.ConstProp.diff
pub fn test(x: bool, y: bool) -> bool {
- (y | true) & (x & false)
+ // CHECK-LABEL: fn test(
+ // CHECK: debug a => [[a:_.*]];
+ // CHECK: debug b => [[b:_.*]];
+ // CHECK: [[a]] = const true;
+ // CHECK: [[b]] = const false;
+ // CHECK: _0 = const false;
+ let a = (y | true);
+ let b = (x & false);
+ a & b
}
fn main() {
diff --git a/tests/mir-opt/const_prop/boolean_identities.test.ConstProp.diff b/tests/mir-opt/const_prop/boolean_identities.test.ConstProp.diff
index d80534199..41e1acdff 100644
--- a/tests/mir-opt/const_prop/boolean_identities.test.ConstProp.diff
+++ b/tests/mir-opt/const_prop/boolean_identities.test.ConstProp.diff
@@ -5,20 +5,42 @@
debug x => _1;
debug y => _2;
let mut _0: bool;
- let mut _3: bool;
+ let _3: bool;
let mut _4: bool;
- let mut _5: bool;
let mut _6: bool;
+ let mut _7: bool;
+ let mut _8: bool;
+ scope 1 {
+ debug a => _3;
+ let _5: bool;
+ scope 2 {
+ debug b => _5;
+ }
+ }
bb0: {
StorageLive(_3);
-- _3 = BitOr(_2, const true);
+ StorageLive(_4);
+ _4 = _2;
+- _3 = BitOr(move _4, const true);
+ _3 = const true;
+ StorageDead(_4);
StorageLive(_5);
-- _5 = BitAnd(_1, const false);
-- _0 = BitAnd(move _3, move _5);
+ StorageLive(_6);
+ _6 = _1;
+- _5 = BitAnd(move _6, const false);
+ _5 = const false;
+ StorageDead(_6);
+ StorageLive(_7);
+- _7 = _3;
++ _7 = const true;
+ StorageLive(_8);
+- _8 = _5;
+- _0 = BitAnd(move _7, move _8);
++ _8 = const false;
+ _0 = const false;
+ StorageDead(_8);
+ StorageDead(_7);
StorageDead(_5);
StorageDead(_3);
return;
diff --git a/tests/mir-opt/const_prop/boxes.rs b/tests/mir-opt/const_prop/boxes.rs
index c6807ece1..90a8e33e8 100644
--- a/tests/mir-opt/const_prop/boxes.rs
+++ b/tests/mir-opt/const_prop/boxes.rs
@@ -1,4 +1,3 @@
-// skip-filecheck
// unit-test: ConstProp
// compile-flags: -O
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
@@ -9,6 +8,11 @@
// EMIT_MIR boxes.main.ConstProp.diff
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: debug x => [[x:_.*]];
+ // CHECK: (*{{_.*}}) = const 42_i32;
+ // CHECK: [[tmp:_.*]] = (*{{_.*}});
+ // CHECK: [[x]] = Add(move [[tmp]], const 0_i32);
let x = *(#[rustc_box]
Box::new(42))
+ 0;
diff --git a/tests/mir-opt/const_prop/cast.rs b/tests/mir-opt/const_prop/cast.rs
index 3d543bada..b81c2740a 100644
--- a/tests/mir-opt/const_prop/cast.rs
+++ b/tests/mir-opt/const_prop/cast.rs
@@ -1,9 +1,12 @@
-// skip-filecheck
// unit-test: ConstProp
// EMIT_MIR cast.main.ConstProp.diff
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: debug x => [[x:_.*]];
+ // CHECK: debug y => [[y:_.*]];
+ // CHECK: [[x]] = const 42_u32;
+ // CHECK: [[y]] = const 42_u8;
let x = 42u8 as u32;
-
let y = 42u32 as u8;
}
diff --git a/tests/mir-opt/const_prop/checked_add.rs b/tests/mir-opt/const_prop/checked_add.rs
index 6a53aced0..571a5cc4e 100644
--- a/tests/mir-opt/const_prop/checked_add.rs
+++ b/tests/mir-opt/const_prop/checked_add.rs
@@ -1,9 +1,12 @@
-// skip-filecheck
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// unit-test: ConstProp
// compile-flags: -C overflow-checks=on
// EMIT_MIR checked_add.main.ConstProp.diff
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: debug x => [[x:_.*]];
+ // CHECK: assert(!const false,
+ // CHECK: [[x]] = const 2_u32;
let x: u32 = 1 + 1;
}
diff --git a/tests/mir-opt/const_prop/const_prop_fails_gracefully.rs b/tests/mir-opt/const_prop/const_prop_fails_gracefully.rs
deleted file mode 100644
index 5bd4731bf..000000000
--- a/tests/mir-opt/const_prop/const_prop_fails_gracefully.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// skip-filecheck
-// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
-// unit-test: ConstProp
-#[inline(never)]
-fn read(_: usize) { }
-
-// EMIT_MIR const_prop_fails_gracefully.main.ConstProp.diff
-fn main() {
- const FOO: &i32 = &1;
- let x = FOO as *const i32 as usize;
- read(x);
-}
diff --git a/tests/mir-opt/const_prop/discriminant.rs b/tests/mir-opt/const_prop/discriminant.rs
index 11405f38b..0ed683d62 100644
--- a/tests/mir-opt/const_prop/discriminant.rs
+++ b/tests/mir-opt/const_prop/discriminant.rs
@@ -1,6 +1,4 @@
-// skip-filecheck
// unit-test: ConstProp
-// compile-flags: -O
// FIXME(wesleywiser): Ideally, we could const-prop away all of this and just be left with
// `let x = 42` but that doesn't work because const-prop doesn't support `Operand::Indirect`
@@ -10,5 +8,18 @@
// EMIT_MIR_FOR_EACH_BIT_WIDTH
// EMIT_MIR discriminant.main.ConstProp.diff
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: bb0: {
+ // CHECK: switchInt(const 1_isize) -> [1: bb1, otherwise: bb3];
+ // CHECK: bb1: {
+ // CHECK: switchInt(const true) -> [0: bb3, otherwise: bb2];
+ // CHECK: bb2: {
+ // CHECK: [[tmp:_.*]] = const 42_i32;
+ // CHECK: goto -> bb4;
+ // CHECK: bb3: {
+ // CHECK: [[tmp]] = const 10_i32;
+ // CHECK: goto -> bb4;
+ // CHECK: bb4: {
+ // CHECK: {{_.*}} = Add(move [[tmp]], const 0_i32);
let x = (if let Some(true) = Some(true) { 42 } else { 10 }) + 0;
}
diff --git a/tests/mir-opt/const_prop/indirect.rs b/tests/mir-opt/const_prop/indirect.rs
index 0e6e1d78d..d3c42e3eb 100644
--- a/tests/mir-opt/const_prop/indirect.rs
+++ b/tests/mir-opt/const_prop/indirect.rs
@@ -1,9 +1,11 @@
-// skip-filecheck
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// unit-test: ConstProp
// compile-flags: -C overflow-checks=on
// EMIT_MIR indirect.main.ConstProp.diff
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: debug x => [[x:_.*]];
+ // CHECK: [[x]] = const 3_u8;
let x = (2u32 as u8) + 1;
}
diff --git a/tests/mir-opt/const_prop/inherit_overflow.main.ConstProp.panic-abort.diff b/tests/mir-opt/const_prop/inherit_overflow.main.ConstProp.panic-abort.diff
index b30deb2a4..11cdf9e09 100644
--- a/tests/mir-opt/const_prop/inherit_overflow.main.ConstProp.panic-abort.diff
+++ b/tests/mir-opt/const_prop/inherit_overflow.main.ConstProp.panic-abort.diff
@@ -8,7 +8,7 @@
let mut _3: u8;
scope 1 {
}
- scope 2 (inlined <u8 as Add>::add) {
+ scope 2 (inlined #[track_caller] <u8 as Add>::add) {
debug self => _2;
debug other => _3;
let mut _4: (u8, bool);
diff --git a/tests/mir-opt/const_prop/inherit_overflow.main.ConstProp.panic-unwind.diff b/tests/mir-opt/const_prop/inherit_overflow.main.ConstProp.panic-unwind.diff
index 47c51196c..181a2f287 100644
--- a/tests/mir-opt/const_prop/inherit_overflow.main.ConstProp.panic-unwind.diff
+++ b/tests/mir-opt/const_prop/inherit_overflow.main.ConstProp.panic-unwind.diff
@@ -8,7 +8,7 @@
let mut _3: u8;
scope 1 {
}
- scope 2 (inlined <u8 as Add>::add) {
+ scope 2 (inlined #[track_caller] <u8 as Add>::add) {
debug self => _2;
debug other => _3;
let mut _4: (u8, bool);
diff --git a/tests/mir-opt/const_prop/inherit_overflow.rs b/tests/mir-opt/const_prop/inherit_overflow.rs
index 41989462d..5b561ae14 100644
--- a/tests/mir-opt/const_prop/inherit_overflow.rs
+++ b/tests/mir-opt/const_prop/inherit_overflow.rs
@@ -1,11 +1,14 @@
-// skip-filecheck
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// unit-test: ConstProp
// compile-flags: -Zmir-enable-passes=+Inline
+// After inlining, this will contain a `CheckedBinaryOp`.
+// Propagating the overflow is ok as codegen will just skip emitting the panic.
// EMIT_MIR inherit_overflow.main.ConstProp.diff
fn main() {
- // After inlining, this will contain a `CheckedBinaryOp`.
- // Propagating the overflow is ok as codegen will just skip emitting the panic.
+ // CHECK-LABEL: fn main(
+ // CHECK: {{_.*}} = const (0_u8, true);
+ // CHECK: assert(!const true,
+ // CHECK: {{_.*}} = const 0_u8;
let _ = <u8 as std::ops::Add>::add(255, 1);
}
diff --git a/tests/mir-opt/const_prop/issue_66971.main.ConstProp.panic-abort.diff b/tests/mir-opt/const_prop/issue_66971.main.ConstProp.panic-abort.diff
index 6484b4b67..ff93c85e5 100644
--- a/tests/mir-opt/const_prop/issue_66971.main.ConstProp.panic-abort.diff
+++ b/tests/mir-opt/const_prop/issue_66971.main.ConstProp.panic-abort.diff
@@ -5,17 +5,24 @@
let mut _0: ();
let _1: ();
let mut _2: ((), u8, u8);
+ let mut _3: ();
bb0: {
+ StorageLive(_1);
StorageLive(_2);
-- _2 = (const (), const 0_u8, const 0_u8);
-- _1 = encode(move _2) -> [return: bb1, unwind unreachable];
+ StorageLive(_3);
+ _3 = ();
+- _2 = (move _3, const 0_u8, const 0_u8);
+ _2 = const ((), 0_u8, 0_u8);
+ StorageDead(_3);
+- _1 = encode(move _2) -> [return: bb1, unwind unreachable];
+ _1 = encode(const ((), 0_u8, 0_u8)) -> [return: bb1, unwind unreachable];
}
bb1: {
StorageDead(_2);
+ StorageDead(_1);
+ _0 = const ();
return;
}
+ }
diff --git a/tests/mir-opt/const_prop/issue_66971.main.ConstProp.panic-unwind.diff b/tests/mir-opt/const_prop/issue_66971.main.ConstProp.panic-unwind.diff
index b02f04078..8790aad45 100644
--- a/tests/mir-opt/const_prop/issue_66971.main.ConstProp.panic-unwind.diff
+++ b/tests/mir-opt/const_prop/issue_66971.main.ConstProp.panic-unwind.diff
@@ -5,17 +5,24 @@
let mut _0: ();
let _1: ();
let mut _2: ((), u8, u8);
+ let mut _3: ();
bb0: {
+ StorageLive(_1);
StorageLive(_2);
-- _2 = (const (), const 0_u8, const 0_u8);
-- _1 = encode(move _2) -> [return: bb1, unwind continue];
+ StorageLive(_3);
+ _3 = ();
+- _2 = (move _3, const 0_u8, const 0_u8);
+ _2 = const ((), 0_u8, 0_u8);
+ StorageDead(_3);
+- _1 = encode(move _2) -> [return: bb1, unwind continue];
+ _1 = encode(const ((), 0_u8, 0_u8)) -> [return: bb1, unwind continue];
}
bb1: {
StorageDead(_2);
+ StorageDead(_1);
+ _0 = const ();
return;
}
+ }
diff --git a/tests/mir-opt/const_prop/issue_66971.rs b/tests/mir-opt/const_prop/issue_66971.rs
index 386c95b5b..49d598ff2 100644
--- a/tests/mir-opt/const_prop/issue_66971.rs
+++ b/tests/mir-opt/const_prop/issue_66971.rs
@@ -1,7 +1,5 @@
-// skip-filecheck
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// unit-test: ConstProp
-// compile-flags: -Z mir-opt-level=3
// Due to a bug in propagating scalar pairs the assertion below used to fail. In the expected
// outputs below, after ConstProp this is how _2 would look like with the bug:
@@ -16,5 +14,7 @@ fn encode(this: ((), u8, u8)) {
// EMIT_MIR issue_66971.main.ConstProp.diff
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: = encode(const ((), 0_u8, 0_u8))
encode(((), 0, 0));
}
diff --git a/tests/mir-opt/const_prop/issue_67019.main.ConstProp.panic-abort.diff b/tests/mir-opt/const_prop/issue_67019.main.ConstProp.panic-abort.diff
index c1ef453e9..3de9cdd79 100644
--- a/tests/mir-opt/const_prop/issue_67019.main.ConstProp.panic-abort.diff
+++ b/tests/mir-opt/const_prop/issue_67019.main.ConstProp.panic-abort.diff
@@ -8,6 +8,7 @@
let mut _3: (u8, u8);
bb0: {
+ StorageLive(_1);
StorageLive(_2);
StorageLive(_3);
- _3 = (const 1_u8, const 2_u8);
@@ -21,6 +22,8 @@
bb1: {
StorageDead(_2);
+ StorageDead(_1);
+ _0 = const ();
return;
}
+ }
diff --git a/tests/mir-opt/const_prop/issue_67019.main.ConstProp.panic-unwind.diff b/tests/mir-opt/const_prop/issue_67019.main.ConstProp.panic-unwind.diff
index 53cdcc181..72cf48b5c 100644
--- a/tests/mir-opt/const_prop/issue_67019.main.ConstProp.panic-unwind.diff
+++ b/tests/mir-opt/const_prop/issue_67019.main.ConstProp.panic-unwind.diff
@@ -8,6 +8,7 @@
let mut _3: (u8, u8);
bb0: {
+ StorageLive(_1);
StorageLive(_2);
StorageLive(_3);
- _3 = (const 1_u8, const 2_u8);
@@ -21,6 +22,8 @@
bb1: {
StorageDead(_2);
+ StorageDead(_1);
+ _0 = const ();
return;
}
+ }
diff --git a/tests/mir-opt/const_prop/issue_67019.rs b/tests/mir-opt/const_prop/issue_67019.rs
index 2f61298bb..f0a09e6e8 100644
--- a/tests/mir-opt/const_prop/issue_67019.rs
+++ b/tests/mir-opt/const_prop/issue_67019.rs
@@ -1,7 +1,5 @@
-// skip-filecheck
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// unit-test: ConstProp
-// compile-flags: -Z mir-opt-level=3
// This used to ICE in const-prop
@@ -11,5 +9,7 @@ fn test(this: ((u8, u8),)) {
// EMIT_MIR issue_67019.main.ConstProp.diff
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: = test(const ((1_u8, 2_u8),))
test(((1, 2),));
}
diff --git a/tests/mir-opt/const_prop/mult_by_zero.rs b/tests/mir-opt/const_prop/mult_by_zero.rs
index 47e15205e..2e9c63a1c 100644
--- a/tests/mir-opt/const_prop/mult_by_zero.rs
+++ b/tests/mir-opt/const_prop/mult_by_zero.rs
@@ -1,9 +1,10 @@
-// skip-filecheck
// unit-test: ConstProp
// EMIT_MIR mult_by_zero.test.ConstProp.diff
-fn test(x : i32) -> i32 {
- x * 0
+fn test(x: i32) -> i32 {
+ // CHECK: fn test(
+ // CHECK: _0 = const 0_i32;
+ x * 0
}
fn main() {
diff --git a/tests/mir-opt/const_prop/mutable_variable.rs b/tests/mir-opt/const_prop/mutable_variable.rs
index 175d63d46..6c74ea5b9 100644
--- a/tests/mir-opt/const_prop/mutable_variable.rs
+++ b/tests/mir-opt/const_prop/mutable_variable.rs
@@ -1,8 +1,13 @@
-// skip-filecheck
// unit-test: ConstProp
// EMIT_MIR mutable_variable.main.ConstProp.diff
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: debug x => [[x:_.*]];
+ // CHECK: debug y => [[y:_.*]];
+ // CHECK: [[x]] = const 42_i32;
+ // CHECK: [[x]] = const 99_i32;
+ // CHECK: [[y]] = const 99_i32;
let mut x = 42;
x = 99;
let y = x;
diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate.rs b/tests/mir-opt/const_prop/mutable_variable_aggregate.rs
index f926771ae..a38296502 100644
--- a/tests/mir-opt/const_prop/mutable_variable_aggregate.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_aggregate.rs
@@ -1,8 +1,13 @@
-// skip-filecheck
// unit-test: ConstProp
// EMIT_MIR mutable_variable_aggregate.main.ConstProp.diff
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: debug x => [[x:_.*]];
+ // CHECK: debug y => [[y:_.*]];
+ // CHECK: [[x]] = const (42_i32, 43_i32);
+ // CHECK: ([[x]].1: i32) = const 99_i32;
+ // CHECK: [[y]] = const (42_i32, 99_i32);
let mut x = (42, 43);
x.1 = 99;
let y = x;
diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs b/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs
index a81aa7b49..60f414ae2 100644
--- a/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs
@@ -1,8 +1,15 @@
-// skip-filecheck
// unit-test: ConstProp
// EMIT_MIR mutable_variable_aggregate_mut_ref.main.ConstProp.diff
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: debug x => [[x:_.*]];
+ // CHECK: debug z => [[z:_.*]];
+ // CHECK: debug y => [[y:_.*]];
+ // CHECK: [[x]] = (const 42_i32, const 43_i32);
+ // CHECK: [[z]] = &mut [[x]];
+ // CHECK: ((*[[z]]).1: i32) = const 99_i32;
+ // CHECK: [[y]] = [[x]];
let mut x = (42, 43);
let z = &mut x;
z.1 = 99;
diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs b/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs
index 54a5d9223..888fcde2d 100644
--- a/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs
@@ -1,9 +1,15 @@
-// skip-filecheck
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// unit-test: ConstProp
// EMIT_MIR mutable_variable_aggregate_partial_read.main.ConstProp.diff
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: debug x => [[x:_.*]];
+ // CHECK: debug y => [[y:_.*]];
+ // CHECK: [[x]] = foo()
+ // CHECK: ([[x]].1: i32) = const 99_i32;
+ // CHECK: ([[x]].0: i32) = const 42_i32;
+ // CHECK: [[y]] = const 99_i32;
let mut x: (i32, i32) = foo();
x.1 = 99;
x.0 = 42;
diff --git a/tests/mir-opt/const_prop/mutable_variable_no_prop.rs b/tests/mir-opt/const_prop/mutable_variable_no_prop.rs
index a7aeeccd8..49e9a7015 100644
--- a/tests/mir-opt/const_prop/mutable_variable_no_prop.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_no_prop.rs
@@ -1,10 +1,17 @@
-// skip-filecheck
// unit-test: ConstProp
+// Verify that we do not propagate the contents of this mutable static.
static mut STATIC: u32 = 0x42424242;
// EMIT_MIR mutable_variable_no_prop.main.ConstProp.diff
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: debug x => [[x:_.*]];
+ // CHECK: debug y => [[y:_.*]];
+ // CHECK: [[x]] = const 42_u32;
+ // CHECK: [[tmp:_.*]] = (*{{_.*}});
+ // CHECK: [[x]] = move [[tmp]];
+ // CHECK: [[y]] = [[x]];
let mut x = 42;
unsafe {
x = STATIC;
diff --git a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs
index 6bdb136a9..04e347fc0 100644
--- a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs
@@ -1,14 +1,24 @@
-// skip-filecheck
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// unit-test: ConstProp
// EMIT_MIR mutable_variable_unprop_assign.main.ConstProp.diff
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: debug a => [[a:_.*]];
+ // CHECK: debug x => [[x:_.*]];
+ // CHECK: debug y => [[y:_.*]];
+ // CHECK: debug z => [[z:_.*]];
+ // CHECK: [[a]] = foo()
+ // CHECK: [[x]] = const (1_i32, 2_i32);
+ // CHECK: [[tmp:_.*]] = [[a]];
+ // CHECK: ([[x]].1: i32) = move [[tmp]];
+ // CHECK: [[y]] = ([[x]].1: i32);
+ // CHECK: [[z]] = const 1_i32;
let a = foo();
let mut x: (i32, i32) = (1, 2);
x.1 = a;
let y = x.1;
- let z = x.0; // this could theoretically be allowed, but we can't handle it right now
+ let z = x.0;
}
#[inline(never)]
diff --git a/tests/mir-opt/const_prop/const_prop_fails_gracefully.main.ConstProp.panic-abort.diff b/tests/mir-opt/const_prop/pointer_expose_address.main.ConstProp.panic-abort.diff
index bd1de7476..bd1de7476 100644
--- a/tests/mir-opt/const_prop/const_prop_fails_gracefully.main.ConstProp.panic-abort.diff
+++ b/tests/mir-opt/const_prop/pointer_expose_address.main.ConstProp.panic-abort.diff
diff --git a/tests/mir-opt/const_prop/const_prop_fails_gracefully.main.ConstProp.panic-unwind.diff b/tests/mir-opt/const_prop/pointer_expose_address.main.ConstProp.panic-unwind.diff
index 850b743fe..850b743fe 100644
--- a/tests/mir-opt/const_prop/const_prop_fails_gracefully.main.ConstProp.panic-unwind.diff
+++ b/tests/mir-opt/const_prop/pointer_expose_address.main.ConstProp.panic-unwind.diff
diff --git a/tests/mir-opt/const_prop/pointer_expose_address.rs b/tests/mir-opt/const_prop/pointer_expose_address.rs
new file mode 100644
index 000000000..631aac901
--- /dev/null
+++ b/tests/mir-opt/const_prop/pointer_expose_address.rs
@@ -0,0 +1,18 @@
+// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+// unit-test: ConstProp
+
+#[inline(never)]
+fn read(_: usize) { }
+
+// EMIT_MIR pointer_expose_address.main.ConstProp.diff
+fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: [[ptr:_.*]] = const _;
+ // CHECK: [[ref:_.*]] = &raw const (*[[ptr]]);
+ // CHECK: [[x:_.*]] = move [[ref]] as usize (PointerExposeAddress);
+ // CHECK: [[arg:_.*]] = [[x]];
+ // CHECK: = read(move [[arg]])
+ const FOO: &i32 = &1;
+ let x = FOO as *const i32 as usize;
+ read(x);
+}
diff --git a/tests/mir-opt/const_prop/read_immutable_static.rs b/tests/mir-opt/const_prop/read_immutable_static.rs
index a8d8cfacc..0fa18dd10 100644
--- a/tests/mir-opt/const_prop/read_immutable_static.rs
+++ b/tests/mir-opt/const_prop/read_immutable_static.rs
@@ -1,9 +1,11 @@
-// skip-filecheck
// unit-test: ConstProp
static FOO: u8 = 2;
// EMIT_MIR read_immutable_static.main.ConstProp.diff
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: debug x => [[x:_.*]];
+ // CHECK: [[x]] = const 4_u8;
let x = FOO + FOO;
}
diff --git a/tests/mir-opt/const_prop/ref_deref.main.ConstProp.diff b/tests/mir-opt/const_prop/ref_deref.main.ConstProp.diff
index 6b897a881..a54ae8d2f 100644
--- a/tests/mir-opt/const_prop/ref_deref.main.ConstProp.diff
+++ b/tests/mir-opt/const_prop/ref_deref.main.ConstProp.diff
@@ -7,6 +7,9 @@
let mut _2: &i32;
let _3: i32;
let mut _4: &i32;
+ scope 1 {
+ debug a => _1;
+ }
bb0: {
StorageLive(_1);
@@ -15,8 +18,8 @@
_2 = &(*_4);
_1 = (*_2);
StorageDead(_2);
- StorageDead(_1);
_0 = const ();
+ StorageDead(_1);
return;
}
}
diff --git a/tests/mir-opt/const_prop/ref_deref.rs b/tests/mir-opt/const_prop/ref_deref.rs
index f2fa024f7..5bceae749 100644
--- a/tests/mir-opt/const_prop/ref_deref.rs
+++ b/tests/mir-opt/const_prop/ref_deref.rs
@@ -1,7 +1,9 @@
-// skip-filecheck
// unit-test: ConstProp
-// EMIT_MIR ref_deref.main.ConstProp.diff
+// EMIT_MIR ref_deref.main.ConstProp.diff
fn main() {
- *(&4);
+ // CHECK-LABEL: fn main(
+ // CHECK: debug a => [[a:_.*]];
+ // CHECK: [[a]] = (*{{_.*}});
+ let a = *(&4);
}
diff --git a/tests/mir-opt/const_prop/ref_deref_project.main.ConstProp.diff b/tests/mir-opt/const_prop/ref_deref_project.main.ConstProp.diff
index 7f6161665..05a4e1774 100644
--- a/tests/mir-opt/const_prop/ref_deref_project.main.ConstProp.diff
+++ b/tests/mir-opt/const_prop/ref_deref_project.main.ConstProp.diff
@@ -7,6 +7,9 @@
let mut _2: &i32;
let _3: (i32, i32);
let mut _4: &(i32, i32);
+ scope 1 {
+ debug a => _1;
+ }
bb0: {
StorageLive(_1);
@@ -15,8 +18,8 @@
_2 = &((*_4).1: i32);
_1 = (*_2);
StorageDead(_2);
- StorageDead(_1);
_0 = const ();
+ StorageDead(_1);
return;
}
}
diff --git a/tests/mir-opt/const_prop/ref_deref_project.rs b/tests/mir-opt/const_prop/ref_deref_project.rs
index 1b9e0acb2..4b5c67303 100644
--- a/tests/mir-opt/const_prop/ref_deref_project.rs
+++ b/tests/mir-opt/const_prop/ref_deref_project.rs
@@ -1,7 +1,10 @@
-// skip-filecheck
+// This does not currently propagate (#67862)
// unit-test: ConstProp
-// EMIT_MIR ref_deref_project.main.ConstProp.diff
+// EMIT_MIR ref_deref_project.main.ConstProp.diff
fn main() {
- *(&(4, 5).1); // This does not currently propagate (#67862)
+ // CHECK-LABEL: fn main(
+ // CHECK: debug a => [[a:_.*]];
+ // CHECK: [[a]] = (*{{_.*}});
+ let a = *(&(4, 5).1);
}
diff --git a/tests/mir-opt/const_prop/reify_fn_ptr.rs b/tests/mir-opt/const_prop/reify_fn_ptr.rs
index da7de80c5..33fdd4142 100644
--- a/tests/mir-opt/const_prop/reify_fn_ptr.rs
+++ b/tests/mir-opt/const_prop/reify_fn_ptr.rs
@@ -1,7 +1,10 @@
-// skip-filecheck
// unit-test: ConstProp
// EMIT_MIR reify_fn_ptr.main.ConstProp.diff
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: [[ptr:_.*]] = main as fn() (PointerCoercion(ReifyFnPointer));
+ // CHECK: [[addr:_.*]] = move [[ptr]] as usize (PointerExposeAddress);
+ // CHECK: [[back:_.*]] = move [[addr]] as *const fn() (PointerFromExposedAddress);
let _ = main as usize as *const fn();
}
diff --git a/tests/mir-opt/const_prop/repeat.rs b/tests/mir-opt/const_prop/repeat.rs
index 92194d6bb..9f688bbb5 100644
--- a/tests/mir-opt/const_prop/repeat.rs
+++ b/tests/mir-opt/const_prop/repeat.rs
@@ -1,9 +1,11 @@
-// skip-filecheck
// unit-test: ConstProp
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// EMIT_MIR_FOR_EACH_BIT_WIDTH
// EMIT_MIR repeat.main.ConstProp.diff
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: debug x => [[x:_.*]];
+ // CHECK: [[x]] = const 42_u32;
let x: u32 = [42; 8][2] + 0;
}
diff --git a/tests/mir-opt/const_prop/return_place.rs b/tests/mir-opt/const_prop/return_place.rs
index 1263de793..286543abb 100644
--- a/tests/mir-opt/const_prop/return_place.rs
+++ b/tests/mir-opt/const_prop/return_place.rs
@@ -1,4 +1,3 @@
-// skip-filecheck
// unit-test: ConstProp
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// compile-flags: -C overflow-checks=on
@@ -6,6 +5,8 @@
// EMIT_MIR return_place.add.ConstProp.diff
// EMIT_MIR return_place.add.PreCodegen.before.mir
fn add() -> u32 {
+ // CHECK-LABEL: fn add(
+ // CHECK: _0 = const 4_u32;
2 + 2
}
diff --git a/tests/mir-opt/const_prop/scalar_literal_propagation.rs b/tests/mir-opt/const_prop/scalar_literal_propagation.rs
index 9dcddf7c7..782cd35d4 100644
--- a/tests/mir-opt/const_prop/scalar_literal_propagation.rs
+++ b/tests/mir-opt/const_prop/scalar_literal_propagation.rs
@@ -1,8 +1,10 @@
-// skip-filecheck
// unit-test: ConstProp
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+
// EMIT_MIR scalar_literal_propagation.main.ConstProp.diff
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: = consume(const 1_u32)
let x = 1;
consume(x);
}
diff --git a/tests/mir-opt/const_prop/slice_len.main.ConstProp.32bit.panic-abort.diff b/tests/mir-opt/const_prop/slice_len.main.ConstProp.32bit.panic-abort.diff
index c2e1288b4..7d5d036f4 100644
--- a/tests/mir-opt/const_prop/slice_len.main.ConstProp.32bit.panic-abort.diff
+++ b/tests/mir-opt/const_prop/slice_len.main.ConstProp.32bit.panic-abort.diff
@@ -12,6 +12,9 @@
let mut _7: usize;
let mut _8: bool;
let mut _9: &[u32; 3];
+ scope 1 {
+ debug a => _1;
+ }
bb0: {
StorageLive(_1);
@@ -39,8 +42,8 @@
StorageDead(_6);
StorageDead(_4);
StorageDead(_2);
- StorageDead(_1);
_0 = const ();
+ StorageDead(_1);
return;
}
}
diff --git a/tests/mir-opt/const_prop/slice_len.main.ConstProp.32bit.panic-unwind.diff b/tests/mir-opt/const_prop/slice_len.main.ConstProp.32bit.panic-unwind.diff
index 23646c3c9..fa4c5a71b 100644
--- a/tests/mir-opt/const_prop/slice_len.main.ConstProp.32bit.panic-unwind.diff
+++ b/tests/mir-opt/const_prop/slice_len.main.ConstProp.32bit.panic-unwind.diff
@@ -12,6 +12,9 @@
let mut _7: usize;
let mut _8: bool;
let mut _9: &[u32; 3];
+ scope 1 {
+ debug a => _1;
+ }
bb0: {
StorageLive(_1);
@@ -39,8 +42,8 @@
StorageDead(_6);
StorageDead(_4);
StorageDead(_2);
- StorageDead(_1);
_0 = const ();
+ StorageDead(_1);
return;
}
}
diff --git a/tests/mir-opt/const_prop/slice_len.main.ConstProp.64bit.panic-abort.diff b/tests/mir-opt/const_prop/slice_len.main.ConstProp.64bit.panic-abort.diff
index c2e1288b4..7d5d036f4 100644
--- a/tests/mir-opt/const_prop/slice_len.main.ConstProp.64bit.panic-abort.diff
+++ b/tests/mir-opt/const_prop/slice_len.main.ConstProp.64bit.panic-abort.diff
@@ -12,6 +12,9 @@
let mut _7: usize;
let mut _8: bool;
let mut _9: &[u32; 3];
+ scope 1 {
+ debug a => _1;
+ }
bb0: {
StorageLive(_1);
@@ -39,8 +42,8 @@
StorageDead(_6);
StorageDead(_4);
StorageDead(_2);
- StorageDead(_1);
_0 = const ();
+ StorageDead(_1);
return;
}
}
diff --git a/tests/mir-opt/const_prop/slice_len.main.ConstProp.64bit.panic-unwind.diff b/tests/mir-opt/const_prop/slice_len.main.ConstProp.64bit.panic-unwind.diff
index 23646c3c9..fa4c5a71b 100644
--- a/tests/mir-opt/const_prop/slice_len.main.ConstProp.64bit.panic-unwind.diff
+++ b/tests/mir-opt/const_prop/slice_len.main.ConstProp.64bit.panic-unwind.diff
@@ -12,6 +12,9 @@
let mut _7: usize;
let mut _8: bool;
let mut _9: &[u32; 3];
+ scope 1 {
+ debug a => _1;
+ }
bb0: {
StorageLive(_1);
@@ -39,8 +42,8 @@
StorageDead(_6);
StorageDead(_4);
StorageDead(_2);
- StorageDead(_1);
_0 = const ();
+ StorageDead(_1);
return;
}
}
diff --git a/tests/mir-opt/const_prop/slice_len.rs b/tests/mir-opt/const_prop/slice_len.rs
index 3b551b6b1..0bf442726 100644
--- a/tests/mir-opt/const_prop/slice_len.rs
+++ b/tests/mir-opt/const_prop/slice_len.rs
@@ -1,10 +1,13 @@
-// skip-filecheck
-// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// unit-test: ConstProp
// compile-flags: -Zmir-enable-passes=+InstSimplify
+// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// EMIT_MIR_FOR_EACH_BIT_WIDTH
// EMIT_MIR slice_len.main.ConstProp.diff
fn main() {
- (&[1u32, 2, 3] as &[u32])[1];
+ // CHECK-LABEL: fn main(
+ // CHECK: debug a => [[a:_.*]];
+ // CHECK: assert(const true,
+ // CHECK: [[a]] = const 2_u32;
+ let a = (&[1u32, 2, 3] as &[u32])[1];
}
diff --git a/tests/mir-opt/const_prop/switch_int.rs b/tests/mir-opt/const_prop/switch_int.rs
index 7ec56e11e..d1cbaae49 100644
--- a/tests/mir-opt/const_prop/switch_int.rs
+++ b/tests/mir-opt/const_prop/switch_int.rs
@@ -1,13 +1,20 @@
-// skip-filecheck
// unit-test: ConstProp
// compile-flags: -Zmir-enable-passes=+SimplifyConstCondition-after-const-prop
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+
#[inline(never)]
fn foo(_: i32) { }
// EMIT_MIR switch_int.main.ConstProp.diff
// EMIT_MIR switch_int.main.SimplifyConstCondition-after-const-prop.diff
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: bb0: {
+ // CHECK-NOT: switchInt(
+ // CHECK: goto -> [[bb:bb.*]];
+ // CHECK: [[bb]]: {
+ // CHECK-NOT: _0 = foo(const -1_i32)
+ // CHECK: _0 = foo(const 0_i32)
match 1 {
1 => foo(0),
_ => foo(-1),
diff --git a/tests/mir-opt/const_prop/tuple_literal_propagation.rs b/tests/mir-opt/const_prop/tuple_literal_propagation.rs
index e0bc6e1be..dfc4a6f3f 100644
--- a/tests/mir-opt/const_prop/tuple_literal_propagation.rs
+++ b/tests/mir-opt/const_prop/tuple_literal_propagation.rs
@@ -1,10 +1,11 @@
-// skip-filecheck
// unit-test: ConstProp
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// EMIT_MIR tuple_literal_propagation.main.ConstProp.diff
+
fn main() {
+ // CHECK-LABEL: fn main(
+ // CHECK: = consume(const (1_u32, 2_u32))
let x = (1, 2);
-
consume(x);
}
diff --git a/tests/mir-opt/const_prop/while_let_loops.rs b/tests/mir-opt/const_prop/while_let_loops.rs
index 39081c355..8b2a73438 100644
--- a/tests/mir-opt/const_prop/while_let_loops.rs
+++ b/tests/mir-opt/const_prop/while_let_loops.rs
@@ -1,8 +1,9 @@
-// skip-filecheck
// unit-test: ConstProp
// EMIT_MIR while_let_loops.change_loop_body.ConstProp.diff
pub fn change_loop_body() {
+ // CHECK-LABEL: fn change_loop_body(
+ // CHECK: switchInt(const 0_isize)
let mut _x = 0;
while let Some(0u32) = None {
_x = 1;
diff --git a/tests/mir-opt/copy-prop/borrowed_local.rs b/tests/mir-opt/copy-prop/borrowed_local.rs
index c6b8ad357..a44e65164 100644
--- a/tests/mir-opt/copy-prop/borrowed_local.rs
+++ b/tests/mir-opt/copy-prop/borrowed_local.rs
@@ -22,11 +22,11 @@ fn f() -> bool {
let b = a;
// We cannot propagate the place `a`.
let r2 = &b;
- Call(RET = cmp_ref(r1, r2), next)
+ Call(RET = cmp_ref(r1, r2), next, UnwindContinue())
}
next = {
// But we can propagate the value `a`.
- Call(RET = opaque(b), ret)
+ Call(RET = opaque(b), ret, UnwindContinue())
}
ret = {
Return()
diff --git a/tests/mir-opt/copy-prop/calls.rs b/tests/mir-opt/copy-prop/calls.rs
index 2970f5f0b..bc6760707 100644
--- a/tests/mir-opt/copy-prop/calls.rs
+++ b/tests/mir-opt/copy-prop/calls.rs
@@ -26,7 +26,7 @@ fn multiple_edges(t: bool) -> u8 {
match t { true => bbt, _ => ret }
}
bbt = {
- Call(x = dummy(13), ret)
+ Call(x = dummy(13), ret, UnwindContinue())
}
ret = {
// `x` is not assigned on the `bb0 -> ret` edge,
diff --git a/tests/mir-opt/copy-prop/custom_move_arg.rs b/tests/mir-opt/copy-prop/custom_move_arg.rs
index 2077874ee..8593d9fa9 100644
--- a/tests/mir-opt/copy-prop/custom_move_arg.rs
+++ b/tests/mir-opt/copy-prop/custom_move_arg.rs
@@ -14,11 +14,11 @@ struct NotCopy(bool);
fn f(_1: NotCopy) {
mir!({
let _2 = _1;
- Call(RET = opaque(Move(_1)), bb1)
+ Call(RET = opaque(Move(_1)), bb1, UnwindContinue())
}
bb1 = {
let _3 = Move(_2);
- Call(RET = opaque(_3), bb2)
+ Call(RET = opaque(_3), bb2, UnwindContinue())
}
bb2 = {
Return()
diff --git a/tests/mir-opt/copy-prop/move_projection.rs b/tests/mir-opt/copy-prop/move_projection.rs
index 8629d535b..438a90ddd 100644
--- a/tests/mir-opt/copy-prop/move_projection.rs
+++ b/tests/mir-opt/copy-prop/move_projection.rs
@@ -18,10 +18,10 @@ fn f(a: Foo) -> bool {
let b = a;
// This is a move out of a copy, so must become a copy of `a.0`.
let c = Move(b.0);
- Call(RET = opaque(Move(a)), bb1)
+ Call(RET = opaque(Move(a)), bb1, UnwindContinue())
}
bb1 = {
- Call(RET = opaque(Move(c)), ret)
+ Call(RET = opaque(Move(c)), ret, UnwindContinue())
}
ret = {
Return()
diff --git a/tests/mir-opt/coroutine_tiny.main-{closure#0}.coroutine_resume.0.mir b/tests/mir-opt/coroutine_tiny.main-{closure#0}.coroutine_resume.0.mir
index 17b99c87c..165aa3a05 100644
--- a/tests/mir-opt/coroutine_tiny.main-{closure#0}.coroutine_resume.0.mir
+++ b/tests/mir-opt/coroutine_tiny.main-{closure#0}.coroutine_resume.0.mir
@@ -55,6 +55,9 @@ fn main::{closure#0}(_1: Pin<&mut {coroutine@$DIR/coroutine_tiny.rs:20:16: 20:24
StorageLive(_7);
_7 = ();
_0 = CoroutineState::<(), ()>::Yielded(move _7);
+ StorageDead(_4);
+ StorageDead(_6);
+ StorageDead(_7);
discriminant((*(_1.0: &mut {coroutine@$DIR/coroutine_tiny.rs:20:16: 20:24}))) = 3;
return;
}
diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.32bit.panic-abort.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.32bit.panic-abort.diff
index 9bfd46231..8363783e6 100644
--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.32bit.panic-abort.diff
+++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.32bit.panic-abort.diff
@@ -28,16 +28,16 @@
scope 12 {
scope 13 (inlined NonNull::<T>::new_unchecked::runtime::<[bool; 0]>) {
debug ptr => _6;
- scope 14 (inlined ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
+ scope 14 (inlined std::ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
debug self => _6;
let mut _9: *mut u8;
scope 15 {
- scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
+ scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _9;
- scope 17 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
+ scope 17 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _9;
scope 18 {
- scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
+ scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _9;
}
}
diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.32bit.panic-unwind.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.32bit.panic-unwind.diff
index dba50b142..19326b6a9 100644
--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.32bit.panic-unwind.diff
+++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.32bit.panic-unwind.diff
@@ -28,16 +28,16 @@
scope 12 {
scope 13 (inlined NonNull::<T>::new_unchecked::runtime::<[bool; 0]>) {
debug ptr => _6;
- scope 14 (inlined ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
+ scope 14 (inlined std::ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
debug self => _6;
let mut _9: *mut u8;
scope 15 {
- scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
+ scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _9;
- scope 17 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
+ scope 17 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _9;
scope 18 {
- scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
+ scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _9;
}
}
diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.64bit.panic-abort.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.64bit.panic-abort.diff
index 33fe4628d..0d1e2430c 100644
--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.64bit.panic-abort.diff
+++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.64bit.panic-abort.diff
@@ -28,16 +28,16 @@
scope 12 {
scope 13 (inlined NonNull::<T>::new_unchecked::runtime::<[bool; 0]>) {
debug ptr => _6;
- scope 14 (inlined ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
+ scope 14 (inlined std::ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
debug self => _6;
let mut _9: *mut u8;
scope 15 {
- scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
+ scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _9;
- scope 17 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
+ scope 17 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _9;
scope 18 {
- scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
+ scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _9;
}
}
diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.64bit.panic-unwind.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.64bit.panic-unwind.diff
index b2d561911..35f1e5ba7 100644
--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.64bit.panic-unwind.diff
+++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.64bit.panic-unwind.diff
@@ -28,16 +28,16 @@
scope 12 {
scope 13 (inlined NonNull::<T>::new_unchecked::runtime::<[bool; 0]>) {
debug ptr => _6;
- scope 14 (inlined ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
+ scope 14 (inlined std::ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
debug self => _6;
let mut _9: *mut u8;
scope 15 {
- scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
+ scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _9;
- scope 17 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
+ scope 17 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _9;
scope 18 {
- scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
+ scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _9;
}
}
diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-abort.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-abort.diff
index 1751b0de2..ddfe2e8c8 100644
--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-abort.diff
+++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-abort.diff
@@ -28,16 +28,16 @@
scope 12 {
scope 13 (inlined NonNull::<T>::new_unchecked::runtime::<[bool; 0]>) {
debug ptr => _6;
- scope 14 (inlined ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
+ scope 14 (inlined std::ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
debug self => _6;
let mut _9: *mut u8;
scope 15 {
- scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
+ scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _9;
- scope 17 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
+ scope 17 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _9;
scope 18 {
- scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
+ scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _9;
}
}
diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-unwind.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-unwind.diff
index 858a9d33d..861295faa 100644
--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-unwind.diff
+++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-unwind.diff
@@ -28,16 +28,16 @@
scope 12 {
scope 13 (inlined NonNull::<T>::new_unchecked::runtime::<[bool; 0]>) {
debug ptr => _6;
- scope 14 (inlined ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
+ scope 14 (inlined std::ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
debug self => _6;
let mut _9: *mut u8;
scope 15 {
- scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
+ scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _9;
- scope 17 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
+ scope 17 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _9;
scope 18 {
- scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
+ scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _9;
}
}
diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-abort.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-abort.diff
index 517070420..cbb639edc 100644
--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-abort.diff
+++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-abort.diff
@@ -28,16 +28,16 @@
scope 12 {
scope 13 (inlined NonNull::<T>::new_unchecked::runtime::<[bool; 0]>) {
debug ptr => _6;
- scope 14 (inlined ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
+ scope 14 (inlined std::ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
debug self => _6;
let mut _9: *mut u8;
scope 15 {
- scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
+ scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _9;
- scope 17 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
+ scope 17 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _9;
scope 18 {
- scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
+ scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _9;
}
}
diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-unwind.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-unwind.diff
index 9141a6c67..656846e9f 100644
--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-unwind.diff
+++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-unwind.diff
@@ -28,16 +28,16 @@
scope 12 {
scope 13 (inlined NonNull::<T>::new_unchecked::runtime::<[bool; 0]>) {
debug ptr => _6;
- scope 14 (inlined ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
+ scope 14 (inlined std::ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
debug self => _6;
let mut _9: *mut u8;
scope 15 {
- scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
+ scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _9;
- scope 17 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
+ scope 17 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _9;
scope 18 {
- scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
+ scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _9;
}
}
diff --git a/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.32bit.diff b/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.32bit.diff
index d502b1982..053981abe 100644
--- a/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.32bit.diff
+++ b/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.32bit.diff
@@ -118,7 +118,7 @@
}
ALLOC2 (static: RC, size: 4, align: 4) {
- ╾ALLOC0╼ │ ╾──╼
+ ╾ALLOC0<imm>╼ │ ╾──╼
}
ALLOC0 (size: 8, align: 4) {
diff --git a/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.64bit.diff b/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.64bit.diff
index 5d69572b5..d862bd93f 100644
--- a/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.64bit.diff
+++ b/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.64bit.diff
@@ -118,7 +118,7 @@
}
ALLOC2 (static: RC, size: 8, align: 8) {
- ╾ALLOC0╼ │ ╾──────╼
+ ╾ALLOC0<imm>╼ │ ╾──────╼
}
ALLOC0 (size: 8, align: 4) {
diff --git a/tests/mir-opt/dataflow-const-prop/inherit_overflow.main.DataflowConstProp.panic-abort.diff b/tests/mir-opt/dataflow-const-prop/inherit_overflow.main.DataflowConstProp.panic-abort.diff
index 2d4591ea2..09fc48043 100644
--- a/tests/mir-opt/dataflow-const-prop/inherit_overflow.main.DataflowConstProp.panic-abort.diff
+++ b/tests/mir-opt/dataflow-const-prop/inherit_overflow.main.DataflowConstProp.panic-abort.diff
@@ -8,7 +8,7 @@
let mut _3: u8;
scope 1 {
}
- scope 2 (inlined <u8 as Add>::add) {
+ scope 2 (inlined #[track_caller] <u8 as Add>::add) {
debug self => _2;
debug other => _3;
let mut _4: (u8, bool);
diff --git a/tests/mir-opt/dataflow-const-prop/inherit_overflow.main.DataflowConstProp.panic-unwind.diff b/tests/mir-opt/dataflow-const-prop/inherit_overflow.main.DataflowConstProp.panic-unwind.diff
index e99ac782a..c0b26080f 100644
--- a/tests/mir-opt/dataflow-const-prop/inherit_overflow.main.DataflowConstProp.panic-unwind.diff
+++ b/tests/mir-opt/dataflow-const-prop/inherit_overflow.main.DataflowConstProp.panic-unwind.diff
@@ -8,7 +8,7 @@
let mut _3: u8;
scope 1 {
}
- scope 2 (inlined <u8 as Add>::add) {
+ scope 2 (inlined #[track_caller] <u8 as Add>::add) {
debug self => _2;
debug other => _3;
let mut _4: (u8, bool);
diff --git a/tests/mir-opt/dataflow-const-prop/sibling_ptr.main.DataflowConstProp.panic-abort.diff b/tests/mir-opt/dataflow-const-prop/sibling_ptr.main.DataflowConstProp.panic-abort.diff
index cc96cbef2..9b0093c45 100644
--- a/tests/mir-opt/dataflow-const-prop/sibling_ptr.main.DataflowConstProp.panic-abort.diff
+++ b/tests/mir-opt/dataflow-const-prop/sibling_ptr.main.DataflowConstProp.panic-abort.diff
@@ -30,7 +30,7 @@
StorageLive(_4);
StorageLive(_5);
_5 = _3;
- _4 = ptr::mut_ptr::<impl *mut u8>::add(move _5, const 1_usize) -> [return: bb1, unwind unreachable];
+ _4 = std::ptr::mut_ptr::<impl *mut u8>::add(move _5, const 1_usize) -> [return: bb1, unwind unreachable];
}
bb1: {
diff --git a/tests/mir-opt/dataflow-const-prop/sibling_ptr.main.DataflowConstProp.panic-unwind.diff b/tests/mir-opt/dataflow-const-prop/sibling_ptr.main.DataflowConstProp.panic-unwind.diff
index ebeb8619d..635a21425 100644
--- a/tests/mir-opt/dataflow-const-prop/sibling_ptr.main.DataflowConstProp.panic-unwind.diff
+++ b/tests/mir-opt/dataflow-const-prop/sibling_ptr.main.DataflowConstProp.panic-unwind.diff
@@ -30,7 +30,7 @@
StorageLive(_4);
StorageLive(_5);
_5 = _3;
- _4 = ptr::mut_ptr::<impl *mut u8>::add(move _5, const 1_usize) -> [return: bb1, unwind continue];
+ _4 = std::ptr::mut_ptr::<impl *mut u8>::add(move _5, const 1_usize) -> [return: bb1, unwind continue];
}
bb1: {
diff --git a/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.32bit.diff b/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.32bit.diff
index 8499d0a89..0f461f515 100644
--- a/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.32bit.diff
+++ b/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.32bit.diff
@@ -220,11 +220,11 @@
}
ALLOC5 (static: BIG_STAT, size: 4, align: 4) {
- ╾ALLOC0╼ │ ╾──╼
+ ╾ALLOC0<imm>╼ │ ╾──╼
}
ALLOC0 (size: 20, align: 4) {
- 0x00 │ 01 00 00 00 23 00 00 00 ╾ALLOC1╼ 02 00 00 00 │ ....#...╾──╼....
+ 0x00 │ 01 00 00 00 23 00 00 00 ╾ALLOC1<imm>╼ 02 00 00 00 │ ....#...╾──╼....
0x10 │ 00 00 a4 42 │ ...B
}
@@ -233,11 +233,11 @@
}
ALLOC4 (static: SMALL_STAT, size: 4, align: 4) {
- ╾ALLOC2╼ │ ╾──╼
+ ╾ALLOC2<imm>╼ │ ╾──╼
}
ALLOC2 (size: 20, align: 4) {
- 0x00 │ 00 00 00 00 __ __ __ __ ╾ALLOC3╼ 01 00 00 00 │ ....░░░░╾──╼....
+ 0x00 │ 00 00 00 00 __ __ __ __ ╾ALLOC3<imm>╼ 01 00 00 00 │ ....░░░░╾──╼....
0x10 │ 00 00 10 41 │ ...A
}
diff --git a/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.64bit.diff b/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.64bit.diff
index 01ec3f623..3c40ec8bf 100644
--- a/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.64bit.diff
+++ b/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.64bit.diff
@@ -220,11 +220,11 @@
}
ALLOC5 (static: BIG_STAT, size: 8, align: 8) {
- ╾ALLOC0╼ │ ╾──────╼
+ ╾ALLOC0<imm>╼ │ ╾──────╼
}
ALLOC0 (size: 32, align: 8) {
- 0x00 │ 01 00 00 00 23 00 00 00 ╾ALLOC1╼ │ ....#...╾──────╼
+ 0x00 │ 01 00 00 00 23 00 00 00 ╾ALLOC1<imm>╼ │ ....#...╾──────╼
0x10 │ 02 00 00 00 00 00 00 00 00 00 a4 42 __ __ __ __ │ ...........B░░░░
}
@@ -233,11 +233,11 @@
}
ALLOC4 (static: SMALL_STAT, size: 8, align: 8) {
- ╾ALLOC2╼ │ ╾──────╼
+ ╾ALLOC2<imm>╼ │ ╾──────╼
}
ALLOC2 (size: 32, align: 8) {
- 0x00 │ 00 00 00 00 __ __ __ __ ╾ALLOC3╼ │ ....░░░░╾──────╼
+ 0x00 │ 00 00 00 00 __ __ __ __ ╾ALLOC3<imm>╼ │ ....░░░░╾──────╼
0x10 │ 01 00 00 00 00 00 00 00 00 00 10 41 __ __ __ __ │ ...........A░░░░
}
diff --git a/tests/mir-opt/dead-store-elimination/call_arg_copy.rs b/tests/mir-opt/dead-store-elimination/call_arg_copy.rs
index dcd15fb2b..b2eb64756 100644
--- a/tests/mir-opt/dead-store-elimination/call_arg_copy.rs
+++ b/tests/mir-opt/dead-store-elimination/call_arg_copy.rs
@@ -28,7 +28,7 @@ struct Packed {
fn move_packed(packed: Packed) {
mir!(
{
- Call(RET = use_both(0, packed.y), ret)
+ Call(RET = use_both(0, packed.y), ret, UnwindContinue())
}
ret = {
Return()
diff --git a/tests/mir-opt/dead-store-elimination/cycle.rs b/tests/mir-opt/dead-store-elimination/cycle.rs
index 8896f5ff3..c9ad06a9d 100644
--- a/tests/mir-opt/dead-store-elimination/cycle.rs
+++ b/tests/mir-opt/dead-store-elimination/cycle.rs
@@ -20,7 +20,7 @@ fn cycle(mut x: i32, mut y: i32, mut z: i32) {
mir!(
let condition: bool;
{
- Call(condition = cond(), bb1)
+ Call(condition = cond(), bb1, UnwindContinue())
}
bb1 = {
match condition { true => bb2, _ => ret }
@@ -30,7 +30,7 @@ fn cycle(mut x: i32, mut y: i32, mut z: i32) {
z = y;
y = x;
x = temp;
- Call(condition = cond(), bb1)
+ Call(condition = cond(), bb1, UnwindContinue())
}
ret = {
Return()
diff --git a/tests/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir b/tests/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir
index b04e09e88..596dcef85 100644
--- a/tests/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir
+++ b/tests/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir
@@ -38,22 +38,22 @@ fn match_tuple(_1: (u32, bool, Option<i32>, u32)) -> u32 {
bb4: {
_5 = Le(const 6_u32, (_1.3: u32));
- switchInt(move _5) -> [0: bb6, otherwise: bb5];
+ switchInt(move _5) -> [0: bb5, otherwise: bb7];
}
bb5: {
- _6 = Le((_1.3: u32), const 9_u32);
- switchInt(move _6) -> [0: bb6, otherwise: bb8];
+ _3 = Le(const 13_u32, (_1.3: u32));
+ switchInt(move _3) -> [0: bb1, otherwise: bb6];
}
bb6: {
- _3 = Le(const 13_u32, (_1.3: u32));
- switchInt(move _3) -> [0: bb1, otherwise: bb7];
+ _4 = Le((_1.3: u32), const 16_u32);
+ switchInt(move _4) -> [0: bb1, otherwise: bb8];
}
bb7: {
- _4 = Le((_1.3: u32), const 16_u32);
- switchInt(move _4) -> [0: bb1, otherwise: bb8];
+ _6 = Le((_1.3: u32), const 9_u32);
+ switchInt(move _6) -> [0: bb5, otherwise: bb8];
}
bb8: {
diff --git a/tests/mir-opt/gvn.constant_index_overflow.GVN.panic-abort.diff b/tests/mir-opt/gvn.constant_index_overflow.GVN.panic-abort.diff
new file mode 100644
index 000000000..4b1e33791
--- /dev/null
+++ b/tests/mir-opt/gvn.constant_index_overflow.GVN.panic-abort.diff
@@ -0,0 +1,104 @@
+- // MIR for `constant_index_overflow` before GVN
++ // MIR for `constant_index_overflow` after GVN
+
+ fn constant_index_overflow(_1: &[T]) -> () {
+ debug x => _1;
+ let mut _0: ();
+ let _2: usize;
+ let mut _4: bool;
+ let mut _5: usize;
+ let mut _6: usize;
+ let mut _7: &[T];
+ let _8: usize;
+ let mut _9: usize;
+ let mut _10: bool;
+ let _11: usize;
+ let mut _12: usize;
+ let mut _13: bool;
+ let mut _14: T;
+ scope 1 {
+ debug a => _2;
+ let _3: T;
+ scope 2 {
+ debug b => _3;
+ }
+ }
+
+ bb0: {
+- StorageLive(_2);
+- _2 = const _ as usize (IntToInt);
++ nop;
++ _2 = const usize::MAX;
+ StorageLive(_3);
+ StorageLive(_4);
+ StorageLive(_5);
+- _5 = _2;
++ _5 = const usize::MAX;
+ StorageLive(_6);
+ StorageLive(_7);
+ _7 = &(*_1);
+ _6 = core::slice::<impl [T]>::len(move _7) -> [return: bb1, unwind unreachable];
+ }
+
+ bb1: {
+ StorageDead(_7);
+- _4 = Lt(move _5, move _6);
++ _4 = Lt(const usize::MAX, move _6);
+ switchInt(move _4) -> [0: bb4, otherwise: bb2];
+ }
+
+ bb2: {
+ StorageDead(_6);
+ StorageDead(_5);
+ StorageLive(_8);
+- _8 = _2;
++ _8 = const usize::MAX;
+ _9 = Len((*_1));
+- _10 = Lt(_8, _9);
+- assert(move _10, "index out of bounds: the length is {} but the index is {}", move _9, _8) -> [success: bb3, unwind unreachable];
++ _10 = Lt(const usize::MAX, _9);
++ assert(move _10, "index out of bounds: the length is {} but the index is {}", move _9, const usize::MAX) -> [success: bb3, unwind unreachable];
+ }
+
+ bb3: {
+- _3 = (*_1)[_8];
++ _3 = (*_1)[_2];
+ StorageDead(_8);
+ goto -> bb6;
+ }
+
+ bb4: {
+ StorageDead(_6);
+ StorageDead(_5);
+ StorageLive(_11);
+ _11 = const 0_usize;
+ _12 = Len((*_1));
+- _13 = Lt(_11, _12);
+- assert(move _13, "index out of bounds: the length is {} but the index is {}", move _12, _11) -> [success: bb5, unwind unreachable];
++ _13 = Lt(const 0_usize, _12);
++ assert(move _13, "index out of bounds: the length is {} but the index is {}", move _12, const 0_usize) -> [success: bb5, unwind unreachable];
+ }
+
+ bb5: {
+- _3 = (*_1)[_11];
++ _3 = (*_1)[0 of 1];
+ StorageDead(_11);
+ goto -> bb6;
+ }
+
+ bb6: {
+ StorageDead(_4);
+ StorageLive(_14);
+ _14 = _3;
+ _0 = opaque::<T>(move _14) -> [return: bb7, unwind unreachable];
+ }
+
+ bb7: {
+ StorageDead(_14);
+ StorageDead(_3);
+- StorageDead(_2);
++ nop;
+ return;
+ }
+ }
+
diff --git a/tests/mir-opt/gvn.constant_index_overflow.GVN.panic-unwind.diff b/tests/mir-opt/gvn.constant_index_overflow.GVN.panic-unwind.diff
new file mode 100644
index 000000000..8abcd7e93
--- /dev/null
+++ b/tests/mir-opt/gvn.constant_index_overflow.GVN.panic-unwind.diff
@@ -0,0 +1,104 @@
+- // MIR for `constant_index_overflow` before GVN
++ // MIR for `constant_index_overflow` after GVN
+
+ fn constant_index_overflow(_1: &[T]) -> () {
+ debug x => _1;
+ let mut _0: ();
+ let _2: usize;
+ let mut _4: bool;
+ let mut _5: usize;
+ let mut _6: usize;
+ let mut _7: &[T];
+ let _8: usize;
+ let mut _9: usize;
+ let mut _10: bool;
+ let _11: usize;
+ let mut _12: usize;
+ let mut _13: bool;
+ let mut _14: T;
+ scope 1 {
+ debug a => _2;
+ let _3: T;
+ scope 2 {
+ debug b => _3;
+ }
+ }
+
+ bb0: {
+- StorageLive(_2);
+- _2 = const _ as usize (IntToInt);
++ nop;
++ _2 = const usize::MAX;
+ StorageLive(_3);
+ StorageLive(_4);
+ StorageLive(_5);
+- _5 = _2;
++ _5 = const usize::MAX;
+ StorageLive(_6);
+ StorageLive(_7);
+ _7 = &(*_1);
+ _6 = core::slice::<impl [T]>::len(move _7) -> [return: bb1, unwind continue];
+ }
+
+ bb1: {
+ StorageDead(_7);
+- _4 = Lt(move _5, move _6);
++ _4 = Lt(const usize::MAX, move _6);
+ switchInt(move _4) -> [0: bb4, otherwise: bb2];
+ }
+
+ bb2: {
+ StorageDead(_6);
+ StorageDead(_5);
+ StorageLive(_8);
+- _8 = _2;
++ _8 = const usize::MAX;
+ _9 = Len((*_1));
+- _10 = Lt(_8, _9);
+- assert(move _10, "index out of bounds: the length is {} but the index is {}", move _9, _8) -> [success: bb3, unwind continue];
++ _10 = Lt(const usize::MAX, _9);
++ assert(move _10, "index out of bounds: the length is {} but the index is {}", move _9, const usize::MAX) -> [success: bb3, unwind continue];
+ }
+
+ bb3: {
+- _3 = (*_1)[_8];
++ _3 = (*_1)[_2];
+ StorageDead(_8);
+ goto -> bb6;
+ }
+
+ bb4: {
+ StorageDead(_6);
+ StorageDead(_5);
+ StorageLive(_11);
+ _11 = const 0_usize;
+ _12 = Len((*_1));
+- _13 = Lt(_11, _12);
+- assert(move _13, "index out of bounds: the length is {} but the index is {}", move _12, _11) -> [success: bb5, unwind continue];
++ _13 = Lt(const 0_usize, _12);
++ assert(move _13, "index out of bounds: the length is {} but the index is {}", move _12, const 0_usize) -> [success: bb5, unwind continue];
+ }
+
+ bb5: {
+- _3 = (*_1)[_11];
++ _3 = (*_1)[0 of 1];
+ StorageDead(_11);
+ goto -> bb6;
+ }
+
+ bb6: {
+ StorageDead(_4);
+ StorageLive(_14);
+ _14 = _3;
+ _0 = opaque::<T>(move _14) -> [return: bb7, unwind continue];
+ }
+
+ bb7: {
+ StorageDead(_14);
+ StorageDead(_3);
+- StorageDead(_2);
++ nop;
+ return;
+ }
+ }
+
diff --git a/tests/mir-opt/gvn.rs b/tests/mir-opt/gvn.rs
index 10a66ced0..db131f7f9 100644
--- a/tests/mir-opt/gvn.rs
+++ b/tests/mir-opt/gvn.rs
@@ -529,31 +529,31 @@ fn duplicate_slice() -> (bool, bool) {
// CHECK: [[a:_.*]] = (const "a",);
// CHECK: [[au:_.*]] = ([[a]].0: &str) as u128 (Transmute);
let a = ("a",);
- Call(au = transmute::<_, u128>(a.0), bb1)
+ Call(au = transmute::<_, u128>(a.0), bb1, UnwindContinue())
}
bb1 = {
// CHECK: [[c:_.*]] = identity::<&str>(([[a]].0: &str))
- Call(c = identity(a.0), bb2)
+ Call(c = identity(a.0), bb2, UnwindContinue())
}
bb2 = {
// CHECK: [[cu:_.*]] = [[c]] as u128 (Transmute);
- Call(cu = transmute::<_, u128>(c), bb3)
+ Call(cu = transmute::<_, u128>(c), bb3, UnwindContinue())
}
bb3 = {
// This slice is different from `a.0`. Hence `bu` is not `au`.
// CHECK: [[b:_.*]] = const "a";
// CHECK: [[bu:_.*]] = [[b]] as u128 (Transmute);
let b = "a";
- Call(bu = transmute::<_, u128>(b), bb4)
+ Call(bu = transmute::<_, u128>(b), bb4, UnwindContinue())
}
bb4 = {
// This returns a copy of `b`, which is not `a`.
// CHECK: [[d:_.*]] = identity::<&str>([[b]])
- Call(d = identity(b), bb5)
+ Call(d = identity(b), bb5, UnwindContinue())
}
bb5 = {
// CHECK: [[du:_.*]] = [[d]] as u128 (Transmute);
- Call(du = transmute::<_, u128>(d), bb6)
+ Call(du = transmute::<_, u128>(d), bb6, UnwindContinue())
}
bb6 = {
// `direct` must not fold to `true`, as `indirect` will not.
@@ -609,6 +609,22 @@ fn indirect_static() {
})
}
+/// Verify that having constant index `u64::MAX` does not yield to an overflow in rustc.
+fn constant_index_overflow<T: Copy>(x: &[T]) {
+ // CHECK-LABEL: fn constant_index_overflow(
+ // CHECK: debug a => [[a:_.*]];
+ // CHECK: debug b => [[b:_.*]];
+ // CHECK: [[a]] = const usize::MAX;
+ // CHECK-NOT: = (*_1)[{{.*}} of 0];
+ // CHECK: [[b]] = (*_1)[[[a]]];
+ // CHECK-NOT: = (*_1)[{{.*}} of 0];
+ // CHECK: [[b]] = (*_1)[0 of 1];
+ // CHECK-NOT: = (*_1)[{{.*}} of 0];
+ let a = u64::MAX as usize;
+ let b = if a < x.len() { x[a] } else { x[0] };
+ opaque(b)
+}
+
fn main() {
subexpression_elimination(2, 4, 5);
wrap_unwrap(5);
@@ -627,6 +643,7 @@ fn main() {
repeat();
fn_pointers();
indirect_static();
+ constant_index_overflow(&[5, 3]);
}
#[inline(never)]
@@ -653,3 +670,4 @@ fn identity<T>(x: T) -> T {
// EMIT_MIR gvn.repeat.GVN.diff
// EMIT_MIR gvn.fn_pointers.GVN.diff
// EMIT_MIR gvn.indirect_static.GVN.diff
+// EMIT_MIR gvn.constant_index_overflow.GVN.diff
diff --git a/tests/mir-opt/inline/exponential_runtime.main.Inline.panic-abort.diff b/tests/mir-opt/inline/exponential_runtime.main.Inline.panic-abort.diff
index 217c8b802..3ffe2ee0c 100644
--- a/tests/mir-opt/inline/exponential_runtime.main.Inline.panic-abort.diff
+++ b/tests/mir-opt/inline/exponential_runtime.main.Inline.panic-abort.diff
@@ -69,58 +69,58 @@
+ }
+
+ bb2: {
++ _4 = <() as F>::call() -> [return: bb1, unwind unreachable];
++ }
++
++ bb3: {
+ StorageDead(_7);
+ StorageDead(_6);
+ StorageDead(_5);
-+ _3 = <() as F>::call() -> [return: bb3, unwind unreachable];
++ _3 = <() as F>::call() -> [return: bb2, unwind unreachable];
+ }
+
-+ bb3: {
-+ _4 = <() as F>::call() -> [return: bb1, unwind unreachable];
++ bb4: {
++ _7 = <() as E>::call() -> [return: bb3, unwind unreachable];
+ }
+
-+ bb4: {
++ bb5: {
+ StorageDead(_10);
+ StorageDead(_9);
+ StorageDead(_8);
-+ _6 = <() as E>::call() -> [return: bb5, unwind unreachable];
++ _6 = <() as E>::call() -> [return: bb4, unwind unreachable];
+ }
+
-+ bb5: {
-+ _7 = <() as E>::call() -> [return: bb2, unwind unreachable];
++ bb6: {
++ _10 = <() as D>::call() -> [return: bb5, unwind unreachable];
+ }
+
-+ bb6: {
++ bb7: {
+ StorageDead(_13);
+ StorageDead(_12);
+ StorageDead(_11);
-+ _9 = <() as D>::call() -> [return: bb7, unwind unreachable];
++ _9 = <() as D>::call() -> [return: bb6, unwind unreachable];
+ }
+
-+ bb7: {
-+ _10 = <() as D>::call() -> [return: bb4, unwind unreachable];
++ bb8: {
++ _13 = <() as C>::call() -> [return: bb7, unwind unreachable];
+ }
+
-+ bb8: {
++ bb9: {
+ StorageDead(_16);
+ StorageDead(_15);
+ StorageDead(_14);
-+ _12 = <() as C>::call() -> [return: bb9, unwind unreachable];
++ _12 = <() as C>::call() -> [return: bb8, unwind unreachable];
+ }
+
-+ bb9: {
-+ _13 = <() as C>::call() -> [return: bb6, unwind unreachable];
++ bb10: {
++ _16 = <() as B>::call() -> [return: bb9, unwind unreachable];
+ }
+
-+ bb10: {
++ bb11: {
+ StorageDead(_19);
+ StorageDead(_18);
+ StorageDead(_17);
-+ _15 = <() as B>::call() -> [return: bb11, unwind unreachable];
-+ }
-+
-+ bb11: {
-+ _16 = <() as B>::call() -> [return: bb8, unwind unreachable];
++ _15 = <() as B>::call() -> [return: bb10, unwind unreachable];
+ }
+
+ bb12: {
@@ -128,7 +128,7 @@
+ }
+
+ bb13: {
-+ _19 = <() as A>::call() -> [return: bb10, unwind unreachable];
++ _19 = <() as A>::call() -> [return: bb11, unwind unreachable];
}
}
diff --git a/tests/mir-opt/inline/exponential_runtime.main.Inline.panic-unwind.diff b/tests/mir-opt/inline/exponential_runtime.main.Inline.panic-unwind.diff
index 0a4ce40c5..3f334779e 100644
--- a/tests/mir-opt/inline/exponential_runtime.main.Inline.panic-unwind.diff
+++ b/tests/mir-opt/inline/exponential_runtime.main.Inline.panic-unwind.diff
@@ -69,58 +69,58 @@
+ }
+
+ bb2: {
++ _4 = <() as F>::call() -> [return: bb1, unwind continue];
++ }
++
++ bb3: {
+ StorageDead(_7);
+ StorageDead(_6);
+ StorageDead(_5);
-+ _3 = <() as F>::call() -> [return: bb3, unwind continue];
++ _3 = <() as F>::call() -> [return: bb2, unwind continue];
+ }
+
-+ bb3: {
-+ _4 = <() as F>::call() -> [return: bb1, unwind continue];
++ bb4: {
++ _7 = <() as E>::call() -> [return: bb3, unwind continue];
+ }
+
-+ bb4: {
++ bb5: {
+ StorageDead(_10);
+ StorageDead(_9);
+ StorageDead(_8);
-+ _6 = <() as E>::call() -> [return: bb5, unwind continue];
++ _6 = <() as E>::call() -> [return: bb4, unwind continue];
+ }
+
-+ bb5: {
-+ _7 = <() as E>::call() -> [return: bb2, unwind continue];
++ bb6: {
++ _10 = <() as D>::call() -> [return: bb5, unwind continue];
+ }
+
-+ bb6: {
++ bb7: {
+ StorageDead(_13);
+ StorageDead(_12);
+ StorageDead(_11);
-+ _9 = <() as D>::call() -> [return: bb7, unwind continue];
++ _9 = <() as D>::call() -> [return: bb6, unwind continue];
+ }
+
-+ bb7: {
-+ _10 = <() as D>::call() -> [return: bb4, unwind continue];
++ bb8: {
++ _13 = <() as C>::call() -> [return: bb7, unwind continue];
+ }
+
-+ bb8: {
++ bb9: {
+ StorageDead(_16);
+ StorageDead(_15);
+ StorageDead(_14);
-+ _12 = <() as C>::call() -> [return: bb9, unwind continue];
++ _12 = <() as C>::call() -> [return: bb8, unwind continue];
+ }
+
-+ bb9: {
-+ _13 = <() as C>::call() -> [return: bb6, unwind continue];
++ bb10: {
++ _16 = <() as B>::call() -> [return: bb9, unwind continue];
+ }
+
-+ bb10: {
++ bb11: {
+ StorageDead(_19);
+ StorageDead(_18);
+ StorageDead(_17);
-+ _15 = <() as B>::call() -> [return: bb11, unwind continue];
-+ }
-+
-+ bb11: {
-+ _16 = <() as B>::call() -> [return: bb8, unwind continue];
++ _15 = <() as B>::call() -> [return: bb10, unwind continue];
+ }
+
+ bb12: {
@@ -128,7 +128,7 @@
+ }
+
+ bb13: {
-+ _19 = <() as A>::call() -> [return: bb10, unwind continue];
++ _19 = <() as A>::call() -> [return: bb11, unwind continue];
}
}
diff --git a/tests/mir-opt/inline/indirect_destination.rs b/tests/mir-opt/inline/indirect_destination.rs
new file mode 100644
index 000000000..2842e2336
--- /dev/null
+++ b/tests/mir-opt/inline/indirect_destination.rs
@@ -0,0 +1,42 @@
+// Test for inlining with an indirect destination place.
+//
+// unit-test: Inline
+// edition: 2021
+// needs-unwind
+#![crate_type = "lib"]
+#![feature(custom_mir, core_intrinsics)]
+use core::intrinsics::mir::*;
+
+#[custom_mir(dialect = "runtime", phase = "initial")]
+// CHECK-LABEL: fn f(
+// CHECK: bb1: {
+// CHECK-NEXT: StorageLive([[A:.*]]);
+// CHECK-NEXT: [[A]] = &mut (*_1);
+// CHECK-NEXT: StorageLive([[B:.*]]);
+// CHECK-NEXT: [[B]] = const 42_u8;
+// CHECK-NEXT: (*[[A]]) = move [[B]];
+// CHECK-NEXT: StorageDead([[B]]);
+// CHECK-NEXT: StorageDead([[A]]);
+// CHECK-NEXT: goto -> bb1;
+// CHECK-NEXT: }
+pub fn f(a: *mut u8) {
+ mir! {
+ {
+ Goto(bb1)
+ }
+ bb1 = {
+ Call(*a = g(), bb1, UnwindUnreachable())
+ }
+ }
+}
+
+#[custom_mir(dialect = "runtime", phase = "initial")]
+#[inline(always)]
+fn g() -> u8 {
+ mir! {
+ {
+ RET = 42;
+ Return()
+ }
+ }
+}
diff --git a/tests/mir-opt/inline/inline_coroutine.main.Inline.panic-abort.diff b/tests/mir-opt/inline/inline_coroutine.main.Inline.panic-abort.diff
index 40eeda539..68c612314 100644
--- a/tests/mir-opt/inline/inline_coroutine.main.Inline.panic-abort.diff
+++ b/tests/mir-opt/inline/inline_coroutine.main.Inline.panic-abort.diff
@@ -50,20 +50,20 @@
bb1: {
- _3 = &mut _4;
- _2 = Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8}>::new(move _3) -> [return: bb2, unwind unreachable];
-+ StorageDead(_7);
-+ StorageDead(_6);
-+ StorageDead(_5);
-+ StorageDead(_2);
-+ drop(_4) -> [return: bb2, unwind unreachable];
++ StorageDead(_4);
++ _0 = const ();
++ StorageDead(_1);
++ return;
}
bb2: {
- StorageDead(_3);
- _1 = <{coroutine@$DIR/inline_coroutine.rs:19:5: 19:8} as Coroutine<bool>>::resume(move _2, const false) -> [return: bb3, unwind unreachable];
-+ StorageDead(_4);
-+ _0 = const ();
-+ StorageDead(_1);
-+ return;
++ StorageDead(_7);
++ StorageDead(_6);
++ StorageDead(_5);
++ StorageDead(_2);
++ drop(_4) -> [return: bb1, unwind unreachable];
}
bb3: {
@@ -89,8 +89,9 @@
+
+ bb6: {
+ _1 = CoroutineState::<i32, bool>::Yielded(move _8);
++ StorageDead(_8);
+ discriminant((*_6)) = 3;
-+ goto -> bb1;
++ goto -> bb2;
+ }
+
+ bb7: {
@@ -102,7 +103,7 @@
+ StorageDead(_8);
+ _1 = CoroutineState::<i32, bool>::Complete(_5);
+ discriminant((*_6)) = 1;
-+ goto -> bb1;
++ goto -> bb2;
+ }
+
+ bb9: {
diff --git a/tests/mir-opt/inline/inline_coroutine.main.Inline.panic-unwind.diff b/tests/mir-opt/inline/inline_coroutine.main.Inline.panic-unwind.diff
index fdb42bf3d..1bf14e8c3 100644
--- a/tests/mir-opt/inline/inline_coroutine.main.Inline.panic-unwind.diff
+++ b/tests/mir-opt/inline/inline_coroutine.main.Inline.panic-unwind.diff
@@ -34,18 +34,10 @@
StorageLive(_3);
StorageLive(_4);
- _4 = g() -> [return: bb1, unwind continue];
-- }
--
-- bb1: {
+ _4 = {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8 (#0)};
- _3 = &mut _4;
-- _2 = Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8}>::new(move _3) -> [return: bb2, unwind: bb5];
-- }
--
-- bb2: {
++ _3 = &mut _4;
+ _2 = Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8}> { pointer: move _3 };
- StorageDead(_3);
-- _1 = <{coroutine@$DIR/inline_coroutine.rs:19:5: 19:8} as Coroutine<bool>>::resume(move _2, const false) -> [return: bb3, unwind: bb5];
++ StorageDead(_3);
+ StorageLive(_5);
+ _5 = const false;
+ StorageLive(_6);
@@ -55,40 +47,50 @@
+ switchInt(move _7) -> [0: bb5, 1: bb9, 3: bb10, otherwise: bb11];
}
+ bb1: {
+- _3 = &mut _4;
+- _2 = Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8}>::new(move _3) -> [return: bb2, unwind: bb5];
++ StorageDead(_4);
++ _0 = const ();
++ StorageDead(_1);
++ return;
+ }
+
+- bb2: {
+- StorageDead(_3);
+- _1 = <{coroutine@$DIR/inline_coroutine.rs:19:5: 19:8} as Coroutine<bool>>::resume(move _2, const false) -> [return: bb3, unwind: bb5];
++ bb2 (cleanup): {
++ drop(_4) -> [return: bb3, unwind terminate(cleanup)];
+ }
+
- bb3: {
-+ bb1: {
-+ StorageDead(_7);
-+ StorageDead(_6);
-+ StorageDead(_5);
- StorageDead(_2);
+- StorageDead(_2);
- drop(_4) -> [return: bb4, unwind: bb6];
-+ drop(_4) -> [return: bb2, unwind: bb4];
++ bb3 (cleanup): {
++ resume;
}
-- bb4: {
-+ bb2: {
- StorageDead(_4);
- _0 = const ();
- StorageDead(_1);
- return;
+ bb4: {
+- StorageDead(_4);
+- _0 = const ();
+- StorageDead(_1);
+- return;
++ StorageDead(_7);
++ StorageDead(_6);
++ StorageDead(_5);
++ StorageDead(_2);
++ drop(_4) -> [return: bb1, unwind: bb3];
}
- bb5 (cleanup): {
- drop(_4) -> [return: bb6, unwind terminate(cleanup)];
-+ bb3 (cleanup): {
-+ drop(_4) -> [return: bb4, unwind terminate(cleanup)];
- }
-
-- bb6 (cleanup): {
-+ bb4 (cleanup): {
- resume;
-+ }
-+
+ bb5: {
+ StorageLive(_8);
+ switchInt(_5) -> [0: bb6, otherwise: bb7];
-+ }
-+
+ }
+
+- bb6 (cleanup): {
+- resume;
+ bb6: {
+ _8 = const 13_i32;
+ goto -> bb8;
@@ -101,12 +103,13 @@
+
+ bb8: {
+ _1 = CoroutineState::<i32, bool>::Yielded(move _8);
++ StorageDead(_8);
+ discriminant((*_6)) = 3;
-+ goto -> bb1;
++ goto -> bb4;
+ }
+
+ bb9: {
-+ assert(const false, "coroutine resumed after completion") -> [success: bb9, unwind: bb3];
++ assert(const false, "coroutine resumed after completion") -> [success: bb9, unwind: bb2];
+ }
+
+ bb10: {
@@ -114,7 +117,7 @@
+ StorageDead(_8);
+ _1 = CoroutineState::<i32, bool>::Complete(_5);
+ discriminant((*_6)) = 1;
-+ goto -> bb1;
++ goto -> bb4;
+ }
+
+ bb11: {
diff --git a/tests/mir-opt/inline/inline_into_box_place.main.Inline.panic-abort.diff b/tests/mir-opt/inline/inline_into_box_place.main.Inline.panic-abort.diff
deleted file mode 100644
index b90e0505c..000000000
--- a/tests/mir-opt/inline/inline_into_box_place.main.Inline.panic-abort.diff
+++ /dev/null
@@ -1,209 +0,0 @@
-- // MIR for `main` before Inline
-+ // MIR for `main` after Inline
-
- fn main() -> () {
- let mut _0: ();
- let _1: std::boxed::Box<std::vec::Vec<u32>>;
- let mut _2: std::vec::Vec<u32>;
- scope 1 {
- debug _x => _1;
- }
-+ scope 2 (inlined Vec::<u32>::new) {
-+ let mut _3: alloc::raw_vec::RawVec<u32>;
-+ }
-+ scope 3 (inlined Box::<Vec<u32>>::new) {
-+ debug x => _2;
-+ let mut _4: usize;
-+ let mut _5: usize;
-+ let mut _6: *mut u8;
-+ let mut _7: *const std::vec::Vec<u32>;
-+ scope 4 {
-+ scope 5 (inlined alloc::alloc::exchange_malloc) {
-+ debug size => _4;
-+ debug align => _5;
-+ let _8: std::alloc::Layout;
-+ let mut _9: std::result::Result<std::ptr::NonNull<[u8]>, std::alloc::AllocError>;
-+ let mut _10: isize;
-+ let mut _12: !;
-+ scope 6 {
-+ debug layout => _8;
-+ let _11: std::ptr::NonNull<[u8]>;
-+ let mut _13: &std::alloc::Global;
-+ scope 8 {
-+ debug ptr => _11;
-+ scope 18 (inlined NonNull::<[u8]>::as_mut_ptr) {
-+ debug self => _11;
-+ let mut _15: std::ptr::NonNull<u8>;
-+ scope 19 (inlined NonNull::<[u8]>::as_non_null_ptr) {
-+ debug self => _11;
-+ let mut _16: *mut u8;
-+ let mut _17: *mut [u8];
-+ scope 20 {
-+ scope 21 (inlined NonNull::<[u8]>::as_ptr) {
-+ debug self => _11;
-+ let mut _18: *const [u8];
-+ }
-+ scope 22 (inlined ptr::mut_ptr::<impl *mut [u8]>::as_mut_ptr) {
-+ debug self => _17;
-+ }
-+ scope 23 (inlined NonNull::<u8>::new_unchecked) {
-+ debug ptr => _16;
-+ let mut _19: *const u8;
-+ scope 24 {
-+ scope 25 (inlined NonNull::<T>::new_unchecked::runtime::<u8>) {
-+ debug ptr => _16;
-+ scope 26 (inlined ptr::mut_ptr::<impl *mut u8>::is_null) {
-+ debug self => _16;
-+ let mut _20: *mut u8;
-+ scope 27 {
-+ scope 28 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
-+ debug ptr => _20;
-+ scope 29 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
-+ debug self => _20;
-+ scope 30 {
-+ scope 31 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
-+ debug self => _20;
-+ }
-+ }
-+ }
-+ }
-+ }
-+ }
-+ }
-+ }
-+ }
-+ }
-+ }
-+ scope 32 (inlined NonNull::<u8>::as_ptr) {
-+ debug self => _15;
-+ let mut _21: *const u8;
-+ }
-+ }
-+ }
-+ scope 17 (inlined <std::alloc::Global as Allocator>::allocate) {
-+ debug self => const _;
-+ debug layout => _8;
-+ }
-+ }
-+ scope 7 {
-+ scope 9 (inlined Layout::from_size_align_unchecked) {
-+ debug size => _4;
-+ debug align => _5;
-+ let mut _14: std::ptr::Alignment;
-+ scope 10 {
-+ scope 11 (inlined std::ptr::Alignment::new_unchecked) {
-+ debug align => _5;
-+ scope 12 {
-+ scope 14 (inlined std::ptr::Alignment::new_unchecked::runtime) {
-+ debug align => _5;
-+ scope 15 (inlined core::num::<impl usize>::is_power_of_two) {
-+ debug self => _5;
-+ scope 16 (inlined core::num::<impl usize>::count_ones) {
-+ debug self => _5;
-+ }
-+ }
-+ }
-+ }
-+ scope 13 {
-+ }
-+ }
-+ }
-+ }
-+ }
-+ }
-+ }
-+ }
-
- bb0: {
- StorageLive(_1);
- StorageLive(_2);
-- _2 = Vec::<u32>::new() -> [return: bb1, unwind unreachable];
-+ StorageLive(_3);
-+ _3 = const _;
-+ _2 = Vec::<u32> { buf: move _3, len: const 0_usize };
-+ StorageDead(_3);
-+ StorageLive(_4);
-+ StorageLive(_5);
-+ StorageLive(_6);
-+ StorageLive(_7);
-+ _4 = SizeOf(std::vec::Vec<u32>);
-+ _5 = AlignOf(std::vec::Vec<u32>);
-+ StorageLive(_8);
-+ StorageLive(_10);
-+ StorageLive(_11);
-+ StorageLive(_12);
-+ StorageLive(_13);
-+ StorageLive(_14);
-+ _14 = _5 as std::ptr::Alignment (Transmute);
-+ _8 = Layout { size: _4, align: move _14 };
-+ StorageDead(_14);
-+ StorageLive(_9);
-+ _13 = const _;
-+ _9 = std::alloc::Global::alloc_impl(move _13, _8, const false) -> [return: bb5, unwind unreachable];
- }
-
- bb1: {
-- _1 = Box::<Vec<u32>>::new(move _2) -> [return: bb2, unwind unreachable];
-+ StorageDead(_1);
-+ return;
- }
-
- bb2: {
-+ _12 = handle_alloc_error(move _8) -> unwind unreachable;
-+ }
-+
-+ bb3: {
-+ unreachable;
-+ }
-+
-+ bb4: {
-+ _11 = ((_9 as Ok).0: std::ptr::NonNull<[u8]>);
-+ StorageLive(_15);
-+ StorageLive(_16);
-+ StorageLive(_17);
-+ StorageLive(_18);
-+ _18 = (_11.0: *const [u8]);
-+ _17 = move _18 as *mut [u8] (PtrToPtr);
-+ StorageDead(_18);
-+ _16 = _17 as *mut u8 (PtrToPtr);
-+ StorageDead(_17);
-+ StorageLive(_19);
-+ StorageLive(_20);
-+ _19 = _16 as *const u8 (PointerCoercion(MutToConstPointer));
-+ _15 = NonNull::<u8> { pointer: _19 };
-+ StorageDead(_20);
-+ StorageDead(_19);
-+ StorageDead(_16);
-+ StorageLive(_21);
-+ _21 = (_15.0: *const u8);
-+ _6 = move _21 as *mut u8 (PtrToPtr);
-+ StorageDead(_21);
-+ StorageDead(_15);
-+ StorageDead(_9);
-+ StorageDead(_13);
-+ StorageDead(_12);
-+ StorageDead(_11);
-+ StorageDead(_10);
-+ StorageDead(_8);
-+ _1 = ShallowInitBox(move _6, std::vec::Vec<u32>);
-+ _7 = (((_1.0: std::ptr::Unique<std::vec::Vec<u32>>).0: std::ptr::NonNull<std::vec::Vec<u32>>).0: *const std::vec::Vec<u32>);
-+ (*_7) = move _2;
-+ StorageDead(_7);
-+ StorageDead(_6);
-+ StorageDead(_5);
-+ StorageDead(_4);
- StorageDead(_2);
- _0 = const ();
-- drop(_1) -> [return: bb3, unwind unreachable];
-+ drop(_1) -> [return: bb1, unwind unreachable];
- }
-
-- bb3: {
-- StorageDead(_1);
-- return;
-+ bb5: {
-+ _10 = discriminant(_9);
-+ switchInt(move _10) -> [0: bb4, 1: bb2, otherwise: bb3];
- }
- }
-
diff --git a/tests/mir-opt/inline/inline_into_box_place.main.Inline.panic-unwind.diff b/tests/mir-opt/inline/inline_into_box_place.main.Inline.panic-unwind.diff
deleted file mode 100644
index f9c637caa..000000000
--- a/tests/mir-opt/inline/inline_into_box_place.main.Inline.panic-unwind.diff
+++ /dev/null
@@ -1,222 +0,0 @@
-- // MIR for `main` before Inline
-+ // MIR for `main` after Inline
-
- fn main() -> () {
- let mut _0: ();
- let _1: std::boxed::Box<std::vec::Vec<u32>>;
- let mut _2: std::vec::Vec<u32>;
- scope 1 {
- debug _x => _1;
- }
-+ scope 2 (inlined Vec::<u32>::new) {
-+ let mut _3: alloc::raw_vec::RawVec<u32>;
-+ }
-+ scope 3 (inlined Box::<Vec<u32>>::new) {
-+ debug x => _2;
-+ let mut _4: usize;
-+ let mut _5: usize;
-+ let mut _6: *mut u8;
-+ let mut _7: *const std::vec::Vec<u32>;
-+ scope 4 {
-+ scope 5 (inlined alloc::alloc::exchange_malloc) {
-+ debug size => _4;
-+ debug align => _5;
-+ let _8: std::alloc::Layout;
-+ let mut _9: std::result::Result<std::ptr::NonNull<[u8]>, std::alloc::AllocError>;
-+ let mut _10: isize;
-+ let mut _12: !;
-+ scope 6 {
-+ debug layout => _8;
-+ let _11: std::ptr::NonNull<[u8]>;
-+ let mut _13: &std::alloc::Global;
-+ scope 8 {
-+ debug ptr => _11;
-+ scope 18 (inlined NonNull::<[u8]>::as_mut_ptr) {
-+ debug self => _11;
-+ let mut _15: std::ptr::NonNull<u8>;
-+ scope 19 (inlined NonNull::<[u8]>::as_non_null_ptr) {
-+ debug self => _11;
-+ let mut _16: *mut u8;
-+ let mut _17: *mut [u8];
-+ scope 20 {
-+ scope 21 (inlined NonNull::<[u8]>::as_ptr) {
-+ debug self => _11;
-+ let mut _18: *const [u8];
-+ }
-+ scope 22 (inlined ptr::mut_ptr::<impl *mut [u8]>::as_mut_ptr) {
-+ debug self => _17;
-+ }
-+ scope 23 (inlined NonNull::<u8>::new_unchecked) {
-+ debug ptr => _16;
-+ let mut _19: *const u8;
-+ scope 24 {
-+ scope 25 (inlined NonNull::<T>::new_unchecked::runtime::<u8>) {
-+ debug ptr => _16;
-+ scope 26 (inlined ptr::mut_ptr::<impl *mut u8>::is_null) {
-+ debug self => _16;
-+ let mut _20: *mut u8;
-+ scope 27 {
-+ scope 28 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
-+ debug ptr => _20;
-+ scope 29 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
-+ debug self => _20;
-+ scope 30 {
-+ scope 31 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
-+ debug self => _20;
-+ }
-+ }
-+ }
-+ }
-+ }
-+ }
-+ }
-+ }
-+ }
-+ }
-+ }
-+ scope 32 (inlined NonNull::<u8>::as_ptr) {
-+ debug self => _15;
-+ let mut _21: *const u8;
-+ }
-+ }
-+ }
-+ scope 17 (inlined <std::alloc::Global as Allocator>::allocate) {
-+ debug self => const _;
-+ debug layout => _8;
-+ }
-+ }
-+ scope 7 {
-+ scope 9 (inlined Layout::from_size_align_unchecked) {
-+ debug size => _4;
-+ debug align => _5;
-+ let mut _14: std::ptr::Alignment;
-+ scope 10 {
-+ scope 11 (inlined std::ptr::Alignment::new_unchecked) {
-+ debug align => _5;
-+ scope 12 {
-+ scope 14 (inlined std::ptr::Alignment::new_unchecked::runtime) {
-+ debug align => _5;
-+ scope 15 (inlined core::num::<impl usize>::is_power_of_two) {
-+ debug self => _5;
-+ scope 16 (inlined core::num::<impl usize>::count_ones) {
-+ debug self => _5;
-+ }
-+ }
-+ }
-+ }
-+ scope 13 {
-+ }
-+ }
-+ }
-+ }
-+ }
-+ }
-+ }
-+ }
-
- bb0: {
- StorageLive(_1);
- StorageLive(_2);
-- _2 = Vec::<u32>::new() -> [return: bb1, unwind continue];
-+ StorageLive(_3);
-+ _3 = const _;
-+ _2 = Vec::<u32> { buf: move _3, len: const 0_usize };
-+ StorageDead(_3);
-+ StorageLive(_4);
-+ StorageLive(_5);
-+ StorageLive(_6);
-+ StorageLive(_7);
-+ _4 = SizeOf(std::vec::Vec<u32>);
-+ _5 = AlignOf(std::vec::Vec<u32>);
-+ StorageLive(_8);
-+ StorageLive(_10);
-+ StorageLive(_11);
-+ StorageLive(_12);
-+ StorageLive(_13);
-+ StorageLive(_14);
-+ _14 = _5 as std::ptr::Alignment (Transmute);
-+ _8 = Layout { size: _4, align: move _14 };
-+ StorageDead(_14);
-+ StorageLive(_9);
-+ _13 = const _;
-+ _9 = std::alloc::Global::alloc_impl(move _13, _8, const false) -> [return: bb7, unwind: bb3];
- }
-
- bb1: {
-- _1 = Box::<Vec<u32>>::new(move _2) -> [return: bb2, unwind: bb4];
-+ StorageDead(_1);
-+ return;
- }
-
-- bb2: {
-- StorageDead(_2);
-- _0 = const ();
-- drop(_1) -> [return: bb3, unwind: bb4];
-+ bb2 (cleanup): {
-+ resume;
- }
-
-- bb3: {
-- StorageDead(_1);
-- return;
-+ bb3 (cleanup): {
-+ drop(_2) -> [return: bb2, unwind terminate(cleanup)];
- }
-
-- bb4 (cleanup): {
-- resume;
-+ bb4: {
-+ _12 = handle_alloc_error(move _8) -> bb3;
-+ }
-+
-+ bb5: {
-+ unreachable;
-+ }
-+
-+ bb6: {
-+ _11 = ((_9 as Ok).0: std::ptr::NonNull<[u8]>);
-+ StorageLive(_15);
-+ StorageLive(_16);
-+ StorageLive(_17);
-+ StorageLive(_18);
-+ _18 = (_11.0: *const [u8]);
-+ _17 = move _18 as *mut [u8] (PtrToPtr);
-+ StorageDead(_18);
-+ _16 = _17 as *mut u8 (PtrToPtr);
-+ StorageDead(_17);
-+ StorageLive(_19);
-+ StorageLive(_20);
-+ _19 = _16 as *const u8 (PointerCoercion(MutToConstPointer));
-+ _15 = NonNull::<u8> { pointer: _19 };
-+ StorageDead(_20);
-+ StorageDead(_19);
-+ StorageDead(_16);
-+ StorageLive(_21);
-+ _21 = (_15.0: *const u8);
-+ _6 = move _21 as *mut u8 (PtrToPtr);
-+ StorageDead(_21);
-+ StorageDead(_15);
-+ StorageDead(_9);
-+ StorageDead(_13);
-+ StorageDead(_12);
-+ StorageDead(_11);
-+ StorageDead(_10);
-+ StorageDead(_8);
-+ _1 = ShallowInitBox(move _6, std::vec::Vec<u32>);
-+ _7 = (((_1.0: std::ptr::Unique<std::vec::Vec<u32>>).0: std::ptr::NonNull<std::vec::Vec<u32>>).0: *const std::vec::Vec<u32>);
-+ (*_7) = move _2;
-+ StorageDead(_7);
-+ StorageDead(_6);
-+ StorageDead(_5);
-+ StorageDead(_4);
-+ StorageDead(_2);
-+ _0 = const ();
-+ drop(_1) -> [return: bb1, unwind: bb2];
-+ }
-+
-+ bb7: {
-+ _10 = discriminant(_9);
-+ switchInt(move _10) -> [0: bb6, 1: bb4, otherwise: bb5];
- }
- }
-
diff --git a/tests/mir-opt/inline/inline_into_box_place.rs b/tests/mir-opt/inline/inline_into_box_place.rs
deleted file mode 100644
index 65f8e2916..000000000
--- a/tests/mir-opt/inline/inline_into_box_place.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// ignore-endian-big
-// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
-// ignore-debug MIR alignment checks in std alter the diff, breaking the test
-// compile-flags: -Zmir-opt-level=4 -Zinline-mir-hint-threshold=200
-
-// EMIT_MIR inline_into_box_place.main.Inline.diff
-fn main() {
- // CHECK-LABEL: fn main(
- // CHECK: (inlined Box::<Vec<u32>>::new)
- let _x: Box<Vec<u32>> = Box::new(Vec::new());
-}
diff --git a/tests/mir-opt/jump_threading.identity.JumpThreading.panic-abort.diff b/tests/mir-opt/jump_threading.identity.JumpThreading.panic-abort.diff
index f17c9ba3f..f50603a66 100644
--- a/tests/mir-opt/jump_threading.identity.JumpThreading.panic-abort.diff
+++ b/tests/mir-opt/jump_threading.identity.JumpThreading.panic-abort.diff
@@ -60,16 +60,6 @@
}
bb1: {
- StorageDead(_12);
- StorageDead(_11);
- StorageDead(_10);
- StorageDead(_4);
- _5 = discriminant(_3);
-- switchInt(move _5) -> [0: bb2, 1: bb4, otherwise: bb3];
-+ goto -> bb2;
- }
-
- bb2: {
StorageLive(_9);
_9 = ((_3 as Continue).0: i32);
_2 = _9;
@@ -77,14 +67,14 @@
_0 = Result::<i32, i32>::Ok(move _2);
StorageDead(_2);
StorageDead(_3);
- goto -> bb5;
+ goto -> bb4;
}
- bb3: {
+ bb2: {
unreachable;
}
- bb4: {
+ bb3: {
StorageLive(_6);
_6 = ((_3 as Break).0: std::result::Result<std::convert::Infallible, i32>);
StorageLive(_8);
@@ -100,20 +90,30 @@
StorageDead(_6);
StorageDead(_2);
StorageDead(_3);
- goto -> bb5;
+ goto -> bb4;
}
- bb5: {
+ bb4: {
return;
}
+ bb5: {
+ StorageDead(_12);
+ StorageDead(_11);
+ StorageDead(_10);
+ StorageDead(_4);
+ _5 = discriminant(_3);
+- switchInt(move _5) -> [0: bb1, 1: bb3, otherwise: bb2];
++ goto -> bb1;
+ }
+
bb6: {
_12 = move ((_4 as Err).0: i32);
StorageLive(_13);
_13 = Result::<Infallible, i32>::Err(move _12);
_3 = ControlFlow::<Result<Infallible, i32>, i32>::Break(move _13);
StorageDead(_13);
-- goto -> bb1;
+- goto -> bb5;
+ goto -> bb9;
}
@@ -124,7 +124,7 @@
bb8: {
_11 = move ((_4 as Ok).0: i32);
_3 = ControlFlow::<Result<Infallible, i32>, i32>::Continue(move _11);
- goto -> bb1;
+ goto -> bb5;
+ }
+
+ bb9: {
@@ -133,7 +133,7 @@
+ StorageDead(_10);
+ StorageDead(_4);
+ _5 = discriminant(_3);
-+ goto -> bb4;
++ goto -> bb3;
}
}
diff --git a/tests/mir-opt/jump_threading.identity.JumpThreading.panic-unwind.diff b/tests/mir-opt/jump_threading.identity.JumpThreading.panic-unwind.diff
index f17c9ba3f..f50603a66 100644
--- a/tests/mir-opt/jump_threading.identity.JumpThreading.panic-unwind.diff
+++ b/tests/mir-opt/jump_threading.identity.JumpThreading.panic-unwind.diff
@@ -60,16 +60,6 @@
}
bb1: {
- StorageDead(_12);
- StorageDead(_11);
- StorageDead(_10);
- StorageDead(_4);
- _5 = discriminant(_3);
-- switchInt(move _5) -> [0: bb2, 1: bb4, otherwise: bb3];
-+ goto -> bb2;
- }
-
- bb2: {
StorageLive(_9);
_9 = ((_3 as Continue).0: i32);
_2 = _9;
@@ -77,14 +67,14 @@
_0 = Result::<i32, i32>::Ok(move _2);
StorageDead(_2);
StorageDead(_3);
- goto -> bb5;
+ goto -> bb4;
}
- bb3: {
+ bb2: {
unreachable;
}
- bb4: {
+ bb3: {
StorageLive(_6);
_6 = ((_3 as Break).0: std::result::Result<std::convert::Infallible, i32>);
StorageLive(_8);
@@ -100,20 +90,30 @@
StorageDead(_6);
StorageDead(_2);
StorageDead(_3);
- goto -> bb5;
+ goto -> bb4;
}
- bb5: {
+ bb4: {
return;
}
+ bb5: {
+ StorageDead(_12);
+ StorageDead(_11);
+ StorageDead(_10);
+ StorageDead(_4);
+ _5 = discriminant(_3);
+- switchInt(move _5) -> [0: bb1, 1: bb3, otherwise: bb2];
++ goto -> bb1;
+ }
+
bb6: {
_12 = move ((_4 as Err).0: i32);
StorageLive(_13);
_13 = Result::<Infallible, i32>::Err(move _12);
_3 = ControlFlow::<Result<Infallible, i32>, i32>::Break(move _13);
StorageDead(_13);
-- goto -> bb1;
+- goto -> bb5;
+ goto -> bb9;
}
@@ -124,7 +124,7 @@
bb8: {
_11 = move ((_4 as Ok).0: i32);
_3 = ControlFlow::<Result<Infallible, i32>, i32>::Continue(move _11);
- goto -> bb1;
+ goto -> bb5;
+ }
+
+ bb9: {
@@ -133,7 +133,7 @@
+ StorageDead(_10);
+ StorageDead(_4);
+ _5 = discriminant(_3);
-+ goto -> bb4;
++ goto -> bb3;
}
}
diff --git a/tests/mir-opt/jump_threading.rs b/tests/mir-opt/jump_threading.rs
index 852dcd0db..66e5c5d3c 100644
--- a/tests/mir-opt/jump_threading.rs
+++ b/tests/mir-opt/jump_threading.rs
@@ -52,19 +52,19 @@ fn identity(x: Result<i32, i32>) -> Result<i32, i32> {
// CHECK: [[x:_.*]] = _1;
// CHECK: switchInt(move {{_.*}}) -> [0: bb8, 1: bb6, otherwise: bb7];
// CHECK: bb1: {
- // CHECK: goto -> bb2;
- // CHECK: bb2: {
// CHECK: {{_.*}} = (([[controlflow:_.*]] as Continue).0: i32);
// CHECK: _0 = Result::<i32, i32>::Ok(
- // CHECK: goto -> bb5;
- // CHECK: bb3: {
+ // CHECK: goto -> bb4;
+ // CHECK: bb2: {
// CHECK: unreachable;
- // CHECK: bb4: {
+ // CHECK: bb3: {
// CHECK: {{_.*}} = (([[controlflow]] as Break).0: std::result::Result<std::convert::Infallible, i32>);
// CHECK: _0 = Result::<i32, i32>::Err(
- // CHECK: goto -> bb5;
- // CHECK: bb5: {
+ // CHECK: goto -> bb4;
+ // CHECK: bb4: {
// CHECK: return;
+ // CHECK: bb5: {
+ // CHECK: goto -> bb1;
// CHECK: bb6: {
// CHECK: {{_.*}} = move (([[x]] as Err).0: i32);
// CHECK: [[controlflow]] = ControlFlow::<Result<Infallible, i32>, i32>::Break(
@@ -74,9 +74,9 @@ fn identity(x: Result<i32, i32>) -> Result<i32, i32> {
// CHECK: bb8: {
// CHECK: {{_.*}} = move (([[x]] as Ok).0: i32);
// CHECK: [[controlflow]] = ControlFlow::<Result<Infallible, i32>, i32>::Continue(
- // CHECK: goto -> bb1;
+ // CHECK: goto -> bb5;
// CHECK: bb9: {
- // CHECK: goto -> bb4;
+ // CHECK: goto -> bb3;
Ok(x?)
}
diff --git a/tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.panic-abort.diff b/tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.panic-abort.diff
deleted file mode 100644
index 194478560..000000000
--- a/tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.panic-abort.diff
+++ /dev/null
@@ -1,48 +0,0 @@
-- // MIR for `option_payload` before LowerIntrinsics
-+ // MIR for `option_payload` after LowerIntrinsics
-
- fn option_payload(_1: &Option<usize>, _2: &Option<String>) -> () {
- debug o => _1;
- debug p => _2;
- let mut _0: ();
- let mut _4: *const std::option::Option<usize>;
- let mut _6: *const std::option::Option<std::string::String>;
- scope 1 {
- let _3: *const usize;
- scope 2 {
- debug _x => _3;
- let _5: *const std::string::String;
- scope 3 {
- debug _y => _5;
- }
- }
- }
-
- bb0: {
- StorageLive(_3);
- StorageLive(_4);
- _4 = &raw const (*_1);
-- _3 = option_payload_ptr::<usize>(move _4) -> [return: bb1, unwind unreachable];
-+ _3 = &raw const (((*_4) as Some).0: usize);
-+ goto -> bb1;
- }
-
- bb1: {
- StorageDead(_4);
- StorageLive(_5);
- StorageLive(_6);
- _6 = &raw const (*_2);
-- _5 = option_payload_ptr::<String>(move _6) -> [return: bb2, unwind unreachable];
-+ _5 = &raw const (((*_6) as Some).0: std::string::String);
-+ goto -> bb2;
- }
-
- bb2: {
- StorageDead(_6);
- _0 = const ();
- StorageDead(_5);
- StorageDead(_3);
- return;
- }
- }
-
diff --git a/tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.panic-unwind.diff b/tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.panic-unwind.diff
deleted file mode 100644
index 194478560..000000000
--- a/tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.panic-unwind.diff
+++ /dev/null
@@ -1,48 +0,0 @@
-- // MIR for `option_payload` before LowerIntrinsics
-+ // MIR for `option_payload` after LowerIntrinsics
-
- fn option_payload(_1: &Option<usize>, _2: &Option<String>) -> () {
- debug o => _1;
- debug p => _2;
- let mut _0: ();
- let mut _4: *const std::option::Option<usize>;
- let mut _6: *const std::option::Option<std::string::String>;
- scope 1 {
- let _3: *const usize;
- scope 2 {
- debug _x => _3;
- let _5: *const std::string::String;
- scope 3 {
- debug _y => _5;
- }
- }
- }
-
- bb0: {
- StorageLive(_3);
- StorageLive(_4);
- _4 = &raw const (*_1);
-- _3 = option_payload_ptr::<usize>(move _4) -> [return: bb1, unwind unreachable];
-+ _3 = &raw const (((*_4) as Some).0: usize);
-+ goto -> bb1;
- }
-
- bb1: {
- StorageDead(_4);
- StorageLive(_5);
- StorageLive(_6);
- _6 = &raw const (*_2);
-- _5 = option_payload_ptr::<String>(move _6) -> [return: bb2, unwind unreachable];
-+ _5 = &raw const (((*_6) as Some).0: std::string::String);
-+ goto -> bb2;
- }
-
- bb2: {
- StorageDead(_6);
- _0 = const ();
- StorageDead(_5);
- StorageDead(_3);
- return;
- }
- }
-
diff --git a/tests/mir-opt/lower_intrinsics.rs b/tests/mir-opt/lower_intrinsics.rs
index 913605cc2..cba2bc18d 100644
--- a/tests/mir-opt/lower_intrinsics.rs
+++ b/tests/mir-opt/lower_intrinsics.rs
@@ -222,18 +222,6 @@ pub fn write_via_move_string(r: &mut String, v: String) {
pub enum Never {}
-// EMIT_MIR lower_intrinsics.option_payload.LowerIntrinsics.diff
-pub fn option_payload(o: &Option<usize>, p: &Option<String>) {
- // CHECK-LABEL: fn option_payload(
- // CHECK: {{_.*}} = &raw const (((*{{_.*}}) as Some).0: usize);
- // CHECK: {{_.*}} = &raw const (((*{{_.*}}) as Some).0: std::string::String);
-
- unsafe {
- let _x = core::intrinsics::option_payload_ptr(o);
- let _y = core::intrinsics::option_payload_ptr(p);
- }
-}
-
// EMIT_MIR lower_intrinsics.ptr_offset.LowerIntrinsics.diff
pub unsafe fn ptr_offset(p: *const i32, d: isize) -> *const i32 {
// CHECK-LABEL: fn ptr_offset(
diff --git a/tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir b/tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir
index ebb2f70a4..5bf78b615 100644
--- a/tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir
+++ b/tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir
@@ -28,43 +28,43 @@ fn main() -> () {
StorageLive(_3);
PlaceMention(_1);
_6 = Le(const 0_i32, _1);
- switchInt(move _6) -> [0: bb4, otherwise: bb1];
+ switchInt(move _6) -> [0: bb3, otherwise: bb8];
}
bb1: {
- _7 = Lt(_1, const 10_i32);
- switchInt(move _7) -> [0: bb4, otherwise: bb2];
+ falseEdge -> [real: bb9, imaginary: bb4];
}
bb2: {
- falseEdge -> [real: bb9, imaginary: bb6];
+ _3 = const 3_i32;
+ goto -> bb14;
}
bb3: {
- _3 = const 3_i32;
- goto -> bb14;
+ _4 = Le(const 10_i32, _1);
+ switchInt(move _4) -> [0: bb5, otherwise: bb7];
}
bb4: {
- _4 = Le(const 10_i32, _1);
- switchInt(move _4) -> [0: bb7, otherwise: bb5];
+ falseEdge -> [real: bb12, imaginary: bb6];
}
bb5: {
- _5 = Le(_1, const 20_i32);
- switchInt(move _5) -> [0: bb7, otherwise: bb6];
+ switchInt(_1) -> [4294967295: bb6, otherwise: bb2];
}
bb6: {
- falseEdge -> [real: bb12, imaginary: bb8];
+ falseEdge -> [real: bb13, imaginary: bb2];
}
bb7: {
- switchInt(_1) -> [4294967295: bb8, otherwise: bb3];
+ _5 = Le(_1, const 20_i32);
+ switchInt(move _5) -> [0: bb5, otherwise: bb4];
}
bb8: {
- falseEdge -> [real: bb13, imaginary: bb3];
+ _7 = Lt(_1, const 10_i32);
+ switchInt(move _7) -> [0: bb3, otherwise: bb1];
}
bb9: {
@@ -83,7 +83,7 @@ fn main() -> () {
bb11: {
StorageDead(_9);
- falseEdge -> [real: bb3, imaginary: bb6];
+ falseEdge -> [real: bb2, imaginary: bb4];
}
bb12: {
diff --git a/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-abort.diff b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-abort.diff
index 50189d192..d5628dc7a 100644
--- a/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-abort.diff
+++ b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-abort.diff
@@ -69,7 +69,7 @@
bb3: {
- _1 = move ((_2 as Some).0: std::alloc::Layout);
-+ _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): ptr::alignment::AlignmentEnum32) }};
++ _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): std::ptr::alignment::AlignmentEnum32) }};
StorageDead(_10);
StorageDead(_2);
StorageLive(_3);
@@ -78,7 +78,7 @@
StorageLive(_6);
_9 = const _;
- _6 = std::alloc::Global::alloc_impl(_9, _1, const false) -> [return: bb4, unwind unreachable];
-+ _6 = std::alloc::Global::alloc_impl(const {ALLOC1: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): ptr::alignment::AlignmentEnum32) }}, const false) -> [return: bb4, unwind unreachable];
++ _6 = std::alloc::Global::alloc_impl(const {ALLOC1<imm>: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): std::ptr::alignment::AlignmentEnum32) }}, const false) -> [return: bb4, unwind unreachable];
}
bb4: {
diff --git a/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-unwind.diff b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-unwind.diff
index 6966762a1..d28059458 100644
--- a/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-unwind.diff
+++ b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-unwind.diff
@@ -67,7 +67,7 @@
bb4: {
- _1 = move ((_2 as Some).0: std::alloc::Layout);
-+ _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): ptr::alignment::AlignmentEnum32) }};
++ _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): std::ptr::alignment::AlignmentEnum32) }};
StorageDead(_10);
StorageDead(_2);
StorageLive(_3);
@@ -76,7 +76,7 @@
StorageLive(_6);
_9 = const _;
- _6 = std::alloc::Global::alloc_impl(_9, _1, const false) -> [return: bb5, unwind continue];
-+ _6 = std::alloc::Global::alloc_impl(const {ALLOC1: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): ptr::alignment::AlignmentEnum32) }}, const false) -> [return: bb5, unwind continue];
++ _6 = std::alloc::Global::alloc_impl(const {ALLOC1<imm>: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): std::ptr::alignment::AlignmentEnum32) }}, const false) -> [return: bb5, unwind continue];
}
bb5: {
diff --git a/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-abort.diff b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-abort.diff
index 08a185bad..d139fc73e 100644
--- a/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-abort.diff
+++ b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-abort.diff
@@ -69,7 +69,7 @@
bb3: {
- _1 = move ((_2 as Some).0: std::alloc::Layout);
-+ _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): ptr::alignment::AlignmentEnum64) }};
++ _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): std::ptr::alignment::AlignmentEnum64) }};
StorageDead(_10);
StorageDead(_2);
StorageLive(_3);
@@ -78,7 +78,7 @@
StorageLive(_6);
_9 = const _;
- _6 = std::alloc::Global::alloc_impl(_9, _1, const false) -> [return: bb4, unwind unreachable];
-+ _6 = std::alloc::Global::alloc_impl(const {ALLOC1: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): ptr::alignment::AlignmentEnum64) }}, const false) -> [return: bb4, unwind unreachable];
++ _6 = std::alloc::Global::alloc_impl(const {ALLOC1<imm>: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): std::ptr::alignment::AlignmentEnum64) }}, const false) -> [return: bb4, unwind unreachable];
}
bb4: {
diff --git a/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-unwind.diff b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-unwind.diff
index 6501cb85e..63db9553b 100644
--- a/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-unwind.diff
+++ b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-unwind.diff
@@ -67,7 +67,7 @@
bb4: {
- _1 = move ((_2 as Some).0: std::alloc::Layout);
-+ _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): ptr::alignment::AlignmentEnum64) }};
++ _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): std::ptr::alignment::AlignmentEnum64) }};
StorageDead(_10);
StorageDead(_2);
StorageLive(_3);
@@ -76,7 +76,7 @@
StorageLive(_6);
_9 = const _;
- _6 = std::alloc::Global::alloc_impl(_9, _1, const false) -> [return: bb5, unwind continue];
-+ _6 = std::alloc::Global::alloc_impl(const {ALLOC1: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): ptr::alignment::AlignmentEnum64) }}, const false) -> [return: bb5, unwind continue];
++ _6 = std::alloc::Global::alloc_impl(const {ALLOC1<imm>: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): std::ptr::alignment::AlignmentEnum64) }}, const false) -> [return: bb5, unwind continue];
}
bb5: {
diff --git a/tests/mir-opt/pre-codegen/loops.int_range.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/loops.int_range.PreCodegen.after.mir
index 49f685cfa..73a3be7f3 100644
--- a/tests/mir-opt/pre-codegen/loops.int_range.PreCodegen.after.mir
+++ b/tests/mir-opt/pre-codegen/loops.int_range.PreCodegen.after.mir
@@ -30,7 +30,7 @@ fn int_range(_1: usize, _2: usize) -> () {
scope 7 {
}
}
- scope 8 (inlined cmp::impls::<impl PartialOrd for usize>::lt) {
+ scope 8 (inlined std::cmp::impls::<impl PartialOrd for usize>::lt) {
debug self => _6;
debug other => _7;
let mut _8: usize;
diff --git a/tests/mir-opt/pre-codegen/mem_replace.mem_replace.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/mem_replace.mem_replace.PreCodegen.after.mir
index 630babaa8..713d6cc55 100644
--- a/tests/mir-opt/pre-codegen/mem_replace.mem_replace.PreCodegen.after.mir
+++ b/tests/mir-opt/pre-codegen/mem_replace.mem_replace.PreCodegen.after.mir
@@ -24,16 +24,16 @@ fn mem_replace(_1: &mut u32, _2: u32) -> u32 {
debug src => _1;
scope 7 (inlined intrinsics::is_aligned_and_not_null::<u32>) {
debug ptr => _1;
- scope 8 (inlined ptr::const_ptr::<impl *const u32>::is_null) {
+ scope 8 (inlined std::ptr::const_ptr::<impl *const u32>::is_null) {
debug self => _1;
let mut _3: *const u8;
scope 9 {
- scope 10 (inlined ptr::const_ptr::<impl *const T>::is_null::runtime_impl) {
+ scope 10 (inlined std::ptr::const_ptr::<impl *const T>::is_null::runtime_impl) {
debug ptr => _3;
- scope 11 (inlined ptr::const_ptr::<impl *const u8>::addr) {
+ scope 11 (inlined std::ptr::const_ptr::<impl *const u8>::addr) {
debug self => _3;
scope 12 {
- scope 13 (inlined ptr::const_ptr::<impl *const u8>::cast::<()>) {
+ scope 13 (inlined std::ptr::const_ptr::<impl *const u8>::cast::<()>) {
debug self => _3;
}
}
@@ -41,7 +41,7 @@ fn mem_replace(_1: &mut u32, _2: u32) -> u32 {
}
}
}
- scope 14 (inlined ptr::const_ptr::<impl *const u32>::is_aligned) {
+ scope 14 (inlined std::ptr::const_ptr::<impl *const u32>::is_aligned) {
debug self => _1;
scope 15 (inlined align_of::<u32>) {
}
diff --git a/tests/mir-opt/pre-codegen/range_iter.forward_loop.PreCodegen.after.panic-abort.mir b/tests/mir-opt/pre-codegen/range_iter.forward_loop.PreCodegen.after.panic-abort.mir
index 91c3731f4..cd734b10f 100644
--- a/tests/mir-opt/pre-codegen/range_iter.forward_loop.PreCodegen.after.panic-abort.mir
+++ b/tests/mir-opt/pre-codegen/range_iter.forward_loop.PreCodegen.after.panic-abort.mir
@@ -33,7 +33,7 @@ fn forward_loop(_1: u32, _2: u32, _3: impl Fn(u32)) -> () {
scope 7 {
}
}
- scope 8 (inlined cmp::impls::<impl PartialOrd for u32>::lt) {
+ scope 8 (inlined std::cmp::impls::<impl PartialOrd for u32>::lt) {
debug self => _7;
debug other => _8;
let mut _9: u32;
diff --git a/tests/mir-opt/pre-codegen/range_iter.forward_loop.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/pre-codegen/range_iter.forward_loop.PreCodegen.after.panic-unwind.mir
index f76de02c9..3342da545 100644
--- a/tests/mir-opt/pre-codegen/range_iter.forward_loop.PreCodegen.after.panic-unwind.mir
+++ b/tests/mir-opt/pre-codegen/range_iter.forward_loop.PreCodegen.after.panic-unwind.mir
@@ -33,7 +33,7 @@ fn forward_loop(_1: u32, _2: u32, _3: impl Fn(u32)) -> () {
scope 7 {
}
}
- scope 8 (inlined cmp::impls::<impl PartialOrd for u32>::lt) {
+ scope 8 (inlined std::cmp::impls::<impl PartialOrd for u32>::lt) {
debug self => _7;
debug other => _8;
let mut _9: u32;
diff --git a/tests/mir-opt/pre-codegen/range_iter.range_iter_next.PreCodegen.after.panic-abort.mir b/tests/mir-opt/pre-codegen/range_iter.range_iter_next.PreCodegen.after.panic-abort.mir
index a7824f36d..6ed3d73b1 100644
--- a/tests/mir-opt/pre-codegen/range_iter.range_iter_next.PreCodegen.after.panic-abort.mir
+++ b/tests/mir-opt/pre-codegen/range_iter.range_iter_next.PreCodegen.after.panic-abort.mir
@@ -17,7 +17,7 @@ fn range_iter_next(_1: &mut std::ops::Range<u32>) -> Option<u32> {
scope 4 {
}
}
- scope 5 (inlined cmp::impls::<impl PartialOrd for u32>::lt) {
+ scope 5 (inlined std::cmp::impls::<impl PartialOrd for u32>::lt) {
debug self => _2;
debug other => _3;
let mut _4: u32;
diff --git a/tests/mir-opt/pre-codegen/range_iter.range_iter_next.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/pre-codegen/range_iter.range_iter_next.PreCodegen.after.panic-unwind.mir
index 83c9e6c1a..a030647de 100644
--- a/tests/mir-opt/pre-codegen/range_iter.range_iter_next.PreCodegen.after.panic-unwind.mir
+++ b/tests/mir-opt/pre-codegen/range_iter.range_iter_next.PreCodegen.after.panic-unwind.mir
@@ -17,7 +17,7 @@ fn range_iter_next(_1: &mut std::ops::Range<u32>) -> Option<u32> {
scope 4 {
}
}
- scope 5 (inlined cmp::impls::<impl PartialOrd for u32>::lt) {
+ scope 5 (inlined std::cmp::impls::<impl PartialOrd for u32>::lt) {
debug self => _2;
debug other => _3;
let mut _4: u32;
diff --git a/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir
index 548767dca..05f16cdac 100644
--- a/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir
+++ b/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir
@@ -30,48 +30,48 @@ fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:8:25: 8:39}, _2
debug b => _6;
debug c => _8;
debug d => _10;
- scope 2 (inlined cmp::impls::<impl PartialOrd for &usize>::le) {
+ scope 2 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
debug self => _11;
debug other => _13;
let mut _14: &usize;
let mut _15: &usize;
- scope 3 (inlined cmp::impls::<impl PartialOrd for usize>::le) {
+ scope 3 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
debug self => _14;
debug other => _15;
let mut _16: usize;
let mut _17: usize;
}
}
- scope 4 (inlined cmp::impls::<impl PartialOrd for &usize>::le) {
+ scope 4 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
debug self => _19;
debug other => _21;
let mut _22: &usize;
let mut _23: &usize;
- scope 5 (inlined cmp::impls::<impl PartialOrd for usize>::le) {
+ scope 5 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
debug self => _22;
debug other => _23;
let mut _24: usize;
let mut _25: usize;
}
}
- scope 6 (inlined cmp::impls::<impl PartialOrd for &usize>::le) {
+ scope 6 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
debug self => _27;
debug other => _29;
let mut _30: &usize;
let mut _31: &usize;
- scope 7 (inlined cmp::impls::<impl PartialOrd for usize>::le) {
+ scope 7 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
debug self => _30;
debug other => _31;
let mut _32: usize;
let mut _33: usize;
}
}
- scope 8 (inlined cmp::impls::<impl PartialOrd for &usize>::le) {
+ scope 8 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
debug self => _35;
debug other => _37;
let mut _38: &usize;
let mut _39: &usize;
- scope 9 (inlined cmp::impls::<impl PartialOrd for usize>::le) {
+ scope 9 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
debug self => _38;
debug other => _39;
let mut _40: usize;
diff --git a/tests/mir-opt/pre-codegen/slice_index.slice_get_mut_usize.PreCodegen.after.panic-abort.mir b/tests/mir-opt/pre-codegen/slice_index.slice_get_mut_usize.PreCodegen.after.panic-abort.mir
index 8590c9d3b..e4d9060d4 100644
--- a/tests/mir-opt/pre-codegen/slice_index.slice_get_mut_usize.PreCodegen.after.panic-abort.mir
+++ b/tests/mir-opt/pre-codegen/slice_index.slice_get_mut_usize.PreCodegen.after.panic-abort.mir
@@ -20,33 +20,30 @@ fn slice_get_mut_usize(_1: &mut [u32], _2: usize) -> Option<&mut u32> {
debug self => _2;
debug slice => _5;
let mut _6: *mut u32;
+ let mut _9: &[&str];
scope 5 {
- debug this => _2;
- scope 6 {
- scope 7 (inlined <usize as SliceIndex<[T]>>::get_unchecked_mut::runtime::<u32>) {
- debug this => _2;
- debug slice => _5;
- scope 8 (inlined ptr::mut_ptr::<impl *mut [u32]>::len) {
- debug self => _5;
- let mut _9: *const [u32];
- scope 9 (inlined std::ptr::metadata::<[u32]>) {
- debug ptr => _9;
- scope 10 {
- }
- }
- }
- }
- scope 11 (inlined ptr::mut_ptr::<impl *mut [u32]>::as_mut_ptr) {
- debug self => _5;
+ scope 10 (inlined std::ptr::mut_ptr::<impl *mut [u32]>::as_mut_ptr) {
+ debug self => _5;
+ }
+ scope 11 (inlined std::ptr::mut_ptr::<impl *mut u32>::add) {
+ debug self => _6;
+ debug count => _2;
+ scope 12 {
}
- scope 12 (inlined ptr::mut_ptr::<impl *mut u32>::add) {
- debug self => _6;
- debug count => _2;
- scope 13 {
- }
+ }
+ }
+ scope 6 (inlined std::ptr::mut_ptr::<impl *mut [u32]>::len) {
+ debug self => _5;
+ let mut _10: *const [u32];
+ scope 7 (inlined std::ptr::metadata::<[u32]>) {
+ debug ptr => _10;
+ scope 8 {
}
}
}
+ scope 9 (inlined Arguments::<'_>::new_const) {
+ debug pieces => _9;
+ }
}
}
}
@@ -73,10 +70,12 @@ fn slice_get_mut_usize(_1: &mut [u32], _2: usize) -> Option<&mut u32> {
StorageLive(_5);
_5 = &raw mut (*_1);
StorageLive(_9);
+ StorageLive(_10);
StorageLive(_6);
_6 = _5 as *mut u32 (PtrToPtr);
_7 = Offset(_6, _2);
StorageDead(_6);
+ StorageDead(_10);
StorageDead(_9);
StorageDead(_5);
_8 = &mut (*_7);
diff --git a/tests/mir-opt/pre-codegen/slice_index.slice_get_mut_usize.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/pre-codegen/slice_index.slice_get_mut_usize.PreCodegen.after.panic-unwind.mir
index 8590c9d3b..e4d9060d4 100644
--- a/tests/mir-opt/pre-codegen/slice_index.slice_get_mut_usize.PreCodegen.after.panic-unwind.mir
+++ b/tests/mir-opt/pre-codegen/slice_index.slice_get_mut_usize.PreCodegen.after.panic-unwind.mir
@@ -20,33 +20,30 @@ fn slice_get_mut_usize(_1: &mut [u32], _2: usize) -> Option<&mut u32> {
debug self => _2;
debug slice => _5;
let mut _6: *mut u32;
+ let mut _9: &[&str];
scope 5 {
- debug this => _2;
- scope 6 {
- scope 7 (inlined <usize as SliceIndex<[T]>>::get_unchecked_mut::runtime::<u32>) {
- debug this => _2;
- debug slice => _5;
- scope 8 (inlined ptr::mut_ptr::<impl *mut [u32]>::len) {
- debug self => _5;
- let mut _9: *const [u32];
- scope 9 (inlined std::ptr::metadata::<[u32]>) {
- debug ptr => _9;
- scope 10 {
- }
- }
- }
- }
- scope 11 (inlined ptr::mut_ptr::<impl *mut [u32]>::as_mut_ptr) {
- debug self => _5;
+ scope 10 (inlined std::ptr::mut_ptr::<impl *mut [u32]>::as_mut_ptr) {
+ debug self => _5;
+ }
+ scope 11 (inlined std::ptr::mut_ptr::<impl *mut u32>::add) {
+ debug self => _6;
+ debug count => _2;
+ scope 12 {
}
- scope 12 (inlined ptr::mut_ptr::<impl *mut u32>::add) {
- debug self => _6;
- debug count => _2;
- scope 13 {
- }
+ }
+ }
+ scope 6 (inlined std::ptr::mut_ptr::<impl *mut [u32]>::len) {
+ debug self => _5;
+ let mut _10: *const [u32];
+ scope 7 (inlined std::ptr::metadata::<[u32]>) {
+ debug ptr => _10;
+ scope 8 {
}
}
}
+ scope 9 (inlined Arguments::<'_>::new_const) {
+ debug pieces => _9;
+ }
}
}
}
@@ -73,10 +70,12 @@ fn slice_get_mut_usize(_1: &mut [u32], _2: usize) -> Option<&mut u32> {
StorageLive(_5);
_5 = &raw mut (*_1);
StorageLive(_9);
+ StorageLive(_10);
StorageLive(_6);
_6 = _5 as *mut u32 (PtrToPtr);
_7 = Offset(_6, _2);
StorageDead(_6);
+ StorageDead(_10);
StorageDead(_9);
StorageDead(_5);
_8 = &mut (*_7);
diff --git a/tests/mir-opt/pre-codegen/slice_index.slice_get_unchecked_mut_range.PreCodegen.after.panic-abort.mir b/tests/mir-opt/pre-codegen/slice_index.slice_get_unchecked_mut_range.PreCodegen.after.panic-abort.mir
index 729841ec5..0d95f81c3 100644
--- a/tests/mir-opt/pre-codegen/slice_index.slice_get_unchecked_mut_range.PreCodegen.after.panic-abort.mir
+++ b/tests/mir-opt/pre-codegen/slice_index.slice_get_unchecked_mut_range.PreCodegen.after.panic-abort.mir
@@ -19,56 +19,51 @@ fn slice_get_unchecked_mut_range(_1: &mut [u32], _2: std::ops::Range<usize>) ->
debug slice => _5;
let mut _7: *mut u32;
let mut _8: *mut u32;
+ let mut _14: &[&str];
scope 4 {
- debug ((this: std::ops::Range<usize>).0: usize) => _3;
- debug ((this: std::ops::Range<usize>).1: usize) => _4;
+ let _6: usize;
scope 5 {
- let _6: usize;
- scope 6 {
- debug new_len => _6;
- scope 11 (inlined ptr::mut_ptr::<impl *mut [u32]>::as_mut_ptr) {
- debug self => _5;
+ debug new_len => _6;
+ scope 10 (inlined std::ptr::mut_ptr::<impl *mut [u32]>::as_mut_ptr) {
+ debug self => _5;
+ }
+ scope 11 (inlined std::ptr::mut_ptr::<impl *mut u32>::add) {
+ debug self => _7;
+ debug count => _3;
+ scope 12 {
}
- scope 12 (inlined ptr::mut_ptr::<impl *mut u32>::add) {
- debug self => _7;
- debug count => _3;
- scope 13 {
- }
+ }
+ scope 13 (inlined slice_from_raw_parts_mut::<u32>) {
+ debug data => _8;
+ debug len => _6;
+ let mut _9: *mut ();
+ scope 14 (inlined std::ptr::mut_ptr::<impl *mut u32>::cast::<()>) {
+ debug self => _8;
}
- scope 14 (inlined slice_from_raw_parts_mut::<u32>) {
- debug data => _8;
- debug len => _6;
- let mut _9: *mut ();
- scope 15 (inlined ptr::mut_ptr::<impl *mut u32>::cast::<()>) {
- debug self => _8;
- }
- scope 16 (inlined std::ptr::from_raw_parts_mut::<[u32]>) {
- debug data_address => _9;
- debug metadata => _6;
- let mut _10: *const ();
- let mut _11: std::ptr::metadata::PtrComponents<[u32]>;
- let mut _12: std::ptr::metadata::PtrRepr<[u32]>;
- scope 17 {
- }
+ scope 15 (inlined std::ptr::from_raw_parts_mut::<[u32]>) {
+ debug data_address => _9;
+ debug metadata => _6;
+ let mut _10: *const ();
+ let mut _11: std::ptr::metadata::PtrComponents<[u32]>;
+ let mut _12: std::ptr::metadata::PtrRepr<[u32]>;
+ scope 16 {
}
}
}
- scope 7 (inlined <std::ops::Range<usize> as SliceIndex<[T]>>::get_unchecked_mut::runtime::<u32>) {
- debug ((this: std::ops::Range<usize>).0: usize) => _3;
- debug ((this: std::ops::Range<usize>).1: usize) => _4;
- debug slice => _5;
- scope 8 (inlined ptr::mut_ptr::<impl *mut [u32]>::len) {
- debug self => _5;
- let mut _14: *const [u32];
- scope 9 (inlined std::ptr::metadata::<[u32]>) {
- debug ptr => _14;
- scope 10 {
- }
- }
- }
+ }
+ }
+ scope 6 (inlined std::ptr::mut_ptr::<impl *mut [u32]>::len) {
+ debug self => _5;
+ let mut _15: *const [u32];
+ scope 7 (inlined std::ptr::metadata::<[u32]>) {
+ debug ptr => _15;
+ scope 8 {
}
}
}
+ scope 9 (inlined Arguments::<'_>::new_const) {
+ debug pieces => _14;
+ }
}
}
}
@@ -78,8 +73,9 @@ fn slice_get_unchecked_mut_range(_1: &mut [u32], _2: std::ops::Range<usize>) ->
_4 = move (_2.1: usize);
StorageLive(_5);
_5 = &raw mut (*_1);
- StorageLive(_6);
StorageLive(_14);
+ StorageLive(_6);
+ StorageLive(_15);
_6 = SubUnchecked(_4, _3);
StorageLive(_8);
StorageLive(_7);
@@ -92,16 +88,17 @@ fn slice_get_unchecked_mut_range(_1: &mut [u32], _2: std::ops::Range<usize>) ->
StorageLive(_11);
StorageLive(_10);
_10 = _9 as *const () (PointerCoercion(MutToConstPointer));
- _11 = ptr::metadata::PtrComponents::<[u32]> { data_address: move _10, metadata: _6 };
+ _11 = std::ptr::metadata::PtrComponents::<[u32]> { data_address: move _10, metadata: _6 };
StorageDead(_10);
- _12 = ptr::metadata::PtrRepr::<[u32]> { const_ptr: move _11 };
+ _12 = std::ptr::metadata::PtrRepr::<[u32]> { const_ptr: move _11 };
StorageDead(_11);
_13 = (_12.1: *mut [u32]);
StorageDead(_12);
StorageDead(_9);
StorageDead(_8);
- StorageDead(_14);
+ StorageDead(_15);
StorageDead(_6);
+ StorageDead(_14);
StorageDead(_5);
_0 = &mut (*_13);
return;
diff --git a/tests/mir-opt/pre-codegen/slice_index.slice_get_unchecked_mut_range.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/pre-codegen/slice_index.slice_get_unchecked_mut_range.PreCodegen.after.panic-unwind.mir
index 729841ec5..0d95f81c3 100644
--- a/tests/mir-opt/pre-codegen/slice_index.slice_get_unchecked_mut_range.PreCodegen.after.panic-unwind.mir
+++ b/tests/mir-opt/pre-codegen/slice_index.slice_get_unchecked_mut_range.PreCodegen.after.panic-unwind.mir
@@ -19,56 +19,51 @@ fn slice_get_unchecked_mut_range(_1: &mut [u32], _2: std::ops::Range<usize>) ->
debug slice => _5;
let mut _7: *mut u32;
let mut _8: *mut u32;
+ let mut _14: &[&str];
scope 4 {
- debug ((this: std::ops::Range<usize>).0: usize) => _3;
- debug ((this: std::ops::Range<usize>).1: usize) => _4;
+ let _6: usize;
scope 5 {
- let _6: usize;
- scope 6 {
- debug new_len => _6;
- scope 11 (inlined ptr::mut_ptr::<impl *mut [u32]>::as_mut_ptr) {
- debug self => _5;
+ debug new_len => _6;
+ scope 10 (inlined std::ptr::mut_ptr::<impl *mut [u32]>::as_mut_ptr) {
+ debug self => _5;
+ }
+ scope 11 (inlined std::ptr::mut_ptr::<impl *mut u32>::add) {
+ debug self => _7;
+ debug count => _3;
+ scope 12 {
}
- scope 12 (inlined ptr::mut_ptr::<impl *mut u32>::add) {
- debug self => _7;
- debug count => _3;
- scope 13 {
- }
+ }
+ scope 13 (inlined slice_from_raw_parts_mut::<u32>) {
+ debug data => _8;
+ debug len => _6;
+ let mut _9: *mut ();
+ scope 14 (inlined std::ptr::mut_ptr::<impl *mut u32>::cast::<()>) {
+ debug self => _8;
}
- scope 14 (inlined slice_from_raw_parts_mut::<u32>) {
- debug data => _8;
- debug len => _6;
- let mut _9: *mut ();
- scope 15 (inlined ptr::mut_ptr::<impl *mut u32>::cast::<()>) {
- debug self => _8;
- }
- scope 16 (inlined std::ptr::from_raw_parts_mut::<[u32]>) {
- debug data_address => _9;
- debug metadata => _6;
- let mut _10: *const ();
- let mut _11: std::ptr::metadata::PtrComponents<[u32]>;
- let mut _12: std::ptr::metadata::PtrRepr<[u32]>;
- scope 17 {
- }
+ scope 15 (inlined std::ptr::from_raw_parts_mut::<[u32]>) {
+ debug data_address => _9;
+ debug metadata => _6;
+ let mut _10: *const ();
+ let mut _11: std::ptr::metadata::PtrComponents<[u32]>;
+ let mut _12: std::ptr::metadata::PtrRepr<[u32]>;
+ scope 16 {
}
}
}
- scope 7 (inlined <std::ops::Range<usize> as SliceIndex<[T]>>::get_unchecked_mut::runtime::<u32>) {
- debug ((this: std::ops::Range<usize>).0: usize) => _3;
- debug ((this: std::ops::Range<usize>).1: usize) => _4;
- debug slice => _5;
- scope 8 (inlined ptr::mut_ptr::<impl *mut [u32]>::len) {
- debug self => _5;
- let mut _14: *const [u32];
- scope 9 (inlined std::ptr::metadata::<[u32]>) {
- debug ptr => _14;
- scope 10 {
- }
- }
- }
+ }
+ }
+ scope 6 (inlined std::ptr::mut_ptr::<impl *mut [u32]>::len) {
+ debug self => _5;
+ let mut _15: *const [u32];
+ scope 7 (inlined std::ptr::metadata::<[u32]>) {
+ debug ptr => _15;
+ scope 8 {
}
}
}
+ scope 9 (inlined Arguments::<'_>::new_const) {
+ debug pieces => _14;
+ }
}
}
}
@@ -78,8 +73,9 @@ fn slice_get_unchecked_mut_range(_1: &mut [u32], _2: std::ops::Range<usize>) ->
_4 = move (_2.1: usize);
StorageLive(_5);
_5 = &raw mut (*_1);
- StorageLive(_6);
StorageLive(_14);
+ StorageLive(_6);
+ StorageLive(_15);
_6 = SubUnchecked(_4, _3);
StorageLive(_8);
StorageLive(_7);
@@ -92,16 +88,17 @@ fn slice_get_unchecked_mut_range(_1: &mut [u32], _2: std::ops::Range<usize>) ->
StorageLive(_11);
StorageLive(_10);
_10 = _9 as *const () (PointerCoercion(MutToConstPointer));
- _11 = ptr::metadata::PtrComponents::<[u32]> { data_address: move _10, metadata: _6 };
+ _11 = std::ptr::metadata::PtrComponents::<[u32]> { data_address: move _10, metadata: _6 };
StorageDead(_10);
- _12 = ptr::metadata::PtrRepr::<[u32]> { const_ptr: move _11 };
+ _12 = std::ptr::metadata::PtrRepr::<[u32]> { const_ptr: move _11 };
StorageDead(_11);
_13 = (_12.1: *mut [u32]);
StorageDead(_12);
StorageDead(_9);
StorageDead(_8);
- StorageDead(_14);
+ StorageDead(_15);
StorageDead(_6);
+ StorageDead(_14);
StorageDead(_5);
_0 = &mut (*_13);
return;
diff --git a/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-abort.mir b/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-abort.mir
index 89009864c..c58b630a0 100644
--- a/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-abort.mir
+++ b/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-abort.mir
@@ -45,16 +45,16 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
scope 14 {
scope 15 (inlined NonNull::<T>::new_unchecked::runtime::<T>) {
debug ptr => _9;
- scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null) {
+ scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null) {
debug self => _9;
let mut _24: *mut u8;
scope 17 {
- scope 18 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
+ scope 18 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _24;
- scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
+ scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _24;
scope 20 {
- scope 21 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
+ scope 21 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _24;
}
}
@@ -71,7 +71,7 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
scope 10 {
}
}
- scope 11 (inlined ptr::const_ptr::<impl *const T>::add) {
+ scope 11 (inlined std::ptr::const_ptr::<impl *const T>::add) {
debug self => _4;
debug count => _6;
scope 12 {
diff --git a/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-unwind.mir
index 3d76bab7c..1a805f0fd 100644
--- a/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-unwind.mir
+++ b/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-unwind.mir
@@ -45,16 +45,16 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
scope 14 {
scope 15 (inlined NonNull::<T>::new_unchecked::runtime::<T>) {
debug ptr => _9;
- scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null) {
+ scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null) {
debug self => _9;
let mut _24: *mut u8;
scope 17 {
- scope 18 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
+ scope 18 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _24;
- scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
+ scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _24;
scope 20 {
- scope 21 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
+ scope 21 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _24;
}
}
@@ -71,7 +71,7 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
scope 10 {
}
}
- scope 11 (inlined ptr::const_ptr::<impl *const T>::add) {
+ scope 11 (inlined std::ptr::const_ptr::<impl *const T>::add) {
debug self => _4;
debug count => _6;
scope 12 {
diff --git a/tests/mir-opt/pre-codegen/slice_iter.forward_loop.PreCodegen.after.panic-abort.mir b/tests/mir-opt/pre-codegen/slice_iter.forward_loop.PreCodegen.after.panic-abort.mir
index 146fa57a0..09075eed6 100644
--- a/tests/mir-opt/pre-codegen/slice_iter.forward_loop.PreCodegen.after.panic-abort.mir
+++ b/tests/mir-opt/pre-codegen/slice_iter.forward_loop.PreCodegen.after.panic-abort.mir
@@ -42,16 +42,16 @@ fn forward_loop(_1: &[T], _2: impl Fn(&T)) -> () {
scope 14 {
scope 15 (inlined NonNull::<T>::new_unchecked::runtime::<T>) {
debug ptr => _9;
- scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null) {
+ scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null) {
debug self => _9;
let mut _22: *mut u8;
scope 17 {
- scope 18 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
+ scope 18 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _22;
- scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
+ scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _22;
scope 20 {
- scope 21 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
+ scope 21 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _22;
}
}
@@ -68,7 +68,7 @@ fn forward_loop(_1: &[T], _2: impl Fn(&T)) -> () {
scope 10 {
}
}
- scope 11 (inlined ptr::const_ptr::<impl *const T>::add) {
+ scope 11 (inlined std::ptr::const_ptr::<impl *const T>::add) {
debug self => _4;
debug count => _6;
scope 12 {
diff --git a/tests/mir-opt/pre-codegen/slice_iter.forward_loop.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/pre-codegen/slice_iter.forward_loop.PreCodegen.after.panic-unwind.mir
index e8586cec9..47b847464 100644
--- a/tests/mir-opt/pre-codegen/slice_iter.forward_loop.PreCodegen.after.panic-unwind.mir
+++ b/tests/mir-opt/pre-codegen/slice_iter.forward_loop.PreCodegen.after.panic-unwind.mir
@@ -42,16 +42,16 @@ fn forward_loop(_1: &[T], _2: impl Fn(&T)) -> () {
scope 14 {
scope 15 (inlined NonNull::<T>::new_unchecked::runtime::<T>) {
debug ptr => _9;
- scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null) {
+ scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null) {
debug self => _9;
let mut _22: *mut u8;
scope 17 {
- scope 18 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
+ scope 18 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _22;
- scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
+ scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _22;
scope 20 {
- scope 21 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
+ scope 21 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _22;
}
}
@@ -68,7 +68,7 @@ fn forward_loop(_1: &[T], _2: impl Fn(&T)) -> () {
scope 10 {
}
}
- scope 11 (inlined ptr::const_ptr::<impl *const T>::add) {
+ scope 11 (inlined std::ptr::const_ptr::<impl *const T>::add) {
debug self => _4;
debug count => _6;
scope 12 {
diff --git a/tests/mir-opt/pre-codegen/slice_iter.range_loop.PreCodegen.after.panic-abort.mir b/tests/mir-opt/pre-codegen/slice_iter.range_loop.PreCodegen.after.panic-abort.mir
index ac1de7b4c..db6922968 100644
--- a/tests/mir-opt/pre-codegen/slice_iter.range_loop.PreCodegen.after.panic-abort.mir
+++ b/tests/mir-opt/pre-codegen/slice_iter.range_loop.PreCodegen.after.panic-abort.mir
@@ -39,7 +39,7 @@ fn range_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
scope 8 {
}
}
- scope 9 (inlined cmp::impls::<impl PartialOrd for usize>::lt) {
+ scope 9 (inlined std::cmp::impls::<impl PartialOrd for usize>::lt) {
debug self => _7;
debug other => _8;
let mut _9: usize;
diff --git a/tests/mir-opt/pre-codegen/slice_iter.range_loop.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/pre-codegen/slice_iter.range_loop.PreCodegen.after.panic-unwind.mir
index 3c49ecf95..81d1832ee 100644
--- a/tests/mir-opt/pre-codegen/slice_iter.range_loop.PreCodegen.after.panic-unwind.mir
+++ b/tests/mir-opt/pre-codegen/slice_iter.range_loop.PreCodegen.after.panic-unwind.mir
@@ -39,7 +39,7 @@ fn range_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
scope 8 {
}
}
- scope 9 (inlined cmp::impls::<impl PartialOrd for usize>::lt) {
+ scope 9 (inlined std::cmp::impls::<impl PartialOrd for usize>::lt) {
debug self => _7;
debug other => _8;
let mut _9: usize;
diff --git a/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-abort.mir b/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-abort.mir
index f3760463f..5ed7ca5e2 100644
--- a/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-abort.mir
+++ b/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-abort.mir
@@ -47,16 +47,16 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
scope 14 {
scope 15 (inlined NonNull::<T>::new_unchecked::runtime::<T>) {
debug ptr => _9;
- scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null) {
+ scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null) {
debug self => _9;
let mut _24: *mut u8;
scope 17 {
- scope 18 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
+ scope 18 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _24;
- scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
+ scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _24;
scope 20 {
- scope 21 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
+ scope 21 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _24;
}
}
@@ -73,7 +73,7 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
scope 10 {
}
}
- scope 11 (inlined ptr::const_ptr::<impl *const T>::add) {
+ scope 11 (inlined std::ptr::const_ptr::<impl *const T>::add) {
debug self => _4;
debug count => _6;
scope 12 {
diff --git a/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-unwind.mir
index e63f8b893..bbb979d23 100644
--- a/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-unwind.mir
+++ b/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-unwind.mir
@@ -47,16 +47,16 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
scope 14 {
scope 15 (inlined NonNull::<T>::new_unchecked::runtime::<T>) {
debug ptr => _9;
- scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null) {
+ scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null) {
debug self => _9;
let mut _24: *mut u8;
scope 17 {
- scope 18 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
+ scope 18 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _24;
- scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
+ scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _24;
scope 20 {
- scope 21 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
+ scope 21 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _24;
}
}
@@ -73,7 +73,7 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
scope 10 {
}
}
- scope 11 (inlined ptr::const_ptr::<impl *const T>::add) {
+ scope 11 (inlined std::ptr::const_ptr::<impl *const T>::add) {
debug self => _4;
debug count => _6;
scope 12 {
diff --git a/tests/mir-opt/reference_prop.rs b/tests/mir-opt/reference_prop.rs
index 36134e019..1b9c8fe15 100644
--- a/tests/mir-opt/reference_prop.rs
+++ b/tests/mir-opt/reference_prop.rs
@@ -695,7 +695,7 @@ fn multiple_storage() {
// As there are multiple `StorageLive` statements for `x`, we cannot know if this `z`'s
// pointer address is the address of `x`, so do nothing.
let y = *z;
- Call(RET = opaque(y), retblock)
+ Call(RET = opaque(y), retblock, UnwindContinue())
}
retblock = {
@@ -723,7 +723,7 @@ fn dominate_storage() {
}
bb1 = {
let c = *r;
- Call(RET = opaque(c), bb2)
+ Call(RET = opaque(c), bb2, UnwindContinue())
}
bb2 = {
StorageDead(x);
@@ -759,18 +759,18 @@ fn maybe_dead(m: bool) {
bb1 = {
StorageDead(x);
StorageDead(y);
- Call(RET = opaque(u), bb2)
+ Call(RET = opaque(u), bb2, UnwindContinue())
}
bb2 = {
// As `x` may be `StorageDead`, `a` may be dangling, so we do nothing.
let z = *a;
- Call(RET = opaque(z), bb3)
+ Call(RET = opaque(z), bb3, UnwindContinue())
}
bb3 = {
// As `y` may be `StorageDead`, `b` may be dangling, so we do nothing.
// This implies that we also do not substitute `b` in `bb0`.
let t = *b;
- Call(RET = opaque(t), retblock)
+ Call(RET = opaque(t), retblock, UnwindContinue())
}
retblock = {
Return()
diff --git a/tests/mir-opt/retag.array_casts.SimplifyCfg-elaborate-drops.after.panic-abort.mir b/tests/mir-opt/retag.array_casts.SimplifyCfg-elaborate-drops.after.panic-abort.mir
index 566b6af95..9c4d6da29 100644
--- a/tests/mir-opt/retag.array_casts.SimplifyCfg-elaborate-drops.after.panic-abort.mir
+++ b/tests/mir-opt/retag.array_casts.SimplifyCfg-elaborate-drops.after.panic-abort.mir
@@ -75,7 +75,7 @@ fn array_casts() -> () {
StorageLive(_6);
StorageLive(_7);
_7 = _2;
- _6 = ptr::mut_ptr::<impl *mut usize>::add(move _7, const 1_usize) -> [return: bb1, unwind unreachable];
+ _6 = std::ptr::mut_ptr::<impl *mut usize>::add(move _7, const 1_usize) -> [return: bb1, unwind unreachable];
}
bb1: {
@@ -101,7 +101,7 @@ fn array_casts() -> () {
StorageLive(_16);
StorageLive(_17);
_17 = _9;
- _16 = ptr::const_ptr::<impl *const usize>::add(move _17, const 1_usize) -> [return: bb2, unwind unreachable];
+ _16 = std::ptr::const_ptr::<impl *const usize>::add(move _17, const 1_usize) -> [return: bb2, unwind unreachable];
}
bb2: {
diff --git a/tests/mir-opt/retag.array_casts.SimplifyCfg-elaborate-drops.after.panic-unwind.mir b/tests/mir-opt/retag.array_casts.SimplifyCfg-elaborate-drops.after.panic-unwind.mir
index d0d317632..ca064ab2b 100644
--- a/tests/mir-opt/retag.array_casts.SimplifyCfg-elaborate-drops.after.panic-unwind.mir
+++ b/tests/mir-opt/retag.array_casts.SimplifyCfg-elaborate-drops.after.panic-unwind.mir
@@ -75,7 +75,7 @@ fn array_casts() -> () {
StorageLive(_6);
StorageLive(_7);
_7 = _2;
- _6 = ptr::mut_ptr::<impl *mut usize>::add(move _7, const 1_usize) -> [return: bb1, unwind continue];
+ _6 = std::ptr::mut_ptr::<impl *mut usize>::add(move _7, const 1_usize) -> [return: bb1, unwind continue];
}
bb1: {
@@ -101,7 +101,7 @@ fn array_casts() -> () {
StorageLive(_16);
StorageLive(_17);
_17 = _9;
- _16 = ptr::const_ptr::<impl *const usize>::add(move _17, const 1_usize) -> [return: bb2, unwind continue];
+ _16 = std::ptr::const_ptr::<impl *const usize>::add(move _17, const 1_usize) -> [return: bb2, unwind continue];
}
bb2: {
diff --git a/tests/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff b/tests/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff
index fe4b33001..d287b20c4 100644
--- a/tests/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff
+++ b/tests/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff
@@ -52,29 +52,21 @@
StorageLive(_10);
StorageLive(_11);
_9 = discriminant(_1);
- switchInt(move _9) -> [0: bb6, 1: bb5, otherwise: bb3];
+ switchInt(move _9) -> [0: bb6, 1: bb5, otherwise: bb2];
}
bb1: {
- StorageDead(_11);
- StorageDead(_10);
- StorageDead(_9);
- _5 = discriminant(_3);
- switchInt(move _5) -> [0: bb2, 1: bb4, otherwise: bb3];
- }
-
- bb2: {
_8 = ((_3 as Continue).0: i32);
_0 = Result::<i32, i32>::Ok(_8);
StorageDead(_3);
return;
}
- bb3: {
+ bb2: {
unreachable;
}
- bb4: {
+ bb3: {
_6 = ((_3 as Break).0: std::result::Result<std::convert::Infallible, i32>);
_13 = ((_6 as Err).0: i32);
_0 = Result::<i32, i32>::Err(move _13);
@@ -82,19 +74,27 @@
return;
}
+ bb4: {
+ StorageDead(_11);
+ StorageDead(_10);
+ StorageDead(_9);
+ _5 = discriminant(_3);
+ switchInt(move _5) -> [0: bb1, 1: bb3, otherwise: bb2];
+ }
+
bb5: {
_11 = ((_1 as Err).0: i32);
StorageLive(_12);
_12 = Result::<Infallible, i32>::Err(move _11);
_3 = ControlFlow::<Result<Infallible, i32>, i32>::Break(move _12);
StorageDead(_12);
- goto -> bb1;
+ goto -> bb4;
}
bb6: {
_10 = ((_1 as Ok).0: i32);
_3 = ControlFlow::<Result<Infallible, i32>, i32>::Continue(move _10);
- goto -> bb1;
+ goto -> bb4;
}
}
diff --git a/tests/pretty/cast-lt.pp b/tests/pretty/cast-lt.pp
index e6c4d1956..61cd8f597 100644
--- a/tests/pretty/cast-lt.pp
+++ b/tests/pretty/cast-lt.pp
@@ -8,6 +8,6 @@ extern crate std;
// pretty-mode:expanded
// pp-exact:cast-lt.pp
-macro_rules! negative { ($e : expr) => { $e < 0 } }
+macro_rules! negative { ($e:expr) => { $e < 0 } }
fn main() { (1 as i32) < 0; }
diff --git a/tests/run-make-fulldeps/issue-19371/foo.rs b/tests/run-make-fulldeps/issue-19371/foo.rs
index 1a9464916..a0bbe3851 100644
--- a/tests/run-make-fulldeps/issue-19371/foo.rs
+++ b/tests/run-make-fulldeps/issue-19371/foo.rs
@@ -69,9 +69,8 @@ fn compile(code: String, output: PathBuf, sysroot: PathBuf) {
interface::run_compiler(config, |compiler| {
let linker = compiler.enter(|queries| {
queries.global_ctxt()?.enter(|tcx| tcx.analysis(()))?;
- let ongoing_codegen = queries.ongoing_codegen()?;
- queries.linker(ongoing_codegen)
+ queries.codegen_and_build_linker()
});
- linker.unwrap().link().unwrap();
+ linker.unwrap().link(&compiler.sess, &*compiler.codegen_backend).unwrap();
});
}
diff --git a/tests/run-make-fulldeps/obtain-borrowck/driver.rs b/tests/run-make-fulldeps/obtain-borrowck/driver.rs
index 5df4c558e..9cbe9e590 100644
--- a/tests/run-make-fulldeps/obtain-borrowck/driver.rs
+++ b/tests/run-make-fulldeps/obtain-borrowck/driver.rs
@@ -61,7 +61,7 @@ impl rustc_driver::Callbacks for CompilerCalls {
compiler: &Compiler,
queries: &'tcx Queries<'tcx>,
) -> Compilation {
- compiler.session().abort_if_errors();
+ compiler.sess.abort_if_errors();
queries.global_ctxt().unwrap().enter(|tcx| {
// Collect definition ids of MIR bodies.
let hir = tcx.hir();
diff --git a/tests/run-make/compressed-debuginfo/Makefile b/tests/run-make/compressed-debuginfo/Makefile
index f9e4927d0..d2f24dde0 100644
--- a/tests/run-make/compressed-debuginfo/Makefile
+++ b/tests/run-make/compressed-debuginfo/Makefile
@@ -2,7 +2,6 @@
include ../tools.mk
# only-linux
-# min-llvm-version: 16.0
#
# This tests debuginfo-compression.
diff --git a/tests/run-make/emit-to-stdout/emit-link.stderr b/tests/run-make/emit-to-stdout/emit-link.stderr
index a9d856503..0553b22a4 100644
--- a/tests/run-make/emit-to-stdout/emit-link.stderr
+++ b/tests/run-make/emit-to-stdout/emit-link.stderr
@@ -1,4 +1,4 @@
error: option `-o` or `--emit` is used to write binary output type `link` to stdout, but stdout is a tty
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/run-make/emit-to-stdout/emit-llvm-bc.stderr b/tests/run-make/emit-to-stdout/emit-llvm-bc.stderr
index 7b53bd16e..a50148f9e 100644
--- a/tests/run-make/emit-to-stdout/emit-llvm-bc.stderr
+++ b/tests/run-make/emit-to-stdout/emit-llvm-bc.stderr
@@ -1,4 +1,4 @@
error: option `-o` or `--emit` is used to write binary output type `llvm-bc` to stdout, but stdout is a tty
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/run-make/emit-to-stdout/emit-metadata.stderr b/tests/run-make/emit-to-stdout/emit-metadata.stderr
index ee1e52937..27ad5d529 100644
--- a/tests/run-make/emit-to-stdout/emit-metadata.stderr
+++ b/tests/run-make/emit-to-stdout/emit-metadata.stderr
@@ -1,4 +1,4 @@
error: option `-o` or `--emit` is used to write binary output type `metadata` to stdout, but stdout is a tty
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/run-make/emit-to-stdout/emit-multiple-types.stderr b/tests/run-make/emit-to-stdout/emit-multiple-types.stderr
index b8a683cd9..4f74cb840 100644
--- a/tests/run-make/emit-to-stdout/emit-multiple-types.stderr
+++ b/tests/run-make/emit-to-stdout/emit-multiple-types.stderr
@@ -1,4 +1,4 @@
error: can't use option `-o` or `--emit` to write multiple output types to stdout
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/run-make/emit-to-stdout/emit-obj.stderr b/tests/run-make/emit-to-stdout/emit-obj.stderr
index b13035308..9bbcea010 100644
--- a/tests/run-make/emit-to-stdout/emit-obj.stderr
+++ b/tests/run-make/emit-to-stdout/emit-obj.stderr
@@ -1,4 +1,4 @@
error: option `-o` or `--emit` is used to write binary output type `obj` to stdout, but stdout is a tty
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/run-make/jobserver-error/Makefile b/tests/run-make/jobserver-error/Makefile
index 4a1699cc7..a7601b867 100644
--- a/tests/run-make/jobserver-error/Makefile
+++ b/tests/run-make/jobserver-error/Makefile
@@ -1,9 +1,15 @@
include ../tools.mk
# only-linux
-# ignore-test: This test randomly fails, see https://github.com/rust-lang/rust/issues/110321
+# ignore-cross-compile
-# Test compiler behavior in case: `jobserver-auth` points to correct pipe which is not jobserver.
+# Test compiler behavior in case environment specifies wrong jobserver.
all:
- bash -c 'echo "fn main() {}" | MAKEFLAGS="--jobserver-auth=3,3" $(RUSTC) - 3</dev/null' 2>&1 | diff jobserver.stderr -
+ bash -c 'echo "fn main() {}" | MAKEFLAGS="--jobserver-auth=3,3" $(RUSTC)' 2>&1 | diff cannot_open_fd.stderr -
+ bash -c 'echo "fn main() {}" | MAKEFLAGS="--jobserver-auth=3,3" $(RUSTC) - 3</dev/null' 2>&1 | diff not_a_pipe.stderr -
+
+# This test randomly fails, see https://github.com/rust-lang/rust/issues/110321
+disabled:
+ bash -c 'echo "fn main() {}" | MAKEFLAGS="--jobserver-auth=3,3" $(RUSTC) - 3< <(cat /dev/null)' 2>&1 | diff poisoned_pipe.stderr -
+
diff --git a/tests/run-make/jobserver-error/cannot_open_fd.stderr b/tests/run-make/jobserver-error/cannot_open_fd.stderr
new file mode 100644
index 000000000..343de5cd5
--- /dev/null
+++ b/tests/run-make/jobserver-error/cannot_open_fd.stderr
@@ -0,0 +1,6 @@
+warning: failed to connect to jobserver from environment variable `MAKEFLAGS="--jobserver-auth=3,3"`: cannot open file descriptor 3 from the jobserver environment variable value: Bad file descriptor (os error 9)
+ |
+ = note: the build environment is likely misconfigured
+
+error: no input filename given
+
diff --git a/tests/run-make/jobserver-error/not_a_pipe.stderr b/tests/run-make/jobserver-error/not_a_pipe.stderr
new file mode 100644
index 000000000..536c04576
--- /dev/null
+++ b/tests/run-make/jobserver-error/not_a_pipe.stderr
@@ -0,0 +1,4 @@
+warning: failed to connect to jobserver from environment variable `MAKEFLAGS="--jobserver-auth=3,3"`: file descriptor 3 from the jobserver environment variable value is not a pipe
+ |
+ = note: the build environment is likely misconfigured
+
diff --git a/tests/run-make/jobserver-error/jobserver.stderr b/tests/run-make/jobserver-error/poisoned_pipe.stderr
index d18e15a26..d129db9bc 100644
--- a/tests/run-make/jobserver-error/jobserver.stderr
+++ b/tests/run-make/jobserver-error/poisoned_pipe.stderr
@@ -1,4 +1,4 @@
error: failed to acquire jobserver token: early EOF on jobserver pipe
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/run-make/overwrite-input/file.stderr b/tests/run-make/overwrite-input/file.stderr
index 9936962b4..c13a270b0 100644
--- a/tests/run-make/overwrite-input/file.stderr
+++ b/tests/run-make/overwrite-input/file.stderr
@@ -2,5 +2,5 @@ warning: ignoring --out-dir flag due to -o flag
error: the input file "main.rs" would be overwritten by the generated executable
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/run-make/overwrite-input/folder.stderr b/tests/run-make/overwrite-input/folder.stderr
index 81b1e7367..6e51cb812 100644
--- a/tests/run-make/overwrite-input/folder.stderr
+++ b/tests/run-make/overwrite-input/folder.stderr
@@ -2,5 +2,5 @@ warning: ignoring --out-dir flag due to -o flag
error: the generated executable for the input file "main.rs" conflicts with the existing directory "."
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/run-make/overwrite-input/main.stderr b/tests/run-make/overwrite-input/main.stderr
index 9936962b4..c13a270b0 100644
--- a/tests/run-make/overwrite-input/main.stderr
+++ b/tests/run-make/overwrite-input/main.stderr
@@ -2,5 +2,5 @@ warning: ignoring --out-dir flag due to -o flag
error: the input file "main.rs" would be overwritten by the generated executable
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/run-make/pass-linker-flags-flavor/Makefile b/tests/run-make/pass-linker-flags-flavor/Makefile
new file mode 100644
index 000000000..1bb05d0f9
--- /dev/null
+++ b/tests/run-make/pass-linker-flags-flavor/Makefile
@@ -0,0 +1,11 @@
+# only-linux
+
+include ../tools.mk
+
+all:
+ $(RUSTC) empty.rs -Z unstable-options -C linker-flavor=gnu-cc -l static=l1 -l link-arg=a1 -l static=l2 -l link-arg=a2 -l dylib=d1 -l link-arg=a3 --print link-args | $(CGREP) -e 'l1.*-Wl,a1.*l2.*-Wl,a2.*d1.*-Wl,a3'
+ $(RUSTC) empty.rs -Z unstable-options -C linker-flavor=gnu-cc -l static=l1 -l link-arg:+verbatim=a1 -l static=l2 -l link-arg=a2 -l dylib=d1 -l link-arg=a3 --print link-args | $(CGREP) -e 'l1.*"a1".*l2.*-Wl,a2.*d1.*-Wl,a3'
+ $(RUSTC) empty.rs -Z unstable-options -C linker-flavor=ld -l static=l1 -l link-arg=a1 -l static=l2 -l link-arg=a2 -l dylib=d1 -l link-arg=a3 --print link-args | $(CGREP) -e 'l1.*"a1".*l2.*"a2".*d1.*"a3"'
+ $(RUSTC) attribute.rs -Z unstable-options -C linker-flavor=gnu-cc --print link-args | $(CGREP) -e 'l1.*-Wl,a1.*l2.*-Wl,a2.*d1.*-Wl,a3'
+ $(RUSTC) --cfg 'feature="verbatim"' attribute.rs -Z unstable-options -C linker-flavor=gnu-cc --print link-args | $(CGREP) -e 'l1.*"a1".*l2.*-Wl,a2.*d1.*-Wl,a3'
+ $(RUSTC) attribute.rs -C linker-flavor=ld --print link-args | $(CGREP) -e 'l1.*"a1".*l2.*"a2".*d1.*"a3"'
diff --git a/tests/run-make/pass-linker-flags-flavor/attribute.rs b/tests/run-make/pass-linker-flags-flavor/attribute.rs
new file mode 100644
index 000000000..d09916530
--- /dev/null
+++ b/tests/run-make/pass-linker-flags-flavor/attribute.rs
@@ -0,0 +1,12 @@
+#![feature(link_arg_attribute)]
+
+#[link(kind = "static", name = "l1")]
+#[cfg_attr(feature = "verbatim", link(kind = "link-arg", name = "a1", modifiers = "+verbatim"))]
+#[cfg_attr(not(feature = "verbatim"), link(kind = "link-arg", name = "a1"))]
+#[link(kind = "static", name = "l2")]
+#[link(kind = "link-arg", name = "a2")]
+#[link(kind = "dylib", name = "d1")]
+#[link(kind = "link-arg", name = "a3")]
+extern "C" {}
+
+fn main() {}
diff --git a/tests/run-make/pass-linker-flags/rs.rs b/tests/run-make/pass-linker-flags-flavor/empty.rs
index f328e4d9d..f328e4d9d 100644
--- a/tests/run-make/pass-linker-flags/rs.rs
+++ b/tests/run-make/pass-linker-flags-flavor/empty.rs
diff --git a/tests/run-make/pass-linker-flags-from-dep/Makefile b/tests/run-make/pass-linker-flags-from-dep/Makefile
index b57389bb7..48b3b26ce 100644
--- a/tests/run-make/pass-linker-flags-from-dep/Makefile
+++ b/tests/run-make/pass-linker-flags-from-dep/Makefile
@@ -4,7 +4,9 @@ all:
# Build deps
$(RUSTC) native_dep_1.rs --crate-type=staticlib
$(RUSTC) native_dep_2.rs --crate-type=staticlib
- $(RUSTC) rust_dep.rs -l static:-bundle=native_dep_1 -l link-arg=some_flag -l static:-bundle=native_dep_2 --crate-type=lib -Z unstable-options
+ $(RUSTC) rust_dep_flag.rs -l static:-bundle=native_dep_1 -l link-arg=some_flag -l static:-bundle=native_dep_2 --crate-type=lib -Z unstable-options
+ $(RUSTC) rust_dep_attr.rs --crate-type=lib
# Check sequence of linker args
- $(RUSTC) main.rs --extern lib=$(TMPDIR)/librust_dep.rlib --crate-type=bin --print link-args | $(CGREP) -e 'native_dep_1.*some_flag.*native_dep_2'
+ $(RUSTC) main.rs --extern lib=$(TMPDIR)/librust_dep_flag.rlib --crate-type=bin --print link-args | $(CGREP) -e 'native_dep_1.*some_flag.*native_dep_2'
+ $(RUSTC) main.rs --extern lib=$(TMPDIR)/librust_dep_attr.rlib --crate-type=bin --print link-args | $(CGREP) -e 'native_dep_1.*some_flag.*native_dep_2'
diff --git a/tests/run-make/pass-linker-flags-from-dep/rust_dep_attr.rs b/tests/run-make/pass-linker-flags-from-dep/rust_dep_attr.rs
new file mode 100644
index 000000000..ac5888ce6
--- /dev/null
+++ b/tests/run-make/pass-linker-flags-from-dep/rust_dep_attr.rs
@@ -0,0 +1,14 @@
+#![feature(link_arg_attribute)]
+
+#[link(kind = "static", name = "native_dep_1", modifiers = "-bundle")]
+#[link(kind = "link-arg", name = "some_flag")]
+#[link(kind = "static", name = "native_dep_2", modifiers = "-bundle")]
+extern "C" {
+ pub fn foo();
+}
+
+pub fn f() {
+ unsafe {
+ foo();
+ }
+}
diff --git a/tests/run-make/pass-linker-flags-from-dep/rust_dep.rs b/tests/run-make/pass-linker-flags-from-dep/rust_dep_flag.rs
index 7f5df1139..7f5df1139 100644
--- a/tests/run-make/pass-linker-flags-from-dep/rust_dep.rs
+++ b/tests/run-make/pass-linker-flags-from-dep/rust_dep_flag.rs
diff --git a/tests/run-make/pass-linker-flags/Makefile b/tests/run-make/pass-linker-flags/Makefile
index 6ddbcbb1b..226943e93 100644
--- a/tests/run-make/pass-linker-flags/Makefile
+++ b/tests/run-make/pass-linker-flags/Makefile
@@ -1,4 +1,5 @@
include ../tools.mk
all:
- $(RUSTC) rs.rs -Z unstable-options -l static=l1 -l link-arg=a1 -l static=l2 -l link-arg=a2 -l dylib=d1 -l link-arg=a3 --print link-args | $(CGREP) -e 'l1.*a1.*l2.*a2.*d1.*a3'
+ $(RUSTC) empty.rs -Z unstable-options -l static=l1 -l link-arg=a1 -l static=l2 -l link-arg=a2 -l dylib=d1 -l link-arg=a3 --print link-args | $(CGREP) -e 'l1.*a1.*l2.*a2.*d1.*a3'
+ $(RUSTC) attribute.rs --print link-args | $(CGREP) -e 'l1.*a1.*l2.*a2.*d1.*a3'
diff --git a/tests/run-make/pass-linker-flags/attribute.rs b/tests/run-make/pass-linker-flags/attribute.rs
new file mode 100644
index 000000000..6f784c01f
--- /dev/null
+++ b/tests/run-make/pass-linker-flags/attribute.rs
@@ -0,0 +1,11 @@
+#![feature(link_arg_attribute)]
+
+#[link(kind = "static", name = "l1")]
+#[link(kind = "link-arg", name = "a1")]
+#[link(kind = "static", name = "l2")]
+#[link(kind = "link-arg", name = "a2")]
+#[link(kind = "dylib", name = "d1")]
+#[link(kind = "link-arg", name = "a3")]
+extern "C" {}
+
+fn main() {}
diff --git a/tests/run-make/pass-linker-flags/empty.rs b/tests/run-make/pass-linker-flags/empty.rs
new file mode 100644
index 000000000..f328e4d9d
--- /dev/null
+++ b/tests/run-make/pass-linker-flags/empty.rs
@@ -0,0 +1 @@
+fn main() {}
diff --git a/tests/run-make/rustc-macro-dep-files/foo.rs b/tests/run-make/rustc-macro-dep-files/foo.rs
index 66db1a217..00b1c26d4 100644
--- a/tests/run-make/rustc-macro-dep-files/foo.rs
+++ b/tests/run-make/rustc-macro-dep-files/foo.rs
@@ -7,6 +7,6 @@ use proc_macro::TokenStream;
#[proc_macro_derive(A)]
pub fn derive(input: TokenStream) -> TokenStream {
let input = input.to_string();
- assert!(input.contains("struct A ;"));
+ assert!(input.contains("struct A;"));
"struct B;".parse().unwrap()
}
diff --git a/tests/run-make/unknown-mod-stdin/unknown-mod.stderr b/tests/run-make/unknown-mod-stdin/unknown-mod.stderr
index 81ff83938..bdbaa3817 100644
--- a/tests/run-make/unknown-mod-stdin/unknown-mod.stderr
+++ b/tests/run-make/unknown-mod-stdin/unknown-mod.stderr
@@ -7,6 +7,6 @@ error[E0583]: file not found for module `unknown`
= help: to create the module `unknown`, create file "unknown.rs" or "unknown/mod.rs"
= note: if there is a `mod unknown` elsewhere in the crate already, import it with `use crate::...` instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0583`.
diff --git a/tests/run-make/valid-print-requests/valid-print-requests.stderr b/tests/run-make/valid-print-requests/valid-print-requests.stderr
index 4f57550c2..22bb102f9 100644
--- a/tests/run-make/valid-print-requests/valid-print-requests.stderr
+++ b/tests/run-make/valid-print-requests/valid-print-requests.stderr
@@ -1,2 +1,2 @@
-error: unknown print request `uwu`. Valid print requests are: `crate-name`, `file-names`, `sysroot`, `target-libdir`, `cfg`, `calling-conventions`, `target-list`, `target-cpus`, `target-features`, `relocation-models`, `code-models`, `tls-models`, `native-static-libs`, `stack-protector-strategies`, `target-spec-json`, `all-target-specs-json`, `link-args`, `split-debuginfo`, `deployment-target`
+error: unknown print request `uwu`. Valid print requests are: `all-target-specs-json`, `calling-conventions`, `cfg`, `code-models`, `crate-name`, `deployment-target`, `file-names`, `link-args`, `native-static-libs`, `relocation-models`, `split-debuginfo`, `stack-protector-strategies`, `sysroot`, `target-cpus`, `target-features`, `target-libdir`, `target-list`, `target-spec-json`, `tls-models`
diff --git a/tests/rustdoc-gui/font-weight.goml b/tests/rustdoc-gui/font-weight.goml
index 6fad128da..602b8d6f5 100644
--- a/tests/rustdoc-gui/font-weight.goml
+++ b/tests/rustdoc-gui/font-weight.goml
@@ -2,7 +2,7 @@
go-to: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html"
assert-css: ("//*[@class='rust item-decl']//a[text()='Alias']", {"font-weight": "400"})
assert-css: (
- "//*[@class='structfield small-section-header']//a[text()='Alias']",
+ "//*[@class='structfield section-header']//a[text()='Alias']",
{"font-weight": "400"},
)
assert-css: ("#method\.a_method > .code-header", {"font-weight": "600"})
diff --git a/tests/rustdoc-gui/globals.goml b/tests/rustdoc-gui/globals.goml
new file mode 100644
index 000000000..53f96ff08
--- /dev/null
+++ b/tests/rustdoc-gui/globals.goml
@@ -0,0 +1,24 @@
+// Make sure search stores its data in `window`
+// It needs to use a global to avoid racing on search-index.js and search.js
+// https://github.com/rust-lang/rust/pull/118961
+
+// URL query
+go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=sa'%3Bda'%3Bds"
+wait-for: "#search-tabs"
+assert-window-property-false: {"searchIndex": null}
+assert-window-property: {"srcIndex": null}
+
+// Form input
+go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
+write: (".search-input", "Foo")
+press-key: 'Enter'
+wait-for: "#search-tabs"
+assert-window-property-false: {"searchIndex": null}
+assert-window-property: {"srcIndex": null}
+
+// source sidebar
+go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
+click: "#src-sidebar-toggle"
+wait-for: "#src-sidebar details"
+assert-window-property-false: {"srcIndex": null}
+assert-window-property: {"searchIndex": null}
diff --git a/tests/rustdoc-gui/headers-color.goml b/tests/rustdoc-gui/headers-color.goml
index a7ac94c49..19185818f 100644
--- a/tests/rustdoc-gui/headers-color.goml
+++ b/tests/rustdoc-gui/headers-color.goml
@@ -31,7 +31,7 @@ define-function: (
ALL,
)
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
- assert-css: (".small-section-header a", {"color": |color|}, ALL)
+ assert-css: (".section-header a", {"color": |color|}, ALL)
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
// We select headings (h2, h3, h...).
assert-css: (".docblock > :not(p) > a", {"color": |headings_color|}, ALL)
diff --git a/tests/rustdoc-gui/hide-mobile-topbar.goml b/tests/rustdoc-gui/hide-mobile-topbar.goml
new file mode 100644
index 000000000..46eb8acfe
--- /dev/null
+++ b/tests/rustdoc-gui/hide-mobile-topbar.goml
@@ -0,0 +1,20 @@
+// Checks sidebar resizing stays synced with the setting
+go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
+set-window-size: (400, 600)
+
+// Verify that the "hide" option is unchecked
+click: "#settings-menu"
+wait-for: "#settings"
+assert-css: ("#settings", {"display": "block"})
+assert-property: ("#hide-sidebar", {"checked": "false"})
+assert-css: (".mobile-topbar", {"display": "flex"})
+
+// Toggle it
+click: "#hide-sidebar"
+assert-property: ("#hide-sidebar", {"checked": "true"})
+assert-css: (".mobile-topbar", {"display": "none"})
+
+// Toggle it again
+click: "#hide-sidebar"
+assert-property: ("#hide-sidebar", {"checked": "false"})
+assert-css: (".mobile-topbar", {"display": "flex"})
diff --git a/tests/rustdoc-gui/item-decl-comment-highlighting.goml b/tests/rustdoc-gui/item-decl-comment-highlighting.goml
new file mode 100644
index 000000000..60772693d
--- /dev/null
+++ b/tests/rustdoc-gui/item-decl-comment-highlighting.goml
@@ -0,0 +1,73 @@
+// This test checks that comments in item declarations are highlighted.
+go-to: "file://" + |DOC_PATH| + "/test_docs/private/enum.Enum.html"
+show-text: true
+
+define-function: (
+ "check-item-decl-comment",
+ (theme, url, comment_color),
+ block {
+ go-to: |url|
+ set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
+ reload:
+ assert-css: (".item-decl .comment", {"color": |comment_color|}, ALL)
+ }
+)
+
+define-function: (
+ "check-items-for-theme",
+ (theme, comment_color),
+ block {
+ call-function: ("check-item-decl-comment", {
+ "theme": |theme|,
+ "url": "file://" + |DOC_PATH| + "/test_docs/private/enum.Enum.html",
+ "comment_color": |comment_color|,
+ })
+ call-function: ("check-item-decl-comment", {
+ "theme": |theme|,
+ "url": "file://" + |DOC_PATH| + "/test_docs/private/struct.Struct.html",
+ "comment_color": |comment_color|,
+ })
+ call-function: ("check-item-decl-comment", {
+ "theme": |theme|,
+ "url": "file://" + |DOC_PATH| + "/test_docs/private/struct.Tuple.html",
+ "comment_color": |comment_color|,
+ })
+ call-function: ("check-item-decl-comment", {
+ "theme": |theme|,
+ "url": "file://" + |DOC_PATH| + "/test_docs/private/union.Union.html",
+ "comment_color": |comment_color|,
+ })
+ call-function: ("check-item-decl-comment", {
+ "theme": |theme|,
+ "url": "file://" + |DOC_PATH| + "/proc_macro_test/macro.make_answer.html",
+ "comment_color": |comment_color|,
+ })
+ call-function: ("check-item-decl-comment", {
+ "theme": |theme|,
+ "url": "file://" + |DOC_PATH| + "/proc_macro_test/derive.HelperAttr.html",
+ "comment_color": |comment_color|,
+ })
+ }
+)
+
+call-function: (
+ "check-items-for-theme",
+ {
+ "theme": "ayu",
+ "comment_color": "#788797",
+ }
+)
+call-function: (
+ "check-items-for-theme",
+ {
+ "theme": "dark",
+ "comment_color": "#8d8d8b",
+ }
+)
+call-function: (
+ "check-items-for-theme",
+ {
+ "theme": "light",
+ "comment_color": "#8e908c",
+ }
+)
diff --git a/tests/rustdoc-gui/item-info.goml b/tests/rustdoc-gui/item-info.goml
index 030ff8f8a..b46d4255e 100644
--- a/tests/rustdoc-gui/item-info.goml
+++ b/tests/rustdoc-gui/item-info.goml
@@ -8,7 +8,22 @@ assert-size: (".item-info", {"width": 840})
assert-size: (".item-info .stab", {"width": 289})
assert-position: (".item-info .stab", {"x": 245})
+// We check that the display of the feature elements is not broken. It serves as regression
+// test for <https://github.com/rust-lang/rust/issues/118615>.
+set-window-size: (850, 800)
+store-position: (
+ "//*[@class='stab portability']//code[text()='Win32_System']",
+ {"x": first_line_x, "y": first_line_y},
+)
+store-position: (
+ "//*[@class='stab portability']//code[text()='Win32_System_Diagnostics']",
+ {"x": second_line_x, "y": second_line_y},
+)
+assert: |first_line_x| != |second_line_x| && |first_line_x| == 516 && |second_line_x| == 272
+assert: |first_line_y| != |second_line_y| && |first_line_y| == 688 && |second_line_y| == 711
+
// Now we ensure that they're not rendered on the same line.
+set-window-size: (1100, 800)
go-to: "file://" + |DOC_PATH| + "/lib2/trait.Trait.html"
// We first ensure that there are two item info on the trait.
assert-count: ("#main-content > .item-info .stab", 2)
diff --git a/tests/rustdoc-gui/links-color.goml b/tests/rustdoc-gui/links-color.goml
index 0789d785f..d88ebfb40 100644
--- a/tests/rustdoc-gui/links-color.goml
+++ b/tests/rustdoc-gui/links-color.goml
@@ -26,12 +26,12 @@ define-function: (
assert-css: (".item-table .keyword", {"color": |keyword|}, ALL)
// Checking sidebar elements.
assert-css: (
- ".sidebar-elems a:not(.current)",
+ ".sidebar-elems li:not(.current) a",
{"color": |sidebar|, "background-color": "rgba(0, 0, 0, 0)", "font-weight": "400"},
ALL,
)
assert-css: (
- ".sidebar-elems a.current",
+ ".sidebar-elems li.current a",
{
"color": |sidebar_current|,
"background-color": |sidebar_current_background|,
diff --git a/tests/rustdoc-gui/search-tab.goml b/tests/rustdoc-gui/search-tab.goml
index db1605ff2..b52bb0688 100644
--- a/tests/rustdoc-gui/search-tab.goml
+++ b/tests/rustdoc-gui/search-tab.goml
@@ -80,7 +80,7 @@ set-window-size: (851, 600)
// Check the size and count in tabs
assert-text: ("#search-tabs > button:nth-child(1) > .count", " (25) ")
-assert-text: ("#search-tabs > button:nth-child(2) > .count", " (5)  ")
+assert-text: ("#search-tabs > button:nth-child(2) > .count", " (6)  ")
assert-text: ("#search-tabs > button:nth-child(3) > .count", " (0)  ")
store-property: ("#search-tabs > button:nth-child(1)", {"offsetWidth": buttonWidth})
assert-property: ("#search-tabs > button:nth-child(2)", {"offsetWidth": |buttonWidth|})
diff --git a/tests/rustdoc-gui/sidebar-links-color.goml b/tests/rustdoc-gui/sidebar-links-color.goml
index 079d582a5..774fbcac1 100644
--- a/tests/rustdoc-gui/sidebar-links-color.goml
+++ b/tests/rustdoc-gui/sidebar-links-color.goml
@@ -17,10 +17,10 @@ define-function: (
reload:
// Struct
assert-css: (
- ".sidebar .block.struct a:not(.current)",
+ ".sidebar .block.struct li:not(.current) a",
{"color": |struct|, "background-color": "rgba(0, 0, 0, 0)"},
)
- move-cursor-to: ".sidebar .block.struct a:not(.current)"
+ move-cursor-to: ".sidebar .block.struct li:not(.current) a"
assert-css: (
".sidebar .block.struct a:hover",
{"color": |struct_hover|, "background-color": |struct_hover_background|},
diff --git a/tests/rustdoc-gui/sidebar-resize-setting.goml b/tests/rustdoc-gui/sidebar-resize-setting.goml
new file mode 100644
index 000000000..2fdb2faa8
--- /dev/null
+++ b/tests/rustdoc-gui/sidebar-resize-setting.goml
@@ -0,0 +1,23 @@
+// Checks sidebar resizing stays synced with the setting
+go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
+assert-property: (".sidebar", {"clientWidth": "200"})
+show-text: true
+
+// Verify that the "hide" option is unchecked
+click: "#settings-menu"
+wait-for: "#settings"
+assert-css: ("#settings", {"display": "block"})
+assert-property: ("#hide-sidebar", {"checked": "false"})
+press-key: "Escape"
+wait-for-css: ("#settings", {"display": "none"})
+
+drag-and-drop: ((205, 100), (5, 100))
+assert-css: (".sidebar", {"display": "none"})
+
+// Verify that the "hide" option is checked
+focus: "#settings-menu a"
+press-key: "Enter"
+wait-for-css: ("#settings", {"display": "block"})
+assert-property: ("#hide-sidebar", {"checked": "true"})
+click: "#hide-sidebar"
+wait-for-css: (".sidebar", {"display": "block"})
diff --git a/tests/rustdoc-gui/sidebar-resize-window.goml b/tests/rustdoc-gui/sidebar-resize-window.goml
new file mode 100644
index 000000000..fb6baafda
--- /dev/null
+++ b/tests/rustdoc-gui/sidebar-resize-window.goml
@@ -0,0 +1,37 @@
+// Checks sidebar resizing
+go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
+set-window-size: (1280, 600)
+wait-for-property: (".sidebar", {"clientWidth": 200}, [NEAR])
+
+// resize past maximum (don't grow past 500)
+drag-and-drop: ((205, 100), (600, 100))
+wait-for-property: (".sidebar", {"clientWidth": 500}, [NEAR])
+
+// make the window small enough that the sidebar has to shrink
+set-window-size: (750, 600)
+wait-for-property: (".sidebar", {"clientWidth": 350}, [NEAR])
+
+// grow the window again to make the sidebar bigger
+set-window-size: (1280, 600)
+wait-for-property: (".sidebar", {"clientWidth": 500}, [NEAR])
+
+// make the window small enough that the sidebar has to shrink
+set-window-size: (750, 600)
+wait-for-property: (".sidebar", {"clientWidth": 350}, [NEAR])
+assert-local-storage: {"rustdoc-desktop-sidebar-width": "350"}
+set-window-size: (400, 600)
+wait-for-css: (".sidebar", {"display": "block", "left": "-1000px"})
+assert-local-storage: {"rustdoc-desktop-sidebar-width": "350"}
+
+// grow the window again to make the sidebar bigger
+set-window-size: (1280, 600)
+wait-for-property: (".sidebar", {"clientWidth": 500}, [NEAR])
+
+// shrink back down again, then reload the page
+// the "desired size" is a bit of remembered implicit state,
+// and rustdoc tries to minimize things like this
+set-window-size: (800, 600)
+wait-for-property: (".sidebar", {"clientWidth": 400}, [NEAR])
+reload:
+set-window-size: (1280, 600)
+wait-for-property: (".sidebar", {"clientWidth": 400}, [NEAR])
diff --git a/tests/rustdoc-gui/sidebar-resize.goml b/tests/rustdoc-gui/sidebar-resize.goml
new file mode 100644
index 000000000..543d5d390
--- /dev/null
+++ b/tests/rustdoc-gui/sidebar-resize.goml
@@ -0,0 +1,28 @@
+// Checks sidebar resizing
+go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
+assert-property: (".sidebar", {"clientWidth": "200"})
+show-text: true
+// normal resizing
+drag-and-drop: ((205, 100), (185, 100))
+assert-property: (".sidebar", {"clientWidth": "182"})
+// resize past maximum (don't grow past 500)
+drag-and-drop: ((185, 100), (600, 100))
+assert-property: (".sidebar", {"clientWidth": "500"})
+// resize past minimum (hide sidebar)
+drag-and-drop: ((501, 100), (5, 100))
+assert-property: (".sidebar", {"clientWidth": "0"})
+assert-css: (".sidebar", {"display": "none"})
+assert-local-storage: {"rustdoc-hide-sidebar": "true"}
+set-local-storage: {"rustdoc-hide-sidebar": "false"}
+
+// Now same thing, but for source code
+go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
+assert-property: (".sidebar", {"clientWidth": "49"})
+drag-and-drop: ((52, 100), (185, 100))
+assert-property: (".sidebar", {"clientWidth": "181"})
+drag-and-drop: ((185, 100), (600, 100))
+assert-property: (".sidebar", {"clientWidth": "499"})
+drag-and-drop: ((500, 100), (5, 100))
+// instead of hiding the sidebar entirely, this
+// will switch to the toggle mode
+assert-property: (".sidebar", {"clientWidth": "49"})
diff --git a/tests/rustdoc-gui/sidebar-source-code.goml b/tests/rustdoc-gui/sidebar-source-code.goml
index 92b9045b7..9fc1409e8 100644
--- a/tests/rustdoc-gui/sidebar-source-code.goml
+++ b/tests/rustdoc-gui/sidebar-source-code.goml
@@ -48,6 +48,7 @@ call-function: (
// Next, desktop mode layout.
set-window-size: (1100, 800)
+wait-for: "#src-sidebar-toggle"
// We check that the sidebar isn't expanded and has the expected width.
assert-css: ("nav.sidebar", {"width": "50px"})
// We now click on the button to expand the sidebar.
@@ -58,7 +59,7 @@ assert-css: (".src-sidebar-expanded nav.sidebar a", {"font-size": "14px"})
// We collapse the sidebar.
click: (10, 10)
// We ensure that the class has been removed.
-wait-for: "html:not(.expanded)"
+wait-for: "html:not(.src-sidebar-expanded)"
assert: "nav.sidebar"
// Checking that only the path to the current file is "open".
@@ -73,7 +74,7 @@ assert: "//*[@class='dir-entry' and @open]/*[text()='sub_mod']"
// Only "another_folder" should be "open" in "lib2".
assert: "//*[@class='dir-entry' and not(@open)]/*[text()='another_mod']"
// All other trees should be collapsed.
-assert-count: ("//*[@id='src-sidebar']/details[not(text()='lib2') and not(@open)]", 10)
+assert-count: ("//*[@id='src-sidebar']/details[not(text()='lib2') and not(@open)]", 11)
// We now switch to mobile mode.
set-window-size: (600, 600)
diff --git a/tests/rustdoc-gui/sidebar.goml b/tests/rustdoc-gui/sidebar.goml
index eff66d803..82b4f2e94 100644
--- a/tests/rustdoc-gui/sidebar.goml
+++ b/tests/rustdoc-gui/sidebar.goml
@@ -57,7 +57,7 @@ assert-count: (".sidebar h2", 1)
assert-text: ("#all-types", "All Items")
assert-css: ("#all-types", {"color": "#356da4"})
// We check that we have the crates list and that the "current" on is "test_docs".
-assert-text: (".sidebar-elems ul.crate > li > a.current", "test_docs")
+assert-text: (".sidebar-elems ul.crate > li.current > a", "test_docs")
// And we're also supposed to have the list of items in the current module.
assert-text: (".sidebar-elems section ul > li:nth-child(1)", "Re-exports")
assert-text: (".sidebar-elems section ul > li:nth-child(2)", "Modules")
@@ -98,7 +98,7 @@ assert-property: (".sidebar", {"clientWidth": "200"})
assert-text: (".sidebar > .sidebar-crate > h2 > a", "lib2")
assert-count: (".sidebar .location", 0)
// We check that we have the crates list and that the "current" on is now "lib2".
-assert-text: (".sidebar-elems ul.crate > li > a.current", "lib2")
+assert-text: (".sidebar-elems ul.crate > li.current > a", "lib2")
// We now go to the "foobar" function page.
assert-text: (".sidebar-elems > section ul.block > li:nth-child(1)", "Modules")
assert-text: (".sidebar-elems > section ul.block > li:nth-child(2)", "Structs")
diff --git a/tests/rustdoc-gui/src/lib2/Cargo.toml b/tests/rustdoc-gui/src/lib2/Cargo.toml
index 8bca77ff8..6c4ca27d5 100644
--- a/tests/rustdoc-gui/src/lib2/Cargo.toml
+++ b/tests/rustdoc-gui/src/lib2/Cargo.toml
@@ -6,6 +6,13 @@ edition = "2018"
[lib]
path = "lib.rs"
+[features]
+Win32 = ["Win32_System"]
+Win32_System = ["Win32_System_Diagnostics"]
+Win32_System_Diagnostics = ["Win32_System_Diagnostics_Debug"]
+Win32_System_Diagnostics_Debug = []
+default = ["Win32"]
+
[dependencies]
implementors = { path = "./implementors" }
http = { path = "./http" }
diff --git a/tests/rustdoc-gui/src/lib2/lib.rs b/tests/rustdoc-gui/src/lib2/lib.rs
index a2a3c3187..b467b0440 100644
--- a/tests/rustdoc-gui/src/lib2/lib.rs
+++ b/tests/rustdoc-gui/src/lib2/lib.rs
@@ -1,6 +1,7 @@
// ignore-tidy-linelength
#![feature(doc_cfg)]
+#![feature(doc_auto_cfg)]
pub mod another_folder;
pub mod another_mod;
@@ -28,6 +29,14 @@ impl Foo {
/// Some documentation
/// # A Heading
pub fn a_method(&self) {}
+
+ #[cfg(all(
+ feature = "Win32",
+ feature = "Win32_System",
+ feature = "Win32_System_Diagnostics",
+ feature = "Win32_System_Diagnostics_Debug"
+ ))]
+ pub fn lot_of_features() {}
}
#[doc(cfg(feature = "foo-method"))]
diff --git a/tests/rustdoc-gui/src/proc_macro_test/Cargo.lock b/tests/rustdoc-gui/src/proc_macro_test/Cargo.lock
new file mode 100644
index 000000000..eae9d7536
--- /dev/null
+++ b/tests/rustdoc-gui/src/proc_macro_test/Cargo.lock
@@ -0,0 +1,7 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "proc_macro_test"
+version = "0.1.0"
diff --git a/tests/rustdoc-gui/src/proc_macro_test/Cargo.toml b/tests/rustdoc-gui/src/proc_macro_test/Cargo.toml
new file mode 100644
index 000000000..768ced651
--- /dev/null
+++ b/tests/rustdoc-gui/src/proc_macro_test/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "proc_macro_test"
+version = "0.1.0"
+edition = "2021"
+
+[lib]
+path = "lib.rs"
+proc-macro = true
diff --git a/tests/rustdoc-gui/src/proc_macro_test/lib.rs b/tests/rustdoc-gui/src/proc_macro_test/lib.rs
new file mode 100644
index 000000000..8a6c62df8
--- /dev/null
+++ b/tests/rustdoc-gui/src/proc_macro_test/lib.rs
@@ -0,0 +1,11 @@
+use proc_macro::TokenStream;
+
+#[proc_macro]
+pub fn make_answer(_item: TokenStream) -> TokenStream {
+ "fn answer() -> u32 { 42 }".parse().unwrap()
+}
+
+#[proc_macro_derive(HelperAttr, attributes(helper))]
+pub fn derive_helper_attr(_item: TokenStream) -> TokenStream {
+ TokenStream::new()
+}
diff --git a/tests/rustdoc-gui/src/test_docs/lib.rs b/tests/rustdoc-gui/src/test_docs/lib.rs
index c7d115bdb..0bc777230 100644
--- a/tests/rustdoc-gui/src/test_docs/lib.rs
+++ b/tests/rustdoc-gui/src/test_docs/lib.rs
@@ -593,3 +593,21 @@ pub mod foreign_impl_order {
fn f(&mut self, fg: [u8; 3]) {}
}
}
+
+pub mod private {
+ pub struct Tuple(u32, u8);
+ pub struct Struct {
+ a: u8,
+ }
+
+ pub union Union {
+ a: u8,
+ b: u16,
+ }
+
+ pub enum Enum {
+ A,
+ #[doc(hidden)]
+ B,
+ }
+}
diff --git a/tests/rustdoc-gui/src/theme_css/custom-theme.css b/tests/rustdoc-gui/src/theme_css/custom-theme.css
index 260ef87f6..49227d9ea 100644
--- a/tests/rustdoc-gui/src/theme_css/custom-theme.css
+++ b/tests/rustdoc-gui/src/theme_css/custom-theme.css
@@ -96,4 +96,6 @@
--scrape-example-help-hover-color: #000;
--scrape-example-code-wrapper-background-start: rgba(255, 255, 255, 1);
--scrape-example-code-wrapper-background-end: rgba(255, 255, 255, 0);
+ --sidebar-resizer-hover: hsl(207, 90%, 66%);
+ --sidebar-resizer-active: hsl(207, 90%, 54%);
}
diff --git a/tests/rustdoc-gui/tooltip-over-sidebar.goml b/tests/rustdoc-gui/tooltip-over-sidebar.goml
new file mode 100644
index 000000000..71bf69787
--- /dev/null
+++ b/tests/rustdoc-gui/tooltip-over-sidebar.goml
@@ -0,0 +1,12 @@
+// Check that the doctest info tooltips are above the sidebar.
+go-to: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
+move-cursor-to: ".example-wrap.ignore .tooltip"
+wait-for: ".tooltip.popover"
+
+// Move cursor to top left corner of the tooltip and check that it doesn't fade.
+move-cursor-to: ".tooltip.popover"
+wait-for: 100
+assert: ".tooltip.popover:not(.fade-out)"
+
+move-cursor-to: (0, 0)
+wait-for: ".tooltip.popover.fade-out"
diff --git a/tests/rustdoc-gui/where-whitespace.goml b/tests/rustdoc-gui/where-whitespace.goml
index 69e6c3356..da104fa40 100644
--- a/tests/rustdoc-gui/where-whitespace.goml
+++ b/tests/rustdoc-gui/where-whitespace.goml
@@ -3,15 +3,15 @@ go-to: "file://" + |DOC_PATH| + "/lib2/trait.Whitespace.html"
show-text: true
// First, we check in the trait definition if the where clause is "on its own" (not on the same
// line than "pub trait Whitespace<Idx>").
-compare-elements-position-false: (".item-decl code", ".where.fmt-newline", ("y"))
+compare-elements-position-false: (".item-decl code", "div.where", ("y"))
// And that the code following it isn't on the same line either.
-compare-elements-position-false: (".item-decl .fn", ".where.fmt-newline", ("y"))
+compare-elements-position-false: (".item-decl .fn", "div.where", ("y"))
go-to: "file://" + |DOC_PATH| + "/lib2/struct.WhereWhitespace.html"
// We make the screen a bit wider to ensure that the trait impl is on one line.
set-window-size: (915, 915)
-compare-elements-position-false: ("#method\.new .fn", "#method\.new .where.fmt-newline", ("y"))
+compare-elements-position-false: ("#method\.new .fn", "#method\.new div.where", ("y"))
// We ensure that both the trait name and the struct name are on the same line in
// "impl<K, T> Whitespace<&K> for WhereWhitespace<T>".
compare-elements-position: (
@@ -22,6 +22,6 @@ compare-elements-position: (
// And we now check that the where condition isn't on the same line.
compare-elements-position-false: (
"#trait-implementations-list .impl h3 .trait",
- "#trait-implementations-list .impl h3 .where.fmt-newline",
+ "#trait-implementations-list .impl h3 div.where",
("y"),
)
diff --git a/tests/rustdoc-js-std/iterator-type-signatures.js b/tests/rustdoc-js-std/iterator-type-signatures.js
new file mode 100644
index 000000000..c18ffc165
--- /dev/null
+++ b/tests/rustdoc-js-std/iterator-type-signatures.js
@@ -0,0 +1,29 @@
+// ignore-order
+
+const FILTER_CRATE = "std";
+
+const EXPECTED = [
+ {
+ 'query': 'iterator<t> -> option<t>',
+ 'others': [
+ { 'path': 'std::iter::Iterator', 'name': 'max' },
+ { 'path': 'std::iter::Iterator', 'name': 'min' },
+ { 'path': 'std::iter::Iterator', 'name': 'last' },
+ { 'path': 'std::iter::Iterator', 'name': 'next' },
+ ],
+ },
+ {
+ 'query': 'iterator<t>, usize -> option<t>',
+ 'others': [
+ { 'path': 'std::iter::Iterator', 'name': 'nth' },
+ ],
+ },
+ {
+ // Something should be done so that intoiterator is considered a match
+ // for plain iterator.
+ 'query': 'iterator<t>, intoiterator<t> -> ordering',
+ 'others': [
+ { 'path': 'std::iter::Iterator', 'name': 'cmp' },
+ ],
+ },
+];
diff --git a/tests/rustdoc-js-std/keyword.js b/tests/rustdoc-js-std/keyword.js
index b85ba3413..1837b1e71 100644
--- a/tests/rustdoc-js-std/keyword.js
+++ b/tests/rustdoc-js-std/keyword.js
@@ -3,7 +3,7 @@
const EXPECTED = {
'query': 'fn',
'others': [
- { 'path': 'std', 'name': 'fn', ty: 15 }, // 15 is for primitive types
- { 'path': 'std', 'name': 'fn', ty: 21 }, // 21 is for keywords
+ { 'path': 'std', 'name': 'fn', ty: 1 }, // 1 is for primitive types
+ { 'path': 'std', 'name': 'fn', ty: 0 }, // 0 is for keywords
],
};
diff --git a/tests/rustdoc-js-std/macro-check.js b/tests/rustdoc-js-std/macro-check.js
index c22b1753f..37d5e7dae 100644
--- a/tests/rustdoc-js-std/macro-check.js
+++ b/tests/rustdoc-js-std/macro-check.js
@@ -3,7 +3,7 @@
const EXPECTED = {
'query': 'panic',
'others': [
- { 'path': 'std', 'name': 'panic', ty: 14 }, // 15 is for macros
- { 'path': 'std', 'name': 'panic', ty: 0 }, // 0 is for modules
+ { 'path': 'std', 'name': 'panic', ty: 16 }, // 16 is for macros
+ { 'path': 'std', 'name': 'panic', ty: 2 }, // 2 is for modules
],
};
diff --git a/tests/rustdoc-js-std/parser-bindings.js b/tests/rustdoc-js-std/parser-bindings.js
new file mode 100644
index 000000000..c4909c624
--- /dev/null
+++ b/tests/rustdoc-js-std/parser-bindings.js
@@ -0,0 +1,245 @@
+const PARSED = [
+ {
+ query: 'A<B=C>',
+ elems: [
+ {
+ name: "a",
+ fullPath: ["a"],
+ pathWithoutLast: [],
+ pathLast: "a",
+ generics: [],
+ bindings: [
+ [
+ 'b',
+ [
+ {
+ name: "c",
+ fullPath: ["c"],
+ pathWithoutLast: [],
+ pathLast: "c",
+ generics: [],
+ typeFilter: -1,
+ },
+ ]
+ ],
+ ],
+ typeFilter: -1,
+ },
+ ],
+ foundElems: 1,
+ original: 'A<B=C>',
+ returned: [],
+ userQuery: 'a<b=c>',
+ error: null,
+ },
+ {
+ query: 'A<B = C>',
+ elems: [
+ {
+ name: "a",
+ fullPath: ["a"],
+ pathWithoutLast: [],
+ pathLast: "a",
+ generics: [],
+ bindings: [
+ [
+ 'b',
+ [{
+ name: "c",
+ fullPath: ["c"],
+ pathWithoutLast: [],
+ pathLast: "c",
+ generics: [],
+ typeFilter: -1,
+ }]
+ ],
+ ],
+ typeFilter: -1,
+ },
+ ],
+ foundElems: 1,
+ original: 'A<B = C>',
+ returned: [],
+ userQuery: 'a<b = c>',
+ error: null,
+ },
+ {
+ query: 'A<B=!>',
+ elems: [
+ {
+ name: "a",
+ fullPath: ["a"],
+ pathWithoutLast: [],
+ pathLast: "a",
+ generics: [],
+ bindings: [
+ [
+ 'b',
+ [{
+ name: "never",
+ fullPath: ["never"],
+ pathWithoutLast: [],
+ pathLast: "never",
+ generics: [],
+ typeFilter: 1,
+ }]
+ ],
+ ],
+ typeFilter: -1,
+ },
+ ],
+ foundElems: 1,
+ original: 'A<B=!>',
+ returned: [],
+ userQuery: 'a<b=!>',
+ error: null,
+ },
+ {
+ query: 'A<B=[]>',
+ elems: [
+ {
+ name: "a",
+ fullPath: ["a"],
+ pathWithoutLast: [],
+ pathLast: "a",
+ generics: [],
+ bindings: [
+ [
+ 'b',
+ [{
+ name: "[]",
+ fullPath: ["[]"],
+ pathWithoutLast: [],
+ pathLast: "[]",
+ generics: [],
+ typeFilter: 1,
+ }]
+ ],
+ ],
+ typeFilter: -1,
+ },
+ ],
+ foundElems: 1,
+ original: 'A<B=[]>',
+ returned: [],
+ userQuery: 'a<b=[]>',
+ error: null,
+ },
+ {
+ query: 'A<B=[!]>',
+ elems: [
+ {
+ name: "a",
+ fullPath: ["a"],
+ pathWithoutLast: [],
+ pathLast: "a",
+ generics: [],
+ bindings: [
+ [
+ 'b',
+ [{
+ name: "[]",
+ fullPath: ["[]"],
+ pathWithoutLast: [],
+ pathLast: "[]",
+ generics: [
+ {
+ name: "never",
+ fullPath: ["never"],
+ pathWithoutLast: [],
+ pathLast: "never",
+ generics: [],
+ typeFilter: 1,
+ },
+ ],
+ typeFilter: 1,
+ }]
+ ],
+ ],
+ typeFilter: -1,
+ },
+ ],
+ foundElems: 1,
+ original: 'A<B=[!]>',
+ returned: [],
+ userQuery: 'a<b=[!]>',
+ error: null,
+ },
+ {
+ query: 'A<B=C=>',
+ elems: [],
+ foundElems: 0,
+ original: 'A<B=C=>',
+ returned: [],
+ userQuery: 'a<b=c=>',
+ error: "Cannot write `=` twice in a binding",
+ },
+ {
+ query: 'A<B=>',
+ elems: [],
+ foundElems: 0,
+ original: 'A<B=>',
+ returned: [],
+ userQuery: 'a<b=>',
+ error: "Unexpected `>` after `=`",
+ },
+ {
+ query: 'B=C',
+ elems: [],
+ foundElems: 0,
+ original: 'B=C',
+ returned: [],
+ userQuery: 'b=c',
+ error: "Type parameter `=` must be within generics list",
+ },
+ {
+ query: '[B=C]',
+ elems: [],
+ foundElems: 0,
+ original: '[B=C]',
+ returned: [],
+ userQuery: '[b=c]',
+ error: "Type parameter `=` cannot be within slice `[]`",
+ },
+ {
+ query: 'A<B<X>=C>',
+ elems: [
+ {
+ name: "a",
+ fullPath: ["a"],
+ pathWithoutLast: [],
+ pathLast: "a",
+ generics: [],
+ bindings: [
+ [
+ 'b',
+ [
+ {
+ name: "c",
+ fullPath: ["c"],
+ pathWithoutLast: [],
+ pathLast: "c",
+ generics: [],
+ typeFilter: -1,
+ },
+ {
+ name: "x",
+ fullPath: ["x"],
+ pathWithoutLast: [],
+ pathLast: "x",
+ generics: [],
+ typeFilter: -1,
+ },
+ ],
+ ],
+ ],
+ typeFilter: -1,
+ },
+ ],
+ foundElems: 1,
+ original: 'A<B<X>=C>',
+ returned: [],
+ userQuery: 'a<b<x>=c>',
+ error: null,
+ },
+];
diff --git a/tests/rustdoc-js-std/parser-errors.js b/tests/rustdoc-js-std/parser-errors.js
index b32bfea54..f9f9c4f4d 100644
--- a/tests/rustdoc-js-std/parser-errors.js
+++ b/tests/rustdoc-js-std/parser-errors.js
@@ -18,6 +18,15 @@ const PARSED = [
error: "Found generics without a path",
},
{
+ query: '-> *',
+ elems: [],
+ foundElems: 0,
+ original: "-> *",
+ returned: [],
+ userQuery: "-> *",
+ error: "Unexpected `*`",
+ },
+ {
query: 'a<"P">',
elems: [],
foundElems: 0,
@@ -144,6 +153,24 @@ const PARSED = [
error: "Unexpected `::::`",
},
{
+ query: "a:: ::b",
+ elems: [],
+ foundElems: 0,
+ original: "a:: ::b",
+ returned: [],
+ userQuery: "a:: ::b",
+ error: "Unexpected `:: ::`",
+ },
+ {
+ query: "a::\t::b",
+ elems: [],
+ foundElems: 0,
+ original: "a:: ::b",
+ returned: [],
+ userQuery: "a:: ::b",
+ error: "Unexpected `:: ::`",
+ },
+ {
query: "a::b::",
elems: [],
foundElems: 0,
@@ -303,7 +330,7 @@ const PARSED = [
original: '->a<>b',
returned: [],
userQuery: '->a<>b',
- error: 'Expected `,` after `>`, found `b`',
+ error: 'Expected `,` or `=` after `>`, found `b`',
},
{
query: "a<->",
@@ -315,24 +342,6 @@ const PARSED = [
error: 'Unexpected `-` after `<`',
},
{
- query: "a:: a",
- elems: [],
- foundElems: 0,
- original: 'a:: a',
- returned: [],
- userQuery: 'a:: a',
- error: 'Unexpected `:: `',
- },
- {
- query: "a ::a",
- elems: [],
- foundElems: 0,
- original: 'a ::a',
- returned: [],
- userQuery: 'a ::a',
- error: 'Unexpected ` ::`',
- },
- {
query: "a<a>:",
elems: [],
foundElems: 0,
diff --git a/tests/rustdoc-js-std/parser-filter.js b/tests/rustdoc-js-std/parser-filter.js
index 3b9cc5b1b..a1dd0ea3b 100644
--- a/tests/rustdoc-js-std/parser-filter.js
+++ b/tests/rustdoc-js-std/parser-filter.js
@@ -7,7 +7,7 @@ const PARSED = [
pathWithoutLast: [],
pathLast: "foo",
generics: [],
- typeFilter: 5,
+ typeFilter: 7,
}],
foundElems: 1,
original: "fn:foo",
@@ -23,7 +23,7 @@ const PARSED = [
pathWithoutLast: [],
pathLast: "foo",
generics: [],
- typeFilter: 4,
+ typeFilter: 6,
}],
foundElems: 1,
original: "enum : foo",
@@ -48,7 +48,7 @@ const PARSED = [
pathWithoutLast: [],
pathLast: "macro",
generics: [],
- typeFilter: 14,
+ typeFilter: 16,
}],
foundElems: 1,
original: "macro!",
@@ -64,7 +64,7 @@ const PARSED = [
pathWithoutLast: [],
pathLast: "mac",
generics: [],
- typeFilter: 14,
+ typeFilter: 16,
}],
foundElems: 1,
original: "macro:mac!",
@@ -80,7 +80,7 @@ const PARSED = [
pathWithoutLast: ["a"],
pathLast: "mac",
generics: [],
- typeFilter: 14,
+ typeFilter: 16,
}],
foundElems: 1,
original: "a::mac!",
@@ -99,7 +99,7 @@ const PARSED = [
pathWithoutLast: [],
pathLast: "foo",
generics: [],
- typeFilter: 5,
+ typeFilter: 7,
}],
userQuery: "-> fn:foo",
error: null,
@@ -121,10 +121,10 @@ const PARSED = [
pathWithoutLast: [],
pathLast: "bar",
generics: [],
- typeFilter: 5,
+ typeFilter: 7,
}
],
- typeFilter: 5,
+ typeFilter: 7,
}],
userQuery: "-> fn:foo<fn:bar>",
error: null,
@@ -146,7 +146,7 @@ const PARSED = [
pathWithoutLast: [],
pathLast: "bar",
generics: [],
- typeFilter: 5,
+ typeFilter: 7,
},
{
name: "baz::fuzz",
@@ -154,10 +154,10 @@ const PARSED = [
pathWithoutLast: ["baz"],
pathLast: "fuzz",
generics: [],
- typeFilter: 4,
+ typeFilter: 6,
},
],
- typeFilter: 5,
+ typeFilter: 7,
}],
userQuery: "-> fn:foo<fn:bar, enum : baz::fuzz>",
error: null,
diff --git a/tests/rustdoc-js-std/parser-ident.js b/tests/rustdoc-js-std/parser-ident.js
index f65a7ce66..cc79c58f1 100644
--- a/tests/rustdoc-js-std/parser-ident.js
+++ b/tests/rustdoc-js-std/parser-ident.js
@@ -13,7 +13,7 @@ const PARSED = [
pathWithoutLast: [],
pathLast: "never",
generics: [],
- typeFilter: 15,
+ typeFilter: 1,
},
],
typeFilter: -1,
@@ -32,7 +32,7 @@ const PARSED = [
pathWithoutLast: [],
pathLast: "never",
generics: [],
- typeFilter: 15,
+ typeFilter: 1,
}],
foundElems: 1,
original: "!",
@@ -48,7 +48,7 @@ const PARSED = [
pathWithoutLast: [],
pathLast: "a",
generics: [],
- typeFilter: 14,
+ typeFilter: 16,
}],
foundElems: 1,
original: "a!",
diff --git a/tests/rustdoc-js-std/parser-paths.js b/tests/rustdoc-js-std/parser-paths.js
index 8d4dedf3f..774e5d028 100644
--- a/tests/rustdoc-js-std/parser-paths.js
+++ b/tests/rustdoc-js-std/parser-paths.js
@@ -16,6 +16,54 @@ const PARSED = [
error: null,
},
{
+ query: "a:: a",
+ elems: [{
+ name: "a:: a",
+ fullPath: ["a", "a"],
+ pathWithoutLast: ["a"],
+ pathLast: "a",
+ generics: [],
+ typeFilter: -1,
+ }],
+ foundElems: 1,
+ original: 'a:: a',
+ returned: [],
+ userQuery: 'a:: a',
+ error: null,
+ },
+ {
+ query: "a ::a",
+ elems: [{
+ name: "a ::a",
+ fullPath: ["a", "a"],
+ pathWithoutLast: ["a"],
+ pathLast: "a",
+ generics: [],
+ typeFilter: -1,
+ }],
+ foundElems: 1,
+ original: 'a ::a',
+ returned: [],
+ userQuery: 'a ::a',
+ error: null,
+ },
+ {
+ query: "a :: a",
+ elems: [{
+ name: "a :: a",
+ fullPath: ["a", "a"],
+ pathWithoutLast: ["a"],
+ pathLast: "a",
+ generics: [],
+ typeFilter: -1,
+ }],
+ foundElems: 1,
+ original: 'a :: a',
+ returned: [],
+ userQuery: 'a :: a',
+ error: null,
+ },
+ {
query: 'A::B,C',
elems: [
{
diff --git a/tests/rustdoc-js-std/parser-returned.js b/tests/rustdoc-js-std/parser-returned.js
index 6ea866091..44e517c49 100644
--- a/tests/rustdoc-js-std/parser-returned.js
+++ b/tests/rustdoc-js-std/parser-returned.js
@@ -89,7 +89,7 @@ const PARSED = [
pathWithoutLast: [],
pathLast: "never",
generics: [],
- typeFilter: 15,
+ typeFilter: 1,
}],
userQuery: "-> !",
error: null,
diff --git a/tests/rustdoc-js-std/parser-separators.js b/tests/rustdoc-js-std/parser-separators.js
index 00c489b51..7f95f61b0 100644
--- a/tests/rustdoc-js-std/parser-separators.js
+++ b/tests/rustdoc-js-std/parser-separators.js
@@ -5,7 +5,7 @@ const PARSED = [
query: 'aaaaaa b',
elems: [
{
- name: 'aaaaaa\tb',
+ name: 'aaaaaa b',
fullPath: ['aaaaaa', 'b'],
pathWithoutLast: ['aaaaaa'],
pathLast: 'b',
@@ -14,9 +14,9 @@ const PARSED = [
},
],
foundElems: 1,
- original: "aaaaaa b",
+ original: "aaaaaa b",
returned: [],
- userQuery: "aaaaaa b",
+ userQuery: "aaaaaa b",
error: null,
},
{
@@ -40,9 +40,9 @@ const PARSED = [
},
],
foundElems: 2,
- original: "aaaaaa, b",
+ original: "aaaaaa, b",
returned: [],
- userQuery: "aaaaaa, b",
+ userQuery: "aaaaaa, b",
error: null,
},
{
@@ -93,7 +93,7 @@ const PARSED = [
query: 'a\tb',
elems: [
{
- name: 'a\tb',
+ name: 'a b',
fullPath: ['a', 'b'],
pathWithoutLast: ['a'],
pathLast: 'b',
@@ -102,9 +102,9 @@ const PARSED = [
},
],
foundElems: 1,
- original: "a\tb",
+ original: "a b",
returned: [],
- userQuery: "a\tb",
+ userQuery: "a b",
error: null,
},
{
@@ -176,7 +176,7 @@ const PARSED = [
pathLast: 'a',
generics: [
{
- name: 'b\tc',
+ name: 'b c',
fullPath: ['b', 'c'],
pathWithoutLast: ['b'],
pathLast: 'c',
@@ -187,9 +187,9 @@ const PARSED = [
},
],
foundElems: 1,
- original: "a<b\tc>",
+ original: "a<b c>",
returned: [],
- userQuery: "a<b\tc>",
+ userQuery: "a<b c>",
error: null,
},
];
diff --git a/tests/rustdoc-js-std/parser-slice-array.js b/tests/rustdoc-js-std/parser-slice-array.js
index c22b7870d..239391bed 100644
--- a/tests/rustdoc-js-std/parser-slice-array.js
+++ b/tests/rustdoc-js-std/parser-slice-array.js
@@ -43,16 +43,16 @@ const PARSED = [
pathWithoutLast: [],
pathLast: "[]",
generics: [],
- typeFilter: 15,
+ typeFilter: 1,
},
],
- typeFilter: 15,
+ typeFilter: 1,
},
],
- typeFilter: 15,
+ typeFilter: 1,
},
],
- typeFilter: 15,
+ typeFilter: 1,
},
],
foundElems: 1,
@@ -70,7 +70,7 @@ const PARSED = [
pathWithoutLast: [],
pathLast: "[]",
generics: [],
- typeFilter: 15,
+ typeFilter: 1,
},
{
name: "u8",
@@ -105,7 +105,7 @@ const PARSED = [
typeFilter: -1,
},
],
- typeFilter: 15,
+ typeFilter: 1,
},
],
foundElems: 1,
@@ -140,7 +140,7 @@ const PARSED = [
typeFilter: -1,
},
],
- typeFilter: 15,
+ typeFilter: 1,
},
],
foundElems: 1,
@@ -176,7 +176,7 @@ const PARSED = [
typeFilter: -1,
},
],
- typeFilter: 15,
+ typeFilter: 1,
},
],
foundElems: 1,
@@ -194,7 +194,7 @@ const PARSED = [
pathWithoutLast: [],
pathLast: "[]",
generics: [],
- typeFilter: 15,
+ typeFilter: 1,
},
],
foundElems: 1,
@@ -284,7 +284,7 @@ const PARSED = [
typeFilter: -1,
},
],
- typeFilter: 15,
+ typeFilter: 1,
},
],
foundElems: 1,
diff --git a/tests/rustdoc-js-std/parser-weird-queries.js b/tests/rustdoc-js-std/parser-weird-queries.js
index 720ef66c1..ba68c9717 100644
--- a/tests/rustdoc-js-std/parser-weird-queries.js
+++ b/tests/rustdoc-js-std/parser-weird-queries.js
@@ -92,9 +92,9 @@ const PARSED = [
query: 'mod\t:',
elems: [],
foundElems: 0,
- original: 'mod\t:',
+ original: 'mod :',
returned: [],
- userQuery: 'mod\t:',
+ userQuery: 'mod :',
error: "Unexpected `:` (expected path after type filter `mod:`)",
},
];
diff --git a/tests/rustdoc-js-std/simd-type-signatures.js b/tests/rustdoc-js-std/simd-type-signatures.js
index 5c7cf372b..c07f15dcb 100644
--- a/tests/rustdoc-js-std/simd-type-signatures.js
+++ b/tests/rustdoc-js-std/simd-type-signatures.js
@@ -13,27 +13,27 @@ const EXPECTED = [
{
'path': 'std::simd::prelude::Simd',
'name': 'simd_max',
- 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci16,+LANES%3E/method.simd_max'
+ 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci16,+N%3E/method.simd_max'
},
{
'path': 'std::simd::prelude::Simd',
'name': 'simd_min',
- 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci16,+LANES%3E/method.simd_min'
+ 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci16,+N%3E/method.simd_min'
},
{
'path': 'std::simd::prelude::Simd',
'name': 'simd_clamp',
- 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci16,+LANES%3E/method.simd_clamp'
+ 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci16,+N%3E/method.simd_clamp'
},
{
'path': 'std::simd::prelude::Simd',
'name': 'saturating_add',
- 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdInt-for-Simd%3Ci16,+LANES%3E/method.saturating_add'
+ 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdInt-for-Simd%3Ci16,+N%3E/method.saturating_add'
},
{
'path': 'std::simd::prelude::Simd',
'name': 'saturating_sub',
- 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdInt-for-Simd%3Ci16,+LANES%3E/method.saturating_sub'
+ 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdInt-for-Simd%3Ci16,+N%3E/method.saturating_sub'
},
],
},
@@ -43,27 +43,27 @@ const EXPECTED = [
{
'path': 'std::simd::prelude::Simd',
'name': 'simd_max',
- 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci8,+LANES%3E/method.simd_max'
+ 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci8,+N%3E/method.simd_max'
},
{
'path': 'std::simd::prelude::Simd',
'name': 'simd_min',
- 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci8,+LANES%3E/method.simd_min'
+ 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci8,+N%3E/method.simd_min'
},
{
'path': 'std::simd::prelude::Simd',
'name': 'simd_clamp',
- 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci8,+LANES%3E/method.simd_clamp'
+ 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci8,+N%3E/method.simd_clamp'
},
{
'path': 'std::simd::prelude::Simd',
'name': 'saturating_add',
- 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdInt-for-Simd%3Ci8,+LANES%3E/method.saturating_add'
+ 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdInt-for-Simd%3Ci8,+N%3E/method.saturating_add'
},
{
'path': 'std::simd::prelude::Simd',
'name': 'saturating_sub',
- 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdInt-for-Simd%3Ci8,+LANES%3E/method.saturating_sub'
+ 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdInt-for-Simd%3Ci8,+N%3E/method.saturating_sub'
},
],
},
diff --git a/tests/rustdoc-js/assoc-type-backtrack.js b/tests/rustdoc-js/assoc-type-backtrack.js
new file mode 100644
index 000000000..493e1a991
--- /dev/null
+++ b/tests/rustdoc-js/assoc-type-backtrack.js
@@ -0,0 +1,163 @@
+// exact-check
+
+const EXPECTED = [
+ {
+ 'query': 'mytrait, mytrait2 -> T',
+ 'correction': null,
+ 'others': [
+ { 'path': 'assoc_type_backtrack::MyTrait', 'name': 'fold' },
+ { 'path': 'assoc_type_backtrack::Cloned', 'name': 'fold' },
+ ],
+ },
+ {
+ 'query': 'mytrait<U>, mytrait2 -> T',
+ 'correction': null,
+ 'others': [
+ { 'path': 'assoc_type_backtrack::MyTrait', 'name': 'fold' },
+ { 'path': 'assoc_type_backtrack::Cloned', 'name': 'fold' },
+ ],
+ },
+ {
+ 'query': 'mytrait<Item=U>, mytrait2 -> T',
+ 'correction': null,
+ 'others': [
+ { 'path': 'assoc_type_backtrack::MyTrait', 'name': 'fold' },
+ { 'path': 'assoc_type_backtrack::Cloned', 'name': 'fold' },
+ ],
+ },
+ {
+ 'query': 'mytrait<T>, mytrait2 -> T',
+ 'correction': null,
+ 'others': [],
+ },
+ {
+ 'query': 'mytrait<Item=T>, mytrait2 -> T',
+ 'correction': null,
+ 'others': [],
+ },
+ {
+ 'query': 'mytrait<T> -> Option<T>',
+ 'correction': null,
+ 'others': [
+ { 'path': 'assoc_type_backtrack::MyTrait', 'name': 'next' },
+ ],
+ },
+ {
+ 'query': 'mytrait<Item=T> -> Option<T>',
+ 'correction': null,
+ 'others': [
+ { 'path': 'assoc_type_backtrack::MyTrait', 'name': 'next' },
+ ],
+ },
+ {
+ 'query': 'mytrait<U> -> Option<T>',
+ 'correction': null,
+ 'others': [
+ { 'path': 'assoc_type_backtrack::Cloned', 'name': 'next' },
+ ],
+ },
+ {
+ 'query': 'mytrait<Item=U> -> Option<T>',
+ 'correction': null,
+ 'others': [
+ { 'path': 'assoc_type_backtrack::Cloned', 'name': 'next' },
+ ],
+ },
+ // The first two define the base case.
+ {
+ 'query': 'myintofuture<fut=myfuture<t>> -> myfuture<t>',
+ 'correction': null,
+ 'others': [
+ { 'path': 'assoc_type_backtrack::MyIntoFuture', 'name': 'into_future' },
+ { 'path': 'assoc_type_backtrack::MyIntoFuture', 'name': 'into_future_2' },
+ ],
+ },
+ {
+ 'query': 'myintofuture<fut=myfuture<t>>, myintofuture<fut=myfuture<t>> -> myfuture<t>',
+ 'correction': null,
+ 'others': [
+ { 'path': 'assoc_type_backtrack::MyIntoFuture', 'name': 'into_future_2' },
+ ],
+ },
+ // Unboxings of the one-argument case.
+ {
+ 'query': 'myfuture<t> -> myfuture<t>',
+ 'correction': null,
+ 'others': [
+ { 'path': 'assoc_type_backtrack::MyIntoFuture', 'name': 'into_future' },
+ { 'path': 'assoc_type_backtrack::MyIntoFuture', 'name': 'into_future_2' },
+ ],
+ },
+ {
+ 'query': 'myintofuture<myfuture<t>> -> myfuture<t>',
+ 'correction': null,
+ 'others': [
+ { 'path': 'assoc_type_backtrack::MyIntoFuture', 'name': 'into_future' },
+ { 'path': 'assoc_type_backtrack::MyIntoFuture', 'name': 'into_future_2' },
+ ],
+ },
+ // Invalid unboxing of the one-argument case.
+ // If you unbox one of the myfutures, you need to unbox both of them.
+ {
+ 'query': 'myintofuture<fut=t> -> myfuture<t>',
+ 'correction': null,
+ 'others': [],
+ },
+ // Unboxings of the two-argument case.
+ {
+ 'query': 'myintofuture<fut=t>, myintofuture<fut=t> -> t',
+ 'correction': null,
+ 'others': [
+ { 'path': 'assoc_type_backtrack::MyIntoFuture', 'name': 'into_future_2' },
+ ],
+ },
+ {
+ 'query': 'myintofuture<fut=myfuture>, myintofuture<fut=myfuture> -> myfuture',
+ 'correction': null,
+ 'others': [
+ { 'path': 'assoc_type_backtrack::MyIntoFuture', 'name': 'into_future_2' },
+ ],
+ },
+ {
+ 'query': 'myintofuture<myfuture>, myintofuture<myfuture> -> myfuture',
+ 'correction': null,
+ 'others': [
+ { 'path': 'assoc_type_backtrack::MyIntoFuture', 'name': 'into_future_2' },
+ ],
+ },
+ {
+ 'query': 'myfuture<t>, myfuture<t> -> myfuture<t>',
+ 'correction': null,
+ 'others': [
+ { 'path': 'assoc_type_backtrack::MyIntoFuture', 'name': 'into_future_2' },
+ ],
+ },
+ // Invalid unboxings of the two-argument case.
+ // If you unbox one of the myfutures, you need to unbox all of them.
+ {
+ 'query': 'myintofuture<fut=t>, myintofuture<fut=myfuture<t>> -> myfuture<t>',
+ 'correction': null,
+ 'others': [],
+ },
+ {
+ 'query': 'myintofuture<fut=myfuture<t>>, myintofuture<fut=t> -> myfuture<t>',
+ 'correction': null,
+ 'others': [],
+ },
+ {
+ 'query': 'myintofuture<fut=myfuture<t>>, myintofuture<fut=myfuture<t>> -> t',
+ 'correction': null,
+ 'others': [],
+ },
+ // different generics don't match up either
+ {
+ 'query': 'myintofuture<fut=myfuture<u>>, myintofuture<fut=myfuture<t>> -> myfuture<t>',
+ 'correction': null,
+ 'others': [],
+ },
+ {
+ 'query': 'myintofuture<output=t> -> myfuture<tt>',
+ 'correction': null,
+ 'others': [],
+ },
+];
diff --git a/tests/rustdoc-js/assoc-type-backtrack.rs b/tests/rustdoc-js/assoc-type-backtrack.rs
new file mode 100644
index 000000000..c3cdd78c6
--- /dev/null
+++ b/tests/rustdoc-js/assoc-type-backtrack.rs
@@ -0,0 +1,38 @@
+pub trait MyTrait2<X> {
+ type Output;
+}
+
+pub trait MyTrait {
+ type Item;
+ fn next(&mut self) -> Option<Self::Item>;
+ fn fold<B, F>(self, init: B, f: F) -> B where
+ Self: Sized,
+ F: MyTrait2<(B, Self::Item), Output=B>;
+}
+
+pub struct Cloned<I>(I);
+
+impl<'a, T, I> MyTrait for Cloned<I> where
+ T: 'a + Clone,
+ I: MyTrait<Item = &'a T>
+{
+ type Item = T;
+ fn next(&mut self) -> Option<Self::Item> { loop {} }
+ fn fold<B, F>(self, init: B, f: F) -> B where
+ Self: Sized,
+ F: MyTrait2<(B, Self::Item), Output=B>
+ {
+ loop {}
+ }
+}
+
+pub trait MyFuture {
+ type Output;
+}
+
+pub trait MyIntoFuture {
+ type Output;
+ type Fut: MyFuture<Output=Self::Output>;
+ fn into_future(self) -> Self::Fut;
+ fn into_future_2(self, other: Self) -> Self::Fut;
+}
diff --git a/tests/rustdoc-js/assoc-type-loop.js b/tests/rustdoc-js/assoc-type-loop.js
new file mode 100644
index 000000000..f0192371a
--- /dev/null
+++ b/tests/rustdoc-js/assoc-type-loop.js
@@ -0,0 +1,9 @@
+// Crash reduction of
+// https://github.com/rust-lang/rust/issues/118242
+
+const EXPECTED = [
+ {
+ 'query': 't',
+ 'correction': null,
+ },
+];
diff --git a/tests/rustdoc-js/assoc-type-loop.rs b/tests/rustdoc-js/assoc-type-loop.rs
new file mode 100644
index 000000000..f123c83f5
--- /dev/null
+++ b/tests/rustdoc-js/assoc-type-loop.rs
@@ -0,0 +1,35 @@
+#![crate_name="foo"]
+
+// reduced from sqlx 0.7.3
+use std::future::Future;
+use std::pin::Pin;
+use std::ops::{Deref, DerefMut};
+pub enum Error {}
+pub trait Acquire<'c> {
+ type Database: Database;
+ type Connection: Deref<Target = <Self::Database as Database>::Connection> + DerefMut + Send;
+}
+pub trait Database {
+ type Connection: Connection<Database = Self>;
+}
+pub trait Connection {
+ type Database: Database;
+ type Options: ConnectionOptions<Connection = Self>;
+ fn begin(
+ &mut self
+ ) -> Pin<Box<dyn Future<Output = Result<Transaction<'_, Self::Database>, Error>> + Send + '_>>
+ where
+ Self: Sized;
+}
+pub trait ConnectionOptions {
+ type Connection: Connection;
+}
+pub struct Transaction<'c, DB: Database> {
+ _db: &'c DB,
+}
+impl<'t, 'c, DB: Database> Acquire<'t> for &'t mut Transaction<'c, DB>
+ where <DB as Database>::Connection: Send
+{
+ type Database = DB;
+ type Connection = &'t mut <DB as Database>::Connection;
+}
diff --git a/tests/rustdoc-js/assoc-type.js b/tests/rustdoc-js/assoc-type.js
new file mode 100644
index 000000000..eec4e7a82
--- /dev/null
+++ b/tests/rustdoc-js/assoc-type.js
@@ -0,0 +1,56 @@
+// exact-check
+
+const EXPECTED = [
+ // if I just use generics, then the generics version
+ // and the type binding version both show up
+ {
+ 'query': 'iterator<something> -> u32',
+ 'correction': null,
+ 'others': [
+ { 'path': 'assoc_type::my', 'name': 'other_fn' },
+ { 'path': 'assoc_type', 'name': 'my_fn' },
+ ],
+ },
+ {
+ 'query': 'iterator<something>',
+ 'correction': null,
+ 'in_args': [
+ { 'path': 'assoc_type::my', 'name': 'other_fn' },
+ { 'path': 'assoc_type', 'name': 'my_fn' },
+ ],
+ },
+ {
+ 'query': 'something',
+ 'correction': null,
+ 'others': [
+ { 'path': 'assoc_type', 'name': 'Something' },
+ ],
+ 'in_args': [
+ { 'path': 'assoc_type::my', 'name': 'other_fn' },
+ { 'path': 'assoc_type', 'name': 'my_fn' },
+ ],
+ },
+ // if I write an explicit binding, only it shows up
+ {
+ 'query': 'iterator<item=something> -> u32',
+ 'correction': null,
+ 'others': [
+ { 'path': 'assoc_type', 'name': 'my_fn' },
+ ],
+ },
+ // case insensitivity
+ {
+ 'query': 'iterator<ItEm=sOmEtHiNg> -> u32',
+ 'correction': null,
+ 'others': [
+ { 'path': 'assoc_type', 'name': 'my_fn' },
+ ],
+ },
+ // wrong binding name, no result
+ {
+ 'query': 'iterator<something=something> -> u32',
+ 'correction': null,
+ 'in_args': [],
+ 'others': [],
+ },
+];
diff --git a/tests/rustdoc-js/assoc-type.rs b/tests/rustdoc-js/assoc-type.rs
new file mode 100644
index 000000000..e12e73cb5
--- /dev/null
+++ b/tests/rustdoc-js/assoc-type.rs
@@ -0,0 +1,12 @@
+pub fn my_fn<X: Iterator<Item = Something>>(_x: X) -> u32 {
+ 3
+}
+
+pub struct Something;
+
+pub mod my {
+ pub trait Iterator<T> {}
+ pub fn other_fn<X: Iterator<crate::Something>>(_: X) -> u32 {
+ 3
+ }
+}
diff --git a/tests/rustdoc-js/big-result.js b/tests/rustdoc-js/big-result.js
new file mode 100644
index 000000000..07961d196
--- /dev/null
+++ b/tests/rustdoc-js/big-result.js
@@ -0,0 +1,39 @@
+// exact-check
+
+const EXPECTED = [
+ {
+ 'query': 'First',
+ 'in_args': (function() {
+ // Generate the list of 200 items that should match.
+ const results = [];
+ function generate(lx, ly) {
+ for (const x of lx) {
+ for (const y of ly) {
+ results.push({
+ 'path': `big_result::${y}`,
+ 'name': x,
+ });
+ }
+ }
+ }
+ // Fewest parameters that still match go on top.
+ generate(
+ ['u', 'v', 'w', 'x', 'y'],
+ ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
+ );
+ generate(
+ ['p', 'q', 'r', 's', 't'],
+ ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
+ );
+ generate(
+ ['k', 'l', 'm', 'n', 'o'],
+ ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
+ );
+ generate(
+ ['f', 'g', 'h', 'i', 'j'],
+ ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
+ );
+ return results;
+ })(),
+ },
+];
diff --git a/tests/rustdoc-js/big-result.rs b/tests/rustdoc-js/big-result.rs
new file mode 100644
index 000000000..4dfecd6aa
--- /dev/null
+++ b/tests/rustdoc-js/big-result.rs
@@ -0,0 +1,61 @@
+#![feature(concat_idents)]
+#![allow(nonstandard_style)]
+/// Generate 250 items that all match the query, starting with the longest.
+/// Those long items should be dropped from the result set, and the short ones
+/// should be shown instead.
+macro_rules! generate {
+ ([$($x:ident),+], $y:tt, $z:tt) => {
+ $(
+ generate!(@ $x, $y, $z);
+ )+
+ };
+ (@ $x:ident , [$($y:ident),+], $z:tt) => {
+ pub struct $x;
+ $(
+ generate!(@@ $x, $y, $z);
+ )+
+ };
+ (@@ $x:ident , $y:ident, [$($z:ident: $zt:ident),+]) => {
+ impl $y {
+ pub fn $x($($z: $zt,)+) {}
+ }
+ }
+}
+
+pub struct First;
+pub struct Second;
+pub struct Third;
+pub struct Fourth;
+pub struct Fifth;
+
+generate!(
+ [a, b, c, d, e],
+ [a, b, c, d, e, f, g, h, i, j],
+ [a: First, b: Second, c: Third, d: Fourth, e: Fifth]
+);
+
+generate!(
+ [f, g, h, i, j],
+ [a, b, c, d, e, f, g, h, i, j],
+ [a: First, b: Second, c: Third, d: Fourth]
+);
+
+generate!(
+ [k, l, m, n, o],
+ [a, b, c, d, e, f, g, h, i, j],
+ [a: First, b: Second, c: Third]
+);
+
+generate!(
+ // reverse it, just to make sure they're alphabetized
+ // in the result set when all else is equal
+ [t, s, r, q, p],
+ [a, b, c, d, e, f, g, h, i, j],
+ [a: First, b: Second]
+);
+
+generate!(
+ [u, v, w, x, y],
+ [a, b, c, d, e, f, g, h, i, j],
+ [a: First]
+);
diff --git a/tests/rustdoc-js/enum-variant-not-type.js b/tests/rustdoc-js/enum-variant-not-type.js
new file mode 100644
index 000000000..b0f1ec666
--- /dev/null
+++ b/tests/rustdoc-js/enum-variant-not-type.js
@@ -0,0 +1,70 @@
+const EXPECTED = [
+ {
+ 'query': 'T -> T',
+ 'correction': null,
+ 'others': [
+ {
+ 'path': 'enum_variant_not_type',
+ 'name': 'my_fn',
+ },
+ {
+ 'path': 'enum_variant_not_type::AutoCorrectConfounder',
+ 'name': 'assoc_type_acts_like_generic',
+ },
+ ],
+ },
+ {
+ 'query': 'InsertUnnecessarilyLongTypeNameHere -> InsertUnnecessarilyLongTypeNameHere',
+ 'correction': null,
+ 'others': [
+ {
+ 'path': 'enum_variant_not_type',
+ 'name': 'my_fn',
+ },
+ {
+ 'path': 'enum_variant_not_type::AutoCorrectConfounder',
+ 'name': 'assoc_type_acts_like_generic',
+ },
+ ],
+ },
+ {
+ 'query': 'InsertUnnecessarilyLongTypeNameHere',
+ 'correction': null,
+ 'others': [
+ {
+ 'path': 'enum_variant_not_type::AutoCorrectConfounder',
+ 'name': 'InsertUnnecessarilyLongTypeNameHere',
+ },
+ ],
+ },
+ {
+ 'query': 'InsertUnnecessarilyLongTypeNameHereX',
+ 'correction': null,
+ 'others': [
+ {
+ 'path': 'enum_variant_not_type::AutoCorrectConfounder',
+ 'name': 'InsertUnnecessarilyLongTypeNameHere',
+ },
+ ],
+ },
+ {
+ 'query': 'T',
+ 'correction': null,
+ 'others': [
+ {
+ 'path': 'enum_variant_not_type::MyTrait',
+ 'name': 'T',
+ },
+ ],
+ },
+ {
+ 'query': 'T',
+ 'correction': null,
+ 'others': [
+ {
+ 'path': 'enum_variant_not_type::MyTrait',
+ 'name': 'T',
+ },
+ ],
+ },
+];
diff --git a/tests/rustdoc-js/enum-variant-not-type.rs b/tests/rustdoc-js/enum-variant-not-type.rs
new file mode 100644
index 000000000..421bddf62
--- /dev/null
+++ b/tests/rustdoc-js/enum-variant-not-type.rs
@@ -0,0 +1,14 @@
+pub trait MyTrait {
+ // Reduced from `arti` crate.
+ // https://tpo.pages.torproject.net/core/doc/rust/tor_config/list_builder/trait.DirectDefaultEmptyListBuilderAccessors.html#associatedtype.T
+ type T;
+ fn not_appearing(&self) -> Option<&Self::T>;
+}
+
+pub fn my_fn<X>(t: X) -> X { t }
+
+pub trait AutoCorrectConfounder {
+ type InsertUnnecessarilyLongTypeNameHere;
+ fn assoc_type_acts_like_generic(&self, x: &Self::InsertUnnecessarilyLongTypeNameHere)
+ -> Option<&Self::InsertUnnecessarilyLongTypeNameHere>;
+}
diff --git a/tests/rustdoc-js/full-path-function.js b/tests/rustdoc-js/full-path-function.js
index 48be51b15..0464f7922 100644
--- a/tests/rustdoc-js/full-path-function.js
+++ b/tests/rustdoc-js/full-path-function.js
@@ -4,16 +4,16 @@ const EXPECTED = [
{
'query': 'sac -> usize',
'others': [
- { 'path': 'full_path_function::b::Sac', 'name': 'bar' },
{ 'path': 'full_path_function::b::Sac', 'name': 'len' },
{ 'path': 'full_path_function::sac::Sac', 'name': 'len' },
+ { 'path': 'full_path_function::b::Sac', 'name': 'bar' },
],
},
{
'query': 'b::sac -> usize',
'others': [
- { 'path': 'full_path_function::b::Sac', 'name': 'bar' },
{ 'path': 'full_path_function::b::Sac', 'name': 'len' },
+ { 'path': 'full_path_function::b::Sac', 'name': 'bar' },
],
},
{
diff --git a/tests/rustdoc-js/gat.js b/tests/rustdoc-js/gat.js
new file mode 100644
index 000000000..7cb6a85d1
--- /dev/null
+++ b/tests/rustdoc-js/gat.js
@@ -0,0 +1,57 @@
+// exact-check
+
+const EXPECTED = [
+ {
+ 'query': 'foo<assoc<u8>=u8> -> u32',
+ 'correction': null,
+ 'in_args': [],
+ 'others': [
+ { 'path': 'gat', 'name': 'sample' },
+ ],
+ },
+ {
+ 'query': 'foo<assoc<u8>=u8> -> !',
+ 'correction': null,
+ 'in_args': [],
+ 'others': [
+ { 'path': 'gat', 'name': 'synergy' },
+ ],
+ },
+ {
+ 'query': 'foo<assoc<u8>=u8>',
+ 'correction': null,
+ 'in_args': [
+ { 'path': 'gat', 'name': 'sample' },
+ { 'path': 'gat', 'name': 'synergy' },
+ ],
+ },
+ {
+ 'query': 'foo<assoc<u8>=u32>',
+ 'correction': null,
+ 'in_args': [
+ { 'path': 'gat', 'name': 'consider' },
+ ],
+ },
+ {
+ // This one is arguably a bug, because the way rustdoc
+ // stores GATs in the search index is sloppy, but it's
+ // precise enough to match most of the samples in the
+ // GAT initiative repo
+ 'query': 'foo<assoc<u32>=u8>',
+ 'correction': null,
+ 'in_args': [
+ { 'path': 'gat', 'name': 'consider' },
+ ],
+ },
+ {
+ // This one is arguably a bug, because the way rustdoc
+ // stores GATs in the search index is sloppy, but it's
+ // precise enough to match most of the samples in the
+ // GAT initiative repo
+ 'query': 'foo<assoc<T>=T>',
+ 'correction': null,
+ 'in_args': [
+ { 'path': 'gat', 'name': 'integrate' },
+ ],
+ },
+];
diff --git a/tests/rustdoc-js/gat.rs b/tests/rustdoc-js/gat.rs
new file mode 100644
index 000000000..b4861cc68
--- /dev/null
+++ b/tests/rustdoc-js/gat.rs
@@ -0,0 +1,8 @@
+pub trait Foo {
+ type Assoc<T>;
+}
+
+pub fn sample<X: Foo<Assoc<u8> = u8>>(_: X) -> u32 { loop {} }
+pub fn synergy(_: impl Foo<Assoc<u8> = u8>) -> ! { loop {} }
+pub fn consider(_: impl Foo<Assoc<u8> = u32>) -> bool { loop {} }
+pub fn integrate<T>(_: impl Foo<Assoc<T> = T>) -> T { loop {} }
diff --git a/tests/rustdoc-js/generics.js b/tests/rustdoc-js/generics.js
index ebc92ccfc..b3ca0af30 100644
--- a/tests/rustdoc-js/generics.js
+++ b/tests/rustdoc-js/generics.js
@@ -1,4 +1,5 @@
// exact-check
+// ignore-order
const EXPECTED = [
{
diff --git a/tests/rustdoc-js/generics2.js b/tests/rustdoc-js/generics2.js
new file mode 100644
index 000000000..f08704349
--- /dev/null
+++ b/tests/rustdoc-js/generics2.js
@@ -0,0 +1,22 @@
+// exact-check
+
+const EXPECTED = [
+ {
+ 'query': 'outside<U>, outside<V> -> outside<W>',
+ 'others': [],
+ },
+ {
+ 'query': 'outside<V>, outside<U> -> outside<W>',
+ 'others': [],
+ },
+ {
+ 'query': 'outside<U>, outside<U> -> outside<W>',
+ 'others': [],
+ },
+ {
+ 'query': 'outside<U>, outside<U> -> outside<U>',
+ 'others': [
+ {"path": "generics2", "name": "should_match_3"}
+ ],
+ },
+];
diff --git a/tests/rustdoc-js/generics2.rs b/tests/rustdoc-js/generics2.rs
new file mode 100644
index 000000000..1177ade68
--- /dev/null
+++ b/tests/rustdoc-js/generics2.rs
@@ -0,0 +1,13 @@
+pub struct Outside<T>(T);
+
+pub fn no_match<U, V>(a: Outside<U>, b: Outside<V>) -> (Outside<U>, Outside<V>) {
+ unimplemented!();
+}
+
+pub fn no_match_2<U, V>(a: Outside<V>, b: Outside<U>) -> (Outside<U>, Outside<V>) {
+ unimplemented!();
+}
+
+pub fn should_match_3<U>(a: Outside<U>, b: Outside<U>) -> (Outside<U>, Outside<U>) {
+ unimplemented!();
+}
diff --git a/tests/rustdoc-js/impl-trait.js b/tests/rustdoc-js/impl-trait.js
index 00d67d639..8bb3f2d3e 100644
--- a/tests/rustdoc-js/impl-trait.js
+++ b/tests/rustdoc-js/impl-trait.js
@@ -39,8 +39,8 @@ const EXPECTED = [
{ 'path': 'impl_trait', 'name': 'Aaaaaaa' },
],
'in_args': [
- { 'path': 'impl_trait::Ccccccc', 'name': 'eeeeeee' },
{ 'path': 'impl_trait::Ccccccc', 'name': 'fffffff' },
+ { 'path': 'impl_trait::Ccccccc', 'name': 'eeeeeee' },
],
'returned': [
{ 'path': 'impl_trait', 'name': 'bbbbbbb' },
diff --git a/tests/rustdoc-js/never-search.js b/tests/rustdoc-js/never-search.js
index ed24d6931..9f18370c2 100644
--- a/tests/rustdoc-js/never-search.js
+++ b/tests/rustdoc-js/never-search.js
@@ -43,4 +43,14 @@ const EXPECTED = [
{ 'path': 'never_search', 'name': 'box_uninteresting' },
],
},
+ {
+ 'query': 'box<item=!>',
+ 'in_args': [],
+ 'returned': [],
+ },
+ {
+ 'query': 'box<item=never>',
+ 'in_args': [],
+ 'returned': [],
+ },
];
diff --git a/tests/rustdoc-js/substring.js b/tests/rustdoc-js/substring.js
index 96efa992b..b791ac4bf 100644
--- a/tests/rustdoc-js/substring.js
+++ b/tests/rustdoc-js/substring.js
@@ -1,7 +1,15 @@
-const EXPECTED = {
- 'query': 'waker_from',
- 'others': [
- { 'path': 'substring::SuperWaker', 'name': 'local_waker_from_nonlocal' },
- { 'path': 'substring::SuperWakerTask', 'name': 'local_waker_from_nonlocal' },
- ],
-};
+const EXPECTED = [
+ {
+ 'query': 'waker_from',
+ 'others': [
+ { 'path': 'substring::SuperWaker', 'name': 'local_waker_from_nonlocal' },
+ { 'path': 'substring::SuperWakerTask', 'name': 'local_waker_from_nonlocal' },
+ ],
+ },
+ {
+ 'query': 'my',
+ 'others': [
+ { 'path': 'substring', 'name': 'm_y_substringmatching' },
+ ],
+ },
+];
diff --git a/tests/rustdoc-js/substring.rs b/tests/rustdoc-js/substring.rs
index e729c722c..ea88894d0 100644
--- a/tests/rustdoc-js/substring.rs
+++ b/tests/rustdoc-js/substring.rs
@@ -19,3 +19,5 @@ impl SuperWakerTask {
pub fn waker_non_local() {}
pub fn from_non_local() {}
}
+
+pub fn m_y_substringmatching() {}
diff --git a/tests/rustdoc-js/trait-methods.js b/tests/rustdoc-js/trait-methods.js
new file mode 100644
index 000000000..dafad5e43
--- /dev/null
+++ b/tests/rustdoc-js/trait-methods.js
@@ -0,0 +1,12 @@
+// exact-check
+
+const EXPECTED = [
+ {
+ 'query': 'mytrait<t> -> option<t>',
+ 'correction': null,
+ 'in_args': [],
+ 'others': [
+ { 'path': 'trait_methods::MyTrait', 'name': 'next' },
+ ],
+ },
+];
diff --git a/tests/rustdoc-js/trait-methods.rs b/tests/rustdoc-js/trait-methods.rs
new file mode 100644
index 000000000..c88f5edfd
--- /dev/null
+++ b/tests/rustdoc-js/trait-methods.rs
@@ -0,0 +1,4 @@
+pub trait MyTrait {
+ type Item;
+ fn next(&mut self) -> Option<Self::Item>;
+}
diff --git a/tests/rustdoc-js/type-parameters.js b/tests/rustdoc-js/type-parameters.js
index e695f189b..e045409e5 100644
--- a/tests/rustdoc-js/type-parameters.js
+++ b/tests/rustdoc-js/type-parameters.js
@@ -1,20 +1,19 @@
// exact-check
-// ignore-order
const EXPECTED = [
{
query: '-> trait:Some',
others: [
- { path: 'foo', name: 'alef' },
{ path: 'foo', name: 'alpha' },
+ { path: 'foo', name: 'alef' },
],
},
{
query: '-> generic:T',
others: [
+ { path: 'foo', name: 'beta' },
{ path: 'foo', name: 'bet' },
{ path: 'foo', name: 'alef' },
- { path: 'foo', name: 'beta' },
],
},
{
@@ -44,38 +43,40 @@ const EXPECTED = [
{
query: 'Other, Other',
others: [
- { path: 'foo', name: 'other' },
{ path: 'foo', name: 'alternate' },
+ { path: 'foo', name: 'other' },
],
},
{
query: 'generic:T',
in_args: [
- { path: 'foo', name: 'bet' },
{ path: 'foo', name: 'beta' },
- { path: 'foo', name: 'other' },
+ { path: 'foo', name: 'bet' },
{ path: 'foo', name: 'alternate' },
+ { path: 'foo', name: 'other' },
],
},
{
query: 'generic:Other',
in_args: [
- { path: 'foo', name: 'bet' },
{ path: 'foo', name: 'beta' },
- { path: 'foo', name: 'other' },
+ { path: 'foo', name: 'bet' },
{ path: 'foo', name: 'alternate' },
+ { path: 'foo', name: 'other' },
],
},
{
query: 'trait:Other',
in_args: [
- { path: 'foo', name: 'other' },
{ path: 'foo', name: 'alternate' },
+ { path: 'foo', name: 'other' },
],
},
{
query: 'Other',
in_args: [
+ // because function is called "other", it's sorted first
+ // even though it has higher type distance
{ path: 'foo', name: 'other' },
{ path: 'foo', name: 'alternate' },
],
diff --git a/tests/rustdoc-ui/apit-46976.rs b/tests/rustdoc-ui/apit-46976.rs
new file mode 100644
index 000000000..c17688e3b
--- /dev/null
+++ b/tests/rustdoc-ui/apit-46976.rs
@@ -0,0 +1,4 @@
+// check-pass
+// https://github.com/rust-lang/rust/issues/46976
+
+pub fn ice(f: impl Fn()) {}
diff --git a/tests/rustdoc/auxiliary/issue-36031.rs b/tests/rustdoc-ui/auxiliary/issue-36031.rs
index da688139e..da688139e 100644
--- a/tests/rustdoc/auxiliary/issue-36031.rs
+++ b/tests/rustdoc-ui/auxiliary/issue-36031.rs
diff --git a/tests/rustdoc/auxiliary/issue-40936.rs b/tests/rustdoc-ui/auxiliary/issue-40936.rs
index b921e5201..b921e5201 100644
--- a/tests/rustdoc/auxiliary/issue-40936.rs
+++ b/tests/rustdoc-ui/auxiliary/issue-40936.rs
diff --git a/tests/rustdoc/auxiliary/issue-48414.rs b/tests/rustdoc-ui/auxiliary/issue-48414.rs
index f442ac722..f442ac722 100644
--- a/tests/rustdoc/auxiliary/issue-48414.rs
+++ b/tests/rustdoc-ui/auxiliary/issue-48414.rs
diff --git a/tests/rustdoc-ui/bounded-hr-lifetime.stderr b/tests/rustdoc-ui/bounded-hr-lifetime.stderr
index 580f70c97..d7c4e8c38 100644
--- a/tests/rustdoc-ui/bounded-hr-lifetime.stderr
+++ b/tests/rustdoc-ui/bounded-hr-lifetime.stderr
@@ -4,5 +4,5 @@ error: lifetime bounds cannot be used in this context
LL | for<'a: 'b + 'c> &'a (): std::fmt::Debug,
| ^^ ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/check-cfg/check-cfg.stderr b/tests/rustdoc-ui/check-cfg/check-cfg.stderr
index d010c1f7e..3bca5dd08 100644
--- a/tests/rustdoc-ui/check-cfg/check-cfg.stderr
+++ b/tests/rustdoc-ui/check-cfg/check-cfg.stderr
@@ -4,6 +4,8 @@ warning: unexpected `cfg` condition name: `uniz`
LL | #[cfg(uniz)]
| ^^^^ help: there is a config with a similar name: `unix`
|
+ = help: to expect this configuration use `--check-cfg=cfg(uniz)`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted
diff --git a/tests/rustdoc/issue-48414.rs b/tests/rustdoc-ui/circular-intra-doc-link-48414.rs
index b35743d88..46367ccae 100644
--- a/tests/rustdoc/issue-48414.rs
+++ b/tests/rustdoc-ui/circular-intra-doc-link-48414.rs
@@ -1,4 +1,7 @@
// aux-build:issue-48414.rs
+// check-pass
+
+// https://github.com/rust-lang/rust/issues/48414
// ICE when resolving paths for a trait that linked to another trait, when both were in an external
// crate
diff --git a/tests/rustdoc-ui/const-evalutation-ice.stderr b/tests/rustdoc-ui/const-evalutation-ice.stderr
index 5d9c16c07..e1cb33238 100644
--- a/tests/rustdoc-ui/const-evalutation-ice.stderr
+++ b/tests/rustdoc-ui/const-evalutation-ice.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | pub const N: usize = 0 - (mem::size_of::<S>() != 400) as usize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to compute `0_usize - 1_usize`, which would overflow
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/rustdoc-ui/const_arg_in_type_position.stderr b/tests/rustdoc-ui/const_arg_in_type_position.stderr
index ea05920de..5345f77fd 100644
--- a/tests/rustdoc-ui/const_arg_in_type_position.stderr
+++ b/tests/rustdoc-ui/const_arg_in_type_position.stderr
@@ -4,6 +4,6 @@ error[E0747]: constant provided when a type was expected
LL | fn foo<const N: usize>() -> Array<N, ()> {
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0747`.
diff --git a/tests/rustdoc-ui/diagnostic-width.stderr b/tests/rustdoc-ui/diagnostic-width.stderr
index 1a00d10d3..c1cc4898a 100644
--- a/tests/rustdoc-ui/diagnostic-width.stderr
+++ b/tests/rustdoc-ui/diagnostic-width.stderr
@@ -11,5 +11,5 @@ note: the lint level is defined here
LL | ...ny(rustdoc::bare_url...
| ^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/doc-alias-assoc-const.stderr b/tests/rustdoc-ui/doc-alias-assoc-const.stderr
index cbca40e13..cd3ad4ab3 100644
--- a/tests/rustdoc-ui/doc-alias-assoc-const.stderr
+++ b/tests/rustdoc-ui/doc-alias-assoc-const.stderr
@@ -4,5 +4,5 @@ error: `#[doc(alias = "...")]` isn't allowed on associated constant in trait imp
LL | #[doc(alias = "CONST_BAZ")]
| ^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/doc-alias-same-name.stderr b/tests/rustdoc-ui/doc-alias-same-name.stderr
index 5ba09a2ea..a9da75c01 100644
--- a/tests/rustdoc-ui/doc-alias-same-name.stderr
+++ b/tests/rustdoc-ui/doc-alias-same-name.stderr
@@ -4,5 +4,5 @@ error: `#[doc(alias = "...")]` is the same as the item's name
LL | #[doc(alias = "Foo")]
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/doctest/check-attr-test.stderr b/tests/rustdoc-ui/doctest/check-attr-test.stderr
index 01beba1ff..10f763a6f 100644
--- a/tests/rustdoc-ui/doctest/check-attr-test.stderr
+++ b/tests/rustdoc-ui/doctest/check-attr-test.stderr
@@ -1,4 +1,4 @@
-error: unknown attribute `compile-fail`. Did you mean `compile_fail`?
+error: unknown attribute `compile-fail`
--> $DIR/check-attr-test.rs:5:1
|
5 | / /// foo
@@ -8,6 +8,7 @@ error: unknown attribute `compile-fail`. Did you mean `compile_fail`?
9 | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `compile_fail`
= help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully
note: the lint level is defined here
--> $DIR/check-attr-test.rs:3:9
@@ -15,7 +16,7 @@ note: the lint level is defined here
3 | #![deny(rustdoc::invalid_codeblock_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: unknown attribute `compilefail`. Did you mean `compile_fail`?
+error: unknown attribute `compilefail`
--> $DIR/check-attr-test.rs:5:1
|
5 | / /// foo
@@ -25,9 +26,10 @@ error: unknown attribute `compilefail`. Did you mean `compile_fail`?
9 | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `compile_fail`
= help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully
-error: unknown attribute `comPile_fail`. Did you mean `compile_fail`?
+error: unknown attribute `comPile_fail`
--> $DIR/check-attr-test.rs:5:1
|
5 | / /// foo
@@ -37,9 +39,10 @@ error: unknown attribute `comPile_fail`. Did you mean `compile_fail`?
9 | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `compile_fail`
= help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully
-error: unknown attribute `should-panic`. Did you mean `should_panic`?
+error: unknown attribute `should-panic`
--> $DIR/check-attr-test.rs:12:1
|
12 | / /// bar
@@ -49,9 +52,10 @@ error: unknown attribute `should-panic`. Did you mean `should_panic`?
16 | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `should_panic`
= help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running
-error: unknown attribute `shouldpanic`. Did you mean `should_panic`?
+error: unknown attribute `shouldpanic`
--> $DIR/check-attr-test.rs:12:1
|
12 | / /// bar
@@ -61,9 +65,10 @@ error: unknown attribute `shouldpanic`. Did you mean `should_panic`?
16 | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `should_panic`
= help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running
-error: unknown attribute `shOuld_panic`. Did you mean `should_panic`?
+error: unknown attribute `shOuld_panic`
--> $DIR/check-attr-test.rs:12:1
|
12 | / /// bar
@@ -73,9 +78,10 @@ error: unknown attribute `shOuld_panic`. Did you mean `should_panic`?
16 | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `should_panic`
= help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running
-error: unknown attribute `no-run`. Did you mean `no_run`?
+error: unknown attribute `no-run`
--> $DIR/check-attr-test.rs:19:1
|
19 | / /// foobar
@@ -85,9 +91,10 @@ error: unknown attribute `no-run`. Did you mean `no_run`?
23 | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `no_run`
= help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want)
-error: unknown attribute `norun`. Did you mean `no_run`?
+error: unknown attribute `norun`
--> $DIR/check-attr-test.rs:19:1
|
19 | / /// foobar
@@ -97,9 +104,10 @@ error: unknown attribute `norun`. Did you mean `no_run`?
23 | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `no_run`
= help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want)
-error: unknown attribute `nO_run`. Did you mean `no_run`?
+error: unknown attribute `nO_run`
--> $DIR/check-attr-test.rs:19:1
|
19 | / /// foobar
@@ -109,9 +117,10 @@ error: unknown attribute `nO_run`. Did you mean `no_run`?
23 | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `no_run`
= help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want)
-error: unknown attribute `test-harness`. Did you mean `test_harness`?
+error: unknown attribute `test-harness`
--> $DIR/check-attr-test.rs:26:1
|
26 | / /// b
@@ -121,9 +130,10 @@ error: unknown attribute `test-harness`. Did you mean `test_harness`?
30 | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `test_harness`
= help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function
-error: unknown attribute `testharness`. Did you mean `test_harness`?
+error: unknown attribute `testharness`
--> $DIR/check-attr-test.rs:26:1
|
26 | / /// b
@@ -133,9 +143,10 @@ error: unknown attribute `testharness`. Did you mean `test_harness`?
30 | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `test_harness`
= help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function
-error: unknown attribute `tesT_harness`. Did you mean `test_harness`?
+error: unknown attribute `tesT_harness`
--> $DIR/check-attr-test.rs:26:1
|
26 | / /// b
@@ -145,6 +156,7 @@ error: unknown attribute `tesT_harness`. Did you mean `test_harness`?
30 | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `test_harness`
= help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function
error: aborting due to 12 previous errors
diff --git a/tests/rustdoc-ui/doctest/check-cfg-test.stderr b/tests/rustdoc-ui/doctest/check-cfg-test.stderr
index 0bfd569e3..5524f582d 100644
--- a/tests/rustdoc-ui/doctest/check-cfg-test.stderr
+++ b/tests/rustdoc-ui/doctest/check-cfg-test.stderr
@@ -5,6 +5,8 @@ LL | #[cfg(feature = "invalid")]
| ^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `feature` are: `test`
+ = help: to expect this configuration use `--check-cfg=cfg(feature, values("invalid"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted
diff --git a/tests/rustdoc-ui/doctest/doctest-edition.stderr b/tests/rustdoc-ui/doctest/doctest-edition.stderr
index 8a3329aa3..1e9ebd88c 100644
--- a/tests/rustdoc-ui/doctest/doctest-edition.stderr
+++ b/tests/rustdoc-ui/doctest/doctest-edition.stderr
@@ -18,5 +18,5 @@ help: mark blocks that do not contain Rust code as text
LL | //! ```text
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.stdout b/tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.stdout
index 61468b6c7..e288f8dfc 100644
--- a/tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.stdout
+++ b/tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.stdout
@@ -13,7 +13,7 @@ LL | struct S {}; // unexpected semicolon after struct def
|
= help: braced struct declarations are not followed by a semicolon
-error: aborting due to previous error
+error: aborting due to 1 previous error
Couldn't compile the test.
diff --git a/tests/rustdoc-ui/doctest/failed-doctest-missing-codes.stdout b/tests/rustdoc-ui/doctest/failed-doctest-missing-codes.stdout
index bacbb47b5..11355c232 100644
--- a/tests/rustdoc-ui/doctest/failed-doctest-missing-codes.stdout
+++ b/tests/rustdoc-ui/doctest/failed-doctest-missing-codes.stdout
@@ -13,7 +13,7 @@ LL | let x: () = 5i32;
| |
| expected due to this
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
Some expected error codes were not found: ["E0004"]
diff --git a/tests/rustdoc-ui/doctest/failed-doctest-output-windows.stdout b/tests/rustdoc-ui/doctest/failed-doctest-output-windows.stdout
index f4bfb94e9..1b37249dd 100644
--- a/tests/rustdoc-ui/doctest/failed-doctest-output-windows.stdout
+++ b/tests/rustdoc-ui/doctest/failed-doctest-output-windows.stdout
@@ -12,7 +12,7 @@ error[E0425]: cannot find value `no` in this scope
LL | no
| ^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
Couldn't compile the test.
diff --git a/tests/rustdoc-ui/doctest/failed-doctest-output.stdout b/tests/rustdoc-ui/doctest/failed-doctest-output.stdout
index 840c9c508..7b0cf9a43 100644
--- a/tests/rustdoc-ui/doctest/failed-doctest-output.stdout
+++ b/tests/rustdoc-ui/doctest/failed-doctest-output.stdout
@@ -12,7 +12,7 @@ error[E0425]: cannot find value `no` in this scope
LL | no
| ^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
Couldn't compile the test.
diff --git a/tests/rustdoc-ui/doctest/nocapture-fail.stderr b/tests/rustdoc-ui/doctest/nocapture-fail.stderr
index b65b622c1..c6a5785a2 100644
--- a/tests/rustdoc-ui/doctest/nocapture-fail.stderr
+++ b/tests/rustdoc-ui/doctest/nocapture-fail.stderr
@@ -14,5 +14,5 @@ LL | Input: 123
LL ~ } }
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/doctest/private-item-doc-test.stderr b/tests/rustdoc-ui/doctest/private-item-doc-test.stderr
index 5df613298..5177057c7 100644
--- a/tests/rustdoc-ui/doctest/private-item-doc-test.stderr
+++ b/tests/rustdoc-ui/doctest/private-item-doc-test.stderr
@@ -14,5 +14,5 @@ note: the lint level is defined here
LL | #![deny(rustdoc::private_doc_tests)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/doctest/private-public-item-doc-test.stderr b/tests/rustdoc-ui/doctest/private-public-item-doc-test.stderr
index f50dbd184..38b8dd652 100644
--- a/tests/rustdoc-ui/doctest/private-public-item-doc-test.stderr
+++ b/tests/rustdoc-ui/doctest/private-public-item-doc-test.stderr
@@ -14,5 +14,5 @@ note: the lint level is defined here
LL | #![deny(rustdoc::private_doc_tests)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/doctest/test-compile-fail1.stderr b/tests/rustdoc-ui/doctest/test-compile-fail1.stderr
index 72915e46b..02f4d8d75 100644
--- a/tests/rustdoc-ui/doctest/test-compile-fail1.stderr
+++ b/tests/rustdoc-ui/doctest/test-compile-fail1.stderr
@@ -9,6 +9,6 @@ error[E0428]: the name `f` is defined multiple times
|
= note: `f` must be defined only once in the value namespace of this module
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0428`.
diff --git a/tests/rustdoc-ui/doctest/test-compile-fail2.stderr b/tests/rustdoc-ui/doctest/test-compile-fail2.stderr
index cee5b63cf..f0ad40eb6 100644
--- a/tests/rustdoc-ui/doctest/test-compile-fail2.stderr
+++ b/tests/rustdoc-ui/doctest/test-compile-fail2.stderr
@@ -4,5 +4,5 @@ error: expected one of `!` or `::`, found `<eof>`
3 | fail
| ^^^^ expected one of `!` or `::`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/doctest/test-compile-fail3.stderr b/tests/rustdoc-ui/doctest/test-compile-fail3.stderr
index fab801b3b..1ed455422 100644
--- a/tests/rustdoc-ui/doctest/test-compile-fail3.stderr
+++ b/tests/rustdoc-ui/doctest/test-compile-fail3.stderr
@@ -4,6 +4,6 @@ error[E0765]: unterminated double quote string
3 | "fail
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0765`.
diff --git a/tests/rustdoc-ui/doctest/unparseable-doc-test.stdout b/tests/rustdoc-ui/doctest/unparseable-doc-test.stdout
index 2641c66f2..0574dc8b2 100644
--- a/tests/rustdoc-ui/doctest/unparseable-doc-test.stdout
+++ b/tests/rustdoc-ui/doctest/unparseable-doc-test.stdout
@@ -11,7 +11,7 @@ error[E0765]: unterminated double quote string
LL | "unterminated
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0765`.
Couldn't compile the test.
diff --git a/tests/rustdoc-ui/error-in-impl-trait/README.md b/tests/rustdoc-ui/error-in-impl-trait/README.md
index 1176a4a8c..d969ab10e 100644
--- a/tests/rustdoc-ui/error-in-impl-trait/README.md
+++ b/tests/rustdoc-ui/error-in-impl-trait/README.md
@@ -1,5 +1,5 @@
Each of these needs to be in a separate file,
-because the `delay_span_bug` ICE in rustdoc won't be triggerred
+because the `span_delayed_bug` ICE in rustdoc won't be triggerred
if even a single other error was emitted.
However, conceptually they are all testing basically the same thing.
diff --git a/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-2.stderr b/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-2.stderr
index edb5dfd4d..69e2eebcd 100644
--- a/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-2.stderr
+++ b/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-2.stderr
@@ -12,6 +12,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | V(Box<E>),
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-impl-trait-return.stderr b/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-impl-trait-return.stderr
index aff7402bc..c169ca670 100644
--- a/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-impl-trait-return.stderr
+++ b/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-impl-trait-return.stderr
@@ -11,6 +11,6 @@ help: insert some indirection (e.g., a `DEF_ID`) to break the cycle
LL | This(Box<E>),
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `DEF_ID`.
diff --git a/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type.stderr b/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type.stderr
index 349a56941..bd5de384c 100644
--- a/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type.stderr
+++ b/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type.stderr
@@ -12,6 +12,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | V(Box<E>),
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/rustdoc-ui/feature-gate-doc_cfg_hide.stderr b/tests/rustdoc-ui/feature-gate-doc_cfg_hide.stderr
index 0864159c8..0b982cd9f 100644
--- a/tests/rustdoc-ui/feature-gate-doc_cfg_hide.stderr
+++ b/tests/rustdoc-ui/feature-gate-doc_cfg_hide.stderr
@@ -7,6 +7,6 @@ LL | #![doc(cfg_hide(test))]
= note: see issue #43781 <https://github.com/rust-lang/rust/issues/43781> for more information
= help: add `#![feature(doc_cfg_hide)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/rustdoc/issue-34423.rs b/tests/rustdoc-ui/hidden-trait-method-34423.rs
index b429bf8c9..f3107d237 100644
--- a/tests/rustdoc/issue-34423.rs
+++ b/tests/rustdoc-ui/hidden-trait-method-34423.rs
@@ -1,3 +1,6 @@
+// check-pass
+// https://github.com/rust-lang/rust/issues/34423
+
pub struct Foo;
pub trait Bar {
diff --git a/tests/rustdoc-ui/infinite-recursive-type.stderr b/tests/rustdoc-ui/infinite-recursive-type.stderr
index 9e2c3ff16..cc914de6d 100644
--- a/tests/rustdoc-ui/infinite-recursive-type.stderr
+++ b/tests/rustdoc-ui/infinite-recursive-type.stderr
@@ -12,6 +12,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | V(Box<E>),
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/rustdoc/issue-36031.rs b/tests/rustdoc-ui/inherent-assoc-consts-36031.rs
index af1b32fd2..755fc1cfd 100644
--- a/tests/rustdoc/issue-36031.rs
+++ b/tests/rustdoc-ui/inherent-assoc-consts-36031.rs
@@ -1,7 +1,10 @@
// aux-build:issue-36031.rs
+// check-pass
// build-aux-docs
// ignore-cross-compile
+// https://github.com/rust-lang/rust/issues/36031
+
#![crate_name = "foo"]
extern crate issue_36031;
diff --git a/tests/rustdoc-ui/intra-doc/alias-ice.stderr b/tests/rustdoc-ui/intra-doc/alias-ice.stderr
index 5e7ffeeb8..a38df9843 100644
--- a/tests/rustdoc-ui/intra-doc/alias-ice.stderr
+++ b/tests/rustdoc-ui/intra-doc/alias-ice.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(rustdoc::broken_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.stderr b/tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.stderr
index 04594ad41..7ce677e86 100644
--- a/tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.stderr
+++ b/tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(rustdoc::broken_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/intra-doc/crate-nonexistent.stderr b/tests/rustdoc-ui/intra-doc/crate-nonexistent.stderr
index a69b1c52a..5dc610179 100644
--- a/tests/rustdoc-ui/intra-doc/crate-nonexistent.stderr
+++ b/tests/rustdoc-ui/intra-doc/crate-nonexistent.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(rustdoc::broken_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/intra-doc/deny-intra-link-resolution-failure.stderr b/tests/rustdoc-ui/intra-doc/deny-intra-link-resolution-failure.stderr
index 3e08354a6..ace20a5fe 100644
--- a/tests/rustdoc-ui/intra-doc/deny-intra-link-resolution-failure.stderr
+++ b/tests/rustdoc-ui/intra-doc/deny-intra-link-resolution-failure.stderr
@@ -11,5 +11,5 @@ note: the lint level is defined here
LL | #![deny(rustdoc::broken_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/intra-doc/field-ice.stderr b/tests/rustdoc-ui/intra-doc/field-ice.stderr
index f45a3ca61..cc0ada873 100644
--- a/tests/rustdoc-ui/intra-doc/field-ice.stderr
+++ b/tests/rustdoc-ui/intra-doc/field-ice.stderr
@@ -14,5 +14,5 @@ help: to link to the field, remove the disambiguator
LL | /// [`Foo::bar`]
| ~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.stderr b/tests/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.stderr
index c43cda3eb..b95251702 100644
--- a/tests/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.stderr
+++ b/tests/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.stderr
@@ -14,5 +14,5 @@ help: to link to the associated constant, prefix with `const@`
LL | //! [const@u8::MIN]
| ~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-4.stderr b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-4.stderr
index a8dc91204..9d16219be 100644
--- a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-4.stderr
+++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-4.stderr
@@ -18,5 +18,5 @@ help: to link to the associated type, prefix with `type@`
LL | /// [`type@Struct::Trait`]
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-5.stderr b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-5.stderr
index 7430044ac..f7dabed29 100644
--- a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-5.stderr
+++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-5.stderr
@@ -18,5 +18,5 @@ help: to link to the trait, prefix with `trait@`
LL | /// [`trait@u32::MAX`]
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-6.stderr b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-6.stderr
index fe2d8cafa..baf23e94f 100644
--- a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-6.stderr
+++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-6.stderr
@@ -18,5 +18,5 @@ help: to link to the primitive type, prefix with `prim@`
LL | /// [`prim@u32::MAX`]
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-7.stderr b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-7.stderr
index 1d302ff42..542352754 100644
--- a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-7.stderr
+++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-7.stderr
@@ -18,5 +18,5 @@ help: to link to the associated type, prefix with `type@`
LL | /// [`type@u32::MAX`]
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-8.stderr b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-8.stderr
index efed0e2ce..a2641c251 100644
--- a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-8.stderr
+++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-8.stderr
@@ -18,5 +18,5 @@ help: to link to the associated type, prefix with `type@`
LL | /// [`type@u32::MAX`]
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/intra-doc/pub-export-lint.stderr b/tests/rustdoc-ui/intra-doc/pub-export-lint.stderr
index 81ef79961..b037b7933 100644
--- a/tests/rustdoc-ui/intra-doc/pub-export-lint.stderr
+++ b/tests/rustdoc-ui/intra-doc/pub-export-lint.stderr
@@ -11,5 +11,5 @@ note: the lint level is defined here
LL | #![deny(rustdoc::broken_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/intra-doc/reference-links.stderr b/tests/rustdoc-ui/intra-doc/reference-links.stderr
index c98a2fd7c..2a3035923 100644
--- a/tests/rustdoc-ui/intra-doc/reference-links.stderr
+++ b/tests/rustdoc-ui/intra-doc/reference-links.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(rustdoc::broken_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/intra-doc/span-ice-55723.stderr b/tests/rustdoc-ui/intra-doc/span-ice-55723.stderr
index e8ee40ad4..765f26c48 100644
--- a/tests/rustdoc-ui/intra-doc/span-ice-55723.stderr
+++ b/tests/rustdoc-ui/intra-doc/span-ice-55723.stderr
@@ -11,5 +11,5 @@ note: the lint level is defined here
LL | #![deny(rustdoc::broken_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/intra-doc/unresolved-import-recovery.stderr b/tests/rustdoc-ui/intra-doc/unresolved-import-recovery.stderr
index 14f560618..8315c73a6 100644
--- a/tests/rustdoc-ui/intra-doc/unresolved-import-recovery.stderr
+++ b/tests/rustdoc-ui/intra-doc/unresolved-import-recovery.stderr
@@ -6,6 +6,6 @@ LL | use unresolved_crate::module::Name;
|
= help: consider adding `extern crate unresolved_crate` to use the `unresolved_crate` crate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/rustdoc-ui/intra-doc/unused-extern-crate.stderr b/tests/rustdoc-ui/intra-doc/unused-extern-crate.stderr
index 815324563..f9f135a92 100644
--- a/tests/rustdoc-ui/intra-doc/unused-extern-crate.stderr
+++ b/tests/rustdoc-ui/intra-doc/unused-extern-crate.stderr
@@ -11,5 +11,5 @@ note: the lint level is defined here
LL | #![deny(rustdoc::broken_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/invalid-keyword.stderr b/tests/rustdoc-ui/invalid-keyword.stderr
index 8658e3825..82faaaab4 100644
--- a/tests/rustdoc-ui/invalid-keyword.stderr
+++ b/tests/rustdoc-ui/invalid-keyword.stderr
@@ -4,5 +4,5 @@ error: `foo df` is not a valid identifier
LL | #[doc(keyword = "foo df")]
| ^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/invalid_associated_const.stderr b/tests/rustdoc-ui/invalid_associated_const.stderr
index 1a8863fb1..9c6ae0f76 100644
--- a/tests/rustdoc-ui/invalid_associated_const.stderr
+++ b/tests/rustdoc-ui/invalid_associated_const.stderr
@@ -4,6 +4,6 @@ error[E0229]: associated type bindings are not allowed here
LL | type A: S<C<X = 0i32> = 34>;
| ^^^^^^^^ associated type not allowed here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0229`.
diff --git a/tests/rustdoc-ui/issue-102467.stderr b/tests/rustdoc-ui/issue-102467.stderr
index a337293f7..4a769f94c 100644
--- a/tests/rustdoc-ui/issue-102467.stderr
+++ b/tests/rustdoc-ui/issue-102467.stderr
@@ -4,6 +4,6 @@ error[E0229]: associated type bindings are not allowed here
LL | type A: S<C<X = 0i32> = 34>;
| ^^^^^^^^ associated type not allowed here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0229`.
diff --git a/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr b/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr
index 9aeb3389e..d056dde00 100644
--- a/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr
+++ b/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr
@@ -21,6 +21,6 @@ LL | | }
| |_^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/rustdoc-ui/issues/issue-102986.stderr b/tests/rustdoc-ui/issues/issue-102986.stderr
index 3a573726c..996eb41c4 100644
--- a/tests/rustdoc-ui/issues/issue-102986.stderr
+++ b/tests/rustdoc-ui/issues/issue-102986.stderr
@@ -9,6 +9,6 @@ help: consider replacing `typeof(...)` with an actual type
LL | y: (&'static str,),
| ~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0516`.
diff --git a/tests/rustdoc-ui/issues/issue-105334.stderr b/tests/rustdoc-ui/issues/issue-105334.stderr
index e163bb4db..d992b219b 100644
--- a/tests/rustdoc-ui/issues/issue-105334.stderr
+++ b/tests/rustdoc-ui/issues/issue-105334.stderr
@@ -4,6 +4,6 @@ error[E0747]: constant provided when a type was expected
LL | impl Vec< br##"*.."## > {}
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0747`.
diff --git a/tests/rustdoc-ui/issues/issue-105737.stderr b/tests/rustdoc-ui/issues/issue-105737.stderr
index 2dd9beb17..2c63c345e 100644
--- a/tests/rustdoc-ui/issues/issue-105737.stderr
+++ b/tests/rustdoc-ui/issues/issue-105737.stderr
@@ -7,6 +7,6 @@ LL | impl Vec<lol> {}
= help: `lol` is a function item, not a type
= help: function item types cannot be named directly
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0747`.
diff --git a/tests/rustdoc-ui/issues/issue-106213.stderr b/tests/rustdoc-ui/issues/issue-106213.stderr
index 0a4ff69ba..fa79fe2e7 100644
--- a/tests/rustdoc-ui/issues/issue-106213.stderr
+++ b/tests/rustdoc-ui/issues/issue-106213.stderr
@@ -4,6 +4,6 @@ error[E0224]: at least one trait is required for an object type
LL | fn use_avx() -> dyn {
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0224`.
diff --git a/tests/rustdoc-ui/issues/issue-106226.stderr b/tests/rustdoc-ui/issues/issue-106226.stderr
index 1c973dab6..4d063b461 100644
--- a/tests/rustdoc-ui/issues/issue-106226.stderr
+++ b/tests/rustdoc-ui/issues/issue-106226.stderr
@@ -4,6 +4,6 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
LL | type F = [_; ()];
| ^ not allowed in type signatures
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/rustdoc-ui/issues/issue-61592-2.stderr b/tests/rustdoc-ui/issues/issue-61592-2.stderr
index 1b7f8bb55..de376ad80 100644
--- a/tests/rustdoc-ui/issues/issue-61592-2.stderr
+++ b/tests/rustdoc-ui/issues/issue-61592-2.stderr
@@ -7,6 +7,6 @@ LL | #[doc = "baz"]
LL | pub use foo::Foo as _;
| ---------------------- anonymous import
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0780`.
diff --git a/tests/rustdoc-ui/issues/issue-61592.stderr b/tests/rustdoc-ui/issues/issue-61592.stderr
index 9c9c9106f..0b96b6593 100644
--- a/tests/rustdoc-ui/issues/issue-61592.stderr
+++ b/tests/rustdoc-ui/issues/issue-61592.stderr
@@ -6,6 +6,6 @@ LL | #[doc(inline)]
LL | pub use foo::Foo as _;
| ---------------------- anonymous import
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0780`.
diff --git a/tests/rustdoc-ui/issues/issue-61732.stderr b/tests/rustdoc-ui/issues/issue-61732.stderr
index d16ec6a85..f351f52d1 100644
--- a/tests/rustdoc-ui/issues/issue-61732.stderr
+++ b/tests/rustdoc-ui/issues/issue-61732.stderr
@@ -6,6 +6,6 @@ LL | pub(in crate::r#mod) fn main() {}
|
= help: consider adding `extern crate r#mod` to use the `r#mod` crate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/rustdoc-ui/issues/issue-79465.stderr b/tests/rustdoc-ui/issues/issue-79465.stderr
index d187a2e66..e7b433268 100644
--- a/tests/rustdoc-ui/issues/issue-79465.stderr
+++ b/tests/rustdoc-ui/issues/issue-79465.stderr
@@ -4,6 +4,6 @@ error[E0220]: associated type `A` not found for `T`
LL | pub fn f1<T>(x: T::A) {}
| ^ associated type `A` not found
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0220`.
diff --git a/tests/rustdoc-ui/issues/issue-79467.stderr b/tests/rustdoc-ui/issues/issue-79467.stderr
index 561513a43..cb030a311 100644
--- a/tests/rustdoc-ui/issues/issue-79467.stderr
+++ b/tests/rustdoc-ui/issues/issue-79467.stderr
@@ -4,6 +4,6 @@ error[E0224]: at least one trait is required for an object type
LL | dyn 'static: 'static + Copy,
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0224`.
diff --git a/tests/rustdoc-ui/issues/issue-79494.stderr b/tests/rustdoc-ui/issues/issue-79494.stderr
index 7ed5ed382..abcd69d3a 100644
--- a/tests/rustdoc-ui/issues/issue-79494.stderr
+++ b/tests/rustdoc-ui/issues/issue-79494.stderr
@@ -7,6 +7,6 @@ LL | const ZST: &[u8] = unsafe { std::mem::transmute(1usize) };
= note: source type: `usize` (64 bits)
= note: target type: `&[u8]` (128 bits)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0512`.
diff --git a/tests/rustdoc-ui/issues/issue-81662-shortness.stdout b/tests/rustdoc-ui/issues/issue-81662-shortness.stdout
index 748113be3..6313dde32 100644
--- a/tests/rustdoc-ui/issues/issue-81662-shortness.stdout
+++ b/tests/rustdoc-ui/issues/issue-81662-shortness.stdout
@@ -6,7 +6,7 @@ failures:
---- $DIR/issue-81662-shortness.rs - foo (line 6) stdout ----
$DIR/issue-81662-shortness.rs:7:1: error[E0425]: cannot find function `foo` in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
Couldn't compile the test.
failures:
diff --git a/tests/rustdoc-ui/issues/issue-96287.stderr b/tests/rustdoc-ui/issues/issue-96287.stderr
index c4809a311..62d81534a 100644
--- a/tests/rustdoc-ui/issues/issue-96287.stderr
+++ b/tests/rustdoc-ui/issues/issue-96287.stderr
@@ -9,6 +9,6 @@ help: consider restricting type parameter `V`
LL | pub type Foo<V: TraitWithAssoc> = impl Trait<V::Assoc>;
| ++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0220`.
diff --git a/tests/rustdoc-ui/lints/check-attr.rs b/tests/rustdoc-ui/lints/check-attr.rs
index 0b3f7bedd..3c06e6c07 100644
--- a/tests/rustdoc-ui/lints/check-attr.rs
+++ b/tests/rustdoc-ui/lints/check-attr.rs
@@ -39,3 +39,20 @@ pub fn foobar() {}
/// boo
/// ```
pub fn b() {}
+
+/// b
+//~^ ERROR
+///
+/// ```rust2018
+/// boo
+/// ```
+pub fn c() {}
+
+/// b
+//~^ ERROR
+//~| ERROR
+///
+/// ```rust2018 shouldpanic
+/// boo
+/// ```
+pub fn d() {}
diff --git a/tests/rustdoc-ui/lints/check-attr.stderr b/tests/rustdoc-ui/lints/check-attr.stderr
index f66e63ab7..d640125ab 100644
--- a/tests/rustdoc-ui/lints/check-attr.stderr
+++ b/tests/rustdoc-ui/lints/check-attr.stderr
@@ -1,4 +1,4 @@
-error: unknown attribute `compile-fail`. Did you mean `compile_fail`?
+error: unknown attribute `compile-fail`
--> $DIR/check-attr.rs:3:1
|
LL | / /// foo
@@ -10,6 +10,7 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `compile_fail`
= help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully
note: the lint level is defined here
--> $DIR/check-attr.rs:1:9
@@ -17,7 +18,7 @@ note: the lint level is defined here
LL | #![deny(rustdoc::invalid_codeblock_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: unknown attribute `compilefail`. Did you mean `compile_fail`?
+error: unknown attribute `compilefail`
--> $DIR/check-attr.rs:3:1
|
LL | / /// foo
@@ -29,9 +30,10 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `compile_fail`
= help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully
-error: unknown attribute `comPile_fail`. Did you mean `compile_fail`?
+error: unknown attribute `comPile_fail`
--> $DIR/check-attr.rs:3:1
|
LL | / /// foo
@@ -43,9 +45,10 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `compile_fail`
= help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully
-error: unknown attribute `should-panic`. Did you mean `should_panic`?
+error: unknown attribute `should-panic`
--> $DIR/check-attr.rs:13:1
|
LL | / /// bar
@@ -57,9 +60,10 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `should_panic`
= help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running
-error: unknown attribute `shouldpanic`. Did you mean `should_panic`?
+error: unknown attribute `shouldpanic`
--> $DIR/check-attr.rs:13:1
|
LL | / /// bar
@@ -71,9 +75,10 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `should_panic`
= help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running
-error: unknown attribute `sHould_panic`. Did you mean `should_panic`?
+error: unknown attribute `sHould_panic`
--> $DIR/check-attr.rs:13:1
|
LL | / /// bar
@@ -85,9 +90,10 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `should_panic`
= help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running
-error: unknown attribute `no-run`. Did you mean `no_run`?
+error: unknown attribute `no-run`
--> $DIR/check-attr.rs:23:1
|
LL | / /// foobar
@@ -99,9 +105,10 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `no_run`
= help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want)
-error: unknown attribute `norun`. Did you mean `no_run`?
+error: unknown attribute `norun`
--> $DIR/check-attr.rs:23:1
|
LL | / /// foobar
@@ -113,9 +120,10 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `no_run`
= help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want)
-error: unknown attribute `no_Run`. Did you mean `no_run`?
+error: unknown attribute `no_Run`
--> $DIR/check-attr.rs:23:1
|
LL | / /// foobar
@@ -127,9 +135,10 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `no_run`
= help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want)
-error: unknown attribute `test-harness`. Did you mean `test_harness`?
+error: unknown attribute `test-harness`
--> $DIR/check-attr.rs:33:1
|
LL | / /// b
@@ -141,9 +150,10 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `test_harness`
= help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function
-error: unknown attribute `testharness`. Did you mean `test_harness`?
+error: unknown attribute `testharness`
--> $DIR/check-attr.rs:33:1
|
LL | / /// b
@@ -155,9 +165,10 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `test_harness`
= help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function
-error: unknown attribute `teSt_harness`. Did you mean `test_harness`?
+error: unknown attribute `teSt_harness`
--> $DIR/check-attr.rs:33:1
|
LL | / /// b
@@ -169,7 +180,50 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `test_harness`
= help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function
-error: aborting due to 12 previous errors
+error: unknown attribute `rust2018`
+ --> $DIR/check-attr.rs:43:1
+ |
+LL | / /// b
+LL | |
+LL | | ///
+LL | | /// ```rust2018
+LL | | /// boo
+LL | | /// ```
+ | |_______^
+ |
+ = help: there is an attribute with a similar name: `edition2018`
+
+error: unknown attribute `rust2018`
+ --> $DIR/check-attr.rs:51:1
+ |
+LL | / /// b
+LL | |
+LL | |
+LL | | ///
+LL | | /// ```rust2018 shouldpanic
+LL | | /// boo
+LL | | /// ```
+ | |_______^
+ |
+ = help: there is an attribute with a similar name: `edition2018`
+
+error: unknown attribute `shouldpanic`
+ --> $DIR/check-attr.rs:51:1
+ |
+LL | / /// b
+LL | |
+LL | |
+LL | | ///
+LL | | /// ```rust2018 shouldpanic
+LL | | /// boo
+LL | | /// ```
+ | |_______^
+ |
+ = help: there is an attribute with a similar name: `should_panic`
+ = help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running
+
+error: aborting due to 15 previous errors
diff --git a/tests/rustdoc-ui/lints/check-fail.stderr b/tests/rustdoc-ui/lints/check-fail.stderr
index f05e457af..99b01bac5 100644
--- a/tests/rustdoc-ui/lints/check-fail.stderr
+++ b/tests/rustdoc-ui/lints/check-fail.stderr
@@ -22,7 +22,7 @@ note: the lint level is defined here
LL | #![deny(rustdoc::missing_doc_code_examples)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: unknown attribute `testharness`. Did you mean `test_harness`?
+error: unknown attribute `testharness`
--> $DIR/check-fail.rs:8:1
|
LL | / //! ```rust,testharness
@@ -31,6 +31,7 @@ LL | | //! let x = 12;
LL | | //! ```
| |_______^
|
+ = help: there is an attribute with a similar name: `test_harness`
= help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function
note: the lint level is defined here
--> $DIR/check-fail.rs:6:9
@@ -39,7 +40,7 @@ LL | #![deny(rustdoc::all)]
| ^^^^^^^^^^^^
= note: `#[deny(rustdoc::invalid_codeblock_attributes)]` implied by `#[deny(rustdoc::all)]`
-error: unknown attribute `testharness`. Did you mean `test_harness`?
+error: unknown attribute `testharness`
--> $DIR/check-fail.rs:17:1
|
LL | / /// hello
@@ -50,6 +51,7 @@ LL | | /// let x = 12;
LL | | /// ```
| |_______^
|
+ = help: there is an attribute with a similar name: `test_harness`
= help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function
error: aborting due to 4 previous errors
diff --git a/tests/rustdoc-ui/lints/deny-missing-docs-macro.stderr b/tests/rustdoc-ui/lints/deny-missing-docs-macro.stderr
index 0867b0818..24597f09d 100644
--- a/tests/rustdoc-ui/lints/deny-missing-docs-macro.stderr
+++ b/tests/rustdoc-ui/lints/deny-missing-docs-macro.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(missing_docs)]
| ^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/lints/doc-spotlight.stderr b/tests/rustdoc-ui/lints/doc-spotlight.stderr
index 58612327f..5d93b4132 100644
--- a/tests/rustdoc-ui/lints/doc-spotlight.stderr
+++ b/tests/rustdoc-ui/lints/doc-spotlight.stderr
@@ -15,5 +15,5 @@ LL | #![deny(warnings)]
| ^^^^^^^^
= note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.stderr b/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.stderr
index b8a08e943..f18824006 100644
--- a/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.stderr
+++ b/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.stderr
@@ -13,5 +13,5 @@ note: the lint level is defined here
LL | #![deny(unknown_lints)]
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/lints/no-crate-level-doc-lint.stderr b/tests/rustdoc-ui/lints/no-crate-level-doc-lint.stderr
index fb3a5e415..3a748335e 100644
--- a/tests/rustdoc-ui/lints/no-crate-level-doc-lint.stderr
+++ b/tests/rustdoc-ui/lints/no-crate-level-doc-lint.stderr
@@ -8,5 +8,5 @@ note: the lint level is defined here
LL | #![deny(rustdoc::missing_crate_level_docs)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/mismatched_arg_count.stderr b/tests/rustdoc-ui/mismatched_arg_count.stderr
index 7e88ce954..857bbda2e 100644
--- a/tests/rustdoc-ui/mismatched_arg_count.stderr
+++ b/tests/rustdoc-ui/mismatched_arg_count.stderr
@@ -12,6 +12,6 @@ note: type alias defined here, with 1 lifetime parameter: `'a`
LL | type Alias<'a, T> = <T as Trait<'a>>::Assoc;
| ^^^^^ --
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/rustdoc/issue-46271.rs b/tests/rustdoc-ui/nested-extern-crate-46271.rs
index b38ef20c5..d2ac38f3e 100644
--- a/tests/rustdoc/issue-46271.rs
+++ b/tests/rustdoc-ui/nested-extern-crate-46271.rs
@@ -1,5 +1,8 @@
+// check-pass
// hopefully this doesn't cause an ICE
+// https://github.com/rust-lang/rust/issues/46271
+
pub fn foo() {
extern crate std;
}
diff --git a/tests/rustdoc/issue-47639.rs b/tests/rustdoc-ui/nested-macro-rules-47639.rs
index 4b3456b86..210b1e79c 100644
--- a/tests/rustdoc/issue-47639.rs
+++ b/tests/rustdoc-ui/nested-macro-rules-47639.rs
@@ -1,4 +1,7 @@
+// check-pass
// This should not ICE
+
+// https://github.com/rust-lang/rust/issues/47639
pub fn test() {
macro_rules! foo {
() => ()
diff --git a/tests/rustdoc-ui/not-wf-ambiguous-normalization.stderr b/tests/rustdoc-ui/not-wf-ambiguous-normalization.stderr
index 34b20a0b3..01034018e 100644
--- a/tests/rustdoc-ui/not-wf-ambiguous-normalization.stderr
+++ b/tests/rustdoc-ui/not-wf-ambiguous-normalization.stderr
@@ -4,6 +4,6 @@ error[E0282]: type annotations needed
LL | impl<T> Allocator for DefaultAllocator {
| ^^^^^^^^^^^^^^^^ cannot infer type for type parameter `T`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/rustdoc-ui/proc_macro_bug.stderr b/tests/rustdoc-ui/proc_macro_bug.stderr
index 5b048097c..77bdf2019 100644
--- a/tests/rustdoc-ui/proc_macro_bug.stderr
+++ b/tests/rustdoc-ui/proc_macro_bug.stderr
@@ -4,5 +4,5 @@ error: the `#[proc_macro_derive]` attribute is only usable with crates of the `p
LL | #[proc_macro_derive(DeriveA)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/rustc-check-passes.stderr b/tests/rustdoc-ui/rustc-check-passes.stderr
index 83f4e87c6..58d61c021 100644
--- a/tests/rustdoc-ui/rustc-check-passes.stderr
+++ b/tests/rustdoc-ui/rustc-check-passes.stderr
@@ -4,6 +4,6 @@ error[E0636]: the feature `rustdoc_internals` has already been declared
LL | #![feature(rustdoc_internals)]
| ^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0636`.
diff --git a/tests/rustdoc/issue-40936.rs b/tests/rustdoc-ui/super-glob-40936.rs
index 4d2e4c17b..a06e977b1 100644
--- a/tests/rustdoc/issue-40936.rs
+++ b/tests/rustdoc-ui/super-glob-40936.rs
@@ -1,6 +1,9 @@
// aux-build:issue-40936.rs
+// check-pass
// build-aux-docs
+// https://github.com/rust-lang/rust/issues/40936
+
#![crate_name = "foo"]
extern crate issue_40936;
diff --git a/tests/rustdoc-ui/track-diagnostics.stderr b/tests/rustdoc-ui/track-diagnostics.stderr
index 39418d359..131adfd58 100644
--- a/tests/rustdoc-ui/track-diagnostics.stderr
+++ b/tests/rustdoc-ui/track-diagnostics.stderr
@@ -5,6 +5,6 @@ LL | const S: A = B;
| ^ expected `A`, found `B`
-Ztrack-diagnostics: created at compiler/rustc_infer/src/infer/error_reporting/mod.rs:LL:CC
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/rustdoc-ui/tuple-variadic-check.stderr b/tests/rustdoc-ui/tuple-variadic-check.stderr
index d127fb858..51fb87214 100644
--- a/tests/rustdoc-ui/tuple-variadic-check.stderr
+++ b/tests/rustdoc-ui/tuple-variadic-check.stderr
@@ -4,5 +4,5 @@ error: `#[doc(fake_variadic)]` must be used on the first of a set of tuple or fn
LL | #[doc(fake_variadic)]
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/rustdoc-ui/unescaped_backticks.rs b/tests/rustdoc-ui/unescaped_backticks.rs
index e960e9f59..e813fba47 100644
--- a/tests/rustdoc-ui/unescaped_backticks.rs
+++ b/tests/rustdoc-ui/unescaped_backticks.rs
@@ -190,7 +190,7 @@ pub fn complicated_markdown() {}
pub mod mir {}
pub mod rustc {
- /// Constructs a `TyKind::Error` type and registers a `delay_span_bug` with the given `msg to
+ /// Constructs a `TyKind::Error` type and registers a `span_delayed_bug` with the given `msg to
//~^ ERROR unescaped backtick
/// ensure it gets used.
pub fn ty_error_with_message() {}
diff --git a/tests/rustdoc-ui/unescaped_backticks.stderr b/tests/rustdoc-ui/unescaped_backticks.stderr
index 2b4e491b1..bd21dcb6e 100644
--- a/tests/rustdoc-ui/unescaped_backticks.stderr
+++ b/tests/rustdoc-ui/unescaped_backticks.stderr
@@ -64,19 +64,19 @@ LL | /// `cfg=... and not `#[cfg_attr]\`
| +
error: unescaped backtick
- --> $DIR/unescaped_backticks.rs:193:91
+ --> $DIR/unescaped_backticks.rs:193:93
|
-LL | /// Constructs a `TyKind::Error` type and registers a `delay_span_bug` with the given `msg to
- | ^
+LL | /// Constructs a `TyKind::Error` type and registers a `span_delayed_bug` with the given `msg to
+ | ^
|
help: the closing backtick of an inline code may be missing
|
-LL | /// Constructs a `TyKind::Error` type and registers a `delay_span_bug` with the given `msg` to
- | +
+LL | /// Constructs a `TyKind::Error` type and registers a `span_delayed_bug` with the given `msg` to
+ | +
help: if you meant to use a literal backtick, escape it
|
-LL | /// Constructs a `TyKind::Error` type and registers a `delay_span_bug` with the given \`msg to
- | +
+LL | /// Constructs a `TyKind::Error` type and registers a `span_delayed_bug` with the given \`msg to
+ | +
error: unescaped backtick
--> $DIR/unescaped_backticks.rs:202:34
diff --git a/tests/rustdoc/async-fn-opaque-item.rs b/tests/rustdoc/async-fn-opaque-item.rs
index a73e84f3f..2c030824f 100644
--- a/tests/rustdoc/async-fn-opaque-item.rs
+++ b/tests/rustdoc/async-fn-opaque-item.rs
@@ -9,7 +9,7 @@
// Checking there is only a "Functions" header and no "Opaque types".
// @has async_fn_opaque_item/index.html
-// @count - '//*[@class="small-section-header"]' 1
-// @has - '//*[@class="small-section-header"]' 'Functions'
+// @count - '//*[@class="section-header"]' 1
+// @has - '//*[@class="section-header"]' 'Functions'
pub async fn test() {}
diff --git a/tests/rustdoc/compiler-derive-proc-macro.rs b/tests/rustdoc/compiler-derive-proc-macro.rs
index 489ec924c..1c3867ced 100644
--- a/tests/rustdoc/compiler-derive-proc-macro.rs
+++ b/tests/rustdoc/compiler-derive-proc-macro.rs
@@ -5,9 +5,9 @@
// @has 'foo/index.html'
// Each compiler builtin proc-macro has a trait equivalent so we should have
// a trait section as well.
-// @count - '//*[@id="main-content"]//*[@class="small-section-header"]' 2
-// @has - '//*[@id="main-content"]//*[@class="small-section-header"]' 'Traits'
-// @has - '//*[@id="main-content"]//*[@class="small-section-header"]' 'Derive Macros'
+// @count - '//*[@id="main-content"]//*[@class="section-header"]' 2
+// @has - '//*[@id="main-content"]//*[@class="section-header"]' 'Traits'
+// @has - '//*[@id="main-content"]//*[@class="section-header"]' 'Derive Macros'
// Now checking the correct file is generated as well.
// @has 'foo/derive.Clone.html'
diff --git a/tests/rustdoc/deprecated-future-staged-api.rs b/tests/rustdoc/deprecated-future-staged-api.rs
index 09120b8d4..64dfd8930 100644
--- a/tests/rustdoc/deprecated-future-staged-api.rs
+++ b/tests/rustdoc/deprecated-future-staged-api.rs
@@ -12,7 +12,7 @@ pub struct S1;
// @has deprecated_future_staged_api/index.html '//*[@class="stab deprecated"]' \
// 'Deprecation planned'
// @has deprecated_future_staged_api/struct.S2.html '//*[@class="stab deprecated"]' \
-// 'Deprecating in a future Rust version: literally never'
+// 'Deprecating in a future version: literally never'
#[deprecated(since = "TBD", note = "literally never")]
#[stable(feature = "deprecated_future_staged_api", since = "1.0.0")]
pub struct S2;
diff --git a/tests/rustdoc/doctest/auxiliary/empty.rs b/tests/rustdoc/doctest/auxiliary/empty.rs
new file mode 100644
index 000000000..d11c69f81
--- /dev/null
+++ b/tests/rustdoc/doctest/auxiliary/empty.rs
@@ -0,0 +1 @@
+// intentionally empty
diff --git a/tests/rustdoc/doctest-cfg-feature-30252.rs b/tests/rustdoc/doctest/doctest-cfg-feature-30252.rs
index ceb8076fe..ceb8076fe 100644
--- a/tests/rustdoc/doctest-cfg-feature-30252.rs
+++ b/tests/rustdoc/doctest/doctest-cfg-feature-30252.rs
diff --git a/tests/rustdoc/issue-38129.rs b/tests/rustdoc/doctest/doctest-crate-attributes-38129.rs
index 156d50fa5..156d50fa5 100644
--- a/tests/rustdoc/issue-38129.rs
+++ b/tests/rustdoc/doctest/doctest-crate-attributes-38129.rs
diff --git a/tests/rustdoc/doctest-hide-empty-line-23106.rs b/tests/rustdoc/doctest/doctest-hide-empty-line-23106.rs
index 8e1e2cf09..8e1e2cf09 100644
--- a/tests/rustdoc/doctest-hide-empty-line-23106.rs
+++ b/tests/rustdoc/doctest/doctest-hide-empty-line-23106.rs
diff --git a/tests/rustdoc/doctest-ignore-32556.rs b/tests/rustdoc/doctest/doctest-ignore-32556.rs
index 99da9358b..99da9358b 100644
--- a/tests/rustdoc/doctest-ignore-32556.rs
+++ b/tests/rustdoc/doctest/doctest-ignore-32556.rs
diff --git a/tests/rustdoc/issue-43153.rs b/tests/rustdoc/doctest/doctest-include-43153.rs
index 0fe680f10..ec21a68c4 100644
--- a/tests/rustdoc/issue-43153.rs
+++ b/tests/rustdoc/doctest/doctest-include-43153.rs
@@ -1,3 +1,5 @@
+// https://github.com/rust-lang/rust/issues/43153
+
// Test that `include!` in a doc test searches relative to the directory in
// which the test is declared.
diff --git a/tests/rustdoc/issue-38219.rs b/tests/rustdoc/doctest/doctest-macro-38219.rs
index fa57c58c7..6c81df110 100644
--- a/tests/rustdoc/issue-38219.rs
+++ b/tests/rustdoc/doctest/doctest-macro-38219.rs
@@ -1,3 +1,5 @@
+// https://github.com/rust-lang/rust/issues/38219
+
// compile-flags:--test
// should-fail
diff --git a/tests/rustdoc/doctest-manual-crate-name.rs b/tests/rustdoc/doctest/doctest-manual-crate-name.rs
index 3a5e3734e..3a5e3734e 100644
--- a/tests/rustdoc/doctest-manual-crate-name.rs
+++ b/tests/rustdoc/doctest/doctest-manual-crate-name.rs
diff --git a/tests/rustdoc/doctest-markdown-inline-parse-23744.rs b/tests/rustdoc/doctest/doctest-markdown-inline-parse-23744.rs
index 128e2daba..128e2daba 100644
--- a/tests/rustdoc/doctest-markdown-inline-parse-23744.rs
+++ b/tests/rustdoc/doctest/doctest-markdown-inline-parse-23744.rs
diff --git a/tests/rustdoc/issue-48377.rs b/tests/rustdoc/doctest/doctest-markdown-trailing-docblock-48377.rs
index c32bcf380..d481dc0dd 100644
--- a/tests/rustdoc/issue-48377.rs
+++ b/tests/rustdoc/doctest/doctest-markdown-trailing-docblock-48377.rs
@@ -1,5 +1,7 @@
// compile-flags:--test
+// https://github.com/rust-lang/rust/issues/48377
+
//! This is a doc comment
//!
//! ```rust
diff --git a/tests/rustdoc/doctest-multi-line-string-literal-25944.rs b/tests/rustdoc/doctest/doctest-multi-line-string-literal-25944.rs
index eec796e4f..eec796e4f 100644
--- a/tests/rustdoc/doctest-multi-line-string-literal-25944.rs
+++ b/tests/rustdoc/doctest/doctest-multi-line-string-literal-25944.rs
diff --git a/tests/rustdoc/enum-variant-fields-heading.rs b/tests/rustdoc/enum-variant-fields-heading.rs
new file mode 100644
index 000000000..8a7c99a87
--- /dev/null
+++ b/tests/rustdoc/enum-variant-fields-heading.rs
@@ -0,0 +1,18 @@
+// This is a regression test for <https://github.com/rust-lang/rust/issues/118195>.
+// It ensures that the "Fields" heading is not generated if no field is displayed.
+
+#![crate_name = "foo"]
+
+// @has 'foo/enum.Foo.html'
+// @has - '//*[@id="variant.A"]' 'A'
+// @count - '//*[@id="variant.A.fields"]' 0
+// @has - '//*[@id="variant.B"]' 'B'
+// @count - '//*[@id="variant.B.fields"]' 0
+// @snapshot variants - '//*[@id="main-content"]/*[@class="variants"]'
+
+pub enum Foo {
+ /// A variant with no fields
+ A {},
+ /// A variant with hidden fields
+ B { #[doc(hidden)] a: u8 },
+}
diff --git a/tests/rustdoc/enum-variant-fields-heading.variants.html b/tests/rustdoc/enum-variant-fields-heading.variants.html
new file mode 100644
index 000000000..bcb36f7cf
--- /dev/null
+++ b/tests/rustdoc/enum-variant-fields-heading.variants.html
@@ -0,0 +1,3 @@
+<div class="variants"><section id="variant.A" class="variant"><a href="#variant.A" class="anchor">&#167;</a><h3 class="code-header">A</h3></section><div class="docblock"><p>A variant with no fields</p>
+</div><section id="variant.B" class="variant"><a href="#variant.B" class="anchor">&#167;</a><h3 class="code-header">B</h3></section><div class="docblock"><p>A variant with hidden fields</p>
+</div></div> \ No newline at end of file
diff --git a/tests/rustdoc/issue-46767.rs b/tests/rustdoc/enum-variant-private-46767.rs
index ef6ed104b..6386aa75a 100644
--- a/tests/rustdoc/issue-46767.rs
+++ b/tests/rustdoc/enum-variant-private-46767.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/46767
#![crate_name = "foo"]
mod private {
diff --git a/tests/rustdoc/issue-43701.rs b/tests/rustdoc/foreign-implementors-js-43701.rs
index de772881e..3b16ad204 100644
--- a/tests/rustdoc/issue-43701.rs
+++ b/tests/rustdoc/foreign-implementors-js-43701.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/43701
#![crate_name = "foo"]
pub use std::vec::Vec;
diff --git a/tests/rustdoc/inline-private-with-intermediate-doc-hidden.rs b/tests/rustdoc/inline-private-with-intermediate-doc-hidden.rs
index e382940a4..ae830c03e 100644
--- a/tests/rustdoc/inline-private-with-intermediate-doc-hidden.rs
+++ b/tests/rustdoc/inline-private-with-intermediate-doc-hidden.rs
@@ -6,8 +6,8 @@
// @has 'foo/index.html'
// There should only be one struct displayed.
-// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 1
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Structs'
+// @count - '//*[@id="main-content"]/*[@class="section-header"]' 1
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Structs'
// @has - '//*[@id="main-content"]//a[@href="struct.Reexport.html"]' 'Reexport'
// @has - '//*[@id="main-content"]//*[@class="desc docblock-short"]' 'Visible. Original.'
diff --git a/tests/rustdoc/issue-34473.rs b/tests/rustdoc/inline-rename-34473.rs
index 37da3dd19..7bc92cca1 100644
--- a/tests/rustdoc/issue-34473.rs
+++ b/tests/rustdoc/inline-rename-34473.rs
@@ -1,5 +1,7 @@
#![crate_name = "foo"]
+// https://github.com/rust-lang/rust/issues/34473
+
mod second {
pub struct SomeTypeWithLongName;
}
diff --git a/tests/rustdoc/issue-46766.rs b/tests/rustdoc/inline_local/enum-variant-reexport-46766.rs
index 36ab73956..ea6b7bac4 100644
--- a/tests/rustdoc/issue-46766.rs
+++ b/tests/rustdoc/inline_local/enum-variant-reexport-46766.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/46766
#![crate_name = "foo"]
pub enum Enum{Variant}
diff --git a/tests/rustdoc/issue-105735-overlapping-reexport-2.rs b/tests/rustdoc/issue-105735-overlapping-reexport-2.rs
index 5d2c553d8..2905e7d44 100644
--- a/tests/rustdoc/issue-105735-overlapping-reexport-2.rs
+++ b/tests/rustdoc/issue-105735-overlapping-reexport-2.rs
@@ -7,9 +7,9 @@
// @has - '//*[@class="item-name"]/a[@class="type"]' 'AtomicU8'
// @has - '//*[@class="item-name"]/a[@class="constant"]' 'AtomicU8'
// We also ensure we don't have another item displayed.
-// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 2
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Type Aliases'
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Constants'
+// @count - '//*[@id="main-content"]/*[@class="section-header"]' 2
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Type Aliases'
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Constants'
mod other {
pub type AtomicU8 = ();
diff --git a/tests/rustdoc/issue-105735-overlapping-reexport.rs b/tests/rustdoc/issue-105735-overlapping-reexport.rs
index 50f2450b9..7fa7df770 100644
--- a/tests/rustdoc/issue-105735-overlapping-reexport.rs
+++ b/tests/rustdoc/issue-105735-overlapping-reexport.rs
@@ -7,9 +7,9 @@
// @has - '//*[@class="item-name"]/a[@class="struct"]' 'AtomicU8'
// @has - '//*[@class="item-name"]/a[@class="constant"]' 'AtomicU8'
// We also ensure we don't have another item displayed.
-// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 2
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Structs'
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Constants'
+// @count - '//*[@id="main-content"]/*[@class="section-header"]' 2
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Structs'
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Constants'
mod thing {
pub use core::sync::atomic::AtomicU8;
diff --git a/tests/rustdoc/issue-109258-missing-private-inlining.rs b/tests/rustdoc/issue-109258-missing-private-inlining.rs
index 96f606368..12c5556f1 100644
--- a/tests/rustdoc/issue-109258-missing-private-inlining.rs
+++ b/tests/rustdoc/issue-109258-missing-private-inlining.rs
@@ -4,9 +4,9 @@
// @has 'foo/index.html'
// We should only have a "Re-exports" and a "Modules" headers.
-// @count - '//*[@id="main-content"]/h2[@class="small-section-header"]' 2
-// @has - '//*[@id="main-content"]/h2[@class="small-section-header"]' 'Re-exports'
-// @has - '//*[@id="main-content"]/h2[@class="small-section-header"]' 'Modules'
+// @count - '//*[@id="main-content"]/h2[@class="section-header"]' 2
+// @has - '//*[@id="main-content"]/h2[@class="section-header"]' 'Re-exports'
+// @has - '//*[@id="main-content"]/h2[@class="section-header"]' 'Modules'
// @has - '//*[@id="reexport.Foo"]' 'pub use crate::issue_109258::Foo;'
// @has - '//*[@id="reexport.Foo"]//a[@href="issue_109258/struct.Foo.html"]' 'Foo'
@@ -15,8 +15,8 @@ pub use crate::issue_109258::Foo;
// @has 'foo/issue_109258/index.html'
// We should only have a "Structs" header.
-// @count - '//*[@id="main-content"]/h2[@class="small-section-header"]' 1
-// @has - '//*[@id="main-content"]/h2[@class="small-section-header"]' 'Structs'
+// @count - '//*[@id="main-content"]/h2[@class="section-header"]' 1
+// @has - '//*[@id="main-content"]/h2[@class="section-header"]' 'Structs'
// @has - '//*[@id="main-content"]//a[@href="struct.Foo.html"]' 'Foo'
// @has 'foo/issue_109258/struct.Foo.html'
pub mod issue_109258 {
diff --git a/tests/rustdoc/issue-109449-doc-hidden-reexports.rs b/tests/rustdoc/issue-109449-doc-hidden-reexports.rs
index 3b836a219..9fb2f7c7c 100644
--- a/tests/rustdoc/issue-109449-doc-hidden-reexports.rs
+++ b/tests/rustdoc/issue-109449-doc-hidden-reexports.rs
@@ -66,8 +66,8 @@ pub mod single_reexport_inherit_hidden {
pub mod single_reexport_no_inline {
// First we ensure that we only have re-exports and no inlined items.
// @has 'foo/single_reexport_no_inline/index.html'
- // @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 1
- // @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Re-exports'
+ // @count - '//*[@id="main-content"]/*[@class="section-header"]' 1
+ // @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Re-exports'
// Now we check that we don't have links to the items, just `pub use`.
// @has - '//*[@id="main-content"]//*' 'pub use crate::private_module::Public as XFoo;'
@@ -101,10 +101,10 @@ pub mod glob_reexport {
// With glob re-exports, we don't inline `#[doc(hidden)]` items so only `module` items
// should be inlined.
// @has 'foo/glob_reexport/index.html'
- // @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 3
- // @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Re-exports'
- // @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Structs'
- // @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Type Aliases'
+ // @count - '//*[@id="main-content"]/*[@class="section-header"]' 3
+ // @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Re-exports'
+ // @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Structs'
+ // @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Type Aliases'
// Now we check we have 1 re-export and 2 inlined items.
// If not item from a glob re-export is visible, we don't show the re-export.
diff --git a/tests/rustdoc/issue-110422-inner-private.rs b/tests/rustdoc/issue-110422-inner-private.rs
index ee8ed5cc6..43dc929ab 100644
--- a/tests/rustdoc/issue-110422-inner-private.rs
+++ b/tests/rustdoc/issue-110422-inner-private.rs
@@ -8,11 +8,11 @@
// @has 'foo/index.html'
// Checking there is no "trait" entry.
-// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 4
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Structs'
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Constants'
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Functions'
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Macros'
+// @count - '//*[@id="main-content"]/*[@class="section-header"]' 4
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Structs'
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Constants'
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Functions'
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Macros'
// @has - '//a[@href="fn.foo.html"]' 'foo'
fn foo() {
@@ -50,11 +50,11 @@ const BAR: i32 = {
// @has 'foo/struct.Bar.html'
// @has - '//*[@id="method.foo"]/*[@class="code-header"]' 'pub(crate) fn foo()'
- // @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 3
+ // @count - '//*[@id="main-content"]/*[@class="section-header"]' 3
// We now check that the `Foo` trait is not documented nor visible on `Bar` page.
- // @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Implementations'
- // @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Auto Trait Implementations'
- // @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Blanket Implementations'
+ // @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Implementations'
+ // @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Auto Trait Implementations'
+ // @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Blanket Implementations'
// @!has - '//*[@href="trait.Foo.html#method.babar"]/*[@class="code-header"]' 'fn babar()'
impl Bar {
fn foo() {}
diff --git a/tests/rustdoc/issue-118180-empty-tuple-struct.rs b/tests/rustdoc/issue-118180-empty-tuple-struct.rs
new file mode 100644
index 000000000..bc6ddbe5d
--- /dev/null
+++ b/tests/rustdoc/issue-118180-empty-tuple-struct.rs
@@ -0,0 +1,9 @@
+// @has issue_118180_empty_tuple_struct/enum.Enum.html
+pub enum Enum {
+ // @has - '//*[@id="variant.Empty"]//h3' 'Empty()'
+ Empty(),
+}
+
+// @has issue_118180_empty_tuple_struct/struct.Empty.html
+// @has - '//pre/code' 'Empty()'
+pub struct Empty();
diff --git a/tests/rustdoc/issue-43893.rs b/tests/rustdoc/issue-43893.rs
deleted file mode 100644
index 95d551934..000000000
--- a/tests/rustdoc/issue-43893.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// ignore-cross-compile
-
-#![crate_name = "foo"]
-
-pub trait SomeTrait {}
-pub struct SomeStruct;
-
-// @has foo/trait.SomeTrait.html '//a/@href' '../src/foo/issue-43893.rs.html#9'
-impl SomeTrait for usize {}
-
-// @has foo/trait.SomeTrait.html '//a/@href' '../src/foo/issue-43893.rs.html#12-14'
-impl SomeTrait for SomeStruct {
- // deliberately multi-line impl
-}
-
-pub trait AnotherTrait {}
-
-// @has foo/trait.AnotherTrait.html '//a/@href' '../src/foo/issue-43893.rs.html#19'
-impl<T> AnotherTrait for T {}
diff --git a/tests/rustdoc/issue-46976.rs b/tests/rustdoc/issue-46976.rs
deleted file mode 100644
index c59f8c72e..000000000
--- a/tests/rustdoc/issue-46976.rs
+++ /dev/null
@@ -1 +0,0 @@
-pub fn ice(f: impl Fn()) {}
diff --git a/tests/rustdoc/issue-60522-duplicated-glob-reexport.rs b/tests/rustdoc/issue-60522-duplicated-glob-reexport.rs
index 1429b5e47..50def2c3c 100644
--- a/tests/rustdoc/issue-60522-duplicated-glob-reexport.rs
+++ b/tests/rustdoc/issue-60522-duplicated-glob-reexport.rs
@@ -5,8 +5,8 @@
#![crate_name = "foo"]
// @has 'foo/index.html'
-// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 1
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Modules'
+// @count - '//*[@id="main-content"]/*[@class="section-header"]' 1
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Modules'
// @count - '//*[@id="main-content"]/*[@class="item-table"]//*[@class="mod"]' 2
// @has - '//*[@id="main-content"]//*[@class="mod"]' 'banana'
// @has - '//*[@id="main-content"]//*[@href="banana/index.html"]' 'banana'
diff --git a/tests/rustdoc/nested-items-issue-111415.rs b/tests/rustdoc/nested-items-issue-111415.rs
index 9b7688c33..c117569d9 100644
--- a/tests/rustdoc/nested-items-issue-111415.rs
+++ b/tests/rustdoc/nested-items-issue-111415.rs
@@ -5,10 +5,10 @@
// @has 'foo/index.html'
// Checking there are only three sections.
-// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 3
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Structs'
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Functions'
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Traits'
+// @count - '//*[@id="main-content"]/*[@class="section-header"]' 3
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Structs'
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Functions'
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Traits'
// Checking that there are only three items.
// @count - '//*[@id="main-content"]//*[@class="item-name"]' 3
// @has - '//*[@id="main-content"]//a[@href="struct.Bar.html"]' 'Bar'
diff --git a/tests/rustdoc/notable-trait/doc-notable_trait-slice.bare_fn_matches.html b/tests/rustdoc/notable-trait/doc-notable_trait-slice.bare_fn_matches.html
index 46be00a08..7d2a25891 100644
--- a/tests/rustdoc/notable-trait/doc-notable_trait-slice.bare_fn_matches.html
+++ b/tests/rustdoc/notable-trait/doc-notable_trait-slice.bare_fn_matches.html
@@ -1 +1 @@
-<script type="text/json" id="notable-traits-data">{"&amp;'static [SomeStruct]":"&lt;h3&gt;Notable traits for &lt;code&gt;&amp;amp;[&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait_slice::SomeStruct\"&gt;SomeStruct&lt;/a&gt;]&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=\"where fmt-newline\"&gt;impl &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait_slice::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &amp;amp;[&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait_slice::SomeStruct\"&gt;SomeStruct&lt;/a&gt;]&lt;/span&gt;"}</script> \ No newline at end of file
+<script type="text/json" id="notable-traits-data">{"&amp;'static [SomeStruct]":"&lt;h3&gt;Notable traits for &lt;code&gt;&amp;amp;[&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait_slice::SomeStruct\"&gt;SomeStruct&lt;/a&gt;]&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;div class=\"where\"&gt;impl &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait_slice::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &amp;amp;[&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait_slice::SomeStruct\"&gt;SomeStruct&lt;/a&gt;]&lt;/div&gt;"}</script> \ No newline at end of file
diff --git a/tests/rustdoc/notable-trait/doc-notable_trait.bare-fn.html b/tests/rustdoc/notable-trait/doc-notable_trait.bare-fn.html
index f592e3b37..9f71677cf 100644
--- a/tests/rustdoc/notable-trait/doc-notable_trait.bare-fn.html
+++ b/tests/rustdoc/notable-trait/doc-notable_trait.bare-fn.html
@@ -1 +1 @@
-<script type="text/json" id="notable-traits-data">{"SomeStruct":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=\"where fmt-newline\"&gt;impl &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/span&gt;"}</script> \ No newline at end of file
+<script type="text/json" id="notable-traits-data">{"SomeStruct":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;div class=\"where\"&gt;impl &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/div&gt;"}</script> \ No newline at end of file
diff --git a/tests/rustdoc/notable-trait/doc-notable_trait.some-struct-new.html b/tests/rustdoc/notable-trait/doc-notable_trait.some-struct-new.html
index e8f4f6000..38689c79f 100644
--- a/tests/rustdoc/notable-trait/doc-notable_trait.some-struct-new.html
+++ b/tests/rustdoc/notable-trait/doc-notable_trait.some-struct-new.html
@@ -1 +1 @@
-<script type="text/json" id="notable-traits-data">{"SomeStruct":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=\"where fmt-newline\"&gt;impl &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/span&gt;","Wrapper&lt;Self&gt;":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=\"where fmt-newline\"&gt;impl&amp;lt;T: &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt;&amp;gt; &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/span&gt;"}</script> \ No newline at end of file
+<script type="text/json" id="notable-traits-data">{"SomeStruct":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;div class=\"where\"&gt;impl &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/div&gt;","Wrapper&lt;Self&gt;":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;div class=\"where\"&gt;impl&amp;lt;T: &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt;&amp;gt; &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/div&gt;"}</script> \ No newline at end of file
diff --git a/tests/rustdoc/notable-trait/doc-notable_trait.wrap-me.html b/tests/rustdoc/notable-trait/doc-notable_trait.wrap-me.html
index e7909669b..c137be9e3 100644
--- a/tests/rustdoc/notable-trait/doc-notable_trait.wrap-me.html
+++ b/tests/rustdoc/notable-trait/doc-notable_trait.wrap-me.html
@@ -1 +1 @@
-<script type="text/json" id="notable-traits-data">{"Wrapper&lt;Self&gt;":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=\"where fmt-newline\"&gt;impl&amp;lt;T: &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt;&amp;gt; &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/span&gt;"}</script> \ No newline at end of file
+<script type="text/json" id="notable-traits-data">{"Wrapper&lt;Self&gt;":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;div class=\"where\"&gt;impl&amp;lt;T: &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt;&amp;gt; &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/div&gt;"}</script> \ No newline at end of file
diff --git a/tests/rustdoc/notable-trait/spotlight-from-dependency.odd.html b/tests/rustdoc/notable-trait/spotlight-from-dependency.odd.html
index 5f54b7522..cce8739df 100644
--- a/tests/rustdoc/notable-trait/spotlight-from-dependency.odd.html
+++ b/tests/rustdoc/notable-trait/spotlight-from-dependency.odd.html
@@ -1 +1 @@
-<script type="text/json" id="notable-traits-data">{"Odd":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.Odd.html\" title=\"struct foo::Odd\"&gt;Odd&lt;/a&gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=\"where fmt-newline\"&gt;impl &lt;a class=\"trait\" href=\"{{channel}}/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\"&gt;Iterator&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.Odd.html\" title=\"struct foo::Odd\"&gt;Odd&lt;/a&gt;&lt;/span&gt;&lt;span class=\"where fmt-newline\"&gt; type &lt;a href=\"{{channel}}/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\"&gt;Item&lt;/a&gt; = &lt;a class=\"primitive\" href=\"{{channel}}/std/primitive.usize.html\"&gt;usize&lt;/a&gt;;&lt;/span&gt;"}</script> \ No newline at end of file
+<script type="text/json" id="notable-traits-data">{"Odd":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.Odd.html\" title=\"struct foo::Odd\"&gt;Odd&lt;/a&gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;div class=\"where\"&gt;impl &lt;a class=\"trait\" href=\"{{channel}}/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\"&gt;Iterator&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.Odd.html\" title=\"struct foo::Odd\"&gt;Odd&lt;/a&gt;&lt;/div&gt;&lt;div class=\"where\"&gt; type &lt;a href=\"{{channel}}/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\"&gt;Item&lt;/a&gt; = &lt;a class=\"primitive\" href=\"{{channel}}/std/primitive.usize.html\"&gt;usize&lt;/a&gt;;&lt;/div&gt;"}</script> \ No newline at end of file
diff --git a/tests/rustdoc/issue-47038.rs b/tests/rustdoc/private-use-decl-macro-47038.rs
index 810ddca3e..8944bdd42 100644
--- a/tests/rustdoc/issue-47038.rs
+++ b/tests/rustdoc/private-use-decl-macro-47038.rs
@@ -2,6 +2,8 @@
#![crate_name = "foo"]
+// https://github.com/rust-lang/rust/issues/47038
+
use std::vec;
// @has 'foo/index.html'
diff --git a/tests/rustdoc/issue-46506-pub-reexport-of-pub-reexport.rs b/tests/rustdoc/pub-reexport-of-pub-reexport-46506.rs
index d8953eaf5..ae0aead24 100644
--- a/tests/rustdoc/issue-46506-pub-reexport-of-pub-reexport.rs
+++ b/tests/rustdoc/pub-reexport-of-pub-reexport-46506.rs
@@ -4,8 +4,8 @@
#![crate_name = "foo"]
// @has 'foo/associations/index.html'
-// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 1
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Traits'
+// @count - '//*[@id="main-content"]/*[@class="section-header"]' 1
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Traits'
// @has - '//*[@id="main-content"]//a[@href="trait.GroupedBy.html"]' 'GroupedBy'
// @has 'foo/associations/trait.GroupedBy.html'
pub mod associations {
@@ -16,8 +16,8 @@ pub mod associations {
}
// @has 'foo/prelude/index.html'
-// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 1
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Re-exports'
+// @count - '//*[@id="main-content"]/*[@class="section-header"]' 1
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Re-exports'
// @has - '//*[@id="main-content"]//*[@id="reexport.GroupedBy"]' 'pub use associations::GroupedBy;'
pub mod prelude {
pub use associations::GroupedBy;
diff --git a/tests/rustdoc/reexport-cfg.rs b/tests/rustdoc/reexport-cfg.rs
new file mode 100644
index 000000000..a6179fad8
--- /dev/null
+++ b/tests/rustdoc/reexport-cfg.rs
@@ -0,0 +1,30 @@
+// This test ensures that only the re-export `cfg` will be displayed and that it won't
+// include `cfg`s from the previous chained items.
+
+#![crate_name = "foo"]
+#![feature(doc_auto_cfg, doc_cfg)]
+
+mod foo {
+ #[cfg(not(feature = "foo"))]
+ pub struct Bar;
+
+ #[doc(cfg(not(feature = "bar")))]
+ pub struct Bar2;
+}
+
+// @has 'foo/index.html'
+// @has - '//*[@class="item-name"]' 'BabarNon-lie'
+#[cfg(not(feature = "lie"))]
+pub use crate::foo::Bar as Babar;
+
+// @has - '//*[@class="item-name"]' 'Babar2Non-cake'
+#[doc(cfg(not(feature = "cake")))]
+pub use crate::foo::Bar2 as Babar2;
+
+// @has - '//*[@class="item-table"]/li' 'pub use crate::Babar as Elephant;Non-robot'
+#[cfg(not(feature = "robot"))]
+pub use crate::Babar as Elephant;
+
+// @has - '//*[@class="item-table"]/li' 'pub use crate::Babar2 as Elephant2;Non-cat'
+#[doc(cfg(not(feature = "cat")))]
+pub use crate::Babar2 as Elephant2;
diff --git a/tests/rustdoc/reexport-stability-tags-deprecated-and-portability.rs b/tests/rustdoc/reexport-stability-tags-deprecated-and-portability.rs
index a79d05904..c81c654a2 100644
--- a/tests/rustdoc/reexport-stability-tags-deprecated-and-portability.rs
+++ b/tests/rustdoc/reexport-stability-tags-deprecated-and-portability.rs
@@ -27,7 +27,7 @@ pub mod mod1 {
pub mod mod2 {
// @has - '//code' 'pub use tag::Portability;'
// @!has - '//span' 'Deprecated'
- // @has - '//span' 'sync'
+ // @!has - '//span' 'sync'
pub use tag::Portability;
}
@@ -35,7 +35,7 @@ pub mod mod2 {
pub mod mod3 {
// @has - '//code' 'pub use tag::Both;'
// @has - '//span' 'Deprecated'
- // @has - '//span' 'sync'
+ // @!has - '//span' 'sync'
pub use tag::Both;
}
diff --git a/tests/rustdoc/reexport-stability-tags-unstable-and-portability.rs b/tests/rustdoc/reexport-stability-tags-unstable-and-portability.rs
index ff8a910f5..423838e25 100644
--- a/tests/rustdoc/reexport-stability-tags-unstable-and-portability.rs
+++ b/tests/rustdoc/reexport-stability-tags-unstable-and-portability.rs
@@ -35,7 +35,7 @@ pub mod mod1 {
pub mod mod2 {
// @has - '//code' 'pub use tag::Portability;'
// @!has - '//span' 'Experimental'
- // @has - '//span' 'sync'
+ // @!has - '//span' 'sync'
#[stable(feature = "rust1", since = "1.0.0")]
pub use tag::Portability;
}
@@ -45,7 +45,7 @@ pub mod mod2 {
pub mod mod3 {
// @has - '//code' 'pub use tag::Both;'
// @has - '//span' 'Experimental'
- // @has - '//span' 'sync'
+ // @!has - '//span' 'sync'
#[stable(feature = "rust1", since = "1.0.0")]
pub use tag::Both;
}
diff --git a/tests/rustdoc/rfc-2632-const-trait-impl.rs b/tests/rustdoc/rfc-2632-const-trait-impl.rs
index 7f56b2ffe..6f264969e 100644
--- a/tests/rustdoc/rfc-2632-const-trait-impl.rs
+++ b/tests/rustdoc/rfc-2632-const-trait-impl.rs
@@ -23,7 +23,7 @@ pub trait Tr<T> {
// @!has - '//section[@id="method.a"]/h4[@class="code-header"]' '~const'
// @has - '//section[@id="method.a"]/h4[@class="code-header"]/a[@class="trait"]' 'Fn'
// @!has - '//section[@id="method.a"]/h4[@class="code-header"]/span[@class="where"]' '~const'
- // @has - '//section[@id="method.a"]/h4[@class="code-header"]/span[@class="where fmt-newline"]' ': Fn'
+ // @has - '//section[@id="method.a"]/h4[@class="code-header"]/div[@class="where"]' ': Fn'
fn a<A: /* ~const */ Fn() + ~const Destruct>()
where
Option<A>: /* ~const */ Fn() + ~const Destruct,
@@ -35,7 +35,7 @@ pub trait Tr<T> {
// @!has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]' '~const'
// @has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]/a[@class="trait"]' 'Fn'
// @!has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]/span[@class="where"]' '~const'
-// @has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]/span[@class="where fmt-newline"]' ': Fn'
+// @has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]/div[@class="where"]' ': Fn'
impl<T: /* ~const */ Fn() + ~const Destruct> const Tr<T> for T
where
Option<T>: /* ~const */ Fn() + ~const Destruct,
@@ -49,8 +49,8 @@ where
// @!has foo/fn.foo.html '//pre[@class="rust item-decl"]/code/a[@class="trait"]' '~const'
// @has - '//pre[@class="rust item-decl"]/code/a[@class="trait"]' 'Fn'
-// @!has - '//pre[@class="rust item-decl"]/code/span[@class="where fmt-newline"]' '~const'
-// @has - '//pre[@class="rust item-decl"]/code/span[@class="where fmt-newline"]' ': Fn'
+// @!has - '//pre[@class="rust item-decl"]/code/div[@class="where"]' '~const'
+// @has - '//pre[@class="rust item-decl"]/code/div[@class="where"]' ': Fn'
pub const fn foo<F: /* ~const */ Fn() + ~const Destruct>()
where
Option<F>: /* ~const */ Fn() + ~const Destruct,
@@ -62,7 +62,7 @@ impl<T> S<T> {
// @!has foo/struct.S.html '//section[@id="method.foo"]/h4[@class="code-header"]' '~const'
// @has - '//section[@id="method.foo"]/h4[@class="code-header"]/a[@class="trait"]' 'Fn'
// @!has - '//section[@id="method.foo"]/h4[@class="code-header"]/span[@class="where"]' '~const'
- // @has - '//section[@id="method.foo"]/h4[@class="code-header"]/span[@class="where fmt-newline"]' ': Fn'
+ // @has - '//section[@id="method.foo"]/h4[@class="code-header"]/div[@class="where"]' ': Fn'
pub const fn foo<B, C: /* ~const */ Fn() + ~const Destruct>()
where
B: /* ~const */ Fn() + ~const Destruct,
diff --git a/tests/rustdoc/src-links-implementor-43893.rs b/tests/rustdoc/src-links-implementor-43893.rs
new file mode 100644
index 000000000..07e672847
--- /dev/null
+++ b/tests/rustdoc/src-links-implementor-43893.rs
@@ -0,0 +1,21 @@
+// ignore-cross-compile
+
+// https://github.com/rust-lang/rust/issues/43893
+
+#![crate_name = "foo"]
+
+pub trait SomeTrait {}
+pub struct SomeStruct;
+
+// @has foo/trait.SomeTrait.html '//a/@href' '../src/foo/src-links-implementor-43893.rs.html#11'
+impl SomeTrait for usize {}
+
+// @has foo/trait.SomeTrait.html '//a/@href' '../src/foo/src-links-implementor-43893.rs.html#14-16'
+impl SomeTrait for SomeStruct {
+ // deliberately multi-line impl
+}
+
+pub trait AnotherTrait {}
+
+// @has foo/trait.AnotherTrait.html '//a/@href' '../src/foo/src-links-implementor-43893.rs.html#21'
+impl<T> AnotherTrait for T {}
diff --git a/tests/rustdoc/stability.rs b/tests/rustdoc/stability.rs
index 90be2050d..c4d7118d0 100644
--- a/tests/rustdoc/stability.rs
+++ b/tests/rustdoc/stability.rs
@@ -2,6 +2,14 @@
#![unstable(feature = "test", issue = "none")]
+// @has stability/index.html
+// @has - '//ul[@class="item-table"]/li[1]//a' AaStable
+// @has - '//ul[@class="item-table"]/li[2]//a' ZzStable
+// @has - '//ul[@class="item-table"]/li[3]//a' Unstable
+
+#[stable(feature = "rust2", since = "2.2.2")]
+pub struct AaStable;
+
pub struct Unstable {
// @has stability/struct.Unstable.html \
// '//span[@class="item-info"]//div[@class="stab unstable"]' \
@@ -10,3 +18,6 @@ pub struct Unstable {
pub foo: u32,
pub bar: u32,
}
+
+#[stable(feature = "rust2", since = "2.2.2")]
+pub struct ZzStable;
diff --git a/tests/rustdoc/issue-45584.rs b/tests/rustdoc/trait-implementations-duplicate-self-45584.rs
index 8a5f04138..77b8c05f2 100644
--- a/tests/rustdoc/issue-45584.rs
+++ b/tests/rustdoc/trait-implementations-duplicate-self-45584.rs
@@ -1,5 +1,7 @@
#![crate_name = "foo"]
+// https://github.com/rust-lang/rust/issues/45584
+
pub trait Bar<T, U> {}
// @has 'foo/struct.Foo1.html'
diff --git a/tests/rustdoc/issue-34928.rs b/tests/rustdoc/tuple-struct-where-clause-34928.rs
index 4184086f6..909b91468 100644
--- a/tests/rustdoc/issue-34928.rs
+++ b/tests/rustdoc/tuple-struct-where-clause-34928.rs
@@ -1,5 +1,7 @@
#![crate_name = "foo"]
+// https://github.com/rust-lang/rust/issues/34928
+
pub trait Bar {}
// @has foo/struct.Foo.html '//pre' 'pub struct Foo<T>(pub T) where T: Bar;'
diff --git a/tests/rustdoc/typedef-inner-variants-lazy_type_alias.rs b/tests/rustdoc/typedef-inner-variants-lazy_type_alias.rs
index ff84352d7..bea25c75a 100644
--- a/tests/rustdoc/typedef-inner-variants-lazy_type_alias.rs
+++ b/tests/rustdoc/typedef-inner-variants-lazy_type_alias.rs
@@ -13,14 +13,14 @@ pub struct Pair<A, B> {
// @count - '//*[@id="aliased-type"]' 1
// @count - '//*[@id="variants"]' 0
// @count - '//*[@id="fields"]' 1
-// @count - '//span[@class="where fmt-newline"]' 0
+// @count - '//div[@class="where"]' 0
pub type ReversedTypesPair<Q, R> = Pair<R, Q>;
// @has 'inner_types_lazy/type.ReadWrite.html'
// @count - '//*[@id="aliased-type"]' 1
// @count - '//*[@id="variants"]' 0
// @count - '//*[@id="fields"]' 1
-// @count - '//span[@class="where fmt-newline"]' 2
+// @count - '//div[@class="where"]' 2
pub type ReadWrite<R, W> = Pair<R, W>
where
R: std::io::Read,
@@ -30,5 +30,5 @@ where
// @count - '//*[@id="aliased-type"]' 1
// @count - '//*[@id="variants"]' 0
// @count - '//*[@id="fields"]' 1
-// @count - '//span[@class="where fmt-newline"]' 0
+// @count - '//div[@class="where"]' 0
pub type VecPair<U, V> = Pair<Vec<U>, Vec<V>>;
diff --git a/tests/rustdoc/typedef-inner-variants.rs b/tests/rustdoc/typedef-inner-variants.rs
index b734714fd..4d0ff8555 100644
--- a/tests/rustdoc/typedef-inner-variants.rs
+++ b/tests/rustdoc/typedef-inner-variants.rs
@@ -65,7 +65,7 @@ pub union OneOr<A: Copy> {
// @count - '//*[@id="aliased-type"]' 1
// @count - '//*[@id="variants"]' 0
// @count - '//*[@id="fields"]' 1
-// @count - '//*[@class="structfield small-section-header"]' 2
+// @count - '//*[@class="structfield section-header"]' 2
// @matches - '//pre[@class="rust item-decl"]//code' "union OneOrF64"
pub type OneOrF64 = OneOr<f64>;
@@ -81,7 +81,7 @@ pub struct One<T> {
// @count - '//*[@id="aliased-type"]' 1
// @count - '//*[@id="variants"]' 0
// @count - '//*[@id="fields"]' 1
-// @count - '//*[@class="structfield small-section-header"]' 1
+// @count - '//*[@class="structfield section-header"]' 1
// @matches - '//pre[@class="rust item-decl"]//code' "struct OneU64"
// @matches - '//pre[@class="rust item-decl"]//code' "pub val"
pub type OneU64 = One<u64>;
diff --git a/tests/rustdoc/where.SWhere_Echo_impl.html b/tests/rustdoc/where.SWhere_Echo_impl.html
index 7517eb090..726196281 100644
--- a/tests/rustdoc/where.SWhere_Echo_impl.html
+++ b/tests/rustdoc/where.SWhere_Echo_impl.html
@@ -1,2 +1,2 @@
-<h3 class="code-header">impl&lt;D&gt; <a class="struct" href="struct.Delta.html" title="struct foo::Delta">Delta</a>&lt;D&gt;<span class="where fmt-newline">where
- D: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a>,</span></h3> \ No newline at end of file
+<h3 class="code-header">impl&lt;D&gt; <a class="struct" href="struct.Delta.html" title="struct foo::Delta">Delta</a>&lt;D&gt;<div class="where">where
+ D: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a>,</div></h3> \ No newline at end of file
diff --git a/tests/rustdoc/where.SWhere_Simd_item-decl.html b/tests/rustdoc/where.SWhere_Simd_item-decl.html
index 46708b9e4..1987b1d59 100644
--- a/tests/rustdoc/where.SWhere_Simd_item-decl.html
+++ b/tests/rustdoc/where.SWhere_Simd_item-decl.html
@@ -1,3 +1,3 @@
-<pre class="rust item-decl"><code>pub struct Simd&lt;T&gt;(/* private fields */)
+<pre class="rust item-decl"><code>pub struct Simd&lt;T&gt;(<span class="comment">/* private fields */</span>)
<span class="where">where
- T: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a></span>;</code></pre>
+ T: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a></span>;</code></pre> \ No newline at end of file
diff --git a/tests/rustdoc/where.alpha_trait_decl.html b/tests/rustdoc/where.alpha_trait_decl.html
index 0c0b2d1ce..2c010ca7c 100644
--- a/tests/rustdoc/where.alpha_trait_decl.html
+++ b/tests/rustdoc/where.alpha_trait_decl.html
@@ -1,3 +1,3 @@
-<code>pub struct Alpha&lt;A&gt;(/* private fields */)
+<code>pub struct Alpha&lt;A&gt;(<span class="comment">/* private fields */</span>)
<span class="where">where
A: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a></span>;</code> \ No newline at end of file
diff --git a/tests/rustdoc/where.bravo_trait_decl.html b/tests/rustdoc/where.bravo_trait_decl.html
index 00524201a..3f1c994b0 100644
--- a/tests/rustdoc/where.bravo_trait_decl.html
+++ b/tests/rustdoc/where.bravo_trait_decl.html
@@ -1,5 +1,5 @@
-<code>pub trait Bravo&lt;B&gt;<span class="where fmt-newline">where
- B: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a>,</span>{
+<code>pub trait Bravo&lt;B&gt;<div class="where">where
+ B: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a>,</div>{
// Required method
fn <a href="#tymethod.get" class="fn">get</a>(&amp;self, B: B);
}</code> \ No newline at end of file
diff --git a/tests/rustdoc/where.charlie_fn_decl.html b/tests/rustdoc/where.charlie_fn_decl.html
index 8e3bc8b01..4dd410435 100644
--- a/tests/rustdoc/where.charlie_fn_decl.html
+++ b/tests/rustdoc/where.charlie_fn_decl.html
@@ -1,2 +1,2 @@
-<code>pub fn charlie&lt;C&gt;()<span class="where fmt-newline">where
- C: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a>,</span></code> \ No newline at end of file
+<code>pub fn charlie&lt;C&gt;()<div class="where">where
+ C: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a>,</div></code> \ No newline at end of file
diff --git a/tests/rustdoc/where.golf_type_alias_decl.html b/tests/rustdoc/where.golf_type_alias_decl.html
index 8da5402f9..ab60bb262 100644
--- a/tests/rustdoc/where.golf_type_alias_decl.html
+++ b/tests/rustdoc/where.golf_type_alias_decl.html
@@ -1,2 +1,2 @@
-<code>pub type Golf&lt;T&gt;<span class="where fmt-newline">where
- T: <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span> = <a class="primitive" href="{{channel}}/std/primitive.tuple.html">(T, T)</a>;</code> \ No newline at end of file
+<code>pub type Golf&lt;T&gt;<div class="where">where
+ T: <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div> = <a class="primitive" href="{{channel}}/std/primitive.tuple.html">(T, T)</a>;</code> \ No newline at end of file
diff --git a/tests/rustdoc/whitespace-after-where-clause.enum.html b/tests/rustdoc/whitespace-after-where-clause.enum.html
index ff4971f33..25e021453 100644
--- a/tests/rustdoc/whitespace-after-where-clause.enum.html
+++ b/tests/rustdoc/whitespace-after-where-clause.enum.html
@@ -1,5 +1,5 @@
-<pre class="rust item-decl"><code>pub enum Cow&lt;'a, B&gt;<span class="where fmt-newline">where
- B: <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt; + ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a,</span>{
+<pre class="rust item-decl"><code>pub enum Cow&lt;'a, B&gt;<div class="where">where
+ B: <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt; + ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a,</div>{
Borrowed(<a class="primitive" href="{{channel}}/std/primitive.reference.html">&amp;'a B</a>),
Whatever(<a class="primitive" href="{{channel}}/std/primitive.u32.html">u32</a>),
}</code></pre> \ No newline at end of file
diff --git a/tests/rustdoc/whitespace-after-where-clause.struct.html b/tests/rustdoc/whitespace-after-where-clause.struct.html
index ca6853586..bc62a3a00 100644
--- a/tests/rustdoc/whitespace-after-where-clause.struct.html
+++ b/tests/rustdoc/whitespace-after-where-clause.struct.html
@@ -1,5 +1,5 @@
-<pre class="rust item-decl"><code>pub struct Struct&lt;'a, B&gt;<span class="where fmt-newline">where
- B: <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt; + ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a,</span>{
+<pre class="rust item-decl"><code>pub struct Struct&lt;'a, B&gt;<div class="where">where
+ B: <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt; + ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a,</div>{
pub a: <a class="primitive" href="{{channel}}/std/primitive.reference.html">&amp;'a B</a>,
pub b: <a class="primitive" href="{{channel}}/std/primitive.u32.html">u32</a>,
}</code></pre> \ No newline at end of file
diff --git a/tests/rustdoc/whitespace-after-where-clause.trait.html b/tests/rustdoc/whitespace-after-where-clause.trait.html
index 0928b48e6..0e25ed86a 100644
--- a/tests/rustdoc/whitespace-after-where-clause.trait.html
+++ b/tests/rustdoc/whitespace-after-where-clause.trait.html
@@ -1,5 +1,5 @@
-<pre class="rust item-decl"><code>pub trait ToOwned&lt;T&gt;<span class="where fmt-newline">where
- T: <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span>{
+<pre class="rust item-decl"><code>pub trait ToOwned&lt;T&gt;<div class="where">where
+ T: <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div>{
type <a href="#associatedtype.Owned" class="associatedtype">Owned</a>;
// Required methods
diff --git a/tests/rustdoc/whitespace-after-where-clause.union.html b/tests/rustdoc/whitespace-after-where-clause.union.html
index 40b0c6712..e63374760 100644
--- a/tests/rustdoc/whitespace-after-where-clause.union.html
+++ b/tests/rustdoc/whitespace-after-where-clause.union.html
@@ -1,4 +1,4 @@
-<pre class="rust item-decl"><code>pub union Union&lt;'a, B&gt;<span class="where fmt-newline">where
- B: <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt; + ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a,</span>{
- /* private fields */
+<pre class="rust item-decl"><code>pub union Union&lt;'a, B&gt;<div class="where">where
+ B: <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt; + ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a,</div>{
+ <span class="comment">/* private fields */</span>
}</code></pre> \ No newline at end of file
diff --git a/tests/rustdoc/whitespace-after-where-clause.union2.html b/tests/rustdoc/whitespace-after-where-clause.union2.html
index 177a161b8..da984343d 100644
--- a/tests/rustdoc/whitespace-after-where-clause.union2.html
+++ b/tests/rustdoc/whitespace-after-where-clause.union2.html
@@ -1,3 +1,3 @@
<pre class="rust item-decl"><code>pub union Union2&lt;'a, B: ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt; + 'a&gt; {
- /* private fields */
+ <span class="comment">/* private fields */</span>
}</code></pre> \ No newline at end of file
diff --git a/tests/ui-fulldeps/dropck-tarena-cycle-checked.rs b/tests/ui-fulldeps/dropck-tarena-cycle-checked.rs
index cc97971a0..188da6729 100644
--- a/tests/ui-fulldeps/dropck-tarena-cycle-checked.rs
+++ b/tests/ui-fulldeps/dropck-tarena-cycle-checked.rs
@@ -1,3 +1,5 @@
+// ignore-stage1
+
// Reject mixing cyclic structure and Drop when using TypedArena.
//
// (Compare against dropck-vec-cycle-checked.rs)
diff --git a/tests/ui-fulldeps/dropck-tarena-cycle-checked.stderr b/tests/ui-fulldeps/dropck-tarena-cycle-checked.stderr
index 47897dc00..2f5be3f7f 100644
--- a/tests/ui-fulldeps/dropck-tarena-cycle-checked.stderr
+++ b/tests/ui-fulldeps/dropck-tarena-cycle-checked.stderr
@@ -1,5 +1,5 @@
error[E0597]: `arena` does not live long enough
- --> $DIR/dropck-tarena-cycle-checked.rs:116:7
+ --> $DIR/dropck-tarena-cycle-checked.rs:118:7
|
LL | let arena = TypedArena::default();
| ----- binding `arena` declared here
@@ -11,6 +11,6 @@ LL | }
| `arena` dropped here while still borrowed
| borrow might be used here, when `arena` is dropped and runs the `Drop` code for type `TypedArena`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui-fulldeps/dropck-tarena-unsound-drop.rs b/tests/ui-fulldeps/dropck-tarena-unsound-drop.rs
index 86485a988..5f9a5fb76 100644
--- a/tests/ui-fulldeps/dropck-tarena-unsound-drop.rs
+++ b/tests/ui-fulldeps/dropck-tarena-unsound-drop.rs
@@ -1,3 +1,5 @@
+// ignore-stage1
+
// Check that an arena (TypedArena) cannot carry elements whose drop
// methods might access borrowed data of lifetime that does not
// strictly outlive the arena itself.
diff --git a/tests/ui-fulldeps/dropck-tarena-unsound-drop.stderr b/tests/ui-fulldeps/dropck-tarena-unsound-drop.stderr
index 493d74b0b..8bb391124 100644
--- a/tests/ui-fulldeps/dropck-tarena-unsound-drop.stderr
+++ b/tests/ui-fulldeps/dropck-tarena-unsound-drop.stderr
@@ -1,5 +1,5 @@
error[E0597]: `arena` does not live long enough
- --> $DIR/dropck-tarena-unsound-drop.rs:41:7
+ --> $DIR/dropck-tarena-unsound-drop.rs:43:7
|
LL | let arena: TypedArena<C> = TypedArena::default();
| ----- binding `arena` declared here
@@ -11,6 +11,6 @@ LL | }
| `arena` dropped here while still borrowed
| borrow might be used here, when `arena` is dropped and runs the `Drop` code for type `TypedArena`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui-fulldeps/fluent-messages/test.rs b/tests/ui-fulldeps/fluent-messages/test.rs
index 1dd6d211b..89ac48f36 100644
--- a/tests/ui-fulldeps/fluent-messages/test.rs
+++ b/tests/ui-fulldeps/fluent-messages/test.rs
@@ -2,9 +2,8 @@
#![feature(rustc_private)]
#![crate_type = "lib"]
-
+extern crate rustc_errors;
extern crate rustc_fluent_macro;
-use rustc_fluent_macro::fluent_messages;
/// Copy of the relevant `DiagnosticMessage` variant constructed by `fluent_messages` as it
/// expects `crate::DiagnosticMessage` to exist.
@@ -19,51 +18,37 @@ pub enum SubdiagnosticMessage {
}
mod missing_absolute {
- use super::fluent_messages;
-
- fluent_messages! { "/definitely_does_not_exist.ftl" }
+ rustc_fluent_macro::fluent_messages! { "/definitely_does_not_exist.ftl" }
//~^ ERROR could not open Fluent resource
}
mod missing_relative {
- use super::fluent_messages;
-
- fluent_messages! { "../definitely_does_not_exist.ftl" }
+ rustc_fluent_macro::fluent_messages! { "../definitely_does_not_exist.ftl" }
//~^ ERROR could not open Fluent resource
}
mod missing_message {
- use super::fluent_messages;
-
- fluent_messages! { "./missing-message.ftl" }
+ rustc_fluent_macro::fluent_messages! { "./missing-message.ftl" }
//~^ ERROR could not parse Fluent resource
}
mod duplicate {
- use super::fluent_messages;
-
- fluent_messages! { "./duplicate.ftl" }
+ rustc_fluent_macro::fluent_messages! { "./duplicate.ftl" }
//~^ ERROR overrides existing message: `no_crate_a_b_key`
}
mod slug_with_hyphens {
- use super::fluent_messages;
-
- fluent_messages! { "./slug-with-hyphens.ftl" }
+ rustc_fluent_macro::fluent_messages! { "./slug-with-hyphens.ftl" }
//~^ ERROR name `no_crate_this-slug-has-hyphens` contains a '-' character
}
mod label_with_hyphens {
- use super::fluent_messages;
-
- fluent_messages! { "./label-with-hyphens.ftl" }
+ rustc_fluent_macro::fluent_messages! { "./label-with-hyphens.ftl" }
//~^ ERROR attribute `label-has-hyphens` contains a '-' character
}
mod valid {
- use super::fluent_messages;
-
- fluent_messages! { "./valid.ftl" }
+ rustc_fluent_macro::fluent_messages! { "./valid.ftl" }
mod test_generated {
use super::{fluent_generated::no_crate_key, DEFAULT_LOCALE_RESOURCE};
@@ -71,9 +56,7 @@ mod valid {
}
mod missing_crate_name {
- use super::fluent_messages;
-
- fluent_messages! { "./missing-crate-name.ftl" }
+ rustc_fluent_macro::fluent_messages! { "./missing-crate-name.ftl" }
//~^ ERROR name `no-crate_foo` contains a '-' character
//~| ERROR name `with-hyphens` contains a '-' character
//~| ERROR name `with-hyphens` does not start with the crate name
@@ -87,16 +70,12 @@ mod missing_crate_name {
}
mod missing_message_ref {
- use super::fluent_messages;
-
- fluent_messages! { "./missing-message-ref.ftl" }
+ rustc_fluent_macro::fluent_messages! { "./missing-message-ref.ftl" }
//~^ ERROR referenced message `message` does not exist
}
mod bad_escape {
- use super::fluent_messages;
-
- fluent_messages! { "./invalid-escape.ftl" }
+ rustc_fluent_macro::fluent_messages! { "./invalid-escape.ftl" }
//~^ ERROR invalid escape `\n`
//~| ERROR invalid escape `\"`
//~| ERROR invalid escape `\'`
diff --git a/tests/ui-fulldeps/fluent-messages/test.stderr b/tests/ui-fulldeps/fluent-messages/test.stderr
index 2affe621c..09d4a3847 100644
--- a/tests/ui-fulldeps/fluent-messages/test.stderr
+++ b/tests/ui-fulldeps/fluent-messages/test.stderr
@@ -1,20 +1,20 @@
error: could not open Fluent resource: os-specific message
- --> $DIR/test.rs:24:24
+ --> $DIR/test.rs:21:44
|
-LL | fluent_messages! { "/definitely_does_not_exist.ftl" }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | rustc_fluent_macro::fluent_messages! { "/definitely_does_not_exist.ftl" }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: could not open Fluent resource: os-specific message
- --> $DIR/test.rs:31:24
+ --> $DIR/test.rs:26:44
|
-LL | fluent_messages! { "../definitely_does_not_exist.ftl" }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | rustc_fluent_macro::fluent_messages! { "../definitely_does_not_exist.ftl" }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: could not parse Fluent resource
- --> $DIR/test.rs:38:24
+ --> $DIR/test.rs:31:44
|
-LL | fluent_messages! { "./missing-message.ftl" }
- | ^^^^^^^^^^^^^^^^^^^^^^^
+LL | rustc_fluent_macro::fluent_messages! { "./missing-message.ftl" }
+ | ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: see additional errors emitted
@@ -26,80 +26,80 @@ error: expected a message field for "no_crate_missing_message"
|
error: overrides existing message: `no_crate_a_b_key`
- --> $DIR/test.rs:45:24
+ --> $DIR/test.rs:36:44
|
-LL | fluent_messages! { "./duplicate.ftl" }
- | ^^^^^^^^^^^^^^^^^
+LL | rustc_fluent_macro::fluent_messages! { "./duplicate.ftl" }
+ | ^^^^^^^^^^^^^^^^^
error: name `no_crate_this-slug-has-hyphens` contains a '-' character
- --> $DIR/test.rs:52:24
+ --> $DIR/test.rs:41:44
|
-LL | fluent_messages! { "./slug-with-hyphens.ftl" }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | rustc_fluent_macro::fluent_messages! { "./slug-with-hyphens.ftl" }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: replace any '-'s with '_'s
error: attribute `label-has-hyphens` contains a '-' character
- --> $DIR/test.rs:59:24
+ --> $DIR/test.rs:46:44
|
-LL | fluent_messages! { "./label-with-hyphens.ftl" }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | rustc_fluent_macro::fluent_messages! { "./label-with-hyphens.ftl" }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: replace any '-'s with '_'s
error: name `with-hyphens` contains a '-' character
- --> $DIR/test.rs:76:24
+ --> $DIR/test.rs:59:44
|
-LL | fluent_messages! { "./missing-crate-name.ftl" }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | rustc_fluent_macro::fluent_messages! { "./missing-crate-name.ftl" }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: replace any '-'s with '_'s
error: name `with-hyphens` does not start with the crate name
- --> $DIR/test.rs:76:24
+ --> $DIR/test.rs:59:44
|
-LL | fluent_messages! { "./missing-crate-name.ftl" }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | rustc_fluent_macro::fluent_messages! { "./missing-crate-name.ftl" }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: prepend `no_crate_` to the slug name: `no_crate_with_hyphens`
error: name `no-crate_foo` contains a '-' character
- --> $DIR/test.rs:76:24
+ --> $DIR/test.rs:59:44
|
-LL | fluent_messages! { "./missing-crate-name.ftl" }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | rustc_fluent_macro::fluent_messages! { "./missing-crate-name.ftl" }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: replace any '-'s with '_'s
error: referenced message `message` does not exist (in message `no_crate_missing_message_ref`)
- --> $DIR/test.rs:92:24
+ --> $DIR/test.rs:73:44
|
-LL | fluent_messages! { "./missing-message-ref.ftl" }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | rustc_fluent_macro::fluent_messages! { "./missing-message-ref.ftl" }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: you may have meant to use a variable reference (`{$message}`)
error: invalid escape `\n` in Fluent resource
- --> $DIR/test.rs:99:24
+ --> $DIR/test.rs:78:44
|
-LL | fluent_messages! { "./invalid-escape.ftl" }
- | ^^^^^^^^^^^^^^^^^^^^^^
+LL | rustc_fluent_macro::fluent_messages! { "./invalid-escape.ftl" }
+ | ^^^^^^^^^^^^^^^^^^^^^^
|
= note: Fluent does not interpret these escape sequences (<https://projectfluent.org/fluent/guide/special.html>)
error: invalid escape `\"` in Fluent resource
- --> $DIR/test.rs:99:24
+ --> $DIR/test.rs:78:44
|
-LL | fluent_messages! { "./invalid-escape.ftl" }
- | ^^^^^^^^^^^^^^^^^^^^^^
+LL | rustc_fluent_macro::fluent_messages! { "./invalid-escape.ftl" }
+ | ^^^^^^^^^^^^^^^^^^^^^^
|
= note: Fluent does not interpret these escape sequences (<https://projectfluent.org/fluent/guide/special.html>)
error: invalid escape `\'` in Fluent resource
- --> $DIR/test.rs:99:24
+ --> $DIR/test.rs:78:44
|
-LL | fluent_messages! { "./invalid-escape.ftl" }
- | ^^^^^^^^^^^^^^^^^^^^^^
+LL | rustc_fluent_macro::fluent_messages! { "./invalid-escape.ftl" }
+ | ^^^^^^^^^^^^^^^^^^^^^^
|
= note: Fluent does not interpret these escape sequences (<https://projectfluent.org/fluent/guide/special.html>)
diff --git a/tests/ui-fulldeps/internal-lints/diagnostics.rs b/tests/ui-fulldeps/internal-lints/diagnostics.rs
index 994fc26ba..4b006151c 100644
--- a/tests/ui-fulldeps/internal-lints/diagnostics.rs
+++ b/tests/ui-fulldeps/internal-lints/diagnostics.rs
@@ -13,14 +13,13 @@ extern crate rustc_session;
extern crate rustc_span;
use rustc_errors::{
- AddToDiagnostic, Diagnostic, DiagnosticBuilder, DiagnosticMessage, ErrorGuaranteed, Handler,
+ AddToDiagnostic, DiagCtxt, Diagnostic, DiagnosticBuilder, DiagnosticMessage, ErrorGuaranteed,
IntoDiagnostic, SubdiagnosticMessage,
};
-use rustc_fluent_macro::fluent_messages;
use rustc_macros::{Diagnostic, Subdiagnostic};
use rustc_span::Span;
-fluent_messages! { "./diagnostics.ftl" }
+rustc_fluent_macro::fluent_messages! { "./diagnostics.ftl" }
#[derive(Diagnostic)]
#[diag(no_crate_example)]
@@ -39,8 +38,8 @@ struct Note {
pub struct UntranslatableInIntoDiagnostic;
impl<'a> IntoDiagnostic<'a, ErrorGuaranteed> for UntranslatableInIntoDiagnostic {
- fn into_diagnostic(self, handler: &'a Handler) -> DiagnosticBuilder<'a, ErrorGuaranteed> {
- handler.struct_err("untranslatable diagnostic")
+ fn into_diagnostic(self, dcx: &'a DiagCtxt) -> DiagnosticBuilder<'a, ErrorGuaranteed> {
+ dcx.struct_err("untranslatable diagnostic")
//~^ ERROR diagnostics should be created using translatable messages
}
}
@@ -48,8 +47,8 @@ impl<'a> IntoDiagnostic<'a, ErrorGuaranteed> for UntranslatableInIntoDiagnostic
pub struct TranslatableInIntoDiagnostic;
impl<'a> IntoDiagnostic<'a, ErrorGuaranteed> for TranslatableInIntoDiagnostic {
- fn into_diagnostic(self, handler: &'a Handler) -> DiagnosticBuilder<'a, ErrorGuaranteed> {
- handler.struct_err(crate::fluent_generated::no_crate_example)
+ fn into_diagnostic(self, dcx: &'a DiagCtxt) -> DiagnosticBuilder<'a, ErrorGuaranteed> {
+ dcx.struct_err(crate::fluent_generated::no_crate_example)
}
}
@@ -76,11 +75,11 @@ impl AddToDiagnostic for TranslatableInAddToDiagnostic {
}
}
-pub fn make_diagnostics<'a>(handler: &'a Handler) {
- let _diag = handler.struct_err(crate::fluent_generated::no_crate_example);
+pub fn make_diagnostics<'a>(dcx: &'a DiagCtxt) {
+ let _diag = dcx.struct_err(crate::fluent_generated::no_crate_example);
//~^ ERROR diagnostics should only be created in `IntoDiagnostic`/`AddToDiagnostic` impls
- let _diag = handler.struct_err("untranslatable diagnostic");
+ let _diag = dcx.struct_err("untranslatable diagnostic");
//~^ ERROR diagnostics should only be created in `IntoDiagnostic`/`AddToDiagnostic` impls
//~^^ ERROR diagnostics should be created using translatable messages
}
@@ -88,6 +87,6 @@ pub fn make_diagnostics<'a>(handler: &'a Handler) {
// Check that `rustc_lint_diagnostics`-annotated functions aren't themselves linted.
#[rustc_lint_diagnostics]
-pub fn skipped_because_of_annotation<'a>(handler: &'a Handler) {
- let _diag = handler.struct_err("untranslatable diagnostic"); // okay!
+pub fn skipped_because_of_annotation<'a>(dcx: &'a DiagCtxt) {
+ let _diag = dcx.struct_err("untranslatable diagnostic"); // okay!
}
diff --git a/tests/ui-fulldeps/internal-lints/diagnostics.stderr b/tests/ui-fulldeps/internal-lints/diagnostics.stderr
index 6e670c018..d18db3cbb 100644
--- a/tests/ui-fulldeps/internal-lints/diagnostics.stderr
+++ b/tests/ui-fulldeps/internal-lints/diagnostics.stderr
@@ -1,8 +1,8 @@
error: diagnostics should be created using translatable messages
- --> $DIR/diagnostics.rs:43:17
+ --> $DIR/diagnostics.rs:42:13
|
-LL | handler.struct_err("untranslatable diagnostic")
- | ^^^^^^^^^^
+LL | dcx.struct_err("untranslatable diagnostic")
+ | ^^^^^^^^^^
|
note: the lint level is defined here
--> $DIR/diagnostics.rs:6:9
@@ -11,16 +11,16 @@ LL | #![deny(rustc::untranslatable_diagnostic)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: diagnostics should be created using translatable messages
- --> $DIR/diagnostics.rs:63:14
+ --> $DIR/diagnostics.rs:62:14
|
LL | diag.note("untranslatable diagnostic");
| ^^^^
error: diagnostics should only be created in `IntoDiagnostic`/`AddToDiagnostic` impls
- --> $DIR/diagnostics.rs:80:25
+ --> $DIR/diagnostics.rs:79:21
|
-LL | let _diag = handler.struct_err(crate::fluent_generated::no_crate_example);
- | ^^^^^^^^^^
+LL | let _diag = dcx.struct_err(crate::fluent_generated::no_crate_example);
+ | ^^^^^^^^^^
|
note: the lint level is defined here
--> $DIR/diagnostics.rs:7:9
@@ -29,16 +29,16 @@ LL | #![deny(rustc::diagnostic_outside_of_impl)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: diagnostics should only be created in `IntoDiagnostic`/`AddToDiagnostic` impls
- --> $DIR/diagnostics.rs:83:25
+ --> $DIR/diagnostics.rs:82:21
|
-LL | let _diag = handler.struct_err("untranslatable diagnostic");
- | ^^^^^^^^^^
+LL | let _diag = dcx.struct_err("untranslatable diagnostic");
+ | ^^^^^^^^^^
error: diagnostics should be created using translatable messages
- --> $DIR/diagnostics.rs:83:25
+ --> $DIR/diagnostics.rs:82:21
|
-LL | let _diag = handler.struct_err("untranslatable diagnostic");
- | ^^^^^^^^^^
+LL | let _diag = dcx.struct_err("untranslatable diagnostic");
+ | ^^^^^^^^^^
error: aborting due to 5 previous errors
diff --git a/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.rs b/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.rs
index aeb68bf05..392199866 100644
--- a/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.rs
+++ b/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.rs
@@ -1,7 +1,6 @@
// Test the `rustc::span_use_eq_ctxt` internal lint
-// #[cfg(bootstrap)]
-// ignore-stage1
// compile-flags: -Z unstable-options
+// ignore-stage1
#![feature(rustc_private)]
#![deny(rustc::span_use_eq_ctxt)]
diff --git a/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.stderr b/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.stderr
index 3d8a7dd1e..fcf2565c8 100644
--- a/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.stderr
+++ b/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.stderr
@@ -1,14 +1,14 @@
error: use `.eq_ctxt()` instead of `.ctxt() == .ctxt()`
- --> $DIR/span_use_eq_ctxt.rs:14:5
+ --> $DIR/span_use_eq_ctxt.rs:13:5
|
LL | s.ctxt() == t.ctxt()
| ^^^^^^^^^^^^^^^^^^^^
|
note: the lint level is defined here
- --> $DIR/span_use_eq_ctxt.rs:7:9
+ --> $DIR/span_use_eq_ctxt.rs:6:9
|
LL | #![deny(rustc::span_use_eq_ctxt)]
| ^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui-fulldeps/pathless-extern-unstable.rs b/tests/ui-fulldeps/pathless-extern-unstable.rs
index 7fba8343b..50d157c57 100644
--- a/tests/ui-fulldeps/pathless-extern-unstable.rs
+++ b/tests/ui-fulldeps/pathless-extern-unstable.rs
@@ -1,5 +1,6 @@
// edition:2018
// compile-flags:--extern rustc_middle
+// ignore-stage1
// Test that `--extern rustc_middle` fails with `rustc_private`.
diff --git a/tests/ui-fulldeps/pathless-extern-unstable.stderr b/tests/ui-fulldeps/pathless-extern-unstable.stderr
index 174cd3c28..840b95d75 100644
--- a/tests/ui-fulldeps/pathless-extern-unstable.stderr
+++ b/tests/ui-fulldeps/pathless-extern-unstable.stderr
@@ -1,5 +1,5 @@
error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead?
- --> $DIR/pathless-extern-unstable.rs:6:9
+ --> $DIR/pathless-extern-unstable.rs:7:9
|
LL | pub use rustc_middle;
| ^^^^^^^^^^^^
@@ -7,6 +7,6 @@ LL | pub use rustc_middle;
= note: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
= help: add `#![feature(rustc_private)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui-fulldeps/pprust-expr-roundtrip.rs b/tests/ui-fulldeps/pprust-expr-roundtrip.rs
index 685a029dc..24c4543c2 100644
--- a/tests/ui-fulldeps/pprust-expr-roundtrip.rs
+++ b/tests/ui-fulldeps/pprust-expr-roundtrip.rs
@@ -32,7 +32,7 @@ extern crate thin_vec;
#[allow(unused_extern_crates)]
extern crate rustc_driver;
-use rustc_ast::mut_visit::{self, visit_clobber, MutVisitor};
+use rustc_ast::mut_visit::{visit_clobber, MutVisitor};
use rustc_ast::ptr::P;
use rustc_ast::*;
use rustc_ast_pretty::pprust;
@@ -132,7 +132,7 @@ fn iter_exprs(depth: usize, f: &mut dyn FnMut(P<Expr>)) {
binder: ClosureBinder::NotPresent,
capture_clause: CaptureBy::Value { move_kw: DUMMY_SP },
constness: Const::No,
- asyncness: Async::No,
+ coroutine_kind: None,
movability: Movability::Movable,
fn_decl: decl.clone(),
body: e,
diff --git a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs
index 283d87d3e..221f26f8e 100644
--- a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs
+++ b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs
@@ -20,11 +20,10 @@ extern crate rustc_session;
extern crate rustc_span;
use rustc_errors::{Applicability, DiagnosticMessage, SubdiagnosticMessage};
-use rustc_fluent_macro::fluent_messages;
use rustc_macros::{Diagnostic, Subdiagnostic};
use rustc_span::Span;
-fluent_messages! { "./example.ftl" }
+rustc_fluent_macro::fluent_messages! { "./example.ftl" }
struct NotIntoDiagnosticArg;
diff --git a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.stderr b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.stderr
index 70d7b3225..bdcf54bd1 100644
--- a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.stderr
+++ b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.stderr
@@ -1,5 +1,5 @@
error[E0277]: the trait bound `NotIntoDiagnosticArg: IntoDiagnosticArg` is not satisfied
- --> $DIR/diagnostic-derive-doc-comment-field.rs:37:10
+ --> $DIR/diagnostic-derive-doc-comment-field.rs:36:10
|
LL | #[derive(Diagnostic)]
| ---------- required by a bound introduced by this call
@@ -13,7 +13,7 @@ note: required by a bound in `DiagnosticBuilder::<'a, G>::set_arg`
= note: this error originates in the macro `forward` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `NotIntoDiagnosticArg: IntoDiagnosticArg` is not satisfied
- --> $DIR/diagnostic-derive-doc-comment-field.rs:47:10
+ --> $DIR/diagnostic-derive-doc-comment-field.rs:46:10
|
LL | #[derive(Subdiagnostic)]
| ------------- required by a bound introduced by this call
diff --git a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs
index c30120e5c..63fb78ee9 100644
--- a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs
+++ b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs
@@ -19,7 +19,6 @@ use rustc_span::Span;
extern crate rustc_fluent_macro;
extern crate rustc_macros;
-use rustc_fluent_macro::fluent_messages;
use rustc_macros::{Diagnostic, LintDiagnostic, Subdiagnostic};
extern crate rustc_middle;
@@ -30,7 +29,7 @@ use rustc_errors::{Applicability, DiagnosticMessage, MultiSpan, SubdiagnosticMes
extern crate rustc_session;
-fluent_messages! { "./example.ftl" }
+rustc_fluent_macro::fluent_messages! { "./example.ftl" }
#[derive(Diagnostic)]
#[diag(no_crate_example, code = "E0123")]
diff --git a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr
index 014cd5a73..d8ba65d29 100644
--- a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr
+++ b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr
@@ -1,11 +1,11 @@
error: unsupported type attribute for diagnostic derive enum
- --> $DIR/diagnostic-derive.rs:44:1
+ --> $DIR/diagnostic-derive.rs:43:1
|
LL | #[diag(no_crate_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: diagnostic slug not specified
- --> $DIR/diagnostic-derive.rs:47:5
+ --> $DIR/diagnostic-derive.rs:46:5
|
LL | Foo,
| ^^^
@@ -13,7 +13,7 @@ LL | Foo,
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: diagnostic slug not specified
- --> $DIR/diagnostic-derive.rs:49:5
+ --> $DIR/diagnostic-derive.rs:48:5
|
LL | Bar,
| ^^^
@@ -21,13 +21,13 @@ LL | Bar,
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[nonsense(...)]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:60:1
+ --> $DIR/diagnostic-derive.rs:59:1
|
LL | #[nonsense(no_crate_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: diagnostic slug not specified
- --> $DIR/diagnostic-derive.rs:60:1
+ --> $DIR/diagnostic-derive.rs:59:1
|
LL | / #[nonsense(no_crate_example, code = "E0123")]
LL | |
@@ -39,7 +39,7 @@ LL | | struct InvalidStructAttr {}
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: diagnostic slug not specified
- --> $DIR/diagnostic-derive.rs:67:1
+ --> $DIR/diagnostic-derive.rs:66:1
|
LL | / #[diag("E0123")]
LL | |
@@ -49,13 +49,13 @@ LL | | struct InvalidLitNestedAttr {}
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: diagnostic slug must be the first argument
- --> $DIR/diagnostic-derive.rs:77:16
+ --> $DIR/diagnostic-derive.rs:76:16
|
LL | #[diag(nonsense("foo"), code = "E0123", slug = "foo")]
| ^
error: diagnostic slug not specified
- --> $DIR/diagnostic-derive.rs:77:1
+ --> $DIR/diagnostic-derive.rs:76:1
|
LL | / #[diag(nonsense("foo"), code = "E0123", slug = "foo")]
LL | |
@@ -66,7 +66,7 @@ LL | | struct InvalidNestedStructAttr1 {}
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: unknown argument
- --> $DIR/diagnostic-derive.rs:83:8
+ --> $DIR/diagnostic-derive.rs:82:8
|
LL | #[diag(nonsense = "...", code = "E0123", slug = "foo")]
| ^^^^^^^^
@@ -74,7 +74,7 @@ LL | #[diag(nonsense = "...", code = "E0123", slug = "foo")]
= note: only the `code` parameter is valid after the slug
error: diagnostic slug not specified
- --> $DIR/diagnostic-derive.rs:83:1
+ --> $DIR/diagnostic-derive.rs:82:1
|
LL | / #[diag(nonsense = "...", code = "E0123", slug = "foo")]
LL | |
@@ -85,7 +85,7 @@ LL | | struct InvalidNestedStructAttr2 {}
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: unknown argument
- --> $DIR/diagnostic-derive.rs:89:8
+ --> $DIR/diagnostic-derive.rs:88:8
|
LL | #[diag(nonsense = 4, code = "E0123", slug = "foo")]
| ^^^^^^^^
@@ -93,7 +93,7 @@ LL | #[diag(nonsense = 4, code = "E0123", slug = "foo")]
= note: only the `code` parameter is valid after the slug
error: diagnostic slug not specified
- --> $DIR/diagnostic-derive.rs:89:1
+ --> $DIR/diagnostic-derive.rs:88:1
|
LL | / #[diag(nonsense = 4, code = "E0123", slug = "foo")]
LL | |
@@ -104,7 +104,7 @@ LL | | struct InvalidNestedStructAttr3 {}
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: unknown argument
- --> $DIR/diagnostic-derive.rs:95:42
+ --> $DIR/diagnostic-derive.rs:94:42
|
LL | #[diag(no_crate_example, code = "E0123", slug = "foo")]
| ^^^^
@@ -112,55 +112,55 @@ LL | #[diag(no_crate_example, code = "E0123", slug = "foo")]
= note: only the `code` parameter is valid after the slug
error: `#[suggestion = ...]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:102:5
+ --> $DIR/diagnostic-derive.rs:101:5
|
LL | #[suggestion = "bar"]
| ^^^^^^^^^^^^^^^^^^^^^
error: specified multiple times
- --> $DIR/diagnostic-derive.rs:109:8
+ --> $DIR/diagnostic-derive.rs:108:8
|
LL | #[diag(no_crate_example, code = "E0456")]
| ^^^^^^^^^^^^^^^^
|
note: previously specified here
- --> $DIR/diagnostic-derive.rs:108:8
+ --> $DIR/diagnostic-derive.rs:107:8
|
LL | #[diag(no_crate_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^
error: specified multiple times
- --> $DIR/diagnostic-derive.rs:109:26
+ --> $DIR/diagnostic-derive.rs:108:26
|
LL | #[diag(no_crate_example, code = "E0456")]
| ^^^^
|
note: previously specified here
- --> $DIR/diagnostic-derive.rs:108:26
+ --> $DIR/diagnostic-derive.rs:107:26
|
LL | #[diag(no_crate_example, code = "E0123")]
| ^^^^
error: specified multiple times
- --> $DIR/diagnostic-derive.rs:115:42
+ --> $DIR/diagnostic-derive.rs:114:42
|
LL | #[diag(no_crate_example, code = "E0456", code = "E0457")]
| ^^^^
|
note: previously specified here
- --> $DIR/diagnostic-derive.rs:115:26
+ --> $DIR/diagnostic-derive.rs:114:26
|
LL | #[diag(no_crate_example, code = "E0456", code = "E0457")]
| ^^^^
error: diagnostic slug must be the first argument
- --> $DIR/diagnostic-derive.rs:120:43
+ --> $DIR/diagnostic-derive.rs:119:43
|
LL | #[diag(no_crate_example, no_crate::example, code = "E0456")]
| ^
error: diagnostic slug not specified
- --> $DIR/diagnostic-derive.rs:125:1
+ --> $DIR/diagnostic-derive.rs:124:1
|
LL | struct KindNotProvided {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -168,7 +168,7 @@ LL | struct KindNotProvided {}
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: diagnostic slug not specified
- --> $DIR/diagnostic-derive.rs:128:1
+ --> $DIR/diagnostic-derive.rs:127:1
|
LL | / #[diag(code = "E0456")]
LL | |
@@ -178,31 +178,31 @@ LL | | struct SlugNotProvided {}
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
- --> $DIR/diagnostic-derive.rs:139:5
+ --> $DIR/diagnostic-derive.rs:138:5
|
LL | #[primary_span]
| ^^^^^^^^^^^^^^^
error: `#[nonsense]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:147:5
+ --> $DIR/diagnostic-derive.rs:146:5
|
LL | #[nonsense]
| ^^^^^^^^^^^
error: the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
- --> $DIR/diagnostic-derive.rs:164:5
+ --> $DIR/diagnostic-derive.rs:163:5
|
LL | #[label(no_crate_label)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: `name` doesn't refer to a field on this type
- --> $DIR/diagnostic-derive.rs:172:46
+ --> $DIR/diagnostic-derive.rs:171:46
|
LL | #[suggestion(no_crate_suggestion, code = "{name}")]
| ^^^^^^^^
error: invalid format string: expected `'}'` but string was terminated
- --> $DIR/diagnostic-derive.rs:177:10
+ --> $DIR/diagnostic-derive.rs:176:10
|
LL | #[derive(Diagnostic)]
| ^^^^^^^^^^ expected `'}'` in format string
@@ -211,7 +211,7 @@ LL | #[derive(Diagnostic)]
= note: this error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid format string: unmatched `}` found
- --> $DIR/diagnostic-derive.rs:187:10
+ --> $DIR/diagnostic-derive.rs:186:10
|
LL | #[derive(Diagnostic)]
| ^^^^^^^^^^ unmatched `}` in format string
@@ -220,19 +220,19 @@ LL | #[derive(Diagnostic)]
= note: this error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
error: the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
- --> $DIR/diagnostic-derive.rs:207:5
+ --> $DIR/diagnostic-derive.rs:206:5
|
LL | #[label(no_crate_label)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: suggestion without `code = "..."`
- --> $DIR/diagnostic-derive.rs:226:5
+ --> $DIR/diagnostic-derive.rs:225:5
|
LL | #[suggestion(no_crate_suggestion)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: invalid nested attribute
- --> $DIR/diagnostic-derive.rs:234:18
+ --> $DIR/diagnostic-derive.rs:233:18
|
LL | #[suggestion(nonsense = "bar")]
| ^^^^^^^^
@@ -240,13 +240,13 @@ LL | #[suggestion(nonsense = "bar")]
= help: only `no_span`, `style`, `code` and `applicability` are valid nested attributes
error: suggestion without `code = "..."`
- --> $DIR/diagnostic-derive.rs:234:5
+ --> $DIR/diagnostic-derive.rs:233:5
|
LL | #[suggestion(nonsense = "bar")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: invalid nested attribute
- --> $DIR/diagnostic-derive.rs:243:18
+ --> $DIR/diagnostic-derive.rs:242:18
|
LL | #[suggestion(msg = "bar")]
| ^^^
@@ -254,13 +254,13 @@ LL | #[suggestion(msg = "bar")]
= help: only `no_span`, `style`, `code` and `applicability` are valid nested attributes
error: suggestion without `code = "..."`
- --> $DIR/diagnostic-derive.rs:243:5
+ --> $DIR/diagnostic-derive.rs:242:5
|
LL | #[suggestion(msg = "bar")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: wrong field type for suggestion
- --> $DIR/diagnostic-derive.rs:266:5
+ --> $DIR/diagnostic-derive.rs:265:5
|
LL | / #[suggestion(no_crate_suggestion, code = "This is suggested code")]
LL | |
@@ -270,79 +270,79 @@ LL | | suggestion: Applicability,
= help: `#[suggestion(...)]` should be applied to fields of type `Span` or `(Span, Applicability)`
error: specified multiple times
- --> $DIR/diagnostic-derive.rs:282:24
+ --> $DIR/diagnostic-derive.rs:281:24
|
LL | suggestion: (Span, Span, Applicability),
| ^^^^
|
note: previously specified here
- --> $DIR/diagnostic-derive.rs:282:18
+ --> $DIR/diagnostic-derive.rs:281:18
|
LL | suggestion: (Span, Span, Applicability),
| ^^^^
error: specified multiple times
- --> $DIR/diagnostic-derive.rs:290:33
+ --> $DIR/diagnostic-derive.rs:289:33
|
LL | suggestion: (Applicability, Applicability, Span),
| ^^^^^^^^^^^^^
|
note: previously specified here
- --> $DIR/diagnostic-derive.rs:290:18
+ --> $DIR/diagnostic-derive.rs:289:18
|
LL | suggestion: (Applicability, Applicability, Span),
| ^^^^^^^^^^^^^
error: `#[label = ...]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:297:5
+ --> $DIR/diagnostic-derive.rs:296:5
|
LL | #[label = "bar"]
| ^^^^^^^^^^^^^^^^
error: specified multiple times
- --> $DIR/diagnostic-derive.rs:448:5
+ --> $DIR/diagnostic-derive.rs:447:5
|
LL | #[suggestion(no_crate_suggestion, code = "...", applicability = "maybe-incorrect")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: previously specified here
- --> $DIR/diagnostic-derive.rs:450:24
+ --> $DIR/diagnostic-derive.rs:449:24
|
LL | suggestion: (Span, Applicability),
| ^^^^^^^^^^^^^
error: invalid applicability
- --> $DIR/diagnostic-derive.rs:456:69
+ --> $DIR/diagnostic-derive.rs:455:69
|
LL | #[suggestion(no_crate_suggestion, code = "...", applicability = "batman")]
| ^^^^^^^^
error: the `#[help(...)]` attribute can only be applied to fields of type `Span`, `MultiSpan`, `bool` or `()`
- --> $DIR/diagnostic-derive.rs:523:5
+ --> $DIR/diagnostic-derive.rs:522:5
|
LL | #[help(no_crate_help)]
| ^^^^^^^^^^^^^^^^^^^^^^
error: a diagnostic slug must be the first argument to the attribute
- --> $DIR/diagnostic-derive.rs:532:32
+ --> $DIR/diagnostic-derive.rs:531:32
|
LL | #[label(no_crate_label, foo)]
| ^
error: only `no_span` is a valid nested attribute
- --> $DIR/diagnostic-derive.rs:540:29
+ --> $DIR/diagnostic-derive.rs:539:29
|
LL | #[label(no_crate_label, foo = "...")]
| ^^^
error: only `no_span` is a valid nested attribute
- --> $DIR/diagnostic-derive.rs:548:29
+ --> $DIR/diagnostic-derive.rs:547:29
|
LL | #[label(no_crate_label, foo("..."))]
| ^^^
error: `#[primary_span]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:560:5
+ --> $DIR/diagnostic-derive.rs:559:5
|
LL | #[primary_span]
| ^^^^^^^^^^^^^^^
@@ -350,13 +350,13 @@ LL | #[primary_span]
= help: the `primary_span` field attribute is not valid for lint diagnostics
error: `#[error(...)]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:580:1
+ --> $DIR/diagnostic-derive.rs:579:1
|
LL | #[error(no_crate_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: diagnostic slug not specified
- --> $DIR/diagnostic-derive.rs:580:1
+ --> $DIR/diagnostic-derive.rs:579:1
|
LL | / #[error(no_crate_example, code = "E0123")]
LL | |
@@ -368,13 +368,13 @@ LL | | struct ErrorAttribute {}
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[warn_(...)]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:587:1
+ --> $DIR/diagnostic-derive.rs:586:1
|
LL | #[warn_(no_crate_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: diagnostic slug not specified
- --> $DIR/diagnostic-derive.rs:587:1
+ --> $DIR/diagnostic-derive.rs:586:1
|
LL | / #[warn_(no_crate_example, code = "E0123")]
LL | |
@@ -386,13 +386,13 @@ LL | | struct WarnAttribute {}
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[lint(...)]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:594:1
+ --> $DIR/diagnostic-derive.rs:593:1
|
LL | #[lint(no_crate_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: diagnostic slug not specified
- --> $DIR/diagnostic-derive.rs:594:1
+ --> $DIR/diagnostic-derive.rs:593:1
|
LL | / #[lint(no_crate_example, code = "E0123")]
LL | |
@@ -404,13 +404,13 @@ LL | | struct LintAttributeOnSessionDiag {}
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[lint(...)]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:601:1
+ --> $DIR/diagnostic-derive.rs:600:1
|
LL | #[lint(no_crate_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `#[lint(...)]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:601:1
+ --> $DIR/diagnostic-derive.rs:600:1
|
LL | #[lint(no_crate_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -418,7 +418,7 @@ LL | #[lint(no_crate_example, code = "E0123")]
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: diagnostic slug not specified
- --> $DIR/diagnostic-derive.rs:601:1
+ --> $DIR/diagnostic-derive.rs:600:1
|
LL | / #[lint(no_crate_example, code = "E0123")]
LL | |
@@ -431,19 +431,19 @@ LL | | struct LintAttributeOnLintDiag {}
= help: specify the slug as the first argument to the attribute, such as `#[diag(compiletest_example)]`
error: specified multiple times
- --> $DIR/diagnostic-derive.rs:611:53
+ --> $DIR/diagnostic-derive.rs:610:53
|
LL | #[suggestion(no_crate_suggestion, code = "...", code = ",,,")]
| ^^^^
|
note: previously specified here
- --> $DIR/diagnostic-derive.rs:611:39
+ --> $DIR/diagnostic-derive.rs:610:39
|
LL | #[suggestion(no_crate_suggestion, code = "...", code = ",,,")]
| ^^^^
error: wrong types for suggestion
- --> $DIR/diagnostic-derive.rs:620:24
+ --> $DIR/diagnostic-derive.rs:619:24
|
LL | suggestion: (Span, usize),
| ^^^^^
@@ -451,7 +451,7 @@ LL | suggestion: (Span, usize),
= help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)`
error: wrong types for suggestion
- --> $DIR/diagnostic-derive.rs:628:17
+ --> $DIR/diagnostic-derive.rs:627:17
|
LL | suggestion: (Span,),
| ^^^^^^^
@@ -459,13 +459,13 @@ LL | suggestion: (Span,),
= help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)`
error: suggestion without `code = "..."`
- --> $DIR/diagnostic-derive.rs:635:5
+ --> $DIR/diagnostic-derive.rs:634:5
|
LL | #[suggestion(no_crate_suggestion)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `#[multipart_suggestion(...)]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:642:1
+ --> $DIR/diagnostic-derive.rs:641:1
|
LL | #[multipart_suggestion(no_crate_suggestion)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -473,7 +473,7 @@ LL | #[multipart_suggestion(no_crate_suggestion)]
= help: consider creating a `Subdiagnostic` instead
error: `#[multipart_suggestion(...)]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:645:1
+ --> $DIR/diagnostic-derive.rs:644:1
|
LL | #[multipart_suggestion()]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -481,7 +481,7 @@ LL | #[multipart_suggestion()]
= help: consider creating a `Subdiagnostic` instead
error: `#[multipart_suggestion(...)]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:649:5
+ --> $DIR/diagnostic-derive.rs:648:5
|
LL | #[multipart_suggestion(no_crate_suggestion)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -489,7 +489,7 @@ LL | #[multipart_suggestion(no_crate_suggestion)]
= help: consider creating a `Subdiagnostic` instead
error: `#[suggestion(...)]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:657:1
+ --> $DIR/diagnostic-derive.rs:656:1
|
LL | #[suggestion(no_crate_suggestion, code = "...")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -497,7 +497,7 @@ LL | #[suggestion(no_crate_suggestion, code = "...")]
= help: `#[label]` and `#[suggestion]` can only be applied to fields
error: `#[label]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:666:1
+ --> $DIR/diagnostic-derive.rs:665:1
|
LL | #[label]
| ^^^^^^^^
@@ -505,31 +505,31 @@ LL | #[label]
= help: `#[label]` and `#[suggestion]` can only be applied to fields
error: `eager` is the only supported nested attribute for `subdiagnostic`
- --> $DIR/diagnostic-derive.rs:700:7
+ --> $DIR/diagnostic-derive.rs:699:7
|
LL | #[subdiagnostic(bad)]
| ^^^^^^^^^^^^^^^^^^
error: `#[subdiagnostic = ...]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:708:5
+ --> $DIR/diagnostic-derive.rs:707:5
|
LL | #[subdiagnostic = "bad"]
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: `eager` is the only supported nested attribute for `subdiagnostic`
- --> $DIR/diagnostic-derive.rs:716:7
+ --> $DIR/diagnostic-derive.rs:715:7
|
LL | #[subdiagnostic(bad, bad)]
| ^^^^^^^^^^^^^^^^^^^^^^^
error: `eager` is the only supported nested attribute for `subdiagnostic`
- --> $DIR/diagnostic-derive.rs:724:7
+ --> $DIR/diagnostic-derive.rs:723:7
|
LL | #[subdiagnostic("bad")]
| ^^^^^^^^^^^^^^^^^^^^
error: `#[subdiagnostic(...)]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:732:5
+ --> $DIR/diagnostic-derive.rs:731:5
|
LL | #[subdiagnostic(eager)]
| ^^^^^^^^^^^^^^^^^^^^^^^
@@ -537,19 +537,19 @@ LL | #[subdiagnostic(eager)]
= help: eager subdiagnostics are not supported on lints
error: expected at least one string literal for `code(...)`
- --> $DIR/diagnostic-derive.rs:790:23
+ --> $DIR/diagnostic-derive.rs:789:23
|
LL | #[suggestion(code())]
| ^
error: `code(...)` must contain only string literals
- --> $DIR/diagnostic-derive.rs:798:23
+ --> $DIR/diagnostic-derive.rs:797:23
|
LL | #[suggestion(code(foo))]
| ^^^
error: `#[suggestion(...)]` is not a valid attribute
- --> $DIR/diagnostic-derive.rs:822:5
+ --> $DIR/diagnostic-derive.rs:821:5
|
LL | #[suggestion(no_crate_suggestion, code = "")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -559,85 +559,85 @@ LL | #[suggestion(no_crate_suggestion, code = "")]
= help: to show a variable set of suggestions, use a `Vec` of `Subdiagnostic`s annotated with `#[suggestion(...)]`
error[E0433]: failed to resolve: maybe a missing crate `core`?
- --> $DIR/diagnostic-derive.rs:55:8
+ --> $DIR/diagnostic-derive.rs:54:8
|
LL | #[diag = "E0123"]
| ^ maybe a missing crate `core`?
error[E0433]: failed to resolve: maybe a missing crate `core`?
- --> $DIR/diagnostic-derive.rs:798:23
+ --> $DIR/diagnostic-derive.rs:797:23
|
LL | #[suggestion(code(foo))]
| ^^^ maybe a missing crate `core`?
error[E0433]: failed to resolve: maybe a missing crate `core`?
- --> $DIR/diagnostic-derive.rs:807:25
+ --> $DIR/diagnostic-derive.rs:806:25
|
LL | #[suggestion(code = 3)]
| ^ maybe a missing crate `core`?
error: cannot find attribute `nonsense` in this scope
- --> $DIR/diagnostic-derive.rs:60:3
+ --> $DIR/diagnostic-derive.rs:59:3
|
LL | #[nonsense(no_crate_example, code = "E0123")]
| ^^^^^^^^
error: cannot find attribute `nonsense` in this scope
- --> $DIR/diagnostic-derive.rs:147:7
+ --> $DIR/diagnostic-derive.rs:146:7
|
LL | #[nonsense]
| ^^^^^^^^
error: cannot find attribute `error` in this scope
- --> $DIR/diagnostic-derive.rs:580:3
+ --> $DIR/diagnostic-derive.rs:579:3
|
LL | #[error(no_crate_example, code = "E0123")]
| ^^^^^
error: cannot find attribute `warn_` in this scope
- --> $DIR/diagnostic-derive.rs:587:3
+ --> $DIR/diagnostic-derive.rs:586:3
|
LL | #[warn_(no_crate_example, code = "E0123")]
| ^^^^^ help: a built-in attribute with a similar name exists: `warn`
error: cannot find attribute `lint` in this scope
- --> $DIR/diagnostic-derive.rs:594:3
+ --> $DIR/diagnostic-derive.rs:593:3
|
LL | #[lint(no_crate_example, code = "E0123")]
| ^^^^ help: a built-in attribute with a similar name exists: `link`
error: cannot find attribute `lint` in this scope
- --> $DIR/diagnostic-derive.rs:601:3
+ --> $DIR/diagnostic-derive.rs:600:3
|
LL | #[lint(no_crate_example, code = "E0123")]
| ^^^^ help: a built-in attribute with a similar name exists: `link`
error: cannot find attribute `multipart_suggestion` in this scope
- --> $DIR/diagnostic-derive.rs:642:3
+ --> $DIR/diagnostic-derive.rs:641:3
|
LL | #[multipart_suggestion(no_crate_suggestion)]
| ^^^^^^^^^^^^^^^^^^^^
error: cannot find attribute `multipart_suggestion` in this scope
- --> $DIR/diagnostic-derive.rs:645:3
+ --> $DIR/diagnostic-derive.rs:644:3
|
LL | #[multipart_suggestion()]
| ^^^^^^^^^^^^^^^^^^^^
error: cannot find attribute `multipart_suggestion` in this scope
- --> $DIR/diagnostic-derive.rs:649:7
+ --> $DIR/diagnostic-derive.rs:648:7
|
LL | #[multipart_suggestion(no_crate_suggestion)]
| ^^^^^^^^^^^^^^^^^^^^
error[E0425]: cannot find value `nonsense` in module `crate::fluent_generated`
- --> $DIR/diagnostic-derive.rs:72:8
+ --> $DIR/diagnostic-derive.rs:71:8
|
LL | #[diag(nonsense, code = "E0123")]
| ^^^^^^^^ not found in `crate::fluent_generated`
error[E0425]: cannot find value `__code_34` in this scope
- --> $DIR/diagnostic-derive.rs:804:10
+ --> $DIR/diagnostic-derive.rs:803:10
|
LL | #[derive(Diagnostic)]
| ^^^^^^^^^^ not found in this scope
@@ -645,7 +645,7 @@ LL | #[derive(Diagnostic)]
= note: this error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Hello: IntoDiagnosticArg` is not satisfied
- --> $DIR/diagnostic-derive.rs:346:12
+ --> $DIR/diagnostic-derive.rs:345:12
|
LL | #[derive(Diagnostic)]
| ---------- required by a bound introduced by this call
diff --git a/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs b/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs
index a0a8114e0..331483112 100644
--- a/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs
+++ b/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs
@@ -1,4 +1,5 @@
// rustc-env:CARGO_CRATE_NAME=rustc_dummy
+// ignore-stage1
#![feature(rustc_private)]
#![crate_type = "lib"]
diff --git a/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.stderr b/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.stderr
index dcf4af5df..c752a5ee0 100644
--- a/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.stderr
+++ b/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.stderr
@@ -1,5 +1,5 @@
error: diagnostic slug and crate name do not match
- --> $DIR/enforce_slug_naming.rs:22:8
+ --> $DIR/enforce_slug_naming.rs:23:8
|
LL | #[diag(compiletest_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^
@@ -7,5 +7,5 @@ LL | #[diag(compiletest_example, code = "E0123")]
= note: slug is `compiletest_example` but the crate name is `rustc_dummy`
= help: expected a slug starting with `dummy_...`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui-fulldeps/session-diagnostic/invalid-variable.rs b/tests/ui-fulldeps/session-diagnostic/invalid-variable.rs
index 57798dda3..2ec07fa14 100644
--- a/tests/ui-fulldeps/session-diagnostic/invalid-variable.rs
+++ b/tests/ui-fulldeps/session-diagnostic/invalid-variable.rs
@@ -9,12 +9,11 @@ extern crate rustc_driver;
extern crate rustc_fluent_macro;
extern crate rustc_macros;
extern crate rustc_errors;
-use rustc_fluent_macro::fluent_messages;
use rustc_macros::Diagnostic;
use rustc_errors::{SubdiagnosticMessage, DiagnosticMessage};
extern crate rustc_session;
-fluent_messages! { "./example.ftl" }
+rustc_fluent_macro::fluent_messages! { "./example.ftl" }
#[derive(Diagnostic)]
#[diag(no_crate_bad_reference)]
diff --git a/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs b/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs
index dd0f7a7ef..74cf91db7 100644
--- a/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs
+++ b/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs
@@ -18,11 +18,10 @@ extern crate rustc_session;
extern crate rustc_span;
use rustc_errors::{Applicability, DiagnosticMessage, SubdiagnosticMessage};
-use rustc_fluent_macro::fluent_messages;
use rustc_macros::Subdiagnostic;
use rustc_span::Span;
-fluent_messages! { "./example.ftl" }
+rustc_fluent_macro::fluent_messages! { "./example.ftl" }
#[derive(Subdiagnostic)]
#[label(no_crate_example)]
diff --git a/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.stderr b/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.stderr
index 1f267aceb..80bee3bd6 100644
--- a/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.stderr
+++ b/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.stderr
@@ -1,5 +1,5 @@
error: label without `#[primary_span]` field
- --> $DIR/subdiagnostic-derive.rs:52:1
+ --> $DIR/subdiagnostic-derive.rs:51:1
|
LL | / #[label(no_crate_example)]
LL | |
@@ -9,127 +9,127 @@ LL | | }
| |_^
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
- --> $DIR/subdiagnostic-derive.rs:59:1
+ --> $DIR/subdiagnostic-derive.rs:58:1
|
LL | #[label]
| ^^^^^^^^
error: `#[foo]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:68:1
+ --> $DIR/subdiagnostic-derive.rs:67:1
|
LL | #[foo]
| ^^^^^^
error: `#[label = ...]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:78:1
+ --> $DIR/subdiagnostic-derive.rs:77:1
|
LL | #[label = "..."]
| ^^^^^^^^^^^^^^^^
error: only `no_span` is a valid nested attribute
- --> $DIR/subdiagnostic-derive.rs:87:9
+ --> $DIR/subdiagnostic-derive.rs:86:9
|
LL | #[label(bug = "...")]
| ^^^
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
- --> $DIR/subdiagnostic-derive.rs:87:1
+ --> $DIR/subdiagnostic-derive.rs:86:1
|
LL | #[label(bug = "...")]
| ^^^^^^^^^^^^^^^^^^^^^
error: only `no_span` is a valid nested attribute
- --> $DIR/subdiagnostic-derive.rs:107:9
+ --> $DIR/subdiagnostic-derive.rs:106:9
|
LL | #[label(slug = 4)]
| ^^^^
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
- --> $DIR/subdiagnostic-derive.rs:107:1
+ --> $DIR/subdiagnostic-derive.rs:106:1
|
LL | #[label(slug = 4)]
| ^^^^^^^^^^^^^^^^^^
error: only `no_span` is a valid nested attribute
- --> $DIR/subdiagnostic-derive.rs:117:9
+ --> $DIR/subdiagnostic-derive.rs:116:9
|
LL | #[label(slug("..."))]
| ^^^^
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
- --> $DIR/subdiagnostic-derive.rs:117:1
+ --> $DIR/subdiagnostic-derive.rs:116:1
|
LL | #[label(slug("..."))]
| ^^^^^^^^^^^^^^^^^^^^^
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
- --> $DIR/subdiagnostic-derive.rs:137:1
+ --> $DIR/subdiagnostic-derive.rs:136:1
|
LL | #[label()]
| ^^^^^^^^^^
error: only `no_span` is a valid nested attribute
- --> $DIR/subdiagnostic-derive.rs:146:27
+ --> $DIR/subdiagnostic-derive.rs:145:27
|
LL | #[label(no_crate_example, code = "...")]
| ^^^^
error: only `no_span` is a valid nested attribute
- --> $DIR/subdiagnostic-derive.rs:155:27
+ --> $DIR/subdiagnostic-derive.rs:154:27
|
LL | #[label(no_crate_example, applicability = "machine-applicable")]
| ^^^^^^^^^^^^^
error: unsupported type attribute for subdiagnostic enum
- --> $DIR/subdiagnostic-derive.rs:164:1
+ --> $DIR/subdiagnostic-derive.rs:163:1
|
LL | #[foo]
| ^^^^^^
error: `#[bar]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:178:5
+ --> $DIR/subdiagnostic-derive.rs:177:5
|
LL | #[bar]
| ^^^^^^
error: `#[bar = ...]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:190:5
+ --> $DIR/subdiagnostic-derive.rs:189:5
|
LL | #[bar = "..."]
| ^^^^^^^^^^^^^^
error: `#[bar = ...]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:202:5
+ --> $DIR/subdiagnostic-derive.rs:201:5
|
LL | #[bar = 4]
| ^^^^^^^^^^
error: `#[bar(...)]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:214:5
+ --> $DIR/subdiagnostic-derive.rs:213:5
|
LL | #[bar("...")]
| ^^^^^^^^^^^^^
error: only `no_span` is a valid nested attribute
- --> $DIR/subdiagnostic-derive.rs:226:13
+ --> $DIR/subdiagnostic-derive.rs:225:13
|
LL | #[label(code = "...")]
| ^^^^
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
- --> $DIR/subdiagnostic-derive.rs:226:5
+ --> $DIR/subdiagnostic-derive.rs:225:5
|
LL | #[label(code = "...")]
| ^^^^^^^^^^^^^^^^^^^^^^
error: the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
- --> $DIR/subdiagnostic-derive.rs:255:5
+ --> $DIR/subdiagnostic-derive.rs:254:5
|
LL | #[primary_span]
| ^^^^^^^^^^^^^^^
error: label without `#[primary_span]` field
- --> $DIR/subdiagnostic-derive.rs:252:1
+ --> $DIR/subdiagnostic-derive.rs:251:1
|
LL | / #[label(no_crate_example)]
LL | |
@@ -141,13 +141,13 @@ LL | | }
| |_^
error: `#[applicability]` is only valid on suggestions
- --> $DIR/subdiagnostic-derive.rs:265:5
+ --> $DIR/subdiagnostic-derive.rs:264:5
|
LL | #[applicability]
| ^^^^^^^^^^^^^^^^
error: `#[bar]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:275:5
+ --> $DIR/subdiagnostic-derive.rs:274:5
|
LL | #[bar]
| ^^^^^^
@@ -155,13 +155,13 @@ LL | #[bar]
= help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
error: `#[bar = ...]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:286:5
+ --> $DIR/subdiagnostic-derive.rs:285:5
|
LL | #[bar = "..."]
| ^^^^^^^^^^^^^^
error: `#[bar(...)]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:297:5
+ --> $DIR/subdiagnostic-derive.rs:296:5
|
LL | #[bar("...")]
| ^^^^^^^^^^^^^
@@ -169,73 +169,73 @@ LL | #[bar("...")]
= help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
error: a diagnostic slug must be the first argument to the attribute
- --> $DIR/subdiagnostic-derive.rs:329:44
+ --> $DIR/subdiagnostic-derive.rs:328:44
|
LL | #[label(no_crate_example, no_crate::example)]
| ^
error: specified multiple times
- --> $DIR/subdiagnostic-derive.rs:342:5
+ --> $DIR/subdiagnostic-derive.rs:341:5
|
LL | #[primary_span]
| ^^^^^^^^^^^^^^^
|
note: previously specified here
- --> $DIR/subdiagnostic-derive.rs:339:5
+ --> $DIR/subdiagnostic-derive.rs:338:5
|
LL | #[primary_span]
| ^^^^^^^^^^^^^^^
error: subdiagnostic kind not specified
- --> $DIR/subdiagnostic-derive.rs:348:8
+ --> $DIR/subdiagnostic-derive.rs:347:8
|
LL | struct AG {
| ^^
error: specified multiple times
- --> $DIR/subdiagnostic-derive.rs:385:46
+ --> $DIR/subdiagnostic-derive.rs:384:46
|
LL | #[suggestion(no_crate_example, code = "...", code = "...")]
| ^^^^
|
note: previously specified here
- --> $DIR/subdiagnostic-derive.rs:385:32
+ --> $DIR/subdiagnostic-derive.rs:384:32
|
LL | #[suggestion(no_crate_example, code = "...", code = "...")]
| ^^^^
error: specified multiple times
- --> $DIR/subdiagnostic-derive.rs:403:5
+ --> $DIR/subdiagnostic-derive.rs:402:5
|
LL | #[applicability]
| ^^^^^^^^^^^^^^^^
|
note: previously specified here
- --> $DIR/subdiagnostic-derive.rs:400:5
+ --> $DIR/subdiagnostic-derive.rs:399:5
|
LL | #[applicability]
| ^^^^^^^^^^^^^^^^
error: the `#[applicability]` attribute can only be applied to fields of type `Applicability`
- --> $DIR/subdiagnostic-derive.rs:413:5
+ --> $DIR/subdiagnostic-derive.rs:412:5
|
LL | #[applicability]
| ^^^^^^^^^^^^^^^^
error: suggestion without `code = "..."`
- --> $DIR/subdiagnostic-derive.rs:426:1
+ --> $DIR/subdiagnostic-derive.rs:425:1
|
LL | #[suggestion(no_crate_example)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: invalid applicability
- --> $DIR/subdiagnostic-derive.rs:436:62
+ --> $DIR/subdiagnostic-derive.rs:435:62
|
LL | #[suggestion(no_crate_example, code = "...", applicability = "foo")]
| ^^^^^
error: suggestion without `#[primary_span]` field
- --> $DIR/subdiagnostic-derive.rs:454:1
+ --> $DIR/subdiagnostic-derive.rs:453:1
|
LL | / #[suggestion(no_crate_example, code = "...")]
LL | |
@@ -245,25 +245,25 @@ LL | | }
| |_^
error: unsupported type attribute for subdiagnostic enum
- --> $DIR/subdiagnostic-derive.rs:468:1
+ --> $DIR/subdiagnostic-derive.rs:467:1
|
LL | #[label]
| ^^^^^^^^
error: `var` doesn't refer to a field on this type
- --> $DIR/subdiagnostic-derive.rs:488:39
+ --> $DIR/subdiagnostic-derive.rs:487:39
|
LL | #[suggestion(no_crate_example, code = "{var}", applicability = "machine-applicable")]
| ^^^^^^^
error: `var` doesn't refer to a field on this type
- --> $DIR/subdiagnostic-derive.rs:507:43
+ --> $DIR/subdiagnostic-derive.rs:506:43
|
LL | #[suggestion(no_crate_example, code = "{var}", applicability = "machine-applicable")]
| ^^^^^^^
error: `#[suggestion_part]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:530:5
+ --> $DIR/subdiagnostic-derive.rs:529:5
|
LL | #[suggestion_part]
| ^^^^^^^^^^^^^^^^^^
@@ -271,7 +271,7 @@ LL | #[suggestion_part]
= help: `#[suggestion_part(...)]` is only valid in multipart suggestions, use `#[primary_span]` instead
error: `#[suggestion_part(...)]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:533:5
+ --> $DIR/subdiagnostic-derive.rs:532:5
|
LL | #[suggestion_part(code = "...")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -279,7 +279,7 @@ LL | #[suggestion_part(code = "...")]
= help: `#[suggestion_part(...)]` is only valid in multipart suggestions
error: suggestion without `#[primary_span]` field
- --> $DIR/subdiagnostic-derive.rs:527:1
+ --> $DIR/subdiagnostic-derive.rs:526:1
|
LL | / #[suggestion(no_crate_example, code = "...")]
LL | |
@@ -291,7 +291,7 @@ LL | | }
| |_^
error: invalid nested attribute
- --> $DIR/subdiagnostic-derive.rs:542:42
+ --> $DIR/subdiagnostic-derive.rs:541:42
|
LL | #[multipart_suggestion(no_crate_example, code = "...", applicability = "machine-applicable")]
| ^^^^
@@ -299,7 +299,7 @@ LL | #[multipart_suggestion(no_crate_example, code = "...", applicability = "mac
= help: only `no_span`, `style` and `applicability` are valid nested attributes
error: multipart suggestion without any `#[suggestion_part(...)]` fields
- --> $DIR/subdiagnostic-derive.rs:542:1
+ --> $DIR/subdiagnostic-derive.rs:541:1
|
LL | / #[multipart_suggestion(no_crate_example, code = "...", applicability = "machine-applicable")]
LL | |
@@ -310,19 +310,19 @@ LL | | }
| |_^
error: `#[suggestion_part(...)]` attribute without `code = "..."`
- --> $DIR/subdiagnostic-derive.rs:552:5
+ --> $DIR/subdiagnostic-derive.rs:551:5
|
LL | #[suggestion_part]
| ^^^^^^^^^^^^^^^^^^
error: `#[suggestion_part(...)]` attribute without `code = "..."`
- --> $DIR/subdiagnostic-derive.rs:560:5
+ --> $DIR/subdiagnostic-derive.rs:559:5
|
LL | #[suggestion_part()]
| ^^^^^^^^^^^^^^^^^^^^
error: `#[primary_span]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:569:5
+ --> $DIR/subdiagnostic-derive.rs:568:5
|
LL | #[primary_span]
| ^^^^^^^^^^^^^^^
@@ -330,7 +330,7 @@ LL | #[primary_span]
= help: multipart suggestions use one or more `#[suggestion_part]`s rather than one `#[primary_span]`
error: multipart suggestion without any `#[suggestion_part(...)]` fields
- --> $DIR/subdiagnostic-derive.rs:566:1
+ --> $DIR/subdiagnostic-derive.rs:565:1
|
LL | / #[multipart_suggestion(no_crate_example)]
LL | |
@@ -342,91 +342,91 @@ LL | | }
| |_^
error: `#[suggestion_part(...)]` attribute without `code = "..."`
- --> $DIR/subdiagnostic-derive.rs:577:5
+ --> $DIR/subdiagnostic-derive.rs:576:5
|
LL | #[suggestion_part]
| ^^^^^^^^^^^^^^^^^^
error: `#[suggestion_part(...)]` attribute without `code = "..."`
- --> $DIR/subdiagnostic-derive.rs:580:5
+ --> $DIR/subdiagnostic-derive.rs:579:5
|
LL | #[suggestion_part()]
| ^^^^^^^^^^^^^^^^^^^^
error: `code` is the only valid nested attribute
- --> $DIR/subdiagnostic-derive.rs:583:23
+ --> $DIR/subdiagnostic-derive.rs:582:23
|
LL | #[suggestion_part(foo = "bar")]
| ^^^
error: the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
- --> $DIR/subdiagnostic-derive.rs:588:5
+ --> $DIR/subdiagnostic-derive.rs:587:5
|
LL | #[suggestion_part(code = "...")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
- --> $DIR/subdiagnostic-derive.rs:591:5
+ --> $DIR/subdiagnostic-derive.rs:590:5
|
LL | #[suggestion_part()]
| ^^^^^^^^^^^^^^^^^^^^
error: specified multiple times
- --> $DIR/subdiagnostic-derive.rs:599:37
+ --> $DIR/subdiagnostic-derive.rs:598:37
|
LL | #[suggestion_part(code = "...", code = ",,,")]
| ^^^^
|
note: previously specified here
- --> $DIR/subdiagnostic-derive.rs:599:23
+ --> $DIR/subdiagnostic-derive.rs:598:23
|
LL | #[suggestion_part(code = "...", code = ",,,")]
| ^^^^
error: `#[applicability]` has no effect if all `#[suggestion]`/`#[multipart_suggestion]` attributes have a static `applicability = "..."`
- --> $DIR/subdiagnostic-derive.rs:628:5
+ --> $DIR/subdiagnostic-derive.rs:627:5
|
LL | #[applicability]
| ^^^^^^^^^^^^^^^^
error: expected exactly one string literal for `code = ...`
- --> $DIR/subdiagnostic-derive.rs:676:34
+ --> $DIR/subdiagnostic-derive.rs:675:34
|
LL | #[suggestion_part(code("foo"))]
| ^
error: expected exactly one string literal for `code = ...`
- --> $DIR/subdiagnostic-derive.rs:687:41
+ --> $DIR/subdiagnostic-derive.rs:686:41
|
LL | #[suggestion_part(code("foo", "bar"))]
| ^
error: expected exactly one string literal for `code = ...`
- --> $DIR/subdiagnostic-derive.rs:698:30
+ --> $DIR/subdiagnostic-derive.rs:697:30
|
LL | #[suggestion_part(code(3))]
| ^
error: expected exactly one string literal for `code = ...`
- --> $DIR/subdiagnostic-derive.rs:709:29
+ --> $DIR/subdiagnostic-derive.rs:708:29
|
LL | #[suggestion_part(code())]
| ^
error: specified multiple times
- --> $DIR/subdiagnostic-derive.rs:764:1
+ --> $DIR/subdiagnostic-derive.rs:763:1
|
LL | #[suggestion(no_crate_example, code = "", style = "hidden", style = "normal")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: previously specified here
- --> $DIR/subdiagnostic-derive.rs:764:1
+ --> $DIR/subdiagnostic-derive.rs:763:1
|
LL | #[suggestion(no_crate_example, code = "", style = "hidden", style = "normal")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `#[suggestion_hidden(...)]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:773:1
+ --> $DIR/subdiagnostic-derive.rs:772:1
|
LL | #[suggestion_hidden(no_crate_example, code = "")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -434,7 +434,7 @@ LL | #[suggestion_hidden(no_crate_example, code = "")]
= help: Use `#[suggestion(..., style = "hidden")]` instead
error: `#[suggestion_hidden(...)]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:781:1
+ --> $DIR/subdiagnostic-derive.rs:780:1
|
LL | #[suggestion_hidden(no_crate_example, code = "", style = "normal")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -442,7 +442,7 @@ LL | #[suggestion_hidden(no_crate_example, code = "", style = "normal")]
= help: Use `#[suggestion(..., style = "hidden")]` instead
error: invalid suggestion style
- --> $DIR/subdiagnostic-derive.rs:789:51
+ --> $DIR/subdiagnostic-derive.rs:788:51
|
LL | #[suggestion(no_crate_example, code = "", style = "foo")]
| ^^^^^
@@ -450,25 +450,25 @@ LL | #[suggestion(no_crate_example, code = "", style = "foo")]
= help: valid styles are `normal`, `short`, `hidden`, `verbose` and `tool-only`
error: expected `= "xxx"`
- --> $DIR/subdiagnostic-derive.rs:797:49
+ --> $DIR/subdiagnostic-derive.rs:796:49
|
LL | #[suggestion(no_crate_example, code = "", style = 42)]
| ^
error: a diagnostic slug must be the first argument to the attribute
- --> $DIR/subdiagnostic-derive.rs:805:48
+ --> $DIR/subdiagnostic-derive.rs:804:48
|
LL | #[suggestion(no_crate_example, code = "", style)]
| ^
error: expected `= "xxx"`
- --> $DIR/subdiagnostic-derive.rs:813:48
+ --> $DIR/subdiagnostic-derive.rs:812:48
|
LL | #[suggestion(no_crate_example, code = "", style("foo"))]
| ^
error: `#[primary_span]` is not a valid attribute
- --> $DIR/subdiagnostic-derive.rs:826:5
+ --> $DIR/subdiagnostic-derive.rs:825:5
|
LL | #[primary_span]
| ^^^^^^^^^^^^^^^
@@ -477,7 +477,7 @@ LL | #[primary_span]
= help: to create a suggestion with multiple spans, use `#[multipart_suggestion]` instead
error: suggestion without `#[primary_span]` field
- --> $DIR/subdiagnostic-derive.rs:823:1
+ --> $DIR/subdiagnostic-derive.rs:822:1
|
LL | / #[suggestion(no_crate_example, code = "")]
LL | |
@@ -489,115 +489,115 @@ LL | | }
| |_^
error[E0433]: failed to resolve: maybe a missing crate `core`?
- --> $DIR/subdiagnostic-derive.rs:97:9
+ --> $DIR/subdiagnostic-derive.rs:96:9
|
LL | #[label("...")]
| ^^^^^ maybe a missing crate `core`?
error[E0433]: failed to resolve: maybe a missing crate `core`?
- --> $DIR/subdiagnostic-derive.rs:313:1
+ --> $DIR/subdiagnostic-derive.rs:312:1
|
LL | union AC {
| ^^^^^ maybe a missing crate `core`?
error[E0433]: failed to resolve: maybe a missing crate `core`?
- --> $DIR/subdiagnostic-derive.rs:583:27
+ --> $DIR/subdiagnostic-derive.rs:582:27
|
LL | #[suggestion_part(foo = "bar")]
| ^ maybe a missing crate `core`?
error[E0433]: failed to resolve: maybe a missing crate `core`?
- --> $DIR/subdiagnostic-derive.rs:676:28
+ --> $DIR/subdiagnostic-derive.rs:675:28
|
LL | #[suggestion_part(code("foo"))]
| ^^^^^ maybe a missing crate `core`?
error[E0433]: failed to resolve: maybe a missing crate `core`?
- --> $DIR/subdiagnostic-derive.rs:687:28
+ --> $DIR/subdiagnostic-derive.rs:686:28
|
LL | #[suggestion_part(code("foo", "bar"))]
| ^^^^^ maybe a missing crate `core`?
error[E0433]: failed to resolve: maybe a missing crate `core`?
- --> $DIR/subdiagnostic-derive.rs:698:28
+ --> $DIR/subdiagnostic-derive.rs:697:28
|
LL | #[suggestion_part(code(3))]
| ^ maybe a missing crate `core`?
error[E0433]: failed to resolve: maybe a missing crate `core`?
- --> $DIR/subdiagnostic-derive.rs:721:30
+ --> $DIR/subdiagnostic-derive.rs:720:30
|
LL | #[suggestion_part(code = 3)]
| ^ maybe a missing crate `core`?
error[E0433]: failed to resolve: maybe a missing crate `core`?
- --> $DIR/subdiagnostic-derive.rs:813:48
+ --> $DIR/subdiagnostic-derive.rs:812:48
|
LL | #[suggestion(no_crate_example, code = "", style("foo"))]
| ^ maybe a missing crate `core`?
error: cannot find attribute `foo` in this scope
- --> $DIR/subdiagnostic-derive.rs:68:3
+ --> $DIR/subdiagnostic-derive.rs:67:3
|
LL | #[foo]
| ^^^
error: cannot find attribute `foo` in this scope
- --> $DIR/subdiagnostic-derive.rs:164:3
+ --> $DIR/subdiagnostic-derive.rs:163:3
|
LL | #[foo]
| ^^^
error: cannot find attribute `bar` in this scope
- --> $DIR/subdiagnostic-derive.rs:178:7
+ --> $DIR/subdiagnostic-derive.rs:177:7
|
LL | #[bar]
| ^^^
error: cannot find attribute `bar` in this scope
- --> $DIR/subdiagnostic-derive.rs:190:7
+ --> $DIR/subdiagnostic-derive.rs:189:7
|
LL | #[bar = "..."]
| ^^^
error: cannot find attribute `bar` in this scope
- --> $DIR/subdiagnostic-derive.rs:202:7
+ --> $DIR/subdiagnostic-derive.rs:201:7
|
LL | #[bar = 4]
| ^^^
error: cannot find attribute `bar` in this scope
- --> $DIR/subdiagnostic-derive.rs:214:7
+ --> $DIR/subdiagnostic-derive.rs:213:7
|
LL | #[bar("...")]
| ^^^
error: cannot find attribute `bar` in this scope
- --> $DIR/subdiagnostic-derive.rs:275:7
+ --> $DIR/subdiagnostic-derive.rs:274:7
|
LL | #[bar]
| ^^^
error: cannot find attribute `bar` in this scope
- --> $DIR/subdiagnostic-derive.rs:286:7
+ --> $DIR/subdiagnostic-derive.rs:285:7
|
LL | #[bar = "..."]
| ^^^
error: cannot find attribute `bar` in this scope
- --> $DIR/subdiagnostic-derive.rs:297:7
+ --> $DIR/subdiagnostic-derive.rs:296:7
|
LL | #[bar("...")]
| ^^^
error[E0425]: cannot find value `slug` in module `crate::fluent_generated`
- --> $DIR/subdiagnostic-derive.rs:127:9
+ --> $DIR/subdiagnostic-derive.rs:126:9
|
LL | #[label(slug)]
| ^^^^ not found in `crate::fluent_generated`
error[E0425]: cannot find value `__code_29` in this scope
- --> $DIR/subdiagnostic-derive.rs:715:10
+ --> $DIR/subdiagnostic-derive.rs:714:10
|
LL | #[derive(Subdiagnostic)]
| ^^^^^^^^^^^^^ not found in this scope
diff --git a/tests/ui-fulldeps/stable-mir/check_abi.rs b/tests/ui-fulldeps/stable-mir/check_abi.rs
new file mode 100644
index 000000000..30b42bc3b
--- /dev/null
+++ b/tests/ui-fulldeps/stable-mir/check_abi.rs
@@ -0,0 +1,143 @@
+// run-pass
+//! Test information regarding type layout.
+
+// ignore-stage1
+// ignore-cross-compile
+// ignore-remote
+// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837
+
+#![feature(rustc_private)]
+#![feature(assert_matches)]
+#![feature(control_flow_enum)]
+#![feature(ascii_char, ascii_char_variants)]
+
+extern crate rustc_hir;
+extern crate rustc_middle;
+#[macro_use]
+extern crate rustc_smir;
+extern crate rustc_driver;
+extern crate rustc_interface;
+extern crate stable_mir;
+
+use rustc_middle::ty::TyCtxt;
+use rustc_smir::rustc_internal;
+use stable_mir::abi::{ArgAbi, CallConvention, FieldsShape, PassMode, VariantsShape};
+use stable_mir::mir::mono::Instance;
+use stable_mir::{CrateDef, CrateItem, CrateItems, ItemKind};
+use std::assert_matches::assert_matches;
+use std::convert::TryFrom;
+use std::io::Write;
+use std::ops::ControlFlow;
+
+const CRATE_NAME: &str = "input";
+
+/// This function uses the Stable MIR APIs to get information about the test crate.
+fn test_stable_mir(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
+ // Find items in the local crate.
+ let items = stable_mir::all_local_items();
+
+ // Test fn_abi
+ let target_fn = *get_item(&items, (ItemKind::Fn, "fn_abi")).unwrap();
+ let instance = Instance::try_from(target_fn).unwrap();
+ let fn_abi = instance.fn_abi().unwrap();
+ assert_eq!(fn_abi.conv, CallConvention::Rust);
+ assert_eq!(fn_abi.args.len(), 2);
+
+ check_ignore(&fn_abi.args[0]);
+ check_primitive(&fn_abi.args[1]);
+ check_result(fn_abi.ret);
+
+ // Test variadic function.
+ let variadic_fn = *get_item(&items, (ItemKind::Fn, "variadic_fn")).unwrap();
+ check_variadic(variadic_fn);
+
+ ControlFlow::Continue(())
+}
+
+/// Check the variadic function ABI:
+/// ```no_run
+/// pub unsafe extern "C" fn variadic_fn(n: usize, mut args: ...) -> usize {
+/// 0
+/// }
+/// ```
+fn check_variadic(variadic_fn: CrateItem) {
+ let instance = Instance::try_from(variadic_fn).unwrap();
+ let abi = instance.fn_abi().unwrap();
+ assert!(abi.c_variadic);
+ assert_eq!(abi.args.len(), 1);
+}
+
+/// Check the argument to be ignored: `ignore: [u8; 0]`.
+fn check_ignore(abi: &ArgAbi) {
+ assert!(abi.ty.kind().is_array());
+ assert_eq!(abi.mode, PassMode::Ignore);
+ let layout = abi.layout.shape();
+ assert!(layout.is_sized());
+ assert!(layout.is_1zst());
+}
+
+/// Check the primitive argument: `primitive: char`.
+fn check_primitive(abi: &ArgAbi) {
+ assert!(abi.ty.kind().is_char());
+ assert_matches!(abi.mode, PassMode::Direct(_));
+ let layout = abi.layout.shape();
+ assert!(layout.is_sized());
+ assert!(!layout.is_1zst());
+ assert_matches!(layout.fields, FieldsShape::Primitive);
+}
+
+/// Check the return value: `Result<usize, &str>`.
+fn check_result(abi: ArgAbi) {
+ assert!(abi.ty.kind().is_enum());
+ assert_matches!(abi.mode, PassMode::Indirect { .. });
+ let layout = abi.layout.shape();
+ assert!(layout.is_sized());
+ assert_matches!(layout.fields, FieldsShape::Arbitrary { .. });
+ assert_matches!(layout.variants, VariantsShape::Multiple { .. })
+}
+
+fn get_item<'a>(
+ items: &'a CrateItems,
+ item: (ItemKind, &str),
+) -> Option<&'a stable_mir::CrateItem> {
+ items.iter().find(|crate_item| (item.0 == crate_item.kind()) && crate_item.name() == item.1)
+}
+
+/// This test will generate and analyze a dummy crate using the stable mir.
+/// For that, it will first write the dummy crate into a file.
+/// Then it will create a `StableMir` using custom arguments and then
+/// it will run the compiler.
+fn main() {
+ let path = "alloc_input.rs";
+ generate_input(&path).unwrap();
+ let args = vec![
+ "rustc".to_string(),
+ "--crate-type=lib".to_string(),
+ "--crate-name".to_string(),
+ CRATE_NAME.to_string(),
+ path.to_string(),
+ ];
+ run!(args, tcx, test_stable_mir(tcx)).unwrap();
+}
+
+fn generate_input(path: &str) -> std::io::Result<()> {
+ let mut file = std::fs::File::create(path)?;
+ write!(
+ file,
+ r#"
+ #![feature(c_variadic)]
+ #![allow(unused_variables)]
+
+ pub fn fn_abi(ignore: [u8; 0], primitive: char) -> Result<usize, &'static str> {{
+ // We only care about the signature.
+ todo!()
+ }}
+
+
+ pub unsafe extern "C" fn variadic_fn(n: usize, mut args: ...) -> usize {{
+ 0
+ }}
+ "#
+ )?;
+ Ok(())
+}
diff --git a/tests/ui-fulldeps/stable-mir/check_allocation.rs b/tests/ui-fulldeps/stable-mir/check_allocation.rs
new file mode 100644
index 000000000..b13f76452
--- /dev/null
+++ b/tests/ui-fulldeps/stable-mir/check_allocation.rs
@@ -0,0 +1,277 @@
+// run-pass
+//! Test that users are able to use stable mir APIs to retrieve information of global allocations
+//! such as `vtable_allocation`.
+
+// ignore-stage1
+// ignore-cross-compile
+// ignore-remote
+// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837
+// edition: 2021
+
+#![feature(rustc_private)]
+#![feature(assert_matches)]
+#![feature(control_flow_enum)]
+#![feature(ascii_char, ascii_char_variants)]
+#![feature(c_str_literals)]
+
+extern crate rustc_hir;
+extern crate rustc_middle;
+#[macro_use]
+extern crate rustc_smir;
+extern crate rustc_driver;
+extern crate rustc_interface;
+extern crate stable_mir;
+
+use rustc_middle::ty::TyCtxt;
+use rustc_smir::rustc_internal;
+use stable_mir::crate_def::CrateDef;
+use stable_mir::mir::alloc::GlobalAlloc;
+use stable_mir::mir::mono::{Instance, InstanceKind, StaticDef};
+use stable_mir::mir::{Body, TerminatorKind};
+use stable_mir::ty::{Allocation, ConstantKind, RigidTy, TyKind};
+use stable_mir::{CrateItem, CrateItems, ItemKind};
+use std::ascii::Char;
+use std::assert_matches::assert_matches;
+use std::cmp::{max, min};
+use std::collections::HashMap;
+use std::ffi::CStr;
+use std::io::Write;
+use std::ops::ControlFlow;
+
+const CRATE_NAME: &str = "input";
+
+/// This function uses the Stable MIR APIs to get information about the test crate.
+fn test_stable_mir(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
+ // Find items in the local crate.
+ let items = stable_mir::all_local_items();
+ check_foo(*get_item(&items, (ItemKind::Static, "FOO")).unwrap());
+ check_bar(*get_item(&items, (ItemKind::Static, "BAR")).unwrap());
+ check_len(*get_item(&items, (ItemKind::Static, "LEN")).unwrap());
+ check_cstr(*get_item(&items, (ItemKind::Static, "C_STR")).unwrap());
+ check_other_consts(*get_item(&items, (ItemKind::Fn, "other_consts")).unwrap());
+ check_type_id(*get_item(&items, (ItemKind::Fn, "check_type_id")).unwrap());
+ ControlFlow::Continue(())
+}
+
+/// Check the allocation data for static `FOO`.
+///
+/// ```no_run
+/// static FOO: [&str; 2] = ["hi", "there"];
+/// ```
+fn check_foo(item: CrateItem) {
+ let def = StaticDef::try_from(item).unwrap();
+ let alloc = def.eval_initializer().unwrap();
+ assert_eq!(alloc.provenance.ptrs.len(), 2);
+
+ let alloc_id_0 = alloc.provenance.ptrs[0].1.0;
+ assert_matches!(GlobalAlloc::from(alloc_id_0), GlobalAlloc::Memory(..));
+
+ let alloc_id_1 = alloc.provenance.ptrs[1].1.0;
+ assert_matches!(GlobalAlloc::from(alloc_id_1), GlobalAlloc::Memory(..));
+}
+
+/// Check the allocation data for static `BAR`.
+///
+/// ```no_run
+/// static BAR: &str = "Bar";
+/// ```
+fn check_bar(item: CrateItem) {
+ let def = StaticDef::try_from(item).unwrap();
+ let alloc = def.eval_initializer().unwrap();
+ assert_eq!(alloc.provenance.ptrs.len(), 1);
+
+ let alloc_id_0 = alloc.provenance.ptrs[0].1.0;
+ let GlobalAlloc::Memory(allocation) = GlobalAlloc::from(alloc_id_0) else { unreachable!() };
+ assert_eq!(allocation.bytes.len(), 3);
+ assert_eq!(allocation.bytes[0].unwrap(), Char::CapitalB.to_u8());
+ assert_eq!(allocation.bytes[1].unwrap(), Char::SmallA.to_u8());
+ assert_eq!(allocation.bytes[2].unwrap(), Char::SmallR.to_u8());
+ assert_eq!(std::str::from_utf8(&allocation.raw_bytes().unwrap()), Ok("Bar"));
+}
+
+/// Check the allocation data for static `C_STR`.
+///
+/// ```no_run
+/// static C_STR: &core::ffi::cstr = c"cstr";
+/// ```
+fn check_cstr(item: CrateItem) {
+ let def = StaticDef::try_from(item).unwrap();
+ let alloc = def.eval_initializer().unwrap();
+ assert_eq!(alloc.provenance.ptrs.len(), 1);
+ let deref = item.ty().kind().builtin_deref(true).unwrap();
+ assert!(deref.ty.kind().is_cstr(), "Expected CStr, but got: {:?}", item.ty());
+
+ let alloc_id_0 = alloc.provenance.ptrs[0].1.0;
+ let GlobalAlloc::Memory(allocation) = GlobalAlloc::from(alloc_id_0) else { unreachable!() };
+ assert_eq!(allocation.bytes.len(), 5);
+ assert_eq!(CStr::from_bytes_until_nul(&allocation.raw_bytes().unwrap()), Ok(c"cstr"));
+}
+
+/// Check the allocation data for constants used in `other_consts` function.
+fn check_other_consts(item: CrateItem) {
+ // Instance body will force constant evaluation.
+ let body = Instance::try_from(item).unwrap().body().unwrap();
+ let assigns = collect_consts(&body);
+ assert_eq!(assigns.len(), 9);
+ for (name, alloc) in assigns {
+ match name.as_str() {
+ "_max_u128" => {
+ assert_eq!(alloc.read_uint(), Ok(u128::MAX), "Failed parsing allocation: {alloc:?}")
+ }
+ "_min_i128" => {
+ assert_eq!(alloc.read_int(), Ok(i128::MIN), "Failed parsing allocation: {alloc:?}")
+ }
+ "_max_i8" => {
+ assert_eq!(
+ alloc.read_int().unwrap() as i8,
+ i8::MAX,
+ "Failed parsing allocation: {alloc:?}"
+ )
+ }
+ "_char" => {
+ assert_eq!(
+ char::from_u32(alloc.read_uint().unwrap() as u32),
+ Some('x'),
+ "Failed parsing allocation: {alloc:?}"
+ )
+ }
+ "_false" => {
+ assert_eq!(alloc.read_bool(), Ok(false), "Failed parsing allocation: {alloc:?}")
+ }
+ "_true" => {
+ assert_eq!(alloc.read_bool(), Ok(true), "Failed parsing allocation: {alloc:?}")
+ }
+ "_ptr" => {
+ assert_eq!(alloc.is_null(), Ok(false), "Failed parsing allocation: {alloc:?}")
+ }
+ "_null_ptr" => {
+ assert_eq!(alloc.is_null(), Ok(true), "Failed parsing allocation: {alloc:?}")
+ }
+ "_tuple" => {
+ // The order of fields is not guaranteed.
+ let first = alloc.read_partial_uint(0..4).unwrap();
+ let second = alloc.read_partial_uint(4..8).unwrap();
+ assert_eq!(max(first, second) as u32, u32::MAX);
+ assert_eq!(min(first, second), 10);
+ }
+ _ => {
+ unreachable!("{name} -- {alloc:?}")
+ }
+ }
+ }
+}
+
+/// Check that we can retrieve the type id of char and bool, and that they have different values.
+fn check_type_id(item: CrateItem) {
+ let body = Instance::try_from(item).unwrap().body().unwrap();
+ let mut ids: Vec<u128> = vec![];
+ for term in body.blocks.iter().map(|bb| &bb.terminator) {
+ match &term.kind {
+ TerminatorKind::Call { func, destination, .. } => {
+ let TyKind::RigidTy(ty) = func.ty(body.locals()).unwrap().kind() else {
+ unreachable!()
+ };
+ let RigidTy::FnDef(def, args) = ty else { unreachable!() };
+ let instance = Instance::resolve(def, &args).unwrap();
+ assert_eq!(instance.kind, InstanceKind::Intrinsic);
+ let dest_ty = destination.ty(body.locals()).unwrap();
+ let alloc = instance.try_const_eval(dest_ty).unwrap();
+ ids.push(alloc.read_uint().unwrap());
+ }
+ _ => { /* Do nothing */ }
+ }
+ }
+ assert_eq!(ids.len(), 2);
+ assert_ne!(ids[0], ids[1]);
+}
+
+/// Collects all the constant assignments.
+pub fn collect_consts(body: &Body) -> HashMap<String, &Allocation> {
+ body.var_debug_info
+ .iter()
+ .filter_map(|info| {
+ info.constant().map(|const_op| {
+ let ConstantKind::Allocated(alloc) = const_op.const_.kind() else { unreachable!() };
+ (info.name.clone(), alloc)
+ })
+ })
+ .collect::<HashMap<_, _>>()
+}
+
+/// Check the allocation data for `LEN`.
+///
+/// ```no_run
+/// static LEN: usize = 2;
+/// ```
+fn check_len(item: CrateItem) {
+ let def = StaticDef::try_from(item).unwrap();
+ let alloc = def.eval_initializer().unwrap();
+ assert!(alloc.provenance.ptrs.is_empty());
+ assert_eq!(alloc.read_uint(), Ok(2));
+}
+
+fn get_item<'a>(
+ items: &'a CrateItems,
+ item: (ItemKind, &str),
+) -> Option<&'a stable_mir::CrateItem> {
+ items.iter().find(|crate_item| (item.0 == crate_item.kind()) && crate_item.name() == item.1)
+}
+
+/// This test will generate and analyze a dummy crate using the stable mir.
+/// For that, it will first write the dummy crate into a file.
+/// Then it will create a `StableMir` using custom arguments and then
+/// it will run the compiler.
+fn main() {
+ let path = "alloc_input.rs";
+ generate_input(&path).unwrap();
+ let args = vec![
+ "rustc".to_string(),
+ "--edition=2021".to_string(),
+ "--crate-name".to_string(),
+ CRATE_NAME.to_string(),
+ path.to_string(),
+ ];
+ run!(args, tcx, test_stable_mir(tcx)).unwrap();
+}
+
+fn generate_input(path: &str) -> std::io::Result<()> {
+ let mut file = std::fs::File::create(path)?;
+ write!(
+ file,
+ r#"
+ #![feature(core_intrinsics)]
+ #![feature(c_str_literals)]
+ use std::intrinsics::type_id;
+
+ static LEN: usize = 2;
+ static FOO: [&str; 2] = ["hi", "there"];
+ static BAR: &str = "Bar";
+ static C_STR: &std::ffi::CStr = c"cstr";
+ const NULL: *const u8 = std::ptr::null();
+ const TUPLE: (u32, u32) = (10, u32::MAX);
+
+ fn other_consts() {{
+ let _max_u128 = u128::MAX;
+ let _min_i128 = i128::MIN;
+ let _max_i8 = i8::MAX;
+ let _char = 'x';
+ let _false = false;
+ let _true = true;
+ let _ptr = &BAR;
+ let _null_ptr: *const u8 = NULL;
+ let _tuple = TUPLE;
+ }}
+
+ fn check_type_id() {{
+ let _char_id = type_id::<char>();
+ let _bool_id = type_id::<bool>();
+ }}
+
+ pub fn main() {{
+ println!("{{FOO:?}}! {{BAR}}");
+ assert_eq!(FOO.len(), LEN);
+ other_consts();
+ }}"#
+ )?;
+ Ok(())
+}
diff --git a/tests/ui-fulldeps/stable-mir/check_defs.rs b/tests/ui-fulldeps/stable-mir/check_defs.rs
new file mode 100644
index 000000000..e9a2599d8
--- /dev/null
+++ b/tests/ui-fulldeps/stable-mir/check_defs.rs
@@ -0,0 +1,132 @@
+// run-pass
+//! Test that users are able to use stable mir APIs to retrieve information about crate definitions.
+
+// ignore-stage1
+// ignore-cross-compile
+// ignore-remote
+// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837
+// edition: 2021
+
+#![feature(rustc_private)]
+#![feature(assert_matches)]
+#![feature(control_flow_enum)]
+
+extern crate rustc_middle;
+#[macro_use]
+extern crate rustc_smir;
+extern crate rustc_driver;
+extern crate rustc_interface;
+extern crate stable_mir;
+
+use std::assert_matches::assert_matches;
+use mir::{mono::Instance, TerminatorKind::*};
+use rustc_middle::ty::TyCtxt;
+use rustc_smir::rustc_internal;
+use stable_mir::ty::{RigidTy, TyKind, Ty, UintTy};
+use stable_mir::*;
+use std::io::Write;
+use std::ops::ControlFlow;
+
+const CRATE_NAME: &str = "input";
+
+/// This function uses the Stable MIR APIs to get information about the test crate.
+fn test_stable_mir(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
+ let entry = stable_mir::entry_fn().unwrap();
+ let main_fn = Instance::try_from(entry).unwrap();
+ assert_eq!(main_fn.name(), "main");
+ assert_eq!(main_fn.trimmed_name(), "main");
+
+ let instances = get_instances(main_fn.body().unwrap());
+ assert_eq!(instances.len(), 2);
+ test_fn(instances[0], "from_u32", "std::char::from_u32", "core");
+ test_fn(instances[1], "Vec::<u8>::new", "std::vec::Vec::<u8>::new", "alloc");
+ test_vec_new(instances[1]);
+ ControlFlow::Continue(())
+}
+
+fn test_fn(instance: Instance, expected_trimmed: &str, expected_qualified: &str, krate: &str) {
+ let trimmed = instance.trimmed_name();
+ let qualified = instance.name();
+ assert_eq!(&trimmed, expected_trimmed);
+ assert_eq!(&qualified, expected_qualified);
+
+ let item = CrateItem::try_from(instance).unwrap();
+ let trimmed = item.trimmed_name();
+ let qualified = item.name();
+ assert_eq!(trimmed, expected_trimmed.replace("u8", "T"));
+ assert_eq!(qualified, expected_qualified.replace("u8", "T"));
+ assert_eq!(&item.krate().name, krate);
+}
+
+fn extract_elem_ty(ty: Ty) -> Ty {
+ match ty.kind() {
+ TyKind::RigidTy(RigidTy::Adt(_, args)) => {
+ *args.0[0].expect_ty()
+ }
+ _ => unreachable!("Expected Vec ADT, but found: {ty:?}")
+ }
+}
+
+/// Check signature and type of `Vec::<u8>::new` and its generic version.
+fn test_vec_new(instance: mir::mono::Instance) {
+ let sig = instance.fn_abi().unwrap();
+ assert_eq!(&sig.args, &[]);
+ let elem_ty = extract_elem_ty(sig.ret.ty);
+ assert_matches!(elem_ty.kind(), TyKind::RigidTy(RigidTy::Uint(UintTy::U8)));
+
+ // Get the signature for Vec::<T>::new.
+ let item = CrateItem::try_from(instance).unwrap();
+ let ty = item.ty();
+ let gen_sig = ty.kind().fn_sig().unwrap().skip_binder();
+ let gen_ty = extract_elem_ty(gen_sig.output());
+ assert_matches!(gen_ty.kind(), TyKind::Param(_));
+}
+
+/// Inspect the instance body
+fn get_instances(body: mir::Body) -> Vec<Instance> {
+ body.blocks.iter().filter_map(|bb| {
+ match &bb.terminator.kind {
+ Call { func, .. } => {
+ let TyKind::RigidTy(ty) = func.ty(body.locals()).unwrap().kind() else { unreachable!
+ () };
+ let RigidTy::FnDef(def, args) = ty else { unreachable!() };
+ Instance::resolve(def, &args).ok()
+ }
+ _ => {
+ None
+ }
+ }
+ }).collect::<Vec<_>>()
+}
+
+/// This test will generate and analyze a dummy crate using the stable mir.
+/// For that, it will first write the dummy crate into a file.
+/// Then it will create a `StableMir` using custom arguments and then
+/// it will run the compiler.
+fn main() {
+ let path = "defs_input.rs";
+ generate_input(&path).unwrap();
+ let args = vec![
+ "rustc".to_string(),
+ "-Cpanic=abort".to_string(),
+ "--crate-name".to_string(),
+ CRATE_NAME.to_string(),
+ path.to_string(),
+ ];
+ run!(args, tcx, test_stable_mir(tcx)).unwrap();
+}
+
+fn generate_input(path: &str) -> std::io::Result<()> {
+ let mut file = std::fs::File::create(path)?;
+ write!(
+ file,
+ r#"
+
+ fn main() {{
+ let _c = core::char::from_u32(99);
+ let _v = Vec::<u8>::new();
+ }}
+ "#
+ )?;
+ Ok(())
+}
diff --git a/tests/ui-fulldeps/stable-mir/check_instance.rs b/tests/ui-fulldeps/stable-mir/check_instance.rs
index a34087775..5cb07eabf 100644
--- a/tests/ui-fulldeps/stable-mir/check_instance.rs
+++ b/tests/ui-fulldeps/stable-mir/check_instance.rs
@@ -49,7 +49,7 @@ fn test_stable_mir(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
assert!(generic.iter().all(|item| mir::mono::Instance::try_from(*item).is_err()));
for instance in instances {
- test_body(instance.body())
+ test_body(instance.body().unwrap())
}
ControlFlow::Continue(())
}
@@ -59,10 +59,17 @@ fn test_body(body: mir::Body) {
for term in body.blocks.iter().map(|bb| &bb.terminator) {
match &term.kind {
Call { func, .. } => {
- let TyKind::RigidTy(ty) = func.ty(body.locals()).kind() else { unreachable!() };
+ let TyKind::RigidTy(ty) = func.ty(body.locals()).unwrap().kind() else { unreachable!
+ () };
let RigidTy::FnDef(def, args) = ty else { unreachable!() };
- let result = Instance::resolve(def, &args);
- assert!(result.is_ok());
+ let instance = Instance::resolve(def, &args).unwrap();
+ let mangled_name = instance.mangled_name();
+ assert!(instance.has_body() || (mangled_name == "setpwent"), "Failed: {func:?}");
+ assert!(instance.has_body() ^ instance.is_foreign_item());
+ if instance.has_body() {
+ let body = instance.body().unwrap();
+ assert!(!body.locals().is_empty(), "Body must at least have a return local");
+ }
}
Goto { .. } | Assert { .. } | SwitchInt { .. } | Return | Drop { .. } => {
/* Do nothing */
@@ -105,10 +112,16 @@ fn generate_input(path: &str) -> std::io::Result<()> {
LEN > 0 && a[0]
}}
+ extern "C" {{
+ // Body should not be available.
+ fn setpwent();
+ }}
+
pub fn monomorphic() {{
let v = vec![10];
let dup = ty_param(&v);
assert_eq!(v, dup);
+ unsafe {{ setpwent() }};
}}
pub mod foo {{
diff --git a/tests/ui-fulldeps/stable-mir/check_item_kind.rs b/tests/ui-fulldeps/stable-mir/check_item_kind.rs
new file mode 100644
index 000000000..72e0e09e6
--- /dev/null
+++ b/tests/ui-fulldeps/stable-mir/check_item_kind.rs
@@ -0,0 +1,84 @@
+// run-pass
+//! Test that item kind works as expected.
+
+// ignore-stage1
+// ignore-cross-compile
+// ignore-remote
+// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837
+// edition: 2021
+
+#![feature(rustc_private)]
+#![feature(assert_matches)]
+#![feature(control_flow_enum)]
+
+extern crate rustc_middle;
+#[macro_use]
+extern crate rustc_smir;
+extern crate rustc_driver;
+extern crate rustc_interface;
+extern crate stable_mir;
+
+use rustc_middle::ty::TyCtxt;
+use rustc_smir::rustc_internal;
+use stable_mir::*;
+use std::io::Write;
+use std::ops::ControlFlow;
+
+const CRATE_NAME: &str = "input";
+
+/// This function uses the Stable MIR APIs to get information about the test crate.
+fn test_item_kind(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
+ let items = stable_mir::all_local_items();
+ assert_eq!(items.len(), 4);
+ // Constructor item.
+ for item in items {
+ let expected_kind = match item.name().as_str() {
+ "Dummy" => ItemKind::Ctor(CtorKind::Fn),
+ "dummy" => ItemKind::Fn,
+ "unit" => ItemKind::Fn,
+ "DUMMY_CONST" => ItemKind::Const,
+ name => unreachable!("Unexpected item {name}"),
+ };
+ assert_eq!(item.kind(), expected_kind, "Mismatched type for {}", item.name());
+ }
+ ControlFlow::Continue(())
+}
+
+/// This test will generate and analyze a dummy crate using the stable mir.
+/// For that, it will first write the dummy crate into a file.
+/// Then it will create a `StableMir` using custom arguments and then
+/// it will run the compiler.
+fn main() {
+ let path = "item_kind_input.rs";
+ generate_input(&path).unwrap();
+ let args = vec![
+ "rustc".to_string(),
+ "-Cpanic=abort".to_string(),
+ "--crate-type=lib".to_string(),
+ "--crate-name".to_string(),
+ CRATE_NAME.to_string(),
+ path.to_string(),
+ ];
+ run!(args, tcx, test_item_kind(tcx)).unwrap();
+}
+
+fn generate_input(path: &str) -> std::io::Result<()> {
+ let mut file = std::fs::File::create(path)?;
+ write!(
+ file,
+ r#"
+ pub struct Dummy(u32);
+ pub const DUMMY_CONST: Dummy = Dummy(0);
+ pub struct DummyUnit;
+
+ pub fn dummy() -> Dummy {{
+ Dummy(5)
+ }}
+
+ pub fn unit() -> DummyUnit {{
+ DummyUnit
+ }}
+ "#
+ )?;
+ Ok(())
+}
diff --git a/tests/ui-fulldeps/stable-mir/check_ty_fold.rs b/tests/ui-fulldeps/stable-mir/check_ty_fold.rs
new file mode 100644
index 000000000..b90d47d45
--- /dev/null
+++ b/tests/ui-fulldeps/stable-mir/check_ty_fold.rs
@@ -0,0 +1,115 @@
+// run-pass
+//! Test that users are able to use stable mir APIs to retrieve monomorphized types, and that
+//! we have an error handling for trying to instantiate types with incorrect arguments.
+
+// ignore-stage1
+// ignore-cross-compile
+// ignore-remote
+// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837
+// edition: 2021
+
+#![feature(rustc_private)]
+#![feature(assert_matches)]
+#![feature(control_flow_enum)]
+
+extern crate rustc_middle;
+#[macro_use]
+extern crate rustc_smir;
+extern crate rustc_driver;
+extern crate rustc_interface;
+extern crate stable_mir;
+
+use rustc_middle::ty::TyCtxt;
+use rustc_smir::rustc_internal;
+use stable_mir::ty::{RigidTy, TyKind, Ty, };
+use stable_mir::mir::{Body, MirVisitor, FieldIdx, Place, ProjectionElem, visit::{Location,
+ PlaceContext}};
+use std::io::Write;
+use std::ops::ControlFlow;
+
+const CRATE_NAME: &str = "input";
+
+/// This function uses the Stable MIR APIs to get information about the test crate.
+fn test_stable_mir(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
+ let main_fn = stable_mir::entry_fn();
+ let body = main_fn.unwrap().body();
+ let mut visitor = PlaceVisitor{ body: &body, tested: false};
+ visitor.visit_body(&body);
+ assert!(visitor.tested);
+ ControlFlow::Continue(())
+}
+
+struct PlaceVisitor<'a> {
+ body: &'a Body,
+ /// Used to ensure that the test was reachable. Otherwise this test would vacuously succeed.
+ tested: bool,
+}
+
+/// Check that `wrapper.inner` place projection can be correctly interpreted.
+/// Ensure that instantiation is correct.
+fn check_tys(local_ty: Ty, idx: FieldIdx, expected_ty: Ty) {
+ let TyKind::RigidTy(RigidTy::Adt(def, args)) = local_ty.kind() else { unreachable!() };
+ assert_eq!(def.ty_with_args(&args), local_ty);
+
+ let field_def = &def.variants_iter().next().unwrap().fields()[idx];
+ let field_ty = field_def.ty_with_args(&args);
+ assert_eq!(field_ty, expected_ty);
+
+ // Check that the generic version is different than the instantiated one.
+ let field_ty_gen = field_def.ty();
+ assert_ne!(field_ty_gen, field_ty);
+}
+
+impl<'a> MirVisitor for PlaceVisitor<'a> {
+ fn visit_place(&mut self, place: &Place, _ptx: PlaceContext, _loc: Location) {
+ let start_ty = self.body.locals()[place.local].ty;
+ match place.projection.as_slice() {
+ [ProjectionElem::Field(idx, ty)] => {
+ check_tys(start_ty, *idx, *ty);
+ self.tested = true;
+ }
+ _ => {}
+ }
+ }
+}
+
+/// This test will generate and analyze a dummy crate using the stable mir.
+/// For that, it will first write the dummy crate into a file.
+/// Then it will create a `StableMir` using custom arguments and then
+/// it will run the compiler.
+fn main() {
+ let path = "ty_fold_input.rs";
+ generate_input(&path).unwrap();
+ let args = vec![
+ "rustc".to_string(),
+ "-Cpanic=abort".to_string(),
+ "--crate-name".to_string(),
+ CRATE_NAME.to_string(),
+ path.to_string(),
+ ];
+ run!(args, tcx, test_stable_mir(tcx)).unwrap();
+}
+
+fn generate_input(path: &str) -> std::io::Result<()> {
+ let mut file = std::fs::File::create(path)?;
+ write!(
+ file,
+ r#"
+ struct Wrapper<T: Default> {{
+ pub inner: T
+ }}
+
+ impl<T: Default> Wrapper<T> {{
+ pub fn new() -> Wrapper<T> {{
+ Wrapper {{ inner: T::default() }}
+ }}
+ }}
+
+ fn main() {{
+ let wrapper = Wrapper::<u8>::new();
+ let _inner = wrapper.inner;
+ }}
+ "#
+ )?;
+ Ok(())
+}
diff --git a/tests/ui-fulldeps/stable-mir/crate-info.rs b/tests/ui-fulldeps/stable-mir/crate-info.rs
index ed6b786f5..c2035430a 100644
--- a/tests/ui-fulldeps/stable-mir/crate-info.rs
+++ b/tests/ui-fulldeps/stable-mir/crate-info.rs
@@ -22,6 +22,8 @@ extern crate stable_mir;
use rustc_hir::def::DefKind;
use rustc_middle::ty::TyCtxt;
use rustc_smir::rustc_internal;
+use stable_mir::ItemKind;
+use stable_mir::crate_def::CrateDef;
use stable_mir::mir::mono::Instance;
use stable_mir::ty::{RigidTy, TyKind};
use std::assert_matches::assert_matches;
@@ -120,13 +122,14 @@ fn test_stable_mir(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
let monomorphic = get_item(&items, (DefKind::Fn, "monomorphic")).unwrap();
let instance = Instance::try_from(monomorphic.clone()).unwrap();
- for block in instance.body().blocks {
+ for block in instance.body().unwrap().blocks {
match &block.terminator.kind {
stable_mir::mir::TerminatorKind::Call { func, .. } => {
- let TyKind::RigidTy(ty) = func.ty(&body.locals()).kind() else { unreachable!() };
+ let TyKind::RigidTy(ty) = func.ty(&body.locals()).unwrap().kind() else {
+ unreachable!() };
let RigidTy::FnDef(def, args) = ty else { unreachable!() };
let next_func = Instance::resolve(def, &args).unwrap();
- match next_func.body().locals()[1].ty.kind() {
+ match next_func.body().unwrap().locals()[1].ty.kind() {
TyKind::RigidTy(RigidTy::Uint(_)) | TyKind::RigidTy(RigidTy::Tuple(_)) => {}
other => panic!("{other:?}"),
}
@@ -172,7 +175,8 @@ fn get_item<'a>(
item: (DefKind, &str),
) -> Option<&'a stable_mir::CrateItem> {
items.iter().find(|crate_item| {
- crate_item.kind().to_string() == format!("{:?}", item.0) && crate_item.name() == item.1
+ matches!((item.0, crate_item.kind()), (DefKind::Fn, ItemKind::Fn) | (DefKind::Const,
+ ItemKind::Const)) && crate_item.name() == item.1
})
}
diff --git a/tests/ui-fulldeps/stable-mir/projections.rs b/tests/ui-fulldeps/stable-mir/projections.rs
new file mode 100644
index 000000000..8c3fda7b6
--- /dev/null
+++ b/tests/ui-fulldeps/stable-mir/projections.rs
@@ -0,0 +1,180 @@
+// run-pass
+// Tests the Stable MIR projections API
+
+// ignore-stage1
+// ignore-cross-compile
+// ignore-remote
+// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837
+// edition: 2021
+
+#![feature(rustc_private)]
+#![feature(assert_matches)]
+#![feature(control_flow_enum)]
+
+extern crate rustc_hir;
+extern crate rustc_middle;
+#[macro_use]
+extern crate rustc_smir;
+extern crate rustc_driver;
+extern crate rustc_interface;
+extern crate stable_mir;
+
+use rustc_middle::ty::TyCtxt;
+use rustc_smir::rustc_internal;
+use stable_mir::crate_def::CrateDef;
+use stable_mir::mir::{ProjectionElem, Rvalue, StatementKind};
+use stable_mir::ty::{RigidTy, TyKind, UintTy};
+use stable_mir::ItemKind;
+use std::assert_matches::assert_matches;
+use std::io::Write;
+use std::ops::ControlFlow;
+
+const CRATE_NAME: &str = "input";
+
+/// Tests projections within Place objects
+fn test_place_projections(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
+ let items = stable_mir::all_local_items();
+ let body = get_item(&items, (ItemKind::Fn, "projections")).unwrap().body();
+ assert_eq!(body.blocks.len(), 4);
+ // The first statement assigns `&s.c` to a local. The projections include a deref for `s`, since
+ // `s` is passed as a reference argument, and a field access for field `c`.
+ match &body.blocks[0].statements[0].kind {
+ StatementKind::Assign(
+ place @ stable_mir::mir::Place { local: _, projection: local_proj },
+ Rvalue::Ref(_, _, stable_mir::mir::Place { local: _, projection: r_proj }),
+ ) => {
+ // We can't match on vecs, only on slices. Comparing statements for equality wouldn't be
+ // any easier since we'd then have to add in the expected local and region values
+ // instead of matching on wildcards.
+ assert!(local_proj.is_empty());
+ match &r_proj[..] {
+ // Similarly we can't match against a type, only against its kind.
+ [ProjectionElem::Deref, ProjectionElem::Field(2, ty)] => {
+ assert_matches!(
+ ty.kind(),
+ TyKind::RigidTy(RigidTy::Uint(stable_mir::ty::UintTy::U8))
+ );
+ let ty = place.ty(body.locals()).unwrap();
+ assert_matches!(ty.kind().rigid(), Some(RigidTy::Ref(..)));
+ },
+ other => panic!(
+ "Unable to match against expected rvalue projection. Expected the projection \
+ for `s.c`, which is a Deref and u8 Field. Got: {:?}",
+ other
+ ),
+ };
+ }
+ other => panic!(
+ "Unable to match against expected Assign statement with a Ref rvalue. Expected the \
+ statement to assign `&s.c` to a local. Got: {:?}",
+ other
+ ),
+ };
+ // This statement assigns `slice[1]` to a local. The projections include a deref for `slice`,
+ // since `slice` is a reference, and an index.
+ match &body.blocks[2].statements[0].kind {
+ StatementKind::Assign(
+ place @ stable_mir::mir::Place { local: _, projection: local_proj },
+ Rvalue::Use(stable_mir::mir::Operand::Copy(stable_mir::mir::Place {
+ local: _,
+ projection: r_proj,
+ })),
+ ) => {
+ // We can't match on vecs, only on slices. Comparing for equality wouldn't be any easier
+ // since we'd then have to add in the expected local values instead of matching on
+ // wildcards.
+ assert!(local_proj.is_empty());
+ assert_matches!(r_proj[..], [ProjectionElem::Deref, ProjectionElem::Index(_)]);
+ let ty = place.ty(body.locals()).unwrap();
+ assert_matches!(ty.kind().rigid(), Some(RigidTy::Uint(UintTy::U8)));
+ }
+ other => panic!(
+ "Unable to match against expected Assign statement with a Use rvalue. Expected the \
+ statement to assign `slice[1]` to a local. Got: {:?}",
+ other
+ ),
+ };
+ // The first terminator gets a slice of an array via the Index operation. Specifically it
+ // performs `&vals[1..3]`. There are no projections in this case, the arguments are just locals.
+ match &body.blocks[0].terminator.kind {
+ stable_mir::mir::TerminatorKind::Call { args, .. } =>
+ // We can't match on vecs, only on slices. Comparing for equality wouldn't be any easier
+ // since we'd then have to add in the expected local values instead of matching on
+ // wildcards.
+ {
+ match &args[..] {
+ [
+ stable_mir::mir::Operand::Move(stable_mir::mir::Place {
+ local: _,
+ projection: arg1_proj,
+ }),
+ stable_mir::mir::Operand::Move(stable_mir::mir::Place {
+ local: _,
+ projection: arg2_proj,
+ }),
+ ] => {
+ assert!(arg1_proj.is_empty());
+ assert!(arg2_proj.is_empty());
+ }
+ other => {
+ panic!(
+ "Unable to match against expected arguments to Index call. Expected two \
+ move operands. Got: {:?}",
+ other
+ )
+ }
+ }
+ }
+ other => panic!(
+ "Unable to match against expected Call terminator. Expected a terminator that calls \
+ the Index operation. Got: {:?}",
+ other
+ ),
+ };
+
+ ControlFlow::Continue(())
+}
+
+// Use internal API to find a function in a crate.
+fn get_item<'a>(
+ items: &'a stable_mir::CrateItems,
+ item: (ItemKind, &str),
+) -> Option<&'a stable_mir::CrateItem> {
+ items.iter().find(|crate_item| {
+ crate_item.kind() == item.0 && crate_item.name() == item.1
+ })
+}
+
+/// This test will generate and analyze a dummy crate using the stable mir.
+/// For that, it will first write the dummy crate into a file.
+/// Then it will create a `StableMir` using custom arguments and then
+/// it will run the compiler.
+fn main() {
+ let path = "input.rs";
+ generate_input(&path).unwrap();
+ let args = vec![
+ "rustc".to_string(),
+ "--crate-type=lib".to_string(),
+ "--crate-name".to_string(),
+ CRATE_NAME.to_string(),
+ path.to_string(),
+ ];
+ run!(args, tcx, test_place_projections(tcx)).unwrap();
+}
+
+fn generate_input(path: &str) -> std::io::Result<()> {
+ let mut file = std::fs::File::create(path)?;
+ write!(
+ file,
+ r#"
+ pub struct Struct1 {{ _a: u8, _b: u16, c: u8 }}
+
+ pub fn projections(s: &Struct1) -> u8 {{
+ let v = &s.c;
+ let vals = [1, 2, 3, 4];
+ let slice = &vals[1..3];
+ v + slice[1]
+ }}"#
+ )?;
+ Ok(())
+}
diff --git a/tests/ui-fulldeps/stable-mir/smir_visitor.rs b/tests/ui-fulldeps/stable-mir/smir_visitor.rs
index de5148bb5..027b0e7d9 100644
--- a/tests/ui-fulldeps/stable-mir/smir_visitor.rs
+++ b/tests/ui-fulldeps/stable-mir/smir_visitor.rs
@@ -40,7 +40,7 @@ fn test_visitor(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
let exit_fn = main_visitor.calls.last().unwrap();
assert!(exit_fn.mangled_name().contains("exit_fn"), "Unexpected last function: {exit_fn:?}");
- let exit_body = exit_fn.body();
+ let exit_body = exit_fn.body().unwrap();
let exit_visitor = TestVisitor::collect(&exit_body);
assert!(exit_visitor.ret_val.is_some());
assert_eq!(exit_visitor.args.len(), 1);
@@ -92,7 +92,8 @@ impl<'a> mir::MirVisitor for TestVisitor<'a> {
fn visit_terminator(&mut self, term: &mir::Terminator, location: mir::visit::Location) {
if let mir::TerminatorKind::Call { func, .. } = &term.kind {
- let ty::TyKind::RigidTy(ty) = func.ty(self.body.locals()).kind() else { unreachable!
+ let ty::TyKind::RigidTy(ty) = func.ty(self.body.locals()).unwrap().kind() else {
+ unreachable!
() };
let ty::RigidTy::FnDef(def, args) = ty else { unreachable!() };
self.calls.push(mir::mono::Instance::resolve(def, &args).unwrap());
diff --git a/tests/ui/abi/abi-typo-unstable.stderr b/tests/ui/abi/abi-typo-unstable.stderr
index 3b346e002..d31cc2a89 100644
--- a/tests/ui/abi/abi-typo-unstable.stderr
+++ b/tests/ui/abi/abi-typo-unstable.stderr
@@ -6,6 +6,6 @@ LL | extern "rust-intrinsec" fn rust_intrinsic() {}
|
= note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions.
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0703`.
diff --git a/tests/ui/abi/arm-unadjusted-intrinsic.rs b/tests/ui/abi/arm-unadjusted-intrinsic.rs
new file mode 100644
index 000000000..33ea79275
--- /dev/null
+++ b/tests/ui/abi/arm-unadjusted-intrinsic.rs
@@ -0,0 +1,54 @@
+// build-pass
+// revisions: arm
+//[arm] compile-flags: --target arm-unknown-linux-gnueabi
+//[arm] needs-llvm-components: arm
+// revisions: aarch64
+//[aarch64] compile-flags: --target aarch64-unknown-linux-gnu
+//[aarch64] needs-llvm-components: aarch64
+#![feature(
+ no_core, lang_items, link_llvm_intrinsics,
+ abi_unadjusted, repr_simd, arm_target_feature,
+)]
+#![no_std]
+#![no_core]
+#![crate_type = "lib"]
+#![allow(non_camel_case_types)]
+
+/// To work cross-target this test must be no_core.
+/// This little prelude supplies what we need.
+#[lang = "sized"]
+pub trait Sized {}
+
+#[lang = "copy"]
+pub trait Copy: Sized {}
+impl Copy for i8 {}
+impl<T: ?Sized> Copy for *const T {}
+impl<T: ?Sized> Copy for *mut T {}
+
+
+// Regression test for https://github.com/rust-lang/rust/issues/118124.
+
+#[repr(simd)]
+pub struct int8x16_t(
+ pub(crate) i8, pub(crate) i8, pub(crate) i8, pub(crate) i8,
+ pub(crate) i8, pub(crate) i8, pub(crate) i8, pub(crate) i8,
+ pub(crate) i8, pub(crate) i8, pub(crate) i8, pub(crate) i8,
+ pub(crate) i8, pub(crate) i8, pub(crate) i8, pub(crate) i8,
+);
+impl Copy for int8x16_t {}
+
+#[repr(C)]
+pub struct int8x16x4_t(pub int8x16_t, pub int8x16_t, pub int8x16_t, pub int8x16_t);
+impl Copy for int8x16x4_t {}
+
+#[target_feature(enable = "neon")]
+#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
+pub unsafe fn vld1q_s8_x4(a: *const i8) -> int8x16x4_t {
+ #[allow(improper_ctypes)]
+ extern "unadjusted" {
+ #[cfg_attr(target_arch = "arm", link_name = "llvm.arm.neon.vld1x4.v16i8.p0i8")]
+ #[cfg_attr(target_arch = "aarch64", link_name = "llvm.aarch64.neon.ld1x4.v16i8.p0i8")]
+ fn vld1q_s8_x4_(a: *const i8) -> int8x16x4_t;
+ }
+ vld1q_s8_x4_(a)
+}
diff --git a/tests/ui/abi/compatibility.rs b/tests/ui/abi/compatibility.rs
index 0cdf22971..c6bba7186 100644
--- a/tests/ui/abi/compatibility.rs
+++ b/tests/ui/abi/compatibility.rs
@@ -1,5 +1,14 @@
// check-pass
// revisions: host
+// revisions: i686
+//[i686] compile-flags: --target i686-unknown-linux-gnu
+//[i686] needs-llvm-components: x86
+// revisions: x86-64
+//[x86-64] compile-flags: --target x86_64-unknown-linux-gnu
+//[x86-64] needs-llvm-components: x86
+// revisions: x86-64-win
+//[x86-64-win] compile-flags: --target x86_64-pc-windows-msvc
+//[x86-64-win] needs-llvm-components: x86
// revisions: arm
//[arm] compile-flags: --target arm-unknown-linux-gnueabi
//[arm] needs-llvm-components: arm
@@ -37,9 +46,23 @@
// revisions: wasi
//[wasi] compile-flags: --target wasm32-wasi
//[wasi] needs-llvm-components: webassembly
-// revisions: nvptx64
-//[nvptx64] compile-flags: --target nvptx64-nvidia-cuda
-//[nvptx64] needs-llvm-components: nvptx
+// revisions: bpf
+//[bpf] compile-flags: --target bpfeb-unknown-none
+//[bpf] needs-llvm-components: bpf
+// revisions: m68k
+//[m68k] compile-flags: --target m68k-unknown-linux-gnu
+//[m68k] needs-llvm-components: m68k
+// FIXME: disabled on nvptx64 since the target ABI fails the sanity check
+// see https://github.com/rust-lang/rust/issues/117480
+/* revisions: nvptx64
+ [nvptx64] compile-flags: --target nvptx64-nvidia-cuda
+ [nvptx64] needs-llvm-components: nvptx
+*/
+// FIXME: disabled since it fails on CI saying the csky component is missing
+/* revisions: csky
+ [csky] compile-flags: --target csky-unknown-linux-gnuabiv2
+ [csky] needs-llvm-components: csky
+*/
#![feature(rustc_attrs, unsized_fn_params, transparent_unions)]
#![cfg_attr(not(host), feature(no_core, lang_items), no_std, no_core)]
#![allow(unused, improper_ctypes_definitions, internal_features)]
@@ -231,8 +254,7 @@ macro_rules! test_abi_compatible {
};
}
-// Compatibility of pointers is probably de-facto guaranteed,
-// but that does not seem to be documented.
+// Compatibility of pointers.
test_abi_compatible!(ptr_mut, *const i32, *mut i32);
test_abi_compatible!(ptr_pointee, *const i32, *const Vec<i32>);
test_abi_compatible!(ref_mut, &i32, &mut i32);
@@ -241,14 +263,22 @@ test_abi_compatible!(box_ptr, Box<i32>, *const i32);
test_abi_compatible!(nonnull_ptr, NonNull<i32>, *const i32);
test_abi_compatible!(fn_fn, fn(), fn(i32) -> i32);
-// Some further guarantees we will likely (have to) make.
+// Compatibility of integer types.
+test_abi_compatible!(char_uint, char, u32);
+#[cfg(target_pointer_width = "32")]
+test_abi_compatible!(isize_int, isize, i32);
+#[cfg(target_pointer_width = "64")]
+test_abi_compatible!(isize_int, isize, i64);
+
+// Compatibility of 1-ZST.
test_abi_compatible!(zst_unit, Zst, ());
#[cfg(not(any(target_arch = "sparc64")))]
test_abi_compatible!(zst_array, Zst, [u8; 0]);
test_abi_compatible!(nonzero_int, NonZeroI32, i32);
// `DispatchFromDyn` relies on ABI compatibility.
-// This is interesting since these types are not `repr(transparent)`.
+// This is interesting since these types are not `repr(transparent)`. So this is not part of our
+// public ABI guarantees, but is relied on by the compiler.
test_abi_compatible!(rc, Rc<i32>, *mut i32);
test_abi_compatible!(arc, Arc<i32>, *mut i32);
@@ -324,6 +354,7 @@ mod unsized_ {
use super::*;
test_transparent_unsized!(str_, str);
test_transparent_unsized!(slice, [u8]);
+ test_transparent_unsized!(slice_with_prefix, (usize, [u8]));
test_transparent_unsized!(dyn_trait, dyn Any);
}
diff --git a/tests/ui/abi/issue-94223.rs b/tests/ui/abi/issue-94223.rs
deleted file mode 100644
index 79d6b9403..000000000
--- a/tests/ui/abi/issue-94223.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-// check-pass
-#![allow(improper_ctypes_definitions)]
-#![crate_type = "lib"]
-
-// Check that computing the fn abi for `bad`, with a external ABI fn ptr that is not FFI-safe, does
-// not ICE.
-
-pub fn bad(f: extern "C" fn([u8])) {}
diff --git a/tests/ui/abi/riscv-discoverability-guidance.rs b/tests/ui/abi/riscv-discoverability-guidance.rs
index f57fcd604..361ed8f3d 100644
--- a/tests/ui/abi/riscv-discoverability-guidance.rs
+++ b/tests/ui/abi/riscv-discoverability-guidance.rs
@@ -2,9 +2,9 @@
// revisions: riscv32 riscv64
//
// [riscv32] needs-llvm-components: riscv
-// [riscv32] compile-flags: --target=riscv32i-unknown-none-elf -C target-feature=-unaligned-scalar-mem --crate-type=rlib
+// [riscv32] compile-flags: --target=riscv32i-unknown-none-elf -C target-feature=-fast-unaligned-access --crate-type=rlib
// [riscv64] needs-llvm-components: riscv
-// [riscv64] compile-flags: --target=riscv64gc-unknown-none-elf -C target-feature=-unaligned-scalar-mem --crate-type=rlib
+// [riscv64] compile-flags: --target=riscv64gc-unknown-none-elf -C target-feature=-fast-unaligned-access --crate-type=rlib
#![no_core]
#![feature(
no_core,
diff --git a/tests/ui/abi/stack-probes-lto.rs b/tests/ui/abi/stack-probes-lto.rs
index 7282d0970..fb4786717 100644
--- a/tests/ui/abi/stack-probes-lto.rs
+++ b/tests/ui/abi/stack-probes-lto.rs
@@ -1,5 +1,7 @@
-// revisions: x32 x64
+// revisions: aarch64 x32 x64
// run-pass
+//[aarch64] only-aarch64
+//[aarch64] min-llvm-version: 18
//[x32] only-x86
//[x64] only-x86_64
// ignore-sgx no processes
diff --git a/tests/ui/abi/stack-probes.rs b/tests/ui/abi/stack-probes.rs
index 4b8a79a4b..e5c7a1a68 100644
--- a/tests/ui/abi/stack-probes.rs
+++ b/tests/ui/abi/stack-probes.rs
@@ -1,5 +1,7 @@
-// revisions: x32 x64
+// revisions: aarch64 x32 x64
// run-pass
+//[aarch64] only-aarch64
+//[aarch64] min-llvm-version: 18
//[x32] only-x86
//[x64] only-x86_64
// ignore-emscripten no processes
diff --git a/tests/ui/abi/unsized-args-in-c-abi-issues-94223-115845.rs b/tests/ui/abi/unsized-args-in-c-abi-issues-94223-115845.rs
new file mode 100644
index 000000000..a32cc6500
--- /dev/null
+++ b/tests/ui/abi/unsized-args-in-c-abi-issues-94223-115845.rs
@@ -0,0 +1,30 @@
+// check-pass
+#![allow(improper_ctypes_definitions)]
+#![feature(unsized_tuple_coercion)]
+#![feature(unsized_fn_params)]
+#![crate_type = "lib"]
+
+// Check that computing the fn abi for `bad`, with a external ABI fn ptr that is not FFI-safe, does
+// not ICE.
+
+pub fn bad(f: extern "C" fn([u8])) {}
+
+// While these get accepted, they should also not ICE.
+// (If we ever reject them, remove them from this test to ensure the `bad` above
+// is still tested. Do *not* make this a check/build-fail test.)
+
+pub extern "C" fn declare_bad(_x: str) {}
+
+#[no_mangle]
+pub extern "system" fn declare_more_bad(f: dyn FnOnce()) {
+}
+
+fn make_bad() -> extern "C" fn(([u8],)) {
+ todo!()
+}
+
+pub fn call_bad() {
+ let f = make_bad();
+ let slice: Box<([u8],)> = Box::new(([1; 8],));
+ f(*slice);
+}
diff --git a/tests/ui/abi/variadic-ffi.rs b/tests/ui/abi/variadic-ffi.rs
index a952ea077..186217700 100644
--- a/tests/ui/abi/variadic-ffi.rs
+++ b/tests/ui/abi/variadic-ffi.rs
@@ -8,11 +8,6 @@ use std::ffi::VaList;
extern "C" {
fn rust_interesting_average(_: u64, ...) -> f64;
- // FIXME: we need to disable this lint for `VaList`,
- // since it contains a `MaybeUninit<i32>` on the asmjs target,
- // and this type isn't FFI-safe. This is OK for now,
- // since the type is layout-compatible with `i32`.
- #[cfg_attr(target_arch = "asmjs", allow(improper_ctypes))]
fn rust_valist_interesting_average(_: u64, _: VaList) -> f64;
}
diff --git a/tests/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr b/tests/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr
index eb739b149..3be219bdb 100644
--- a/tests/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr
+++ b/tests/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr
@@ -16,6 +16,6 @@ LL | fn oom() -> ! {
| ^^^
= note: this error originates in the attribute macro `alloc_error_handler` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0061`.
diff --git a/tests/ui/allocator/allocator-args.stderr b/tests/ui/allocator/allocator-args.stderr
index dfff2a7e7..ad640767f 100644
--- a/tests/ui/allocator/allocator-args.stderr
+++ b/tests/ui/allocator/allocator-args.stderr
@@ -4,5 +4,5 @@ error: malformed `global_allocator` attribute input
LL | #[global_allocator(malloc)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[global_allocator]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/allocator/function-allocator.stderr b/tests/ui/allocator/function-allocator.stderr
index 5e47b0f0c..3c0ba9580 100644
--- a/tests/ui/allocator/function-allocator.stderr
+++ b/tests/ui/allocator/function-allocator.stderr
@@ -4,5 +4,5 @@ error: allocators must be statics
LL | fn foo() {}
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/allocator/two-allocators.stderr b/tests/ui/allocator/two-allocators.stderr
index 7a914c2a3..1eecbc0a9 100644
--- a/tests/ui/allocator/two-allocators.stderr
+++ b/tests/ui/allocator/two-allocators.stderr
@@ -10,5 +10,5 @@ LL | static B: System = System;
|
= note: this error originates in the attribute macro `global_allocator` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/allocator/two-allocators2.stderr b/tests/ui/allocator/two-allocators2.stderr
index b1fb4421e..f1e4b093c 100644
--- a/tests/ui/allocator/two-allocators2.stderr
+++ b/tests/ui/allocator/two-allocators2.stderr
@@ -1,4 +1,4 @@
error: the `#[global_allocator]` in this crate conflicts with global allocator in: system_allocator
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/allocator/two-allocators3.stderr b/tests/ui/allocator/two-allocators3.stderr
index a3079113d..bf0f3a7c6 100644
--- a/tests/ui/allocator/two-allocators3.stderr
+++ b/tests/ui/allocator/two-allocators3.stderr
@@ -1,4 +1,4 @@
error: the `#[global_allocator]` in system_allocator conflicts with global allocator in: system_allocator2
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/argument-suggestions/complex.stderr b/tests/ui/argument-suggestions/complex.stderr
index 205a85298..bb3817421 100644
--- a/tests/ui/argument-suggestions/complex.stderr
+++ b/tests/ui/argument-suggestions/complex.stderr
@@ -14,6 +14,6 @@ help: did you mean
LL | complex(/* u32 */, &"", /* E */, F::X2, G{}, X {}, Y {}, Z {});
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/argument-suggestions/display-is-suggestable.stderr b/tests/ui/argument-suggestions/display-is-suggestable.stderr
index edd72b53e..bde87475e 100644
--- a/tests/ui/argument-suggestions/display-is-suggestable.stderr
+++ b/tests/ui/argument-suggestions/display-is-suggestable.stderr
@@ -14,6 +14,6 @@ help: provide the argument
LL | foo(/* &dyn std::fmt::Display + Send */);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0061`.
diff --git a/tests/ui/argument-suggestions/issue-112507.stderr b/tests/ui/argument-suggestions/issue-112507.stderr
index dfb47e010..17bde4d97 100644
--- a/tests/ui/argument-suggestions/issue-112507.stderr
+++ b/tests/ui/argument-suggestions/issue-112507.stderr
@@ -22,6 +22,6 @@ LL ~ ,
LL ~ None);
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0061`.
diff --git a/tests/ui/argument-suggestions/issue-96638.stderr b/tests/ui/argument-suggestions/issue-96638.stderr
index 4d18b97c9..887bf82a2 100644
--- a/tests/ui/argument-suggestions/issue-96638.stderr
+++ b/tests/ui/argument-suggestions/issue-96638.stderr
@@ -16,6 +16,6 @@ help: provide the argument
LL | f(/* usize */, &x, /* usize */);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0061`.
diff --git a/tests/ui/argument-suggestions/issue-97197.stderr b/tests/ui/argument-suggestions/issue-97197.stderr
index de221ba1f..3768367a5 100644
--- a/tests/ui/argument-suggestions/issue-97197.stderr
+++ b/tests/ui/argument-suggestions/issue-97197.stderr
@@ -14,6 +14,6 @@ help: provide the arguments
LL | g((), /* bool */, /* bool */, /* bool */, /* bool */, ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0061`.
diff --git a/tests/ui/argument-suggestions/issue-97484.stderr b/tests/ui/argument-suggestions/issue-97484.stderr
index 082564fbc..6bdb734fd 100644
--- a/tests/ui/argument-suggestions/issue-97484.stderr
+++ b/tests/ui/argument-suggestions/issue-97484.stderr
@@ -23,6 +23,6 @@ LL - foo(&&A, B, C, D, E, F, G);
LL + foo(&&A, D, /* &E */, G);
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0061`.
diff --git a/tests/ui/argument-suggestions/issue-98894.stderr b/tests/ui/argument-suggestions/issue-98894.stderr
index f64a83ab7..72e6fec27 100644
--- a/tests/ui/argument-suggestions/issue-98894.stderr
+++ b/tests/ui/argument-suggestions/issue-98894.stderr
@@ -14,6 +14,6 @@ help: provide the argument
LL | (|_, ()| ())(if true {} else {return;}, ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0057`.
diff --git a/tests/ui/argument-suggestions/issue-98897.stderr b/tests/ui/argument-suggestions/issue-98897.stderr
index f2c47d353..eed396455 100644
--- a/tests/ui/argument-suggestions/issue-98897.stderr
+++ b/tests/ui/argument-suggestions/issue-98897.stderr
@@ -14,6 +14,6 @@ help: provide the argument
LL | (|_, ()| ())([return, ()], ());
| ~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0057`.
diff --git a/tests/ui/argument-suggestions/issue-99482.stderr b/tests/ui/argument-suggestions/issue-99482.stderr
index bcf36e37c..9c83b47f8 100644
--- a/tests/ui/argument-suggestions/issue-99482.stderr
+++ b/tests/ui/argument-suggestions/issue-99482.stderr
@@ -14,6 +14,6 @@ help: provide the argument
LL | let _f = f((), main);
| ~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0057`.
diff --git a/tests/ui/argument-suggestions/too-long.stderr b/tests/ui/argument-suggestions/too-long.stderr
index bb6f06a35..04ee9275c 100644
--- a/tests/ui/argument-suggestions/too-long.stderr
+++ b/tests/ui/argument-suggestions/too-long.stderr
@@ -19,6 +19,6 @@ help: consider dereferencing the borrow
LL | qux.foo(a, b, c, d, e, *f, g, h, i, j, k, l);
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/argument-suggestions/two-mismatch-notes.stderr b/tests/ui/argument-suggestions/two-mismatch-notes.stderr
index 70cc60255..65b3d2851 100644
--- a/tests/ui/argument-suggestions/two-mismatch-notes.stderr
+++ b/tests/ui/argument-suggestions/two-mismatch-notes.stderr
@@ -24,6 +24,6 @@ note: function defined here
LL | fn foo(_: fn(i32), _: Wrapper<i32>) {}
| ^^^ ---------- ---------------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/array-slice-vec/array_const_index-0.stderr b/tests/ui/array-slice-vec/array_const_index-0.stderr
index 3b92cc766..d16e8d50d 100644
--- a/tests/ui/array-slice-vec/array_const_index-0.stderr
+++ b/tests/ui/array-slice-vec/array_const_index-0.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | const B: i32 = (&A)[1];
| ^^^^^^^ index out of bounds: the length is 0 but the index is 1
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/array-slice-vec/array_const_index-1.stderr b/tests/ui/array-slice-vec/array_const_index-1.stderr
index 591db268a..f9ba2f139 100644
--- a/tests/ui/array-slice-vec/array_const_index-1.stderr
+++ b/tests/ui/array-slice-vec/array_const_index-1.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | const B: i32 = A[1];
| ^^^^ index out of bounds: the length is 0 but the index is 1
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/array-slice-vec/match_arr_unknown_len.stderr b/tests/ui/array-slice-vec/match_arr_unknown_len.stderr
index 5e531a993..3ed0d6bdf 100644
--- a/tests/ui/array-slice-vec/match_arr_unknown_len.stderr
+++ b/tests/ui/array-slice-vec/match_arr_unknown_len.stderr
@@ -7,6 +7,6 @@ LL | [1, 2] => true,
= note: expected array `[u32; 2]`
found array `[u32; N]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/array-slice-vec/slice-mut-2.stderr b/tests/ui/array-slice-vec/slice-mut-2.stderr
index c33919c41..8cc2c6e03 100644
--- a/tests/ui/array-slice-vec/slice-mut-2.stderr
+++ b/tests/ui/array-slice-vec/slice-mut-2.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be a mutable reference
LL | let x: &[isize] = &mut [1, 2, 3, 4, 5];
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/array-slice-vec/slice-mut.stderr b/tests/ui/array-slice-vec/slice-mut.stderr
index 7d34defc1..288031e50 100644
--- a/tests/ui/array-slice-vec/slice-mut.stderr
+++ b/tests/ui/array-slice-vec/slice-mut.stderr
@@ -9,6 +9,6 @@ LL | let y: &mut[_] = &x[2..4];
= note: expected mutable reference `&mut [_]`
found reference `&[isize]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/array-slice-vec/slice-to-vec-comparison.stderr b/tests/ui/array-slice-vec/slice-to-vec-comparison.stderr
index 47008e1d9..7e5b8afea 100644
--- a/tests/ui/array-slice-vec/slice-to-vec-comparison.stderr
+++ b/tests/ui/array-slice-vec/slice-to-vec-comparison.stderr
@@ -7,6 +7,6 @@ LL | a > b;
= note: expected reference `&[_; 0]`
found reference `&Vec<u8>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/array-slice-vec/vec-macro-with-comma-only.stderr b/tests/ui/array-slice-vec/vec-macro-with-comma-only.stderr
index ec4a001f4..b3f953af6 100644
--- a/tests/ui/array-slice-vec/vec-macro-with-comma-only.stderr
+++ b/tests/ui/array-slice-vec/vec-macro-with-comma-only.stderr
@@ -6,5 +6,5 @@ LL | vec![,];
|
= note: while trying to match end of macro
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/array-slice-vec/vec-mut-iter-borrow.stderr b/tests/ui/array-slice-vec/vec-mut-iter-borrow.stderr
index 679fd8997..d9343140f 100644
--- a/tests/ui/array-slice-vec/vec-mut-iter-borrow.stderr
+++ b/tests/ui/array-slice-vec/vec-mut-iter-borrow.stderr
@@ -9,6 +9,6 @@ LL | for x in &mut xs {
LL | xs.push(1)
| ^^ second mutable borrow occurs here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/array-slice-vec/vec-res-add.stderr b/tests/ui/array-slice-vec/vec-res-add.stderr
index 751127136..cf5796f7e 100644
--- a/tests/ui/array-slice-vec/vec-res-add.stderr
+++ b/tests/ui/array-slice-vec/vec-res-add.stderr
@@ -6,6 +6,6 @@ LL | let k = i + j;
| |
| Vec<R>
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/array-slice-vec/vector-no-ann.stderr b/tests/ui/array-slice-vec/vector-no-ann.stderr
index 619417a73..24b6abfb3 100644
--- a/tests/ui/array-slice-vec/vector-no-ann.stderr
+++ b/tests/ui/array-slice-vec/vector-no-ann.stderr
@@ -9,6 +9,6 @@ help: consider giving `_foo` an explicit type, where the type for type parameter
LL | let _foo: Vec<T> = Vec::new();
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/asm/aarch64/bad-reg.rs b/tests/ui/asm/aarch64/bad-reg.rs
index 9ccb8ed67..f71418161 100644
--- a/tests/ui/asm/aarch64/bad-reg.rs
+++ b/tests/ui/asm/aarch64/bad-reg.rs
@@ -48,14 +48,14 @@ fn main() {
// (except in/lateout which don't conflict)
asm!("", in("x0") foo, in("w0") bar);
- //~^ ERROR register `x0` conflicts with register `x0`
+ //~^ ERROR register `w0` conflicts with register `x0`
asm!("", in("x0") foo, out("x0") bar);
//~^ ERROR register `x0` conflicts with register `x0`
asm!("", in("w0") foo, lateout("w0") bar);
asm!("", in("v0") foo, in("q0") bar);
- //~^ ERROR register `v0` conflicts with register `v0`
+ //~^ ERROR register `q0` conflicts with register `v0`
asm!("", in("v0") foo, out("q0") bar);
- //~^ ERROR register `v0` conflicts with register `v0`
+ //~^ ERROR register `q0` conflicts with register `v0`
asm!("", in("v0") foo, lateout("q0") bar);
}
}
diff --git a/tests/ui/asm/aarch64/bad-reg.stderr b/tests/ui/asm/aarch64/bad-reg.stderr
index 0ba627dac..717a788ca 100644
--- a/tests/ui/asm/aarch64/bad-reg.stderr
+++ b/tests/ui/asm/aarch64/bad-reg.stderr
@@ -98,11 +98,11 @@ error: register class `preg` can only be used as a clobber, not as an input or o
LL | asm!("{}", out(preg) _);
| ^^^^^^^^^^^
-error: register `x0` conflicts with register `x0`
+error: register `w0` conflicts with register `x0`
--> $DIR/bad-reg.rs:50:32
|
LL | asm!("", in("x0") foo, in("w0") bar);
- | ------------ ^^^^^^^^^^^^ register `x0`
+ | ------------ ^^^^^^^^^^^^ register `w0`
| |
| register `x0`
@@ -120,19 +120,19 @@ help: use `lateout` instead of `out` to avoid conflict
LL | asm!("", in("x0") foo, out("x0") bar);
| ^^^^^^^^^^^^
-error: register `v0` conflicts with register `v0`
+error: register `q0` conflicts with register `v0`
--> $DIR/bad-reg.rs:55:32
|
LL | asm!("", in("v0") foo, in("q0") bar);
- | ------------ ^^^^^^^^^^^^ register `v0`
+ | ------------ ^^^^^^^^^^^^ register `q0`
| |
| register `v0`
-error: register `v0` conflicts with register `v0`
+error: register `q0` conflicts with register `v0`
--> $DIR/bad-reg.rs:57:32
|
LL | asm!("", in("v0") foo, out("q0") bar);
- | ------------ ^^^^^^^^^^^^^ register `v0`
+ | ------------ ^^^^^^^^^^^^^ register `q0`
| |
| register `v0`
|
diff --git a/tests/ui/asm/const-error.rs b/tests/ui/asm/const-error.rs
new file mode 100644
index 000000000..4e14becf7
--- /dev/null
+++ b/tests/ui/asm/const-error.rs
@@ -0,0 +1,15 @@
+// only-x86_64
+// needs-asm-support
+
+#![feature(asm_const)]
+
+// Test to make sure that we emit const errors eagerly for inline asm
+
+use std::arch::asm;
+
+fn test<T>() {
+ unsafe { asm!("/* {} */", const 1 / 0); }
+ //~^ ERROR evaluation of
+}
+
+fn main() {}
diff --git a/tests/ui/asm/const-error.stderr b/tests/ui/asm/const-error.stderr
new file mode 100644
index 000000000..fe3118321
--- /dev/null
+++ b/tests/ui/asm/const-error.stderr
@@ -0,0 +1,9 @@
+error[E0080]: evaluation of `test::<T>::{constant#0}` failed
+ --> $DIR/const-error.rs:11:37
+ |
+LL | unsafe { asm!("/* {} */", const 1 / 0); }
+ | ^^^^^ attempt to divide `1_i32` by zero
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/asm/issue-113788.stderr b/tests/ui/asm/issue-113788.stderr
index f8e65b6f5..c44ba3c91 100644
--- a/tests/ui/asm/issue-113788.stderr
+++ b/tests/ui/asm/issue-113788.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `PEB` in this scope
LL | let peb: *const PEB;
| ^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/asm/issue-72570.stderr b/tests/ui/asm/issue-72570.stderr
index 49013a23c..13f39e7de 100644
--- a/tests/ui/asm/issue-72570.stderr
+++ b/tests/ui/asm/issue-72570.stderr
@@ -4,5 +4,5 @@ error: invalid register `invalid`: unknown register
LL | asm!("", in("invalid") "".len());
| ^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/asm/issue-85247.rwpi.stderr b/tests/ui/asm/issue-85247.rwpi.stderr
index 996b0933a..8466a53be 100644
--- a/tests/ui/asm/issue-85247.rwpi.stderr
+++ b/tests/ui/asm/issue-85247.rwpi.stderr
@@ -4,5 +4,5 @@ error: cannot use register `r9`: the RWPI static base register (r9) cannot be us
LL | asm!("", out("r9") _);
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/asm/issue-87802.stderr b/tests/ui/asm/issue-87802.stderr
index de3e28fdd..762f3d02a 100644
--- a/tests/ui/asm/issue-87802.stderr
+++ b/tests/ui/asm/issue-87802.stderr
@@ -6,5 +6,5 @@ LL | asm!("/* {0} */", out(reg) x);
|
= note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/asm/issue-99071.stderr b/tests/ui/asm/issue-99071.stderr
index 47386ffa4..1703d2977 100644
--- a/tests/ui/asm/issue-99071.stderr
+++ b/tests/ui/asm/issue-99071.stderr
@@ -4,5 +4,5 @@ error: cannot use register `r8`: high registers (r8+) can only be used as clobbe
LL | asm!("", in("r8") 0);
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/asm/issue-99122.stderr b/tests/ui/asm/issue-99122.stderr
index 2758a4ac4..2767a6d54 100644
--- a/tests/ui/asm/issue-99122.stderr
+++ b/tests/ui/asm/issue-99122.stderr
@@ -6,6 +6,6 @@ LL | let pointer = 1u32 as *const _;
|
= note: the type information given here is insufficient to check whether the pointer cast is valid
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0641`.
diff --git a/tests/ui/asm/reg-conflict.stderr b/tests/ui/asm/reg-conflict.stderr
index 2395566de..a4dd8e0a9 100644
--- a/tests/ui/asm/reg-conflict.stderr
+++ b/tests/ui/asm/reg-conflict.stderr
@@ -6,5 +6,5 @@ LL | asm!("", out("d0") _, out("s1") _);
| |
| register `d0`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/asm/x86_64/bad-reg.rs b/tests/ui/asm/x86_64/bad-reg.rs
index f5728079a..e19221bc0 100644
--- a/tests/ui/asm/x86_64/bad-reg.rs
+++ b/tests/ui/asm/x86_64/bad-reg.rs
@@ -56,10 +56,10 @@ fn main() {
// (except in/lateout which don't conflict)
asm!("", in("eax") foo, in("al") bar);
- //~^ ERROR register `al` conflicts with register `ax`
+ //~^ ERROR register `al` conflicts with register `eax`
//~| ERROR `i32` cannot be used with this register class
asm!("", in("rax") foo, out("rax") bar);
- //~^ ERROR register `ax` conflicts with register `ax`
+ //~^ ERROR register `rax` conflicts with register `rax`
asm!("", in("al") foo, lateout("al") bar);
//~^ ERROR `i32` cannot be used with this register class
//~| ERROR `i32` cannot be used with this register class
diff --git a/tests/ui/asm/x86_64/bad-reg.stderr b/tests/ui/asm/x86_64/bad-reg.stderr
index 82b7ebd0f..8017008e9 100644
--- a/tests/ui/asm/x86_64/bad-reg.stderr
+++ b/tests/ui/asm/x86_64/bad-reg.stderr
@@ -106,21 +106,21 @@ error: register class `mmx_reg` can only be used as a clobber, not as an input o
LL | asm!("{}", out(mmx_reg) _);
| ^^^^^^^^^^^^^^
-error: register `al` conflicts with register `ax`
+error: register `al` conflicts with register `eax`
--> $DIR/bad-reg.rs:58:33
|
LL | asm!("", in("eax") foo, in("al") bar);
| ------------- ^^^^^^^^^^^^ register `al`
| |
- | register `ax`
+ | register `eax`
-error: register `ax` conflicts with register `ax`
+error: register `rax` conflicts with register `rax`
--> $DIR/bad-reg.rs:61:33
|
LL | asm!("", in("rax") foo, out("rax") bar);
- | ------------- ^^^^^^^^^^^^^^ register `ax`
+ | ------------- ^^^^^^^^^^^^^^ register `rax`
| |
- | register `ax`
+ | register `rax`
|
help: use `lateout` instead of `out` to avoid conflict
--> $DIR/bad-reg.rs:61:18
diff --git a/tests/ui/assign-imm-local-twice.stderr b/tests/ui/assign-imm-local-twice.stderr
index bba5d8dff..d92485de6 100644
--- a/tests/ui/assign-imm-local-twice.stderr
+++ b/tests/ui/assign-imm-local-twice.stderr
@@ -10,6 +10,6 @@ LL | println!("v={}", v);
LL | v = 2;
| ^^^^^ cannot assign twice to immutable variable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0384`.
diff --git a/tests/ui/associated-consts/assoc-const-eq-ambiguity.rs b/tests/ui/associated-consts/assoc-const-eq-ambiguity.rs
new file mode 100644
index 000000000..ac085864f
--- /dev/null
+++ b/tests/ui/associated-consts/assoc-const-eq-ambiguity.rs
@@ -0,0 +1,19 @@
+// We used to say "ambiguous associated type" on ambiguous associated consts.
+// Ensure that we now use the correct label.
+
+#![feature(associated_const_equality)]
+
+trait Trait0: Parent0<i32> + Parent0<u32> {}
+trait Parent0<T> { const K: (); }
+
+fn take0(_: impl Trait0<K = { () }>) {}
+//~^ ERROR ambiguous associated constant `K` in bounds of `Trait0`
+
+trait Trait1: Parent1 + Parent2 {}
+trait Parent1 { const C: i32; }
+trait Parent2 { const C: &'static str; }
+
+fn take1(_: impl Trait1<C = "?">) {}
+//~^ ERROR ambiguous associated constant `C` in bounds of `Trait1`
+
+fn main() {}
diff --git a/tests/ui/associated-consts/assoc-const-eq-ambiguity.stderr b/tests/ui/associated-consts/assoc-const-eq-ambiguity.stderr
new file mode 100644
index 000000000..ba3a87013
--- /dev/null
+++ b/tests/ui/associated-consts/assoc-const-eq-ambiguity.stderr
@@ -0,0 +1,38 @@
+error[E0222]: ambiguous associated constant `K` in bounds of `Trait0`
+ --> $DIR/assoc-const-eq-ambiguity.rs:9:25
+ |
+LL | trait Parent0<T> { const K: (); }
+ | -----------
+ | |
+ | ambiguous `K` from `Parent0<u32>`
+ | ambiguous `K` from `Parent0<i32>`
+LL |
+LL | fn take0(_: impl Trait0<K = { () }>) {}
+ | ^^^^^^^^^^ ambiguous associated constant `K`
+ |
+ = help: consider introducing a new type parameter `T` and adding `where` constraints:
+ where
+ T: Trait0,
+ T: Parent0<u32>::K = { () },
+ T: Parent0<i32>::K = { () }
+
+error[E0222]: ambiguous associated constant `C` in bounds of `Trait1`
+ --> $DIR/assoc-const-eq-ambiguity.rs:16:25
+ |
+LL | trait Parent1 { const C: i32; }
+ | ------------ ambiguous `C` from `Parent1`
+LL | trait Parent2 { const C: &'static str; }
+ | --------------------- ambiguous `C` from `Parent2`
+LL |
+LL | fn take1(_: impl Trait1<C = "?">) {}
+ | ^^^^^^^ ambiguous associated constant `C`
+ |
+ = help: consider introducing a new type parameter `T` and adding `where` constraints:
+ where
+ T: Trait1,
+ T: Parent2::C = "?",
+ T: Parent1::C = "?"
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0222`.
diff --git a/tests/ui/associated-consts/assoc-const-eq-missing.rs b/tests/ui/associated-consts/assoc-const-eq-missing.rs
index 5e029a12d..f384927e4 100644
--- a/tests/ui/associated-consts/assoc-const-eq-missing.rs
+++ b/tests/ui/associated-consts/assoc-const-eq-missing.rs
@@ -11,13 +11,12 @@ impl Foo for Bar {
const N: usize = 3;
}
-
-fn foo1<F: Foo<Z=3>>() {}
-//~^ ERROR associated type
-fn foo2<F: Foo<Z=usize>>() {}
-//~^ ERROR associated type
-fn foo3<F: Foo<Z=5>>() {}
-//~^ ERROR associated type
+fn foo1<F: Foo<Z = 3>>() {}
+//~^ ERROR associated constant `Z` not found for `Foo`
+fn foo2<F: Foo<Z = usize>>() {}
+//~^ ERROR associated type `Z` not found for `Foo`
+fn foo3<F: Foo<Z = 5>>() {}
+//~^ ERROR associated constant `Z` not found for `Foo`
fn main() {
foo1::<Bar>();
diff --git a/tests/ui/associated-consts/assoc-const-eq-missing.stderr b/tests/ui/associated-consts/assoc-const-eq-missing.stderr
index b4bd6456c..318c85dcf 100644
--- a/tests/ui/associated-consts/assoc-const-eq-missing.stderr
+++ b/tests/ui/associated-consts/assoc-const-eq-missing.stderr
@@ -1,20 +1,20 @@
-error[E0220]: associated type `Z` not found for `Foo`
- --> $DIR/assoc-const-eq-missing.rs:15:16
+error[E0220]: associated constant `Z` not found for `Foo`
+ --> $DIR/assoc-const-eq-missing.rs:14:16
|
-LL | fn foo1<F: Foo<Z=3>>() {}
- | ^ associated type `Z` not found
+LL | fn foo1<F: Foo<Z = 3>>() {}
+ | ^ help: there is an associated constant with a similar name: `N`
error[E0220]: associated type `Z` not found for `Foo`
- --> $DIR/assoc-const-eq-missing.rs:17:16
+ --> $DIR/assoc-const-eq-missing.rs:16:16
|
-LL | fn foo2<F: Foo<Z=usize>>() {}
+LL | fn foo2<F: Foo<Z = usize>>() {}
| ^ associated type `Z` not found
-error[E0220]: associated type `Z` not found for `Foo`
- --> $DIR/assoc-const-eq-missing.rs:19:16
+error[E0220]: associated constant `Z` not found for `Foo`
+ --> $DIR/assoc-const-eq-missing.rs:18:16
|
-LL | fn foo3<F: Foo<Z=5>>() {}
- | ^ associated type `Z` not found
+LL | fn foo3<F: Foo<Z = 5>>() {}
+ | ^ help: there is an associated constant with a similar name: `N`
error: aborting due to 3 previous errors
diff --git a/tests/ui/associated-consts/assoc-const-eq-ty-alias-noninteracting.rs b/tests/ui/associated-consts/assoc-const-eq-ty-alias-noninteracting.rs
new file mode 100644
index 000000000..de9008bfc
--- /dev/null
+++ b/tests/ui/associated-consts/assoc-const-eq-ty-alias-noninteracting.rs
@@ -0,0 +1,21 @@
+// Regression test for issue #112560.
+// Respect the fact that (associated) types and constants live in different namespaces and
+// therefore equality bounds involving identically named associated items don't conflict if
+// their kind (type vs. const) differs.
+
+// FIXME(fmease): Extend this test to cover supertraits again
+// once #118040 is fixed. See initial version of PR #118360.
+
+// check-pass
+
+#![feature(associated_const_equality)]
+
+trait Trait {
+ type N;
+
+ const N: usize;
+}
+
+fn take(_: impl Trait<N = 0, N = ()>) {}
+
+fn main() {}
diff --git a/tests/ui/associated-consts/assoc-const-ty-mismatch.rs b/tests/ui/associated-consts/assoc-const-ty-mismatch.rs
index c5d78469e..721163765 100644
--- a/tests/ui/associated-consts/assoc-const-ty-mismatch.rs
+++ b/tests/ui/associated-consts/assoc-const-ty-mismatch.rs
@@ -2,30 +2,30 @@
#![allow(unused)]
pub trait Foo {
- const N: usize;
+ const N: usize;
}
pub trait FooTy {
- type T;
+ type T;
}
pub struct Bar;
impl Foo for Bar {
- const N: usize = 3;
+ const N: usize = 3;
}
impl FooTy for Bar {
- type T = usize;
+ type T = usize;
}
-fn foo<F: Foo<N=usize>>() {}
-//~^ ERROR expected associated constant bound, found type
-fn foo2<F: FooTy<T=3usize>>() {}
-//~^ ERROR expected associated type bound, found constant
+fn foo<F: Foo<N = usize>>() {}
+//~^ ERROR expected constant, found type
+fn foo2<F: FooTy<T = 3usize>>() {}
+//~^ ERROR expected type, found constant
fn main() {
- foo::<Bar>();
- foo2::<Bar>();
+ foo::<Bar>();
+ foo2::<Bar>();
}
diff --git a/tests/ui/associated-consts/assoc-const-ty-mismatch.stderr b/tests/ui/associated-consts/assoc-const-ty-mismatch.stderr
index 11198729e..b844cfc4a 100644
--- a/tests/ui/associated-consts/assoc-const-ty-mismatch.stderr
+++ b/tests/ui/associated-consts/assoc-const-ty-mismatch.stderr
@@ -1,26 +1,30 @@
-error: expected associated constant bound, found type
- --> $DIR/assoc-const-ty-mismatch.rs:23:15
+error: expected constant, found type
+ --> $DIR/assoc-const-ty-mismatch.rs:23:19
|
-LL | fn foo<F: Foo<N=usize>>() {}
- | ^^^^^^^
+LL | fn foo<F: Foo<N = usize>>() {}
+ | - ^^^^^ unexpected type
+ | |
+ | expected a constant because of this associated constant
|
-note: associated constant defined here
- --> $DIR/assoc-const-ty-mismatch.rs:5:3
+note: the associated constant is defined here
+ --> $DIR/assoc-const-ty-mismatch.rs:5:5
|
-LL | const N: usize;
- | ^^^^^^^^^^^^^^
+LL | const N: usize;
+ | ^^^^^^^^^^^^^^
-error: expected associated type bound, found constant
- --> $DIR/assoc-const-ty-mismatch.rs:25:18
+error: expected type, found constant
+ --> $DIR/assoc-const-ty-mismatch.rs:25:22
|
-LL | fn foo2<F: FooTy<T=3usize>>() {}
- | ^^^^^^^^
+LL | fn foo2<F: FooTy<T = 3usize>>() {}
+ | - ^^^^^^ unexpected constant
+ | |
+ | expected a type because of this associated type
|
-note: associated type defined here
- --> $DIR/assoc-const-ty-mismatch.rs:9:3
+note: the associated type is defined here
+ --> $DIR/assoc-const-ty-mismatch.rs:9:5
|
-LL | type T;
- | ^^^^^^
+LL | type T;
+ | ^^^^^^
error: aborting due to 2 previous errors
diff --git a/tests/ui/associated-consts/associated-const-ambiguity-report.stderr b/tests/ui/associated-consts/associated-const-ambiguity-report.stderr
index e39224f2c..42d722291 100644
--- a/tests/ui/associated-consts/associated-const-ambiguity-report.stderr
+++ b/tests/ui/associated-consts/associated-const-ambiguity-report.stderr
@@ -21,6 +21,6 @@ LL | const X: i32 = <i32 as Bar>::ID;
LL | const X: i32 = <i32 as Foo>::ID;
| ~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0034`.
diff --git a/tests/ui/associated-consts/associated-const-array-len.stderr b/tests/ui/associated-consts/associated-const-array-len.stderr
index e3db45810..f804cf205 100644
--- a/tests/ui/associated-consts/associated-const-array-len.stderr
+++ b/tests/ui/associated-consts/associated-const-array-len.stderr
@@ -10,6 +10,6 @@ help: this trait has no implementations, consider adding one
LL | trait Foo {
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-consts/associated-const-dead-code.stderr b/tests/ui/associated-consts/associated-const-dead-code.stderr
index 7e485a314..33f5a5cee 100644
--- a/tests/ui/associated-consts/associated-const-dead-code.stderr
+++ b/tests/ui/associated-consts/associated-const-dead-code.stderr
@@ -12,5 +12,5 @@ note: the lint level is defined here
LL | #![deny(dead_code)]
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-consts/associated-const-generic-obligations.stderr b/tests/ui/associated-consts/associated-const-generic-obligations.stderr
index d45868151..5ea85ff3b 100644
--- a/tests/ui/associated-consts/associated-const-generic-obligations.stderr
+++ b/tests/ui/associated-consts/associated-const-generic-obligations.stderr
@@ -12,6 +12,6 @@ LL | const FROM: Self::Out;
= note: expected associated type `<T as Foo>::Out`
found reference `&'static str`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0326`.
diff --git a/tests/ui/associated-consts/associated-const-impl-wrong-lifetime.stderr b/tests/ui/associated-consts/associated-const-impl-wrong-lifetime.stderr
index 742b81535..1304bef42 100644
--- a/tests/ui/associated-consts/associated-const-impl-wrong-lifetime.stderr
+++ b/tests/ui/associated-consts/associated-const-impl-wrong-lifetime.stderr
@@ -4,8 +4,8 @@ error[E0308]: const not compatible with trait
LL | const NAME: &'a str = "unit";
| ^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
- = note: expected reference `&'static str`
- found reference `&'a str`
+ = note: expected reference `&'static _`
+ found reference `&'a _`
note: the lifetime `'a` as defined here...
--> $DIR/associated-const-impl-wrong-lifetime.rs:6:6
|
@@ -13,6 +13,6 @@ LL | impl<'a> Foo for &'a () {
| ^^
= note: ...does not necessarily outlive the static lifetime
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/associated-consts/associated-const-impl-wrong-type.stderr b/tests/ui/associated-consts/associated-const-impl-wrong-type.stderr
index f3616035f..b91b777d5 100644
--- a/tests/ui/associated-consts/associated-const-impl-wrong-type.stderr
+++ b/tests/ui/associated-consts/associated-const-impl-wrong-type.stderr
@@ -10,6 +10,6 @@ note: type in trait
LL | const BAR: u32;
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0326`.
diff --git a/tests/ui/associated-consts/associated-const-in-trait.stderr b/tests/ui/associated-consts/associated-const-in-trait.stderr
index 60bbe385c..59acd4820 100644
--- a/tests/ui/associated-consts/associated-const-in-trait.stderr
+++ b/tests/ui/associated-consts/associated-const-in-trait.stderr
@@ -13,6 +13,6 @@ LL | const N: usize;
| ^ ...because it contains this associated `const`
= help: consider moving `N` to another trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/associated-consts/associated-const-no-item.stderr b/tests/ui/associated-consts/associated-const-no-item.stderr
index fe27da5ac..7ded05b7b 100644
--- a/tests/ui/associated-consts/associated-const-no-item.stderr
+++ b/tests/ui/associated-consts/associated-const-no-item.stderr
@@ -11,6 +11,6 @@ note: `Foo` defines an item `ID`, perhaps you need to implement it
LL | trait Foo {
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/associated-consts/associated-const-private-impl.stderr b/tests/ui/associated-consts/associated-const-private-impl.stderr
index a3fa3002e..13bde56a6 100644
--- a/tests/ui/associated-consts/associated-const-private-impl.stderr
+++ b/tests/ui/associated-consts/associated-const-private-impl.stderr
@@ -7,6 +7,6 @@ LL | const ID: i32 = 1;
LL | assert_eq!(1, bar1::Foo::ID);
| ^^ private associated constant
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0624`.
diff --git a/tests/ui/associated-consts/associated-const-type-parameter-arrays-2.stderr b/tests/ui/associated-consts/associated-const-type-parameter-arrays-2.stderr
index 0bc019b2d..cd8303942 100644
--- a/tests/ui/associated-consts/associated-const-type-parameter-arrays-2.stderr
+++ b/tests/ui/associated-consts/associated-const-type-parameter-arrays-2.stderr
@@ -6,5 +6,5 @@ LL | let _array = [4; <A as Foo>::Y];
|
= note: this may fail depending on what value the parameter takes
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-consts/associated-const-type-parameter-arrays.stderr b/tests/ui/associated-consts/associated-const-type-parameter-arrays.stderr
index 46a54a12d..7f9324035 100644
--- a/tests/ui/associated-consts/associated-const-type-parameter-arrays.stderr
+++ b/tests/ui/associated-consts/associated-const-type-parameter-arrays.stderr
@@ -5,7 +5,7 @@ LL | let _array: [u32; <A as Foo>::Y];
| ^ cannot perform const operation using `A`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-consts/defaults-cyclic-fail.stderr b/tests/ui/associated-consts/defaults-cyclic-fail.stderr
index e29c32f5d..9cee03041 100644
--- a/tests/ui/associated-consts/defaults-cyclic-fail.stderr
+++ b/tests/ui/associated-consts/defaults-cyclic-fail.stderr
@@ -27,6 +27,6 @@ LL | assert_eq!(<() as Tr>::A, 0);
| ^^^^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/associated-consts/defaults-not-assumed-fail.stderr b/tests/ui/associated-consts/defaults-not-assumed-fail.stderr
index ac5ec8e05..091a50f94 100644
--- a/tests/ui/associated-consts/defaults-not-assumed-fail.stderr
+++ b/tests/ui/associated-consts/defaults-not-assumed-fail.stderr
@@ -27,6 +27,6 @@ LL | assert_eq!(<() as Tr>::B, 0); // causes the error above
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
= note: this note originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/associated-consts/double-elided.stderr b/tests/ui/associated-consts/double-elided.stderr
index ba4e6a23e..67834788c 100644
--- a/tests/ui/associated-consts/double-elided.stderr
+++ b/tests/ui/associated-consts/double-elided.stderr
@@ -42,6 +42,6 @@ note: but the referenced data is only valid for the anonymous lifetime as define
LL | const C: &&str = &"";
| ^
-error: aborting due to previous error; 2 warnings emitted
+error: aborting due to 1 previous error; 2 warnings emitted
For more information about this error, try `rustc --explain E0491`.
diff --git a/tests/ui/associated-consts/infer-placeholder-in-non-suggestable-pos.stderr b/tests/ui/associated-consts/infer-placeholder-in-non-suggestable-pos.stderr
index f8c02420f..e946491a0 100644
--- a/tests/ui/associated-consts/infer-placeholder-in-non-suggestable-pos.stderr
+++ b/tests/ui/associated-consts/infer-placeholder-in-non-suggestable-pos.stderr
@@ -18,6 +18,6 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
LL | const ASSOC: &dyn Fn(_) = 1i32;
| ^ not allowed in type signatures
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/ui/associated-consts/issue-102335-const.stderr b/tests/ui/associated-consts/issue-102335-const.stderr
index 531d15c59..b69dfd51e 100644
--- a/tests/ui/associated-consts/issue-102335-const.stderr
+++ b/tests/ui/associated-consts/issue-102335-const.stderr
@@ -4,6 +4,6 @@ error[E0229]: associated type bindings are not allowed here
LL | type A: S<C<X = 0i32> = 34>;
| ^^^^^^^^ associated type not allowed here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0229`.
diff --git a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr
index 4418fb755..21062fdaf 100644
--- a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr
+++ b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr
@@ -38,6 +38,6 @@ LL | const BAR: u32 = IMPL_REF_BAR;
= note: cycle used when running analysis passes on this crate
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr
index 392cd5e34..e4abf6203 100644
--- a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr
+++ b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr
@@ -38,6 +38,6 @@ LL | const BAR: u32 = DEFAULT_REF_BAR;
= note: cycle used when running analysis passes on this crate
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr
index 6cbddca9c..05ebd76f5 100644
--- a/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr
+++ b/tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr
@@ -38,6 +38,6 @@ LL | const BAR: u32 = TRAIT_REF_BAR;
= note: cycle used when running analysis passes on this crate
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/associated-consts/issue-47814.stderr b/tests/ui/associated-consts/issue-47814.stderr
index 2e4ddb811..7382426b0 100644
--- a/tests/ui/associated-consts/issue-47814.stderr
+++ b/tests/ui/associated-consts/issue-47814.stderr
@@ -10,5 +10,5 @@ note: not a concrete type
LL | impl<'a> ArpIPv4<'a> {
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-consts/projection-unspecified-but-bounded.stderr b/tests/ui/associated-consts/projection-unspecified-but-bounded.stderr
index 8175e510a..91bfcf29c 100644
--- a/tests/ui/associated-consts/projection-unspecified-but-bounded.stderr
+++ b/tests/ui/associated-consts/projection-unspecified-but-bounded.stderr
@@ -12,6 +12,6 @@ note: required by a bound in `foo`
LL | fn foo<T: TraitWAssocConst<A = 32>>() {}
| ^^^^^^ required by this bound in `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/associated-consts/shadowed-const.rs b/tests/ui/associated-consts/shadowed-const.rs
index cfdb391d3..d9b565742 100644
--- a/tests/ui/associated-consts/shadowed-const.rs
+++ b/tests/ui/associated-consts/shadowed-const.rs
@@ -17,7 +17,7 @@ trait Baz2: Foo {
trait Baz3 {
const BAR: usize;
const QUX: Self::BAR;
- //~^ ERROR found associated const
+ //~^ ERROR expected type, found constant
}
fn main() {}
diff --git a/tests/ui/associated-consts/shadowed-const.stderr b/tests/ui/associated-consts/shadowed-const.stderr
index fe21d2aec..2db645b3c 100644
--- a/tests/ui/associated-consts/shadowed-const.stderr
+++ b/tests/ui/associated-consts/shadowed-const.stderr
@@ -1,8 +1,14 @@
-error: found associated const `BAR` when type was expected
- --> $DIR/shadowed-const.rs:19:14
+error: expected type, found constant
+ --> $DIR/shadowed-const.rs:19:20
|
LL | const QUX: Self::BAR;
- | ^^^^^^^^^
+ | ^^^ unexpected constant
+ |
+note: the associated constant is defined here
+ --> $DIR/shadowed-const.rs:18:3
+ |
+LL | const BAR: usize;
+ | ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-inherent-types/ambiguity.stderr b/tests/ui/associated-inherent-types/ambiguity.stderr
index 155c296cb..09e6c1397 100644
--- a/tests/ui/associated-inherent-types/ambiguity.stderr
+++ b/tests/ui/associated-inherent-types/ambiguity.stderr
@@ -15,6 +15,6 @@ note: candidate #2 is defined in an impl for the type `Wrapper<()>`
LL | type Foo = ();
| ^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0034`.
diff --git a/tests/ui/associated-inherent-types/assoc-inherent-late-bound.rs b/tests/ui/associated-inherent-types/assoc-inherent-late-bound.rs
new file mode 100644
index 000000000..b6993f66f
--- /dev/null
+++ b/tests/ui/associated-inherent-types/assoc-inherent-late-bound.rs
@@ -0,0 +1,14 @@
+// check-pass
+
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+struct Foo<T>(T);
+
+impl<'a> Foo<fn(&'a ())> {
+ type Assoc = &'a ();
+}
+
+fn bar(_: for<'a> fn(Foo<fn(Foo<fn(&'static ())>::Assoc)>::Assoc)) {}
+
+fn main() {}
diff --git a/tests/ui/associated-inherent-types/assoc-inherent-no-body.stderr b/tests/ui/associated-inherent-types/assoc-inherent-no-body.stderr
index 387a5658d..c332416c6 100644
--- a/tests/ui/associated-inherent-types/assoc-inherent-no-body.stderr
+++ b/tests/ui/associated-inherent-types/assoc-inherent-no-body.stderr
@@ -6,5 +6,5 @@ LL | type Baz;
| |
| help: provide a definition for the type: `= <type>;`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-inherent-types/assoc-inherent-unstable.stderr b/tests/ui/associated-inherent-types/assoc-inherent-unstable.stderr
index 415ee0193..cf2aee6ab 100644
--- a/tests/ui/associated-inherent-types/assoc-inherent-unstable.stderr
+++ b/tests/ui/associated-inherent-types/assoc-inherent-unstable.stderr
@@ -6,6 +6,6 @@ LL | type Data = aux::Owner::Data;
|
= help: add `#![feature(data)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr
index 3c373f139..a2ad4cbde 100644
--- a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr
+++ b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr
@@ -39,6 +39,6 @@ LL | | fn main() {}
| |____________^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr
index ab6a97b3d..b3d55fea1 100644
--- a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr
+++ b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr
@@ -33,6 +33,6 @@ LL | | fn main() {}
| |____________^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/associated-inherent-types/generic-associated-types-bad.local.stderr b/tests/ui/associated-inherent-types/generic-associated-types-bad.local.stderr
index fcf828c21..585983405 100644
--- a/tests/ui/associated-inherent-types/generic-associated-types-bad.local.stderr
+++ b/tests/ui/associated-inherent-types/generic-associated-types-bad.local.stderr
@@ -10,6 +10,6 @@ note: required by a bound in `Ty::Pr`
LL | type Pr<T: Copy> = T;
| ^^^^ required by this bound in `Ty::Pr`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-inherent-types/generic-associated-types-bad.region.stderr b/tests/ui/associated-inherent-types/generic-associated-types-bad.region.stderr
index 94c205218..1be65687a 100644
--- a/tests/ui/associated-inherent-types/generic-associated-types-bad.region.stderr
+++ b/tests/ui/associated-inherent-types/generic-associated-types-bad.region.stderr
@@ -7,5 +7,5 @@ LL | #[cfg(region)]
LL | let _: Ty::Static<&'a str> = "";
| ^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-inherent-types/inference-fail.stderr b/tests/ui/associated-inherent-types/inference-fail.stderr
index f29144e4a..bf329c69e 100644
--- a/tests/ui/associated-inherent-types/inference-fail.stderr
+++ b/tests/ui/associated-inherent-types/inference-fail.stderr
@@ -4,6 +4,6 @@ error[E0282]: type annotations needed
LL | let _: S<_>::P = ();
| ^^^^^^^ cannot infer type for type parameter `T`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/associated-inherent-types/inference.rs b/tests/ui/associated-inherent-types/inference.rs
index 66f879c5a..054034b4c 100644
--- a/tests/ui/associated-inherent-types/inference.rs
+++ b/tests/ui/associated-inherent-types/inference.rs
@@ -1,7 +1,7 @@
// Testing inference capabilities.
// check-pass
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
#![feature(inherent_associated_types)]
#![allow(incomplete_features)]
diff --git a/tests/ui/associated-inherent-types/issue-109299-1.stderr b/tests/ui/associated-inherent-types/issue-109299-1.stderr
index dc59b56ee..c25ffb9d9 100644
--- a/tests/ui/associated-inherent-types/issue-109299-1.stderr
+++ b/tests/ui/associated-inherent-types/issue-109299-1.stderr
@@ -10,6 +10,6 @@ LL | type X = impl for<T> Fn() -> Lexer<T>::Cursor;
= note: the associated type was found for
- `Lexer<i32>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0220`.
diff --git a/tests/ui/associated-inherent-types/issue-109299.stderr b/tests/ui/associated-inherent-types/issue-109299.stderr
index 63f50732d..1e11c0e8c 100644
--- a/tests/ui/associated-inherent-types/issue-109299.stderr
+++ b/tests/ui/associated-inherent-types/issue-109299.stderr
@@ -6,6 +6,6 @@ LL | impl Lexer<'d> {
| |
| help: consider introducing lifetime `'d` here: `<'d>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0261`.
diff --git a/tests/ui/associated-inherent-types/issue-111404-1.rs b/tests/ui/associated-inherent-types/issue-111404-1.rs
index f4ad5d7ff..dd62e59f0 100644
--- a/tests/ui/associated-inherent-types/issue-111404-1.rs
+++ b/tests/ui/associated-inherent-types/issue-111404-1.rs
@@ -9,5 +9,6 @@ impl<'a> Foo<fn(&'a ())> {
fn bar(_: fn(Foo<for<'b> fn(Foo<fn(&'b ())>::Assoc)>::Assoc)) {}
//~^ ERROR higher-ranked subtype error
+//~| ERROR higher-ranked subtype error
fn main() {}
diff --git a/tests/ui/associated-inherent-types/issue-111404-1.stderr b/tests/ui/associated-inherent-types/issue-111404-1.stderr
index c55f14323..cf4d4a5f1 100644
--- a/tests/ui/associated-inherent-types/issue-111404-1.stderr
+++ b/tests/ui/associated-inherent-types/issue-111404-1.stderr
@@ -4,5 +4,13 @@ error: higher-ranked subtype error
LL | fn bar(_: fn(Foo<for<'b> fn(Foo<fn(&'b ())>::Assoc)>::Assoc)) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: higher-ranked subtype error
+ --> $DIR/issue-111404-1.rs:10:1
+ |
+LL | fn bar(_: fn(Foo<for<'b> fn(Foo<fn(&'b ())>::Assoc)>::Assoc)) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: aborting due to 2 previous errors
diff --git a/tests/ui/associated-inherent-types/issue-111879-0.stderr b/tests/ui/associated-inherent-types/issue-111879-0.stderr
index f6367c88a..f60fd58c2 100644
--- a/tests/ui/associated-inherent-types/issue-111879-0.stderr
+++ b/tests/ui/associated-inherent-types/issue-111879-0.stderr
@@ -4,5 +4,5 @@ error: overflow evaluating associated type `Carrier<'b>::Focus<i32>`
LL | pub type Focus<T> = &'a mut for<'b> fn(Carrier<'b>::Focus<i32>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-inherent-types/issue-111879-1.stderr b/tests/ui/associated-inherent-types/issue-111879-1.stderr
index bf35f2bb5..eb3329dc5 100644
--- a/tests/ui/associated-inherent-types/issue-111879-1.stderr
+++ b/tests/ui/associated-inherent-types/issue-111879-1.stderr
@@ -7,6 +7,6 @@ LL | fn main(_: for<'a> fn(Foo<fn(&'a ())>::Assoc)) {}
= note: expected signature `fn()`
found signature `fn(for<'a> fn(&'a ()))`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0580`.
diff --git a/tests/ui/associated-inherent-types/late-bound-regions.stderr b/tests/ui/associated-inherent-types/late-bound-regions.stderr
index 0dd17b05c..fba3a5b85 100644
--- a/tests/ui/associated-inherent-types/late-bound-regions.stderr
+++ b/tests/ui/associated-inherent-types/late-bound-regions.stderr
@@ -7,6 +7,6 @@ LL | f(&local)
| | `local` is borrowed here
| returns a value referencing data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/associated-inherent-types/normalization-overflow.stderr b/tests/ui/associated-inherent-types/normalization-overflow.stderr
index 16bb64281..7f991a53c 100644
--- a/tests/ui/associated-inherent-types/normalization-overflow.stderr
+++ b/tests/ui/associated-inherent-types/normalization-overflow.stderr
@@ -4,5 +4,5 @@ error: overflow evaluating associated type `T::This`
LL | type This = Self::This;
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.shadowed.stderr b/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.shadowed.stderr
index 3561db354..9bd5a842f 100644
--- a/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.shadowed.stderr
+++ b/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.shadowed.stderr
@@ -10,6 +10,6 @@ LL | let _: S::<bool>::Pr = ();
= note: the associated type was found for
- `S<()>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0220`.
diff --git a/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.uncovered.stderr b/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.uncovered.stderr
index 9206b4f6d..978305c2c 100644
--- a/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.uncovered.stderr
+++ b/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.uncovered.stderr
@@ -4,6 +4,6 @@ error[E0223]: ambiguous associated type
LL | let _: S::<bool>::Pr = ();
| ^^^^^^^^^^^^^ help: use fully-qualified syntax: `<S<bool> as Tr>::Pr`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0223`.
diff --git a/tests/ui/associated-inherent-types/not-found-unsatisfied-bounds-1.stderr b/tests/ui/associated-inherent-types/not-found-unsatisfied-bounds-1.stderr
index 230bfa538..0d5f781dc 100644
--- a/tests/ui/associated-inherent-types/not-found-unsatisfied-bounds-1.stderr
+++ b/tests/ui/associated-inherent-types/not-found-unsatisfied-bounds-1.stderr
@@ -10,5 +10,5 @@ LL | struct Container<T>(T);
= note: the following trait bounds were not satisfied:
`T: Clone`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-inherent-types/not-found-unsatisfied-bounds-in-multiple-impls.stderr b/tests/ui/associated-inherent-types/not-found-unsatisfied-bounds-in-multiple-impls.stderr
index 3ddab25de..650b59460 100644
--- a/tests/ui/associated-inherent-types/not-found-unsatisfied-bounds-in-multiple-impls.stderr
+++ b/tests/ui/associated-inherent-types/not-found-unsatisfied-bounds-in-multiple-impls.stderr
@@ -16,5 +16,5 @@ LL | let _: S::<Featureless, Featureless>::X;
`Featureless: One`
`Featureless: Two`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-inherent-types/regionck-0.stderr b/tests/ui/associated-inherent-types/regionck-0.stderr
index 3a438ee63..32e6d8e46 100644
--- a/tests/ui/associated-inherent-types/regionck-0.stderr
+++ b/tests/ui/associated-inherent-types/regionck-0.stderr
@@ -6,5 +6,5 @@ LL | fn user<'a>() {
LL | let _: S::<&'a ()>::T;
| ^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-inherent-types/regionck-2.stderr b/tests/ui/associated-inherent-types/regionck-2.stderr
index b0a4ed35d..4c68a5912 100644
--- a/tests/ui/associated-inherent-types/regionck-2.stderr
+++ b/tests/ui/associated-inherent-types/regionck-2.stderr
@@ -13,6 +13,6 @@ LL | fn test(_: Lexer::Cursor) {}
| ^^^^^
= note: ...does not necessarily outlive the static lifetime
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/associated-inherent-types/style.stderr b/tests/ui/associated-inherent-types/style.stderr
index f83061f8c..12e4d545a 100644
--- a/tests/ui/associated-inherent-types/style.stderr
+++ b/tests/ui/associated-inherent-types/style.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(non_camel_case_types)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-inherent-types/unsatisfied-bounds-inferred-type.stderr b/tests/ui/associated-inherent-types/unsatisfied-bounds-inferred-type.stderr
index ecf30f4cd..7ce69a94b 100644
--- a/tests/ui/associated-inherent-types/unsatisfied-bounds-inferred-type.stderr
+++ b/tests/ui/associated-inherent-types/unsatisfied-bounds-inferred-type.stderr
@@ -12,6 +12,6 @@ LL | impl<T: Copy> S<T> {
LL | type T = T;
| - required by a bound in this associated type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-inherent-types/unsatisfied-bounds-where-clause-on-assoc-ty.stderr b/tests/ui/associated-inherent-types/unsatisfied-bounds-where-clause-on-assoc-ty.stderr
index d4968cd05..cb35cdde0 100644
--- a/tests/ui/associated-inherent-types/unsatisfied-bounds-where-clause-on-assoc-ty.stderr
+++ b/tests/ui/associated-inherent-types/unsatisfied-bounds-where-clause-on-assoc-ty.stderr
@@ -13,6 +13,6 @@ LL | where
LL | T: Copy;
| ^^^^ required by this bound in `S<T>::X`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-item/ambiguous-associated-type-with-generics.stderr b/tests/ui/associated-item/ambiguous-associated-type-with-generics.stderr
index f7a47be8d..9e1dd7398 100644
--- a/tests/ui/associated-item/ambiguous-associated-type-with-generics.stderr
+++ b/tests/ui/associated-item/ambiguous-associated-type-with-generics.stderr
@@ -4,6 +4,6 @@ error[E0223]: ambiguous associated type
LL | let _x: <dyn Trait<i32>>::Ty;
| ^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<dyn Trait<i32> as Assoc>::Ty`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0223`.
diff --git a/tests/ui/associated-item/associated-item-duplicate-bounds.stderr b/tests/ui/associated-item/associated-item-duplicate-bounds.stderr
index f2e4ca524..889888058 100644
--- a/tests/ui/associated-item/associated-item-duplicate-bounds.stderr
+++ b/tests/ui/associated-item/associated-item-duplicate-bounds.stderr
@@ -5,7 +5,7 @@ LL | links: [u32; A::LINKS], // Shouldn't suggest bounds already there.
| ^^^^^^^^ cannot perform const operation using `A`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-item/associated-item-duplicate-names-2.stderr b/tests/ui/associated-item/associated-item-duplicate-names-2.stderr
index 0b96a6bd7..ee0686b0f 100644
--- a/tests/ui/associated-item/associated-item-duplicate-names-2.stderr
+++ b/tests/ui/associated-item/associated-item-duplicate-names-2.stderr
@@ -6,6 +6,6 @@ LL | const bar: bool = true;
LL | fn bar() {}
| ^^^^^^^^ duplicate definitions for `bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0592`.
diff --git a/tests/ui/associated-item/impl-duplicate-methods.stderr b/tests/ui/associated-item/impl-duplicate-methods.stderr
index 6f753845a..fbd243400 100644
--- a/tests/ui/associated-item/impl-duplicate-methods.stderr
+++ b/tests/ui/associated-item/impl-duplicate-methods.stderr
@@ -6,6 +6,6 @@ LL | fn orange(&self) {}
LL | fn orange(&self) {}
| ^^^^^^^^^^^^^^^^ duplicate definitions for `orange`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0592`.
diff --git a/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr b/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr
index f2604f0ba..9b077a4d3 100644
--- a/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr
+++ b/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr
@@ -12,6 +12,6 @@ LL | trait Baz: Foo + Bar<Self::Item> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.stderr b/tests/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.stderr
index a32ab4531..794299287 100644
--- a/tests/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.stderr
+++ b/tests/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.stderr
@@ -4,6 +4,6 @@ error[E0277]: the trait bound `String: Copy` is not satisfied
LL | fn func() -> Self::Out {
| ^^^^^^^^^ the trait `Copy` is not implemented for `String`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-type-bounds/bad-universal-in-dyn-in-where-clause.stderr b/tests/ui/associated-type-bounds/bad-universal-in-dyn-in-where-clause.stderr
index 6fa266d23..fe300a7de 100644
--- a/tests/ui/associated-type-bounds/bad-universal-in-dyn-in-where-clause.stderr
+++ b/tests/ui/associated-type-bounds/bad-universal-in-dyn-in-where-clause.stderr
@@ -4,5 +4,5 @@ error: associated type bounds are only allowed in where clauses and function sig
LL | dyn for<'j> B<AssocType: 'j>:,
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-type-bounds/bad-universal-in-impl-sig.stderr b/tests/ui/associated-type-bounds/bad-universal-in-impl-sig.stderr
index 8b66627d5..7bdb2c5a7 100644
--- a/tests/ui/associated-type-bounds/bad-universal-in-impl-sig.stderr
+++ b/tests/ui/associated-type-bounds/bad-universal-in-impl-sig.stderr
@@ -4,5 +4,5 @@ error: associated type bounds are only allowed in where clauses and function sig
LL | impl dyn Trait<Item: Trait2> {}
| ^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-type-bounds/binder-on-bound.stderr b/tests/ui/associated-type-bounds/binder-on-bound.stderr
index f71f72bfb..d09ad73a6 100644
--- a/tests/ui/associated-type-bounds/binder-on-bound.stderr
+++ b/tests/ui/associated-type-bounds/binder-on-bound.stderr
@@ -4,5 +4,5 @@ error: `for<...>` is not allowed on associated type bounds
LL | fn foo() where Trait<for<'a> Bound<'a> = &'a ()> {
| ^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-type-bounds/const-projection-err.gce.stderr b/tests/ui/associated-type-bounds/const-projection-err.gce.stderr
index 0f1ec9ad0..0b6207074 100644
--- a/tests/ui/associated-type-bounds/const-projection-err.gce.stderr
+++ b/tests/ui/associated-type-bounds/const-projection-err.gce.stderr
@@ -19,6 +19,6 @@ note: required by a bound in `foo`
LL | fn foo<T: TraitWAssocConst<A = 1>>() {}
| ^^^^^ required by this bound in `foo`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/associated-type-bounds/const-projection-err.stock.stderr b/tests/ui/associated-type-bounds/const-projection-err.stock.stderr
index bf0824259..e782571c7 100644
--- a/tests/ui/associated-type-bounds/const-projection-err.stock.stderr
+++ b/tests/ui/associated-type-bounds/const-projection-err.stock.stderr
@@ -12,6 +12,6 @@ note: required by a bound in `foo`
LL | fn foo<T: TraitWAssocConst<A = 1>>() {}
| ^^^^^ required by this bound in `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/associated-type-bounds/consts.rs b/tests/ui/associated-type-bounds/consts.rs
index 9b95b1b52..8f90c36ed 100644
--- a/tests/ui/associated-type-bounds/consts.rs
+++ b/tests/ui/associated-type-bounds/consts.rs
@@ -1,7 +1,7 @@
#![feature(associated_type_bounds)]
pub fn accept(_: impl Trait<K: Copy>) {}
-//~^ ERROR expected associated type, found associated constant
+//~^ ERROR expected type, found constant
pub trait Trait {
const K: i32;
diff --git a/tests/ui/associated-type-bounds/consts.stderr b/tests/ui/associated-type-bounds/consts.stderr
index ddfb6612b..7f9fe5e50 100644
--- a/tests/ui/associated-type-bounds/consts.stderr
+++ b/tests/ui/associated-type-bounds/consts.stderr
@@ -1,10 +1,16 @@
-error: expected associated type, found associated constant
+error: expected type, found constant
--> $DIR/consts.rs:3:29
|
LL | pub fn accept(_: impl Trait<K: Copy>) {}
- | ^
+ | ^------ bounds are not allowed on associated constants
+ | |
+ | unexpected constant
|
- = note: trait bounds not allowed on associated constant
+note: the associated constant is defined here
+ --> $DIR/consts.rs:7:5
+ |
+LL | const K: i32;
+ | ^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.stderr b/tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.stderr
index 78bf93c32..1f99d7db0 100644
--- a/tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.stderr
+++ b/tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.stderr
@@ -13,6 +13,6 @@ LL | let _low = self.lows.remove(low.identify()).unwrap();
note: method defined here
--> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/associated-type-bounds/issue-102335-ty.stderr b/tests/ui/associated-type-bounds/issue-102335-ty.stderr
index 8777b2965..561ca15ab 100644
--- a/tests/ui/associated-type-bounds/issue-102335-ty.stderr
+++ b/tests/ui/associated-type-bounds/issue-102335-ty.stderr
@@ -4,6 +4,6 @@ error[E0229]: associated type bindings are not allowed here
LL | type A: S<C<i32 = u32> = ()>;
| ^^^^^^^^^ associated type not allowed here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0229`.
diff --git a/tests/ui/associated-type-bounds/issue-104916.stderr b/tests/ui/associated-type-bounds/issue-104916.stderr
index 35435962f..65c89735c 100644
--- a/tests/ui/associated-type-bounds/issue-104916.stderr
+++ b/tests/ui/associated-type-bounds/issue-104916.stderr
@@ -4,5 +4,5 @@ error: associated type bounds are only allowed in where clauses and function sig
LL | dyn for<'j> B<AssocType: 'j>:,
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-type-bounds/issue-71443-1.stderr b/tests/ui/associated-type-bounds/issue-71443-1.stderr
index 09c8ec2e2..6abaaf8e1 100644
--- a/tests/ui/associated-type-bounds/issue-71443-1.stderr
+++ b/tests/ui/associated-type-bounds/issue-71443-1.stderr
@@ -6,6 +6,6 @@ LL | fn hello<F: for<'a> Iterator<Item: 'a>>() {
LL | Incorrect
| ^^^^^^^^^ expected `()`, found `Incorrect`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/associated-type-bounds/issue-99828.rs b/tests/ui/associated-type-bounds/issue-99828.rs
index 7b711283f..67ba50f3c 100644
--- a/tests/ui/associated-type-bounds/issue-99828.rs
+++ b/tests/ui/associated-type-bounds/issue-99828.rs
@@ -1,5 +1,5 @@
fn get_iter(vec: &[i32]) -> impl Iterator<Item = {}> + '_ {
- //~^ ERROR expected associated type bound, found constant
+ //~^ ERROR expected type, found constant
//~| ERROR associated const equality is incomplete
vec.iter()
}
diff --git a/tests/ui/associated-type-bounds/issue-99828.stderr b/tests/ui/associated-type-bounds/issue-99828.stderr
index dc93c47da..8813baf84 100644
--- a/tests/ui/associated-type-bounds/issue-99828.stderr
+++ b/tests/ui/associated-type-bounds/issue-99828.stderr
@@ -7,13 +7,15 @@ LL | fn get_iter(vec: &[i32]) -> impl Iterator<Item = {}> + '_ {
= note: see issue #92827 <https://github.com/rust-lang/rust/issues/92827> for more information
= help: add `#![feature(associated_const_equality)]` to the crate attributes to enable
-error: expected associated type bound, found constant
- --> $DIR/issue-99828.rs:1:43
+error: expected type, found constant
+ --> $DIR/issue-99828.rs:1:50
|
LL | fn get_iter(vec: &[i32]) -> impl Iterator<Item = {}> + '_ {
- | ^^^^^^^^^
+ | ---- ^^ unexpected constant
+ | |
+ | expected a type because of this associated type
|
-note: associated type defined here
+note: the associated type is defined here
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error: aborting due to 2 previous errors
diff --git a/tests/ui/associated-type-bounds/return-type-notation/basic.current_without.stderr b/tests/ui/associated-type-bounds/return-type-notation/basic.current_without.stderr
index 6c2645ae5..3666007e3 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/basic.current_without.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/basic.current_without.stderr
@@ -25,5 +25,5 @@ note: required by a bound in `is_send`
LL | fn is_send(_: impl Send) {}
| ^^^^ required by this bound in `is_send`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/associated-type-bounds/return-type-notation/basic.next_without.stderr b/tests/ui/associated-type-bounds/return-type-notation/basic.next_without.stderr
index 6c2645ae5..3666007e3 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/basic.next_without.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/basic.next_without.stderr
@@ -25,5 +25,5 @@ note: required by a bound in `is_send`
LL | fn is_send(_: impl Send) {}
| ^^^^ required by this bound in `is_send`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr b/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr
index 5b96676d0..f576cc9c9 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr
@@ -25,5 +25,5 @@ note: required by a bound in `is_send`
LL | fn is_send(_: impl Send) {}
| ^^^^ required by this bound in `is_send`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/associated-type-bounds/return-type-notation/equality.current.stderr b/tests/ui/associated-type-bounds/return-type-notation/equality.current.stderr
index d2a445f33..26b4d935a 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/equality.current.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/equality.current.stderr
@@ -13,5 +13,5 @@ error: return type notation is not allowed to use type equality
LL | fn test<T: Trait<method() = Box<dyn Future<Output = ()>>>>() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/associated-type-bounds/return-type-notation/equality.next.stderr b/tests/ui/associated-type-bounds/return-type-notation/equality.next.stderr
index d2a445f33..26b4d935a 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/equality.next.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/equality.next.stderr
@@ -13,5 +13,5 @@ error: return type notation is not allowed to use type equality
LL | fn test<T: Trait<method() = Box<dyn Future<Output = ()>>>>() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/associated-type-bounds/return-type-notation/equality.stderr b/tests/ui/associated-type-bounds/return-type-notation/equality.stderr
index 1a2f84715..d432e9577 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/equality.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/equality.stderr
@@ -13,5 +13,5 @@ error: return type notation is not allowed to use type equality
LL | fn test<T: Trait<method() = Box<dyn Future<Output = ()>>>>() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/associated-type-bounds/return-type-notation/missing.rs b/tests/ui/associated-type-bounds/return-type-notation/missing.rs
index 0679b96f6..e6270ec31 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/missing.rs
+++ b/tests/ui/associated-type-bounds/return-type-notation/missing.rs
@@ -8,6 +8,6 @@ trait Trait {
}
fn bar<T: Trait<methid(): Send>>() {}
-//~^ ERROR cannot find associated function `methid` for `Trait`
+//~^ ERROR associated function `methid` not found for `Trait`
fn main() {}
diff --git a/tests/ui/associated-type-bounds/return-type-notation/missing.stderr b/tests/ui/associated-type-bounds/return-type-notation/missing.stderr
index fb6538fa0..db9cb9f49 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/missing.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/missing.stderr
@@ -7,11 +7,12 @@ LL | #![feature(return_type_notation)]
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
-error: cannot find associated function `methid` for `Trait`
+error[E0220]: associated function `methid` not found for `Trait`
--> $DIR/missing.rs:10:17
|
LL | fn bar<T: Trait<methid(): Send>>() {}
- | ^^^^^^^^^^^^^^
+ | ^^^^^^ help: there is an associated function with a similar name: `method`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
+For more information about this error, try `rustc --explain E0220`.
diff --git a/tests/ui/associated-type-bounds/return-type-notation/non-rpitit.stderr b/tests/ui/associated-type-bounds/return-type-notation/non-rpitit.stderr
index 31b793995..3e307c5f4 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/non-rpitit.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/non-rpitit.stderr
@@ -18,5 +18,5 @@ LL | fn test<T: Trait<method(): Send>>() {}
|
= note: function returns `()`, which is not compatible with associated type return bounds
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stderr b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stderr
index 77e015b41..f27603e37 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stderr
@@ -7,6 +7,6 @@ LL | fn foo<T: Trait<method(i32): Send>>() {}
= note: see issue #52662 <https://github.com/rust-lang/rust/issues/52662> for more information
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr
index b104f38ce..7ca9aff43 100644
--- a/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr
+++ b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr
@@ -11,6 +11,6 @@ help: consider constraining the associated type `<C as O>::M` to `u8`
LL | impl<C: O<M = u8>> U<C> for u16 {
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/associated-types/associated-type-macro.stderr b/tests/ui/associated-types/associated-type-macro.stderr
index 6a4cf99c4..dc540a475 100644
--- a/tests/ui/associated-types/associated-type-macro.stderr
+++ b/tests/ui/associated-types/associated-type-macro.stderr
@@ -4,5 +4,5 @@ error: macros cannot use qualified paths
LL | <() as module>::mac!();
| ^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-types/associated-type-shadowed-from-non-local-supertrait.rs b/tests/ui/associated-types/associated-type-shadowed-from-non-local-supertrait.rs
new file mode 100644
index 000000000..045a43548
--- /dev/null
+++ b/tests/ui/associated-types/associated-type-shadowed-from-non-local-supertrait.rs
@@ -0,0 +1,15 @@
+// Test that no help message is emitted that suggests renaming the
+// associated type from a non-local trait
+
+pub trait NewIter: Iterator {
+ type Item;
+}
+
+impl<T> Clone for Box<dyn NewIter<Item = T>> {
+ //~^ ERROR the value of the associated type `Item` in `Iterator` must be specified
+ fn clone(&self) -> Self {
+ unimplemented!();
+ }
+}
+
+pub fn main() {}
diff --git a/tests/ui/associated-types/associated-type-shadowed-from-non-local-supertrait.stderr b/tests/ui/associated-types/associated-type-shadowed-from-non-local-supertrait.stderr
new file mode 100644
index 000000000..fdb4e4fc1
--- /dev/null
+++ b/tests/ui/associated-types/associated-type-shadowed-from-non-local-supertrait.stderr
@@ -0,0 +1,12 @@
+error[E0191]: the value of the associated type `Item` in `Iterator` must be specified
+ --> $DIR/associated-type-shadowed-from-non-local-supertrait.rs:8:27
+ |
+LL | type Item;
+ | --------- `Iterator::Item` shadowed here, consider renaming it
+...
+LL | impl<T> Clone for Box<dyn NewIter<Item = T>> {
+ | ^^^^^^^^^^^^^^^^^ associated type `Item` must be specified
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0191`.
diff --git a/tests/ui/associated-types/associated-type-shadowed-from-supertrait.rs b/tests/ui/associated-types/associated-type-shadowed-from-supertrait.rs
new file mode 100644
index 000000000..95d038928
--- /dev/null
+++ b/tests/ui/associated-types/associated-type-shadowed-from-supertrait.rs
@@ -0,0 +1,19 @@
+// Test Setting the value of an associated type
+// that is shadowed from a supertrait
+
+pub trait Super {
+ type X;
+}
+
+pub trait Sub: Super {
+ type X;
+}
+
+impl<T> Clone for Box<dyn Sub<X = T>> {
+ //~^ ERROR value of the associated type `X` in `Super` must be specified
+ fn clone(&self) -> Self {
+ unimplemented!();
+ }
+}
+
+pub fn main() {}
diff --git a/tests/ui/associated-types/associated-type-shadowed-from-supertrait.stderr b/tests/ui/associated-types/associated-type-shadowed-from-supertrait.stderr
new file mode 100644
index 000000000..e6cec255e
--- /dev/null
+++ b/tests/ui/associated-types/associated-type-shadowed-from-supertrait.stderr
@@ -0,0 +1,15 @@
+error[E0191]: the value of the associated type `X` in `Super` must be specified
+ --> $DIR/associated-type-shadowed-from-supertrait.rs:12:27
+ |
+LL | type X;
+ | ------ `Super::X` defined here, consider renaming it
+...
+LL | type X;
+ | ------ `Super::X` shadowed here, consider renaming it
+...
+LL | impl<T> Clone for Box<dyn Sub<X = T>> {
+ | ^^^^^^^^^^ associated type `X` must be specified
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0191`.
diff --git a/tests/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.stderr b/tests/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.stderr
index fbc4ccd4c..ebe56c8cd 100644
--- a/tests/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.stderr
+++ b/tests/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.stderr
@@ -10,6 +10,6 @@ help: this trait has no implementations, consider adding one
LL | trait Add<RHS=Self> {
| ^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/associated-types-bound-failure.stderr b/tests/ui/associated-types/associated-types-bound-failure.stderr
index 3eda22796..0b404819c 100644
--- a/tests/ui/associated-types/associated-types-bound-failure.stderr
+++ b/tests/ui/associated-types/associated-types-bound-failure.stderr
@@ -11,6 +11,6 @@ help: consider further restricting the associated type
LL | where G : GetToInt, <G as GetToInt>::R: ToInt
| +++++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/associated-types-eq-1.stderr b/tests/ui/associated-types/associated-types-eq-1.stderr
index e9ace7d25..14ef36876 100644
--- a/tests/ui/associated-types/associated-types-eq-1.stderr
+++ b/tests/ui/associated-types/associated-types-eq-1.stderr
@@ -15,6 +15,6 @@ help: you might be missing a type parameter
LL | fn foo2<I: Foo, A>(x: I) {
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/associated-types/associated-types-eq-2.stderr b/tests/ui/associated-types/associated-types-eq-2.stderr
index 23ee8cd23..447b8413e 100644
--- a/tests/ui/associated-types/associated-types-eq-2.stderr
+++ b/tests/ui/associated-types/associated-types-eq-2.stderr
@@ -4,6 +4,6 @@ error[E0229]: associated type bindings are not allowed here
LL | fn baz<I: Foo>(x: &<I as Foo<A=Bar>>::A) {}
| ^^^^^ associated type not allowed here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0229`.
diff --git a/tests/ui/associated-types/associated-types-eq-expr-path.stderr b/tests/ui/associated-types/associated-types-eq-expr-path.stderr
index bd354cf3e..7559f3b7c 100644
--- a/tests/ui/associated-types/associated-types-eq-expr-path.stderr
+++ b/tests/ui/associated-types/associated-types-eq-expr-path.stderr
@@ -4,6 +4,6 @@ error[E0229]: associated type bindings are not allowed here
LL | let x: isize = Foo::<A=usize>::bar();
| ^^^^^^^ associated type not allowed here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0229`.
diff --git a/tests/ui/associated-types/associated-types-for-unimpl-trait.stderr b/tests/ui/associated-types/associated-types-for-unimpl-trait.stderr
index 6552c8be7..17941b6bf 100644
--- a/tests/ui/associated-types/associated-types-for-unimpl-trait.stderr
+++ b/tests/ui/associated-types/associated-types-for-unimpl-trait.stderr
@@ -9,6 +9,6 @@ help: consider further restricting `Self`
LL | fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get {}
| +++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/associated-types-invalid-trait-ref-issue-18865.stderr b/tests/ui/associated-types/associated-types-invalid-trait-ref-issue-18865.stderr
index 676d6353d..adde31b4a 100644
--- a/tests/ui/associated-types/associated-types-invalid-trait-ref-issue-18865.stderr
+++ b/tests/ui/associated-types/associated-types-invalid-trait-ref-issue-18865.stderr
@@ -9,6 +9,6 @@ help: consider further restricting this bound
LL | fn f<T:Foo<isize> + Foo<usize>>(t: &T) {
| ++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/associated-types-issue-17359.stderr b/tests/ui/associated-types/associated-types-issue-17359.stderr
index 9e40d8095..f5397b8ec 100644
--- a/tests/ui/associated-types/associated-types-issue-17359.stderr
+++ b/tests/ui/associated-types/associated-types-issue-17359.stderr
@@ -7,6 +7,6 @@ LL | type Type;
LL | impl Trait for isize {}
| ^^^^^^^^^^^^^^^^^^^^ missing `Type` in implementation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/associated-types/associated-types-issue-20346.stderr b/tests/ui/associated-types/associated-types-issue-20346.stderr
index f38407986..8e6b847b3 100644
--- a/tests/ui/associated-types/associated-types-issue-20346.stderr
+++ b/tests/ui/associated-types/associated-types-issue-20346.stderr
@@ -22,6 +22,6 @@ note: required by a bound in `is_iterator_of`
LL | fn is_iterator_of<A, I: Iterator<Item=A>>(_: &I) {}
| ^^^^^^ required by this bound in `is_iterator_of`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/associated-types/associated-types-no-suitable-bound.stderr b/tests/ui/associated-types/associated-types-no-suitable-bound.stderr
index b2ee1b5e6..fe1be6be0 100644
--- a/tests/ui/associated-types/associated-types-no-suitable-bound.stderr
+++ b/tests/ui/associated-types/associated-types-no-suitable-bound.stderr
@@ -9,6 +9,6 @@ help: consider restricting type parameter `T`
LL | fn uhoh<T: Get>(foo: <T as Get>::Value) {}
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/associated-types-no-suitable-supertrait-2.stderr b/tests/ui/associated-types/associated-types-no-suitable-supertrait-2.stderr
index 2e40dbd06..b586053a5 100644
--- a/tests/ui/associated-types/associated-types-no-suitable-supertrait-2.stderr
+++ b/tests/ui/associated-types/associated-types-no-suitable-supertrait-2.stderr
@@ -9,6 +9,6 @@ help: consider further restricting `Self`
LL | fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get {}
| +++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/associated-types-outlives.stderr b/tests/ui/associated-types/associated-types-outlives.stderr
index 2fe3f2d4a..deeedd222 100644
--- a/tests/ui/associated-types/associated-types-outlives.stderr
+++ b/tests/ui/associated-types/associated-types-outlives.stderr
@@ -11,6 +11,6 @@ LL | drop(x);
LL | return f(y);
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0505`.
diff --git a/tests/ui/associated-types/associated-types-overridden-binding-2.stderr b/tests/ui/associated-types/associated-types-overridden-binding-2.stderr
index fdec01b95..4dfd275a1 100644
--- a/tests/ui/associated-types/associated-types-overridden-binding-2.stderr
+++ b/tests/ui/associated-types/associated-types-overridden-binding-2.stderr
@@ -6,6 +6,6 @@ LL | let _: &dyn I32Iterator<Item = u32> = &vec![42].into_iter();
|
= note: required for the cast from `&std::vec::IntoIter<u32>` to `&dyn Iterator<Item = u32, Item = i32>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/associated-types/associated-types-project-from-hrtb-in-fn.stderr b/tests/ui/associated-types/associated-types-project-from-hrtb-in-fn.stderr
index c508006c3..83bad291e 100644
--- a/tests/ui/associated-types/associated-types-project-from-hrtb-in-fn.stderr
+++ b/tests/ui/associated-types/associated-types-project-from-hrtb-in-fn.stderr
@@ -9,6 +9,6 @@ help: use a fully qualified path with inferred lifetimes
LL | x: <I as Foo<&isize>>::A)
| ~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0212`.
diff --git a/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.stderr b/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.stderr
index 2e67c2194..64a88525a 100644
--- a/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.stderr
+++ b/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.stderr
@@ -9,6 +9,6 @@ help: consider further restricting `Self`
LL | fn okay<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get;
| +++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/associated-types-unconstrained.stderr b/tests/ui/associated-types/associated-types-unconstrained.stderr
index ef9b7cae0..4221a064f 100644
--- a/tests/ui/associated-types/associated-types-unconstrained.stderr
+++ b/tests/ui/associated-types/associated-types-unconstrained.stderr
@@ -12,6 +12,6 @@ help: use the fully-qualified path to the only available implementation
LL | let x: isize = <isize as Foo>::bar();
| +++++++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0790`.
diff --git a/tests/ui/associated-types/associated-types-unsized.stderr b/tests/ui/associated-types/associated-types-unsized.stderr
index bec9b1500..e46b2a394 100644
--- a/tests/ui/associated-types/associated-types-unsized.stderr
+++ b/tests/ui/associated-types/associated-types-unsized.stderr
@@ -12,6 +12,6 @@ help: consider further restricting the associated type
LL | fn foo<T:Get>(t: T) where <T as Get>::Value: Sized {
| ++++++++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/bound-lifetime-in-binding-only.elision.stderr b/tests/ui/associated-types/bound-lifetime-in-binding-only.elision.stderr
index 4de4afb6e..24fd38f31 100644
--- a/tests/ui/associated-types/bound-lifetime-in-binding-only.elision.stderr
+++ b/tests/ui/associated-types/bound-lifetime-in-binding-only.elision.stderr
@@ -5,11 +5,16 @@ LL | fn elision<T: Fn() -> &i32>() {
| ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
LL | fn elision<T: Fn() -> &'static i32>() {
| +++++++
+help: instead, you are more likely to want to return an owned value
+ |
+LL - fn elision<T: Fn() -> &i32>() {
+LL + fn elision<T: Fn() -> i32>() {
+ |
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0106`.
diff --git a/tests/ui/associated-types/bound-lifetime-in-binding-only.ok.stderr b/tests/ui/associated-types/bound-lifetime-in-binding-only.ok.stderr
index b709fae5a..435e224bd 100644
--- a/tests/ui/associated-types/bound-lifetime-in-binding-only.ok.stderr
+++ b/tests/ui/associated-types/bound-lifetime-in-binding-only.ok.stderr
@@ -4,5 +4,5 @@ error: fatal error triggered by #[rustc_error]
LL | fn main() { }
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-types/bound-lifetime-in-return-only.elision.stderr b/tests/ui/associated-types/bound-lifetime-in-return-only.elision.stderr
index 7753d1865..d24378487 100644
--- a/tests/ui/associated-types/bound-lifetime-in-return-only.elision.stderr
+++ b/tests/ui/associated-types/bound-lifetime-in-return-only.elision.stderr
@@ -5,11 +5,16 @@ LL | fn elision(_: fn() -> &i32) {
| ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
LL | fn elision(_: fn() -> &'static i32) {
| +++++++
+help: instead, you are more likely to want to return an owned value
+ |
+LL - fn elision(_: fn() -> &i32) {
+LL + fn elision(_: fn() -> i32) {
+ |
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0106`.
diff --git a/tests/ui/associated-types/bound-lifetime-in-return-only.local.stderr b/tests/ui/associated-types/bound-lifetime-in-return-only.local.stderr
index 788cf667c..138b777e6 100644
--- a/tests/ui/associated-types/bound-lifetime-in-return-only.local.stderr
+++ b/tests/ui/associated-types/bound-lifetime-in-return-only.local.stderr
@@ -4,6 +4,6 @@ error[E0581]: return type references lifetime `'a`, which is not constrained by
LL | let _: for<'a> fn() -> &'a i32 = loop { };
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0581`.
diff --git a/tests/ui/associated-types/bound-lifetime-in-return-only.ok.stderr b/tests/ui/associated-types/bound-lifetime-in-return-only.ok.stderr
index 1c0d3ac10..1815a7be7 100644
--- a/tests/ui/associated-types/bound-lifetime-in-return-only.ok.stderr
+++ b/tests/ui/associated-types/bound-lifetime-in-return-only.ok.stderr
@@ -4,5 +4,5 @@ error: fatal error triggered by #[rustc_error]
LL | fn main() { }
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-types/bound-lifetime-in-return-only.structure.stderr b/tests/ui/associated-types/bound-lifetime-in-return-only.structure.stderr
index f7833500d..c7d097d37 100644
--- a/tests/ui/associated-types/bound-lifetime-in-return-only.structure.stderr
+++ b/tests/ui/associated-types/bound-lifetime-in-return-only.structure.stderr
@@ -4,6 +4,6 @@ error[E0581]: return type references lifetime `'a`, which is not constrained by
LL | x: for<'a> fn() -> &'a i32
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0581`.
diff --git a/tests/ui/associated-types/cache/project-fn-ret-contravariant.transmute.stderr b/tests/ui/associated-types/cache/project-fn-ret-contravariant.transmute.stderr
index 6d8ab2c3f..6ae13e922 100644
--- a/tests/ui/associated-types/cache/project-fn-ret-contravariant.transmute.stderr
+++ b/tests/ui/associated-types/cache/project-fn-ret-contravariant.transmute.stderr
@@ -6,5 +6,5 @@ LL | fn baz<'a,'b>(x: &'a u32) -> &'static u32 {
LL | bar(foo, x)
| ^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-types/cache/project-fn-ret-invariant.transmute.stderr b/tests/ui/associated-types/cache/project-fn-ret-invariant.transmute.stderr
index b64cb2c3d..b8100f6df 100644
--- a/tests/ui/associated-types/cache/project-fn-ret-invariant.transmute.stderr
+++ b/tests/ui/associated-types/cache/project-fn-ret-invariant.transmute.stderr
@@ -11,5 +11,5 @@ LL | bar(foo, x)
= note: the struct `Type<'a>` is invariant over the parameter `'a`
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-types/defaults-wf.stderr b/tests/ui/associated-types/defaults-wf.stderr
index fc830b8d6..aeb4e47ab 100644
--- a/tests/ui/associated-types/defaults-wf.stderr
+++ b/tests/ui/associated-types/defaults-wf.stderr
@@ -8,6 +8,6 @@ LL | type Ty = Vec<[u8]>;
note: required by a bound in `Vec`
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/dont-suggest-cyclic-constraint.stderr b/tests/ui/associated-types/dont-suggest-cyclic-constraint.stderr
index 3ecac9c83..1b4694a21 100644
--- a/tests/ui/associated-types/dont-suggest-cyclic-constraint.stderr
+++ b/tests/ui/associated-types/dont-suggest-cyclic-constraint.stderr
@@ -4,9 +4,9 @@ error[E0308]: mismatched types
LL | debug_assert_eq!(iter.next(), Some(value));
| ^^^^^^^^^^^ expected `Option<<I as Iterator>::Item>`, found `Option<&<I as Iterator>::Item>`
|
- = note: expected enum `Option<<I as Iterator>::Item>`
- found enum `Option<&<I as Iterator>::Item>`
+ = note: expected enum `Option<_>`
+ found enum `Option<&_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/associated-types/higher-ranked-projection.bad.stderr b/tests/ui/associated-types/higher-ranked-projection.bad.stderr
index 239f45539..09606a194 100644
--- a/tests/ui/associated-types/higher-ranked-projection.bad.stderr
+++ b/tests/ui/associated-types/higher-ranked-projection.bad.stderr
@@ -12,6 +12,6 @@ note: the lifetime requirement is introduced here
LL | where for<'a> &'a T: Mirror<Image=U>
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/associated-types/hr-associated-type-bound-1.stderr b/tests/ui/associated-types/hr-associated-type-bound-1.stderr
index b380a1b6f..ab5dc803c 100644
--- a/tests/ui/associated-types/hr-associated-type-bound-1.stderr
+++ b/tests/ui/associated-types/hr-associated-type-bound-1.stderr
@@ -14,6 +14,6 @@ LL | where
LL | for<'b> <Self as X<'b>>::U: Clone,
| ^^^^^ required by this bound in `X`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/hr-associated-type-bound-2.stderr b/tests/ui/associated-types/hr-associated-type-bound-2.stderr
index 8ccbc9fb5..2a7d75ef2 100644
--- a/tests/ui/associated-types/hr-associated-type-bound-2.stderr
+++ b/tests/ui/associated-types/hr-associated-type-bound-2.stderr
@@ -18,6 +18,6 @@ LL | for<'b> <Self as X<'b>>::U: Clone,
= note: 128 redundant requirements hidden
= note: required for `u32` to implement `for<'b> X<'b>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/associated-types/hr-associated-type-bound-object.stderr b/tests/ui/associated-types/hr-associated-type-bound-object.stderr
index a0a6f76a5..8c91211b9 100644
--- a/tests/ui/associated-types/hr-associated-type-bound-object.stderr
+++ b/tests/ui/associated-types/hr-associated-type-bound-object.stderr
@@ -13,6 +13,6 @@ LL | where
LL | for<'b> <Self as X<'b>>::U: Clone,
| ^^^^^ required by this bound in `X`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/hr-associated-type-bound-param-1.stderr b/tests/ui/associated-types/hr-associated-type-bound-param-1.stderr
index e249f2e0c..9e0393642 100644
--- a/tests/ui/associated-types/hr-associated-type-bound-param-1.stderr
+++ b/tests/ui/associated-types/hr-associated-type-bound-param-1.stderr
@@ -14,6 +14,6 @@ LL | trait Y<'a, T: ?Sized>
LL | for<'b> <Self as Y<'b, T>>::V: Clone,
| ^^^^^ required by this bound in `Y`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/hr-associated-type-bound-param-3.stderr b/tests/ui/associated-types/hr-associated-type-bound-param-3.stderr
index f49439d35..f8be4ec24 100644
--- a/tests/ui/associated-types/hr-associated-type-bound-param-3.stderr
+++ b/tests/ui/associated-types/hr-associated-type-bound-param-3.stderr
@@ -14,6 +14,6 @@ LL | trait X<'a, T>
LL | for<'b> <T as X<'b, T>>::U: Clone,
| ^^^^^ required by this bound in `X`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/hr-associated-type-bound-param-4.stderr b/tests/ui/associated-types/hr-associated-type-bound-param-4.stderr
index f8733b423..22c4bd686 100644
--- a/tests/ui/associated-types/hr-associated-type-bound-param-4.stderr
+++ b/tests/ui/associated-types/hr-associated-type-bound-param-4.stderr
@@ -14,6 +14,6 @@ LL | trait X<'a, T>
LL | for<'b> <(T,) as X<'b, T>>::U: Clone,
| ^^^^^ required by this bound in `X`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/hr-associated-type-bound-param-6.stderr b/tests/ui/associated-types/hr-associated-type-bound-param-6.stderr
index bd6e627a3..da988f4cf 100644
--- a/tests/ui/associated-types/hr-associated-type-bound-param-6.stderr
+++ b/tests/ui/associated-types/hr-associated-type-bound-param-6.stderr
@@ -9,6 +9,6 @@ help: consider restricting type parameter `T`
LL | impl<S, T: for<'b> X<'b, T>> X<'_, T> for (S,) {
| ++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/hr-associated-type-projection-1.stderr b/tests/ui/associated-types/hr-associated-type-projection-1.stderr
index 425cfdca0..59b52521e 100644
--- a/tests/ui/associated-types/hr-associated-type-projection-1.stderr
+++ b/tests/ui/associated-types/hr-associated-type-projection-1.stderr
@@ -21,6 +21,6 @@ help: consider further restricting this bound
LL | impl<T: Copy + std::ops::Deref<Target = T>> UnsafeCopy<'_, T> for T {
| ++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/associated-types/impl-trait-return-missing-constraint.stderr b/tests/ui/associated-types/impl-trait-return-missing-constraint.stderr
index fbd76a64c..24409b32a 100644
--- a/tests/ui/associated-types/impl-trait-return-missing-constraint.stderr
+++ b/tests/ui/associated-types/impl-trait-return-missing-constraint.stderr
@@ -19,6 +19,6 @@ help: consider constraining the associated type `<impl Bar as Foo>::Item` to `i3
LL | fn bar() -> impl Bar<Item = i32> {
| ++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/associated-types/impl-wf-cycle-1.stderr b/tests/ui/associated-types/impl-wf-cycle-1.stderr
index 53022dcb4..5fa36733f 100644
--- a/tests/ui/associated-types/impl-wf-cycle-1.stderr
+++ b/tests/ui/associated-types/impl-wf-cycle-1.stderr
@@ -19,6 +19,6 @@ LL | Self::A: Baz,
= note: 1 redundant requirement hidden
= note: required for `(T,)` to implement `Grault`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/associated-types/impl-wf-cycle-2.stderr b/tests/ui/associated-types/impl-wf-cycle-2.stderr
index 81c58be92..17a96bbd9 100644
--- a/tests/ui/associated-types/impl-wf-cycle-2.stderr
+++ b/tests/ui/associated-types/impl-wf-cycle-2.stderr
@@ -16,6 +16,6 @@ LL | impl<T: Grault> Grault for (T,)
LL | Self::A: Copy,
| ---- unsatisfied trait bound introduced here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/associated-types/issue-19883.stderr b/tests/ui/associated-types/issue-19883.stderr
index bd6a86b74..35184e852 100644
--- a/tests/ui/associated-types/issue-19883.stderr
+++ b/tests/ui/associated-types/issue-19883.stderr
@@ -10,6 +10,6 @@ LL | <Dst as From<Self>>::Dst
| not found in `From`
| help: maybe you meant this associated type: `Output`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0576`.
diff --git a/tests/ui/associated-types/issue-20005.stderr b/tests/ui/associated-types/issue-20005.stderr
index c8e57df0d..02470a442 100644
--- a/tests/ui/associated-types/issue-20005.stderr
+++ b/tests/ui/associated-types/issue-20005.stderr
@@ -18,6 +18,6 @@ help: consider relaxing the implicit `Sized` restriction
LL | trait From<Src: ?Sized> {
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/issue-20825.stderr b/tests/ui/associated-types/issue-20825.stderr
index 02b3536e2..e4f1fc623 100644
--- a/tests/ui/associated-types/issue-20825.stderr
+++ b/tests/ui/associated-types/issue-20825.stderr
@@ -12,6 +12,6 @@ LL | pub trait Processor: Subscriber<Input = Self::Input> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/associated-types/issue-22037.stderr b/tests/ui/associated-types/issue-22037.stderr
index 0e019f10f..b02dad97d 100644
--- a/tests/ui/associated-types/issue-22037.stderr
+++ b/tests/ui/associated-types/issue-22037.stderr
@@ -9,6 +9,6 @@ LL | fn a(&self) -> <Self as A>::X;
| not found in `A`
| help: maybe you meant this associated type: `Output`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0576`.
diff --git a/tests/ui/associated-types/issue-23595-1.stderr b/tests/ui/associated-types/issue-23595-1.stderr
index 3443c4925..f9d58c23c 100644
--- a/tests/ui/associated-types/issue-23595-1.stderr
+++ b/tests/ui/associated-types/issue-23595-1.stderr
@@ -8,6 +8,6 @@ LL | type ChildKey;
LL | type Children = dyn Index<Self::ChildKey, Output=dyn Hierarchy>;
| ------------- `Children` defined here ^^^^^^^^^ help: specify the associated types: `Hierarchy<Value = Type, ChildKey = Type, Children = Type>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0191`.
diff --git a/tests/ui/associated-types/issue-23595-2.stderr b/tests/ui/associated-types/issue-23595-2.stderr
index 73effa9f9..2671bf57d 100644
--- a/tests/ui/associated-types/issue-23595-2.stderr
+++ b/tests/ui/associated-types/issue-23595-2.stderr
@@ -4,6 +4,6 @@ error[E0220]: associated type `anything_here_kills_it` not found for `Self`
LL | type B = C<Self::anything_here_kills_it>;
| ^^^^^^^^^^^^^^^^^^^^^^ help: `Self` has the following associated type: `B`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0220`.
diff --git a/tests/ui/associated-types/issue-25700.stderr b/tests/ui/associated-types/issue-25700.stderr
index fa309a55c..4e432c0e7 100644
--- a/tests/ui/associated-types/issue-25700.stderr
+++ b/tests/ui/associated-types/issue-25700.stderr
@@ -8,6 +8,6 @@ LL | drop(t);
LL | drop(t);
| ^ value used here after move
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/associated-types/issue-26681.stderr b/tests/ui/associated-types/issue-26681.stderr
index 977620d90..b64bcee07 100644
--- a/tests/ui/associated-types/issue-26681.stderr
+++ b/tests/ui/associated-types/issue-26681.stderr
@@ -9,6 +9,6 @@ LL | const C: <Self::Fv as Foo>::Bar = 6665;
= note: expected associated type `<<Self as Baz>::Fv as Foo>::Bar`
found type `{integer}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/associated-types/issue-27675-unchecked-bounds.stderr b/tests/ui/associated-types/issue-27675-unchecked-bounds.stderr
index a14a273b3..70bf90150 100644
--- a/tests/ui/associated-types/issue-27675-unchecked-bounds.stderr
+++ b/tests/ui/associated-types/issue-27675-unchecked-bounds.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `T`
LL | pub fn copy_any<T: std::marker::Copy>(t: &T) -> T {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/issue-32323.stderr b/tests/ui/associated-types/issue-32323.stderr
index 8212c607e..6b0ef1efd 100644
--- a/tests/ui/associated-types/issue-32323.stderr
+++ b/tests/ui/associated-types/issue-32323.stderr
@@ -13,6 +13,6 @@ help: consider constraining the associated type `<T as Tr<'a>>::Out` to `()`
LL | pub fn f<'a, T: Tr<'a, Out = ()>>() -> <T as Tr<'a>>::Out {}
| ++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/associated-types/issue-36499.rs b/tests/ui/associated-types/issue-36499.rs
index 7f8f13ef8..3d6f11faf 100644
--- a/tests/ui/associated-types/issue-36499.rs
+++ b/tests/ui/associated-types/issue-36499.rs
@@ -1,4 +1,4 @@
-// error-pattern: aborting due to previous error
+// error-pattern: aborting due to 1 previous error
fn main() {
2 + +2;
diff --git a/tests/ui/associated-types/issue-36499.stderr b/tests/ui/associated-types/issue-36499.stderr
index 80e42b61d..dd91bac81 100644
--- a/tests/ui/associated-types/issue-36499.stderr
+++ b/tests/ui/associated-types/issue-36499.stderr
@@ -10,5 +10,5 @@ LL - 2 + +2;
LL + 2 + 2;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-types/issue-38821.stderr b/tests/ui/associated-types/issue-38821.stderr
index a52a9c138..8b628f5ae 100644
--- a/tests/ui/associated-types/issue-38821.stderr
+++ b/tests/ui/associated-types/issue-38821.stderr
@@ -17,6 +17,6 @@ help: consider further restricting the associated type
LL | Expr: Expression<SqlType=<Col::SqlType as IntoNullable>::Nullable>, <Col as Expression>::SqlType: NotNull,
| +++++++++++++++++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/issue-43784-associated-type.stderr b/tests/ui/associated-types/issue-43784-associated-type.stderr
index 50fa7d1ac..529fc1f11 100644
--- a/tests/ui/associated-types/issue-43784-associated-type.stderr
+++ b/tests/ui/associated-types/issue-43784-associated-type.stderr
@@ -19,6 +19,6 @@ help: consider restricting type parameter `T`
LL | impl<T: std::marker::Copy> Complete for T {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/issue-44153.stderr b/tests/ui/associated-types/issue-44153.stderr
index 73365d64d..384b8685a 100644
--- a/tests/ui/associated-types/issue-44153.stderr
+++ b/tests/ui/associated-types/issue-44153.stderr
@@ -17,6 +17,6 @@ LL | impl<'a> Visit for () where
LL | (): Array<Element=&'a ()>,
| -------------- unsatisfied trait bound introduced here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/associated-types/issue-47814.stderr b/tests/ui/associated-types/issue-47814.stderr
index 2e4ddb811..7382426b0 100644
--- a/tests/ui/associated-types/issue-47814.stderr
+++ b/tests/ui/associated-types/issue-47814.stderr
@@ -10,5 +10,5 @@ note: not a concrete type
LL | impl<'a> ArpIPv4<'a> {
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-types/issue-54108.stderr b/tests/ui/associated-types/issue-54108.stderr
index 6ff5e4542..f300208fc 100644
--- a/tests/ui/associated-types/issue-54108.stderr
+++ b/tests/ui/associated-types/issue-54108.stderr
@@ -15,6 +15,6 @@ help: consider further restricting the associated type
LL | T: SubEncoder, <T as SubEncoder>::ActualSize: Add
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/issue-62200.stderr b/tests/ui/associated-types/issue-62200.stderr
index 04f0728f5..7b040f8aa 100644
--- a/tests/ui/associated-types/issue-62200.stderr
+++ b/tests/ui/associated-types/issue-62200.stderr
@@ -7,6 +7,6 @@ LL | fn foo(x: impl Fn(<S as T<'_>>::A) -> <S as T<'_>>::A) {}
= note: lifetimes appearing in an associated or opaque type are not considered constrained
= note: consider introducing a named lifetime parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0582`.
diff --git a/tests/ui/associated-types/issue-63593.stderr b/tests/ui/associated-types/issue-63593.stderr
index f643ec3ff..67151431a 100644
--- a/tests/ui/associated-types/issue-63593.stderr
+++ b/tests/ui/associated-types/issue-63593.stderr
@@ -14,6 +14,6 @@ help: consider further restricting `Self`
LL | trait MyTrait: Sized {
| +++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/issue-64855.stderr b/tests/ui/associated-types/issue-64855.stderr
index f1016f0e3..7c09abdb3 100644
--- a/tests/ui/associated-types/issue-64855.stderr
+++ b/tests/ui/associated-types/issue-64855.stderr
@@ -10,6 +10,6 @@ help: this trait has no implementations, consider adding one
LL | pub trait Foo {
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/issue-72806.stderr b/tests/ui/associated-types/issue-72806.stderr
index e95943f34..9cb615bbb 100644
--- a/tests/ui/associated-types/issue-72806.stderr
+++ b/tests/ui/associated-types/issue-72806.stderr
@@ -15,6 +15,6 @@ note: required by a bound in `Bar::Sibling`
LL | type Sibling: Bar2<Ok=char>;
| ^^^^^^^ required by this bound in `Bar::Sibling`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/associated-types/issue-85103-layout-debug.stderr b/tests/ui/associated-types/issue-85103-layout-debug.stderr
index 0bdea10ba..c79543e73 100644
--- a/tests/ui/associated-types/issue-85103-layout-debug.stderr
+++ b/tests/ui/associated-types/issue-85103-layout-debug.stderr
@@ -11,6 +11,6 @@ help: consider introducing a `where` clause, but there might be an alternative b
LL | type Edges<'a, E> where [E]: ToOwned = Cow<'a, [E]>;
| ++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/missing-associated-types.stderr b/tests/ui/associated-types/missing-associated-types.stderr
index e9669afe8..0636667ea 100644
--- a/tests/ui/associated-types/missing-associated-types.stderr
+++ b/tests/ui/associated-types/missing-associated-types.stderr
@@ -49,7 +49,7 @@ LL | type B;
LL | type Bar<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs>;
| ^^^^^^^^ ^^^^^^^^ ^^^^^^ ^^^^^^ associated types `A`, `B`, `Output` must be specified
| | | |
- | | | associated types `Output` (from trait `Mul`), `Output` (from trait `Div`) must be specified
+ | | | associated types `Output` (from trait `Div`), `Output` (from trait `Mul`) must be specified
| | associated type `Output` must be specified
| associated type `Output` must be specified
|
@@ -119,7 +119,7 @@ error[E0191]: the value of the associated types `Output` in `Div`, `Output` in `
--> $DIR/missing-associated-types.rs:24:21
|
LL | type Bal<Rhs> = dyn X<Rhs>;
- | ^^^^^^ associated types `Output` (from trait `Mul`), `Output` (from trait `Div`) must be specified
+ | ^^^^^^ associated types `Output` (from trait `Div`), `Output` (from trait `Mul`) must be specified
|
= help: consider introducing a new type parameter, adding `where` constraints using the fully-qualified path to the associated types
diff --git a/tests/ui/associated-types/point-at-type-on-obligation-failure.stderr b/tests/ui/associated-types/point-at-type-on-obligation-failure.stderr
index 9afbe82c3..1c9de509e 100644
--- a/tests/ui/associated-types/point-at-type-on-obligation-failure.stderr
+++ b/tests/ui/associated-types/point-at-type-on-obligation-failure.stderr
@@ -15,6 +15,6 @@ note: required by a bound in `Bar::Sibling`
LL | type Sibling: Bar2<Ok=Self::Ok>;
| ^^^^^^^^^^^ required by this bound in `Bar::Sibling`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr b/tests/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr
index 8e7cf86c4..99a46dedc 100644
--- a/tests/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr
+++ b/tests/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr
@@ -11,6 +11,6 @@ help: consider further restricting `Self`
LL | trait ArithmeticOps: Add<Output=Self> + Sub<Output=Self> + Mul<Output=Self> + Div<Output=Self> + Sized {}
| +++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/async-await/async-borrowck-escaping-closure-error.stderr b/tests/ui/async-await/async-borrowck-escaping-closure-error.stderr
index 10691aad0..1d8d1c67b 100644
--- a/tests/ui/async-await/async-borrowck-escaping-closure-error.stderr
+++ b/tests/ui/async-await/async-borrowck-escaping-closure-error.stderr
@@ -16,6 +16,6 @@ help: to force the closure to take ownership of `x` (and any other referenced va
LL | Box::new((async move || x)())
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0373`.
diff --git a/tests/ui/async-await/async-fn-path-elision.stderr b/tests/ui/async-await/async-fn-path-elision.stderr
index 224198653..4b0139a39 100644
--- a/tests/ui/async-await/async-fn-path-elision.stderr
+++ b/tests/ui/async-await/async-fn-path-elision.stderr
@@ -9,6 +9,6 @@ help: indicate the anonymous lifetime
LL | async fn error(lt: HasLifetime<'_>) {
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0726`.
diff --git a/tests/ui/async-await/async-is-unwindsafe.stderr b/tests/ui/async-await/async-is-unwindsafe.stderr
index eaa455380..99bce89e8 100644
--- a/tests/ui/async-await/async-is-unwindsafe.stderr
+++ b/tests/ui/async-await/async-is-unwindsafe.stderr
@@ -29,6 +29,6 @@ note: required by a bound in `is_unwindsafe`
LL | fn is_unwindsafe(_: impl std::panic::UnwindSafe) {}
| ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_unwindsafe`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/async-await/await-keyword/post_expansion_error.stderr b/tests/ui/async-await/await-keyword/post_expansion_error.stderr
index 0996c38b3..7948fb956 100644
--- a/tests/ui/async-await/await-keyword/post_expansion_error.stderr
+++ b/tests/ui/async-await/await-keyword/post_expansion_error.stderr
@@ -4,5 +4,5 @@ error: expected expression, found `)`
LL | await!()
| ^ expected expression
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/awaiting-unsized-param.stderr b/tests/ui/async-await/awaiting-unsized-param.stderr
index 47a5dcebf..010473697 100644
--- a/tests/ui/async-await/awaiting-unsized-param.stderr
+++ b/tests/ui/async-await/awaiting-unsized-param.stderr
@@ -16,6 +16,6 @@ LL | async fn bug<T>(mut f: dyn Future<Output = T> + Unpin) -> T {
= help: the trait `Sized` is not implemented for `(dyn Future<Output = T> + Unpin + 'static)`
= note: all values captured by value by a closure must have a statically known size
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/async-await/clone-suggestion.stderr b/tests/ui/async-await/clone-suggestion.stderr
index b5c8ef699..3374068ed 100644
--- a/tests/ui/async-await/clone-suggestion.stderr
+++ b/tests/ui/async-await/clone-suggestion.stderr
@@ -15,6 +15,6 @@ help: you can `clone` the value and consume it, but this might not be your desir
LL | f.clone().await;
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/async-await/const-async-fn-in-main.stderr b/tests/ui/async-await/const-async-fn-in-main.stderr
index 10b151709..06f3e3462 100644
--- a/tests/ui/async-await/const-async-fn-in-main.stderr
+++ b/tests/ui/async-await/const-async-fn-in-main.stderr
@@ -7,5 +7,5 @@ LL | const async fn a() {}
| | `async` because of this
| `const` because of this
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/dont-print-desugared-async.stderr b/tests/ui/async-await/dont-print-desugared-async.stderr
index d80467c7f..1dade23f6 100644
--- a/tests/ui/async-await/dont-print-desugared-async.stderr
+++ b/tests/ui/async-await/dont-print-desugared-async.stderr
@@ -4,6 +4,6 @@ error[E0596]: cannot borrow data in a `&` reference as mutable
LL | async fn async_fn(&ref mut s: &[i32]) {}
| ^^^^^^^^^ cannot borrow as mutable through `&` reference
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/async-await/dont-suggest-await-on-method-return-mismatch.stderr b/tests/ui/async-await/dont-suggest-await-on-method-return-mismatch.stderr
index e65d9d0e5..1faaf4ddc 100644
--- a/tests/ui/async-await/dont-suggest-await-on-method-return-mismatch.stderr
+++ b/tests/ui/async-await/dont-suggest-await-on-method-return-mismatch.stderr
@@ -4,6 +4,6 @@ error[E0599]: no method named `test` found for opaque type `impl Future<Output =
LL | let x: u32 = foo().test();
| ^^^^ method not found in `impl Future<Output = A>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/async-await/dont-suggest-missing-await.stderr b/tests/ui/async-await/dont-suggest-missing-await.stderr
index 1fa4e5db0..45a226c31 100644
--- a/tests/ui/async-await/dont-suggest-missing-await.stderr
+++ b/tests/ui/async-await/dont-suggest-missing-await.stderr
@@ -21,6 +21,6 @@ help: consider `await`ing on the `Future`
LL | take_u32(x.await)
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/async-await/drop-track-field-assign-nonsend.stderr b/tests/ui/async-await/drop-track-field-assign-nonsend.stderr
index 6c235916d..9fce4d61b 100644
--- a/tests/ui/async-await/drop-track-field-assign-nonsend.stderr
+++ b/tests/ui/async-await/drop-track-field-assign-nonsend.stderr
@@ -19,5 +19,5 @@ note: required by a bound in `assert_send`
LL | fn assert_send<T: Send>(_: T) {}
| ^^^^ required by this bound in `assert_send`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/feature-async-closure.stderr b/tests/ui/async-await/feature-async-closure.stderr
index 485a838b6..c69a0dd9e 100644
--- a/tests/ui/async-await/feature-async-closure.stderr
+++ b/tests/ui/async-await/feature-async-closure.stderr
@@ -8,6 +8,6 @@ LL | let _ = async || {};
= help: add `#![feature(async_closure)]` to the crate attributes to enable
= help: to use an async block, remove the `||`: `async {`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/async-await/feature-self-return-type.stderr b/tests/ui/async-await/feature-self-return-type.stderr
index dc160bfbf..120f1c9b0 100644
--- a/tests/ui/async-await/feature-self-return-type.stderr
+++ b/tests/ui/async-await/feature-self-return-type.stderr
@@ -11,6 +11,6 @@ LL |
LL | };
| - `bar` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/async-await/field-assign-nonsend.stderr b/tests/ui/async-await/field-assign-nonsend.stderr
index 3037d7024..418a0829c 100644
--- a/tests/ui/async-await/field-assign-nonsend.stderr
+++ b/tests/ui/async-await/field-assign-nonsend.stderr
@@ -19,5 +19,5 @@ note: required by a bound in `assert_send`
LL | fn assert_send<T: Send>(_: T) {}
| ^^^^ required by this bound in `assert_send`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/future-contains-err-issue-115188.stderr b/tests/ui/async-await/future-contains-err-issue-115188.stderr
index 8fd2550c1..0e2da190a 100644
--- a/tests/ui/async-await/future-contains-err-issue-115188.stderr
+++ b/tests/ui/async-await/future-contains-err-issue-115188.stderr
@@ -4,6 +4,6 @@ error[E0063]: missing field `t` in initializer of `Wrapper<_>`
LL | let y = Wrapper { };
| ^^^^^^^ missing `t`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0063`.
diff --git a/tests/ui/async-await/future-sizes/async-awaiting-fut.stdout b/tests/ui/async-await/future-sizes/async-awaiting-fut.stdout
index b0447a582..47b39e524 100644
--- a/tests/ui/async-await/future-sizes/async-awaiting-fut.stdout
+++ b/tests/ui/async-await/future-sizes/async-awaiting-fut.stdout
@@ -52,10 +52,16 @@ print-type-size variant `Panicked`: 1024 bytes
print-type-size upvar `.arg`: 1024 bytes
print-type-size type: `std::mem::ManuallyDrop<bool>`: 1 bytes, alignment: 1 bytes
print-type-size field `.value`: 1 bytes
+print-type-size type: `std::mem::ManuallyDrop<{async fn body@$DIR/async-awaiting-fut.rs:6:17: 6:19}>`: 1 bytes, alignment: 1 bytes
+print-type-size field `.value`: 1 bytes
print-type-size type: `std::mem::MaybeUninit<bool>`: 1 bytes, alignment: 1 bytes
print-type-size variant `MaybeUninit`: 1 bytes
print-type-size field `.uninit`: 0 bytes
print-type-size field `.value`: 1 bytes
+print-type-size type: `std::mem::MaybeUninit<{async fn body@$DIR/async-awaiting-fut.rs:6:17: 6:19}>`: 1 bytes, alignment: 1 bytes
+print-type-size variant `MaybeUninit`: 1 bytes
+print-type-size field `.uninit`: 0 bytes
+print-type-size field `.value`: 1 bytes
print-type-size type: `std::task::Poll<()>`: 1 bytes, alignment: 1 bytes
print-type-size discriminant: 1 bytes
print-type-size variant `Ready`: 0 bytes
diff --git a/tests/ui/async-await/in-trait/async-default-fn-overridden.rs b/tests/ui/async-await/in-trait/async-default-fn-overridden.rs
index c8fd2d8f6..491dfcc6a 100644
--- a/tests/ui/async-await/in-trait/async-default-fn-overridden.rs
+++ b/tests/ui/async-await/in-trait/async-default-fn-overridden.rs
@@ -1,6 +1,7 @@
// run-pass
// edition:2021
+#![feature(noop_waker)]
use std::future::Future;
@@ -32,33 +33,18 @@ async fn async_main() {
// ------------------------------------------------------------------------- //
// Implementation Details Below...
-use std::pin::Pin;
+use std::pin::pin;
use std::task::*;
-pub fn noop_waker() -> Waker {
- let raw = RawWaker::new(std::ptr::null(), &NOOP_WAKER_VTABLE);
-
- // SAFETY: the contracts for RawWaker and RawWakerVTable are upheld
- unsafe { Waker::from_raw(raw) }
-}
-
-const NOOP_WAKER_VTABLE: RawWakerVTable = RawWakerVTable::new(noop_clone, noop, noop, noop);
-
-unsafe fn noop_clone(_p: *const ()) -> RawWaker {
- RawWaker::new(std::ptr::null(), &NOOP_WAKER_VTABLE)
-}
-
-unsafe fn noop(_p: *const ()) {}
-
fn main() {
- let mut fut = async_main();
+ let mut fut = pin!(async_main());
// Poll loop, just to test the future...
- let waker = noop_waker();
+ let waker = Waker::noop();
let ctx = &mut Context::from_waker(&waker);
loop {
- match unsafe { Pin::new_unchecked(&mut fut).poll(ctx) } {
+ match fut.as_mut().poll(ctx) {
Poll::Pending => {}
Poll::Ready(()) => break,
}
diff --git a/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.stderr b/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.stderr
index b70b36adb..54df0edf5 100644
--- a/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.stderr
+++ b/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.stderr
@@ -9,9 +9,9 @@ note: type in trait
|
LL | fn foo(&self) -> Pin<Box<dyn Future<Output = i32> + '_>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = note: expected signature `fn(&i32) -> Pin<Box<dyn Future<Output = i32>>>`
- found signature `fn(&i32) -> impl Future<Output = i32>`
+ = note: expected signature `fn(&_) -> Pin<Box<dyn Future<Output = i32>>>`
+ found signature `fn(&_) -> impl Future<Output = i32>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0053`.
diff --git a/tests/ui/async-await/in-trait/async-example-desugared-boxed.stderr b/tests/ui/async-await/in-trait/async-example-desugared-boxed.stderr
index 6392ce86e..1462c694e 100644
--- a/tests/ui/async-await/in-trait/async-example-desugared-boxed.stderr
+++ b/tests/ui/async-await/in-trait/async-example-desugared-boxed.stderr
@@ -7,5 +7,5 @@ LL | async fn foo(&self) -> i32;
LL | fn foo(&self) -> Pin<Box<dyn Future<Output = i32> + '_>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/in-trait/async-example-desugared-manual.stderr b/tests/ui/async-await/in-trait/async-example-desugared-manual.stderr
index 1eda6fe65..a2f1060e3 100644
--- a/tests/ui/async-await/in-trait/async-example-desugared-manual.stderr
+++ b/tests/ui/async-await/in-trait/async-example-desugared-manual.stderr
@@ -7,5 +7,5 @@ LL | async fn foo(&self) -> i32;
LL | fn foo(&self) -> MyFuture {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/in-trait/async-recursive-generic.stderr b/tests/ui/async-await/in-trait/async-recursive-generic.stderr
index cf0bcd741..11489c18a 100644
--- a/tests/ui/async-await/in-trait/async-recursive-generic.stderr
+++ b/tests/ui/async-await/in-trait/async-recursive-generic.stderr
@@ -7,6 +7,6 @@ LL | async fn foo_recursive(&self, n: usize) -> T {
= note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
= note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0733`.
diff --git a/tests/ui/async-await/in-trait/async-recursive.stderr b/tests/ui/async-await/in-trait/async-recursive.stderr
index b959652ea..587962857 100644
--- a/tests/ui/async-await/in-trait/async-recursive.stderr
+++ b/tests/ui/async-await/in-trait/async-recursive.stderr
@@ -7,6 +7,6 @@ LL | async fn foo_recursive(&self, n: usize) -> i32 {
= note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
= note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0733`.
diff --git a/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.rs b/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.rs
index 18b0fa485..f21abf012 100644
--- a/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.rs
+++ b/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.rs
@@ -2,6 +2,7 @@
// known-bug: #108309
#![feature(min_specialization)]
+#![feature(noop_waker)]
struct MyStruct;
@@ -35,34 +36,18 @@ async fn indirection<T>(x: T) -> &'static str {
// ------------------------------------------------------------------------- //
// Implementation Details Below...
-use std::future::Future;
-use std::pin::Pin;
+use std::pin::{pin, Pin};
use std::task::*;
-pub fn noop_waker() -> Waker {
- let raw = RawWaker::new(std::ptr::null(), &NOOP_WAKER_VTABLE);
-
- // SAFETY: the contracts for RawWaker and RawWakerVTable are upheld
- unsafe { Waker::from_raw(raw) }
-}
-
-const NOOP_WAKER_VTABLE: RawWakerVTable = RawWakerVTable::new(noop_clone, noop, noop, noop);
-
-unsafe fn noop_clone(_p: *const ()) -> RawWaker {
- RawWaker::new(std::ptr::null(), &NOOP_WAKER_VTABLE)
-}
-
-unsafe fn noop(_p: *const ()) {}
-
fn main() {
- let mut fut = async_main();
+ let mut fut = pin!(async_main());
// Poll loop, just to test the future...
- let waker = noop_waker();
+ let waker = Waker::noop();
let ctx = &mut Context::from_waker(&waker);
loop {
- match unsafe { Pin::new_unchecked(&mut fut).poll(ctx) } {
+ match fut.as_mut().poll(ctx) {
Poll::Pending => {}
Poll::Ready(()) => break,
}
diff --git a/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.stderr b/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.stderr
index 5e2be0862..0560cd9c5 100644
--- a/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.stderr
+++ b/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.stderr
@@ -1,11 +1,11 @@
error[E0053]: method `foo` has an incompatible type for trait
- --> $DIR/dont-project-to-specializable-projection.rs:13:5
+ --> $DIR/dont-project-to-specializable-projection.rs:14:5
|
LL | default async fn foo(_: T) -> &'static str {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected associated type, found future
|
note: type in trait
- --> $DIR/dont-project-to-specializable-projection.rs:9:5
+ --> $DIR/dont-project-to-specializable-projection.rs:10:5
|
LL | async fn foo(_: T) -> &'static str;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -13,13 +13,29 @@ LL | async fn foo(_: T) -> &'static str;
found signature `fn(_) -> impl Future<Output = &'static str>`
error: async associated function in trait cannot be specialized
- --> $DIR/dont-project-to-specializable-projection.rs:13:5
+ --> $DIR/dont-project-to-specializable-projection.rs:14:5
|
LL | default async fn foo(_: T) -> &'static str {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: specialization behaves in inconsistent and surprising ways with async functions in traits, and for now is disallowed
-error: aborting due to 2 previous errors
+error[E0599]: no method named `poll` found for struct `Pin<&mut impl Future<Output = ()>>` in the current scope
+ --> $DIR/dont-project-to-specializable-projection.rs:50:28
+ |
+LL | match fut.as_mut().poll(ctx) {
+ | ^^^^ method not found in `Pin<&mut impl Future<Output = ()>>`
+ --> $SRC_DIR/core/src/future/future.rs:LL:COL
+ |
+ = note: the method is available for `Pin<&mut impl Future<Output = ()>>` here
+ |
+ = help: items from traits can only be used if the trait is in scope
+help: the following trait is implemented but not in scope; perhaps add a `use` for it:
+ |
+LL + use std::future::Future;
+ |
+
+error: aborting due to 3 previous errors
-For more information about this error, try `rustc --explain E0053`.
+Some errors have detailed explanations: E0053, E0599.
+For more information about an error, try `rustc --explain E0053`.
diff --git a/tests/ui/async-await/in-trait/fn-not-async-err.stderr b/tests/ui/async-await/in-trait/fn-not-async-err.stderr
index cd085074a..f75ccb65d 100644
--- a/tests/ui/async-await/in-trait/fn-not-async-err.stderr
+++ b/tests/ui/async-await/in-trait/fn-not-async-err.stderr
@@ -7,5 +7,5 @@ LL | async fn foo(&self) -> i32;
LL | fn foo(&self) -> i32 {
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/in-trait/generics-mismatch.stderr b/tests/ui/async-await/in-trait/generics-mismatch.stderr
index 647cc698f..5f7aeb171 100644
--- a/tests/ui/async-await/in-trait/generics-mismatch.stderr
+++ b/tests/ui/async-await/in-trait/generics-mismatch.stderr
@@ -11,6 +11,6 @@ LL | impl Foo for () {
LL | async fn foo<const N: usize>() {}
| ^^^^^^^^^^^^^^ found const parameter of type `usize`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0053`.
diff --git a/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.stderr b/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.stderr
index ce02c1e99..8e573b512 100644
--- a/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.stderr
+++ b/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.stderr
@@ -1,10 +1,12 @@
-error[E0391]: cycle detected when computing layout of `{async fn body@$DIR/indirect-recursion-issue-112047.rs:33:27: 35:6}`
+error[E0391]: cycle detected when computing layout of `core::mem::maybe_uninit::MaybeUninit<{async fn body@$DIR/indirect-recursion-issue-112047.rs:33:27: 35:6}>`
|
- = note: ...which requires computing layout of `<<A as First>::Second as Second>::{opaque#0}`...
- = note: ...which again requires computing layout of `{async fn body@$DIR/indirect-recursion-issue-112047.rs:33:27: 35:6}`, completing the cycle
+ = note: ...which requires computing layout of `core::mem::manually_drop::ManuallyDrop<{async fn body@$DIR/indirect-recursion-issue-112047.rs:33:27: 35:6}>`...
+ = note: ...which requires computing layout of `{async fn body@$DIR/indirect-recursion-issue-112047.rs:33:27: 35:6}`...
+ = note: ...which requires computing layout of `core::mem::maybe_uninit::MaybeUninit<<<A as First>::Second as Second>::{opaque#0}>`...
+ = note: ...which again requires computing layout of `core::mem::maybe_uninit::MaybeUninit<{async fn body@$DIR/indirect-recursion-issue-112047.rs:33:27: 35:6}>`, completing the cycle
= note: cycle used when computing layout of `{async block@$DIR/indirect-recursion-issue-112047.rs:6:13: 8:6}`
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/async-await/in-trait/lifetime-mismatch.stderr b/tests/ui/async-await/in-trait/lifetime-mismatch.stderr
index 3841ab934..6b8716d2a 100644
--- a/tests/ui/async-await/in-trait/lifetime-mismatch.stderr
+++ b/tests/ui/async-await/in-trait/lifetime-mismatch.stderr
@@ -7,6 +7,6 @@ LL | async fn foo<'a>(&self);
LL | async fn foo(&self) {}
| ^ lifetimes do not match method in trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0195`.
diff --git a/tests/ui/async-await/in-trait/missing-send-bound.stderr b/tests/ui/async-await/in-trait/missing-send-bound.stderr
index 139bd06c7..aeabb5931 100644
--- a/tests/ui/async-await/in-trait/missing-send-bound.stderr
+++ b/tests/ui/async-await/in-trait/missing-send-bound.stderr
@@ -21,5 +21,5 @@ LL - async fn bar();
LL + fn bar() -> impl std::future::Future<Output = ()> + Send;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/in-trait/object-safety.stderr b/tests/ui/async-await/in-trait/object-safety.stderr
index 5b9fd98ac..f45e6a2c8 100644
--- a/tests/ui/async-await/in-trait/object-safety.stderr
+++ b/tests/ui/async-await/in-trait/object-safety.stderr
@@ -13,6 +13,6 @@ LL | async fn foo(&self);
| ^^^ ...because method `foo` is `async`
= help: consider moving `foo` to another trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.stderr b/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.stderr
index a66dd13bb..84e0a6434 100644
--- a/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.stderr
+++ b/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `Missing` in this scope
LL | fn bar() -> Wrapper<Missing<impl Sized>>;
| ^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/async-await/in-trait/return-type-suggestion.stderr b/tests/ui/async-await/in-trait/return-type-suggestion.stderr
index 363870619..4947b7fec 100644
--- a/tests/ui/async-await/in-trait/return-type-suggestion.stderr
+++ b/tests/ui/async-await/in-trait/return-type-suggestion.stderr
@@ -7,6 +7,6 @@ LL | Ok(())
= note: expected unit type `()`
found enum `Result<(), _>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/async-await/in-trait/send-on-foreign-async-fn-in-trait.stderr b/tests/ui/async-await/in-trait/send-on-foreign-async-fn-in-trait.stderr
index 482707351..dd38e205b 100644
--- a/tests/ui/async-await/in-trait/send-on-foreign-async-fn-in-trait.stderr
+++ b/tests/ui/async-await/in-trait/send-on-foreign-async-fn-in-trait.stderr
@@ -18,6 +18,6 @@ note: required by a bound in `needs_send`
LL | fn needs_send(_: impl Send) {}
| ^^^^ required by this bound in `needs_send`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/async-await/in-trait/unconstrained-impl-region.stderr b/tests/ui/async-await/in-trait/unconstrained-impl-region.stderr
index 2cb0da2e8..ef7e4ef0e 100644
--- a/tests/ui/async-await/in-trait/unconstrained-impl-region.stderr
+++ b/tests/ui/async-await/in-trait/unconstrained-impl-region.stderr
@@ -4,6 +4,6 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait,
LL | impl<'a> Actor for () {
| ^^ unconstrained lifetime parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0207`.
diff --git a/tests/ui/async-await/in-trait/warn.stderr b/tests/ui/async-await/in-trait/warn.stderr
index d0278628c..c741a23c6 100644
--- a/tests/ui/async-await/in-trait/warn.stderr
+++ b/tests/ui/async-await/in-trait/warn.stderr
@@ -16,5 +16,5 @@ LL - async fn not_send();
LL + fn not_send() -> impl std::future::Future<Output = ()> + Send;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/incorrect-move-async-order-issue-79694.stderr b/tests/ui/async-await/incorrect-move-async-order-issue-79694.stderr
index 5367b986d..782fa4295 100644
--- a/tests/ui/async-await/incorrect-move-async-order-issue-79694.stderr
+++ b/tests/ui/async-await/incorrect-move-async-order-issue-79694.stderr
@@ -9,5 +9,5 @@ help: try switching the order
LL | let _ = async move { };
| ~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/issue-101715.stderr b/tests/ui/async-await/issue-101715.stderr
index d161fb0c0..f6af15c00 100644
--- a/tests/ui/async-await/issue-101715.stderr
+++ b/tests/ui/async-await/issue-101715.stderr
@@ -11,6 +11,6 @@ LL | .await
= note: () must be a future or must implement `IntoFuture` to be awaited
= note: required for `()` to implement `IntoFuture`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/async-await/issue-108572.stderr b/tests/ui/async-await/issue-108572.stderr
index 588669092..6a80bc149 100644
--- a/tests/ui/async-await/issue-108572.stderr
+++ b/tests/ui/async-await/issue-108572.stderr
@@ -12,6 +12,6 @@ LL ~ let mut pinned = std::pin::pin!(fut);
LL ~ pinned.as_mut().poll(cx);
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/async-await/issue-60709.rs b/tests/ui/async-await/issue-60709.rs
index 2cda40e9e..c206f01b9 100644
--- a/tests/ui/async-await/issue-60709.rs
+++ b/tests/ui/async-await/issue-60709.rs
@@ -3,7 +3,6 @@
// compile-flags: -Copt-level=z -Cdebuginfo=2 --edition=2018
// run-pass
-// ignore-asmjs wasm2js does not support source maps yet
use std::future::Future;
use std::task::Poll;
diff --git a/tests/ui/async-await/issue-64130-1-sync.stderr b/tests/ui/async-await/issue-64130-1-sync.stderr
index 207e085d2..5428d7ef7 100644
--- a/tests/ui/async-await/issue-64130-1-sync.stderr
+++ b/tests/ui/async-await/issue-64130-1-sync.stderr
@@ -18,5 +18,5 @@ note: required by a bound in `is_sync`
LL | fn is_sync<T: Sync>(t: T) { }
| ^^^^ required by this bound in `is_sync`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/issue-64130-2-send.stderr b/tests/ui/async-await/issue-64130-2-send.stderr
index a433c76ae..f05e954d2 100644
--- a/tests/ui/async-await/issue-64130-2-send.stderr
+++ b/tests/ui/async-await/issue-64130-2-send.stderr
@@ -18,5 +18,5 @@ note: required by a bound in `is_send`
LL | fn is_send<T: Send>(t: T) { }
| ^^^^ required by this bound in `is_send`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/issue-64130-3-other.stderr b/tests/ui/async-await/issue-64130-3-other.stderr
index 4bbb7731b..3ac30bdc2 100644
--- a/tests/ui/async-await/issue-64130-3-other.stderr
+++ b/tests/ui/async-await/issue-64130-3-other.stderr
@@ -20,6 +20,6 @@ note: required by a bound in `is_qux`
LL | fn is_qux<T: Qux>(t: T) {}
| ^^^ required by this bound in `is_qux`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/async-await/issue-64130-non-send-future-diags.stderr b/tests/ui/async-await/issue-64130-non-send-future-diags.stderr
index cb02fcf5c..d28807e22 100644
--- a/tests/ui/async-await/issue-64130-non-send-future-diags.stderr
+++ b/tests/ui/async-await/issue-64130-non-send-future-diags.stderr
@@ -18,5 +18,5 @@ note: required by a bound in `is_send`
LL | fn is_send<T: Send>(t: T) { }
| ^^^^ required by this bound in `is_send`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/issue-66387-if-without-else.stderr b/tests/ui/async-await/issue-66387-if-without-else.stderr
index 8155fcb56..17f9b88c6 100644
--- a/tests/ui/async-await/issue-66387-if-without-else.stderr
+++ b/tests/ui/async-await/issue-66387-if-without-else.stderr
@@ -9,6 +9,6 @@ LL | | }
= note: `if` expressions without `else` evaluate to `()`
= help: consider adding an `else` block that evaluates to the expected type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0317`.
diff --git a/tests/ui/async-await/issue-67252-unnamed-future.stderr b/tests/ui/async-await/issue-67252-unnamed-future.stderr
index 069befa91..e1c5a2296 100644
--- a/tests/ui/async-await/issue-67252-unnamed-future.stderr
+++ b/tests/ui/async-await/issue-67252-unnamed-future.stderr
@@ -18,5 +18,5 @@ note: required by a bound in `spawn`
LL | fn spawn<T: Send>(_: T) {}
| ^^^^ required by this bound in `spawn`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/issue-67651.stderr b/tests/ui/async-await/issue-67651.stderr
index 89017f6cc..9047fa4f3 100644
--- a/tests/ui/async-await/issue-67651.stderr
+++ b/tests/ui/async-await/issue-67651.stderr
@@ -7,6 +7,6 @@ LL | impl From for () {
LL | impl From for () {
| ^^^^^^^^^^^^^^^^ conflicting implementation for `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/async-await/issue-67765-async-diagnostic.stderr b/tests/ui/async-await/issue-67765-async-diagnostic.stderr
index 492e06fbb..833df51a7 100644
--- a/tests/ui/async-await/issue-67765-async-diagnostic.stderr
+++ b/tests/ui/async-await/issue-67765-async-diagnostic.stderr
@@ -7,6 +7,6 @@ LL |
LL | Err(b)?;
| ^^^^^^^ returns a value referencing data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/async-await/issue-68523-start.stderr b/tests/ui/async-await/issue-68523-start.stderr
index 7c06fe340..5b76ab56e 100644
--- a/tests/ui/async-await/issue-68523-start.stderr
+++ b/tests/ui/async-await/issue-68523-start.stderr
@@ -4,6 +4,6 @@ error[E0752]: `#[start]` function is not allowed to be `async`
LL | pub async fn start(_: isize, _: *const *const u8) -> isize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `#[start]` is not allowed to be `async`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0752`.
diff --git a/tests/ui/async-await/issue-68523.stderr b/tests/ui/async-await/issue-68523.stderr
index dfdf078e3..ec3e2e962 100644
--- a/tests/ui/async-await/issue-68523.stderr
+++ b/tests/ui/async-await/issue-68523.stderr
@@ -4,6 +4,6 @@ error[E0752]: `main` function is not allowed to be `async`
LL | async fn main() -> Result<i32, ()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` function is not allowed to be `async`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0752`.
diff --git a/tests/ui/async-await/issue-69446-fnmut-capture.stderr b/tests/ui/async-await/issue-69446-fnmut-capture.stderr
index 3d2b0402b..0366c2f44 100644
--- a/tests/ui/async-await/issue-69446-fnmut-capture.stderr
+++ b/tests/ui/async-await/issue-69446-fnmut-capture.stderr
@@ -15,5 +15,5 @@ LL | | });
= note: `FnMut` closures only have access to their captured variables while they are executing...
= note: ...therefore, they cannot allow references to captured variables to escape
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/issue-70594.rs b/tests/ui/async-await/issue-70594.rs
index 9e7c5847b..4c8209348 100644
--- a/tests/ui/async-await/issue-70594.rs
+++ b/tests/ui/async-await/issue-70594.rs
@@ -3,9 +3,6 @@
async fn fun() {
[1; ().await];
//~^ error: `await` is only allowed inside `async` functions and blocks
- //~| error: `.await` is not allowed in a `const`
- //~| error: `.await` is not allowed in a `const`
- //~| error: `()` is not a future
}
fn main() {}
diff --git a/tests/ui/async-await/issue-70594.stderr b/tests/ui/async-await/issue-70594.stderr
index 9866e00bb..aed99ec3f 100644
--- a/tests/ui/async-await/issue-70594.stderr
+++ b/tests/ui/async-await/issue-70594.stderr
@@ -1,37 +1,12 @@
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/issue-70594.rs:4:12
|
-LL | async fn fun() {
- | --- this is not `async`
LL | [1; ().await];
- | ^^^^^ only allowed inside `async` functions and blocks
+ | ---^^^^^
+ | | |
+ | | only allowed inside `async` functions and blocks
+ | this is not `async`
-error[E0744]: `.await` is not allowed in a `const`
- --> $DIR/issue-70594.rs:4:9
- |
-LL | [1; ().await];
- | ^^^^^^^^
-
-error[E0744]: `.await` is not allowed in a `const`
- --> $DIR/issue-70594.rs:4:12
- |
-LL | [1; ().await];
- | ^^^^^
-
-error[E0277]: `()` is not a future
- --> $DIR/issue-70594.rs:4:12
- |
-LL | [1; ().await];
- | -^^^^^
- | ||
- | |`()` is not a future
- | help: remove the `.await`
- |
- = help: the trait `Future` is not implemented for `()`
- = note: () must be a future or must implement `IntoFuture` to be awaited
- = note: required for `()` to implement `IntoFuture`
-
-error: aborting due to 4 previous errors
+error: aborting due to 1 previous error
-Some errors have detailed explanations: E0277, E0728, E0744.
-For more information about an error, try `rustc --explain E0277`.
+For more information about this error, try `rustc --explain E0728`.
diff --git a/tests/ui/async-await/issue-70818.stderr b/tests/ui/async-await/issue-70818.stderr
index 20109d4d1..317c04d2c 100644
--- a/tests/ui/async-await/issue-70818.stderr
+++ b/tests/ui/async-await/issue-70818.stderr
@@ -14,5 +14,5 @@ help: consider restricting type parameter `U`
LL | fn foo<T: Send, U: std::marker::Send>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/issue-70935-complex-spans.stderr b/tests/ui/async-await/issue-70935-complex-spans.stderr
index d0605d7e1..14ef1cbb6 100644
--- a/tests/ui/async-await/issue-70935-complex-spans.stderr
+++ b/tests/ui/async-await/issue-70935-complex-spans.stderr
@@ -36,6 +36,6 @@ LL | | }).await;
LL | | }
| |_____^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/async-await/issue-71137.stderr b/tests/ui/async-await/issue-71137.stderr
index 443af010c..8739c22a3 100644
--- a/tests/ui/async-await/issue-71137.stderr
+++ b/tests/ui/async-await/issue-71137.stderr
@@ -18,5 +18,5 @@ note: required by a bound in `fake_spawn`
LL | fn fake_spawn<F: Future + Send + 'static>(f: F) { }
| ^^^^ required by this bound in `fake_spawn`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/issue-72442.stderr b/tests/ui/async-await/issue-72442.stderr
index 4a1705715..313f6079c 100644
--- a/tests/ui/async-await/issue-72442.stderr
+++ b/tests/ui/async-await/issue-72442.stderr
@@ -9,6 +9,6 @@ LL | let mut f = File::open(path.to_str())?;
note: required by a bound in `File::open`
--> $SRC_DIR/std/src/fs.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/async-await/issue-73541-1.stderr b/tests/ui/async-await/issue-73541-1.stderr
index 80c1fdf00..3fd602235 100644
--- a/tests/ui/async-await/issue-73541-1.stderr
+++ b/tests/ui/async-await/issue-73541-1.stderr
@@ -9,6 +9,6 @@ LL | continue 'a
|
= note: labels are unreachable through functions, closures, async blocks and modules
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0767`.
diff --git a/tests/ui/async-await/issue-73541-2.stderr b/tests/ui/async-await/issue-73541-2.stderr
index 4c9741f6f..584b71ce6 100644
--- a/tests/ui/async-await/issue-73541-2.stderr
+++ b/tests/ui/async-await/issue-73541-2.stderr
@@ -13,6 +13,6 @@ LL | b!();
= note: labels are unreachable through functions, closures, async blocks and modules
= note: this error originates in the macro `b` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0767`.
diff --git a/tests/ui/async-await/issue-73541-3.stderr b/tests/ui/async-await/issue-73541-3.stderr
index 53487aaca..baa41c2e8 100644
--- a/tests/ui/async-await/issue-73541-3.stderr
+++ b/tests/ui/async-await/issue-73541-3.stderr
@@ -7,6 +7,6 @@ LL | || {
LL | loop { continue 'aaaaaa }
| ^^^^^^^ undeclared label `'aaaaaa`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0426`.
diff --git a/tests/ui/async-await/issue-73541.stderr b/tests/ui/async-await/issue-73541.stderr
index 4bb466ff1..6c3aac5ed 100644
--- a/tests/ui/async-await/issue-73541.stderr
+++ b/tests/ui/async-await/issue-73541.stderr
@@ -9,6 +9,6 @@ LL | loop { continue 'a }
|
= note: labels are unreachable through functions, closures, async blocks and modules
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0767`.
diff --git a/tests/ui/async-await/issue-73741-type-err.stderr b/tests/ui/async-await/issue-73741-type-err.stderr
index 0b5343a98..9fafdb1ed 100644
--- a/tests/ui/async-await/issue-73741-type-err.stderr
+++ b/tests/ui/async-await/issue-73741-type-err.stderr
@@ -6,6 +6,6 @@ LL | 1 = 2;
| |
| cannot assign to this expression
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0070`.
diff --git a/tests/ui/async-await/issue-74047.stderr b/tests/ui/async-await/issue-74047.stderr
index 6bdb9ded4..c2dfa050f 100644
--- a/tests/ui/async-await/issue-74047.stderr
+++ b/tests/ui/async-await/issue-74047.stderr
@@ -7,6 +7,6 @@ LL | impl TryFrom<OtherStream> for MyStream {}
= help: implement the missing item: `type Error = /* Type */;`
= help: implement the missing item: `fn try_from(_: OtherStream) -> Result<Self, <Self as TryFrom<OtherStream>>::Error> { todo!() }`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/async-await/issue-74497-lifetime-in-opaque.stderr b/tests/ui/async-await/issue-74497-lifetime-in-opaque.stderr
index 4427014ae..1bdd6423e 100644
--- a/tests/ui/async-await/issue-74497-lifetime-in-opaque.stderr
+++ b/tests/ui/async-await/issue-74497-lifetime-in-opaque.stderr
@@ -7,5 +7,5 @@ LL | let _ = foo(|x| bar(x));
| |return type of closure `impl Future<Output = ()>` contains a lifetime `'2`
| has type `&'1 u8`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/issue-75785-confusing-named-region.stderr b/tests/ui/async-await/issue-75785-confusing-named-region.stderr
index b69033a0e..c7316b971 100644
--- a/tests/ui/async-await/issue-75785-confusing-named-region.stderr
+++ b/tests/ui/async-await/issue-75785-confusing-named-region.stderr
@@ -10,6 +10,6 @@ LL | *x += 1;
LL | (&32, y)
| -------- returning this value requires that `*x` is borrowed for `'1`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/async-await/issue-77993-2.stderr b/tests/ui/async-await/issue-77993-2.stderr
index 64b378f83..6c3ca750e 100644
--- a/tests/ui/async-await/issue-77993-2.stderr
+++ b/tests/ui/async-await/issue-77993-2.stderr
@@ -4,5 +4,5 @@ error: expected identifier, found `!`
LL | macro!();
| ^ expected identifier
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/issue-86507.stderr b/tests/ui/async-await/issue-86507.stderr
index d5a3f72cf..0398e57ef 100644
--- a/tests/ui/async-await/issue-86507.stderr
+++ b/tests/ui/async-await/issue-86507.stderr
@@ -19,5 +19,5 @@ help: consider further restricting this bound
LL | fn bar<'me, 'async_trait, T: Send + std::marker::Sync>(x: &'me T)
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/issues/issue-102206.stderr b/tests/ui/async-await/issues/issue-102206.stderr
index cd8450568..19c70e874 100644
--- a/tests/ui/async-await/issues/issue-102206.stderr
+++ b/tests/ui/async-await/issues/issue-102206.stderr
@@ -13,6 +13,6 @@ help: consider borrowing here
LL | std::mem::size_of_val(&foo());
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/async-await/issues/issue-107280.stderr b/tests/ui/async-await/issues/issue-107280.stderr
index c5fd5c5bf..d1d80ce03 100644
--- a/tests/ui/async-await/issues/issue-107280.stderr
+++ b/tests/ui/async-await/issues/issue-107280.stderr
@@ -16,6 +16,6 @@ help: add missing generic argument
LL | inner::<false, PING>().await
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/async-await/issues/issue-112225-2.stderr b/tests/ui/async-await/issues/issue-112225-2.stderr
index 5926a4f39..c44ad583d 100644
--- a/tests/ui/async-await/issues/issue-112225-2.stderr
+++ b/tests/ui/async-await/issues/issue-112225-2.stderr
@@ -12,6 +12,6 @@ help: consider giving `x` an explicit type
LL | let x: /* Type */ = Default::default();
| ++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/async-await/issues/issue-51719.stderr b/tests/ui/async-await/issues/issue-51719.stderr
index 19cc339ec..3fa5c738c 100644
--- a/tests/ui/async-await/issues/issue-51719.stderr
+++ b/tests/ui/async-await/issues/issue-51719.stderr
@@ -6,6 +6,6 @@ LL | let _gen = || foo().await;
| |
| this is not `async`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0728`.
diff --git a/tests/ui/async-await/issues/issue-51751.stderr b/tests/ui/async-await/issues/issue-51751.stderr
index 6dd372660..ba256b199 100644
--- a/tests/ui/async-await/issues/issue-51751.stderr
+++ b/tests/ui/async-await/issues/issue-51751.stderr
@@ -7,6 +7,6 @@ LL | let result = inc(10000);
LL | let finished = result.await;
| ^^^^^ only allowed inside `async` functions and blocks
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0728`.
diff --git a/tests/ui/async-await/issues/issue-60674.stdout b/tests/ui/async-await/issues/issue-60674.stdout
index 6f980e606..df129b033 100644
--- a/tests/ui/async-await/issues/issue-60674.stdout
+++ b/tests/ui/async-await/issues/issue-60674.stdout
@@ -1,3 +1,3 @@
-async fn f(mut x : u8) {}
-async fn g((mut x, y, mut z) : (u8, u8, u8)) {}
-async fn g(mut x : u8, (a, mut b, c) : (u8, u8, u8), y : u8) {}
+async fn f(mut x: u8) {}
+async fn g((mut x, y, mut z): (u8, u8, u8)) {}
+async fn g(mut x: u8, (a, mut b, c): (u8, u8, u8), y: u8) {}
diff --git a/tests/ui/async-await/issues/issue-61187.stderr b/tests/ui/async-await/issues/issue-61187.stderr
index 203b17550..59c6a4e49 100644
--- a/tests/ui/async-await/issues/issue-61187.stderr
+++ b/tests/ui/async-await/issues/issue-61187.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be mutable
LL | async fn response(mut data: Vec<u8>) {
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/async-await/issues/issue-62009-1.rs b/tests/ui/async-await/issues/issue-62009-1.rs
index 40ccf2571..51d216408 100644
--- a/tests/ui/async-await/issues/issue-62009-1.rs
+++ b/tests/ui/async-await/issues/issue-62009-1.rs
@@ -11,5 +11,4 @@ fn main() {
//~^ ERROR `await` is only allowed inside `async` functions and blocks
(|_| 2333).await;
//~^ ERROR `await` is only allowed inside `async` functions and blocks
- //~| ERROR is not a future
}
diff --git a/tests/ui/async-await/issues/issue-62009-1.stderr b/tests/ui/async-await/issues/issue-62009-1.stderr
index bb617d090..02933f4f2 100644
--- a/tests/ui/async-await/issues/issue-62009-1.stderr
+++ b/tests/ui/async-await/issues/issue-62009-1.stderr
@@ -24,20 +24,6 @@ LL | fn main() {
LL | (|_| 2333).await;
| ^^^^^ only allowed inside `async` functions and blocks
-error[E0277]: `{closure@$DIR/issue-62009-1.rs:12:6: 12:9}` is not a future
- --> $DIR/issue-62009-1.rs:12:16
- |
-LL | (|_| 2333).await;
- | -^^^^^
- | ||
- | |`{closure@$DIR/issue-62009-1.rs:12:6: 12:9}` is not a future
- | help: remove the `.await`
- |
- = help: the trait `Future` is not implemented for closure `{closure@$DIR/issue-62009-1.rs:12:6: 12:9}`
- = note: {closure@$DIR/issue-62009-1.rs:12:6: 12:9} must be a future or must implement `IntoFuture` to be awaited
- = note: required for `{closure@$DIR/issue-62009-1.rs:12:6: 12:9}` to implement `IntoFuture`
-
-error: aborting due to 4 previous errors
+error: aborting due to 3 previous errors
-Some errors have detailed explanations: E0277, E0728.
-For more information about an error, try `rustc --explain E0277`.
+For more information about this error, try `rustc --explain E0728`.
diff --git a/tests/ui/async-await/issues/issue-62009-2.stderr b/tests/ui/async-await/issues/issue-62009-2.stderr
index 9c2f20df6..80a831cc5 100644
--- a/tests/ui/async-await/issues/issue-62009-2.stderr
+++ b/tests/ui/async-await/issues/issue-62009-2.stderr
@@ -6,6 +6,6 @@ LL | fn main() {
LL | (async || 2333)().await;
| ^^^^^ only allowed inside `async` functions and blocks
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0728`.
diff --git a/tests/ui/async-await/issues/issue-63388-1.stderr b/tests/ui/async-await/issues/issue-63388-1.stderr
index 88542315e..f7f285ad0 100644
--- a/tests/ui/async-await/issues/issue-63388-1.stderr
+++ b/tests/ui/async-await/issues/issue-63388-1.stderr
@@ -10,6 +10,6 @@ LL | | foo
LL | | }
| |_____^ lifetime `'a` required
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0621`.
diff --git a/tests/ui/async-await/issues/issue-65159.stderr b/tests/ui/async-await/issues/issue-65159.stderr
index b8741333c..19512116a 100644
--- a/tests/ui/async-await/issues/issue-65159.stderr
+++ b/tests/ui/async-await/issues/issue-65159.stderr
@@ -11,6 +11,6 @@ help: add missing generic argument
LL | async fn copy() -> Result<(), E>
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/async-await/issues/issue-66958-non-copy-infered-type-arg.stderr b/tests/ui/async-await/issues/issue-66958-non-copy-infered-type-arg.stderr
index e2a735398..3fb504a0e 100644
--- a/tests/ui/async-await/issues/issue-66958-non-copy-infered-type-arg.stderr
+++ b/tests/ui/async-await/issues/issue-66958-non-copy-infered-type-arg.stderr
@@ -8,6 +8,6 @@ LL | Self::full(self);
|
= note: partial move occurs because `self.0` has type `S`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/async-await/issues/issue-67893.stderr b/tests/ui/async-await/issues/issue-67893.stderr
index 2a712aee9..90c1e976d 100644
--- a/tests/ui/async-await/issues/issue-67893.stderr
+++ b/tests/ui/async-await/issues/issue-67893.stderr
@@ -28,6 +28,6 @@ note: required by a bound in `g`
LL | fn g(_: impl Send) {}
| ^^^^ required by this bound in `g`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/async-await/issues/issue-72312.stderr b/tests/ui/async-await/issues/issue-72312.stderr
index 679272858..cd93f8a3c 100644
--- a/tests/ui/async-await/issues/issue-72312.stderr
+++ b/tests/ui/async-await/issues/issue-72312.stderr
@@ -18,6 +18,6 @@ LL | | });
| |__________`self` escapes the method body here
| argument requires that `'1` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0521`.
diff --git a/tests/ui/async-await/issues/issue-78938-async-block.stderr b/tests/ui/async-await/issues/issue-78938-async-block.stderr
index c1a4b467f..dc373a24f 100644
--- a/tests/ui/async-await/issues/issue-78938-async-block.stderr
+++ b/tests/ui/async-await/issues/issue-78938-async-block.stderr
@@ -14,6 +14,6 @@ help: to force the async block to take ownership of `room_ref` (and any other re
LL | let gameloop_handle = spawn(async move {
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0373`.
diff --git a/tests/ui/async-await/issues/non-async-enclosing-span.stderr b/tests/ui/async-await/issues/non-async-enclosing-span.stderr
index b6583022c..91a9e5aa6 100644
--- a/tests/ui/async-await/issues/non-async-enclosing-span.stderr
+++ b/tests/ui/async-await/issues/non-async-enclosing-span.stderr
@@ -7,6 +7,6 @@ LL | let x = move || {};
LL | let y = do_the_thing().await;
| ^^^^^ only allowed inside `async` functions and blocks
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0728`.
diff --git a/tests/ui/async-await/no-const-async.stderr b/tests/ui/async-await/no-const-async.stderr
index 90ec646c8..29095f3c4 100644
--- a/tests/ui/async-await/no-const-async.stderr
+++ b/tests/ui/async-await/no-const-async.stderr
@@ -7,5 +7,5 @@ LL | pub const async fn x() {}
| | `async` because of this
| `const` because of this
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/no-move-across-await-struct.stderr b/tests/ui/async-await/no-move-across-await-struct.stderr
index 4eaed1cf1..ddc9bde59 100644
--- a/tests/ui/async-await/no-move-across-await-struct.stderr
+++ b/tests/ui/async-await/no-move-across-await-struct.stderr
@@ -8,6 +8,6 @@ LL | s.x
|
= note: move occurs because `s.x` has type `Vec<usize>`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/async-await/no-move-across-await-tuple.stderr b/tests/ui/async-await/no-move-across-await-tuple.stderr
index d750df991..61b492fe9 100644
--- a/tests/ui/async-await/no-move-across-await-tuple.stderr
+++ b/tests/ui/async-await/no-move-across-await-tuple.stderr
@@ -9,6 +9,6 @@ LL | x.1
|
= note: move occurs because `x.1` has type `Vec<usize>`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/async-await/no-non-guaranteed-initialization.stderr b/tests/ui/async-await/no-non-guaranteed-initialization.stderr
index 12c15bf56..7adccdba2 100644
--- a/tests/ui/async-await/no-non-guaranteed-initialization.stderr
+++ b/tests/ui/async-await/no-non-guaranteed-initialization.stderr
@@ -11,6 +11,6 @@ LL | }
LL | y
| ^ `y` used here but it is possibly-uninitialized
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/async-await/no-params-non-move-async-closure.stderr b/tests/ui/async-await/no-params-non-move-async-closure.stderr
index 1f589c516..d26595536 100644
--- a/tests/ui/async-await/no-params-non-move-async-closure.stderr
+++ b/tests/ui/async-await/no-params-non-move-async-closure.stderr
@@ -6,6 +6,6 @@ LL | let _ = async |x: u8| {};
|
= help: consider using `let` statements to manually capture variables by reference before entering an `async move` closure
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0708`.
diff --git a/tests/ui/async-await/normalize-output-in-signature-deduction.rs b/tests/ui/async-await/normalize-output-in-signature-deduction.rs
index 960065a83..e07fe9e98 100644
--- a/tests/ui/async-await/normalize-output-in-signature-deduction.rs
+++ b/tests/ui/async-await/normalize-output-in-signature-deduction.rs
@@ -1,6 +1,6 @@
// edition:2021
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// check-pass
#![feature(type_alias_impl_trait)]
diff --git a/tests/ui/async-await/partial-drop-partial-reinit.stderr b/tests/ui/async-await/partial-drop-partial-reinit.stderr
index 310a29239..f088b1187 100644
--- a/tests/ui/async-await/partial-drop-partial-reinit.stderr
+++ b/tests/ui/async-await/partial-drop-partial-reinit.stderr
@@ -30,6 +30,6 @@ note: required by a bound in `gimme_send`
LL | fn gimme_send<T: Send>(t: T) {
| ^^^^ required by this bound in `gimme_send`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/async-await/pin-needed-to-poll-2.stderr b/tests/ui/async-await/pin-needed-to-poll-2.stderr
index 61126faf8..9c1ad32cc 100644
--- a/tests/ui/async-await/pin-needed-to-poll-2.stderr
+++ b/tests/ui/async-await/pin-needed-to-poll-2.stderr
@@ -16,6 +16,6 @@ LL | struct Sleep(std::marker::PhantomPinned);
note: required by a bound in `Pin::<P>::new`
--> $SRC_DIR/core/src/pin.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/async-await/pin-needed-to-poll.stderr b/tests/ui/async-await/pin-needed-to-poll.stderr
index 964709dae..e576cd6c7 100644
--- a/tests/ui/async-await/pin-needed-to-poll.stderr
+++ b/tests/ui/async-await/pin-needed-to-poll.stderr
@@ -13,6 +13,6 @@ LL ~ let mut pinned = std::pin::pin!(self.sleep);
LL ~ pinned.as_mut().poll(cx)
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/async-await/proper-span-for-type-error.stderr b/tests/ui/async-await/proper-span-for-type-error.stderr
index 592ef7faf..2c72a8eb5 100644
--- a/tests/ui/async-await/proper-span-for-type-error.stderr
+++ b/tests/ui/async-await/proper-span-for-type-error.stderr
@@ -12,6 +12,6 @@ LL ~ a().await;
LL ~ Ok(())
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/async-await/recursive-async-impl-trait-type.stderr b/tests/ui/async-await/recursive-async-impl-trait-type.stderr
index 64917329c..969258f84 100644
--- a/tests/ui/async-await/recursive-async-impl-trait-type.stderr
+++ b/tests/ui/async-await/recursive-async-impl-trait-type.stderr
@@ -7,6 +7,6 @@ LL | async fn recursive_async_function() -> () {
= note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
= note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0733`.
diff --git a/tests/ui/async-await/return-type-notation/normalizing-self-auto-trait-issue-109924.current.stderr b/tests/ui/async-await/return-type-notation/normalizing-self-auto-trait-issue-109924.current.stderr
index 6a47f1ab9..d2db6abe3 100644
--- a/tests/ui/async-await/return-type-notation/normalizing-self-auto-trait-issue-109924.current.stderr
+++ b/tests/ui/async-await/return-type-notation/normalizing-self-auto-trait-issue-109924.current.stderr
@@ -30,6 +30,6 @@ note: required by a bound in `build`
LL | fn build<T>(_: T) where T: Foo<bar(): Send> {}
| ^^^^ required by this bound in `build`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/async-await/return-type-notation/normalizing-self-auto-trait-issue-109924.rs b/tests/ui/async-await/return-type-notation/normalizing-self-auto-trait-issue-109924.rs
index e581e5ffd..6097c7f10 100644
--- a/tests/ui/async-await/return-type-notation/normalizing-self-auto-trait-issue-109924.rs
+++ b/tests/ui/async-await/return-type-notation/normalizing-self-auto-trait-issue-109924.rs
@@ -1,7 +1,7 @@
// revisions: current next
//[current] known-bug: #109924
//[next] check-pass
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// edition:2021
#![feature(return_type_notation)]
diff --git a/tests/ui/async-await/return-type-notation/rtn-in-impl-signature.stderr b/tests/ui/async-await/return-type-notation/rtn-in-impl-signature.stderr
index 52d8168c9..4321d876e 100644
--- a/tests/ui/async-await/return-type-notation/rtn-in-impl-signature.stderr
+++ b/tests/ui/async-await/return-type-notation/rtn-in-impl-signature.stderr
@@ -13,6 +13,6 @@ error[E0229]: associated type bindings are not allowed here
LL | impl Super1<'_, bar(): Send> for () {}
| ^^^^^^^^^^^ associated type not allowed here
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0229`.
diff --git a/tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs b/tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs
index 891b30638..73c085315 100644
--- a/tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs
+++ b/tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs
@@ -23,7 +23,7 @@ impl Foo for () {}
fn test<T>()
where
T: Foo<test(): Send>,
- //~^ ERROR ambiguous associated function `test` for `Foo`
+ //~^ ERROR ambiguous associated function `test` in bounds of `Foo`
{
}
diff --git a/tests/ui/async-await/return-type-notation/super-method-bound-ambig.stderr b/tests/ui/async-await/return-type-notation/super-method-bound-ambig.stderr
index d9caab587..4003aad6d 100644
--- a/tests/ui/async-await/return-type-notation/super-method-bound-ambig.stderr
+++ b/tests/ui/async-await/return-type-notation/super-method-bound-ambig.stderr
@@ -7,13 +7,18 @@ LL | #![feature(return_type_notation)]
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
-error: ambiguous associated function `test` for `Foo`
+error[E0221]: ambiguous associated function `test` in bounds of `Foo`
--> $DIR/super-method-bound-ambig.rs:25:12
|
+LL | async fn test();
+ | ---------------- ambiguous `test` from `for<'a> Super1<'a>`
+...
+LL | async fn test();
+ | ---------------- ambiguous `test` from `Super2`
+...
LL | T: Foo<test(): Send>,
- | ^^^^^^^^^^^^
- |
- = note: `test` is declared in two supertraits: `Super2` and `Super1<'a>`
+ | ^^^^^^^^^^^^ ambiguous associated function `test`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
+For more information about this error, try `rustc --explain E0221`.
diff --git a/tests/ui/async-await/suggest-missing-await-closure.stderr b/tests/ui/async-await/suggest-missing-await-closure.stderr
index d44af5b8d..47af270a0 100644
--- a/tests/ui/async-await/suggest-missing-await-closure.stderr
+++ b/tests/ui/async-await/suggest-missing-await-closure.stderr
@@ -21,6 +21,6 @@ help: consider `await`ing on the `Future`
LL | take_u32(x.await)
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/async-await/suggest-switching-edition-on-await-cargo.rs b/tests/ui/async-await/suggest-switching-edition-on-await-cargo.rs
index 4919e0a05..4a3195174 100644
--- a/tests/ui/async-await/suggest-switching-edition-on-await-cargo.rs
+++ b/tests/ui/async-await/suggest-switching-edition-on-await-cargo.rs
@@ -23,6 +23,7 @@ fn await_on_struct_similar() {
let x = S { awai: 42 };
x.await;
//~^ ERROR no field `await` on type
+ //~| NOTE unknown field
//~| HELP a field with a similar name exists
//~| NOTE to `.await` a `Future`, switch to Rust 2018
//~| HELP set `edition = "2021"` in `Cargo.toml`
@@ -41,6 +42,7 @@ fn await_on_63533(x: Pin<&mut dyn Future<Output = ()>>) {
fn await_on_apit(x: impl Future<Output = ()>) {
x.await;
//~^ ERROR no field `await` on type
+ //~| NOTE unknown field
//~| NOTE to `.await` a `Future`, switch to Rust 2018
//~| HELP set `edition = "2021"` in `Cargo.toml`
//~| NOTE for more on editions, read https://doc.rust-lang.org/edition-guide
diff --git a/tests/ui/async-await/suggest-switching-edition-on-await-cargo.stderr b/tests/ui/async-await/suggest-switching-edition-on-await-cargo.stderr
index 409eb179e..dd863ca54 100644
--- a/tests/ui/async-await/suggest-switching-edition-on-await-cargo.stderr
+++ b/tests/ui/async-await/suggest-switching-edition-on-await-cargo.stderr
@@ -12,14 +12,18 @@ error[E0609]: no field `await` on type `await_on_struct_similar::S`
--> $DIR/suggest-switching-edition-on-await-cargo.rs:24:7
|
LL | x.await;
- | ^^^^^ help: a field with a similar name exists: `awai`
+ | ^^^^^ unknown field
|
= note: to `.await` a `Future`, switch to Rust 2018 or later
= help: set `edition = "2021"` in `Cargo.toml`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
+help: a field with a similar name exists
+ |
+LL | x.awai;
+ | ~~~~
error[E0609]: no field `await` on type `Pin<&mut dyn Future<Output = ()>>`
- --> $DIR/suggest-switching-edition-on-await-cargo.rs:33:7
+ --> $DIR/suggest-switching-edition-on-await-cargo.rs:34:7
|
LL | x.await;
| ^^^^^ unknown field
@@ -29,10 +33,10 @@ LL | x.await;
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
error[E0609]: no field `await` on type `impl Future<Output = ()>`
- --> $DIR/suggest-switching-edition-on-await-cargo.rs:42:7
+ --> $DIR/suggest-switching-edition-on-await-cargo.rs:43:7
|
LL | x.await;
- | ^^^^^
+ | ^^^^^ unknown field
|
= note: to `.await` a `Future`, switch to Rust 2018 or later
= help: set `edition = "2021"` in `Cargo.toml`
diff --git a/tests/ui/async-await/suggest-switching-edition-on-await.rs b/tests/ui/async-await/suggest-switching-edition-on-await.rs
index 9852e8fc9..10e245796 100644
--- a/tests/ui/async-await/suggest-switching-edition-on-await.rs
+++ b/tests/ui/async-await/suggest-switching-edition-on-await.rs
@@ -21,6 +21,7 @@ fn await_on_struct_similar() {
let x = S { awai: 42 };
x.await;
//~^ ERROR no field `await` on type
+ //~| NOTE unknown field
//~| HELP a field with a similar name exists
//~| NOTE to `.await` a `Future`, switch to Rust 2018
//~| HELP pass `--edition 2021` to `rustc`
@@ -39,6 +40,7 @@ fn await_on_63533(x: Pin<&mut dyn Future<Output = ()>>) {
fn await_on_apit(x: impl Future<Output = ()>) {
x.await;
//~^ ERROR no field `await` on type
+ //~| NOTE unknown field
//~| NOTE to `.await` a `Future`, switch to Rust 2018
//~| HELP pass `--edition 2021` to `rustc`
//~| NOTE for more on editions, read https://doc.rust-lang.org/edition-guide
diff --git a/tests/ui/async-await/suggest-switching-edition-on-await.stderr b/tests/ui/async-await/suggest-switching-edition-on-await.stderr
index ef3334381..0ed256b05 100644
--- a/tests/ui/async-await/suggest-switching-edition-on-await.stderr
+++ b/tests/ui/async-await/suggest-switching-edition-on-await.stderr
@@ -12,14 +12,18 @@ error[E0609]: no field `await` on type `await_on_struct_similar::S`
--> $DIR/suggest-switching-edition-on-await.rs:22:7
|
LL | x.await;
- | ^^^^^ help: a field with a similar name exists: `awai`
+ | ^^^^^ unknown field
|
= note: to `.await` a `Future`, switch to Rust 2018 or later
= help: pass `--edition 2021` to `rustc`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
+help: a field with a similar name exists
+ |
+LL | x.awai;
+ | ~~~~
error[E0609]: no field `await` on type `Pin<&mut dyn Future<Output = ()>>`
- --> $DIR/suggest-switching-edition-on-await.rs:31:7
+ --> $DIR/suggest-switching-edition-on-await.rs:32:7
|
LL | x.await;
| ^^^^^ unknown field
@@ -29,10 +33,10 @@ LL | x.await;
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
error[E0609]: no field `await` on type `impl Future<Output = ()>`
- --> $DIR/suggest-switching-edition-on-await.rs:40:7
+ --> $DIR/suggest-switching-edition-on-await.rs:41:7
|
LL | x.await;
- | ^^^^^
+ | ^^^^^ unknown field
|
= note: to `.await` a `Future`, switch to Rust 2018 or later
= help: pass `--edition 2021` to `rustc`
diff --git a/tests/ui/async-await/unreachable-lint-1.stderr b/tests/ui/async-await/unreachable-lint-1.stderr
index e93257889..061cc7246 100644
--- a/tests/ui/async-await/unreachable-lint-1.stderr
+++ b/tests/ui/async-await/unreachable-lint-1.stderr
@@ -12,5 +12,5 @@ note: the lint level is defined here
LL | #![deny(unreachable_code)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/unresolved_type_param.stderr b/tests/ui/async-await/unresolved_type_param.stderr
index 45aa76606..b9fb98320 100644
--- a/tests/ui/async-await/unresolved_type_param.stderr
+++ b/tests/ui/async-await/unresolved_type_param.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic argument
LL | bar::<T>().await;
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/async-await/unsized-across-await.stderr b/tests/ui/async-await/unsized-across-await.stderr
index 649b12ce5..5bb2b7f47 100644
--- a/tests/ui/async-await/unsized-across-await.stderr
+++ b/tests/ui/async-await/unsized-across-await.stderr
@@ -16,6 +16,6 @@ LL | let _x = *x;
= help: the trait `Sized` is not implemented for `dyn std::fmt::Display`
= note: all values live across `await` must have a statically known size
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/atomic-from-mut-not-available.stderr b/tests/ui/atomic-from-mut-not-available.stderr
index c15d19b15..a3edf1893 100644
--- a/tests/ui/atomic-from-mut-not-available.stderr
+++ b/tests/ui/atomic-from-mut-not-available.stderr
@@ -8,6 +8,6 @@ note: if you're trying to build a new `AtomicU64`, consider using `AtomicU64::ne
--> $SRC_DIR/core/src/sync/atomic.rs:LL:COL
= note: this error originates in the macro `atomic_int` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/attr-bad-crate-attr.stderr b/tests/ui/attr-bad-crate-attr.stderr
index ff420eeea..9df991f71 100644
--- a/tests/ui/attr-bad-crate-attr.stderr
+++ b/tests/ui/attr-bad-crate-attr.stderr
@@ -4,5 +4,5 @@ error: expected item after attributes
LL | #[attr = "val"] // Unterminated
| ^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/attr-eq-token-tree.stderr b/tests/ui/attributes/attr-eq-token-tree.stderr
index 1846444b6..d642e168e 100644
--- a/tests/ui/attributes/attr-eq-token-tree.stderr
+++ b/tests/ui/attributes/attr-eq-token-tree.stderr
@@ -4,5 +4,5 @@ error: expected expression, found `]`
LL | #[my_attr = !]
| ^ expected expression
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/attrs-with-no-formal-in-generics-1.stderr b/tests/ui/attributes/attrs-with-no-formal-in-generics-1.stderr
index 5b4f5222a..6377d27f4 100644
--- a/tests/ui/attributes/attrs-with-no-formal-in-generics-1.stderr
+++ b/tests/ui/attributes/attrs-with-no-formal-in-generics-1.stderr
@@ -4,5 +4,5 @@ error: trailing attribute after generic parameter
LL | impl<#[rustc_dummy] 'a, 'b, #[oops]> RefIntPair<'a, 'b> {
| ^^^^^^^ attributes must go before parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/attrs-with-no-formal-in-generics-2.stderr b/tests/ui/attributes/attrs-with-no-formal-in-generics-2.stderr
index fce3ff7de..3224da58a 100644
--- a/tests/ui/attributes/attrs-with-no-formal-in-generics-2.stderr
+++ b/tests/ui/attributes/attrs-with-no-formal-in-generics-2.stderr
@@ -4,5 +4,5 @@ error: trailing attribute after generic parameter
LL | impl<#[rustc_dummy] 'a, #[rustc_dummy] T, #[oops]> RefAny<'a, T> {}
| ^^^^^^^ attributes must go before parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/attrs-with-no-formal-in-generics-3.stderr b/tests/ui/attributes/attrs-with-no-formal-in-generics-3.stderr
index b9ca00974..996df10a7 100644
--- a/tests/ui/attributes/attrs-with-no-formal-in-generics-3.stderr
+++ b/tests/ui/attributes/attrs-with-no-formal-in-generics-3.stderr
@@ -4,5 +4,5 @@ error: trailing attribute after generic parameter
LL | where Q: for <#[allow(unused)] 'a, 'b, #[oops]> Fn(RefIntPair<'a,'b>) -> &'b u32
| ^^^^^^^ attributes must go before parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/doc-test-literal.stderr b/tests/ui/attributes/doc-test-literal.stderr
index ebee09994..ed2964825 100644
--- a/tests/ui/attributes/doc-test-literal.stderr
+++ b/tests/ui/attributes/doc-test-literal.stderr
@@ -13,5 +13,5 @@ LL | #![deny(warnings)]
| ^^^^^^^^
= note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/extented-attribute-macro-error.stderr b/tests/ui/attributes/extented-attribute-macro-error.stderr
index 0fcde9b7c..884f3c7b1 100644
--- a/tests/ui/attributes/extented-attribute-macro-error.stderr
+++ b/tests/ui/attributes/extented-attribute-macro-error.stderr
@@ -6,5 +6,5 @@ LL | #![doc = include_str!("../not_existing_file.md")]
|
= note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/invalid-repr.stderr b/tests/ui/attributes/invalid-repr.stderr
index 98a6a24b3..681460ad0 100644
--- a/tests/ui/attributes/invalid-repr.stderr
+++ b/tests/ui/attributes/invalid-repr.stderr
@@ -7,6 +7,6 @@ LL |
LL | pub type Foo = i32;
| ------------------- not a struct, enum, function, associated function, or union
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0517`.
diff --git a/tests/ui/attributes/issue-100631.stderr b/tests/ui/attributes/issue-100631.stderr
index caa5351dd..6e8e4f3b4 100644
--- a/tests/ui/attributes/issue-100631.stderr
+++ b/tests/ui/attributes/issue-100631.stderr
@@ -7,6 +7,6 @@ LL | #[repr(C)]
LL | enum Foo {}
| -------- zero-variant enum
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0084`.
diff --git a/tests/ui/attributes/issue-90873.rs b/tests/ui/attributes/issue-90873.rs
index 1411f6174..53339ce7e 100644
--- a/tests/ui/attributes/issue-90873.rs
+++ b/tests/ui/attributes/issue-90873.rs
@@ -1,9 +1,9 @@
#![u=||{static d=||1;}]
-//~^ unexpected expression
+//~^ attribute value must be a literal
//~| cannot find attribute `u` in this scope
//~| missing type for `static` item
#![a={impl std::ops::Neg for i8 {}}]
-//~^ ERROR unexpected expression
+//~^ ERROR attribute value must be a literal
//~| ERROR cannot find attribute `a` in this scope
//~| ERROR `main` function not found in crate `issue_90873`
diff --git a/tests/ui/attributes/issue-90873.stderr b/tests/ui/attributes/issue-90873.stderr
index 894ec8341..5a8bbaf8e 100644
--- a/tests/ui/attributes/issue-90873.stderr
+++ b/tests/ui/attributes/issue-90873.stderr
@@ -1,15 +1,10 @@
-error: unexpected expression: `||
- {
- static d: _ = || 1;
- }`
+error: attribute value must be a literal
--> $DIR/issue-90873.rs:1:6
|
LL | #![u=||{static d=||1;}]
| ^^^^^^^^^^^^^^^^^
-error: unexpected expression: `{
- impl std::ops::Neg for i8 {}
- }`
+error: attribute value must be a literal
--> $DIR/issue-90873.rs:6:6
|
LL | #![a={impl std::ops::Neg for i8 {}}]
diff --git a/tests/ui/attributes/key-value-expansion-on-mac.rs b/tests/ui/attributes/key-value-expansion-on-mac.rs
index c1d68d8cd..ea7cf7c4f 100644
--- a/tests/ui/attributes/key-value-expansion-on-mac.rs
+++ b/tests/ui/attributes/key-value-expansion-on-mac.rs
@@ -7,8 +7,8 @@ macro_rules! bar {
// FIXME?: `bar` here expands before `stringify` has a chance to expand.
// `#[rustc_dummy = ...]` is validated and dropped during expansion of `bar`,
-// the "unexpected expression" errors comes from the validation.
-#[rustc_dummy = stringify!(b)] //~ ERROR unexpected expression: `stringify!(b)`
+// the "attribute value must be a literal" error comes from the validation.
+#[rustc_dummy = stringify!(b)] //~ ERROR attribute value must be a literal
bar!();
fn main() {}
diff --git a/tests/ui/attributes/key-value-expansion-on-mac.stderr b/tests/ui/attributes/key-value-expansion-on-mac.stderr
index 64ab892d9..260462cfe 100644
--- a/tests/ui/attributes/key-value-expansion-on-mac.stderr
+++ b/tests/ui/attributes/key-value-expansion-on-mac.stderr
@@ -1,8 +1,8 @@
-error: unexpected expression: `stringify!(b)`
+error: attribute value must be a literal
--> $DIR/key-value-expansion-on-mac.rs:11:17
|
LL | #[rustc_dummy = stringify!(b)]
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/key-value-expansion.rs b/tests/ui/attributes/key-value-expansion.rs
index 83d601e5e..3065c1274 100644
--- a/tests/ui/attributes/key-value-expansion.rs
+++ b/tests/ui/attributes/key-value-expansion.rs
@@ -18,13 +18,13 @@ macro_rules! bug {
// Any expressions containing macro call `X` that's more complex than `X` itself.
// Parentheses will work.
-bug!((column!())); //~ ERROR unexpected expression: `(7u32)`
+bug!((column!())); //~ ERROR attribute value must be a literal
// Original test case.
macro_rules! bug {
() => {
- bug!("bug" + stringify!(found)); //~ ERROR unexpected expression: `"bug" + "found"`
+ bug!("bug" + stringify!(found)); //~ ERROR attribute value must be a literal
};
($test:expr) => {
#[doc = $test]
@@ -46,7 +46,7 @@ macro_rules! doc_comment {
macro_rules! some_macro {
($t1: ty) => {
doc_comment! {format!("{coor}", coor = stringify!($t1)).as_str()}
- //~^ ERROR unexpected expression: `{
+ //~^ ERROR attribute value must be a literal
};
}
diff --git a/tests/ui/attributes/key-value-expansion.stderr b/tests/ui/attributes/key-value-expansion.stderr
index aaa8b1695..54d79c5be 100644
--- a/tests/ui/attributes/key-value-expansion.stderr
+++ b/tests/ui/attributes/key-value-expansion.stderr
@@ -1,10 +1,10 @@
-error: unexpected expression: `(7u32)`
+error: attribute value must be a literal
--> $DIR/key-value-expansion.rs:21:6
|
LL | bug!((column!()));
| ^^^^^^^^^^^
-error: unexpected expression: `"bug" + "found"`
+error: attribute value must be a literal
--> $DIR/key-value-expansion.rs:27:14
|
LL | bug!("bug" + stringify!(found));
@@ -15,7 +15,7 @@ LL | bug!();
|
= note: this error originates in the macro `bug` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: unexpected expression: `{ let res = ::alloc::fmt::format(format_args!("{0}", "u8")); res }.as_str()`
+error: attribute value must be a literal
--> $DIR/key-value-expansion.rs:48:23
|
LL | doc_comment! {format!("{coor}", coor = stringify!($t1)).as_str()}
diff --git a/tests/ui/attributes/key-value-non-ascii.stderr b/tests/ui/attributes/key-value-non-ascii.stderr
index 23d482de6..cc01bc46e 100644
--- a/tests/ui/attributes/key-value-non-ascii.stderr
+++ b/tests/ui/attributes/key-value-non-ascii.stderr
@@ -9,5 +9,5 @@ help: if you meant to use the UTF-8 encoding of 'ffi', use \xHH escapes
LL | #[rustc_dummy = b"/xEF/xAC/x83.rs"]
| ~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/macro_export_on_decl_macro.stderr b/tests/ui/attributes/macro_export_on_decl_macro.stderr
index 565e07919..10b86da4f 100644
--- a/tests/ui/attributes/macro_export_on_decl_macro.stderr
+++ b/tests/ui/attributes/macro_export_on_decl_macro.stderr
@@ -12,5 +12,5 @@ LL | #![deny(unused)]
| ^^^^^^
= note: `#[deny(unused_attributes)]` implied by `#[deny(unused)]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/main-removed-1.stderr b/tests/ui/attributes/main-removed-1.stderr
index 2422c5c3b..fda28772e 100644
--- a/tests/ui/attributes/main-removed-1.stderr
+++ b/tests/ui/attributes/main-removed-1.stderr
@@ -6,5 +6,5 @@ LL | #[main]
|
= note: `main` is in scope, but it is a function, not an attribute
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/no-mangle-closure.stderr b/tests/ui/attributes/no-mangle-closure.stderr
index 949eb7051..c18378349 100644
--- a/tests/ui/attributes/no-mangle-closure.stderr
+++ b/tests/ui/attributes/no-mangle-closure.stderr
@@ -4,5 +4,5 @@ error: `#[no_mangle]` cannot be used on a closure as it has no name
LL | (#[no_mangle] || y.0[0])()
| ^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-crate.stderr b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-crate.stderr
index 225b8e8f3..1666f4a3e 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-crate.stderr
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-crate.stderr
@@ -13,5 +13,5 @@ LL - #![unix_sigpipe = "inherit"]
LL + #[unix_sigpipe = "inherit"]
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-duplicates.stderr b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-duplicates.stderr
index 2362c17a0..931aae96b 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-duplicates.stderr
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-duplicates.stderr
@@ -10,5 +10,5 @@ note: attribute also specified here
LL | #[unix_sigpipe = "sig_ign"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-list.stderr b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-list.stderr
index 59a87e139..b1d79d7c2 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-list.stderr
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-list.stderr
@@ -11,5 +11,5 @@ LL | #[unix_sigpipe = "inherit|sig_ign|sig_dfl"]
LL | #[unix_sigpipe]
| ~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-main-fn.stderr b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-main-fn.stderr
index c4b81118c..124141b65 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-main-fn.stderr
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-main-fn.stderr
@@ -4,5 +4,5 @@ error: `unix_sigpipe` attribute can only be used on `fn main()`
LL | #[unix_sigpipe = "inherit"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-root-main.stderr b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-root-main.stderr
index a04f605ed..346d83fa6 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-root-main.stderr
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-root-main.stderr
@@ -4,5 +4,5 @@ error: `unix_sigpipe` attribute can only be used on root `fn main()`
LL | #[unix_sigpipe = "inherit"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-start.stderr b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-start.stderr
index 2c9ce479b..9f691e396 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-start.stderr
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-start.stderr
@@ -4,5 +4,5 @@ error: `unix_sigpipe` attribute can only be used on `fn main()`
LL | #[unix_sigpipe = "inherit"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-struct.stderr b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-struct.stderr
index c56ee60bb..d5eec9424 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-struct.stderr
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-struct.stderr
@@ -4,5 +4,5 @@ error: `unix_sigpipe` attribute can only be used on `fn main()`
LL | #[unix_sigpipe = "inherit"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-wrong.stderr b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-wrong.stderr
index a66e45aa2..d750443e4 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-wrong.stderr
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-wrong.stderr
@@ -4,5 +4,5 @@ error: valid values for `#[unix_sigpipe = "..."]` are `inherit`, `sig_ign`, or `
LL | #[unix_sigpipe = "wrong"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe.stderr b/tests/ui/attributes/unix_sigpipe/unix_sigpipe.stderr
index 1b1eda825..b18ec9abc 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe.stderr
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe.stderr
@@ -4,5 +4,5 @@ error: valid values for `#[unix_sigpipe = "..."]` are `inherit`, `sig_ign`, or `
LL | #[unix_sigpipe]
| ^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/unused-item-in-attr.rs b/tests/ui/attributes/unused-item-in-attr.rs
index 70dcd5413..fda0a5d6a 100644
--- a/tests/ui/attributes/unused-item-in-attr.rs
+++ b/tests/ui/attributes/unused-item-in-attr.rs
@@ -1,5 +1,5 @@
#[w = { extern crate alloc; }]
-//~^ ERROR unexpected expression: `{
+//~^ ERROR attribute value must be a literal
//~| ERROR cannot find attribute `w` in this scope
fn f() {}
diff --git a/tests/ui/attributes/unused-item-in-attr.stderr b/tests/ui/attributes/unused-item-in-attr.stderr
index 92a8f5858..84130965d 100644
--- a/tests/ui/attributes/unused-item-in-attr.stderr
+++ b/tests/ui/attributes/unused-item-in-attr.stderr
@@ -1,6 +1,4 @@
-error: unexpected expression: `{
- extern crate alloc;
- }`
+error: attribute value must be a literal
--> $DIR/unused-item-in-attr.rs:1:7
|
LL | #[w = { extern crate alloc; }]
diff --git a/tests/ui/attributes/used_with_multi_args.stderr b/tests/ui/attributes/used_with_multi_args.stderr
index c93aafcfc..d4417a202 100644
--- a/tests/ui/attributes/used_with_multi_args.stderr
+++ b/tests/ui/attributes/used_with_multi_args.stderr
@@ -4,5 +4,5 @@ error: expected `used`, `used(compiler)` or `used(linker)`
LL | #[used(compiler, linker)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/auto-traits/bad-generics-on-dyn.stderr b/tests/ui/auto-traits/bad-generics-on-dyn.stderr
index ade69ced6..06c7cbcd7 100644
--- a/tests/ui/auto-traits/bad-generics-on-dyn.stderr
+++ b/tests/ui/auto-traits/bad-generics-on-dyn.stderr
@@ -6,6 +6,6 @@ LL | auto trait Trait1<'a> {}
| |
| auto trait cannot have generic parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0567`.
diff --git a/tests/ui/auto-traits/has-arguments.stderr b/tests/ui/auto-traits/has-arguments.stderr
index 3bba74bad..b8a680e6a 100644
--- a/tests/ui/auto-traits/has-arguments.stderr
+++ b/tests/ui/auto-traits/has-arguments.stderr
@@ -6,6 +6,6 @@ LL | auto trait Trait1<'outer> {}
| |
| auto trait cannot have generic parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0567`.
diff --git a/tests/ui/auto-traits/issue-117789.rs b/tests/ui/auto-traits/issue-117789.rs
new file mode 100644
index 000000000..0c30931a1
--- /dev/null
+++ b/tests/ui/auto-traits/issue-117789.rs
@@ -0,0 +1,7 @@
+#![deny(suspicious_auto_trait_impls)]
+
+auto trait Trait<P> {} //~ ERROR auto traits cannot have generic parameters
+//~^ ERROR auto traits are experimental and possibly buggy
+impl<P> Trait<P> for () {}
+
+fn main() {}
diff --git a/tests/ui/auto-traits/issue-117789.stderr b/tests/ui/auto-traits/issue-117789.stderr
new file mode 100644
index 000000000..9a3a7efed
--- /dev/null
+++ b/tests/ui/auto-traits/issue-117789.stderr
@@ -0,0 +1,21 @@
+error[E0567]: auto traits cannot have generic parameters
+ --> $DIR/issue-117789.rs:3:17
+ |
+LL | auto trait Trait<P> {}
+ | -----^^^ help: remove the parameters
+ | |
+ | auto trait cannot have generic parameters
+
+error[E0658]: auto traits are experimental and possibly buggy
+ --> $DIR/issue-117789.rs:3:1
+ |
+LL | auto trait Trait<P> {}
+ | ^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #13231 <https://github.com/rust-lang/rust/issues/13231> for more information
+ = help: add `#![feature(auto_traits)]` to the crate attributes to enable
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0567, E0658.
+For more information about an error, try `rustc --explain E0567`.
diff --git a/tests/ui/auto-traits/issue-23080-2.current.stderr b/tests/ui/auto-traits/issue-23080-2.current.stderr
index a57c6d9b0..178bfff97 100644
--- a/tests/ui/auto-traits/issue-23080-2.current.stderr
+++ b/tests/ui/auto-traits/issue-23080-2.current.stderr
@@ -6,6 +6,6 @@ LL | unsafe auto trait Trait {
LL | type Output;
| -----^^^^^^- help: remove these associated items
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0380`.
diff --git a/tests/ui/auto-traits/issue-23080-2.next.stderr b/tests/ui/auto-traits/issue-23080-2.next.stderr
index a57c6d9b0..178bfff97 100644
--- a/tests/ui/auto-traits/issue-23080-2.next.stderr
+++ b/tests/ui/auto-traits/issue-23080-2.next.stderr
@@ -6,6 +6,6 @@ LL | unsafe auto trait Trait {
LL | type Output;
| -----^^^^^^- help: remove these associated items
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0380`.
diff --git a/tests/ui/auto-traits/issue-23080-2.rs b/tests/ui/auto-traits/issue-23080-2.rs
index 882b8f393..d63cd9d5d 100644
--- a/tests/ui/auto-traits/issue-23080-2.rs
+++ b/tests/ui/auto-traits/issue-23080-2.rs
@@ -1,5 +1,5 @@
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
#![feature(auto_traits)]
#![feature(negative_impls)]
diff --git a/tests/ui/auto-traits/issue-23080.stderr b/tests/ui/auto-traits/issue-23080.stderr
index f5d607298..5cea45060 100644
--- a/tests/ui/auto-traits/issue-23080.stderr
+++ b/tests/ui/auto-traits/issue-23080.stderr
@@ -9,6 +9,6 @@ LL | | println!("Hello");
LL | | }
| |_____- help: remove these associated items
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0380`.
diff --git a/tests/ui/auto-traits/issue-83857-ub.stderr b/tests/ui/auto-traits/issue-83857-ub.stderr
index 23a2f62d9..80f9330eb 100644
--- a/tests/ui/auto-traits/issue-83857-ub.stderr
+++ b/tests/ui/auto-traits/issue-83857-ub.stderr
@@ -17,6 +17,6 @@ help: consider introducing a `where` clause, but there might be an alternative b
LL | fn generic<T, U>(v: Foo<T, U>, f: fn(<Foo<T, U> as WithAssoc>::Output) -> i32) where Foo<T, U>: Send {
| +++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/auto-traits/issue-84075.stderr b/tests/ui/auto-traits/issue-84075.stderr
index 6fbdc669b..943d521ce 100644
--- a/tests/ui/auto-traits/issue-84075.stderr
+++ b/tests/ui/auto-traits/issue-84075.stderr
@@ -6,6 +6,6 @@ LL | auto trait Magic where Self: Copy {}
| |
| auto traits cannot have super traits or lifetime bounds
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0568`.
diff --git a/tests/ui/auto-traits/str-contains-slice-conceptually.stderr b/tests/ui/auto-traits/str-contains-slice-conceptually.stderr
index 1cf16cebd..e1dae35be 100644
--- a/tests/ui/auto-traits/str-contains-slice-conceptually.stderr
+++ b/tests/ui/auto-traits/str-contains-slice-conceptually.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `needs_auto_trait`
LL | fn needs_auto_trait<T: AutoTrait + ?Sized>() {}
| ^^^^^^^^^ required by this bound in `needs_auto_trait`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/auto-traits/typeck-auto-trait-no-supertraits.stderr b/tests/ui/auto-traits/typeck-auto-trait-no-supertraits.stderr
index 80f074103..23aae1363 100644
--- a/tests/ui/auto-traits/typeck-auto-trait-no-supertraits.stderr
+++ b/tests/ui/auto-traits/typeck-auto-trait-no-supertraits.stderr
@@ -6,6 +6,6 @@ LL | auto trait Magic: Copy {}
| |
| auto traits cannot have super traits or lifetime bounds
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0568`.
diff --git a/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types-2.stderr b/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types-2.stderr
index 0c4970a72..aa5585a53 100644
--- a/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types-2.stderr
+++ b/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types-2.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `is_mytrait`
LL | fn is_mytrait<T: MyTrait>() {}
| ^^^^^^^ required by this bound in `is_mytrait`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types.stderr b/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types.stderr
index c575c485a..668cbc8ae 100644
--- a/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types.stderr
+++ b/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types.stderr
@@ -10,6 +10,6 @@ note: required by a bound in `is_mytrait`
LL | fn is_mytrait<T: MyTrait>() {}
| ^^^^^^^ required by this bound in `is_mytrait`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/auto-traits/typeck-default-trait-impl-precedence.stderr b/tests/ui/auto-traits/typeck-default-trait-impl-precedence.stderr
index bd7aaf6fb..2498af996 100644
--- a/tests/ui/auto-traits/typeck-default-trait-impl-precedence.stderr
+++ b/tests/ui/auto-traits/typeck-default-trait-impl-precedence.stderr
@@ -22,6 +22,6 @@ LL - is_defaulted::<&'static u32>();
LL + is_defaulted::<u32>();
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/autoref-autoderef/deref-ambiguity-becomes-nonambiguous.stderr b/tests/ui/autoref-autoderef/deref-ambiguity-becomes-nonambiguous.stderr
index 06a7e9085..19c3c6418 100644
--- a/tests/ui/autoref-autoderef/deref-ambiguity-becomes-nonambiguous.stderr
+++ b/tests/ui/autoref-autoderef/deref-ambiguity-becomes-nonambiguous.stderr
@@ -12,6 +12,6 @@ help: consider giving `var_fn` an explicit type, where the placeholders `_` are
LL | let var_fn: Value<Rc<_>> = Value::wrap();
| ++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/bare-fn-implements-fn-mut.rs b/tests/ui/bare-fn-implements-fn-mut.rs
index dfead4889..d6ecd6b65 100644
--- a/tests/ui/bare-fn-implements-fn-mut.rs
+++ b/tests/ui/bare-fn-implements-fn-mut.rs
@@ -1,7 +1,5 @@
// run-pass
-use std::ops::FnMut;
-
fn call_f<F:FnMut()>(mut f: F) {
f();
}
diff --git a/tests/ui/binding/const-param.stderr b/tests/ui/binding/const-param.stderr
index adda80810..e68893a59 100644
--- a/tests/ui/binding/const-param.stderr
+++ b/tests/ui/binding/const-param.stderr
@@ -4,6 +4,6 @@ error[E0158]: const parameters cannot be referenced in patterns
LL | N => {}
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0158`.
diff --git a/tests/ui/binding/match-arm-statics.rs b/tests/ui/binding/match-arm-statics.rs
index e6d17def1..5f7e357ee 100644
--- a/tests/ui/binding/match-arm-statics.rs
+++ b/tests/ui/binding/match-arm-statics.rs
@@ -1,7 +1,6 @@
// run-pass
#![allow(dead_code)]
// compile-flags: -g
-// ignore-asmjs wasm2js does not support source maps yet
#[derive(PartialEq, Eq)]
struct NewBool(bool);
diff --git a/tests/ui/binop/binary-op-on-double-ref.stderr b/tests/ui/binop/binary-op-on-double-ref.stderr
index 2e8aeebc6..d1d1d7707 100644
--- a/tests/ui/binop/binary-op-on-double-ref.stderr
+++ b/tests/ui/binop/binary-op-on-double-ref.stderr
@@ -11,6 +11,6 @@ help: `%` can be used on `&{integer}` if you dereference the left-hand side
LL | *x % 2 == 0
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/binop/binary-op-suggest-deref.fixed b/tests/ui/binop/binary-op-suggest-deref.fixed
new file mode 100644
index 000000000..1ff359913
--- /dev/null
+++ b/tests/ui/binop/binary-op-suggest-deref.fixed
@@ -0,0 +1,8 @@
+// Issue #52544
+// run-rustfix
+
+fn main() {
+ let i: &i64 = &1;
+ if *i < 0 {}
+ //~^ ERROR mismatched types [E0308]
+}
diff --git a/tests/ui/binop/binary-op-suggest-deref.rs b/tests/ui/binop/binary-op-suggest-deref.rs
new file mode 100644
index 000000000..12505a9ac
--- /dev/null
+++ b/tests/ui/binop/binary-op-suggest-deref.rs
@@ -0,0 +1,8 @@
+// Issue #52544
+// run-rustfix
+
+fn main() {
+ let i: &i64 = &1;
+ if i < 0 {}
+ //~^ ERROR mismatched types [E0308]
+}
diff --git a/tests/ui/binop/binary-op-suggest-deref.stderr b/tests/ui/binop/binary-op-suggest-deref.stderr
new file mode 100644
index 000000000..d1d0089ec
--- /dev/null
+++ b/tests/ui/binop/binary-op-suggest-deref.stderr
@@ -0,0 +1,14 @@
+error[E0308]: mismatched types
+ --> $DIR/binary-op-suggest-deref.rs:6:12
+ |
+LL | if i < 0 {}
+ | ^ expected `&i64`, found integer
+ |
+help: consider dereferencing the borrow
+ |
+LL | if *i < 0 {}
+ | +
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/binop/binop-bitxor-str.stderr b/tests/ui/binop/binop-bitxor-str.stderr
index f236cd61e..20b1ecc5a 100644
--- a/tests/ui/binop/binop-bitxor-str.stderr
+++ b/tests/ui/binop/binop-bitxor-str.stderr
@@ -6,6 +6,6 @@ LL | fn main() { let x = "a".to_string() ^ "b".to_string(); }
| |
| String
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/binop/binop-mul-bool.stderr b/tests/ui/binop/binop-mul-bool.stderr
index 8b5cde63c..82d066f45 100644
--- a/tests/ui/binop/binop-mul-bool.stderr
+++ b/tests/ui/binop/binop-mul-bool.stderr
@@ -6,6 +6,6 @@ LL | fn main() { let x = true * false; }
| |
| bool
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/binop/binop-mul-i32-f32.stderr b/tests/ui/binop/binop-mul-i32-f32.stderr
index 115e70006..6ed3e7b44 100644
--- a/tests/ui/binop/binop-mul-i32-f32.stderr
+++ b/tests/ui/binop/binop-mul-i32-f32.stderr
@@ -11,6 +11,6 @@ LL | x * y
<&'a i32 as Mul<i32>>
<&i32 as Mul<&i32>>
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/binop/binop-typeck.stderr b/tests/ui/binop/binop-typeck.stderr
index 42d910819..da7f31828 100644
--- a/tests/ui/binop/binop-typeck.stderr
+++ b/tests/ui/binop/binop-typeck.stderr
@@ -6,6 +6,6 @@ LL | let z = x + y;
| |
| bool
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/binop/eq-arr.stderr b/tests/ui/binop/eq-arr.stderr
index a22f8e3ab..afcfb7b28 100644
--- a/tests/ui/binop/eq-arr.stderr
+++ b/tests/ui/binop/eq-arr.stderr
@@ -17,6 +17,6 @@ LL + #[derive(PartialEq)]
LL | struct X;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/binop/eq-vec.stderr b/tests/ui/binop/eq-vec.stderr
index 0a98cddfe..147397528 100644
--- a/tests/ui/binop/eq-vec.stderr
+++ b/tests/ui/binop/eq-vec.stderr
@@ -19,6 +19,6 @@ LL + #[derive(PartialEq)]
LL | enum Foo {
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/binop/false-binop-caused-by-missing-semi.stderr b/tests/ui/binop/false-binop-caused-by-missing-semi.stderr
index fca042b1c..eeb6b028a 100644
--- a/tests/ui/binop/false-binop-caused-by-missing-semi.stderr
+++ b/tests/ui/binop/false-binop-caused-by-missing-semi.stderr
@@ -12,6 +12,6 @@ help: you might have meant to write a semicolon here
LL | foo();
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0070`.
diff --git a/tests/ui/binop/issue-3820.stderr b/tests/ui/binop/issue-3820.stderr
index cfa78a41d..7cce93dca 100644
--- a/tests/ui/binop/issue-3820.stderr
+++ b/tests/ui/binop/issue-3820.stderr
@@ -14,6 +14,6 @@ LL | struct Thing {
note: the trait `Mul` must be implemented
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/binop/issue-77910-2.stderr b/tests/ui/binop/issue-77910-2.stderr
index b3856b6ae..e58ae0fad 100644
--- a/tests/ui/binop/issue-77910-2.stderr
+++ b/tests/ui/binop/issue-77910-2.stderr
@@ -11,6 +11,6 @@ help: use parentheses to call this function
LL | if foo(/* &i32 */) == y {}
| ++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/binop/issue-93927.stderr b/tests/ui/binop/issue-93927.stderr
index 75558b502..9bcf2b173 100644
--- a/tests/ui/binop/issue-93927.stderr
+++ b/tests/ui/binop/issue-93927.stderr
@@ -11,6 +11,6 @@ help: consider further restricting this bound
LL | fn cond<T: PartialEq + std::cmp::Eq>(val: MyType<T>) -> bool {
| ++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/binop/placement-syntax.stderr b/tests/ui/binop/placement-syntax.stderr
index 3fdaf4cd0..b20a2ee63 100644
--- a/tests/ui/binop/placement-syntax.stderr
+++ b/tests/ui/binop/placement-syntax.stderr
@@ -9,5 +9,5 @@ help: if you meant to write a comparison against a negative value, add a space i
LL | if x< -1 {
| ~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/blind/blind-item-block-item-shadow.stderr b/tests/ui/blind/blind-item-block-item-shadow.stderr
index 68b3f4c1a..2e24ef453 100644
--- a/tests/ui/blind/blind-item-block-item-shadow.stderr
+++ b/tests/ui/blind/blind-item-block-item-shadow.stderr
@@ -12,6 +12,6 @@ help: you can use `as` to change the binding name of the import
LL | use foo::Bar as OtherBar;
| ~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0255`.
diff --git a/tests/ui/blind/blind-item-block-middle.stderr b/tests/ui/blind/blind-item-block-middle.stderr
index 63e6d7684..b2ae16901 100644
--- a/tests/ui/blind/blind-item-block-middle.stderr
+++ b/tests/ui/blind/blind-item-block-middle.stderr
@@ -11,6 +11,6 @@ LL | let bar = 5;
| `bar` is interpreted as a unit struct, not a new binding
| help: introduce a new binding instead: `other_bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/blind/blind-item-item-shadow.stderr b/tests/ui/blind/blind-item-item-shadow.stderr
index 7f9e80089..84b273c73 100644
--- a/tests/ui/blind/blind-item-item-shadow.stderr
+++ b/tests/ui/blind/blind-item-item-shadow.stderr
@@ -13,6 +13,6 @@ help: you can use `as` to change the binding name of the import
LL | use foo::foo as other_foo;
| ~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0255`.
diff --git a/tests/ui/block-result/block-must-not-have-result-do.stderr b/tests/ui/block-result/block-must-not-have-result-do.stderr
index 914886f81..2a94f0a87 100644
--- a/tests/ui/block-result/block-must-not-have-result-do.stderr
+++ b/tests/ui/block-result/block-must-not-have-result-do.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | true
| ^^^^ expected `()`, found `bool`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/block-result/block-must-not-have-result-res.stderr b/tests/ui/block-result/block-must-not-have-result-res.stderr
index b7427462b..e075dc230 100644
--- a/tests/ui/block-result/block-must-not-have-result-res.stderr
+++ b/tests/ui/block-result/block-must-not-have-result-res.stderr
@@ -6,6 +6,6 @@ LL | fn drop(&mut self) {
LL | true
| ^^^^ expected `()`, found `bool`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/block-result/block-must-not-have-result-while.stderr b/tests/ui/block-result/block-must-not-have-result-while.stderr
index 7f96aa289..94a4b33da 100644
--- a/tests/ui/block-result/block-must-not-have-result-while.stderr
+++ b/tests/ui/block-result/block-must-not-have-result-while.stderr
@@ -16,6 +16,6 @@ LL | |
LL | | }
| |_____- expected this to be `()`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/block-result/issue-11714.stderr b/tests/ui/block-result/issue-11714.stderr
index 42fb3d3d4..25651328e 100644
--- a/tests/ui/block-result/issue-11714.stderr
+++ b/tests/ui/block-result/issue-11714.stderr
@@ -9,6 +9,6 @@ LL | fn blah() -> i32 {
LL | ;
| - help: remove this semicolon to return this value
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/block-result/issue-3563.stderr b/tests/ui/block-result/issue-3563.stderr
index be551f6e8..c473a8441 100644
--- a/tests/ui/block-result/issue-3563.stderr
+++ b/tests/ui/block-result/issue-3563.stderr
@@ -4,6 +4,6 @@ error[E0599]: no method named `b` found for reference `&Self` in the current sco
LL | || self.b()
| ^ help: there is a method with a similar name: `a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/block-result/issue-5500.stderr b/tests/ui/block-result/issue-5500.stderr
index 417991e9e..71ca8ffe2 100644
--- a/tests/ui/block-result/issue-5500.stderr
+++ b/tests/ui/block-result/issue-5500.stderr
@@ -14,6 +14,6 @@ LL - &panic!()
LL + panic!()
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/block-result/unexpected-return-on-unit.stderr b/tests/ui/block-result/unexpected-return-on-unit.stderr
index 4acb955a8..0b79cf0da 100644
--- a/tests/ui/block-result/unexpected-return-on-unit.stderr
+++ b/tests/ui/block-result/unexpected-return-on-unit.stderr
@@ -13,6 +13,6 @@ help: try adding a return type
LL | fn bar() -> usize {
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/bogus-tag.stderr b/tests/ui/bogus-tag.stderr
index 899ff4261..d94bd489e 100644
--- a/tests/ui/bogus-tag.stderr
+++ b/tests/ui/bogus-tag.stderr
@@ -7,6 +7,6 @@ LL | enum Color { Rgb(isize, isize, isize), Rgba(isize, isize, isize, isize), }
LL | Color::Hsl(h, s, l) => { println!("hsl"); }
| ^^^ variant or associated item not found in `Color`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/borrowck/access-mode-in-closures.stderr b/tests/ui/borrowck/access-mode-in-closures.stderr
index abee72ba8..b9a45edb3 100644
--- a/tests/ui/borrowck/access-mode-in-closures.stderr
+++ b/tests/ui/borrowck/access-mode-in-closures.stderr
@@ -13,6 +13,6 @@ LL - match *s { S(v) => v }
LL + match s { S(v) => v }
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/borrowck/accidentally-cloning-ref-borrow-error.rs b/tests/ui/borrowck/accidentally-cloning-ref-borrow-error.rs
new file mode 100644
index 000000000..2b25a5b23
--- /dev/null
+++ b/tests/ui/borrowck/accidentally-cloning-ref-borrow-error.rs
@@ -0,0 +1,38 @@
+#[derive(Debug)]
+struct X<T>(T);
+
+impl<T: Clone> Clone for X<T> {
+ fn clone(&self) -> X<T> {
+ X(self.0.clone())
+ }
+}
+
+#[derive(Debug)]
+struct Y;
+
+#[derive(Debug)]
+struct Str {
+ x: Option<i32>,
+}
+
+fn foo(s: &mut Option<i32>) {
+ if s.is_none() {
+ *s = Some(0);
+ }
+ println!("{:?}", s);
+}
+
+fn bar<T: std::fmt::Debug>(s: &mut X<T>) {
+ println!("{:?}", s);
+}
+fn main() {
+ let s = Str { x: None };
+ let sr = &s;
+ let mut sm = sr.clone();
+ foo(&mut sm.x); //~ ERROR cannot borrow `sm.x` as mutable, as it is behind a `&` reference
+
+ let x = X(Y);
+ let xr = &x;
+ let mut xm = xr.clone();
+ bar(&mut xm); //~ ERROR cannot borrow data in a `&` reference as mutable
+}
diff --git a/tests/ui/borrowck/accidentally-cloning-ref-borrow-error.stderr b/tests/ui/borrowck/accidentally-cloning-ref-borrow-error.stderr
new file mode 100644
index 000000000..7e51a4819
--- /dev/null
+++ b/tests/ui/borrowck/accidentally-cloning-ref-borrow-error.stderr
@@ -0,0 +1,30 @@
+error[E0596]: cannot borrow `sm.x` as mutable, as it is behind a `&` reference
+ --> $DIR/accidentally-cloning-ref-borrow-error.rs:32:9
+ |
+LL | foo(&mut sm.x);
+ | ^^^^^^^^^ `sm` is a `&` reference, so the data it refers to cannot be borrowed as mutable
+ |
+help: `Str` doesn't implement `Clone`, so this call clones the reference `&Str`
+ --> $DIR/accidentally-cloning-ref-borrow-error.rs:31:21
+ |
+LL | let mut sm = sr.clone();
+ | ^^^^^^^
+help: consider annotating `Str` with `#[derive(Clone)]`
+ |
+LL + #[derive(Clone)]
+LL | struct Str {
+ |
+help: consider specifying this binding's type
+ |
+LL | let mut sm: &mut Str = sr.clone();
+ | ++++++++++
+
+error[E0596]: cannot borrow data in a `&` reference as mutable
+ --> $DIR/accidentally-cloning-ref-borrow-error.rs:37:9
+ |
+LL | bar(&mut xm);
+ | ^^^^^^^ cannot borrow as mutable
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/borrowck/alias-liveness/escaping-bounds-2.stderr b/tests/ui/borrowck/alias-liveness/escaping-bounds-2.stderr
index 7fd0cb9bb..0cd6dfe77 100644
--- a/tests/ui/borrowck/alias-liveness/escaping-bounds-2.stderr
+++ b/tests/ui/borrowck/alias-liveness/escaping-bounds-2.stderr
@@ -14,6 +14,6 @@ LL ~ let binding = String::new();
LL ~ let func = get_func::<T>(&binding);
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.stderr b/tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.stderr
index 58a42d8af..b5c2b662f 100644
--- a/tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.stderr
+++ b/tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.stderr
@@ -11,6 +11,6 @@ LL | }
|
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/borrowck/alias-liveness/opaque-type-param.stderr b/tests/ui/borrowck/alias-liveness/opaque-type-param.stderr
index e1fbbc14f..73de58649 100644
--- a/tests/ui/borrowck/alias-liveness/opaque-type-param.stderr
+++ b/tests/ui/borrowck/alias-liveness/opaque-type-param.stderr
@@ -8,6 +8,6 @@ LL | fn foo<'a>(s: &'a str) -> impl Trait + 'static {
LL | bar(s)
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0700`.
diff --git a/tests/ui/borrowck/anonymous-region-in-apit.stderr b/tests/ui/borrowck/anonymous-region-in-apit.stderr
index 9e100f8ac..72dfbb797 100644
--- a/tests/ui/borrowck/anonymous-region-in-apit.stderr
+++ b/tests/ui/borrowck/anonymous-region-in-apit.stderr
@@ -11,6 +11,6 @@ LL | |baz: &str| foo.bar(baz);
| | let's call the lifetime of this reference `'1`
| `baz` is a reference that is only valid in the closure body
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0521`.
diff --git a/tests/ui/borrowck/borrow-immutable-upvar-mutation-impl-trait.stderr b/tests/ui/borrowck/borrow-immutable-upvar-mutation-impl-trait.stderr
index 6235e0db0..2b16206cd 100644
--- a/tests/ui/borrowck/borrow-immutable-upvar-mutation-impl-trait.stderr
+++ b/tests/ui/borrowck/borrow-immutable-upvar-mutation-impl-trait.stderr
@@ -9,6 +9,6 @@ LL | move || {
LL | x += 1;
| ^^^^^^ cannot assign
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/borrowck/borrowck-and-init.stderr b/tests/ui/borrowck/borrowck-and-init.stderr
index 5abf07a31..37386f1c4 100644
--- a/tests/ui/borrowck/borrowck-and-init.stderr
+++ b/tests/ui/borrowck/borrowck-and-init.stderr
@@ -11,6 +11,6 @@ LL | println!("{}", i);
|
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/borrowck-anon-fields-struct.stderr b/tests/ui/borrowck/borrowck-anon-fields-struct.stderr
index 7a959fb6e..37e98732f 100644
--- a/tests/ui/borrowck/borrowck-anon-fields-struct.stderr
+++ b/tests/ui/borrowck/borrowck-anon-fields-struct.stderr
@@ -10,6 +10,6 @@ LL | Y(ref mut b, _) => b
LL | *a += 1;
| ------- first borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/borrowck/borrowck-anon-fields-tuple.stderr b/tests/ui/borrowck/borrowck-anon-fields-tuple.stderr
index 88a8867f5..b749779b9 100644
--- a/tests/ui/borrowck/borrowck-anon-fields-tuple.stderr
+++ b/tests/ui/borrowck/borrowck-anon-fields-tuple.stderr
@@ -10,6 +10,6 @@ LL | (ref mut b, _) => b
LL | *a += 1;
| ------- first borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/borrowck/borrowck-assign-to-constants.stderr b/tests/ui/borrowck/borrowck-assign-to-constants.stderr
index 864d933da..82972b573 100644
--- a/tests/ui/borrowck/borrowck-assign-to-constants.stderr
+++ b/tests/ui/borrowck/borrowck-assign-to-constants.stderr
@@ -4,6 +4,6 @@ error[E0594]: cannot assign to immutable static item `foo`
LL | foo = 6;
| ^^^^^^^ cannot assign
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/borrowck/borrowck-auto-mut-ref-to-immut-var.stderr b/tests/ui/borrowck/borrowck-auto-mut-ref-to-immut-var.stderr
index 25d642c30..d14fbd761 100644
--- a/tests/ui/borrowck/borrowck-auto-mut-ref-to-immut-var.stderr
+++ b/tests/ui/borrowck/borrowck-auto-mut-ref-to-immut-var.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be mutable
LL | let mut x = Foo { x: 3 };
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/borrowck/borrowck-autoref-3261.stderr b/tests/ui/borrowck/borrowck-autoref-3261.stderr
index c2dfb687e..0e462256c 100644
--- a/tests/ui/borrowck/borrowck-autoref-3261.stderr
+++ b/tests/ui/borrowck/borrowck-autoref-3261.stderr
@@ -11,6 +11,6 @@ LL | |opt| {
LL | x = X(Either::Left((0, 0)));
| - second borrow occurs due to use of `x` in closure
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/borrowck/borrowck-block-uninit.stderr b/tests/ui/borrowck/borrowck-block-uninit.stderr
index 1a5969586..07c09f1f4 100644
--- a/tests/ui/borrowck/borrowck-block-uninit.stderr
+++ b/tests/ui/borrowck/borrowck-block-uninit.stderr
@@ -13,6 +13,6 @@ help: consider assigning a value
LL | let x: isize = 0;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/borrowck-borrow-from-temporary.stderr b/tests/ui/borrowck/borrowck-borrow-from-temporary.stderr
index 71bf052c9..dabb5e21f 100644
--- a/tests/ui/borrowck/borrowck-borrow-from-temporary.stderr
+++ b/tests/ui/borrowck/borrowck-borrow-from-temporary.stderr
@@ -6,6 +6,6 @@ LL | let &Foo(ref x) = &id(Foo(3));
LL | x
| ^ returns a value referencing data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/borrowck/borrowck-borrow-immut-deref-of-box-as-mut.stderr b/tests/ui/borrowck/borrowck-borrow-immut-deref-of-box-as-mut.stderr
index a61fdbf6c..199f7c120 100644
--- a/tests/ui/borrowck/borrowck-borrow-immut-deref-of-box-as-mut.stderr
+++ b/tests/ui/borrowck/borrowck-borrow-immut-deref-of-box-as-mut.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be mutable
LL | let mut a: Box<_> = Box::new(A);
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/borrowck/borrowck-borrow-mut-object-twice.stderr b/tests/ui/borrowck/borrowck-borrow-mut-object-twice.stderr
index fa0ae318e..0bcf63d6a 100644
--- a/tests/ui/borrowck/borrowck-borrow-mut-object-twice.stderr
+++ b/tests/ui/borrowck/borrowck-borrow-mut-object-twice.stderr
@@ -8,6 +8,6 @@ LL | x.f2();
LL | y.use_ref();
| - first borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr b/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr
index 6e112e270..7f0ecf7b3 100644
--- a/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr
+++ b/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr
@@ -15,6 +15,6 @@ LL ~ let binding = vec!["Goodbye", "world!"];
LL ~ let x = defer(&binding);
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue.stderr b/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue.stderr
index 7ee840b34..5d6fc8fa7 100644
--- a/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue.stderr
+++ b/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue.stderr
@@ -15,6 +15,6 @@ LL ~ let binding = Box::new(1);
LL ~ buggy_map.insert(42, &*binding);
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/borrowck/borrowck-break-uninit-2.stderr b/tests/ui/borrowck/borrowck-break-uninit-2.stderr
index ea93a8f40..7c0cda31c 100644
--- a/tests/ui/borrowck/borrowck-break-uninit-2.stderr
+++ b/tests/ui/borrowck/borrowck-break-uninit-2.stderr
@@ -13,6 +13,6 @@ help: consider assigning a value
LL | let x: isize = 0;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/borrowck-break-uninit.stderr b/tests/ui/borrowck/borrowck-break-uninit.stderr
index a7a8fc2ff..0d879c6fb 100644
--- a/tests/ui/borrowck/borrowck-break-uninit.stderr
+++ b/tests/ui/borrowck/borrowck-break-uninit.stderr
@@ -13,6 +13,6 @@ help: consider assigning a value
LL | let x: isize = 0;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/borrowck-closures-mut-of-mut.stderr b/tests/ui/borrowck/borrowck-closures-mut-of-mut.stderr
index e5ee5a401..105a0b051 100644
--- a/tests/ui/borrowck/borrowck-closures-mut-of-mut.stderr
+++ b/tests/ui/borrowck/borrowck-closures-mut-of-mut.stderr
@@ -13,6 +13,6 @@ LL |
LL | c2(); c1();
| -- first borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0524`.
diff --git a/tests/ui/borrowck/borrowck-closures-unique-imm.stderr b/tests/ui/borrowck/borrowck-closures-unique-imm.stderr
index b8bbb31a3..669dd614f 100644
--- a/tests/ui/borrowck/borrowck-closures-unique-imm.stderr
+++ b/tests/ui/borrowck/borrowck-closures-unique-imm.stderr
@@ -8,6 +8,6 @@ LL | &mut this.x;
LL | p.use_ref();
| - immutable borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/borrowck/borrowck-closures-use-after-free.stderr b/tests/ui/borrowck/borrowck-closures-use-after-free.stderr
index 30900a3b6..bc840577e 100644
--- a/tests/ui/borrowck/borrowck-closures-use-after-free.stderr
+++ b/tests/ui/borrowck/borrowck-closures-use-after-free.stderr
@@ -11,6 +11,6 @@ LL | test(&*ptr);
| |
| mutable borrow later used by call
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/borrowck/borrowck-consume-unsize-vec.stderr b/tests/ui/borrowck/borrowck-consume-unsize-vec.stderr
index d2e9497d0..abd7f19fc 100644
--- a/tests/ui/borrowck/borrowck-consume-unsize-vec.stderr
+++ b/tests/ui/borrowck/borrowck-consume-unsize-vec.stderr
@@ -20,6 +20,6 @@ help: consider cloning the value if the performance cost is acceptable
LL | consume(b.clone());
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/borrowck/borrowck-consume-upcast-box.stderr b/tests/ui/borrowck/borrowck-consume-upcast-box.stderr
index ed7e883ca..4c3861cfe 100644
--- a/tests/ui/borrowck/borrowck-consume-upcast-box.stderr
+++ b/tests/ui/borrowck/borrowck-consume-upcast-box.stderr
@@ -16,6 +16,6 @@ LL | fn consume(_: Box<dyn Foo>) {
| |
| in this function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/borrowck/borrowck-escaping-closure-error-1.stderr b/tests/ui/borrowck/borrowck-escaping-closure-error-1.stderr
index acf6b37b7..6dcd45173 100644
--- a/tests/ui/borrowck/borrowck-escaping-closure-error-1.stderr
+++ b/tests/ui/borrowck/borrowck-escaping-closure-error-1.stderr
@@ -16,6 +16,6 @@ help: to force the closure to take ownership of `books` (and any other reference
LL | spawn(move || books.push(4));
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0373`.
diff --git a/tests/ui/borrowck/borrowck-escaping-closure-error-2.stderr b/tests/ui/borrowck/borrowck-escaping-closure-error-2.stderr
index 814042539..7a1c1510b 100644
--- a/tests/ui/borrowck/borrowck-escaping-closure-error-2.stderr
+++ b/tests/ui/borrowck/borrowck-escaping-closure-error-2.stderr
@@ -16,6 +16,6 @@ help: to force the closure to take ownership of `books` (and any other reference
LL | Box::new(move || books.push(4))
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0373`.
diff --git a/tests/ui/borrowck/borrowck-fn-in-const-a.stderr b/tests/ui/borrowck/borrowck-fn-in-const-a.stderr
index e7491afda..e05696864 100644
--- a/tests/ui/borrowck/borrowck-fn-in-const-a.stderr
+++ b/tests/ui/borrowck/borrowck-fn-in-const-a.stderr
@@ -4,6 +4,6 @@ error[E0507]: cannot move out of `*x` which is behind a shared reference
LL | return *x
| ^^ move occurs because `*x` has type `String`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/borrowck/borrowck-fn-in-const-c.stderr b/tests/ui/borrowck/borrowck-fn-in-const-c.stderr
index d48866dce..ee1bb2a48 100644
--- a/tests/ui/borrowck/borrowck-fn-in-const-c.stderr
+++ b/tests/ui/borrowck/borrowck-fn-in-const-c.stderr
@@ -6,6 +6,6 @@ LL | return &local.inner;
LL | }
| - here, drop of `local` needs exclusive access to `local.inner`, because the type `DropString` implements the `Drop` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0713`.
diff --git a/tests/ui/borrowck/borrowck-for-loop-uninitialized-binding.stderr b/tests/ui/borrowck/borrowck-for-loop-uninitialized-binding.stderr
index fc1a44c3c..79519e885 100644
--- a/tests/ui/borrowck/borrowck-for-loop-uninitialized-binding.stderr
+++ b/tests/ui/borrowck/borrowck-for-loop-uninitialized-binding.stderr
@@ -8,6 +8,6 @@ LL | for _ in 0..0 { x = 10; }
LL | return x;
| ^ `x` used here but it is possibly-uninitialized
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/borrowck-if-no-else.stderr b/tests/ui/borrowck/borrowck-if-no-else.stderr
index 9eafc2c2a..f1fad2d36 100644
--- a/tests/ui/borrowck/borrowck-if-no-else.stderr
+++ b/tests/ui/borrowck/borrowck-if-no-else.stderr
@@ -9,6 +9,6 @@ LL | let x: isize; if 1 > 2 { x = 10; }
LL | foo(x);
| ^ `x` used here but it is possibly-uninitialized
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/borrowck-if-with-else.stderr b/tests/ui/borrowck/borrowck-if-with-else.stderr
index 3f0fe291c..c246e4148 100644
--- a/tests/ui/borrowck/borrowck-if-with-else.stderr
+++ b/tests/ui/borrowck/borrowck-if-with-else.stderr
@@ -9,6 +9,6 @@ LL | if 1 > 2 {
LL | foo(x);
| ^ `x` used here but it is possibly-uninitialized
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.stderr b/tests/ui/borrowck/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.stderr
index 1a20ec85f..3f052f8fe 100644
--- a/tests/ui/borrowck/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.stderr
+++ b/tests/ui/borrowck/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.stderr
@@ -10,6 +10,6 @@ LL | _a = 4;
LL | drop(b);
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/borrowck/borrowck-in-static.stderr b/tests/ui/borrowck/borrowck-in-static.stderr
index 2033e4a57..8171e6950 100644
--- a/tests/ui/borrowck/borrowck-in-static.stderr
+++ b/tests/ui/borrowck/borrowck-in-static.stderr
@@ -8,6 +8,6 @@ LL | Box::new(|| x)
| |
| captured by this `Fn` closure
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/borrowck/borrowck-init-in-called-fn-expr.stderr b/tests/ui/borrowck/borrowck-init-in-called-fn-expr.stderr
index 1a22b5f09..a27b6956b 100644
--- a/tests/ui/borrowck/borrowck-init-in-called-fn-expr.stderr
+++ b/tests/ui/borrowck/borrowck-init-in-called-fn-expr.stderr
@@ -11,6 +11,6 @@ help: consider assigning a value
LL | let i: isize = 0;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/borrowck-init-in-fn-expr.stderr b/tests/ui/borrowck/borrowck-init-in-fn-expr.stderr
index f1b9b9aa7..16f4c40f5 100644
--- a/tests/ui/borrowck/borrowck-init-in-fn-expr.stderr
+++ b/tests/ui/borrowck/borrowck-init-in-fn-expr.stderr
@@ -11,6 +11,6 @@ help: consider assigning a value
LL | let i: isize = 0;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/borrowck-init-in-fru.stderr b/tests/ui/borrowck/borrowck-init-in-fru.stderr
index 39b28811a..f27993e10 100644
--- a/tests/ui/borrowck/borrowck-init-in-fru.stderr
+++ b/tests/ui/borrowck/borrowck-init-in-fru.stderr
@@ -11,6 +11,6 @@ help: consider assigning a value
LL | let mut origin: Point = todo!();
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/borrowck-init-op-equal.stderr b/tests/ui/borrowck/borrowck-init-op-equal.stderr
index ef0fa6df4..241d24341 100644
--- a/tests/ui/borrowck/borrowck-init-op-equal.stderr
+++ b/tests/ui/borrowck/borrowck-init-op-equal.stderr
@@ -11,6 +11,6 @@ help: consider assigning a value
LL | let v: isize = 0;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/borrowck-init-plus-equal.stderr b/tests/ui/borrowck/borrowck-init-plus-equal.stderr
index cec053318..65de6e8bf 100644
--- a/tests/ui/borrowck/borrowck-init-plus-equal.stderr
+++ b/tests/ui/borrowck/borrowck-init-plus-equal.stderr
@@ -11,6 +11,6 @@ help: consider assigning a value
LL | let mut v: isize = 0;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/borrowck-issue-2657-1.stderr b/tests/ui/borrowck/borrowck-issue-2657-1.stderr
index 4ea4eb8f0..194403fc1 100644
--- a/tests/ui/borrowck/borrowck-issue-2657-1.stderr
+++ b/tests/ui/borrowck/borrowck-issue-2657-1.stderr
@@ -8,6 +8,6 @@ LL | let _a = x;
LL | _y.use_ref();
| -- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0505`.
diff --git a/tests/ui/borrowck/borrowck-issue-2657-2.stderr b/tests/ui/borrowck/borrowck-issue-2657-2.stderr
index 850bb9ae3..6fab19000 100644
--- a/tests/ui/borrowck/borrowck-issue-2657-2.stderr
+++ b/tests/ui/borrowck/borrowck-issue-2657-2.stderr
@@ -10,6 +10,6 @@ LL - let _b = *y;
LL + let _b = y;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/borrowck/borrowck-lend-flow-if.stderr b/tests/ui/borrowck/borrowck-lend-flow-if.stderr
index 68a82bdb5..abcd14f9a 100644
--- a/tests/ui/borrowck/borrowck-lend-flow-if.stderr
+++ b/tests/ui/borrowck/borrowck-lend-flow-if.stderr
@@ -9,6 +9,6 @@ LL | borrow_mut(&mut *v);
LL | _w.use_ref();
| -- immutable borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/borrowck/borrowck-lend-flow-match.stderr b/tests/ui/borrowck/borrowck-lend-flow-match.stderr
index 6cdce7bee..3e9124bdc 100644
--- a/tests/ui/borrowck/borrowck-lend-flow-match.stderr
+++ b/tests/ui/borrowck/borrowck-lend-flow-match.stderr
@@ -8,6 +8,6 @@ LL | x = Some(1);
LL | drop(r);
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/borrowck/borrowck-lend-flow.stderr b/tests/ui/borrowck/borrowck-lend-flow.stderr
index 07b11b3e7..0c60b0948 100644
--- a/tests/ui/borrowck/borrowck-lend-flow.stderr
+++ b/tests/ui/borrowck/borrowck-lend-flow.stderr
@@ -8,6 +8,6 @@ LL | borrow_mut(&mut *v);
LL | _w.use_ref();
| -- immutable borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/borrowck/borrowck-loan-blocks-move.stderr b/tests/ui/borrowck/borrowck-loan-blocks-move.stderr
index de8da490c..d1fbc5b47 100644
--- a/tests/ui/borrowck/borrowck-loan-blocks-move.stderr
+++ b/tests/ui/borrowck/borrowck-loan-blocks-move.stderr
@@ -10,6 +10,6 @@ LL | take(v);
LL | w.use_ref();
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0505`.
diff --git a/tests/ui/borrowck/borrowck-loan-blocks-mut-uniq.stderr b/tests/ui/borrowck/borrowck-loan-blocks-mut-uniq.stderr
index fa5308c29..3285c7f0c 100644
--- a/tests/ui/borrowck/borrowck-loan-blocks-mut-uniq.stderr
+++ b/tests/ui/borrowck/borrowck-loan-blocks-mut-uniq.stderr
@@ -10,6 +10,6 @@ LL | |w| {
LL | v = Box::new(4);
| - second borrow occurs due to use of `v` in closure
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/borrowck/borrowck-loan-in-overloaded-op.stderr b/tests/ui/borrowck/borrowck-loan-in-overloaded-op.stderr
index 93622a0c5..5f1e3994a 100644
--- a/tests/ui/borrowck/borrowck-loan-in-overloaded-op.stderr
+++ b/tests/ui/borrowck/borrowck-loan-in-overloaded-op.stderr
@@ -13,6 +13,6 @@ help: consider cloning the value if the performance cost is acceptable
LL | let _y = {x.clone()} + x.clone(); // the `{x}` forces a move to occur
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/borrowck/borrowck-loan-of-static-data-issue-27616.stderr b/tests/ui/borrowck/borrowck-loan-of-static-data-issue-27616.stderr
index 311369a26..838568fd3 100644
--- a/tests/ui/borrowck/borrowck-loan-of-static-data-issue-27616.stderr
+++ b/tests/ui/borrowck/borrowck-loan-of-static-data-issue-27616.stderr
@@ -9,6 +9,6 @@ LL | let alias: &'static mut String = s;
LL | *s = String::new();
| ^^ `*s` is assigned to here but it was already borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/borrowck/borrowck-loan-vec-content.stderr b/tests/ui/borrowck/borrowck-loan-vec-content.stderr
index 6691a2396..eb11dfa38 100644
--- a/tests/ui/borrowck/borrowck-loan-vec-content.stderr
+++ b/tests/ui/borrowck/borrowck-loan-vec-content.stderr
@@ -10,6 +10,6 @@ LL | || {
LL | v[1] = 4;
| - second borrow occurs due to use of `v` in closure
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/borrowck/borrowck-local-borrow-outlives-fn.stderr b/tests/ui/borrowck/borrowck-local-borrow-outlives-fn.stderr
index 9d19de211..9c26bc353 100644
--- a/tests/ui/borrowck/borrowck-local-borrow-outlives-fn.stderr
+++ b/tests/ui/borrowck/borrowck-local-borrow-outlives-fn.stderr
@@ -4,6 +4,6 @@ error[E0515]: cannot return reference to function parameter `x`
LL | &x
| ^^ returns a reference to data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.stderr b/tests/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.stderr
index 0fdb1dabb..bac9c2790 100644
--- a/tests/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.stderr
+++ b/tests/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.stderr
@@ -12,6 +12,6 @@ LL | *x = Some(&mut z.1);
LL | }
| - `z.1` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/borrowck/borrowck-move-by-capture.stderr b/tests/ui/borrowck/borrowck-move-by-capture.stderr
index 6eaa1fa31..016470112 100644
--- a/tests/ui/borrowck/borrowck-move-by-capture.stderr
+++ b/tests/ui/borrowck/borrowck-move-by-capture.stderr
@@ -12,6 +12,6 @@ LL | let _h = to_fn_once(move || -> isize { *bar });
| | move occurs because `bar` has type `Box<isize>`, which does not implement the `Copy` trait
| `bar` is moved here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.stderr b/tests/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.stderr
index 4f0202f38..a41c4af98 100644
--- a/tests/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.stderr
+++ b/tests/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.stderr
@@ -11,6 +11,6 @@ LL | let z = *a;
LL | b.use_ref();
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0505`.
diff --git a/tests/ui/borrowck/borrowck-move-from-unsafe-ptr.stderr b/tests/ui/borrowck/borrowck-move-from-unsafe-ptr.stderr
index 43fc102bd..7213f85ad 100644
--- a/tests/ui/borrowck/borrowck-move-from-unsafe-ptr.stderr
+++ b/tests/ui/borrowck/borrowck-move-from-unsafe-ptr.stderr
@@ -10,6 +10,6 @@ LL - let y = *x;
LL + let y = x;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/borrowck/borrowck-move-moved-value-into-closure.stderr b/tests/ui/borrowck/borrowck-move-moved-value-into-closure.stderr
index 9509ebb7c..6a77d86f2 100644
--- a/tests/ui/borrowck/borrowck-move-moved-value-into-closure.stderr
+++ b/tests/ui/borrowck/borrowck-move-moved-value-into-closure.stderr
@@ -13,6 +13,6 @@ LL | call_f(move|| { *t + 1 });
| |
| value used here after move
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/borrowck/borrowck-move-mut-base-ptr.stderr b/tests/ui/borrowck/borrowck-move-mut-base-ptr.stderr
index e1e3c7f8a..88eb6c8ce 100644
--- a/tests/ui/borrowck/borrowck-move-mut-base-ptr.stderr
+++ b/tests/ui/borrowck/borrowck-move-mut-base-ptr.stderr
@@ -11,6 +11,6 @@ LL | *t1 = 22;
LL | p.use_ref();
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0505`.
diff --git a/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.fixed b/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.fixed
new file mode 100644
index 000000000..0b7551b97
--- /dev/null
+++ b/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.fixed
@@ -0,0 +1,7 @@
+// run-rustfix
+use std::rc::Rc;
+
+pub fn main() {
+ let _x = <Vec<i32> as Clone>::clone(&Rc::new(vec![1, 2])).into_iter();
+ //~^ ERROR [E0507]
+}
diff --git a/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.rs b/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.rs
index 0b9e7102c..5cb8ceaca 100644
--- a/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.rs
+++ b/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.rs
@@ -1,3 +1,4 @@
+// run-rustfix
use std::rc::Rc;
pub fn main() {
diff --git a/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.stderr b/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.stderr
index 934dd8df1..076f0ce34 100644
--- a/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.stderr
+++ b/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.stderr
@@ -1,5 +1,5 @@
error[E0507]: cannot move out of an `Rc`
- --> $DIR/borrowck-move-out-of-overloaded-auto-deref.rs:4:14
+ --> $DIR/borrowck-move-out-of-overloaded-auto-deref.rs:5:14
|
LL | let _x = Rc::new(vec![1, 2]).into_iter();
| ^^^^^^^^^^^^^^^^^^^ ----------- value moved due to this method call
@@ -10,9 +10,9 @@ note: `into_iter` takes ownership of the receiver `self`, which moves value
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
help: you can `clone` the value and consume it, but this might not be your desired behavior
|
-LL | let _x = Rc::new(vec![1, 2]).clone().into_iter();
- | ++++++++
+LL | let _x = <Vec<i32> as Clone>::clone(&Rc::new(vec![1, 2])).into_iter();
+ | ++++++++++++++++++++++++++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/borrowck/borrowck-move-out-of-overloaded-deref.stderr b/tests/ui/borrowck/borrowck-move-out-of-overloaded-deref.stderr
index 599fa1e88..dce1f4d07 100644
--- a/tests/ui/borrowck/borrowck-move-out-of-overloaded-deref.stderr
+++ b/tests/ui/borrowck/borrowck-move-out-of-overloaded-deref.stderr
@@ -10,6 +10,6 @@ LL - let _x = *Rc::new("hi".to_string());
LL + let _x = Rc::new("hi".to_string());
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/borrowck/borrowck-move-out-of-static-item.stderr b/tests/ui/borrowck/borrowck-move-out-of-static-item.stderr
index edf8c954f..07dcaf875 100644
--- a/tests/ui/borrowck/borrowck-move-out-of-static-item.stderr
+++ b/tests/ui/borrowck/borrowck-move-out-of-static-item.stderr
@@ -4,6 +4,6 @@ error[E0507]: cannot move out of static item `BAR`
LL | test(BAR);
| ^^^ move occurs because `BAR` has type `Foo`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/borrowck/borrowck-move-out-of-vec-tail.stderr b/tests/ui/borrowck/borrowck-move-out-of-vec-tail.stderr
index 9ff20a1f4..4fa23f16b 100644
--- a/tests/ui/borrowck/borrowck-move-out-of-vec-tail.stderr
+++ b/tests/ui/borrowck/borrowck-move-out-of-vec-tail.stderr
@@ -16,6 +16,6 @@ LL - &[Foo { string: a },
LL + [Foo { string: a },
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0508`.
diff --git a/tests/ui/borrowck/borrowck-move-subcomponent.stderr b/tests/ui/borrowck/borrowck-move-subcomponent.stderr
index 341146bd1..8408d9915 100644
--- a/tests/ui/borrowck/borrowck-move-subcomponent.stderr
+++ b/tests/ui/borrowck/borrowck-move-subcomponent.stderr
@@ -10,6 +10,6 @@ LL | let S { x: ax } = a;
LL | f(pb);
| -- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0505`.
diff --git a/tests/ui/borrowck/borrowck-mut-addr-of-imm-var.stderr b/tests/ui/borrowck/borrowck-mut-addr-of-imm-var.stderr
index 20528e3f0..84f35dc22 100644
--- a/tests/ui/borrowck/borrowck-mut-addr-of-imm-var.stderr
+++ b/tests/ui/borrowck/borrowck-mut-addr-of-imm-var.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be mutable
LL | let mut x: isize = 3;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/borrowck/borrowck-mut-slice-of-imm-vec.stderr b/tests/ui/borrowck/borrowck-mut-slice-of-imm-vec.stderr
index 8ab472e64..823f470ce 100644
--- a/tests/ui/borrowck/borrowck-mut-slice-of-imm-vec.stderr
+++ b/tests/ui/borrowck/borrowck-mut-slice-of-imm-vec.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be mutable
LL | let mut v = vec![1, 2, 3];
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/borrowck/borrowck-no-cycle-in-exchange-heap.stderr b/tests/ui/borrowck/borrowck-no-cycle-in-exchange-heap.stderr
index 3462b7610..bde43a908 100644
--- a/tests/ui/borrowck/borrowck-no-cycle-in-exchange-heap.stderr
+++ b/tests/ui/borrowck/borrowck-no-cycle-in-exchange-heap.stderr
@@ -8,6 +8,6 @@ LL | y.a = x;
| |
| borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0505`.
diff --git a/tests/ui/borrowck/borrowck-or-init.stderr b/tests/ui/borrowck/borrowck-or-init.stderr
index 16d66bf40..7b43f2aee 100644
--- a/tests/ui/borrowck/borrowck-or-init.stderr
+++ b/tests/ui/borrowck/borrowck-or-init.stderr
@@ -11,6 +11,6 @@ LL | println!("{}", i);
|
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/borrowck-overloaded-index-and-overloaded-deref.stderr b/tests/ui/borrowck/borrowck-overloaded-index-and-overloaded-deref.stderr
index 7f42becd2..7b2cac987 100644
--- a/tests/ui/borrowck/borrowck-overloaded-index-and-overloaded-deref.stderr
+++ b/tests/ui/borrowck/borrowck-overloaded-index-and-overloaded-deref.stderr
@@ -9,6 +9,6 @@ LL |
LL | read(*i);
| -- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/borrowck/borrowck-overloaded-index-move-from-vec.stderr b/tests/ui/borrowck/borrowck-overloaded-index-move-from-vec.stderr
index f5f4817e9..b4106702c 100644
--- a/tests/ui/borrowck/borrowck-overloaded-index-move-from-vec.stderr
+++ b/tests/ui/borrowck/borrowck-overloaded-index-move-from-vec.stderr
@@ -9,6 +9,6 @@ help: consider borrowing here
LL | let bad = &v[0];
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/borrowck/borrowck-partial-reinit-2.stderr b/tests/ui/borrowck/borrowck-partial-reinit-2.stderr
index 36a871fbb..e25ca082b 100644
--- a/tests/ui/borrowck/borrowck-partial-reinit-2.stderr
+++ b/tests/ui/borrowck/borrowck-partial-reinit-2.stderr
@@ -8,6 +8,6 @@ LL | let mut u = Test { a: 2, b: Some(Box::new(t))};
LL | t.b = Some(Box::new(u));
| ^^^ value assigned here after move
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/borrowck/borrowck-partial-reinit-3.stderr b/tests/ui/borrowck/borrowck-partial-reinit-3.stderr
index 05f5411ee..291737952 100644
--- a/tests/ui/borrowck/borrowck-partial-reinit-3.stderr
+++ b/tests/ui/borrowck/borrowck-partial-reinit-3.stderr
@@ -8,6 +8,6 @@ LL | x.0.f = 3;
|
= note: move occurs because `x.0` has type `Test`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/borrowck/borrowck-partial-reinit-4.stderr b/tests/ui/borrowck/borrowck-partial-reinit-4.stderr
index d12a482cb..4833e689c 100644
--- a/tests/ui/borrowck/borrowck-partial-reinit-4.stderr
+++ b/tests/ui/borrowck/borrowck-partial-reinit-4.stderr
@@ -8,6 +8,6 @@ LL | (x.0).0 = Some(Test);
|
= help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/borrowck-pat-reassign-binding.stderr b/tests/ui/borrowck/borrowck-pat-reassign-binding.stderr
index b86a86938..387c681fd 100644
--- a/tests/ui/borrowck/borrowck-pat-reassign-binding.stderr
+++ b/tests/ui/borrowck/borrowck-pat-reassign-binding.stderr
@@ -9,6 +9,6 @@ LL | x = Some(*i+1);
LL | drop(i);
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/borrowck/borrowck-reborrow-from-shorter-lived-andmut.stderr b/tests/ui/borrowck/borrowck-reborrow-from-shorter-lived-andmut.stderr
index f28c42ce2..65748d844 100644
--- a/tests/ui/borrowck/borrowck-reborrow-from-shorter-lived-andmut.stderr
+++ b/tests/ui/borrowck/borrowck-reborrow-from-shorter-lived-andmut.stderr
@@ -10,5 +10,5 @@ LL | S { pointer: &mut *p.pointer }
|
= help: consider adding the following bound: `'a: 'b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/borrowck/borrowck-ref-mut-of-imm.stderr b/tests/ui/borrowck/borrowck-ref-mut-of-imm.stderr
index 5cfd81bd0..5f319112b 100644
--- a/tests/ui/borrowck/borrowck-ref-mut-of-imm.stderr
+++ b/tests/ui/borrowck/borrowck-ref-mut-of-imm.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be mutable
LL | fn destructure(mut x: Option<isize>) -> isize {
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/borrowck/borrowck-reinit.stderr b/tests/ui/borrowck/borrowck-reinit.stderr
index f785900d5..16047efa3 100644
--- a/tests/ui/borrowck/borrowck-reinit.stderr
+++ b/tests/ui/borrowck/borrowck-reinit.stderr
@@ -14,6 +14,6 @@ help: consider cloning the value if the performance cost is acceptable
LL | drop(x.clone());
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/borrowck/borrowck-return-variable-on-stack-via-clone.stderr b/tests/ui/borrowck/borrowck-return-variable-on-stack-via-clone.stderr
index d54449ac4..eade7d1ea 100644
--- a/tests/ui/borrowck/borrowck-return-variable-on-stack-via-clone.stderr
+++ b/tests/ui/borrowck/borrowck-return-variable-on-stack-via-clone.stderr
@@ -7,6 +7,6 @@ LL | (&x).clone()
| returns a value referencing data owned by the current function
| `x` is borrowed here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/borrowck/borrowck-return.stderr b/tests/ui/borrowck/borrowck-return.stderr
index 9799357c9..a1bc3008e 100644
--- a/tests/ui/borrowck/borrowck-return.stderr
+++ b/tests/ui/borrowck/borrowck-return.stderr
@@ -11,6 +11,6 @@ help: consider assigning a value
LL | let x: isize = 0;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/borrowck-storage-dead.stderr b/tests/ui/borrowck/borrowck-storage-dead.stderr
index 3a413153a..a08e2a7b5 100644
--- a/tests/ui/borrowck/borrowck-storage-dead.stderr
+++ b/tests/ui/borrowck/borrowck-storage-dead.stderr
@@ -11,6 +11,6 @@ help: consider assigning a value
LL | let x: i32 = 0;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/borrowck-swap-mut-base-ptr.stderr b/tests/ui/borrowck/borrowck-swap-mut-base-ptr.stderr
index 1c55953c9..225a983ba 100644
--- a/tests/ui/borrowck/borrowck-swap-mut-base-ptr.stderr
+++ b/tests/ui/borrowck/borrowck-swap-mut-base-ptr.stderr
@@ -9,6 +9,6 @@ LL | *t1 = 22;
LL | p.use_ref();
| - immutable borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.stderr b/tests/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.stderr
index 2f397f6b5..11ee8f7bb 100644
--- a/tests/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.stderr
+++ b/tests/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.stderr
@@ -6,6 +6,6 @@ LL | assert_static(&FOO);
LL | }
| - end of enclosing function is here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0712`.
diff --git a/tests/ui/borrowck/borrowck-unary-move.stderr b/tests/ui/borrowck/borrowck-unary-move.stderr
index f3b962059..e6c3869f6 100644
--- a/tests/ui/borrowck/borrowck-unary-move.stderr
+++ b/tests/ui/borrowck/borrowck-unary-move.stderr
@@ -10,6 +10,6 @@ LL | free(x);
LL | *y
| -- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0505`.
diff --git a/tests/ui/borrowck/borrowck-uninit-after-item.stderr b/tests/ui/borrowck/borrowck-uninit-after-item.stderr
index 071598b42..06bb419aa 100644
--- a/tests/ui/borrowck/borrowck-uninit-after-item.stderr
+++ b/tests/ui/borrowck/borrowck-uninit-after-item.stderr
@@ -12,6 +12,6 @@ help: consider assigning a value
LL | let bar = 0;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/borrowck-uninit.stderr b/tests/ui/borrowck/borrowck-uninit.stderr
index eeafc4ce1..213b541b8 100644
--- a/tests/ui/borrowck/borrowck-uninit.stderr
+++ b/tests/ui/borrowck/borrowck-uninit.stderr
@@ -11,6 +11,6 @@ help: consider assigning a value
LL | let x: isize = 0;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/borrowck-union-borrow-nested.stderr b/tests/ui/borrowck/borrowck-union-borrow-nested.stderr
index f2e549cd8..68a950dfd 100644
--- a/tests/ui/borrowck/borrowck-union-borrow-nested.stderr
+++ b/tests/ui/borrowck/borrowck-union-borrow-nested.stderr
@@ -8,6 +8,6 @@ LL | let b = u.c;
LL | ra.use_mut();
| -- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0503`.
diff --git a/tests/ui/borrowck/borrowck-union-move-assign.stderr b/tests/ui/borrowck/borrowck-union-move-assign.stderr
index af6f6fac4..8c0239a3a 100644
--- a/tests/ui/borrowck/borrowck-union-move-assign.stderr
+++ b/tests/ui/borrowck/borrowck-union-move-assign.stderr
@@ -8,6 +8,6 @@ LL | let a = u.a;
LL | let a = u.a;
| ^^^ value used here after move
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.stderr b/tests/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.stderr
index 55f3ff553..dcbaa7533 100644
--- a/tests/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.stderr
+++ b/tests/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.stderr
@@ -11,6 +11,6 @@ help: consider assigning a value
LL | let x: &i32 = todo!();
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/borrowck-use-uninitialized-in-cast.stderr b/tests/ui/borrowck/borrowck-use-uninitialized-in-cast.stderr
index ea3d0d3ef..7ccf6a4c3 100644
--- a/tests/ui/borrowck/borrowck-use-uninitialized-in-cast.stderr
+++ b/tests/ui/borrowck/borrowck-use-uninitialized-in-cast.stderr
@@ -11,6 +11,6 @@ help: consider assigning a value
LL | let x: &i32 = todo!();
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/borrowck-vec-pattern-loan-from-mut.stderr b/tests/ui/borrowck/borrowck-vec-pattern-loan-from-mut.stderr
index 5141fcc1b..d5964d28b 100644
--- a/tests/ui/borrowck/borrowck-vec-pattern-loan-from-mut.stderr
+++ b/tests/ui/borrowck/borrowck-vec-pattern-loan-from-mut.stderr
@@ -9,6 +9,6 @@ LL | v.push(tail[0] + tail[1]);
| |
| second mutable borrow occurs here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/borrowck/borrowck-vec-pattern-move-tail.stderr b/tests/ui/borrowck/borrowck-vec-pattern-move-tail.stderr
index 494d8c351..03a7efacb 100644
--- a/tests/ui/borrowck/borrowck-vec-pattern-move-tail.stderr
+++ b/tests/ui/borrowck/borrowck-vec-pattern-move-tail.stderr
@@ -9,6 +9,6 @@ LL | a[2] = 0;
LL | println!("t[0]: {}", t[0]);
| ---- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/borrowck/borrowck-vec-pattern-tail-element-loan.stderr b/tests/ui/borrowck/borrowck-vec-pattern-tail-element-loan.stderr
index 7e21c55f2..2187437a1 100644
--- a/tests/ui/borrowck/borrowck-vec-pattern-tail-element-loan.stderr
+++ b/tests/ui/borrowck/borrowck-vec-pattern-tail-element-loan.stderr
@@ -7,6 +7,6 @@ LL | let vec: &[isize] = &vec;
LL | tail
| ^^^^ returns a value referencing data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/borrowck/borrowck-while-break.stderr b/tests/ui/borrowck/borrowck-while-break.stderr
index 13143d436..e91af728b 100644
--- a/tests/ui/borrowck/borrowck-while-break.stderr
+++ b/tests/ui/borrowck/borrowck-while-break.stderr
@@ -11,6 +11,6 @@ LL | println!("{}", v);
|
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/borrowck-while-cond.stderr b/tests/ui/borrowck/borrowck-while-cond.stderr
index 5d0194989..2d92b45e0 100644
--- a/tests/ui/borrowck/borrowck-while-cond.stderr
+++ b/tests/ui/borrowck/borrowck-while-cond.stderr
@@ -11,6 +11,6 @@ help: consider assigning a value
LL | let x: bool = false;
| +++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/borrowck-while.stderr b/tests/ui/borrowck/borrowck-while.stderr
index c45235990..d560b9c02 100644
--- a/tests/ui/borrowck/borrowck-while.stderr
+++ b/tests/ui/borrowck/borrowck-while.stderr
@@ -8,6 +8,6 @@ LL | while 1 == 1 { x = 10; }
LL | return x;
| ^ `x` used here but it is possibly-uninitialized
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/clone-span-on-try-operator.fixed b/tests/ui/borrowck/clone-span-on-try-operator.fixed
index 52f66e43a..4fad75b9a 100644
--- a/tests/ui/borrowck/clone-span-on-try-operator.fixed
+++ b/tests/ui/borrowck/clone-span-on-try-operator.fixed
@@ -7,5 +7,5 @@ impl Foo {
}
fn main() {
let foo = &Foo;
- (*foo).clone().foo(); //~ ERROR cannot move out
+ <Foo as Clone>::clone(&(*foo)).foo(); //~ ERROR cannot move out
}
diff --git a/tests/ui/borrowck/clone-span-on-try-operator.stderr b/tests/ui/borrowck/clone-span-on-try-operator.stderr
index 85785e670..adf84e49a 100644
--- a/tests/ui/borrowck/clone-span-on-try-operator.stderr
+++ b/tests/ui/borrowck/clone-span-on-try-operator.stderr
@@ -13,9 +13,9 @@ LL | fn foo(self) {}
| ^^^^
help: you can `clone` the value and consume it, but this might not be your desired behavior
|
-LL | (*foo).clone().foo();
- | ++++++++
+LL | <Foo as Clone>::clone(&(*foo)).foo();
+ | +++++++++++++++++++++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/borrowck/copy-suggestion-region-vid.stderr b/tests/ui/borrowck/copy-suggestion-region-vid.stderr
index b344aa664..3a801a22e 100644
--- a/tests/ui/borrowck/copy-suggestion-region-vid.stderr
+++ b/tests/ui/borrowck/copy-suggestion-region-vid.stderr
@@ -14,6 +14,6 @@ help: consider cloning the value if the performance cost is acceptable
LL | HelperStruct { helpers: helpers.clone(), is_empty: helpers[0].is_empty() }
| +++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/borrowck/do-not-suggest-adding-move-when-closure-is-already-marked-as-move.stderr b/tests/ui/borrowck/do-not-suggest-adding-move-when-closure-is-already-marked-as-move.stderr
index 78ca090fe..879ff8be0 100644
--- a/tests/ui/borrowck/do-not-suggest-adding-move-when-closure-is-already-marked-as-move.stderr
+++ b/tests/ui/borrowck/do-not-suggest-adding-move-when-closure-is-already-marked-as-move.stderr
@@ -14,5 +14,5 @@ LL | move || { iter.next() }
= note: `FnMut` closures only have access to their captured variables while they are executing...
= note: ...therefore, they cannot allow references to captured variables to escape
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/borrowck/drop-in-loop.stderr b/tests/ui/borrowck/drop-in-loop.stderr
index d5734e7ec..98dae19a7 100644
--- a/tests/ui/borrowck/drop-in-loop.stderr
+++ b/tests/ui/borrowck/drop-in-loop.stderr
@@ -9,6 +9,6 @@ LL | base = false;
LL | wrapper = WrapperWithDrop(&mut base);
| ------- borrow might be used here, when `wrapper` is dropped and runs the `Drop` code for type `WrapperWithDrop`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/borrowck/generic_const_early_param.rs b/tests/ui/borrowck/generic_const_early_param.rs
new file mode 100644
index 000000000..f601e45d2
--- /dev/null
+++ b/tests/ui/borrowck/generic_const_early_param.rs
@@ -0,0 +1,16 @@
+#![feature(generic_const_exprs)]
+//~^ WARN the feature `generic_const_exprs` is incomplete
+
+struct DataWrapper<'static> {
+ //~^ ERROR invalid lifetime parameter name: `'static`
+ data: &'a [u8; Self::SIZE],
+ //~^ ERROR use of undeclared lifetime name `'a`
+ //~^^ ERROR lifetime may not live long enough
+}
+
+impl DataWrapper<'a> {
+ //~^ ERROR undeclared lifetime
+ const SIZE: usize = 14;
+}
+
+fn main(){}
diff --git a/tests/ui/borrowck/generic_const_early_param.stderr b/tests/ui/borrowck/generic_const_early_param.stderr
new file mode 100644
index 000000000..a71ab0939
--- /dev/null
+++ b/tests/ui/borrowck/generic_const_early_param.stderr
@@ -0,0 +1,42 @@
+error[E0262]: invalid lifetime parameter name: `'static`
+ --> $DIR/generic_const_early_param.rs:4:20
+ |
+LL | struct DataWrapper<'static> {
+ | ^^^^^^^ 'static is a reserved lifetime name
+
+error[E0261]: use of undeclared lifetime name `'a`
+ --> $DIR/generic_const_early_param.rs:6:12
+ |
+LL | struct DataWrapper<'static> {
+ | - help: consider introducing lifetime `'a` here: `'a,`
+LL |
+LL | data: &'a [u8; Self::SIZE],
+ | ^^ undeclared lifetime
+
+error[E0261]: use of undeclared lifetime name `'a`
+ --> $DIR/generic_const_early_param.rs:11:18
+ |
+LL | impl DataWrapper<'a> {
+ | - ^^ undeclared lifetime
+ | |
+ | help: consider introducing lifetime `'a` here: `<'a>`
+
+warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/generic_const_early_param.rs:1:12
+ |
+LL | #![feature(generic_const_exprs)]
+ | ^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
+ = note: `#[warn(incomplete_features)]` on by default
+
+error: lifetime may not live long enough
+ --> $DIR/generic_const_early_param.rs:6:20
+ |
+LL | data: &'a [u8; Self::SIZE],
+ | ^^^^^^^^^^ requires that `'_` must outlive `'static`
+
+error: aborting due to 4 previous errors; 1 warning emitted
+
+Some errors have detailed explanations: E0261, E0262.
+For more information about an error, try `rustc --explain E0261`.
diff --git a/tests/ui/borrowck/immutable-arg.stderr b/tests/ui/borrowck/immutable-arg.stderr
index bddb0633a..84a480f64 100644
--- a/tests/ui/borrowck/immutable-arg.stderr
+++ b/tests/ui/borrowck/immutable-arg.stderr
@@ -6,6 +6,6 @@ LL | fn foo(_x: u32) {
LL | _x = 4;
| ^^^^^^ cannot assign to immutable argument
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0384`.
diff --git a/tests/ui/borrowck/index-mut-help-with-impl.stderr b/tests/ui/borrowck/index-mut-help-with-impl.stderr
index 89391f409..a97f2bdd4 100644
--- a/tests/ui/borrowck/index-mut-help-with-impl.stderr
+++ b/tests/ui/borrowck/index-mut-help-with-impl.stderr
@@ -4,6 +4,6 @@ error[E0596]: cannot borrow data in a `&` reference as mutable
LL | Index::index(&v, 1..2).make_ascii_uppercase();
| ^^^^^^^^^^^^^^^^^^^^^^ cannot borrow as mutable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/borrowck/issue-101119.stderr b/tests/ui/borrowck/issue-101119.stderr
index a22afdc67..1f32ece3d 100644
--- a/tests/ui/borrowck/issue-101119.stderr
+++ b/tests/ui/borrowck/issue-101119.stderr
@@ -10,6 +10,6 @@ LL |
LL | fill_segment(state);
| ----- use occurs due to use in closure
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/borrowck/issue-103250.stderr b/tests/ui/borrowck/issue-103250.stderr
index 4a2378352..b7ece5d97 100644
--- a/tests/ui/borrowck/issue-103250.stderr
+++ b/tests/ui/borrowck/issue-103250.stderr
@@ -12,6 +12,6 @@ help: consider assigning a value
LL | let mut last_error: Box<dyn std::error::Error> = todo!();
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/issue-114374-invalid-help-fmt-args.stderr b/tests/ui/borrowck/issue-114374-invalid-help-fmt-args.stderr
index 8221505b1..3ee89d973 100644
--- a/tests/ui/borrowck/issue-114374-invalid-help-fmt-args.stderr
+++ b/tests/ui/borrowck/issue-114374-invalid-help-fmt-args.stderr
@@ -9,7 +9,7 @@ LL | let x = format_args!("a {} {} {}.", 1, format_args!("b{}!", 2), 3);
LL | bar(x);
| - borrow later used here
|
- = note: the result of `format_args!` can only be assigned directly if no placeholders in it's arguments are used
+ = note: the result of `format_args!` can only be assigned directly if no placeholders in its arguments are used
= note: to learn more, visit <https://doc.rust-lang.org/std/macro.format_args.html>
= note: this error originates in the macro `format_args` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -24,7 +24,7 @@ LL |
LL | bar(foo);
| --- borrow later used here
|
- = note: the result of `format_args!` can only be assigned directly if no placeholders in it's arguments are used
+ = note: the result of `format_args!` can only be assigned directly if no placeholders in its arguments are used
= note: to learn more, visit <https://doc.rust-lang.org/std/macro.format_args.html>
= note: this error originates in the macro `format_args` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/tests/ui/borrowck/issue-11493.stderr b/tests/ui/borrowck/issue-11493.stderr
index 2720b09b0..211d4cb3e 100644
--- a/tests/ui/borrowck/issue-11493.stderr
+++ b/tests/ui/borrowck/issue-11493.stderr
@@ -14,6 +14,6 @@ LL ~ let binding = id(5);
LL ~ let y = x.as_ref().unwrap_or(&binding);
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/borrowck/issue-115259-suggest-iter-mut.stderr b/tests/ui/borrowck/issue-115259-suggest-iter-mut.stderr
index 7e0fc2cf2..40ab2e61d 100644
--- a/tests/ui/borrowck/issue-115259-suggest-iter-mut.stderr
+++ b/tests/ui/borrowck/issue-115259-suggest-iter-mut.stderr
@@ -11,6 +11,6 @@ help: you may want to use `iter_mut` here
LL | self.layers.iter_mut().fold(0, |result, mut layer| result + layer.process())
| ~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/borrowck/issue-17545.stderr b/tests/ui/borrowck/issue-17545.stderr
index 3ae7e64d2..45e977e39 100644
--- a/tests/ui/borrowck/issue-17545.stderr
+++ b/tests/ui/borrowck/issue-17545.stderr
@@ -11,6 +11,6 @@ LL | | ));
| |______|
| argument requires that borrow lasts for `'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/borrowck/issue-17718-static-move.stderr b/tests/ui/borrowck/issue-17718-static-move.stderr
index 65aea5b18..5ca0a7fb8 100644
--- a/tests/ui/borrowck/issue-17718-static-move.stderr
+++ b/tests/ui/borrowck/issue-17718-static-move.stderr
@@ -9,6 +9,6 @@ help: consider borrowing here
LL | let _a = &FOO;
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/borrowck/issue-25793.stderr b/tests/ui/borrowck/issue-25793.stderr
index 27dab53e4..e2efc405f 100644
--- a/tests/ui/borrowck/issue-25793.stderr
+++ b/tests/ui/borrowck/issue-25793.stderr
@@ -13,6 +13,6 @@ LL | r.get_size(width!(self))
|
= note: this error originates in the macro `width` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0503`.
diff --git a/tests/ui/borrowck/issue-33819.stderr b/tests/ui/borrowck/issue-33819.stderr
index f77fdbf2b..41c9d6aac 100644
--- a/tests/ui/borrowck/issue-33819.stderr
+++ b/tests/ui/borrowck/issue-33819.stderr
@@ -7,6 +7,6 @@ LL | Some(ref v) => { let a = &mut v; },
| cannot borrow as mutable
| help: try removing `&mut` here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/borrowck/issue-36082.stderr b/tests/ui/borrowck/issue-36082.stderr
index a6357f818..47c78d686 100644
--- a/tests/ui/borrowck/issue-36082.stderr
+++ b/tests/ui/borrowck/issue-36082.stderr
@@ -15,6 +15,6 @@ LL ~ let binding = x.borrow();
LL ~ let val: &_ = binding.0;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/borrowck/issue-41962.stderr b/tests/ui/borrowck/issue-41962.stderr
index 716cc9d0c..8585376b9 100644
--- a/tests/ui/borrowck/issue-41962.stderr
+++ b/tests/ui/borrowck/issue-41962.stderr
@@ -10,6 +10,6 @@ help: borrow this binding in the pattern to avoid moving the value
LL | if let Some(ref thing) = maybe {
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/borrowck/issue-42344.stderr b/tests/ui/borrowck/issue-42344.stderr
index 5cffa1b51..bf82d462b 100644
--- a/tests/ui/borrowck/issue-42344.stderr
+++ b/tests/ui/borrowck/issue-42344.stderr
@@ -4,6 +4,6 @@ error[E0596]: cannot borrow `*TAB[_]` as mutable, as `TAB` is an immutable stati
LL | TAB[0].iter_mut();
| ^^^^^^ cannot borrow as mutable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/borrowck/issue-45983.stderr b/tests/ui/borrowck/issue-45983.stderr
index feb098c59..19a4a98bb 100644
--- a/tests/ui/borrowck/issue-45983.stderr
+++ b/tests/ui/borrowck/issue-45983.stderr
@@ -8,6 +8,6 @@ LL | give_any(|y| x = Some(y));
| |
| `y` is a reference that is only valid in the closure body
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0521`.
diff --git a/tests/ui/borrowck/issue-46471.stderr b/tests/ui/borrowck/issue-46471.stderr
index 935414c1f..17e4b5e8d 100644
--- a/tests/ui/borrowck/issue-46471.stderr
+++ b/tests/ui/borrowck/issue-46471.stderr
@@ -4,6 +4,6 @@ error[E0515]: cannot return reference to local variable `x`
LL | &x
| ^^ returns a reference to data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/borrowck/issue-47215-ice-from-drop-elab.stderr b/tests/ui/borrowck/issue-47215-ice-from-drop-elab.stderr
index 8d4918867..d6aeb410e 100644
--- a/tests/ui/borrowck/issue-47215-ice-from-drop-elab.stderr
+++ b/tests/ui/borrowck/issue-47215-ice-from-drop-elab.stderr
@@ -9,6 +9,6 @@ help: consider borrowing here
LL | let mut x = &X;
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/borrowck/issue-47646.stderr b/tests/ui/borrowck/issue-47646.stderr
index d82e1f908..85adfc03d 100644
--- a/tests/ui/borrowck/issue-47646.stderr
+++ b/tests/ui/borrowck/issue-47646.stderr
@@ -15,6 +15,6 @@ LL | };
|
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/borrowck/issue-51117.stderr b/tests/ui/borrowck/issue-51117.stderr
index f8a9608ad..d19fa18df 100644
--- a/tests/ui/borrowck/issue-51117.stderr
+++ b/tests/ui/borrowck/issue-51117.stderr
@@ -8,6 +8,6 @@ LL | bar.take();
LL | drop(baz);
| --- first borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/borrowck/issue-51301.stderr b/tests/ui/borrowck/issue-51301.stderr
index 6ec920cb8..c0b064370 100644
--- a/tests/ui/borrowck/issue-51301.stderr
+++ b/tests/ui/borrowck/issue-51301.stderr
@@ -12,6 +12,6 @@ help: consider borrowing the pattern binding
LL | .find(|(&ref event_type, _)| event == event_type)
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/borrowck/issue-51415.stderr b/tests/ui/borrowck/issue-51415.stderr
index 0d486b455..e51e0b33e 100644
--- a/tests/ui/borrowck/issue-51415.stderr
+++ b/tests/ui/borrowck/issue-51415.stderr
@@ -12,6 +12,6 @@ help: consider borrowing the pattern binding
LL | let opt = a.iter().enumerate().find(|(_, &ref s)| {
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/borrowck/issue-52713-bug.stderr b/tests/ui/borrowck/issue-52713-bug.stderr
index 3f7715645..ac4936bac 100644
--- a/tests/ui/borrowck/issue-52713-bug.stderr
+++ b/tests/ui/borrowck/issue-52713-bug.stderr
@@ -9,6 +9,6 @@ LL | x += 1;
LL | println!("{}", y);
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/borrowck/issue-53432-nested-closure-outlives-borrowed-value.stderr b/tests/ui/borrowck/issue-53432-nested-closure-outlives-borrowed-value.stderr
index 3debfb62c..588775280 100644
--- a/tests/ui/borrowck/issue-53432-nested-closure-outlives-borrowed-value.stderr
+++ b/tests/ui/borrowck/issue-53432-nested-closure-outlives-borrowed-value.stderr
@@ -15,5 +15,5 @@ help: consider adding 'move' keyword before the nested closure
LL | move || f() // The `nested` closure
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr b/tests/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr
index 99c63e4db..121c2e870 100644
--- a/tests/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr
+++ b/tests/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr
@@ -10,6 +10,6 @@ LL - *array
LL + array
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/borrowck/issue-58776-borrowck-scans-children.stderr b/tests/ui/borrowck/issue-58776-borrowck-scans-children.stderr
index 967451c68..630d07d65 100644
--- a/tests/ui/borrowck/issue-58776-borrowck-scans-children.stderr
+++ b/tests/ui/borrowck/issue-58776-borrowck-scans-children.stderr
@@ -12,6 +12,6 @@ LL | greeting = "DEALLOCATED".to_string();
LL | println!("thread result: {:?}", res);
| --- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/borrowck/issue-62107-match-arm-scopes.stderr b/tests/ui/borrowck/issue-62107-match-arm-scopes.stderr
index 8fe8fa710..e19f37538 100644
--- a/tests/ui/borrowck/issue-62107-match-arm-scopes.stderr
+++ b/tests/ui/borrowck/issue-62107-match-arm-scopes.stderr
@@ -12,6 +12,6 @@ help: consider assigning a value
LL | let e: i32 = 0;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.stderr b/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.stderr
index 19f194100..466f19eb0 100644
--- a/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.stderr
+++ b/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.stderr
@@ -11,6 +11,6 @@ help: you may want to use `iter_mut` here
LL | vec.iter_mut().flat_map(|container| container.things()).cloned().collect::<Vec<PathBuf>>();
| ~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/borrowck/issue-69789-iterator-mut-suggestion.stderr b/tests/ui/borrowck/issue-69789-iterator-mut-suggestion.stderr
index 369a8c61d..87b8e0591 100644
--- a/tests/ui/borrowck/issue-69789-iterator-mut-suggestion.stderr
+++ b/tests/ui/borrowck/issue-69789-iterator-mut-suggestion.stderr
@@ -7,6 +7,6 @@ LL |
LL | *item = ();
| ^^^^^^^^^^ `item` is a `&` reference, so the data it refers to cannot be written
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/borrowck/issue-7573.stderr b/tests/ui/borrowck/issue-7573.stderr
index 9d86286b8..07a67474c 100644
--- a/tests/ui/borrowck/issue-7573.stderr
+++ b/tests/ui/borrowck/issue-7573.stderr
@@ -10,6 +10,6 @@ LL |
LL | lines_to_use.push(installed_id);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `installed_id` escapes the closure body here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0521`.
diff --git a/tests/ui/borrowck/issue-81365-1.stderr b/tests/ui/borrowck/issue-81365-1.stderr
index 0d803b042..94566ae19 100644
--- a/tests/ui/borrowck/issue-81365-1.stderr
+++ b/tests/ui/borrowck/issue-81365-1.stderr
@@ -15,6 +15,6 @@ note: deref defined here
LL | type Target = DerefTarget;
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/borrowck/issue-81365-10.stderr b/tests/ui/borrowck/issue-81365-10.stderr
index 2bbde82fa..7681ee68c 100644
--- a/tests/ui/borrowck/issue-81365-10.stderr
+++ b/tests/ui/borrowck/issue-81365-10.stderr
@@ -8,6 +8,6 @@ LL | self.container_field = true;
LL | first;
| ----- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/borrowck/issue-81365-11.stderr b/tests/ui/borrowck/issue-81365-11.stderr
index 5f7e86f11..f1f28dcce 100644
--- a/tests/ui/borrowck/issue-81365-11.stderr
+++ b/tests/ui/borrowck/issue-81365-11.stderr
@@ -8,6 +8,6 @@ LL | self.container_field = true;
LL | first;
| ----- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/borrowck/issue-81365-2.stderr b/tests/ui/borrowck/issue-81365-2.stderr
index d9aeaf15f..f55da67a8 100644
--- a/tests/ui/borrowck/issue-81365-2.stderr
+++ b/tests/ui/borrowck/issue-81365-2.stderr
@@ -15,6 +15,6 @@ note: deref defined here
LL | type Target = DerefTarget;
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/borrowck/issue-81365-3.stderr b/tests/ui/borrowck/issue-81365-3.stderr
index 0c0d1994b..f1c24640c 100644
--- a/tests/ui/borrowck/issue-81365-3.stderr
+++ b/tests/ui/borrowck/issue-81365-3.stderr
@@ -15,6 +15,6 @@ note: deref defined here
LL | type Target = Container;
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/borrowck/issue-81365-4.stderr b/tests/ui/borrowck/issue-81365-4.stderr
index 98093daa9..c0dae0de3 100644
--- a/tests/ui/borrowck/issue-81365-4.stderr
+++ b/tests/ui/borrowck/issue-81365-4.stderr
@@ -15,6 +15,6 @@ note: deref defined here
LL | type Target = Container;
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/borrowck/issue-81365-5.stderr b/tests/ui/borrowck/issue-81365-5.stderr
index 094cec021..06c2ea5ab 100644
--- a/tests/ui/borrowck/issue-81365-5.stderr
+++ b/tests/ui/borrowck/issue-81365-5.stderr
@@ -15,6 +15,6 @@ note: deref defined here
LL | type Target = DerefTarget;
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/borrowck/issue-81365-6.stderr b/tests/ui/borrowck/issue-81365-6.stderr
index e61dc95ec..e52ebf938 100644
--- a/tests/ui/borrowck/issue-81365-6.stderr
+++ b/tests/ui/borrowck/issue-81365-6.stderr
@@ -15,6 +15,6 @@ note: deref defined here
LL | type Target = [()];
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/borrowck/issue-81365-7.stderr b/tests/ui/borrowck/issue-81365-7.stderr
index 0565127e3..1933f5bd8 100644
--- a/tests/ui/borrowck/issue-81365-7.stderr
+++ b/tests/ui/borrowck/issue-81365-7.stderr
@@ -15,6 +15,6 @@ note: deref defined here
LL | type Target = DerefTarget;
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/borrowck/issue-81365-8.stderr b/tests/ui/borrowck/issue-81365-8.stderr
index 0ca732ff2..ab9f71cc0 100644
--- a/tests/ui/borrowck/issue-81365-8.stderr
+++ b/tests/ui/borrowck/issue-81365-8.stderr
@@ -15,6 +15,6 @@ note: deref defined here
LL | type Target = DerefTarget;
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/borrowck/issue-81365-9.stderr b/tests/ui/borrowck/issue-81365-9.stderr
index 4d305268a..f0aefd7ba 100644
--- a/tests/ui/borrowck/issue-81365-9.stderr
+++ b/tests/ui/borrowck/issue-81365-9.stderr
@@ -8,6 +8,6 @@ LL | self.container_field = true;
LL | first;
| ----- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/borrowck/issue-81899.stderr b/tests/ui/borrowck/issue-81899.stderr
index 5ff33933c..1da573ea9 100644
--- a/tests/ui/borrowck/issue-81899.stderr
+++ b/tests/ui/borrowck/issue-81899.stderr
@@ -22,6 +22,6 @@ note: erroneous constant encountered
LL | const _CONST: &[u8] = &f(&[], |_| {});
| ^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/borrowck/issue-82032.stderr b/tests/ui/borrowck/issue-82032.stderr
index f272477a9..2ac785cd1 100644
--- a/tests/ui/borrowck/issue-82032.stderr
+++ b/tests/ui/borrowck/issue-82032.stderr
@@ -9,6 +9,6 @@ LL | for v in self.0.values() {
LL | v.flush();
| ^ `v` is a `&` reference, so the data it refers to cannot be borrowed as mutable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/borrowck/issue-82462.stderr b/tests/ui/borrowck/issue-82462.stderr
index a2c291f77..8cb4583eb 100644
--- a/tests/ui/borrowck/issue-82462.stderr
+++ b/tests/ui/borrowck/issue-82462.stderr
@@ -17,6 +17,6 @@ help: consider adding semicolon after the expression so its temporaries are drop
LL | };
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/borrowck/issue-83309-ice-immut-in-for-loop.stderr b/tests/ui/borrowck/issue-83309-ice-immut-in-for-loop.stderr
index 26ce007dd..4e7a9b695 100644
--- a/tests/ui/borrowck/issue-83309-ice-immut-in-for-loop.stderr
+++ b/tests/ui/borrowck/issue-83309-ice-immut-in-for-loop.stderr
@@ -7,6 +7,6 @@ LL |
LL | *v -= 1;
| ^^^^^^^ `v` is a `&` reference, so the data it refers to cannot be written
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/borrowck/issue-83760.fixed b/tests/ui/borrowck/issue-83760.fixed
new file mode 100644
index 000000000..4544eeb6e
--- /dev/null
+++ b/tests/ui/borrowck/issue-83760.fixed
@@ -0,0 +1,47 @@
+// run-rustfix
+#![allow(unused_variables, dead_code)]
+#[derive(Clone)]
+struct Struct;
+#[derive(Clone)]
+struct Struct2;
+// We use a second one here because otherwise when applying suggestions we'd end up with two
+// `#[derive(Clone)]` annotations.
+
+fn test1() {
+ let mut val = Some(Struct);
+ while let Some(ref foo) = val { //~ ERROR use of moved value
+ if true {
+ val = None;
+ } else {
+
+ }
+ }
+}
+
+fn test2() {
+ let mut foo = Some(Struct);
+ let _x = foo.clone().unwrap();
+ if true {
+ foo = Some(Struct);
+ } else {
+ }
+ let _y = foo; //~ ERROR use of moved value: `foo`
+}
+
+fn test3() {
+ let mut foo = Some(Struct2);
+ let _x = foo.clone().unwrap();
+ if true {
+ foo = Some(Struct2);
+ } else if true {
+ foo = Some(Struct2);
+ } else if true {
+ foo = Some(Struct2);
+ } else if true {
+ foo = Some(Struct2);
+ } else {
+ }
+ let _y = foo; //~ ERROR use of moved value: `foo`
+}
+
+fn main() {}
diff --git a/tests/ui/borrowck/issue-83760.rs b/tests/ui/borrowck/issue-83760.rs
index e25b4f727..81bfdf0fc 100644
--- a/tests/ui/borrowck/issue-83760.rs
+++ b/tests/ui/borrowck/issue-83760.rs
@@ -1,4 +1,9 @@
+// run-rustfix
+#![allow(unused_variables, dead_code)]
struct Struct;
+struct Struct2;
+// We use a second one here because otherwise when applying suggestions we'd end up with two
+// `#[derive(Clone)]` annotations.
fn test1() {
let mut val = Some(Struct);
@@ -22,16 +27,16 @@ fn test2() {
}
fn test3() {
- let mut foo = Some(Struct);
+ let mut foo = Some(Struct2);
let _x = foo.unwrap();
if true {
- foo = Some(Struct);
+ foo = Some(Struct2);
} else if true {
- foo = Some(Struct);
+ foo = Some(Struct2);
} else if true {
- foo = Some(Struct);
+ foo = Some(Struct2);
} else if true {
- foo = Some(Struct);
+ foo = Some(Struct2);
} else {
}
let _y = foo; //~ ERROR use of moved value: `foo`
diff --git a/tests/ui/borrowck/issue-83760.stderr b/tests/ui/borrowck/issue-83760.stderr
index a585bff0c..d120adbc0 100644
--- a/tests/ui/borrowck/issue-83760.stderr
+++ b/tests/ui/borrowck/issue-83760.stderr
@@ -1,5 +1,5 @@
error[E0382]: use of moved value
- --> $DIR/issue-83760.rs:5:20
+ --> $DIR/issue-83760.rs:10:20
|
LL | while let Some(foo) = val {
| ^^^ value moved here, in previous iteration of loop
@@ -14,7 +14,7 @@ LL | while let Some(ref foo) = val {
| +++
error[E0382]: use of moved value: `foo`
- --> $DIR/issue-83760.rs:21:14
+ --> $DIR/issue-83760.rs:26:14
|
LL | let mut foo = Some(Struct);
| ------- move occurs because `foo` has type `Option<Struct>`, which does not implement the `Copy` trait
@@ -29,12 +29,21 @@ LL | let _y = foo;
|
note: `Option::<T>::unwrap` takes ownership of the receiver `self`, which moves `foo`
--> $SRC_DIR/core/src/option.rs:LL:COL
+help: you could `clone` the value and consume it, if the `Struct: Clone` trait bound could be satisfied
+ |
+LL | let _x = foo.clone().unwrap();
+ | ++++++++
+help: consider annotating `Struct` with `#[derive(Clone)]`
+ |
+LL + #[derive(Clone)]
+LL | struct Struct;
+ |
error[E0382]: use of moved value: `foo`
- --> $DIR/issue-83760.rs:37:14
+ --> $DIR/issue-83760.rs:42:14
|
-LL | let mut foo = Some(Struct);
- | ------- move occurs because `foo` has type `Option<Struct>`, which does not implement the `Copy` trait
+LL | let mut foo = Some(Struct2);
+ | ------- move occurs because `foo` has type `Option<Struct2>`, which does not implement the `Copy` trait
LL | let _x = foo.unwrap();
| -------- `foo` moved due to this method call
...
@@ -42,18 +51,27 @@ LL | let _y = foo;
| ^^^ value used here after move
|
note: these 3 reinitializations and 1 other might get skipped
- --> $DIR/issue-83760.rs:30:9
+ --> $DIR/issue-83760.rs:35:9
|
-LL | foo = Some(Struct);
- | ^^^^^^^^^^^^^^^^^^
+LL | foo = Some(Struct2);
+ | ^^^^^^^^^^^^^^^^^^^
LL | } else if true {
-LL | foo = Some(Struct);
- | ^^^^^^^^^^^^^^^^^^
+LL | foo = Some(Struct2);
+ | ^^^^^^^^^^^^^^^^^^^
LL | } else if true {
-LL | foo = Some(Struct);
- | ^^^^^^^^^^^^^^^^^^
+LL | foo = Some(Struct2);
+ | ^^^^^^^^^^^^^^^^^^^
note: `Option::<T>::unwrap` takes ownership of the receiver `self`, which moves `foo`
--> $SRC_DIR/core/src/option.rs:LL:COL
+help: you could `clone` the value and consume it, if the `Struct2: Clone` trait bound could be satisfied
+ |
+LL | let _x = foo.clone().unwrap();
+ | ++++++++
+help: consider annotating `Struct2` with `#[derive(Clone)]`
+ |
+LL + #[derive(Clone)]
+LL | struct Struct2;
+ |
error: aborting due to 3 previous errors
diff --git a/tests/ui/borrowck/issue-83924.stderr b/tests/ui/borrowck/issue-83924.stderr
index 572414df2..c37de178f 100644
--- a/tests/ui/borrowck/issue-83924.stderr
+++ b/tests/ui/borrowck/issue-83924.stderr
@@ -17,6 +17,6 @@ help: consider creating a fresh reborrow of `v` here
LL | for n in &mut *v {
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/borrowck/issue-85581.stderr b/tests/ui/borrowck/issue-85581.stderr
index 29c0429f2..80f1f4cb5 100644
--- a/tests/ui/borrowck/issue-85581.stderr
+++ b/tests/ui/borrowck/issue-85581.stderr
@@ -12,6 +12,6 @@ LL | Some(_) => { heap.pop(); },
LL | }
| - ... and the first borrow might be used here, when that temporary is dropped and runs the destructor for type `Option<PeekMut<'_, i32>>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/borrowck/issue-85765-closure.rs b/tests/ui/borrowck/issue-85765-closure.rs
index f2d1dd0fb..edc9eeaff 100644
--- a/tests/ui/borrowck/issue-85765-closure.rs
+++ b/tests/ui/borrowck/issue-85765-closure.rs
@@ -3,6 +3,7 @@ fn main() {
let mut test = Vec::new();
let rofl: &Vec<Vec<i32>> = &mut test;
//~^ HELP consider changing this binding's type
+ //~| HELP you can `clone` the `Vec<Vec<i32>>` value and consume it, but this might not be your desired behavior
rofl.push(Vec::new());
//~^ ERROR cannot borrow `*rofl` as mutable, as it is behind a `&` reference
//~| NOTE `rofl` is a `&` reference, so the data it refers to cannot be borrowed as mutable
diff --git a/tests/ui/borrowck/issue-85765-closure.stderr b/tests/ui/borrowck/issue-85765-closure.stderr
index 936ddd67b..4a6a0e94b 100644
--- a/tests/ui/borrowck/issue-85765-closure.stderr
+++ b/tests/ui/borrowck/issue-85765-closure.stderr
@@ -1,16 +1,21 @@
error[E0596]: cannot borrow `*rofl` as mutable, as it is behind a `&` reference
- --> $DIR/issue-85765-closure.rs:6:9
+ --> $DIR/issue-85765-closure.rs:7:9
|
LL | rofl.push(Vec::new());
| ^^^^ `rofl` is a `&` reference, so the data it refers to cannot be borrowed as mutable
|
+help: you can `clone` the `Vec<Vec<i32>>` value and consume it, but this might not be your desired behavior
+ --> $DIR/issue-85765-closure.rs:4:36
+ |
+LL | let rofl: &Vec<Vec<i32>> = &mut test;
+ | ^^^^^^^^^
help: consider changing this binding's type
|
LL | let rofl: &mut Vec<Vec<i32>> = &mut test;
| ~~~~~~~~~~~~~~~~~~
error[E0594]: cannot assign to `*r`, which is behind a `&` reference
- --> $DIR/issue-85765-closure.rs:13:9
+ --> $DIR/issue-85765-closure.rs:14:9
|
LL | *r = 0;
| ^^^^^^ `r` is a `&` reference, so the data it refers to cannot be written
@@ -21,7 +26,7 @@ LL | let r = &mut mutvar;
| +++
error[E0594]: cannot assign to `*x`, which is behind a `&` reference
- --> $DIR/issue-85765-closure.rs:20:9
+ --> $DIR/issue-85765-closure.rs:21:9
|
LL | *x = 1;
| ^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written
@@ -32,7 +37,7 @@ LL | let x: &mut usize = &mut{0};
| ~~~~~~~~~~
error[E0594]: cannot assign to `*y`, which is behind a `&` reference
- --> $DIR/issue-85765-closure.rs:27:9
+ --> $DIR/issue-85765-closure.rs:28:9
|
LL | *y = 1;
| ^^^^^^ `y` is a `&` reference, so the data it refers to cannot be written
diff --git a/tests/ui/borrowck/issue-85765.rs b/tests/ui/borrowck/issue-85765.rs
index 76e0b5173..ce5740bc0 100644
--- a/tests/ui/borrowck/issue-85765.rs
+++ b/tests/ui/borrowck/issue-85765.rs
@@ -2,6 +2,7 @@ fn main() {
let mut test = Vec::new();
let rofl: &Vec<Vec<i32>> = &mut test;
//~^ HELP consider changing this binding's type
+ //~| HELP you can `clone` the `Vec<Vec<i32>>` value and consume it, but this might not be your desired behavior
rofl.push(Vec::new());
//~^ ERROR cannot borrow `*rofl` as mutable, as it is behind a `&` reference
//~| NOTE `rofl` is a `&` reference, so the data it refers to cannot be borrowed as mutable
diff --git a/tests/ui/borrowck/issue-85765.stderr b/tests/ui/borrowck/issue-85765.stderr
index 57900bfb6..4889f774a 100644
--- a/tests/ui/borrowck/issue-85765.stderr
+++ b/tests/ui/borrowck/issue-85765.stderr
@@ -1,16 +1,21 @@
error[E0596]: cannot borrow `*rofl` as mutable, as it is behind a `&` reference
- --> $DIR/issue-85765.rs:5:5
+ --> $DIR/issue-85765.rs:6:5
|
LL | rofl.push(Vec::new());
| ^^^^ `rofl` is a `&` reference, so the data it refers to cannot be borrowed as mutable
|
+help: you can `clone` the `Vec<Vec<i32>>` value and consume it, but this might not be your desired behavior
+ --> $DIR/issue-85765.rs:3:32
+ |
+LL | let rofl: &Vec<Vec<i32>> = &mut test;
+ | ^^^^^^^^^
help: consider changing this binding's type
|
LL | let rofl: &mut Vec<Vec<i32>> = &mut test;
| ~~~~~~~~~~~~~~~~~~
error[E0594]: cannot assign to `*r`, which is behind a `&` reference
- --> $DIR/issue-85765.rs:12:5
+ --> $DIR/issue-85765.rs:13:5
|
LL | *r = 0;
| ^^^^^^ `r` is a `&` reference, so the data it refers to cannot be written
@@ -21,7 +26,7 @@ LL | let r = &mut mutvar;
| +++
error[E0594]: cannot assign to `*x`, which is behind a `&` reference
- --> $DIR/issue-85765.rs:19:5
+ --> $DIR/issue-85765.rs:20:5
|
LL | *x = 1;
| ^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written
@@ -32,7 +37,7 @@ LL | let x: &mut usize = &mut{0};
| ~~~~~~~~~~
error[E0594]: cannot assign to `*y`, which is behind a `&` reference
- --> $DIR/issue-85765.rs:26:5
+ --> $DIR/issue-85765.rs:27:5
|
LL | *y = 1;
| ^^^^^^ `y` is a `&` reference, so the data it refers to cannot be written
diff --git a/tests/ui/borrowck/issue-87456-point-to-closure.stderr b/tests/ui/borrowck/issue-87456-point-to-closure.stderr
index afd141125..a15909df0 100644
--- a/tests/ui/borrowck/issue-87456-point-to-closure.stderr
+++ b/tests/ui/borrowck/issue-87456-point-to-closure.stderr
@@ -15,6 +15,6 @@ help: consider borrowing here
LL | let _foo: String = &val;
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/borrowck/issue-88434-minimal-example.stderr b/tests/ui/borrowck/issue-88434-minimal-example.stderr
index 7b785b25b..b32331ce4 100644
--- a/tests/ui/borrowck/issue-88434-minimal-example.stderr
+++ b/tests/ui/borrowck/issue-88434-minimal-example.stderr
@@ -22,6 +22,6 @@ note: erroneous constant encountered
LL | const _CONST: &() = &f(&|_| {});
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/borrowck/issue-88434-removal-index-should-be-less.stderr b/tests/ui/borrowck/issue-88434-removal-index-should-be-less.stderr
index 9732b8cfa..e3c881dd4 100644
--- a/tests/ui/borrowck/issue-88434-removal-index-should-be-less.stderr
+++ b/tests/ui/borrowck/issue-88434-removal-index-should-be-less.stderr
@@ -22,6 +22,6 @@ note: erroneous constant encountered
LL | const _CONST: &[u8] = &f(&[], |_| {});
| ^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/borrowck/issue-91206.rs b/tests/ui/borrowck/issue-91206.rs
index e062a2537..c60ac62fa 100644
--- a/tests/ui/borrowck/issue-91206.rs
+++ b/tests/ui/borrowck/issue-91206.rs
@@ -10,6 +10,7 @@ fn main() {
let client = TestClient;
let inner = client.get_inner_ref();
//~^ HELP consider specifying this binding's type
+ //~| HELP you can `clone` the `Vec<usize>` value and consume it, but this might not be your desired behavior
inner.clear();
//~^ ERROR cannot borrow `*inner` as mutable, as it is behind a `&` reference [E0596]
//~| NOTE `inner` is a `&` reference, so the data it refers to cannot be borrowed as mutable
diff --git a/tests/ui/borrowck/issue-91206.stderr b/tests/ui/borrowck/issue-91206.stderr
index 30f836565..e3dd65b64 100644
--- a/tests/ui/borrowck/issue-91206.stderr
+++ b/tests/ui/borrowck/issue-91206.stderr
@@ -1,14 +1,19 @@
error[E0596]: cannot borrow `*inner` as mutable, as it is behind a `&` reference
- --> $DIR/issue-91206.rs:13:5
+ --> $DIR/issue-91206.rs:14:5
|
LL | inner.clear();
| ^^^^^ `inner` is a `&` reference, so the data it refers to cannot be borrowed as mutable
|
+help: you can `clone` the `Vec<usize>` value and consume it, but this might not be your desired behavior
+ --> $DIR/issue-91206.rs:11:17
+ |
+LL | let inner = client.get_inner_ref();
+ | ^^^^^^^^^^^^^^^^^^^^^^
help: consider specifying this binding's type
|
LL | let inner: &mut Vec<usize> = client.get_inner_ref();
| +++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/borrowck/issue-92015.stderr b/tests/ui/borrowck/issue-92015.stderr
index ea4f9abb8..167a5cf58 100644
--- a/tests/ui/borrowck/issue-92015.stderr
+++ b/tests/ui/borrowck/issue-92015.stderr
@@ -9,6 +9,6 @@ help: consider specifying this binding's type
LL | let foo: &mut i32 = Some(&0).unwrap();
| ++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/borrowck/issue-92157.stderr b/tests/ui/borrowck/issue-92157.stderr
index a46b12889..0ffedccd6 100644
--- a/tests/ui/borrowck/issue-92157.stderr
+++ b/tests/ui/borrowck/issue-92157.stderr
@@ -7,6 +7,6 @@ LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8) -> isi
= note: expected signature `fn(fn() -> T, isize, *const *const u8, u8) -> _`
found signature `fn(fn() -> T, isize, *const *const u8) -> _`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/borrowck/issue-93078.stderr b/tests/ui/borrowck/issue-93078.stderr
index bcbcbe724..446b4582b 100644
--- a/tests/ui/borrowck/issue-93078.stderr
+++ b/tests/ui/borrowck/issue-93078.stderr
@@ -7,6 +7,6 @@ LL | self.modify();
= note: as `Self` may be unsized, this call attempts to take `&mut &mut self`
= note: however, `&mut self` expands to `self: &mut Self`, therefore `self` cannot be borrowed mutably
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/borrowck/issue-93093.stderr b/tests/ui/borrowck/issue-93093.stderr
index afa76594f..b6a2768b6 100644
--- a/tests/ui/borrowck/issue-93093.stderr
+++ b/tests/ui/borrowck/issue-93093.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be a mutable reference
LL | async fn bar(&mut self) {
| ~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/borrowck/many-mutable-borrows.stderr b/tests/ui/borrowck/many-mutable-borrows.stderr
index 0f808ac92..bc2ba987c 100644
--- a/tests/ui/borrowck/many-mutable-borrows.stderr
+++ b/tests/ui/borrowck/many-mutable-borrows.stderr
@@ -28,6 +28,6 @@ help: consider changing this to be mutable
LL | let mut v = Vec::new();
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/borrowck/move-error-in-promoted-2.stderr b/tests/ui/borrowck/move-error-in-promoted-2.stderr
index 38dba94bd..0d5edadcb 100644
--- a/tests/ui/borrowck/move-error-in-promoted-2.stderr
+++ b/tests/ui/borrowck/move-error-in-promoted-2.stderr
@@ -7,6 +7,6 @@ LL | &([S][0],);
| cannot move out of here
| move occurs because value has type `S`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0508`.
diff --git a/tests/ui/borrowck/move-error-in-promoted.stderr b/tests/ui/borrowck/move-error-in-promoted.stderr
index a4432e38d..03c0297c5 100644
--- a/tests/ui/borrowck/move-error-in-promoted.stderr
+++ b/tests/ui/borrowck/move-error-in-promoted.stderr
@@ -7,6 +7,6 @@ LL | let _ = S1(C[0]).clone();
| cannot move out of here
| move occurs because value has type `S2`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0508`.
diff --git a/tests/ui/borrowck/move-error-snippets.stderr b/tests/ui/borrowck/move-error-snippets.stderr
index 8ac711e9e..83f9e19aa 100644
--- a/tests/ui/borrowck/move-error-snippets.stderr
+++ b/tests/ui/borrowck/move-error-snippets.stderr
@@ -15,6 +15,6 @@ help: consider borrowing here
LL | let a = &$c;
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/borrowck/move-in-pattern-mut-in-loop.stderr b/tests/ui/borrowck/move-in-pattern-mut-in-loop.stderr
index 55948afca..bfbae5be0 100644
--- a/tests/ui/borrowck/move-in-pattern-mut-in-loop.stderr
+++ b/tests/ui/borrowck/move-in-pattern-mut-in-loop.stderr
@@ -10,6 +10,6 @@ help: borrow this binding in the pattern to avoid moving the value
LL | if let Some(ref mut _x) = opt {}
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/borrowck/mut-borrow-in-loop-2.stderr b/tests/ui/borrowck/mut-borrow-in-loop-2.stderr
index 74e7067c9..7b9a946f3 100644
--- a/tests/ui/borrowck/mut-borrow-in-loop-2.stderr
+++ b/tests/ui/borrowck/mut-borrow-in-loop-2.stderr
@@ -20,6 +20,6 @@ help: consider creating a fresh reborrow of `value` here
LL | Other::handle(&mut *value);
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/borrowck/reborrow-sugg-move-then-borrow.stderr b/tests/ui/borrowck/reborrow-sugg-move-then-borrow.stderr
index ecd916a59..8590dd9ca 100644
--- a/tests/ui/borrowck/reborrow-sugg-move-then-borrow.stderr
+++ b/tests/ui/borrowck/reborrow-sugg-move-then-borrow.stderr
@@ -16,6 +16,6 @@ help: consider creating a fresh reborrow of `state` here
LL | for _ in &mut *state {}
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/borrowck/regions-bound-missing-bound-in-impl.stderr b/tests/ui/borrowck/regions-bound-missing-bound-in-impl.stderr
index 7ebea3c03..54d8f26f4 100644
--- a/tests/ui/borrowck/regions-bound-missing-bound-in-impl.stderr
+++ b/tests/ui/borrowck/regions-bound-missing-bound-in-impl.stderr
@@ -22,8 +22,8 @@ error[E0308]: method not compatible with trait
LL | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
- = note: expected signature `fn(&'a isize, Inv<'c>, Inv<'c>, Inv<'_>)`
- found signature `fn(&'a isize, Inv<'_>, Inv<'c>, Inv<'_>)`
+ = note: expected signature `fn(&'a _, Inv<'c>, Inv<'c>, Inv<'_>)`
+ found signature `fn(&'a _, Inv<'_>, Inv<'c>, Inv<'_>)`
note: the lifetime `'c` as defined here...
--> $DIR/regions-bound-missing-bound-in-impl.rs:27:24
|
@@ -41,8 +41,8 @@ error[E0308]: method not compatible with trait
LL | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
- = note: expected signature `fn(&'a isize, Inv<'c>, Inv<'c>, Inv<'_>)`
- found signature `fn(&'a isize, Inv<'_>, Inv<'c>, Inv<'_>)`
+ = note: expected signature `fn(&'a _, Inv<'c>, Inv<'c>, Inv<'_>)`
+ found signature `fn(&'a _, Inv<'_>, Inv<'c>, Inv<'_>)`
note: the lifetime `'c` as defined here...
--> $DIR/regions-bound-missing-bound-in-impl.rs:27:24
|
diff --git a/tests/ui/borrowck/regions-escape-bound-fn-2.stderr b/tests/ui/borrowck/regions-escape-bound-fn-2.stderr
index 14393bc8e..9c070de44 100644
--- a/tests/ui/borrowck/regions-escape-bound-fn-2.stderr
+++ b/tests/ui/borrowck/regions-escape-bound-fn-2.stderr
@@ -8,6 +8,6 @@ LL | with_int(|y| x = Some(y));
| |
| `y` is a reference that is only valid in the closure body
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0521`.
diff --git a/tests/ui/borrowck/regions-escape-bound-fn.stderr b/tests/ui/borrowck/regions-escape-bound-fn.stderr
index a23fdacde..868ba9c89 100644
--- a/tests/ui/borrowck/regions-escape-bound-fn.stderr
+++ b/tests/ui/borrowck/regions-escape-bound-fn.stderr
@@ -8,6 +8,6 @@ LL | with_int(|y| x = Some(y));
| |
| `y` is a reference that is only valid in the closure body
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0521`.
diff --git a/tests/ui/borrowck/regions-escape-unboxed-closure.stderr b/tests/ui/borrowck/regions-escape-unboxed-closure.stderr
index 153f77c89..c861f772b 100644
--- a/tests/ui/borrowck/regions-escape-unboxed-closure.stderr
+++ b/tests/ui/borrowck/regions-escape-unboxed-closure.stderr
@@ -8,6 +8,6 @@ LL | with_int(&mut |y| x = Some(y));
| |
| `y` is a reference that is only valid in the closure body
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0521`.
diff --git a/tests/ui/borrowck/return-local-binding-from-desugaring.stderr b/tests/ui/borrowck/return-local-binding-from-desugaring.stderr
index 9f952542e..1f4a548a4 100644
--- a/tests/ui/borrowck/return-local-binding-from-desugaring.stderr
+++ b/tests/ui/borrowck/return-local-binding-from-desugaring.stderr
@@ -7,6 +7,6 @@ LL | for ref x in xs {
LL | result
| ^^^^^^ returns a value referencing data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/borrowck/suggest-as-ref-on-mut-closure.stderr b/tests/ui/borrowck/suggest-as-ref-on-mut-closure.stderr
index bada08368..1e98006a9 100644
--- a/tests/ui/borrowck/suggest-as-ref-on-mut-closure.stderr
+++ b/tests/ui/borrowck/suggest-as-ref-on-mut-closure.stderr
@@ -9,6 +9,10 @@ LL | cb.map(|cb| cb());
|
note: `Option::<T>::map` takes ownership of the receiver `self`, which moves `*cb`
--> $SRC_DIR/core/src/option.rs:LL:COL
+help: you could `clone` the value and consume it, if the `&mut dyn FnMut(): Clone` trait bound could be satisfied
+ |
+LL | <Option<&mut dyn FnMut()> as Clone>::clone(&cb).map(|cb| cb());
+ | ++++++++++++++++++++++++++++++++++++++++++++ +
error[E0596]: cannot borrow `*cb` as mutable, as it is behind a `&` reference
--> $DIR/suggest-as-ref-on-mut-closure.rs:12:26
diff --git a/tests/ui/borrowck/suggest-local-var-for-vector.stderr b/tests/ui/borrowck/suggest-local-var-for-vector.stderr
index c8d00f7b2..d88e8b096 100644
--- a/tests/ui/borrowck/suggest-local-var-for-vector.stderr
+++ b/tests/ui/borrowck/suggest-local-var-for-vector.stderr
@@ -19,6 +19,6 @@ help: ...and then using that local here
LL | vec[vec.len() - 1] = 123;
| ^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/borrowck/suggest-mut-iterator.stderr b/tests/ui/borrowck/suggest-mut-iterator.stderr
index 77f991a9a..b396bb7b5 100644
--- a/tests/ui/borrowck/suggest-mut-iterator.stderr
+++ b/tests/ui/borrowck/suggest-mut-iterator.stderr
@@ -11,6 +11,6 @@ help: use a mutable iterator instead
LL | for test in &mut tests {
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/borrowck/suggest-storing-local-var-for-vector.stderr b/tests/ui/borrowck/suggest-storing-local-var-for-vector.stderr
index 368d72810..a69a025cb 100644
--- a/tests/ui/borrowck/suggest-storing-local-var-for-vector.stderr
+++ b/tests/ui/borrowck/suggest-storing-local-var-for-vector.stderr
@@ -19,6 +19,6 @@ help: ...and then using that local here
LL | vec[vec.len() - 1] = 123;
| ^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/borrowck/tainted-promoteds.stderr b/tests/ui/borrowck/tainted-promoteds.stderr
index b276ea9ac..a5c448fdc 100644
--- a/tests/ui/borrowck/tainted-promoteds.stderr
+++ b/tests/ui/borrowck/tainted-promoteds.stderr
@@ -9,6 +9,6 @@ LL | let a = 0;
LL | a = &0 * &1 * &2 * &3;
| ^^^^^^^^^^^^^^^^^^^^^ cannot assign twice to immutable variable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0384`.
diff --git a/tests/ui/borrowck/two-phase-across-loop.stderr b/tests/ui/borrowck/two-phase-across-loop.stderr
index d7c0210cc..bd63fc961 100644
--- a/tests/ui/borrowck/two-phase-across-loop.stderr
+++ b/tests/ui/borrowck/two-phase-across-loop.stderr
@@ -6,6 +6,6 @@ LL | strings.push(foo.get_string());
| |
| first borrow used here, in later iteration of loop
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/borrowck/two-phase-cannot-nest-mut-self-calls.stderr b/tests/ui/borrowck/two-phase-cannot-nest-mut-self-calls.stderr
index 2c3f1c18a..6a3e0db4b 100644
--- a/tests/ui/borrowck/two-phase-cannot-nest-mut-self-calls.stderr
+++ b/tests/ui/borrowck/two-phase-cannot-nest-mut-self-calls.stderr
@@ -9,6 +9,6 @@ LL |
LL | vec.push(2);
| ^^^^^^^^^^^ mutable borrow occurs here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/borrowck/two-phase-reservation-sharing-interference.nll_target.stderr b/tests/ui/borrowck/two-phase-reservation-sharing-interference.nll_target.stderr
index e3e4057d6..b1e439298 100644
--- a/tests/ui/borrowck/two-phase-reservation-sharing-interference.nll_target.stderr
+++ b/tests/ui/borrowck/two-phase-reservation-sharing-interference.nll_target.stderr
@@ -10,6 +10,6 @@ LL | delay = &mut vec;
LL | shared[0];
| ------ immutable borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/borrowck/two-phase-sneaky.stderr b/tests/ui/borrowck/two-phase-sneaky.stderr
index 4db970c1d..4f1712ccc 100644
--- a/tests/ui/borrowck/two-phase-sneaky.stderr
+++ b/tests/ui/borrowck/two-phase-sneaky.stderr
@@ -9,6 +9,6 @@ LL |
LL | v.push(format!("foo"));
| ^ second mutable borrow occurs here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/borrowck/two-phase-surprise-no-conflict.stderr b/tests/ui/borrowck/two-phase-surprise-no-conflict.stderr
index 9f9d4bd8d..b3bf2f924 100644
--- a/tests/ui/borrowck/two-phase-surprise-no-conflict.stderr
+++ b/tests/ui/borrowck/two-phase-surprise-no-conflict.stderr
@@ -77,6 +77,8 @@ LL | reg.register_univ(Box::new(CapturePass::new(&reg.sess_mut)));
| | | immutable borrow occurs here
| | cast requires that `reg.sess_mut` is borrowed for `'a`
| mutable borrow occurs here
+ |
+ = note: due to object lifetime defaults, `Box<dyn for<'b> LateLintPass<'b>>` actually means `Box<(dyn for<'b> LateLintPass<'b> + 'static)>`
error[E0502]: cannot borrow `*reg` as mutable because it is also borrowed as immutable
--> $DIR/two-phase-surprise-no-conflict.rs:144:5
@@ -119,6 +121,8 @@ LL | reg.register_univ(Box::new(CapturePass::new_mut(&mut reg.sess_mut)));
| | | first mutable borrow occurs here
| | cast requires that `reg.sess_mut` is borrowed for `'a`
| second mutable borrow occurs here
+ |
+ = note: due to object lifetime defaults, `Box<dyn for<'b> LateLintPass<'b>>` actually means `Box<(dyn for<'b> LateLintPass<'b> + 'static)>`
error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time
--> $DIR/two-phase-surprise-no-conflict.rs:158:53
diff --git a/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.fixed b/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.fixed
index b0c537610..85acafd88 100644
--- a/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.fixed
+++ b/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.fixed
@@ -9,7 +9,7 @@ fn call<F>(f: F) where F : Fn() {
fn main() {
let y = vec![format!("World")];
call(|| {
- y.clone().into_iter();
+ <Vec<String> as Clone>::clone(&y).into_iter();
//~^ ERROR cannot move out of `y`, a captured variable in an `Fn` closure
});
}
diff --git a/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr b/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr
index a2f6365b7..a2ff70255 100644
--- a/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr
+++ b/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr
@@ -14,9 +14,9 @@ note: `into_iter` takes ownership of the receiver `self`, which moves `y`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
help: you can `clone` the value and consume it, but this might not be your desired behavior
|
-LL | y.clone().into_iter();
- | ++++++++
+LL | <Vec<String> as Clone>::clone(&y).into_iter();
+ | +++++++++++++++++++++++++++++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/box/alloc-unstable-fail.stderr b/tests/ui/box/alloc-unstable-fail.stderr
index 03ae36e88..352efce31 100644
--- a/tests/ui/box/alloc-unstable-fail.stderr
+++ b/tests/ui/box/alloc-unstable-fail.stderr
@@ -7,6 +7,6 @@ LL | let _boxed: Box<u32, _> = Box::new(10);
= note: see issue #32838 <https://github.com/rust-lang/rust/issues/32838> for more information
= help: add `#![feature(allocator_api)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/box/alloc-unstable.rs b/tests/ui/box/alloc-unstable.rs
index 66388d0d5..640cadcc8 100644
--- a/tests/ui/box/alloc-unstable.rs
+++ b/tests/ui/box/alloc-unstable.rs
@@ -1,8 +1,5 @@
// run-pass
#![feature(allocator_api)]
-
-use std::boxed::Box;
-
fn main() {
let _boxed: Box<u32, _> = Box::new(10);
}
diff --git a/tests/ui/box/into-boxed-slice.rs b/tests/ui/box/into-boxed-slice.rs
index 61b3d9152..86866ac2f 100644
--- a/tests/ui/box/into-boxed-slice.rs
+++ b/tests/ui/box/into-boxed-slice.rs
@@ -1,7 +1,5 @@
// run-pass
#![feature(box_into_boxed_slice)]
-
-use std::boxed::Box;
fn main() {
assert_eq!(Box::into_boxed_slice(Box::new(5u8)), Box::new([5u8]) as Box<[u8]>);
assert_eq!(Box::into_boxed_slice(Box::new([25u8])), Box::new([[25u8]]) as Box<[[u8; 1]]>);
diff --git a/tests/ui/box/issue-82446.stderr b/tests/ui/box/issue-82446.stderr
index c03f35884..66daaceff 100644
--- a/tests/ui/box/issue-82446.stderr
+++ b/tests/ui/box/issue-82446.stderr
@@ -4,9 +4,9 @@ error[E0308]: mismatched types
LL | val
| ^^^ expected `Box<dyn MyTrait>`, found `&Box<dyn MyTrait>`
|
- = note: expected struct `Box<(dyn MyTrait + 'static)>`
- found reference `&Box<(dyn MyTrait + 'static)>`
+ = note: expected struct `Box<_>`
+ found reference `&Box<_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/box/leak-alloc.stderr b/tests/ui/box/leak-alloc.stderr
index feda8841f..8b8cea3fe 100644
--- a/tests/ui/box/leak-alloc.stderr
+++ b/tests/ui/box/leak-alloc.stderr
@@ -12,6 +12,6 @@ LL |
LL | use_value(*theref)
| ------- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0505`.
diff --git a/tests/ui/box/new-box-syntax.rs b/tests/ui/box/new-box-syntax.rs
index c56e1dd46..e3b1550d6 100644
--- a/tests/ui/box/new-box-syntax.rs
+++ b/tests/ui/box/new-box-syntax.rs
@@ -8,8 +8,6 @@
// Tests that the new `box` syntax works with unique pointers.
-use std::boxed::Box;
-
struct Structure {
x: isize,
y: isize,
diff --git a/tests/ui/box/unit/unique-kinds.rs b/tests/ui/box/unit/unique-kinds.rs
index f02d0b507..1ef09d719 100644
--- a/tests/ui/box/unit/unique-kinds.rs
+++ b/tests/ui/box/unit/unique-kinds.rs
@@ -1,6 +1,5 @@
// run-pass
-use std::cmp::PartialEq;
use std::fmt::Debug;
fn sendable() {
diff --git a/tests/ui/box/unit/unique-object-noncopyable.stderr b/tests/ui/box/unit/unique-object-noncopyable.stderr
index db42ed9ba..1b98d09cc 100644
--- a/tests/ui/box/unit/unique-object-noncopyable.stderr
+++ b/tests/ui/box/unit/unique-object-noncopyable.stderr
@@ -20,6 +20,6 @@ LL | let _z = y.clone();
`dyn Foo: Clone`
which is required by `Box<dyn Foo>: Clone`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/box/unit/unique-pinned-nocopy.stderr b/tests/ui/box/unit/unique-pinned-nocopy.stderr
index 2fd5b0d82..d662a2d6d 100644
--- a/tests/ui/box/unit/unique-pinned-nocopy.stderr
+++ b/tests/ui/box/unit/unique-pinned-nocopy.stderr
@@ -23,6 +23,6 @@ LL + #[derive(Clone)]
LL | struct R {
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/btreemap/btreemap-index-mut-2.stderr b/tests/ui/btreemap/btreemap-index-mut-2.stderr
index c8d4fd595..0b8c77cb9 100644
--- a/tests/ui/btreemap/btreemap-index-mut-2.stderr
+++ b/tests/ui/btreemap/btreemap-index-mut-2.stderr
@@ -14,6 +14,6 @@ LL | map.get_mut(&0).map(|val| { *val = 1; });
LL | let val = map.entry(&0).or_insert(1);
| +++++++++ ~~~~~~~ ~~~~~~~~~~~~ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/btreemap/btreemap-index-mut.stderr b/tests/ui/btreemap/btreemap-index-mut.stderr
index 26f2a4c4b..cc465fbf3 100644
--- a/tests/ui/btreemap/btreemap-index-mut.stderr
+++ b/tests/ui/btreemap/btreemap-index-mut.stderr
@@ -14,6 +14,6 @@ LL | map.get_mut(&0).map(|val| { *val = 1; });
LL | let val = map.entry(&0).or_insert(1);
| +++++++++ ~~~~~~~ ~~~~~~~~~~~~ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/btreemap/btreemap_dropck.stderr b/tests/ui/btreemap/btreemap_dropck.stderr
index d405e465a..805c2112b 100644
--- a/tests/ui/btreemap/btreemap_dropck.stderr
+++ b/tests/ui/btreemap/btreemap_dropck.stderr
@@ -10,6 +10,6 @@ LL | drop(s);
LL | }
| - borrow might be used here, when `_map` is dropped and runs the `Drop` code for type `BTreeMap`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0505`.
diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr b/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr
index f9d548bb8..251651df4 100644
--- a/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr
+++ b/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr
@@ -19,6 +19,6 @@ help: consider further restricting this bound
LL | impl <T:Sync+'static + std::marker::Send> RequiresRequiresShareAndSend for X<T> { }
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-self-type.stderr b/tests/ui/builtin-superkinds/builtin-superkinds-self-type.stderr
index 0e2c6c60b..d01026353 100644
--- a/tests/ui/builtin-superkinds/builtin-superkinds-self-type.stderr
+++ b/tests/ui/builtin-superkinds/builtin-superkinds-self-type.stderr
@@ -17,6 +17,6 @@ help: consider adding an explicit lifetime bound
LL | impl <T: Sync + 'static> Foo for T { }
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0310`.
diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-simple.stderr b/tests/ui/builtin-superkinds/builtin-superkinds-simple.stderr
index 8b19170b0..7579bffc7 100644
--- a/tests/ui/builtin-superkinds/builtin-superkinds-simple.stderr
+++ b/tests/ui/builtin-superkinds/builtin-superkinds-simple.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `Foo`
LL | trait Foo : Send { }
| ^^^^ required by this bound in `Foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr b/tests/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr
index 0cfea72d5..4a25c42b5 100644
--- a/tests/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr
+++ b/tests/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr
@@ -14,6 +14,6 @@ help: consider further restricting this bound
LL | impl <T: Sync+'static + std::marker::Send> Foo for T { }
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/c-variadic/issue-32201.stderr b/tests/ui/c-variadic/issue-32201.stderr
index cedb58784..352db9f62 100644
--- a/tests/ui/c-variadic/issue-32201.stderr
+++ b/tests/ui/c-variadic/issue-32201.stderr
@@ -4,6 +4,6 @@ error[E0617]: can't pass `fn(*const u8) {bar}` to variadic function
LL | foo(0, bar);
| ^^^ help: cast the value to `fn(*const u8)`: `bar as fn(*const u8)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0617`.
diff --git a/tests/ui/c-variadic/issue-86053-2.stderr b/tests/ui/c-variadic/issue-86053-2.stderr
index 815b06e77..2c4be2522 100644
--- a/tests/ui/c-variadic/issue-86053-2.stderr
+++ b/tests/ui/c-variadic/issue-86053-2.stderr
@@ -11,6 +11,6 @@ note: but the referenced data is only valid for the lifetime `'a` as defined her
LL | unsafe extern "C" fn ordering4<'a, F: H<&'static &'a ()>>(_: (), ...) {}
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0491`.
diff --git a/tests/ui/c-variadic/variadic-ffi-2.stderr b/tests/ui/c-variadic/variadic-ffi-2.stderr
index 8884fc6fb..d0ca7034b 100644
--- a/tests/ui/c-variadic/variadic-ffi-2.stderr
+++ b/tests/ui/c-variadic/variadic-ffi-2.stderr
@@ -4,6 +4,6 @@ error[E0045]: C-variadic function must have a compatible calling convention, lik
LL | fn baz(f: extern "stdcall" fn(usize, ...)) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0045`.
diff --git a/tests/ui/c-variadic/variadic-ffi-6.stderr b/tests/ui/c-variadic/variadic-ffi-6.stderr
index 4c7792d96..344bfed4b 100644
--- a/tests/ui/c-variadic/variadic-ffi-6.stderr
+++ b/tests/ui/c-variadic/variadic-ffi-6.stderr
@@ -5,11 +5,20 @@ LL | ) -> &usize {
| ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
LL | ) -> &'static usize {
| +++++++
+help: instead, you are more likely to want to change one of the arguments to be borrowed...
+ |
+LL | x: &usize,
+ | +
+help: ...or alternatively, you might want to return an owned value
+ |
+LL - ) -> &usize {
+LL + ) -> usize {
+ |
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0106`.
diff --git a/tests/ui/c-variadic/variadic-ffi-no-fixed-args.stderr b/tests/ui/c-variadic/variadic-ffi-no-fixed-args.stderr
index e11ba43ca..e268ef3fa 100644
--- a/tests/ui/c-variadic/variadic-ffi-no-fixed-args.stderr
+++ b/tests/ui/c-variadic/variadic-ffi-no-fixed-args.stderr
@@ -4,5 +4,5 @@ error: C-variadic function must be declared with at least one named argument
LL | fn foo(...);
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/capture1.stderr b/tests/ui/capture1.stderr
index ad8434709..067b85ba6 100644
--- a/tests/ui/capture1.stderr
+++ b/tests/ui/capture1.stderr
@@ -6,6 +6,6 @@ LL | fn foo() -> isize { return bar; }
|
= help: use the `|| { ... }` closure form instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0434`.
diff --git a/tests/ui/cast/cast-errors-issue-43825.stderr b/tests/ui/cast/cast-errors-issue-43825.stderr
index 1e77f5dbd..658d5ddbb 100644
--- a/tests/ui/cast/cast-errors-issue-43825.stderr
+++ b/tests/ui/cast/cast-errors-issue-43825.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `error` in this scope
LL | let error = error;
| ^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/cast/cast-from-nil.stderr b/tests/ui/cast/cast-from-nil.stderr
index dab133cfb..991ff93a8 100644
--- a/tests/ui/cast/cast-from-nil.stderr
+++ b/tests/ui/cast/cast-from-nil.stderr
@@ -4,6 +4,6 @@ error[E0605]: non-primitive cast: `()` as `u32`
LL | fn main() { let u = (assert!(true) as u32); }
| ^^^^^^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0605`.
diff --git a/tests/ui/cast/cast-macro-lhs.stderr b/tests/ui/cast/cast-macro-lhs.stderr
index db7ce57e1..83c6cf31f 100644
--- a/tests/ui/cast/cast-macro-lhs.stderr
+++ b/tests/ui/cast/cast-macro-lhs.stderr
@@ -6,6 +6,6 @@ LL | let x = foo!() as *const [u8];
| |
| consider casting this expression to `*const ()`, then using `core::ptr::from_raw_parts`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0606`.
diff --git a/tests/ui/cast/cast-rfc0401-2.stderr b/tests/ui/cast/cast-rfc0401-2.stderr
index dd90c3a97..b7fb42053 100644
--- a/tests/ui/cast/cast-rfc0401-2.stderr
+++ b/tests/ui/cast/cast-rfc0401-2.stderr
@@ -9,6 +9,6 @@ help: compare with zero instead
LL | let _ = 3 != 0;
| ~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0054`.
diff --git a/tests/ui/cast/cast-to-nil.stderr b/tests/ui/cast/cast-to-nil.stderr
index 29a9baffd..14c75983b 100644
--- a/tests/ui/cast/cast-to-nil.stderr
+++ b/tests/ui/cast/cast-to-nil.stderr
@@ -4,6 +4,6 @@ error[E0605]: non-primitive cast: `u32` as `()`
LL | fn main() { let u = 0u32 as (); }
| ^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0605`.
diff --git a/tests/ui/cast/casts-differing-anon.stderr b/tests/ui/cast/casts-differing-anon.stderr
index f9abfb522..8ddd97137 100644
--- a/tests/ui/cast/casts-differing-anon.stderr
+++ b/tests/ui/cast/casts-differing-anon.stderr
@@ -6,6 +6,6 @@ LL | b_raw = f_raw as *mut _;
|
= note: vtable kinds may not match
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0606`.
diff --git a/tests/ui/cast/casts-issue-46365.stderr b/tests/ui/cast/casts-issue-46365.stderr
index 841754736..84bc73a9b 100644
--- a/tests/ui/cast/casts-issue-46365.stderr
+++ b/tests/ui/cast/casts-issue-46365.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `Ipsum` in this scope
LL | ipsum: Ipsum
| ^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/cast/issue-10991.stderr b/tests/ui/cast/issue-10991.stderr
index 5b8a18233..52afc8343 100644
--- a/tests/ui/cast/issue-10991.stderr
+++ b/tests/ui/cast/issue-10991.stderr
@@ -4,6 +4,6 @@ error[E0605]: non-primitive cast: `()` as `usize`
LL | let _t = nil as usize;
| ^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0605`.
diff --git a/tests/ui/cast/issue-17444.stderr b/tests/ui/cast/issue-17444.stderr
index 1097079df..0d4f6f194 100644
--- a/tests/ui/cast/issue-17444.stderr
+++ b/tests/ui/cast/issue-17444.stderr
@@ -4,6 +4,6 @@ error[E0606]: casting `Test` as `*const isize` is invalid
LL | let _x = Test::Foo as *const isize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0606`.
diff --git a/tests/ui/cast/issue-85586.stderr b/tests/ui/cast/issue-85586.stderr
index ed8a6fc62..847a5527d 100644
--- a/tests/ui/cast/issue-85586.stderr
+++ b/tests/ui/cast/issue-85586.stderr
@@ -4,6 +4,6 @@ error[E0282]: type annotations needed
LL | let b = (a + 1) as usize;
| ^^^^^^^ cannot infer type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/cast/issue-88621.stderr b/tests/ui/cast/issue-88621.stderr
index 886145c1b..0459ce5ea 100644
--- a/tests/ui/cast/issue-88621.stderr
+++ b/tests/ui/cast/issue-88621.stderr
@@ -4,6 +4,6 @@ error[E0605]: non-primitive cast: `Kind2` as `u8`
LL | let _ = Kind2::Foo() as u8;
| ^^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0605`.
diff --git a/tests/ui/cast/issue-89497.stderr b/tests/ui/cast/issue-89497.stderr
index bf3c3537f..1208ca45d 100644
--- a/tests/ui/cast/issue-89497.stderr
+++ b/tests/ui/cast/issue-89497.stderr
@@ -10,6 +10,6 @@ LL - let _reference: &'static i32 = unsafe { pointer as *const i32 as &'stat
LL + let _reference: &'static i32 = unsafe { &*(pointer as *const i32) };
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0605`.
diff --git a/tests/ui/cast/unsized-struct-cast.stderr b/tests/ui/cast/unsized-struct-cast.stderr
index 79b3d973c..47a51d846 100644
--- a/tests/ui/cast/unsized-struct-cast.stderr
+++ b/tests/ui/cast/unsized-struct-cast.stderr
@@ -4,6 +4,6 @@ error[E0606]: casting `&[_; 0]` as `*const Data` is invalid
LL | const _: *const Data = &[] as *const Data;
| ^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0606`.
diff --git a/tests/ui/cast/unsupported-cast.stderr b/tests/ui/cast/unsupported-cast.stderr
index 56a375a1d..2c4951ec7 100644
--- a/tests/ui/cast/unsupported-cast.stderr
+++ b/tests/ui/cast/unsupported-cast.stderr
@@ -4,6 +4,6 @@ error[E0606]: casting `f64` as `*const A` is invalid
LL | println!("{:?}", 1.0 as *const A);
| ^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0606`.
diff --git a/tests/ui/cenum_impl_drop_cast.stderr b/tests/ui/cenum_impl_drop_cast.stderr
index b3f921c14..541d15d02 100644
--- a/tests/ui/cenum_impl_drop_cast.stderr
+++ b/tests/ui/cenum_impl_drop_cast.stderr
@@ -12,7 +12,7 @@ note: the lint level is defined here
LL | #![deny(cenum_impl_drop_cast)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
Future incompatibility report: Future breakage diagnostic:
error: cannot cast enum `E` into integer `u32` because it implements `Drop`
diff --git a/tests/ui/cfg/conditional-compile-arch.rs b/tests/ui/cfg/conditional-compile-arch.rs
index e59e06f80..c6ecf4807 100644
--- a/tests/ui/cfg/conditional-compile-arch.rs
+++ b/tests/ui/cfg/conditional-compile-arch.rs
@@ -28,9 +28,6 @@ pub fn main() { }
#[cfg(target_arch = "s390x")]
pub fn main() { }
-#[cfg(target_arch = "asmjs")]
-pub fn main() { }
-
#[cfg(target_arch = "wasm32")]
pub fn main() { }
diff --git a/tests/ui/cfg/diagnostics-not-a-def.stderr b/tests/ui/cfg/diagnostics-not-a-def.stderr
index af0e1a172..6941f850e 100644
--- a/tests/ui/cfg/diagnostics-not-a-def.stderr
+++ b/tests/ui/cfg/diagnostics-not-a-def.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find function `i_am_not` in module `inner`
LL | inner::i_am_not();
| ^^^^^^^^ not found in `inner`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/check-cfg/allow-same-level.stderr b/tests/ui/check-cfg/allow-same-level.stderr
index b0c459fab..7f0faa070 100644
--- a/tests/ui/check-cfg/allow-same-level.stderr
+++ b/tests/ui/check-cfg/allow-same-level.stderr
@@ -4,7 +4,9 @@ warning: unexpected `cfg` condition name: `FALSE`
LL | #[cfg(FALSE)]
| ^^^^^
|
- = help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+ = help: expected names are: `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+ = help: to expect this configuration use `--check-cfg=cfg(FALSE)`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted
diff --git a/tests/ui/check-cfg/cargo-feature.none.stderr b/tests/ui/check-cfg/cargo-feature.none.stderr
new file mode 100644
index 000000000..44c8f7e30
--- /dev/null
+++ b/tests/ui/check-cfg/cargo-feature.none.stderr
@@ -0,0 +1,31 @@
+warning: unexpected `cfg` condition name: `feature`
+ --> $DIR/cargo-feature.rs:13:7
+ |
+LL | #[cfg(feature = "serde")]
+ | ^^^^^^^^^^^^^^^^^
+ |
+ = help: consider defining some features in `Cargo.toml`
+ = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+ = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: unexpected `cfg` condition name: `tokio_unstable`
+ --> $DIR/cargo-feature.rs:18:7
+ |
+LL | #[cfg(tokio_unstable)]
+ | ^^^^^^^^^^^^^^
+ |
+ = help: expected names are: `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+ = help: consider using a Cargo feature instead or adding `println!("cargo:rustc-check-cfg=cfg(tokio_unstable)");` to the top of a `build.rs`
+ = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition name: `CONFIG_NVME`
+ --> $DIR/cargo-feature.rs:22:7
+ |
+LL | #[cfg(CONFIG_NVME = "m")]
+ | ^^^^^^^^^^^^^^^^^
+ |
+ = help: consider using a Cargo feature instead or adding `println!("cargo:rustc-check-cfg=cfg(CONFIG_NVME, values(\"m\"))");` to the top of a `build.rs`
+ = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+
+warning: 3 warnings emitted
+
diff --git a/tests/ui/check-cfg/cargo-feature.rs b/tests/ui/check-cfg/cargo-feature.rs
new file mode 100644
index 000000000..fe343d0a6
--- /dev/null
+++ b/tests/ui/check-cfg/cargo-feature.rs
@@ -0,0 +1,27 @@
+// This test checks that when no features are passed by Cargo we
+// suggest adding some in the Cargo.toml instead of vomitting a
+// list of all the expected names
+//
+// check-pass
+// revisions: some none
+// rustc-env:CARGO=/usr/bin/cargo
+// compile-flags: --check-cfg=cfg() -Z unstable-options
+// [some]compile-flags: --check-cfg=cfg(feature,values("bitcode"))
+// [some]compile-flags: --check-cfg=cfg(CONFIG_NVME,values("y"))
+// [none]error-pattern:Cargo.toml
+
+#[cfg(feature = "serde")]
+//[none]~^ WARNING unexpected `cfg` condition name
+//[some]~^^ WARNING unexpected `cfg` condition value
+fn ser() {}
+
+#[cfg(tokio_unstable)]
+//~^ WARNING unexpected `cfg` condition name
+fn tokio() {}
+
+#[cfg(CONFIG_NVME = "m")]
+//[none]~^ WARNING unexpected `cfg` condition name
+//[some]~^^ WARNING unexpected `cfg` condition value
+fn tokio() {}
+
+fn main() {}
diff --git a/tests/ui/check-cfg/cargo-feature.some.stderr b/tests/ui/check-cfg/cargo-feature.some.stderr
new file mode 100644
index 000000000..92d63d015
--- /dev/null
+++ b/tests/ui/check-cfg/cargo-feature.some.stderr
@@ -0,0 +1,35 @@
+warning: unexpected `cfg` condition value: `serde`
+ --> $DIR/cargo-feature.rs:13:7
+ |
+LL | #[cfg(feature = "serde")]
+ | ^^^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `feature` are: `bitcode`
+ = help: consider adding `serde` as a feature in `Cargo.toml`
+ = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+ = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: unexpected `cfg` condition name: `tokio_unstable`
+ --> $DIR/cargo-feature.rs:18:7
+ |
+LL | #[cfg(tokio_unstable)]
+ | ^^^^^^^^^^^^^^
+ |
+ = help: expected names are: `CONFIG_NVME`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+ = help: consider using a Cargo feature instead or adding `println!("cargo:rustc-check-cfg=cfg(tokio_unstable)");` to the top of a `build.rs`
+ = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `m`
+ --> $DIR/cargo-feature.rs:22:7
+ |
+LL | #[cfg(CONFIG_NVME = "m")]
+ | ^^^^^^^^^^^^^^---
+ | |
+ | help: there is a expected value with a similar name: `"y"`
+ |
+ = note: expected values for `CONFIG_NVME` are: `y`
+ = help: consider using a Cargo feature instead or adding `println!("cargo:rustc-check-cfg=cfg(CONFIG_NVME, values(\"m\"))");` to the top of a `build.rs`
+ = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+
+warning: 3 warnings emitted
+
diff --git a/tests/ui/check-cfg/compact-names.stderr b/tests/ui/check-cfg/compact-names.stderr
index b0228774b..dfa26f5dd 100644
--- a/tests/ui/check-cfg/compact-names.stderr
+++ b/tests/ui/check-cfg/compact-names.stderr
@@ -4,7 +4,9 @@ warning: unexpected `cfg` condition name: `target_architecture`
LL | #[cfg(target(os = "linux", architecture = "arm"))]
| ^^^^^^^^^^^^^^^^^^^^
|
- = help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+ = help: expected names are: `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+ = help: to expect this configuration use `--check-cfg=cfg(target_architecture, values("arm"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted
diff --git a/tests/ui/check-cfg/compact-values.rs b/tests/ui/check-cfg/compact-values.rs
index 13c072fe9..80cf75d27 100644
--- a/tests/ui/check-cfg/compact-values.rs
+++ b/tests/ui/check-cfg/compact-values.rs
@@ -8,7 +8,7 @@
#[cfg(target(os = "linux", arch = "arm"))]
pub fn expected() {}
-#[cfg(target(os = "linux", arch = "X"))]
+#[cfg(target(os = "linux", pointer_width = "X"))]
//~^ WARNING unexpected `cfg` condition value
pub fn unexpected() {}
diff --git a/tests/ui/check-cfg/compact-values.stderr b/tests/ui/check-cfg/compact-values.stderr
index bb2f4915b..10276af4d 100644
--- a/tests/ui/check-cfg/compact-values.stderr
+++ b/tests/ui/check-cfg/compact-values.stderr
@@ -1,10 +1,12 @@
warning: unexpected `cfg` condition value: `X`
--> $DIR/compact-values.rs:11:28
|
-LL | #[cfg(target(os = "linux", arch = "X"))]
- | ^^^^^^^^^^
+LL | #[cfg(target(os = "linux", pointer_width = "X"))]
+ | ^^^^^^^^^^^^^^^^^^^
|
- = note: expected values for `target_arch` are: `aarch64`, `arm`, `avr`, `bpf`, `csky`, `hexagon`, `loongarch64`, `m68k`, `mips`, `mips32r6`, `mips64`, `mips64r6`, `msp430`, `nvptx64`, `powerpc`, `powerpc64`, `riscv32`, `riscv64`, `s390x`, `sparc`, `sparc64`, `wasm32`, `wasm64`, `x86`, `x86_64`
+ = note: expected values for `target_pointer_width` are: `16`, `32`, `64`
+ = help: to expect this configuration use `--check-cfg=cfg(target_pointer_width, values("X"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted
diff --git a/tests/ui/check-cfg/concat-values.stderr b/tests/ui/check-cfg/concat-values.stderr
index da2bd7d6a..dec43f5bd 100644
--- a/tests/ui/check-cfg/concat-values.stderr
+++ b/tests/ui/check-cfg/concat-values.stderr
@@ -5,6 +5,8 @@ LL | #[cfg(my_cfg)]
| ^^^^^^
|
= note: expected values for `my_cfg` are: `bar`, `foo`
+ = help: to expect this configuration use `--check-cfg=cfg(my_cfg)`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `unk`
@@ -14,6 +16,8 @@ LL | #[cfg(my_cfg = "unk")]
| ^^^^^^^^^^^^^^
|
= note: expected values for `my_cfg` are: `bar`, `foo`
+ = help: to expect this configuration use `--check-cfg=cfg(my_cfg, values("unk"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: 2 warnings emitted
diff --git a/tests/ui/check-cfg/diagnotics.cargo.stderr b/tests/ui/check-cfg/diagnotics.cargo.stderr
new file mode 100644
index 000000000..05c52bf59
--- /dev/null
+++ b/tests/ui/check-cfg/diagnotics.cargo.stderr
@@ -0,0 +1,71 @@
+warning: unexpected `cfg` condition name: `featur`
+ --> $DIR/diagnotics.rs:7:7
+ |
+LL | #[cfg(featur)]
+ | ^^^^^^ help: there is a config with a similar name: `feature`
+ |
+ = help: expected values for `feature` are: `foo`
+ = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+ = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: unexpected `cfg` condition name: `featur`
+ --> $DIR/diagnotics.rs:11:7
+ |
+LL | #[cfg(featur = "foo")]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+help: there is a config with a similar name and value
+ |
+LL | #[cfg(feature = "foo")]
+ | ~~~~~~~
+
+warning: unexpected `cfg` condition name: `featur`
+ --> $DIR/diagnotics.rs:15:7
+ |
+LL | #[cfg(featur = "fo")]
+ | ^^^^^^^^^^^^^
+ |
+ = help: expected values for `feature` are: `foo`
+ = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+help: there is a config with a similar name and different values
+ |
+LL | #[cfg(feature = "foo")]
+ | ~~~~~~~~~~~~~~~
+
+warning: unexpected `cfg` condition name: `no_value`
+ --> $DIR/diagnotics.rs:22:7
+ |
+LL | #[cfg(no_value)]
+ | ^^^^^^^^ help: there is a config with a similar name: `no_values`
+ |
+ = help: consider using a Cargo feature instead or adding `println!("cargo:rustc-check-cfg=cfg(no_value)");` to the top of a `build.rs`
+ = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition name: `no_value`
+ --> $DIR/diagnotics.rs:26:7
+ |
+LL | #[cfg(no_value = "foo")]
+ | ^^^^^^^^^^^^^^^^
+ |
+ = help: consider using a Cargo feature instead or adding `println!("cargo:rustc-check-cfg=cfg(no_value, values(\"foo\"))");` to the top of a `build.rs`
+ = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+help: there is a config with a similar name and no value
+ |
+LL | #[cfg(no_values)]
+ | ~~~~~~~~~
+
+warning: unexpected `cfg` condition value: `bar`
+ --> $DIR/diagnotics.rs:30:7
+ |
+LL | #[cfg(no_values = "bar")]
+ | ^^^^^^^^^--------
+ | |
+ | help: remove the value
+ |
+ = note: no expected value for `no_values`
+ = help: consider using a Cargo feature instead or adding `println!("cargo:rustc-check-cfg=cfg(no_values, values(\"bar\"))");` to the top of a `build.rs`
+ = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+
+warning: 6 warnings emitted
+
diff --git a/tests/ui/check-cfg/diagnotics.rs b/tests/ui/check-cfg/diagnotics.rs
index 45875bddc..33073f05f 100644
--- a/tests/ui/check-cfg/diagnotics.rs
+++ b/tests/ui/check-cfg/diagnotics.rs
@@ -1,4 +1,7 @@
// check-pass
+// revisions: cargo rustc
+// [rustc]unset-rustc-env:CARGO
+// [cargo]rustc-env:CARGO=/usr/bin/cargo
// compile-flags: --check-cfg=cfg(feature,values("foo")) --check-cfg=cfg(no_values) -Z unstable-options
#[cfg(featur)]
diff --git a/tests/ui/check-cfg/diagnotics.rustc.stderr b/tests/ui/check-cfg/diagnotics.rustc.stderr
new file mode 100644
index 000000000..2b1129a39
--- /dev/null
+++ b/tests/ui/check-cfg/diagnotics.rustc.stderr
@@ -0,0 +1,74 @@
+warning: unexpected `cfg` condition name: `featur`
+ --> $DIR/diagnotics.rs:7:7
+ |
+LL | #[cfg(featur)]
+ | ^^^^^^ help: there is a config with a similar name: `feature`
+ |
+ = help: expected values for `feature` are: `foo`
+ = help: to expect this configuration use `--check-cfg=cfg(featur)`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+ = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: unexpected `cfg` condition name: `featur`
+ --> $DIR/diagnotics.rs:11:7
+ |
+LL | #[cfg(featur = "foo")]
+ | ^^^^^^^^^^^^^^
+ |
+ = help: to expect this configuration use `--check-cfg=cfg(featur, values("foo"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+help: there is a config with a similar name and value
+ |
+LL | #[cfg(feature = "foo")]
+ | ~~~~~~~
+
+warning: unexpected `cfg` condition name: `featur`
+ --> $DIR/diagnotics.rs:15:7
+ |
+LL | #[cfg(featur = "fo")]
+ | ^^^^^^^^^^^^^
+ |
+ = help: expected values for `feature` are: `foo`
+ = help: to expect this configuration use `--check-cfg=cfg(featur, values("fo"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+help: there is a config with a similar name and different values
+ |
+LL | #[cfg(feature = "foo")]
+ | ~~~~~~~~~~~~~~~
+
+warning: unexpected `cfg` condition name: `no_value`
+ --> $DIR/diagnotics.rs:22:7
+ |
+LL | #[cfg(no_value)]
+ | ^^^^^^^^ help: there is a config with a similar name: `no_values`
+ |
+ = help: to expect this configuration use `--check-cfg=cfg(no_value)`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition name: `no_value`
+ --> $DIR/diagnotics.rs:26:7
+ |
+LL | #[cfg(no_value = "foo")]
+ | ^^^^^^^^^^^^^^^^
+ |
+ = help: to expect this configuration use `--check-cfg=cfg(no_value, values("foo"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+help: there is a config with a similar name and no value
+ |
+LL | #[cfg(no_values)]
+ | ~~~~~~~~~
+
+warning: unexpected `cfg` condition value: `bar`
+ --> $DIR/diagnotics.rs:30:7
+ |
+LL | #[cfg(no_values = "bar")]
+ | ^^^^^^^^^--------
+ | |
+ | help: remove the value
+ |
+ = note: no expected value for `no_values`
+ = help: to expect this configuration use `--check-cfg=cfg(no_values, values("bar"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: 6 warnings emitted
+
diff --git a/tests/ui/check-cfg/diagnotics.stderr b/tests/ui/check-cfg/diagnotics.stderr
deleted file mode 100644
index 31c0db03a..000000000
--- a/tests/ui/check-cfg/diagnotics.stderr
+++ /dev/null
@@ -1,61 +0,0 @@
-warning: unexpected `cfg` condition name: `featur`
- --> $DIR/diagnotics.rs:4:7
- |
-LL | #[cfg(featur)]
- | ^^^^^^ help: there is a config with a similar name: `feature`
- |
- = help: expected values for `feature` are: `foo`
- = note: `#[warn(unexpected_cfgs)]` on by default
-
-warning: unexpected `cfg` condition name: `featur`
- --> $DIR/diagnotics.rs:8:7
- |
-LL | #[cfg(featur = "foo")]
- | ^^^^^^^^^^^^^^
- |
-help: there is a config with a similar name and value
- |
-LL | #[cfg(feature = "foo")]
- | ~~~~~~~
-
-warning: unexpected `cfg` condition name: `featur`
- --> $DIR/diagnotics.rs:12:7
- |
-LL | #[cfg(featur = "fo")]
- | ^^^^^^^^^^^^^
- |
- = help: expected values for `feature` are: `foo`
-help: there is a config with a similar name and different values
- |
-LL | #[cfg(feature = "foo")]
- | ~~~~~~~~~~~~~~~
-
-warning: unexpected `cfg` condition name: `no_value`
- --> $DIR/diagnotics.rs:19:7
- |
-LL | #[cfg(no_value)]
- | ^^^^^^^^ help: there is a config with a similar name: `no_values`
-
-warning: unexpected `cfg` condition name: `no_value`
- --> $DIR/diagnotics.rs:23:7
- |
-LL | #[cfg(no_value = "foo")]
- | ^^^^^^^^^^^^^^^^
- |
-help: there is a config with a similar name and no value
- |
-LL | #[cfg(no_values)]
- | ~~~~~~~~~
-
-warning: unexpected `cfg` condition value: `bar`
- --> $DIR/diagnotics.rs:27:7
- |
-LL | #[cfg(no_values = "bar")]
- | ^^^^^^^^^--------
- | |
- | help: remove the value
- |
- = note: no expected value for `no_values`
-
-warning: 6 warnings emitted
-
diff --git a/tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr b/tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr
index 53ccc0f4d..27af82120 100644
--- a/tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr
+++ b/tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr
@@ -1,14 +1,16 @@
warning: unexpected `cfg` condition name: `unknown_key`
- --> $DIR/exhaustive-names-values.rs:12:7
+ --> $DIR/exhaustive-names-values.rs:10:7
|
LL | #[cfg(unknown_key = "value")]
| ^^^^^^^^^^^^^^^^^^^^^
|
- = help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+ = help: expected names are: `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+ = help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `value`
- --> $DIR/exhaustive-names-values.rs:16:7
+ --> $DIR/exhaustive-names-values.rs:14:7
|
LL | #[cfg(test = "value")]
| ^^^^----------
@@ -16,10 +18,26 @@ LL | #[cfg(test = "value")]
| help: remove the value
|
= note: no expected value for `test`
+ = help: to expect this configuration use `--check-cfg=cfg(test, values("value"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
-warning: unexpected `empty_cfg` as condition name
+warning: unexpected `cfg` condition name: `feature`
+ --> $DIR/exhaustive-names-values.rs:18:7
|
- = help: was set with `--cfg` but isn't in the `--check-cfg` expected names
+LL | #[cfg(feature = "unk")]
+ | ^^^^^^^^^^^^^^^
+ |
+ = help: to expect this configuration use `--check-cfg=cfg(feature, values("unk"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition name: `feature`
+ --> $DIR/exhaustive-names-values.rs:25:7
+ |
+LL | #[cfg(feature = "std")]
+ | ^^^^^^^^^^^^^^^
+ |
+ = help: to expect this configuration use `--check-cfg=cfg(feature, values("std"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
-warning: 3 warnings emitted
+warning: 4 warnings emitted
diff --git a/tests/ui/check-cfg/exhaustive-names-values.empty_names_values.stderr b/tests/ui/check-cfg/exhaustive-names-values.empty_names_values.stderr
deleted file mode 100644
index 5e8b74054..000000000
--- a/tests/ui/check-cfg/exhaustive-names-values.empty_names_values.stderr
+++ /dev/null
@@ -1,25 +0,0 @@
-warning: unexpected `cfg` condition name: `unknown_key`
- --> $DIR/exhaustive-names-values.rs:12:7
- |
-LL | #[cfg(unknown_key = "value")]
- | ^^^^^^^^^^^^^^^^^^^^^
- |
- = help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
- = note: `#[warn(unexpected_cfgs)]` on by default
-
-warning: unexpected `cfg` condition value: `value`
- --> $DIR/exhaustive-names-values.rs:16:7
- |
-LL | #[cfg(test = "value")]
- | ^^^^----------
- | |
- | help: remove the value
- |
- = note: no expected value for `test`
-
-warning: unexpected `empty_names_values` as condition name
- |
- = help: was set with `--cfg` but isn't in the `--check-cfg` expected names
-
-warning: 3 warnings emitted
-
diff --git a/tests/ui/check-cfg/exhaustive-names-values.feature.stderr b/tests/ui/check-cfg/exhaustive-names-values.feature.stderr
index 7705a665e..a5aa80ef8 100644
--- a/tests/ui/check-cfg/exhaustive-names-values.feature.stderr
+++ b/tests/ui/check-cfg/exhaustive-names-values.feature.stderr
@@ -1,14 +1,16 @@
warning: unexpected `cfg` condition name: `unknown_key`
- --> $DIR/exhaustive-names-values.rs:12:7
+ --> $DIR/exhaustive-names-values.rs:10:7
|
LL | #[cfg(unknown_key = "value")]
| ^^^^^^^^^^^^^^^^^^^^^
|
- = help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+ = help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+ = help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `value`
- --> $DIR/exhaustive-names-values.rs:16:7
+ --> $DIR/exhaustive-names-values.rs:14:7
|
LL | #[cfg(test = "value")]
| ^^^^----------
@@ -16,18 +18,18 @@ LL | #[cfg(test = "value")]
| help: remove the value
|
= note: no expected value for `test`
+ = help: to expect this configuration use `--check-cfg=cfg(test, values("value"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `unk`
- --> $DIR/exhaustive-names-values.rs:20:7
+ --> $DIR/exhaustive-names-values.rs:18:7
|
LL | #[cfg(feature = "unk")]
| ^^^^^^^^^^^^^^^
|
= note: expected values for `feature` are: `std`
+ = help: to expect this configuration use `--check-cfg=cfg(feature, values("unk"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
-warning: unexpected condition value `` for condition name `feature`
- |
- = help: was set with `--cfg` but isn't in the `--check-cfg` expected values
-
-warning: 4 warnings emitted
+warning: 3 warnings emitted
diff --git a/tests/ui/check-cfg/exhaustive-names-values.full.stderr b/tests/ui/check-cfg/exhaustive-names-values.full.stderr
index f0224a2e3..a5aa80ef8 100644
--- a/tests/ui/check-cfg/exhaustive-names-values.full.stderr
+++ b/tests/ui/check-cfg/exhaustive-names-values.full.stderr
@@ -1,14 +1,16 @@
warning: unexpected `cfg` condition name: `unknown_key`
- --> $DIR/exhaustive-names-values.rs:12:7
+ --> $DIR/exhaustive-names-values.rs:10:7
|
LL | #[cfg(unknown_key = "value")]
| ^^^^^^^^^^^^^^^^^^^^^
|
- = help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+ = help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+ = help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `value`
- --> $DIR/exhaustive-names-values.rs:16:7
+ --> $DIR/exhaustive-names-values.rs:14:7
|
LL | #[cfg(test = "value")]
| ^^^^----------
@@ -16,18 +18,18 @@ LL | #[cfg(test = "value")]
| help: remove the value
|
= note: no expected value for `test`
+ = help: to expect this configuration use `--check-cfg=cfg(test, values("value"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `unk`
- --> $DIR/exhaustive-names-values.rs:20:7
+ --> $DIR/exhaustive-names-values.rs:18:7
|
LL | #[cfg(feature = "unk")]
| ^^^^^^^^^^^^^^^
|
= note: expected values for `feature` are: `std`
+ = help: to expect this configuration use `--check-cfg=cfg(feature, values("unk"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
-warning: unexpected `full` as condition name
- |
- = help: was set with `--cfg` but isn't in the `--check-cfg` expected names
-
-warning: 4 warnings emitted
+warning: 3 warnings emitted
diff --git a/tests/ui/check-cfg/exhaustive-names-values.rs b/tests/ui/check-cfg/exhaustive-names-values.rs
index f553d93ca..956992a1e 100644
--- a/tests/ui/check-cfg/exhaustive-names-values.rs
+++ b/tests/ui/check-cfg/exhaustive-names-values.rs
@@ -1,10 +1,8 @@
-// Check warning for unexpected cfg in the code and in the CLI
-// arguments (here the revision cfg).
+// Check warning for unexpected cfg in the code.
//
// check-pass
-// revisions: empty_names_values empty_cfg feature full
+// revisions: empty_cfg feature full
// compile-flags: -Z unstable-options
-// [empty_names_values]compile-flags: --check-cfg=names() --check-cfg=values()
// [empty_cfg]compile-flags: --check-cfg=cfg()
// [feature]compile-flags: --check-cfg=cfg(feature,values("std"))
// [full]compile-flags: --check-cfg=cfg(feature,values("std")) --check-cfg=cfg()
@@ -18,11 +16,15 @@ pub fn f() {}
pub fn f() {}
#[cfg(feature = "unk")]
-//[feature]~^ WARNING unexpected `cfg` condition value
-//[full]~^^ WARNING unexpected `cfg` condition value
+//[empty_names_values]~^ WARNING unexpected `cfg` condition name
+//[empty_cfg]~^^ WARNING unexpected `cfg` condition name
+//[feature]~^^^ WARNING unexpected `cfg` condition value
+//[full]~^^^^ WARNING unexpected `cfg` condition value
pub fn feat() {}
#[cfg(feature = "std")]
+//[empty_names_values]~^ WARNING unexpected `cfg` condition name
+//[empty_cfg]~^^ WARNING unexpected `cfg` condition name
pub fn feat() {}
#[cfg(windows)]
diff --git a/tests/ui/check-cfg/exhaustive-names.empty_names.stderr b/tests/ui/check-cfg/exhaustive-names.empty_names.stderr
deleted file mode 100644
index 6190ff714..000000000
--- a/tests/ui/check-cfg/exhaustive-names.empty_names.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-warning: unexpected `cfg` condition name: `unknown_key`
- --> $DIR/exhaustive-names.rs:8:7
- |
-LL | #[cfg(unknown_key = "value")]
- | ^^^^^^^^^^^^^^^^^^^^^
- |
- = help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
- = note: `#[warn(unexpected_cfgs)]` on by default
-
-warning: unexpected `empty_names` as condition name
- |
- = help: was set with `--cfg` but isn't in the `--check-cfg` expected names
-
-warning: 2 warnings emitted
-
diff --git a/tests/ui/check-cfg/exhaustive-names.exhaustive_names.stderr b/tests/ui/check-cfg/exhaustive-names.exhaustive_names.stderr
deleted file mode 100644
index f338434cd..000000000
--- a/tests/ui/check-cfg/exhaustive-names.exhaustive_names.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-warning: unexpected `cfg` condition name: `unknown_key`
- --> $DIR/exhaustive-names.rs:8:7
- |
-LL | #[cfg(unknown_key = "value")]
- | ^^^^^^^^^^^^^^^^^^^^^
- |
- = help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
- = note: `#[warn(unexpected_cfgs)]` on by default
-
-warning: unexpected `exhaustive_names` as condition name
- |
- = help: was set with `--cfg` but isn't in the `--check-cfg` expected names
-
-warning: 2 warnings emitted
-
diff --git a/tests/ui/check-cfg/exhaustive-names.rs b/tests/ui/check-cfg/exhaustive-names.rs
index b86a7f84e..806680206 100644
--- a/tests/ui/check-cfg/exhaustive-names.rs
+++ b/tests/ui/check-cfg/exhaustive-names.rs
@@ -1,9 +1,7 @@
// Check warning for unexpected cfg
//
// check-pass
-// revisions: empty_names exhaustive_names
-// [empty_names]compile-flags: --check-cfg=names() -Z unstable-options
-// [exhaustive_names]compile-flags: --check-cfg=cfg() -Z unstable-options
+// compile-flags: --check-cfg=cfg() -Z unstable-options
#[cfg(unknown_key = "value")]
//~^ WARNING unexpected `cfg` condition name
diff --git a/tests/ui/check-cfg/exhaustive-names.stderr b/tests/ui/check-cfg/exhaustive-names.stderr
new file mode 100644
index 000000000..cfac28cd9
--- /dev/null
+++ b/tests/ui/check-cfg/exhaustive-names.stderr
@@ -0,0 +1,13 @@
+warning: unexpected `cfg` condition name: `unknown_key`
+ --> $DIR/exhaustive-names.rs:6:7
+ |
+LL | #[cfg(unknown_key = "value")]
+ | ^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: expected names are: `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+ = help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+ = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/check-cfg/exhaustive-values.empty_cfg.stderr b/tests/ui/check-cfg/exhaustive-values.empty_cfg.stderr
index 999b27028..0a7bd81b8 100644
--- a/tests/ui/check-cfg/exhaustive-values.empty_cfg.stderr
+++ b/tests/ui/check-cfg/exhaustive-values.empty_cfg.stderr
@@ -1,5 +1,5 @@
warning: unexpected `cfg` condition value: `value`
- --> $DIR/exhaustive-values.rs:9:7
+ --> $DIR/exhaustive-values.rs:8:7
|
LL | #[cfg(test = "value")]
| ^^^^----------
@@ -7,11 +7,9 @@ LL | #[cfg(test = "value")]
| help: remove the value
|
= note: no expected value for `test`
+ = help: to expect this configuration use `--check-cfg=cfg(test, values("value"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
-warning: unexpected `empty_cfg` as condition name
- |
- = help: was set with `--cfg` but isn't in the `--check-cfg` expected names
-
-warning: 2 warnings emitted
+warning: 1 warning emitted
diff --git a/tests/ui/check-cfg/exhaustive-values.empty_values.stderr b/tests/ui/check-cfg/exhaustive-values.empty_values.stderr
deleted file mode 100644
index 77ddc3510..000000000
--- a/tests/ui/check-cfg/exhaustive-values.empty_values.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-warning: unexpected `cfg` condition value: `value`
- --> $DIR/exhaustive-values.rs:9:7
- |
-LL | #[cfg(test = "value")]
- | ^^^^----------
- | |
- | help: remove the value
- |
- = note: no expected value for `test`
- = note: `#[warn(unexpected_cfgs)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/check-cfg/exhaustive-values.rs b/tests/ui/check-cfg/exhaustive-values.rs
index 8a1689ba8..430d3b89e 100644
--- a/tests/ui/check-cfg/exhaustive-values.rs
+++ b/tests/ui/check-cfg/exhaustive-values.rs
@@ -1,8 +1,7 @@
// Check warning for unexpected cfg value
//
// check-pass
-// revisions: empty_values empty_cfg without_names
-// [empty_values]compile-flags: --check-cfg=values() -Z unstable-options
+// revisions: empty_cfg without_names
// [empty_cfg]compile-flags: --check-cfg=cfg() -Z unstable-options
// [without_names]compile-flags: --check-cfg=cfg(any()) -Z unstable-options
diff --git a/tests/ui/check-cfg/exhaustive-values.without_names.stderr b/tests/ui/check-cfg/exhaustive-values.without_names.stderr
index 77ddc3510..0a7bd81b8 100644
--- a/tests/ui/check-cfg/exhaustive-values.without_names.stderr
+++ b/tests/ui/check-cfg/exhaustive-values.without_names.stderr
@@ -1,5 +1,5 @@
warning: unexpected `cfg` condition value: `value`
- --> $DIR/exhaustive-values.rs:9:7
+ --> $DIR/exhaustive-values.rs:8:7
|
LL | #[cfg(test = "value")]
| ^^^^----------
@@ -7,6 +7,8 @@ LL | #[cfg(test = "value")]
| help: remove the value
|
= note: no expected value for `test`
+ = help: to expect this configuration use `--check-cfg=cfg(test, values("value"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted
diff --git a/tests/ui/check-cfg/invalid-arguments.names_simple_ident.stderr b/tests/ui/check-cfg/invalid-arguments.names_simple_ident.stderr
deleted file mode 100644
index 8fadcc1f9..000000000
--- a/tests/ui/check-cfg/invalid-arguments.names_simple_ident.stderr
+++ /dev/null
@@ -1,2 +0,0 @@
-error: invalid `--check-cfg` argument: `names("NOT_IDENT")` (`names()` arguments must be simple identifiers)
-
diff --git a/tests/ui/check-cfg/invalid-arguments.rs b/tests/ui/check-cfg/invalid-arguments.rs
index a56f48e0a..90c62fa38 100644
--- a/tests/ui/check-cfg/invalid-arguments.rs
+++ b/tests/ui/check-cfg/invalid-arguments.rs
@@ -1,7 +1,7 @@
// Check that invalid --check-cfg are rejected
//
// check-fail
-// revisions: anything_else names_simple_ident values_simple_ident values_string_literals
+// revisions: anything_else
// revisions: string_for_name_1 string_for_name_2 multiple_any multiple_values
// revisions: multiple_values_any not_empty_any not_empty_values_any
// revisions: values_any_missing_values values_any_before_ident ident_in_values_1
@@ -10,9 +10,6 @@
//
// compile-flags: -Z unstable-options
// [anything_else]compile-flags: --check-cfg=anything_else(...)
-// [names_simple_ident]compile-flags: --check-cfg=names("NOT_IDENT")
-// [values_simple_ident]compile-flags: --check-cfg=values("NOT_IDENT")
-// [values_string_literals]compile-flags: --check-cfg=values(test,12)
// [string_for_name_1]compile-flags: --check-cfg=cfg("NOT_IDENT")
// [string_for_name_2]compile-flags: --check-cfg=cfg(foo,"NOT_IDENT",bar)
// [multiple_any]compile-flags: --check-cfg=cfg(any(),any())
diff --git a/tests/ui/check-cfg/invalid-arguments.values_simple_ident.stderr b/tests/ui/check-cfg/invalid-arguments.values_simple_ident.stderr
deleted file mode 100644
index 061d3f0e9..000000000
--- a/tests/ui/check-cfg/invalid-arguments.values_simple_ident.stderr
+++ /dev/null
@@ -1,2 +0,0 @@
-error: invalid `--check-cfg` argument: `values("NOT_IDENT")` (`values()` first argument must be a simple identifier)
-
diff --git a/tests/ui/check-cfg/invalid-arguments.values_string_literals.stderr b/tests/ui/check-cfg/invalid-arguments.values_string_literals.stderr
deleted file mode 100644
index 5853b4741..000000000
--- a/tests/ui/check-cfg/invalid-arguments.values_string_literals.stderr
+++ /dev/null
@@ -1,2 +0,0 @@
-error: invalid `--check-cfg` argument: `values(test,12)` (`values()` arguments must be string literals)
-
diff --git a/tests/ui/check-cfg/mix.cfg.stderr b/tests/ui/check-cfg/mix.cfg.stderr
deleted file mode 100644
index daa200440..000000000
--- a/tests/ui/check-cfg/mix.cfg.stderr
+++ /dev/null
@@ -1,192 +0,0 @@
-warning: unexpected `cfg` condition name: `widnows`
- --> $DIR/mix.rs:15:7
- |
-LL | #[cfg(widnows)]
- | ^^^^^^^ help: there is a config with a similar name: `windows`
- |
- = note: `#[warn(unexpected_cfgs)]` on by default
-
-warning: unexpected `cfg` condition value: (none)
- --> $DIR/mix.rs:19:7
- |
-LL | #[cfg(feature)]
- | ^^^^^^^- help: specify a config value: `= "foo"`
- |
- = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition value: `bar`
- --> $DIR/mix.rs:26:7
- |
-LL | #[cfg(feature = "bar")]
- | ^^^^^^^^^^^^^^^
- |
- = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition value: `zebra`
- --> $DIR/mix.rs:30:7
- |
-LL | #[cfg(feature = "zebra")]
- | ^^^^^^^^^^^^^^^^^
- |
- = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition name: `uu`
- --> $DIR/mix.rs:34:12
- |
-LL | #[cfg_attr(uu, test)]
- | ^^
- |
- = help: expected names are: `cfg`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `names_values`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
-
-warning: unexpected condition value `bar` for condition name `feature`
- |
- = help: was set with `--cfg` but isn't in the `--check-cfg` expected values
-
-warning: unexpected `unknown_name` as condition name
- |
- = help: was set with `--cfg` but isn't in the `--check-cfg` expected names
-
-warning: unexpected `cfg` condition name: `widnows`
- --> $DIR/mix.rs:43:10
- |
-LL | cfg!(widnows);
- | ^^^^^^^ help: there is a config with a similar name: `windows`
-
-warning: unexpected `cfg` condition value: `bar`
- --> $DIR/mix.rs:46:10
- |
-LL | cfg!(feature = "bar");
- | ^^^^^^^^^^^^^^^
- |
- = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition value: `zebra`
- --> $DIR/mix.rs:48:10
- |
-LL | cfg!(feature = "zebra");
- | ^^^^^^^^^^^^^^^^^
- |
- = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition name: `xxx`
- --> $DIR/mix.rs:50:10
- |
-LL | cfg!(xxx = "foo");
- | ^^^^^^^^^^^
-
-warning: unexpected `cfg` condition name: `xxx`
- --> $DIR/mix.rs:52:10
- |
-LL | cfg!(xxx);
- | ^^^
-
-warning: unexpected `cfg` condition name: `xxx`
- --> $DIR/mix.rs:54:14
- |
-LL | cfg!(any(xxx, windows));
- | ^^^
-
-warning: unexpected `cfg` condition value: `bad`
- --> $DIR/mix.rs:56:14
- |
-LL | cfg!(any(feature = "bad", windows));
- | ^^^^^^^^^^^^^^^
- |
- = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition name: `xxx`
- --> $DIR/mix.rs:58:23
- |
-LL | cfg!(any(windows, xxx));
- | ^^^
-
-warning: unexpected `cfg` condition name: `xxx`
- --> $DIR/mix.rs:60:20
- |
-LL | cfg!(all(unix, xxx));
- | ^^^
-
-warning: unexpected `cfg` condition name: `aa`
- --> $DIR/mix.rs:62:14
- |
-LL | cfg!(all(aa, bb));
- | ^^
-
-warning: unexpected `cfg` condition name: `bb`
- --> $DIR/mix.rs:62:18
- |
-LL | cfg!(all(aa, bb));
- | ^^
-
-warning: unexpected `cfg` condition name: `aa`
- --> $DIR/mix.rs:65:14
- |
-LL | cfg!(any(aa, bb));
- | ^^
-
-warning: unexpected `cfg` condition name: `bb`
- --> $DIR/mix.rs:65:18
- |
-LL | cfg!(any(aa, bb));
- | ^^
-
-warning: unexpected `cfg` condition value: `zebra`
- --> $DIR/mix.rs:68:20
- |
-LL | cfg!(any(unix, feature = "zebra"));
- | ^^^^^^^^^^^^^^^^^
- |
- = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition name: `xxx`
- --> $DIR/mix.rs:70:14
- |
-LL | cfg!(any(xxx, feature = "zebra"));
- | ^^^
-
-warning: unexpected `cfg` condition value: `zebra`
- --> $DIR/mix.rs:70:19
- |
-LL | cfg!(any(xxx, feature = "zebra"));
- | ^^^^^^^^^^^^^^^^^
- |
- = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition name: `xxx`
- --> $DIR/mix.rs:73:14
- |
-LL | cfg!(any(xxx, unix, xxx));
- | ^^^
-
-warning: unexpected `cfg` condition name: `xxx`
- --> $DIR/mix.rs:73:25
- |
-LL | cfg!(any(xxx, unix, xxx));
- | ^^^
-
-warning: unexpected `cfg` condition value: `zebra`
- --> $DIR/mix.rs:76:14
- |
-LL | cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
- | ^^^^^^^^^^^^^^^^^
- |
- = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition value: `zebra`
- --> $DIR/mix.rs:76:33
- |
-LL | cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
- | ^^^^^^^^^^^^^^^^^
- |
- = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition value: `zebra`
- --> $DIR/mix.rs:76:52
- |
-LL | cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
- | ^^^^^^^^^^^^^^^^^
- |
- = note: expected values for `feature` are: `foo`
-
-warning: 28 warnings emitted
-
diff --git a/tests/ui/check-cfg/mix.names_values.stderr b/tests/ui/check-cfg/mix.names_values.stderr
deleted file mode 100644
index daa200440..000000000
--- a/tests/ui/check-cfg/mix.names_values.stderr
+++ /dev/null
@@ -1,192 +0,0 @@
-warning: unexpected `cfg` condition name: `widnows`
- --> $DIR/mix.rs:15:7
- |
-LL | #[cfg(widnows)]
- | ^^^^^^^ help: there is a config with a similar name: `windows`
- |
- = note: `#[warn(unexpected_cfgs)]` on by default
-
-warning: unexpected `cfg` condition value: (none)
- --> $DIR/mix.rs:19:7
- |
-LL | #[cfg(feature)]
- | ^^^^^^^- help: specify a config value: `= "foo"`
- |
- = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition value: `bar`
- --> $DIR/mix.rs:26:7
- |
-LL | #[cfg(feature = "bar")]
- | ^^^^^^^^^^^^^^^
- |
- = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition value: `zebra`
- --> $DIR/mix.rs:30:7
- |
-LL | #[cfg(feature = "zebra")]
- | ^^^^^^^^^^^^^^^^^
- |
- = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition name: `uu`
- --> $DIR/mix.rs:34:12
- |
-LL | #[cfg_attr(uu, test)]
- | ^^
- |
- = help: expected names are: `cfg`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `names_values`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
-
-warning: unexpected condition value `bar` for condition name `feature`
- |
- = help: was set with `--cfg` but isn't in the `--check-cfg` expected values
-
-warning: unexpected `unknown_name` as condition name
- |
- = help: was set with `--cfg` but isn't in the `--check-cfg` expected names
-
-warning: unexpected `cfg` condition name: `widnows`
- --> $DIR/mix.rs:43:10
- |
-LL | cfg!(widnows);
- | ^^^^^^^ help: there is a config with a similar name: `windows`
-
-warning: unexpected `cfg` condition value: `bar`
- --> $DIR/mix.rs:46:10
- |
-LL | cfg!(feature = "bar");
- | ^^^^^^^^^^^^^^^
- |
- = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition value: `zebra`
- --> $DIR/mix.rs:48:10
- |
-LL | cfg!(feature = "zebra");
- | ^^^^^^^^^^^^^^^^^
- |
- = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition name: `xxx`
- --> $DIR/mix.rs:50:10
- |
-LL | cfg!(xxx = "foo");
- | ^^^^^^^^^^^
-
-warning: unexpected `cfg` condition name: `xxx`
- --> $DIR/mix.rs:52:10
- |
-LL | cfg!(xxx);
- | ^^^
-
-warning: unexpected `cfg` condition name: `xxx`
- --> $DIR/mix.rs:54:14
- |
-LL | cfg!(any(xxx, windows));
- | ^^^
-
-warning: unexpected `cfg` condition value: `bad`
- --> $DIR/mix.rs:56:14
- |
-LL | cfg!(any(feature = "bad", windows));
- | ^^^^^^^^^^^^^^^
- |
- = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition name: `xxx`
- --> $DIR/mix.rs:58:23
- |
-LL | cfg!(any(windows, xxx));
- | ^^^
-
-warning: unexpected `cfg` condition name: `xxx`
- --> $DIR/mix.rs:60:20
- |
-LL | cfg!(all(unix, xxx));
- | ^^^
-
-warning: unexpected `cfg` condition name: `aa`
- --> $DIR/mix.rs:62:14
- |
-LL | cfg!(all(aa, bb));
- | ^^
-
-warning: unexpected `cfg` condition name: `bb`
- --> $DIR/mix.rs:62:18
- |
-LL | cfg!(all(aa, bb));
- | ^^
-
-warning: unexpected `cfg` condition name: `aa`
- --> $DIR/mix.rs:65:14
- |
-LL | cfg!(any(aa, bb));
- | ^^
-
-warning: unexpected `cfg` condition name: `bb`
- --> $DIR/mix.rs:65:18
- |
-LL | cfg!(any(aa, bb));
- | ^^
-
-warning: unexpected `cfg` condition value: `zebra`
- --> $DIR/mix.rs:68:20
- |
-LL | cfg!(any(unix, feature = "zebra"));
- | ^^^^^^^^^^^^^^^^^
- |
- = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition name: `xxx`
- --> $DIR/mix.rs:70:14
- |
-LL | cfg!(any(xxx, feature = "zebra"));
- | ^^^
-
-warning: unexpected `cfg` condition value: `zebra`
- --> $DIR/mix.rs:70:19
- |
-LL | cfg!(any(xxx, feature = "zebra"));
- | ^^^^^^^^^^^^^^^^^
- |
- = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition name: `xxx`
- --> $DIR/mix.rs:73:14
- |
-LL | cfg!(any(xxx, unix, xxx));
- | ^^^
-
-warning: unexpected `cfg` condition name: `xxx`
- --> $DIR/mix.rs:73:25
- |
-LL | cfg!(any(xxx, unix, xxx));
- | ^^^
-
-warning: unexpected `cfg` condition value: `zebra`
- --> $DIR/mix.rs:76:14
- |
-LL | cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
- | ^^^^^^^^^^^^^^^^^
- |
- = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition value: `zebra`
- --> $DIR/mix.rs:76:33
- |
-LL | cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
- | ^^^^^^^^^^^^^^^^^
- |
- = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition value: `zebra`
- --> $DIR/mix.rs:76:52
- |
-LL | cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
- | ^^^^^^^^^^^^^^^^^
- |
- = note: expected values for `feature` are: `foo`
-
-warning: 28 warnings emitted
-
diff --git a/tests/ui/check-cfg/mix.rs b/tests/ui/check-cfg/mix.rs
index d7b3b4953..a6c3efee6 100644
--- a/tests/ui/check-cfg/mix.rs
+++ b/tests/ui/check-cfg/mix.rs
@@ -1,13 +1,10 @@
-// This test checks the combination of well known names, their activation via names(),
-// the usage of values(), and that no implicit is done with --cfg while also testing that
+// This test checks the combination of well known names, the usage of cfg(),
+// and that no implicit cfgs is added from --cfg while also testing that
// we correctly lint on the `cfg!` macro and `cfg_attr` attribute.
//
// check-pass
-// revisions: names_values cfg
// compile-flags: --cfg feature="bar" --cfg unknown_name -Z unstable-options
-// compile-flags: --check-cfg=cfg(names_values,cfg)
-// [names_values]compile-flags: --check-cfg=names() --check-cfg=values(feature,"foo")
-// [cfg]compile-flags: --check-cfg=cfg(feature,values("foo"))
+// compile-flags: --check-cfg=cfg(feature,values("foo"))
#[cfg(windows)]
fn do_windows_stuff() {}
diff --git a/tests/ui/check-cfg/mix.stderr b/tests/ui/check-cfg/mix.stderr
new file mode 100644
index 000000000..39660a2fd
--- /dev/null
+++ b/tests/ui/check-cfg/mix.stderr
@@ -0,0 +1,249 @@
+warning: unexpected `cfg` condition name: `widnows`
+ --> $DIR/mix.rs:12:7
+ |
+LL | #[cfg(widnows)]
+ | ^^^^^^^ help: there is a config with a similar name: `windows`
+ |
+ = help: to expect this configuration use `--check-cfg=cfg(widnows)`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+ = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: unexpected `cfg` condition value: (none)
+ --> $DIR/mix.rs:16:7
+ |
+LL | #[cfg(feature)]
+ | ^^^^^^^- help: specify a config value: `= "foo"`
+ |
+ = note: expected values for `feature` are: `foo`
+ = help: to expect this configuration use `--check-cfg=cfg(feature)`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `bar`
+ --> $DIR/mix.rs:23:7
+ |
+LL | #[cfg(feature = "bar")]
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `feature` are: `foo`
+ = help: to expect this configuration use `--check-cfg=cfg(feature, values("bar"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `zebra`
+ --> $DIR/mix.rs:27:7
+ |
+LL | #[cfg(feature = "zebra")]
+ | ^^^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `feature` are: `foo`
+ = help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition name: `uu`
+ --> $DIR/mix.rs:31:12
+ |
+LL | #[cfg_attr(uu, test)]
+ | ^^
+ |
+ = help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+ = help: to expect this configuration use `--check-cfg=cfg(uu)`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition name: `widnows`
+ --> $DIR/mix.rs:40:10
+ |
+LL | cfg!(widnows);
+ | ^^^^^^^ help: there is a config with a similar name: `windows`
+ |
+ = help: to expect this configuration use `--check-cfg=cfg(widnows)`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `bar`
+ --> $DIR/mix.rs:43:10
+ |
+LL | cfg!(feature = "bar");
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `feature` are: `foo`
+ = help: to expect this configuration use `--check-cfg=cfg(feature, values("bar"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `zebra`
+ --> $DIR/mix.rs:45:10
+ |
+LL | cfg!(feature = "zebra");
+ | ^^^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `feature` are: `foo`
+ = help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition name: `xxx`
+ --> $DIR/mix.rs:47:10
+ |
+LL | cfg!(xxx = "foo");
+ | ^^^^^^^^^^^
+ |
+ = help: to expect this configuration use `--check-cfg=cfg(xxx, values("foo"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition name: `xxx`
+ --> $DIR/mix.rs:49:10
+ |
+LL | cfg!(xxx);
+ | ^^^
+ |
+ = help: to expect this configuration use `--check-cfg=cfg(xxx)`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition name: `xxx`
+ --> $DIR/mix.rs:51:14
+ |
+LL | cfg!(any(xxx, windows));
+ | ^^^
+ |
+ = help: to expect this configuration use `--check-cfg=cfg(xxx)`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `bad`
+ --> $DIR/mix.rs:53:14
+ |
+LL | cfg!(any(feature = "bad", windows));
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `feature` are: `foo`
+ = help: to expect this configuration use `--check-cfg=cfg(feature, values("bad"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition name: `xxx`
+ --> $DIR/mix.rs:55:23
+ |
+LL | cfg!(any(windows, xxx));
+ | ^^^
+ |
+ = help: to expect this configuration use `--check-cfg=cfg(xxx)`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition name: `xxx`
+ --> $DIR/mix.rs:57:20
+ |
+LL | cfg!(all(unix, xxx));
+ | ^^^
+ |
+ = help: to expect this configuration use `--check-cfg=cfg(xxx)`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition name: `aa`
+ --> $DIR/mix.rs:59:14
+ |
+LL | cfg!(all(aa, bb));
+ | ^^
+ |
+ = help: to expect this configuration use `--check-cfg=cfg(aa)`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition name: `bb`
+ --> $DIR/mix.rs:59:18
+ |
+LL | cfg!(all(aa, bb));
+ | ^^
+ |
+ = help: to expect this configuration use `--check-cfg=cfg(bb)`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition name: `aa`
+ --> $DIR/mix.rs:62:14
+ |
+LL | cfg!(any(aa, bb));
+ | ^^
+ |
+ = help: to expect this configuration use `--check-cfg=cfg(aa)`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition name: `bb`
+ --> $DIR/mix.rs:62:18
+ |
+LL | cfg!(any(aa, bb));
+ | ^^
+ |
+ = help: to expect this configuration use `--check-cfg=cfg(bb)`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `zebra`
+ --> $DIR/mix.rs:65:20
+ |
+LL | cfg!(any(unix, feature = "zebra"));
+ | ^^^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `feature` are: `foo`
+ = help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition name: `xxx`
+ --> $DIR/mix.rs:67:14
+ |
+LL | cfg!(any(xxx, feature = "zebra"));
+ | ^^^
+ |
+ = help: to expect this configuration use `--check-cfg=cfg(xxx)`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `zebra`
+ --> $DIR/mix.rs:67:19
+ |
+LL | cfg!(any(xxx, feature = "zebra"));
+ | ^^^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `feature` are: `foo`
+ = help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition name: `xxx`
+ --> $DIR/mix.rs:70:14
+ |
+LL | cfg!(any(xxx, unix, xxx));
+ | ^^^
+ |
+ = help: to expect this configuration use `--check-cfg=cfg(xxx)`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition name: `xxx`
+ --> $DIR/mix.rs:70:25
+ |
+LL | cfg!(any(xxx, unix, xxx));
+ | ^^^
+ |
+ = help: to expect this configuration use `--check-cfg=cfg(xxx)`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `zebra`
+ --> $DIR/mix.rs:73:14
+ |
+LL | cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
+ | ^^^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `feature` are: `foo`
+ = help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `zebra`
+ --> $DIR/mix.rs:73:33
+ |
+LL | cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
+ | ^^^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `feature` are: `foo`
+ = help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `zebra`
+ --> $DIR/mix.rs:73:52
+ |
+LL | cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
+ | ^^^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `feature` are: `foo`
+ = help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: 26 warnings emitted
+
diff --git a/tests/ui/check-cfg/no-expected-values.empty.stderr b/tests/ui/check-cfg/no-expected-values.empty.stderr
index 5d261b2a5..ae55c95c0 100644
--- a/tests/ui/check-cfg/no-expected-values.empty.stderr
+++ b/tests/ui/check-cfg/no-expected-values.empty.stderr
@@ -1,5 +1,5 @@
warning: unexpected `cfg` condition value: `foo`
- --> $DIR/no-expected-values.rs:12:7
+ --> $DIR/no-expected-values.rs:11:7
|
LL | #[cfg(feature = "foo")]
| ^^^^^^^--------
@@ -7,10 +7,12 @@ LL | #[cfg(feature = "foo")]
| help: remove the value
|
= note: no expected value for `feature`
+ = help: to expect this configuration use `--check-cfg=cfg(feature, values("foo"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `foo`
- --> $DIR/no-expected-values.rs:16:7
+ --> $DIR/no-expected-values.rs:15:7
|
LL | #[cfg(test = "foo")]
| ^^^^--------
@@ -18,6 +20,8 @@ LL | #[cfg(test = "foo")]
| help: remove the value
|
= note: no expected value for `test`
+ = help: to expect this configuration use `--check-cfg=cfg(test, values("foo"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: 2 warnings emitted
diff --git a/tests/ui/check-cfg/no-expected-values.mixed.stderr b/tests/ui/check-cfg/no-expected-values.mixed.stderr
index 5d261b2a5..ae55c95c0 100644
--- a/tests/ui/check-cfg/no-expected-values.mixed.stderr
+++ b/tests/ui/check-cfg/no-expected-values.mixed.stderr
@@ -1,5 +1,5 @@
warning: unexpected `cfg` condition value: `foo`
- --> $DIR/no-expected-values.rs:12:7
+ --> $DIR/no-expected-values.rs:11:7
|
LL | #[cfg(feature = "foo")]
| ^^^^^^^--------
@@ -7,10 +7,12 @@ LL | #[cfg(feature = "foo")]
| help: remove the value
|
= note: no expected value for `feature`
+ = help: to expect this configuration use `--check-cfg=cfg(feature, values("foo"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `foo`
- --> $DIR/no-expected-values.rs:16:7
+ --> $DIR/no-expected-values.rs:15:7
|
LL | #[cfg(test = "foo")]
| ^^^^--------
@@ -18,6 +20,8 @@ LL | #[cfg(test = "foo")]
| help: remove the value
|
= note: no expected value for `test`
+ = help: to expect this configuration use `--check-cfg=cfg(test, values("foo"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: 2 warnings emitted
diff --git a/tests/ui/check-cfg/no-expected-values.rs b/tests/ui/check-cfg/no-expected-values.rs
index 9e2a9f09a..9f34c019e 100644
--- a/tests/ui/check-cfg/no-expected-values.rs
+++ b/tests/ui/check-cfg/no-expected-values.rs
@@ -1,10 +1,9 @@
// Check that we detect unexpected value when none are allowed
//
// check-pass
-// revisions: values simple mixed empty
+// revisions: simple mixed empty
// compile-flags: -Z unstable-options
// compile-flags: --check-cfg=cfg(values,simple,mixed,empty)
-// [values]compile-flags: --check-cfg=values(test) --check-cfg=values(feature)
// [simple]compile-flags: --check-cfg=cfg(test) --check-cfg=cfg(feature)
// [mixed]compile-flags: --check-cfg=cfg(test,feature)
// [empty]compile-flags: --check-cfg=cfg(test,feature,values())
diff --git a/tests/ui/check-cfg/no-expected-values.simple.stderr b/tests/ui/check-cfg/no-expected-values.simple.stderr
index 5d261b2a5..ae55c95c0 100644
--- a/tests/ui/check-cfg/no-expected-values.simple.stderr
+++ b/tests/ui/check-cfg/no-expected-values.simple.stderr
@@ -1,5 +1,5 @@
warning: unexpected `cfg` condition value: `foo`
- --> $DIR/no-expected-values.rs:12:7
+ --> $DIR/no-expected-values.rs:11:7
|
LL | #[cfg(feature = "foo")]
| ^^^^^^^--------
@@ -7,10 +7,12 @@ LL | #[cfg(feature = "foo")]
| help: remove the value
|
= note: no expected value for `feature`
+ = help: to expect this configuration use `--check-cfg=cfg(feature, values("foo"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `foo`
- --> $DIR/no-expected-values.rs:16:7
+ --> $DIR/no-expected-values.rs:15:7
|
LL | #[cfg(test = "foo")]
| ^^^^--------
@@ -18,6 +20,8 @@ LL | #[cfg(test = "foo")]
| help: remove the value
|
= note: no expected value for `test`
+ = help: to expect this configuration use `--check-cfg=cfg(test, values("foo"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: 2 warnings emitted
diff --git a/tests/ui/check-cfg/no-expected-values.values.stderr b/tests/ui/check-cfg/no-expected-values.values.stderr
deleted file mode 100644
index 5d261b2a5..000000000
--- a/tests/ui/check-cfg/no-expected-values.values.stderr
+++ /dev/null
@@ -1,23 +0,0 @@
-warning: unexpected `cfg` condition value: `foo`
- --> $DIR/no-expected-values.rs:12:7
- |
-LL | #[cfg(feature = "foo")]
- | ^^^^^^^--------
- | |
- | help: remove the value
- |
- = note: no expected value for `feature`
- = note: `#[warn(unexpected_cfgs)]` on by default
-
-warning: unexpected `cfg` condition value: `foo`
- --> $DIR/no-expected-values.rs:16:7
- |
-LL | #[cfg(test = "foo")]
- | ^^^^--------
- | |
- | help: remove the value
- |
- = note: no expected value for `test`
-
-warning: 2 warnings emitted
-
diff --git a/tests/ui/check-cfg/order-independant.names_after.stderr b/tests/ui/check-cfg/order-independant.names_after.stderr
deleted file mode 100644
index a308358e4..000000000
--- a/tests/ui/check-cfg/order-independant.names_after.stderr
+++ /dev/null
@@ -1,19 +0,0 @@
-warning: unexpected `cfg` condition value: (none)
- --> $DIR/order-independant.rs:8:7
- |
-LL | #[cfg(a)]
- | ^- help: specify a config value: `= "b"`
- |
- = note: expected values for `a` are: `b`
- = note: `#[warn(unexpected_cfgs)]` on by default
-
-warning: unexpected `cfg` condition value: `unk`
- --> $DIR/order-independant.rs:12:7
- |
-LL | #[cfg(a = "unk")]
- | ^^^^^^^^^
- |
- = note: expected values for `a` are: `b`
-
-warning: 2 warnings emitted
-
diff --git a/tests/ui/check-cfg/order-independant.names_before.stderr b/tests/ui/check-cfg/order-independant.names_before.stderr
deleted file mode 100644
index a308358e4..000000000
--- a/tests/ui/check-cfg/order-independant.names_before.stderr
+++ /dev/null
@@ -1,19 +0,0 @@
-warning: unexpected `cfg` condition value: (none)
- --> $DIR/order-independant.rs:8:7
- |
-LL | #[cfg(a)]
- | ^- help: specify a config value: `= "b"`
- |
- = note: expected values for `a` are: `b`
- = note: `#[warn(unexpected_cfgs)]` on by default
-
-warning: unexpected `cfg` condition value: `unk`
- --> $DIR/order-independant.rs:12:7
- |
-LL | #[cfg(a = "unk")]
- | ^^^^^^^^^
- |
- = note: expected values for `a` are: `b`
-
-warning: 2 warnings emitted
-
diff --git a/tests/ui/check-cfg/order-independant.rs b/tests/ui/check-cfg/order-independant.rs
index ce056b8dc..86e3cfa1d 100644
--- a/tests/ui/check-cfg/order-independant.rs
+++ b/tests/ui/check-cfg/order-independant.rs
@@ -1,12 +1,13 @@
// check-pass
-// revisions: names_before names_after
+//
+// revisions: values_before values_after
// compile-flags: -Z unstable-options
-// compile-flags: --check-cfg=names(names_before,names_after)
-// [names_before]compile-flags: --check-cfg=names(a) --check-cfg=values(a,"b")
-// [names_after]compile-flags: --check-cfg=values(a,"b") --check-cfg=names(a)
+// compile-flags: --check-cfg=cfg(values_before,values_after)
+//
+// [values_before]compile-flags: --check-cfg=cfg(a,values("b")) --check-cfg=cfg(a)
+// [values_after]compile-flags: --check-cfg=cfg(a) --check-cfg=cfg(a,values("b"))
#[cfg(a)]
-//~^ WARNING unexpected `cfg` condition value
fn my_cfg() {}
#[cfg(a = "unk")]
diff --git a/tests/ui/check-cfg/order-independant.values_after.stderr b/tests/ui/check-cfg/order-independant.values_after.stderr
new file mode 100644
index 000000000..d1de26ba3
--- /dev/null
+++ b/tests/ui/check-cfg/order-independant.values_after.stderr
@@ -0,0 +1,13 @@
+warning: unexpected `cfg` condition value: `unk`
+ --> $DIR/order-independant.rs:13:7
+ |
+LL | #[cfg(a = "unk")]
+ | ^^^^^^^^^
+ |
+ = note: expected values for `a` are: (none), `b`
+ = help: to expect this configuration use `--check-cfg=cfg(a, values("unk"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+ = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/check-cfg/order-independant.values_before.stderr b/tests/ui/check-cfg/order-independant.values_before.stderr
new file mode 100644
index 000000000..d1de26ba3
--- /dev/null
+++ b/tests/ui/check-cfg/order-independant.values_before.stderr
@@ -0,0 +1,13 @@
+warning: unexpected `cfg` condition value: `unk`
+ --> $DIR/order-independant.rs:13:7
+ |
+LL | #[cfg(a = "unk")]
+ | ^^^^^^^^^
+ |
+ = note: expected values for `a` are: (none), `b`
+ = help: to expect this configuration use `--check-cfg=cfg(a, values("unk"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+ = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/check-cfg/stmt-no-ice.stderr b/tests/ui/check-cfg/stmt-no-ice.stderr
index 900ea4e4d..112367606 100644
--- a/tests/ui/check-cfg/stmt-no-ice.stderr
+++ b/tests/ui/check-cfg/stmt-no-ice.stderr
@@ -4,7 +4,9 @@ warning: unexpected `cfg` condition name: `crossbeam_loom`
LL | #[cfg(crossbeam_loom)]
| ^^^^^^^^^^^^^^
|
- = help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+ = help: expected names are: `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+ = help: to expect this configuration use `--check-cfg=cfg(crossbeam_loom)`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted
diff --git a/tests/ui/check-cfg/unexpected-cfg-name.exhaustive.stderr b/tests/ui/check-cfg/unexpected-cfg-name.exhaustive.stderr
deleted file mode 100644
index 513f7ac7f..000000000
--- a/tests/ui/check-cfg/unexpected-cfg-name.exhaustive.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-warning: unexpected `cfg` condition name: `widnows`
- --> $DIR/unexpected-cfg-name.rs:9:7
- |
-LL | #[cfg(widnows)]
- | ^^^^^^^ help: there is a config with a similar name: `windows`
- |
- = note: `#[warn(unexpected_cfgs)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/check-cfg/unexpected-cfg-name.names.stderr b/tests/ui/check-cfg/unexpected-cfg-name.names.stderr
deleted file mode 100644
index 513f7ac7f..000000000
--- a/tests/ui/check-cfg/unexpected-cfg-name.names.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-warning: unexpected `cfg` condition name: `widnows`
- --> $DIR/unexpected-cfg-name.rs:9:7
- |
-LL | #[cfg(widnows)]
- | ^^^^^^^ help: there is a config with a similar name: `windows`
- |
- = note: `#[warn(unexpected_cfgs)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/check-cfg/unexpected-cfg-name.rs b/tests/ui/check-cfg/unexpected-cfg-name.rs
index 15c3aa6e0..9fc0e28a8 100644
--- a/tests/ui/check-cfg/unexpected-cfg-name.rs
+++ b/tests/ui/check-cfg/unexpected-cfg-name.rs
@@ -1,10 +1,7 @@
// Check warning for unexpected configuration name
//
// check-pass
-// revisions: names exhaustive
-// compile-flags: --check-cfg=cfg(names,exhaustive)
-// [names]compile-flags: --check-cfg=names() -Z unstable-options
-// [exhaustive]compile-flags: --check-cfg=cfg() -Z unstable-options
+// compile-flags: --check-cfg=cfg() -Z unstable-options
#[cfg(widnows)]
//~^ WARNING unexpected `cfg` condition name
diff --git a/tests/ui/check-cfg/unexpected-cfg-name.stderr b/tests/ui/check-cfg/unexpected-cfg-name.stderr
new file mode 100644
index 000000000..8748b324f
--- /dev/null
+++ b/tests/ui/check-cfg/unexpected-cfg-name.stderr
@@ -0,0 +1,12 @@
+warning: unexpected `cfg` condition name: `widnows`
+ --> $DIR/unexpected-cfg-name.rs:6:7
+ |
+LL | #[cfg(widnows)]
+ | ^^^^^^^ help: there is a config with a similar name: `windows`
+ |
+ = help: to expect this configuration use `--check-cfg=cfg(widnows)`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+ = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/check-cfg/unexpected-cfg-value.cfg.stderr b/tests/ui/check-cfg/unexpected-cfg-value.cfg.stderr
deleted file mode 100644
index 2ed7f9005..000000000
--- a/tests/ui/check-cfg/unexpected-cfg-value.cfg.stderr
+++ /dev/null
@@ -1,25 +0,0 @@
-warning: unexpected `cfg` condition value: `sedre`
- --> $DIR/unexpected-cfg-value.rs:11:7
- |
-LL | #[cfg(feature = "sedre")]
- | ^^^^^^^^^^-------
- | |
- | help: there is a expected value with a similar name: `"serde"`
- |
- = note: expected values for `feature` are: `full`, `serde`
- = note: `#[warn(unexpected_cfgs)]` on by default
-
-warning: unexpected `cfg` condition value: `rand`
- --> $DIR/unexpected-cfg-value.rs:18:7
- |
-LL | #[cfg(feature = "rand")]
- | ^^^^^^^^^^^^^^^^
- |
- = note: expected values for `feature` are: `full`, `serde`
-
-warning: unexpected condition value `rand` for condition name `feature`
- |
- = help: was set with `--cfg` but isn't in the `--check-cfg` expected values
-
-warning: 3 warnings emitted
-
diff --git a/tests/ui/check-cfg/unexpected-cfg-value.rs b/tests/ui/check-cfg/unexpected-cfg-value.rs
index a84458071..54dce0f0d 100644
--- a/tests/ui/check-cfg/unexpected-cfg-value.rs
+++ b/tests/ui/check-cfg/unexpected-cfg-value.rs
@@ -1,12 +1,8 @@
-// Check warning for invalid configuration value in the code and
-// in the cli
+// Check for unexpected configuration value in the code.
//
// check-pass
-// revisions: values cfg
// compile-flags: --cfg=feature="rand" -Z unstable-options
-// compile-flags: --check-cfg=cfg(values,cfg)
-// [values]compile-flags: --check-cfg=values(feature,"serde","full")
-// [cfg]compile-flags: --check-cfg=cfg(feature,values("serde","full"))
+// compile-flags: --check-cfg=cfg(feature,values("serde","full"))
#[cfg(feature = "sedre")]
//~^ WARNING unexpected `cfg` condition value
diff --git a/tests/ui/check-cfg/unexpected-cfg-value.stderr b/tests/ui/check-cfg/unexpected-cfg-value.stderr
new file mode 100644
index 000000000..e5435d376
--- /dev/null
+++ b/tests/ui/check-cfg/unexpected-cfg-value.stderr
@@ -0,0 +1,25 @@
+warning: unexpected `cfg` condition value: `sedre`
+ --> $DIR/unexpected-cfg-value.rs:7:7
+ |
+LL | #[cfg(feature = "sedre")]
+ | ^^^^^^^^^^-------
+ | |
+ | help: there is a expected value with a similar name: `"serde"`
+ |
+ = note: expected values for `feature` are: `full`, `serde`
+ = help: to expect this configuration use `--check-cfg=cfg(feature, values("sedre"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+ = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: unexpected `cfg` condition value: `rand`
+ --> $DIR/unexpected-cfg-value.rs:14:7
+ |
+LL | #[cfg(feature = "rand")]
+ | ^^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `feature` are: `full`, `serde`
+ = help: to expect this configuration use `--check-cfg=cfg(feature, values("rand"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: 2 warnings emitted
+
diff --git a/tests/ui/check-cfg/unexpected-cfg-value.values.stderr b/tests/ui/check-cfg/unexpected-cfg-value.values.stderr
deleted file mode 100644
index 2ed7f9005..000000000
--- a/tests/ui/check-cfg/unexpected-cfg-value.values.stderr
+++ /dev/null
@@ -1,25 +0,0 @@
-warning: unexpected `cfg` condition value: `sedre`
- --> $DIR/unexpected-cfg-value.rs:11:7
- |
-LL | #[cfg(feature = "sedre")]
- | ^^^^^^^^^^-------
- | |
- | help: there is a expected value with a similar name: `"serde"`
- |
- = note: expected values for `feature` are: `full`, `serde`
- = note: `#[warn(unexpected_cfgs)]` on by default
-
-warning: unexpected `cfg` condition value: `rand`
- --> $DIR/unexpected-cfg-value.rs:18:7
- |
-LL | #[cfg(feature = "rand")]
- | ^^^^^^^^^^^^^^^^
- |
- = note: expected values for `feature` are: `full`, `serde`
-
-warning: unexpected condition value `rand` for condition name `feature`
- |
- = help: was set with `--cfg` but isn't in the `--check-cfg` expected values
-
-warning: 3 warnings emitted
-
diff --git a/tests/ui/check-cfg/values-target-json.rs b/tests/ui/check-cfg/values-target-json.rs
index 2ef5a4459..47ac79e0d 100644
--- a/tests/ui/check-cfg/values-target-json.rs
+++ b/tests/ui/check-cfg/values-target-json.rs
@@ -2,7 +2,7 @@
//
// check-pass
// needs-llvm-components: x86
-// compile-flags: --crate-type=lib --check-cfg=values() --target={{src-base}}/check-cfg/my-awesome-platform.json -Z unstable-options
+// compile-flags: --crate-type=lib --check-cfg=cfg() --target={{src-base}}/check-cfg/my-awesome-platform.json -Z unstable-options
#![feature(lang_items, no_core, auto_traits)]
#![no_core]
@@ -10,10 +10,6 @@
#[lang = "sized"]
trait Sized {}
-#[cfg(target_os = "linuz")]
-//~^ WARNING unexpected `cfg` condition value
-fn target_os_linux_misspell() {}
-
#[cfg(target_os = "linux")]
fn target_os_linux() {}
diff --git a/tests/ui/check-cfg/values-target-json.stderr b/tests/ui/check-cfg/values-target-json.stderr
deleted file mode 100644
index e71149f33..000000000
--- a/tests/ui/check-cfg/values-target-json.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-warning: unexpected `cfg` condition value: `linuz`
- --> $DIR/values-target-json.rs:13:7
- |
-LL | #[cfg(target_os = "linuz")]
- | ^^^^^^^^^^^^-------
- | |
- | help: there is a expected value with a similar name: `"linux"`
- |
- = note: expected values for `target_os` are: `aix`, `android`, `cuda`, `dragonfly`, `emscripten`, `ericos`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `macos`, `netbsd`, `none`, `nto`, `openbsd`, `psp`, `redox`, `solaris`, `solid_asp3`, `teeos`, `tvos`, `uefi`, `unknown`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`
- = note: `#[warn(unexpected_cfgs)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/check-cfg/well-known-names.rs b/tests/ui/check-cfg/well-known-names.rs
index 1dcb419b4..32c14703d 100644
--- a/tests/ui/check-cfg/well-known-names.rs
+++ b/tests/ui/check-cfg/well-known-names.rs
@@ -15,6 +15,7 @@ fn target_os() {}
fn feature_misspell() {}
#[cfg(feature = "foo")]
+//~^ WARNING unexpected `cfg` condition name
fn feature() {}
#[cfg(uniw)]
diff --git a/tests/ui/check-cfg/well-known-names.stderr b/tests/ui/check-cfg/well-known-names.stderr
index 3001289b7..763ba4646 100644
--- a/tests/ui/check-cfg/well-known-names.stderr
+++ b/tests/ui/check-cfg/well-known-names.stderr
@@ -4,6 +4,8 @@ warning: unexpected `cfg` condition name: `target_oz`
LL | #[cfg(target_oz = "linux")]
| ^^^^^^^^^^^^^^^^^^^
|
+ = help: to expect this configuration use `--check-cfg=cfg(target_oz, values("linux"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
help: there is a config with a similar name and value
|
@@ -14,15 +16,29 @@ warning: unexpected `cfg` condition name: `features`
--> $DIR/well-known-names.rs:13:7
|
LL | #[cfg(features = "foo")]
- | --------^^^^^^^^
- | |
- | help: there is a config with a similar name: `feature`
+ | ^^^^^^^^^^^^^^^^
+ |
+ = help: expected names are: `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+ = help: to expect this configuration use `--check-cfg=cfg(features, values("foo"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition name: `feature`
+ --> $DIR/well-known-names.rs:17:7
+ |
+LL | #[cfg(feature = "foo")]
+ | ^^^^^^^^^^^^^^^
+ |
+ = help: to expect this configuration use `--check-cfg=cfg(feature, values("foo"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `uniw`
- --> $DIR/well-known-names.rs:20:7
+ --> $DIR/well-known-names.rs:21:7
|
LL | #[cfg(uniw)]
| ^^^^ help: there is a config with a similar name: `unix`
+ |
+ = help: to expect this configuration use `--check-cfg=cfg(uniw)`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
-warning: 3 warnings emitted
+warning: 4 warnings emitted
diff --git a/tests/ui/check-cfg/well-known-values.rs b/tests/ui/check-cfg/well-known-values.rs
index 8b56c8729..21268bf10 100644
--- a/tests/ui/check-cfg/well-known-values.rs
+++ b/tests/ui/check-cfg/well-known-values.rs
@@ -1,41 +1,108 @@
-// This test check that we lint on non well known values and that we don't lint on well known
-// values
+// This test check that we recognize all the well known config names
+// and that we correctly lint on unexpected values.
+//
+// This test also serve as an "anti-regression" for the well known
+// values since the suggestion shows them.
//
// check-pass
// compile-flags: --check-cfg=cfg() -Z unstable-options
-#[cfg(target_os = "linuz")]
+#![feature(cfg_overflow_checks)]
+#![feature(cfg_relocation_model)]
+#![feature(cfg_sanitize)]
+#![feature(cfg_target_abi)]
+#![feature(cfg_target_has_atomic)]
+#![feature(cfg_target_has_atomic_equal_alignment)]
+#![feature(cfg_target_thread_local)]
+
+// This part makes sure that none of the well known names are
+// unexpected.
+//
+// BUT to make sure that no expected values changes without
+// being noticed we pass them a obviously wrong value so the
+// diagnostic prints the list of expected values.
+#[cfg(any(
+ // tidy-alphabetical-start
+ debug_assertions = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ doc = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ doctest = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ miri = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ overflow_checks = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ panic = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ proc_macro = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ relocation_model = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ sanitize = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ target_abi = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ target_arch = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ target_endian = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ target_env = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ target_family = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ target_feature = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ target_has_atomic = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ target_has_atomic_equal_alignment = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ target_has_atomic_load_store = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ target_os = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ target_pointer_width = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ target_thread_local = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ target_vendor = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ test = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ unix = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ windows = "_UNEXPECTED_VALUE",
+ //~^ WARN unexpected `cfg` condition value
+ // tidy-alphabetical-end
+))]
+fn unexpected_values() {}
+
+#[cfg(target_os = "linuz")] // testing that we suggest `linux`
//~^ WARNING unexpected `cfg` condition value
fn target_os_linux_misspell() {}
+// The #[cfg]s below serve as a safeguard to make sure we
+// don't lint when using an expected well-known name and
+// value, only a small subset of all possible expected
+// configs are tested, since we already test the names
+// above and don't need to test all values, just different
+// combinations (without value, with value, both...).
+
#[cfg(target_os = "linux")]
fn target_os_linux() {}
-#[cfg(target_has_atomic = "0")]
-//~^ WARNING unexpected `cfg` condition value
-fn target_has_atomic_invalid() {}
+#[cfg(target_feature = "crt-static")] // pure rustc feature
+fn target_feature() {}
#[cfg(target_has_atomic = "8")]
-fn target_has_atomic() {}
+fn target_has_atomic_8() {}
-#[cfg(unix = "aa")]
-//~^ WARNING unexpected `cfg` condition value
-fn unix_with_value() {}
+#[cfg(target_has_atomic)]
+fn target_has_atomic() {}
#[cfg(unix)]
fn unix() {}
-#[cfg(miri = "miri")]
-//~^ WARNING unexpected `cfg` condition value
-fn miri_with_value() {}
-
-#[cfg(miri)]
-fn miri() {}
-
-#[cfg(doc = "linux")]
-//~^ WARNING unexpected `cfg` condition value
-fn doc_with_value() {}
-
#[cfg(doc)]
fn doc() {}
diff --git a/tests/ui/check-cfg/well-known-values.stderr b/tests/ui/check-cfg/well-known-values.stderr
index 6877d8f5b..4f708e62c 100644
--- a/tests/ui/check-cfg/well-known-values.stderr
+++ b/tests/ui/check-cfg/well-known-values.stderr
@@ -1,53 +1,285 @@
-warning: unexpected `cfg` condition value: `linuz`
- --> $DIR/well-known-values.rs:7:7
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:26:5
|
-LL | #[cfg(target_os = "linuz")]
- | ^^^^^^^^^^^^-------
- | |
- | help: there is a expected value with a similar name: `"linux"`
+LL | debug_assertions = "_UNEXPECTED_VALUE",
+ | ^^^^^^^^^^^^^^^^----------------------
+ | |
+ | help: remove the value
|
- = note: expected values for `target_os` are: `aix`, `android`, `cuda`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `macos`, `netbsd`, `none`, `nto`, `openbsd`, `psp`, `redox`, `solaris`, `solid_asp3`, `teeos`, `tvos`, `uefi`, `unknown`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`
+ = note: no expected value for `debug_assertions`
+ = help: to expect this configuration use `--check-cfg=cfg(debug_assertions, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
-warning: unexpected `cfg` condition value: `0`
- --> $DIR/well-known-values.rs:14:7
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:28:5
+ |
+LL | doc = "_UNEXPECTED_VALUE",
+ | ^^^----------------------
+ | |
+ | help: remove the value
+ |
+ = note: no expected value for `doc`
+ = help: to expect this configuration use `--check-cfg=cfg(doc, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:30:5
+ |
+LL | doctest = "_UNEXPECTED_VALUE",
+ | ^^^^^^^----------------------
+ | |
+ | help: remove the value
+ |
+ = note: no expected value for `doctest`
+ = help: to expect this configuration use `--check-cfg=cfg(doctest, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:32:5
+ |
+LL | miri = "_UNEXPECTED_VALUE",
+ | ^^^^----------------------
+ | |
+ | help: remove the value
+ |
+ = note: no expected value for `miri`
+ = help: to expect this configuration use `--check-cfg=cfg(miri, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:34:5
+ |
+LL | overflow_checks = "_UNEXPECTED_VALUE",
+ | ^^^^^^^^^^^^^^^----------------------
+ | |
+ | help: remove the value
+ |
+ = note: no expected value for `overflow_checks`
+ = help: to expect this configuration use `--check-cfg=cfg(overflow_checks, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:36:5
+ |
+LL | panic = "_UNEXPECTED_VALUE",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `panic` are: `abort`, `unwind`
+ = help: to expect this configuration use `--check-cfg=cfg(panic, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:38:5
+ |
+LL | proc_macro = "_UNEXPECTED_VALUE",
+ | ^^^^^^^^^^----------------------
+ | |
+ | help: remove the value
+ |
+ = note: no expected value for `proc_macro`
+ = help: to expect this configuration use `--check-cfg=cfg(proc_macro, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:40:5
+ |
+LL | relocation_model = "_UNEXPECTED_VALUE",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `relocation_model` are: `dynamic-no-pic`, `pic`, `pie`, `ropi`, `ropi-rwpi`, `rwpi`, `static`
+ = help: to expect this configuration use `--check-cfg=cfg(relocation_model, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:42:5
+ |
+LL | sanitize = "_UNEXPECTED_VALUE",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `sanitize` are: `address`, `cfi`, `hwaddress`, `kcfi`, `kernel-address`, `leak`, `memory`, `memtag`, `safestack`, `shadow-call-stack`, `thread`
+ = help: to expect this configuration use `--check-cfg=cfg(sanitize, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:44:5
+ |
+LL | target_abi = "_UNEXPECTED_VALUE",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `target_abi` are: ``, `abi64`, `abiv2`, `abiv2hf`, `eabi`, `eabihf`, `elf`, `fortanix`, `ilp32`, `llvm`, `macabi`, `sim`, `softfloat`, `spe`, `uwp`, `vec-extabi`, `x32`
+ = help: to expect this configuration use `--check-cfg=cfg(target_abi, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:46:5
+ |
+LL | target_arch = "_UNEXPECTED_VALUE",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `target_arch` are: `aarch64`, `arm`, `avr`, `bpf`, `csky`, `hexagon`, `loongarch64`, `m68k`, `mips`, `mips32r6`, `mips64`, `mips64r6`, `msp430`, `nvptx64`, `powerpc`, `powerpc64`, `riscv32`, `riscv64`, `s390x`, `sparc`, `sparc64`, `wasm32`, `wasm64`, `x86`, `x86_64`
+ = help: to expect this configuration use `--check-cfg=cfg(target_arch, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:48:5
+ |
+LL | target_endian = "_UNEXPECTED_VALUE",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `target_endian` are: `big`, `little`
+ = help: to expect this configuration use `--check-cfg=cfg(target_endian, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:50:5
+ |
+LL | target_env = "_UNEXPECTED_VALUE",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `target_env` are: ``, `eabihf`, `gnu`, `gnueabihf`, `msvc`, `musl`, `newlib`, `nto70`, `nto71`, `ohos`, `psx`, `relibc`, `sgx`, `uclibc`
+ = help: to expect this configuration use `--check-cfg=cfg(target_env, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:52:5
+ |
+LL | target_family = "_UNEXPECTED_VALUE",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `target_family` are: `unix`, `wasm`, `windows`
+ = help: to expect this configuration use `--check-cfg=cfg(target_family, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:54:5
+ |
+LL | target_feature = "_UNEXPECTED_VALUE",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `target_feature` are: `10e60`, `2e3`, `3e3r1`, `3e3r2`, `3e3r3`, `3e7`, `7e10`, `a`, `aclass`, `adx`, `aes`, `altivec`, `alu32`, `atomics`, `avx`, `avx2`, `avx512bf16`, `avx512bitalg`, `avx512bw`, `avx512cd`, `avx512dq`, `avx512er`, `avx512f`, `avx512ifma`, `avx512pf`, `avx512vbmi`, `avx512vbmi2`, `avx512vl`, `avx512vnni`, `avx512vp2intersect`, `avx512vpopcntdq`, `bf16`, `bmi1`, `bmi2`, `bti`, `bulk-memory`, `c`, `cache`, `cmpxchg16b`, `crc`, `crt-static`, `d`, `d32`, `dit`, `doloop`, `dotprod`, `dpb`, `dpb2`, `dsp`, `dsp1e2`, `dspe60`, `e`, `e1`, `e2`, `edsp`, `elrw`, `ermsb`, `exception-handling`, `f`, `f16c`, `f32mm`, `f64mm`, `fast-unaligned-access`, `fcma`, `fdivdu`, `fhm`, `flagm`, `float1e2`, `float1e3`, `float3e4`, `float7e60`, `floate1`, `fma`, `fp-armv8`, `fp16`, `fp64`, `fpuv2_df`, `fpuv2_sf`, `fpuv3_df`, `fpuv3_hf`, `fpuv3_hi`, `fpuv3_sf`, `frintts`, `fxsr`, `gfni`, `hard-float`, `hard-float-abi`, `hard-tp`, `high-registers`, `hvx`, `hvx-length128b`, `hwdiv`, `i8mm`, `jsconv`, `lasx`, `lbt`, `lor`, `lse`, `lsx`, `lvz`, `lzcnt`, `m`, `mclass`, `movbe`, `mp`, `mp1e2`, `msa`, `mte`, `multivalue`, `mutable-globals`, `neon`, `nontrapping-fptoint`, `nvic`, `paca`, `pacg`, `pan`, `pclmulqdq`, `pmuv3`, `popcnt`, `power10-vector`, `power8-altivec`, `power8-vector`, `power9-altivec`, `power9-vector`, `rand`, `ras`, `rclass`, `rcpc`, `rcpc2`, `rdm`, `rdrand`, `rdseed`, `reference-types`, `relax`, `relaxed-simd`, `rtm`, `sb`, `sha`, `sha2`, `sha3`, `sign-ext`, `simd128`, `sm4`, `spe`, `ssbs`, `sse`, `sse2`, `sse3`, `sse4.1`, `sse4.2`, `sse4a`, `ssse3`, `sve`, `sve2`, `sve2-aes`, `sve2-bitperm`, `sve2-sha3`, `sve2-sm4`, `tbm`, `thumb-mode`, `thumb2`, `tme`, `trust`, `trustzone`, `ual`, `v`, `v5te`, `v6`, `v6k`, `v6t2`, `v7`, `v8`, `v8.1a`, `v8.2a`, `v8.3a`, `v8.4a`, `v8.5a`, `v8.6a`, `v8.7a`, `vaes`, `vdsp2e60f`, `vdspv1`, `vdspv2`, `vfp2`, `vfp3`, `vfp4`, `vh`, `virt`, `virtualization`, `vpclmulqdq`, `vsx`, `xsave`, `xsavec`, `xsaveopt`, `xsaves`, `zba`, `zbb`, `zbc`, `zbkb`, `zbkc`, `zbkx`, `zbs`, `zdinx`, `zfh`, `zfhmin`, `zfinx`, `zhinx`, `zhinxmin`, `zk`, `zkn`, `zknd`, `zkne`, `zknh`, `zkr`, `zks`, `zksed`, `zksh`, `zkt`
+ = help: to expect this configuration use `--check-cfg=cfg(target_feature, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:56:5
|
-LL | #[cfg(target_has_atomic = "0")]
- | ^^^^^^^^^^^^^^^^^^^^---
- | |
- | help: there is a expected value with a similar name: `"8"`
+LL | target_has_atomic = "_UNEXPECTED_VALUE",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_has_atomic` are: (none), `128`, `16`, `32`, `64`, `8`, `ptr`
+ = help: to expect this configuration use `--check-cfg=cfg(target_has_atomic, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:58:5
+ |
+LL | target_has_atomic_equal_alignment = "_UNEXPECTED_VALUE",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `target_has_atomic_equal_alignment` are: (none), `128`, `16`, `32`, `64`, `8`, `ptr`
+ = help: to expect this configuration use `--check-cfg=cfg(target_has_atomic_equal_alignment, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:60:5
+ |
+LL | target_has_atomic_load_store = "_UNEXPECTED_VALUE",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `target_has_atomic_load_store` are: (none), `128`, `16`, `32`, `64`, `8`, `ptr`
+ = help: to expect this configuration use `--check-cfg=cfg(target_has_atomic_load_store, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:62:5
+ |
+LL | target_os = "_UNEXPECTED_VALUE",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `target_os` are: `aix`, `android`, `cuda`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `macos`, `netbsd`, `none`, `nto`, `openbsd`, `psp`, `redox`, `solaris`, `solid_asp3`, `teeos`, `tvos`, `uefi`, `unknown`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`
+ = help: to expect this configuration use `--check-cfg=cfg(target_os, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
-warning: unexpected `cfg` condition value: `aa`
- --> $DIR/well-known-values.rs:21:7
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:64:5
|
-LL | #[cfg(unix = "aa")]
- | ^^^^-------
- | |
- | help: remove the value
+LL | target_pointer_width = "_UNEXPECTED_VALUE",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `target_pointer_width` are: `16`, `32`, `64`
+ = help: to expect this configuration use `--check-cfg=cfg(target_pointer_width, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:66:5
+ |
+LL | target_thread_local = "_UNEXPECTED_VALUE",
+ | ^^^^^^^^^^^^^^^^^^^----------------------
+ | |
+ | help: remove the value
+ |
+ = note: no expected value for `target_thread_local`
+ = help: to expect this configuration use `--check-cfg=cfg(target_thread_local, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:68:5
+ |
+LL | target_vendor = "_UNEXPECTED_VALUE",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: expected values for `target_vendor` are: `apple`, `espressif`, `fortanix`, `ibm`, `kmc`, `nintendo`, `nvidia`, `pc`, `sony`, `sun`, `unikraft`, `unknown`, `uwp`, `win7`, `wrs`
+ = help: to expect this configuration use `--check-cfg=cfg(target_vendor, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:70:5
+ |
+LL | test = "_UNEXPECTED_VALUE",
+ | ^^^^----------------------
+ | |
+ | help: remove the value
+ |
+ = note: no expected value for `test`
+ = help: to expect this configuration use `--check-cfg=cfg(test, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:72:5
+ |
+LL | unix = "_UNEXPECTED_VALUE",
+ | ^^^^----------------------
+ | |
+ | help: remove the value
|
= note: no expected value for `unix`
+ = help: to expect this configuration use `--check-cfg=cfg(unix, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
-warning: unexpected `cfg` condition value: `miri`
- --> $DIR/well-known-values.rs:28:7
+warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ --> $DIR/well-known-values.rs:74:5
|
-LL | #[cfg(miri = "miri")]
- | ^^^^---------
- | |
- | help: remove the value
+LL | windows = "_UNEXPECTED_VALUE",
+ | ^^^^^^^----------------------
+ | |
+ | help: remove the value
|
- = note: no expected value for `miri`
+ = note: no expected value for `windows`
+ = help: to expect this configuration use `--check-cfg=cfg(windows, values("_UNEXPECTED_VALUE"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
-warning: unexpected `cfg` condition value: `linux`
- --> $DIR/well-known-values.rs:35:7
+warning: unexpected `cfg` condition value: `linuz`
+ --> $DIR/well-known-values.rs:80:7
|
-LL | #[cfg(doc = "linux")]
- | ^^^----------
- | |
- | help: remove the value
+LL | #[cfg(target_os = "linuz")] // testing that we suggest `linux`
+ | ^^^^^^^^^^^^-------
+ | |
+ | help: there is a expected value with a similar name: `"linux"`
|
- = note: no expected value for `doc`
+ = note: expected values for `target_os` are: `aix`, `android`, `cuda`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `macos`, `netbsd`, `none`, `nto`, `openbsd`, `psp`, `redox`, `solaris`, `solid_asp3`, `teeos`, `tvos`, `uefi`, `unknown`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`
+ = help: to expect this configuration use `--check-cfg=cfg(target_os, values("linuz"))`
+ = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
-warning: 5 warnings emitted
+warning: 26 warnings emitted
diff --git a/tests/ui/check-static-immutable-mut-slices.stderr b/tests/ui/check-static-immutable-mut-slices.stderr
index a32a94c13..402f9032b 100644
--- a/tests/ui/check-static-immutable-mut-slices.stderr
+++ b/tests/ui/check-static-immutable-mut-slices.stderr
@@ -4,6 +4,6 @@ error[E0764]: mutable references are not allowed in the final value of statics
LL | static TEST: &'static mut [isize] = &mut [];
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0764`.
diff --git a/tests/ui/class-cast-to-trait.stderr b/tests/ui/class-cast-to-trait.stderr
index 56d10d88d..4ea0f41c3 100644
--- a/tests/ui/class-cast-to-trait.stderr
+++ b/tests/ui/class-cast-to-trait.stderr
@@ -4,6 +4,6 @@ error[E0599]: no method named `eat` found for struct `Box<dyn Noisy>` in the cur
LL | nyan.eat();
| ^^^ method not found in `Box<dyn Noisy>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/class-method-missing.stderr b/tests/ui/class-method-missing.stderr
index 3b4ac3a9a..42bd22e18 100644
--- a/tests/ui/class-method-missing.stderr
+++ b/tests/ui/class-method-missing.stderr
@@ -7,6 +7,6 @@ LL | fn eat(&self);
LL | impl Animal for Cat {
| ^^^^^^^^^^^^^^^^^^^ missing `eat` in implementation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/cleanup-rvalue-for-scope.rs b/tests/ui/cleanup-rvalue-for-scope.rs
index b6582c01f..38a41f3b8 100644
--- a/tests/ui/cleanup-rvalue-for-scope.rs
+++ b/tests/ui/cleanup-rvalue-for-scope.rs
@@ -5,9 +5,6 @@
#![allow(unused_variables)]
// Test that the lifetime of rvalues in for loops is extended
// to the for loop itself.
-
-use std::ops::Drop;
-
static mut FLAGS: u64 = 0;
struct Box<T> { f: T }
diff --git a/tests/ui/cleanup-rvalue-scopes.rs b/tests/ui/cleanup-rvalue-scopes.rs
index b80f95b79..56340e515 100644
--- a/tests/ui/cleanup-rvalue-scopes.rs
+++ b/tests/ui/cleanup-rvalue-scopes.rs
@@ -8,8 +8,6 @@
#![feature(box_patterns)]
-use std::ops::Drop;
-
static mut FLAGS: u64 = 0;
struct Box<T> { f: T }
diff --git a/tests/ui/closure-expected-type/expect-fn-supply-fn.stderr b/tests/ui/closure-expected-type/expect-fn-supply-fn.stderr
index e6ddc6068..e010f0502 100644
--- a/tests/ui/closure-expected-type/expect-fn-supply-fn.stderr
+++ b/tests/ui/closure-expected-type/expect-fn-supply-fn.stderr
@@ -25,8 +25,8 @@ error[E0308]: mismatched types
LL | with_closure_expecting_fn_with_free_region(|x: fn(&u32), y| {});
| ^ one type is more general than the other
|
- = note: expected fn pointer `fn(&u32)`
- found fn pointer `for<'a> fn(&'a u32)`
+ = note: expected fn pointer `fn(&_)`
+ found fn pointer `for<'a> fn(&'a _)`
error[E0308]: mismatched types
--> $DIR/expect-fn-supply-fn.rs:39:50
@@ -34,8 +34,8 @@ error[E0308]: mismatched types
LL | with_closure_expecting_fn_with_bound_region(|x: fn(&'x u32), y| {});
| ^ one type is more general than the other
|
- = note: expected fn pointer `for<'a> fn(&'a u32)`
- found fn pointer `fn(&u32)`
+ = note: expected fn pointer `for<'a> fn(&'a _)`
+ found fn pointer `fn(&_)`
error[E0308]: mismatched types
--> $DIR/expect-fn-supply-fn.rs:48:50
@@ -43,8 +43,8 @@ error[E0308]: mismatched types
LL | with_closure_expecting_fn_with_bound_region(|x: Foo<'_>, y| {
| ^ one type is more general than the other
|
- = note: expected fn pointer `for<'a> fn(&'a u32)`
- found fn pointer `fn(&u32)`
+ = note: expected fn pointer `for<'a> fn(&'a _)`
+ found fn pointer `fn(&_)`
error: aborting due to 5 previous errors
diff --git a/tests/ui/closure-expected-type/expect-infer-var-appearing-twice.stderr b/tests/ui/closure-expected-type/expect-infer-var-appearing-twice.stderr
index c50892950..d3cd8185f 100644
--- a/tests/ui/closure-expected-type/expect-infer-var-appearing-twice.stderr
+++ b/tests/ui/closure-expected-type/expect-infer-var-appearing-twice.stderr
@@ -16,6 +16,6 @@ LL | fn with_closure<F, A>(_: F)
LL | where F: FnOnce(A, A)
| ^^^^^^^^^^^^ required by this bound in `with_closure`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0631`.
diff --git a/tests/ui/closure-expected-type/expect-two-infer-vars-supply-ty-with-bound-region.stderr b/tests/ui/closure-expected-type/expect-two-infer-vars-supply-ty-with-bound-region.stderr
index 7a04ed738..8799a2a07 100644
--- a/tests/ui/closure-expected-type/expect-two-infer-vars-supply-ty-with-bound-region.stderr
+++ b/tests/ui/closure-expected-type/expect-two-infer-vars-supply-ty-with-bound-region.stderr
@@ -9,6 +9,6 @@ help: consider giving this closure parameter an explicit type
LL | with_closure(|x: u32, y: /* Type */| {});
| ++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/closure_context/issue-26046-fn-mut.stderr b/tests/ui/closure_context/issue-26046-fn-mut.stderr
index eeb409452..0b58180bc 100644
--- a/tests/ui/closure_context/issue-26046-fn-mut.stderr
+++ b/tests/ui/closure_context/issue-26046-fn-mut.stderr
@@ -11,6 +11,6 @@ LL | Box::new(closure)
|
= note: required for the cast from `Box<{closure@$DIR/issue-26046-fn-mut.rs:4:19: 4:21}>` to `Box<(dyn Fn() + 'static)>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0525`.
diff --git a/tests/ui/closure_context/issue-26046-fn-once.stderr b/tests/ui/closure_context/issue-26046-fn-once.stderr
index 24773a1d7..66fb1856c 100644
--- a/tests/ui/closure_context/issue-26046-fn-once.stderr
+++ b/tests/ui/closure_context/issue-26046-fn-once.stderr
@@ -11,6 +11,6 @@ LL | Box::new(closure)
|
= note: required for the cast from `Box<{closure@$DIR/issue-26046-fn-once.rs:4:19: 4:26}>` to `Box<(dyn Fn() -> Vec<u8> + 'static)>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0525`.
diff --git a/tests/ui/closure_context/issue-42065.stderr b/tests/ui/closure_context/issue-42065.stderr
index 896bb6dc6..9ae89047d 100644
--- a/tests/ui/closure_context/issue-42065.stderr
+++ b/tests/ui/closure_context/issue-42065.stderr
@@ -17,6 +17,6 @@ note: this value implements `FnOnce`, which causes it to be moved when called
LL | debug_dump_dict();
| ^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-1.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-1.stderr
index 341d2bc65..f59a2625c 100644
--- a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-1.stderr
+++ b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-1.stderr
@@ -14,6 +14,6 @@ LL | println!("{:?}", p);
LL | *y+=1;
| ----- first borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-2.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-2.stderr
index 584bb862b..64d5ff8e2 100644
--- a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-2.stderr
+++ b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-2.stderr
@@ -14,6 +14,6 @@ LL | let x = &mut p.x;
LL | println!("{}", y);
| - immutable borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.stderr
index ee9238047..979527e9f 100644
--- a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.stderr
+++ b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.stderr
@@ -17,6 +17,6 @@ help: to force the closure to take ownership of `p` (and any other referenced va
LL | move || {
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0373`.
diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-4.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-4.stderr
index 46379a381..d47f0539b 100644
--- a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-4.stderr
+++ b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-4.stderr
@@ -17,6 +17,6 @@ help: to force the closure to take ownership of `p` (and any other referenced va
LL | let mut c = move || {
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0373`.
diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-closures-mut-and-imm.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-closures-mut-and-imm.stderr
index 5f1dae297..57234fffe 100644
--- a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-closures-mut-and-imm.stderr
+++ b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-closures-mut-and-imm.stderr
@@ -16,6 +16,6 @@ LL | };
LL | drop(c2);
| -- immutable borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm-borrow.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm-borrow.stderr
index 38c530b80..d224f21bc 100644
--- a/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm-borrow.stderr
+++ b/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm-borrow.stderr
@@ -7,6 +7,6 @@ LL |
LL | z.0.0.0 = format!("X1");
| ------- mutable borrow occurs due to use of `*z.0.0` in closure
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-array-diagnostics.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-array-diagnostics.stderr
index 309c63e52..1172f54c1 100644
--- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-array-diagnostics.stderr
+++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-array-diagnostics.stderr
@@ -17,6 +17,6 @@ note: required by a bound in `expect_fn`
LL | fn expect_fn<F: Fn()>(_f: F) {}
| ^^^^ required by this bound in `expect_fn`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0525`.
diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-multi-variant-diagnostics.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-multi-variant-diagnostics.stderr
index 83d282aad..347fa3fa8 100644
--- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-multi-variant-diagnostics.stderr
+++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-multi-variant-diagnostics.stderr
@@ -16,6 +16,6 @@ help: consider mutably borrowing `c`
LL | let a = &mut c;
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-single-variant-diagnostics.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-single-variant-diagnostics.stderr
index 46323b752..c9b27e768 100644
--- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-single-variant-diagnostics.stderr
+++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-single-variant-diagnostics.stderr
@@ -16,6 +16,6 @@ help: consider mutably borrowing `c`
LL | let b = &mut c;
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-struct-diagnostics.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-struct-diagnostics.stderr
index 25029cc7b..079a9abed 100644
--- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-struct-diagnostics.stderr
+++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-struct-diagnostics.stderr
@@ -16,6 +16,6 @@ help: consider mutably borrowing `hello`
LL | let b = &mut hello;
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.stderr
index 06ef7baf9..0bf717404 100644
--- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.stderr
+++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.stderr
@@ -16,6 +16,6 @@ help: consider mutably borrowing `hello`
LL | let b = &mut hello;
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics.stderr
index 3e77635f9..4abe5eda2 100644
--- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics.stderr
+++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics.stderr
@@ -17,6 +17,6 @@ note: required by a bound in `expect_fn`
LL | fn expect_fn<F: Fn()>(_f: F) {}
| ^^^^ required by this bound in `expect_fn`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0525`.
diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/multilevel-path.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/multilevel-path.stderr
index ac4c9c937..5a054ef5f 100644
--- a/tests/ui/closures/2229_closure_analysis/diagnostics/multilevel-path.stderr
+++ b/tests/ui/closures/2229_closure_analysis/diagnostics/multilevel-path.stderr
@@ -12,6 +12,6 @@ LL |
LL | c();
| - first borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr
index 8c44229bc..c9972c8e7 100644
--- a/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr
+++ b/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr
@@ -9,6 +9,6 @@ LL | println!("{}", foo.x);
= help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0793`.
diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/simple-struct-min-capture.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/simple-struct-min-capture.stderr
index 06157b2af..68fdb3ce1 100644
--- a/tests/ui/closures/2229_closure_analysis/diagnostics/simple-struct-min-capture.stderr
+++ b/tests/ui/closures/2229_closure_analysis/diagnostics/simple-struct-min-capture.stderr
@@ -16,6 +16,6 @@ LL | c();
|
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/union.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/union.stderr
index 17834e612..63fb3e5d9 100644
--- a/tests/ui/closures/2229_closure_analysis/diagnostics/union.stderr
+++ b/tests/ui/closures/2229_closure_analysis/diagnostics/union.stderr
@@ -13,6 +13,6 @@ LL | a.y = 1;
LL | c();
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/closures/2229_closure_analysis/issue-118144.rs b/tests/ui/closures/2229_closure_analysis/issue-118144.rs
new file mode 100644
index 000000000..3e5d9f973
--- /dev/null
+++ b/tests/ui/closures/2229_closure_analysis/issue-118144.rs
@@ -0,0 +1,16 @@
+// Regression test for ICE #118144
+
+struct V(i32);
+
+fn func(func_arg: &mut V) {
+ || {
+ // Declaring `x` separately instead of using
+ // a destructuring binding like `let V(x) = ...`
+ // becaue only `V(x) = ...` triggers the ICE
+ let x;
+ V(x) = func_arg; //~ ERROR: mismatched types
+ func_arg.0 = 0;
+ };
+}
+
+fn main() {}
diff --git a/tests/ui/closures/2229_closure_analysis/issue-118144.stderr b/tests/ui/closures/2229_closure_analysis/issue-118144.stderr
new file mode 100644
index 000000000..85cb5adc0
--- /dev/null
+++ b/tests/ui/closures/2229_closure_analysis/issue-118144.stderr
@@ -0,0 +1,11 @@
+error[E0308]: mismatched types
+ --> $DIR/issue-118144.rs:11:9
+ |
+LL | V(x) = func_arg;
+ | ^^^^ -------- this expression has type `&mut V`
+ | |
+ | expected `&mut V`, found `V`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/closures/2229_closure_analysis/issue-90465.stderr b/tests/ui/closures/2229_closure_analysis/issue-90465.stderr
index c1679c6b6..ccca24764 100644
--- a/tests/ui/closures/2229_closure_analysis/issue-90465.stderr
+++ b/tests/ui/closures/2229_closure_analysis/issue-90465.stderr
@@ -22,5 +22,5 @@ LL ~ let c0 = move || {
LL + let _ = &f0;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_2.stderr b/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_2.stderr
index 1e42d73c6..d82db0481 100644
--- a/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_2.stderr
+++ b/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_2.stderr
@@ -12,6 +12,6 @@ LL |
LL | _b();
| -- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0505`.
diff --git a/tests/ui/closures/2229_closure_analysis/migrations/macro.stderr b/tests/ui/closures/2229_closure_analysis/migrations/macro.stderr
index c17edce72..7ea5136d1 100644
--- a/tests/ui/closures/2229_closure_analysis/migrations/macro.stderr
+++ b/tests/ui/closures/2229_closure_analysis/migrations/macro.stderr
@@ -18,5 +18,5 @@ help: add a dummy let to cause `a` to be fully captured
LL | let _ = || { let _ = &a; dbg!(a.0) };
| +++++++++++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.stderr b/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.stderr
index e10898f98..2b76deca3 100644
--- a/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.stderr
+++ b/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.stderr
@@ -22,5 +22,5 @@ LL ~ let result = panic::catch_unwind(move || {
LL + let _ = &f;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-1.stderr b/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-1.stderr
index 730823281..e4b5d39c0 100644
--- a/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-1.stderr
+++ b/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-1.stderr
@@ -10,5 +10,5 @@ LL | let mut closure = |input| x.0 = input;
|
= help: consider adding the following bound: `'b: 'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-2.stderr b/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-2.stderr
index 66ba0fe35..c18649b9e 100644
--- a/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-2.stderr
+++ b/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-2.stderr
@@ -11,5 +11,5 @@ LL | self.borrowed = borrow;
|
= help: consider adding the following bound: `'a: 'b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/closures/add_semicolon_non_block_closure.stderr b/tests/ui/closures/add_semicolon_non_block_closure.stderr
index 6f9c309ed..d095e59c7 100644
--- a/tests/ui/closures/add_semicolon_non_block_closure.stderr
+++ b/tests/ui/closures/add_semicolon_non_block_closure.stderr
@@ -11,6 +11,6 @@ help: consider using a semicolon here
LL | foo(|| { bar(); })
| + +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/closures/binder/const-bound.stderr b/tests/ui/closures/binder/const-bound.stderr
index c016465c1..9c4fd95ed 100644
--- a/tests/ui/closures/binder/const-bound.stderr
+++ b/tests/ui/closures/binder/const-bound.stderr
@@ -13,5 +13,5 @@ error: late-bound const parameter not allowed on closures
LL | for<const N: i32> || -> () {};
| ^^^^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/closures/binder/disallow-const.stderr b/tests/ui/closures/binder/disallow-const.stderr
index 59f299315..d38b233d9 100644
--- a/tests/ui/closures/binder/disallow-const.stderr
+++ b/tests/ui/closures/binder/disallow-const.stderr
@@ -7,6 +7,6 @@ LL | for<const N: i32> || -> () {};
= note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
= help: add `#![feature(non_lifetime_binders)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/closures/binder/disallow-ty.stderr b/tests/ui/closures/binder/disallow-ty.stderr
index 3370e21bd..bc6696ad3 100644
--- a/tests/ui/closures/binder/disallow-ty.stderr
+++ b/tests/ui/closures/binder/disallow-ty.stderr
@@ -7,6 +7,6 @@ LL | for<T> || -> () {};
= note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
= help: add `#![feature(non_lifetime_binders)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/closures/binder/implicit-return.stderr b/tests/ui/closures/binder/implicit-return.stderr
index 35db34ce2..ff39e8841 100644
--- a/tests/ui/closures/binder/implicit-return.stderr
+++ b/tests/ui/closures/binder/implicit-return.stderr
@@ -6,5 +6,5 @@ LL | let _f = for<'a> |_: &'a ()| {};
| |
| `for<...>` is here
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/closures/binder/type-bound-2.stderr b/tests/ui/closures/binder/type-bound-2.stderr
index 14b2dbf03..6609b326f 100644
--- a/tests/ui/closures/binder/type-bound-2.stderr
+++ b/tests/ui/closures/binder/type-bound-2.stderr
@@ -13,5 +13,5 @@ error: late-bound type parameter not allowed on closures
LL | for<T> || -> () {};
| ^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/closures/binder/type-bound.stderr b/tests/ui/closures/binder/type-bound.stderr
index ef00a2dff..22431130a 100644
--- a/tests/ui/closures/binder/type-bound.stderr
+++ b/tests/ui/closures/binder/type-bound.stderr
@@ -13,5 +13,5 @@ error: late-bound type parameter not allowed on closures
LL | for<T> || -> T {};
| ^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/closures/cannot-call-unsized-via-ptr.stderr b/tests/ui/closures/cannot-call-unsized-via-ptr.stderr
index 9ecc66d5c..7c73372e3 100644
--- a/tests/ui/closures/cannot-call-unsized-via-ptr.stderr
+++ b/tests/ui/closures/cannot-call-unsized-via-ptr.stderr
@@ -7,6 +7,6 @@ LL | let f: fn([u8]) = |_result| {};
= help: the trait `Sized` is not implemented for `[u8]`
= note: all function arguments must have a statically known size
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/closures/capture-unsized-by-move.stderr b/tests/ui/closures/capture-unsized-by-move.stderr
index d7fafc8ca..686bbab88 100644
--- a/tests/ui/closures/capture-unsized-by-move.stderr
+++ b/tests/ui/closures/capture-unsized-by-move.stderr
@@ -9,6 +9,6 @@ LL | k.to_string();
= help: the trait `Sized` is not implemented for `(dyn std::fmt::Display + 'static)`
= note: all values captured by value by a closure must have a statically known size
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr b/tests/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr
index bf6ec5c36..e98f05b47 100644
--- a/tests/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr
+++ b/tests/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr
@@ -14,6 +14,6 @@ help: consider further restricting this bound
LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static + std::marker::Send {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/closures/closure-bounds-subtype.stderr b/tests/ui/closures/closure-bounds-subtype.stderr
index 8ad8273fc..42588668e 100644
--- a/tests/ui/closures/closure-bounds-subtype.stderr
+++ b/tests/ui/closures/closure-bounds-subtype.stderr
@@ -20,6 +20,6 @@ help: consider further restricting this bound
LL | fn give_owned<F>(f: F) where F: FnOnce() + Send + std::marker::Sync {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/closures/closure-expected.stderr b/tests/ui/closures/closure-expected.stderr
index 565038f51..6b309d70b 100644
--- a/tests/ui/closures/closure-expected.stderr
+++ b/tests/ui/closures/closure-expected.stderr
@@ -11,6 +11,6 @@ LL | let y = x.or_else(4);
note: required by a bound in `Option::<T>::or_else`
--> $SRC_DIR/core/src/option.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/closures/closure-immutable-outer-variable.stderr b/tests/ui/closures/closure-immutable-outer-variable.stderr
index 799097889..23bd0020d 100644
--- a/tests/ui/closures/closure-immutable-outer-variable.stderr
+++ b/tests/ui/closures/closure-immutable-outer-variable.stderr
@@ -6,6 +6,6 @@ LL | let y = true;
LL | foo(Box::new(move || y = !y) as Box<_>);
| ^^^^^^ cannot assign
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/closures/closure-move-sync.stderr b/tests/ui/closures/closure-move-sync.stderr
index aee903ac9..2bb26b0c0 100644
--- a/tests/ui/closures/closure-move-sync.stderr
+++ b/tests/ui/closures/closure-move-sync.stderr
@@ -20,6 +20,6 @@ LL | let t = thread::spawn(|| {
note: required by a bound in `spawn`
--> $SRC_DIR/std/src/thread/mod.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/closures/closure-no-fn-1.stderr b/tests/ui/closures/closure-no-fn-1.stderr
index 87e670bb0..8fab92e9b 100644
--- a/tests/ui/closures/closure-no-fn-1.stderr
+++ b/tests/ui/closures/closure-no-fn-1.stderr
@@ -14,6 +14,6 @@ note: closures can only be coerced to `fn` types if they do not capture any vari
LL | let foo: fn(u8) -> u8 = |v: u8| { a += v; a };
| ^ `a` captured here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/closures/closure-no-fn-2.stderr b/tests/ui/closures/closure-no-fn-2.stderr
index 7c7e9d0ce..06682fcc2 100644
--- a/tests/ui/closures/closure-no-fn-2.stderr
+++ b/tests/ui/closures/closure-no-fn-2.stderr
@@ -14,6 +14,6 @@ note: closures can only be coerced to `fn` types if they do not capture any vari
LL | let bar: fn() -> u8 = || { b };
| ^ `b` captured here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/closures/closure-no-fn-3.stderr b/tests/ui/closures/closure-no-fn-3.stderr
index 276e766e8..bbf3677fb 100644
--- a/tests/ui/closures/closure-no-fn-3.stderr
+++ b/tests/ui/closures/closure-no-fn-3.stderr
@@ -4,6 +4,6 @@ error[E0605]: non-primitive cast: `{closure@$DIR/closure-no-fn-3.rs:6:28: 6:30}`
LL | let baz: fn() -> u8 = (|| { b }) as fn() -> u8;
| ^^^^^^^^^^^^^^^^^^^^^^^^ invalid cast
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0605`.
diff --git a/tests/ui/closures/closure-no-fn-4.stderr b/tests/ui/closures/closure-no-fn-4.stderr
index 0bec11ab6..c86731b12 100644
--- a/tests/ui/closures/closure-no-fn-4.stderr
+++ b/tests/ui/closures/closure-no-fn-4.stderr
@@ -19,6 +19,6 @@ note: closures can only be coerced to `fn` types if they do not capture any vari
LL | false => |a| a - b,
| ^ `b` captured here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/closures/closure-no-fn-5.stderr b/tests/ui/closures/closure-no-fn-5.stderr
index 13d19495d..ffe01fac4 100644
--- a/tests/ui/closures/closure-no-fn-5.stderr
+++ b/tests/ui/closures/closure-no-fn-5.stderr
@@ -18,6 +18,6 @@ LL | let bar: fn() -> u8 = || { a; b; c; d; e };
| | `b` captured here
| `a` captured here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/closures/closure-referencing-itself-issue-25954.stderr b/tests/ui/closures/closure-referencing-itself-issue-25954.stderr
index 8ca43cd1c..6fe6840b3 100644
--- a/tests/ui/closures/closure-referencing-itself-issue-25954.stderr
+++ b/tests/ui/closures/closure-referencing-itself-issue-25954.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | let q = || p.b.set(5i32);
| ^^^^^^^^^^^^^^^^ cyclic type of infinite size
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/closures/closure-reform-bad.stderr b/tests/ui/closures/closure-reform-bad.stderr
index 6bb598131..426930666 100644
--- a/tests/ui/closures/closure-reform-bad.stderr
+++ b/tests/ui/closures/closure-reform-bad.stderr
@@ -21,6 +21,6 @@ note: function defined here
LL | fn call_bare(f: fn(&str)) {
| ^^^^^^^^^ -----------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/closures/closure-wrong-kind.stderr b/tests/ui/closures/closure-wrong-kind.stderr
index 9ea55d764..705cc9486 100644
--- a/tests/ui/closures/closure-wrong-kind.stderr
+++ b/tests/ui/closures/closure-wrong-kind.stderr
@@ -16,6 +16,6 @@ note: required by a bound in `bar`
LL | fn bar<T: Fn(u32)>(_: T) {}
| ^^^^^^^ required by this bound in `bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0525`.
diff --git a/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.mir.stderr b/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.mir.stderr
index a60100dda..579227703 100644
--- a/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.mir.stderr
+++ b/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.mir.stderr
@@ -6,6 +6,6 @@ LL | let _: unsafe fn() = || { ::std::pin::Pin::new_unchecked(&0_u8); };
|
= note: consult the function's documentation for information on how to avoid undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.thir.stderr b/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.thir.stderr
index 8c516e890..fb237231d 100644
--- a/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.thir.stderr
+++ b/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.thir.stderr
@@ -6,6 +6,6 @@ LL | let _: unsafe fn() = || { ::std::pin::Pin::new_unchecked(&0_u8); };
|
= note: consult the function's documentation for information on how to avoid undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/closures/coerce-unsafe-to-closure.stderr b/tests/ui/closures/coerce-unsafe-to-closure.stderr
index bd4ab13a2..4841ff32e 100644
--- a/tests/ui/closures/coerce-unsafe-to-closure.stderr
+++ b/tests/ui/closures/coerce-unsafe-to-closure.stderr
@@ -11,6 +11,6 @@ LL | let x: Option<&[u8]> = Some("foo").map(std::mem::transmute);
note: required by a bound in `Option::<T>::map`
--> $SRC_DIR/core/src/option.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/closures/infer-signature-from-impl.next.stderr b/tests/ui/closures/infer-signature-from-impl.next.stderr
index 973517066..0866265cf 100644
--- a/tests/ui/closures/infer-signature-from-impl.next.stderr
+++ b/tests/ui/closures/infer-signature-from-impl.next.stderr
@@ -11,6 +11,6 @@ help: consider giving this closure parameter an explicit type
LL | needs_foo(|x: /* Type */| {
| ++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/closures/infer-signature-from-impl.rs b/tests/ui/closures/infer-signature-from-impl.rs
index 6e8c94177..8b18e4ef9 100644
--- a/tests/ui/closures/infer-signature-from-impl.rs
+++ b/tests/ui/closures/infer-signature-from-impl.rs
@@ -1,5 +1,5 @@
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
//[next] known-bug: trait-system-refactor-initiative#71
//[current] check-pass
diff --git a/tests/ui/closures/issue-10398.stderr b/tests/ui/closures/issue-10398.stderr
index 423b79daf..bcbcd6d4c 100644
--- a/tests/ui/closures/issue-10398.stderr
+++ b/tests/ui/closures/issue-10398.stderr
@@ -8,6 +8,6 @@ LL | drop(x);
|
= note: move occurs because `x` has type `Box<i32>`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/closures/issue-112547.stderr b/tests/ui/closures/issue-112547.stderr
index d86b05dc6..f47ea6072 100644
--- a/tests/ui/closures/issue-112547.stderr
+++ b/tests/ui/closures/issue-112547.stderr
@@ -18,6 +18,6 @@ LL | #![feature(non_lifetime_binders)]
= note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
= note: `#[warn(incomplete_features)]` on by default
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/closures/issue-113087.stderr b/tests/ui/closures/issue-113087.stderr
index 8ccef4a54..c51d13f4a 100644
--- a/tests/ui/closures/issue-113087.stderr
+++ b/tests/ui/closures/issue-113087.stderr
@@ -11,6 +11,6 @@ LL | });
LL | }
| - `a` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/closures/issue-11873.stderr b/tests/ui/closures/issue-11873.stderr
index c814eedd2..04921b922 100644
--- a/tests/ui/closures/issue-11873.stderr
+++ b/tests/ui/closures/issue-11873.stderr
@@ -11,6 +11,6 @@ LL |
LL | f();
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0505`.
diff --git a/tests/ui/closures/issue-25439.stderr b/tests/ui/closures/issue-25439.stderr
index 5e889e6c1..19a26396a 100644
--- a/tests/ui/closures/issue-25439.stderr
+++ b/tests/ui/closures/issue-25439.stderr
@@ -14,6 +14,6 @@ note: required by a bound in `fix`
LL | fn fix<F>(f: F) -> i32 where F: Fn(Helper<F>, i32) -> i32 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `fix`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0644`.
diff --git a/tests/ui/closures/issue-67123.stderr b/tests/ui/closures/issue-67123.stderr
index 7877c7334..bdafeaef1 100644
--- a/tests/ui/closures/issue-67123.stderr
+++ b/tests/ui/closures/issue-67123.stderr
@@ -12,6 +12,6 @@ help: consider restricting type parameter `T`
LL | fn foo<T: Copy>(t: T) {
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/closures/issue-6801.stderr b/tests/ui/closures/issue-6801.stderr
index 6a40db0d5..aed673fe1 100644
--- a/tests/ui/closures/issue-6801.stderr
+++ b/tests/ui/closures/issue-6801.stderr
@@ -11,6 +11,6 @@ LL | twice(x);
LL | invoke(sq);
| -- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0505`.
diff --git a/tests/ui/closures/issue-80313-mutable-borrow-in-closure.stderr b/tests/ui/closures/issue-80313-mutable-borrow-in-closure.stderr
index 239f071ca..1266c603e 100644
--- a/tests/ui/closures/issue-80313-mutable-borrow-in-closure.stderr
+++ b/tests/ui/closures/issue-80313-mutable-borrow-in-closure.stderr
@@ -12,6 +12,6 @@ help: consider changing this to be mutable
LL | let mut callback = || {
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/closures/issue-80313-mutable-borrow-in-move-closure.stderr b/tests/ui/closures/issue-80313-mutable-borrow-in-move-closure.stderr
index 1ec279f03..57320b58d 100644
--- a/tests/ui/closures/issue-80313-mutable-borrow-in-move-closure.stderr
+++ b/tests/ui/closures/issue-80313-mutable-borrow-in-move-closure.stderr
@@ -12,6 +12,6 @@ help: consider changing this to be mutable
LL | let mut callback = move || {
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/closures/issue-80313-mutation-in-closure.stderr b/tests/ui/closures/issue-80313-mutation-in-closure.stderr
index 22a62ce73..b605cd2f9 100644
--- a/tests/ui/closures/issue-80313-mutation-in-closure.stderr
+++ b/tests/ui/closures/issue-80313-mutation-in-closure.stderr
@@ -12,6 +12,6 @@ help: consider changing this to be mutable
LL | let mut callback = || {
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/closures/issue-80313-mutation-in-move-closure.stderr b/tests/ui/closures/issue-80313-mutation-in-move-closure.stderr
index a2222f8cc..b0210ac7c 100644
--- a/tests/ui/closures/issue-80313-mutation-in-move-closure.stderr
+++ b/tests/ui/closures/issue-80313-mutation-in-move-closure.stderr
@@ -12,6 +12,6 @@ help: consider changing this to be mutable
LL | let mut callback = move || {
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/closures/issue-81700-mut-borrow.stderr b/tests/ui/closures/issue-81700-mut-borrow.stderr
index 03b18c3f7..d050fb60c 100644
--- a/tests/ui/closures/issue-81700-mut-borrow.stderr
+++ b/tests/ui/closures/issue-81700-mut-borrow.stderr
@@ -11,6 +11,6 @@ help: consider changing this to be mutable
LL | let mut bar = || { foo(x); };
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/closures/issue-82438-mut-without-upvar.stderr b/tests/ui/closures/issue-82438-mut-without-upvar.stderr
index f0951b7d1..c6ed7097c 100644
--- a/tests/ui/closures/issue-82438-mut-without-upvar.stderr
+++ b/tests/ui/closures/issue-82438-mut-without-upvar.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be mutable
LL | let mut c = |a, b, c, d| {};
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/closures/issue-84044-drop-non-mut.stderr b/tests/ui/closures/issue-84044-drop-non-mut.stderr
index 5335a056c..ada0e3373 100644
--- a/tests/ui/closures/issue-84044-drop-non-mut.stderr
+++ b/tests/ui/closures/issue-84044-drop-non-mut.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be mutable
LL | let mut f = || {};
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/closures/issue-84128.stderr b/tests/ui/closures/issue-84128.stderr
index 1cd8949b8..9d4c7f715 100644
--- a/tests/ui/closures/issue-84128.stderr
+++ b/tests/ui/closures/issue-84128.stderr
@@ -19,6 +19,6 @@ note: tuple struct defined here
LL | struct Foo<T>(T);
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/closures/issue-868.rs b/tests/ui/closures/issue-868.rs
index ce0a3c7ca..df03b191a 100644
--- a/tests/ui/closures/issue-868.rs
+++ b/tests/ui/closures/issue-868.rs
@@ -1,5 +1,6 @@
// run-pass
#![allow(unused_parens)]
+#![allow(unit_bindings)]
// pretty-expanded FIXME #23616
fn f<T, F>(g: F) -> T where F: FnOnce() -> T { g() }
diff --git a/tests/ui/closures/issue-99565.stderr b/tests/ui/closures/issue-99565.stderr
index 0d940aa9a..e48f51061 100644
--- a/tests/ui/closures/issue-99565.stderr
+++ b/tests/ui/closures/issue-99565.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic arguments
LL | foo::<T, _>(|| {});
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/closures/multiple-fn-bounds.stderr b/tests/ui/closures/multiple-fn-bounds.stderr
index d94c902f7..325652ef1 100644
--- a/tests/ui/closures/multiple-fn-bounds.stderr
+++ b/tests/ui/closures/multiple-fn-bounds.stderr
@@ -6,8 +6,8 @@ LL | foo(move |x| v);
| |
| expected due to this
|
- = note: expected closure signature `fn(char) -> _`
- found closure signature `for<'a> fn(&'a char) -> _`
+ = note: expected closure signature `fn(_) -> _`
+ found closure signature `for<'a> fn(&'a _) -> _`
note: closure inferred to have a different signature due to this bound
--> $DIR/multiple-fn-bounds.rs:1:11
|
@@ -23,6 +23,6 @@ help: consider adjusting the signature so it does not borrow its argument
LL | foo(move |char| v);
| ~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0631`.
diff --git a/tests/ui/closures/old-closure-expression-remove-semicolon.stderr b/tests/ui/closures/old-closure-expression-remove-semicolon.stderr
index bc54ab4d5..c6ce1c62d 100644
--- a/tests/ui/closures/old-closure-expression-remove-semicolon.stderr
+++ b/tests/ui/closures/old-closure-expression-remove-semicolon.stderr
@@ -9,6 +9,6 @@ LL | | foo();
LL | | };
| |_____^ expected `i32`, found `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/closures/print/closure-print-generic-1.stderr b/tests/ui/closures/print/closure-print-generic-1.stderr
index 2697f93b1..41cad279f 100644
--- a/tests/ui/closures/print/closure-print-generic-1.stderr
+++ b/tests/ui/closures/print/closure-print-generic-1.stderr
@@ -15,6 +15,6 @@ note: this value implements `FnOnce`, which causes it to be moved when called
LL | c();
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/closures/print/closure-print-generic-2.stderr b/tests/ui/closures/print/closure-print-generic-2.stderr
index ced0be945..0a604a7d6 100644
--- a/tests/ui/closures/print/closure-print-generic-2.stderr
+++ b/tests/ui/closures/print/closure-print-generic-2.stderr
@@ -15,6 +15,6 @@ help: use parentheses to call this closure
LL | let c1: () = c();
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/closures/print/closure-print-generic-trim-off-verbose-2.stderr b/tests/ui/closures/print/closure-print-generic-trim-off-verbose-2.stderr
index 6e3659b95..1a1325542 100644
--- a/tests/ui/closures/print/closure-print-generic-trim-off-verbose-2.stderr
+++ b/tests/ui/closures/print/closure-print-generic-trim-off-verbose-2.stderr
@@ -15,6 +15,6 @@ help: use parentheses to call this closure
LL | let c1 : () = c();
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/closures/print/closure-print-generic-verbose-1.stderr b/tests/ui/closures/print/closure-print-generic-verbose-1.stderr
index 5e8a6b1a7..75aa3c934 100644
--- a/tests/ui/closures/print/closure-print-generic-verbose-1.stderr
+++ b/tests/ui/closures/print/closure-print-generic-verbose-1.stderr
@@ -15,6 +15,6 @@ note: this value implements `FnOnce`, which causes it to be moved when called
LL | c();
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/closures/print/closure-print-generic-verbose-2.stderr b/tests/ui/closures/print/closure-print-generic-verbose-2.stderr
index f1fc35e75..855381724 100644
--- a/tests/ui/closures/print/closure-print-generic-verbose-2.stderr
+++ b/tests/ui/closures/print/closure-print-generic-verbose-2.stderr
@@ -15,6 +15,6 @@ help: use parentheses to call this closure
LL | let c1 : () = c();
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/closures/print/closure-print-verbose.stderr b/tests/ui/closures/print/closure-print-verbose.stderr
index 3f9160fe5..3d0af5eb1 100644
--- a/tests/ui/closures/print/closure-print-verbose.stderr
+++ b/tests/ui/closures/print/closure-print-verbose.stderr
@@ -14,6 +14,6 @@ note: closures can only be coerced to `fn` types if they do not capture any vari
LL | let foo: fn(u8) -> u8 = |v: u8| { a += v; a };
| ^ `a` captured here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.stderr
index ed8e16899..0a5884d38 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.stderr
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.stderr
@@ -7,6 +7,6 @@ LL | core::mem::transmute::<usize, extern "C-cmse-nonsecure-call" fn(i32
= note: see issue #81391 <https://github.com/rust-lang/rust/issues/81391> for more information
= help: add `#![feature(abi_c_cmse_nonsecure_call)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-stack.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-stack.stderr
index 372300787..a8aced248 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-stack.stderr
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-stack.stderr
@@ -1,4 +1,4 @@
error: <unknown>:0:0: in function test i32 (i32, i32, i32, i32, i32): call to non-secure function would require passing arguments on stack
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.stderr
index 08b763b26..8d1b10eae 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.stderr
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.stderr
@@ -4,6 +4,6 @@ error[E0781]: the `"C-cmse-nonsecure-call"` ABI is only allowed on function poin
LL | pub extern "C-cmse-nonsecure-call" fn test() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0781`.
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.stderr
index 3ade9891e..917098e21 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.stderr
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.stderr
@@ -6,6 +6,6 @@ LL | | fn test();
LL | | }
| |_^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0781`.
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/issue-83475.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/issue-83475.stderr
index 426d82d8d..26d3bfe78 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/issue-83475.stderr
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/issue-83475.stderr
@@ -7,5 +7,5 @@ LL |
LL | struct XEmpty2;
| --------------- not a function definition
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.stderr
index 1054c2665..cfbdda509 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.stderr
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.stderr
@@ -1,4 +1,4 @@
error: <unknown>:0:0: in function entry_function i32 (i32, i32, i32, i32, i32): secure entry function requires arguments on stack
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.stderr
index 7e8862f9a..3e6954394 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.stderr
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.stderr
@@ -4,6 +4,6 @@ error[E0775]: `#[cmse_nonsecure_entry]` is only valid for targets with the Trust
LL | #[cmse_nonsecure_entry]
| ^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0775`.
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/wrong-abi.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/wrong-abi.stderr
index 36d76c967..4d34f0d75 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/wrong-abi.stderr
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/wrong-abi.stderr
@@ -4,6 +4,6 @@ error[E0776]: `#[cmse_nonsecure_entry]` requires C ABI
LL | #[cmse_nonsecure_entry]
| ^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0776`.
diff --git a/tests/ui/codegen/const-bool-bitcast.rs b/tests/ui/codegen/const-bool-bitcast.rs
new file mode 100644
index 000000000..24ae76b90
--- /dev/null
+++ b/tests/ui/codegen/const-bool-bitcast.rs
@@ -0,0 +1,15 @@
+// This is a regression test for https://github.com/rust-lang/rust/issues/118047
+// build-pass
+// compile-flags: -Zmir-opt-level=0 -Zmir-enable-passes=+DataflowConstProp
+
+#![crate_type = "lib"]
+
+pub struct State {
+ inner: bool
+}
+
+pub fn make() -> State {
+ State {
+ inner: true
+ }
+}
diff --git a/tests/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr b/tests/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr
index 2c1c3c2dc..917ea7330 100644
--- a/tests/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr
+++ b/tests/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr
@@ -6,6 +6,6 @@ LL | impl dyn C { fn f() {} }
LL | impl dyn C { fn f() {} }
| ------ other definition for `f`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0592`.
diff --git a/tests/ui/codemap_tests/empty_span.stderr b/tests/ui/codemap_tests/empty_span.stderr
index e36f59ee5..32f51c95d 100644
--- a/tests/ui/codemap_tests/empty_span.stderr
+++ b/tests/ui/codemap_tests/empty_span.stderr
@@ -4,6 +4,6 @@ error[E0321]: cross-crate traits with a default impl, like `Send`, can only be i
LL | unsafe impl Send for &'static Foo { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't implement cross-crate trait with a default impl for non-struct/enum type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0321`.
diff --git a/tests/ui/codemap_tests/huge_multispan_highlight.stderr b/tests/ui/codemap_tests/huge_multispan_highlight.stderr
index 9f8ce3b61..d2923875c 100644
--- a/tests/ui/codemap_tests/huge_multispan_highlight.stderr
+++ b/tests/ui/codemap_tests/huge_multispan_highlight.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be mutable
LL | let mut x = "foo";
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/codemap_tests/issue-11715.stderr b/tests/ui/codemap_tests/issue-11715.stderr
index d0c29c768..5d0cf7187 100644
--- a/tests/ui/codemap_tests/issue-11715.stderr
+++ b/tests/ui/codemap_tests/issue-11715.stderr
@@ -9,6 +9,6 @@ LL | z.use_mut();
LL | y.use_mut();
| - first borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/codemap_tests/issue-28308.stderr b/tests/ui/codemap_tests/issue-28308.stderr
index 7daa0510c..efd8fa22f 100644
--- a/tests/ui/codemap_tests/issue-28308.stderr
+++ b/tests/ui/codemap_tests/issue-28308.stderr
@@ -6,6 +6,6 @@ LL | assert!("foo");
|
= 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
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0600`.
diff --git a/tests/ui/codemap_tests/one_line.stderr b/tests/ui/codemap_tests/one_line.stderr
index 75fbbada7..90762b87b 100644
--- a/tests/ui/codemap_tests/one_line.stderr
+++ b/tests/ui/codemap_tests/one_line.stderr
@@ -18,6 +18,6 @@ help: ...and then using that local as the argument to this call
LL | v.push(v.pop().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/codemap_tests/tab_2.stderr b/tests/ui/codemap_tests/tab_2.stderr
index 0bfdc3ac2..4f9a93715 100644
--- a/tests/ui/codemap_tests/tab_2.stderr
+++ b/tests/ui/codemap_tests/tab_2.stderr
@@ -6,6 +6,6 @@ LL | """;
LL | | }
| |__^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0765`.
diff --git a/tests/ui/codemap_tests/tab_3.stderr b/tests/ui/codemap_tests/tab_3.stderr
index b17159be6..7ae21a570 100644
--- a/tests/ui/codemap_tests/tab_3.stderr
+++ b/tests/ui/codemap_tests/tab_3.stderr
@@ -17,6 +17,6 @@ help: you can `clone` the value and consume it, but this might not be your desir
LL | some_vec.clone().into_iter();
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/codemap_tests/two_files.stderr b/tests/ui/codemap_tests/two_files.stderr
index 2eb3fd567..d833d4944 100644
--- a/tests/ui/codemap_tests/two_files.stderr
+++ b/tests/ui/codemap_tests/two_files.stderr
@@ -10,6 +10,6 @@ help: you might have meant to use `#![feature(trait_alias)]` instead of a `type`
LL | trait Bar = dyn Foo;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0404`.
diff --git a/tests/ui/codemap_tests/unicode.normal.stderr b/tests/ui/codemap_tests/unicode.normal.stderr
index 05ceb6910..a6e22e1c3 100644
--- a/tests/ui/codemap_tests/unicode.normal.stderr
+++ b/tests/ui/codemap_tests/unicode.normal.stderr
@@ -6,6 +6,6 @@ LL | extern "路濫狼á́́" fn foo() {}
|
= note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions.
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0703`.
diff --git a/tests/ui/coercion/coerce-block-tail-26978.stderr b/tests/ui/coercion/coerce-block-tail-26978.stderr
index 90eb75f2b..89682e103 100644
--- a/tests/ui/coercion/coerce-block-tail-26978.stderr
+++ b/tests/ui/coercion/coerce-block-tail-26978.stderr
@@ -11,6 +11,6 @@ help: consider unboxing the value
LL | f(&{*x});
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/coercion/coerce-block-tail-57749.stderr b/tests/ui/coercion/coerce-block-tail-57749.stderr
index 7e14f42ea..6a6f5ec11 100644
--- a/tests/ui/coercion/coerce-block-tail-57749.stderr
+++ b/tests/ui/coercion/coerce-block-tail-57749.stderr
@@ -9,6 +9,6 @@ help: consider dereferencing the type
LL | reset(&{ *Homura });
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/coercion/coerce-block-tail-83783.stderr b/tests/ui/coercion/coerce-block-tail-83783.stderr
index da3c38777..bf2c38999 100644
--- a/tests/ui/coercion/coerce-block-tail-83783.stderr
+++ b/tests/ui/coercion/coerce-block-tail-83783.stderr
@@ -11,6 +11,6 @@ help: consider unboxing the value
LL | _consume_reference::<i32>(&*async { Box::new(7_i32) }.await);
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/coercion/coerce-block-tail-83850.stderr b/tests/ui/coercion/coerce-block-tail-83850.stderr
index 3cfebb8a5..e98b3e610 100644
--- a/tests/ui/coercion/coerce-block-tail-83850.stderr
+++ b/tests/ui/coercion/coerce-block-tail-83850.stderr
@@ -14,6 +14,6 @@ note: function defined here
LL | fn f(_: &[i32]) {}
| ^ ---------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/coercion/coerce-block-tail.stderr b/tests/ui/coercion/coerce-block-tail.stderr
index 7044fc3ce..1301f3b78 100644
--- a/tests/ui/coercion/coerce-block-tail.stderr
+++ b/tests/ui/coercion/coerce-block-tail.stderr
@@ -11,6 +11,6 @@ help: consider unboxing the value
LL | let _: &i32 = & { *Box::new(1i32) };
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/coercion/coerce-mut.stderr b/tests/ui/coercion/coerce-mut.stderr
index 11a4f3101..9bbfcc29e 100644
--- a/tests/ui/coercion/coerce-mut.stderr
+++ b/tests/ui/coercion/coerce-mut.stderr
@@ -14,6 +14,6 @@ note: function defined here
LL | fn f(x: &mut i32) {}
| ^ -----------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/coercion/coerce-reborrow-multi-arg-fail.stderr b/tests/ui/coercion/coerce-reborrow-multi-arg-fail.stderr
index 5cbdef218..498ef33d5 100644
--- a/tests/ui/coercion/coerce-reborrow-multi-arg-fail.stderr
+++ b/tests/ui/coercion/coerce-reborrow-multi-arg-fail.stderr
@@ -14,6 +14,6 @@ note: function defined here
LL | fn test<T>(_a: T, _b: T) {}
| ^^^^ -----
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/coercion/coercion-slice.stderr b/tests/ui/coercion/coercion-slice.stderr
index 17bbca7a0..26a7a5c1c 100644
--- a/tests/ui/coercion/coercion-slice.stderr
+++ b/tests/ui/coercion/coercion-slice.stderr
@@ -11,6 +11,6 @@ help: consider borrowing here
LL | let _: &[i32] = &[0];
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/coercion/issue-53475.stderr b/tests/ui/coercion/issue-53475.stderr
index 4778611bf..af114519a 100644
--- a/tests/ui/coercion/issue-53475.stderr
+++ b/tests/ui/coercion/issue-53475.stderr
@@ -12,6 +12,6 @@ help: consider adding an explicit lifetime bound
LL | impl<T: 'static> CoerceUnsized<Foo<dyn Any>> for Foo<T> {}
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0310`.
diff --git a/tests/ui/coercion/retslot-cast.stderr b/tests/ui/coercion/retslot-cast.stderr
index 798ce1199..dac21a7f2 100644
--- a/tests/ui/coercion/retslot-cast.stderr
+++ b/tests/ui/coercion/retslot-cast.stderr
@@ -10,6 +10,6 @@ LL | inner(x)
= note: expected enum `Option<&dyn Iterator<Item = ()>>`
found enum `Option<&dyn Iterator<Item = ()> + Send>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/coherence/coherence-all-remote.stderr b/tests/ui/coherence/coherence-all-remote.stderr
index 7eca41753..0cf9f87b4 100644
--- a/tests/ui/coherence/coherence-all-remote.stderr
+++ b/tests/ui/coherence/coherence-all-remote.stderr
@@ -7,6 +7,6 @@ LL | impl<T> Remote1<T> for isize { }
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
= note: only traits defined in the current crate can be implemented for a type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/coherence/coherence-bigint-param.stderr b/tests/ui/coherence/coherence-bigint-param.stderr
index e8d74c917..e6c77624a 100644
--- a/tests/ui/coherence/coherence-bigint-param.stderr
+++ b/tests/ui/coherence/coherence-bigint-param.stderr
@@ -7,6 +7,6 @@ LL | impl<T> Remote1<BigInt> for T { }
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type
= note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.stderr b/tests/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.stderr
index 9156972a1..3618fe841 100644
--- a/tests/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.stderr
+++ b/tests/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.stderr
@@ -7,6 +7,6 @@ LL | impl<T:Even> MyTrait for T {
LL | impl<T:Odd> MyTrait for T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.stderr b/tests/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.stderr
index 8400968e1..510480f6a 100644
--- a/tests/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.stderr
+++ b/tests/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.stderr
@@ -7,6 +7,6 @@ LL | impl<T:Even> MyTrait for T {
LL | impl<T:Odd> MyTrait for T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.stderr b/tests/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.stderr
index 4d7872598..4b86cffbe 100644
--- a/tests/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.stderr
+++ b/tests/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.stderr
@@ -8,6 +8,6 @@ LL | impl GoMut for MyThingy {
- impl<G> GoMut for G
where G: Go;
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.stderr b/tests/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.stderr
index c2a925213..ddb7474c2 100644
--- a/tests/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.stderr
+++ b/tests/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.stderr
@@ -7,6 +7,6 @@ LL | impl<T> MyTrait<T> for T {
LL | impl MyTrait<MyType> for MyType {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyType`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-blanket-conflicts-with-specific-trait.stderr b/tests/ui/coherence/coherence-blanket-conflicts-with-specific-trait.stderr
index e1a5dffeb..b68128534 100644
--- a/tests/ui/coherence/coherence-blanket-conflicts-with-specific-trait.stderr
+++ b/tests/ui/coherence/coherence-blanket-conflicts-with-specific-trait.stderr
@@ -7,6 +7,6 @@ LL | impl<T:OtherTrait> MyTrait for T {
LL | impl MyTrait for MyType {
| ^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyType`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-blanket-conflicts-with-specific.stderr b/tests/ui/coherence/coherence-blanket-conflicts-with-specific.stderr
index ba60a2ea9..164edff4a 100644
--- a/tests/ui/coherence/coherence-blanket-conflicts-with-specific.stderr
+++ b/tests/ui/coherence/coherence-blanket-conflicts-with-specific.stderr
@@ -7,6 +7,6 @@ LL | impl<T> MyTrait for T {
LL | impl MyTrait for MyType {
| ^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyType`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-cow.re_a.stderr b/tests/ui/coherence/coherence-cow.re_a.stderr
index fe4b5b410..0bc017817 100644
--- a/tests/ui/coherence/coherence-cow.re_a.stderr
+++ b/tests/ui/coherence/coherence-cow.re_a.stderr
@@ -9,6 +9,6 @@ LL | impl<T> Remote for Pair<T,Cover<T>> { }
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/coherence-cow.re_b.stderr b/tests/ui/coherence/coherence-cow.re_b.stderr
index da4ede325..9bdb49dcc 100644
--- a/tests/ui/coherence/coherence-cow.re_b.stderr
+++ b/tests/ui/coherence/coherence-cow.re_b.stderr
@@ -9,6 +9,6 @@ LL | impl<T> Remote for Pair<Cover<T>,T> { }
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/coherence-cow.re_c.stderr b/tests/ui/coherence/coherence-cow.re_c.stderr
index d1a20c0ca..dfff2667e 100644
--- a/tests/ui/coherence/coherence-cow.re_c.stderr
+++ b/tests/ui/coherence/coherence-cow.re_c.stderr
@@ -9,6 +9,6 @@ LL | impl<T,U> Remote for Pair<Cover<T>,U> { }
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/coherence-cross-crate-conflict.stderr b/tests/ui/coherence/coherence-cross-crate-conflict.stderr
index 3d253d56a..812ce9772 100644
--- a/tests/ui/coherence/coherence-cross-crate-conflict.stderr
+++ b/tests/ui/coherence/coherence-cross-crate-conflict.stderr
@@ -7,6 +7,6 @@ LL | impl<A> Foo for A {
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
= note: only traits defined in the current crate can be implemented for a type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/coherence/coherence-error-suppression.stderr b/tests/ui/coherence/coherence-error-suppression.stderr
index aadc80cb1..fcaa510c6 100644
--- a/tests/ui/coherence/coherence-error-suppression.stderr
+++ b/tests/ui/coherence/coherence-error-suppression.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `DoesNotExist` in this scope
LL | impl Foo for DoesNotExist {}
| ^^^^^^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr b/tests/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr
index 7dabd97b9..316da26b5 100644
--- a/tests/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr
+++ b/tests/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr
@@ -8,6 +8,6 @@ LL | impl<'a> Trait for fn(fn(&'a ())) {}
|
= note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-fn-implied-bounds.stderr b/tests/ui/coherence/coherence-fn-implied-bounds.stderr
index 201871204..b0dea7467 100644
--- a/tests/ui/coherence/coherence-fn-implied-bounds.stderr
+++ b/tests/ui/coherence/coherence-fn-implied-bounds.stderr
@@ -16,5 +16,5 @@ note: the lint level is defined here
LL | #![deny(coherence_leak_check)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/coherence/coherence-fn-inputs.stderr b/tests/ui/coherence/coherence-fn-inputs.stderr
index 82bd8a35f..246ec5947 100644
--- a/tests/ui/coherence/coherence-fn-inputs.stderr
+++ b/tests/ui/coherence/coherence-fn-inputs.stderr
@@ -8,6 +8,6 @@ LL | impl Trait for for<'c> fn(&'c u32, &'c u32) {
|
= note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-free-vs-bound-region.stderr b/tests/ui/coherence/coherence-free-vs-bound-region.stderr
index e2d84b833..c97b32e42 100644
--- a/tests/ui/coherence/coherence-free-vs-bound-region.stderr
+++ b/tests/ui/coherence/coherence-free-vs-bound-region.stderr
@@ -16,5 +16,5 @@ note: the lint level is defined here
LL | #![deny(coherence_leak_check)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/coherence/coherence-fundamental-trait-objects.stderr b/tests/ui/coherence/coherence-fundamental-trait-objects.stderr
index a35a95ef4..db6a94748 100644
--- a/tests/ui/coherence/coherence-fundamental-trait-objects.stderr
+++ b/tests/ui/coherence/coherence-fundamental-trait-objects.stderr
@@ -9,6 +9,6 @@ LL | impl Misc for dyn Fundamental<Local> {}
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr b/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr
index 684e52822..9f813d6d5 100644
--- a/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr
+++ b/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr
@@ -22,6 +22,6 @@ LL | trait Trait<T> { type Assoc; }
| ^^^^^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/coherence/coherence-inherited-subtyping.stderr b/tests/ui/coherence/coherence-inherited-subtyping.stderr
index f60b2aa27..5c5753939 100644
--- a/tests/ui/coherence/coherence-inherited-subtyping.stderr
+++ b/tests/ui/coherence/coherence-inherited-subtyping.stderr
@@ -9,6 +9,6 @@ LL | fn method1(&self) {}
|
= note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0592`.
diff --git a/tests/ui/coherence/coherence-lone-type-parameter.stderr b/tests/ui/coherence/coherence-lone-type-parameter.stderr
index ef5b08836..48d25bba8 100644
--- a/tests/ui/coherence/coherence-lone-type-parameter.stderr
+++ b/tests/ui/coherence/coherence-lone-type-parameter.stderr
@@ -7,6 +7,6 @@ LL | impl<T> Remote for T { }
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
= note: only traits defined in the current crate can be implemented for a type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs b/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs
index b87e162ac..d5306d59e 100644
--- a/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs
+++ b/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs
@@ -4,8 +4,6 @@
#![feature(negative_impls)]
-use std::marker::Send;
-
struct TestType;
impl !Send for TestType {}
diff --git a/tests/ui/coherence/coherence-negative-impls-safe.stderr b/tests/ui/coherence/coherence-negative-impls-safe.stderr
index 1bd37f395..759e50c3b 100644
--- a/tests/ui/coherence/coherence-negative-impls-safe.stderr
+++ b/tests/ui/coherence/coherence-negative-impls-safe.stderr
@@ -7,6 +7,6 @@ LL | unsafe impl !Send for TestType {}
| | negative because of this
| unsafe because of this
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0198`.
diff --git a/tests/ui/coherence/coherence-negative-outlives-lifetimes.rs b/tests/ui/coherence/coherence-negative-outlives-lifetimes.rs
index 0e16d12a1..531977d6d 100644
--- a/tests/ui/coherence/coherence-negative-outlives-lifetimes.rs
+++ b/tests/ui/coherence/coherence-negative-outlives-lifetimes.rs
@@ -1,5 +1,9 @@
// revisions: stock with_negative_coherence
+
//[with_negative_coherence] known-bug: unknown
+// Ideally this would work, but we don't use `&'a T` to imply that `T: 'a`
+// which is required for `&'a T: !MyPredicate` to hold. This is similar to the
+// test `negative-coherence-placeholder-region-constraints-on-unification.explicit.stderr`
#![feature(negative_impls)]
#![cfg_attr(with_negative_coherence, feature(with_negative_coherence))]
diff --git a/tests/ui/coherence/coherence-negative-outlives-lifetimes.stock.stderr b/tests/ui/coherence/coherence-negative-outlives-lifetimes.stock.stderr
index 097cc4e0f..dbb22d893 100644
--- a/tests/ui/coherence/coherence-negative-outlives-lifetimes.stock.stderr
+++ b/tests/ui/coherence/coherence-negative-outlives-lifetimes.stock.stderr
@@ -1,11 +1,11 @@
error[E0119]: conflicting implementations of trait `MyTrait<'_>` for type `&_`
- --> $DIR/coherence-negative-outlives-lifetimes.rs:14:1
+ --> $DIR/coherence-negative-outlives-lifetimes.rs:18:1
|
LL | impl<'a, T: MyPredicate<'a>> MyTrait<'a> for T {}
| ---------------------------------------------- first implementation here
LL | impl<'a, T> MyTrait<'a> for &'a T {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr b/tests/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr
index 097cc4e0f..dbb22d893 100644
--- a/tests/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr
+++ b/tests/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr
@@ -1,11 +1,11 @@
error[E0119]: conflicting implementations of trait `MyTrait<'_>` for type `&_`
- --> $DIR/coherence-negative-outlives-lifetimes.rs:14:1
+ --> $DIR/coherence-negative-outlives-lifetimes.rs:18:1
|
LL | impl<'a, T: MyPredicate<'a>> MyTrait<'a> for T {}
| ---------------------------------------------- first implementation here
LL | impl<'a, T> MyTrait<'a> for &'a T {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-no-direct-lifetime-dispatch.stderr b/tests/ui/coherence/coherence-no-direct-lifetime-dispatch.stderr
index 8a43ad7b7..ca8d7a5c4 100644
--- a/tests/ui/coherence/coherence-no-direct-lifetime-dispatch.stderr
+++ b/tests/ui/coherence/coherence-no-direct-lifetime-dispatch.stderr
@@ -6,6 +6,6 @@ LL | impl<T> MyTrait for T {}
LL | impl<T: 'static> MyTrait for T {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-overlap-all-t-and-tuple.stderr b/tests/ui/coherence/coherence-overlap-all-t-and-tuple.stderr
index 6a0880334..a6e47d9f9 100644
--- a/tests/ui/coherence/coherence-overlap-all-t-and-tuple.stderr
+++ b/tests/ui/coherence/coherence-overlap-all-t-and-tuple.stderr
@@ -7,6 +7,6 @@ LL | impl <T> From<T> for T {
LL | impl <T11, U11> From<(U11,)> for (T11,) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(_,)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-overlap-downstream-inherent.rs b/tests/ui/coherence/coherence-overlap-downstream-inherent.rs
index 2c3ef4fd3..94a7ecbe1 100644
--- a/tests/ui/coherence/coherence-overlap-downstream-inherent.rs
+++ b/tests/ui/coherence/coherence-overlap-downstream-inherent.rs
@@ -1,5 +1,5 @@
// revisions: old next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// Tests that we consider `T: Sugar + Fruit` to be ambiguous, even
// though no impls are found.
diff --git a/tests/ui/coherence/coherence-overlap-downstream.rs b/tests/ui/coherence/coherence-overlap-downstream.rs
index a4e559604..171b2a32f 100644
--- a/tests/ui/coherence/coherence-overlap-downstream.rs
+++ b/tests/ui/coherence/coherence-overlap-downstream.rs
@@ -1,5 +1,5 @@
// revisions: old next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// Tests that we consider `T: Sugar + Fruit` to be ambiguous, even
// though no impls are found.
diff --git a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.next.stderr b/tests/ui/coherence/coherence-overlap-issue-23516-inherent.next.stderr
index c02a679c1..2f3ad6278 100644
--- a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.next.stderr
+++ b/tests/ui/coherence/coherence-overlap-issue-23516-inherent.next.stderr
@@ -9,6 +9,6 @@ LL | impl<U:Sugar> Cake<Box<U>> { fn dummy(&self) { } }
|
= note: downstream crates may implement trait `Sugar` for type `std::boxed::Box<_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0592`.
diff --git a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.old.stderr b/tests/ui/coherence/coherence-overlap-issue-23516-inherent.old.stderr
index c02a679c1..2f3ad6278 100644
--- a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.old.stderr
+++ b/tests/ui/coherence/coherence-overlap-issue-23516-inherent.old.stderr
@@ -9,6 +9,6 @@ LL | impl<U:Sugar> Cake<Box<U>> { fn dummy(&self) { } }
|
= note: downstream crates may implement trait `Sugar` for type `std::boxed::Box<_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0592`.
diff --git a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.rs b/tests/ui/coherence/coherence-overlap-issue-23516-inherent.rs
index a7c90a6b8..6f5cc9804 100644
--- a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.rs
+++ b/tests/ui/coherence/coherence-overlap-issue-23516-inherent.rs
@@ -1,5 +1,5 @@
// revisions: old next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// Tests that we consider `Box<U>: !Sugar` to be ambiguous, even
// though we see no impl of `Sugar` for `Box`. Therefore, an overlap
diff --git a/tests/ui/coherence/coherence-overlap-issue-23516.next.stderr b/tests/ui/coherence/coherence-overlap-issue-23516.next.stderr
index a4e87af8a..b94947740 100644
--- a/tests/ui/coherence/coherence-overlap-issue-23516.next.stderr
+++ b/tests/ui/coherence/coherence-overlap-issue-23516.next.stderr
@@ -8,6 +8,6 @@ LL | impl<U:Sugar> Sweet for Box<U> { }
|
= note: downstream crates may implement trait `Sugar` for type `std::boxed::Box<_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-overlap-issue-23516.old.stderr b/tests/ui/coherence/coherence-overlap-issue-23516.old.stderr
index a4e87af8a..b94947740 100644
--- a/tests/ui/coherence/coherence-overlap-issue-23516.old.stderr
+++ b/tests/ui/coherence/coherence-overlap-issue-23516.old.stderr
@@ -8,6 +8,6 @@ LL | impl<U:Sugar> Sweet for Box<U> { }
|
= note: downstream crates may implement trait `Sugar` for type `std::boxed::Box<_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-overlap-issue-23516.rs b/tests/ui/coherence/coherence-overlap-issue-23516.rs
index c846d3971..4daaed436 100644
--- a/tests/ui/coherence/coherence-overlap-issue-23516.rs
+++ b/tests/ui/coherence/coherence-overlap-issue-23516.rs
@@ -1,5 +1,5 @@
// revisions: old next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// Tests that we consider `Box<U>: !Sugar` to be ambiguous, even
// though we see no impl of `Sugar` for `Box`. Therefore, an overlap
diff --git a/tests/ui/coherence/coherence-overlap-negate-not-use-feature-gate.stderr b/tests/ui/coherence/coherence-overlap-negate-not-use-feature-gate.stderr
index 4b55001ec..21c82eedd 100644
--- a/tests/ui/coherence/coherence-overlap-negate-not-use-feature-gate.stderr
+++ b/tests/ui/coherence/coherence-overlap-negate-not-use-feature-gate.stderr
@@ -6,6 +6,6 @@ LL | impl<T: DerefMut> Foo for T {}
LL | impl<U> Foo for &U {}
| ^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-overlap-trait-alias.stderr b/tests/ui/coherence/coherence-overlap-trait-alias.stderr
index 687f3af00..4f277ad68 100644
--- a/tests/ui/coherence/coherence-overlap-trait-alias.stderr
+++ b/tests/ui/coherence/coherence-overlap-trait-alias.stderr
@@ -6,6 +6,6 @@ LL | impl<T: AB> C for T {}
LL | impl C for u32 {}
| ^^^^^^^^^^^^^^ conflicting implementation for `u32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-overlap-upstream-inherent.stderr b/tests/ui/coherence/coherence-overlap-upstream-inherent.stderr
index f355c6e85..65885ecac 100644
--- a/tests/ui/coherence/coherence-overlap-upstream-inherent.stderr
+++ b/tests/ui/coherence/coherence-overlap-upstream-inherent.stderr
@@ -9,6 +9,6 @@ LL | impl A<i16> { fn dummy(&self) { } }
|
= note: upstream crates may add a new impl of trait `coherence_lib::Remote` for type `i16` in future versions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0592`.
diff --git a/tests/ui/coherence/coherence-overlap-upstream.stderr b/tests/ui/coherence/coherence-overlap-upstream.stderr
index 8272c8875..212ef484a 100644
--- a/tests/ui/coherence/coherence-overlap-upstream.stderr
+++ b/tests/ui/coherence/coherence-overlap-upstream.stderr
@@ -8,6 +8,6 @@ LL | impl Foo for i16 {}
|
= note: upstream crates may add a new impl of trait `coherence_lib::Remote` for type `i16` in future versions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-overlap-with-regions.rs b/tests/ui/coherence/coherence-overlap-with-regions.rs
index 9945c8e6c..32f01f418 100644
--- a/tests/ui/coherence/coherence-overlap-with-regions.rs
+++ b/tests/ui/coherence/coherence-overlap-with-regions.rs
@@ -1,10 +1,4 @@
-// known-bug: unknown
-
-// This fails because we currently perform negative coherence in coherence mode.
-// This means that when looking for a negative predicate, we also assemble a
-// coherence-unknowable predicate. Since confirming the negative impl has region
-// obligations, we don't prefer the impl over the unknowable predicate
-// unconditionally and instead flounder.
+// check-pass
#![feature(negative_impls)]
#![feature(rustc_attrs)]
diff --git a/tests/ui/coherence/coherence-overlap-with-regions.stderr b/tests/ui/coherence/coherence-overlap-with-regions.stderr
deleted file mode 100644
index fd25f0978..000000000
--- a/tests/ui/coherence/coherence-overlap-with-regions.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0119]: conflicting implementations of trait `Bar` for type `&_`
- --> $DIR/coherence-overlap-with-regions.rs:20:1
- |
-LL | impl<T: Foo> Bar for T {}
- | ---------------------- first implementation here
-LL | impl<T> Bar for &T where T: 'static {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-overlapping-pairs.stderr b/tests/ui/coherence/coherence-overlapping-pairs.stderr
index 15c92dfeb..4d0a9c6ee 100644
--- a/tests/ui/coherence/coherence-overlapping-pairs.stderr
+++ b/tests/ui/coherence/coherence-overlapping-pairs.stderr
@@ -9,6 +9,6 @@ LL | impl<T> Remote for lib::Pair<T,Foo> { }
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/coherence-pair-covered-uncovered-1.stderr b/tests/ui/coherence/coherence-pair-covered-uncovered-1.stderr
index 03d787123..15cd66e9d 100644
--- a/tests/ui/coherence/coherence-pair-covered-uncovered-1.stderr
+++ b/tests/ui/coherence/coherence-pair-covered-uncovered-1.stderr
@@ -10,6 +10,6 @@ LL | impl<T, U> Remote1<Pair<T, Local<U>>> for i32 { }
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/coherence-pair-covered-uncovered.stderr b/tests/ui/coherence/coherence-pair-covered-uncovered.stderr
index 73dfe2f57..359dbe850 100644
--- a/tests/ui/coherence/coherence-pair-covered-uncovered.stderr
+++ b/tests/ui/coherence/coherence-pair-covered-uncovered.stderr
@@ -9,6 +9,6 @@ LL | impl<T,U> Remote for Pair<T,Local<U>> { }
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/coherence-projection-conflict-orphan.stderr b/tests/ui/coherence/coherence-projection-conflict-orphan.stderr
index b1ee0795b..976018993 100644
--- a/tests/ui/coherence/coherence-projection-conflict-orphan.stderr
+++ b/tests/ui/coherence/coherence-projection-conflict-orphan.stderr
@@ -9,6 +9,6 @@ LL | impl<A:Iterator> Foo<A::Item> for A { }
|
= note: upstream crates may add a new impl of trait `std::iter::Iterator` for type `i32` in future versions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-projection-conflict-ty-param.stderr b/tests/ui/coherence/coherence-projection-conflict-ty-param.stderr
index 94d242eaa..f074467bb 100644
--- a/tests/ui/coherence/coherence-projection-conflict-ty-param.stderr
+++ b/tests/ui/coherence/coherence-projection-conflict-ty-param.stderr
@@ -7,6 +7,6 @@ LL |
LL | impl<T, U> Foo<T> for Option<U> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Option<_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-projection-conflict.stderr b/tests/ui/coherence/coherence-projection-conflict.stderr
index 7d2c584c3..c916091e6 100644
--- a/tests/ui/coherence/coherence-projection-conflict.stderr
+++ b/tests/ui/coherence/coherence-projection-conflict.stderr
@@ -7,6 +7,6 @@ LL |
LL | impl<A:Bar> Foo<A::Output> for A { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-tuple-conflict.stderr b/tests/ui/coherence/coherence-tuple-conflict.stderr
index 09ad5e5b2..4e02c0eb4 100644
--- a/tests/ui/coherence/coherence-tuple-conflict.stderr
+++ b/tests/ui/coherence/coherence-tuple-conflict.stderr
@@ -7,6 +7,6 @@ LL | impl<T> MyTrait for (T,T) {
LL | impl<A,B> MyTrait for (A,B) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(_, _)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-unsafe-trait-object-impl.stderr b/tests/ui/coherence/coherence-unsafe-trait-object-impl.stderr
index a3a37fd27..4f898ec12 100644
--- a/tests/ui/coherence/coherence-unsafe-trait-object-impl.stderr
+++ b/tests/ui/coherence/coherence-unsafe-trait-object-impl.stderr
@@ -17,6 +17,6 @@ note: required by a bound in `takes_t`
LL | fn takes_t<S: Trait>(s: S) {
| ^^^^^ required by this bound in `takes_t`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/coherence/coherence-vec-local-2.stderr b/tests/ui/coherence/coherence-vec-local-2.stderr
index 95fdf172e..e4249710d 100644
--- a/tests/ui/coherence/coherence-vec-local-2.stderr
+++ b/tests/ui/coherence/coherence-vec-local-2.stderr
@@ -9,6 +9,6 @@ LL | impl<T> Remote for Vec<Local<T>> { }
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/coherence-vec-local.stderr b/tests/ui/coherence/coherence-vec-local.stderr
index 4835e771a..c465fb196 100644
--- a/tests/ui/coherence/coherence-vec-local.stderr
+++ b/tests/ui/coherence/coherence-vec-local.stderr
@@ -9,6 +9,6 @@ LL | impl Remote for Vec<Local> { }
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/coherence-wasm-bindgen.stderr b/tests/ui/coherence/coherence-wasm-bindgen.stderr
index 600cd42d8..b3c3dac61 100644
--- a/tests/ui/coherence/coherence-wasm-bindgen.stderr
+++ b/tests/ui/coherence/coherence-wasm-bindgen.stderr
@@ -23,5 +23,5 @@ note: the lint level is defined here
LL | #![deny(coherence_leak_check)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/coherence/coherence-where-clause.rs b/tests/ui/coherence/coherence-where-clause.rs
index 5c40def86..cd9a423f4 100644
--- a/tests/ui/coherence/coherence-where-clause.rs
+++ b/tests/ui/coherence/coherence-where-clause.rs
@@ -1,8 +1,6 @@
// run-pass
use std::fmt::Debug;
-use std::default::Default;
-
trait MyTrait {
fn get(&self) -> Self;
}
diff --git a/tests/ui/coherence/coherence-with-closure.stderr b/tests/ui/coherence/coherence-with-closure.stderr
index 431108e14..501279ffe 100644
--- a/tests/ui/coherence/coherence-with-closure.stderr
+++ b/tests/ui/coherence/coherence-with-closure.stderr
@@ -6,6 +6,6 @@ LL | impl Trait for Wrapper<OpaqueClosure> {}
LL | impl<T: Sync> Trait for Wrapper<T> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Wrapper<OpaqueClosure>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-with-coroutine.stock.stderr b/tests/ui/coherence/coherence-with-coroutine.stock.stderr
index b2a9135c5..9cf20ea49 100644
--- a/tests/ui/coherence/coherence-with-coroutine.stock.stderr
+++ b/tests/ui/coherence/coherence-with-coroutine.stock.stderr
@@ -6,6 +6,6 @@ LL | impl Trait for Wrapper<OpaqueCoroutine> {}
LL | impl<T: Sync> Trait for Wrapper<T> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Wrapper<OpaqueCoroutine>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.stderr b/tests/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.stderr
index 93486fa5f..50bbe12bc 100644
--- a/tests/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.stderr
+++ b/tests/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.stderr
@@ -9,6 +9,6 @@ LL | impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { }
|
= note: upstream crates may add a new impl of trait `lib::MyCopy` for type `lib::MyFundamentalStruct<(MyType,)>` in future versions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence_copy_like_err_struct.stderr b/tests/ui/coherence/coherence_copy_like_err_struct.stderr
index 7432733b9..715a825ce 100644
--- a/tests/ui/coherence/coherence_copy_like_err_struct.stderr
+++ b/tests/ui/coherence/coherence_copy_like_err_struct.stderr
@@ -9,6 +9,6 @@ LL | impl MyTrait for lib::MyStruct<MyType> { }
|
= note: upstream crates may add a new impl of trait `lib::MyCopy` for type `lib::MyStruct<MyType>` in future versions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence_copy_like_err_tuple.stderr b/tests/ui/coherence/coherence_copy_like_err_tuple.stderr
index 090497ec1..fbd293dba 100644
--- a/tests/ui/coherence/coherence_copy_like_err_tuple.stderr
+++ b/tests/ui/coherence/coherence_copy_like_err_tuple.stderr
@@ -9,6 +9,6 @@ LL | impl MyTrait for (MyType,) { }
|
= note: upstream crates may add a new impl of trait `lib::MyCopy` for type `(MyType,)` in future versions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence_inherent.stderr b/tests/ui/coherence/coherence_inherent.stderr
index b381b0680..da8c03847 100644
--- a/tests/ui/coherence/coherence_inherent.stderr
+++ b/tests/ui/coherence/coherence_inherent.stderr
@@ -10,6 +10,6 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f
LL + use Lib::TheTrait;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/coherence/coherence_inherent_cc.stderr b/tests/ui/coherence/coherence_inherent_cc.stderr
index 7b6cb7d43..d34f6fa21 100644
--- a/tests/ui/coherence/coherence_inherent_cc.stderr
+++ b/tests/ui/coherence/coherence_inherent_cc.stderr
@@ -10,6 +10,6 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f
LL + use coherence_inherent_cc_lib::TheTrait;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/coherence/coherence_local_err_struct.stderr b/tests/ui/coherence/coherence_local_err_struct.stderr
index afc6fc45d..96572b5a7 100644
--- a/tests/ui/coherence/coherence_local_err_struct.stderr
+++ b/tests/ui/coherence/coherence_local_err_struct.stderr
@@ -9,6 +9,6 @@ LL | impl lib::MyCopy for lib::MyStruct<MyType> { }
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/coherence_local_err_tuple.stderr b/tests/ui/coherence/coherence_local_err_tuple.stderr
index a4953859f..85a063bb3 100644
--- a/tests/ui/coherence/coherence_local_err_tuple.stderr
+++ b/tests/ui/coherence/coherence_local_err_tuple.stderr
@@ -9,6 +9,6 @@ LL | impl lib::MyCopy for (MyType,) { }
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/deep-bad-copy-reason.stderr b/tests/ui/coherence/deep-bad-copy-reason.stderr
index 7b6dd4b38..e79abe355 100644
--- a/tests/ui/coherence/deep-bad-copy-reason.stderr
+++ b/tests/ui/coherence/deep-bad-copy-reason.stderr
@@ -13,6 +13,6 @@ note: the `Copy` impl for `Interned<'tcx, ListS<T>>` requires that `OpaqueListCo
LL | pub struct List<'tcx, T>(Interned<'tcx, ListS<T>>);
| ^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0204`.
diff --git a/tests/ui/coherence/illegal-copy-bad-projection.stderr b/tests/ui/coherence/illegal-copy-bad-projection.stderr
index 8fed9ba23..2a74cb5a9 100644
--- a/tests/ui/coherence/illegal-copy-bad-projection.stderr
+++ b/tests/ui/coherence/illegal-copy-bad-projection.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `void` in this scope
LL | type Ptr = *const void;
| ^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/coherence/impl-foreign-for-foreign.stderr b/tests/ui/coherence/impl-foreign-for-foreign.stderr
index 93f7a6fdc..6c74b47a1 100644
--- a/tests/ui/coherence/impl-foreign-for-foreign.stderr
+++ b/tests/ui/coherence/impl-foreign-for-foreign.stderr
@@ -9,6 +9,6 @@ LL | impl Remote for i32 {
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/impl-foreign[foreign]-for-foreign.stderr b/tests/ui/coherence/impl-foreign[foreign]-for-foreign.stderr
index 65b3aa394..fe8a34b78 100644
--- a/tests/ui/coherence/impl-foreign[foreign]-for-foreign.stderr
+++ b/tests/ui/coherence/impl-foreign[foreign]-for-foreign.stderr
@@ -10,6 +10,6 @@ LL | impl Remote1<u32> for f64 {
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/coherence/impl[t]-foreign-for-fundamental[t].stderr b/tests/ui/coherence/impl[t]-foreign-for-fundamental[t].stderr
index 249a5c44c..12d9a807f 100644
--- a/tests/ui/coherence/impl[t]-foreign-for-fundamental[t].stderr
+++ b/tests/ui/coherence/impl[t]-foreign-for-fundamental[t].stderr
@@ -7,6 +7,6 @@ LL | impl<T> Remote for Box<T> {
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
= note: only traits defined in the current crate can be implemented for a type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/coherence/impl[t]-foreign[foreign]-for-t.stderr b/tests/ui/coherence/impl[t]-foreign[foreign]-for-t.stderr
index aed184767..6ca3ccd05 100644
--- a/tests/ui/coherence/impl[t]-foreign[foreign]-for-t.stderr
+++ b/tests/ui/coherence/impl[t]-foreign[foreign]-for-t.stderr
@@ -7,6 +7,6 @@ LL | impl<T> Remote1<u32> for T {
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
= note: only traits defined in the current crate can be implemented for a type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/coherence/impl[t]-foreign[local]-for-t.stderr b/tests/ui/coherence/impl[t]-foreign[local]-for-t.stderr
index d97e85dcb..1f3463e88 100644
--- a/tests/ui/coherence/impl[t]-foreign[local]-for-t.stderr
+++ b/tests/ui/coherence/impl[t]-foreign[local]-for-t.stderr
@@ -7,6 +7,6 @@ LL | impl<T> Remote1<Local> for T {
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type
= note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/coherence/impl[t]-foreign[t]-for-foreign.stderr b/tests/ui/coherence/impl[t]-foreign[t]-for-foreign.stderr
index 44e3b7eed..a1f393649 100644
--- a/tests/ui/coherence/impl[t]-foreign[t]-for-foreign.stderr
+++ b/tests/ui/coherence/impl[t]-foreign[t]-for-foreign.stderr
@@ -7,6 +7,6 @@ LL | impl<T> Remote1<T> for u32 {
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
= note: only traits defined in the current crate can be implemented for a type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/coherence/impl[t]-foreign[t]-for-t.stderr b/tests/ui/coherence/impl[t]-foreign[t]-for-t.stderr
index ff72969dc..acd84f711 100644
--- a/tests/ui/coherence/impl[t]-foreign[t]-for-t.stderr
+++ b/tests/ui/coherence/impl[t]-foreign[t]-for-t.stderr
@@ -7,6 +7,6 @@ LL | impl<T> Remote1<T> for T {
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
= note: only traits defined in the current crate can be implemented for a type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/coherence/inter-crate-ambiguity-causes-notes.next.stderr b/tests/ui/coherence/inter-crate-ambiguity-causes-notes.next.stderr
index 9b2dbc66c..74be598c4 100644
--- a/tests/ui/coherence/inter-crate-ambiguity-causes-notes.next.stderr
+++ b/tests/ui/coherence/inter-crate-ambiguity-causes-notes.next.stderr
@@ -12,6 +12,6 @@ LL | | I: Iterator<Item = ()>,
|
= note: upstream crates may add a new impl of trait `std::iter::Iterator` for type `()` in future versions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/inter-crate-ambiguity-causes-notes.old.stderr b/tests/ui/coherence/inter-crate-ambiguity-causes-notes.old.stderr
index 9b2dbc66c..74be598c4 100644
--- a/tests/ui/coherence/inter-crate-ambiguity-causes-notes.old.stderr
+++ b/tests/ui/coherence/inter-crate-ambiguity-causes-notes.old.stderr
@@ -12,6 +12,6 @@ LL | | I: Iterator<Item = ()>,
|
= note: upstream crates may add a new impl of trait `std::iter::Iterator` for type `()` in future versions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/inter-crate-ambiguity-causes-notes.rs b/tests/ui/coherence/inter-crate-ambiguity-causes-notes.rs
index 743e80d3f..0f785b4e5 100644
--- a/tests/ui/coherence/inter-crate-ambiguity-causes-notes.rs
+++ b/tests/ui/coherence/inter-crate-ambiguity-causes-notes.rs
@@ -1,5 +1,5 @@
// revisions: old next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
struct S;
diff --git a/tests/ui/coherence/negative-coherence-check-placeholder-outlives.rs b/tests/ui/coherence/negative-coherence-check-placeholder-outlives.rs
new file mode 100644
index 000000000..5d8beb451
--- /dev/null
+++ b/tests/ui/coherence/negative-coherence-check-placeholder-outlives.rs
@@ -0,0 +1,14 @@
+#![feature(negative_impls)]
+#![feature(with_negative_coherence)]
+
+struct Wrap<T>(T);
+
+trait Foo {}
+impl<T: 'static> !Foo for Box<T> {}
+
+trait Bar {}
+impl<T> Bar for T where T: Foo {}
+impl<T> Bar for Box<T> {}
+//~^ ERROR conflicting implementations of trait `Bar` for type `Box<_>`
+
+fn main() {}
diff --git a/tests/ui/coherence/negative-coherence-considering-regions.static_lt.stderr b/tests/ui/coherence/negative-coherence-check-placeholder-outlives.stderr
index 87e7be2aa..f515c39ea 100644
--- a/tests/ui/coherence/negative-coherence-considering-regions.static_lt.stderr
+++ b/tests/ui/coherence/negative-coherence-check-placeholder-outlives.stderr
@@ -1,12 +1,11 @@
-error[E0119]: conflicting implementations of trait `Bar` for type `&'static _`
- --> $DIR/negative-coherence-considering-regions.rs:26:1
+error[E0119]: conflicting implementations of trait `Bar` for type `Box<_>`
+ --> $DIR/negative-coherence-check-placeholder-outlives.rs:11:1
|
LL | impl<T> Bar for T where T: Foo {}
| ------------------------------ first implementation here
-...
-LL | impl<T> Bar for &'static T {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&'static _`
+LL | impl<T> Bar for Box<T> {}
+ | ^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Box<_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/negative-coherence-considering-regions.any_lt.stderr b/tests/ui/coherence/negative-coherence-considering-regions.any_lt.stderr
index 4cf50b4f2..f24de10f6 100644
--- a/tests/ui/coherence/negative-coherence-considering-regions.any_lt.stderr
+++ b/tests/ui/coherence/negative-coherence-considering-regions.any_lt.stderr
@@ -1,5 +1,5 @@
error[E0119]: conflicting implementations of trait `Bar` for type `&_`
- --> $DIR/negative-coherence-considering-regions.rs:22:1
+ --> $DIR/negative-coherence-considering-regions.rs:16:1
|
LL | impl<T> Bar for T where T: Foo {}
| ------------------------------ first implementation here
@@ -7,6 +7,6 @@ LL | impl<T> Bar for T where T: Foo {}
LL | impl<T> Bar for &T {}
| ^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/negative-coherence-considering-regions.rs b/tests/ui/coherence/negative-coherence-considering-regions.rs
index 597a59726..a43ad19ec 100644
--- a/tests/ui/coherence/negative-coherence-considering-regions.rs
+++ b/tests/ui/coherence/negative-coherence-considering-regions.rs
@@ -1,11 +1,5 @@
// revisions: any_lt static_lt
-//[static_lt] known-bug: unknown
-
-// This fails because we currently perform negative coherence in coherence mode.
-// This means that when looking for a negative predicate, we also assemble a
-// coherence-unknowable predicate. Since confirming the negative impl has region
-// obligations, we don't prefer the impl over the unknowable predicate
-// unconditionally and instead flounder.
+//[static_lt] check-pass
#![feature(negative_impls)]
#![feature(with_negative_coherence)]
diff --git a/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.explicit.stderr b/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.explicit.stderr
new file mode 100644
index 000000000..5368db293
--- /dev/null
+++ b/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.explicit.stderr
@@ -0,0 +1,19 @@
+error: conflicting implementations of trait `FnMarker` for type `fn(&_)`
+ --> $DIR/negative-coherence-placeholder-region-constraints-on-unification.rs:21:1
+ |
+LL | impl<T: ?Sized + Marker> FnMarker for fn(T) {}
+ | ------------------------------------------- first implementation here
+LL | impl<T: ?Sized> FnMarker for fn(&T) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `fn(&_)`
+ |
+ = 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 #56105 <https://github.com/rust-lang/rust/issues/56105>
+ = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
+note: the lint level is defined here
+ --> $DIR/negative-coherence-placeholder-region-constraints-on-unification.rs:4:11
+ |
+LL | #![forbid(coherence_leak_check)]
+ | ^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.rs b/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.rs
new file mode 100644
index 000000000..26d9d84d8
--- /dev/null
+++ b/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.rs
@@ -0,0 +1,25 @@
+// revisions: explicit implicit
+//[implicit] check-pass
+
+#![forbid(coherence_leak_check)]
+#![feature(negative_impls, with_negative_coherence)]
+
+pub trait Marker {}
+
+#[cfg(implicit)]
+impl<T: ?Sized> !Marker for &T {}
+
+#[cfg(explicit)]
+impl<'a, T: ?Sized + 'a> !Marker for &'a T {}
+
+trait FnMarker {}
+
+// Unifying these two impls below results in a `T: '!0` obligation
+// that we shouldn't need to care about. Ideally, we'd treat that
+// as an assumption when proving `&'!0 T: Marker`...
+impl<T: ?Sized + Marker> FnMarker for fn(T) {}
+impl<T: ?Sized> FnMarker for fn(&T) {}
+//[explicit]~^ ERROR conflicting implementations of trait `FnMarker` for type `fn(&_)`
+//[explicit]~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+
+fn main() {}
diff --git a/tests/ui/coherence/normalize-for-errors.current.stderr b/tests/ui/coherence/normalize-for-errors.current.stderr
new file mode 100644
index 000000000..0e48aaed8
--- /dev/null
+++ b/tests/ui/coherence/normalize-for-errors.current.stderr
@@ -0,0 +1,14 @@
+error[E0119]: conflicting implementations of trait `MyTrait<_>` for type `(Box<(MyType,)>, _)`
+ --> $DIR/normalize-for-errors.rs:16:1
+ |
+LL | impl<T: Copy, S: Iterator> MyTrait<S> for (T, S::Item) {}
+ | ------------------------------------------------------ first implementation here
+LL |
+LL | impl<S: Iterator> MyTrait<S> for (Box<<(MyType,) as Mirror>::Assoc>, S::Item) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(Box<(MyType,)>, _)`
+ |
+ = note: upstream crates may add a new impl of trait `std::marker::Copy` for type `std::boxed::Box<(MyType,)>` in future versions
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/normalize-for-errors.next.stderr b/tests/ui/coherence/normalize-for-errors.next.stderr
new file mode 100644
index 000000000..a8a7d437b
--- /dev/null
+++ b/tests/ui/coherence/normalize-for-errors.next.stderr
@@ -0,0 +1,14 @@
+error[E0119]: conflicting implementations of trait `MyTrait<_>` for type `(Box<(MyType,)>, <_ as Iterator>::Item)`
+ --> $DIR/normalize-for-errors.rs:16:1
+ |
+LL | impl<T: Copy, S: Iterator> MyTrait<S> for (T, S::Item) {}
+ | ------------------------------------------------------ first implementation here
+LL |
+LL | impl<S: Iterator> MyTrait<S> for (Box<<(MyType,) as Mirror>::Assoc>, S::Item) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(Box<(MyType,)>, <_ as Iterator>::Item)`
+ |
+ = note: upstream crates may add a new impl of trait `std::marker::Copy` for type `std::boxed::Box<(MyType,)>` in future versions
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/normalize-for-errors.rs b/tests/ui/coherence/normalize-for-errors.rs
new file mode 100644
index 000000000..30723518b
--- /dev/null
+++ b/tests/ui/coherence/normalize-for-errors.rs
@@ -0,0 +1,21 @@
+// revisions: current next
+//[next] compile-flags: -Znext-solver
+
+struct MyType;
+trait MyTrait<S> {}
+
+trait Mirror {
+ type Assoc;
+}
+impl<T> Mirror for T {
+ type Assoc = T;
+}
+
+impl<T: Copy, S: Iterator> MyTrait<S> for (T, S::Item) {}
+//~^ NOTE first implementation here
+impl<S: Iterator> MyTrait<S> for (Box<<(MyType,) as Mirror>::Assoc>, S::Item) {}
+//~^ ERROR conflicting implementations of trait `MyTrait<_>` for type `(Box<(MyType,)>,
+//~| NOTE conflicting implementation for `(Box<(MyType,)>,
+//~| NOTE upstream crates may add a new impl of trait `std::marker::Copy` for type `std::boxed::Box<(MyType,)>` in future versions
+
+fn main() {}
diff --git a/tests/ui/coherence/occurs-check/associated-type.next.stderr b/tests/ui/coherence/occurs-check/associated-type.next.stderr
new file mode 100644
index 000000000..f64e8b397
--- /dev/null
+++ b/tests/ui/coherence/occurs-check/associated-type.next.stderr
@@ -0,0 +1,25 @@
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, RePlaceholder(!2_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, RePlaceholder(!2_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, RePlaceholder(!2_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, RePlaceholder(!2_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+error[E0119]: conflicting implementations of trait `Overlap<for<'a> fn(&'a (), ())>` for type `for<'a> fn(&'a (), ())`
+ --> $DIR/associated-type.rs:31:1
+ |
+LL | impl<T> Overlap<T> for T {
+ | ------------------------ first implementation here
+...
+LL | / impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T
+LL | |
+LL | | where
+LL | | for<'a> *const T: ToUnit<'a>,
+ | |_________________________________^ conflicting implementation for `for<'a> fn(&'a (), ())`
+ |
+ = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/occurs-check/associated-type.old.stderr b/tests/ui/coherence/occurs-check/associated-type.old.stderr
new file mode 100644
index 000000000..8e852ec79
--- /dev/null
+++ b/tests/ui/coherence/occurs-check/associated-type.old.stderr
@@ -0,0 +1,25 @@
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, RePlaceholder(!3_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, RePlaceholder(!3_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, RePlaceholder(!3_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Projection, AliasTy { args: [*const ?1t, RePlaceholder(!3_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) })
+error[E0119]: conflicting implementations of trait `Overlap<for<'a> fn(&'a (), _)>` for type `for<'a> fn(&'a (), _)`
+ --> $DIR/associated-type.rs:31:1
+ |
+LL | impl<T> Overlap<T> for T {
+ | ------------------------ first implementation here
+...
+LL | / impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T
+LL | |
+LL | | where
+LL | | for<'a> *const T: ToUnit<'a>,
+ | |_________________________________^ conflicting implementation for `for<'a> fn(&'a (), _)`
+ |
+ = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/occurs-check/associated-type.rs b/tests/ui/coherence/occurs-check/associated-type.rs
new file mode 100644
index 000000000..227b66847
--- /dev/null
+++ b/tests/ui/coherence/occurs-check/associated-type.rs
@@ -0,0 +1,45 @@
+// revisions: old next
+//[next] compile-flags: -Znext-solver
+
+// A regression test for #105787
+
+// Using the higher ranked projection hack to prevent us from replacing the projection
+// with an inference variable.
+trait ToUnit<'a> {
+ type Unit;
+}
+
+struct LocalTy;
+impl<'a> ToUnit<'a> for *const LocalTy {
+ type Unit = ();
+}
+
+impl<'a, T: Copy + ?Sized> ToUnit<'a> for *const T {
+ type Unit = ();
+}
+
+trait Overlap<T> {
+ type Assoc;
+}
+
+type Assoc<'a, T> = <*const T as ToUnit<'a>>::Unit;
+
+impl<T> Overlap<T> for T {
+ type Assoc = usize;
+}
+
+impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T
+//~^ ERROR conflicting implementations of trait
+where
+ for<'a> *const T: ToUnit<'a>,
+{
+ type Assoc = Box<usize>;
+}
+
+fn foo<T: Overlap<U>, U>(x: T::Assoc) -> T::Assoc {
+ x
+}
+
+fn main() {
+ foo::<for<'a> fn(&'a (), ()), for<'a> fn(&'a (), ())>(3usize);
+}
diff --git a/tests/ui/coherence/occurs-check/opaques.next.stderr b/tests/ui/coherence/occurs-check/opaques.next.stderr
new file mode 100644
index 000000000..428ee902e
--- /dev/null
+++ b/tests/ui/coherence/occurs-check/opaques.next.stderr
@@ -0,0 +1,12 @@
+error[E0119]: conflicting implementations of trait `Trait<Alias<_>>` for type `Alias<_>`
+ --> $DIR/opaques.rs:29:1
+ |
+LL | impl<T> Trait<T> for T {
+ | ---------------------- first implementation here
+...
+LL | impl<T> Trait<T> for defining_scope::Alias<T> {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Alias<_>`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/occurs-check/opaques.rs b/tests/ui/coherence/occurs-check/opaques.rs
new file mode 100644
index 000000000..2fa9dcebf
--- /dev/null
+++ b/tests/ui/coherence/occurs-check/opaques.rs
@@ -0,0 +1,37 @@
+//revisions: old next
+//[next] compile-flags: -Znext-solver
+
+// A regression test for #105787
+
+//[old] known-bug: #105787
+//[old] check-pass
+#![feature(type_alias_impl_trait)]
+mod defining_scope {
+ use super::*;
+ pub type Alias<T> = impl Sized;
+
+ pub fn cast<T>(x: Container<Alias<T>, T>) -> Container<T, T> {
+ x
+ }
+}
+
+struct Container<T: Trait<U>, U> {
+ x: <T as Trait<U>>::Assoc,
+}
+
+trait Trait<T> {
+ type Assoc;
+}
+
+impl<T> Trait<T> for T {
+ type Assoc = Box<u32>;
+}
+impl<T> Trait<T> for defining_scope::Alias<T> {
+ //[next]~^ ERROR conflicting implementations of trait
+ type Assoc = usize;
+}
+
+fn main() {
+ let x: Box<u32> = defining_scope::cast::<()>(Container { x: 0 }).x;
+ println!("{}", *x);
+}
diff --git a/tests/ui/coherence/strict-coherence-needs-negative-coherence.stderr b/tests/ui/coherence/strict-coherence-needs-negative-coherence.stderr
index b54729287..82804e8ba 100644
--- a/tests/ui/coherence/strict-coherence-needs-negative-coherence.stderr
+++ b/tests/ui/coherence/strict-coherence-needs-negative-coherence.stderr
@@ -6,5 +6,5 @@ LL | #[rustc_strict_coherence]
LL | trait Foo {}
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr b/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr
index 4f32639a6..4535b6f68 100644
--- a/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr
+++ b/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr
@@ -22,7 +22,7 @@ note: the lint level is defined here
LL | #![deny(coinductive_overlap_in_coherence)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
Future incompatibility report: Future breakage diagnostic:
error: implementations of `PartialEq<Interval<_>>` for `Interval<_>` will conflict in the future
diff --git a/tests/ui/coinduction/canonicalization-rerun.rs b/tests/ui/coinduction/canonicalization-rerun.rs
index c68895fc4..bbd8d8026 100644
--- a/tests/ui/coinduction/canonicalization-rerun.rs
+++ b/tests/ui/coinduction/canonicalization-rerun.rs
@@ -1,6 +1,6 @@
// check-pass
// revisions: old next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// If we use canonical goals during trait solving we have to reevaluate
// the root goal of a cycle until we hit a fixpoint.
diff --git a/tests/ui/command-line-diagnostics.stderr b/tests/ui/command-line-diagnostics.stderr
index 6223ad880..b719a00ad 100644
--- a/tests/ui/command-line-diagnostics.stderr
+++ b/tests/ui/command-line-diagnostics.stderr
@@ -9,6 +9,6 @@ LL | let x = 42;
LL | x = 43;
| ^^^^^^ cannot assign twice to immutable variable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0384`.
diff --git a/tests/ui/command/need-crate-arg-ignore-tidy.x.stderr b/tests/ui/command/need-crate-arg-ignore-tidy.x.stderr
index 305f76694..89f7210c0 100644
--- a/tests/ui/command/need-crate-arg-ignore-tidy.x.stderr
+++ b/tests/ui/command/need-crate-arg-ignore-tidy.x.stderr
@@ -2,5 +2,5 @@ error: invalid character `'.'` in crate name: `need_crate_arg_ignore_tidy.x`
|
= help: you can either pass `--crate-name` on the command line or add `#![crate_name="…"]` to set the crate name
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/compare-method/proj-outlives-region.stderr b/tests/ui/compare-method/proj-outlives-region.stderr
index 797a81679..b349e24f5 100644
--- a/tests/ui/compare-method/proj-outlives-region.stderr
+++ b/tests/ui/compare-method/proj-outlives-region.stderr
@@ -7,6 +7,6 @@ LL | fn foo() where T: 'a;
LL | fn foo() where U: 'a { }
| ^^ impl has extra requirement `U: 'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0276`.
diff --git a/tests/ui/compare-method/region-extra-2.stderr b/tests/ui/compare-method/region-extra-2.stderr
index eb19d57ab..3f55f6731 100644
--- a/tests/ui/compare-method/region-extra-2.stderr
+++ b/tests/ui/compare-method/region-extra-2.stderr
@@ -12,6 +12,6 @@ help: copy the `where` clause predicates from the trait
LL | fn renew<'b: 'a>(self) -> &'b mut [T] where 'b: 'a {
| ~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0276`.
diff --git a/tests/ui/compare-method/region-extra.stderr b/tests/ui/compare-method/region-extra.stderr
index 1a471e18d..065b3c152 100644
--- a/tests/ui/compare-method/region-extra.stderr
+++ b/tests/ui/compare-method/region-extra.stderr
@@ -13,6 +13,6 @@ LL - fn foo() where 'a: 'b { }
LL + fn foo() { }
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0276`.
diff --git a/tests/ui/compare-method/region-unrelated.stderr b/tests/ui/compare-method/region-unrelated.stderr
index f7ae6f944..75a4d51ce 100644
--- a/tests/ui/compare-method/region-unrelated.stderr
+++ b/tests/ui/compare-method/region-unrelated.stderr
@@ -7,6 +7,6 @@ LL | fn foo() where T: 'a;
LL | fn foo() where V: 'a { }
| ^^ impl has extra requirement `V: 'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0276`.
diff --git a/tests/ui/compare-method/reordered-type-param.stderr b/tests/ui/compare-method/reordered-type-param.stderr
index 1552d542d..8a439acee 100644
--- a/tests/ui/compare-method/reordered-type-param.stderr
+++ b/tests/ui/compare-method/reordered-type-param.stderr
@@ -19,6 +19,6 @@ LL | fn b<C:Clone,D>(&self, x: C) -> C;
= note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
= note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0053`.
diff --git a/tests/ui/compare-method/trait-bound-on-type-parameter.stderr b/tests/ui/compare-method/trait-bound-on-type-parameter.stderr
index ce6885c15..0899d5406 100644
--- a/tests/ui/compare-method/trait-bound-on-type-parameter.stderr
+++ b/tests/ui/compare-method/trait-bound-on-type-parameter.stderr
@@ -7,6 +7,6 @@ LL | fn b<C,D>(&self, x: C) -> C;
LL | fn b<F: Sync, G>(&self, _x: F) -> F { panic!() }
| ^^^^ impl has extra requirement `F: Sync`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0276`.
diff --git a/tests/ui/compare-method/traits-misc-mismatch-2.stderr b/tests/ui/compare-method/traits-misc-mismatch-2.stderr
index 36bb764d4..b8d3fd02a 100644
--- a/tests/ui/compare-method/traits-misc-mismatch-2.stderr
+++ b/tests/ui/compare-method/traits-misc-mismatch-2.stderr
@@ -7,6 +7,6 @@ LL | fn zip<B, U: Iterator<U>>(self, other: U) -> ZipIterator<Self, U>;
LL | fn zip<B, U: Iterator<B>>(self, other: U) -> ZipIterator<T, U> {
| ^^^^^^^^^^^ impl has extra requirement `U: Iterator<B>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0276`.
diff --git a/tests/ui/compile_error_macro.stderr b/tests/ui/compile_error_macro.stderr
index 91ebcaa6e..92d5564e8 100644
--- a/tests/ui/compile_error_macro.stderr
+++ b/tests/ui/compile_error_macro.stderr
@@ -4,5 +4,5 @@ error: a very descriptive error message
LL | compile_error!("a very descriptive error message");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/conditional-compilation/cfg-attr-cfg-2.stderr b/tests/ui/conditional-compilation/cfg-attr-cfg-2.stderr
index d61872c48..5f7fea096 100644
--- a/tests/ui/conditional-compilation/cfg-attr-cfg-2.stderr
+++ b/tests/ui/conditional-compilation/cfg-attr-cfg-2.stderr
@@ -4,6 +4,6 @@ error[E0601]: `main` function not found in crate `cfg_attr_cfg_2`
LL | fn main() { }
| ^ consider adding a `main` function to `$DIR/cfg-attr-cfg-2.rs`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0601`.
diff --git a/tests/ui/conditional-compilation/cfg-attr-crate-2.stderr b/tests/ui/conditional-compilation/cfg-attr-crate-2.stderr
index 4997ca4db..82dc43619 100644
--- a/tests/ui/conditional-compilation/cfg-attr-crate-2.stderr
+++ b/tests/ui/conditional-compilation/cfg-attr-crate-2.stderr
@@ -7,6 +7,6 @@ LL | #![cfg_attr(broken, no_core)]
= note: see issue #29639 <https://github.com/rust-lang/rust/issues/29639> for more information
= help: add `#![feature(no_core)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/conditional-compilation/cfg-attr-invalid-predicate.stderr b/tests/ui/conditional-compilation/cfg-attr-invalid-predicate.stderr
index 96c571ebe..2033894b3 100644
--- a/tests/ui/conditional-compilation/cfg-attr-invalid-predicate.stderr
+++ b/tests/ui/conditional-compilation/cfg-attr-invalid-predicate.stderr
@@ -4,6 +4,6 @@ error[E0537]: invalid predicate `foo`
LL | #[cfg(foo(bar))]
| ^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0537`.
diff --git a/tests/ui/conditional-compilation/cfg-attr-multi-invalid-1.stderr b/tests/ui/conditional-compilation/cfg-attr-multi-invalid-1.stderr
index c8762d15d..daba4eb1a 100644
--- a/tests/ui/conditional-compilation/cfg-attr-multi-invalid-1.stderr
+++ b/tests/ui/conditional-compilation/cfg-attr-multi-invalid-1.stderr
@@ -7,6 +7,6 @@ LL | #![cfg_attr(broken, no_core, no_std)]
= note: see issue #29639 <https://github.com/rust-lang/rust/issues/29639> for more information
= help: add `#![feature(no_core)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/conditional-compilation/cfg-attr-multi-invalid-2.stderr b/tests/ui/conditional-compilation/cfg-attr-multi-invalid-2.stderr
index e75b1c5b4..675792d2e 100644
--- a/tests/ui/conditional-compilation/cfg-attr-multi-invalid-2.stderr
+++ b/tests/ui/conditional-compilation/cfg-attr-multi-invalid-2.stderr
@@ -7,6 +7,6 @@ LL | #![cfg_attr(broken, no_std, no_core)]
= note: see issue #29639 <https://github.com/rust-lang/rust/issues/29639> for more information
= help: add `#![feature(no_core)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/conditional-compilation/cfg-attr-unknown-attribute-macro-expansion.stderr b/tests/ui/conditional-compilation/cfg-attr-unknown-attribute-macro-expansion.stderr
index fc8df6552..c91ad128d 100644
--- a/tests/ui/conditional-compilation/cfg-attr-unknown-attribute-macro-expansion.stderr
+++ b/tests/ui/conditional-compilation/cfg-attr-unknown-attribute-macro-expansion.stderr
@@ -9,5 +9,5 @@ LL | foo!();
|
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/conditional-compilation/cfg-in-crate-1.stderr b/tests/ui/conditional-compilation/cfg-in-crate-1.stderr
index ff72c43ef..98be6d01f 100644
--- a/tests/ui/conditional-compilation/cfg-in-crate-1.stderr
+++ b/tests/ui/conditional-compilation/cfg-in-crate-1.stderr
@@ -4,6 +4,6 @@ error[E0601]: `main` function not found in crate `cfg_in_crate_1`
LL | #![cfg(bar)]
| ^ consider adding a `main` function to `$DIR/cfg-in-crate-1.rs`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0601`.
diff --git a/tests/ui/conditional-compilation/cfg_accessible-stuck.stderr b/tests/ui/conditional-compilation/cfg_accessible-stuck.stderr
index 33af7d625..22ed1c5a3 100644
--- a/tests/ui/conditional-compilation/cfg_accessible-stuck.stderr
+++ b/tests/ui/conditional-compilation/cfg_accessible-stuck.stderr
@@ -4,5 +4,5 @@ error: cannot determine whether the path is accessible or not
LL | #[cfg_accessible(S)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/conditional-compilation/cfg_accessible-unstable.stderr b/tests/ui/conditional-compilation/cfg_accessible-unstable.stderr
index 2f55b9559..f03441909 100644
--- a/tests/ui/conditional-compilation/cfg_accessible-unstable.stderr
+++ b/tests/ui/conditional-compilation/cfg_accessible-unstable.stderr
@@ -7,6 +7,6 @@ LL | #[cfg_accessible(std)]
= note: see issue #64797 <https://github.com/rust-lang/rust/issues/64797> for more information
= help: add `#![feature(cfg_accessible)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/conditional-compilation/test-cfg.stderr b/tests/ui/conditional-compilation/test-cfg.stderr
index c35fe2f94..9715f16ac 100644
--- a/tests/ui/conditional-compilation/test-cfg.stderr
+++ b/tests/ui/conditional-compilation/test-cfg.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find function `foo` in this scope
LL | foo();
| ^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/confuse-field-and-method/issue-18343.stderr b/tests/ui/confuse-field-and-method/issue-18343.stderr
index 1c9a6847c..a51fd4f02 100644
--- a/tests/ui/confuse-field-and-method/issue-18343.stderr
+++ b/tests/ui/confuse-field-and-method/issue-18343.stderr
@@ -12,6 +12,6 @@ help: to call the function stored in `closure`, surround the field access with p
LL | (o.closure)();
| + +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/confuse-field-and-method/issue-32128.stderr b/tests/ui/confuse-field-and-method/issue-32128.stderr
index 4b96bce8d..3d860d8c8 100644
--- a/tests/ui/confuse-field-and-method/issue-32128.stderr
+++ b/tests/ui/confuse-field-and-method/issue-32128.stderr
@@ -12,6 +12,6 @@ help: to call the function stored in `example`, surround the field access with p
LL | (demo.example)(1);
| + +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/confuse-field-and-method/private-field.stderr b/tests/ui/confuse-field-and-method/private-field.stderr
index 783378f8d..142c84504 100644
--- a/tests/ui/confuse-field-and-method/private-field.stderr
+++ b/tests/ui/confuse-field-and-method/private-field.stderr
@@ -7,6 +7,6 @@ LL | pub struct Dog {
LL | let dog_age = dog.dog_age();
| ^^^^^^^ private field, not a method
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/conservative_impl_trait.stderr b/tests/ui/conservative_impl_trait.stderr
index 63a4df242..eecdb6f92 100644
--- a/tests/ui/conservative_impl_trait.stderr
+++ b/tests/ui/conservative_impl_trait.stderr
@@ -6,6 +6,6 @@ LL | fn will_ice(something: &u32) -> impl Iterator<Item = &u32> {
|
= help: the trait `Iterator` is not implemented for `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/const-generics/adt_const_params/const_param_ty_bad_empty_array.stderr b/tests/ui/const-generics/adt_const_params/const_param_ty_bad_empty_array.stderr
index ef55242df..1177965d0 100644
--- a/tests/ui/const-generics/adt_const_params/const_param_ty_bad_empty_array.stderr
+++ b/tests/ui/const-generics/adt_const_params/const_param_ty_bad_empty_array.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `check`
LL | fn check<T: std::marker::ConstParamTy>() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `check`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/const-generics/assoc_const_eq_diagnostic.rs b/tests/ui/const-generics/assoc_const_eq_diagnostic.rs
index bf8202ac1..d51696f9e 100644
--- a/tests/ui/const-generics/assoc_const_eq_diagnostic.rs
+++ b/tests/ui/const-generics/assoc_const_eq_diagnostic.rs
@@ -9,9 +9,9 @@ pub trait Parse {
}
pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
-//~^ ERROR expected associated constant bound
-//~| ERROR expected associated constant bound
-//~| ERROR expected type
+//~^ ERROR expected type, found variant
+//~| ERROR expected constant, found type
+//~| ERROR expected constant, found type
fn no_help() -> Mode::Cool {}
//~^ ERROR expected type, found variant
diff --git a/tests/ui/const-generics/assoc_const_eq_diagnostic.stderr b/tests/ui/const-generics/assoc_const_eq_diagnostic.stderr
index 6d5cd4547..3d724bb16 100644
--- a/tests/ui/const-generics/assoc_const_eq_diagnostic.stderr
+++ b/tests/ui/const-generics/assoc_const_eq_diagnostic.stderr
@@ -16,30 +16,42 @@ LL | fn no_help() -> Mode::Cool {}
| not a type
| help: try using the variant's enum: `Mode`
-error: expected associated constant bound, found type
- --> $DIR/assoc_const_eq_diagnostic.rs:11:28
+error: expected constant, found type
+ --> $DIR/assoc_const_eq_diagnostic.rs:11:35
|
LL | pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
- | ^^^^^^^^^^^^^^^^^ help: if equating a const, try wrapping with braces: `MODE = { const }`
+ | ---- ^^^^^^^^^^ unexpected type
+ | |
+ | expected a constant because of this associated constant
|
-note: associated constant defined here
+note: the associated constant is defined here
--> $DIR/assoc_const_eq_diagnostic.rs:8:5
|
LL | const MODE: Mode;
| ^^^^^^^^^^^^^^^^
+help: consider adding braces here
+ |
+LL | pub trait CoolStuff: Parse<MODE = { Mode::Cool }> {}
+ | + +
-error: expected associated constant bound, found type
- --> $DIR/assoc_const_eq_diagnostic.rs:11:28
+error: expected constant, found type
+ --> $DIR/assoc_const_eq_diagnostic.rs:11:35
|
LL | pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
- | ^^^^^^^^^^^^^^^^^ help: if equating a const, try wrapping with braces: `MODE = { const }`
+ | ---- ^^^^^^^^^^ unexpected type
+ | |
+ | expected a constant because of this associated constant
|
-note: associated constant defined here
+note: the associated constant is defined here
--> $DIR/assoc_const_eq_diagnostic.rs:8:5
|
LL | const MODE: Mode;
| ^^^^^^^^^^^^^^^^
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: consider adding braces here
+ |
+LL | pub trait CoolStuff: Parse<MODE = { Mode::Cool }> {}
+ | + +
error: aborting due to 4 previous errors
diff --git a/tests/ui/const-generics/associated-type-bound-fail.stderr b/tests/ui/const-generics/associated-type-bound-fail.stderr
index e5e7ee26e..602a8927a 100644
--- a/tests/ui/const-generics/associated-type-bound-fail.stderr
+++ b/tests/ui/const-generics/associated-type-bound-fail.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `Foo::Assoc`
LL | type Assoc: Bar<N>;
| ^^^^^^ required by this bound in `Foo::Assoc`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/const-generics/bad-generic-in-copy-impl.stderr b/tests/ui/const-generics/bad-generic-in-copy-impl.stderr
index 25701ce68..d60d8ec0e 100644
--- a/tests/ui/const-generics/bad-generic-in-copy-impl.stderr
+++ b/tests/ui/const-generics/bad-generic-in-copy-impl.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | x: [u8; SIZE],
| ^^^^ expected `usize`, found `u32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/bad-subst-const-kind.stderr b/tests/ui/const-generics/bad-subst-const-kind.stderr
index bd24f9140..6f5bc567c 100644
--- a/tests/ui/const-generics/bad-subst-const-kind.stderr
+++ b/tests/ui/const-generics/bad-subst-const-kind.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | impl<const N: u64> Q for [u8; N] {
| ^ expected `usize`, found `u64`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/const-arg-in-const-arg.min.stderr b/tests/ui/const-generics/const-arg-in-const-arg.min.stderr
index f1f22e234..ce7fce259 100644
--- a/tests/ui/const-generics/const-arg-in-const-arg.min.stderr
+++ b/tests/ui/const-generics/const-arg-in-const-arg.min.stderr
@@ -5,7 +5,7 @@ LL | let _: [u8; foo::<T>()];
| ^ cannot perform const operation using `T`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:16:23
@@ -14,7 +14,7 @@ LL | let _: [u8; bar::<N>()];
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:18:23
@@ -23,7 +23,7 @@ LL | let _: [u8; faz::<'a>(&())];
| ^^ cannot perform const operation using `'a`
|
= note: lifetime parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:20:23
@@ -32,7 +32,7 @@ LL | let _: [u8; baz::<'a>(&())];
| ^^ cannot perform const operation using `'a`
|
= note: lifetime parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:21:23
@@ -41,7 +41,7 @@ LL | let _: [u8; faz::<'b>(&())];
| ^^ cannot perform const operation using `'b`
|
= note: lifetime parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:23:23
@@ -50,7 +50,7 @@ LL | let _: [u8; baz::<'b>(&())];
| ^^ cannot perform const operation using `'b`
|
= note: lifetime parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:26:23
@@ -59,7 +59,7 @@ LL | let _ = [0; bar::<N>()];
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:28:23
@@ -68,7 +68,7 @@ LL | let _ = [0; faz::<'a>(&())];
| ^^ cannot perform const operation using `'a`
|
= note: lifetime parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:30:23
@@ -77,7 +77,7 @@ LL | let _ = [0; baz::<'a>(&())];
| ^^ cannot perform const operation using `'a`
|
= note: lifetime parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:31:23
@@ -86,7 +86,7 @@ LL | let _ = [0; faz::<'b>(&())];
| ^^ cannot perform const operation using `'b`
|
= note: lifetime parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:33:23
@@ -95,7 +95,7 @@ LL | let _ = [0; baz::<'b>(&())];
| ^^ cannot perform const operation using `'b`
|
= note: lifetime parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:34:24
@@ -104,7 +104,7 @@ LL | let _: Foo<{ foo::<T>() }>;
| ^ cannot perform const operation using `T`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:35:24
@@ -113,7 +113,7 @@ LL | let _: Foo<{ bar::<N>() }>;
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:37:24
@@ -122,7 +122,7 @@ LL | let _: Foo<{ faz::<'a>(&()) }>;
| ^^ cannot perform const operation using `'a`
|
= note: lifetime parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:39:24
@@ -131,7 +131,7 @@ LL | let _: Foo<{ baz::<'a>(&()) }>;
| ^^ cannot perform const operation using `'a`
|
= note: lifetime parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:40:24
@@ -140,7 +140,7 @@ LL | let _: Foo<{ faz::<'b>(&()) }>;
| ^^ cannot perform const operation using `'b`
|
= note: lifetime parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:42:24
@@ -149,7 +149,7 @@ LL | let _: Foo<{ baz::<'b>(&()) }>;
| ^^ cannot perform const operation using `'b`
|
= note: lifetime parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:43:27
@@ -158,7 +158,7 @@ LL | let _ = Foo::<{ foo::<T>() }>;
| ^ cannot perform const operation using `T`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:44:27
@@ -167,7 +167,7 @@ LL | let _ = Foo::<{ bar::<N>() }>;
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:46:27
@@ -176,7 +176,7 @@ LL | let _ = Foo::<{ faz::<'a>(&()) }>;
| ^^ cannot perform const operation using `'a`
|
= note: lifetime parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:48:27
@@ -185,7 +185,7 @@ LL | let _ = Foo::<{ baz::<'a>(&()) }>;
| ^^ cannot perform const operation using `'a`
|
= note: lifetime parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:49:27
@@ -194,7 +194,7 @@ LL | let _ = Foo::<{ faz::<'b>(&()) }>;
| ^^ cannot perform const operation using `'b`
|
= note: lifetime parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:51:27
@@ -203,7 +203,7 @@ LL | let _ = Foo::<{ baz::<'b>(&()) }>;
| ^^ cannot perform const operation using `'b`
|
= note: lifetime parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error[E0747]: unresolved item provided when a constant was expected
--> $DIR/const-arg-in-const-arg.rs:16:23
diff --git a/tests/ui/const-generics/const-arg-type-arg-misordered.stderr b/tests/ui/const-generics/const-arg-type-arg-misordered.stderr
index 4e12f7a8c..e91b88580 100644
--- a/tests/ui/const-generics/const-arg-type-arg-misordered.stderr
+++ b/tests/ui/const-generics/const-arg-type-arg-misordered.stderr
@@ -4,6 +4,6 @@ error[E0747]: constant provided when a type was expected
LL | fn foo<const N: usize>() -> Array<N, ()> {
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0747`.
diff --git a/tests/ui/const-generics/const-argument-if-length.min.stderr b/tests/ui/const-generics/const-argument-if-length.min.stderr
index 3ba9ffebd..b9d9bcc92 100644
--- a/tests/ui/const-generics/const-argument-if-length.min.stderr
+++ b/tests/ui/const-generics/const-argument-if-length.min.stderr
@@ -5,7 +5,7 @@ LL | pad: [u8; is_zst::<T>()],
| ^ cannot perform const operation using `T`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error[E0277]: the size for values of type `T` cannot be known at compilation time
--> $DIR/const-argument-if-length.rs:15:12
diff --git a/tests/ui/const-generics/const-argument-non-static-lifetime.min.stderr b/tests/ui/const-generics/const-argument-non-static-lifetime.min.stderr
index 310ca75fd..a1254672c 100644
--- a/tests/ui/const-generics/const-argument-non-static-lifetime.min.stderr
+++ b/tests/ui/const-generics/const-argument-non-static-lifetime.min.stderr
@@ -5,7 +5,7 @@ LL | let _: &'a ();
| ^^ cannot perform const operation using `'a`
|
= note: lifetime parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/const-generic-default-wont-borrowck.stderr b/tests/ui/const-generics/const-generic-default-wont-borrowck.stderr
index a345c48b0..4cea35f1c 100644
--- a/tests/ui/const-generics/const-generic-default-wont-borrowck.stderr
+++ b/tests/ui/const-generics/const-generic-default-wont-borrowck.stderr
@@ -11,6 +11,6 @@ help: consider assigning a value
LL | let s: &'static str = todo!(); s.len()
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/const-generics/const-param-before-other-params.stderr b/tests/ui/const-generics/const-param-before-other-params.stderr
index 2c7a47bbc..8f8c87afe 100644
--- a/tests/ui/const-generics/const-param-before-other-params.stderr
+++ b/tests/ui/const-generics/const-param-before-other-params.stderr
@@ -4,5 +4,5 @@ error: lifetime parameters must be declared prior to type and const parameters
LL | fn bar<const X: u8, 'a>(_: &'a ()) {
| --------------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, const X: u8>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr b/tests/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr
index c5160d1c3..55bced29a 100644
--- a/tests/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr
+++ b/tests/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr
@@ -6,6 +6,6 @@ LL | struct B<T, const N: T>(PhantomData<[T; N]>);
|
= note: type parameters may not be used in the type of const parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0770`.
diff --git a/tests/ui/const-generics/const-param-type-depends-on-type-param.full.stderr b/tests/ui/const-generics/const-param-type-depends-on-type-param.full.stderr
index e508890dd..2bfa604fc 100644
--- a/tests/ui/const-generics/const-param-type-depends-on-type-param.full.stderr
+++ b/tests/ui/const-generics/const-param-type-depends-on-type-param.full.stderr
@@ -6,6 +6,6 @@ LL | pub struct Dependent<T, const X: T>([(); X]);
|
= note: type parameters may not be used in the type of const parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0770`.
diff --git a/tests/ui/const-generics/const-param-type-depends-on-type-param.min.stderr b/tests/ui/const-generics/const-param-type-depends-on-type-param.min.stderr
index e508890dd..2bfa604fc 100644
--- a/tests/ui/const-generics/const-param-type-depends-on-type-param.min.stderr
+++ b/tests/ui/const-generics/const-param-type-depends-on-type-param.min.stderr
@@ -6,6 +6,6 @@ LL | pub struct Dependent<T, const X: T>([(); X]);
|
= note: type parameters may not be used in the type of const parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0770`.
diff --git a/tests/ui/const-generics/const-param-with-additional-obligations.stderr b/tests/ui/const-generics/const-param-with-additional-obligations.stderr
index f7ec4d574..a05554d7a 100644
--- a/tests/ui/const-generics/const-param-with-additional-obligations.stderr
+++ b/tests/ui/const-generics/const-param-with-additional-obligations.stderr
@@ -6,6 +6,6 @@ LL | fn foo<const N: Foo<u8>>() {}
|
= note: `u8` must implement `Other`, but it does not
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0741`.
diff --git a/tests/ui/const-generics/const-parameter-uppercase-lint.stderr b/tests/ui/const-generics/const-parameter-uppercase-lint.stderr
index efaa18285..2a5ca5d39 100644
--- a/tests/ui/const-generics/const-parameter-uppercase-lint.stderr
+++ b/tests/ui/const-generics/const-parameter-uppercase-lint.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(non_upper_case_globals)]
| ^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/defaults/complex-generic-default-expr.min.stderr b/tests/ui/const-generics/defaults/complex-generic-default-expr.min.stderr
index b836cfeae..199546c08 100644
--- a/tests/ui/const-generics/defaults/complex-generic-default-expr.min.stderr
+++ b/tests/ui/const-generics/defaults/complex-generic-default-expr.min.stderr
@@ -5,7 +5,7 @@ LL | struct Foo<const N: usize, const M: usize = { N + 1 }>;
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/complex-generic-default-expr.rs:9:62
@@ -14,7 +14,7 @@ LL | struct Bar<T, const TYPE_SIZE: usize = { std::mem::size_of::<T>() }>(T);
| ^ cannot perform const operation using `T`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: aborting due to 2 previous errors
diff --git a/tests/ui/const-generics/defaults/default-on-impl.stderr b/tests/ui/const-generics/defaults/default-on-impl.stderr
index 4b2b05742..691e0354e 100644
--- a/tests/ui/const-generics/defaults/default-on-impl.stderr
+++ b/tests/ui/const-generics/defaults/default-on-impl.stderr
@@ -4,5 +4,5 @@ error: defaults for const parameters are only allowed in `struct`, `enum`, `type
LL | impl<const N: usize = 1> Foo<N> {}
| ^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/defaults/default-param-wf-concrete.next.stderr b/tests/ui/const-generics/defaults/default-param-wf-concrete.next.stderr
index 4259ce2b6..35aae4624 100644
--- a/tests/ui/const-generics/defaults/default-param-wf-concrete.next.stderr
+++ b/tests/ui/const-generics/defaults/default-param-wf-concrete.next.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | struct Foo<const N: u8 = { 255 + 1 }>;
| ^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/const-generics/defaults/default-param-wf-concrete.old.stderr b/tests/ui/const-generics/defaults/default-param-wf-concrete.old.stderr
index 4259ce2b6..35aae4624 100644
--- a/tests/ui/const-generics/defaults/default-param-wf-concrete.old.stderr
+++ b/tests/ui/const-generics/defaults/default-param-wf-concrete.old.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | struct Foo<const N: u8 = { 255 + 1 }>;
| ^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/const-generics/defaults/default-param-wf-concrete.rs b/tests/ui/const-generics/defaults/default-param-wf-concrete.rs
index 09a00dd8e..aa3307b92 100644
--- a/tests/ui/const-generics/defaults/default-param-wf-concrete.rs
+++ b/tests/ui/const-generics/defaults/default-param-wf-concrete.rs
@@ -1,5 +1,5 @@
// revisions: old next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
struct Foo<const N: u8 = { 255 + 1 }>;
//~^ ERROR evaluation of constant value failed
diff --git a/tests/ui/const-generics/defaults/doesnt_infer.stderr b/tests/ui/const-generics/defaults/doesnt_infer.stderr
index a61411d6e..65ee0ecfd 100644
--- a/tests/ui/const-generics/defaults/doesnt_infer.stderr
+++ b/tests/ui/const-generics/defaults/doesnt_infer.stderr
@@ -9,6 +9,6 @@ help: consider giving `foo` an explicit type, where the value of const parameter
LL | let foo: Foo<N> = Foo::foo();
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/const-generics/defaults/generic-expr-default-concrete.stderr b/tests/ui/const-generics/defaults/generic-expr-default-concrete.stderr
index 61b355118..fbf1adfb7 100644
--- a/tests/ui/const-generics/defaults/generic-expr-default-concrete.stderr
+++ b/tests/ui/const-generics/defaults/generic-expr-default-concrete.stderr
@@ -7,6 +7,6 @@ LL | Foo::<10, 12>
= note: expected constant `11`
found constant `12`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/defaults/generic-expr-default-mismatched-types.stderr b/tests/ui/const-generics/defaults/generic-expr-default-mismatched-types.stderr
index e83f89a60..25b3fed0d 100644
--- a/tests/ui/const-generics/defaults/generic-expr-default-mismatched-types.stderr
+++ b/tests/ui/const-generics/defaults/generic-expr-default-mismatched-types.stderr
@@ -7,6 +7,6 @@ LL | Foo::<N, { N + 2 }>
= note: expected constant `{ N + 1 }`
found constant `{ N + 2 }`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/defaults/param-order-err-pretty-prints-default.stderr b/tests/ui/const-generics/defaults/param-order-err-pretty-prints-default.stderr
index ba08b4646..bf2b21c01 100644
--- a/tests/ui/const-generics/defaults/param-order-err-pretty-prints-default.stderr
+++ b/tests/ui/const-generics/defaults/param-order-err-pretty-prints-default.stderr
@@ -4,5 +4,5 @@ error: lifetime parameters must be declared prior to type and const parameters
LL | struct Foo<const M: usize = 10, 'a>(&'a u32);
| ----------------------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, const M: usize = 10>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/defaults/self-referential.stderr b/tests/ui/const-generics/defaults/self-referential.stderr
index 170c1f7f7..be67ea3f5 100644
--- a/tests/ui/const-generics/defaults/self-referential.stderr
+++ b/tests/ui/const-generics/defaults/self-referential.stderr
@@ -6,6 +6,6 @@ LL | trait Foo<const M: u8, const M: u8 = M> {}
| |
| first use of `M`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0403`.
diff --git a/tests/ui/const-generics/different_generic_args.full.stderr b/tests/ui/const-generics/different_generic_args.full.stderr
index eba1768f7..8a72b5aff 100644
--- a/tests/ui/const-generics/different_generic_args.full.stderr
+++ b/tests/ui/const-generics/different_generic_args.full.stderr
@@ -7,6 +7,6 @@ LL | u = ConstUsize::<4> {};
= note: expected struct `ConstUsize<3>`
found struct `ConstUsize<4>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/different_generic_args.min.stderr b/tests/ui/const-generics/different_generic_args.min.stderr
index eba1768f7..8a72b5aff 100644
--- a/tests/ui/const-generics/different_generic_args.min.stderr
+++ b/tests/ui/const-generics/different_generic_args.min.stderr
@@ -7,6 +7,6 @@ LL | u = ConstUsize::<4> {};
= note: expected struct `ConstUsize<3>`
found struct `ConstUsize<4>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/different_generic_args_array.stderr b/tests/ui/const-generics/different_generic_args_array.stderr
index 4c5b5ada4..e185474f5 100644
--- a/tests/ui/const-generics/different_generic_args_array.stderr
+++ b/tests/ui/const-generics/different_generic_args_array.stderr
@@ -7,6 +7,6 @@ LL | x = Const::<{ [4] }> {};
= note: expected struct `Const<[3]>`
found struct `Const<[4]>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/dont-evaluate-array-len-on-err-1.stderr b/tests/ui/const-generics/dont-evaluate-array-len-on-err-1.stderr
index b3a275660..4e9e001f2 100644
--- a/tests/ui/const-generics/dont-evaluate-array-len-on-err-1.stderr
+++ b/tests/ui/const-generics/dont-evaluate-array-len-on-err-1.stderr
@@ -10,6 +10,6 @@ help: this trait has no implementations, consider adding one
LL | trait Foo {
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/const-generics/early/const-expression-parameter.stderr b/tests/ui/const-generics/early/const-expression-parameter.stderr
index 4ce1be25e..ca4db8e28 100644
--- a/tests/ui/const-generics/early/const-expression-parameter.stderr
+++ b/tests/ui/const-generics/early/const-expression-parameter.stderr
@@ -9,5 +9,5 @@ help: enclose the `const` expression in braces
LL | i32_identity::<{ 1 + 2 }>();
| + +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/early/const-param-from-outer-fn.stderr b/tests/ui/const-generics/early/const-param-from-outer-fn.stderr
index 826f26579..faba4ce10 100644
--- a/tests/ui/const-generics/early/const-param-from-outer-fn.stderr
+++ b/tests/ui/const-generics/early/const-param-from-outer-fn.stderr
@@ -8,6 +8,6 @@ LL | fn bar() -> u32 {
LL | X
| ^ use of generic parameter from outer item
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0401`.
diff --git a/tests/ui/const-generics/early/const-param-shadowing.stderr b/tests/ui/const-generics/early/const-param-shadowing.stderr
index 625338bd9..3ae2c9c8e 100644
--- a/tests/ui/const-generics/early/const-param-shadowing.stderr
+++ b/tests/ui/const-generics/early/const-param-shadowing.stderr
@@ -9,6 +9,6 @@ help: if this generic argument was intended as a const parameter, surround it wi
LL | fn test<const N: usize>() -> Foo<{ N }> {
| + +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0747`.
diff --git a/tests/ui/const-generics/early/macro_rules-braces.stderr b/tests/ui/const-generics/early/macro_rules-braces.stderr
index 49382dbf0..326950668 100644
--- a/tests/ui/const-generics/early/macro_rules-braces.stderr
+++ b/tests/ui/const-generics/early/macro_rules-braces.stderr
@@ -27,7 +27,7 @@ LL | let _: foo!({{ N }});
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/macro_rules-braces.rs:36:19
@@ -36,7 +36,7 @@ LL | let _: bar!({ N });
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/macro_rules-braces.rs:41:20
@@ -45,7 +45,7 @@ LL | let _: baz!({{ N }});
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/macro_rules-braces.rs:46:19
@@ -54,7 +54,7 @@ LL | let _: biz!({ N });
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: aborting due to 6 previous errors
diff --git a/tests/ui/const-generics/ensure_is_evaluatable.stderr b/tests/ui/const-generics/ensure_is_evaluatable.stderr
index ab2871ff2..a6f362308 100644
--- a/tests/ui/const-generics/ensure_is_evaluatable.stderr
+++ b/tests/ui/const-generics/ensure_is_evaluatable.stderr
@@ -14,5 +14,5 @@ LL | where
LL | [(); N + 1]:,
| ^^^^^ required by this bound in `bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/exhaustive-value.stderr b/tests/ui/const-generics/exhaustive-value.stderr
index deb65ddba..42814c1fb 100644
--- a/tests/ui/const-generics/exhaustive-value.stderr
+++ b/tests/ui/const-generics/exhaustive-value.stderr
@@ -15,6 +15,6 @@ LL | <() as Foo<N>>::test()
<() as Foo<7>>
and 248 others
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/const-generics/float-generic.adt_const_params.stderr b/tests/ui/const-generics/float-generic.adt_const_params.stderr
index 6fe539047..cae480636 100644
--- a/tests/ui/const-generics/float-generic.adt_const_params.stderr
+++ b/tests/ui/const-generics/float-generic.adt_const_params.stderr
@@ -4,6 +4,6 @@ error[E0741]: `f32` is forbidden as the type of a const generic parameter
LL | fn foo<const F: f32>() {}
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0741`.
diff --git a/tests/ui/const-generics/float-generic.simple.stderr b/tests/ui/const-generics/float-generic.simple.stderr
index aeb19dc75..eccf9059e 100644
--- a/tests/ui/const-generics/float-generic.simple.stderr
+++ b/tests/ui/const-generics/float-generic.simple.stderr
@@ -6,5 +6,5 @@ LL | fn foo<const F: f32>() {}
|
= note: the only supported types are integers, `bool` and `char`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/fn-const-param-infer.full.stderr b/tests/ui/const-generics/fn-const-param-infer.full.stderr
index 2d66a1923..48d4a4534 100644
--- a/tests/ui/const-generics/fn-const-param-infer.full.stderr
+++ b/tests/ui/const-generics/fn-const-param-infer.full.stderr
@@ -4,6 +4,6 @@ error[E0741]: using function pointers as const generic parameters is forbidden
LL | struct Checked<const F: fn(usize) -> bool>;
| ^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0741`.
diff --git a/tests/ui/const-generics/fn-const-param-infer.min.stderr b/tests/ui/const-generics/fn-const-param-infer.min.stderr
index a7afa4842..f6d41809d 100644
--- a/tests/ui/const-generics/fn-const-param-infer.min.stderr
+++ b/tests/ui/const-generics/fn-const-param-infer.min.stderr
@@ -6,5 +6,5 @@ LL | struct Checked<const F: fn(usize) -> bool>;
|
= note: the only supported types are integers, `bool` and `char`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/fn_with_two_const_inputs.stderr b/tests/ui/const-generics/fn_with_two_const_inputs.stderr
index c124010aa..ad32a688c 100644
--- a/tests/ui/const-generics/fn_with_two_const_inputs.stderr
+++ b/tests/ui/const-generics/fn_with_two_const_inputs.stderr
@@ -14,5 +14,5 @@ LL | where
LL | [(); N + 1]:,
| ^^^^^ required by this bound in `bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/forbid-non-structural_match-types.stderr b/tests/ui/const-generics/forbid-non-structural_match-types.stderr
index 0efb9e9d3..94afded94 100644
--- a/tests/ui/const-generics/forbid-non-structural_match-types.stderr
+++ b/tests/ui/const-generics/forbid-non-structural_match-types.stderr
@@ -10,6 +10,6 @@ LL + #[derive(ConstParamTy, PartialEq, Eq)]
LL | struct C;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0741`.
diff --git a/tests/ui/const-generics/generic-param-mismatch.stderr b/tests/ui/const-generics/generic-param-mismatch.stderr
index d0776d49d..be6b3b90e 100644
--- a/tests/ui/const-generics/generic-param-mismatch.stderr
+++ b/tests/ui/const-generics/generic-param-mismatch.stderr
@@ -9,6 +9,6 @@ LL | [0; N]
= note: expected array `[u8; M]`
found array `[u8; N]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/generic_arg_infer/issue-91614.stderr b/tests/ui/const-generics/generic_arg_infer/issue-91614.stderr
index 0096d4ee2..f2cc17bc5 100644
--- a/tests/ui/const-generics/generic_arg_infer/issue-91614.stderr
+++ b/tests/ui/const-generics/generic_arg_infer/issue-91614.stderr
@@ -1,4 +1,4 @@
-error[E0283]: type annotations needed for `Mask<_, LANES>`
+error[E0283]: type annotations needed for `Mask<_, N>`
--> $DIR/issue-91614.rs:6:9
|
LL | let y = Mask::<_, _>::splat(false);
@@ -11,13 +11,13 @@ LL | let y = Mask::<_, _>::splat(false);
i16
i32
i64
-note: required by a bound in `Mask::<T, LANES>::splat`
+note: required by a bound in `Mask::<T, N>::splat`
--> $SRC_DIR/core/src/../../portable-simd/crates/core_simd/src/masks.rs:LL:COL
help: consider giving `y` an explicit type, where the type for type parameter `T` is specified
|
-LL | let y: Mask<_, LANES> = Mask::<_, _>::splat(false);
- | ++++++++++++++++
+LL | let y: Mask<_, N> = Mask::<_, _>::splat(false);
+ | ++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/const-generics/generic_const_exprs/abstract-consts-as-cast-5.stderr b/tests/ui/const-generics/generic_const_exprs/abstract-consts-as-cast-5.stderr
index d48b639db..4b76ae6cf 100644
--- a/tests/ui/const-generics/generic_const_exprs/abstract-consts-as-cast-5.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/abstract-consts-as-cast-5.stderr
@@ -6,5 +6,5 @@ LL | bar::<{ N as usize as usize }>();
|
= help: try adding a `where` bound using this expression: `where [(); { N as usize as usize }]:`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/generic_const_exprs/array-size-in-generic-struct-param.min.stderr b/tests/ui/const-generics/generic_const_exprs/array-size-in-generic-struct-param.min.stderr
index 64d1e0bcf..1f4b892e2 100644
--- a/tests/ui/const-generics/generic_const_exprs/array-size-in-generic-struct-param.min.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/array-size-in-generic-struct-param.min.stderr
@@ -5,7 +5,7 @@ LL | struct ArithArrayLen<const N: usize>([u32; 0 + N]);
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/array-size-in-generic-struct-param.rs:23:15
@@ -14,7 +14,7 @@ LL | arr: [u8; CFG.arr_size],
| ^^^ cannot perform const operation using `CFG`
|
= help: const parameters may only be used as standalone arguments, i.e. `CFG`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: `Config` is forbidden as the type of a const generic parameter
--> $DIR/array-size-in-generic-struct-param.rs:21:21
diff --git a/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/doesnt_unify_evaluatable.stderr b/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/doesnt_unify_evaluatable.stderr
index e4a0cabe5..a8657bf52 100644
--- a/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/doesnt_unify_evaluatable.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/doesnt_unify_evaluatable.stderr
@@ -6,5 +6,5 @@ LL | bar::<{ T::ASSOC }>();
|
= help: try adding a `where` bound using this expression: `where [(); { T::ASSOC }]:`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/generic_const_exprs/closures.stderr b/tests/ui/const-generics/generic_const_exprs/closures.stderr
index 45d7922bd..e245a6dab 100644
--- a/tests/ui/const-generics/generic_const_exprs/closures.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/closures.stderr
@@ -22,6 +22,6 @@ LL | fn test<const N: usize>() -> [u8; N + (|| 42)()] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/const-generics/generic_const_exprs/const-block-is-poly.stderr b/tests/ui/const-generics/generic_const_exprs/const-block-is-poly.stderr
index f26259908..a85e0cbcf 100644
--- a/tests/ui/const-generics/generic_const_exprs/const-block-is-poly.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/const-block-is-poly.stderr
@@ -16,5 +16,5 @@ LL | let _ = [0u8; const { std::mem::size_of::<T>() }];
= help: consider moving this anonymous constant into a `const` function
= note: this operation may be supported in the future
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.rs b/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.rs
new file mode 100644
index 000000000..6256000b4
--- /dev/null
+++ b/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.rs
@@ -0,0 +1,25 @@
+#![feature(generic_const_exprs)]
+#![allow(incomplete_features)]
+
+fn foo<const N: usize>(
+ _: [u8; {
+ {
+ N
+ }
+ }],
+) {
+}
+
+fn ice<const L: usize>()
+where
+ [(); (L - 1) + 1 + L]:,
+{
+ foo::<_, L>([(); L + 1 + L]);
+ //~^ ERROR: mismatched types
+ //~^^ ERROR: unconstrained generic constant
+ //~^^^ ERROR: function takes 1 generic argument but 2 generic arguments were supplied
+ //~^^^^ ERROR: unconstrained generic constant
+ //~^^^^^ ERROR: unconstrained generic constant `{const expr}`
+}
+
+fn main() {}
diff --git a/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.stderr b/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.stderr
new file mode 100644
index 000000000..6001d8247
--- /dev/null
+++ b/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.stderr
@@ -0,0 +1,64 @@
+error[E0107]: function takes 1 generic argument but 2 generic arguments were supplied
+ --> $DIR/issue_114151.rs:17:5
+ |
+LL | foo::<_, L>([(); L + 1 + L]);
+ | ^^^ - help: remove this generic argument
+ | |
+ | expected 1 generic argument
+ |
+note: function defined here, with 1 generic parameter: `N`
+ --> $DIR/issue_114151.rs:4:4
+ |
+LL | fn foo<const N: usize>(
+ | ^^^ --------------
+
+error[E0308]: mismatched types
+ --> $DIR/issue_114151.rs:17:18
+ |
+LL | foo::<_, L>([(); L + 1 + L]);
+ | ^^ expected `u8`, found `()`
+
+error: unconstrained generic constant
+ --> $DIR/issue_114151.rs:17:22
+ |
+LL | foo::<_, L>([(); L + 1 + L]);
+ | ^^^^^^^^^
+ |
+ = help: try adding a `where` bound using this expression: `where [(); L + 1 + L]:`
+
+error: unconstrained generic constant
+ --> $DIR/issue_114151.rs:17:17
+ |
+LL | foo::<_, L>([(); L + 1 + L]);
+ | ----------- ^^^^^^^^^^^^^^^
+ | |
+ | required by a bound introduced by this call
+ |
+ = help: try adding a `where` bound using this expression: `where [(); {
+ {
+ N
+ }
+ }]:`
+note: required by a bound in `foo`
+ --> $DIR/issue_114151.rs:5:13
+ |
+LL | fn foo<const N: usize>(
+ | --- required by a bound in this function
+LL | _: [u8; {
+ | _____________^
+LL | | {
+LL | | N
+LL | | }
+LL | | }],
+ | |_____^ required by this bound in `foo`
+
+error: unconstrained generic constant `{const expr}`
+ --> $DIR/issue_114151.rs:17:5
+ |
+LL | foo::<_, L>([(); L + 1 + L]);
+ | ^^^^^^^^^^^
+
+error: aborting due to 5 previous errors
+
+Some errors have detailed explanations: E0107, E0308.
+For more information about an error, try `rustc --explain E0107`.
diff --git a/tests/ui/const-generics/generic_const_exprs/dependence_lint.full.stderr b/tests/ui/const-generics/generic_const_exprs/dependence_lint.full.stderr
index d674e3acd..f454ff4e6 100644
--- a/tests/ui/const-generics/generic_const_exprs/dependence_lint.full.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/dependence_lint.full.stderr
@@ -5,7 +5,7 @@ LL | let _: [u8; size_of::<*mut T>()]; // error on stable, error with gce
| ^ cannot perform const operation using `T`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/dependence_lint.rs:21:37
@@ -14,7 +14,7 @@ LL | let _: [u8; if true { size_of::<T>() } else { 3 }]; // error on stable,
| ^ cannot perform const operation using `T`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
warning: cannot use constants which depend on generic parameters in types
--> $DIR/dependence_lint.rs:10:9
diff --git a/tests/ui/const-generics/generic_const_exprs/eval-privacy.stderr b/tests/ui/const-generics/generic_const_exprs/eval-privacy.stderr
index 2d9de8805..043fa34d6 100644
--- a/tests/ui/const-generics/generic_const_exprs/eval-privacy.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/eval-privacy.stderr
@@ -7,6 +7,6 @@ LL | type AssocTy = Const<{ my_const_fn(U) }>;
LL | const fn my_const_fn(val: u8) -> u8 {
| ----------------------------------- `fn(u8) -> u8 {my_const_fn}` declared as private
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0446`.
diff --git a/tests/ui/const-generics/generic_const_exprs/feature-gate-generic_const_exprs.stderr b/tests/ui/const-generics/generic_const_exprs/feature-gate-generic_const_exprs.stderr
index 2d60ebaa8..9c4e3d858 100644
--- a/tests/ui/const-generics/generic_const_exprs/feature-gate-generic_const_exprs.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/feature-gate-generic_const_exprs.stderr
@@ -5,7 +5,7 @@ LL | type Arr<const N: usize> = [u8; N - 1];
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/generic_const_exprs/from-sig-fail.stderr b/tests/ui/const-generics/generic_const_exprs/from-sig-fail.stderr
index bd71b49ee..080e92025 100644
--- a/tests/ui/const-generics/generic_const_exprs/from-sig-fail.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/from-sig-fail.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of `test::<0>::{constant#0}` failed
LL | fn test<const N: usize>() -> [u8; N - 1] {
| ^^^^^ attempt to compute `0_usize - 1_usize`, which would overflow
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-105608.stderr b/tests/ui/const-generics/generic_const_exprs/issue-105608.stderr
index 827dd59d9..09b618fb3 100644
--- a/tests/ui/const-generics/generic_const_exprs/issue-105608.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/issue-105608.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic argument
LL | Combination::<0>.and::<_>().and::<_>();
| ~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-72787.min.stderr b/tests/ui/const-generics/generic_const_exprs/issue-72787.min.stderr
index ea6f5f692..2454b3119 100644
--- a/tests/ui/const-generics/generic_const_exprs/issue-72787.min.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/issue-72787.min.stderr
@@ -5,7 +5,7 @@ LL | Condition<{ LHS <= RHS }>: True
| ^^^ cannot perform const operation using `LHS`
|
= help: const parameters may only be used as standalone arguments, i.e. `LHS`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/issue-72787.rs:11:24
@@ -14,7 +14,7 @@ LL | Condition<{ LHS <= RHS }>: True
| ^^^ cannot perform const operation using `RHS`
|
= help: const parameters may only be used as standalone arguments, i.e. `RHS`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/issue-72787.rs:23:25
@@ -23,7 +23,7 @@ LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True,
| ^ cannot perform const operation using `I`
|
= help: const parameters may only be used as standalone arguments, i.e. `I`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/issue-72787.rs:23:36
@@ -32,7 +32,7 @@ LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True,
| ^ cannot perform const operation using `J`
|
= help: const parameters may only be used as standalone arguments, i.e. `J`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: aborting due to 4 previous errors
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-72819-generic-in-const-eval.min.stderr b/tests/ui/const-generics/generic_const_exprs/issue-72819-generic-in-const-eval.min.stderr
index 42671412f..c50446412 100644
--- a/tests/ui/const-generics/generic_const_exprs/issue-72819-generic-in-const-eval.min.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/issue-72819-generic-in-const-eval.min.stderr
@@ -5,7 +5,7 @@ LL | where Assert::<{N < usize::MAX / 2}>: IsTrue,
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-74713.stderr b/tests/ui/const-generics/generic_const_exprs/issue-74713.stderr
index f0e0a4b97..78717028f 100644
--- a/tests/ui/const-generics/generic_const_exprs/issue-74713.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/issue-74713.stderr
@@ -5,7 +5,7 @@ LL | let _: &'a ();
| ^^ cannot perform const operation using `'a`
|
= note: lifetime parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error[E0308]: mismatched types
--> $DIR/issue-74713.rs:3:10
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-76595.stderr b/tests/ui/const-generics/generic_const_exprs/issue-76595.stderr
index 302da5965..2cec51cce 100644
--- a/tests/ui/const-generics/generic_const_exprs/issue-76595.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/issue-76595.stderr
@@ -16,6 +16,6 @@ help: add missing generic argument
LL | test::<2, P>();
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-79518-default_trait_method_normalization.stderr b/tests/ui/const-generics/generic_const_exprs/issue-79518-default_trait_method_normalization.stderr
index 511ae58a1..08ecb2e48 100644
--- a/tests/ui/const-generics/generic_const_exprs/issue-79518-default_trait_method_normalization.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/issue-79518-default_trait_method_normalization.stderr
@@ -11,6 +11,6 @@ LL | Self::AssocInstance == [(); std::mem::size_of::<Self::Assoc>()];
= help: consider constraining the associated type `<Self as Foo>::Assoc` to `[(); std::mem::size_of::<Self::Assoc>()]` or calling a method that returns `<Self as Foo>::Assoc`
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-80742.stderr b/tests/ui/const-generics/generic_const_exprs/issue-80742.stderr
index 9b66fc502..8d59235e2 100644
--- a/tests/ui/const-generics/generic_const_exprs/issue-80742.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/issue-80742.stderr
@@ -6,5 +6,5 @@ query stack during panic:
#0 [eval_to_allocation_raw] const-evaluating + checking `<impl at $DIR/issue-80742.rs:26:1: 28:32>::{constant#0}`
#1 [eval_to_valtree] evaluating type-level constant
end of query stack
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-94287.stderr b/tests/ui/const-generics/generic_const_exprs/issue-94287.stderr
index dc7d0c54f..b57779739 100644
--- a/tests/ui/const-generics/generic_const_exprs/issue-94287.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/issue-94287.stderr
@@ -11,5 +11,5 @@ help: consider enabling this feature
LL + #![feature(generic_const_exprs)]
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/generic_const_exprs/mismatched-gat-subst-kind.stderr b/tests/ui/const-generics/generic_const_exprs/mismatched-gat-subst-kind.stderr
index 8b6eb5b75..1036b7261 100644
--- a/tests/ui/const-generics/generic_const_exprs/mismatched-gat-subst-kind.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/mismatched-gat-subst-kind.stderr
@@ -13,6 +13,6 @@ error[E0747]: constant provided when a type was expected
LL | fn f<T: B<U<1i32> = ()>>() {}
| ^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0747`.
diff --git a/tests/ui/const-generics/generic_const_exprs/needs_where_clause.stderr b/tests/ui/const-generics/generic_const_exprs/needs_where_clause.stderr
index 7b41e39b7..395088bf2 100644
--- a/tests/ui/const-generics/generic_const_exprs/needs_where_clause.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/needs_where_clause.stderr
@@ -6,5 +6,5 @@ LL | b: [f32; complex_maths::<T>(N)],
|
= help: try adding a `where` bound using this expression: `where [(); complex_maths::<T>(N)]:`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/generic_const_exprs/no_where_clause.stderr b/tests/ui/const-generics/generic_const_exprs/no_where_clause.stderr
index 3e5c2f5ca..100cf3f8b 100644
--- a/tests/ui/const-generics/generic_const_exprs/no_where_clause.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/no_where_clause.stderr
@@ -6,5 +6,5 @@ LL | b: [f32; complex_maths(N)],
|
= help: try adding a `where` bound using this expression: `where [(); complex_maths(N)]:`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/generic_const_exprs/non_local_anon_const_diagnostics.stderr b/tests/ui/const-generics/generic_const_exprs/non_local_anon_const_diagnostics.stderr
index 3926c830a..7d84d7bca 100644
--- a/tests/ui/const-generics/generic_const_exprs/non_local_anon_const_diagnostics.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/non_local_anon_const_diagnostics.stderr
@@ -7,6 +7,6 @@ LL | let _: anon_const_non_local::Foo<2> = anon_const_non_local::foo::<M>();
= note: expected constant `2`
found constant `anon_const_non_local::::foo::{constant#0}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/generic_const_exprs/object-safety-err-ret.stderr b/tests/ui/const-generics/generic_const_exprs/object-safety-err-ret.stderr
index b7ec65712..6f0a6b043 100644
--- a/tests/ui/const-generics/generic_const_exprs/object-safety-err-ret.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/object-safety-err-ret.stderr
@@ -14,9 +14,8 @@ LL | fn test(&self) -> [u8; bar::<Self>()];
| |
| ...because method `test` references the `Self` type in its `where` clause
= help: consider moving `test` to another trait
- = help: consider moving `test` to another trait
= help: only type `()` implements the trait, consider using it directly instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/const-generics/generic_const_exprs/object-safety-err-where-bounds.stderr b/tests/ui/const-generics/generic_const_exprs/object-safety-err-where-bounds.stderr
index 440cf457e..9e480ce9b 100644
--- a/tests/ui/const-generics/generic_const_exprs/object-safety-err-where-bounds.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/object-safety-err-where-bounds.stderr
@@ -20,5 +20,5 @@ note: the lint level is defined here
LL | #![deny(where_clauses_object_safety)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/generic_const_exprs/object-safety-ok-infer-err.stderr b/tests/ui/const-generics/generic_const_exprs/object-safety-ok-infer-err.stderr
index 59e9fee1e..e800c5d05 100644
--- a/tests/ui/const-generics/generic_const_exprs/object-safety-ok-infer-err.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/object-safety-ok-infer-err.stderr
@@ -14,6 +14,6 @@ help: consider specifying the generic argument
LL | use_dyn::<N>(&());
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0284`.
diff --git a/tests/ui/const-generics/generic_const_exprs/obligation-cause.stderr b/tests/ui/const-generics/generic_const_exprs/obligation-cause.stderr
index 63e6fcc8e..eba8b9b62 100644
--- a/tests/ui/const-generics/generic_const_exprs/obligation-cause.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/obligation-cause.stderr
@@ -15,6 +15,6 @@ LL | fn g<T>()
LL | Is<{ std::mem::size_of::<T>() == 0 }>: True,
| ^^^^ required by this bound in `g`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/generic_const_exprs/type_mismatch.stderr b/tests/ui/const-generics/generic_const_exprs/type_mismatch.stderr
index 0314d7ed2..c73d1022e 100644
--- a/tests/ui/const-generics/generic_const_exprs/type_mismatch.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/type_mismatch.stderr
@@ -7,6 +7,6 @@ LL | const ASSOC: usize;
LL | impl<const N: u64> Q for [u8; N] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `ASSOC` in implementation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/const-generics/generic_const_exprs/typeid-equality-by-subtyping.stderr b/tests/ui/const-generics/generic_const_exprs/typeid-equality-by-subtyping.stderr
index 8cbd12654..3bae93ccb 100644
--- a/tests/ui/const-generics/generic_const_exprs/typeid-equality-by-subtyping.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/typeid-equality-by-subtyping.stderr
@@ -7,5 +7,5 @@ LL | WHAT_A_TYPE => 0,
= note: the traits must be derived, manual `impl`s are not sufficient
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/generic_const_exprs/unresolved_lifetimes_error.stderr b/tests/ui/const-generics/generic_const_exprs/unresolved_lifetimes_error.stderr
index 976f03706..67eed46ea 100644
--- a/tests/ui/const-generics/generic_const_exprs/unresolved_lifetimes_error.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/unresolved_lifetimes_error.stderr
@@ -6,6 +6,6 @@ LL | fn foo() -> [(); {
LL | let a: &'a ();
| ^^ undeclared lifetime
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0261`.
diff --git a/tests/ui/const-generics/ice-118285-fn-ptr-value.rs b/tests/ui/const-generics/ice-118285-fn-ptr-value.rs
new file mode 100644
index 000000000..b68afb0bc
--- /dev/null
+++ b/tests/ui/const-generics/ice-118285-fn-ptr-value.rs
@@ -0,0 +1,5 @@
+struct Checked<const F: fn(usize) -> bool>;
+//~^ ERROR function pointers as const generic parameters is forbidden
+fn not_one(val: usize) -> bool { val != 1 }
+const _: Checked<not_one> = Checked::<not_one>;
+fn main() {}
diff --git a/tests/ui/const-generics/ice-118285-fn-ptr-value.stderr b/tests/ui/const-generics/ice-118285-fn-ptr-value.stderr
new file mode 100644
index 000000000..46a8a975d
--- /dev/null
+++ b/tests/ui/const-generics/ice-118285-fn-ptr-value.stderr
@@ -0,0 +1,10 @@
+error: using function pointers as const generic parameters is forbidden
+ --> $DIR/ice-118285-fn-ptr-value.rs:1:25
+ |
+LL | struct Checked<const F: fn(usize) -> bool>;
+ | ^^^^^^^^^^^^^^^^^
+ |
+ = note: the only supported types are integers, `bool` and `char`
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/const-generics/ice-68875.stderr b/tests/ui/const-generics/ice-68875.stderr
index 1db62c57f..5a39a5724 100644
--- a/tests/ui/const-generics/ice-68875.stderr
+++ b/tests/ui/const-generics/ice-68875.stderr
@@ -4,5 +4,5 @@ error: generic `Self` types are currently not permitted in anonymous constants
LL | data: &'a [u8; Self::SIZE],
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/ice-const-generic-function-return-ty.stderr b/tests/ui/const-generics/ice-const-generic-function-return-ty.stderr
index a72f5800a..5d3ef008b 100644
--- a/tests/ui/const-generics/ice-const-generic-function-return-ty.stderr
+++ b/tests/ui/const-generics/ice-const-generic-function-return-ty.stderr
@@ -4,5 +4,5 @@ error: expected one of `(`, `::`, `<`, or `>`, found `;`
LL | fn return_ty() -> impl Into<<() as Reexported;
| ^ expected one of `(`, `::`, `<`, or `>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/infer/cannot-infer-const-args.stderr b/tests/ui/const-generics/infer/cannot-infer-const-args.stderr
index 93e45a88a..e3caefef1 100644
--- a/tests/ui/const-generics/infer/cannot-infer-const-args.stderr
+++ b/tests/ui/const-generics/infer/cannot-infer-const-args.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic argument
LL | foo::<X>();
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/const-generics/infer/issue-77092.stderr b/tests/ui/const-generics/infer/issue-77092.stderr
index 1682b26ac..5b4112698 100644
--- a/tests/ui/const-generics/infer/issue-77092.stderr
+++ b/tests/ui/const-generics/infer/issue-77092.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic arguments
LL | println!("{:?}", take_array_from_mut::<i32, N>(&mut arr, i));
| ++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/const-generics/infer/method-chain.stderr b/tests/ui/const-generics/infer/method-chain.stderr
index f527ee6e4..2def9e85a 100644
--- a/tests/ui/const-generics/infer/method-chain.stderr
+++ b/tests/ui/const-generics/infer/method-chain.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic argument
LL | Foo.bar().bar().bar().bar().baz::<N>();
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/const-generics/infer/one-param-uninferred.stderr b/tests/ui/const-generics/infer/one-param-uninferred.stderr
index cf70c2181..3e33fec9c 100644
--- a/tests/ui/const-generics/infer/one-param-uninferred.stderr
+++ b/tests/ui/const-generics/infer/one-param-uninferred.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic arguments
LL | let _: [u8; 17] = foo::<17, M>();
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/const-generics/infer/uninferred-consts.stderr b/tests/ui/const-generics/infer/uninferred-consts.stderr
index 20daf4570..0ec6ac9c2 100644
--- a/tests/ui/const-generics/infer/uninferred-consts.stderr
+++ b/tests/ui/const-generics/infer/uninferred-consts.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic arguments
LL | Foo.foo::<A, B>();
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/const-generics/intrinsics-type_name-as-const-argument.min.stderr b/tests/ui/const-generics/intrinsics-type_name-as-const-argument.min.stderr
index 4c45339b9..95f75c321 100644
--- a/tests/ui/const-generics/intrinsics-type_name-as-const-argument.min.stderr
+++ b/tests/ui/const-generics/intrinsics-type_name-as-const-argument.min.stderr
@@ -5,7 +5,7 @@ LL | T: Trait<{std::intrinsics::type_name::<T>()}>
| ^ cannot perform const operation using `T`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: `&'static str` is forbidden as the type of a const generic parameter
--> $DIR/intrinsics-type_name-as-const-argument.rs:10:22
diff --git a/tests/ui/const-generics/invalid-constant-in-args.stderr b/tests/ui/const-generics/invalid-constant-in-args.stderr
index 2545cc6f3..158b9722e 100644
--- a/tests/ui/const-generics/invalid-constant-in-args.stderr
+++ b/tests/ui/const-generics/invalid-constant-in-args.stderr
@@ -6,6 +6,6 @@ LL | let _: Cell<&str, "a"> = Cell::new("");
| |
| expected 1 generic argument
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/const-generics/invariant.stderr b/tests/ui/const-generics/invariant.stderr
index aabe4c93b..f631e1311 100644
--- a/tests/ui/const-generics/invariant.stderr
+++ b/tests/ui/const-generics/invariant.stderr
@@ -21,6 +21,6 @@ LL | v
= note: expected reference `&Foo<fn(&())>`
found reference `&Foo<for<'a> fn(&'a ())>`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/issue-112505-overflow.stderr b/tests/ui/const-generics/issue-112505-overflow.stderr
index bd8a4feef..0bd3f6edd 100644
--- a/tests/ui/const-generics/issue-112505-overflow.stderr
+++ b/tests/ui/const-generics/issue-112505-overflow.stderr
@@ -7,6 +7,6 @@ LL | unsafe { std::mem::transmute(v) }
= note: source type: `[[[u32; 8888888]; 9999999]; 777777777]` (values of the type `[[u32; 8888888]; 9999999]` are too big for the current architecture)
= note: target type: `[[[u32; 9999999]; 777777777]; 239]` (values of the type `[[u32; 9999999]; 777777777]` are too big for the current architecture)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0512`.
diff --git a/tests/ui/const-generics/issue-46511.stderr b/tests/ui/const-generics/issue-46511.stderr
index 58c93a1fa..d57295fa2 100644
--- a/tests/ui/const-generics/issue-46511.stderr
+++ b/tests/ui/const-generics/issue-46511.stderr
@@ -5,7 +5,7 @@ LL | _a: [u8; std::mem::size_of::<&'a mut u8>()]
| ^^ cannot perform const operation using `'a`
|
= note: lifetime parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error[E0392]: parameter `'a` is never used
--> $DIR/issue-46511.rs:3:12
diff --git a/tests/ui/const-generics/issue-66451.stderr b/tests/ui/const-generics/issue-66451.stderr
index 946d51486..404e3839b 100644
--- a/tests/ui/const-generics/issue-66451.stderr
+++ b/tests/ui/const-generics/issue-66451.stderr
@@ -15,6 +15,6 @@ LL | | }> = x;
= note: expected struct `Test<Foo { value: 3, nested: &Bar::<i32>(5) }>`
found struct `Test<Foo { value: 3, nested: &Bar::<i32>(4) }>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/issue-80471.stderr b/tests/ui/const-generics/issue-80471.stderr
index 3b7143de5..b21ad3aec 100644
--- a/tests/ui/const-generics/issue-80471.stderr
+++ b/tests/ui/const-generics/issue-80471.stderr
@@ -19,6 +19,6 @@ LL + #[derive(ConstParamTy)]
LL | enum Nat {
|
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0741`.
diff --git a/tests/ui/const-generics/issue-93647.stderr b/tests/ui/const-generics/issue-93647.stderr
index 18370eea5..a87b59940 100644
--- a/tests/ui/const-generics/issue-93647.stderr
+++ b/tests/ui/const-generics/issue-93647.stderr
@@ -8,6 +8,6 @@ LL | (||1usize)()
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/const-generics/issues/issue-56445-1.full.stderr b/tests/ui/const-generics/issues/issue-56445-1.full.stderr
index 5fc0ec260..86eb57355 100644
--- a/tests/ui/const-generics/issues/issue-56445-1.full.stderr
+++ b/tests/ui/const-generics/issues/issue-56445-1.full.stderr
@@ -6,6 +6,6 @@ LL | struct Bug<'a, const S: &'a str>(PhantomData<&'a ()>);
|
= note: lifetime parameters may not be used in the type of const parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0770`.
diff --git a/tests/ui/const-generics/issues/issue-56445-2.stderr b/tests/ui/const-generics/issues/issue-56445-2.stderr
index 770c80cbb..351dcb1a1 100644
--- a/tests/ui/const-generics/issues/issue-56445-2.stderr
+++ b/tests/ui/const-generics/issues/issue-56445-2.stderr
@@ -10,5 +10,5 @@ note: not a concrete type
LL | impl<'a> OnDiskDirEntry<'a> {
| ^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-56445-3.stderr b/tests/ui/const-generics/issues/issue-56445-3.stderr
index f1c49eecf..96b68ca22 100644
--- a/tests/ui/const-generics/issues/issue-56445-3.stderr
+++ b/tests/ui/const-generics/issues/issue-56445-3.stderr
@@ -4,5 +4,5 @@ error: generic `Self` types are currently not permitted in anonymous constants
LL | ram: [u8; Self::SIZE],
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-61336-2.stderr b/tests/ui/const-generics/issues/issue-61336-2.stderr
index 5bb356696..0af6f87a6 100644
--- a/tests/ui/const-generics/issues/issue-61336-2.stderr
+++ b/tests/ui/const-generics/issues/issue-61336-2.stderr
@@ -10,6 +10,6 @@ help: consider restricting type parameter `T`
LL | fn g<T: std::marker::Copy, const N: usize>(x: T) -> [T; N] {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/const-generics/issues/issue-61336.stderr b/tests/ui/const-generics/issues/issue-61336.stderr
index 8d9e545b4..4132e5112 100644
--- a/tests/ui/const-generics/issues/issue-61336.stderr
+++ b/tests/ui/const-generics/issues/issue-61336.stderr
@@ -10,6 +10,6 @@ help: consider restricting type parameter `T`
LL | fn g<T: std::marker::Copy, const N: usize>(x: T) -> [T; N] {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/const-generics/issues/issue-62878.full.stderr b/tests/ui/const-generics/issues/issue-62878.full.stderr
index c658b5a6e..615bfeb65 100644
--- a/tests/ui/const-generics/issues/issue-62878.full.stderr
+++ b/tests/ui/const-generics/issues/issue-62878.full.stderr
@@ -6,6 +6,6 @@ LL | fn foo<const N: usize, const A: [u8; N]>() {}
|
= note: const parameters may not be used in the type of const parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0770`.
diff --git a/tests/ui/const-generics/issues/issue-63322-forbid-dyn.full.stderr b/tests/ui/const-generics/issues/issue-63322-forbid-dyn.full.stderr
index e2d8c5ca0..508270592 100644
--- a/tests/ui/const-generics/issues/issue-63322-forbid-dyn.full.stderr
+++ b/tests/ui/const-generics/issues/issue-63322-forbid-dyn.full.stderr
@@ -6,6 +6,6 @@ LL | fn test<const T: &'static dyn A>() {
|
= note: `(dyn A + 'static)` must implement `ConstParamTy`, but it does not
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0741`.
diff --git a/tests/ui/const-generics/issues/issue-63322-forbid-dyn.min.stderr b/tests/ui/const-generics/issues/issue-63322-forbid-dyn.min.stderr
index 9d80f1cd0..b9588e23e 100644
--- a/tests/ui/const-generics/issues/issue-63322-forbid-dyn.min.stderr
+++ b/tests/ui/const-generics/issues/issue-63322-forbid-dyn.min.stderr
@@ -7,5 +7,5 @@ LL | fn test<const T: &'static dyn A>() {
= note: the only supported types are integers, `bool` and `char`
= help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-67375.full.stderr b/tests/ui/const-generics/issues/issue-67375.full.stderr
index 13cb8d1cd..96e0f1b0e 100644
--- a/tests/ui/const-generics/issues/issue-67375.full.stderr
+++ b/tests/ui/const-generics/issues/issue-67375.full.stderr
@@ -8,5 +8,5 @@ LL | inner: [(); { [|_: &T| {}; 0].len() }],
|
= help: consider moving this anonymous constant into a `const` function
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-67375.min.stderr b/tests/ui/const-generics/issues/issue-67375.min.stderr
index 5256d96c8..7671e3c46 100644
--- a/tests/ui/const-generics/issues/issue-67375.min.stderr
+++ b/tests/ui/const-generics/issues/issue-67375.min.stderr
@@ -5,7 +5,7 @@ LL | inner: [(); { [|_: &T| {}; 0].len() }],
| ^ cannot perform const operation using `T`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error[E0392]: parameter `T` is never used
--> $DIR/issue-67375.rs:5:12
diff --git a/tests/ui/const-generics/issues/issue-67739.full.stderr b/tests/ui/const-generics/issues/issue-67739.full.stderr
index f1a426c3c..bdf05023d 100644
--- a/tests/ui/const-generics/issues/issue-67739.full.stderr
+++ b/tests/ui/const-generics/issues/issue-67739.full.stderr
@@ -6,5 +6,5 @@ LL | [0u8; mem::size_of::<Self::Associated>()];
|
= help: try adding a `where` bound using this expression: `where [(); mem::size_of::<Self::Associated>()]:`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-67739.min.stderr b/tests/ui/const-generics/issues/issue-67739.min.stderr
index dcbe5b94a..14037b9ee 100644
--- a/tests/ui/const-generics/issues/issue-67739.min.stderr
+++ b/tests/ui/const-generics/issues/issue-67739.min.stderr
@@ -6,5 +6,5 @@ LL | [0u8; mem::size_of::<Self::Associated>()];
|
= note: this may fail depending on what value the parameter takes
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-67945-1.full.stderr b/tests/ui/const-generics/issues/issue-67945-1.full.stderr
index ee17ec3c6..2ecdc0366 100644
--- a/tests/ui/const-generics/issues/issue-67945-1.full.stderr
+++ b/tests/ui/const-generics/issues/issue-67945-1.full.stderr
@@ -12,6 +12,6 @@ LL | let x: S = MaybeUninit::uninit();
= note: expected type parameter `S`
found union `MaybeUninit<_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/issues/issue-67945-1.min.stderr b/tests/ui/const-generics/issues/issue-67945-1.min.stderr
index eee04eb75..1d071da90 100644
--- a/tests/ui/const-generics/issues/issue-67945-1.min.stderr
+++ b/tests/ui/const-generics/issues/issue-67945-1.min.stderr
@@ -5,7 +5,7 @@ LL | let x: S = MaybeUninit::uninit();
| ^ cannot perform const operation using `S`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/issue-67945-1.rs:13:45
@@ -14,7 +14,7 @@ LL | let b = &*(&x as *const _ as *const S);
| ^ cannot perform const operation using `S`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error[E0392]: parameter `S` is never used
--> $DIR/issue-67945-1.rs:7:12
diff --git a/tests/ui/const-generics/issues/issue-67945-2.full.stderr b/tests/ui/const-generics/issues/issue-67945-2.full.stderr
index 47429b761..837927d58 100644
--- a/tests/ui/const-generics/issues/issue-67945-2.full.stderr
+++ b/tests/ui/const-generics/issues/issue-67945-2.full.stderr
@@ -13,5 +13,5 @@ LL | | }],
= help: consider moving this anonymous constant into a `const` function
= note: this operation may be supported in the future
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-67945-2.min.stderr b/tests/ui/const-generics/issues/issue-67945-2.min.stderr
index 6e07af1e6..62fbed71a 100644
--- a/tests/ui/const-generics/issues/issue-67945-2.min.stderr
+++ b/tests/ui/const-generics/issues/issue-67945-2.min.stderr
@@ -4,5 +4,5 @@ error: generic `Self` types are currently not permitted in anonymous constants
LL | let x: Option<Box<Self>> = None;
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-67945-3.full.stderr b/tests/ui/const-generics/issues/issue-67945-3.full.stderr
index 98f9f8397..9683769aa 100644
--- a/tests/ui/const-generics/issues/issue-67945-3.full.stderr
+++ b/tests/ui/const-generics/issues/issue-67945-3.full.stderr
@@ -12,5 +12,5 @@ LL | | }],
= help: consider moving this anonymous constant into a `const` function
= note: this operation may be supported in the future
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-67945-3.min.stderr b/tests/ui/const-generics/issues/issue-67945-3.min.stderr
index 8e6b4b204..e34869c79 100644
--- a/tests/ui/const-generics/issues/issue-67945-3.min.stderr
+++ b/tests/ui/const-generics/issues/issue-67945-3.min.stderr
@@ -5,7 +5,7 @@ LL | let x: Option<S> = None;
| ^ cannot perform const operation using `S`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error[E0392]: parameter `S` is never used
--> $DIR/issue-67945-3.rs:9:12
diff --git a/tests/ui/const-generics/issues/issue-67945-4.full.stderr b/tests/ui/const-generics/issues/issue-67945-4.full.stderr
index c03d40a7b..5450cabef 100644
--- a/tests/ui/const-generics/issues/issue-67945-4.full.stderr
+++ b/tests/ui/const-generics/issues/issue-67945-4.full.stderr
@@ -12,5 +12,5 @@ LL | | }],
= help: consider moving this anonymous constant into a `const` function
= note: this operation may be supported in the future
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-67945-4.min.stderr b/tests/ui/const-generics/issues/issue-67945-4.min.stderr
index f9520872d..280c6f4f2 100644
--- a/tests/ui/const-generics/issues/issue-67945-4.min.stderr
+++ b/tests/ui/const-generics/issues/issue-67945-4.min.stderr
@@ -5,7 +5,7 @@ LL | let x: Option<Box<S>> = None;
| ^ cannot perform const operation using `S`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error[E0392]: parameter `S` is never used
--> $DIR/issue-67945-4.rs:8:12
diff --git a/tests/ui/const-generics/issues/issue-68366.min.stderr b/tests/ui/const-generics/issues/issue-68366.min.stderr
index 3740ced90..ecf24a356 100644
--- a/tests/ui/const-generics/issues/issue-68366.min.stderr
+++ b/tests/ui/const-generics/issues/issue-68366.min.stderr
@@ -5,7 +5,7 @@ LL | impl <const N: usize> Collatz<{Some(N)}> {}
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates
--> $DIR/issue-68366.rs:11:7
diff --git a/tests/ui/const-generics/issues/issue-68615-adt.min.stderr b/tests/ui/const-generics/issues/issue-68615-adt.min.stderr
index c8b9f1719..20962098b 100644
--- a/tests/ui/const-generics/issues/issue-68615-adt.min.stderr
+++ b/tests/ui/const-generics/issues/issue-68615-adt.min.stderr
@@ -7,5 +7,5 @@ LL | struct Const<const V: [usize; 0]> {}
= note: the only supported types are integers, `bool` and `char`
= help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-68615-array.min.stderr b/tests/ui/const-generics/issues/issue-68615-array.min.stderr
index fc6cef9d4..8c76f9b5d 100644
--- a/tests/ui/const-generics/issues/issue-68615-array.min.stderr
+++ b/tests/ui/const-generics/issues/issue-68615-array.min.stderr
@@ -7,5 +7,5 @@ LL | struct Foo<const V: [usize; 0] > {}
= note: the only supported types are integers, `bool` and `char`
= help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-71169.full.stderr b/tests/ui/const-generics/issues/issue-71169.full.stderr
index ccdfbbd54..9553be6fc 100644
--- a/tests/ui/const-generics/issues/issue-71169.full.stderr
+++ b/tests/ui/const-generics/issues/issue-71169.full.stderr
@@ -6,6 +6,6 @@ LL | fn foo<const LEN: usize, const DATA: [u8; LEN]>() {}
|
= note: const parameters may not be used in the type of const parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0770`.
diff --git a/tests/ui/const-generics/issues/issue-71202.stderr b/tests/ui/const-generics/issues/issue-71202.stderr
index 277540610..2aa9e3440 100644
--- a/tests/ui/const-generics/issues/issue-71202.stderr
+++ b/tests/ui/const-generics/issues/issue-71202.stderr
@@ -29,5 +29,5 @@ LL | | } as usize] = [];
<IsCopy<T>>::VALUE
} as usize]:`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-71382.full.stderr b/tests/ui/const-generics/issues/issue-71382.full.stderr
index ab2a4e64a..95faa406f 100644
--- a/tests/ui/const-generics/issues/issue-71382.full.stderr
+++ b/tests/ui/const-generics/issues/issue-71382.full.stderr
@@ -4,6 +4,6 @@ error[E0741]: using function pointers as const generic parameters is forbidden
LL | fn test<const FN: fn()>(&self) {
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0741`.
diff --git a/tests/ui/const-generics/issues/issue-71382.min.stderr b/tests/ui/const-generics/issues/issue-71382.min.stderr
index 217166d84..0c58b10c0 100644
--- a/tests/ui/const-generics/issues/issue-71382.min.stderr
+++ b/tests/ui/const-generics/issues/issue-71382.min.stderr
@@ -6,5 +6,5 @@ LL | fn test<const FN: fn()>(&self) {
|
= note: the only supported types are integers, `bool` and `char`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-71611.full.stderr b/tests/ui/const-generics/issues/issue-71611.full.stderr
index b55f410a0..6f6a9fc21 100644
--- a/tests/ui/const-generics/issues/issue-71611.full.stderr
+++ b/tests/ui/const-generics/issues/issue-71611.full.stderr
@@ -6,6 +6,6 @@ LL | fn func<A, const F: fn(inner: A)>(outer: A) {
|
= note: type parameters may not be used in the type of const parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0770`.
diff --git a/tests/ui/const-generics/issues/issue-72352.full.stderr b/tests/ui/const-generics/issues/issue-72352.full.stderr
index 92580b336..cc46e7951 100644
--- a/tests/ui/const-generics/issues/issue-72352.full.stderr
+++ b/tests/ui/const-generics/issues/issue-72352.full.stderr
@@ -4,6 +4,6 @@ error[E0741]: using function pointers as const generic parameters is forbidden
LL | unsafe fn unsafely_do_the_thing<const F: fn(&CStr) -> usize>(ptr: *const i8) -> usize {
| ^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0741`.
diff --git a/tests/ui/const-generics/issues/issue-72352.min.stderr b/tests/ui/const-generics/issues/issue-72352.min.stderr
index b010996b8..cd009c973 100644
--- a/tests/ui/const-generics/issues/issue-72352.min.stderr
+++ b/tests/ui/const-generics/issues/issue-72352.min.stderr
@@ -6,5 +6,5 @@ LL | unsafe fn unsafely_do_the_thing<const F: fn(&CStr) -> usize>(ptr: *const i8
|
= note: the only supported types are integers, `bool` and `char`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-72845.stderr b/tests/ui/const-generics/issues/issue-72845.stderr
index 631c8605f..9ab18c3a5 100644
--- a/tests/ui/const-generics/issues/issue-72845.stderr
+++ b/tests/ui/const-generics/issues/issue-72845.stderr
@@ -7,6 +7,6 @@ LL | impl<T: Spec1> Foo for T {
LL | impl<T: Spec2> Foo for T {
| ^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/const-generics/issues/issue-73491.min.stderr b/tests/ui/const-generics/issues/issue-73491.min.stderr
index fdf057bdb..64df76756 100644
--- a/tests/ui/const-generics/issues/issue-73491.min.stderr
+++ b/tests/ui/const-generics/issues/issue-73491.min.stderr
@@ -7,5 +7,5 @@ LL | fn hoge<const IN: [u32; LEN]>() {}
= note: the only supported types are integers, `bool` and `char`
= help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-73727-static-reference-array-const-param.min.stderr b/tests/ui/const-generics/issues/issue-73727-static-reference-array-const-param.min.stderr
index bed0a02a7..2b33f35de 100644
--- a/tests/ui/const-generics/issues/issue-73727-static-reference-array-const-param.min.stderr
+++ b/tests/ui/const-generics/issues/issue-73727-static-reference-array-const-param.min.stderr
@@ -7,5 +7,5 @@ LL | fn a<const X: &'static [u32]>() {}
= note: the only supported types are integers, `bool` and `char`
= help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-74255.min.stderr b/tests/ui/const-generics/issues/issue-74255.min.stderr
index affeca167..63d8fc12f 100644
--- a/tests/ui/const-generics/issues/issue-74255.min.stderr
+++ b/tests/ui/const-generics/issues/issue-74255.min.stderr
@@ -7,5 +7,5 @@ LL | fn ice_struct_fn<const I: IceEnum>() {}
= note: the only supported types are integers, `bool` and `char`
= help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-75047.min.stderr b/tests/ui/const-generics/issues/issue-75047.min.stderr
index e316b4624..1d7ac1b01 100644
--- a/tests/ui/const-generics/issues/issue-75047.min.stderr
+++ b/tests/ui/const-generics/issues/issue-75047.min.stderr
@@ -7,5 +7,5 @@ LL | struct Foo<const N: [u8; Bar::<u32>::value()]>;
= note: the only supported types are integers, `bool` and `char`
= help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-76701-ty-param-in-const.stderr b/tests/ui/const-generics/issues/issue-76701-ty-param-in-const.stderr
index 3b53e18e6..da2fbc52a 100644
--- a/tests/ui/const-generics/issues/issue-76701-ty-param-in-const.stderr
+++ b/tests/ui/const-generics/issues/issue-76701-ty-param-in-const.stderr
@@ -5,7 +5,7 @@ LL | fn ty_param<T>() -> [u8; std::mem::size_of::<T>()] {
| ^ cannot perform const operation using `T`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/issue-76701-ty-param-in-const.rs:6:42
@@ -14,7 +14,7 @@ LL | fn const_param<const N: usize>() -> [u8; N + 1] {
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: aborting due to 2 previous errors
diff --git a/tests/ui/const-generics/issues/issue-79674.stderr b/tests/ui/const-generics/issues/issue-79674.stderr
index ba7fd2ca3..1e7878e8d 100644
--- a/tests/ui/const-generics/issues/issue-79674.stderr
+++ b/tests/ui/const-generics/issues/issue-79674.stderr
@@ -15,6 +15,6 @@ LL | A: MiniTypeId, B: MiniTypeId,
LL | Lift<{is_same_type::<A, B>()}>: IsFalse {}
| ^^^^^^^ required by this bound in `requires_distinct`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/issues/issue-80062.stderr b/tests/ui/const-generics/issues/issue-80062.stderr
index 754f18d5c..5da8e45fa 100644
--- a/tests/ui/const-generics/issues/issue-80062.stderr
+++ b/tests/ui/const-generics/issues/issue-80062.stderr
@@ -5,7 +5,7 @@ LL | let _: [u8; sof::<T>()];
| ^ cannot perform const operation using `T`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-80375.stderr b/tests/ui/const-generics/issues/issue-80375.stderr
index 5409002a9..015196f86 100644
--- a/tests/ui/const-generics/issues/issue-80375.stderr
+++ b/tests/ui/const-generics/issues/issue-80375.stderr
@@ -5,7 +5,7 @@ LL | struct MyArray<const COUNT: usize>([u8; COUNT + 1]);
| ^^^^^ cannot perform const operation using `COUNT`
|
= help: const parameters may only be used as standalone arguments, i.e. `COUNT`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-82956.stderr b/tests/ui/const-generics/issues/issue-82956.stderr
index d70c8d0bf..d0fc71124 100644
--- a/tests/ui/const-generics/issues/issue-82956.stderr
+++ b/tests/ui/const-generics/issues/issue-82956.stderr
@@ -16,6 +16,6 @@ LL + use std::collections::btree_set::IntoIter;
|
and 8 other candidates
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/const-generics/issues/issue-83249.stderr b/tests/ui/const-generics/issues/issue-83249.stderr
index 5187434ff..f41115ce4 100644
--- a/tests/ui/const-generics/issues/issue-83249.stderr
+++ b/tests/ui/const-generics/issues/issue-83249.stderr
@@ -18,6 +18,6 @@ help: consider giving this pattern a type
LL | let _: /* Type */ = foo([0; 1]);
| ++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/const-generics/issues/issue-83466.stderr b/tests/ui/const-generics/issues/issue-83466.stderr
index bcfd70639..91451a799 100644
--- a/tests/ui/const-generics/issues/issue-83466.stderr
+++ b/tests/ui/const-generics/issues/issue-83466.stderr
@@ -17,6 +17,6 @@ error[E0747]: constant provided when a type was expected
LL | S.func::<'a, 10_u32>()
| ^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0747`.
diff --git a/tests/ui/const-generics/issues/issue-83765.stderr b/tests/ui/const-generics/issues/issue-83765.stderr
index df734933c..d9956875c 100644
--- a/tests/ui/const-generics/issues/issue-83765.stderr
+++ b/tests/ui/const-generics/issues/issue-83765.stderr
@@ -17,6 +17,6 @@ LL | trait TensorDimension {
| ^^^^^^^^^^^^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/const-generics/issues/issue-84659.stderr b/tests/ui/const-generics/issues/issue-84659.stderr
index 2dfc48a34..796c5515e 100644
--- a/tests/ui/const-generics/issues/issue-84659.stderr
+++ b/tests/ui/const-generics/issues/issue-84659.stderr
@@ -6,5 +6,5 @@ LL | type Baz: Bar<{ Self::N }>;
|
= help: try adding a `where` bound using this expression: `where [(); { Self::N }]:`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-86530.stderr b/tests/ui/const-generics/issues/issue-86530.stderr
index d02808f7c..aa8aa4e10 100644
--- a/tests/ui/const-generics/issues/issue-86530.stderr
+++ b/tests/ui/const-generics/issues/issue-86530.stderr
@@ -20,6 +20,6 @@ LL | where
LL | T: X,
| ^ required by this bound in `z`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/const-generics/issues/issue-86820.stderr b/tests/ui/const-generics/issues/issue-86820.stderr
index 3a9cd957f..2928c1923 100644
--- a/tests/ui/const-generics/issues/issue-86820.stderr
+++ b/tests/ui/const-generics/issues/issue-86820.stderr
@@ -11,6 +11,6 @@ LL | impl Bits for u8 {
LL | fn bit<const I: usize>(self) -> bool {
| ^^^^^^^^^^^^^^ found const parameter of type `usize`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0053`.
diff --git a/tests/ui/const-generics/issues/issue-90364.stderr b/tests/ui/const-generics/issues/issue-90364.stderr
index 23424d7b9..6c00a654c 100644
--- a/tests/ui/const-generics/issues/issue-90364.stderr
+++ b/tests/ui/const-generics/issues/issue-90364.stderr
@@ -6,6 +6,6 @@ LL | pub struct Foo<T, const H: T>(T)
|
= note: type parameters may not be used in the type of const parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0770`.
diff --git a/tests/ui/const-generics/issues/issue-90455.stderr b/tests/ui/const-generics/issues/issue-90455.stderr
index 724d7f42e..1db906095 100644
--- a/tests/ui/const-generics/issues/issue-90455.stderr
+++ b/tests/ui/const-generics/issues/issue-90455.stderr
@@ -6,5 +6,5 @@ LL | n: [u64; num_limbs(N)],
|
= help: try adding a `where` bound using this expression: `where [(); num_limbs(N)]:`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-97278.stderr b/tests/ui/const-generics/issues/issue-97278.stderr
index 31e92f840..47e6bf1df 100644
--- a/tests/ui/const-generics/issues/issue-97278.stderr
+++ b/tests/ui/const-generics/issues/issue-97278.stderr
@@ -10,6 +10,6 @@ LL + #[derive(ConstParamTy)]
LL | enum Bar {
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0741`.
diff --git a/tests/ui/const-generics/issues/issue-98629.stderr b/tests/ui/const-generics/issues/issue-98629.stderr
index 4a248be76..e7582aaae 100644
--- a/tests/ui/const-generics/issues/issue-98629.stderr
+++ b/tests/ui/const-generics/issues/issue-98629.stderr
@@ -7,6 +7,6 @@ LL | const N: usize;
LL | impl const Trait for i32 {}
| ^^^^^^^^^^^^^^^^^^^^^^^^ missing `N` in implementation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.stderr b/tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.stderr
index 21c8fe686..7bef98b1d 100644
--- a/tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.stderr
+++ b/tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.stderr
@@ -4,5 +4,5 @@ error: cannot capture late-bound lifetime in constant
LL | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
| -- lifetime defined here ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/late-bound-vars/late-bound-in-where-issue-83993.stderr b/tests/ui/const-generics/late-bound-vars/late-bound-in-where-issue-83993.stderr
index a66dc8db9..5edbf7bc0 100644
--- a/tests/ui/const-generics/late-bound-vars/late-bound-in-where-issue-83993.stderr
+++ b/tests/ui/const-generics/late-bound-vars/late-bound-in-where-issue-83993.stderr
@@ -6,5 +6,5 @@ LL | for<'b> [(); {
LL | let x: &'b ();
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/legacy-const-generics-bad.stderr b/tests/ui/const-generics/legacy-const-generics-bad.stderr
index 3c78dd6c7..83c71e072 100644
--- a/tests/ui/const-generics/legacy-const-generics-bad.stderr
+++ b/tests/ui/const-generics/legacy-const-generics-bad.stderr
@@ -13,7 +13,7 @@ LL | legacy_const_generics::foo(0, N + 1, 2);
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: aborting due to 2 previous errors
diff --git a/tests/ui/const-generics/min_const_generics/complex-expression.stderr b/tests/ui/const-generics/min_const_generics/complex-expression.stderr
index deabd05a6..3affdcf9b 100644
--- a/tests/ui/const-generics/min_const_generics/complex-expression.stderr
+++ b/tests/ui/const-generics/min_const_generics/complex-expression.stderr
@@ -5,7 +5,7 @@ LL | struct Break0<const N: usize>([u8; { N + 1 }]);
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/complex-expression.rs:13:40
@@ -14,7 +14,7 @@ LL | struct Break1<const N: usize>([u8; { { N } }]);
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/complex-expression.rs:17:17
@@ -23,7 +23,7 @@ LL | let _: [u8; N + 1];
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/complex-expression.rs:22:17
@@ -32,7 +32,7 @@ LL | let _ = [0; N + 1];
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/complex-expression.rs:26:45
@@ -41,7 +41,7 @@ LL | struct BreakTy0<T>(T, [u8; { size_of::<*mut T>() }]);
| ^ cannot perform const operation using `T`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/complex-expression.rs:29:47
@@ -50,7 +50,7 @@ LL | struct BreakTy1<T>(T, [u8; { { size_of::<*mut T>() } }]);
| ^ cannot perform const operation using `T`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/complex-expression.rs:33:32
@@ -59,7 +59,7 @@ LL | let _: [u8; size_of::<*mut T>() + 1];
| ^ cannot perform const operation using `T`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
warning: cannot use constants which depend on generic parameters in types
--> $DIR/complex-expression.rs:38:17
diff --git a/tests/ui/const-generics/min_const_generics/const_default_first.stderr b/tests/ui/const-generics/min_const_generics/const_default_first.stderr
index 0d5a393cb..b800c6d77 100644
--- a/tests/ui/const-generics/min_const_generics/const_default_first.stderr
+++ b/tests/ui/const-generics/min_const_generics/const_default_first.stderr
@@ -4,5 +4,5 @@ error: generic parameters with a default must be trailing
LL | struct Both<const N: usize=3, T> {
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/min_const_generics/default_function_param.stderr b/tests/ui/const-generics/min_const_generics/default_function_param.stderr
index dedad2880..247eea3d9 100644
--- a/tests/ui/const-generics/min_const_generics/default_function_param.stderr
+++ b/tests/ui/const-generics/min_const_generics/default_function_param.stderr
@@ -4,5 +4,5 @@ error: defaults for const parameters are only allowed in `struct`, `enum`, `type
LL | fn foo<const SIZE: usize = 5usize>() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr b/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr
index 7726016eb..909b04769 100644
--- a/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr
+++ b/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr
@@ -5,7 +5,7 @@ LL | test::<{ let _: &'a (); 3 },>();
| ^^ cannot perform const operation using `'a`
|
= note: lifetime parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/forbid-non-static-lifetimes.rs:21:16
@@ -14,7 +14,7 @@ LL | [(); (|_: &'a u8| (), 0).1];
| ^^ cannot perform const operation using `'a`
|
= note: lifetime parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: aborting due to 2 previous errors
diff --git a/tests/ui/const-generics/min_const_generics/forbid-self-no-normalize.stderr b/tests/ui/const-generics/min_const_generics/forbid-self-no-normalize.stderr
index bda885970..03c761500 100644
--- a/tests/ui/const-generics/min_const_generics/forbid-self-no-normalize.stderr
+++ b/tests/ui/const-generics/min_const_generics/forbid-self-no-normalize.stderr
@@ -10,5 +10,5 @@ note: not a concrete type
LL | impl<T> BindsParam<T> for <T as AlwaysApplicable>::Assoc {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/min_const_generics/self-ty-in-const-1.stderr b/tests/ui/const-generics/min_const_generics/self-ty-in-const-1.stderr
index 16a7687c0..e9216fc12 100644
--- a/tests/ui/const-generics/min_const_generics/self-ty-in-const-1.stderr
+++ b/tests/ui/const-generics/min_const_generics/self-ty-in-const-1.stderr
@@ -5,7 +5,7 @@ LL | fn t1() -> [u8; std::mem::size_of::<Self>()];
| ^^^^ cannot perform const operation using `Self`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic `Self` types are currently not permitted in anonymous constants
--> $DIR/self-ty-in-const-1.rs:12:41
diff --git a/tests/ui/const-generics/min_const_generics/self-ty-in-const-2.stderr b/tests/ui/const-generics/min_const_generics/self-ty-in-const-2.stderr
index 41546292c..4943f0d70 100644
--- a/tests/ui/const-generics/min_const_generics/self-ty-in-const-2.stderr
+++ b/tests/ui/const-generics/min_const_generics/self-ty-in-const-2.stderr
@@ -10,5 +10,5 @@ note: not a concrete type
LL | impl<T> Baz for Bar<T> {
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/nested-type.full.stderr b/tests/ui/const-generics/nested-type.full.stderr
index 6d9f44065..04dc84ea3 100644
--- a/tests/ui/const-generics/nested-type.full.stderr
+++ b/tests/ui/const-generics/nested-type.full.stderr
@@ -6,6 +6,6 @@ LL | Foo::<17>::value()
|
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/const-generics/occurs-check/unify-n-nplusone.stderr b/tests/ui/const-generics/occurs-check/unify-n-nplusone.stderr
index 6b8e688fb..1a251044e 100644
--- a/tests/ui/const-generics/occurs-check/unify-n-nplusone.stderr
+++ b/tests/ui/const-generics/occurs-check/unify-n-nplusone.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | arr = bind(arr);
| ^^^^^^^^^ encountered a self-referencing constant
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/occurs-check/unused-substs-1.stderr b/tests/ui/const-generics/occurs-check/unused-substs-1.stderr
index 61d055e80..8c66c4fef 100644
--- a/tests/ui/const-generics/occurs-check/unused-substs-1.stderr
+++ b/tests/ui/const-generics/occurs-check/unused-substs-1.stderr
@@ -14,6 +14,6 @@ LL | where
LL | A<N>: Bar<N>;
| ^^^^^^ required by this bound in `A`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/const-generics/occurs-check/unused-substs-2.stderr b/tests/ui/const-generics/occurs-check/unused-substs-2.stderr
index 9532fc21a..4b1b9f205 100644
--- a/tests/ui/const-generics/occurs-check/unused-substs-2.stderr
+++ b/tests/ui/const-generics/occurs-check/unused-substs-2.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | t = foo;
| ^^^ cyclic type of infinite size
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/occurs-check/unused-substs-3.stderr b/tests/ui/const-generics/occurs-check/unused-substs-3.stderr
index fd8f8b269..bcb59705c 100644
--- a/tests/ui/const-generics/occurs-check/unused-substs-3.stderr
+++ b/tests/ui/const-generics/occurs-check/unused-substs-3.stderr
@@ -6,6 +6,6 @@ LL | t = foo;
| |
| cyclic type of infinite size
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/occurs-check/unused-substs-4.stderr b/tests/ui/const-generics/occurs-check/unused-substs-4.stderr
index 5685eedbd..1e33439f6 100644
--- a/tests/ui/const-generics/occurs-check/unused-substs-4.stderr
+++ b/tests/ui/const-generics/occurs-check/unused-substs-4.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | arr = bind(arr);
| ^^^^^^^^^ encountered a self-referencing constant
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/occurs-check/unused-substs-5.stderr b/tests/ui/const-generics/occurs-check/unused-substs-5.stderr
index be289f44f..1b3a54923 100644
--- a/tests/ui/const-generics/occurs-check/unused-substs-5.stderr
+++ b/tests/ui/const-generics/occurs-check/unused-substs-5.stderr
@@ -6,6 +6,6 @@ LL | x = q::<_, N>(x);
| |
| cyclic type of infinite size
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/outer-lifetime-in-const-generic-default.stderr b/tests/ui/const-generics/outer-lifetime-in-const-generic-default.stderr
index 6b0d18f19..38b25445f 100644
--- a/tests/ui/const-generics/outer-lifetime-in-const-generic-default.stderr
+++ b/tests/ui/const-generics/outer-lifetime-in-const-generic-default.stderr
@@ -5,7 +5,7 @@ LL | let x: &'a ();
| ^^ cannot perform const operation using `'a`
|
= note: lifetime parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.min.stderr b/tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.min.stderr
index a5e70f6b9..320c9c1c8 100644
--- a/tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.min.stderr
+++ b/tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.min.stderr
@@ -11,7 +11,7 @@ LL | struct Foo<T, U = [u8; std::mem::size_of::<T>()]>(T, U);
| ^ cannot perform const operation using `T`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error[E0128]: generic parameters with a default cannot use forward declared identifiers
--> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:8:21
diff --git a/tests/ui/const-generics/parent_generics_of_encoding_impl_trait.stderr b/tests/ui/const-generics/parent_generics_of_encoding_impl_trait.stderr
index 87ff7babe..07da6ede7 100644
--- a/tests/ui/const-generics/parent_generics_of_encoding_impl_trait.stderr
+++ b/tests/ui/const-generics/parent_generics_of_encoding_impl_trait.stderr
@@ -10,6 +10,6 @@ note: required by a bound in `foo`
LL | pub fn foo<const N: usize>(foo: impl Into<[(); N + 1]>) {
| ^^^^^ required by this bound in `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0284`.
diff --git a/tests/ui/const-generics/parser-error-recovery/issue-89013-no-assoc.stderr b/tests/ui/const-generics/parser-error-recovery/issue-89013-no-assoc.stderr
index 1de24bff4..be3d4f6d2 100644
--- a/tests/ui/const-generics/parser-error-recovery/issue-89013-no-assoc.stderr
+++ b/tests/ui/const-generics/parser-error-recovery/issue-89013-no-assoc.stderr
@@ -10,5 +10,5 @@ LL - impl Foo<const 3> for Bar {
LL + impl Foo<3> for Bar {
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/parser-error-recovery/issue-89013-type.stderr b/tests/ui/const-generics/parser-error-recovery/issue-89013-type.stderr
index f0d0d90c7..c46c305e0 100644
--- a/tests/ui/const-generics/parser-error-recovery/issue-89013-type.stderr
+++ b/tests/ui/const-generics/parser-error-recovery/issue-89013-type.stderr
@@ -4,5 +4,5 @@ error: missing type to the right of `=`
LL | impl Foo<N = type 3> for Bar {
| ^---- expected type, found keyword `type`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/projection-as-arg-const.stderr b/tests/ui/const-generics/projection-as-arg-const.stderr
index 9f727231e..88672bce0 100644
--- a/tests/ui/const-generics/projection-as-arg-const.stderr
+++ b/tests/ui/const-generics/projection-as-arg-const.stderr
@@ -6,5 +6,5 @@ LL | pub fn foo<const X: <i32 as Identity>::Identity>() {
|
= note: the only supported types are integers, `bool` and `char`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/raw-ptr-const-param.full.stderr b/tests/ui/const-generics/raw-ptr-const-param.full.stderr
index 69f1aae56..aef95bdaa 100644
--- a/tests/ui/const-generics/raw-ptr-const-param.full.stderr
+++ b/tests/ui/const-generics/raw-ptr-const-param.full.stderr
@@ -4,6 +4,6 @@ error[E0741]: using raw pointers as const generic parameters is forbidden
LL | struct Const<const P: *const u32>;
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0741`.
diff --git a/tests/ui/const-generics/raw-ptr-const-param.min.stderr b/tests/ui/const-generics/raw-ptr-const-param.min.stderr
index 13fbc34e5..4de98191d 100644
--- a/tests/ui/const-generics/raw-ptr-const-param.min.stderr
+++ b/tests/ui/const-generics/raw-ptr-const-param.min.stderr
@@ -6,5 +6,5 @@ LL | struct Const<const P: *const u32>;
|
= note: the only supported types are integers, `bool` and `char`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/struct-with-invalid-const-param.stderr b/tests/ui/const-generics/struct-with-invalid-const-param.stderr
index 67f497af5..734a42fe5 100644
--- a/tests/ui/const-generics/struct-with-invalid-const-param.stderr
+++ b/tests/ui/const-generics/struct-with-invalid-const-param.stderr
@@ -4,6 +4,6 @@ error[E0573]: expected type, found const parameter `C`
LL | struct S<const C: u8>(C);
| ^ not a type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0573`.
diff --git a/tests/ui/const-generics/transmute-const-param-static-reference.min.stderr b/tests/ui/const-generics/transmute-const-param-static-reference.min.stderr
index f18e14946..25bb7ac80 100644
--- a/tests/ui/const-generics/transmute-const-param-static-reference.min.stderr
+++ b/tests/ui/const-generics/transmute-const-param-static-reference.min.stderr
@@ -7,5 +7,5 @@ LL | struct Const<const P: &'static ()>;
= note: the only supported types are integers, `bool` and `char`
= help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/type-dependent/issue-71382.stderr b/tests/ui/const-generics/type-dependent/issue-71382.stderr
index 3f42feea5..69fd6f1c7 100644
--- a/tests/ui/const-generics/type-dependent/issue-71382.stderr
+++ b/tests/ui/const-generics/type-dependent/issue-71382.stderr
@@ -6,5 +6,5 @@ LL | fn test<const FN: fn() -> u8>(&self) -> u8 {
|
= note: the only supported types are integers, `bool` and `char`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/type-dependent/type-mismatch.full.stderr b/tests/ui/const-generics/type-dependent/type-mismatch.full.stderr
index 70bc64057..4fce1aede 100644
--- a/tests/ui/const-generics/type-dependent/type-mismatch.full.stderr
+++ b/tests/ui/const-generics/type-dependent/type-mismatch.full.stderr
@@ -9,6 +9,6 @@ help: change the type of the numeric literal from `u16` to `u8`
LL | assert_eq!(R.method::<1u8>(), 1);
| ~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/type-dependent/type-mismatch.min.stderr b/tests/ui/const-generics/type-dependent/type-mismatch.min.stderr
index 70bc64057..4fce1aede 100644
--- a/tests/ui/const-generics/type-dependent/type-mismatch.min.stderr
+++ b/tests/ui/const-generics/type-dependent/type-mismatch.min.stderr
@@ -9,6 +9,6 @@ help: change the type of the numeric literal from `u16` to `u8`
LL | assert_eq!(R.method::<1u8>(), 1);
| ~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/unify_with_nested_expr.stderr b/tests/ui/const-generics/unify_with_nested_expr.stderr
index d4d78b596..e050254a3 100644
--- a/tests/ui/const-generics/unify_with_nested_expr.stderr
+++ b/tests/ui/const-generics/unify_with_nested_expr.stderr
@@ -17,6 +17,6 @@ help: consider specifying the generic argument
LL | bar::<N>();
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0284`.
diff --git a/tests/ui/const-generics/unknown_adt.stderr b/tests/ui/const-generics/unknown_adt.stderr
index 0f462dd47..2e8210772 100644
--- a/tests/ui/const-generics/unknown_adt.stderr
+++ b/tests/ui/const-generics/unknown_adt.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `UnknownStruct` in this scope
LL | let _: UnknownStruct<7>;
| ^^^^^^^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/const-generics/unused-type-param-suggestion.stderr b/tests/ui/const-generics/unused-type-param-suggestion.stderr
index 807065ca1..6e985f566 100644
--- a/tests/ui/const-generics/unused-type-param-suggestion.stderr
+++ b/tests/ui/const-generics/unused-type-param-suggestion.stderr
@@ -7,6 +7,6 @@ LL | struct Example<N>;
= help: consider removing `N`, referring to it in a field, or using a marker such as `PhantomData`
= help: if you intended `N` to be a const parameter, use `const N: usize` instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0392`.
diff --git a/tests/ui/const-generics/wrong-normalization.stderr b/tests/ui/const-generics/wrong-normalization.stderr
index 658a84066..2f8dfc895 100644
--- a/tests/ui/const-generics/wrong-normalization.stderr
+++ b/tests/ui/const-generics/wrong-normalization.stderr
@@ -6,6 +6,6 @@ LL | impl <I8<{i8::MIN}> as Identity>::Identity {
|
= note: either implement a trait on it or create a newtype to wrap it instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0118`.
diff --git a/tests/ui/const-ptr/forbidden_slices.rs b/tests/ui/const-ptr/forbidden_slices.rs
index 0374ac7f7..deab67f72 100644
--- a/tests/ui/const-ptr/forbidden_slices.rs
+++ b/tests/ui/const-ptr/forbidden_slices.rs
@@ -1,6 +1,6 @@
// Strip out raw byte dumps to make comparison platform-independent:
// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
-// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP"
+// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
#![feature(
slice_from_ptr_range,
diff --git a/tests/ui/const-ptr/forbidden_slices.stderr b/tests/ui/const-ptr/forbidden_slices.stderr
index 105683940..250366da2 100644
--- a/tests/ui/const-ptr/forbidden_slices.stderr
+++ b/tests/ui/const-ptr/forbidden_slices.stderr
@@ -93,7 +93,7 @@ error[E0080]: could not evaluate static initializer
|
= note: out-of-bounds `offset_from`: null pointer is a dangling pointer (it has no provenance)
|
-note: inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
+note: inside `std::ptr::const_ptr::<impl *const u32>::sub_ptr`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `from_ptr_range::<'_, u32>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
@@ -108,7 +108,7 @@ error[E0080]: could not evaluate static initializer
|
= note: the evaluated program panicked at 'assertion failed: 0 < pointee_size && pointee_size <= isize::MAX as usize', $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
-note: inside `ptr::const_ptr::<impl *const ()>::sub_ptr`
+note: inside `std::ptr::const_ptr::<impl *const ()>::sub_ptr`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `from_ptr_range::<'_, ()>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
@@ -124,7 +124,7 @@ error[E0080]: could not evaluate static initializer
|
= note: out-of-bounds pointer arithmetic: ALLOC10 has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
|
-note: inside `ptr::const_ptr::<impl *const u32>::add`
+note: inside `std::ptr::const_ptr::<impl *const u32>::add`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `R2`
--> $DIR/forbidden_slices.rs:52:25
@@ -183,7 +183,7 @@ error[E0080]: could not evaluate static initializer
|
= note: out-of-bounds pointer arithmetic: ALLOC11 has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
|
-note: inside `ptr::const_ptr::<impl *const u64>::add`
+note: inside `std::ptr::const_ptr::<impl *const u64>::add`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `R8`
--> $DIR/forbidden_slices.rs:76:25
@@ -196,7 +196,7 @@ error[E0080]: could not evaluate static initializer
|
= note: `ptr_offset_from_unsigned` called on pointers into different allocations
|
-note: inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
+note: inside `std::ptr::const_ptr::<impl *const u32>::sub_ptr`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `from_ptr_range::<'_, u32>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
@@ -211,7 +211,7 @@ error[E0080]: could not evaluate static initializer
|
= note: `ptr_offset_from_unsigned` called on pointers into different allocations
|
-note: inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
+note: inside `std::ptr::const_ptr::<impl *const u32>::sub_ptr`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `from_ptr_range::<'_, u32>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
diff --git a/tests/ui/const-ptr/out_of_bounds_read.stderr b/tests/ui/const-ptr/out_of_bounds_read.stderr
index be75f76b2..7634ba252 100644
--- a/tests/ui/const-ptr/out_of_bounds_read.stderr
+++ b/tests/ui/const-ptr/out_of_bounds_read.stderr
@@ -18,7 +18,7 @@ error[E0080]: evaluation of constant value failed
|
note: inside `std::ptr::read::<u32>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
-note: inside `ptr::const_ptr::<impl *const u32>::read`
+note: inside `std::ptr::const_ptr::<impl *const u32>::read`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `_CONST_READ`
--> $DIR/out_of_bounds_read.rs:11:39
@@ -33,7 +33,7 @@ error[E0080]: evaluation of constant value failed
|
note: inside `std::ptr::read::<u32>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
-note: inside `ptr::mut_ptr::<impl *mut u32>::read`
+note: inside `std::ptr::mut_ptr::<impl *mut u32>::read`
--> $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
note: inside `_MUT_READ`
--> $DIR/out_of_bounds_read.rs:12:37
diff --git a/tests/ui/const_prop/apfloat-f64-roundtrip.rs b/tests/ui/const_prop/apfloat-f64-roundtrip.rs
index 9fb2ac96b..5f3ec931c 100644
--- a/tests/ui/const_prop/apfloat-f64-roundtrip.rs
+++ b/tests/ui/const_prop/apfloat-f64-roundtrip.rs
@@ -1,6 +1,5 @@
// run-pass
// compile-flags: -O -Zmir-opt-level=3 -Cno-prepopulate-passes
-// min-llvm-version: 16.0 (requires APFloat fixes in LLVM)
// Regression test for a broken MIR optimization (issue #113407).
pub fn main() {
diff --git a/tests/ui/const_prop/const-prop-ice.stderr b/tests/ui/const_prop/const-prop-ice.stderr
index 3bcf2b2de..8a0f831ba 100644
--- a/tests/ui/const_prop/const-prop-ice.stderr
+++ b/tests/ui/const_prop/const-prop-ice.stderr
@@ -6,5 +6,5 @@ LL | [0; 3][3u64 as usize];
|
= note: `#[deny(unconditional_panic)]` on by default
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const_prop/const-prop-ice2.stderr b/tests/ui/const_prop/const-prop-ice2.stderr
index 2b65ffc2d..593b0b94c 100644
--- a/tests/ui/const_prop/const-prop-ice2.stderr
+++ b/tests/ui/const_prop/const-prop-ice2.stderr
@@ -6,5 +6,5 @@ LL | println!("{}", xs[Enum::One as usize]);
|
= note: `#[deny(unconditional_panic)]` on by default
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const_prop/const-prop-read-static-in-const.stderr b/tests/ui/const_prop/const-prop-read-static-in-const.stderr
index 793da6285..9af1f7e3a 100644
--- a/tests/ui/const_prop/const-prop-read-static-in-const.stderr
+++ b/tests/ui/const_prop/const-prop-read-static-in-const.stderr
@@ -12,6 +12,6 @@ help: skipping check that does not even have a feature gate
LL | const TEST: u8 = MY_STATIC;
| ^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/array-literal-len-mismatch.stderr b/tests/ui/consts/array-literal-len-mismatch.stderr
index 22fec6389..a11506ecb 100644
--- a/tests/ui/consts/array-literal-len-mismatch.stderr
+++ b/tests/ui/consts/array-literal-len-mismatch.stderr
@@ -6,6 +6,6 @@ LL | const NUMBERS: [u8; 3] = [10, 20];
| |
| help: consider specifying the actual array length: `2`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/consts/assoc_const_generic_impl.stderr b/tests/ui/consts/assoc_const_generic_impl.stderr
index 854b9ce5b..d826972ce 100644
--- a/tests/ui/consts/assoc_const_generic_impl.stderr
+++ b/tests/ui/consts/assoc_const_generic_impl.stderr
@@ -10,6 +10,6 @@ note: the above error was encountered while instantiating `fn <u32 as ZeroSized>
LL | 42_u32.requires_zero_size();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/async-block.with_feature.stderr b/tests/ui/consts/async-block.with_feature.stderr
index 8c6364aec..8228fa29e 100644
--- a/tests/ui/consts/async-block.with_feature.stderr
+++ b/tests/ui/consts/async-block.with_feature.stderr
@@ -4,5 +4,5 @@ error: fatal error triggered by #[rustc_error]
LL | fn main() {}
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/const-array-oob.stderr b/tests/ui/consts/const-array-oob.stderr
index f1c5f58af..d481d7728 100644
--- a/tests/ui/consts/const-array-oob.stderr
+++ b/tests/ui/consts/const-array-oob.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | const BLUB: [u32; FOO[4]] = [5, 6];
| ^^^^^^ index out of bounds: the length is 3 but the index is 4
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-as-fn.stderr b/tests/ui/consts/const-as-fn.stderr
index 6c51ed893..8d30321e3 100644
--- a/tests/ui/consts/const-as-fn.stderr
+++ b/tests/ui/consts/const-as-fn.stderr
@@ -9,6 +9,6 @@ LL | FOO();
| |
| call expression requires function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0618`.
diff --git a/tests/ui/consts/const-block-const-bound.stderr b/tests/ui/consts/const-block-const-bound.stderr
index b402f0ea9..81790a62f 100644
--- a/tests/ui/consts/const-block-const-bound.stderr
+++ b/tests/ui/consts/const-block-const-bound.stderr
@@ -6,6 +6,6 @@ LL | const fn f<T: ~const Destruct>(x: T) {}
| |
| the destructor for this type cannot be evaluated in constant functions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0493`.
diff --git a/tests/ui/consts/const-block.rs b/tests/ui/consts/const-block.rs
index ec99c70f6..40c7a7a1d 100644
--- a/tests/ui/consts/const-block.rs
+++ b/tests/ui/consts/const-block.rs
@@ -3,8 +3,6 @@
#![allow(dead_code)]
#![allow(unused_unsafe)]
-use std::marker::Sync;
-
struct Foo {
a: usize,
b: *const ()
diff --git a/tests/ui/consts/const-blocks/fn-call-in-non-const.stderr b/tests/ui/consts/const-blocks/fn-call-in-non-const.stderr
index eb8b8ac75..b13df67b4 100644
--- a/tests/ui/consts/const-blocks/fn-call-in-non-const.stderr
+++ b/tests/ui/consts/const-blocks/fn-call-in-non-const.stderr
@@ -18,6 +18,6 @@ LL ~ const ARRAY_REPEAT_VALUE: Option<Bar> = no_copy();
LL ~ let _: [Option<Bar>; 2] = [ARRAY_REPEAT_VALUE; 2];
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/consts/const-blocks/trait-error.stderr b/tests/ui/consts/const-blocks/trait-error.stderr
index 858ffa820..36249bf3f 100644
--- a/tests/ui/consts/const-blocks/trait-error.stderr
+++ b/tests/ui/consts/const-blocks/trait-error.stderr
@@ -18,6 +18,6 @@ LL ~ const ARRAY_REPEAT_VALUE: Foo<String> = Foo(String::new());
LL ~ [ARRAY_REPEAT_VALUE; 4];
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/consts/const-call.stderr b/tests/ui/consts/const-call.stderr
index e46bcad0e..4e7098a5c 100644
--- a/tests/ui/consts/const-call.stderr
+++ b/tests/ui/consts/const-call.stderr
@@ -6,6 +6,6 @@ LL | let _ = [0; f(2)];
|
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/consts/const-cast-wrong-type.stderr b/tests/ui/consts/const-cast-wrong-type.stderr
index ee186636e..44361f15d 100644
--- a/tests/ui/consts/const-cast-wrong-type.stderr
+++ b/tests/ui/consts/const-cast-wrong-type.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | const b: *const i8 = &a as *const i8;
| ^^^^^^^^^^^^^^^ expected `u8`, found `i8`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/consts/const-deref-ptr.stderr b/tests/ui/consts/const-deref-ptr.stderr
index 16eb6b016..b102b4d17 100644
--- a/tests/ui/consts/const-deref-ptr.stderr
+++ b/tests/ui/consts/const-deref-ptr.stderr
@@ -4,6 +4,6 @@ error[E0080]: could not evaluate static initializer
LL | static C: u64 = unsafe {*(0xdeadbeef as *const u64)};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: 0xdeadbeef[noalloc] is a dangling pointer (it has no provenance)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-err-multi.stderr b/tests/ui/consts/const-err-multi.stderr
index 1ad504b3a..2fe0b9bb4 100644
--- a/tests/ui/consts/const-err-multi.stderr
+++ b/tests/ui/consts/const-err-multi.stderr
@@ -22,6 +22,6 @@ note: erroneous constant encountered
LL | pub const D: i8 = 50 - A;
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-err4.32bit.stderr b/tests/ui/consts/const-err4.32bit.stderr
index 1cbf78173..582a848ca 100644
--- a/tests/ui/consts/const-err4.32bit.stderr
+++ b/tests/ui/consts/const-err4.32bit.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | Boo = [unsafe { Foo { b: () }.a }; 4][3],
| ^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-err4.64bit.stderr b/tests/ui/consts/const-err4.64bit.stderr
index 1cbf78173..582a848ca 100644
--- a/tests/ui/consts/const-err4.64bit.stderr
+++ b/tests/ui/consts/const-err4.64bit.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | Boo = [unsafe { Foo { b: () }.a }; 4][3],
| ^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/assign-to-static-within-other-static.stderr b/tests/ui/consts/const-eval/assign-to-static-within-other-static.stderr
index 4b6784acf..5300111a6 100644
--- a/tests/ui/consts/const-eval/assign-to-static-within-other-static.stderr
+++ b/tests/ui/consts/const-eval/assign-to-static-within-other-static.stderr
@@ -4,6 +4,6 @@ error[E0080]: could not evaluate static initializer
LL | FOO = 5;
| ^^^^^^^ modifying a static's initial value from another static's initializer
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/conditional_array_execution.stderr b/tests/ui/consts/const-eval/conditional_array_execution.stderr
index c3401fbae..300343780 100644
--- a/tests/ui/consts/const-eval/conditional_array_execution.stderr
+++ b/tests/ui/consts/const-eval/conditional_array_execution.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
| ^^^^^ attempt to compute `5_u32 - 6_u32`, which would overflow
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/const-eval-intrinsic-promotion.stderr b/tests/ui/consts/const-eval/const-eval-intrinsic-promotion.stderr
index ed6a6ee6e..d533dcaa6 100644
--- a/tests/ui/consts/const-eval/const-eval-intrinsic-promotion.stderr
+++ b/tests/ui/consts/const-eval/const-eval-intrinsic-promotion.stderr
@@ -8,6 +8,6 @@ LL | &std::intrinsics::size_of::<i32>();
LL | }
| - temporary value is freed at the end of this statement
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/consts/const-eval/const-eval-overflow-3.stderr b/tests/ui/consts/const-eval/const-eval-overflow-3.stderr
index 73f421b5b..0437cd3ad 100644
--- a/tests/ui/consts/const-eval/const-eval-overflow-3.stderr
+++ b/tests/ui/consts/const-eval/const-eval-overflow-3.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | = [0; (i8::MAX + 1) as usize];
| ^^^^^^^^^^^^^ attempt to compute `i8::MAX + 1_i8`, which would overflow
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/const-eval-overflow-4.stderr b/tests/ui/consts/const-eval/const-eval-overflow-4.stderr
index 94f419319..ce5e59901 100644
--- a/tests/ui/consts/const-eval/const-eval-overflow-4.stderr
+++ b/tests/ui/consts/const-eval/const-eval-overflow-4.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | : [u32; (i8::MAX as i8 + 1i8) as usize]
| ^^^^^^^^^^^^^^^^^^^^^ attempt to compute `i8::MAX + 1_i8`, which would overflow
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/const-eval-span.stderr b/tests/ui/consts/const-eval/const-eval-span.stderr
index fe33ad490..ba11759a7 100644
--- a/tests/ui/consts/const-eval/const-eval-span.stderr
+++ b/tests/ui/consts/const-eval/const-eval-span.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | V = CONSTANT,
| ^^^^^^^^ expected `isize`, found `S`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/consts/const-eval/const_fn_target_feature.stderr b/tests/ui/consts/const-eval/const_fn_target_feature.stderr
index 36918b52c..0c7c69b79 100644
--- a/tests/ui/consts/const-eval/const_fn_target_feature.stderr
+++ b/tests/ui/consts/const-eval/const_fn_target_feature.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | const B: () = unsafe { avx2_fn() };
| ^^^^^^^^^ calling a function that requires unavailable target features: avx2
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/const_panic-normalize-tabs-115498.stderr b/tests/ui/consts/const-eval/const_panic-normalize-tabs-115498.stderr
index 82c63dd17..5f4af2561 100644
--- a/tests/ui/consts/const-eval/const_panic-normalize-tabs-115498.stderr
+++ b/tests/ui/consts/const-eval/const_panic-normalize-tabs-115498.stderr
@@ -6,6 +6,6 @@ LL | struct Bug([u8; panic!{"\t"}]);
|
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/const_panic_stability.e2021.stderr b/tests/ui/consts/const-eval/const_panic_stability.e2021.stderr
index 9e8179181..aad36b52b 100644
--- a/tests/ui/consts/const-eval/const_panic_stability.e2021.stderr
+++ b/tests/ui/consts/const-eval/const_panic_stability.e2021.stderr
@@ -9,5 +9,5 @@ help: you might be missing a string literal to format with
LL | panic!("{}", { "foo" });
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/const-eval/const_panic_track_caller.stderr b/tests/ui/consts/const-eval/const_panic_track_caller.stderr
index 846458176..a7df82705 100644
--- a/tests/ui/consts/const-eval/const_panic_track_caller.stderr
+++ b/tests/ui/consts/const-eval/const_panic_track_caller.stderr
@@ -15,6 +15,6 @@ note: inside `X`
LL | const X: u32 = c();
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/erroneous-const.stderr b/tests/ui/consts/const-eval/erroneous-const.stderr
index 0e31520fd..bd25e96c2 100644
--- a/tests/ui/consts/const-eval/erroneous-const.stderr
+++ b/tests/ui/consts/const-eval/erroneous-const.stderr
@@ -10,6 +10,6 @@ note: erroneous constant encountered
LL | PrintName::<T>::VOID;
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/erroneous-const2.stderr b/tests/ui/consts/const-eval/erroneous-const2.stderr
index 4ca44694c..6a5839e3d 100644
--- a/tests/ui/consts/const-eval/erroneous-const2.stderr
+++ b/tests/ui/consts/const-eval/erroneous-const2.stderr
@@ -10,6 +10,6 @@ note: erroneous constant encountered
LL | PrintName::<i32>::VOID;
| ^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/heap/alloc_intrinsic_errors.stderr b/tests/ui/consts/const-eval/heap/alloc_intrinsic_errors.stderr
index 23ba2c2f5..cdde14756 100644
--- a/tests/ui/consts/const-eval/heap/alloc_intrinsic_errors.stderr
+++ b/tests/ui/consts/const-eval/heap/alloc_intrinsic_errors.stderr
@@ -15,6 +15,6 @@ note: inside `FOO`
LL | const FOO: i32 = foo();
| ^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/heap/alloc_intrinsic_nontransient_fail.stderr b/tests/ui/consts/const-eval/heap/alloc_intrinsic_nontransient_fail.stderr
index 2103f842b..dfaecfbcd 100644
--- a/tests/ui/consts/const-eval/heap/alloc_intrinsic_nontransient_fail.stderr
+++ b/tests/ui/consts/const-eval/heap/alloc_intrinsic_nontransient_fail.stderr
@@ -6,5 +6,5 @@ LL | const FOO: *const i32 = foo();
|
= note: memory only reachable via raw pointers is not supported
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.32bit.stderr b/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.32bit.stderr
index 82de91eff..383c167d3 100644
--- a/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.32bit.stderr
+++ b/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.32bit.stderr
@@ -6,9 +6,9 @@ LL | const BAR: &i32 = unsafe { &*(intrinsics::const_allocate(4, 4) as *mut i32)
|
= 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) {
- ╾ALLOC0╼ │ ╾──╼
+ ╾ALLOC0<imm>╼ │ ╾──╼
}
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.64bit.stderr b/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.64bit.stderr
index de23aafe0..d06792283 100644
--- a/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.64bit.stderr
+++ b/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.64bit.stderr
@@ -6,9 +6,9 @@ LL | const BAR: &i32 = unsafe { &*(intrinsics::const_allocate(4, 4) as *mut i32)
|
= 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) {
- ╾ALLOC0╼ │ ╾──────╼
+ ╾ALLOC0<imm>╼ │ ╾──────╼
}
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/heap/alloc_intrinsic_untyped.stderr b/tests/ui/consts/const-eval/heap/alloc_intrinsic_untyped.stderr
index b62766473..3903ccd6a 100644
--- a/tests/ui/consts/const-eval/heap/alloc_intrinsic_untyped.stderr
+++ b/tests/ui/consts/const-eval/heap/alloc_intrinsic_untyped.stderr
@@ -6,5 +6,5 @@ LL | const BAR: *mut i32 = unsafe { intrinsics::const_allocate(4, 4) as *mut i32
|
= note: memory only reachable via raw pointers is not supported
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.stderr b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.stderr
index 916344a7b..d2d323e5a 100644
--- a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.stderr
+++ b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | intrinsics::const_deallocate(ptr, 4, 4);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: ALLOC0 has been freed, so this pointer is dangling
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/index-out-of-bounds-never-type.stderr b/tests/ui/consts/const-eval/index-out-of-bounds-never-type.stderr
index 8bcd03005..4e7ef52f6 100644
--- a/tests/ui/consts/const-eval/index-out-of-bounds-never-type.stderr
+++ b/tests/ui/consts/const-eval/index-out-of-bounds-never-type.stderr
@@ -10,6 +10,6 @@ note: the above error was encountered while instantiating `fn f::<()>`
LL | f::<()>();
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/index_out_of_bounds.stderr b/tests/ui/consts/const-eval/index_out_of_bounds.stderr
index 8bb3a0c67..d8df74fa0 100644
--- a/tests/ui/consts/const-eval/index_out_of_bounds.stderr
+++ b/tests/ui/consts/const-eval/index_out_of_bounds.stderr
@@ -4,6 +4,6 @@ error[E0080]: could not evaluate static initializer
LL | static FOO: i32 = [][0];
| ^^^^^ index out of bounds: the length is 0 but the index is 0
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/index_out_of_bounds_propagated.stderr b/tests/ui/consts/const-eval/index_out_of_bounds_propagated.stderr
index d247d691d..64c87af43 100644
--- a/tests/ui/consts/const-eval/index_out_of_bounds_propagated.stderr
+++ b/tests/ui/consts/const-eval/index_out_of_bounds_propagated.stderr
@@ -6,5 +6,5 @@ LL | array[1];
|
= note: `#[deny(unconditional_panic)]` on by default
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/const-eval/infinite_loop.stderr b/tests/ui/consts/const-eval/infinite_loop.stderr
index f0434a847..e7a0a96a1 100644
--- a/tests/ui/consts/const-eval/infinite_loop.stderr
+++ b/tests/ui/consts/const-eval/infinite_loop.stderr
@@ -23,5 +23,5 @@ LL | | }];
| |_____^
= note: `#[deny(long_running_const_eval)]` on by default
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/const-eval/issue-44578.stderr b/tests/ui/consts/const-eval/issue-44578.stderr
index eea42c8ce..6aabe5301 100644
--- a/tests/ui/consts/const-eval/issue-44578.stderr
+++ b/tests/ui/consts/const-eval/issue-44578.stderr
@@ -27,6 +27,6 @@ LL | println!("{}", <Bar<u16, u8> as Foo>::AMT);
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
= note: this note originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/issue-49296.stderr b/tests/ui/consts/const-eval/issue-49296.stderr
index 2022a16e7..485a11d1f 100644
--- a/tests/ui/consts/const-eval/issue-49296.stderr
+++ b/tests/ui/consts/const-eval/issue-49296.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | const X: u64 = *wat(42);
| ^^^^^^^^ memory access failed: ALLOC0 has been freed, so this pointer is dangling
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/issue-50814-2.mir-opt.stderr b/tests/ui/consts/const-eval/issue-50814-2.mir-opt.stderr
index 6454ce3d1..f3ec3200f 100644
--- a/tests/ui/consts/const-eval/issue-50814-2.mir-opt.stderr
+++ b/tests/ui/consts/const-eval/issue-50814-2.mir-opt.stderr
@@ -16,6 +16,6 @@ note: erroneous constant encountered
LL | &<A<T> as Foo<T>>::BAR
| ^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/issue-50814-2.normal.stderr b/tests/ui/consts/const-eval/issue-50814-2.normal.stderr
index c6b1df6c8..f552c8fde 100644
--- a/tests/ui/consts/const-eval/issue-50814-2.normal.stderr
+++ b/tests/ui/consts/const-eval/issue-50814-2.normal.stderr
@@ -16,6 +16,6 @@ note: the above error was encountered while instantiating `fn foo::<()>`
LL | println!("{:x}", foo::<()>() as *const usize as usize);
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/issue-50814.stderr b/tests/ui/consts/const-eval/issue-50814.stderr
index 48a20d0bb..65c49956f 100644
--- a/tests/ui/consts/const-eval/issue-50814.stderr
+++ b/tests/ui/consts/const-eval/issue-50814.stderr
@@ -16,6 +16,6 @@ note: the above error was encountered while instantiating `fn foo::<i32>`
LL | foo(0);
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/issue-52475.stderr b/tests/ui/consts/const-eval/issue-52475.stderr
index ebf9d12a6..daaee0378 100644
--- a/tests/ui/consts/const-eval/issue-52475.stderr
+++ b/tests/ui/consts/const-eval/issue-52475.stderr
@@ -24,5 +24,5 @@ LL | | }];
| |_____^
= note: `#[deny(long_running_const_eval)]` on by default
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/const-eval/issue-70723.stderr b/tests/ui/consts/const-eval/issue-70723.stderr
index 572a43072..7cece4ed5 100644
--- a/tests/ui/consts/const-eval/issue-70723.stderr
+++ b/tests/ui/consts/const-eval/issue-70723.stderr
@@ -13,5 +13,5 @@ LL | static _X: () = loop {};
| ^^^^^^^^^^^^^
= note: `#[deny(long_running_const_eval)]` on by default
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/const-eval/issue-85155.stderr b/tests/ui/consts/const-eval/issue-85155.stderr
index 3d2c76b7e..a88e959a8 100644
--- a/tests/ui/consts/const-eval/issue-85155.stderr
+++ b/tests/ui/consts/const-eval/issue-85155.stderr
@@ -10,6 +10,6 @@ note: the above error was encountered while instantiating `fn post_monomorphizat
LL | post_monomorphization_error::stdarch_intrinsic::<2>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/issue-85907.stderr b/tests/ui/consts/const-eval/issue-85907.stderr
index fd7b40572..519227bc6 100644
--- a/tests/ui/consts/const-eval/issue-85907.stderr
+++ b/tests/ui/consts/const-eval/issue-85907.stderr
@@ -6,5 +6,5 @@ LL | panic!(123);
|
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.rs b/tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.rs
new file mode 100644
index 000000000..c6960fa72
--- /dev/null
+++ b/tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.rs
@@ -0,0 +1,43 @@
+// Test that we can handle unsized types with an extern type tail part.
+// Regression test for issue #91827.
+
+#![feature(extern_types)]
+
+use std::ptr::addr_of;
+
+extern "C" {
+ type Opaque;
+}
+
+struct Newtype(Opaque);
+
+struct S {
+ i: i32,
+ j: i32,
+ a: Newtype,
+}
+
+const NEWTYPE: () = unsafe {
+ let buf = [0i32; 4];
+ let x: &Newtype = &*(&buf as *const _ as *const Newtype);
+
+ // Projecting to the newtype works, because it is always at offset 0.
+ let field = &x.0;
+};
+
+const OFFSET: () = unsafe {
+ let buf = [0i32; 4];
+ let x: &S = &*(&buf as *const _ as *const S);
+
+ // Accessing sized fields is perfectly fine, even at non-zero offsets.
+ let field = &x.i;
+ let field = &x.j;
+
+ // This needs to compute the field offset, but we don't know the type's alignment, so this
+ // fails.
+ let field = &x.a;
+ //~^ ERROR: evaluation of constant value failed
+ //~| does not have a known offset
+};
+
+fn main() {}
diff --git a/tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.stderr b/tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.stderr
new file mode 100644
index 000000000..99f37fedd
--- /dev/null
+++ b/tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.stderr
@@ -0,0 +1,9 @@
+error[E0080]: evaluation of constant value failed
+ --> $DIR/issue-91827-extern-types-field-offset.rs:38:17
+ |
+LL | let field = &x.a;
+ | ^^^^ `extern type` does not have a known offset
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/issue-91827-extern-types.rs b/tests/ui/consts/const-eval/issue-91827-extern-types.rs
deleted file mode 100644
index c9aaa6e55..000000000
--- a/tests/ui/consts/const-eval/issue-91827-extern-types.rs
+++ /dev/null
@@ -1,59 +0,0 @@
-// run-pass
-//
-// Test that we can handle unsized types with an extern type tail part.
-// Regression test for issue #91827.
-
-#![feature(extern_types)]
-
-use std::ptr::addr_of;
-
-extern "C" {
- type Opaque;
-}
-
-unsafe impl Sync for Opaque {}
-
-#[repr(C)]
-pub struct List<T> {
- len: usize,
- data: [T; 0],
- tail: Opaque,
-}
-
-#[repr(C)]
-pub struct ListImpl<T, const N: usize> {
- len: usize,
- data: [T; N],
-}
-
-impl<T> List<T> {
- const fn as_slice(&self) -> &[T] {
- unsafe {
- let ptr = addr_of!(self.tail) as *const T;
- std::slice::from_raw_parts(ptr, self.len)
- }
- }
-}
-
-impl<T, const N: usize> ListImpl<T, N> {
- const fn as_list(&self) -> &List<T> {
- unsafe { std::mem::transmute(self) }
- }
-}
-
-pub static A: ListImpl<u128, 3> = ListImpl {
- len: 3,
- data: [5, 6, 7],
-};
-pub static A_REF: &'static List<u128> = A.as_list();
-pub static A_TAIL_OFFSET: isize = tail_offset(A.as_list());
-
-const fn tail_offset<T>(list: &List<T>) -> isize {
- unsafe { (addr_of!(list.tail) as *const u8).offset_from(list as *const List<T> as *const u8) }
-}
-
-fn main() {
- assert_eq!(A_REF.as_slice(), &[5, 6, 7]);
- // Check that interpreter and code generation agree about the position of the tail field.
- assert_eq!(A_TAIL_OFFSET, tail_offset(A_REF));
-}
diff --git a/tests/ui/consts/const-eval/livedrop.stderr b/tests/ui/consts/const-eval/livedrop.stderr
index d04fdb70e..1add81406 100644
--- a/tests/ui/consts/const-eval/livedrop.stderr
+++ b/tests/ui/consts/const-eval/livedrop.stderr
@@ -7,6 +7,6 @@ LL | let mut always_returned = None;
LL | always_returned = never_returned;
| --------------- value is dropped here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0493`.
diff --git a/tests/ui/consts/const-eval/match-test-ptr-null.stderr b/tests/ui/consts/const-eval/match-test-ptr-null.stderr
index 05c3951c1..1e14c70fc 100644
--- a/tests/ui/consts/const-eval/match-test-ptr-null.stderr
+++ b/tests/ui/consts/const-eval/match-test-ptr-null.stderr
@@ -7,5 +7,5 @@ LL | match &1 as *const i32 as usize {
= note: at compile-time, pointers do not have an integer value
= note: avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/const-eval/mod-static-with-const-fn.stderr b/tests/ui/consts/const-eval/mod-static-with-const-fn.stderr
index d127d1d45..901ae1922 100644
--- a/tests/ui/consts/const-eval/mod-static-with-const-fn.stderr
+++ b/tests/ui/consts/const-eval/mod-static-with-const-fn.stderr
@@ -4,6 +4,6 @@ error[E0080]: could not evaluate static initializer
LL | *FOO.0.get() = 5;
| ^^^^^^^^^^^^^^^^ modifying a static's initial value from another static's initializer
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/nonnull_as_ref_ub.stderr b/tests/ui/consts/const-eval/nonnull_as_ref_ub.stderr
index e34f3f43c..b878c8d1b 100644
--- a/tests/ui/consts/const-eval/nonnull_as_ref_ub.stderr
+++ b/tests/ui/consts/const-eval/nonnull_as_ref_ub.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | const _: () = assert!(42 == *unsafe { NON_NULL.as_ref() });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: 0x1[noalloc] is a dangling pointer (it has no provenance)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/panic-assoc-never-type.stderr b/tests/ui/consts/const-eval/panic-assoc-never-type.stderr
index 50660664f..eef392559 100644
--- a/tests/ui/consts/const-eval/panic-assoc-never-type.stderr
+++ b/tests/ui/consts/const-eval/panic-assoc-never-type.stderr
@@ -20,6 +20,6 @@ LL | let _ = PrintName::VOID;
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/panic-never-type.stderr b/tests/ui/consts/const-eval/panic-never-type.stderr
index 6bff14a45..d3ba3eefb 100644
--- a/tests/ui/consts/const-eval/panic-never-type.stderr
+++ b/tests/ui/consts/const-eval/panic-never-type.stderr
@@ -6,6 +6,6 @@ LL | const VOID: ! = panic!();
|
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/partial_ptr_overwrite.stderr b/tests/ui/consts/const-eval/partial_ptr_overwrite.stderr
index b948e07b9..3203ca764 100644
--- a/tests/ui/consts/const-eval/partial_ptr_overwrite.stderr
+++ b/tests/ui/consts/const-eval/partial_ptr_overwrite.stderr
@@ -7,6 +7,6 @@ LL | *(ptr as *mut u8) = 123;
= help: this code performed an operation that depends on the underlying bytes representing a pointer
= help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/promoted_const_fn_fail.stderr b/tests/ui/consts/const-eval/promoted_const_fn_fail.stderr
index 2d4e7c83d..9aec54793 100644
--- a/tests/ui/consts/const-eval/promoted_const_fn_fail.stderr
+++ b/tests/ui/consts/const-eval/promoted_const_fn_fail.stderr
@@ -9,6 +9,6 @@ LL | let x: &'static u8 = &(bar() + 1);
LL | }
| - temporary value is freed at the end of this statement
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.stderr b/tests/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.stderr
index 9ebae3a18..71e104789 100644
--- a/tests/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.stderr
+++ b/tests/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.stderr
@@ -9,6 +9,6 @@ LL | let x: &'static u8 = &(bar() + 1);
LL | }
| - temporary value is freed at the end of this statement
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/consts/const-eval/raw-bytes.32bit.stderr b/tests/ui/consts/const-eval/raw-bytes.32bit.stderr
index 689ebf752..57815e6af 100644
--- a/tests/ui/consts/const-eval/raw-bytes.32bit.stderr
+++ b/tests/ui/consts/const-eval/raw-bytes.32bit.stderr
@@ -1,5 +1,5 @@
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:20:1
+ --> $DIR/raw-bytes.rs:22:1
|
LL | const BAD_ENUM: Enum = unsafe { mem::transmute(1usize) };
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x00000001, but expected a valid enum tag
@@ -10,7 +10,7 @@ LL | const BAD_ENUM: Enum = unsafe { mem::transmute(1usize) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:28:1
+ --> $DIR/raw-bytes.rs:30:1
|
LL | const BAD_ENUM2: Enum2 = unsafe { mem::transmute(0usize) };
| ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x00000000, but expected a valid enum tag
@@ -21,7 +21,7 @@ LL | const BAD_ENUM2: Enum2 = unsafe { mem::transmute(0usize) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:42:1
+ --> $DIR/raw-bytes.rs:44:1
|
LL | const BAD_UNINHABITED_VARIANT1: UninhDiscriminant = unsafe { mem::transmute(1u8) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
@@ -32,7 +32,7 @@ LL | const BAD_UNINHABITED_VARIANT1: UninhDiscriminant = unsafe { mem::transmute
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:44:1
+ --> $DIR/raw-bytes.rs:46:1
|
LL | const BAD_UNINHABITED_VARIANT2: UninhDiscriminant = unsafe { mem::transmute(3u8) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
@@ -43,7 +43,7 @@ LL | const BAD_UNINHABITED_VARIANT2: UninhDiscriminant = unsafe { mem::transmute
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:50:1
+ --> $DIR/raw-bytes.rs:52: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`)
@@ -54,7 +54,7 @@ LL | const BAD_OPTION_CHAR: Option<(char, char)> = Some(('x', unsafe { mem::tran
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:54:1
+ --> $DIR/raw-bytes.rs:57:1
|
LL | const NULL_PTR: NonNull<u8> = unsafe { mem::transmute(0usize) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
@@ -65,7 +65,7 @@ LL | const NULL_PTR: NonNull<u8> = unsafe { mem::transmute(0usize) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:57:1
+ --> $DIR/raw-bytes.rs:60:1
|
LL | const NULL_U8: NonZeroU8 = unsafe { mem::transmute(0u8) };
| ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
@@ -76,7 +76,7 @@ LL | const NULL_U8: NonZeroU8 = unsafe { mem::transmute(0u8) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:59:1
+ --> $DIR/raw-bytes.rs:62:1
|
LL | const NULL_USIZE: NonZeroUsize = unsafe { mem::transmute(0usize) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
@@ -87,7 +87,7 @@ LL | const NULL_USIZE: NonZeroUsize = unsafe { mem::transmute(0usize) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:65:1
+ --> $DIR/raw-bytes.rs:68:1
|
LL | const BAD_RANGE1: RestrictedRange1 = unsafe { RestrictedRange1(42) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 42, but expected something in the range 10..=30
@@ -98,7 +98,7 @@ LL | const BAD_RANGE1: RestrictedRange1 = unsafe { RestrictedRange1(42) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:71:1
+ --> $DIR/raw-bytes.rs:74: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
@@ -109,7 +109,7 @@ LL | const BAD_RANGE2: RestrictedRange2 = unsafe { RestrictedRange2(20) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:74:1
+ --> $DIR/raw-bytes.rs:77:1
|
LL | const NULL_FAT_PTR: NonNull<dyn Send> = unsafe {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
@@ -120,7 +120,7 @@ LL | const NULL_FAT_PTR: NonNull<dyn Send> = unsafe {
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:82:1
+ --> $DIR/raw-bytes.rs:85:1
|
LL | const UNALIGNED: &u16 = unsafe { mem::transmute(&[0u8; 4]) };
| ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
@@ -131,7 +131,7 @@ LL | const UNALIGNED: &u16 = unsafe { mem::transmute(&[0u8; 4]) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:86:1
+ --> $DIR/raw-bytes.rs:89: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)
@@ -142,7 +142,7 @@ LL | const UNALIGNED_BOX: Box<u16> = unsafe { mem::transmute(&[0u8; 4]) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:90:1
+ --> $DIR/raw-bytes.rs:93:1
|
LL | const NULL: &u16 = unsafe { mem::transmute(0usize) };
| ^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null reference
@@ -153,7 +153,7 @@ LL | const NULL: &u16 = unsafe { mem::transmute(0usize) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:93:1
+ --> $DIR/raw-bytes.rs:96:1
|
LL | const NULL_BOX: Box<u16> = unsafe { mem::transmute(0usize) };
| ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null box
@@ -164,7 +164,7 @@ LL | const NULL_BOX: Box<u16> = unsafe { mem::transmute(0usize) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:96:1
+ --> $DIR/raw-bytes.rs:99:1
|
LL | const USIZE_AS_REF: &'static u8 = unsafe { mem::transmute(1337usize) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (0x539[noalloc] has no provenance)
@@ -175,7 +175,7 @@ LL | const USIZE_AS_REF: &'static u8 = unsafe { mem::transmute(1337usize) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:99:1
+ --> $DIR/raw-bytes.rs:102:1
|
LL | const USIZE_AS_BOX: Box<u8> = unsafe { mem::transmute(1337usize) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling box (0x539[noalloc] has no provenance)
@@ -186,7 +186,7 @@ LL | const USIZE_AS_BOX: Box<u8> = unsafe { mem::transmute(1337usize) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:102:1
+ --> $DIR/raw-bytes.rs:105:1
|
LL | const NULL_FN_PTR: fn() = unsafe { mem::transmute(0usize) };
| ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered null pointer, but expected a function pointer
@@ -197,7 +197,7 @@ LL | const NULL_FN_PTR: fn() = unsafe { mem::transmute(0usize) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:104:1
+ --> $DIR/raw-bytes.rs:107:1
|
LL | const DANGLING_FN_PTR: fn() = unsafe { mem::transmute(13usize) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0xd[noalloc], but expected a function pointer
@@ -208,10 +208,10 @@ LL | const DANGLING_FN_PTR: fn() = unsafe { mem::transmute(13usize) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:106:1
+ --> $DIR/raw-bytes.rs:109:1
|
LL | const DATA_FN_PTR: fn() = unsafe { mem::transmute(&13) };
- | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC3, but expected a function pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC3<imm>, 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) {
@@ -219,7 +219,7 @@ LL | const DATA_FN_PTR: fn() = unsafe { mem::transmute(&13) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:112:1
+ --> $DIR/raw-bytes.rs:115:1
|
LL | const BAD_BAD_REF: &Bar = unsafe { mem::transmute(1usize) };
| ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to uninhabited type Bar
@@ -230,7 +230,7 @@ LL | const BAD_BAD_REF: &Bar = unsafe { mem::transmute(1usize) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:137:1
+ --> $DIR/raw-bytes.rs:140: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)
@@ -241,7 +241,7 @@ LL | const STR_TOO_LONG: &str = unsafe { mem::transmute((&42u8, 999usize)) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:139:1
+ --> $DIR/raw-bytes.rs:142: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
@@ -252,7 +252,7 @@ LL | const NESTED_STR_MUCH_TOO_LONG: (&str,) = (unsafe { mem::transmute((&42, us
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:141:1
+ --> $DIR/raw-bytes.rs:144: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
@@ -263,7 +263,7 @@ LL | const MY_STR_MUCH_TOO_LONG: &MyStr = unsafe { mem::transmute((&42u8, usize:
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:144:1
+ --> $DIR/raw-bytes.rs:147:1
|
LL | const STR_NO_INIT: &str = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit::<u8> { uninit: () }]) };
| ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered uninitialized memory, but expected a string
@@ -274,7 +274,7 @@ LL | const STR_NO_INIT: &str = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit:
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:146:1
+ --> $DIR/raw-bytes.rs:149:1
|
LL | const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit::<u8> { uninit: () }]) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered uninitialized memory, but expected a string
@@ -285,7 +285,7 @@ LL | const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[MaybeUni
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:148:1
+ --> $DIR/raw-bytes.rs:151:1
|
LL | const MYSTR_NO_INIT_ISSUE83182: &MyStr = unsafe { mem::transmute::<&[_], _>(&[&()]) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered a pointer, but expected a string
@@ -298,7 +298,7 @@ LL | const MYSTR_NO_INIT_ISSUE83182: &MyStr = unsafe { mem::transmute::<&[_], _>
= help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:152:1
+ --> $DIR/raw-bytes.rs:155: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)
@@ -309,7 +309,7 @@ LL | const SLICE_TOO_LONG: &[u8] = unsafe { mem::transmute((&42u8, 999usize)) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:154:1
+ --> $DIR/raw-bytes.rs:157: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
@@ -320,7 +320,7 @@ LL | const SLICE_TOO_LONG_OVERFLOW: &[u32] = unsafe { mem::transmute((&42u32, is
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:157:1
+ --> $DIR/raw-bytes.rs:160: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)
@@ -331,7 +331,7 @@ LL | const SLICE_TOO_LONG_BOX: Box<[u8]> = unsafe { mem::transmute((&42u8, 999us
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:160:1
+ --> $DIR/raw-bytes.rs:163:1
|
LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x03, but expected a boolean
@@ -342,13 +342,13 @@ LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
}
note: erroneous constant encountered
- --> $DIR/raw-bytes.rs:160:40
+ --> $DIR/raw-bytes.rs:163:40
|
LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:166:1
+ --> $DIR/raw-bytes.rs:169: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
@@ -359,13 +359,13 @@ LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3
}
note: erroneous constant encountered
- --> $DIR/raw-bytes.rs:166:42
+ --> $DIR/raw-bytes.rs:169:42
|
LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3u8) }, [false]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:170:1
+ --> $DIR/raw-bytes.rs:173: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
@@ -376,16 +376,16 @@ LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::tran
}
note: erroneous constant encountered
- --> $DIR/raw-bytes.rs:170:42
+ --> $DIR/raw-bytes.rs:173:42
|
LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:175:1
+ --> $DIR/raw-bytes.rs:178:1
|
LL | const TRAIT_OBJ_SHORT_VTABLE_1: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u8))) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC17, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC17<imm>, but expected a vtable 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) {
@@ -393,10 +393,10 @@ LL | const TRAIT_OBJ_SHORT_VTABLE_1: W<&dyn Trait> = unsafe { mem::transmute(W((
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:179:1
+ --> $DIR/raw-bytes.rs:182:1
|
LL | const TRAIT_OBJ_SHORT_VTABLE_2: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u64))) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC19, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC19<imm>, but expected a vtable 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) {
@@ -404,7 +404,7 @@ LL | const TRAIT_OBJ_SHORT_VTABLE_2: W<&dyn Trait> = unsafe { mem::transmute(W((
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:183:1
+ --> $DIR/raw-bytes.rs:186:1
|
LL | const TRAIT_OBJ_INT_VTABLE: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, 4usize))) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered 0x4[noalloc], but expected a vtable pointer
@@ -415,10 +415,10 @@ LL | const TRAIT_OBJ_INT_VTABLE: W<&dyn Trait> = unsafe { mem::transmute(W((&92u
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:186:1
+ --> $DIR/raw-bytes.rs:189: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 ALLOC22, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC22<imm>, but expected a vtable 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) {
@@ -426,7 +426,7 @@ LL | const TRAIT_OBJ_BAD_DROP_FN_NOT_FN_PTR: W<&dyn Trait> = unsafe { mem::trans
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:190:1
+ --> $DIR/raw-bytes.rs:193: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
@@ -437,7 +437,7 @@ LL | const TRAIT_OBJ_CONTENT_INVALID: &dyn Trait = unsafe { mem::transmute::<_,
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:194:1
+ --> $DIR/raw-bytes.rs:197:1
|
LL | const RAW_TRAIT_OBJ_VTABLE_NULL: *const dyn Trait = unsafe { mem::transmute((&92u8, 0usize)) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered null pointer, but expected a vtable pointer
@@ -448,10 +448,10 @@ LL | const RAW_TRAIT_OBJ_VTABLE_NULL: *const dyn Trait = unsafe { mem::transmute
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:196:1
+ --> $DIR/raw-bytes.rs:199:1
|
LL | const RAW_TRAIT_OBJ_VTABLE_INVALID: *const dyn Trait = unsafe { mem::transmute((&92u8, &3u64)) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC27, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC27<imm>, but expected a vtable 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) {
@@ -459,29 +459,7 @@ LL | const RAW_TRAIT_OBJ_VTABLE_INVALID: *const dyn Trait = unsafe { mem::transm
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:201: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
- |
- = 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) {
- 00 00 00 00 00 10 00 00 │ ........
- }
-
-error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:205: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
- |
- = 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) {
- 03 00 00 00 09 00 00 00 │ ........
- }
-
-error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:209:1
+ --> $DIR/raw-bytes.rs:203:1
|
LL | const _: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) };
| ^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to uninhabited type [!; 1]
@@ -492,7 +470,7 @@ LL | const _: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:210:1
+ --> $DIR/raw-bytes.rs:204:1
|
LL | const _: &[!] = unsafe { &*(1_usize as *const [!; 1]) };
| ^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
@@ -503,7 +481,7 @@ LL | const _: &[!] = unsafe { &*(1_usize as *const [!; 1]) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:211:1
+ --> $DIR/raw-bytes.rs:205:1
|
LL | const _: &[!] = unsafe { &*(1_usize as *const [!; 42]) };
| ^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
@@ -514,7 +492,7 @@ LL | const _: &[!] = unsafe { &*(1_usize as *const [!; 42]) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:215:1
+ --> $DIR/raw-bytes.rs:209:1
|
LL | pub static S4: &[u8] = unsafe { from_raw_parts((&D1) as *const _ as _, 1) };
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized memory, but expected an integer
@@ -525,7 +503,7 @@ LL | pub static S4: &[u8] = unsafe { from_raw_parts((&D1) as *const _ as _, 1) }
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:218:1
+ --> $DIR/raw-bytes.rs:212:1
|
LL | pub static S5: &[u8] = unsafe { from_raw_parts((&D3) as *const _ as _, mem::size_of::<&u32>()) };
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a pointer, but expected an integer
@@ -538,7 +516,7 @@ LL | pub static S5: &[u8] = unsafe { from_raw_parts((&D3) as *const _ as _, mem:
= help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:221:1
+ --> $DIR/raw-bytes.rs:215: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
@@ -549,7 +527,7 @@ 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/raw-bytes.rs:225:1
+ --> $DIR/raw-bytes.rs:219:1
|
LL | pub static S7: &[u16] = unsafe {
| ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[1]: encountered uninitialized memory, but expected an integer
@@ -560,7 +538,7 @@ LL | pub static S7: &[u16] = unsafe {
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:232:1
+ --> $DIR/raw-bytes.rs:226:1
|
LL | pub static R4: &[u8] = unsafe {
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized memory, but expected an integer
@@ -571,7 +549,7 @@ LL | pub static R4: &[u8] = unsafe {
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:237:1
+ --> $DIR/raw-bytes.rs:231:1
|
LL | pub static R5: &[u8] = unsafe {
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a pointer, but expected an integer
@@ -584,7 +562,7 @@ LL | pub static R5: &[u8] = unsafe {
= help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:242:1
+ --> $DIR/raw-bytes.rs:236:1
|
LL | pub static R6: &[bool] = unsafe {
| ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
@@ -594,6 +572,6 @@ LL | pub static R6: &[bool] = unsafe {
╾ALLOC_ID╼ 04 00 00 00 │ ╾──╼....
}
-error: aborting due to 52 previous errors
+error: aborting due to 50 previous errors
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/raw-bytes.64bit.stderr b/tests/ui/consts/const-eval/raw-bytes.64bit.stderr
index 3447a8ab4..c875d91cc 100644
--- a/tests/ui/consts/const-eval/raw-bytes.64bit.stderr
+++ b/tests/ui/consts/const-eval/raw-bytes.64bit.stderr
@@ -1,5 +1,5 @@
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:20:1
+ --> $DIR/raw-bytes.rs:22:1
|
LL | const BAD_ENUM: Enum = unsafe { mem::transmute(1usize) };
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x0000000000000001, but expected a valid enum tag
@@ -10,7 +10,7 @@ LL | const BAD_ENUM: Enum = unsafe { mem::transmute(1usize) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:28:1
+ --> $DIR/raw-bytes.rs:30:1
|
LL | const BAD_ENUM2: Enum2 = unsafe { mem::transmute(0usize) };
| ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x0000000000000000, but expected a valid enum tag
@@ -21,7 +21,7 @@ LL | const BAD_ENUM2: Enum2 = unsafe { mem::transmute(0usize) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:42:1
+ --> $DIR/raw-bytes.rs:44:1
|
LL | const BAD_UNINHABITED_VARIANT1: UninhDiscriminant = unsafe { mem::transmute(1u8) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
@@ -32,7 +32,7 @@ LL | const BAD_UNINHABITED_VARIANT1: UninhDiscriminant = unsafe { mem::transmute
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:44:1
+ --> $DIR/raw-bytes.rs:46:1
|
LL | const BAD_UNINHABITED_VARIANT2: UninhDiscriminant = unsafe { mem::transmute(3u8) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
@@ -43,7 +43,7 @@ LL | const BAD_UNINHABITED_VARIANT2: UninhDiscriminant = unsafe { mem::transmute
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:50:1
+ --> $DIR/raw-bytes.rs:52: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`)
@@ -54,7 +54,7 @@ LL | const BAD_OPTION_CHAR: Option<(char, char)> = Some(('x', unsafe { mem::tran
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:54:1
+ --> $DIR/raw-bytes.rs:57:1
|
LL | const NULL_PTR: NonNull<u8> = unsafe { mem::transmute(0usize) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
@@ -65,7 +65,7 @@ LL | const NULL_PTR: NonNull<u8> = unsafe { mem::transmute(0usize) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:57:1
+ --> $DIR/raw-bytes.rs:60:1
|
LL | const NULL_U8: NonZeroU8 = unsafe { mem::transmute(0u8) };
| ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
@@ -76,7 +76,7 @@ LL | const NULL_U8: NonZeroU8 = unsafe { mem::transmute(0u8) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:59:1
+ --> $DIR/raw-bytes.rs:62:1
|
LL | const NULL_USIZE: NonZeroUsize = unsafe { mem::transmute(0usize) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
@@ -87,7 +87,7 @@ LL | const NULL_USIZE: NonZeroUsize = unsafe { mem::transmute(0usize) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:65:1
+ --> $DIR/raw-bytes.rs:68:1
|
LL | const BAD_RANGE1: RestrictedRange1 = unsafe { RestrictedRange1(42) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 42, but expected something in the range 10..=30
@@ -98,7 +98,7 @@ LL | const BAD_RANGE1: RestrictedRange1 = unsafe { RestrictedRange1(42) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:71:1
+ --> $DIR/raw-bytes.rs:74: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
@@ -109,7 +109,7 @@ LL | const BAD_RANGE2: RestrictedRange2 = unsafe { RestrictedRange2(20) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:74:1
+ --> $DIR/raw-bytes.rs:77:1
|
LL | const NULL_FAT_PTR: NonNull<dyn Send> = unsafe {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
@@ -120,7 +120,7 @@ LL | const NULL_FAT_PTR: NonNull<dyn Send> = unsafe {
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:82:1
+ --> $DIR/raw-bytes.rs:85:1
|
LL | const UNALIGNED: &u16 = unsafe { mem::transmute(&[0u8; 4]) };
| ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
@@ -131,7 +131,7 @@ LL | const UNALIGNED: &u16 = unsafe { mem::transmute(&[0u8; 4]) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:86:1
+ --> $DIR/raw-bytes.rs:89: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)
@@ -142,7 +142,7 @@ LL | const UNALIGNED_BOX: Box<u16> = unsafe { mem::transmute(&[0u8; 4]) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:90:1
+ --> $DIR/raw-bytes.rs:93:1
|
LL | const NULL: &u16 = unsafe { mem::transmute(0usize) };
| ^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null reference
@@ -153,7 +153,7 @@ LL | const NULL: &u16 = unsafe { mem::transmute(0usize) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:93:1
+ --> $DIR/raw-bytes.rs:96:1
|
LL | const NULL_BOX: Box<u16> = unsafe { mem::transmute(0usize) };
| ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null box
@@ -164,7 +164,7 @@ LL | const NULL_BOX: Box<u16> = unsafe { mem::transmute(0usize) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:96:1
+ --> $DIR/raw-bytes.rs:99:1
|
LL | const USIZE_AS_REF: &'static u8 = unsafe { mem::transmute(1337usize) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (0x539[noalloc] has no provenance)
@@ -175,7 +175,7 @@ LL | const USIZE_AS_REF: &'static u8 = unsafe { mem::transmute(1337usize) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:99:1
+ --> $DIR/raw-bytes.rs:102:1
|
LL | const USIZE_AS_BOX: Box<u8> = unsafe { mem::transmute(1337usize) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling box (0x539[noalloc] has no provenance)
@@ -186,7 +186,7 @@ LL | const USIZE_AS_BOX: Box<u8> = unsafe { mem::transmute(1337usize) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:102:1
+ --> $DIR/raw-bytes.rs:105:1
|
LL | const NULL_FN_PTR: fn() = unsafe { mem::transmute(0usize) };
| ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered null pointer, but expected a function pointer
@@ -197,7 +197,7 @@ LL | const NULL_FN_PTR: fn() = unsafe { mem::transmute(0usize) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:104:1
+ --> $DIR/raw-bytes.rs:107:1
|
LL | const DANGLING_FN_PTR: fn() = unsafe { mem::transmute(13usize) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0xd[noalloc], but expected a function pointer
@@ -208,10 +208,10 @@ LL | const DANGLING_FN_PTR: fn() = unsafe { mem::transmute(13usize) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:106:1
+ --> $DIR/raw-bytes.rs:109:1
|
LL | const DATA_FN_PTR: fn() = unsafe { mem::transmute(&13) };
- | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC3, but expected a function pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC3<imm>, 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) {
@@ -219,7 +219,7 @@ LL | const DATA_FN_PTR: fn() = unsafe { mem::transmute(&13) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:112:1
+ --> $DIR/raw-bytes.rs:115:1
|
LL | const BAD_BAD_REF: &Bar = unsafe { mem::transmute(1usize) };
| ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to uninhabited type Bar
@@ -230,7 +230,7 @@ LL | const BAD_BAD_REF: &Bar = unsafe { mem::transmute(1usize) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:137:1
+ --> $DIR/raw-bytes.rs:140: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)
@@ -241,7 +241,7 @@ LL | const STR_TOO_LONG: &str = unsafe { mem::transmute((&42u8, 999usize)) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:139:1
+ --> $DIR/raw-bytes.rs:142: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
@@ -252,7 +252,7 @@ LL | const NESTED_STR_MUCH_TOO_LONG: (&str,) = (unsafe { mem::transmute((&42, us
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:141:1
+ --> $DIR/raw-bytes.rs:144: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
@@ -263,7 +263,7 @@ LL | const MY_STR_MUCH_TOO_LONG: &MyStr = unsafe { mem::transmute((&42u8, usize:
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:144:1
+ --> $DIR/raw-bytes.rs:147:1
|
LL | const STR_NO_INIT: &str = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit::<u8> { uninit: () }]) };
| ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered uninitialized memory, but expected a string
@@ -274,7 +274,7 @@ LL | const STR_NO_INIT: &str = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit:
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:146:1
+ --> $DIR/raw-bytes.rs:149:1
|
LL | const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit::<u8> { uninit: () }]) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered uninitialized memory, but expected a string
@@ -285,7 +285,7 @@ LL | const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[MaybeUni
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:148:1
+ --> $DIR/raw-bytes.rs:151:1
|
LL | const MYSTR_NO_INIT_ISSUE83182: &MyStr = unsafe { mem::transmute::<&[_], _>(&[&()]) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered a pointer, but expected a string
@@ -298,7 +298,7 @@ LL | const MYSTR_NO_INIT_ISSUE83182: &MyStr = unsafe { mem::transmute::<&[_], _>
= help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:152:1
+ --> $DIR/raw-bytes.rs:155: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)
@@ -309,7 +309,7 @@ LL | const SLICE_TOO_LONG: &[u8] = unsafe { mem::transmute((&42u8, 999usize)) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:154:1
+ --> $DIR/raw-bytes.rs:157: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
@@ -320,7 +320,7 @@ LL | const SLICE_TOO_LONG_OVERFLOW: &[u32] = unsafe { mem::transmute((&42u32, is
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:157:1
+ --> $DIR/raw-bytes.rs:160: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)
@@ -331,7 +331,7 @@ LL | const SLICE_TOO_LONG_BOX: Box<[u8]> = unsafe { mem::transmute((&42u8, 999us
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:160:1
+ --> $DIR/raw-bytes.rs:163:1
|
LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x03, but expected a boolean
@@ -342,13 +342,13 @@ LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
}
note: erroneous constant encountered
- --> $DIR/raw-bytes.rs:160:40
+ --> $DIR/raw-bytes.rs:163:40
|
LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:166:1
+ --> $DIR/raw-bytes.rs:169: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
@@ -359,13 +359,13 @@ LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3
}
note: erroneous constant encountered
- --> $DIR/raw-bytes.rs:166:42
+ --> $DIR/raw-bytes.rs:169:42
|
LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3u8) }, [false]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:170:1
+ --> $DIR/raw-bytes.rs:173: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
@@ -376,16 +376,16 @@ LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::tran
}
note: erroneous constant encountered
- --> $DIR/raw-bytes.rs:170:42
+ --> $DIR/raw-bytes.rs:173:42
|
LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:175:1
+ --> $DIR/raw-bytes.rs:178:1
|
LL | const TRAIT_OBJ_SHORT_VTABLE_1: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u8))) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC17, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC17<imm>, but expected a vtable 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) {
@@ -393,10 +393,10 @@ LL | const TRAIT_OBJ_SHORT_VTABLE_1: W<&dyn Trait> = unsafe { mem::transmute(W((
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:179:1
+ --> $DIR/raw-bytes.rs:182:1
|
LL | const TRAIT_OBJ_SHORT_VTABLE_2: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u64))) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC19, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC19<imm>, but expected a vtable 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) {
@@ -404,7 +404,7 @@ LL | const TRAIT_OBJ_SHORT_VTABLE_2: W<&dyn Trait> = unsafe { mem::transmute(W((
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:183:1
+ --> $DIR/raw-bytes.rs:186:1
|
LL | const TRAIT_OBJ_INT_VTABLE: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, 4usize))) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered 0x4[noalloc], but expected a vtable pointer
@@ -415,10 +415,10 @@ LL | const TRAIT_OBJ_INT_VTABLE: W<&dyn Trait> = unsafe { mem::transmute(W((&92u
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:186:1
+ --> $DIR/raw-bytes.rs:189: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 ALLOC22, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC22<imm>, but expected a vtable 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) {
@@ -426,7 +426,7 @@ LL | const TRAIT_OBJ_BAD_DROP_FN_NOT_FN_PTR: W<&dyn Trait> = unsafe { mem::trans
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:190:1
+ --> $DIR/raw-bytes.rs:193: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
@@ -437,7 +437,7 @@ LL | const TRAIT_OBJ_CONTENT_INVALID: &dyn Trait = unsafe { mem::transmute::<_,
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:194:1
+ --> $DIR/raw-bytes.rs:197:1
|
LL | const RAW_TRAIT_OBJ_VTABLE_NULL: *const dyn Trait = unsafe { mem::transmute((&92u8, 0usize)) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered null pointer, but expected a vtable pointer
@@ -448,10 +448,10 @@ LL | const RAW_TRAIT_OBJ_VTABLE_NULL: *const dyn Trait = unsafe { mem::transmute
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:196:1
+ --> $DIR/raw-bytes.rs:199:1
|
LL | const RAW_TRAIT_OBJ_VTABLE_INVALID: *const dyn Trait = unsafe { mem::transmute((&92u8, &3u64)) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC27, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC27<imm>, but expected a vtable 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) {
@@ -459,29 +459,7 @@ LL | const RAW_TRAIT_OBJ_VTABLE_INVALID: *const dyn Trait = unsafe { mem::transm
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:201: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
- |
- = 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) {
- 00 00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 │ ................
- }
-
-error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:205: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
- |
- = 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) {
- 03 00 00 00 00 00 00 00 09 00 00 00 00 00 00 00 │ ................
- }
-
-error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:209:1
+ --> $DIR/raw-bytes.rs:203:1
|
LL | const _: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) };
| ^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to uninhabited type [!; 1]
@@ -492,7 +470,7 @@ LL | const _: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:210:1
+ --> $DIR/raw-bytes.rs:204:1
|
LL | const _: &[!] = unsafe { &*(1_usize as *const [!; 1]) };
| ^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
@@ -503,7 +481,7 @@ LL | const _: &[!] = unsafe { &*(1_usize as *const [!; 1]) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:211:1
+ --> $DIR/raw-bytes.rs:205:1
|
LL | const _: &[!] = unsafe { &*(1_usize as *const [!; 42]) };
| ^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
@@ -514,7 +492,7 @@ LL | const _: &[!] = unsafe { &*(1_usize as *const [!; 42]) };
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:215:1
+ --> $DIR/raw-bytes.rs:209:1
|
LL | pub static S4: &[u8] = unsafe { from_raw_parts((&D1) as *const _ as _, 1) };
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized memory, but expected an integer
@@ -525,7 +503,7 @@ LL | pub static S4: &[u8] = unsafe { from_raw_parts((&D1) as *const _ as _, 1) }
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:218:1
+ --> $DIR/raw-bytes.rs:212:1
|
LL | pub static S5: &[u8] = unsafe { from_raw_parts((&D3) as *const _ as _, mem::size_of::<&u32>()) };
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a pointer, but expected an integer
@@ -538,7 +516,7 @@ LL | pub static S5: &[u8] = unsafe { from_raw_parts((&D3) as *const _ as _, mem:
= help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:221:1
+ --> $DIR/raw-bytes.rs:215: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
@@ -549,7 +527,7 @@ 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/raw-bytes.rs:225:1
+ --> $DIR/raw-bytes.rs:219:1
|
LL | pub static S7: &[u16] = unsafe {
| ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[1]: encountered uninitialized memory, but expected an integer
@@ -560,7 +538,7 @@ LL | pub static S7: &[u16] = unsafe {
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:232:1
+ --> $DIR/raw-bytes.rs:226:1
|
LL | pub static R4: &[u8] = unsafe {
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized memory, but expected an integer
@@ -571,7 +549,7 @@ LL | pub static R4: &[u8] = unsafe {
}
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:237:1
+ --> $DIR/raw-bytes.rs:231:1
|
LL | pub static R5: &[u8] = unsafe {
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a pointer, but expected an integer
@@ -584,7 +562,7 @@ LL | pub static R5: &[u8] = unsafe {
= help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
error[E0080]: it is undefined behavior to use this value
- --> $DIR/raw-bytes.rs:242:1
+ --> $DIR/raw-bytes.rs:236:1
|
LL | pub static R6: &[bool] = unsafe {
| ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
@@ -594,6 +572,6 @@ LL | pub static R6: &[bool] = unsafe {
╾ALLOC_ID╼ 04 00 00 00 00 00 00 00 │ ╾──────╼........
}
-error: aborting due to 52 previous errors
+error: aborting due to 50 previous errors
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/raw-bytes.rs b/tests/ui/consts/const-eval/raw-bytes.rs
index e00592222..ae65a5cb8 100644
--- a/tests/ui/consts/const-eval/raw-bytes.rs
+++ b/tests/ui/consts/const-eval/raw-bytes.rs
@@ -1,7 +1,7 @@
// stderr-per-bitwidth
// ignore-endian-big
// ignore-tidy-linelength
-// normalize-stderr-test "╾─*ALLOC[0-9]+(\+[a-z0-9]+)?─*╼" -> "╾ALLOC_ID$1╼"
+// normalize-stderr-test "╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼" -> "╾ALLOC_ID$1╼"
#![feature(never_type, rustc_attrs, ptr_metadata, slice_from_ptr_range, const_slice_from_ptr_range)]
#![allow(invalid_value)]
@@ -12,6 +12,8 @@ use std::ptr::NonNull;
use std::num::{NonZeroU8, NonZeroUsize};
use std::slice::{from_ptr_range, from_raw_parts};
+// # Bad enums and chars
+
#[repr(usize)]
#[derive(Copy, Clone)]
enum Enum {
@@ -50,6 +52,7 @@ const BAD_UNINHABITED_VARIANT2: UninhDiscriminant = unsafe { mem::transmute(3u8)
const BAD_OPTION_CHAR: Option<(char, char)> = Some(('x', unsafe { mem::transmute(!0u32) }));
//~^ ERROR is undefined behavior
+// # Bad pointers and references
const NULL_PTR: NonNull<u8> = unsafe { mem::transmute(0usize) };
//~^ ERROR it is undefined behavior to use this value
@@ -196,16 +199,7 @@ const RAW_TRAIT_OBJ_VTABLE_NULL: *const dyn Trait = unsafe { mem::transmute((&92
const RAW_TRAIT_OBJ_VTABLE_INVALID: *const dyn Trait = unsafe { mem::transmute((&92u8, &3u64)) };
//~^ ERROR it is undefined behavior to use this value
-
-// not ok, since alignment needs to be non-zero.
-const LAYOUT_INVALID_ZERO: Layout = unsafe { Layout::from_size_align_unchecked(0x1000, 0x00) };
-//~^ ERROR it is undefined behavior to use this value
-
-// not ok, since alignment needs to be a power of two.
-const LAYOUT_INVALID_THREE: Layout = unsafe { Layout::from_size_align_unchecked(9, 3) };
-//~^ ERROR it is undefined behavior to use this value
-
-
+// Uninhabited types
const _: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) }; //~ ERROR undefined behavior
const _: &[!] = unsafe { &*(1_usize as *const [!; 1]) }; //~ ERROR undefined behavior
const _: &[!] = unsafe { &*(1_usize as *const [!; 42]) }; //~ ERROR undefined behavior
diff --git a/tests/ui/consts/const-eval/raw-pointer-ub.stderr b/tests/ui/consts/const-eval/raw-pointer-ub.stderr
index 60fcd461c..cba06fdc6 100644
--- a/tests/ui/consts/const-eval/raw-pointer-ub.stderr
+++ b/tests/ui/consts/const-eval/raw-pointer-ub.stderr
@@ -17,7 +17,7 @@ error[E0080]: evaluation of constant value failed
|
note: inside `copy_nonoverlapping::<u32>`
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
-note: inside `ptr::const_ptr::<impl *const u32>::copy_to_nonoverlapping`
+note: inside `std::ptr::const_ptr::<impl *const u32>::copy_to_nonoverlapping`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `MISALIGNED_COPY`
--> $DIR/raw-pointer-ub.rs:22:5
diff --git a/tests/ui/consts/const-eval/shift_overflow.stderr b/tests/ui/consts/const-eval/shift_overflow.stderr
index e8d4076a6..901bfa10e 100644
--- a/tests/ui/consts/const-eval/shift_overflow.stderr
+++ b/tests/ui/consts/const-eval/shift_overflow.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | X = 1 << ((u32::MAX as u64) + 1),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to shift left by `4294967296_u64`, which would overflow
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/size-of-t.stderr b/tests/ui/consts/const-eval/size-of-t.stderr
index abe641046..418ac6f61 100644
--- a/tests/ui/consts/const-eval/size-of-t.stderr
+++ b/tests/ui/consts/const-eval/size-of-t.stderr
@@ -5,7 +5,7 @@ LL | let _arr: [u8; size_of::<T>()];
| ^ cannot perform const operation using `T`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/const-eval/stable-metric/ctfe-fn-call.stderr b/tests/ui/consts/const-eval/stable-metric/ctfe-fn-call.stderr
index a3fd712ca..f087c9960 100644
--- a/tests/ui/consts/const-eval/stable-metric/ctfe-fn-call.stderr
+++ b/tests/ui/consts/const-eval/stable-metric/ctfe-fn-call.stderr
@@ -13,5 +13,5 @@ LL | const X: u32 = call_foo();
| ^^^^^^^^^^^^
= note: `#[deny(long_running_const_eval)]` on by default
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/const-eval/stable-metric/ctfe-labelled-loop.stderr b/tests/ui/consts/const-eval/stable-metric/ctfe-labelled-loop.stderr
index 5808ee35a..ecb48fc62 100644
--- a/tests/ui/consts/const-eval/stable-metric/ctfe-labelled-loop.stderr
+++ b/tests/ui/consts/const-eval/stable-metric/ctfe-labelled-loop.stderr
@@ -19,5 +19,5 @@ LL | const X: u32 = labelled_loop(19);
| ^^^^^^^^^^^^
= note: `#[deny(long_running_const_eval)]` on by default
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/const-eval/stable-metric/ctfe-recursion.stderr b/tests/ui/consts/const-eval/stable-metric/ctfe-recursion.stderr
index 524c8e554..a05d792c9 100644
--- a/tests/ui/consts/const-eval/stable-metric/ctfe-recursion.stderr
+++ b/tests/ui/consts/const-eval/stable-metric/ctfe-recursion.stderr
@@ -13,5 +13,5 @@ LL | const X: u32 = recurse(19);
| ^^^^^^^^^^^^
= note: `#[deny(long_running_const_eval)]` on by default
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/const-eval/transmute-const-promotion.stderr b/tests/ui/consts/const-eval/transmute-const-promotion.stderr
index 434a957f6..3603db03b 100644
--- a/tests/ui/consts/const-eval/transmute-const-promotion.stderr
+++ b/tests/ui/consts/const-eval/transmute-const-promotion.stderr
@@ -9,6 +9,6 @@ LL |
LL | }
| - temporary value is freed at the end of this statement
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/consts/const-eval/transmute-const.32bit.stderr b/tests/ui/consts/const-eval/transmute-const.32bit.stderr
index 09fd79986..35a5cabaa 100644
--- a/tests/ui/consts/const-eval/transmute-const.32bit.stderr
+++ b/tests/ui/consts/const-eval/transmute-const.32bit.stderr
@@ -9,6 +9,6 @@ LL | static FOO: bool = unsafe { mem::transmute(3u8) };
03 │ .
}
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/transmute-const.64bit.stderr b/tests/ui/consts/const-eval/transmute-const.64bit.stderr
index 09fd79986..35a5cabaa 100644
--- a/tests/ui/consts/const-eval/transmute-const.64bit.stderr
+++ b/tests/ui/consts/const-eval/transmute-const.64bit.stderr
@@ -9,6 +9,6 @@ LL | static FOO: bool = unsafe { mem::transmute(3u8) };
03 │ .
}
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/ub-enum-overwrite.stderr b/tests/ui/consts/const-eval/ub-enum-overwrite.stderr
index 5750212b4..2a133c057 100644
--- a/tests/ui/consts/const-eval/ub-enum-overwrite.stderr
+++ b/tests/ui/consts/const-eval/ub-enum-overwrite.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | unsafe { *p }
| ^^ using uninitialized data, but this operation requires initialized memory
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/ub-incorrect-vtable.32bit.stderr b/tests/ui/consts/const-eval/ub-incorrect-vtable.32bit.stderr
index 7b30233c0..5c47cbfdf 100644
--- a/tests/ui/consts/const-eval/ub-incorrect-vtable.32bit.stderr
+++ b/tests/ui/consts/const-eval/ub-incorrect-vtable.32bit.stderr
@@ -2,55 +2,55 @@ error[E0080]: it is undefined behavior to use this value
--> $DIR/ub-incorrect-vtable.rs:18:1
|
LL | const INVALID_VTABLE_ALIGNMENT: &dyn Trait =
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC1, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC1<imm>, but expected a vtable 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) {
- ╾ALLOC0╼ ╾ALLOC1╼ │ ╾──╼╾──╼
+ ╾ALLOC0<imm>╼ ╾ALLOC1<imm>╼ │ ╾──╼╾──╼
}
error[E0080]: it is undefined behavior to use this value
--> $DIR/ub-incorrect-vtable.rs:23:1
|
LL | const INVALID_VTABLE_SIZE: &dyn Trait =
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC3, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC3<imm>, but expected a vtable 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) {
- ╾ALLOC2╼ ╾ALLOC3╼ │ ╾──╼╾──╼
+ ╾ALLOC2<imm>╼ ╾ALLOC3<imm>╼ │ ╾──╼╾──╼
}
error[E0080]: it is undefined behavior to use this value
--> $DIR/ub-incorrect-vtable.rs:33:1
|
LL | const INVALID_VTABLE_ALIGNMENT_UB: W<&dyn Trait> =
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC5, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC5<imm>, but expected a vtable 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) {
- ╾ALLOC4╼ ╾ALLOC5╼ │ ╾──╼╾──╼
+ ╾ALLOC4<imm>╼ ╾ALLOC5<imm>╼ │ ╾──╼╾──╼
}
error[E0080]: it is undefined behavior to use this value
--> $DIR/ub-incorrect-vtable.rs:38:1
|
LL | const INVALID_VTABLE_SIZE_UB: W<&dyn Trait> =
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC7, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC7<imm>, but expected a vtable 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) {
- ╾ALLOC6╼ ╾ALLOC7╼ │ ╾──╼╾──╼
+ ╾ALLOC6<imm>╼ ╾ALLOC7<imm>╼ │ ╾──╼╾──╼
}
error[E0080]: it is undefined behavior to use this value
--> $DIR/ub-incorrect-vtable.rs:44:1
|
LL | const INVALID_VTABLE_UB: W<&dyn Trait> =
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC9, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC9<imm>, but expected a vtable 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) {
- ╾ALLOC8╼ ╾ALLOC9╼ │ ╾──╼╾──╼
+ ╾ALLOC8<imm>╼ ╾ALLOC9<imm>╼ │ ╾──╼╾──╼
}
error[E0080]: it is undefined behavior to use this value
@@ -61,7 +61,7 @@ LL | const G: Wide = unsafe { Transmute { t: FOO }.u };
|
= 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) {
- ╾ALLOC10╼ ╾ALLOC11╼ │ ╾──╼╾──╼
+ ╾ALLOC10<imm>╼ ╾ALLOC11╼ │ ╾──╼╾──╼
}
error: aborting due to 6 previous errors
diff --git a/tests/ui/consts/const-eval/ub-incorrect-vtable.64bit.stderr b/tests/ui/consts/const-eval/ub-incorrect-vtable.64bit.stderr
index 9330ae3c9..f400073ac 100644
--- a/tests/ui/consts/const-eval/ub-incorrect-vtable.64bit.stderr
+++ b/tests/ui/consts/const-eval/ub-incorrect-vtable.64bit.stderr
@@ -2,55 +2,55 @@ error[E0080]: it is undefined behavior to use this value
--> $DIR/ub-incorrect-vtable.rs:18:1
|
LL | const INVALID_VTABLE_ALIGNMENT: &dyn Trait =
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC1, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC1<imm>, but expected a vtable 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) {
- ╾ALLOC0╼ ╾ALLOC1╼ │ ╾──────╼╾──────╼
+ ╾ALLOC0<imm>╼ ╾ALLOC1<imm>╼ │ ╾──────╼╾──────╼
}
error[E0080]: it is undefined behavior to use this value
--> $DIR/ub-incorrect-vtable.rs:23:1
|
LL | const INVALID_VTABLE_SIZE: &dyn Trait =
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC3, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC3<imm>, but expected a vtable 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) {
- ╾ALLOC2╼ ╾ALLOC3╼ │ ╾──────╼╾──────╼
+ ╾ALLOC2<imm>╼ ╾ALLOC3<imm>╼ │ ╾──────╼╾──────╼
}
error[E0080]: it is undefined behavior to use this value
--> $DIR/ub-incorrect-vtable.rs:33:1
|
LL | const INVALID_VTABLE_ALIGNMENT_UB: W<&dyn Trait> =
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC5, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC5<imm>, but expected a vtable 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) {
- ╾ALLOC4╼ ╾ALLOC5╼ │ ╾──────╼╾──────╼
+ ╾ALLOC4<imm>╼ ╾ALLOC5<imm>╼ │ ╾──────╼╾──────╼
}
error[E0080]: it is undefined behavior to use this value
--> $DIR/ub-incorrect-vtable.rs:38:1
|
LL | const INVALID_VTABLE_SIZE_UB: W<&dyn Trait> =
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC7, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC7<imm>, but expected a vtable 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) {
- ╾ALLOC6╼ ╾ALLOC7╼ │ ╾──────╼╾──────╼
+ ╾ALLOC6<imm>╼ ╾ALLOC7<imm>╼ │ ╾──────╼╾──────╼
}
error[E0080]: it is undefined behavior to use this value
--> $DIR/ub-incorrect-vtable.rs:44:1
|
LL | const INVALID_VTABLE_UB: W<&dyn Trait> =
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC9, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC9<imm>, but expected a vtable 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) {
- ╾ALLOC8╼ ╾ALLOC9╼ │ ╾──────╼╾──────╼
+ ╾ALLOC8<imm>╼ ╾ALLOC9<imm>╼ │ ╾──────╼╾──────╼
}
error[E0080]: it is undefined behavior to use this value
@@ -61,7 +61,7 @@ LL | const G: Wide = unsafe { Transmute { t: FOO }.u };
|
= 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) {
- ╾ALLOC10╼ ╾ALLOC11╼ │ ╾──────╼╾──────╼
+ ╾ALLOC10<imm>╼ ╾ALLOC11╼ │ ╾──────╼╾──────╼
}
error: aborting due to 6 previous errors
diff --git a/tests/ui/consts/const-eval/ub-nonnull.chalk.64bit.stderr b/tests/ui/consts/const-eval/ub-nonnull.chalk.64bit.stderr
index 2a4b6f3b7..fef6c92af 100644
--- a/tests/ui/consts/const-eval/ub-nonnull.chalk.64bit.stderr
+++ b/tests/ui/consts/const-eval/ub-nonnull.chalk.64bit.stderr
@@ -4,6 +4,6 @@ error[E0284]: type annotations needed: cannot satisfy `<usize as SliceIndex<[u8]
LL | let out_of_bounds_ptr = &ptr[255];
| ^^^^^^^^ cannot satisfy `<usize as SliceIndex<[u8]>>::Output == _`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0284`.
diff --git a/tests/ui/consts/const-eval/ub-ref-ptr.rs b/tests/ui/consts/const-eval/ub-ref-ptr.rs
index 08d4dce4d..9e49e3de8 100644
--- a/tests/ui/consts/const-eval/ub-ref-ptr.rs
+++ b/tests/ui/consts/const-eval/ub-ref-ptr.rs
@@ -1,7 +1,7 @@
// ignore-tidy-linelength
// Strip out raw byte dumps to make comparison platform-independent:
// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
-// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP"
+// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
#![allow(invalid_value)]
use std::mem;
diff --git a/tests/ui/consts/const-eval/ub-ref-ptr.stderr b/tests/ui/consts/const-eval/ub-ref-ptr.stderr
index c608bad2a..3bbf29773 100644
--- a/tests/ui/consts/const-eval/ub-ref-ptr.stderr
+++ b/tests/ui/consts/const-eval/ub-ref-ptr.stderr
@@ -141,7 +141,7 @@ error[E0080]: it is undefined behavior to use this value
--> $DIR/ub-ref-ptr.rs:59:1
|
LL | const DATA_FN_PTR: fn() = unsafe { mem::transmute(&13) };
- | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC2, but expected a function pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC2<imm>, 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: $SIZE, align: $ALIGN) {
@@ -155,7 +155,7 @@ error[E0080]: evaluation of constant value failed
|
note: inside `std::ptr::read::<u32>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
-note: inside `ptr::const_ptr::<impl *const u32>::read`
+note: inside `std::ptr::const_ptr::<impl *const u32>::read`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `UNALIGNED_READ`
--> $DIR/ub-ref-ptr.rs:66:5
diff --git a/tests/ui/consts/const-eval/ub-slice-get-unchecked.stderr b/tests/ui/consts/const-eval/ub-slice-get-unchecked.stderr
index 403fb5e09..de96821e8 100644
--- a/tests/ui/consts/const-eval/ub-slice-get-unchecked.stderr
+++ b/tests/ui/consts/const-eval/ub-slice-get-unchecked.stderr
@@ -6,6 +6,6 @@ LL | const B: &[()] = unsafe { A.get_unchecked(3..1) };
|
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/consts/const-eval/ub-upvars.32bit.stderr b/tests/ui/consts/const-eval/ub-upvars.32bit.stderr
index 353a9b782..5342fea66 100644
--- a/tests/ui/consts/const-eval/ub-upvars.32bit.stderr
+++ b/tests/ui/consts/const-eval/ub-upvars.32bit.stderr
@@ -6,9 +6,9 @@ LL | const BAD_UPVAR: &dyn FnOnce() = &{
|
= 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) {
- ╾ALLOC0╼ ╾ALLOC1╼ │ ╾──╼╾──╼
+ ╾ALLOC0<imm>╼ ╾ALLOC1╼ │ ╾──╼╾──╼
}
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/ub-upvars.64bit.stderr b/tests/ui/consts/const-eval/ub-upvars.64bit.stderr
index 097f6b049..a2496dfc2 100644
--- a/tests/ui/consts/const-eval/ub-upvars.64bit.stderr
+++ b/tests/ui/consts/const-eval/ub-upvars.64bit.stderr
@@ -6,9 +6,9 @@ LL | const BAD_UPVAR: &dyn FnOnce() = &{
|
= 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) {
- ╾ALLOC0╼ ╾ALLOC1╼ │ ╾──────╼╾──────╼
+ ╾ALLOC0<imm>╼ ╾ALLOC1╼ │ ╾──────╼╾──────╼
}
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/ub-wide-ptr.chalk.64bit.stderr b/tests/ui/consts/const-eval/ub-wide-ptr.chalk.64bit.stderr
index 39352ca84..533db90ce 100644
--- a/tests/ui/consts/const-eval/ub-wide-ptr.chalk.64bit.stderr
+++ b/tests/ui/consts/const-eval/ub-wide-ptr.chalk.64bit.stderr
@@ -4,6 +4,6 @@ error[E0282]: type annotations needed
LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]);
| ^^^^^^^^^^^^^^ cannot infer type for type parameter `U` declared on the function `transmute`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/consts/const-eval/ub-wide-ptr.rs b/tests/ui/consts/const-eval/ub-wide-ptr.rs
index dc8d4c640..3c1baab3e 100644
--- a/tests/ui/consts/const-eval/ub-wide-ptr.rs
+++ b/tests/ui/consts/const-eval/ub-wide-ptr.rs
@@ -5,7 +5,7 @@ use std::mem;
// Strip out raw byte dumps to make comparison platform-independent:
// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
-// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP"
+// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
// normalize-stderr-test "offset \d+" -> "offset N"
// normalize-stderr-test "size \d+" -> "size N"
diff --git a/tests/ui/consts/const-eval/ub-wide-ptr.stderr b/tests/ui/consts/const-eval/ub-wide-ptr.stderr
index b20379485..91ce531c9 100644
--- a/tests/ui/consts/const-eval/ub-wide-ptr.stderr
+++ b/tests/ui/consts/const-eval/ub-wide-ptr.stderr
@@ -189,7 +189,7 @@ error[E0080]: it is undefined behavior to use this value
--> $DIR/ub-wide-ptr.rs:113:1
|
LL | const TRAIT_OBJ_SHORT_VTABLE_1: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u8))) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC12, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC12<imm>, but expected a vtable 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: $SIZE, align: $ALIGN) {
@@ -200,7 +200,7 @@ error[E0080]: it is undefined behavior to use this value
--> $DIR/ub-wide-ptr.rs:117:1
|
LL | const TRAIT_OBJ_SHORT_VTABLE_2: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u64))) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC14, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC14<imm>, but expected a vtable 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: $SIZE, align: $ALIGN) {
@@ -222,7 +222,7 @@ error[E0080]: it is undefined behavior to use this value
--> $DIR/ub-wide-ptr.rs:124:1
|
LL | const TRAIT_OBJ_UNALIGNED_VTABLE: &dyn Trait = unsafe { mem::transmute((&92u8, &[0u8; 128])) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC17, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC17<imm>, but expected a vtable 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: $SIZE, align: $ALIGN) {
@@ -233,7 +233,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 ALLOC19, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC19<imm>, but expected a vtable 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: $SIZE, align: $ALIGN) {
@@ -244,7 +244,7 @@ error[E0080]: it is undefined behavior to use this value
--> $DIR/ub-wide-ptr.rs:130:1
|
LL | const TRAIT_OBJ_BAD_DROP_FN_INT: &dyn Trait = unsafe { mem::transmute((&92u8, &[1usize; 8])) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC21, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC21<imm>, but expected a vtable 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: $SIZE, align: $ALIGN) {
@@ -255,7 +255,7 @@ error[E0080]: it is undefined behavior to use this value
--> $DIR/ub-wide-ptr.rs:133: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 ALLOC23, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC23<imm>, but expected a vtable 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: $SIZE, align: $ALIGN) {
@@ -288,7 +288,7 @@ error[E0080]: it is undefined behavior to use this value
--> $DIR/ub-wide-ptr.rs:145:1
|
LL | const RAW_TRAIT_OBJ_VTABLE_INVALID: *const dyn Trait = unsafe { mem::transmute((&92u8, &3u64)) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC28, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC28<imm>, but expected a vtable 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: $SIZE, align: $ALIGN) {
@@ -310,7 +310,7 @@ error[E0080]: it is undefined behavior to use this value
--> $DIR/ub-wide-ptr.rs:154:1
|
LL | static mut RAW_TRAIT_OBJ_VTABLE_INVALID_THROUGH_REF: *const dyn Trait = unsafe {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC31, but expected a vtable pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC31<imm>, but expected a vtable 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: $SIZE, align: $ALIGN) {
diff --git a/tests/ui/consts/const-eval/ub-write-through-immutable.rs b/tests/ui/consts/const-eval/ub-write-through-immutable.rs
new file mode 100644
index 000000000..945367f18
--- /dev/null
+++ b/tests/ui/consts/const-eval/ub-write-through-immutable.rs
@@ -0,0 +1,30 @@
+//! Ensure we catch UB due to writing through a shared reference.
+#![feature(const_mut_refs, const_refs_to_cell)]
+#![deny(writes_through_immutable_pointer)]
+#![allow(invalid_reference_casting)]
+
+use std::mem;
+use std::cell::UnsafeCell;
+
+const WRITE_AFTER_CAST: () = unsafe {
+ let mut x = 0;
+ let ptr = &x as *const i32 as *mut i32;
+ *ptr = 0; //~ERROR: writes_through_immutable_pointer
+ //~^ previously accepted
+};
+
+const WRITE_AFTER_TRANSMUTE: () = unsafe {
+ let mut x = 0;
+ let ptr: *mut i32 = mem::transmute(&x);
+ *ptr = 0; //~ERROR: writes_through_immutable_pointer
+ //~^ previously accepted
+};
+
+// it's okay when there is interior mutability;
+const WRITE_INTERIOR_MUT: () = unsafe {
+ let x = UnsafeCell::new(0);
+ let ptr = &x as *const _ as *mut i32;
+ *ptr = 0;
+};
+
+fn main() {}
diff --git a/tests/ui/consts/const-eval/ub-write-through-immutable.stderr b/tests/ui/consts/const-eval/ub-write-through-immutable.stderr
new file mode 100644
index 000000000..27eb2d2c0
--- /dev/null
+++ b/tests/ui/consts/const-eval/ub-write-through-immutable.stderr
@@ -0,0 +1,55 @@
+error: writing through a pointer that was derived from a shared (immutable) reference
+ --> $DIR/ub-write-through-immutable.rs:12:5
+ |
+LL | *ptr = 0;
+ | ^^^^^^^^
+ |
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+ = note: for more information, see issue #X <https://github.com/rust-lang/rust/issues/X>
+note: the lint level is defined here
+ --> $DIR/ub-write-through-immutable.rs:3:9
+ |
+LL | #![deny(writes_through_immutable_pointer)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: writing through a pointer that was derived from a shared (immutable) reference
+ --> $DIR/ub-write-through-immutable.rs:19:5
+ |
+LL | *ptr = 0;
+ | ^^^^^^^^
+ |
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+ = note: for more information, see issue #X <https://github.com/rust-lang/rust/issues/X>
+
+error: aborting due to 2 previous errors
+
+Future incompatibility report: Future breakage diagnostic:
+error: writing through a pointer that was derived from a shared (immutable) reference
+ --> $DIR/ub-write-through-immutable.rs:12:5
+ |
+LL | *ptr = 0;
+ | ^^^^^^^^
+ |
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+ = note: for more information, see issue #X <https://github.com/rust-lang/rust/issues/X>
+note: the lint level is defined here
+ --> $DIR/ub-write-through-immutable.rs:3:9
+ |
+LL | #![deny(writes_through_immutable_pointer)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Future breakage diagnostic:
+error: writing through a pointer that was derived from a shared (immutable) reference
+ --> $DIR/ub-write-through-immutable.rs:19:5
+ |
+LL | *ptr = 0;
+ | ^^^^^^^^
+ |
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+ = note: for more information, see issue #X <https://github.com/rust-lang/rust/issues/X>
+note: the lint level is defined here
+ --> $DIR/ub-write-through-immutable.rs:3:9
+ |
+LL | #![deny(writes_through_immutable_pointer)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
diff --git a/tests/ui/consts/const-eval/union-const-eval-field.stderr b/tests/ui/consts/const-eval/union-const-eval-field.stderr
index b299208ae..b1de225ec 100644
--- a/tests/ui/consts/const-eval/union-const-eval-field.stderr
+++ b/tests/ui/consts/const-eval/union-const-eval-field.stderr
@@ -18,6 +18,6 @@ LL | FIELD3
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/union_promotion.stderr b/tests/ui/consts/const-eval/union_promotion.stderr
index 42f17de20..49a285f84 100644
--- a/tests/ui/consts/const-eval/union_promotion.stderr
+++ b/tests/ui/consts/const-eval/union_promotion.stderr
@@ -11,6 +11,6 @@ LL | | };
LL | }
| - temporary value is freed at the end of this statement
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/consts/const-eval/unused-broken-const-late.stderr b/tests/ui/consts/const-eval/unused-broken-const-late.stderr
index cdb70a69d..c2cf2f381 100644
--- a/tests/ui/consts/const-eval/unused-broken-const-late.stderr
+++ b/tests/ui/consts/const-eval/unused-broken-const-late.stderr
@@ -6,6 +6,6 @@ LL | const VOID: () = panic!();
|
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/unused-broken-const.stderr b/tests/ui/consts/const-eval/unused-broken-const.stderr
index fbb10feb7..fd0ee316f 100644
--- a/tests/ui/consts/const-eval/unused-broken-const.stderr
+++ b/tests/ui/consts/const-eval/unused-broken-const.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | const FOO: i32 = [][0];
| ^^^^^ index out of bounds: the length is 0 but the index is 0
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/unwind-abort.stderr b/tests/ui/consts/const-eval/unwind-abort.stderr
index 759ce15ab..d7330beca 100644
--- a/tests/ui/consts/const-eval/unwind-abort.stderr
+++ b/tests/ui/consts/const-eval/unwind-abort.stderr
@@ -16,6 +16,6 @@ LL | const _: () = foo();
| ^^^^^
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-extern-fn/issue-68062-const-extern-fns-dont-need-fn-specifier-2.stderr b/tests/ui/consts/const-extern-fn/issue-68062-const-extern-fns-dont-need-fn-specifier-2.stderr
index 5ec9e2a91..aaa8dfa8d 100644
--- a/tests/ui/consts/const-extern-fn/issue-68062-const-extern-fns-dont-need-fn-specifier-2.stderr
+++ b/tests/ui/consts/const-extern-fn/issue-68062-const-extern-fns-dont-need-fn-specifier-2.stderr
@@ -4,5 +4,5 @@ error: expected one of `extern` or `fn`, found `WhereIsFerris`
LL | const unsafe WhereIsFerris Now() {}
| ^^^^^^^^^^^^^ expected one of `extern` or `fn`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/const-extern-fn/issue-68062-const-extern-fns-dont-need-fn-specifier.stderr b/tests/ui/consts/const-extern-fn/issue-68062-const-extern-fns-dont-need-fn-specifier.stderr
index ec415ec9d..82074867b 100644
--- a/tests/ui/consts/const-extern-fn/issue-68062-const-extern-fns-dont-need-fn-specifier.stderr
+++ b/tests/ui/consts/const-extern-fn/issue-68062-const-extern-fns-dont-need-fn-specifier.stderr
@@ -4,5 +4,5 @@ error: expected `fn`, found `PUT_ANYTHING_YOU_WANT_HERE`
LL | const extern "Rust" PUT_ANYTHING_YOU_WANT_HERE bug() -> usize { 1 }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `fn`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/const-external-macro-const-err.stderr b/tests/ui/consts/const-external-macro-const-err.stderr
index 81f6c09ff..63f81ea18 100644
--- a/tests/ui/consts/const-external-macro-const-err.stderr
+++ b/tests/ui/consts/const-external-macro-const-err.stderr
@@ -6,6 +6,6 @@ LL | static_assert!(2 + 2 == 5);
|
= note: this error originates in the macro `static_assert` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-float-classify.stderr b/tests/ui/consts/const-float-classify.stderr
index a23d81c0e..f0c6c69ea 100644
--- a/tests/ui/consts/const-float-classify.stderr
+++ b/tests/ui/consts/const-float-classify.stderr
@@ -6,6 +6,6 @@ LL | x.eq(y)
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/consts/const-fn-mismatch.stderr b/tests/ui/consts/const-fn-mismatch.stderr
index a86a06b3e..beaf52c0c 100644
--- a/tests/ui/consts/const-fn-mismatch.stderr
+++ b/tests/ui/consts/const-fn-mismatch.stderr
@@ -4,6 +4,6 @@ error[E0379]: functions in traits cannot be declared const
LL | const fn f() -> u32 {
| ^^^^^ functions in traits cannot be const
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0379`.
diff --git a/tests/ui/consts/const-for-feature-gate.stderr b/tests/ui/consts/const-for-feature-gate.stderr
index 2ea377e09..0c24bbad7 100644
--- a/tests/ui/consts/const-for-feature-gate.stderr
+++ b/tests/ui/consts/const-for-feature-gate.stderr
@@ -7,6 +7,6 @@ LL | for _ in 0..5 {}
= note: see issue #87575 <https://github.com/rust-lang/rust/issues/87575> for more information
= help: add `#![feature(const_for)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/consts/const-int-unchecked.stderr b/tests/ui/consts/const-int-unchecked.stderr
index ad880d56d..ad14c8f68 100644
--- a/tests/ui/consts/const-int-unchecked.stderr
+++ b/tests/ui/consts/const-int-unchecked.stderr
@@ -62,61 +62,61 @@ error[E0080]: evaluation of constant value failed
--> $DIR/const-int-unchecked.rs:41:33
|
LL | const SHL_I8_NEG: i8 = unsafe { intrinsics::unchecked_shl(5_i8, -1) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 255 in `unchecked_shl`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -1 in `unchecked_shl`
error[E0080]: evaluation of constant value failed
--> $DIR/const-int-unchecked.rs:43:35
|
LL | const SHL_I16_NEG: i16 = unsafe { intrinsics::unchecked_shl(5_16, -1) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 65535 in `unchecked_shl`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -1 in `unchecked_shl`
error[E0080]: evaluation of constant value failed
--> $DIR/const-int-unchecked.rs:45:35
|
LL | const SHL_I32_NEG: i32 = unsafe { intrinsics::unchecked_shl(5_i32, -1) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 4294967295 in `unchecked_shl`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -1 in `unchecked_shl`
error[E0080]: evaluation of constant value failed
--> $DIR/const-int-unchecked.rs:47:35
|
LL | const SHL_I64_NEG: i64 = unsafe { intrinsics::unchecked_shl(5_i64, -1) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 18446744073709551615 in `unchecked_shl`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -1 in `unchecked_shl`
error[E0080]: evaluation of constant value failed
--> $DIR/const-int-unchecked.rs:49:37
|
LL | const SHL_I128_NEG: i128 = unsafe { intrinsics::unchecked_shl(5_i128, -1) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 340282366920938463463374607431768211455 in `unchecked_shl`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -1 in `unchecked_shl`
error[E0080]: evaluation of constant value failed
--> $DIR/const-int-unchecked.rs:55:40
|
LL | const SHL_I8_NEG_RANDOM: i8 = unsafe { intrinsics::unchecked_shl(5_i8, -6) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 250 in `unchecked_shl`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -6 in `unchecked_shl`
error[E0080]: evaluation of constant value failed
--> $DIR/const-int-unchecked.rs:57:42
|
LL | const SHL_I16_NEG_RANDOM: i16 = unsafe { intrinsics::unchecked_shl(5_16, -13) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 65523 in `unchecked_shl`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -13 in `unchecked_shl`
error[E0080]: evaluation of constant value failed
--> $DIR/const-int-unchecked.rs:59:42
|
LL | const SHL_I32_NEG_RANDOM: i32 = unsafe { intrinsics::unchecked_shl(5_i32, -25) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 4294967271 in `unchecked_shl`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -25 in `unchecked_shl`
error[E0080]: evaluation of constant value failed
--> $DIR/const-int-unchecked.rs:61:42
|
LL | const SHL_I64_NEG_RANDOM: i64 = unsafe { intrinsics::unchecked_shl(5_i64, -30) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 18446744073709551586 in `unchecked_shl`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -30 in `unchecked_shl`
error[E0080]: evaluation of constant value failed
--> $DIR/const-int-unchecked.rs:63:44
|
LL | const SHL_I128_NEG_RANDOM: i128 = unsafe { intrinsics::unchecked_shl(5_i128, -93) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 340282366920938463463374607431768211363 in `unchecked_shl`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -93 in `unchecked_shl`
error[E0080]: evaluation of constant value failed
--> $DIR/const-int-unchecked.rs:70:29
@@ -182,61 +182,61 @@ error[E0080]: evaluation of constant value failed
--> $DIR/const-int-unchecked.rs:96:33
|
LL | const SHR_I8_NEG: i8 = unsafe { intrinsics::unchecked_shr(5_i8, -1) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 255 in `unchecked_shr`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -1 in `unchecked_shr`
error[E0080]: evaluation of constant value failed
--> $DIR/const-int-unchecked.rs:98:35
|
LL | const SHR_I16_NEG: i16 = unsafe { intrinsics::unchecked_shr(5_16, -1) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 65535 in `unchecked_shr`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -1 in `unchecked_shr`
error[E0080]: evaluation of constant value failed
--> $DIR/const-int-unchecked.rs:100:35
|
LL | const SHR_I32_NEG: i32 = unsafe { intrinsics::unchecked_shr(5_i32, -1) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 4294967295 in `unchecked_shr`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -1 in `unchecked_shr`
error[E0080]: evaluation of constant value failed
--> $DIR/const-int-unchecked.rs:102:35
|
LL | const SHR_I64_NEG: i64 = unsafe { intrinsics::unchecked_shr(5_i64, -1) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 18446744073709551615 in `unchecked_shr`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -1 in `unchecked_shr`
error[E0080]: evaluation of constant value failed
--> $DIR/const-int-unchecked.rs:104:37
|
LL | const SHR_I128_NEG: i128 = unsafe { intrinsics::unchecked_shr(5_i128, -1) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 340282366920938463463374607431768211455 in `unchecked_shr`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -1 in `unchecked_shr`
error[E0080]: evaluation of constant value failed
--> $DIR/const-int-unchecked.rs:110:40
|
LL | const SHR_I8_NEG_RANDOM: i8 = unsafe { intrinsics::unchecked_shr(5_i8, -6) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 250 in `unchecked_shr`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -6 in `unchecked_shr`
error[E0080]: evaluation of constant value failed
--> $DIR/const-int-unchecked.rs:112:42
|
LL | const SHR_I16_NEG_RANDOM: i16 = unsafe { intrinsics::unchecked_shr(5_16, -13) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 65523 in `unchecked_shr`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -13 in `unchecked_shr`
error[E0080]: evaluation of constant value failed
--> $DIR/const-int-unchecked.rs:114:42
|
LL | const SHR_I32_NEG_RANDOM: i32 = unsafe { intrinsics::unchecked_shr(5_i32, -25) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 4294967271 in `unchecked_shr`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -25 in `unchecked_shr`
error[E0080]: evaluation of constant value failed
--> $DIR/const-int-unchecked.rs:116:42
|
LL | const SHR_I64_NEG_RANDOM: i64 = unsafe { intrinsics::unchecked_shr(5_i64, -30) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 18446744073709551586 in `unchecked_shr`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -30 in `unchecked_shr`
error[E0080]: evaluation of constant value failed
--> $DIR/const-int-unchecked.rs:118:44
|
LL | const SHR_I128_NEG_RANDOM: i128 = unsafe { intrinsics::unchecked_shr(5_i128, -93) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 340282366920938463463374607431768211363 in `unchecked_shr`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -93 in `unchecked_shr`
error[E0080]: evaluation of constant value failed
--> $DIR/const-int-unchecked.rs:123:25
diff --git a/tests/ui/consts/const-len-underflow-separate-spans.next.stderr b/tests/ui/consts/const-len-underflow-separate-spans.next.stderr
index b7b5b648c..bd2a81f51 100644
--- a/tests/ui/consts/const-len-underflow-separate-spans.next.stderr
+++ b/tests/ui/consts/const-len-underflow-separate-spans.next.stderr
@@ -10,6 +10,6 @@ note: erroneous constant encountered
LL | let a: [i8; LEN] = unimplemented!();
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-len-underflow-separate-spans.old.stderr b/tests/ui/consts/const-len-underflow-separate-spans.old.stderr
index b7b5b648c..bd2a81f51 100644
--- a/tests/ui/consts/const-len-underflow-separate-spans.old.stderr
+++ b/tests/ui/consts/const-len-underflow-separate-spans.old.stderr
@@ -10,6 +10,6 @@ note: erroneous constant encountered
LL | let a: [i8; LEN] = unimplemented!();
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-len-underflow-separate-spans.rs b/tests/ui/consts/const-len-underflow-separate-spans.rs
index 55704b641..bd37be215 100644
--- a/tests/ui/consts/const-len-underflow-separate-spans.rs
+++ b/tests/ui/consts/const-len-underflow-separate-spans.rs
@@ -3,7 +3,7 @@
// overall context for what caused the evaluation.
// revisions: old next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
const ONE: usize = 1;
const TWO: usize = 2;
diff --git a/tests/ui/consts/const-len-underflow-subspans.stderr b/tests/ui/consts/const-len-underflow-subspans.stderr
index 68e958b37..bfec056cc 100644
--- a/tests/ui/consts/const-len-underflow-subspans.stderr
+++ b/tests/ui/consts/const-len-underflow-subspans.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | let a: [i8; ONE - TWO] = unimplemented!();
| ^^^^^^^^^ attempt to compute `1_usize - 2_usize`, which would overflow
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-match-check.eval1.stderr b/tests/ui/consts/const-match-check.eval1.stderr
index 27ff5d4cd..848902148 100644
--- a/tests/ui/consts/const-match-check.eval1.stderr
+++ b/tests/ui/consts/const-match-check.eval1.stderr
@@ -16,6 +16,6 @@ help: alternatively, you could prepend the pattern with an underscore to define
LL | A = { let _0 = 0; 0 },
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0005`.
diff --git a/tests/ui/consts/const-match-check.eval2.stderr b/tests/ui/consts/const-match-check.eval2.stderr
index 0c74a7b3d..0aa12eb86 100644
--- a/tests/ui/consts/const-match-check.eval2.stderr
+++ b/tests/ui/consts/const-match-check.eval2.stderr
@@ -16,6 +16,6 @@ help: alternatively, you could prepend the pattern with an underscore to define
LL | let x: [i32; { let _0 = 0; 0 }] = [];
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0005`.
diff --git a/tests/ui/consts/const-mut-refs/feature-gate-const_mut_refs.stderr b/tests/ui/consts/const-mut-refs/feature-gate-const_mut_refs.stderr
index 3f9bd3705..7d8d062db 100644
--- a/tests/ui/consts/const-mut-refs/feature-gate-const_mut_refs.stderr
+++ b/tests/ui/consts/const-mut-refs/feature-gate-const_mut_refs.stderr
@@ -7,6 +7,6 @@ LL | const fn foo(x: &mut i32) -> i32 {
= note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/consts/const-points-to-static.32bit.stderr b/tests/ui/consts/const-points-to-static.32bit.stderr
index 12cc7fbb1..73fbf5e18 100644
--- a/tests/ui/consts/const-points-to-static.32bit.stderr
+++ b/tests/ui/consts/const-points-to-static.32bit.stderr
@@ -6,7 +6,7 @@ LL | const TEST: &u8 = &MY_STATIC;
|
= 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) {
- ╾ALLOC0╼ │ ╾──╼
+ ╾ALLOC0<imm>╼ │ ╾──╼
}
warning: skipping const checks
@@ -17,6 +17,6 @@ help: skipping check that does not even have a feature gate
LL | const TEST: &u8 = &MY_STATIC;
| ^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-points-to-static.64bit.stderr b/tests/ui/consts/const-points-to-static.64bit.stderr
index 86506e6ca..42088bbb2 100644
--- a/tests/ui/consts/const-points-to-static.64bit.stderr
+++ b/tests/ui/consts/const-points-to-static.64bit.stderr
@@ -6,7 +6,7 @@ LL | const TEST: &u8 = &MY_STATIC;
|
= 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) {
- ╾ALLOC0╼ │ ╾──────╼
+ ╾ALLOC0<imm>╼ │ ╾──────╼
}
warning: skipping const checks
@@ -17,6 +17,6 @@ help: skipping check that does not even have a feature gate
LL | const TEST: &u8 = &MY_STATIC;
| ^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-ptr-unique.stderr b/tests/ui/consts/const-ptr-unique.stderr
index 83448c3e8..c3cc69830 100644
--- a/tests/ui/consts/const-ptr-unique.stderr
+++ b/tests/ui/consts/const-ptr-unique.stderr
@@ -9,6 +9,6 @@ LL |
LL | }
| - temporary value is freed at the end of this statement
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/consts/const-size_of-cycle.stderr b/tests/ui/consts/const-size_of-cycle.stderr
index 46b432357..a5679400c 100644
--- a/tests/ui/consts/const-size_of-cycle.stderr
+++ b/tests/ui/consts/const-size_of-cycle.stderr
@@ -25,6 +25,6 @@ LL | struct Foo {
| ^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/consts/const-slice-oob.stderr b/tests/ui/consts/const-slice-oob.stderr
index 746883a79..30ec340d2 100644
--- a/tests/ui/consts/const-slice-oob.stderr
+++ b/tests/ui/consts/const-slice-oob.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | const BAR: u32 = FOO[5];
| ^^^^^^ index out of bounds: the length is 3 but the index is 5
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-suggest-feature.stderr b/tests/ui/consts/const-suggest-feature.stderr
index 3bc1eacf3..d4a42a880 100644
--- a/tests/ui/consts/const-suggest-feature.stderr
+++ b/tests/ui/consts/const-suggest-feature.stderr
@@ -7,6 +7,6 @@ LL | *std::ptr::null_mut() = 0;
= note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/consts/const-try-feature-gate.stderr b/tests/ui/consts/const-try-feature-gate.stderr
index cd1a06304..79c6ec108 100644
--- a/tests/ui/consts/const-try-feature-gate.stderr
+++ b/tests/ui/consts/const-try-feature-gate.stderr
@@ -7,6 +7,6 @@ LL | Some(())?;
= note: see issue #74935 <https://github.com/rust-lang/rust/issues/74935> for more information
= help: add `#![feature(const_try)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/consts/const-tup-index-span.stderr b/tests/ui/consts/const-tup-index-span.stderr
index d5df0df95..792e18aa8 100644
--- a/tests/ui/consts/const-tup-index-span.stderr
+++ b/tests/ui/consts/const-tup-index-span.stderr
@@ -11,6 +11,6 @@ help: use a trailing comma to create a tuple with one element
LL | const TUP: (usize,) = (5usize << 64,);
| + ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/consts/const-unwrap.stderr b/tests/ui/consts/const-unwrap.stderr
index d2cbe4550..fee22a1d0 100644
--- a/tests/ui/consts/const-unwrap.stderr
+++ b/tests/ui/consts/const-unwrap.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | const BAR: i32 = Option::<i32>::None.unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'called `Option::unwrap()` on a `None` value', $DIR/const-unwrap.rs:7:38
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const_fn_floating_point_arithmetic.gated.stderr b/tests/ui/consts/const_fn_floating_point_arithmetic.gated.stderr
index ae24f8f65..e1b8154a2 100644
--- a/tests/ui/consts/const_fn_floating_point_arithmetic.gated.stderr
+++ b/tests/ui/consts/const_fn_floating_point_arithmetic.gated.stderr
@@ -4,5 +4,5 @@ error: fatal error triggered by #[rustc_error]
LL | fn main() {}
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/const_in_pattern/incomplete-slice.stderr b/tests/ui/consts/const_in_pattern/incomplete-slice.stderr
index be144a87b..4ecfb3f1c 100644
--- a/tests/ui/consts/const_in_pattern/incomplete-slice.stderr
+++ b/tests/ui/consts/const_in_pattern/incomplete-slice.stderr
@@ -23,6 +23,6 @@ LL ~ E_SL => {},
LL + &_ => todo!()
|
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.rs b/tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.rs
index 2491071d1..6285427f5 100644
--- a/tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.rs
+++ b/tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.rs
@@ -23,10 +23,18 @@ fn foo2(x: *const u8) {
const D: *const [u8; 4] = b"abcd";
+const STR: *const str = "abcd";
+
fn main() {
match D {
D => {} //~ERROR: behave unpredictably
//~| previously accepted
_ => {}
}
+
+ match STR {
+ STR => {} //~ERROR: behave unpredictably
+ //~| previously accepted
+ _ => {}
+ }
}
diff --git a/tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.stderr b/tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.stderr
index ab53346b5..1546f2390 100644
--- a/tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.stderr
+++ b/tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.stderr
@@ -22,7 +22,7 @@ LL | C_INNER => {}
= note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
- --> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:28:9
+ --> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:30:9
|
LL | D => {}
| ^
@@ -30,5 +30,14 @@ LL | D => {}
= 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 #62411 <https://github.com/rust-lang/rust/issues/70861>
-error: aborting due to 3 previous errors
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+ --> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:36:9
+ |
+LL | STR => {}
+ | ^^^
+ |
+ = 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 #62411 <https://github.com/rust-lang/rust/issues/70861>
+
+error: aborting due to 4 previous errors
diff --git a/tests/ui/consts/const_in_pattern/issue-78057.stderr b/tests/ui/consts/const_in_pattern/issue-78057.stderr
index 5ec68719a..719295c96 100644
--- a/tests/ui/consts/const_in_pattern/issue-78057.stderr
+++ b/tests/ui/consts/const_in_pattern/issue-78057.stderr
@@ -7,5 +7,5 @@ LL | FOO => {},
= note: the traits must be derived, manual `impl`s are not sufficient
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/const_in_pattern/no-eq-branch-fail.stderr b/tests/ui/consts/const_in_pattern/no-eq-branch-fail.stderr
index cced6af49..1979c297a 100644
--- a/tests/ui/consts/const_in_pattern/no-eq-branch-fail.stderr
+++ b/tests/ui/consts/const_in_pattern/no-eq-branch-fail.stderr
@@ -7,5 +7,5 @@ LL | BAR_BAZ => panic!(),
= note: the traits must be derived, manual `impl`s are not sufficient
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/const_in_pattern/reject_non_partial_eq.stderr b/tests/ui/consts/const_in_pattern/reject_non_partial_eq.stderr
index 958bf373c..d3628a8de 100644
--- a/tests/ui/consts/const_in_pattern/reject_non_partial_eq.stderr
+++ b/tests/ui/consts/const_in_pattern/reject_non_partial_eq.stderr
@@ -7,5 +7,5 @@ LL | NO_PARTIAL_EQ_NONE => println!("NO_PARTIAL_EQ_NONE"),
= note: the traits must be derived, manual `impl`s are not sufficient
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/const_let_refutable.stderr b/tests/ui/consts/const_let_refutable.stderr
index d6119028f..5aedfb03f 100644
--- a/tests/ui/consts/const_let_refutable.stderr
+++ b/tests/ui/consts/const_let_refutable.stderr
@@ -6,6 +6,6 @@ LL | const fn slice(&[a, b]: &[i32]) -> i32 {
|
= note: the matched value is of type `&[i32]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0005`.
diff --git a/tests/ui/consts/const_unsafe_unreachable_ub.stderr b/tests/ui/consts/const_unsafe_unreachable_ub.stderr
index 593a51bfe..6394563e2 100644
--- a/tests/ui/consts/const_unsafe_unreachable_ub.stderr
+++ b/tests/ui/consts/const_unsafe_unreachable_ub.stderr
@@ -16,6 +16,6 @@ note: inside `BAR`
LL | const BAR: bool = unsafe { foo(false) };
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/control-flow/assert.stderr b/tests/ui/consts/control-flow/assert.stderr
index 8b1ca183d..2f863daf7 100644
--- a/tests/ui/consts/control-flow/assert.stderr
+++ b/tests/ui/consts/control-flow/assert.stderr
@@ -6,6 +6,6 @@ LL | const _: () = assert!(false);
|
= 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
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/control-flow/issue-46843.stderr b/tests/ui/consts/control-flow/issue-46843.stderr
index 66227f61e..69bf78839 100644
--- a/tests/ui/consts/control-flow/issue-46843.stderr
+++ b/tests/ui/consts/control-flow/issue-46843.stderr
@@ -6,6 +6,6 @@ LL | pub const Q: i32 = match non_const() {
|
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/consts/control-flow/issue-50577.stderr b/tests/ui/consts/control-flow/issue-50577.stderr
index a931c89f4..1556c6f9c 100644
--- a/tests/ui/consts/control-flow/issue-50577.stderr
+++ b/tests/ui/consts/control-flow/issue-50577.stderr
@@ -8,6 +8,6 @@ LL | Drop = assert_eq!(1, 1),
= help: consider adding an `else` block that evaluates to the expected type
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0317`.
diff --git a/tests/ui/consts/control-flow/try.stderr b/tests/ui/consts/control-flow/try.stderr
index 5aeec8fbf..7351f5c0a 100644
--- a/tests/ui/consts/control-flow/try.stderr
+++ b/tests/ui/consts/control-flow/try.stderr
@@ -7,6 +7,6 @@ LL | x?;
= note: see issue #74935 <https://github.com/rust-lang/rust/issues/74935> for more information
= help: add `#![feature(const_try)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/consts/ct-var-in-collect_all_mismatches.stderr b/tests/ui/consts/ct-var-in-collect_all_mismatches.stderr
index fa20077da..24572040b 100644
--- a/tests/ui/consts/ct-var-in-collect_all_mismatches.stderr
+++ b/tests/ui/consts/ct-var-in-collect_all_mismatches.stderr
@@ -17,6 +17,6 @@ help: consider restricting type parameter `T`
LL | impl<T: Bar<N>, const N: usize> Foo<T, N> {
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/consts/dangling-alloc-id-ice.stderr b/tests/ui/consts/dangling-alloc-id-ice.stderr
index 0a1cca4ca..e14204c09 100644
--- a/tests/ui/consts/dangling-alloc-id-ice.stderr
+++ b/tests/ui/consts/dangling-alloc-id-ice.stderr
@@ -4,5 +4,5 @@ error: encountered dangling pointer in final constant
LL | const FOO: &() = {
| ^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/dangling_raw_ptr.stderr b/tests/ui/consts/dangling_raw_ptr.stderr
index bdfe1e4ef..5a4283550 100644
--- a/tests/ui/consts/dangling_raw_ptr.stderr
+++ b/tests/ui/consts/dangling_raw_ptr.stderr
@@ -4,5 +4,5 @@ error: encountered dangling pointer in final constant
LL | const FOO: *const u32 = {
| ^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/drop_box.stderr b/tests/ui/consts/drop_box.stderr
index 62324939b..3f4b6f348 100644
--- a/tests/ui/consts/drop_box.stderr
+++ b/tests/ui/consts/drop_box.stderr
@@ -6,6 +6,6 @@ LL | const fn f<T>(_: Box<T>) {}
| |
| the destructor for this type cannot be evaluated in constant functions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0493`.
diff --git a/tests/ui/consts/drop_zst.stderr b/tests/ui/consts/drop_zst.stderr
index 37758a4cb..e3c678529 100644
--- a/tests/ui/consts/drop_zst.stderr
+++ b/tests/ui/consts/drop_zst.stderr
@@ -4,6 +4,6 @@ error[E0493]: destructor of `S` cannot be evaluated at compile-time
LL | let s = S;
| ^ the destructor for this type cannot be evaluated in constant functions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0493`.
diff --git a/tests/ui/consts/effect_param.rs b/tests/ui/consts/effect_param.rs
index f11ec739f..bfe0a5190 100644
--- a/tests/ui/consts/effect_param.rs
+++ b/tests/ui/consts/effect_param.rs
@@ -3,9 +3,13 @@
fn main() {
i8::checked_sub::<true>(42, 43);
//~^ ERROR: method takes 0 generic arguments but 1 generic argument was supplied
+ i8::checked_sub::<false>(42, 43);
+ //~^ ERROR: method takes 0 generic arguments but 1 generic argument was supplied
}
const FOO: () = {
i8::checked_sub::<false>(42, 43);
//~^ ERROR: method takes 0 generic arguments but 1 generic argument was supplied
+ i8::checked_sub::<true>(42, 43);
+ //~^ ERROR: method takes 0 generic arguments but 1 generic argument was supplied
};
diff --git a/tests/ui/consts/effect_param.stderr b/tests/ui/consts/effect_param.stderr
index f8c4bfc02..dba5d49b7 100644
--- a/tests/ui/consts/effect_param.stderr
+++ b/tests/ui/consts/effect_param.stderr
@@ -1,5 +1,5 @@
error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
- --> $DIR/effect_param.rs:9:9
+ --> $DIR/effect_param.rs:11:9
|
LL | i8::checked_sub::<false>(42, 43);
| ^^^^^^^^^^^--------- help: remove these generics
@@ -7,6 +7,14 @@ LL | i8::checked_sub::<false>(42, 43);
| expected 0 generic arguments
error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
+ --> $DIR/effect_param.rs:13:9
+ |
+LL | i8::checked_sub::<true>(42, 43);
+ | ^^^^^^^^^^^-------- help: remove these generics
+ | |
+ | expected 0 generic arguments
+
+error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/effect_param.rs:4:9
|
LL | i8::checked_sub::<true>(42, 43);
@@ -14,6 +22,14 @@ LL | i8::checked_sub::<true>(42, 43);
| |
| expected 0 generic arguments
-error: aborting due to 2 previous errors
+error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
+ --> $DIR/effect_param.rs:6:9
+ |
+LL | i8::checked_sub::<false>(42, 43);
+ | ^^^^^^^^^^^--------- help: remove these generics
+ | |
+ | expected 0 generic arguments
+
+error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/consts/escaping-bound-var.stderr b/tests/ui/consts/escaping-bound-var.stderr
index d26ae2cee..a943c84e3 100644
--- a/tests/ui/consts/escaping-bound-var.stderr
+++ b/tests/ui/consts/escaping-bound-var.stderr
@@ -16,5 +16,5 @@ LL | fn test<'a>(
LL | let x: &'a ();
| ^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/consts/fn_trait_refs.stderr b/tests/ui/consts/fn_trait_refs.stderr
index 3d82837d5..e5ebe1d85 100644
--- a/tests/ui/consts/fn_trait_refs.stderr
+++ b/tests/ui/consts/fn_trait_refs.stderr
@@ -4,12 +4,6 @@ error[E0635]: unknown feature `const_fn_trait_ref_impls`
LL | #![feature(const_fn_trait_ref_impls)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
-error[E0635]: unknown feature `const_cmp`
- --> $DIR/fn_trait_refs.rs:8:12
- |
-LL | #![feature(const_cmp)]
- | ^^^^^^^^^
-
error: ~const can only be applied to `#[const_trait]` traits
--> $DIR/fn_trait_refs.rs:15:15
|
@@ -80,6 +74,6 @@ LL | T: ~const FnMut<()> + ~const Destruct,
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-error: aborting due to 12 previous errors
+error: aborting due to 11 previous errors
For more information about this error, try `rustc --explain E0635`.
diff --git a/tests/ui/consts/gate-do-not-const-check.stderr b/tests/ui/consts/gate-do-not-const-check.stderr
index 3bb136016..27a2c23a6 100644
--- a/tests/ui/consts/gate-do-not-const-check.stderr
+++ b/tests/ui/consts/gate-do-not-const-check.stderr
@@ -6,6 +6,6 @@ LL | #[rustc_do_not_const_check]
|
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/consts/inline_asm.stderr b/tests/ui/consts/inline_asm.stderr
index 65a828d11..0f71ab4b9 100644
--- a/tests/ui/consts/inline_asm.stderr
+++ b/tests/ui/consts/inline_asm.stderr
@@ -4,6 +4,6 @@ error[E0015]: inline assembly is not allowed in constants
LL | const _: () = unsafe { asm!("nop") };
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/consts/intrinsic_without_const_stab.stderr b/tests/ui/consts/intrinsic_without_const_stab.stderr
index b32b6398e..e3143080c 100644
--- a/tests/ui/consts/intrinsic_without_const_stab.stderr
+++ b/tests/ui/consts/intrinsic_without_const_stab.stderr
@@ -6,6 +6,6 @@ LL | unsafe { copy(src, dst, count) }
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/consts/intrinsic_without_const_stab_fail.stderr b/tests/ui/consts/intrinsic_without_const_stab_fail.stderr
index fcbb37245..8ade68eb2 100644
--- a/tests/ui/consts/intrinsic_without_const_stab_fail.stderr
+++ b/tests/ui/consts/intrinsic_without_const_stab_fail.stderr
@@ -6,6 +6,6 @@ LL | unsafe { copy(src, dst, count) }
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/consts/invalid-const-in-body.stderr b/tests/ui/consts/invalid-const-in-body.stderr
index 3be658359..b8944abba 100644
--- a/tests/ui/consts/invalid-const-in-body.stderr
+++ b/tests/ui/consts/invalid-const-in-body.stderr
@@ -4,5 +4,5 @@ error: expected at least one digit in exponent
LL | 2.0E
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/invalid-inline-const-in-match-arm.stderr b/tests/ui/consts/invalid-inline-const-in-match-arm.stderr
index 257ecd7f3..db7db4b61 100644
--- a/tests/ui/consts/invalid-inline-const-in-match-arm.stderr
+++ b/tests/ui/consts/invalid-inline-const-in-match-arm.stderr
@@ -8,6 +8,6 @@ LL | const { (|| {})() } => {}
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/consts/invalid-union.32bit.stderr b/tests/ui/consts/invalid-union.32bit.stderr
index 32b67a130..177e4f03e 100644
--- a/tests/ui/consts/invalid-union.32bit.stderr
+++ b/tests/ui/consts/invalid-union.32bit.stderr
@@ -1,5 +1,5 @@
error[E0080]: it is undefined behavior to use this value
- --> $DIR/invalid-union.rs:41:1
+ --> $DIR/invalid-union.rs:35:1
|
LL | fn main() {
| ^^^^^^^^^ constructing invalid value at .<deref>.y.<enum-variant(B)>.0: encountered `UnsafeCell` in a `const`
@@ -10,19 +10,19 @@ LL | fn main() {
}
note: erroneous constant encountered
- --> $DIR/invalid-union.rs:43:25
+ --> $DIR/invalid-union.rs:37:25
|
LL | let _: &'static _ = &C;
| ^^
note: erroneous constant encountered
- --> $DIR/invalid-union.rs:43:25
+ --> $DIR/invalid-union.rs:37:25
|
LL | let _: &'static _ = &C;
| ^^
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/invalid-union.64bit.stderr b/tests/ui/consts/invalid-union.64bit.stderr
index 45f999eb2..09c648c3c 100644
--- a/tests/ui/consts/invalid-union.64bit.stderr
+++ b/tests/ui/consts/invalid-union.64bit.stderr
@@ -1,5 +1,5 @@
error[E0080]: it is undefined behavior to use this value
- --> $DIR/invalid-union.rs:41:1
+ --> $DIR/invalid-union.rs:35:1
|
LL | fn main() {
| ^^^^^^^^^ constructing invalid value at .<deref>.y.<enum-variant(B)>.0: encountered `UnsafeCell` in a `const`
@@ -10,19 +10,19 @@ LL | fn main() {
}
note: erroneous constant encountered
- --> $DIR/invalid-union.rs:43:25
+ --> $DIR/invalid-union.rs:37:25
|
LL | let _: &'static _ = &C;
| ^^
note: erroneous constant encountered
- --> $DIR/invalid-union.rs:43:25
+ --> $DIR/invalid-union.rs:37:25
|
LL | let _: &'static _ = &C;
| ^^
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/invalid-union.rs b/tests/ui/consts/invalid-union.rs
index 28706b4a9..4f67ec979 100644
--- a/tests/ui/consts/invalid-union.rs
+++ b/tests/ui/consts/invalid-union.rs
@@ -1,11 +1,6 @@
// Check that constants with interior mutability inside unions are rejected
// during validation.
//
-// Note that this test case relies on undefined behaviour to construct a
-// constant with interior mutability that is "invisible" to the static checks.
-// If for some reason this approach no longer works, it is should be fine to
-// remove the test case.
-//
// build-fail
// stderr-per-bitwidth
#![feature(const_mut_refs)]
@@ -30,10 +25,9 @@ union U {
}
const C: S = {
- let s = S { x: 0, y: E::A };
- // Go through an &u32 reference which is definitely not allowed to mutate anything.
- let p = &s.x as *const u32 as *mut u32;
- // Change enum tag to E::B.
+ let mut s = S { x: 0, y: E::A };
+ let p = &mut s.x as *mut u32;
+ // Change enum tag to E::B. Now there's interior mutability here.
unsafe { *p.add(1) = 1 };
s
};
diff --git a/tests/ui/consts/issue-104609.stderr b/tests/ui/consts/issue-104609.stderr
index 00360c44d..8d0526978 100644
--- a/tests/ui/consts/issue-104609.stderr
+++ b/tests/ui/consts/issue-104609.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `oops` in this scope
LL | oops;
| ^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/consts/issue-104768.stderr b/tests/ui/consts/issue-104768.stderr
index 55b2b6f04..8a4a41e4d 100644
--- a/tests/ui/consts/issue-104768.stderr
+++ b/tests/ui/consts/issue-104768.stderr
@@ -7,6 +7,6 @@ LL | const A: &_ = 0_u32;
| not allowed in type signatures
| help: replace with the correct type: `u32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/ui/consts/issue-17458.stderr b/tests/ui/consts/issue-17458.stderr
index 8936c8d84..766657d12 100644
--- a/tests/ui/consts/issue-17458.stderr
+++ b/tests/ui/consts/issue-17458.stderr
@@ -7,5 +7,5 @@ LL | static X: usize = unsafe { core::ptr::null::<usize>() as usize };
= note: at compile-time, pointers do not have an integer value
= note: avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/issue-17718-constants-not-static.stderr b/tests/ui/consts/issue-17718-constants-not-static.stderr
index 8f3acae71..42d2a9acd 100644
--- a/tests/ui/consts/issue-17718-constants-not-static.stderr
+++ b/tests/ui/consts/issue-17718-constants-not-static.stderr
@@ -7,6 +7,6 @@ LL | fn foo() -> &'static usize { &id(FOO) }
| |temporary value created here
| returns a reference to data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/consts/issue-18294.stderr b/tests/ui/consts/issue-18294.stderr
index e0cbd2a21..8df40caba 100644
--- a/tests/ui/consts/issue-18294.stderr
+++ b/tests/ui/consts/issue-18294.stderr
@@ -7,5 +7,5 @@ LL | const Y: usize = unsafe { &X as *const u32 as usize };
= note: at compile-time, pointers do not have an integer value
= note: avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/issue-25826.stderr b/tests/ui/consts/issue-25826.stderr
index 780edd214..7d21020da 100644
--- a/tests/ui/consts/issue-25826.stderr
+++ b/tests/ui/consts/issue-25826.stderr
@@ -6,5 +6,5 @@ LL | const A: bool = unsafe { id::<u8> as *const () < id::<u16> as *const ()
|
= note: see issue #53020 <https://github.com/rust-lang/rust/issues/53020> for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/issue-28113.stderr b/tests/ui/consts/issue-28113.stderr
index 1294cc99b..01bbe4bc9 100644
--- a/tests/ui/consts/issue-28113.stderr
+++ b/tests/ui/consts/issue-28113.stderr
@@ -8,6 +8,6 @@ LL | || -> u8 { 5 }()
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/consts/issue-32829.stderr b/tests/ui/consts/issue-32829.stderr
index cae5163f0..8eee87af8 100644
--- a/tests/ui/consts/issue-32829.stderr
+++ b/tests/ui/consts/issue-32829.stderr
@@ -6,6 +6,6 @@ LL | static S : u64 = { { panic!("foo"); 0 } };
|
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/issue-3521.stderr b/tests/ui/consts/issue-3521.stderr
index aa42772f1..70ce9b2d6 100644
--- a/tests/ui/consts/issue-3521.stderr
+++ b/tests/ui/consts/issue-3521.stderr
@@ -7,6 +7,6 @@ LL | let foo: isize = 100;
LL | Bar = foo
| ^^^ non-constant value
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0435`.
diff --git a/tests/ui/consts/issue-36163.stderr b/tests/ui/consts/issue-36163.stderr
index 6fcfe3ed2..4f2d92ba3 100644
--- a/tests/ui/consts/issue-36163.stderr
+++ b/tests/ui/consts/issue-36163.stderr
@@ -27,6 +27,6 @@ LL | B = A,
| ^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/consts/issue-44415.stderr b/tests/ui/consts/issue-44415.stderr
index 01d24a620..adb5747c4 100644
--- a/tests/ui/consts/issue-44415.stderr
+++ b/tests/ui/consts/issue-44415.stderr
@@ -25,6 +25,6 @@ LL | struct Foo {
| ^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/consts/issue-52023-array-size-pointer-cast.stderr b/tests/ui/consts/issue-52023-array-size-pointer-cast.stderr
index 9a3d5716e..1a47b82a7 100644
--- a/tests/ui/consts/issue-52023-array-size-pointer-cast.stderr
+++ b/tests/ui/consts/issue-52023-array-size-pointer-cast.stderr
@@ -7,5 +7,5 @@ LL | let _ = [0; (&0 as *const i32) as usize];
= note: at compile-time, pointers do not have an integer value
= note: avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/issue-52060.stderr b/tests/ui/consts/issue-52060.stderr
index 95e5f2a82..27d00ad04 100644
--- a/tests/ui/consts/issue-52060.stderr
+++ b/tests/ui/consts/issue-52060.stderr
@@ -6,6 +6,6 @@ LL | static B: [u32; 1] = [0; A.len()];
|
= help: consider extracting the value of the `static` to a `const`, and referring to that
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0013`.
diff --git a/tests/ui/consts/issue-63952.32bit.stderr b/tests/ui/consts/issue-63952.32bit.stderr
index 5375ec118..f562f9104 100644
--- a/tests/ui/consts/issue-63952.32bit.stderr
+++ b/tests/ui/consts/issue-63952.32bit.stderr
@@ -6,9 +6,9 @@ LL | const SLICE_WAY_TOO_LONG: &[u8] = unsafe {
|
= 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) {
- ╾ALLOC0╼ ff ff ff ff │ ╾──╼....
+ ╾ALLOC0<imm>╼ ff ff ff ff │ ╾──╼....
}
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/issue-63952.64bit.stderr b/tests/ui/consts/issue-63952.64bit.stderr
index a6edbf932..fe66bec13 100644
--- a/tests/ui/consts/issue-63952.64bit.stderr
+++ b/tests/ui/consts/issue-63952.64bit.stderr
@@ -6,9 +6,9 @@ LL | const SLICE_WAY_TOO_LONG: &[u8] = unsafe {
|
= 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) {
- ╾ALLOC0╼ ff ff ff ff ff ff ff ff │ ╾──────╼........
+ ╾ALLOC0<imm>╼ ff ff ff ff ff ff ff ff │ ╾──────╼........
}
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/issue-64506.stderr b/tests/ui/consts/issue-64506.stderr
index 2fe84245b..4cc2b7137 100644
--- a/tests/ui/consts/issue-64506.stderr
+++ b/tests/ui/consts/issue-64506.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | let x = unsafe { Foo { b: () }.a };
| ^^^^^^^^^^^^^^^ constructing invalid value at .inner: encountered a value of uninhabited type `AnonPipe`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/issue-68542-closure-in-array-len.stderr b/tests/ui/consts/issue-68542-closure-in-array-len.stderr
index d23513ed7..3c0408cbe 100644
--- a/tests/ui/consts/issue-68542-closure-in-array-len.stderr
+++ b/tests/ui/consts/issue-68542-closure-in-array-len.stderr
@@ -8,6 +8,6 @@ LL | a: [(); (|| { 0 })()]
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/consts/issue-70942-trait-vs-impl-mismatch.stderr b/tests/ui/consts/issue-70942-trait-vs-impl-mismatch.stderr
index 1597120fb..0393316f1 100644
--- a/tests/ui/consts/issue-70942-trait-vs-impl-mismatch.stderr
+++ b/tests/ui/consts/issue-70942-trait-vs-impl-mismatch.stderr
@@ -10,6 +10,6 @@ note: type in trait
LL | const VALUE: usize;
| ^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0326`.
diff --git a/tests/ui/consts/issue-73976-monomorphic.stderr b/tests/ui/consts/issue-73976-monomorphic.stderr
index b23796db4..ef754b23f 100644
--- a/tests/ui/consts/issue-73976-monomorphic.stderr
+++ b/tests/ui/consts/issue-73976-monomorphic.stderr
@@ -8,6 +8,6 @@ note: impl defined here, but it is not `const`
--> $SRC_DIR/core/src/any.rs:LL:COL
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/consts/issue-76064.stderr b/tests/ui/consts/issue-76064.stderr
index 67b2e90db..fabebdb1a 100644
--- a/tests/ui/consts/issue-76064.stderr
+++ b/tests/ui/consts/issue-76064.stderr
@@ -6,6 +6,6 @@ LL | struct Bug([u8; panic!("panic")]);
|
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/issue-79137-toogeneric.stderr b/tests/ui/consts/issue-79137-toogeneric.stderr
index efe4fd22e..18bdde45e 100644
--- a/tests/ui/consts/issue-79137-toogeneric.stderr
+++ b/tests/ui/consts/issue-79137-toogeneric.stderr
@@ -4,5 +4,5 @@ error: constant pattern depends on a generic parameter
LL | matches!(GetVariantCount::<T>::VALUE, GetVariantCount::<T>::VALUE)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/issue-79690.64bit.stderr b/tests/ui/consts/issue-79690.64bit.stderr
index af59729d4..d603a1dc2 100644
--- a/tests/ui/consts/issue-79690.64bit.stderr
+++ b/tests/ui/consts/issue-79690.64bit.stderr
@@ -6,9 +6,9 @@ LL | const G: Fat = unsafe { Transmute { t: FOO }.u };
|
= 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) {
- ╾ALLOC0╼ ╾ALLOC1╼ │ ╾──────╼╾──────╼
+ ╾ALLOC0<imm>╼ ╾ALLOC1╼ │ ╾──────╼╾──────╼
}
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/issue-87046.stderr b/tests/ui/consts/issue-87046.stderr
index d0dbb21ce..0f965e1ac 100644
--- a/tests/ui/consts/issue-87046.stderr
+++ b/tests/ui/consts/issue-87046.stderr
@@ -4,5 +4,5 @@ error: cannot use unsized non-slice type `Username` in constant patterns
LL | ROOT_USER => true,
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/issue-90878-2.rs b/tests/ui/consts/issue-90878-2.rs
index e5bcecce6..0e61c6530 100644
--- a/tests/ui/consts/issue-90878-2.rs
+++ b/tests/ui/consts/issue-90878-2.rs
@@ -1,4 +1,4 @@
- #![l=|x|[b;x ]] //~ ERROR unexpected expression: `|x| [b; x]`
+ #![l=|x|[b;x ]] //~ ERROR attribute value must be a literal
//~^ ERROR cannot find attribute `l` in this scope
// notice the space at the start,
diff --git a/tests/ui/consts/issue-90878-2.stderr b/tests/ui/consts/issue-90878-2.stderr
index 71b8d21fb..0b3328400 100644
--- a/tests/ui/consts/issue-90878-2.stderr
+++ b/tests/ui/consts/issue-90878-2.stderr
@@ -1,4 +1,4 @@
-error: unexpected expression: `|x| [b; x]`
+error: attribute value must be a literal
--> $DIR/issue-90878-2.rs:1:7
|
LL | #![l=|x|[b;x ]]
diff --git a/tests/ui/consts/issue-90878-3.stderr b/tests/ui/consts/issue-90878-3.stderr
index 1bcc0eb37..46b380d0f 100644
--- a/tests/ui/consts/issue-90878-3.stderr
+++ b/tests/ui/consts/issue-90878-3.stderr
@@ -6,6 +6,6 @@ LL | |x: usize| [0; x];
| |
| this would need to be a `const`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0435`.
diff --git a/tests/ui/consts/issue-90878.stderr b/tests/ui/consts/issue-90878.stderr
index c038fc622..9b7cd97be 100644
--- a/tests/ui/consts/issue-90878.stderr
+++ b/tests/ui/consts/issue-90878.stderr
@@ -6,6 +6,6 @@ LL | |x: usize| [0; x];
| |
| this would need to be a `const`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0435`.
diff --git a/tests/ui/consts/issue-miri-1910.stderr b/tests/ui/consts/issue-miri-1910.stderr
index af0f77c67..32beed5db 100644
--- a/tests/ui/consts/issue-miri-1910.stderr
+++ b/tests/ui/consts/issue-miri-1910.stderr
@@ -5,7 +5,7 @@ error[E0080]: evaluation of constant value failed
|
note: inside `std::ptr::read::<u8>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
-note: inside `ptr::const_ptr::<impl *const u8>::read`
+note: inside `std::ptr::const_ptr::<impl *const u8>::read`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `C`
--> $DIR/issue-miri-1910.rs:7:5
@@ -15,6 +15,6 @@ LL | (&foo as *const _ as *const u8).add(one_and_a_half_pointers).read();
= help: this code performed an operation that depends on the underlying bytes representing a pointer
= help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/match_ice.stderr b/tests/ui/consts/match_ice.stderr
index 342d94ed3..fb5cbe0ed 100644
--- a/tests/ui/consts/match_ice.stderr
+++ b/tests/ui/consts/match_ice.stderr
@@ -7,5 +7,5 @@ LL | C => {}
= note: the traits must be derived, manual `impl`s are not sufficient
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/min_const_fn/cmp_fn_pointers.stderr b/tests/ui/consts/min_const_fn/cmp_fn_pointers.stderr
index 3845068d8..bfaccf1db 100644
--- a/tests/ui/consts/min_const_fn/cmp_fn_pointers.stderr
+++ b/tests/ui/consts/min_const_fn/cmp_fn_pointers.stderr
@@ -6,5 +6,5 @@ LL | unsafe { x == y }
|
= note: see issue #53020 <https://github.com/rust-lang/rust/issues/53020> for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/mir_check_nonconst.stderr b/tests/ui/consts/mir_check_nonconst.stderr
index 1e0652722..ea6a8b8ee 100644
--- a/tests/ui/consts/mir_check_nonconst.stderr
+++ b/tests/ui/consts/mir_check_nonconst.stderr
@@ -7,6 +7,6 @@ LL | static foo: Foo = bar();
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/consts/miri_unleashed/abi-mismatch.stderr b/tests/ui/consts/miri_unleashed/abi-mismatch.stderr
index cf3fd88d0..51364b01a 100644
--- a/tests/ui/consts/miri_unleashed/abi-mismatch.stderr
+++ b/tests/ui/consts/miri_unleashed/abi-mismatch.stderr
@@ -23,6 +23,6 @@ help: skipping check that does not even have a feature gate
LL | my_fn();
| ^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/miri_unleashed/assoc_const.stderr b/tests/ui/consts/miri_unleashed/assoc_const.stderr
index b129aef34..3303a7842 100644
--- a/tests/ui/consts/miri_unleashed/assoc_const.stderr
+++ b/tests/ui/consts/miri_unleashed/assoc_const.stderr
@@ -35,6 +35,6 @@ help: skipping check that does not even have a feature gate
LL | const F: u32 = (U::X, 42).1;
| ^^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/miri_unleashed/assoc_const_2.stderr b/tests/ui/consts/miri_unleashed/assoc_const_2.stderr
index 46408f674..e923d95b7 100644
--- a/tests/ui/consts/miri_unleashed/assoc_const_2.stderr
+++ b/tests/ui/consts/miri_unleashed/assoc_const_2.stderr
@@ -18,6 +18,6 @@ LL | let y = <String as Bar<String>>::F;
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/miri_unleashed/box.stderr b/tests/ui/consts/miri_unleashed/box.stderr
index 407f5d8cb..5229f1e50 100644
--- a/tests/ui/consts/miri_unleashed/box.stderr
+++ b/tests/ui/consts/miri_unleashed/box.stderr
@@ -22,6 +22,6 @@ help: skipping check that does not even have a feature gate
LL | &mut *(Box::new(0))
| ^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static.32bit.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static.32bit.stderr
index 4a3344a5b..ab33b0c00 100644
--- a/tests/ui/consts/miri_unleashed/const_refers_to_static.32bit.stderr
+++ b/tests/ui/consts/miri_unleashed/const_refers_to_static.32bit.stderr
@@ -24,7 +24,7 @@ LL | const REF_INTERIOR_MUT: &usize = {
|
= 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) {
- ╾ALLOC0╼ │ ╾──╼
+ ╾ALLOC0<imm>╼ │ ╾──╼
}
error[E0080]: it is undefined behavior to use this value
@@ -35,7 +35,7 @@ LL | const READ_IMMUT: &usize = {
|
= 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) {
- ╾ALLOC1╼ │ ╾──╼
+ ╾ALLOC1<imm>╼ │ ╾──╼
}
warning: skipping const checks
diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static.64bit.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static.64bit.stderr
index 7573bfa39..f1f58d9ca 100644
--- a/tests/ui/consts/miri_unleashed/const_refers_to_static.64bit.stderr
+++ b/tests/ui/consts/miri_unleashed/const_refers_to_static.64bit.stderr
@@ -24,7 +24,7 @@ LL | const REF_INTERIOR_MUT: &usize = {
|
= 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) {
- ╾ALLOC0╼ │ ╾──────╼
+ ╾ALLOC0<imm>╼ │ ╾──────╼
}
error[E0080]: it is undefined behavior to use this value
@@ -35,7 +35,7 @@ LL | const READ_IMMUT: &usize = {
|
= 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) {
- ╾ALLOC1╼ │ ╾──────╼
+ ╾ALLOC1<imm>╼ │ ╾──────╼
}
warning: skipping const checks
diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr
index 492d8718a..7960648ce 100644
--- a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr
+++ b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr
@@ -6,7 +6,7 @@ LL | const SLICE_MUT: &[u8; 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) {
- ╾ALLOC0╼ │ ╾──╼
+ ╾ALLOC0<imm>╼ │ ╾──╼
}
error: could not evaluate constant pattern
@@ -23,7 +23,7 @@ LL | const U8_MUT: &u8 = {
|
= 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) {
- ╾ALLOC0╼ │ ╾──╼
+ ╾ALLOC0<imm>╼ │ ╾──╼
}
error: could not evaluate constant pattern
diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr
index f6d82d6c0..6ae0b2d1b 100644
--- a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr
+++ b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr
@@ -6,7 +6,7 @@ LL | const SLICE_MUT: &[u8; 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) {
- ╾ALLOC0╼ │ ╾──────╼
+ ╾ALLOC0<imm>╼ │ ╾──────╼
}
error: could not evaluate constant pattern
@@ -23,7 +23,7 @@ LL | const U8_MUT: &u8 = {
|
= 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) {
- ╾ALLOC0╼ │ ╾──────╼
+ ╾ALLOC0<imm>╼ │ ╾──────╼
}
error: could not evaluate constant pattern
diff --git a/tests/ui/consts/miri_unleashed/drop.stderr b/tests/ui/consts/miri_unleashed/drop.stderr
index 4f60b8820..5c415b5ba 100644
--- a/tests/ui/consts/miri_unleashed/drop.stderr
+++ b/tests/ui/consts/miri_unleashed/drop.stderr
@@ -19,6 +19,6 @@ help: skipping check that does not even have a feature gate
LL | let _v: Vec<i32> = Vec::new();
| ^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/miri_unleashed/feature-gate-unleash_the_miri_inside_of_you.stderr b/tests/ui/consts/miri_unleashed/feature-gate-unleash_the_miri_inside_of_you.stderr
index 45ed88b1b..833e27458 100644
--- a/tests/ui/consts/miri_unleashed/feature-gate-unleash_the_miri_inside_of_you.stderr
+++ b/tests/ui/consts/miri_unleashed/feature-gate-unleash_the_miri_inside_of_you.stderr
@@ -6,6 +6,6 @@ LL | const F: u32 = (U::X, 42).1;
| |
| the destructor for this type cannot be evaluated in constants
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0493`.
diff --git a/tests/ui/consts/miri_unleashed/inline_asm.stderr b/tests/ui/consts/miri_unleashed/inline_asm.stderr
index 6317cd882..e9643f028 100644
--- a/tests/ui/consts/miri_unleashed/inline_asm.stderr
+++ b/tests/ui/consts/miri_unleashed/inline_asm.stderr
@@ -12,6 +12,6 @@ help: skipping check that does not even have a feature gate
LL | unsafe { asm!("nop"); }
| ^^^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/miri_unleashed/mutable_references.stderr b/tests/ui/consts/miri_unleashed/mutable_references.stderr
index 3ed96701a..39298842a 100644
--- a/tests/ui/consts/miri_unleashed/mutable_references.stderr
+++ b/tests/ui/consts/miri_unleashed/mutable_references.stderr
@@ -32,6 +32,6 @@ help: skipping check that does not even have a feature gate
LL | static OH_YES: &mut i32 = &mut 42;
| ^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/consts/miri_unleashed/mutating_global.stderr b/tests/ui/consts/miri_unleashed/mutating_global.stderr
index c8770c8d7..c38e2d44d 100644
--- a/tests/ui/consts/miri_unleashed/mutating_global.stderr
+++ b/tests/ui/consts/miri_unleashed/mutating_global.stderr
@@ -4,6 +4,6 @@ error[E0080]: could not evaluate static initializer
LL | GLOBAL = 99
| ^^^^^^^^^^^ modifying a static's initial value from another static's initializer
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/miri_unleashed/non_const_fn.stderr b/tests/ui/consts/miri_unleashed/non_const_fn.stderr
index 57836f796..cc893896e 100644
--- a/tests/ui/consts/miri_unleashed/non_const_fn.stderr
+++ b/tests/ui/consts/miri_unleashed/non_const_fn.stderr
@@ -12,6 +12,6 @@ help: skipping check that does not even have a feature gate
LL | static C: () = foo();
| ^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/miri_unleashed/raw_mutable_const.stderr b/tests/ui/consts/miri_unleashed/raw_mutable_const.stderr
index 5acdcdd95..f4abaecac 100644
--- a/tests/ui/consts/miri_unleashed/raw_mutable_const.stderr
+++ b/tests/ui/consts/miri_unleashed/raw_mutable_const.stderr
@@ -14,5 +14,5 @@ help: skipping check that does not even have a feature gate
LL | const MUTABLE_BEHIND_RAW: *mut i32 = &UnsafeCell::new(42) as *const _ as *mut _;
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/consts/missing-larger-array-impl.stderr b/tests/ui/consts/missing-larger-array-impl.stderr
index fe9d0f6e6..acf38d00e 100644
--- a/tests/ui/consts/missing-larger-array-impl.stderr
+++ b/tests/ui/consts/missing-larger-array-impl.stderr
@@ -15,6 +15,6 @@ LL | <[X; 35] as Default>::default();
[T; 7]
and 27 others
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/consts/missing_span_in_backtrace.stderr b/tests/ui/consts/missing_span_in_backtrace.stderr
index 6860cee41..3e3e8e976 100644
--- a/tests/ui/consts/missing_span_in_backtrace.stderr
+++ b/tests/ui/consts/missing_span_in_backtrace.stderr
@@ -7,7 +7,7 @@ note: inside `std::ptr::read::<MaybeUninit<MaybeUninit<u8>>>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
note: inside `mem::swap_simple::<MaybeUninit<MaybeUninit<u8>>>`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
-note: inside `ptr::swap_nonoverlapping_simple_untyped::<MaybeUninit<u8>>`
+note: inside `std::ptr::swap_nonoverlapping_simple_untyped::<MaybeUninit<u8>>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
note: inside `swap_nonoverlapping::<MaybeUninit<u8>>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
@@ -23,6 +23,6 @@ note: inside `X`
= help: this code performed an operation that depends on the underlying bytes representing a pointer
= help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/nested_erroneous_ctfe.stderr b/tests/ui/consts/nested_erroneous_ctfe.stderr
index b6a172507..db298246e 100644
--- a/tests/ui/consts/nested_erroneous_ctfe.stderr
+++ b/tests/ui/consts/nested_erroneous_ctfe.stderr
@@ -7,6 +7,6 @@ LL | [9; || [9; []]];
= note: expected type `usize`
found array `[_; 0]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/consts/offset_from_ub.stderr b/tests/ui/consts/offset_from_ub.stderr
index 1ef727e5b..4fbb2f001 100644
--- a/tests/ui/consts/offset_from_ub.stderr
+++ b/tests/ui/consts/offset_from_ub.stderr
@@ -9,7 +9,7 @@ error[E0080]: evaluation of constant value failed
|
= note: `ptr_offset_from` called on pointers into different allocations
|
-note: inside `ptr::const_ptr::<impl *const u8>::offset_from`
+note: inside `std::ptr::const_ptr::<impl *const u8>::offset_from`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `NOT_PTR`
--> $DIR/offset_from_ub.rs:24:14
@@ -88,7 +88,7 @@ error[E0080]: evaluation of constant value failed
|
= note: out-of-bounds `offset_from`: null pointer is a dangling pointer (it has no provenance)
|
-note: inside `ptr::const_ptr::<impl *const u8>::offset_from`
+note: inside `std::ptr::const_ptr::<impl *const u8>::offset_from`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `OFFSET_VERY_FAR1`
--> $DIR/offset_from_ub.rs:115:14
@@ -101,7 +101,7 @@ error[E0080]: evaluation of constant value failed
|
= note: out-of-bounds `offset_from`: null pointer is a dangling pointer (it has no provenance)
|
-note: inside `ptr::const_ptr::<impl *const u8>::offset_from`
+note: inside `std::ptr::const_ptr::<impl *const u8>::offset_from`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `OFFSET_VERY_FAR2`
--> $DIR/offset_from_ub.rs:121:14
diff --git a/tests/ui/consts/offset_ub.stderr b/tests/ui/consts/offset_ub.stderr
index 8bc59d50e..b398b2039 100644
--- a/tests/ui/consts/offset_ub.stderr
+++ b/tests/ui/consts/offset_ub.stderr
@@ -3,7 +3,7 @@ error[E0080]: evaluation of constant value failed
|
= note: overflowing in-bounds pointer arithmetic
|
-note: inside `ptr::const_ptr::<impl *const u8>::offset`
+note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `BEFORE_START`
--> $DIR/offset_ub.rs:7:46
@@ -16,7 +16,7 @@ error[E0080]: evaluation of constant value failed
|
= note: out-of-bounds pointer arithmetic: ALLOC0 has size 1, so pointer to 2 bytes starting at offset 0 is out-of-bounds
|
-note: inside `ptr::const_ptr::<impl *const u8>::offset`
+note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `AFTER_END`
--> $DIR/offset_ub.rs:8:43
@@ -29,7 +29,7 @@ error[E0080]: evaluation of constant value failed
|
= note: out-of-bounds pointer arithmetic: ALLOC1 has size 100, so pointer to 101 bytes starting at offset 0 is out-of-bounds
|
-note: inside `ptr::const_ptr::<impl *const u8>::offset`
+note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `AFTER_ARRAY`
--> $DIR/offset_ub.rs:9:45
@@ -42,7 +42,7 @@ error[E0080]: evaluation of constant value failed
|
= note: overflowing in-bounds pointer arithmetic
|
-note: inside `ptr::const_ptr::<impl *const u16>::offset`
+note: inside `std::ptr::const_ptr::<impl *const u16>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `OVERFLOW`
--> $DIR/offset_ub.rs:11:43
@@ -55,7 +55,7 @@ error[E0080]: evaluation of constant value failed
|
= note: overflowing in-bounds pointer arithmetic
|
-note: inside `ptr::const_ptr::<impl *const u16>::offset`
+note: inside `std::ptr::const_ptr::<impl *const u16>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `UNDERFLOW`
--> $DIR/offset_ub.rs:12:44
@@ -68,7 +68,7 @@ error[E0080]: evaluation of constant value failed
|
= note: overflowing in-bounds pointer arithmetic
|
-note: inside `ptr::const_ptr::<impl *const u8>::offset`
+note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `OVERFLOW_ADDRESS_SPACE`
--> $DIR/offset_ub.rs:13:56
@@ -81,7 +81,7 @@ error[E0080]: evaluation of constant value failed
|
= note: overflowing in-bounds pointer arithmetic
|
-note: inside `ptr::const_ptr::<impl *const u8>::offset`
+note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `UNDERFLOW_ADDRESS_SPACE`
--> $DIR/offset_ub.rs:14:57
@@ -94,7 +94,7 @@ error[E0080]: evaluation of constant value failed
|
= note: out-of-bounds pointer arithmetic: ALLOC2 has size 1, so pointer to 2 bytes starting at offset -4 is out-of-bounds
|
-note: inside `ptr::const_ptr::<impl *const u8>::offset`
+note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `NEGATIVE_OFFSET`
--> $DIR/offset_ub.rs:15:49
@@ -107,7 +107,7 @@ error[E0080]: evaluation of constant value failed
|
= note: out-of-bounds pointer arithmetic: ALLOC3 has size 0, so pointer to 1 byte starting at offset 0 is out-of-bounds
|
-note: inside `ptr::const_ptr::<impl *const u8>::offset`
+note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `ZERO_SIZED_ALLOC`
--> $DIR/offset_ub.rs:17:50
@@ -120,7 +120,7 @@ error[E0080]: evaluation of constant value failed
|
= note: out-of-bounds pointer arithmetic: 0x1[noalloc] is a dangling pointer (it has no provenance)
|
-note: inside `ptr::mut_ptr::<impl *mut u8>::offset`
+note: inside `std::ptr::mut_ptr::<impl *mut u8>::offset`
--> $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
note: inside `DANGLING`
--> $DIR/offset_ub.rs:18:42
@@ -133,7 +133,7 @@ error[E0080]: evaluation of constant value failed
|
= note: out-of-bounds pointer arithmetic: null pointer is a dangling pointer (it has no provenance)
|
-note: inside `ptr::const_ptr::<impl *const u8>::offset`
+note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `NULL_OFFSET_ZERO`
--> $DIR/offset_ub.rs:21:50
@@ -146,7 +146,7 @@ error[E0080]: evaluation of constant value failed
|
= note: out-of-bounds pointer arithmetic: 0x7f..f[noalloc] is a dangling pointer (it has no provenance)
|
-note: inside `ptr::const_ptr::<impl *const u8>::offset`
+note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `UNDERFLOW_ABS`
--> $DIR/offset_ub.rs:24:47
diff --git a/tests/ui/consts/partial_qualif.stderr b/tests/ui/consts/partial_qualif.stderr
index 32c25be21..05e0eeee1 100644
--- a/tests/ui/consts/partial_qualif.stderr
+++ b/tests/ui/consts/partial_qualif.stderr
@@ -4,6 +4,6 @@ error[E0492]: constants cannot refer to interior mutable data
LL | &{a}
| ^^^^ this borrow of an interior mutable value may end up in the final value
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0492`.
diff --git a/tests/ui/consts/precise-drop-with-promoted.rs b/tests/ui/consts/precise-drop-with-promoted.rs
index 0c0514dd9..7cbe3c4e4 100644
--- a/tests/ui/consts/precise-drop-with-promoted.rs
+++ b/tests/ui/consts/precise-drop-with-promoted.rs
@@ -1,11 +1,6 @@
// Regression test for issue #89938.
+// check-pass
// compile-flags: --crate-type=lib
-// known-bug: #103507
-// failure-status: 101
-// normalize-stderr-test "note: .*\n\n" -> ""
-// normalize-stderr-test "thread 'rustc' panicked.*\n.*\n" -> ""
-// normalize-stderr-test "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: "
-// rustc-env:RUST_BACKTRACE=0
#![feature(const_precise_live_drops)]
diff --git a/tests/ui/consts/precise-drop-with-promoted.stderr b/tests/ui/consts/precise-drop-with-promoted.stderr
deleted file mode 100644
index a56672048..000000000
--- a/tests/ui/consts/precise-drop-with-promoted.stderr
+++ /dev/null
@@ -1,6 +0,0 @@
-error: the compiler unexpectedly panicked. this is a bug.
-
-query stack during panic:
-#0 [mir_drops_elaborated_and_const_checked] elaborating drops for `f`
-#1 [analysis] running analysis passes on this crate
-end of query stack
diff --git a/tests/ui/consts/qualif_overwrite.stderr b/tests/ui/consts/qualif_overwrite.stderr
index 86a669c43..976cf7bd7 100644
--- a/tests/ui/consts/qualif_overwrite.stderr
+++ b/tests/ui/consts/qualif_overwrite.stderr
@@ -4,6 +4,6 @@ error[E0492]: constants cannot refer to interior mutable data
LL | &{a}
| ^^^^ this borrow of an interior mutable value may end up in the final value
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0492`.
diff --git a/tests/ui/consts/qualif_overwrite_2.stderr b/tests/ui/consts/qualif_overwrite_2.stderr
index 9eb123d0b..a107c4a5c 100644
--- a/tests/ui/consts/qualif_overwrite_2.stderr
+++ b/tests/ui/consts/qualif_overwrite_2.stderr
@@ -4,6 +4,6 @@ error[E0492]: constants cannot refer to interior mutable data
LL | &{a.0}
| ^^^^^^ this borrow of an interior mutable value may end up in the final value
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0492`.
diff --git a/tests/ui/consts/raw-ptr-const.rs b/tests/ui/consts/raw-ptr-const.rs
index fc774be54..541c5fd1a 100644
--- a/tests/ui/consts/raw-ptr-const.rs
+++ b/tests/ui/consts/raw-ptr-const.rs
@@ -1,4 +1,4 @@
-// This is a regression test for a `delay_span_bug` during interning when a constant
+// This is a regression test for a `span_delayed_bug` during interning when a constant
// evaluates to a (non-dangling) raw pointer. For now this errors; potentially it
// could also be allowed.
diff --git a/tests/ui/consts/raw-ptr-const.stderr b/tests/ui/consts/raw-ptr-const.stderr
index 82f782fab..9aef78505 100644
--- a/tests/ui/consts/raw-ptr-const.stderr
+++ b/tests/ui/consts/raw-ptr-const.stderr
@@ -6,5 +6,5 @@ LL | const CONST_RAW: *const Vec<i32> = &Vec::new() as *const _;
|
= note: memory only reachable via raw pointers is not supported
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/recursive-zst-static.default.stderr b/tests/ui/consts/recursive-zst-static.default.stderr
index d592b5aee..3bbb685a6 100644
--- a/tests/ui/consts/recursive-zst-static.default.stderr
+++ b/tests/ui/consts/recursive-zst-static.default.stderr
@@ -21,6 +21,6 @@ LL | | }
| |_^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/consts/recursive-zst-static.unleash.stderr b/tests/ui/consts/recursive-zst-static.unleash.stderr
index d592b5aee..3bbb685a6 100644
--- a/tests/ui/consts/recursive-zst-static.unleash.stderr
+++ b/tests/ui/consts/recursive-zst-static.unleash.stderr
@@ -21,6 +21,6 @@ LL | | }
| |_^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/consts/recursive.stderr b/tests/ui/consts/recursive.stderr
index 60ce64d2a..0046005c7 100644
--- a/tests/ui/consts/recursive.stderr
+++ b/tests/ui/consts/recursive.stderr
@@ -31,6 +31,6 @@ note: inside `X`
LL | const X: () = f(1);
| ^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/stable-precise-live-drops-in-libcore.stderr b/tests/ui/consts/stable-precise-live-drops-in-libcore.stderr
index 5f70391ee..323c49b1d 100644
--- a/tests/ui/consts/stable-precise-live-drops-in-libcore.stderr
+++ b/tests/ui/consts/stable-precise-live-drops-in-libcore.stderr
@@ -7,6 +7,6 @@ LL | pub const fn unwrap(self) -> T {
LL | }
| - value is dropped here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0493`.
diff --git a/tests/ui/consts/static_mut_containing_mut_ref2.mut_refs.stderr b/tests/ui/consts/static_mut_containing_mut_ref2.mut_refs.stderr
index 8db75dd63..3d0de2335 100644
--- a/tests/ui/consts/static_mut_containing_mut_ref2.mut_refs.stderr
+++ b/tests/ui/consts/static_mut_containing_mut_ref2.mut_refs.stderr
@@ -4,6 +4,6 @@ error[E0080]: could not evaluate static initializer
LL | pub static mut STDERR_BUFFER: () = unsafe { *(&mut STDERR_BUFFER_SPACE) = 42; };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ modifying a static's initial value from another static's initializer
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/static_mut_containing_mut_ref2.stock.stderr b/tests/ui/consts/static_mut_containing_mut_ref2.stock.stderr
index 5cdcea232..3d5b012d4 100644
--- a/tests/ui/consts/static_mut_containing_mut_ref2.stock.stderr
+++ b/tests/ui/consts/static_mut_containing_mut_ref2.stock.stderr
@@ -7,6 +7,6 @@ LL | pub static mut STDERR_BUFFER: () = unsafe { *(&mut STDERR_BUFFER_SPACE) = 4
= note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/consts/static_mut_containing_mut_ref3.stderr b/tests/ui/consts/static_mut_containing_mut_ref3.stderr
index 91f9dbd8d..be84608ac 100644
--- a/tests/ui/consts/static_mut_containing_mut_ref3.stderr
+++ b/tests/ui/consts/static_mut_containing_mut_ref3.stderr
@@ -4,6 +4,6 @@ error[E0080]: could not evaluate static initializer
LL | static mut BAR: () = unsafe { FOO.0 = 99; };
| ^^^^^^^^^^ modifying a static's initial value from another static's initializer
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/std/alloc.32bit.stderr b/tests/ui/consts/std/alloc.32bit.stderr
deleted file mode 100644
index da805de45..000000000
--- a/tests/ui/consts/std/alloc.32bit.stderr
+++ /dev/null
@@ -1,25 +0,0 @@
-error[E0080]: it is undefined behavior to use this value
- --> $DIR/alloc.rs:11: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
- |
- = 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: $SIZE, align: $ALIGN) {
- HEX_DUMP
- }
-
-error[E0080]: it is undefined behavior to use this value
- --> $DIR/alloc.rs:15: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
- |
- = 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: $SIZE, align: $ALIGN) {
- HEX_DUMP
- }
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/std/alloc.64bit.stderr b/tests/ui/consts/std/alloc.64bit.stderr
deleted file mode 100644
index 094503e10..000000000
--- a/tests/ui/consts/std/alloc.64bit.stderr
+++ /dev/null
@@ -1,25 +0,0 @@
-error[E0080]: it is undefined behavior to use this value
- --> $DIR/alloc.rs:11: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
- |
- = 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: $SIZE, align: $ALIGN) {
- HEX_DUMP
- }
-
-error[E0080]: it is undefined behavior to use this value
- --> $DIR/alloc.rs:15: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
- |
- = 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: $SIZE, align: $ALIGN) {
- HEX_DUMP
- }
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/std/alloc.rs b/tests/ui/consts/std/alloc.rs
deleted file mode 100644
index 0a2c2f4de..000000000
--- a/tests/ui/consts/std/alloc.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// stderr-per-bitwidth
-// Strip out raw byte dumps to make comparison platform-independent:
-// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
-// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*a(lloc)?[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP"
-use std::alloc::Layout;
-
-// ok
-const LAYOUT_VALID: Layout = unsafe { Layout::from_size_align_unchecked(0x1000, 0x08) };
-
-// not ok, since alignment needs to be non-zero.
-const LAYOUT_INVALID_ZERO: Layout = unsafe { Layout::from_size_align_unchecked(0x1000, 0x00) };
-//~^ ERROR it is undefined behavior to use this value
-
-// not ok, since alignment needs to be a power of two.
-const LAYOUT_INVALID_THREE: Layout = unsafe { Layout::from_size_align_unchecked(9, 3) };
-//~^ ERROR it is undefined behavior to use this value
-
-fn main() {}
diff --git a/tests/ui/consts/timeout.stderr b/tests/ui/consts/timeout.stderr
index 799b5ec8d..6bfa06d86 100644
--- a/tests/ui/consts/timeout.stderr
+++ b/tests/ui/consts/timeout.stderr
@@ -11,5 +11,5 @@ LL | static ROOK_ATTACKS_TABLE: () = {
= note: `#[deny(long_running_const_eval)]` on by default
= note: this error originates in the macro `uint_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/consts/transmute-size-mismatch-before-typeck.stderr b/tests/ui/consts/transmute-size-mismatch-before-typeck.stderr
index 4e8470173..6bc7e7203 100644
--- a/tests/ui/consts/transmute-size-mismatch-before-typeck.stderr
+++ b/tests/ui/consts/transmute-size-mismatch-before-typeck.stderr
@@ -7,6 +7,6 @@ LL | const ZST: &[u8] = unsafe { std::mem::transmute(1usize) };
= note: source type: `usize` (word size)
= note: target type: `&[u8]` (2 * word size)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0512`.
diff --git a/tests/ui/consts/try-operator.stderr b/tests/ui/consts/try-operator.stderr
index f6a651c5e..bb8f606ed 100644
--- a/tests/ui/consts/try-operator.stderr
+++ b/tests/ui/consts/try-operator.stderr
@@ -4,6 +4,6 @@ error[E0635]: unknown feature `const_convert`
LL | #![feature(const_convert)]
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0635`.
diff --git a/tests/ui/consts/uninhabited-const-issue-61744.stderr b/tests/ui/consts/uninhabited-const-issue-61744.stderr
index c92824a0d..c6dd11ee5 100644
--- a/tests/ui/consts/uninhabited-const-issue-61744.stderr
+++ b/tests/ui/consts/uninhabited-const-issue-61744.stderr
@@ -659,6 +659,6 @@ LL | dbg!(i32::CONSTANT);
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/unstable-const-fn-in-libcore.stderr b/tests/ui/consts/unstable-const-fn-in-libcore.stderr
index b75f99a72..4b649bf43 100644
--- a/tests/ui/consts/unstable-const-fn-in-libcore.stderr
+++ b/tests/ui/consts/unstable-const-fn-in-libcore.stderr
@@ -4,5 +4,5 @@ error: ~const can only be applied to `#[const_trait]` traits
LL | const fn unwrap_or_else<F: ~const FnOnce() -> T>(self, f: F) -> T {
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/copy-a-resource.stderr b/tests/ui/copy-a-resource.stderr
index 128087f1e..ff1e28bf9 100644
--- a/tests/ui/copy-a-resource.stderr
+++ b/tests/ui/copy-a-resource.stderr
@@ -11,6 +11,6 @@ LL | let _y = x.clone();
= note: the following trait defines an item `clone`, perhaps you need to implement it:
candidate #1: `Clone`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/coroutine/async-coroutine-issue-67158.stderr b/tests/ui/coroutine/async-coroutine-issue-67158.stderr
index d583d3d5e..1c4a6b0c3 100644
--- a/tests/ui/coroutine/async-coroutine-issue-67158.stderr
+++ b/tests/ui/coroutine/async-coroutine-issue-67158.stderr
@@ -4,6 +4,6 @@ error[E0727]: `async` coroutines are not yet supported
LL | async { yield print!(":C") };
| ^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0727`.
diff --git a/tests/ui/coroutine/async-gen-deduce-yield.rs b/tests/ui/coroutine/async-gen-deduce-yield.rs
new file mode 100644
index 000000000..9ccc8ee41
--- /dev/null
+++ b/tests/ui/coroutine/async-gen-deduce-yield.rs
@@ -0,0 +1,14 @@
+// compile-flags: --edition 2024 -Zunstable-options
+// check-pass
+
+#![feature(async_iterator, gen_blocks)]
+
+use std::async_iter::AsyncIterator;
+
+fn deduce() -> impl AsyncIterator<Item = ()> {
+ async gen {
+ yield Default::default();
+ }
+}
+
+fn main() {}
diff --git a/tests/ui/coroutine/async-gen-yield-ty-is-unit.rs b/tests/ui/coroutine/async-gen-yield-ty-is-unit.rs
new file mode 100644
index 000000000..aac74d3ea
--- /dev/null
+++ b/tests/ui/coroutine/async-gen-yield-ty-is-unit.rs
@@ -0,0 +1,17 @@
+// compile-flags: --edition 2024 -Zunstable-options
+// check-pass
+
+#![feature(async_iterator, gen_blocks, noop_waker)]
+
+use std::{async_iter::AsyncIterator, pin::pin, task::{Context, Waker}};
+
+async gen fn gen_fn() -> &'static str {
+ yield "hello"
+}
+
+pub fn main() {
+ let async_iterator = pin!(gen_fn());
+ let waker = Waker::noop();
+ let ctx = &mut Context::from_waker(&waker);
+ async_iterator.poll_next(ctx);
+}
diff --git a/tests/ui/coroutine/async_gen_fn.e2024.stderr b/tests/ui/coroutine/async_gen_fn.e2024.stderr
new file mode 100644
index 000000000..d24cdbbc3
--- /dev/null
+++ b/tests/ui/coroutine/async_gen_fn.e2024.stderr
@@ -0,0 +1,12 @@
+error[E0658]: gen blocks are experimental
+ --> $DIR/async_gen_fn.rs:4:1
+ |
+LL | async gen fn foo() {}
+ | ^^^^^^^^^
+ |
+ = note: see issue #117078 <https://github.com/rust-lang/rust/issues/117078> for more information
+ = help: add `#![feature(gen_blocks)]` to the crate attributes to enable
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/coroutine/async_gen_fn.none.stderr b/tests/ui/coroutine/async_gen_fn.none.stderr
new file mode 100644
index 000000000..7950251a7
--- /dev/null
+++ b/tests/ui/coroutine/async_gen_fn.none.stderr
@@ -0,0 +1,18 @@
+error[E0670]: `async fn` is not permitted in Rust 2015
+ --> $DIR/async_gen_fn.rs:4:1
+ |
+LL | async gen fn foo() {}
+ | ^^^^^ to use `async fn`, switch to Rust 2018 or later
+ |
+ = help: pass `--edition 2021` to `rustc`
+ = note: for more on editions, read https://doc.rust-lang.org/edition-guide
+
+error: expected one of `extern`, `fn`, or `unsafe`, found `gen`
+ --> $DIR/async_gen_fn.rs:4:7
+ |
+LL | async gen fn foo() {}
+ | ^^^ expected one of `extern`, `fn`, or `unsafe`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0670`.
diff --git a/tests/ui/coroutine/async_gen_fn.rs b/tests/ui/coroutine/async_gen_fn.rs
new file mode 100644
index 000000000..20564106f
--- /dev/null
+++ b/tests/ui/coroutine/async_gen_fn.rs
@@ -0,0 +1,9 @@
+// revisions: e2024 none
+//[e2024] compile-flags: --edition 2024 -Zunstable-options
+
+async gen fn foo() {}
+//[none]~^ ERROR: `async fn` is not permitted in Rust 2015
+//[none]~| ERROR: expected one of `extern`, `fn`, or `unsafe`, found `gen`
+//[e2024]~^^^ ERROR: gen blocks are experimental
+
+fn main() {}
diff --git a/tests/ui/coroutine/async_gen_fn_iter.rs b/tests/ui/coroutine/async_gen_fn_iter.rs
new file mode 100644
index 000000000..ec6464d00
--- /dev/null
+++ b/tests/ui/coroutine/async_gen_fn_iter.rs
@@ -0,0 +1,86 @@
+// edition: 2024
+// compile-flags: -Zunstable-options
+// run-pass
+
+#![feature(gen_blocks, async_iterator)]
+#![feature(noop_waker)]
+
+// make sure that a ridiculously simple async gen fn works as an iterator.
+
+async fn pause() {
+ // this doesn't actually do anything, lol
+}
+
+async fn one() -> i32 {
+ 1
+}
+
+async fn two() -> i32 {
+ 2
+}
+
+async gen fn foo() -> i32 {
+ yield one().await;
+ pause().await;
+ yield two().await;
+ pause().await;
+ yield 3;
+ pause().await;
+}
+
+async fn async_main() {
+ let mut iter = std::pin::pin!(foo());
+ assert_eq!(iter.next().await, Some(1));
+ assert_eq!(iter.as_mut().next().await, Some(2));
+ assert_eq!(iter.as_mut().next().await, Some(3));
+ assert_eq!(iter.as_mut().next().await, None);
+
+ // Test that the iterator is fused and does not panic
+ assert_eq!(iter.as_mut().next().await, None);
+ assert_eq!(iter.as_mut().next().await, None);
+}
+
+// ------------------------------------------------------------------------- //
+// Implementation Details Below...
+
+use std::pin::{Pin, pin};
+use std::task::*;
+use std::async_iter::AsyncIterator;
+use std::future::Future;
+
+trait AsyncIterExt {
+ fn next(&mut self) -> Next<'_, Self>;
+}
+
+impl<T> AsyncIterExt for T {
+ fn next(&mut self) -> Next<'_, Self> {
+ Next { s: self }
+ }
+}
+
+struct Next<'s, S: ?Sized> {
+ s: &'s mut S,
+}
+
+impl<'s, S: AsyncIterator> Future for Next<'s, S> where S: Unpin {
+ type Output = Option<S::Item>;
+
+ fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<S::Item>> {
+ Pin::new(&mut *self.s).poll_next(cx)
+ }
+}
+
+fn main() {
+ let mut fut = pin!(async_main());
+
+ // Poll loop, just to test the future...
+ let waker = Waker::noop();
+ let ctx = &mut Context::from_waker(&waker);
+
+ loop {
+ match fut.as_mut().poll(ctx) {
+ Poll::Pending => {}
+ Poll::Ready(()) => break,
+ }
+ }
+}
diff --git a/tests/ui/coroutine/clone-rpit.rs b/tests/ui/coroutine/clone-rpit.rs
new file mode 100644
index 000000000..cbd28f88f
--- /dev/null
+++ b/tests/ui/coroutine/clone-rpit.rs
@@ -0,0 +1,17 @@
+// revisions: current next
+//[next] compile-flags: -Znext-solver
+// check-pass
+
+#![feature(coroutines, coroutine_trait, coroutine_clone)]
+
+// This stalls the goal `{coroutine} <: impl Clone`, since that has a nested goal
+// of `{coroutine}: Clone`. That is only known if we can compute the generator
+// witness types, which we don't know until after borrowck. When we later check
+// the goal for correctness, we want to be able to bind the `impl Clone` opaque.
+pub fn foo<'a, 'b>() -> impl Clone {
+ move |_: ()| {
+ let () = yield ();
+ }
+}
+
+fn main() {}
diff --git a/tests/ui/coroutine/control-flow.rs b/tests/ui/coroutine/control-flow.rs
index 709b135b2..0cb37524a 100644
--- a/tests/ui/coroutine/control-flow.rs
+++ b/tests/ui/coroutine/control-flow.rs
@@ -5,7 +5,6 @@
#![feature(coroutines, coroutine_trait)]
-use std::marker::Unpin;
use std::ops::{CoroutineState, Coroutine};
use std::pin::Pin;
diff --git a/tests/ui/coroutine/coroutine-region-requirements.migrate.stderr b/tests/ui/coroutine/coroutine-region-requirements.migrate.stderr
index 8a96d187f..cfee8fc44 100644
--- a/tests/ui/coroutine/coroutine-region-requirements.migrate.stderr
+++ b/tests/ui/coroutine/coroutine-region-requirements.migrate.stderr
@@ -7,6 +7,6 @@ LL | fn dangle(x: &mut i32) -> &'static mut i32 {
LL | GeneratorState::Complete(c) => return c,
| ^ lifetime `'static` required
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0621`.
diff --git a/tests/ui/coroutine/coroutine-region-requirements.stderr b/tests/ui/coroutine/coroutine-region-requirements.stderr
index ad3183e76..d31b4eb2b 100644
--- a/tests/ui/coroutine/coroutine-region-requirements.stderr
+++ b/tests/ui/coroutine/coroutine-region-requirements.stderr
@@ -7,5 +7,5 @@ LL | fn dangle(x: &mut i32) -> &'static mut i32 {
LL | CoroutineState::Complete(c) => return c,
| ^ returning this value requires that `'1` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/coroutine/coroutine-with-nll.stderr b/tests/ui/coroutine/coroutine-with-nll.stderr
index ed58debe2..77e8bb1f9 100644
--- a/tests/ui/coroutine/coroutine-with-nll.stderr
+++ b/tests/ui/coroutine/coroutine-with-nll.stderr
@@ -7,6 +7,6 @@ LL |
LL | yield ();
| -------- possible yield occurs here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0626`.
diff --git a/tests/ui/coroutine/discriminant.rs b/tests/ui/coroutine/discriminant.rs
index 73bdd9c86..0cdeb6dd6 100644
--- a/tests/ui/coroutine/discriminant.rs
+++ b/tests/ui/coroutine/discriminant.rs
@@ -6,7 +6,7 @@
#![feature(coroutines, coroutine_trait, core_intrinsics, discriminant_kind)]
use std::intrinsics::discriminant_value;
-use std::marker::{DiscriminantKind, Unpin};
+use std::marker::DiscriminantKind;
use std::mem::size_of_val;
use std::{cmp, ops::*};
diff --git a/tests/ui/coroutine/drop-yield-twice.stderr b/tests/ui/coroutine/drop-yield-twice.stderr
index fbbedac57..b37c27015 100644
--- a/tests/ui/coroutine/drop-yield-twice.stderr
+++ b/tests/ui/coroutine/drop-yield-twice.stderr
@@ -18,5 +18,5 @@ note: required by a bound in `assert_send`
LL | fn assert_send<T: Send>(_: T) {}
| ^^^^ required by this bound in `assert_send`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/coroutine/dropck-resume.stderr b/tests/ui/coroutine/dropck-resume.stderr
index 028523978..aa6e423c7 100644
--- a/tests/ui/coroutine/dropck-resume.stderr
+++ b/tests/ui/coroutine/dropck-resume.stderr
@@ -10,6 +10,6 @@ LL |
LL | }
| - mutable borrow might be used here, when `g` is dropped and runs the destructor for coroutine
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/coroutine/gen_block_is_iter.rs b/tests/ui/coroutine/gen_block_is_iter.rs
index 92625cf7c..d43eef4a1 100644
--- a/tests/ui/coroutine/gen_block_is_iter.rs
+++ b/tests/ui/coroutine/gen_block_is_iter.rs
@@ -1,6 +1,6 @@
// revisions: next old
//compile-flags: --edition 2024 -Zunstable-options
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// check-pass
#![feature(gen_blocks)]
diff --git a/tests/ui/coroutine/gen_block_is_no_future.stderr b/tests/ui/coroutine/gen_block_is_no_future.stderr
index db0c3c19b..f9e23e45b 100644
--- a/tests/ui/coroutine/gen_block_is_no_future.stderr
+++ b/tests/ui/coroutine/gen_block_is_no_future.stderr
@@ -7,6 +7,6 @@ LL | fn foo() -> impl std::future::Future {
= help: the trait `Future` is not implemented for `{gen block@$DIR/gen_block_is_no_future.rs:5:5: 5:21}`
= note: {gen block@$DIR/gen_block_is_no_future.rs:5:5: 5:21} must be a future or must implement `IntoFuture` to be awaited
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/coroutine/gen_block_iterate.rs b/tests/ui/coroutine/gen_block_iterate.rs
index 18e1bb887..8e72b00d9 100644
--- a/tests/ui/coroutine/gen_block_iterate.rs
+++ b/tests/ui/coroutine/gen_block_iterate.rs
@@ -1,6 +1,6 @@
// revisions: next old
//compile-flags: --edition 2024 -Zunstable-options
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// run-pass
#![feature(gen_blocks)]
diff --git a/tests/ui/coroutine/gen_block_move.stderr b/tests/ui/coroutine/gen_block_move.stderr
index b93ac65f5..b93f6a9a6 100644
--- a/tests/ui/coroutine/gen_block_move.stderr
+++ b/tests/ui/coroutine/gen_block_move.stderr
@@ -25,6 +25,6 @@ help: to force the gen block to take ownership of `x` (and any other referenced
LL | gen move {
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0373`.
diff --git a/tests/ui/coroutine/gen_fn.e2024.stderr b/tests/ui/coroutine/gen_fn.e2024.stderr
index 388e10fd6..9ad890af3 100644
--- a/tests/ui/coroutine/gen_fn.e2024.stderr
+++ b/tests/ui/coroutine/gen_fn.e2024.stderr
@@ -1,10 +1,12 @@
-error: `gen` functions are not yet implemented
+error[E0658]: gen blocks are experimental
--> $DIR/gen_fn.rs:4:1
|
LL | gen fn foo() {}
| ^^^
|
- = help: for now you can use `gen {}` blocks and return `impl Iterator` instead
+ = note: see issue #117078 <https://github.com/rust-lang/rust/issues/117078> for more information
+ = help: add `#![feature(gen_blocks)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/coroutine/gen_fn.none.stderr b/tests/ui/coroutine/gen_fn.none.stderr
index 5e7bd9d8b..c5342ee22 100644
--- a/tests/ui/coroutine/gen_fn.none.stderr
+++ b/tests/ui/coroutine/gen_fn.none.stderr
@@ -4,5 +4,5 @@ error: expected one of `#`, `async`, `const`, `default`, `extern`, `fn`, `pub`,
LL | gen fn foo() {}
| ^^^ expected one of 9 possible tokens
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/coroutine/gen_fn.rs b/tests/ui/coroutine/gen_fn.rs
index da515f263..e06629c5d 100644
--- a/tests/ui/coroutine/gen_fn.rs
+++ b/tests/ui/coroutine/gen_fn.rs
@@ -3,6 +3,6 @@
gen fn foo() {}
//[none]~^ ERROR: expected one of `#`, `async`, `const`, `default`, `extern`, `fn`, `pub`, `unsafe`, or `use`, found `gen`
-//[e2024]~^^ ERROR: `gen` functions are not yet implemented
+//[e2024]~^^ ERROR: gen blocks are experimental
fn main() {}
diff --git a/tests/ui/coroutine/gen_fn_iter.rs b/tests/ui/coroutine/gen_fn_iter.rs
new file mode 100644
index 000000000..da01bc96e
--- /dev/null
+++ b/tests/ui/coroutine/gen_fn_iter.rs
@@ -0,0 +1,20 @@
+// edition: 2024
+// compile-flags: -Zunstable-options
+// run-pass
+#![feature(gen_blocks)]
+
+// make sure that a ridiculously simple gen fn works as an iterator.
+
+gen fn foo() -> i32 {
+ yield 1;
+ yield 2;
+ yield 3;
+}
+
+fn main() {
+ let mut iter = foo();
+ assert_eq!(iter.next(), Some(1));
+ assert_eq!(iter.next(), Some(2));
+ assert_eq!(iter.next(), Some(3));
+ assert_eq!(iter.next(), None);
+}
diff --git a/tests/ui/coroutine/gen_fn_lifetime_capture.rs b/tests/ui/coroutine/gen_fn_lifetime_capture.rs
new file mode 100644
index 000000000..b6a4d71e6
--- /dev/null
+++ b/tests/ui/coroutine/gen_fn_lifetime_capture.rs
@@ -0,0 +1,19 @@
+// edition: 2024
+// compile-flags: -Zunstable-options
+// check-pass
+#![feature(gen_blocks)]
+
+// make sure gen fn captures lifetimes in its signature
+
+gen fn foo<'a, 'b>(x: &'a i32, y: &'b i32, z: &'b i32) -> &'b i32 {
+ yield y;
+ yield z;
+}
+
+fn main() {
+ let z = 3;
+ let mut iter = foo(&1, &2, &z);
+ assert_eq!(iter.next(), Some(&2));
+ assert_eq!(iter.next(), Some(&3));
+ assert_eq!(iter.next(), None);
+}
diff --git a/tests/ui/coroutine/issue-102645.stderr b/tests/ui/coroutine/issue-102645.stderr
index 3db090346..7a3b7f2b0 100644
--- a/tests/ui/coroutine/issue-102645.stderr
+++ b/tests/ui/coroutine/issue-102645.stderr
@@ -11,6 +11,6 @@ help: provide the argument
LL | Pin::new(&mut b).resume(());
| ~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0061`.
diff --git a/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.mir.stderr b/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.mir.stderr
index a9a0d6296..11dc57bcf 100644
--- a/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.mir.stderr
+++ b/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.mir.stderr
@@ -6,6 +6,6 @@ LL | *(1 as *mut u32) = 42;
|
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.thir.stderr b/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.thir.stderr
index 22c83e9a3..a61689a0d 100644
--- a/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.thir.stderr
+++ b/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.thir.stderr
@@ -6,6 +6,6 @@ LL | *(1 as *mut u32) = 42;
|
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/coroutine/issue-48048.stderr b/tests/ui/coroutine/issue-48048.stderr
index bb9f189fa..199ecf4ca 100644
--- a/tests/ui/coroutine/issue-48048.stderr
+++ b/tests/ui/coroutine/issue-48048.stderr
@@ -6,6 +6,6 @@ LL | x.0({
LL | yield;
| ----- possible yield occurs here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0626`.
diff --git a/tests/ui/coroutine/issue-57084.rs b/tests/ui/coroutine/issue-57084.rs
index 95bed5b15..e0aeae667 100644
--- a/tests/ui/coroutine/issue-57084.rs
+++ b/tests/ui/coroutine/issue-57084.rs
@@ -1,5 +1,5 @@
// This issue reproduces an ICE on compile (E.g. fails on 2018-12-19 nightly).
-// "cannot relate bound region: ReLateBound(DebruijnIndex(1), BrAnon(1)) <= '?1"
+// "cannot relate bound region: ReBound(DebruijnIndex(1), BrAnon(1)) <= '?1"
// run-pass
// edition:2018
#![feature(coroutines,coroutine_trait)]
diff --git a/tests/ui/coroutine/issue-58888.rs b/tests/ui/coroutine/issue-58888.rs
index af8e60ce4..9c699c7bb 100644
--- a/tests/ui/coroutine/issue-58888.rs
+++ b/tests/ui/coroutine/issue-58888.rs
@@ -1,6 +1,5 @@
// run-pass
// compile-flags: -g
-// ignore-asmjs wasm2js does not support source maps yet
#![feature(coroutines, coroutine_trait)]
diff --git a/tests/ui/coroutine/issue-64620-yield-array-element.stderr b/tests/ui/coroutine/issue-64620-yield-array-element.stderr
index 47632d083..347532fb7 100644
--- a/tests/ui/coroutine/issue-64620-yield-array-element.stderr
+++ b/tests/ui/coroutine/issue-64620-yield-array-element.stderr
@@ -4,6 +4,6 @@ error[E0627]: yield expression outside of coroutine literal
LL | yield arr[0];
| ^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0627`.
diff --git a/tests/ui/coroutine/issue-88653.stderr b/tests/ui/coroutine/issue-88653.stderr
index 3ae50b5af..8a23ad17b 100644
--- a/tests/ui/coroutine/issue-88653.stderr
+++ b/tests/ui/coroutine/issue-88653.stderr
@@ -10,6 +10,6 @@ LL | |bar| {
= note: expected coroutine signature `fn((bool,)) -> _`
found coroutine signature `fn(bool) -> _`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0631`.
diff --git a/tests/ui/coroutine/issue-91477.stderr b/tests/ui/coroutine/issue-91477.stderr
index 0ab3c1fba..ca8e43d8a 100644
--- a/tests/ui/coroutine/issue-91477.stderr
+++ b/tests/ui/coroutine/issue-91477.stderr
@@ -4,6 +4,6 @@ error[E0627]: yield expression outside of coroutine literal
LL | yield 1;
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0627`.
diff --git a/tests/ui/coroutine/iterator-count.rs b/tests/ui/coroutine/iterator-count.rs
index 322e56f8a..b7628c44d 100644
--- a/tests/ui/coroutine/iterator-count.rs
+++ b/tests/ui/coroutine/iterator-count.rs
@@ -2,7 +2,6 @@
#![feature(coroutines, coroutine_trait)]
-use std::marker::Unpin;
use std::ops::{Coroutine, CoroutineState};
use std::pin::Pin;
diff --git a/tests/ui/coroutine/layout-error.stderr b/tests/ui/coroutine/layout-error.stderr
index b1a258f4f..249a99e9b 100644
--- a/tests/ui/coroutine/layout-error.stderr
+++ b/tests/ui/coroutine/layout-error.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `Foo` in this scope
LL | let a = Foo;
| ^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/coroutine/metadata-sufficient-for-layout.stderr b/tests/ui/coroutine/metadata-sufficient-for-layout.stderr
index 3488b04f2..c7860fde2 100644
--- a/tests/ui/coroutine/metadata-sufficient-for-layout.stderr
+++ b/tests/ui/coroutine/metadata-sufficient-for-layout.stderr
@@ -4,5 +4,5 @@ error: fatal error triggered by #[rustc_error]
LL | fn main() {}
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/coroutine/non-static-is-unpin.rs b/tests/ui/coroutine/non-static-is-unpin.rs
index d6ded53ae..238e49bbf 100644
--- a/tests/ui/coroutine/non-static-is-unpin.rs
+++ b/tests/ui/coroutine/non-static-is-unpin.rs
@@ -1,11 +1,11 @@
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// run-pass
#![feature(coroutines, coroutine_trait)]
#![allow(dropping_copy_types)]
-use std::marker::{PhantomPinned, Unpin};
+use std::marker::PhantomPinned;
fn assert_unpin<G: Unpin>(_: G) {
}
diff --git a/tests/ui/coroutine/pattern-borrow.stderr b/tests/ui/coroutine/pattern-borrow.stderr
index ddb3bf662..9e7b330d7 100644
--- a/tests/ui/coroutine/pattern-borrow.stderr
+++ b/tests/ui/coroutine/pattern-borrow.stderr
@@ -6,6 +6,6 @@ LL | if let Test::A(ref _a) = test {
LL | yield ();
| -------- possible yield occurs here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0626`.
diff --git a/tests/ui/coroutine/print/coroutine-print-verbose-3.stderr b/tests/ui/coroutine/print/coroutine-print-verbose-3.stderr
index fb80f29d1..100993bd3 100644
--- a/tests/ui/coroutine/print/coroutine-print-verbose-3.stderr
+++ b/tests/ui/coroutine/print/coroutine-print-verbose-3.stderr
@@ -14,6 +14,6 @@ LL | | };
= note: expected unit type `()`
found coroutine `{main::{closure#0} upvar_tys=(unavailable)}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/coroutine/ref-escapes-but-not-over-yield.stderr b/tests/ui/coroutine/ref-escapes-but-not-over-yield.stderr
index 4c8694e67..8811faf2f 100644
--- a/tests/ui/coroutine/ref-escapes-but-not-over-yield.stderr
+++ b/tests/ui/coroutine/ref-escapes-but-not-over-yield.stderr
@@ -10,6 +10,6 @@ LL | a = &b;
| | borrow is only valid in the coroutine body
| reference to `b` escapes the coroutine body here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0521`.
diff --git a/tests/ui/coroutine/resume-arg-late-bound.stderr b/tests/ui/coroutine/resume-arg-late-bound.stderr
index f1a8a8ed7..a97cc6190 100644
--- a/tests/ui/coroutine/resume-arg-late-bound.stderr
+++ b/tests/ui/coroutine/resume-arg-late-bound.stderr
@@ -12,6 +12,6 @@ note: the lifetime requirement is introduced here
LL | fn test(a: impl for<'a> Coroutine<&'a mut bool>) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/coroutine/retain-resume-ref.stderr b/tests/ui/coroutine/retain-resume-ref.stderr
index e33310d12..eb8b78df6 100644
--- a/tests/ui/coroutine/retain-resume-ref.stderr
+++ b/tests/ui/coroutine/retain-resume-ref.stderr
@@ -8,6 +8,6 @@ LL | gen.as_mut().resume(&mut thing);
| |
| first borrow later used by call
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/coroutine/return-types-diverge.rs b/tests/ui/coroutine/return-types-diverge.rs
new file mode 100644
index 000000000..5f21c8cbf
--- /dev/null
+++ b/tests/ui/coroutine/return-types-diverge.rs
@@ -0,0 +1,20 @@
+// compile-flags: --edition 2024 -Zunstable-options
+// check-pass
+
+#![feature(gen_blocks)]
+
+fn diverge() -> ! { loop {} }
+
+async gen fn async_gen_fn() -> i32 { diverge() }
+
+gen fn gen_fn() -> i32 { diverge() }
+
+fn async_gen_block() {
+ async gen { yield (); diverge() };
+}
+
+fn gen_block() {
+ gen { yield (); diverge() };
+}
+
+fn main() {}
diff --git a/tests/ui/coroutine/return-types.rs b/tests/ui/coroutine/return-types.rs
new file mode 100644
index 000000000..3543d6293
--- /dev/null
+++ b/tests/ui/coroutine/return-types.rs
@@ -0,0 +1,21 @@
+// compile-flags: --edition 2024 -Zunstable-options
+
+#![feature(gen_blocks)]
+
+async gen fn async_gen_fn() -> i32 { 0 }
+//~^ ERROR mismatched types
+
+gen fn gen_fn() -> i32 { 0 }
+//~^ ERROR mismatched types
+
+fn async_gen_block() {
+ async gen { yield (); 1 };
+ //~^ ERROR mismatched types
+}
+
+fn gen_block() {
+ gen { yield (); 1 };
+ //~^ ERROR mismatched types
+}
+
+fn main() {}
diff --git a/tests/ui/coroutine/return-types.stderr b/tests/ui/coroutine/return-types.stderr
new file mode 100644
index 000000000..7be96e538
--- /dev/null
+++ b/tests/ui/coroutine/return-types.stderr
@@ -0,0 +1,31 @@
+error[E0308]: mismatched types
+ --> $DIR/return-types.rs:5:38
+ |
+LL | async gen fn async_gen_fn() -> i32 { 0 }
+ | --- ^ expected `()`, found integer
+ | |
+ | expected `()` because of return type
+
+error[E0308]: mismatched types
+ --> $DIR/return-types.rs:8:26
+ |
+LL | gen fn gen_fn() -> i32 { 0 }
+ | --- ^ expected `()`, found integer
+ | |
+ | expected `()` because of return type
+
+error[E0308]: mismatched types
+ --> $DIR/return-types.rs:12:27
+ |
+LL | async gen { yield (); 1 };
+ | ^ expected `()`, found integer
+
+error[E0308]: mismatched types
+ --> $DIR/return-types.rs:17:21
+ |
+LL | gen { yield (); 1 };
+ | ^ expected `()`, found integer
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/coroutine/self_referential_gen_block.stderr b/tests/ui/coroutine/self_referential_gen_block.stderr
index 586f53df8..e23d653d0 100644
--- a/tests/ui/coroutine/self_referential_gen_block.stderr
+++ b/tests/ui/coroutine/self_referential_gen_block.stderr
@@ -6,6 +6,6 @@ LL | let z = &y;
LL | yield 43;
| -------- possible yield occurs here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0626`.
diff --git a/tests/ui/coroutine/size-moved-locals.rs b/tests/ui/coroutine/size-moved-locals.rs
index cfbbb9c1b..10f988cc0 100644
--- a/tests/ui/coroutine/size-moved-locals.rs
+++ b/tests/ui/coroutine/size-moved-locals.rs
@@ -11,7 +11,6 @@
// edition:2018
// ignore-wasm32 issue #62807
-// ignore-asmjs issue #62807
// needs-unwind Size of Closures change on panic=abort
#![feature(coroutines, coroutine_trait)]
diff --git a/tests/ui/coroutine/smoke-resume-args.rs b/tests/ui/coroutine/smoke-resume-args.rs
index a80198985..752b21ba0 100644
--- a/tests/ui/coroutine/smoke-resume-args.rs
+++ b/tests/ui/coroutine/smoke-resume-args.rs
@@ -6,7 +6,6 @@
#![feature(coroutines, coroutine_trait)]
use std::fmt::Debug;
-use std::marker::Unpin;
use std::ops::{
Coroutine,
CoroutineState::{self, *},
diff --git a/tests/ui/coroutine/static-not-unpin.current.stderr b/tests/ui/coroutine/static-not-unpin.current.stderr
index cd607904f..8ef542984 100644
--- a/tests/ui/coroutine/static-not-unpin.current.stderr
+++ b/tests/ui/coroutine/static-not-unpin.current.stderr
@@ -14,6 +14,6 @@ note: required by a bound in `assert_unpin`
LL | fn assert_unpin<T: Unpin>(_: T) {
| ^^^^^ required by this bound in `assert_unpin`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/coroutine/static-not-unpin.next.stderr b/tests/ui/coroutine/static-not-unpin.next.stderr
index cd607904f..8ef542984 100644
--- a/tests/ui/coroutine/static-not-unpin.next.stderr
+++ b/tests/ui/coroutine/static-not-unpin.next.stderr
@@ -14,6 +14,6 @@ note: required by a bound in `assert_unpin`
LL | fn assert_unpin<T: Unpin>(_: T) {
| ^^^^^ required by this bound in `assert_unpin`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/coroutine/static-not-unpin.rs b/tests/ui/coroutine/static-not-unpin.rs
index 6ce78046d..f27183d11 100644
--- a/tests/ui/coroutine/static-not-unpin.rs
+++ b/tests/ui/coroutine/static-not-unpin.rs
@@ -1,5 +1,5 @@
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
#![feature(coroutines)]
diff --git a/tests/ui/coroutine/too-many-parameters.stderr b/tests/ui/coroutine/too-many-parameters.stderr
index 54cf42e78..c0917c722 100644
--- a/tests/ui/coroutine/too-many-parameters.stderr
+++ b/tests/ui/coroutine/too-many-parameters.stderr
@@ -4,6 +4,6 @@ error[E0628]: too many parameters for a coroutine (expected 0 or 1 parameters)
LL | |(), ()| {
| ^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0628`.
diff --git a/tests/ui/coroutine/type-mismatch-error.stderr b/tests/ui/coroutine/type-mismatch-error.stderr
index 8f5949533..737d9afdd 100644
--- a/tests/ui/coroutine/type-mismatch-error.stderr
+++ b/tests/ui/coroutine/type-mismatch-error.stderr
@@ -14,6 +14,6 @@ LL | |
LL | | }
| |_____________- `if` and `else` have incompatible types
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/coroutine/uninhabited-field.rs b/tests/ui/coroutine/uninhabited-field.rs
new file mode 100644
index 000000000..d9570c2fe
--- /dev/null
+++ b/tests/ui/coroutine/uninhabited-field.rs
@@ -0,0 +1,37 @@
+// Test that uninhabited saved local doesn't make the entire variant uninhabited.
+// run-pass
+#![allow(unused)]
+#![feature(assert_matches)]
+#![feature(coroutine_trait)]
+#![feature(coroutines)]
+#![feature(never_type)]
+use std::assert_matches::assert_matches;
+use std::ops::Coroutine;
+use std::ops::CoroutineState;
+use std::pin::Pin;
+
+fn conjure<T>() -> T { loop {} }
+
+fn run<T>(x: bool, y: bool) {
+ let mut c = || {
+ if x {
+ let a : T;
+ if y {
+ a = conjure::<T>();
+ }
+ yield ();
+ } else {
+ let a : T;
+ if y {
+ a = conjure::<T>();
+ }
+ yield ();
+ }
+ };
+ assert_matches!(Pin::new(&mut c).resume(()), CoroutineState::Yielded(()));
+ assert_matches!(Pin::new(&mut c).resume(()), CoroutineState::Complete(()));
+}
+
+fn main() {
+ run::<!>(false, false);
+}
diff --git a/tests/ui/coroutine/unresolved-ct-var.stderr b/tests/ui/coroutine/unresolved-ct-var.stderr
index 9badc1dc2..da2ec272f 100644
--- a/tests/ui/coroutine/unresolved-ct-var.stderr
+++ b/tests/ui/coroutine/unresolved-ct-var.stderr
@@ -12,6 +12,6 @@ LL | let s = std::array::from_fn(|_| ()).await;
= note: [(); _] must be a future or must implement `IntoFuture` to be awaited
= note: required for `[(); _]` to implement `IntoFuture`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/coroutine/unsized-capture-across-yield.stderr b/tests/ui/coroutine/unsized-capture-across-yield.stderr
index 8a5b968a5..436f0901a 100644
--- a/tests/ui/coroutine/unsized-capture-across-yield.stderr
+++ b/tests/ui/coroutine/unsized-capture-across-yield.stderr
@@ -18,6 +18,6 @@ LL | println!("{:?}", &b);
= help: the trait `Sized` is not implemented for `[u8]`
= note: all values captured by value by a closure must have a statically known size
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/coroutine/unsized-local-across-yield.stderr b/tests/ui/coroutine/unsized-local-across-yield.stderr
index 1942f266e..c4c3be77a 100644
--- a/tests/ui/coroutine/unsized-local-across-yield.stderr
+++ b/tests/ui/coroutine/unsized-local-across-yield.stderr
@@ -16,6 +16,6 @@ LL | let b: [u8] = *(Box::new([]) as Box<[u8]>);
= help: the trait `Sized` is not implemented for `[u8]`
= note: all values live across `yield` must have a statically known size
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/coroutine/yield-in-args.stderr b/tests/ui/coroutine/yield-in-args.stderr
index 4ff97281d..7233f4788 100644
--- a/tests/ui/coroutine/yield-in-args.stderr
+++ b/tests/ui/coroutine/yield-in-args.stderr
@@ -4,6 +4,6 @@ error[E0626]: borrow may still be in use when coroutine yields
LL | foo(&b, yield);
| ^^ ----- possible yield occurs here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0626`.
diff --git a/tests/ui/coroutine/yield-in-const.stderr b/tests/ui/coroutine/yield-in-const.stderr
index 7afcd8340..d5748b053 100644
--- a/tests/ui/coroutine/yield-in-const.stderr
+++ b/tests/ui/coroutine/yield-in-const.stderr
@@ -4,6 +4,6 @@ error[E0627]: yield expression outside of coroutine literal
LL | const A: u8 = { yield 3u8; 3u8};
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0627`.
diff --git a/tests/ui/coroutine/yield-in-function.stderr b/tests/ui/coroutine/yield-in-function.stderr
index b2f839a65..b9d4708bb 100644
--- a/tests/ui/coroutine/yield-in-function.stderr
+++ b/tests/ui/coroutine/yield-in-function.stderr
@@ -4,6 +4,6 @@ error[E0627]: yield expression outside of coroutine literal
LL | fn main() { yield; }
| ^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0627`.
diff --git a/tests/ui/coroutine/yield-in-static.stderr b/tests/ui/coroutine/yield-in-static.stderr
index 17d58325e..b56283cab 100644
--- a/tests/ui/coroutine/yield-in-static.stderr
+++ b/tests/ui/coroutine/yield-in-static.stderr
@@ -4,6 +4,6 @@ error[E0627]: yield expression outside of coroutine literal
LL | static B: u8 = { yield 3u8; 3u8};
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0627`.
diff --git a/tests/ui/coroutine/yield-while-ref-reborrowed.stderr b/tests/ui/coroutine/yield-while-ref-reborrowed.stderr
index e60a95316..62ac02653 100644
--- a/tests/ui/coroutine/yield-while-ref-reborrowed.stderr
+++ b/tests/ui/coroutine/yield-while-ref-reborrowed.stderr
@@ -13,6 +13,6 @@ LL | Pin::new(&mut b).resume(());
|
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0501`.
diff --git a/tests/ui/crate-loading/crateresolve1.stderr b/tests/ui/crate-loading/crateresolve1.stderr
index 7b840b526..47131a96b 100644
--- a/tests/ui/crate-loading/crateresolve1.stderr
+++ b/tests/ui/crate-loading/crateresolve1.stderr
@@ -8,6 +8,6 @@ LL | extern crate crateresolve1;
= note: candidate #2: $TEST_BUILD_DIR/crate-loading/crateresolve1/auxiliary/libcrateresolve1-2.somelib
= note: candidate #3: $TEST_BUILD_DIR/crate-loading/crateresolve1/auxiliary/libcrateresolve1-3.somelib
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0464`.
diff --git a/tests/ui/crate-loading/crateresolve2.stderr b/tests/ui/crate-loading/crateresolve2.stderr
index a36f4f022..3dc89dabd 100644
--- a/tests/ui/crate-loading/crateresolve2.stderr
+++ b/tests/ui/crate-loading/crateresolve2.stderr
@@ -8,6 +8,6 @@ LL | extern crate crateresolve2;
= note: candidate #2: $TEST_BUILD_DIR/crate-loading/crateresolve2/auxiliary/libcrateresolve2-2.rmeta
= note: candidate #3: $TEST_BUILD_DIR/crate-loading/crateresolve2/auxiliary/libcrateresolve2-3.rmeta
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0464`.
diff --git a/tests/ui/crate-name-mismatch.stderr b/tests/ui/crate-name-mismatch.stderr
index 96618570d..511562618 100644
--- a/tests/ui/crate-name-mismatch.stderr
+++ b/tests/ui/crate-name-mismatch.stderr
@@ -4,5 +4,5 @@ error: `--crate-name` and `#[crate_name]` are required to match, but `foo` != `b
LL | #![crate_name = "bar"]
| ^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/cross/cross-borrow-trait.stderr b/tests/ui/cross/cross-borrow-trait.stderr
index 4f5af1066..b670de39f 100644
--- a/tests/ui/cross/cross-borrow-trait.stderr
+++ b/tests/ui/cross/cross-borrow-trait.stderr
@@ -9,6 +9,6 @@ LL | let _y: &dyn Trait = x;
= note: expected reference `&dyn Trait`
found struct `Box<dyn Trait>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/cross/cross-crate-macro-backtrace/main.stderr b/tests/ui/cross/cross-crate-macro-backtrace/main.stderr
index 5bd4ea97e..d6f20b1f8 100644
--- a/tests/ui/cross/cross-crate-macro-backtrace/main.stderr
+++ b/tests/ui/cross/cross-crate-macro-backtrace/main.stderr
@@ -6,5 +6,5 @@ LL | myprintln!("{}");
|
= note: this error originates in the macro `concat` which comes from the expansion of the macro `myprintln` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/cross/cross-file-errors/main.stderr b/tests/ui/cross/cross-file-errors/main.stderr
index 56eb6ad42..c7dea801a 100644
--- a/tests/ui/cross/cross-file-errors/main.stderr
+++ b/tests/ui/cross/cross-file-errors/main.stderr
@@ -11,5 +11,5 @@ LL | underscore!();
|
= note: this error originates in the macro `underscore` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/cross/cross-fn-cache-hole.stderr b/tests/ui/cross/cross-fn-cache-hole.stderr
index 79d171393..ae944387f 100644
--- a/tests/ui/cross/cross-fn-cache-hole.stderr
+++ b/tests/ui/cross/cross-fn-cache-hole.stderr
@@ -12,6 +12,6 @@ LL | trait Bar<X> { }
= help: see issue #48214
= help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/custom-attribute-multisegment.stderr b/tests/ui/custom-attribute-multisegment.stderr
index 57eca211e..90ebe2779 100644
--- a/tests/ui/custom-attribute-multisegment.stderr
+++ b/tests/ui/custom-attribute-multisegment.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: could not find `nonexistent` in `existent`
LL | #[existent::nonexistent]
| ^^^^^^^^^^^ could not find `nonexistent` in `existent`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/custom_test_frameworks/mismatch.stderr b/tests/ui/custom_test_frameworks/mismatch.stderr
index 31b18b2df..dad93cfbb 100644
--- a/tests/ui/custom_test_frameworks/mismatch.stderr
+++ b/tests/ui/custom_test_frameworks/mismatch.stderr
@@ -9,6 +9,6 @@ LL | fn wrong_kind(){}
= note: required for the cast from `&TestDescAndFn` to `&dyn Testable`
= note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr b/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr
index 3b66704d6..e8be9b0b9 100644
--- a/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr
+++ b/tests/ui/cycle-trait/cycle-trait-default-type-trait.stderr
@@ -16,6 +16,6 @@ LL | | fn main() { }
| |_____________^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr b/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr
index 03cb5015a..8645b4ebc 100644
--- a/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr
+++ b/tests/ui/cycle-trait/cycle-trait-supertrait-direct.stderr
@@ -14,6 +14,6 @@ LL | | }
| |_^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr b/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr
index c7cc31435..f2d8f07b0 100644
--- a/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr
+++ b/tests/ui/cycle-trait/cycle-trait-supertrait-indirect.stderr
@@ -17,6 +17,6 @@ LL | trait A: B {
| ^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/cycle-trait/issue-12511.stderr b/tests/ui/cycle-trait/issue-12511.stderr
index f5e4f8347..bc56b9904 100644
--- a/tests/ui/cycle-trait/issue-12511.stderr
+++ b/tests/ui/cycle-trait/issue-12511.stderr
@@ -19,6 +19,6 @@ LL | | }
| |_^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-1.stderr b/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-1.stderr
index d5991bcf5..06aad9616 100644
--- a/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-1.stderr
+++ b/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-1.stderr
@@ -1,4 +1,4 @@
error: values of the type `[u8; usize::MAX]` are too big for the current architecture
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.stderr b/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.stderr
index d5991bcf5..06aad9616 100644
--- a/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.stderr
+++ b/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.stderr
@@ -1,4 +1,4 @@
error: values of the type `[u8; usize::MAX]` are too big for the current architecture
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/dep-graph/dep-graph-assoc-type-codegen.stderr b/tests/ui/dep-graph/dep-graph-assoc-type-codegen.stderr
index cdc268cff..f26b43aa3 100644
--- a/tests/ui/dep-graph/dep-graph-assoc-type-codegen.stderr
+++ b/tests/ui/dep-graph/dep-graph-assoc-type-codegen.stderr
@@ -4,5 +4,5 @@ error: OK
LL | #[rustc_then_this_would_need(typeck)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/dep-graph/dep-graph-trait-impl-two-traits.rs b/tests/ui/dep-graph/dep-graph-trait-impl-two-traits.rs
index 590475fa0..0331e75b2 100644
--- a/tests/ui/dep-graph/dep-graph-trait-impl-two-traits.rs
+++ b/tests/ui/dep-graph/dep-graph-trait-impl-two-traits.rs
@@ -29,7 +29,7 @@ mod x {
mod y {
use {Foo, Bar};
- #[rustc_then_this_would_need(typeck)] //~ ERROR OK
+ #[rustc_then_this_would_need(typeck)] //~ ERROR no path
pub fn call_bar() {
char::bar('a');
}
diff --git a/tests/ui/dep-graph/dep-graph-trait-impl-two-traits.stderr b/tests/ui/dep-graph/dep-graph-trait-impl-two-traits.stderr
index 4e1043736..08f382cc0 100644
--- a/tests/ui/dep-graph/dep-graph-trait-impl-two-traits.stderr
+++ b/tests/ui/dep-graph/dep-graph-trait-impl-two-traits.stderr
@@ -1,4 +1,4 @@
-error: OK
+error: no path from `x::<impl Foo for char>` to `typeck`
--> $DIR/dep-graph-trait-impl-two-traits.rs:32:5
|
LL | #[rustc_then_this_would_need(typeck)]
diff --git a/tests/ui/dep-graph/dep-graph-variance-alias.stderr b/tests/ui/dep-graph/dep-graph-variance-alias.stderr
index 554ff455a..e11de2452 100644
--- a/tests/ui/dep-graph/dep-graph-variance-alias.stderr
+++ b/tests/ui/dep-graph/dep-graph-variance-alias.stderr
@@ -4,5 +4,5 @@ error: OK
LL | #[rustc_then_this_would_need(variances_of)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/deprecation/deprecated_no_stack_check.stderr b/tests/ui/deprecation/deprecated_no_stack_check.stderr
index 141664c10..d78ca20f1 100644
--- a/tests/ui/deprecation/deprecated_no_stack_check.stderr
+++ b/tests/ui/deprecation/deprecated_no_stack_check.stderr
@@ -4,6 +4,6 @@ error[E0557]: feature has been removed
LL | #![feature(no_stack_check)]
| ^^^^^^^^^^^^^^ feature has been removed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0557`.
diff --git a/tests/ui/deprecation/deprecation-lint-2.stderr b/tests/ui/deprecation/deprecation-lint-2.stderr
index a73e56052..7d411c004 100644
--- a/tests/ui/deprecation/deprecation-lint-2.stderr
+++ b/tests/ui/deprecation/deprecation-lint-2.stderr
@@ -11,5 +11,5 @@ LL | #![deny(deprecated)]
| ^^^^^^^^^^
= note: this error originates in the macro `macro_test` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/deprecation/deprecation-lint-3.stderr b/tests/ui/deprecation/deprecation-lint-3.stderr
index f499ff85e..1723b7bbd 100644
--- a/tests/ui/deprecation/deprecation-lint-3.stderr
+++ b/tests/ui/deprecation/deprecation-lint-3.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(deprecated)]
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/deprecation/feature-gate-deprecated_suggestion.stderr b/tests/ui/deprecation/feature-gate-deprecated_suggestion.stderr
index 438ce3349..81cc608b5 100644
--- a/tests/ui/deprecation/feature-gate-deprecated_suggestion.stderr
+++ b/tests/ui/deprecation/feature-gate-deprecated_suggestion.stderr
@@ -7,5 +7,5 @@ LL | #[deprecated(suggestion = "foo")]
= help: add `#![feature(deprecated_suggestion)]` to the crate root
= note: see #94785 for more details
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/deprecation/invalid-literal.stderr b/tests/ui/deprecation/invalid-literal.stderr
index b56eedeb8..ca827beda 100644
--- a/tests/ui/deprecation/invalid-literal.stderr
+++ b/tests/ui/deprecation/invalid-literal.stderr
@@ -13,5 +13,5 @@ LL | #[deprecated(/*opt*/ since = "version", /*opt*/ note = "reason")]
LL | #[deprecated]
| ~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/deprecation/issue-66340-deprecated-attr-non-meta-grammar.stderr b/tests/ui/deprecation/issue-66340-deprecated-attr-non-meta-grammar.stderr
index 24178faf8..48c763c50 100644
--- a/tests/ui/deprecation/issue-66340-deprecated-attr-non-meta-grammar.stderr
+++ b/tests/ui/deprecation/issue-66340-deprecated-attr-non-meta-grammar.stderr
@@ -4,5 +4,5 @@ error: expected unsuffixed literal or identifier, found `test`
LL | #[deprecated(note = test)]
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/deref-non-pointer.stderr b/tests/ui/deref-non-pointer.stderr
index 1297e496b..2e5e574fb 100644
--- a/tests/ui/deref-non-pointer.stderr
+++ b/tests/ui/deref-non-pointer.stderr
@@ -4,6 +4,6 @@ error[E0614]: type `{integer}` cannot be dereferenced
LL | match *1 {
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0614`.
diff --git a/tests/ui/deref-patterns/gate.stderr b/tests/ui/deref-patterns/gate.stderr
index b5b79ed37..e3cbded33 100644
--- a/tests/ui/deref-patterns/gate.stderr
+++ b/tests/ui/deref-patterns/gate.stderr
@@ -6,6 +6,6 @@ LL | match String::new() {
LL | "" | _ => {}
| ^^ expected `String`, found `&str`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/derived-errors/issue-30580.stderr b/tests/ui/derived-errors/issue-30580.stderr
index 7bd0eaf77..05b555917 100644
--- a/tests/ui/derived-errors/issue-30580.stderr
+++ b/tests/ui/derived-errors/issue-30580.stderr
@@ -2,8 +2,13 @@ error[E0609]: no field `c` on type `&Foo`
--> $DIR/issue-30580.rs:12:11
|
LL | b.c;
- | ^ help: a field with a similar name exists: `a`
+ | ^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | b.a;
+ | ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0609`.
diff --git a/tests/ui/derived-errors/issue-31997-1.stderr b/tests/ui/derived-errors/issue-31997-1.stderr
index a0262f4c1..40485027a 100644
--- a/tests/ui/derived-errors/issue-31997-1.stderr
+++ b/tests/ui/derived-errors/issue-31997-1.stderr
@@ -9,6 +9,6 @@ help: consider importing this struct
LL + use std::collections::HashMap;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/derived-errors/issue-31997.stderr b/tests/ui/derived-errors/issue-31997.stderr
index b53c0cda8..7d6415fef 100644
--- a/tests/ui/derived-errors/issue-31997.stderr
+++ b/tests/ui/derived-errors/issue-31997.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find function `bar` in this scope
LL | try!(closure(|| bar(core::ptr::null_mut())));
| ^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/derives/clone-debug-dead-code-in-the-same-struct.stderr b/tests/ui/derives/clone-debug-dead-code-in-the-same-struct.stderr
index 7f4f78ceb..e9b757b6b 100644
--- a/tests/ui/derives/clone-debug-dead-code-in-the-same-struct.stderr
+++ b/tests/ui/derives/clone-debug-dead-code-in-the-same-struct.stderr
@@ -20,5 +20,5 @@ note: the lint level is defined here
LL | #![forbid(dead_code)]
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/derives/derive-assoc-type-not-impl.stderr b/tests/ui/derives/derive-assoc-type-not-impl.stderr
index 9f17c76c2..6cbcb455f 100644
--- a/tests/ui/derives/derive-assoc-type-not-impl.stderr
+++ b/tests/ui/derives/derive-assoc-type-not-impl.stderr
@@ -27,6 +27,6 @@ LL + #[derive(Clone)]
LL | struct NotClone;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/derives/derive-deadlock.stderr b/tests/ui/derives/derive-deadlock.stderr
index 8d062491c..116245aa3 100644
--- a/tests/ui/derives/derive-deadlock.stderr
+++ b/tests/ui/derives/derive-deadlock.stderr
@@ -6,5 +6,5 @@ LL | #[derive(Default)]
|
= note: import resolution is stuck, try simplifying macro imports
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/derives/derives-span-Clone-enum-struct-variant.stderr b/tests/ui/derives/derives-span-Clone-enum-struct-variant.stderr
index 31ab589cf..2c8d94316 100644
--- a/tests/ui/derives/derives-span-Clone-enum-struct-variant.stderr
+++ b/tests/ui/derives/derives-span-Clone-enum-struct-variant.stderr
@@ -14,6 +14,6 @@ LL + #[derive(Clone)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-Clone-enum.stderr b/tests/ui/derives/derives-span-Clone-enum.stderr
index b5580c02f..b683a8b89 100644
--- a/tests/ui/derives/derives-span-Clone-enum.stderr
+++ b/tests/ui/derives/derives-span-Clone-enum.stderr
@@ -14,6 +14,6 @@ LL + #[derive(Clone)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-Clone-struct.stderr b/tests/ui/derives/derives-span-Clone-struct.stderr
index fbe7e3f84..305a92752 100644
--- a/tests/ui/derives/derives-span-Clone-struct.stderr
+++ b/tests/ui/derives/derives-span-Clone-struct.stderr
@@ -14,6 +14,6 @@ LL + #[derive(Clone)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-Clone-tuple-struct.stderr b/tests/ui/derives/derives-span-Clone-tuple-struct.stderr
index 639f4d542..b636404ad 100644
--- a/tests/ui/derives/derives-span-Clone-tuple-struct.stderr
+++ b/tests/ui/derives/derives-span-Clone-tuple-struct.stderr
@@ -14,6 +14,6 @@ LL + #[derive(Clone)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-Debug-enum-struct-variant.stderr b/tests/ui/derives/derives-span-Debug-enum-struct-variant.stderr
index 7ff6851f6..3f6c39bf9 100644
--- a/tests/ui/derives/derives-span-Debug-enum-struct-variant.stderr
+++ b/tests/ui/derives/derives-span-Debug-enum-struct-variant.stderr
@@ -16,6 +16,6 @@ LL + #[derive(Debug)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-Debug-enum.stderr b/tests/ui/derives/derives-span-Debug-enum.stderr
index 346cbec90..eaeffaeb8 100644
--- a/tests/ui/derives/derives-span-Debug-enum.stderr
+++ b/tests/ui/derives/derives-span-Debug-enum.stderr
@@ -16,6 +16,6 @@ LL + #[derive(Debug)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-Debug-struct.stderr b/tests/ui/derives/derives-span-Debug-struct.stderr
index 4b39eeb09..4a725e260 100644
--- a/tests/ui/derives/derives-span-Debug-struct.stderr
+++ b/tests/ui/derives/derives-span-Debug-struct.stderr
@@ -16,6 +16,6 @@ LL + #[derive(Debug)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-Debug-tuple-struct.stderr b/tests/ui/derives/derives-span-Debug-tuple-struct.stderr
index f3043abca..2f816e1c8 100644
--- a/tests/ui/derives/derives-span-Debug-tuple-struct.stderr
+++ b/tests/ui/derives/derives-span-Debug-tuple-struct.stderr
@@ -16,6 +16,6 @@ LL + #[derive(Debug)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-Default-struct.stderr b/tests/ui/derives/derives-span-Default-struct.stderr
index 4844b6359..359b61528 100644
--- a/tests/ui/derives/derives-span-Default-struct.stderr
+++ b/tests/ui/derives/derives-span-Default-struct.stderr
@@ -14,6 +14,6 @@ LL + #[derive(Default)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-Default-tuple-struct.stderr b/tests/ui/derives/derives-span-Default-tuple-struct.stderr
index 9cac7f107..1ddb4ec3f 100644
--- a/tests/ui/derives/derives-span-Default-tuple-struct.stderr
+++ b/tests/ui/derives/derives-span-Default-tuple-struct.stderr
@@ -14,6 +14,6 @@ LL + #[derive(Default)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-Eq-enum-struct-variant.stderr b/tests/ui/derives/derives-span-Eq-enum-struct-variant.stderr
index 1a9ff9832..c9edc89e1 100644
--- a/tests/ui/derives/derives-span-Eq-enum-struct-variant.stderr
+++ b/tests/ui/derives/derives-span-Eq-enum-struct-variant.stderr
@@ -16,6 +16,6 @@ LL + #[derive(Eq)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-Eq-enum.stderr b/tests/ui/derives/derives-span-Eq-enum.stderr
index 8205657bb..7db13e971 100644
--- a/tests/ui/derives/derives-span-Eq-enum.stderr
+++ b/tests/ui/derives/derives-span-Eq-enum.stderr
@@ -16,6 +16,6 @@ LL + #[derive(Eq)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-Eq-struct.stderr b/tests/ui/derives/derives-span-Eq-struct.stderr
index af510181d..36eeb89bd 100644
--- a/tests/ui/derives/derives-span-Eq-struct.stderr
+++ b/tests/ui/derives/derives-span-Eq-struct.stderr
@@ -16,6 +16,6 @@ LL + #[derive(Eq)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-Eq-tuple-struct.stderr b/tests/ui/derives/derives-span-Eq-tuple-struct.stderr
index f7c371d7d..126d10535 100644
--- a/tests/ui/derives/derives-span-Eq-tuple-struct.stderr
+++ b/tests/ui/derives/derives-span-Eq-tuple-struct.stderr
@@ -16,6 +16,6 @@ LL + #[derive(Eq)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-Hash-enum-struct-variant.stderr b/tests/ui/derives/derives-span-Hash-enum-struct-variant.stderr
index 311edade0..ae973228c 100644
--- a/tests/ui/derives/derives-span-Hash-enum-struct-variant.stderr
+++ b/tests/ui/derives/derives-span-Hash-enum-struct-variant.stderr
@@ -14,6 +14,6 @@ LL + #[derive(Hash)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-Hash-enum.stderr b/tests/ui/derives/derives-span-Hash-enum.stderr
index 043aa954b..85e26c84f 100644
--- a/tests/ui/derives/derives-span-Hash-enum.stderr
+++ b/tests/ui/derives/derives-span-Hash-enum.stderr
@@ -14,6 +14,6 @@ LL + #[derive(Hash)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-Hash-struct.stderr b/tests/ui/derives/derives-span-Hash-struct.stderr
index 26d31b661..f9a654b2d 100644
--- a/tests/ui/derives/derives-span-Hash-struct.stderr
+++ b/tests/ui/derives/derives-span-Hash-struct.stderr
@@ -14,6 +14,6 @@ LL + #[derive(Hash)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-Hash-tuple-struct.stderr b/tests/ui/derives/derives-span-Hash-tuple-struct.stderr
index 3155a023c..0a5fbe286 100644
--- a/tests/ui/derives/derives-span-Hash-tuple-struct.stderr
+++ b/tests/ui/derives/derives-span-Hash-tuple-struct.stderr
@@ -14,6 +14,6 @@ LL + #[derive(Hash)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-Ord-enum-struct-variant.stderr b/tests/ui/derives/derives-span-Ord-enum-struct-variant.stderr
index 1a06aee52..96ef59ca9 100644
--- a/tests/ui/derives/derives-span-Ord-enum-struct-variant.stderr
+++ b/tests/ui/derives/derives-span-Ord-enum-struct-variant.stderr
@@ -14,6 +14,6 @@ LL + #[derive(Ord)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-Ord-enum.stderr b/tests/ui/derives/derives-span-Ord-enum.stderr
index 377728e8a..7c75ecb64 100644
--- a/tests/ui/derives/derives-span-Ord-enum.stderr
+++ b/tests/ui/derives/derives-span-Ord-enum.stderr
@@ -14,6 +14,6 @@ LL + #[derive(Ord)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-Ord-struct.stderr b/tests/ui/derives/derives-span-Ord-struct.stderr
index e00e990da..429e7e06f 100644
--- a/tests/ui/derives/derives-span-Ord-struct.stderr
+++ b/tests/ui/derives/derives-span-Ord-struct.stderr
@@ -14,6 +14,6 @@ LL + #[derive(Ord)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-Ord-tuple-struct.stderr b/tests/ui/derives/derives-span-Ord-tuple-struct.stderr
index 959d0b964..a46133834 100644
--- a/tests/ui/derives/derives-span-Ord-tuple-struct.stderr
+++ b/tests/ui/derives/derives-span-Ord-tuple-struct.stderr
@@ -14,6 +14,6 @@ LL + #[derive(Ord)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr b/tests/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr
index e3b17431f..d0b14ef94 100644
--- a/tests/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr
+++ b/tests/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr
@@ -19,6 +19,6 @@ LL + #[derive(PartialEq)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/derives/derives-span-PartialEq-enum.stderr b/tests/ui/derives/derives-span-PartialEq-enum.stderr
index d1631732a..f69451ac7 100644
--- a/tests/ui/derives/derives-span-PartialEq-enum.stderr
+++ b/tests/ui/derives/derives-span-PartialEq-enum.stderr
@@ -19,6 +19,6 @@ LL + #[derive(PartialEq)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/derives/derives-span-PartialEq-struct.stderr b/tests/ui/derives/derives-span-PartialEq-struct.stderr
index ab6c6951f..d7fc3da46 100644
--- a/tests/ui/derives/derives-span-PartialEq-struct.stderr
+++ b/tests/ui/derives/derives-span-PartialEq-struct.stderr
@@ -19,6 +19,6 @@ LL + #[derive(PartialEq)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/derives/derives-span-PartialEq-tuple-struct.stderr b/tests/ui/derives/derives-span-PartialEq-tuple-struct.stderr
index 865ecad0e..ea3920f40 100644
--- a/tests/ui/derives/derives-span-PartialEq-tuple-struct.stderr
+++ b/tests/ui/derives/derives-span-PartialEq-tuple-struct.stderr
@@ -19,6 +19,6 @@ LL + #[derive(PartialEq)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/derives/derives-span-PartialOrd-enum-struct-variant.stderr b/tests/ui/derives/derives-span-PartialOrd-enum-struct-variant.stderr
index 746c1d5d2..3f83eb56a 100644
--- a/tests/ui/derives/derives-span-PartialOrd-enum-struct-variant.stderr
+++ b/tests/ui/derives/derives-span-PartialOrd-enum-struct-variant.stderr
@@ -15,6 +15,6 @@ LL + #[derive(PartialOrd)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-PartialOrd-enum.stderr b/tests/ui/derives/derives-span-PartialOrd-enum.stderr
index 8af1776da..cf5915173 100644
--- a/tests/ui/derives/derives-span-PartialOrd-enum.stderr
+++ b/tests/ui/derives/derives-span-PartialOrd-enum.stderr
@@ -15,6 +15,6 @@ LL + #[derive(PartialOrd)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-PartialOrd-struct.stderr b/tests/ui/derives/derives-span-PartialOrd-struct.stderr
index 11ea7f9dc..de21a903b 100644
--- a/tests/ui/derives/derives-span-PartialOrd-struct.stderr
+++ b/tests/ui/derives/derives-span-PartialOrd-struct.stderr
@@ -15,6 +15,6 @@ LL + #[derive(PartialOrd)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/derives-span-PartialOrd-tuple-struct.stderr b/tests/ui/derives/derives-span-PartialOrd-tuple-struct.stderr
index 0a41a3db3..3050aeecc 100644
--- a/tests/ui/derives/derives-span-PartialOrd-tuple-struct.stderr
+++ b/tests/ui/derives/derives-span-PartialOrd-tuple-struct.stderr
@@ -15,6 +15,6 @@ LL + #[derive(PartialOrd)]
LL | struct Error;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/derives/deriving-with-repr-packed-2.stderr b/tests/ui/derives/deriving-with-repr-packed-2.stderr
index afeca9fec..0eaca7e23 100644
--- a/tests/ui/derives/deriving-with-repr-packed-2.stderr
+++ b/tests/ui/derives/deriving-with-repr-packed-2.stderr
@@ -29,6 +29,6 @@ LL + #[derive(Clone, Copy)]
LL | struct NonCopy;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/derives/deriving-with-repr-packed.stderr b/tests/ui/derives/deriving-with-repr-packed.stderr
index bb1fab343..151be6901 100644
--- a/tests/ui/derives/deriving-with-repr-packed.stderr
+++ b/tests/ui/derives/deriving-with-repr-packed.stderr
@@ -39,7 +39,7 @@ LL | struct X(Y);
= note: `#[derive(Debug)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error; 2 warnings emitted
+error: aborting due to 1 previous error; 2 warnings emitted
For more information about this error, try `rustc --explain E0507`.
Future incompatibility report: Future breakage diagnostic:
diff --git a/tests/ui/derives/issue-97343.stderr b/tests/ui/derives/issue-97343.stderr
index e83bbb5b6..efb2fb70f 100644
--- a/tests/ui/derives/issue-97343.stderr
+++ b/tests/ui/derives/issue-97343.stderr
@@ -16,6 +16,6 @@ LL | pub struct Irrelevant<Irrelevant> {
| ^^^^^^^^^^
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0109`.
diff --git a/tests/ui/deriving/issue-103157.stderr b/tests/ui/deriving/issue-103157.stderr
index 01cce2a39..384899ea4 100644
--- a/tests/ui/deriving/issue-103157.stderr
+++ b/tests/ui/deriving/issue-103157.stderr
@@ -22,6 +22,6 @@ note: required by a bound in `AssertParamIsEq`
--> $SRC_DIR/core/src/cmp.rs:LL:COL
= note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/deriving/issue-105101.rs b/tests/ui/deriving/issue-105101.rs
deleted file mode 100644
index 1a377feb9..000000000
--- a/tests/ui/deriving/issue-105101.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// compile-flags: --crate-type=lib
-
-#[derive(Default)] //~ ERROR multiple declared defaults
-enum E {
- #[default]
- A,
- #[default]
- A, //~ ERROR defined multiple times
-}
diff --git a/tests/ui/deriving/issue-105101.stderr b/tests/ui/deriving/issue-105101.stderr
deleted file mode 100644
index 0f6f67043..000000000
--- a/tests/ui/deriving/issue-105101.stderr
+++ /dev/null
@@ -1,29 +0,0 @@
-error: multiple declared defaults
- --> $DIR/issue-105101.rs:3:10
- |
-LL | #[derive(Default)]
- | ^^^^^^^
-...
-LL | A,
- | - first default
-LL | #[default]
-LL | A,
- | - additional default
- |
- = note: only one variant can be default
- = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0428]: the name `A` is defined multiple times
- --> $DIR/issue-105101.rs:8:5
- |
-LL | A,
- | - previous definition of the type `A` here
-LL | #[default]
-LL | A,
- | ^ `A` redefined here
- |
- = note: `A` must be defined only once in the type namespace of this enum
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0428`.
diff --git a/tests/ui/deriving/multiple-defaults.rs b/tests/ui/deriving/multiple-defaults.rs
new file mode 100644
index 000000000..2024a5520
--- /dev/null
+++ b/tests/ui/deriving/multiple-defaults.rs
@@ -0,0 +1,41 @@
+// compile-flags: --crate-type=lib
+
+// When we get multiple `#[default]` variants, we emit several tool-only suggestions
+// to remove all except one of the `#[default]`s.
+
+#[derive(Default)] //~ ERROR multiple declared defaults
+enum A {
+ #[default] //~ HELP make `B` default
+ #[default] //~ HELP make `A` default
+ A,
+ #[default] // also "HELP make `A` default", but compiletest can't handle multispans
+ B,
+}
+
+// Originally, we took each defaulted variant and emitted the suggestion for every variant
+// with a different identifier, causing an ICE when multiple variants have the same identifier:
+// https://github.com/rust-lang/rust/pull/105106
+#[derive(Default)] //~ ERROR multiple declared defaults
+enum E {
+ #[default] //~ HELP make `A` default
+ A,
+ #[default] //~ HELP make `A` default
+ A, //~ ERROR defined multiple times
+}
+
+// Then, we took each defaulted variant and emitted the suggestion for every variant
+// with a different span, causing an ICE when multiple variants have the same span:
+// https://github.com/rust-lang/rust/issues/118119
+macro_rules! m {
+ { $($id:ident)* } => {
+ #[derive(Default)] //~ ERROR multiple declared defaults
+ enum F {
+ $(
+ #[default]
+ $id,
+ )*
+ }
+ }
+}
+
+m! { A B }
diff --git a/tests/ui/deriving/multiple-defaults.stderr b/tests/ui/deriving/multiple-defaults.stderr
new file mode 100644
index 000000000..05fb6fecf
--- /dev/null
+++ b/tests/ui/deriving/multiple-defaults.stderr
@@ -0,0 +1,62 @@
+error: multiple declared defaults
+ --> $DIR/multiple-defaults.rs:6:10
+ |
+LL | #[derive(Default)]
+ | ^^^^^^^
+...
+LL | A,
+ | - first default
+LL | #[default] // also "HELP make `A` default", but compiletest can't handle multispans
+LL | B,
+ | - additional default
+ |
+ = note: only one variant can be default
+ = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: multiple declared defaults
+ --> $DIR/multiple-defaults.rs:18:10
+ |
+LL | #[derive(Default)]
+ | ^^^^^^^
+...
+LL | A,
+ | - first default
+LL | #[default]
+LL | A,
+ | - additional default
+ |
+ = note: only one variant can be default
+ = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0428]: the name `A` is defined multiple times
+ --> $DIR/multiple-defaults.rs:23:5
+ |
+LL | A,
+ | - previous definition of the type `A` here
+LL | #[default]
+LL | A,
+ | ^ `A` redefined here
+ |
+ = note: `A` must be defined only once in the type namespace of this enum
+
+error: multiple declared defaults
+ --> $DIR/multiple-defaults.rs:31:18
+ |
+LL | #[derive(Default)]
+ | ^^^^^^^
+...
+LL | $id,
+ | ---
+ | |
+ | first default
+ | additional default
+...
+LL | m! { A B }
+ | ---------- in this macro invocation
+ |
+ = note: only one variant can be default
+ = note: this error originates in the derive macro `Default` which comes from the expansion of the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0428`.
diff --git a/tests/ui/destructuring-assignment/bad-expr-lhs.rs b/tests/ui/destructuring-assignment/bad-expr-lhs.rs
index 53794783a..90e1ac199 100644
--- a/tests/ui/destructuring-assignment/bad-expr-lhs.rs
+++ b/tests/ui/destructuring-assignment/bad-expr-lhs.rs
@@ -4,6 +4,4 @@ fn main() {
(1, 2) = (3, 4);
//~^ ERROR invalid left-hand side of assignment
//~| ERROR invalid left-hand side of assignment
-
- None = Some(3); //~ ERROR invalid left-hand side of assignment
}
diff --git a/tests/ui/destructuring-assignment/bad-expr-lhs.stderr b/tests/ui/destructuring-assignment/bad-expr-lhs.stderr
index d29867474..2916d6d9f 100644
--- a/tests/ui/destructuring-assignment/bad-expr-lhs.stderr
+++ b/tests/ui/destructuring-assignment/bad-expr-lhs.stderr
@@ -30,15 +30,7 @@ LL | (1, 2) = (3, 4);
| |
| cannot assign to this expression
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/bad-expr-lhs.rs:8:10
- |
-LL | None = Some(3);
- | ---- ^
- | |
- | cannot assign to this expression
-
-error: aborting due to 5 previous errors
+error: aborting due to 4 previous errors
Some errors have detailed explanations: E0067, E0070.
For more information about an error, try `rustc --explain E0067`.
diff --git a/tests/ui/destructuring-assignment/default-match-bindings-forbidden.stderr b/tests/ui/destructuring-assignment/default-match-bindings-forbidden.stderr
index b285ee1f3..b0231d91b 100644
--- a/tests/ui/destructuring-assignment/default-match-bindings-forbidden.stderr
+++ b/tests/ui/destructuring-assignment/default-match-bindings-forbidden.stderr
@@ -9,6 +9,6 @@ LL | (x, y) = &(1, 2);
= note: expected reference `&({integer}, {integer})`
found tuple `(_, _)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/destructuring-assignment/non-exhaustive-destructure.rs b/tests/ui/destructuring-assignment/non-exhaustive-destructure.rs
new file mode 100644
index 000000000..39939f2ba
--- /dev/null
+++ b/tests/ui/destructuring-assignment/non-exhaustive-destructure.rs
@@ -0,0 +1,4 @@
+fn main() {
+ None = Some(3);
+ //~^ ERROR refutable pattern in local binding
+}
diff --git a/tests/ui/destructuring-assignment/non-exhaustive-destructure.stderr b/tests/ui/destructuring-assignment/non-exhaustive-destructure.stderr
new file mode 100644
index 000000000..b9ceaa4af
--- /dev/null
+++ b/tests/ui/destructuring-assignment/non-exhaustive-destructure.stderr
@@ -0,0 +1,17 @@
+error[E0005]: refutable pattern in local binding
+ --> $DIR/non-exhaustive-destructure.rs:2:5
+ |
+LL | None = Some(3);
+ | ^^^^ pattern `Some(_)` not covered
+ |
+ = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
+ = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
+ = 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
+ |
+LL | if None = Some(3) { todo!() };
+ | ++ +++++++++++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0005`.
diff --git a/tests/ui/destructuring-assignment/struct-or-enum-variant-path.rs b/tests/ui/destructuring-assignment/struct-or-enum-variant-path.rs
index 8da7f90c5..f82e02998 100644
--- a/tests/ui/destructuring-assignment/struct-or-enum-variant-path.rs
+++ b/tests/ui/destructuring-assignment/struct-or-enum-variant-path.rs
@@ -11,17 +11,22 @@ type A = E;
fn main() {
let mut a;
+ S = S;
(S, a) = (S, ());
+ E::V = E::V;
(E::V, a) = (E::V, ());
+ <E>::V = E::V;
(<E>::V, a) = (E::V, ());
+ A::V = A::V;
(A::V, a) = (E::V, ());
}
impl S {
fn check() {
let a;
+ Self = S;
(Self, a) = (S, ());
}
}
@@ -29,6 +34,7 @@ impl S {
impl E {
fn check() {
let a;
+ Self::V = E::V;
(Self::V, a) = (E::V, ());
}
}
diff --git a/tests/ui/diagnostic-flags/terminal_urls.stderr b/tests/ui/diagnostic-flags/terminal_urls.stderr
index 7f7e69c5d..e5dfcdf64 100644
--- a/tests/ui/diagnostic-flags/terminal_urls.stderr
+++ b/tests/ui/diagnostic-flags/terminal_urls.stderr
@@ -6,6 +6,6 @@ LL | let () = 4;
| |
| expected integer, found `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/diagnostic-width/E0271.stderr b/tests/ui/diagnostic-width/E0271.stderr
index c1b8b3207..31ec3fe36 100644
--- a/tests/ui/diagnostic-width/E0271.stderr
+++ b/tests/ui/diagnostic-width/E0271.stderr
@@ -17,6 +17,6 @@ LL | type Error = E;
| ^
= note: required for the cast from `Box<Result<Result<(), Result<Result<(), Result<Result<(), Option<{integer}>>, ()>>, ()>>, ()>>` to `Box<(dyn Future<Error = Foo> + 'static)>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/diagnostic-width/flag-human.stderr b/tests/ui/diagnostic-width/flag-human.stderr
index 393dcf2b8..eaa968410 100644
--- a/tests/ui/diagnostic-width/flag-human.stderr
+++ b/tests/ui/diagnostic-width/flag-human.stderr
@@ -6,6 +6,6 @@ LL | ..._: () = 42;
| |
| expected due to this
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/diagnostic-width/flag-json.stderr b/tests/ui/diagnostic-width/flag-json.stderr
index b21391d16..f3bf4f979 100644
--- a/tests/ui/diagnostic-width/flag-json.stderr
+++ b/tests/ui/diagnostic-width/flag-json.stderr
@@ -1,4 +1,4 @@
-{"message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.
+{"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.
Erroneous code examples:
@@ -33,8 +33,8 @@ LL | ..._: () = 42;
| expected due to this
"}
-{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error
+{"$message_type":"diagnostic","message":"aborting due to 1 previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 1 previous error
"}
-{"message":"For more information about this error, try `rustc --explain E0308`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0308`.
+{"$message_type":"diagnostic","message":"For more information about this error, try `rustc --explain E0308`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0308`.
"}
diff --git a/tests/ui/diagnostic-width/long-E0308.stderr b/tests/ui/diagnostic-width/long-E0308.stderr
index 20b018b9f..1e5966a1c 100644
--- a/tests/ui/diagnostic-width/long-E0308.stderr
+++ b/tests/ui/diagnostic-width/long-E0308.stderr
@@ -19,9 +19,8 @@ LL | | ))))))))))))))))))))))))))))));
| |__________________________________^ expected `Atype<Btype<..., ...>, ...>`, found `Result<Result<..., ...>, ...>`
|
= note: expected struct `Atype<Btype<..., ...>, ...>`
- the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308/long-E0308.long-type-hash.txt'
found enum `Result<Result<..., ...>, ...>`
- the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308/long-E0308.long-type-hash.txt'
+ = note: the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308/long-E0308.long-type-hash.txt'
error[E0308]: mismatched types
--> $DIR/long-E0308.rs:57:26
@@ -35,9 +34,8 @@ LL | | ))))))))))))))))))))))));
| |____________________________^ expected `Option<Result<..., ...>>`, found `Result<Result<..., ...>, ...>`
|
= note: expected enum `Option<Result<..., ...>>`
- the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308/long-E0308.long-type-hash.txt'
found enum `Result<Result<..., ...>, ...>`
- the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308/long-E0308.long-type-hash.txt'
+ = note: the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308/long-E0308.long-type-hash.txt'
error[E0308]: mismatched types
--> $DIR/long-E0308.rs:88:9
@@ -55,8 +53,8 @@ LL | | > = ();
| expected due to this
|
= note: expected struct `Atype<Btype<..., ...>, ...>`
- the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308/long-E0308.long-type-hash.txt'
found unit type `()`
+ = note: the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308/long-E0308.long-type-hash.txt'
error[E0308]: mismatched types
--> $DIR/long-E0308.rs:91:17
@@ -73,7 +71,7 @@ LL | | ))))))))))))))))))))))));
|
= note: expected unit type `()`
found enum `Result<Result<..., ...>, ...>`
- the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308/long-E0308.long-type-hash.txt'
+ = note: the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308/long-E0308.long-type-hash.txt'
error: aborting due to 4 previous errors
diff --git a/tests/ui/diagnostic-width/non-1-width-unicode-multiline-label.stderr b/tests/ui/diagnostic-width/non-1-width-unicode-multiline-label.stderr
index bf277362d..8f200e15c 100644
--- a/tests/ui/diagnostic-width/non-1-width-unicode-multiline-label.stderr
+++ b/tests/ui/diagnostic-width/non-1-width-unicode-multiline-label.stderr
@@ -13,6 +13,6 @@ help: create an owned `String` from a string reference
LL | let _ = "ༀ༁༂༃༄༅༆༇༈༉༊་༌།༎༏༐༑༒༓༔༕༖༗༘༙༚༛༜༝༞༟༠༡༢༣༤༥༦༧༨༩༪༫༬༭༮༯༰༱༲༳༴༵༶༷༸༹༺༻༼༽༾༿ཀཁགགྷངཅཆཇ཈ཉཊཋཌཌྷཎཏཐདདྷནཔཕབབྷམཙཚཛཛྷཝཞཟའཡརལཤཥསཧཨཀྵཪཫཬ཭཮཯཰ཱཱཱིིུུྲྀཷླྀཹེཻོཽཾཿ྄ཱྀྀྂྃ྅྆྇ྈྉྊྋྌྍྎྏྐྑྒྒྷྔྕྖྗ྘ྙྚྛྜྜྷྞྟྠྡྡྷྣྤྥྦྦྷྨྩྪྫྫྷྭྮྯྰྱྲླྴྵྶྷྸྐྵྺྻྼ྽྾྿࿀࿁࿂࿃࿄࿅࿆࿇࿈࿉࿊࿋࿌࿍࿎࿏࿐࿑࿒࿓࿔࿕࿖࿗࿘࿙࿚"; let _a = unicode_is_fun.to_owned() + " really fun!";
| +++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/diagnostic-width/non-whitespace-trimming-2.stderr b/tests/ui/diagnostic-width/non-whitespace-trimming-2.stderr
index 5dbb9ce45..a7d5c0bfb 100644
--- a/tests/ui/diagnostic-width/non-whitespace-trimming-2.stderr
+++ b/tests/ui/diagnostic-width/non-whitespace-trimming-2.stderr
@@ -6,6 +6,6 @@ LL | ...13; let _: usize = 14; let _: usize = 15; let _: () = 42; let _: usize =
| |
| expected due to this
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/diagnostic-width/non-whitespace-trimming-unicode.stderr b/tests/ui/diagnostic-width/non-whitespace-trimming-unicode.stderr
index 1e5ff9398..da3d8d318 100644
--- a/tests/ui/diagnostic-width/non-whitespace-trimming-unicode.stderr
+++ b/tests/ui/diagnostic-width/non-whitespace-trimming-unicode.stderr
@@ -6,6 +6,6 @@ LL | ...♭♮♯♰♱♲♳♴♵♶♷♸♹♺♻♼♽♾♿⚀⚁⚂⚃⚄
| |
| expected due to this
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/diagnostic-width/non-whitespace-trimming.stderr b/tests/ui/diagnostic-width/non-whitespace-trimming.stderr
index c4ff0e168..872c5ae3b 100644
--- a/tests/ui/diagnostic-width/non-whitespace-trimming.stderr
+++ b/tests/ui/diagnostic-width/non-whitespace-trimming.stderr
@@ -6,6 +6,6 @@ LL | ... () = (); let _: () = (); let _: () = (); let _: () = 42; let _: () = ()
| |
| expected due to this
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/diagnostic-width/tab-column-numbers.stderr b/tests/ui/diagnostic-width/tab-column-numbers.stderr
index ea4e1ff52..3093b66fe 100644
--- a/tests/ui/diagnostic-width/tab-column-numbers.stderr
+++ b/tests/ui/diagnostic-width/tab-column-numbers.stderr
@@ -9,6 +9,6 @@ LL | s.method();
LL | fn method(&self) {}
| ---------------- private method defined here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0624`.
diff --git a/tests/ui/diagnostic-width/tabs-trimming.stderr b/tests/ui/diagnostic-width/tabs-trimming.stderr
index 6c8d9afc7..2aa4fc18c 100644
--- a/tests/ui/diagnostic-width/tabs-trimming.stderr
+++ b/tests/ui/diagnostic-width/tabs-trimming.stderr
@@ -7,6 +7,6 @@ LL | ... v @ 1 | 2 | 3 => panic!("You gave me too little money {}", v), // Lon
| | pattern doesn't bind `v`
| variable not in all patterns
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0408`.
diff --git a/tests/ui/diagnostic-width/whitespace-trimming-2.stderr b/tests/ui/diagnostic-width/whitespace-trimming-2.stderr
index 97a64e603..561f9e613 100644
--- a/tests/ui/diagnostic-width/whitespace-trimming-2.stderr
+++ b/tests/ui/diagnostic-width/whitespace-trimming-2.stderr
@@ -6,6 +6,6 @@ LL | ...-> usize {
LL | ... ()
| ^^ expected `usize`, found `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/diagnostic-width/whitespace-trimming.stderr b/tests/ui/diagnostic-width/whitespace-trimming.stderr
index e296d4889..519ba8a1f 100644
--- a/tests/ui/diagnostic-width/whitespace-trimming.stderr
+++ b/tests/ui/diagnostic-width/whitespace-trimming.stderr
@@ -6,6 +6,6 @@ LL | ... let _: () = 42;
| |
| expected due to this
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.rs b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.rs
new file mode 100644
index 000000000..eb985c062
--- /dev/null
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.rs
@@ -0,0 +1,67 @@
+#![feature(diagnostic_namespace)]
+
+#[diagnostic::on_unimplemented(
+ on(_Self = "&str"),
+ //~^WARN malformed `on_unimplemented` attribute
+ //~|WARN malformed `on_unimplemented` attribute
+ message = "trait has `{Self}` and `{T}` as params",
+ label = "trait has `{Self}` and `{T}` as params",
+ note = "trait has `{Self}` and `{T}` as params",
+ parent_label = "in this scope",
+ //~^WARN malformed `on_unimplemented` attribute
+ //~|WARN malformed `on_unimplemented` attribute
+ append_const_msg
+ //~^WARN malformed `on_unimplemented` attribute
+ //~|WARN malformed `on_unimplemented` attribute
+)]
+trait Foo<T> {}
+
+#[diagnostic::on_unimplemented = "Message"]
+//~^WARN malformed `on_unimplemented` attribute
+//~|WARN malformed `on_unimplemented` attribute
+trait Bar {}
+
+#[diagnostic::on_unimplemented(message = "Not allowed to apply it on a impl")]
+//~^WARN #[diagnostic::on_unimplemented]` can only be applied to trait definitions
+impl Bar for i32 {}
+
+// cannot use special rustc_on_unimplement symbols
+// in the format string
+#[diagnostic::on_unimplemented(
+ message = "{from_desugaring}{direct}{cause}{integral}{integer}",
+ //~^WARN there is no parameter `from_desugaring` on trait `Baz`
+ //~|WARN there is no parameter `from_desugaring` on trait `Baz`
+ //~|WARN there is no parameter `direct` on trait `Baz`
+ //~|WARN there is no parameter `direct` on trait `Baz`
+ //~|WARN there is no parameter `cause` on trait `Baz`
+ //~|WARN there is no parameter `cause` on trait `Baz`
+ //~|WARN there is no parameter `integral` on trait `Baz`
+ //~|WARN there is no parameter `integral` on trait `Baz`
+ //~|WARN there is no parameter `integer` on trait `Baz`
+ //~|WARN there is no parameter `integer` on trait `Baz`
+ label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
+ //~^WARN there is no parameter `float` on trait `Baz`
+ //~|WARN there is no parameter `float` on trait `Baz`
+ //~|WARN there is no parameter `_Self` on trait `Baz`
+ //~|WARN there is no parameter `_Self` on trait `Baz`
+ //~|WARN there is no parameter `crate_local` on trait `Baz`
+ //~|WARN there is no parameter `crate_local` on trait `Baz`
+ //~|WARN there is no parameter `Trait` on trait `Baz`
+ //~|WARN there is no parameter `Trait` on trait `Baz`
+ //~|WARN there is no parameter `ItemContext` on trait `Baz`
+ //~|WARN there is no parameter `ItemContext` on trait `Baz`
+)]
+trait Baz {}
+
+fn takes_foo(_: impl Foo<i32>) {}
+fn takes_bar(_: impl Bar) {}
+fn takes_baz(_: impl Baz) {}
+
+fn main() {
+ takes_foo(());
+ //~^ERROR trait has `()` and `i32` as params
+ takes_bar(());
+ //~^ERROR the trait bound `(): Bar` is not satisfied
+ takes_baz(());
+ //~^ERROR {from_desugaring}{direct}{cause}{integral}{integer}
+}
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.stderr
new file mode 100644
index 000000000..75a701f0b
--- /dev/null
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.stderr
@@ -0,0 +1,305 @@
+warning: `#[diagnostic::on_unimplemented]` can only be applied to trait definitions
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:24:1
+ |
+LL | #[diagnostic::on_unimplemented(message = "Not allowed to apply it on a impl")]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(unknown_or_malformed_diagnostic_attributes)]` on by default
+
+warning: malformed `on_unimplemented` attribute
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:4:5
+ |
+LL | on(_Self = "&str"),
+ | ^^^^^^^^^^^^^^^^^^ invalid option found here
+ |
+ = help: only `message`, `note` and `label` are allowed as options
+
+warning: malformed `on_unimplemented` attribute
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:10:5
+ |
+LL | parent_label = "in this scope",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid option found here
+ |
+ = help: only `message`, `note` and `label` are allowed as options
+
+warning: malformed `on_unimplemented` attribute
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:13:5
+ |
+LL | append_const_msg
+ | ^^^^^^^^^^^^^^^^ invalid option found here
+ |
+ = help: only `message`, `note` and `label` are allowed as options
+
+warning: malformed `on_unimplemented` attribute
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:19:32
+ |
+LL | #[diagnostic::on_unimplemented = "Message"]
+ | ^^^^^^^^^^^ invalid option found here
+ |
+ = help: only `message`, `note` and `label` are allowed as options
+
+warning: there is no parameter `from_desugaring` on trait `Baz`
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:31:5
+ |
+LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: expect either a generic argument name or `{Self}` as format argument
+
+warning: there is no parameter `direct` on trait `Baz`
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:31:5
+ |
+LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: expect either a generic argument name or `{Self}` as format argument
+
+warning: there is no parameter `cause` on trait `Baz`
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:31:5
+ |
+LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: expect either a generic argument name or `{Self}` as format argument
+
+warning: there is no parameter `integral` on trait `Baz`
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:31:5
+ |
+LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: expect either a generic argument name or `{Self}` as format argument
+
+warning: there is no parameter `integer` on trait `Baz`
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:31:5
+ |
+LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: expect either a generic argument name or `{Self}` as format argument
+
+warning: there is no parameter `float` on trait `Baz`
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:42:5
+ |
+LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: expect either a generic argument name or `{Self}` as format argument
+
+warning: there is no parameter `_Self` on trait `Baz`
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:42:5
+ |
+LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: expect either a generic argument name or `{Self}` as format argument
+
+warning: there is no parameter `crate_local` on trait `Baz`
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:42:5
+ |
+LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: expect either a generic argument name or `{Self}` as format argument
+
+warning: there is no parameter `Trait` on trait `Baz`
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:42:5
+ |
+LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: expect either a generic argument name or `{Self}` as format argument
+
+warning: there is no parameter `ItemContext` on trait `Baz`
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:42:5
+ |
+LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: expect either a generic argument name or `{Self}` as format argument
+
+warning: malformed `on_unimplemented` attribute
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:4:5
+ |
+LL | on(_Self = "&str"),
+ | ^^^^^^^^^^^^^^^^^^ invalid option found here
+ |
+ = help: only `message`, `note` and `label` are allowed as options
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+warning: malformed `on_unimplemented` attribute
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:10:5
+ |
+LL | parent_label = "in this scope",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid option found here
+ |
+ = help: only `message`, `note` and `label` are allowed as options
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+warning: malformed `on_unimplemented` attribute
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:13:5
+ |
+LL | append_const_msg
+ | ^^^^^^^^^^^^^^^^ invalid option found here
+ |
+ = help: only `message`, `note` and `label` are allowed as options
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0277]: trait has `()` and `i32` as params
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:61:15
+ |
+LL | takes_foo(());
+ | --------- ^^ trait has `()` and `i32` as params
+ | |
+ | required by a bound introduced by this call
+ |
+ = help: the trait `Foo<i32>` is not implemented for `()`
+ = note: trait has `()` and `i32` as params
+help: this trait has no implementations, consider adding one
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:17:1
+ |
+LL | trait Foo<T> {}
+ | ^^^^^^^^^^^^
+note: required by a bound in `takes_foo`
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:56:22
+ |
+LL | fn takes_foo(_: impl Foo<i32>) {}
+ | ^^^^^^^^ required by this bound in `takes_foo`
+
+warning: malformed `on_unimplemented` attribute
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:19:32
+ |
+LL | #[diagnostic::on_unimplemented = "Message"]
+ | ^^^^^^^^^^^ invalid option found here
+ |
+ = help: only `message`, `note` and `label` are allowed as options
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0277]: the trait bound `(): Bar` is not satisfied
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:63:15
+ |
+LL | takes_bar(());
+ | --------- ^^ the trait `Bar` is not implemented for `()`
+ | |
+ | required by a bound introduced by this call
+ |
+ = help: the trait `Bar` is implemented for `i32`
+note: required by a bound in `takes_bar`
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:57:22
+ |
+LL | fn takes_bar(_: impl Bar) {}
+ | ^^^ required by this bound in `takes_bar`
+
+warning: there is no parameter `from_desugaring` on trait `Baz`
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:31:5
+ |
+LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: expect either a generic argument name or `{Self}` as format argument
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+warning: there is no parameter `direct` on trait `Baz`
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:31:5
+ |
+LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: expect either a generic argument name or `{Self}` as format argument
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+warning: there is no parameter `cause` on trait `Baz`
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:31:5
+ |
+LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: expect either a generic argument name or `{Self}` as format argument
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+warning: there is no parameter `integral` on trait `Baz`
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:31:5
+ |
+LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: expect either a generic argument name or `{Self}` as format argument
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+warning: there is no parameter `integer` on trait `Baz`
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:31:5
+ |
+LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: expect either a generic argument name or `{Self}` as format argument
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+warning: there is no parameter `float` on trait `Baz`
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:42:5
+ |
+LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: expect either a generic argument name or `{Self}` as format argument
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+warning: there is no parameter `_Self` on trait `Baz`
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:42:5
+ |
+LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: expect either a generic argument name or `{Self}` as format argument
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+warning: there is no parameter `crate_local` on trait `Baz`
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:42:5
+ |
+LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: expect either a generic argument name or `{Self}` as format argument
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+warning: there is no parameter `Trait` on trait `Baz`
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:42:5
+ |
+LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: expect either a generic argument name or `{Self}` as format argument
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+warning: there is no parameter `ItemContext` on trait `Baz`
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:42:5
+ |
+LL | label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: expect either a generic argument name or `{Self}` as format argument
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0277]: {from_desugaring}{direct}{cause}{integral}{integer}
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:65:15
+ |
+LL | takes_baz(());
+ | --------- ^^ {float}{_Self}{crate_local}{Trait}{ItemContext}
+ | |
+ | required by a bound introduced by this call
+ |
+ = help: the trait `Baz` is not implemented for `()`
+help: this trait has no implementations, consider adding one
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:54:1
+ |
+LL | trait Baz {}
+ | ^^^^^^^^^
+note: required by a bound in `takes_baz`
+ --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:58:22
+ |
+LL | fn takes_baz(_: impl Baz) {}
+ | ^^^ required by this bound in `takes_baz`
+
+error: aborting due to 3 previous errors; 29 warnings emitted
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.rs b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.rs
index 346d8373f..12fe98817 100644
--- a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.rs
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.rs
@@ -28,10 +28,16 @@ trait Doom {}
//~|WARN missing options for `on_unimplemented` attribute
trait Whatever {}
+#[diagnostic::on_unimplemented(message = "{DoesNotExist}")]
+//~^WARN there is no parameter `DoesNotExist` on trait `Test`
+//~|WARN there is no parameter `DoesNotExist` on trait `Test`
+trait Test {}
+
fn take_foo(_: impl Foo) {}
fn take_baz(_: impl Baz) {}
fn take_boom(_: impl Boom) {}
fn take_whatever(_: impl Whatever) {}
+fn take_test(_: impl Test) {}
fn main() {
take_foo(1_i32);
@@ -42,4 +48,6 @@ fn main() {
//~^ERROR Boom
take_whatever(1_i32);
//~^ERROR the trait bound `i32: Whatever` is not satisfied
+ take_test(());
+ //~^ERROR {DoesNotExist}
}
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr
index 162ddd79f..11263580b 100644
--- a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr
@@ -46,6 +46,14 @@ LL | #[diagnostic::on_unimplemented]
|
= help: at least one of the `message`, `note` and `label` options are expected
+warning: there is no parameter `DoesNotExist` on trait `Test`
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:31:32
+ |
+LL | #[diagnostic::on_unimplemented(message = "{DoesNotExist}")]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: expect either a generic argument name or `{Self}` as format argument
+
warning: malformed `on_unimplemented` attribute
--> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:3:32
|
@@ -56,7 +64,7 @@ LL | #[diagnostic::on_unimplemented(unsupported = "foo")]
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0277]: the trait bound `i32: Foo` is not satisfied
- --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:37:14
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:43:14
|
LL | take_foo(1_i32);
| -------- ^^^^^ the trait `Foo` is not implemented for `i32`
@@ -69,7 +77,7 @@ help: this trait has no implementations, consider adding one
LL | trait Foo {}
| ^^^^^^^^^
note: required by a bound in `take_foo`
- --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:31:21
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:36:21
|
LL | fn take_foo(_: impl Foo) {}
| ^^^ required by this bound in `take_foo`
@@ -84,7 +92,7 @@ LL | #[diagnostic::on_unimplemented(message = "Boom", unsupported = "Bar")]
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0277]: Boom
- --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:39:14
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:45:14
|
LL | take_baz(1_i32);
| -------- ^^^^^ the trait `Baz` is not implemented for `i32`
@@ -97,7 +105,7 @@ help: this trait has no implementations, consider adding one
LL | trait Baz {}
| ^^^^^^^^^
note: required by a bound in `take_baz`
- --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:32:21
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:37:21
|
LL | fn take_baz(_: impl Baz) {}
| ^^^ required by this bound in `take_baz`
@@ -112,7 +120,7 @@ LL | #[diagnostic::on_unimplemented(message = "Boom", on(_Self = "i32", message
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0277]: Boom
- --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:41:15
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:47:15
|
LL | take_boom(1_i32);
| --------- ^^^^^ the trait `Boom` is not implemented for `i32`
@@ -125,7 +133,7 @@ help: this trait has no implementations, consider adding one
LL | trait Boom {}
| ^^^^^^^^^^
note: required by a bound in `take_boom`
- --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:33:22
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:38:22
|
LL | fn take_boom(_: impl Boom) {}
| ^^^^ required by this bound in `take_boom`
@@ -140,7 +148,7 @@ LL | #[diagnostic::on_unimplemented]
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0277]: the trait bound `i32: Whatever` is not satisfied
- --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:43:19
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:49:19
|
LL | take_whatever(1_i32);
| ------------- ^^^^^ the trait `Whatever` is not implemented for `i32`
@@ -153,11 +161,39 @@ help: this trait has no implementations, consider adding one
LL | trait Whatever {}
| ^^^^^^^^^^^^^^
note: required by a bound in `take_whatever`
- --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:34:26
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:39:26
|
LL | fn take_whatever(_: impl Whatever) {}
| ^^^^^^^^ required by this bound in `take_whatever`
-error: aborting due to 4 previous errors; 10 warnings emitted
+warning: there is no parameter `DoesNotExist` on trait `Test`
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:31:32
+ |
+LL | #[diagnostic::on_unimplemented(message = "{DoesNotExist}")]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: expect either a generic argument name or `{Self}` as format argument
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0277]: {DoesNotExist}
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:51:15
+ |
+LL | take_test(());
+ | --------- ^^ the trait `Test` is not implemented for `()`
+ | |
+ | required by a bound introduced by this call
+ |
+help: this trait has no implementations, consider adding one
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:34:1
+ |
+LL | trait Test {}
+ | ^^^^^^^^^^
+note: required by a bound in `take_test`
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:40:22
+ |
+LL | fn take_test(_: impl Test) {}
+ | ^^^^ required by this bound in `take_test`
+
+error: aborting due to 5 previous errors; 12 warnings emitted
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/feature-gate-diagnostic_on_unimplemented.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/feature-gate-diagnostic_on_unimplemented.stderr
index 21f02e3a7..82e3b709f 100644
--- a/tests/ui/diagnostic_namespace/on_unimplemented/feature-gate-diagnostic_on_unimplemented.stderr
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/feature-gate-diagnostic_on_unimplemented.stderr
@@ -7,6 +7,6 @@ LL | #[diagnostic::on_unimplemented(message = "Foo")]
= note: see issue #111996 <https://github.com/rust-lang/rust/issues/111996> for more information
= help: add `#![feature(diagnostic_namespace)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.rs b/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.rs
index 8410b3eb1..0893f29c4 100644
--- a/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.rs
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.rs
@@ -8,6 +8,8 @@
note = "custom note"
)]
#[diagnostic::on_unimplemented(message = "fallback!!")]
+//~^ `message` is ignored due to previous definition of `message`
+//~| `message` is ignored due to previous definition of `message`
#[diagnostic::on_unimplemented(label = "fallback label")]
#[diagnostic::on_unimplemented(note = "fallback note")]
trait Foo {}
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.stderr
index 906472beb..e00846da7 100644
--- a/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.stderr
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.stderr
@@ -7,6 +7,15 @@ LL | if(Self = "()"),
= help: only `message`, `note` and `label` are allowed as options
= note: `#[warn(unknown_or_malformed_diagnostic_attributes)]` on by default
+warning: `message` is ignored due to previous definition of `message`
+ --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:10:32
+ |
+LL | message = "custom message",
+ | -------------------------- `message` is first declared here
+...
+LL | #[diagnostic::on_unimplemented(message = "fallback!!")]
+ | ^^^^^^^^^^^^^^^^^^^^^^ `message` is already declared here
+
warning: malformed `on_unimplemented` attribute
--> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:4:5
|
@@ -16,8 +25,19 @@ LL | if(Self = "()"),
= help: only `message`, `note` and `label` are allowed as options
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+warning: `message` is ignored due to previous definition of `message`
+ --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:10:32
+ |
+LL | message = "custom message",
+ | -------------------------- `message` is first declared here
+...
+LL | #[diagnostic::on_unimplemented(message = "fallback!!")]
+ | ^^^^^^^^^^^^^^^^^^^^^^ `message` is already declared here
+ |
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
error[E0277]: custom message
- --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:18:15
+ --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:20:15
|
LL | takes_foo(());
| --------- ^^ fallback label
@@ -28,16 +48,16 @@ LL | takes_foo(());
= note: custom note
= note: fallback note
help: this trait has no implementations, consider adding one
- --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:13:1
+ --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:15:1
|
LL | trait Foo {}
| ^^^^^^^^^
note: required by a bound in `takes_foo`
- --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:15:22
+ --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:17:22
|
LL | fn takes_foo(_: impl Foo) {}
| ^^^ required by this bound in `takes_foo`
-error: aborting due to previous error; 2 warnings emitted
+error: aborting due to 1 previous error; 4 warnings emitted
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/on_unimplemented_simple.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/on_unimplemented_simple.stderr
index 549c7caa7..de57f7044 100644
--- a/tests/ui/diagnostic_namespace/on_unimplemented/on_unimplemented_simple.stderr
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/on_unimplemented_simple.stderr
@@ -19,6 +19,6 @@ note: required by a bound in `takes_foo`
LL | fn takes_foo(_: impl Foo) {}
| ^^^ required by this bound in `takes_foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/report_warning_on_duplicated_options.rs b/tests/ui/diagnostic_namespace/on_unimplemented/report_warning_on_duplicated_options.rs
new file mode 100644
index 000000000..a7becd2f8
--- /dev/null
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/report_warning_on_duplicated_options.rs
@@ -0,0 +1,25 @@
+#![feature(diagnostic_namespace)]
+
+#[diagnostic::on_unimplemented(
+ message = "first message",
+ label = "first label",
+ note = "custom note"
+)]
+#[diagnostic::on_unimplemented(
+ message = "second message",
+ //~^WARN `message` is ignored due to previous definition of `message`
+ //~|WARN `message` is ignored due to previous definition of `message`
+ label = "second label",
+ //~^WARN `label` is ignored due to previous definition of `label`
+ //~|WARN `label` is ignored due to previous definition of `label`
+ note = "second note"
+)]
+trait Foo {}
+
+
+fn takes_foo(_: impl Foo) {}
+
+fn main() {
+ takes_foo(());
+ //~^ERROR first message
+}
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/report_warning_on_duplicated_options.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/report_warning_on_duplicated_options.stderr
new file mode 100644
index 000000000..d30754dcf
--- /dev/null
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/report_warning_on_duplicated_options.stderr
@@ -0,0 +1,67 @@
+warning: `message` is ignored due to previous definition of `message`
+ --> $DIR/report_warning_on_duplicated_options.rs:9:5
+ |
+LL | message = "first message",
+ | ------------------------- `message` is first declared here
+...
+LL | message = "second message",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `message` is already declared here
+ |
+ = note: `#[warn(unknown_or_malformed_diagnostic_attributes)]` on by default
+
+warning: `label` is ignored due to previous definition of `label`
+ --> $DIR/report_warning_on_duplicated_options.rs:12:5
+ |
+LL | label = "first label",
+ | --------------------- `label` is first declared here
+...
+LL | label = "second label",
+ | ^^^^^^^^^^^^^^^^^^^^^^ `label` is already declared here
+
+warning: `message` is ignored due to previous definition of `message`
+ --> $DIR/report_warning_on_duplicated_options.rs:9:5
+ |
+LL | message = "first message",
+ | ------------------------- `message` is first declared here
+...
+LL | message = "second message",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `message` is already declared here
+ |
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+warning: `label` is ignored due to previous definition of `label`
+ --> $DIR/report_warning_on_duplicated_options.rs:12:5
+ |
+LL | label = "first label",
+ | --------------------- `label` is first declared here
+...
+LL | label = "second label",
+ | ^^^^^^^^^^^^^^^^^^^^^^ `label` is already declared here
+ |
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0277]: first message
+ --> $DIR/report_warning_on_duplicated_options.rs:23:15
+ |
+LL | takes_foo(());
+ | --------- ^^ first label
+ | |
+ | required by a bound introduced by this call
+ |
+ = help: the trait `Foo` is not implemented for `()`
+ = note: custom note
+ = note: second note
+help: this trait has no implementations, consider adding one
+ --> $DIR/report_warning_on_duplicated_options.rs:17:1
+ |
+LL | trait Foo {}
+ | ^^^^^^^^^
+note: required by a bound in `takes_foo`
+ --> $DIR/report_warning_on_duplicated_options.rs:20:22
+ |
+LL | fn takes_foo(_: impl Foo) {}
+ | ^^^ required by this bound in `takes_foo`
+
+error: aborting due to 1 previous error; 4 warnings emitted
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/diagnostic_namespace/requires_path.stderr b/tests/ui/diagnostic_namespace/requires_path.stderr
index ce867621d..5d07d3a22 100644
--- a/tests/ui/diagnostic_namespace/requires_path.stderr
+++ b/tests/ui/diagnostic_namespace/requires_path.stderr
@@ -4,5 +4,5 @@ error: cannot find attribute `diagnostic` in this scope
LL | #[diagnostic]
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/did_you_mean/dont-suggest-doc-hidden-fields.rs b/tests/ui/did_you_mean/dont-suggest-doc-hidden-fields.rs
index 6040f3f30..ffc37b260 100644
--- a/tests/ui/did_you_mean/dont-suggest-doc-hidden-fields.rs
+++ b/tests/ui/did_you_mean/dont-suggest-doc-hidden-fields.rs
@@ -29,7 +29,7 @@ fn main() {
doc_hidden_fields::B::default().hey;
//~^ ERROR no field `hey` on type `B`
//~| NOTE unknown field
- //~| NOTE available fields are: `bye`
+ //~| NOTE available field is: `bye`
C::default().hey;
//~^ ERROR no field `hey` on type `C`
diff --git a/tests/ui/did_you_mean/dont-suggest-doc-hidden-fields.stderr b/tests/ui/did_you_mean/dont-suggest-doc-hidden-fields.stderr
index b7fe3b79b..55f6d0fa3 100644
--- a/tests/ui/did_you_mean/dont-suggest-doc-hidden-fields.stderr
+++ b/tests/ui/did_you_mean/dont-suggest-doc-hidden-fields.stderr
@@ -12,7 +12,7 @@ error[E0609]: no field `hey` on type `B`
LL | doc_hidden_fields::B::default().hey;
| ^^^ unknown field
|
- = note: available fields are: `bye`
+ = note: available field is: `bye`
error[E0609]: no field `hey` on type `C`
--> $DIR/dont-suggest-doc-hidden-fields.rs:34:18
diff --git a/tests/ui/did_you_mean/dont-suggest-hygienic-fields.stderr b/tests/ui/did_you_mean/dont-suggest-hygienic-fields.stderr
index 7066d2976..473c9a339 100644
--- a/tests/ui/did_you_mean/dont-suggest-hygienic-fields.stderr
+++ b/tests/ui/did_you_mean/dont-suggest-hygienic-fields.stderr
@@ -5,9 +5,13 @@ LL | environment!();
| -------------- in this macro invocation
...
LL | const CRATE: Crate = Crate { fiel: () };
- | ^^^^ help: a field with a similar name exists: `field`
+ | ^^^^ unknown field
|
= note: this error originates in the macro `environment` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: a field with a similar name exists
+ |
+LL | const CRATE: Crate = Crate { field: () };
+ | ~~~~~
error[E0609]: no field `field` on type `Compound`
--> $DIR/dont-suggest-hygienic-fields.rs:24:16
diff --git a/tests/ui/did_you_mean/issue-114112.stderr b/tests/ui/did_you_mean/issue-114112.stderr
index d76b5f72e..071c9614f 100644
--- a/tests/ui/did_you_mean/issue-114112.stderr
+++ b/tests/ui/did_you_mean/issue-114112.stderr
@@ -9,5 +9,5 @@ help: use `::<...>` instead of `<...>` to specify lifetime, type, or const argum
LL | E::<i32>::A(v) => {
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-1.stderr b/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-1.stderr
index b69fcd5d3..9cbce93c8 100644
--- a/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-1.stderr
+++ b/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-1.stderr
@@ -10,6 +10,6 @@ LL | f1.foo(1usize);
<Bar as Foo<i32>>
<Bar as Foo<u8>>
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.stderr b/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.stderr
index 2d50c0964..6ac0bf21e 100644
--- a/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.stderr
+++ b/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.stderr
@@ -14,6 +14,6 @@ LL | f1.foo(1usize);
<Bar as Foo<u16>>
<Bar as Foo<u32>>
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/did_you_mean/issue-34337.stderr b/tests/ui/did_you_mean/issue-34337.stderr
index 1f18ea892..c727a565d 100644
--- a/tests/ui/did_you_mean/issue-34337.stderr
+++ b/tests/ui/did_you_mean/issue-34337.stderr
@@ -7,6 +7,6 @@ LL | get(&mut key);
| cannot borrow as mutable
| help: try removing `&mut` here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/did_you_mean/issue-36798.stderr b/tests/ui/did_you_mean/issue-36798.stderr
index 98876e305..70aa3c32b 100644
--- a/tests/ui/did_you_mean/issue-36798.stderr
+++ b/tests/ui/did_you_mean/issue-36798.stderr
@@ -2,8 +2,13 @@ error[E0609]: no field `baz` on type `Foo`
--> $DIR/issue-36798.rs:7:7
|
LL | f.baz;
- | ^^^ help: a field with a similar name exists: `bar`
+ | ^^^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | f.bar;
+ | ~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0609`.
diff --git a/tests/ui/did_you_mean/issue-36798_unknown_field.stderr b/tests/ui/did_you_mean/issue-36798_unknown_field.stderr
index 2ed0a0924..733af860f 100644
--- a/tests/ui/did_you_mean/issue-36798_unknown_field.stderr
+++ b/tests/ui/did_you_mean/issue-36798_unknown_field.stderr
@@ -4,8 +4,8 @@ error[E0609]: no field `zz` on type `Foo`
LL | f.zz;
| ^^ unknown field
|
- = note: available fields are: `bar`
+ = note: available field is: `bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0609`.
diff --git a/tests/ui/did_you_mean/issue-37139.stderr b/tests/ui/did_you_mean/issue-37139.stderr
index dc1bdfaae..a07d83b31 100644
--- a/tests/ui/did_you_mean/issue-37139.stderr
+++ b/tests/ui/did_you_mean/issue-37139.stderr
@@ -7,6 +7,6 @@ LL | test(&mut x);
| cannot borrow as mutable
| help: try removing `&mut` here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/did_you_mean/issue-38147-1.stderr b/tests/ui/did_you_mean/issue-38147-1.stderr
index 790ad54a5..a0392113a 100644
--- a/tests/ui/did_you_mean/issue-38147-1.stderr
+++ b/tests/ui/did_you_mean/issue-38147-1.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be a mutable reference
LL | fn f(&mut self) {
| ~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/did_you_mean/issue-38147-3.stderr b/tests/ui/did_you_mean/issue-38147-3.stderr
index 5b32b5a78..1d92f7742 100644
--- a/tests/ui/did_you_mean/issue-38147-3.stderr
+++ b/tests/ui/did_you_mean/issue-38147-3.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be mutable
LL | s: &'a mut String
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/did_you_mean/issue-38147-4.stderr b/tests/ui/did_you_mean/issue-38147-4.stderr
index 38ab3c54d..573091721 100644
--- a/tests/ui/did_you_mean/issue-38147-4.stderr
+++ b/tests/ui/did_you_mean/issue-38147-4.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be a mutable reference
LL | fn f(x: usize, f: &mut Foo) {
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/did_you_mean/issue-40823.stderr b/tests/ui/did_you_mean/issue-40823.stderr
index 6f1ed3554..d9f69eb47 100644
--- a/tests/ui/did_you_mean/issue-40823.stderr
+++ b/tests/ui/did_you_mean/issue-40823.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be a mutable reference
LL | let mut buf = &mut [1, 2, 3, 4];
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/did_you_mean/issue-42599_available_fields_note.stderr b/tests/ui/did_you_mean/issue-42599_available_fields_note.stderr
index c20bbce3f..d60db01a4 100644
--- a/tests/ui/did_you_mean/issue-42599_available_fields_note.stderr
+++ b/tests/ui/did_you_mean/issue-42599_available_fields_note.stderr
@@ -2,7 +2,12 @@ error[E0560]: struct `Demo` has no field named `inocently_mispellable`
--> $DIR/issue-42599_available_fields_note.rs:16:39
|
LL | Self { secret_integer: 2, inocently_mispellable: () }
- | ^^^^^^^^^^^^^^^^^^^^^ help: a field with a similar name exists: `innocently_misspellable`
+ | ^^^^^^^^^^^^^^^^^^^^^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | Self { secret_integer: 2, innocently_misspellable: () }
+ | ~~~~~~~~~~~~~~~~~~~~~~~
error[E0560]: struct `Demo` has no field named `egregiously_nonexistent_field`
--> $DIR/issue-42599_available_fields_note.rs:21:39
@@ -16,7 +21,12 @@ error[E0609]: no field `inocently_mispellable` on type `Demo`
--> $DIR/issue-42599_available_fields_note.rs:32:41
|
LL | let innocent_field_misaccess = demo.inocently_mispellable;
- | ^^^^^^^^^^^^^^^^^^^^^ help: a field with a similar name exists: `innocently_misspellable`
+ | ^^^^^^^^^^^^^^^^^^^^^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | let innocent_field_misaccess = demo.innocently_misspellable;
+ | ~~~~~~~~~~~~~~~~~~~~~~~
error[E0609]: no field `egregiously_nonexistent_field` on type `Demo`
--> $DIR/issue-42599_available_fields_note.rs:35:42
diff --git a/tests/ui/did_you_mean/issue-46718-struct-pattern-dotdotdot.stderr b/tests/ui/did_you_mean/issue-46718-struct-pattern-dotdotdot.stderr
index 589b2c378..92cbc03e0 100644
--- a/tests/ui/did_you_mean/issue-46718-struct-pattern-dotdotdot.stderr
+++ b/tests/ui/did_you_mean/issue-46718-struct-pattern-dotdotdot.stderr
@@ -9,5 +9,5 @@ help: to omit remaining fields, use `..`
LL | PersonalityInventory { expressivity: exp, .. } => exp
| ~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/did_you_mean/println-typo.stderr b/tests/ui/did_you_mean/println-typo.stderr
index 43b7b1894..a1e0b1f1b 100644
--- a/tests/ui/did_you_mean/println-typo.stderr
+++ b/tests/ui/did_you_mean/println-typo.stderr
@@ -7,5 +7,5 @@ LL | prinltn!();
|
= note: similarly named macro `println` defined here
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/did_you_mean/pub-macro-rules.stderr b/tests/ui/did_you_mean/pub-macro-rules.stderr
index 0bde5783b..ba9020460 100644
--- a/tests/ui/did_you_mean/pub-macro-rules.stderr
+++ b/tests/ui/did_you_mean/pub-macro-rules.stderr
@@ -4,5 +4,5 @@ error: can't qualify macro_rules invocation with `pub`
LL | pub macro_rules! foo {
| ^^^ help: try exporting the macro: `#[macro_export]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/did_you_mean/recursion_limit.stderr b/tests/ui/did_you_mean/recursion_limit.stderr
index 70e49566a..bff57a63d 100644
--- a/tests/ui/did_you_mean/recursion_limit.stderr
+++ b/tests/ui/did_you_mean/recursion_limit.stderr
@@ -56,6 +56,6 @@ note: required by a bound in `is_send`
LL | fn is_send<T:Send>() { }
| ^^^^ required by this bound in `is_send`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/did_you_mean/recursion_limit_macro.stderr b/tests/ui/did_you_mean/recursion_limit_macro.stderr
index 71855cf1e..dc4189ed9 100644
--- a/tests/ui/did_you_mean/recursion_limit_macro.stderr
+++ b/tests/ui/did_you_mean/recursion_limit_macro.stderr
@@ -10,5 +10,5 @@ LL | recurse!(0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9);
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "20"]` attribute to your crate (`recursion_limit_macro`)
= note: this error originates in the macro `recurse` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.stderr b/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.stderr
index 730836a40..2ca6436bb 100644
--- a/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.stderr
+++ b/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.stderr
@@ -13,6 +13,6 @@ help: try replacing `_` with the types in the corresponding trait method signatu
LL | fn bar(i: i32, t: usize, s: &()) -> (usize, i32) {
| ~~~ ~~~~~ ~~~ ~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/ui/directory_ownership/macro-expanded-mod.stderr b/tests/ui/directory_ownership/macro-expanded-mod.stderr
index 8976341b1..2cacd52b9 100644
--- a/tests/ui/directory_ownership/macro-expanded-mod.stderr
+++ b/tests/ui/directory_ownership/macro-expanded-mod.stderr
@@ -9,5 +9,5 @@ LL | mod_decl!(foo);
|
= note: this error originates in the macro `mod_decl` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/directory_ownership/non-inline-mod-restriction.stderr b/tests/ui/directory_ownership/non-inline-mod-restriction.stderr
index 64189bee4..882c86525 100644
--- a/tests/ui/directory_ownership/non-inline-mod-restriction.stderr
+++ b/tests/ui/directory_ownership/non-inline-mod-restriction.stderr
@@ -4,5 +4,5 @@ error: cannot declare a non-inline module inside a block unless it has a path at
LL | mod foo;
| ^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.stderr b/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.stderr
index 596ad4bf7..45c7a8bb4 100644
--- a/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.stderr
+++ b/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.stderr
@@ -12,6 +12,6 @@ help: consider borrowing the pattern binding
LL | let X { x: ref y } = x;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0509`.
diff --git a/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.stderr b/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.stderr
index e32a4dd44..837904cba 100644
--- a/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.stderr
+++ b/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.stderr
@@ -15,6 +15,6 @@ help: consider borrowing the pattern binding
LL | X { x: ref y } => println!("contents: {}", y)
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0509`.
diff --git a/tests/ui/diverging-fn-tail-35849.stderr b/tests/ui/diverging-fn-tail-35849.stderr
index f5b5a4ccc..614f9b9cb 100644
--- a/tests/ui/diverging-fn-tail-35849.stderr
+++ b/tests/ui/diverging-fn-tail-35849.stderr
@@ -10,6 +10,6 @@ LL | ::std::mem::transmute::<f64, [u8; 8]>(panic!())
= note: expected type `!`
found array `[u8; 8]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/does-nothing.stderr b/tests/ui/does-nothing.stderr
index dca792315..d5ea3626e 100644
--- a/tests/ui/does-nothing.stderr
+++ b/tests/ui/does-nothing.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `this_does_nothing_what_the` in this scope
LL | fn main() { println!("doing"); this_does_nothing_what_the; println!("boing"); }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/dont-suggest-private-trait-method.stderr b/tests/ui/dont-suggest-private-trait-method.stderr
index 1492670dc..f251ad59a 100644
--- a/tests/ui/dont-suggest-private-trait-method.stderr
+++ b/tests/ui/dont-suggest-private-trait-method.stderr
@@ -7,6 +7,6 @@ LL | struct T;
LL | T::new();
| ^^^ function or associated item not found in `T`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/double-type-import.stderr b/tests/ui/double-type-import.stderr
index a2f30d82e..8a8fe05ec 100644
--- a/tests/ui/double-type-import.stderr
+++ b/tests/ui/double-type-import.stderr
@@ -8,6 +8,6 @@ LL | use self::bar::X;
|
= note: `X` must be defined only once in the type namespace of this module
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0252`.
diff --git a/tests/ui/drop/drop-foreign-fundamental.stderr b/tests/ui/drop/drop-foreign-fundamental.stderr
index fbd1ba085..a4b322106 100644
--- a/tests/ui/drop/drop-foreign-fundamental.stderr
+++ b/tests/ui/drop/drop-foreign-fundamental.stderr
@@ -4,6 +4,6 @@ error[E0120]: the `Drop` trait may only be implemented for local structs, enums,
LL | impl Drop for Pin<Whatever<A>> {
| ^^^^^^^^^^^^^^^^ must be a struct, enum, or union in the current crate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0120`.
diff --git a/tests/ui/dropck/drop-with-active-borrows-1.stderr b/tests/ui/dropck/drop-with-active-borrows-1.stderr
index 0409ffa02..229514c6f 100644
--- a/tests/ui/dropck/drop-with-active-borrows-1.stderr
+++ b/tests/ui/dropck/drop-with-active-borrows-1.stderr
@@ -10,6 +10,6 @@ LL | drop(a);
LL | for s in &b {
| -- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0505`.
diff --git a/tests/ui/dropck/drop-with-active-borrows-2.stderr b/tests/ui/dropck/drop-with-active-borrows-2.stderr
index ffec9306b..9d5c500f8 100644
--- a/tests/ui/dropck/drop-with-active-borrows-2.stderr
+++ b/tests/ui/dropck/drop-with-active-borrows-2.stderr
@@ -7,6 +7,6 @@ LL | raw_lines.iter().map(|l| l.trim()).collect()
| returns a value referencing data owned by the current function
| `raw_lines` is borrowed here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/dropck/dropck-union.stderr b/tests/ui/dropck/dropck-union.stderr
index 7d48e9fdc..7828aaf23 100644
--- a/tests/ui/dropck/dropck-union.stderr
+++ b/tests/ui/dropck/dropck-union.stderr
@@ -11,6 +11,6 @@ LL | }
| `v` dropped here while still borrowed
| borrow might be used here, when `v` is dropped and runs the `Drop` code for type `Wrap`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/dropck/dropck_no_diverge_on_nonregular_1.stderr b/tests/ui/dropck/dropck_no_diverge_on_nonregular_1.stderr
index 3e39d15f9..8f4d301b5 100644
--- a/tests/ui/dropck/dropck_no_diverge_on_nonregular_1.stderr
+++ b/tests/ui/dropck/dropck_no_diverge_on_nonregular_1.stderr
@@ -6,6 +6,6 @@ LL | let ft =
|
= note: overflowed on FingerTree<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<i32>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0320`.
diff --git a/tests/ui/dropck/dropck_no_diverge_on_nonregular_2.stderr b/tests/ui/dropck/dropck_no_diverge_on_nonregular_2.stderr
index dbb743544..4ef7aa61d 100644
--- a/tests/ui/dropck/dropck_no_diverge_on_nonregular_2.stderr
+++ b/tests/ui/dropck/dropck_no_diverge_on_nonregular_2.stderr
@@ -6,6 +6,6 @@ LL | let ft =
|
= note: overflowed on FingerTree<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<i32>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0320`.
diff --git a/tests/ui/dropck/dropck_trait_cycle_checked.stderr b/tests/ui/dropck/dropck_trait_cycle_checked.stderr
index 4d4f7b9df..63fd07a91 100644
--- a/tests/ui/dropck/dropck_trait_cycle_checked.stderr
+++ b/tests/ui/dropck/dropck_trait_cycle_checked.stderr
@@ -8,6 +8,8 @@ LL | o1.set0(&o2);
...
LL | }
| - `o2` dropped here while still borrowed
+ |
+ = note: due to object lifetime defaults, `Box<dyn Obj<'_>>` actually means `Box<(dyn Obj<'_> + 'static)>`
error[E0597]: `o3` does not live long enough
--> $DIR/dropck_trait_cycle_checked.rs:112:13
@@ -20,6 +22,8 @@ LL | o1.set1(&o3);
...
LL | }
| - `o3` dropped here while still borrowed
+ |
+ = note: due to object lifetime defaults, `Box<dyn Obj<'_>>` actually means `Box<(dyn Obj<'_> + 'static)>`
error[E0597]: `o2` does not live long enough
--> $DIR/dropck_trait_cycle_checked.rs:113:13
@@ -32,6 +36,8 @@ LL | o2.set0(&o2);
...
LL | }
| - `o2` dropped here while still borrowed
+ |
+ = note: due to object lifetime defaults, `Box<dyn Obj<'_>>` actually means `Box<(dyn Obj<'_> + 'static)>`
error[E0597]: `o3` does not live long enough
--> $DIR/dropck_trait_cycle_checked.rs:114:13
@@ -44,6 +50,8 @@ LL | o2.set1(&o3);
...
LL | }
| - `o3` dropped here while still borrowed
+ |
+ = note: due to object lifetime defaults, `Box<dyn Obj<'_>>` actually means `Box<(dyn Obj<'_> + 'static)>`
error[E0597]: `o1` does not live long enough
--> $DIR/dropck_trait_cycle_checked.rs:115:13
@@ -56,6 +64,8 @@ LL | o3.set0(&o1);
LL | o3.set1(&o2);
LL | }
| - `o1` dropped here while still borrowed
+ |
+ = note: due to object lifetime defaults, `Box<dyn Obj<'_>>` actually means `Box<(dyn Obj<'_> + 'static)>`
error[E0597]: `o2` does not live long enough
--> $DIR/dropck_trait_cycle_checked.rs:116:13
@@ -67,6 +77,8 @@ LL | o3.set1(&o2);
| ^^^ borrowed value does not live long enough
LL | }
| - `o2` dropped here while still borrowed
+ |
+ = note: due to object lifetime defaults, `Box<dyn Obj<'_>>` actually means `Box<(dyn Obj<'_> + 'static)>`
error: aborting due to 6 previous errors
diff --git a/tests/ui/dropck/explicit-implied-outlives.bad1.stderr b/tests/ui/dropck/explicit-implied-outlives.bad1.stderr
index bf6d70e7d..82bc7bc08 100644
--- a/tests/ui/dropck/explicit-implied-outlives.bad1.stderr
+++ b/tests/ui/dropck/explicit-implied-outlives.bad1.stderr
@@ -10,6 +10,6 @@ note: the implementor must specify the same requirement
LL | struct DropMe<'a, T>(&'a T);
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0367`.
diff --git a/tests/ui/dropck/explicit-implied-outlives.bad2.stderr b/tests/ui/dropck/explicit-implied-outlives.bad2.stderr
index 27a15170b..9d2436f05 100644
--- a/tests/ui/dropck/explicit-implied-outlives.bad2.stderr
+++ b/tests/ui/dropck/explicit-implied-outlives.bad2.stderr
@@ -10,6 +10,6 @@ note: the implementor must specify the same requirement
LL | struct DropMe<'a, T>(&'a T);
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0367`.
diff --git a/tests/ui/dropck/issue-38868.stderr b/tests/ui/dropck/issue-38868.stderr
index ec81c2ea6..61fef42fd 100644
--- a/tests/ui/dropck/issue-38868.stderr
+++ b/tests/ui/dropck/issue-38868.stderr
@@ -11,6 +11,6 @@ note: use the same sequence of generic lifetime, type and const parameters as th
LL | pub struct List<T> {
| ^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0366`.
diff --git a/tests/ui/dropck/negative.stderr b/tests/ui/dropck/negative.stderr
index d613e30b5..886b05e34 100644
--- a/tests/ui/dropck/negative.stderr
+++ b/tests/ui/dropck/negative.stderr
@@ -4,5 +4,5 @@ error: negative `Drop` impls are not supported
LL | impl !Drop for NonDrop {}
| ^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/dropck/relate_lt_in_type_outlives_bound.stderr b/tests/ui/dropck/relate_lt_in_type_outlives_bound.stderr
index 3d9685db6..9c13b6dc2 100644
--- a/tests/ui/dropck/relate_lt_in_type_outlives_bound.stderr
+++ b/tests/ui/dropck/relate_lt_in_type_outlives_bound.stderr
@@ -10,6 +10,6 @@ note: the implementor must specify the same requirement
LL | struct Wrapper<'a, T>(&'a T)
| ^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0367`.
diff --git a/tests/ui/dropck/reservation.stderr b/tests/ui/dropck/reservation.stderr
index 19325d6ed..a6ebf158a 100644
--- a/tests/ui/dropck/reservation.stderr
+++ b/tests/ui/dropck/reservation.stderr
@@ -4,5 +4,5 @@ error: reservation `Drop` impls are not supported
LL | impl Drop for ReservedDrop {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/dropck/transitive-outlives.bad.stderr b/tests/ui/dropck/transitive-outlives.bad.stderr
index da5088b27..9ecc4841d 100644
--- a/tests/ui/dropck/transitive-outlives.bad.stderr
+++ b/tests/ui/dropck/transitive-outlives.bad.stderr
@@ -10,6 +10,6 @@ note: the implementor must specify the same requirement
LL | struct DropMe<'a, 'b: 'a, 'c: 'b>(PhantomData<&'a ()>, PhantomData<&'b ()>, PhantomData<&'c ()>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0367`.
diff --git a/tests/ui/dst/dst-bad-assign-2.stderr b/tests/ui/dst/dst-bad-assign-2.stderr
index 6c9e2971c..bca22036f 100644
--- a/tests/ui/dst/dst-bad-assign-2.stderr
+++ b/tests/ui/dst/dst-bad-assign-2.stderr
@@ -7,6 +7,6 @@ LL | f5.ptr = *z;
= help: the trait `Sized` is not implemented for `dyn ToBar`
= note: the left-hand-side of an assignment must have a statically known size
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/dst/dst-bad-deep-2.stderr b/tests/ui/dst/dst-bad-deep-2.stderr
index b22850814..c7e985434 100644
--- a/tests/ui/dst/dst-bad-deep-2.stderr
+++ b/tests/ui/dst/dst-bad-deep-2.stderr
@@ -9,6 +9,6 @@ LL | let h: &(([isize],),) = &(*g,);
= note: required because it appears within the type `(([isize],),)`
= note: tuples must have a statically known size to be initialized
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/dst/dst-bad-deep.stderr b/tests/ui/dst/dst-bad-deep.stderr
index 98db79591..1b0f9738a 100644
--- a/tests/ui/dst/dst-bad-deep.stderr
+++ b/tests/ui/dst/dst-bad-deep.stderr
@@ -12,6 +12,6 @@ LL | struct Fat<T: ?Sized> {
| ^^^
= note: structs must have a statically known size to be initialized
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/dst/issue-113447.stderr b/tests/ui/dst/issue-113447.stderr
index 240553a67..266eb2280 100644
--- a/tests/ui/dst/issue-113447.stderr
+++ b/tests/ui/dst/issue-113447.stderr
@@ -20,6 +20,6 @@ help: convert the array to a `&[u8]` slice instead
LL | let _ = &[0u8] == &[0xAA][..];
| + ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/duplicate/dupe-symbols-1.stderr b/tests/ui/duplicate/dupe-symbols-1.stderr
index 933ed5e89..03ebc9d6e 100644
--- a/tests/ui/duplicate/dupe-symbols-1.stderr
+++ b/tests/ui/duplicate/dupe-symbols-1.stderr
@@ -4,5 +4,5 @@ error: symbol `fail` is already defined
LL | pub fn b() {
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/duplicate/dupe-symbols-2.stderr b/tests/ui/duplicate/dupe-symbols-2.stderr
index b132eae4b..091c3051e 100644
--- a/tests/ui/duplicate/dupe-symbols-2.stderr
+++ b/tests/ui/duplicate/dupe-symbols-2.stderr
@@ -4,5 +4,5 @@ error: symbol `fail` is already defined
LL | pub extern "C" fn fail() {
| ^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/duplicate/dupe-symbols-3.stderr b/tests/ui/duplicate/dupe-symbols-3.stderr
index 6300b4908..9417f8817 100644
--- a/tests/ui/duplicate/dupe-symbols-3.stderr
+++ b/tests/ui/duplicate/dupe-symbols-3.stderr
@@ -4,5 +4,5 @@ error: symbol `fail` is already defined
LL | pub fn fail() {
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/duplicate/dupe-symbols-4.stderr b/tests/ui/duplicate/dupe-symbols-4.stderr
index 1407a4883..4c5f1e786 100644
--- a/tests/ui/duplicate/dupe-symbols-4.stderr
+++ b/tests/ui/duplicate/dupe-symbols-4.stderr
@@ -4,5 +4,5 @@ error: symbol `fail` is already defined
LL | fn fail(self) {}
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/duplicate/dupe-symbols-5.stderr b/tests/ui/duplicate/dupe-symbols-5.stderr
index 558f868a0..74c296e33 100644
--- a/tests/ui/duplicate/dupe-symbols-5.stderr
+++ b/tests/ui/duplicate/dupe-symbols-5.stderr
@@ -4,5 +4,5 @@ error: symbol `fail` is already defined
LL | pub fn b() {
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/duplicate/dupe-symbols-6.stderr b/tests/ui/duplicate/dupe-symbols-6.stderr
index 6692a63dc..2be681327 100644
--- a/tests/ui/duplicate/dupe-symbols-6.stderr
+++ b/tests/ui/duplicate/dupe-symbols-6.stderr
@@ -4,5 +4,5 @@ error: symbol `fail` is already defined
LL | static HELLO_TWICE: u16 = 0;
| ^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/duplicate/dupe-symbols-7.stderr b/tests/ui/duplicate/dupe-symbols-7.stderr
index cd5147c0e..23f74ef75 100644
--- a/tests/ui/duplicate/dupe-symbols-7.stderr
+++ b/tests/ui/duplicate/dupe-symbols-7.stderr
@@ -6,5 +6,5 @@ LL | fn main(){}
|
= help: did you use `#[no_mangle]` on `fn main`? Use `#[start]` instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/duplicate/dupe-symbols-8.stderr b/tests/ui/duplicate/dupe-symbols-8.stderr
index 8d6a79e12..67eb0bc71 100644
--- a/tests/ui/duplicate/dupe-symbols-8.stderr
+++ b/tests/ui/duplicate/dupe-symbols-8.stderr
@@ -6,5 +6,5 @@ LL | fn main() {
|
= help: did you use `#[no_mangle]` on `fn main`? Use `#[start]` instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/duplicate/duplicate-check-macro-exports.stderr b/tests/ui/duplicate/duplicate-check-macro-exports.stderr
index ba723b38b..eff19c090 100644
--- a/tests/ui/duplicate/duplicate-check-macro-exports.stderr
+++ b/tests/ui/duplicate/duplicate-check-macro-exports.stderr
@@ -13,6 +13,6 @@ help: you can use `as` to change the binding name of the import
LL | pub use std::panic as other_panic;
| ~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0255`.
diff --git a/tests/ui/duplicate/duplicate-parameter.stderr b/tests/ui/duplicate/duplicate-parameter.stderr
index f3ef0bcf3..413d8b6f8 100644
--- a/tests/ui/duplicate/duplicate-parameter.stderr
+++ b/tests/ui/duplicate/duplicate-parameter.stderr
@@ -4,6 +4,6 @@ error[E0415]: identifier `a` is bound more than once in this parameter list
LL | fn f(a: isize, a: isize) {}
| ^ used as parameter more than once
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0415`.
diff --git a/tests/ui/duplicate_entry_error.stderr b/tests/ui/duplicate_entry_error.stderr
index 6d078dfbd..3b5998df3 100644
--- a/tests/ui/duplicate_entry_error.stderr
+++ b/tests/ui/duplicate_entry_error.stderr
@@ -1,13 +1,16 @@
error[E0152]: found duplicate lang item `panic_impl`
--> $DIR/duplicate_entry_error.rs:11:1
|
-LL | fn panic_impl(info: &PanicInfo) -> ! {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | / fn panic_impl(info: &PanicInfo) -> ! {
+LL | |
+LL | | loop {}
+LL | | }
+ | |_^
|
= note: the lang item is first defined in crate `std` (which `duplicate_entry_error` depends on)
= note: first definition in `std` loaded from SYSROOT/libstd-*.rlib
= note: second definition in the local crate (`duplicate_entry_error`)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0152`.
diff --git a/tests/ui/dyn-keyword/dyn-angle-brackets.stderr b/tests/ui/dyn-keyword/dyn-angle-brackets.stderr
index 0bb764d71..0b194cb83 100644
--- a/tests/ui/dyn-keyword/dyn-angle-brackets.stderr
+++ b/tests/ui/dyn-keyword/dyn-angle-brackets.stderr
@@ -16,5 +16,5 @@ help: use `dyn`
LL | <dyn fmt::Debug>::fmt(self, f)
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/dyn-star/align.normal.stderr b/tests/ui/dyn-star/align.normal.stderr
index 42fa4fd6f..d3ee0d3e5 100644
--- a/tests/ui/dyn-star/align.normal.stderr
+++ b/tests/ui/dyn-star/align.normal.stderr
@@ -15,6 +15,6 @@ LL | let x = AlignedUsize(12) as dyn* Debug;
|
= help: the trait `PointerLike` is not implemented for `AlignedUsize`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/dyn-star/align.over_aligned.stderr b/tests/ui/dyn-star/align.over_aligned.stderr
index 42fa4fd6f..d3ee0d3e5 100644
--- a/tests/ui/dyn-star/align.over_aligned.stderr
+++ b/tests/ui/dyn-star/align.over_aligned.stderr
@@ -15,6 +15,6 @@ LL | let x = AlignedUsize(12) as dyn* Debug;
|
= help: the trait `PointerLike` is not implemented for `AlignedUsize`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/dyn-star/box.rs b/tests/ui/dyn-star/box.rs
index 87c8356a1..8b2f46bd1 100644
--- a/tests/ui/dyn-star/box.rs
+++ b/tests/ui/dyn-star/box.rs
@@ -1,7 +1,7 @@
// run-pass
// revisions: current next
//[current] compile-flags: -C opt-level=0
-//[next] compile-flags: -Ztrait-solver=next -C opt-level=0
+//[next] compile-flags: -Znext-solver -C opt-level=0
#![feature(dyn_star)]
#![allow(incomplete_features)]
diff --git a/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.current.stderr b/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.current.stderr
index ba42f619a..f291b1e2c 100644
--- a/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.current.stderr
+++ b/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.current.stderr
@@ -10,6 +10,6 @@ help: consider introducing a `where` clause, but there might be an alternative b
LL | fn polymorphic<T: Debug + ?Sized>(t: &T) where &T: PointerLike {
| +++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.next.stderr b/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.next.stderr
index ba42f619a..f291b1e2c 100644
--- a/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.next.stderr
+++ b/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.next.stderr
@@ -10,6 +10,6 @@ help: consider introducing a `where` clause, but there might be an alternative b
LL | fn polymorphic<T: Debug + ?Sized>(t: &T) where &T: PointerLike {
| +++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs b/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs
index 9846f8714..dffe6ae8a 100644
--- a/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs
+++ b/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs
@@ -1,5 +1,5 @@
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
#![feature(dyn_star)]
#![allow(incomplete_features)]
diff --git a/tests/ui/dyn-star/check-size-at-cast.stderr b/tests/ui/dyn-star/check-size-at-cast.stderr
index e60b5c56f..b402403ee 100644
--- a/tests/ui/dyn-star/check-size-at-cast.stderr
+++ b/tests/ui/dyn-star/check-size-at-cast.stderr
@@ -6,6 +6,6 @@ LL | let i = [1, 2, 3, 4] as dyn* Debug;
|
= help: the trait `PointerLike` is not implemented for `[i32; 4]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/dyn-star/dispatch-on-pin-mut.rs b/tests/ui/dyn-star/dispatch-on-pin-mut.rs
index 5774c8b2a..c4ae279e6 100644
--- a/tests/ui/dyn-star/dispatch-on-pin-mut.rs
+++ b/tests/ui/dyn-star/dispatch-on-pin-mut.rs
@@ -4,6 +4,7 @@
#![feature(dyn_star)]
//~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes
+#![feature(noop_waker)]
use std::future::Future;
@@ -18,33 +19,18 @@ async fn async_main() {
// ------------------------------------------------------------------------- //
// Implementation Details Below...
-use std::pin::Pin;
use std::task::*;
-
-pub fn noop_waker() -> Waker {
- let raw = RawWaker::new(std::ptr::null(), &NOOP_WAKER_VTABLE);
-
- // SAFETY: the contracts for RawWaker and RawWakerVTable are upheld
- unsafe { Waker::from_raw(raw) }
-}
-
-const NOOP_WAKER_VTABLE: RawWakerVTable = RawWakerVTable::new(noop_clone, noop, noop, noop);
-
-unsafe fn noop_clone(_p: *const ()) -> RawWaker {
- RawWaker::new(std::ptr::null(), &NOOP_WAKER_VTABLE)
-}
-
-unsafe fn noop(_p: *const ()) {}
+use std::pin::pin;
fn main() {
- let mut fut = async_main();
+ let mut fut = pin!(async_main());
// Poll loop, just to test the future...
- let waker = noop_waker();
+ let waker = Waker::noop();
let ctx = &mut Context::from_waker(&waker);
loop {
- match unsafe { Pin::new_unchecked(&mut fut).poll(ctx) } {
+ match fut.as_mut().poll(ctx) {
Poll::Pending => {}
Poll::Ready(()) => break,
}
diff --git a/tests/ui/dyn-star/dyn-to-rigid.stderr b/tests/ui/dyn-star/dyn-to-rigid.stderr
index 588e6d97e..b198c5245 100644
--- a/tests/ui/dyn-star/dyn-to-rigid.stderr
+++ b/tests/ui/dyn-star/dyn-to-rigid.stderr
@@ -4,6 +4,6 @@ error[E0606]: casting `(dyn* Tr + 'static)` as `usize` is invalid
LL | x as usize
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0606`.
diff --git a/tests/ui/dyn-star/error.stderr b/tests/ui/dyn-star/error.stderr
index e039bb6f1..a9f4a0545 100644
--- a/tests/ui/dyn-star/error.stderr
+++ b/tests/ui/dyn-star/error.stderr
@@ -10,6 +10,6 @@ help: this trait has no implementations, consider adding one
LL | trait Foo {}
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/dyn-star/feature-gate-dyn_star.stderr b/tests/ui/dyn-star/feature-gate-dyn_star.stderr
index 342e71c3a..d8fe25b84 100644
--- a/tests/ui/dyn-star/feature-gate-dyn_star.stderr
+++ b/tests/ui/dyn-star/feature-gate-dyn_star.stderr
@@ -7,6 +7,6 @@ LL | pub fn dyn_star_parameter(_: &dyn* Send) {
= note: see issue #102425 <https://github.com/rust-lang/rust/issues/102425> for more information
= help: add `#![feature(dyn_star)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/dyn-star/gated-span.stderr b/tests/ui/dyn-star/gated-span.stderr
index 626b6cd1b..da5afa2d5 100644
--- a/tests/ui/dyn-star/gated-span.stderr
+++ b/tests/ui/dyn-star/gated-span.stderr
@@ -7,6 +7,6 @@ LL | t!(dyn* Send);
= note: see issue #102425 <https://github.com/rust-lang/rust/issues/102425> for more information
= help: add `#![feature(dyn_star)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/dyn-star/no-explicit-dyn-star.stderr b/tests/ui/dyn-star/no-explicit-dyn-star.stderr
index 49706fae1..641404aa0 100644
--- a/tests/ui/dyn-star/no-explicit-dyn-star.stderr
+++ b/tests/ui/dyn-star/no-explicit-dyn-star.stderr
@@ -4,6 +4,6 @@ error[E0606]: casting `usize` as `dyn* std::fmt::Display` is invalid
LL | dyn_star_foreign::require_dyn_star_display(1usize as _);
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0606`.
diff --git a/tests/ui/dyn-star/no-implicit-dyn-star.stderr b/tests/ui/dyn-star/no-implicit-dyn-star.stderr
index 66e1b9a09..06c7bcc57 100644
--- a/tests/ui/dyn-star/no-implicit-dyn-star.stderr
+++ b/tests/ui/dyn-star/no-implicit-dyn-star.stderr
@@ -14,6 +14,6 @@ note: function defined here
LL | pub fn require_dyn_star_display(_: dyn* Display) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/dyn-star/no-unsize-coerce-dyn-trait.stderr b/tests/ui/dyn-star/no-unsize-coerce-dyn-trait.stderr
index c7f1a4b9a..1f7bfb1d5 100644
--- a/tests/ui/dyn-star/no-unsize-coerce-dyn-trait.stderr
+++ b/tests/ui/dyn-star/no-unsize-coerce-dyn-trait.stderr
@@ -18,6 +18,6 @@ LL | let y: Box<dyn* B> = x;
= note: expected struct `Box<dyn* B>`
found struct `Box<dyn* A>`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/dyn-star/param-env-region-infer.current.stderr b/tests/ui/dyn-star/param-env-region-infer.current.stderr
index b982be451..b50117c1e 100644
--- a/tests/ui/dyn-star/param-env-region-infer.current.stderr
+++ b/tests/ui/dyn-star/param-env-region-infer.current.stderr
@@ -4,6 +4,6 @@ error[E0282]: type annotations needed
LL | t as _
| ^ cannot infer type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/dyn-star/param-env-region-infer.rs b/tests/ui/dyn-star/param-env-region-infer.rs
index 50dec94d2..1e3317777 100644
--- a/tests/ui/dyn-star/param-env-region-infer.rs
+++ b/tests/ui/dyn-star/param-env-region-infer.rs
@@ -1,7 +1,7 @@
// revisions: current
// incremental
-// FIXME(-Ztrait-solver=next): THis currently results in unstable query results:
+// FIXME(-Znext-solver): THis currently results in unstable query results:
// `normalizes-to(opaque, opaque)` changes from `Maybe(Ambiguous)` to `Maybe(Overflow)`
// once the hidden type of the opaque is already defined to be itself.
diff --git a/tests/ui/dyn-star/unsize-into-ref-dyn-star.stderr b/tests/ui/dyn-star/unsize-into-ref-dyn-star.stderr
index f6444a60a..b3274580a 100644
--- a/tests/ui/dyn-star/unsize-into-ref-dyn-star.stderr
+++ b/tests/ui/dyn-star/unsize-into-ref-dyn-star.stderr
@@ -4,6 +4,6 @@ error[E0605]: non-primitive cast: `i32` as `&dyn* Debug`
LL | let i = 42 as &dyn* Debug;
| ^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0605`.
diff --git a/tests/ui/dyn-star/upcast.stderr b/tests/ui/dyn-star/upcast.stderr
index 8b34c7f8b..adef9525b 100644
--- a/tests/ui/dyn-star/upcast.stderr
+++ b/tests/ui/dyn-star/upcast.stderr
@@ -15,6 +15,6 @@ LL | let w: dyn* Bar = w;
|
= help: the trait `PointerLike` is not implemented for `dyn* Foo`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/editions/dyn-trait-sugg-2021.stderr b/tests/ui/editions/dyn-trait-sugg-2021.stderr
index 8c68dec1d..8a65fea11 100644
--- a/tests/ui/editions/dyn-trait-sugg-2021.stderr
+++ b/tests/ui/editions/dyn-trait-sugg-2021.stderr
@@ -9,6 +9,6 @@ help: add `dyn` keyword before this trait
LL | <dyn Foo>::hi(123);
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0782`.
diff --git a/tests/ui/editions/edition-cstr-2015-2018.rs b/tests/ui/editions/edition-cstr-2015-2018.rs
new file mode 100644
index 000000000..4c35c4864
--- /dev/null
+++ b/tests/ui/editions/edition-cstr-2015-2018.rs
@@ -0,0 +1,62 @@
+macro_rules! construct { ($x:ident) => { $x"str" } }
+ //~^ ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `"str"`
+ //~| NOTE expected one of 8 possible tokens
+
+macro_rules! contain { () => { c"str" } }
+ //~^ ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `"str"`
+ //~| NOTE expected one of 8 possible tokens
+ //~| NOTE you may be trying to write a c-string literal
+ //~| NOTE c-string literals require Rust 2021 or later
+ //~| HELP pass `--edition 2021` to `rustc`
+ //~| NOTE for more on editions, read https://doc.rust-lang.org/edition-guide
+
+fn check_macro_construct() {
+ construct!(c); //~ NOTE in this expansion of construct!
+}
+
+fn check_macro_contain() {
+ contain!();
+ //~^ NOTE in this expansion of contain!
+ //~| NOTE in this expansion of contain!
+ //~| NOTE in this expansion of contain!
+ //~| NOTE in this expansion of contain!
+ //~| NOTE in this expansion of contain!
+}
+
+fn check_basic() {
+ c"str";
+ //~^ ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `"str"`
+ //~| NOTE expected one of 8 possible tokens
+ //~| NOTE you may be trying to write a c-string literal
+ //~| NOTE c-string literals require Rust 2021 or later
+ //~| HELP pass `--edition 2021` to `rustc`
+ //~| NOTE for more on editions, read https://doc.rust-lang.org/edition-guide
+}
+
+fn check_craw() {
+ cr"str";
+ //~^ ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `"str"`
+ //~| NOTE expected one of 8 possible tokens
+ //~| NOTE you may be trying to write a c-string literal
+ //~| NOTE c-string literals require Rust 2021 or later
+ //~| HELP pass `--edition 2021` to `rustc`
+ //~| NOTE for more on editions, read https://doc.rust-lang.org/edition-guide
+}
+
+fn check_craw_hash() {
+ cr##"str"##;
+ //~^ ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `#`
+ //~| NOTE expected one of 8 possible tokens
+ //~| NOTE you may be trying to write a c-string literal
+ //~| NOTE c-string literals require Rust 2021 or later
+ //~| HELP pass `--edition 2021` to `rustc`
+ //~| NOTE for more on editions, read https://doc.rust-lang.org/edition-guide
+}
+
+fn check_cstr_space() {
+ c "str";
+ //~^ ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `"str"`
+ //~| NOTE expected one of 8 possible tokens
+}
+
+fn main() {}
diff --git a/tests/ui/editions/edition-cstr-2015-2018.stderr b/tests/ui/editions/edition-cstr-2015-2018.stderr
new file mode 100644
index 000000000..b864df308
--- /dev/null
+++ b/tests/ui/editions/edition-cstr-2015-2018.stderr
@@ -0,0 +1,67 @@
+error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `"str"`
+ --> $DIR/edition-cstr-2015-2018.rs:27:6
+ |
+LL | c"str";
+ | ^^^^^ expected one of 8 possible tokens
+ |
+ = note: you may be trying to write a c-string literal
+ = note: c-string literals require Rust 2021 or later
+ = help: pass `--edition 2021` to `rustc`
+ = note: for more on editions, read https://doc.rust-lang.org/edition-guide
+
+error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `"str"`
+ --> $DIR/edition-cstr-2015-2018.rs:37:7
+ |
+LL | cr"str";
+ | ^^^^^ expected one of 8 possible tokens
+ |
+ = note: you may be trying to write a c-string literal
+ = note: c-string literals require Rust 2021 or later
+ = help: pass `--edition 2021` to `rustc`
+ = note: for more on editions, read https://doc.rust-lang.org/edition-guide
+
+error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `#`
+ --> $DIR/edition-cstr-2015-2018.rs:47:7
+ |
+LL | cr##"str"##;
+ | ^ expected one of 8 possible tokens
+ |
+ = note: you may be trying to write a c-string literal
+ = note: c-string literals require Rust 2021 or later
+ = help: pass `--edition 2021` to `rustc`
+ = note: for more on editions, read https://doc.rust-lang.org/edition-guide
+
+error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `"str"`
+ --> $DIR/edition-cstr-2015-2018.rs:57:7
+ |
+LL | c "str";
+ | ^^^^^ expected one of 8 possible tokens
+
+error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `"str"`
+ --> $DIR/edition-cstr-2015-2018.rs:1:44
+ |
+LL | macro_rules! construct { ($x:ident) => { $x"str" } }
+ | ^^^^^ expected one of 8 possible tokens
+...
+LL | construct!(c);
+ | ------------- in this macro invocation
+ |
+ = note: this error originates in the macro `construct` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `"str"`
+ --> $DIR/edition-cstr-2015-2018.rs:5:33
+ |
+LL | macro_rules! contain { () => { c"str" } }
+ | ^^^^^ expected one of 8 possible tokens
+...
+LL | contain!();
+ | ---------- in this macro invocation
+ |
+ = note: you may be trying to write a c-string literal
+ = note: c-string literals require Rust 2021 or later
+ = help: pass `--edition 2021` to `rustc`
+ = note: for more on editions, read https://doc.rust-lang.org/edition-guide
+ = note: this error originates in the macro `contain` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to 6 previous errors
+
diff --git a/tests/ui/editions/edition-feature-ok.rs b/tests/ui/editions/edition-feature-ok.rs
deleted file mode 100644
index 69242fd71..000000000
--- a/tests/ui/editions/edition-feature-ok.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-// check-pass
-
-#![feature(rust_2018_preview)]
-
-fn main() {}
diff --git a/tests/ui/editions/edition-feature-redundant.rs b/tests/ui/editions/edition-feature-redundant.rs
deleted file mode 100644
index 1049a2da8..000000000
--- a/tests/ui/editions/edition-feature-redundant.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-// edition:2018
-// check-pass
-
-#![feature(rust_2018_preview)]
-//~^ WARN the feature `rust_2018_preview` is included in the Rust 2018 edition
-
-fn main() {}
diff --git a/tests/ui/editions/edition-feature-redundant.stderr b/tests/ui/editions/edition-feature-redundant.stderr
deleted file mode 100644
index b11e616d7..000000000
--- a/tests/ui/editions/edition-feature-redundant.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-warning[E0705]: the feature `rust_2018_preview` is included in the Rust 2018 edition
- --> $DIR/edition-feature-redundant.rs:4:12
- |
-LL | #![feature(rust_2018_preview)]
- | ^^^^^^^^^^^^^^^^^
-
-warning: 1 warning emitted
-
-For more information about this error, try `rustc --explain E0705`.
diff --git a/tests/ui/editions/edition-imports-2015.stderr b/tests/ui/editions/edition-imports-2015.stderr
index 3f38e6f8e..606843361 100644
--- a/tests/ui/editions/edition-imports-2015.stderr
+++ b/tests/ui/editions/edition-imports-2015.stderr
@@ -6,5 +6,5 @@ LL | gen_glob!();
|
= note: this error originates in the macro `gen_glob` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/editions/edition-imports-2018.stderr b/tests/ui/editions/edition-imports-2018.stderr
index e7f760e49..4776478b9 100644
--- a/tests/ui/editions/edition-imports-2018.stderr
+++ b/tests/ui/editions/edition-imports-2018.stderr
@@ -6,5 +6,5 @@ LL | gen_glob!();
|
= note: this error originates in the macro `gen_glob` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/editions/edition-imports-virtual-2015-gated.stderr b/tests/ui/editions/edition-imports-virtual-2015-gated.stderr
index e4bdd2821..83c648e54 100644
--- a/tests/ui/editions/edition-imports-virtual-2015-gated.stderr
+++ b/tests/ui/editions/edition-imports-virtual-2015-gated.stderr
@@ -6,6 +6,6 @@ LL | gen_gated!();
|
= note: this error originates in the macro `gen_gated` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/editions/edition-keywords-2015-2018-expansion.stderr b/tests/ui/editions/edition-keywords-2015-2018-expansion.stderr
index 570bbac2b..c66ccf1ba 100644
--- a/tests/ui/editions/edition-keywords-2015-2018-expansion.stderr
+++ b/tests/ui/editions/edition-keywords-2015-2018-expansion.stderr
@@ -11,5 +11,5 @@ help: escape `async` to use it as an identifier
LL | () => (pub fn r#async() {})
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/editions/edition-keywords-2018-2018-expansion.stderr b/tests/ui/editions/edition-keywords-2018-2018-expansion.stderr
index 69f275746..6bfc06ad7 100644
--- a/tests/ui/editions/edition-keywords-2018-2018-expansion.stderr
+++ b/tests/ui/editions/edition-keywords-2018-2018-expansion.stderr
@@ -11,5 +11,5 @@ help: escape `async` to use it as an identifier
LL | () => (pub fn r#async() {})
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/editions/edition-raw-pointer-method-2015.stderr b/tests/ui/editions/edition-raw-pointer-method-2015.stderr
index 612dd17e7..3d8b3f633 100644
--- a/tests/ui/editions/edition-raw-pointer-method-2015.stderr
+++ b/tests/ui/editions/edition-raw-pointer-method-2015.stderr
@@ -13,5 +13,5 @@ LL | #[deny(warnings)]
| ^^^^^^^^
= note: `#[deny(tyvar_behind_raw_pointer)]` implied by `#[deny(warnings)]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/editions/edition-raw-pointer-method-2018.stderr b/tests/ui/editions/edition-raw-pointer-method-2018.stderr
index b9afa0133..663843ad7 100644
--- a/tests/ui/editions/edition-raw-pointer-method-2018.stderr
+++ b/tests/ui/editions/edition-raw-pointer-method-2018.stderr
@@ -4,6 +4,6 @@ error[E0699]: cannot call a method on a raw pointer with an unknown pointee type
LL | let _ = y.is_null();
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0699`.
diff --git a/tests/ui/editions/epoch-gate-feature.rs b/tests/ui/editions/epoch-gate-feature.rs
deleted file mode 100644
index 5f7feb534..000000000
--- a/tests/ui/editions/epoch-gate-feature.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// run-pass
-
-#![allow(dead_code)]
-#![allow(unused_variables)]
-// Checks if the correct registers are being used to pass arguments
-// when the sysv64 ABI is specified.
-
-#![feature(rust_2018_preview)]
-
-pub trait Foo {}
-
-// should compile without the dyn trait feature flag
-fn foo(x: &dyn Foo) {}
-
-pub fn main() {}
diff --git a/tests/ui/elide-errors-on-mismatched-tuple.stderr b/tests/ui/elide-errors-on-mismatched-tuple.stderr
index e0537ff6f..f852a223b 100644
--- a/tests/ui/elide-errors-on-mismatched-tuple.stderr
+++ b/tests/ui/elide-errors-on-mismatched-tuple.stderr
@@ -9,6 +9,6 @@ LL | let (a, b, c) = (A::new(), A::new()); // This tuple is 2 elements, shou
= note: expected tuple `(A, A)`
found tuple `(_, _, _)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/elided-test.stderr b/tests/ui/elided-test.stderr
index c74c307c4..e323b8ba7 100644
--- a/tests/ui/elided-test.stderr
+++ b/tests/ui/elided-test.stderr
@@ -4,6 +4,6 @@ error[E0601]: `main` function not found in crate `elided_test`
LL | }
| ^ consider adding a `main` function to `$DIR/elided-test.rs`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0601`.
diff --git a/tests/ui/empty/empty-comment.stderr b/tests/ui/empty/empty-comment.stderr
index 7cc8d8fe9..07a1d9b45 100644
--- a/tests/ui/empty/empty-comment.stderr
+++ b/tests/ui/empty/empty-comment.stderr
@@ -13,5 +13,5 @@ note: while trying to match meta-variable `$fmt:expr`
LL | ($fmt:expr) => (print!(concat!($fmt, "\n")));
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/empty/empty-linkname.stderr b/tests/ui/empty/empty-linkname.stderr
index adcf3670d..9fbcbc3ca 100644
--- a/tests/ui/empty/empty-linkname.stderr
+++ b/tests/ui/empty/empty-linkname.stderr
@@ -4,6 +4,6 @@ error[E0454]: link name must not be empty
LL | #[link(name = "")]
| ^^ empty link name
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0454`.
diff --git a/tests/ui/empty/empty-macro-use.stderr b/tests/ui/empty/empty-macro-use.stderr
index 5d552e4c4..cdf3ff83c 100644
--- a/tests/ui/empty/empty-macro-use.stderr
+++ b/tests/ui/empty/empty-macro-use.stderr
@@ -9,5 +9,5 @@ help: consider importing this macro
LL + use two_macros::macro_two;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/empty/empty-never-array.stderr b/tests/ui/empty/empty-never-array.stderr
index a488e484b..0104a4355 100644
--- a/tests/ui/empty/empty-never-array.stderr
+++ b/tests/ui/empty/empty-never-array.stderr
@@ -19,6 +19,6 @@ help: you might want to use `let else` to handle the variant that isn't matched
LL | let Helper::U(u) = Helper::T(t, []) else { todo!() };
| ++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0005`.
diff --git a/tests/ui/entry-point/imported_main_conflict.stderr b/tests/ui/entry-point/imported_main_conflict.stderr
index 8fadd0e19..783e9345a 100644
--- a/tests/ui/entry-point/imported_main_conflict.stderr
+++ b/tests/ui/entry-point/imported_main_conflict.stderr
@@ -14,6 +14,6 @@ LL | use m2::*;
| ^^^^^
= help: consider adding an explicit import of `main` to disambiguate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0659`.
diff --git a/tests/ui/entry-point/imported_main_const_fn_item_type_forbidden.stderr b/tests/ui/entry-point/imported_main_const_fn_item_type_forbidden.stderr
index fabb6ffb0..1e7d82a73 100644
--- a/tests/ui/entry-point/imported_main_const_fn_item_type_forbidden.stderr
+++ b/tests/ui/entry-point/imported_main_const_fn_item_type_forbidden.stderr
@@ -6,6 +6,6 @@ LL | use foo::BAR as main;
| |
| non-function item at `crate::main` is found
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0601`.
diff --git a/tests/ui/entry-point/imported_main_const_forbidden.stderr b/tests/ui/entry-point/imported_main_const_forbidden.stderr
index 9d8b40dc3..6f34015a2 100644
--- a/tests/ui/entry-point/imported_main_const_forbidden.stderr
+++ b/tests/ui/entry-point/imported_main_const_forbidden.stderr
@@ -6,6 +6,6 @@ LL | use foo::BAR as main;
| |
| non-function item at `crate::main` is found
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0601`.
diff --git a/tests/ui/entry-point/imported_main_from_extern_crate_wrong_type.stderr b/tests/ui/entry-point/imported_main_from_extern_crate_wrong_type.stderr
index 3c6893310..ce4a94670 100644
--- a/tests/ui/entry-point/imported_main_from_extern_crate_wrong_type.stderr
+++ b/tests/ui/entry-point/imported_main_from_extern_crate_wrong_type.stderr
@@ -7,6 +7,6 @@ LL | pub fn boilerplate(x: u8) {}
= note: expected signature `fn()`
found signature `fn(u8)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0580`.
diff --git a/tests/ui/entry-point/issue-118772.rs b/tests/ui/entry-point/issue-118772.rs
new file mode 100644
index 000000000..1a4173e12
--- /dev/null
+++ b/tests/ui/entry-point/issue-118772.rs
@@ -0,0 +1,3 @@
+fn main(_: &i32) { //~ ERROR `main` function has wrong type
+ println!("Hello, world!");
+}
diff --git a/tests/ui/entry-point/issue-118772.stderr b/tests/ui/entry-point/issue-118772.stderr
new file mode 100644
index 000000000..cc33427f5
--- /dev/null
+++ b/tests/ui/entry-point/issue-118772.stderr
@@ -0,0 +1,12 @@
+error[E0580]: `main` function has wrong type
+ --> $DIR/issue-118772.rs:1:1
+ |
+LL | fn main(_: &i32) {
+ | ^^^^^^^^^^^^^^^^ incorrect number of function parameters
+ |
+ = note: expected signature `fn()`
+ found signature `for<'a> fn(&'a i32)`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0580`.
diff --git a/tests/ui/enum-discriminant/arbitrary_enum_discriminant-no-repr.stderr b/tests/ui/enum-discriminant/arbitrary_enum_discriminant-no-repr.stderr
index 8cee74696..3b718c646 100644
--- a/tests/ui/enum-discriminant/arbitrary_enum_discriminant-no-repr.stderr
+++ b/tests/ui/enum-discriminant/arbitrary_enum_discriminant-no-repr.stderr
@@ -4,6 +4,6 @@ error[E0732]: `#[repr(inttype)]` must be specified
LL | enum Enum {
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0732`.
diff --git a/tests/ui/enum-discriminant/forbidden-discriminant-kind-impl.stderr b/tests/ui/enum-discriminant/forbidden-discriminant-kind-impl.stderr
index 38cfd13b9..054bd25a4 100644
--- a/tests/ui/enum-discriminant/forbidden-discriminant-kind-impl.stderr
+++ b/tests/ui/enum-discriminant/forbidden-discriminant-kind-impl.stderr
@@ -4,6 +4,6 @@ error[E0322]: explicit impls for the `DiscriminantKind` trait are not permitted
LL | impl DiscriminantKind for NewType {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of `DiscriminantKind` not allowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0322`.
diff --git a/tests/ui/enum-discriminant/issue-41394.stderr b/tests/ui/enum-discriminant/issue-41394.stderr
index fa95ca9c1..e81562df0 100644
--- a/tests/ui/enum-discriminant/issue-41394.stderr
+++ b/tests/ui/enum-discriminant/issue-41394.stderr
@@ -6,6 +6,6 @@ LL | A = "" + 1
| |
| &str
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice-2.stderr b/tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice-2.stderr
index 2cb159ee2..01d83e6de 100644
--- a/tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice-2.stderr
+++ b/tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice-2.stderr
@@ -6,5 +6,5 @@ LL | Some(T) = std::mem::size_of::<T>(),
|
= note: type parameters may not be used in enum discriminant values
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/enum-discriminant/issue-70453-polymorphic-ctfe.stderr b/tests/ui/enum-discriminant/issue-70453-polymorphic-ctfe.stderr
index 15cd6d303..39f0d086c 100644
--- a/tests/ui/enum-discriminant/issue-70453-polymorphic-ctfe.stderr
+++ b/tests/ui/enum-discriminant/issue-70453-polymorphic-ctfe.stderr
@@ -6,5 +6,5 @@ LL | Some(T) = core::mem::size_of::<*mut T>(),
|
= note: type parameters may not be used in enum discriminant values
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/enum-discriminant/issue-72554.stderr b/tests/ui/enum-discriminant/issue-72554.stderr
index d12be539f..381f24d35 100644
--- a/tests/ui/enum-discriminant/issue-72554.stderr
+++ b/tests/ui/enum-discriminant/issue-72554.stderr
@@ -12,6 +12,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | A(Box<ElemDerived>)
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/enum/enum-and-module-in-same-scope.stderr b/tests/ui/enum/enum-and-module-in-same-scope.stderr
index 538898c2f..0293acd62 100644
--- a/tests/ui/enum/enum-and-module-in-same-scope.stderr
+++ b/tests/ui/enum/enum-and-module-in-same-scope.stderr
@@ -9,6 +9,6 @@ LL | mod Foo {
|
= note: `Foo` must be defined only once in the type namespace of this module
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0428`.
diff --git a/tests/ui/enum/enum-discrim-autosizing.stderr b/tests/ui/enum/enum-discrim-autosizing.stderr
index be3d7c64e..03c722a68 100644
--- a/tests/ui/enum/enum-discrim-autosizing.stderr
+++ b/tests/ui/enum/enum-discrim-autosizing.stderr
@@ -10,6 +10,6 @@ LL |
LL | Bu64 = 0x8000_0000_0000_0000
| --------------------- `0` (overflowed from `9223372036854775808`) assigned here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0081`.
diff --git a/tests/ui/enum/enum-in-scope.stderr b/tests/ui/enum/enum-in-scope.stderr
index 49a01abcb..9c0dd8f3d 100644
--- a/tests/ui/enum/enum-in-scope.stderr
+++ b/tests/ui/enum/enum-in-scope.stderr
@@ -7,6 +7,6 @@ LL | struct hello(isize);
LL | let hello = 0;
| ^^^^^ cannot be named the same as a tuple struct
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0530`.
diff --git a/tests/ui/enum/enum-variant-type-2.stderr b/tests/ui/enum/enum-variant-type-2.stderr
index 7e8453c61..216dbda5d 100644
--- a/tests/ui/enum/enum-variant-type-2.stderr
+++ b/tests/ui/enum/enum-variant-type-2.stderr
@@ -7,6 +7,6 @@ LL | fn foo(x: Foo::Bar) {}
| not a type
| help: try using the variant's enum: `Foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0573`.
diff --git a/tests/ui/enum/suggest-default-attribute.stderr b/tests/ui/enum/suggest-default-attribute.stderr
index b56d599a7..fa72db6aa 100644
--- a/tests/ui/enum/suggest-default-attribute.stderr
+++ b/tests/ui/enum/suggest-default-attribute.stderr
@@ -10,5 +10,5 @@ LL + #[derive(Default)]
LL | pub enum Test {
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/error-codes/E0001.stderr b/tests/ui/error-codes/E0001.stderr
index 577c49032..49bb73e7b 100644
--- a/tests/ui/error-codes/E0001.stderr
+++ b/tests/ui/error-codes/E0001.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/error-codes/E0004-2.stderr b/tests/ui/error-codes/E0004-2.stderr
index e829bac19..cc4e18f76 100644
--- a/tests/ui/error-codes/E0004-2.stderr
+++ b/tests/ui/error-codes/E0004-2.stderr
@@ -20,6 +20,6 @@ LL + None | Some(_) => todo!(),
LL ~ }
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/error-codes/E0004.stderr b/tests/ui/error-codes/E0004.stderr
index ced478d65..17e2caa86 100644
--- a/tests/ui/error-codes/E0004.stderr
+++ b/tests/ui/error-codes/E0004.stderr
@@ -18,6 +18,6 @@ LL ~ Terminator::TalkToMyHand => {},
LL + Terminator::HastaLaVistaBaby => todo!()
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/error-codes/E0005.stderr b/tests/ui/error-codes/E0005.stderr
index 4692b6641..4be37e2e4 100644
--- a/tests/ui/error-codes/E0005.stderr
+++ b/tests/ui/error-codes/E0005.stderr
@@ -12,6 +12,6 @@ help: you might want to use `let else` to handle the variant that isn't matched
LL | let Some(y) = x else { todo!() };
| ++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0005`.
diff --git a/tests/ui/error-codes/E0013.stderr b/tests/ui/error-codes/E0013.stderr
index dc22053a6..b07c8bdb7 100644
--- a/tests/ui/error-codes/E0013.stderr
+++ b/tests/ui/error-codes/E0013.stderr
@@ -6,6 +6,6 @@ LL | const Y: i32 = X;
|
= help: consider extracting the value of the `static` to a `const`, and referring to that
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0013`.
diff --git a/tests/ui/error-codes/E0015.stderr b/tests/ui/error-codes/E0015.stderr
index ec1ce47b2..9d892a3e0 100644
--- a/tests/ui/error-codes/E0015.stderr
+++ b/tests/ui/error-codes/E0015.stderr
@@ -6,6 +6,6 @@ LL | const FOO: Option<u8> = create_some();
|
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/error-codes/E0025.stderr b/tests/ui/error-codes/E0025.stderr
index dfec6d027..03347538a 100644
--- a/tests/ui/error-codes/E0025.stderr
+++ b/tests/ui/error-codes/E0025.stderr
@@ -6,6 +6,6 @@ LL | let Foo { a: x, a: y, b: 0 } = x;
| |
| first use of `a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0025`.
diff --git a/tests/ui/error-codes/E0026-teach.stderr b/tests/ui/error-codes/E0026-teach.stderr
index 3d460490e..a496a7bde 100644
--- a/tests/ui/error-codes/E0026-teach.stderr
+++ b/tests/ui/error-codes/E0026-teach.stderr
@@ -8,6 +8,6 @@ LL | Thing { x, y, z } => {}
If you are using shorthand field patterns but want to refer to the struct field by a different name, you should rename it explicitly.
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0026`.
diff --git a/tests/ui/error-codes/E0026.stderr b/tests/ui/error-codes/E0026.stderr
index 031481812..4d0dfbbf1 100644
--- a/tests/ui/error-codes/E0026.stderr
+++ b/tests/ui/error-codes/E0026.stderr
@@ -4,6 +4,6 @@ error[E0026]: struct `Thing` does not have a field named `z`
LL | Thing { x, y, z } => {}
| ^ struct `Thing` does not have this field
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0026`.
diff --git a/tests/ui/error-codes/E0029-teach.stderr b/tests/ui/error-codes/E0029-teach.stderr
index b89b2e7d1..6b7d19f7b 100644
--- a/tests/ui/error-codes/E0029-teach.stderr
+++ b/tests/ui/error-codes/E0029-teach.stderr
@@ -9,6 +9,6 @@ LL | "hello" ..= "world" => {}
|
= note: In a match expression, only numbers and characters can be matched against a range. This is because the compiler checks that the range is non-empty at compile-time, and is unable to evaluate arbitrary comparison functions. If you want to capture values of an orderable type between two end-points, you can use a guard.
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0029`.
diff --git a/tests/ui/error-codes/E0029.stderr b/tests/ui/error-codes/E0029.stderr
index f7250b39d..d596553dc 100644
--- a/tests/ui/error-codes/E0029.stderr
+++ b/tests/ui/error-codes/E0029.stderr
@@ -7,6 +7,6 @@ LL | "hello" ..= "world" => {}
| | this is of type `&'static str` but it should be `char` or numeric
| this is of type `&'static str` but it should be `char` or numeric
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0029`.
diff --git a/tests/ui/error-codes/E0030-teach.stderr b/tests/ui/error-codes/E0030-teach.stderr
index 9435cb204..36200d2b8 100644
--- a/tests/ui/error-codes/E0030-teach.stderr
+++ b/tests/ui/error-codes/E0030-teach.stderr
@@ -6,6 +6,6 @@ LL | 1000 ..= 5 => {}
|
= note: When matching against a range, the compiler verifies that the range is non-empty. Range patterns include both end-points, so this is equivalent to requiring the start of the range to be less than or equal to the end of the range.
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0030`.
diff --git a/tests/ui/error-codes/E0030.stderr b/tests/ui/error-codes/E0030.stderr
index 1aeca2916..4e9378dfe 100644
--- a/tests/ui/error-codes/E0030.stderr
+++ b/tests/ui/error-codes/E0030.stderr
@@ -4,6 +4,6 @@ error[E0030]: lower range bound must be less than or equal to upper
LL | 1000 ..= 5 => {}
| ^^^^^^^^^^ lower bound larger than upper bound
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0030`.
diff --git a/tests/ui/error-codes/E0033-teach.stderr b/tests/ui/error-codes/E0033-teach.stderr
index 31bc6719a..303c29344 100644
--- a/tests/ui/error-codes/E0033-teach.stderr
+++ b/tests/ui/error-codes/E0033-teach.stderr
@@ -8,6 +8,6 @@ LL | let &invalid = trait_obj;
You can read more about trait objects in the Trait Objects section of the Reference: https://doc.rust-lang.org/reference/types.html#trait-objects
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0033`.
diff --git a/tests/ui/error-codes/E0033.stderr b/tests/ui/error-codes/E0033.stderr
index ab2e780ee..b091ad217 100644
--- a/tests/ui/error-codes/E0033.stderr
+++ b/tests/ui/error-codes/E0033.stderr
@@ -4,6 +4,6 @@ error[E0033]: type `&dyn SomeTrait` cannot be dereferenced
LL | let &invalid = trait_obj;
| ^^^^^^^^ type `&dyn SomeTrait` cannot be dereferenced
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0033`.
diff --git a/tests/ui/error-codes/E0034.stderr b/tests/ui/error-codes/E0034.stderr
index da6f22188..48b8efcf8 100644
--- a/tests/ui/error-codes/E0034.stderr
+++ b/tests/ui/error-codes/E0034.stderr
@@ -21,6 +21,6 @@ LL | <Test as Trait1>::foo()
LL | <Test as Trait2>::foo()
| ~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0034`.
diff --git a/tests/ui/error-codes/E0038.stderr b/tests/ui/error-codes/E0038.stderr
index 3773d6f52..99130396e 100644
--- a/tests/ui/error-codes/E0038.stderr
+++ b/tests/ui/error-codes/E0038.stderr
@@ -13,6 +13,6 @@ LL | fn foo(&self) -> Self;
| ^^^^ ...because method `foo` references the `Self` type in its return type
= help: consider moving `foo` to another trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/error-codes/E0040.stderr b/tests/ui/error-codes/E0040.stderr
index 839be79d2..00cccb07c 100644
--- a/tests/ui/error-codes/E0040.stderr
+++ b/tests/ui/error-codes/E0040.stderr
@@ -9,6 +9,6 @@ help: consider using `drop` function
LL | drop(x);
| +++++ ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0040`.
diff --git a/tests/ui/error-codes/E0044.stderr b/tests/ui/error-codes/E0044.stderr
index e889c167b..e38959fda 100644
--- a/tests/ui/error-codes/E0044.stderr
+++ b/tests/ui/error-codes/E0044.stderr
@@ -6,6 +6,6 @@ LL | fn sqrt<T>(f: T) -> T;
|
= help: replace the type parameters with concrete types like `u32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0044`.
diff --git a/tests/ui/error-codes/E0045.stderr b/tests/ui/error-codes/E0045.stderr
index fcc613b11..25b2f2654 100644
--- a/tests/ui/error-codes/E0045.stderr
+++ b/tests/ui/error-codes/E0045.stderr
@@ -4,6 +4,6 @@ error[E0045]: C-variadic function must have a compatible calling convention, lik
LL | extern "Rust" { fn foo(x: u8, ...); }
| ^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0045`.
diff --git a/tests/ui/error-codes/E0054.stderr b/tests/ui/error-codes/E0054.stderr
index 0a4adabba..be35242ad 100644
--- a/tests/ui/error-codes/E0054.stderr
+++ b/tests/ui/error-codes/E0054.stderr
@@ -9,6 +9,6 @@ help: compare with zero instead
LL | let x_is_nonzero = x != 0;
| ~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0054`.
diff --git a/tests/ui/error-codes/E0055.stderr b/tests/ui/error-codes/E0055.stderr
index a52c90962..5cdc8b994 100644
--- a/tests/ui/error-codes/E0055.stderr
+++ b/tests/ui/error-codes/E0055.stderr
@@ -6,6 +6,6 @@ LL | ref_foo.foo();
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "8"]` attribute to your crate (`E0055`)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0055`.
diff --git a/tests/ui/error-codes/E0059.stderr b/tests/ui/error-codes/E0059.stderr
index 4f6abb22a..a7591d2b0 100644
--- a/tests/ui/error-codes/E0059.stderr
+++ b/tests/ui/error-codes/E0059.stderr
@@ -7,6 +7,6 @@ LL | fn foo<F: Fn<i32>>(f: F) -> F::Output { f(3) }
note: required by a bound in `Fn`
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0059`.
diff --git a/tests/ui/error-codes/E0060.stderr b/tests/ui/error-codes/E0060.stderr
index 934a18d89..88c1f1bbb 100644
--- a/tests/ui/error-codes/E0060.stderr
+++ b/tests/ui/error-codes/E0060.stderr
@@ -14,6 +14,6 @@ help: provide the argument
LL | unsafe { printf(/* *const u8 */); }
| ~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0060`.
diff --git a/tests/ui/error-codes/E0062.stderr b/tests/ui/error-codes/E0062.stderr
index a3e140995..87c1c595e 100644
--- a/tests/ui/error-codes/E0062.stderr
+++ b/tests/ui/error-codes/E0062.stderr
@@ -6,6 +6,6 @@ LL | x: 0,
LL | x: 0,
| ^ used more than once
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0062`.
diff --git a/tests/ui/error-codes/E0069.stderr b/tests/ui/error-codes/E0069.stderr
index ff9bbe01d..20ff8c258 100644
--- a/tests/ui/error-codes/E0069.stderr
+++ b/tests/ui/error-codes/E0069.stderr
@@ -6,6 +6,6 @@ LL | fn foo() -> u8 {
LL | return;
| ^^^^^^ return type is not `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0069`.
diff --git a/tests/ui/error-codes/E0071.stderr b/tests/ui/error-codes/E0071.stderr
index 7bd4ddaf2..bbd49f43b 100644
--- a/tests/ui/error-codes/E0071.stderr
+++ b/tests/ui/error-codes/E0071.stderr
@@ -4,6 +4,6 @@ error[E0071]: expected struct, variant or union type, found `Foo`
LL | let u = FooAlias { value: 0 };
| ^^^^^^^^ not a struct
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0071`.
diff --git a/tests/ui/error-codes/E0075.stderr b/tests/ui/error-codes/E0075.stderr
index 3f927726a..43e9971e3 100644
--- a/tests/ui/error-codes/E0075.stderr
+++ b/tests/ui/error-codes/E0075.stderr
@@ -4,6 +4,6 @@ error[E0075]: SIMD vector cannot be empty
LL | struct Bad;
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0075`.
diff --git a/tests/ui/error-codes/E0076.stderr b/tests/ui/error-codes/E0076.stderr
index 7d4ff8798..ea3bbf094 100644
--- a/tests/ui/error-codes/E0076.stderr
+++ b/tests/ui/error-codes/E0076.stderr
@@ -4,6 +4,6 @@ error[E0076]: SIMD vector should be homogeneous
LL | struct Bad(u16, u32, u32);
| ^^^^^^^^^^ SIMD elements must have the same type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0076`.
diff --git a/tests/ui/error-codes/E0077.stderr b/tests/ui/error-codes/E0077.stderr
index 9a84b2ec4..aae4b3f2c 100644
--- a/tests/ui/error-codes/E0077.stderr
+++ b/tests/ui/error-codes/E0077.stderr
@@ -4,6 +4,6 @@ error[E0077]: SIMD vector element type should be a primitive scalar (integer/flo
LL | struct Bad(String);
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0077`.
diff --git a/tests/ui/error-codes/E0084.stderr b/tests/ui/error-codes/E0084.stderr
index e1bda22b8..f1fbe6c25 100644
--- a/tests/ui/error-codes/E0084.stderr
+++ b/tests/ui/error-codes/E0084.stderr
@@ -6,6 +6,6 @@ LL | #[repr(i32)]
LL | enum Foo {}
| -------- zero-variant enum
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0084`.
diff --git a/tests/ui/error-codes/E0092.stderr b/tests/ui/error-codes/E0092.stderr
index 2d590a8e1..4ff2e6f07 100644
--- a/tests/ui/error-codes/E0092.stderr
+++ b/tests/ui/error-codes/E0092.stderr
@@ -4,6 +4,6 @@ error[E0092]: unrecognized atomic operation function: `foo`
LL | fn atomic_foo();
| ^^^^^^^^^^^^^^^^ unrecognized atomic operation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0092`.
diff --git a/tests/ui/error-codes/E0093.stderr b/tests/ui/error-codes/E0093.stderr
index cb0305593..387e0c55d 100644
--- a/tests/ui/error-codes/E0093.stderr
+++ b/tests/ui/error-codes/E0093.stderr
@@ -4,6 +4,6 @@ error[E0093]: unrecognized intrinsic function: `foo`
LL | fn foo();
| ^^^^^^^^^ unrecognized intrinsic
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0093`.
diff --git a/tests/ui/error-codes/E0094.stderr b/tests/ui/error-codes/E0094.stderr
index 531cd4c78..1bad5bd95 100644
--- a/tests/ui/error-codes/E0094.stderr
+++ b/tests/ui/error-codes/E0094.stderr
@@ -4,6 +4,6 @@ error[E0094]: intrinsic has wrong number of type parameters: found 2, expected 1
LL | fn size_of<T, U>() -> usize;
| ^^^^^^ expected 1 type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0094`.
diff --git a/tests/ui/error-codes/E0109.stderr b/tests/ui/error-codes/E0109.stderr
index 8f4cb86de..ab0d4aac7 100644
--- a/tests/ui/error-codes/E0109.stderr
+++ b/tests/ui/error-codes/E0109.stderr
@@ -12,6 +12,6 @@ LL - type X = u32<i32>;
LL + type X = u32;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0109`.
diff --git a/tests/ui/error-codes/E0110.stderr b/tests/ui/error-codes/E0110.stderr
index 4ce2a0a41..2f51329ba 100644
--- a/tests/ui/error-codes/E0110.stderr
+++ b/tests/ui/error-codes/E0110.stderr
@@ -12,6 +12,6 @@ LL - type X = u32<'static>;
LL + type X = u32;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0109`.
diff --git a/tests/ui/error-codes/E0116.stderr b/tests/ui/error-codes/E0116.stderr
index 8a0276867..bf215435b 100644
--- a/tests/ui/error-codes/E0116.stderr
+++ b/tests/ui/error-codes/E0116.stderr
@@ -6,6 +6,6 @@ LL | impl Vec<u8> {}
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0116`.
diff --git a/tests/ui/error-codes/E0118.stderr b/tests/ui/error-codes/E0118.stderr
index 442f8a4f8..0d837aa59 100644
--- a/tests/ui/error-codes/E0118.stderr
+++ b/tests/ui/error-codes/E0118.stderr
@@ -6,6 +6,6 @@ LL | impl<T> T {
|
= note: either implement a trait on it or create a newtype to wrap it instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0118`.
diff --git a/tests/ui/error-codes/E0119.stderr b/tests/ui/error-codes/E0119.stderr
index e08a2c7fc..838dba081 100644
--- a/tests/ui/error-codes/E0119.stderr
+++ b/tests/ui/error-codes/E0119.stderr
@@ -7,6 +7,6 @@ LL | impl<T> MyTrait for T {
LL | impl MyTrait for Foo {
| ^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/error-codes/E0120.stderr b/tests/ui/error-codes/E0120.stderr
index 75778f1f9..aef777ad0 100644
--- a/tests/ui/error-codes/E0120.stderr
+++ b/tests/ui/error-codes/E0120.stderr
@@ -4,6 +4,6 @@ error[E0120]: the `Drop` trait may only be implemented for local structs, enums,
LL | impl Drop for dyn MyTrait {
| ^^^^^^^^^^^ must be a struct, enum, or union in the current crate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0120`.
diff --git a/tests/ui/error-codes/E0124.stderr b/tests/ui/error-codes/E0124.stderr
index 73819a89d..f33495806 100644
--- a/tests/ui/error-codes/E0124.stderr
+++ b/tests/ui/error-codes/E0124.stderr
@@ -6,6 +6,6 @@ LL | field1: i32,
LL | field1: i32,
| ^^^^^^^^^^^ field already declared
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0124`.
diff --git a/tests/ui/error-codes/E0128.stderr b/tests/ui/error-codes/E0128.stderr
index eb66d4693..c1ccb4c9e 100644
--- a/tests/ui/error-codes/E0128.stderr
+++ b/tests/ui/error-codes/E0128.stderr
@@ -4,6 +4,6 @@ error[E0128]: generic parameters with a default cannot use forward declared iden
LL | struct Foo<T=U, U=()> {
| ^ defaulted generic parameters cannot be forward declared
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0128`.
diff --git a/tests/ui/error-codes/E0130.stderr b/tests/ui/error-codes/E0130.stderr
index a45571f40..a31517218 100644
--- a/tests/ui/error-codes/E0130.stderr
+++ b/tests/ui/error-codes/E0130.stderr
@@ -4,6 +4,6 @@ error[E0130]: patterns aren't allowed in foreign function declarations
LL | fn foo((a, b): (u32, u32));
| ^^^^^^ pattern not allowed in foreign function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0130`.
diff --git a/tests/ui/error-codes/E0131.stderr b/tests/ui/error-codes/E0131.stderr
index 4467e19e9..3a485cdf3 100644
--- a/tests/ui/error-codes/E0131.stderr
+++ b/tests/ui/error-codes/E0131.stderr
@@ -4,6 +4,6 @@ error[E0131]: `main` function is not allowed to have generic parameters
LL | fn main<T>() {
| ^^^ `main` cannot have generic parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0131`.
diff --git a/tests/ui/error-codes/E0132.stderr b/tests/ui/error-codes/E0132.stderr
index d4ddc07b5..b1990afa3 100644
--- a/tests/ui/error-codes/E0132.stderr
+++ b/tests/ui/error-codes/E0132.stderr
@@ -4,6 +4,6 @@ error[E0132]: `#[start]` function is not allowed to have type parameters
LL | fn f< T >() {}
| ^^^^^ `#[start]` function cannot have type parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0132`.
diff --git a/tests/ui/error-codes/E0133.mir.stderr b/tests/ui/error-codes/E0133.mir.stderr
index b11d5e2c2..f8703ef06 100644
--- a/tests/ui/error-codes/E0133.mir.stderr
+++ b/tests/ui/error-codes/E0133.mir.stderr
@@ -6,6 +6,6 @@ LL | f();
|
= note: consult the function's documentation for information on how to avoid undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/error-codes/E0133.thir.stderr b/tests/ui/error-codes/E0133.thir.stderr
index f1d7aba2a..fd4d42bcb 100644
--- a/tests/ui/error-codes/E0133.thir.stderr
+++ b/tests/ui/error-codes/E0133.thir.stderr
@@ -6,6 +6,6 @@ LL | f();
|
= note: consult the function's documentation for information on how to avoid undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/error-codes/E0138.stderr b/tests/ui/error-codes/E0138.stderr
index fa8c39427..04877ab40 100644
--- a/tests/ui/error-codes/E0138.stderr
+++ b/tests/ui/error-codes/E0138.stderr
@@ -7,6 +7,6 @@ LL | fn foo(argc: isize, argv: *const *const u8) -> isize { 0 }
LL | fn f(argc: isize, argv: *const *const u8) -> isize { 0 }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ multiple `start` functions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0138`.
diff --git a/tests/ui/error-codes/E0152.stderr b/tests/ui/error-codes/E0152.stderr
index 29f7e4ad6..dbea7e6d2 100644
--- a/tests/ui/error-codes/E0152.stderr
+++ b/tests/ui/error-codes/E0152.stderr
@@ -2,12 +2,12 @@ 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
= note: second definition in the local crate (`E0152`)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0152`.
diff --git a/tests/ui/error-codes/E0161.base.stderr b/tests/ui/error-codes/E0161.base.stderr
index ae82e6702..d80de66b2 100644
--- a/tests/ui/error-codes/E0161.base.stderr
+++ b/tests/ui/error-codes/E0161.base.stderr
@@ -4,6 +4,6 @@ error[E0161]: cannot move a value of type `dyn Bar`
LL | x.f();
| ^ the size of `dyn Bar` cannot be statically determined
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0161`.
diff --git a/tests/ui/error-codes/E0164.stderr b/tests/ui/error-codes/E0164.stderr
index 5a80d6ec3..1ed5b0a8f 100644
--- a/tests/ui/error-codes/E0164.stderr
+++ b/tests/ui/error-codes/E0164.stderr
@@ -4,6 +4,6 @@ error[E0164]: expected tuple struct or tuple variant, found associated constant
LL | Foo::B(i) => i,
| ^^^^^^^^^ not a tuple struct or tuple variant
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0164`.
diff --git a/tests/ui/error-codes/E0184.stderr b/tests/ui/error-codes/E0184.stderr
index 52f1f30a4..625c6685a 100644
--- a/tests/ui/error-codes/E0184.stderr
+++ b/tests/ui/error-codes/E0184.stderr
@@ -6,6 +6,6 @@ LL | #[derive(Copy)]
|
= note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0184`.
diff --git a/tests/ui/error-codes/E0185.stderr b/tests/ui/error-codes/E0185.stderr
index 8a99c0688..40d6ad3f2 100644
--- a/tests/ui/error-codes/E0185.stderr
+++ b/tests/ui/error-codes/E0185.stderr
@@ -7,6 +7,6 @@ LL | fn foo();
LL | fn foo(&self) {}
| ^^^^^^^^^^^^^ `&self` used in impl
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0185`.
diff --git a/tests/ui/error-codes/E0186.stderr b/tests/ui/error-codes/E0186.stderr
index 8971d61fc..59b210927 100644
--- a/tests/ui/error-codes/E0186.stderr
+++ b/tests/ui/error-codes/E0186.stderr
@@ -7,6 +7,6 @@ LL | fn foo(&self);
LL | fn foo() {}
| ^^^^^^^^ expected `&self` in impl
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0186`.
diff --git a/tests/ui/error-codes/E0191.stderr b/tests/ui/error-codes/E0191.stderr
index 57eda4785..63974fd6c 100644
--- a/tests/ui/error-codes/E0191.stderr
+++ b/tests/ui/error-codes/E0191.stderr
@@ -7,6 +7,6 @@ LL | type Bar;
LL | type Foo = dyn Trait;
| ^^^^^ help: specify the associated type: `Trait<Bar = Type>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0191`.
diff --git a/tests/ui/error-codes/E0194.stderr b/tests/ui/error-codes/E0194.stderr
index f2c908eea..25fc1a3b7 100644
--- a/tests/ui/error-codes/E0194.stderr
+++ b/tests/ui/error-codes/E0194.stderr
@@ -7,6 +7,6 @@ LL | fn do_something(&self) -> T;
LL | fn do_something_else<T: Clone>(&self, bar: T);
| ^ already used
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0403`.
diff --git a/tests/ui/error-codes/E0195.stderr b/tests/ui/error-codes/E0195.stderr
index 6eaa1750e..b88064b7f 100644
--- a/tests/ui/error-codes/E0195.stderr
+++ b/tests/ui/error-codes/E0195.stderr
@@ -7,6 +7,6 @@ LL | fn bar<'a,'b:'a>(x: &'a str, y: &'b str);
LL | fn bar<'a,'b>(x: &'a str, y: &'b str) {
| ^^^^^^^ lifetimes do not match method in trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0195`.
diff --git a/tests/ui/error-codes/E0197.stderr b/tests/ui/error-codes/E0197.stderr
index 35e104264..c06777396 100644
--- a/tests/ui/error-codes/E0197.stderr
+++ b/tests/ui/error-codes/E0197.stderr
@@ -6,6 +6,6 @@ LL | unsafe impl Foo { }
| |
| unsafe because of this
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0197`.
diff --git a/tests/ui/error-codes/E0198.stderr b/tests/ui/error-codes/E0198.stderr
index bb2efefb4..65b4f5364 100644
--- a/tests/ui/error-codes/E0198.stderr
+++ b/tests/ui/error-codes/E0198.stderr
@@ -7,6 +7,6 @@ LL | unsafe impl !Send for Foo { }
| | negative because of this
| unsafe because of this
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0198`.
diff --git a/tests/ui/error-codes/E0199.stderr b/tests/ui/error-codes/E0199.stderr
index 68c308b15..a61a18d17 100644
--- a/tests/ui/error-codes/E0199.stderr
+++ b/tests/ui/error-codes/E0199.stderr
@@ -10,6 +10,6 @@ LL - unsafe impl Bar for Foo { }
LL + impl Bar for Foo { }
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0199`.
diff --git a/tests/ui/error-codes/E0200.stderr b/tests/ui/error-codes/E0200.stderr
index c70a2d4f3..fe8353dee 100644
--- a/tests/ui/error-codes/E0200.stderr
+++ b/tests/ui/error-codes/E0200.stderr
@@ -10,6 +10,6 @@ help: add `unsafe` to this trait implementation
LL | unsafe impl Bar for Foo { }
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0200`.
diff --git a/tests/ui/error-codes/E0206.stderr b/tests/ui/error-codes/E0206.stderr
index 60d8d7bfe..d19f2e33a 100644
--- a/tests/ui/error-codes/E0206.stderr
+++ b/tests/ui/error-codes/E0206.stderr
@@ -4,6 +4,6 @@ error[E0206]: the trait `Copy` cannot be implemented for this type
LL | impl Copy for &'static mut Bar { }
| ^^^^^^^^^^^^^^^^ type is not a structure or enumeration
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0206`.
diff --git a/tests/ui/error-codes/E0207.stderr b/tests/ui/error-codes/E0207.stderr
index 5ef51ed86..01d7c4185 100644
--- a/tests/ui/error-codes/E0207.stderr
+++ b/tests/ui/error-codes/E0207.stderr
@@ -4,6 +4,6 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self
LL | impl<T: Default> Foo {
| ^ unconstrained type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0207`.
diff --git a/tests/ui/error-codes/E0208.stderr b/tests/ui/error-codes/E0208.stderr
index 2c7072a7e..77b6ceae4 100644
--- a/tests/ui/error-codes/E0208.stderr
+++ b/tests/ui/error-codes/E0208.stderr
@@ -4,5 +4,5 @@ error: [+, o]
LL | struct Foo<'a, T> {
| ^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/error-codes/E0214.stderr b/tests/ui/error-codes/E0214.stderr
index e0179aac2..76b11f309 100644
--- a/tests/ui/error-codes/E0214.stderr
+++ b/tests/ui/error-codes/E0214.stderr
@@ -9,6 +9,6 @@ help: use angle brackets instead
LL | let v: Vec<&str> = vec!["foo"];
| ~ ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0214`.
diff --git a/tests/ui/error-codes/E0221.stderr b/tests/ui/error-codes/E0221.stderr
index e600acf78..07e7485b6 100644
--- a/tests/ui/error-codes/E0221.stderr
+++ b/tests/ui/error-codes/E0221.stderr
@@ -28,7 +28,7 @@ LL | fn test() {
LL | let _: Self::Err;
| ^^^^^^^^^ ambiguous associated type `Err`
|
- = note: associated type `Self` could derive from `FromStr`
+ = note: associated type `Err` could derive from `FromStr`
help: use fully-qualified syntax to disambiguate
|
LL | let _: <Self as My>::Err;
diff --git a/tests/ui/error-codes/E0223.stderr b/tests/ui/error-codes/E0223.stderr
index 1299ba5f5..e985a4c9b 100644
--- a/tests/ui/error-codes/E0223.stderr
+++ b/tests/ui/error-codes/E0223.stderr
@@ -4,6 +4,6 @@ error[E0223]: ambiguous associated type
LL | let foo: MyTrait::X;
| ^^^^^^^^^^ help: use fully-qualified syntax: `<MyStruct as MyTrait>::X`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0223`.
diff --git a/tests/ui/error-codes/E0227.stderr b/tests/ui/error-codes/E0227.stderr
index 26de5b4c4..c77a2e98a 100644
--- a/tests/ui/error-codes/E0227.stderr
+++ b/tests/ui/error-codes/E0227.stderr
@@ -4,6 +4,6 @@ error[E0227]: ambiguous lifetime bound, explicit lifetime bound required
LL | baz: dyn FooBar<'foo, 'bar>,
| ^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0227`.
diff --git a/tests/ui/error-codes/E0229.stderr b/tests/ui/error-codes/E0229.stderr
index 46793314b..e981fb91c 100644
--- a/tests/ui/error-codes/E0229.stderr
+++ b/tests/ui/error-codes/E0229.stderr
@@ -4,6 +4,6 @@ error[E0229]: associated type bindings are not allowed here
LL | fn baz<I>(x: &<I as Foo<A=Bar>>::A) {}
| ^^^^^ associated type not allowed here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0229`.
diff --git a/tests/ui/error-codes/E0252.stderr b/tests/ui/error-codes/E0252.stderr
index 2722dfe5e..efbb9ec96 100644
--- a/tests/ui/error-codes/E0252.stderr
+++ b/tests/ui/error-codes/E0252.stderr
@@ -12,6 +12,6 @@ help: you can use `as` to change the binding name of the import
LL | use bar::baz as other_baz;
| ~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0252`.
diff --git a/tests/ui/error-codes/E0253.stderr b/tests/ui/error-codes/E0253.stderr
index 8f21a0aab..4ee36b70f 100644
--- a/tests/ui/error-codes/E0253.stderr
+++ b/tests/ui/error-codes/E0253.stderr
@@ -4,6 +4,6 @@ error[E0253]: `do_something` is not directly importable
LL | use foo::MyTrait::do_something;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot be imported directly
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0253`.
diff --git a/tests/ui/error-codes/E0254.stderr b/tests/ui/error-codes/E0254.stderr
index b098f8e1a..d89497b28 100644
--- a/tests/ui/error-codes/E0254.stderr
+++ b/tests/ui/error-codes/E0254.stderr
@@ -13,6 +13,6 @@ help: you can use `as` to change the binding name of the import
LL | use foo::alloc as other_alloc;
| ~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0254`.
diff --git a/tests/ui/error-codes/E0255.stderr b/tests/ui/error-codes/E0255.stderr
index 352c5ba5b..e5f908217 100644
--- a/tests/ui/error-codes/E0255.stderr
+++ b/tests/ui/error-codes/E0255.stderr
@@ -13,6 +13,6 @@ help: you can use `as` to change the binding name of the import
LL | use bar::foo as other_foo;
| ~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0255`.
diff --git a/tests/ui/error-codes/E0259.stderr b/tests/ui/error-codes/E0259.stderr
index 06cbc5b4f..6e086268f 100644
--- a/tests/ui/error-codes/E0259.stderr
+++ b/tests/ui/error-codes/E0259.stderr
@@ -13,6 +13,6 @@ help: you can use `as` to change the binding name of the import
LL | extern crate libc as other_alloc;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0259`.
diff --git a/tests/ui/error-codes/E0260.stderr b/tests/ui/error-codes/E0260.stderr
index 2d3305bd1..35698c653 100644
--- a/tests/ui/error-codes/E0260.stderr
+++ b/tests/ui/error-codes/E0260.stderr
@@ -13,6 +13,6 @@ help: you can use `as` to change the binding name of the import
LL | extern crate alloc as other_alloc;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0260`.
diff --git a/tests/ui/error-codes/E0262.stderr b/tests/ui/error-codes/E0262.stderr
index ad90b7171..092db22ed 100644
--- a/tests/ui/error-codes/E0262.stderr
+++ b/tests/ui/error-codes/E0262.stderr
@@ -4,6 +4,6 @@ error[E0262]: invalid lifetime parameter name: `'static`
LL | fn foo<'static>(x: &'static str) { }
| ^^^^^^^ 'static is a reserved lifetime name
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0262`.
diff --git a/tests/ui/error-codes/E0263.stderr b/tests/ui/error-codes/E0263.stderr
index e3f9aea29..dcf57d8e3 100644
--- a/tests/ui/error-codes/E0263.stderr
+++ b/tests/ui/error-codes/E0263.stderr
@@ -6,6 +6,6 @@ LL | fn foo<'a, 'b, 'a>(x: &'a str, y: &'b str) {
| |
| first use of `'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0403`.
diff --git a/tests/ui/error-codes/E0264.stderr b/tests/ui/error-codes/E0264.stderr
index e8e35a12c..3503fb229 100644
--- a/tests/ui/error-codes/E0264.stderr
+++ b/tests/ui/error-codes/E0264.stderr
@@ -2,8 +2,8 @@ error[E0264]: unknown external lang item: `cake`
--> $DIR/E0264.rs:5:5
|
LL | fn cake();
- | ^^^^^^^^^
+ | ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0264`.
diff --git a/tests/ui/error-codes/E0267.stderr b/tests/ui/error-codes/E0267.stderr
index 1f8657373..81f9005d6 100644
--- a/tests/ui/error-codes/E0267.stderr
+++ b/tests/ui/error-codes/E0267.stderr
@@ -6,6 +6,6 @@ LL | let w = || { break; };
| |
| enclosing closure
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0267`.
diff --git a/tests/ui/error-codes/E0268.stderr b/tests/ui/error-codes/E0268.stderr
index 6422e8a94..8d03103da 100644
--- a/tests/ui/error-codes/E0268.stderr
+++ b/tests/ui/error-codes/E0268.stderr
@@ -4,6 +4,6 @@ error[E0268]: `break` outside of a loop or labeled block
LL | break;
| ^^^^^ cannot `break` outside of a loop or labeled block
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0268`.
diff --git a/tests/ui/error-codes/E0271.stderr b/tests/ui/error-codes/E0271.stderr
index 1e2f43834..0e456eb0d 100644
--- a/tests/ui/error-codes/E0271.stderr
+++ b/tests/ui/error-codes/E0271.stderr
@@ -17,6 +17,6 @@ note: required by a bound in `foo`
LL | fn foo<T>(t: T) where T: Trait<AssociatedType=u32> {
| ^^^^^^^^^^^^^^^^^^ required by this bound in `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/error-codes/E0275.stderr b/tests/ui/error-codes/E0275.stderr
index c702c3790..b50754083 100644
--- a/tests/ui/error-codes/E0275.stderr
+++ b/tests/ui/error-codes/E0275.stderr
@@ -13,6 +13,6 @@ LL | impl<T> Foo for T where Bar<T>: Foo {}
= note: 126 redundant requirements hidden
= note: required for `Bar<T>` to implement `Foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/error-codes/E0276.stderr b/tests/ui/error-codes/E0276.stderr
index 1013f041b..eb004370a 100644
--- a/tests/ui/error-codes/E0276.stderr
+++ b/tests/ui/error-codes/E0276.stderr
@@ -7,6 +7,6 @@ LL | fn foo<T>(x: T);
LL | fn foo<T>(x: T) where T: Copy {}
| ^^^^ impl has extra requirement `T: Copy`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0276`.
diff --git a/tests/ui/error-codes/E0277-2.stderr b/tests/ui/error-codes/E0277-2.stderr
index a2abf3793..9a262f755 100644
--- a/tests/ui/error-codes/E0277-2.stderr
+++ b/tests/ui/error-codes/E0277-2.stderr
@@ -26,6 +26,6 @@ note: required by a bound in `is_send`
LL | fn is_send<T: Send>() { }
| ^^^^ required by this bound in `is_send`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/error-codes/E0277-3.stderr b/tests/ui/error-codes/E0277-3.stderr
index 0d4782935..6cdfaa04f 100644
--- a/tests/ui/error-codes/E0277-3.stderr
+++ b/tests/ui/error-codes/E0277-3.stderr
@@ -18,6 +18,6 @@ LL + #[derive(PartialEq)]
LL | struct S;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/error-codes/E0282.stderr b/tests/ui/error-codes/E0282.stderr
index 58332454a..295e84803 100644
--- a/tests/ui/error-codes/E0282.stderr
+++ b/tests/ui/error-codes/E0282.stderr
@@ -9,6 +9,6 @@ help: consider giving `x` an explicit type
LL | let x: /* Type */;
| ++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/error-codes/E0297.stderr b/tests/ui/error-codes/E0297.stderr
index 293028f5f..3bfe8a668 100644
--- a/tests/ui/error-codes/E0297.stderr
+++ b/tests/ui/error-codes/E0297.stderr
@@ -6,6 +6,6 @@ LL | for Some(x) in xs {}
|
= note: the matched value is of type `Option<i32>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0005`.
diff --git a/tests/ui/error-codes/E0308-2.stderr b/tests/ui/error-codes/E0308-2.stderr
index 3a8a81a73..b14977917 100644
--- a/tests/ui/error-codes/E0308-2.stderr
+++ b/tests/ui/error-codes/E0308-2.stderr
@@ -13,6 +13,6 @@ LL | impl Eq for &dyn DynEq {}
| ^
= note: ...does not necessarily outlive the static lifetime
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/error-codes/E0308-4.stderr b/tests/ui/error-codes/E0308-4.stderr
index 39c067637..9f33220a5 100644
--- a/tests/ui/error-codes/E0308-4.stderr
+++ b/tests/ui/error-codes/E0308-4.stderr
@@ -8,6 +8,6 @@ LL | 0u8..=3i8 => (),
| |
| this is of type `u8`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/error-codes/E0308.stderr b/tests/ui/error-codes/E0308.stderr
index 141abed60..bc6c5a632 100644
--- a/tests/ui/error-codes/E0308.stderr
+++ b/tests/ui/error-codes/E0308.stderr
@@ -7,6 +7,6 @@ LL | fn size_of<T>();
= note: expected signature `extern "rust-intrinsic" fn() -> usize`
found signature `extern "rust-intrinsic" fn()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/error-codes/E0311.stderr b/tests/ui/error-codes/E0311.stderr
index 96546b83f..bac18596f 100644
--- a/tests/ui/error-codes/E0311.stderr
+++ b/tests/ui/error-codes/E0311.stderr
@@ -11,6 +11,6 @@ help: consider adding an explicit lifetime bound
LL | fn no_restriction<'a, T: 'a>(x: &'a ()) -> &'a () {
| +++ ++++ ++ ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0311`.
diff --git a/tests/ui/error-codes/E0328.stderr b/tests/ui/error-codes/E0328.stderr
index 70e6baf69..1143c3834 100644
--- a/tests/ui/error-codes/E0328.stderr
+++ b/tests/ui/error-codes/E0328.stderr
@@ -4,6 +4,6 @@ error[E0328]: explicit impls for the `Unsize` trait are not permitted
LL | impl<T> Unsize<T> for MyType {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of `Unsize` not allowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0328`.
diff --git a/tests/ui/error-codes/E0365.stderr b/tests/ui/error-codes/E0365.stderr
index 5bfcf1394..d6eb9d6c3 100644
--- a/tests/ui/error-codes/E0365.stderr
+++ b/tests/ui/error-codes/E0365.stderr
@@ -6,6 +6,6 @@ LL | pub use foo as foo2;
|
= note: consider declaring type or module `foo` with `pub`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0365`.
diff --git a/tests/ui/error-codes/E0370.stderr b/tests/ui/error-codes/E0370.stderr
index 7fb622ee8..7bcd99b95 100644
--- a/tests/ui/error-codes/E0370.stderr
+++ b/tests/ui/error-codes/E0370.stderr
@@ -6,6 +6,6 @@ LL | Y,
|
= note: explicitly set `Y = -9223372036854775808` if that is desired outcome
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0370`.
diff --git a/tests/ui/error-codes/E0374.stderr b/tests/ui/error-codes/E0374.stderr
index 49ec0bce4..148fa1348 100644
--- a/tests/ui/error-codes/E0374.stderr
+++ b/tests/ui/error-codes/E0374.stderr
@@ -7,6 +7,6 @@ LL | | where T: CoerceUnsized<U> {}
|
= note: expected a single field to be coerced, none found
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0374`.
diff --git a/tests/ui/error-codes/E0375.stderr b/tests/ui/error-codes/E0375.stderr
index a68b3af5a..0a5e4128a 100644
--- a/tests/ui/error-codes/E0375.stderr
+++ b/tests/ui/error-codes/E0375.stderr
@@ -7,6 +7,6 @@ LL | impl<T, U> CoerceUnsized<Foo<U, T>> for Foo<T, U> {}
= note: `CoerceUnsized` may only be implemented for a coercion between structures with one field being coerced
= note: currently, 2 fields need coercions: `b` (`T` to `U`), `c` (`U` to `T`)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0375`.
diff --git a/tests/ui/error-codes/E0376.stderr b/tests/ui/error-codes/E0376.stderr
index e91efb045..46668e05a 100644
--- a/tests/ui/error-codes/E0376.stderr
+++ b/tests/ui/error-codes/E0376.stderr
@@ -4,6 +4,6 @@ error[E0376]: the trait `CoerceUnsized` may only be implemented for a coercion b
LL | impl<T, U> CoerceUnsized<U> for Foo<T> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0376`.
diff --git a/tests/ui/error-codes/E0377.stderr b/tests/ui/error-codes/E0377.stderr
index 9cb11e5a3..5d710d8e1 100644
--- a/tests/ui/error-codes/E0377.stderr
+++ b/tests/ui/error-codes/E0377.stderr
@@ -6,6 +6,6 @@ LL | impl<T, U> CoerceUnsized<Bar<U>> for Foo<T> where T: CoerceUnsized<U> {}
|
= note: expected coercion between the same definition; expected `Foo`, found `Bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0377`.
diff --git a/tests/ui/error-codes/E0389.stderr b/tests/ui/error-codes/E0389.stderr
index e4001856c..156bff7f0 100644
--- a/tests/ui/error-codes/E0389.stderr
+++ b/tests/ui/error-codes/E0389.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be a mutable reference
LL | let fancy_ref = &mut (&mut fancy);
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/error-codes/E0392.stderr b/tests/ui/error-codes/E0392.stderr
index 622402999..ecbfd5584 100644
--- a/tests/ui/error-codes/E0392.stderr
+++ b/tests/ui/error-codes/E0392.stderr
@@ -7,6 +7,6 @@ LL | enum Foo<T> { Bar }
= help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
= help: if you intended `T` to be a const parameter, use `const T: usize` instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0392`.
diff --git a/tests/ui/error-codes/E0393.stderr b/tests/ui/error-codes/E0393.stderr
index d9f70b729..4083fa23e 100644
--- a/tests/ui/error-codes/E0393.stderr
+++ b/tests/ui/error-codes/E0393.stderr
@@ -9,6 +9,6 @@ LL | fn together_we_will_rule_the_galaxy(son: &dyn A) {}
|
= note: because of the default `Self` reference, type parameters must be specified on object types
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0393`.
diff --git a/tests/ui/error-codes/E0396-fixed.stderr b/tests/ui/error-codes/E0396-fixed.stderr
index e77b2ce9a..2f8ea7993 100644
--- a/tests/ui/error-codes/E0396-fixed.stderr
+++ b/tests/ui/error-codes/E0396-fixed.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | const VALUE: u8 = unsafe { *REG_ADDR };
| ^^^^^^^^^ memory access failed: 0x5f3759df[noalloc] is a dangling pointer (it has no provenance)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/error-codes/E0401.stderr b/tests/ui/error-codes/E0401.stderr
index 0a069e8d3..d27fade48 100644
--- a/tests/ui/error-codes/E0401.stderr
+++ b/tests/ui/error-codes/E0401.stderr
@@ -55,7 +55,7 @@ error[E0283]: type annotations needed
LL | bfnr(x);
| ^^^^ cannot infer type of the type parameter `W` declared on the function `bfnr`
|
- = note: multiple `impl`s satisfying `_: Fn<()>` found in the following crates: `alloc`, `core`:
+ = note: multiple `impl`s satisfying `_: Fn()` found in the following crates: `alloc`, `core`:
- impl<A, F> Fn<A> for &F
where A: Tuple, F: Fn<A>, F: ?Sized;
- impl<Args, F, A> Fn<Args> for Box<F, A>
diff --git a/tests/ui/error-codes/E0403.stderr b/tests/ui/error-codes/E0403.stderr
index d76a58a7c..02f255b7e 100644
--- a/tests/ui/error-codes/E0403.stderr
+++ b/tests/ui/error-codes/E0403.stderr
@@ -6,6 +6,6 @@ LL | fn foo<T, T>(s: T, u: T) {}
| |
| first use of `T`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0403`.
diff --git a/tests/ui/error-codes/E0405.stderr b/tests/ui/error-codes/E0405.stderr
index a22afe6f3..1fb115c9e 100644
--- a/tests/ui/error-codes/E0405.stderr
+++ b/tests/ui/error-codes/E0405.stderr
@@ -4,6 +4,6 @@ error[E0405]: cannot find trait `SomeTrait` in this scope
LL | impl SomeTrait for Foo {}
| ^^^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0405`.
diff --git a/tests/ui/error-codes/E0407.stderr b/tests/ui/error-codes/E0407.stderr
index 6f6d1ff6a..889668f58 100644
--- a/tests/ui/error-codes/E0407.stderr
+++ b/tests/ui/error-codes/E0407.stderr
@@ -7,6 +7,6 @@ LL | fn b() {}
| | help: there is an associated function with a similar name: `a`
| not a member of trait `Foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0407`.
diff --git a/tests/ui/error-codes/E0408.stderr b/tests/ui/error-codes/E0408.stderr
index 132a94322..45ac48006 100644
--- a/tests/ui/error-codes/E0408.stderr
+++ b/tests/ui/error-codes/E0408.stderr
@@ -6,6 +6,6 @@ LL | Some(y) | None => {}
| |
| variable not in all patterns
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0408`.
diff --git a/tests/ui/error-codes/E0411.stderr b/tests/ui/error-codes/E0411.stderr
index 4c99f9fcb..16da10348 100644
--- a/tests/ui/error-codes/E0411.stderr
+++ b/tests/ui/error-codes/E0411.stderr
@@ -6,6 +6,6 @@ LL | fn main() {
LL | <Self>::foo;
| ^^^^ `Self` is only available in impls, traits, and type definitions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0411`.
diff --git a/tests/ui/error-codes/E0412.stderr b/tests/ui/error-codes/E0412.stderr
index 7bdaa1807..7c1172642 100644
--- a/tests/ui/error-codes/E0412.stderr
+++ b/tests/ui/error-codes/E0412.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `Something` in this scope
LL | impl Something {}
| ^^^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/error-codes/E0415.stderr b/tests/ui/error-codes/E0415.stderr
index c2b8fdc7c..77e5752de 100644
--- a/tests/ui/error-codes/E0415.stderr
+++ b/tests/ui/error-codes/E0415.stderr
@@ -4,6 +4,6 @@ error[E0415]: identifier `f` is bound more than once in this parameter list
LL | fn foo(f: i32, f: i32) {}
| ^ used as parameter more than once
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0415`.
diff --git a/tests/ui/error-codes/E0416.stderr b/tests/ui/error-codes/E0416.stderr
index 78acac5c6..643b99087 100644
--- a/tests/ui/error-codes/E0416.stderr
+++ b/tests/ui/error-codes/E0416.stderr
@@ -4,6 +4,6 @@ error[E0416]: identifier `x` is bound more than once in the same pattern
LL | (x, x) => {}
| ^ used in a pattern more than once
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0416`.
diff --git a/tests/ui/error-codes/E0425.stderr b/tests/ui/error-codes/E0425.stderr
index 9ef4608da..db78dc3f7 100644
--- a/tests/ui/error-codes/E0425.stderr
+++ b/tests/ui/error-codes/E0425.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `elf` in this scope
LL | elf;
| ^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/error-codes/E0426.stderr b/tests/ui/error-codes/E0426.stderr
index 035f2eb86..3e03030df 100644
--- a/tests/ui/error-codes/E0426.stderr
+++ b/tests/ui/error-codes/E0426.stderr
@@ -4,6 +4,6 @@ error[E0426]: use of undeclared label `'a`
LL | break 'a;
| ^^ undeclared label `'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0426`.
diff --git a/tests/ui/error-codes/E0428.stderr b/tests/ui/error-codes/E0428.stderr
index 205bcf342..b5bb84e2e 100644
--- a/tests/ui/error-codes/E0428.stderr
+++ b/tests/ui/error-codes/E0428.stderr
@@ -8,6 +8,6 @@ LL | struct Bar;
|
= note: `Bar` must be defined only once in the type namespace of this module
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0428`.
diff --git a/tests/ui/error-codes/E0429.stderr b/tests/ui/error-codes/E0429.stderr
index 08b99232e..d2d9ba209 100644
--- a/tests/ui/error-codes/E0429.stderr
+++ b/tests/ui/error-codes/E0429.stderr
@@ -14,6 +14,6 @@ help: alternatively, use the multi-path `use` syntax to import `self`
LL | use std::fmt::{self};
| + +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0429`.
diff --git a/tests/ui/error-codes/E0431.stderr b/tests/ui/error-codes/E0431.stderr
index adfd2d923..f77c62bec 100644
--- a/tests/ui/error-codes/E0431.stderr
+++ b/tests/ui/error-codes/E0431.stderr
@@ -4,6 +4,6 @@ error[E0431]: `self` import can only appear in an import list with a non-empty p
LL | use {self};
| ^^^^ can only appear in an import list with a non-empty prefix
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0431`.
diff --git a/tests/ui/error-codes/E0432.stderr b/tests/ui/error-codes/E0432.stderr
index ed9536f16..473e82f86 100644
--- a/tests/ui/error-codes/E0432.stderr
+++ b/tests/ui/error-codes/E0432.stderr
@@ -6,6 +6,6 @@ LL | use something::Foo;
|
= help: consider adding `extern crate something` to use the `something` crate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/error-codes/E0433.stderr b/tests/ui/error-codes/E0433.stderr
index 265d8885c..1ac8c3ebc 100644
--- a/tests/ui/error-codes/E0433.stderr
+++ b/tests/ui/error-codes/E0433.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: use of undeclared type `NonExistingMap`
LL | let map = NonExistingMap::new();
| ^^^^^^^^^^^^^^ use of undeclared type `NonExistingMap`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/error-codes/E0434.stderr b/tests/ui/error-codes/E0434.stderr
index 14508ccbc..db9b087f5 100644
--- a/tests/ui/error-codes/E0434.stderr
+++ b/tests/ui/error-codes/E0434.stderr
@@ -6,6 +6,6 @@ LL | y
|
= help: use the `|| { ... }` closure form instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0434`.
diff --git a/tests/ui/error-codes/E0435.stderr b/tests/ui/error-codes/E0435.stderr
index fc08fade9..68d6ddba2 100644
--- a/tests/ui/error-codes/E0435.stderr
+++ b/tests/ui/error-codes/E0435.stderr
@@ -6,6 +6,6 @@ LL | let foo: usize = 42;
LL | let _: [u8; foo];
| ^^^ non-constant value
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0435`.
diff --git a/tests/ui/error-codes/E0437.stderr b/tests/ui/error-codes/E0437.stderr
index 217b16403..b011fa40e 100644
--- a/tests/ui/error-codes/E0437.stderr
+++ b/tests/ui/error-codes/E0437.stderr
@@ -4,6 +4,6 @@ error[E0437]: type `Bar` is not a member of trait `Foo`
LL | type Bar = bool;
| ^^^^^^^^^^^^^^^^ not a member of trait `Foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0437`.
diff --git a/tests/ui/error-codes/E0438.stderr b/tests/ui/error-codes/E0438.stderr
index 853f0c3c2..701c007af 100644
--- a/tests/ui/error-codes/E0438.stderr
+++ b/tests/ui/error-codes/E0438.stderr
@@ -4,6 +4,6 @@ error[E0438]: const `BAR` is not a member of trait `Bar`
LL | const BAR: bool = true;
| ^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `Bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0438`.
diff --git a/tests/ui/error-codes/E0454.stderr b/tests/ui/error-codes/E0454.stderr
index b9a506fee..e16982542 100644
--- a/tests/ui/error-codes/E0454.stderr
+++ b/tests/ui/error-codes/E0454.stderr
@@ -4,6 +4,6 @@ error[E0454]: link name must not be empty
LL | #[link(name = "")] extern "C" {}
| ^^ empty link name
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0454`.
diff --git a/tests/ui/error-codes/E0458.stderr b/tests/ui/error-codes/E0458.stderr
index e641bba54..c13ae4e78 100644
--- a/tests/ui/error-codes/E0458.stderr
+++ b/tests/ui/error-codes/E0458.stderr
@@ -1,4 +1,4 @@
-error[E0458]: unknown link kind `wonderful_unicorn`, expected one of: static, dylib, framework, raw-dylib
+error[E0458]: unknown link kind `wonderful_unicorn`, expected one of: static, dylib, framework, raw-dylib, link-arg
--> $DIR/E0458.rs:1:15
|
LL | #[link(kind = "wonderful_unicorn")] extern "C" {}
diff --git a/tests/ui/error-codes/E0459.stderr b/tests/ui/error-codes/E0459.stderr
index 8f0dd25e0..21c1a50bf 100644
--- a/tests/ui/error-codes/E0459.stderr
+++ b/tests/ui/error-codes/E0459.stderr
@@ -4,6 +4,6 @@ error[E0459]: `#[link]` attribute requires a `name = "string"` argument
LL | #[link(kind = "dylib")] extern "C" {}
| ^^^^^^^^^^^^^^^^^^^^^^^ missing `name` argument
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0459`.
diff --git a/tests/ui/error-codes/E0462.stderr b/tests/ui/error-codes/E0462.stderr
index 43e27965f..18f20d793 100644
--- a/tests/ui/error-codes/E0462.stderr
+++ b/tests/ui/error-codes/E0462.stderr
@@ -8,6 +8,6 @@ LL | extern crate found_staticlib;
crate `found_staticlib`: $TEST_BUILD_DIR/error-codes/E0462/auxiliary/libfound_staticlib.somelib
= help: please recompile that crate using --crate-type lib
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0462`.
diff --git a/tests/ui/error-codes/E0464.stderr b/tests/ui/error-codes/E0464.stderr
index 574270f94..edb0b1cf4 100644
--- a/tests/ui/error-codes/E0464.stderr
+++ b/tests/ui/error-codes/E0464.stderr
@@ -8,6 +8,6 @@ LL | extern crate crateresolve1;
= note: candidate #2: $TEST_BUILD_DIR/error-codes/E0464/auxiliary/libcrateresolve1-2.somelib
= note: candidate #3: $TEST_BUILD_DIR/error-codes/E0464/auxiliary/libcrateresolve1-3.somelib
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0464`.
diff --git a/tests/ui/error-codes/E0476.stderr b/tests/ui/error-codes/E0476.next.stderr
index 0378ac6e8..454dbecc7 100644
--- a/tests/ui/error-codes/E0476.stderr
+++ b/tests/ui/error-codes/E0476.next.stderr
@@ -1,5 +1,5 @@
error[E0119]: conflicting implementations of trait `CoerceUnsized<&Wrapper<_>>` for type `&Wrapper<_>`
- --> $DIR/E0476.rs:9:1
+ --> $DIR/E0476.rs:11:1
|
LL | impl<'a, 'b, T, S> CoerceUnsized<&'a Wrapper<T>> for &'b Wrapper<S> where S: Unsize<T> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -9,18 +9,18 @@ LL | impl<'a, 'b, T, S> CoerceUnsized<&'a Wrapper<T>> for &'b Wrapper<S> where S
where 'b: 'a, T: Unsize<U>, T: ?Sized, U: ?Sized;
error[E0476]: lifetime of the source pointer does not outlive lifetime bound of the object type
- --> $DIR/E0476.rs:9:1
+ --> $DIR/E0476.rs:11:1
|
LL | impl<'a, 'b, T, S> CoerceUnsized<&'a Wrapper<T>> for &'b Wrapper<S> where S: Unsize<T> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: object type is valid for the lifetime `'a` as defined here
- --> $DIR/E0476.rs:9:6
+ --> $DIR/E0476.rs:11:6
|
LL | impl<'a, 'b, T, S> CoerceUnsized<&'a Wrapper<T>> for &'b Wrapper<S> where S: Unsize<T> {}
| ^^
note: source pointer is only valid for the lifetime `'b` as defined here
- --> $DIR/E0476.rs:9:10
+ --> $DIR/E0476.rs:11:10
|
LL | impl<'a, 'b, T, S> CoerceUnsized<&'a Wrapper<T>> for &'b Wrapper<S> where S: Unsize<T> {}
| ^^
diff --git a/tests/ui/error-codes/E0476.old.stderr b/tests/ui/error-codes/E0476.old.stderr
new file mode 100644
index 000000000..454dbecc7
--- /dev/null
+++ b/tests/ui/error-codes/E0476.old.stderr
@@ -0,0 +1,31 @@
+error[E0119]: conflicting implementations of trait `CoerceUnsized<&Wrapper<_>>` for type `&Wrapper<_>`
+ --> $DIR/E0476.rs:11:1
+ |
+LL | impl<'a, 'b, T, S> CoerceUnsized<&'a Wrapper<T>> for &'b Wrapper<S> where S: Unsize<T> {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: conflicting implementation in crate `core`:
+ - impl<'a, 'b, T, U> CoerceUnsized<&'a U> for &'b T
+ where 'b: 'a, T: Unsize<U>, T: ?Sized, U: ?Sized;
+
+error[E0476]: lifetime of the source pointer does not outlive lifetime bound of the object type
+ --> $DIR/E0476.rs:11:1
+ |
+LL | impl<'a, 'b, T, S> CoerceUnsized<&'a Wrapper<T>> for &'b Wrapper<S> where S: Unsize<T> {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+note: object type is valid for the lifetime `'a` as defined here
+ --> $DIR/E0476.rs:11:6
+ |
+LL | impl<'a, 'b, T, S> CoerceUnsized<&'a Wrapper<T>> for &'b Wrapper<S> where S: Unsize<T> {}
+ | ^^
+note: source pointer is only valid for the lifetime `'b` as defined here
+ --> $DIR/E0476.rs:11:10
+ |
+LL | impl<'a, 'b, T, S> CoerceUnsized<&'a Wrapper<T>> for &'b Wrapper<S> where S: Unsize<T> {}
+ | ^^
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0119, E0476.
+For more information about an error, try `rustc --explain E0119`.
diff --git a/tests/ui/error-codes/E0476.rs b/tests/ui/error-codes/E0476.rs
index d5e4b8d23..d87916198 100644
--- a/tests/ui/error-codes/E0476.rs
+++ b/tests/ui/error-codes/E0476.rs
@@ -1,3 +1,5 @@
+// revisions: old next
+//[next] compile-flags: -Znext-solver=coherence
#![feature(coerce_unsized)]
#![feature(unsize)]
diff --git a/tests/ui/error-codes/E0478.stderr b/tests/ui/error-codes/E0478.stderr
index ec650085a..6ecde0e14 100644
--- a/tests/ui/error-codes/E0478.stderr
+++ b/tests/ui/error-codes/E0478.stderr
@@ -15,6 +15,6 @@ note: but lifetime parameter must outlive the lifetime `'kiss` as defined here
LL | struct Prince<'kiss, 'SnowWhite> {
| ^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0478`.
diff --git a/tests/ui/error-codes/E0496.stderr b/tests/ui/error-codes/E0496.stderr
index 80ca2b1fb..2d60aee77 100644
--- a/tests/ui/error-codes/E0496.stderr
+++ b/tests/ui/error-codes/E0496.stderr
@@ -6,6 +6,6 @@ LL | impl<'a> Foo<'a> {
LL | fn f<'a>(x: &'a i32) {
| ^^ lifetime `'a` already in scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0496`.
diff --git a/tests/ui/error-codes/E0499.stderr b/tests/ui/error-codes/E0499.stderr
index d56baf722..03f2bad6c 100644
--- a/tests/ui/error-codes/E0499.stderr
+++ b/tests/ui/error-codes/E0499.stderr
@@ -9,6 +9,6 @@ LL | a.use_mut();
LL | x.use_mut();
| - first borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/error-codes/E0502.stderr b/tests/ui/error-codes/E0502.stderr
index cade6d718..88d914c0e 100644
--- a/tests/ui/error-codes/E0502.stderr
+++ b/tests/ui/error-codes/E0502.stderr
@@ -8,6 +8,6 @@ LL | bar(a);
LL | y.use_ref();
| - immutable borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/error-codes/E0503.stderr b/tests/ui/error-codes/E0503.stderr
index 275abb23f..f1469cdc5 100644
--- a/tests/ui/error-codes/E0503.stderr
+++ b/tests/ui/error-codes/E0503.stderr
@@ -8,6 +8,6 @@ LL | let _sum = value + 1;
LL | _borrow.use_mut();
| ------- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0503`.
diff --git a/tests/ui/error-codes/E0504.stderr b/tests/ui/error-codes/E0504.stderr
index 20e16a538..c8a48961c 100644
--- a/tests/ui/error-codes/E0504.stderr
+++ b/tests/ui/error-codes/E0504.stderr
@@ -14,6 +14,6 @@ LL | println!("child function: {}", fancy_num.num);
LL | println!("main function: {}", fancy_ref.num);
| ------------- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0505`.
diff --git a/tests/ui/error-codes/E0505.stderr b/tests/ui/error-codes/E0505.stderr
index 1a85e0317..250680d2c 100644
--- a/tests/ui/error-codes/E0505.stderr
+++ b/tests/ui/error-codes/E0505.stderr
@@ -11,6 +11,6 @@ LL | eat(x);
LL | _ref_to_val.use_ref();
| ----------- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0505`.
diff --git a/tests/ui/error-codes/E0506.stderr b/tests/ui/error-codes/E0506.stderr
index 17ad7c611..2cc2885f7 100644
--- a/tests/ui/error-codes/E0506.stderr
+++ b/tests/ui/error-codes/E0506.stderr
@@ -9,6 +9,6 @@ LL |
LL | println!("Num: {}, Ref: {}", fancy_num.num, fancy_ref.num);
| ------------- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/error-codes/E0507.stderr b/tests/ui/error-codes/E0507.stderr
index 089939516..767fedfcc 100644
--- a/tests/ui/error-codes/E0507.stderr
+++ b/tests/ui/error-codes/E0507.stderr
@@ -12,6 +12,6 @@ note: `TheDarkKnight::nothing_is_true` takes ownership of the receiver `self`, w
LL | fn nothing_is_true(self) {}
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/error-codes/E0508-fail.stderr b/tests/ui/error-codes/E0508-fail.stderr
index 208ba3072..1153b1d09 100644
--- a/tests/ui/error-codes/E0508-fail.stderr
+++ b/tests/ui/error-codes/E0508-fail.stderr
@@ -12,6 +12,6 @@ help: consider borrowing here
LL | let _value = &array[0];
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0508`.
diff --git a/tests/ui/error-codes/E0508.stderr b/tests/ui/error-codes/E0508.stderr
index df2d3b0d3..4c864e241 100644
--- a/tests/ui/error-codes/E0508.stderr
+++ b/tests/ui/error-codes/E0508.stderr
@@ -12,6 +12,6 @@ help: consider borrowing here
LL | let _value = &array[0];
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0508`.
diff --git a/tests/ui/error-codes/E0509.stderr b/tests/ui/error-codes/E0509.stderr
index c00d9142e..59843a549 100644
--- a/tests/ui/error-codes/E0509.stderr
+++ b/tests/ui/error-codes/E0509.stderr
@@ -12,6 +12,6 @@ help: consider borrowing here
LL | let fancy_field = &drop_struct.fancy;
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0509`.
diff --git a/tests/ui/error-codes/E0511.stderr b/tests/ui/error-codes/E0511.stderr
index d797b10d5..59eb19d2e 100644
--- a/tests/ui/error-codes/E0511.stderr
+++ b/tests/ui/error-codes/E0511.stderr
@@ -4,6 +4,6 @@ error[E0511]: invalid monomorphization of `simd_add` intrinsic: expected SIMD in
LL | unsafe { simd_add(0, 1); }
| ^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0511`.
diff --git a/tests/ui/error-codes/E0512.stderr b/tests/ui/error-codes/E0512.stderr
index 3fecce542..eb8ce8b17 100644
--- a/tests/ui/error-codes/E0512.stderr
+++ b/tests/ui/error-codes/E0512.stderr
@@ -7,6 +7,6 @@ LL | unsafe { takes_u8(::std::mem::transmute(0u16)); }
= note: source type: `u16` (16 bits)
= note: target type: `u8` (8 bits)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0512`.
diff --git a/tests/ui/error-codes/E0516.stderr b/tests/ui/error-codes/E0516.stderr
index 5243b7caf..62e70a466 100644
--- a/tests/ui/error-codes/E0516.stderr
+++ b/tests/ui/error-codes/E0516.stderr
@@ -9,6 +9,6 @@ help: consider replacing `typeof(...)` with an actual type
LL | let x: i32 = 92;
| ~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0516`.
diff --git a/tests/ui/error-codes/E0519.stderr b/tests/ui/error-codes/E0519.stderr
index e24fc4aaa..4fbd26813 100644
--- a/tests/ui/error-codes/E0519.stderr
+++ b/tests/ui/error-codes/E0519.stderr
@@ -4,6 +4,6 @@ error[E0519]: the current crate is indistinguishable from one of its dependencie
LL | extern crate crateresolve1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0519`.
diff --git a/tests/ui/error-codes/E0520.stderr b/tests/ui/error-codes/E0520.stderr
index 06658a49b..833192030 100644
--- a/tests/ui/error-codes/E0520.stderr
+++ b/tests/ui/error-codes/E0520.stderr
@@ -19,6 +19,6 @@ LL | default fn fly(&self) {}
|
= note: to specialize, `fly` in the parent `impl` must be marked `default`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0520`.
diff --git a/tests/ui/error-codes/E0522.stderr b/tests/ui/error-codes/E0522.stderr
index 0a8a41598..66359cbac 100644
--- a/tests/ui/error-codes/E0522.stderr
+++ b/tests/ui/error-codes/E0522.stderr
@@ -4,6 +4,6 @@ error[E0522]: definition of an unknown language item: `cookie`
LL | #[lang = "cookie"]
| ^^^^^^^^^^^^^^^^^^ definition of unknown language item `cookie`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0522`.
diff --git a/tests/ui/error-codes/E0523.stderr b/tests/ui/error-codes/E0523.stderr
index 8e3eb2159..c6e65b55e 100644
--- a/tests/ui/error-codes/E0523.stderr
+++ b/tests/ui/error-codes/E0523.stderr
@@ -8,6 +8,6 @@ LL | extern crate crateresolve1;
= note: candidate #2: $TEST_BUILD_DIR/error-codes/E0523/auxiliary/libcrateresolve1-2.somelib
= note: candidate #3: $TEST_BUILD_DIR/error-codes/E0523/auxiliary/libcrateresolve1-3.somelib
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0464`.
diff --git a/tests/ui/error-codes/E0527.stderr b/tests/ui/error-codes/E0527.stderr
index a2e6288b2..80d8412a5 100644
--- a/tests/ui/error-codes/E0527.stderr
+++ b/tests/ui/error-codes/E0527.stderr
@@ -4,6 +4,6 @@ error[E0527]: pattern requires 2 elements but array has 4
LL | &[a, b] => {
| ^^^^^^ expected 4 elements
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0527`.
diff --git a/tests/ui/error-codes/E0528.stderr b/tests/ui/error-codes/E0528.stderr
index 21615f954..94c83d36e 100644
--- a/tests/ui/error-codes/E0528.stderr
+++ b/tests/ui/error-codes/E0528.stderr
@@ -4,6 +4,6 @@ error[E0528]: pattern requires at least 3 elements but array has 2
LL | &[a, b, c, rest @ ..] => {
| ^^^^^^^^^^^^^^^^^^^^ pattern cannot match array of 2 elements
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0528`.
diff --git a/tests/ui/error-codes/E0529.stderr b/tests/ui/error-codes/E0529.stderr
index 96b22bb22..b3e25a965 100644
--- a/tests/ui/error-codes/E0529.stderr
+++ b/tests/ui/error-codes/E0529.stderr
@@ -4,6 +4,6 @@ error[E0529]: expected an array or slice, found `f32`
LL | [a, b] => {
| ^^^^^^ pattern cannot match with input type `f32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0529`.
diff --git a/tests/ui/error-codes/E0530.stderr b/tests/ui/error-codes/E0530.stderr
index c31214413..125b60bc9 100644
--- a/tests/ui/error-codes/E0530.stderr
+++ b/tests/ui/error-codes/E0530.stderr
@@ -7,6 +7,6 @@ LL | static TEST: i32 = 0;
LL | TEST => {}
| ^^^^ cannot be named the same as a static
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0530`.
diff --git a/tests/ui/error-codes/E0532.stderr b/tests/ui/error-codes/E0532.stderr
index eeccadccc..0cd276a3c 100644
--- a/tests/ui/error-codes/E0532.stderr
+++ b/tests/ui/error-codes/E0532.stderr
@@ -4,6 +4,6 @@ error[E0532]: expected tuple struct or tuple variant, found constant `StructCons
LL | StructConst1(_) => { },
| ^^^^^^^^^^^^ not a tuple struct or tuple variant
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0532`.
diff --git a/tests/ui/error-codes/E0534.stderr b/tests/ui/error-codes/E0534.stderr
index 23f9cd7ce..6983de7ab 100644
--- a/tests/ui/error-codes/E0534.stderr
+++ b/tests/ui/error-codes/E0534.stderr
@@ -4,6 +4,6 @@ error[E0534]: expected one argument
LL | #[inline()]
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0534`.
diff --git a/tests/ui/error-codes/E0559.stderr b/tests/ui/error-codes/E0559.stderr
index 63ee1cd78..59317780f 100644
--- a/tests/ui/error-codes/E0559.stderr
+++ b/tests/ui/error-codes/E0559.stderr
@@ -6,6 +6,6 @@ LL | let s = Field::Fool { joke: 0 };
|
= note: available fields are: `x`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0559`.
diff --git a/tests/ui/error-codes/E0560.stderr b/tests/ui/error-codes/E0560.stderr
index bb5ce478a..934bc41cc 100644
--- a/tests/ui/error-codes/E0560.stderr
+++ b/tests/ui/error-codes/E0560.stderr
@@ -6,6 +6,6 @@ LL | let s = Simba { mother: 1, father: 0 };
|
= note: all struct fields are already assigned
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0560`.
diff --git a/tests/ui/error-codes/E0565-1.stderr b/tests/ui/error-codes/E0565-1.stderr
index 1283a9c5e..806eed2a6 100644
--- a/tests/ui/error-codes/E0565-1.stderr
+++ b/tests/ui/error-codes/E0565-1.stderr
@@ -4,6 +4,6 @@ error[E0565]: item in `deprecated` must be a key/value pair
LL | #[deprecated("since")]
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0565`.
diff --git a/tests/ui/error-codes/E0565-2.stderr b/tests/ui/error-codes/E0565-2.stderr
index 097871bd3..42199351c 100644
--- a/tests/ui/error-codes/E0565-2.stderr
+++ b/tests/ui/error-codes/E0565-2.stderr
@@ -6,6 +6,6 @@ LL | #[deprecated(since = b"1.29", note = "hi")]
| |
| help: consider removing the prefix
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0565`.
diff --git a/tests/ui/error-codes/E0565.stderr b/tests/ui/error-codes/E0565.stderr
index 6ed90c0ae..68f4a37dc 100644
--- a/tests/ui/error-codes/E0565.stderr
+++ b/tests/ui/error-codes/E0565.stderr
@@ -4,6 +4,6 @@ error[E0565]: meta item in `repr` must be an identifier
LL | #[repr("C")]
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0565`.
diff --git a/tests/ui/error-codes/E0572.stderr b/tests/ui/error-codes/E0572.stderr
index 36619f8de..e0f59ec84 100644
--- a/tests/ui/error-codes/E0572.stderr
+++ b/tests/ui/error-codes/E0572.stderr
@@ -4,6 +4,6 @@ error[E0572]: return statement outside of function body
LL | const FOO: u32 = return 0;
| ^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0572`.
diff --git a/tests/ui/error-codes/E0583.stderr b/tests/ui/error-codes/E0583.stderr
index 6707f2864..cad61dde4 100644
--- a/tests/ui/error-codes/E0583.stderr
+++ b/tests/ui/error-codes/E0583.stderr
@@ -7,6 +7,6 @@ LL | mod module_that_doesnt_exist;
= help: to create the module `module_that_doesnt_exist`, create file "$DIR/module_that_doesnt_exist.rs" or "$DIR/module_that_doesnt_exist/mod.rs"
= note: if there is a `mod module_that_doesnt_exist` elsewhere in the crate already, import it with `use crate::...` instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0583`.
diff --git a/tests/ui/error-codes/E0585.stderr b/tests/ui/error-codes/E0585.stderr
index 53c82fb41..f0464cc0b 100644
--- a/tests/ui/error-codes/E0585.stderr
+++ b/tests/ui/error-codes/E0585.stderr
@@ -6,6 +6,6 @@ LL | /// Hello! I'm useless...
|
= help: doc comments must come before what they document, if a comment was intended use `//`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0585`.
diff --git a/tests/ui/error-codes/E0586.stderr b/tests/ui/error-codes/E0586.stderr
index 0bbf9a608..f562e358c 100644
--- a/tests/ui/error-codes/E0586.stderr
+++ b/tests/ui/error-codes/E0586.stderr
@@ -6,6 +6,6 @@ LL | let x = &tmp[1..=];
|
= note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0586`.
diff --git a/tests/ui/error-codes/E0594.stderr b/tests/ui/error-codes/E0594.stderr
index f4d96f4e4..e010cda83 100644
--- a/tests/ui/error-codes/E0594.stderr
+++ b/tests/ui/error-codes/E0594.stderr
@@ -4,6 +4,6 @@ error[E0594]: cannot assign to immutable static item `NUM`
LL | NUM = 20;
| ^^^^^^^^ cannot assign
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/error-codes/E0596.stderr b/tests/ui/error-codes/E0596.stderr
index 3f9aebcc8..9f1092d88 100644
--- a/tests/ui/error-codes/E0596.stderr
+++ b/tests/ui/error-codes/E0596.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be mutable
LL | let mut x = 1;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/error-codes/E0597.stderr b/tests/ui/error-codes/E0597.stderr
index 82e3481b6..d3206112b 100644
--- a/tests/ui/error-codes/E0597.stderr
+++ b/tests/ui/error-codes/E0597.stderr
@@ -14,6 +14,6 @@ LL | }
|
= note: values in a scope are dropped in the opposite order they are defined
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/error-codes/E0599.stderr b/tests/ui/error-codes/E0599.stderr
index a1fb58f48..5c1c71d39 100644
--- a/tests/ui/error-codes/E0599.stderr
+++ b/tests/ui/error-codes/E0599.stderr
@@ -7,6 +7,6 @@ LL | struct Foo;
LL | || if let Foo::NotEvenReal() = Foo {};
| ^^^^^^^^^^^ associated item not found in `Foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/error-codes/E0600.stderr b/tests/ui/error-codes/E0600.stderr
index 95ac4510c..a76f2354d 100644
--- a/tests/ui/error-codes/E0600.stderr
+++ b/tests/ui/error-codes/E0600.stderr
@@ -4,6 +4,6 @@ error[E0600]: cannot apply unary operator `!` to type `&'static str`
LL | !"a";
| ^^^^ cannot apply unary operator `!`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0600`.
diff --git a/tests/ui/error-codes/E0601.stderr b/tests/ui/error-codes/E0601.stderr
index a687f5756..41a4a8f7d 100644
--- a/tests/ui/error-codes/E0601.stderr
+++ b/tests/ui/error-codes/E0601.stderr
@@ -4,6 +4,6 @@ error[E0601]: `main` function not found in crate `E0601`
LL |
| ^ consider adding a `main` function to `$DIR/E0601.rs`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0601`.
diff --git a/tests/ui/error-codes/E0603.stderr b/tests/ui/error-codes/E0603.stderr
index ee902584f..1ac1bbd89 100644
--- a/tests/ui/error-codes/E0603.stderr
+++ b/tests/ui/error-codes/E0603.stderr
@@ -10,6 +10,6 @@ note: the constant `PRIVATE` is defined here
LL | const PRIVATE: u32 = 0x_a_bad_1dea_u32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/error-codes/E0604.stderr b/tests/ui/error-codes/E0604.stderr
index 68da03928..e91f74d6b 100644
--- a/tests/ui/error-codes/E0604.stderr
+++ b/tests/ui/error-codes/E0604.stderr
@@ -7,6 +7,6 @@ LL | 1u32 as char;
| invalid cast
| help: try `char::from_u32` instead: `char::from_u32(1u32)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0604`.
diff --git a/tests/ui/error-codes/E0607.stderr b/tests/ui/error-codes/E0607.stderr
index a0fe02c1c..835ababf4 100644
--- a/tests/ui/error-codes/E0607.stderr
+++ b/tests/ui/error-codes/E0607.stderr
@@ -4,6 +4,6 @@ error[E0607]: cannot cast thin pointer `*const u8` to fat pointer `*const [u8]`
LL | v as *const [u8];
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0607`.
diff --git a/tests/ui/error-codes/E0608.stderr b/tests/ui/error-codes/E0608.stderr
index f23f9977b..da7be1478 100644
--- a/tests/ui/error-codes/E0608.stderr
+++ b/tests/ui/error-codes/E0608.stderr
@@ -4,6 +4,6 @@ error[E0608]: cannot index into a value of type `u8`
LL | 0u8[2];
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0608`.
diff --git a/tests/ui/error-codes/E0609-private-method.stderr b/tests/ui/error-codes/E0609-private-method.stderr
index d2a11e906..c889765be 100644
--- a/tests/ui/error-codes/E0609-private-method.stderr
+++ b/tests/ui/error-codes/E0609-private-method.stderr
@@ -4,6 +4,6 @@ error[E0609]: no field `method` on type `Foo`
LL | f.method;
| ^^^^^^ unknown field
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0609`.
diff --git a/tests/ui/error-codes/E0609.stderr b/tests/ui/error-codes/E0609.stderr
index 797e95d02..cad857553 100644
--- a/tests/ui/error-codes/E0609.stderr
+++ b/tests/ui/error-codes/E0609.stderr
@@ -4,7 +4,7 @@ error[E0609]: no field `foo` on type `Foo`
LL | let _ = x.foo;
| ^^^ unknown field
|
- = note: available fields are: `x`
+ = note: available field is: `x`
error[E0609]: no field `1` on type `Bar`
--> $DIR/E0609.rs:11:7
diff --git a/tests/ui/error-codes/E0610.stderr b/tests/ui/error-codes/E0610.stderr
index a2966eea4..4263368ff 100644
--- a/tests/ui/error-codes/E0610.stderr
+++ b/tests/ui/error-codes/E0610.stderr
@@ -4,6 +4,6 @@ error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
LL | let _ = x.foo;
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0610`.
diff --git a/tests/ui/error-codes/E0614.stderr b/tests/ui/error-codes/E0614.stderr
index 598117c2b..ae7c2ce9a 100644
--- a/tests/ui/error-codes/E0614.stderr
+++ b/tests/ui/error-codes/E0614.stderr
@@ -4,6 +4,6 @@ error[E0614]: type `u32` cannot be dereferenced
LL | *y;
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0614`.
diff --git a/tests/ui/error-codes/E0615.stderr b/tests/ui/error-codes/E0615.stderr
index c12e1a3a6..13446a475 100644
--- a/tests/ui/error-codes/E0615.stderr
+++ b/tests/ui/error-codes/E0615.stderr
@@ -9,6 +9,6 @@ help: use parentheses to call the method
LL | f.method();
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0615`.
diff --git a/tests/ui/error-codes/E0616.stderr b/tests/ui/error-codes/E0616.stderr
index da349ed2f..73eb64ab4 100644
--- a/tests/ui/error-codes/E0616.stderr
+++ b/tests/ui/error-codes/E0616.stderr
@@ -4,6 +4,6 @@ error[E0616]: field `x` of struct `Foo` is private
LL | f.x;
| ^ private field
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0616`.
diff --git a/tests/ui/error-codes/E0620.stderr b/tests/ui/error-codes/E0620.stderr
index 65152b2b7..5bc890362 100644
--- a/tests/ui/error-codes/E0620.stderr
+++ b/tests/ui/error-codes/E0620.stderr
@@ -10,6 +10,6 @@ help: consider using an implicit coercion to `&[usize]` instead
LL | let _foo = &[1_usize, 2] as [usize];
| ^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0620`.
diff --git a/tests/ui/error-codes/E0621-does-not-trigger-for-closures.stderr b/tests/ui/error-codes/E0621-does-not-trigger-for-closures.stderr
index b9edeb834..2d96926a2 100644
--- a/tests/ui/error-codes/E0621-does-not-trigger-for-closures.stderr
+++ b/tests/ui/error-codes/E0621-does-not-trigger-for-closures.stderr
@@ -7,5 +7,5 @@ LL | invoke(&x, |a, b| if a > b { a } else { b });
| |return type of closure is &'2 i32
| has type `&'1 i32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/error-codes/E0622.stderr b/tests/ui/error-codes/E0622.stderr
index 8466dfe38..c59776b21 100644
--- a/tests/ui/error-codes/E0622.stderr
+++ b/tests/ui/error-codes/E0622.stderr
@@ -4,6 +4,6 @@ error[E0622]: intrinsic must be a function
LL | pub static breakpoint : unsafe extern "rust-intrinsic" fn();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected a function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0622`.
diff --git a/tests/ui/error-codes/E0624.stderr b/tests/ui/error-codes/E0624.stderr
index 23a8ea8a8..b2bc2c92d 100644
--- a/tests/ui/error-codes/E0624.stderr
+++ b/tests/ui/error-codes/E0624.stderr
@@ -7,6 +7,6 @@ LL | fn method(&self) {}
LL | foo.method();
| ^^^^^^ private method
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0624`.
diff --git a/tests/ui/error-codes/E0646.stderr b/tests/ui/error-codes/E0646.stderr
index 069401b3f..7f8d7ae70 100644
--- a/tests/ui/error-codes/E0646.stderr
+++ b/tests/ui/error-codes/E0646.stderr
@@ -4,6 +4,6 @@ error[E0646]: `main` function is not allowed to have a `where` clause
LL | fn main() where (): Copy {}
| ^^^^^^^^^^^^^^ `main` cannot have a `where` clause
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0646`.
diff --git a/tests/ui/error-codes/E0647.stderr b/tests/ui/error-codes/E0647.stderr
index 9d1ab9671..4b444e5a3 100644
--- a/tests/ui/error-codes/E0647.stderr
+++ b/tests/ui/error-codes/E0647.stderr
@@ -4,6 +4,6 @@ error[E0647]: `#[start]` function is not allowed to have a `where` clause
LL | fn start(_: isize, _: *const *const u8) -> isize where (): Copy {
| ^^^^^^^^^^^^^^ `#[start]` function cannot have a `where` clause
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0647`.
diff --git a/tests/ui/error-codes/E0648.stderr b/tests/ui/error-codes/E0648.stderr
index 1a65825c7..e995e5313 100644
--- a/tests/ui/error-codes/E0648.stderr
+++ b/tests/ui/error-codes/E0648.stderr
@@ -4,6 +4,6 @@ error[E0648]: `export_name` may not contain null characters
LL | #[export_name="\0foo"]
| ^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0648`.
diff --git a/tests/ui/error-codes/E0658.stderr b/tests/ui/error-codes/E0658.stderr
index 8d4234845..686394b6d 100644
--- a/tests/ui/error-codes/E0658.stderr
+++ b/tests/ui/error-codes/E0658.stderr
@@ -7,6 +7,6 @@ LL | enum Foo {
= note: see issue #56071 <https://github.com/rust-lang/rust/issues/56071> for more information
= help: add `#![feature(repr128)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/error-codes/E0659.stderr b/tests/ui/error-codes/E0659.stderr
index b0c73c636..dbb72bb67 100644
--- a/tests/ui/error-codes/E0659.stderr
+++ b/tests/ui/error-codes/E0659.stderr
@@ -18,6 +18,6 @@ LL | pub use earth::*;
| ^^^^^^^^
= help: consider adding an explicit import of `foo` to disambiguate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0659`.
diff --git a/tests/ui/error-codes/E0705.rs b/tests/ui/error-codes/E0705.rs
deleted file mode 100644
index 05abcb629..000000000
--- a/tests/ui/error-codes/E0705.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// check-pass
-
-// This is a stub feature that doesn't control anything, so to make tidy happy,
-// gate-test-test_2018_feature
-
-#![feature(test_2018_feature)]
-//~^ WARN the feature `test_2018_feature` is included in the Rust 2018 edition
-#![feature(rust_2018_preview)]
-
-fn main() {}
diff --git a/tests/ui/error-codes/E0705.stderr b/tests/ui/error-codes/E0705.stderr
deleted file mode 100644
index 6fa843158..000000000
--- a/tests/ui/error-codes/E0705.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-warning[E0705]: the feature `test_2018_feature` is included in the Rust 2018 edition
- --> $DIR/E0705.rs:6:12
- |
-LL | #![feature(test_2018_feature)]
- | ^^^^^^^^^^^^^^^^^
-
-warning: 1 warning emitted
-
-For more information about this error, try `rustc --explain E0705`.
diff --git a/tests/ui/error-codes/E0718.stderr b/tests/ui/error-codes/E0718.stderr
index 30378dd16..9a3db136d 100644
--- a/tests/ui/error-codes/E0718.stderr
+++ b/tests/ui/error-codes/E0718.stderr
@@ -4,6 +4,6 @@ error[E0718]: `owned_box` language item must be applied to a struct
LL | #[lang = "owned_box"]
| ^^^^^^^^^^^^^^^^^^^^^ attribute should be applied to a struct, not a static item
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0718`.
diff --git a/tests/ui/error-codes/E0730.stderr b/tests/ui/error-codes/E0730.stderr
index 067e8c57c..5e996ac35 100644
--- a/tests/ui/error-codes/E0730.stderr
+++ b/tests/ui/error-codes/E0730.stderr
@@ -4,6 +4,6 @@ error[E0730]: cannot pattern-match on an array without a fixed length
LL | [1, 2, ..] => true,
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0730`.
diff --git a/tests/ui/error-codes/E0771.stderr b/tests/ui/error-codes/E0771.stderr
index 9450c61c2..e1384effe 100644
--- a/tests/ui/error-codes/E0771.stderr
+++ b/tests/ui/error-codes/E0771.stderr
@@ -15,6 +15,6 @@ LL | #![feature(adt_const_params)]
= note: see issue #95174 <https://github.com/rust-lang/rust/issues/95174> for more information
= note: `#[warn(incomplete_features)]` on by default
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0770`.
diff --git a/tests/ui/error-codes/E0778.stderr b/tests/ui/error-codes/E0778.stderr
index 42647e5c6..7eb24c493 100644
--- a/tests/ui/error-codes/E0778.stderr
+++ b/tests/ui/error-codes/E0778.stderr
@@ -4,6 +4,6 @@ error[E0778]: `#[instruction_set]` requires an argument
LL | #[instruction_set()]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0778`.
diff --git a/tests/ui/error-codes/E0779.stderr b/tests/ui/error-codes/E0779.stderr
index 7c6a119a0..a01aa98b9 100644
--- a/tests/ui/error-codes/E0779.stderr
+++ b/tests/ui/error-codes/E0779.stderr
@@ -4,6 +4,6 @@ error[E0779]: invalid instruction set specified
LL | #[instruction_set(arm::magic)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0779`.
diff --git a/tests/ui/error-codes/e0119/complex-impl.stderr b/tests/ui/error-codes/e0119/complex-impl.stderr
index 654073eec..c0519c60e 100644
--- a/tests/ui/error-codes/e0119/complex-impl.stderr
+++ b/tests/ui/error-codes/e0119/complex-impl.stderr
@@ -9,6 +9,6 @@ LL | impl<R> External for (Q, R) {}
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/error-codes/e0119/issue-23563.stderr b/tests/ui/error-codes/e0119/issue-23563.stderr
index 1b2d64282..86737742f 100644
--- a/tests/ui/error-codes/e0119/issue-23563.stderr
+++ b/tests/ui/error-codes/e0119/issue-23563.stderr
@@ -8,6 +8,6 @@ LL | impl<'a, T> LolFrom<&'a [T]> for LocalType<T> {
- impl<T, U> LolFrom<T> for U
where T: LolInto<U>;
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/error-codes/e0119/issue-27403.stderr b/tests/ui/error-codes/e0119/issue-27403.stderr
index 9b3345c23..b0918a3d6 100644
--- a/tests/ui/error-codes/e0119/issue-27403.stderr
+++ b/tests/ui/error-codes/e0119/issue-27403.stderr
@@ -8,6 +8,6 @@ LL | impl<S> Into<S> for GenX<S> {
- impl<T, U> Into<U> for T
where U: From<T>;
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/error-codes/e0119/issue-28981.stderr b/tests/ui/error-codes/e0119/issue-28981.stderr
index 97b570bc7..be3e4aea5 100644
--- a/tests/ui/error-codes/e0119/issue-28981.stderr
+++ b/tests/ui/error-codes/e0119/issue-28981.stderr
@@ -7,6 +7,6 @@ LL | impl<Foo> Deref for Foo { }
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
= note: only traits defined in the current crate can be implemented for a type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/error-codes/e0119/so-37347311.stderr b/tests/ui/error-codes/e0119/so-37347311.stderr
index 99367e808..869b11b19 100644
--- a/tests/ui/error-codes/e0119/so-37347311.stderr
+++ b/tests/ui/error-codes/e0119/so-37347311.stderr
@@ -7,6 +7,6 @@ LL | impl<S: Storage> From<S::Error> for MyError<S> {
= note: conflicting implementation in crate `core`:
- impl<T> From<T> for T;
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/error-codes/ex-E0611.stderr b/tests/ui/error-codes/ex-E0611.stderr
index 1da7b33be..fb61eba15 100644
--- a/tests/ui/error-codes/ex-E0611.stderr
+++ b/tests/ui/error-codes/ex-E0611.stderr
@@ -4,6 +4,6 @@ error[E0616]: field `0` of struct `Foo` is private
LL | y.0;
| ^ private field
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0616`.
diff --git a/tests/ui/error-codes/ex-E0612.stderr b/tests/ui/error-codes/ex-E0612.stderr
index b21b6fdfc..23c1697b9 100644
--- a/tests/ui/error-codes/ex-E0612.stderr
+++ b/tests/ui/error-codes/ex-E0612.stderr
@@ -2,8 +2,13 @@ error[E0609]: no field `1` on type `Foo`
--> $DIR/ex-E0612.rs:5:6
|
LL | y.1;
- | ^ help: a field with a similar name exists: `0`
+ | ^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | y.0;
+ | ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0609`.
diff --git a/tests/ui/error-emitter/highlighting.not-windows.stderr b/tests/ui/error-emitter/highlighting.not-windows.stderr
new file mode 100644
index 000000000..922bb19a2
--- /dev/null
+++ b/tests/ui/error-emitter/highlighting.not-windows.stderr
@@ -0,0 +1,22 @@
+error[E0308]: mismatched types
+ --> $DIR/highlighting.rs:26:11
+ |
+LL |  query(wrapped_fn);
+ |  ----- ^^^^^^^^^^ one type is more general than the other
+ |  |
+ |  arguments to this function are incorrect
+ |
+ = note: expected fn pointer `for<'a> fn(Box<(dyn Any + Send + 'a)>) -> Pin<_>`
+ found fn item `fn(Box<(dyn Any + Send + 'static)>) -> Pin<_> {wrapped_fn}`
+note: function defined here
+ --> $DIR/highlighting.rs:15:4
+ |
+LL | fn query(_: fn(Box<(dyn Any + Send + '_)>) -> Pin<Box<(
+ |  ____^^^^^_-
+LL | |  dyn Future<Output = Result<Box<(dyn Any + 'static)>, String>> + Send + 'static
+LL | | )>>) {}
+ | |___-
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/error-emitter/highlighting.rs b/tests/ui/error-emitter/highlighting.rs
new file mode 100644
index 000000000..fd61b2b05
--- /dev/null
+++ b/tests/ui/error-emitter/highlighting.rs
@@ -0,0 +1,27 @@
+// Make sure "highlighted" code is colored purple
+
+// compile-flags: --error-format=human --color=always
+// error-pattern:for<'a> 
+// edition:2018
+
+// revisions: windows not-windows
+// [windows]only-windows
+// [not-windows]ignore-windows
+
+use core::pin::Pin;
+use core::future::Future;
+use core::any::Any;
+
+fn query(_: fn(Box<(dyn Any + Send + '_)>) -> Pin<Box<(
+ dyn Future<Output = Result<Box<(dyn Any + 'static)>, String>> + Send + 'static
+)>>) {}
+
+fn wrapped_fn<'a>(_: Box<(dyn Any + Send)>) -> Pin<Box<(
+ dyn Future<Output = Result<Box<(dyn Any + 'static)>, String>> + Send + 'static
+)>> {
+ Box::pin(async { Err("nope".into()) })
+}
+
+fn main() {
+ query(wrapped_fn);
+}
diff --git a/tests/ui/error-emitter/highlighting.windows.stderr b/tests/ui/error-emitter/highlighting.windows.stderr
new file mode 100644
index 000000000..11d4125db
--- /dev/null
+++ b/tests/ui/error-emitter/highlighting.windows.stderr
@@ -0,0 +1,22 @@
+error[E0308]: mismatched types
+ --> $DIR/highlighting.rs:26:11
+ |
+LL |  query(wrapped_fn);
+ |  ----- ^^^^^^^^^^ one type is more general than the other
+ |  |
+ |  arguments to this function are incorrect
+ |
+ = note: expected fn pointer `for<'a> fn(Box<(dyn Any + Send + 'a)>) -> Pin<_>`
+ found fn item `fn(Box<(dyn Any + Send + 'static)>) -> Pin<_> {wrapped_fn}`
+note: function defined here
+ --> $DIR/highlighting.rs:15:4
+ |
+LL | fn query(_: fn(Box<(dyn Any + Send + '_)>) -> Pin<Box<(
+ |  ____^^^^^_-
+LL | |  dyn Future<Output = Result<Box<(dyn Any + 'static)>, String>> + Send + 'static
+LL | | )>>) {}
+ | |___-
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/multiline-multipart-suggestion.stderr b/tests/ui/error-emitter/multiline-multipart-suggestion.not-windows.stderr
index 045a86b4f..49c0354a2 100644
--- a/tests/ui/suggestions/multiline-multipart-suggestion.stderr
+++ b/tests/ui/error-emitter/multiline-multipart-suggestion.not-windows.stderr
@@ -1,17 +1,17 @@
error[E0106]: missing lifetime specifier
- --> $DIR/multiline-multipart-suggestion.rs:4:34
+ --> $DIR/multiline-multipart-suggestion.rs:8:34
 |
-LL | fn short(foo_bar: &Vec<&i32>) -> &i32 {
+LL | fn short(foo_bar: &Vec<&i32>) -> &i32 {
 |  ---------- ^ expected named lifetime parameter
 |
 = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from
help: consider introducing a named lifetime parameter
 |
-LL | fn short<'a>(foo_bar: &'a Vec<&'a i32>) -> &'a i32 {
+LL | fn short<'a>(foo_bar: &'a Vec<&'a i32>) -> &'a i32 {
 | ++++ ++ ++ ++
error[E0106]: missing lifetime specifier
- --> $DIR/multiline-multipart-suggestion.rs:11:6
+ --> $DIR/multiline-multipart-suggestion.rs:15:6
 |
LL |  foo_bar: &Vec<&i32>,
 |  ----------
@@ -22,14 +22,14 @@
 = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from
help: consider introducing a named lifetime parameter
 |
-LL ~ fn long<'a>(
+LL ~ fn long<'a>(
LL ~  foo_bar: &'a Vec<&'a i32>,
LL |  something_very_long_so_that_the_line_will_wrap_around__________: i32,
LL ~ ) -> &'a i32 {
 |
error[E0106]: missing lifetime specifier
- --> $DIR/multiline-multipart-suggestion.rs:16:29
+ --> $DIR/multiline-multipart-suggestion.rs:20:29
 |
LL |  foo_bar: &Vec<&i32>) -> &i32 {
 |  ---------- ^ expected named lifetime parameter
@@ -37,7 +37,7 @@
 = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from
help: consider introducing a named lifetime parameter
 |
-LL ~ fn long2<'a>(
+LL ~ fn long2<'a>(
LL ~  foo_bar: &'a Vec<&'a i32>) -> &'a i32 {
 |
diff --git a/tests/ui/suggestions/multiline-multipart-suggestion.rs b/tests/ui/error-emitter/multiline-multipart-suggestion.rs
index 77d0322d0..a06399c34 100644
--- a/tests/ui/suggestions/multiline-multipart-suggestion.rs
+++ b/tests/ui/error-emitter/multiline-multipart-suggestion.rs
@@ -1,18 +1,22 @@
// compile-flags: --error-format=human --color=always
-// ignore-windows
+// error-pattern: missing lifetime specifier
-fn short(foo_bar: &Vec<&i32>) -> &i32 { //~ ERROR missing lifetime specifier
+// revisions: windows not-windows
+// [windows]only-windows
+// [not-windows]ignore-windows
+
+fn short(foo_bar: &Vec<&i32>) -> &i32 {
&12
}
-fn long( //~ ERROR missing lifetime specifier
+fn long(
foo_bar: &Vec<&i32>,
something_very_long_so_that_the_line_will_wrap_around__________: i32,
) -> &i32 {
&12
}
-fn long2( //~ ERROR missing lifetime specifier
+fn long2(
foo_bar: &Vec<&i32>) -> &i32 {
&12
}
diff --git a/tests/ui/error-emitter/multiline-multipart-suggestion.windows.stderr b/tests/ui/error-emitter/multiline-multipart-suggestion.windows.stderr
new file mode 100644
index 000000000..bf32c228d
--- /dev/null
+++ b/tests/ui/error-emitter/multiline-multipart-suggestion.windows.stderr
@@ -0,0 +1,46 @@
+error[E0106]: missing lifetime specifier
+ --> $DIR/multiline-multipart-suggestion.rs:8:34
+ |
+LL | fn short(foo_bar: &Vec<&i32>) -> &i32 {
+ |  ---------- ^ expected named lifetime parameter
+ |
+ = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from
+help: consider introducing a named lifetime parameter
+ |
+LL | fn short<'a>(foo_bar: &'a Vec<&'a i32>) -> &'a i32 {
+ | ++++ ++ ++ ++
+
+error[E0106]: missing lifetime specifier
+ --> $DIR/multiline-multipart-suggestion.rs:15:6
+ |
+LL |  foo_bar: &Vec<&i32>,
+ |  ----------
+LL |  something_very_long_so_that_the_line_will_wrap_around__________: i32,
+LL | ) -> &i32 {
+ |  ^ expected named lifetime parameter
+ |
+ = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from
+help: consider introducing a named lifetime parameter
+ |
+LL ~ fn long<'a>(
+LL ~  foo_bar: &'a Vec<&'a i32>,
+LL |  something_very_long_so_that_the_line_will_wrap_around__________: i32,
+LL ~ ) -> &'a i32 {
+ |
+
+error[E0106]: missing lifetime specifier
+ --> $DIR/multiline-multipart-suggestion.rs:20:29
+ |
+LL |  foo_bar: &Vec<&i32>) -> &i32 {
+ |  ---------- ^ expected named lifetime parameter
+ |
+ = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from
+help: consider introducing a named lifetime parameter
+ |
+LL ~ fn long2<'a>(
+LL ~  foo_bar: &'a Vec<&'a i32>) -> &'a i32 {
+ |
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0106`.
diff --git a/tests/ui/error-should-say-copy-not-pod.stderr b/tests/ui/error-should-say-copy-not-pod.stderr
index 637eb27db..658584e2f 100644
--- a/tests/ui/error-should-say-copy-not-pod.stderr
+++ b/tests/ui/error-should-say-copy-not-pod.stderr
@@ -12,6 +12,6 @@ note: required by a bound in `check_bound`
LL | fn check_bound<T:Copy>(_: T) {}
| ^^^^ required by this bound in `check_bound`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/errors/issue-104621-extern-not-file.stderr b/tests/ui/errors/issue-104621-extern-not-file.stderr
index 5aaf97413..61496e5b5 100644
--- a/tests/ui/errors/issue-104621-extern-not-file.stderr
+++ b/tests/ui/errors/issue-104621-extern-not-file.stderr
@@ -4,5 +4,5 @@ error: extern location for foo is not a file: .
LL | extern crate foo;
| ^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/errors/remap-path-prefix-reverse.local-self.stderr b/tests/ui/errors/remap-path-prefix-reverse.local-self.stderr
index 51e3b776c..7aa66be0d 100644
--- a/tests/ui/errors/remap-path-prefix-reverse.local-self.stderr
+++ b/tests/ui/errors/remap-path-prefix-reverse.local-self.stderr
@@ -9,6 +9,6 @@ LL | let _ = remapped_dep::SomeStruct; // ~ERROR E0423
LL | pub struct SomeStruct {} // This line should be show as part of the error.
| --------------------- `remapped_dep::SomeStruct` defined here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0423`.
diff --git a/tests/ui/errors/remap-path-prefix-reverse.remapped-self.stderr b/tests/ui/errors/remap-path-prefix-reverse.remapped-self.stderr
index 51e3b776c..7aa66be0d 100644
--- a/tests/ui/errors/remap-path-prefix-reverse.remapped-self.stderr
+++ b/tests/ui/errors/remap-path-prefix-reverse.remapped-self.stderr
@@ -9,6 +9,6 @@ LL | let _ = remapped_dep::SomeStruct; // ~ERROR E0423
LL | pub struct SomeStruct {} // This line should be show as part of the error.
| --------------------- `remapped_dep::SomeStruct` defined here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0423`.
diff --git a/tests/ui/errors/remap-path-prefix.normal.stderr b/tests/ui/errors/remap-path-prefix.normal.stderr
index 004f10b4e..46d33d260 100644
--- a/tests/ui/errors/remap-path-prefix.normal.stderr
+++ b/tests/ui/errors/remap-path-prefix.normal.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `ferris` in this scope
LL | ferris
| ^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/errors/remap-path-prefix.with-diagnostic-scope.stderr b/tests/ui/errors/remap-path-prefix.with-diagnostic-scope.stderr
index 004f10b4e..46d33d260 100644
--- a/tests/ui/errors/remap-path-prefix.with-diagnostic-scope.stderr
+++ b/tests/ui/errors/remap-path-prefix.with-diagnostic-scope.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `ferris` in this scope
LL | ferris
| ^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/errors/remap-path-prefix.without-diagnostic-scope.stderr b/tests/ui/errors/remap-path-prefix.without-diagnostic-scope.stderr
index 98fe32819..0badea6e2 100644
--- a/tests/ui/errors/remap-path-prefix.without-diagnostic-scope.stderr
+++ b/tests/ui/errors/remap-path-prefix.without-diagnostic-scope.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `ferris` in this scope
LL | ferris
| ^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/explicit-tail-calls/become-outside.array.stderr b/tests/ui/explicit-tail-calls/become-outside.array.stderr
index 839c20509..81ed68373 100644
--- a/tests/ui/explicit-tail-calls/become-outside.array.stderr
+++ b/tests/ui/explicit-tail-calls/become-outside.array.stderr
@@ -4,6 +4,6 @@ error[E0572]: become statement outside of function body
LL | struct Bad([(); become f()]);
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0572`.
diff --git a/tests/ui/explicit-tail-calls/become-outside.constant.stderr b/tests/ui/explicit-tail-calls/become-outside.constant.stderr
index 9b67f08af..07747e2cc 100644
--- a/tests/ui/explicit-tail-calls/become-outside.constant.stderr
+++ b/tests/ui/explicit-tail-calls/become-outside.constant.stderr
@@ -4,6 +4,6 @@ error[E0572]: become statement outside of function body
LL | become f();
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0572`.
diff --git a/tests/ui/explicit/explicit-call-to-dtor.stderr b/tests/ui/explicit/explicit-call-to-dtor.stderr
index f2e0b73b6..6f40f3998 100644
--- a/tests/ui/explicit/explicit-call-to-dtor.stderr
+++ b/tests/ui/explicit/explicit-call-to-dtor.stderr
@@ -9,6 +9,6 @@ help: consider using `drop` function
LL | drop(x);
| +++++ ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0040`.
diff --git a/tests/ui/explicit/explicit-call-to-supertrait-dtor.stderr b/tests/ui/explicit/explicit-call-to-supertrait-dtor.stderr
index 5fa42fcf1..d2d69ce6d 100644
--- a/tests/ui/explicit/explicit-call-to-supertrait-dtor.stderr
+++ b/tests/ui/explicit/explicit-call-to-supertrait-dtor.stderr
@@ -9,6 +9,6 @@ help: consider using `drop` function
LL | drop(self);
| +++++ ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0040`.
diff --git a/tests/ui/expr/if/attrs/bad-cfg.stderr b/tests/ui/expr/if/attrs/bad-cfg.stderr
index 8a2890886..ca0eced26 100644
--- a/tests/ui/expr/if/attrs/bad-cfg.stderr
+++ b/tests/ui/expr/if/attrs/bad-cfg.stderr
@@ -4,5 +4,5 @@ error: removing an expression is not supported in this position
LL | let _ = #[cfg(FALSE)] if true {};
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/expr/if/attrs/stmt-expr-gated.stderr b/tests/ui/expr/if/attrs/stmt-expr-gated.stderr
index 47dac39a9..afc26757c 100644
--- a/tests/ui/expr/if/attrs/stmt-expr-gated.stderr
+++ b/tests/ui/expr/if/attrs/stmt-expr-gated.stderr
@@ -7,6 +7,6 @@ LL | let _ = #[deny(warnings)] if true {
= note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
= help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/expr/if/bad-if-let-suggestion.rs b/tests/ui/expr/if/bad-if-let-suggestion.rs
index 99d584ac7..b0d0676e1 100644
--- a/tests/ui/expr/if/bad-if-let-suggestion.rs
+++ b/tests/ui/expr/if/bad-if-let-suggestion.rs
@@ -1,6 +1,3 @@
-// FIXME(compiler-errors): This really should suggest `let` on the RHS of the
-// `&&` operator, but that's kinda hard to do because of precedence.
-// Instead, for now we just make sure not to suggest `if let let`.
fn a() {
if let x = 1 && i = 2 {}
//~^ ERROR cannot find value `i` in this scope
diff --git a/tests/ui/expr/if/bad-if-let-suggestion.stderr b/tests/ui/expr/if/bad-if-let-suggestion.stderr
index 20ac9ca76..0d1f895bd 100644
--- a/tests/ui/expr/if/bad-if-let-suggestion.stderr
+++ b/tests/ui/expr/if/bad-if-let-suggestion.stderr
@@ -1,19 +1,27 @@
error: expected expression, found `let` statement
- --> $DIR/bad-if-let-suggestion.rs:5:8
+ --> $DIR/bad-if-let-suggestion.rs:2:8
|
LL | if let x = 1 && i = 2 {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
+help: you might have meant to continue the let-chain
+ |
+LL | if let x = 1 && let i = 2 {}
+ | +++
+help: you might have meant to compare for equality
+ |
+LL | if let x = 1 && i == 2 {}
+ | +
error[E0425]: cannot find value `i` in this scope
- --> $DIR/bad-if-let-suggestion.rs:5:21
+ --> $DIR/bad-if-let-suggestion.rs:2:21
|
LL | if let x = 1 && i = 2 {}
| ^ not found in this scope
error[E0425]: cannot find value `i` in this scope
- --> $DIR/bad-if-let-suggestion.rs:12:9
+ --> $DIR/bad-if-let-suggestion.rs:9:9
|
LL | fn a() {
| ------ similarly named function `a` defined here
@@ -22,7 +30,7 @@ LL | if (i + j) = i {}
| ^ help: a function with a similar name exists: `a`
error[E0425]: cannot find value `j` in this scope
- --> $DIR/bad-if-let-suggestion.rs:12:13
+ --> $DIR/bad-if-let-suggestion.rs:9:13
|
LL | fn a() {
| ------ similarly named function `a` defined here
@@ -31,7 +39,7 @@ LL | if (i + j) = i {}
| ^ help: a function with a similar name exists: `a`
error[E0425]: cannot find value `i` in this scope
- --> $DIR/bad-if-let-suggestion.rs:12:18
+ --> $DIR/bad-if-let-suggestion.rs:9:18
|
LL | fn a() {
| ------ similarly named function `a` defined here
@@ -40,7 +48,7 @@ LL | if (i + j) = i {}
| ^ help: a function with a similar name exists: `a`
error[E0425]: cannot find value `x` in this scope
- --> $DIR/bad-if-let-suggestion.rs:19:8
+ --> $DIR/bad-if-let-suggestion.rs:16:8
|
LL | fn a() {
| ------ similarly named function `a` defined here
@@ -49,7 +57,7 @@ LL | if x[0] = 1 {}
| ^ help: a function with a similar name exists: `a`
error[E0308]: mismatched types
- --> $DIR/bad-if-let-suggestion.rs:5:8
+ --> $DIR/bad-if-let-suggestion.rs:2:8
|
LL | if let x = 1 && i = 2 {}
| ^^^^^^^^^^^^^^^^^^ expected `bool`, found `()`
diff --git a/tests/ui/expr/if/if-branch-types.stderr b/tests/ui/expr/if/if-branch-types.stderr
index d2bba8821..0e86a24f3 100644
--- a/tests/ui/expr/if/if-branch-types.stderr
+++ b/tests/ui/expr/if/if-branch-types.stderr
@@ -11,6 +11,6 @@ help: change the type of the numeric literal from `u32` to `i32`
LL | let x = if true { 10i32 } else { 10i32 };
| ~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/expr/if/if-let-arm-types.stderr b/tests/ui/expr/if/if-let-arm-types.stderr
index b40a0f479..285f5c4a6 100644
--- a/tests/ui/expr/if/if-let-arm-types.stderr
+++ b/tests/ui/expr/if/if-let-arm-types.stderr
@@ -12,6 +12,6 @@ LL | | 1
LL | | };
| |_____- `if` and `else` have incompatible types
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/expr/if/if-typeck.stderr b/tests/ui/expr/if/if-typeck.stderr
index 74ed0ed0a..1be43a201 100644
--- a/tests/ui/expr/if/if-typeck.stderr
+++ b/tests/ui/expr/if/if-typeck.stderr
@@ -7,6 +7,6 @@ LL | if f { }
= note: expected type `bool`
found fn item `fn() {f}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/expr/if/if-without-block.stderr b/tests/ui/expr/if/if-without-block.stderr
index 2d1ee04ce..98bde827a 100644
--- a/tests/ui/expr/if/if-without-block.stderr
+++ b/tests/ui/expr/if/if-without-block.stderr
@@ -10,5 +10,5 @@ help: this binary operation is possibly unfinished
LL | if 5 == {
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/expr/if/if-without-else-result.stderr b/tests/ui/expr/if/if-without-else-result.stderr
index 317faf7c6..4eaa03934 100644
--- a/tests/ui/expr/if/if-without-else-result.stderr
+++ b/tests/ui/expr/if/if-without-else-result.stderr
@@ -10,6 +10,6 @@ LL | let a = if true { true };
= note: `if` expressions without `else` evaluate to `()`
= help: consider adding an `else` block that evaluates to the expected type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0317`.
diff --git a/tests/ui/expr/if/issue-4201.stderr b/tests/ui/expr/if/issue-4201.stderr
index 612fe7764..c761d0b85 100644
--- a/tests/ui/expr/if/issue-4201.stderr
+++ b/tests/ui/expr/if/issue-4201.stderr
@@ -13,6 +13,6 @@ LL | | };
= note: `if` expressions without `else` evaluate to `()`
= help: consider adding an `else` block that evaluates to the expected type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0317`.
diff --git a/tests/ui/expr/malformed_closure/block_instead_of_closure_in_arg.stderr b/tests/ui/expr/malformed_closure/block_instead_of_closure_in_arg.stderr
index f70b32117..1264d9693 100644
--- a/tests/ui/expr/malformed_closure/block_instead_of_closure_in_arg.stderr
+++ b/tests/ui/expr/malformed_closure/block_instead_of_closure_in_arg.stderr
@@ -22,6 +22,6 @@ help: you might have meant to create the closure instead of a block
LL | Some(true).filter(|_| {
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/expr/malformed_closure/missing_block_in_let_binding.stderr b/tests/ui/expr/malformed_closure/missing_block_in_let_binding.stderr
index d4640fba9..8af703017 100644
--- a/tests/ui/expr/malformed_closure/missing_block_in_let_binding.stderr
+++ b/tests/ui/expr/malformed_closure/missing_block_in_let_binding.stderr
@@ -12,5 +12,5 @@ help: you might have meant to open the body of the closure
LL | let x = |x| {
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/expr/malformed_closure/ruby_style_closure.stderr b/tests/ui/expr/malformed_closure/ruby_style_closure.stderr
index e8b34121b..b1607bbac 100644
--- a/tests/ui/expr/malformed_closure/ruby_style_closure.stderr
+++ b/tests/ui/expr/malformed_closure/ruby_style_closure.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `x` in this scope
LL | Some(x * 2)
| ^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/expr/malformed_closure/ruby_style_closure_successful_parse.stderr b/tests/ui/expr/malformed_closure/ruby_style_closure_successful_parse.stderr
index e44ec5ca9..a7ed9f588 100644
--- a/tests/ui/expr/malformed_closure/ruby_style_closure_successful_parse.stderr
+++ b/tests/ui/expr/malformed_closure/ruby_style_closure_successful_parse.stderr
@@ -20,6 +20,6 @@ LL - let p = Some(45).and_then({|x|
LL + let p = Some(45).and_then(|x| {
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/ext-nonexistent.stderr b/tests/ui/ext-nonexistent.stderr
index f3aa83fd5..8891e823e 100644
--- a/tests/ui/ext-nonexistent.stderr
+++ b/tests/ui/ext-nonexistent.stderr
@@ -4,5 +4,5 @@ error: cannot find macro `iamnotanextensionthatexists` in this scope
LL | fn main() { iamnotanextensionthatexists!(""); }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/extenv/extenv-arg-2-not-string-literal.stderr b/tests/ui/extenv/extenv-arg-2-not-string-literal.stderr
index 258e2b347..9db1c0be7 100644
--- a/tests/ui/extenv/extenv-arg-2-not-string-literal.stderr
+++ b/tests/ui/extenv/extenv-arg-2-not-string-literal.stderr
@@ -4,5 +4,5 @@ error: expected string literal
LL | fn main() { env!("one", 10); }
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/extenv/extenv-env-overload.rs b/tests/ui/extenv/extenv-env-overload.rs
new file mode 100644
index 000000000..b82bb2fe9
--- /dev/null
+++ b/tests/ui/extenv/extenv-env-overload.rs
@@ -0,0 +1,9 @@
+// run-pass
+// rustc-env:MY_VAR=tadam
+// compile-flags: --env MY_VAR=123abc -Zunstable-options
+
+// This test ensures that variables provided with `--env` take precedence over
+// variables from environment.
+fn main() {
+ assert_eq!(env!("MY_VAR"), "123abc");
+}
diff --git a/tests/ui/extenv/extenv-env.rs b/tests/ui/extenv/extenv-env.rs
new file mode 100644
index 000000000..9fda52b89
--- /dev/null
+++ b/tests/ui/extenv/extenv-env.rs
@@ -0,0 +1,5 @@
+// compile-flags: --env FOO=123abc -Zunstable-options
+// run-pass
+fn main() {
+ assert_eq!(env!("FOO"), "123abc");
+}
diff --git a/tests/ui/extenv/extenv-escaped-var.stderr b/tests/ui/extenv/extenv-escaped-var.stderr
index 25e218c63..ef5e654d0 100644
--- a/tests/ui/extenv/extenv-escaped-var.stderr
+++ b/tests/ui/extenv/extenv-escaped-var.stderr
@@ -7,5 +7,5 @@ LL | env!("\t");
= help: use `std::env::var("\t")` to read the variable at run time
= note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/extenv/extenv-no-args.stderr b/tests/ui/extenv/extenv-no-args.stderr
index 70b85932c..36d485676 100644
--- a/tests/ui/extenv/extenv-no-args.stderr
+++ b/tests/ui/extenv/extenv-no-args.stderr
@@ -4,5 +4,5 @@ error: `env!()` takes 1 or 2 arguments
LL | fn main() { env!(); }
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/extenv/extenv-not-defined-custom.stderr b/tests/ui/extenv/extenv-not-defined-custom.stderr
index e7da4e046..9b6e32bc9 100644
--- a/tests/ui/extenv/extenv-not-defined-custom.stderr
+++ b/tests/ui/extenv/extenv-not-defined-custom.stderr
@@ -6,5 +6,5 @@ LL | fn main() { env!("__HOPEFULLY_NOT_DEFINED__", "my error message"); }
|
= note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/extenv/extenv-not-defined-default.stderr b/tests/ui/extenv/extenv-not-defined-default.stderr
index e3dce0005..5198818f8 100644
--- a/tests/ui/extenv/extenv-not-defined-default.stderr
+++ b/tests/ui/extenv/extenv-not-defined-default.stderr
@@ -7,5 +7,5 @@ LL | env!("CARGO__HOPEFULLY_NOT_DEFINED__");
= help: Cargo sets build script variables at run time. Use `std::env::var("CARGO__HOPEFULLY_NOT_DEFINED__")` instead
= note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/extenv/extenv-not-env.rs b/tests/ui/extenv/extenv-not-env.rs
new file mode 100644
index 000000000..d6c4a43b0
--- /dev/null
+++ b/tests/ui/extenv/extenv-not-env.rs
@@ -0,0 +1,7 @@
+// run-pass
+// rustc-env:MY_ENV=/
+// Ensures that variables not defined through `--env` are still available.
+
+fn main() {
+ assert!(!env!("MY_ENV").is_empty());
+}
diff --git a/tests/ui/extenv/extenv-not-string-literal.stderr b/tests/ui/extenv/extenv-not-string-literal.stderr
index 342a9f709..85ed442e2 100644
--- a/tests/ui/extenv/extenv-not-string-literal.stderr
+++ b/tests/ui/extenv/extenv-not-string-literal.stderr
@@ -4,5 +4,5 @@ error: expected string literal
LL | fn main() { env!(10, "two"); }
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/extenv/extenv-too-many-args.stderr b/tests/ui/extenv/extenv-too-many-args.stderr
index 47cf810b7..c0fd5d572 100644
--- a/tests/ui/extenv/extenv-too-many-args.stderr
+++ b/tests/ui/extenv/extenv-too-many-args.stderr
@@ -4,5 +4,5 @@ error: `env!()` takes 1 or 2 arguments
LL | fn main() { env!("one", "two", "three"); }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/extern-flag/multiple-opts.stderr b/tests/ui/extern-flag/multiple-opts.stderr
index 5088fb1c4..0aaca5ee2 100644
--- a/tests/ui/extern-flag/multiple-opts.stderr
+++ b/tests/ui/extern-flag/multiple-opts.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: use of undeclared crate or module `somedep`
LL | somedep::somefun();
| ^^^^^^^ use of undeclared crate or module `somedep`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/extern-flag/no-nounused.stderr b/tests/ui/extern-flag/no-nounused.stderr
index 6446c5323..171079287 100644
--- a/tests/ui/extern-flag/no-nounused.stderr
+++ b/tests/ui/extern-flag/no-nounused.stderr
@@ -6,5 +6,5 @@ LL | fn main() {
|
= note: requested on the command line with `-D unused-crate-dependencies`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/extern-flag/noprelude.stderr b/tests/ui/extern-flag/noprelude.stderr
index 578787216..23b9b2fd9 100644
--- a/tests/ui/extern-flag/noprelude.stderr
+++ b/tests/ui/extern-flag/noprelude.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: use of undeclared crate or module `somedep`
LL | somedep::somefun();
| ^^^^^^^ use of undeclared crate or module `somedep`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/extern-flag/public-and-private.stderr b/tests/ui/extern-flag/public-and-private.stderr
index 9dfc10eff..209f5d4da 100644
--- a/tests/ui/extern-flag/public-and-private.stderr
+++ b/tests/ui/extern-flag/public-and-private.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(exported_private_dependencies)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/extern/extern-const.fixed b/tests/ui/extern/extern-const.fixed
index 9d96b4f63..248efc93d 100644
--- a/tests/ui/extern/extern-const.fixed
+++ b/tests/ui/extern/extern-const.fixed
@@ -6,7 +6,6 @@
// run-rustfix
// ignore-wasm32-bare no external library to link to.
-// ignore-asmjs wasm2js does not support source maps yet
// compile-flags: -g
#![feature(rustc_private)]
extern crate libc;
diff --git a/tests/ui/extern/extern-const.rs b/tests/ui/extern/extern-const.rs
index 7cef5b349..d3b3bef6d 100644
--- a/tests/ui/extern/extern-const.rs
+++ b/tests/ui/extern/extern-const.rs
@@ -6,7 +6,6 @@
// run-rustfix
// ignore-wasm32-bare no external library to link to.
-// ignore-asmjs wasm2js does not support source maps yet
// compile-flags: -g
#![feature(rustc_private)]
extern crate libc;
diff --git a/tests/ui/extern/extern-const.stderr b/tests/ui/extern/extern-const.stderr
index 7f67adbdb..4c2c3d6e0 100644
--- a/tests/ui/extern/extern-const.stderr
+++ b/tests/ui/extern/extern-const.stderr
@@ -1,5 +1,5 @@
error: extern items cannot be `const`
- --> $DIR/extern-const.rs:16:11
+ --> $DIR/extern-const.rs:15:11
|
LL | const rust_dbg_static_mut: libc::c_int;
| ------^^^^^^^^^^^^^^^^^^^
@@ -8,5 +8,5 @@ LL | const rust_dbg_static_mut: libc::c_int;
|
= note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/extern/extern-crate-rename.stderr b/tests/ui/extern/extern-crate-rename.stderr
index 5f1477955..43f6e56ab 100644
--- a/tests/ui/extern/extern-crate-rename.stderr
+++ b/tests/ui/extern/extern-crate-rename.stderr
@@ -12,6 +12,6 @@ help: you can use `as` to change the binding name of the import
LL | extern crate m2 as other_m1;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0259`.
diff --git a/tests/ui/extern/extern-ffi-fn-with-body.stderr b/tests/ui/extern/extern-ffi-fn-with-body.stderr
index 079c9cecd..dc34490b3 100644
--- a/tests/ui/extern/extern-ffi-fn-with-body.stderr
+++ b/tests/ui/extern/extern-ffi-fn-with-body.stderr
@@ -14,5 +14,5 @@ LL | | }
= help: you might have meant to write a function accessible through FFI, which can be done by writing `extern fn` outside of the `extern` block
= note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/extern/extern-macro.stderr b/tests/ui/extern/extern-macro.stderr
index 5b7a72073..e4d767f0e 100644
--- a/tests/ui/extern/extern-macro.stderr
+++ b/tests/ui/extern/extern-macro.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: partially resolved path in a macro
LL | let _ = Foo::bar!();
| ^^^^^^^^ partially resolved path in a macro
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/extern/extern-main-fn.stderr b/tests/ui/extern/extern-main-fn.stderr
index 846102670..fd4e67e89 100644
--- a/tests/ui/extern/extern-main-fn.stderr
+++ b/tests/ui/extern/extern-main-fn.stderr
@@ -7,6 +7,6 @@ LL | extern "C" fn main() {}
= note: expected signature `fn()`
found signature `extern "C" fn()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0580`.
diff --git a/tests/ui/extern/extern-main-issue-86110.stderr b/tests/ui/extern/extern-main-issue-86110.stderr
index 18dfddc46..8a3262fbc 100644
--- a/tests/ui/extern/extern-main-issue-86110.stderr
+++ b/tests/ui/extern/extern-main-issue-86110.stderr
@@ -4,5 +4,5 @@ error: the `main` function cannot be declared in an `extern` block
LL | fn main();
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/extern/extern-type-diag-not-similar.stderr b/tests/ui/extern/extern-type-diag-not-similar.stderr
index 75836f7ec..3547f9b3f 100644
--- a/tests/ui/extern/extern-type-diag-not-similar.stderr
+++ b/tests/ui/extern/extern-type-diag-not-similar.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `assert_send`
LL | fn assert_send<T: Send + ?Sized>() {}
| ^^^^ required by this bound in `assert_send`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/extern/extern-types-distinct-types.stderr b/tests/ui/extern/extern-types-distinct-types.stderr
index 3e6dc5cef..ea4e51862 100644
--- a/tests/ui/extern/extern-types-distinct-types.stderr
+++ b/tests/ui/extern/extern-types-distinct-types.stderr
@@ -14,6 +14,6 @@ LL | r
= note: expected reference `&B`
found reference `&A`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/extern/extern-types-field-offset.rs b/tests/ui/extern/extern-types-field-offset.rs
new file mode 100644
index 000000000..bfbc1e9bf
--- /dev/null
+++ b/tests/ui/extern/extern-types-field-offset.rs
@@ -0,0 +1,33 @@
+// run-fail
+// check-run-results
+// exec-env:RUST_BACKTRACE=0
+// normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL"
+#![feature(extern_types)]
+
+extern "C" {
+ type Opaque;
+}
+
+struct Newtype(Opaque);
+
+struct S {
+ i: i32,
+ j: i32,
+ a: Newtype,
+}
+
+fn main() {
+ let buf = [0i32; 4];
+
+ let x: &Newtype = unsafe { &*(&buf as *const _ as *const Newtype) };
+ // Projecting to the newtype works, because it is always at offset 0.
+ let field = &x.0;
+
+ let x: &S = unsafe { &*(&buf as *const _ as *const S) };
+ // Accessing sized fields is perfectly fine, even at non-zero offsets.
+ let field = &x.i;
+ let field = &x.j;
+ // This needs to compute the field offset, but we don't know the type's alignment,
+ // so this panics.
+ let field = &x.a;
+}
diff --git a/tests/ui/extern/extern-types-field-offset.run.stderr b/tests/ui/extern/extern-types-field-offset.run.stderr
new file mode 100644
index 000000000..1b04b860d
--- /dev/null
+++ b/tests/ui/extern/extern-types-field-offset.run.stderr
@@ -0,0 +1,4 @@
+thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL:
+attempted to compute the size or alignment of extern type `Opaque`
+note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
+thread caused non-unwinding panic. aborting.
diff --git a/tests/ui/extern/extern-types-size_of_val.align.run.stderr b/tests/ui/extern/extern-types-size_of_val.align.run.stderr
new file mode 100644
index 000000000..20c4d8785
--- /dev/null
+++ b/tests/ui/extern/extern-types-size_of_val.align.run.stderr
@@ -0,0 +1,4 @@
+thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL:
+attempted to compute the size or alignment of extern type `A`
+note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
+thread caused non-unwinding panic. aborting.
diff --git a/tests/ui/extern/extern-types-size_of_val.rs b/tests/ui/extern/extern-types-size_of_val.rs
index 3b02ea28e..4c4de873b 100644
--- a/tests/ui/extern/extern-types-size_of_val.rs
+++ b/tests/ui/extern/extern-types-size_of_val.rs
@@ -1,4 +1,8 @@
-// run-pass
+// run-fail
+// check-run-results
+// exec-env:RUST_BACKTRACE=0
+// normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL"
+// revisions: size align
#![feature(extern_types)]
use std::mem::{align_of_val, size_of_val};
@@ -10,6 +14,10 @@ extern "C" {
fn main() {
let x: &A = unsafe { &*(1usize as *const A) };
- assert_eq!(size_of_val(x), 0);
- assert_eq!(align_of_val(x), 1);
+ // These don't have a dynamic size, so this should panic.
+ if cfg!(size) {
+ assert_eq!(size_of_val(x), 0);
+ } else {
+ assert_eq!(align_of_val(x), 1);
+ }
}
diff --git a/tests/ui/extern/extern-types-size_of_val.size.run.stderr b/tests/ui/extern/extern-types-size_of_val.size.run.stderr
new file mode 100644
index 000000000..20c4d8785
--- /dev/null
+++ b/tests/ui/extern/extern-types-size_of_val.size.run.stderr
@@ -0,0 +1,4 @@
+thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL:
+attempted to compute the size or alignment of extern type `A`
+note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
+thread caused non-unwinding panic. aborting.
diff --git a/tests/ui/extern/extern-with-type-bounds.stderr b/tests/ui/extern/extern-with-type-bounds.stderr
index 88be1e5dd..42448d9e9 100644
--- a/tests/ui/extern/extern-with-type-bounds.stderr
+++ b/tests/ui/extern/extern-with-type-bounds.stderr
@@ -4,6 +4,6 @@ error[E0405]: cannot find trait `NoSuchTrait` in this scope
LL | fn align_of<T: NoSuchTrait>() -> usize;
| ^^^^^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0405`.
diff --git a/tests/ui/extern/extern-wrong-value-type.stderr b/tests/ui/extern/extern-wrong-value-type.stderr
index 463cee831..1c08aa171 100644
--- a/tests/ui/extern/extern-wrong-value-type.stderr
+++ b/tests/ui/extern/extern-wrong-value-type.stderr
@@ -14,6 +14,6 @@ note: required by a bound in `is_fn`
LL | fn is_fn<F>(_: F) where F: Fn() {}
| ^^^^ required by this bound in `is_fn`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/extern/issue-116203.rs b/tests/ui/extern/issue-116203.rs
new file mode 100644
index 000000000..f82128416
--- /dev/null
+++ b/tests/ui/extern/issue-116203.rs
@@ -0,0 +1,21 @@
+extern "C" {
+ thread_local! {
+ static FOO: u32 = 0;
+ //~^ error: extern items cannot be `const`
+ //~| error: incorrect `static` inside `extern` block
+ }
+}
+
+macro_rules! hello {
+ ($name:ident) => {
+ const $name: () = ();
+ };
+}
+
+extern "C" {
+ hello! { yes }
+ //~^ error: extern items cannot be `const`
+ //~| error: incorrect `static` inside `extern` block
+}
+
+fn main() {}
diff --git a/tests/ui/extern/issue-116203.stderr b/tests/ui/extern/issue-116203.stderr
new file mode 100644
index 000000000..86e4cc763
--- /dev/null
+++ b/tests/ui/extern/issue-116203.stderr
@@ -0,0 +1,46 @@
+error: extern items cannot be `const`
+ --> $DIR/issue-116203.rs:3:14
+ |
+LL | static FOO: u32 = 0;
+ | ^^^
+ |
+ = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
+
+error: extern items cannot be `const`
+ --> $DIR/issue-116203.rs:16:14
+ |
+LL | hello! { yes }
+ | ^^^
+ |
+ = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
+
+error: incorrect `static` inside `extern` block
+ --> $DIR/issue-116203.rs:3:14
+ |
+LL | extern "C" {
+ | ---------- `extern` blocks define existing foreign statics and statics inside of them cannot have a body
+LL | / thread_local! {
+LL | | static FOO: u32 = 0;
+ | | ^^^ cannot have a body
+LL | |
+LL | |
+LL | | }
+ | |_____- the invalid body
+ |
+ = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
+
+error: incorrect `static` inside `extern` block
+ --> $DIR/issue-116203.rs:16:14
+ |
+LL | const $name: () = ();
+ | -- the invalid body
+...
+LL | extern "C" {
+ | ---------- `extern` blocks define existing foreign statics and statics inside of them cannot have a body
+LL | hello! { yes }
+ | ^^^ cannot have a body
+ |
+ = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
+
+error: aborting due to 4 previous errors
+
diff --git a/tests/ui/extern/issue-13655.rs b/tests/ui/extern/issue-13655.rs
index 6dd184799..a47b5183f 100644
--- a/tests/ui/extern/issue-13655.rs
+++ b/tests/ui/extern/issue-13655.rs
@@ -1,7 +1,5 @@
// run-pass
#![feature(fn_traits, unboxed_closures)]
-use std::ops::Fn;
-
struct Foo<T>(T);
impl<T: Copy> Fn<()> for Foo<T> {
diff --git a/tests/ui/extern/issue-28324.mir.stderr b/tests/ui/extern/issue-28324.mir.stderr
index aff8bf792..9376ac35e 100644
--- a/tests/ui/extern/issue-28324.mir.stderr
+++ b/tests/ui/extern/issue-28324.mir.stderr
@@ -6,6 +6,6 @@ LL | pub static BAZ: u32 = *&error_message_count;
|
= note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/extern/issue-28324.thir.stderr b/tests/ui/extern/issue-28324.thir.stderr
index c696c3598..8857f379a 100644
--- a/tests/ui/extern/issue-28324.thir.stderr
+++ b/tests/ui/extern/issue-28324.thir.stderr
@@ -6,6 +6,6 @@ LL | pub static BAZ: u32 = *&error_message_count;
|
= note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/extern/issue-36122-accessing-externed-dst.stderr b/tests/ui/extern/issue-36122-accessing-externed-dst.stderr
index 5f78775f5..25348b640 100644
--- a/tests/ui/extern/issue-36122-accessing-externed-dst.stderr
+++ b/tests/ui/extern/issue-36122-accessing-externed-dst.stderr
@@ -6,6 +6,6 @@ LL | static symbol: [usize];
|
= help: the trait `Sized` is not implemented for `[usize]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/extoption_env-no-args.stderr b/tests/ui/extoption_env-no-args.stderr
index 65067942b..d40f905b6 100644
--- a/tests/ui/extoption_env-no-args.stderr
+++ b/tests/ui/extoption_env-no-args.stderr
@@ -4,5 +4,5 @@ error: option_env! takes 1 argument
LL | fn main() { option_env!(); }
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/extoption_env-not-string-literal.stderr b/tests/ui/extoption_env-not-string-literal.stderr
index 272751916..d4fec1b45 100644
--- a/tests/ui/extoption_env-not-string-literal.stderr
+++ b/tests/ui/extoption_env-not-string-literal.stderr
@@ -4,5 +4,5 @@ error: argument must be a string literal
LL | fn main() { option_env!(10); }
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/extoption_env-too-many-args.stderr b/tests/ui/extoption_env-too-many-args.stderr
index a34e60b64..c7aeaac75 100644
--- a/tests/ui/extoption_env-too-many-args.stderr
+++ b/tests/ui/extoption_env-too-many-args.stderr
@@ -4,5 +4,5 @@ error: option_env! takes 1 argument
LL | fn main() { option_env!("one", "two"); }
| ^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/fail-simple.stderr b/tests/ui/fail-simple.stderr
index af8f54291..39fec3e25 100644
--- a/tests/ui/fail-simple.stderr
+++ b/tests/ui/fail-simple.stderr
@@ -6,5 +6,5 @@ LL | panic!(@);
|
= note: while trying to match end of macro
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/feature-gates/allow-features.stderr b/tests/ui/feature-gates/allow-features.stderr
index 9caf48dd1..ebd03e91c 100644
--- a/tests/ui/feature-gates/allow-features.stderr
+++ b/tests/ui/feature-gates/allow-features.stderr
@@ -4,6 +4,6 @@ error[E0725]: the feature `unknown_stdlib_feature` is not in the list of allowed
LL | #![feature(unknown_stdlib_feature)]
| ^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0725`.
diff --git a/tests/ui/feature-gates/doc-rust-logo.stderr b/tests/ui/feature-gates/doc-rust-logo.stderr
index ff5855290..15398c850 100644
--- a/tests/ui/feature-gates/doc-rust-logo.stderr
+++ b/tests/ui/feature-gates/doc-rust-logo.stderr
@@ -7,6 +7,6 @@ LL | #![doc(rust_logo)]
= note: see issue #90418 <https://github.com/rust-lang/rust/issues/90418> for more information
= help: add `#![feature(rustdoc_internals)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/env-flag.rs b/tests/ui/feature-gates/env-flag.rs
new file mode 100644
index 000000000..9dfda2584
--- /dev/null
+++ b/tests/ui/feature-gates/env-flag.rs
@@ -0,0 +1,3 @@
+// compile-flags: --env A=B
+
+fn main() {}
diff --git a/tests/ui/feature-gates/env-flag.stderr b/tests/ui/feature-gates/env-flag.stderr
new file mode 100644
index 000000000..5cb18cef9
--- /dev/null
+++ b/tests/ui/feature-gates/env-flag.stderr
@@ -0,0 +1,2 @@
+error: the `-Z unstable-options` flag must also be passed to enable the flag `env`
+
diff --git a/tests/ui/feature-gates/feature-gate-abi_unadjusted.stderr b/tests/ui/feature-gates/feature-gate-abi_unadjusted.stderr
index 1757befec..3cc7b100d 100644
--- a/tests/ui/feature-gates/feature-gate-abi_unadjusted.stderr
+++ b/tests/ui/feature-gates/feature-gate-abi_unadjusted.stderr
@@ -6,6 +6,6 @@ LL | extern "unadjusted" fn foo() {
|
= help: add `#![feature(abi_unadjusted)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-adt_const_params.stderr b/tests/ui/feature-gates/feature-gate-adt_const_params.stderr
index 13b9b84f0..e6eeca2e0 100644
--- a/tests/ui/feature-gates/feature-gate-adt_const_params.stderr
+++ b/tests/ui/feature-gates/feature-gate-adt_const_params.stderr
@@ -7,5 +7,5 @@ LL | struct Foo<const NAME: &'static str>;
= note: the only supported types are integers, `bool` and `char`
= help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/feature-gates/feature-gate-alloc-error-handler.stderr b/tests/ui/feature-gates/feature-gate-alloc-error-handler.stderr
index f414eb463..1f22c8c58 100644
--- a/tests/ui/feature-gates/feature-gate-alloc-error-handler.stderr
+++ b/tests/ui/feature-gates/feature-gate-alloc-error-handler.stderr
@@ -7,6 +7,6 @@ LL | #[alloc_error_handler]
= note: see issue #51540 <https://github.com/rust-lang/rust/issues/51540> for more information
= help: add `#![feature(alloc_error_handler)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-allocator_internals.stderr b/tests/ui/feature-gates/feature-gate-allocator_internals.stderr
index 6e276f7bc..66a1c1be3 100644
--- a/tests/ui/feature-gates/feature-gate-allocator_internals.stderr
+++ b/tests/ui/feature-gates/feature-gate-allocator_internals.stderr
@@ -6,6 +6,6 @@ LL | #![default_lib_allocator]
|
= help: add `#![feature(allocator_internals)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-allow-internal-unsafe-nested-macro.stderr b/tests/ui/feature-gates/feature-gate-allow-internal-unsafe-nested-macro.stderr
index 4621bc0b3..c2d29db68 100644
--- a/tests/ui/feature-gates/feature-gate-allow-internal-unsafe-nested-macro.stderr
+++ b/tests/ui/feature-gates/feature-gate-allow-internal-unsafe-nested-macro.stderr
@@ -10,6 +10,6 @@ LL | bar!();
= help: add `#![feature(allow_internal_unsafe)]` to the crate attributes to enable
= note: this error originates in the macro `bar` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.stderr b/tests/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.stderr
index 1232d13a4..c0ab67025 100644
--- a/tests/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.stderr
+++ b/tests/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.stderr
@@ -10,6 +10,6 @@ LL | bar!();
= help: add `#![feature(allow_internal_unstable)]` to the crate attributes to enable
= note: this error originates in the macro `bar` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-allow-internal-unstable.stderr b/tests/ui/feature-gates/feature-gate-allow-internal-unstable.stderr
index 3c1a4bfc7..cb6cf4699 100644
--- a/tests/ui/feature-gates/feature-gate-allow-internal-unstable.stderr
+++ b/tests/ui/feature-gates/feature-gate-allow-internal-unstable.stderr
@@ -6,6 +6,6 @@ LL | #[allow_internal_unstable()]
|
= help: add `#![feature(allow_internal_unstable)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-asm_experimental_arch.stderr b/tests/ui/feature-gates/feature-gate-asm_experimental_arch.stderr
index 4a859430e..9db088475 100644
--- a/tests/ui/feature-gates/feature-gate-asm_experimental_arch.stderr
+++ b/tests/ui/feature-gates/feature-gate-asm_experimental_arch.stderr
@@ -7,6 +7,6 @@ LL | asm!("");
= note: see issue #93335 <https://github.com/rust-lang/rust/issues/93335> for more information
= help: add `#![feature(asm_experimental_arch)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-asm_unwind.stderr b/tests/ui/feature-gates/feature-gate-asm_unwind.stderr
index 05e66acb5..eeabf7a5b 100644
--- a/tests/ui/feature-gates/feature-gate-asm_unwind.stderr
+++ b/tests/ui/feature-gates/feature-gate-asm_unwind.stderr
@@ -7,6 +7,6 @@ LL | asm!("", options(may_unwind));
= note: see issue #93334 <https://github.com/rust-lang/rust/issues/93334> for more information
= help: add `#![feature(asm_unwind)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-assoc-type-defaults.stderr b/tests/ui/feature-gates/feature-gate-assoc-type-defaults.stderr
index 9edad6153..2ebaf40dc 100644
--- a/tests/ui/feature-gates/feature-gate-assoc-type-defaults.stderr
+++ b/tests/ui/feature-gates/feature-gate-assoc-type-defaults.stderr
@@ -7,6 +7,6 @@ LL | type Bar = u8;
= note: see issue #29661 <https://github.com/rust-lang/rust/issues/29661> for more information
= help: add `#![feature(associated_type_defaults)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-associated_const_equality.stderr b/tests/ui/feature-gates/feature-gate-associated_const_equality.stderr
index 6563fbcba..a5f92b44c 100644
--- a/tests/ui/feature-gates/feature-gate-associated_const_equality.stderr
+++ b/tests/ui/feature-gates/feature-gate-associated_const_equality.stderr
@@ -7,6 +7,6 @@ LL | fn foo<A: TraitWAssocConst<A=32>>() {}
= note: see issue #92827 <https://github.com/rust-lang/rust/issues/92827> for more information
= help: add `#![feature(associated_const_equality)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-box_patterns.stderr b/tests/ui/feature-gates/feature-gate-box_patterns.stderr
index 601ec46a4..da15f698b 100644
--- a/tests/ui/feature-gates/feature-gate-box_patterns.stderr
+++ b/tests/ui/feature-gates/feature-gate-box_patterns.stderr
@@ -7,6 +7,6 @@ LL | let box x = Box::new('c');
= note: see issue #29641 <https://github.com/rust-lang/rust/issues/29641> for more information
= help: add `#![feature(box_patterns)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-builtin_syntax.stderr b/tests/ui/feature-gates/feature-gate-builtin_syntax.stderr
index 3bc7848f6..6601d4cb4 100644
--- a/tests/ui/feature-gates/feature-gate-builtin_syntax.stderr
+++ b/tests/ui/feature-gates/feature-gate-builtin_syntax.stderr
@@ -7,6 +7,6 @@ LL | builtin # offset_of(Foo, v);
= note: see issue #110680 <https://github.com/rust-lang/rust/issues/110680> for more information
= help: add `#![feature(builtin_syntax)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-c_variadic.stderr b/tests/ui/feature-gates/feature-gate-c_variadic.stderr
index 7b3af8d99..a439f297b 100644
--- a/tests/ui/feature-gates/feature-gate-c_variadic.stderr
+++ b/tests/ui/feature-gates/feature-gate-c_variadic.stderr
@@ -7,6 +7,6 @@ LL | pub unsafe extern "C" fn test(_: i32, ap: ...) { }
= note: see issue #44930 <https://github.com/rust-lang/rust/issues/44930> for more information
= help: add `#![feature(c_variadic)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-cfg-relocation-model.stderr b/tests/ui/feature-gates/feature-gate-cfg-relocation-model.stderr
index 592768a42..bd43e1905 100644
--- a/tests/ui/feature-gates/feature-gate-cfg-relocation-model.stderr
+++ b/tests/ui/feature-gates/feature-gate-cfg-relocation-model.stderr
@@ -7,6 +7,6 @@ LL | #[cfg(relocation_model = "pic")]
= note: see issue #114929 <https://github.com/rust-lang/rust/issues/114929> for more information
= help: add `#![feature(cfg_relocation_model)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-cfg-target-thread-local.stderr b/tests/ui/feature-gates/feature-gate-cfg-target-thread-local.stderr
index af59c7141..3400808bb 100644
--- a/tests/ui/feature-gates/feature-gate-cfg-target-thread-local.stderr
+++ b/tests/ui/feature-gates/feature-gate-cfg-target-thread-local.stderr
@@ -7,6 +7,6 @@ LL | #[cfg_attr(target_thread_local, thread_local)]
= note: see issue #29594 <https://github.com/rust-lang/rust/issues/29594> for more information
= help: add `#![feature(cfg_target_thread_local)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-cfg_overflow_checks.stderr b/tests/ui/feature-gates/feature-gate-cfg_overflow_checks.stderr
index 79aba7945..22f9af839 100644
--- a/tests/ui/feature-gates/feature-gate-cfg_overflow_checks.stderr
+++ b/tests/ui/feature-gates/feature-gate-cfg_overflow_checks.stderr
@@ -7,6 +7,6 @@ LL | #[cfg(overflow_checks)]
= note: see issue #111466 <https://github.com/rust-lang/rust/issues/111466> for more information
= help: add `#![feature(cfg_overflow_checks)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-cfg_sanitize.stderr b/tests/ui/feature-gates/feature-gate-cfg_sanitize.stderr
index 8088585da..b53fc3acd 100644
--- a/tests/ui/feature-gates/feature-gate-cfg_sanitize.stderr
+++ b/tests/ui/feature-gates/feature-gate-cfg_sanitize.stderr
@@ -7,6 +7,6 @@ LL | #[cfg(not(sanitize = "thread"))]
= note: see issue #39699 <https://github.com/rust-lang/rust/issues/39699> for more information
= help: add `#![feature(cfg_sanitize)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-cfi_encoding.stderr b/tests/ui/feature-gates/feature-gate-cfi_encoding.stderr
index b10a15088..04b206499 100644
--- a/tests/ui/feature-gates/feature-gate-cfi_encoding.stderr
+++ b/tests/ui/feature-gates/feature-gate-cfi_encoding.stderr
@@ -7,6 +7,6 @@ LL | #[cfi_encoding = "3Bar"]
= note: see issue #89653 <https://github.com/rust-lang/rust/issues/89653> for more information
= help: add `#![feature(cfi_encoding)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-check-cfg.rs b/tests/ui/feature-gates/feature-gate-check-cfg.rs
index 4012a3b04..953b8e3ff 100644
--- a/tests/ui/feature-gates/feature-gate-check-cfg.rs
+++ b/tests/ui/feature-gates/feature-gate-check-cfg.rs
@@ -1,3 +1,3 @@
-// compile-flags: --check-cfg "names()"
+// compile-flags: --check-cfg "cfg()"
fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-collapse_debuginfo.stderr b/tests/ui/feature-gates/feature-gate-collapse_debuginfo.stderr
index 2cbde893a..f0b8fd1f3 100644
--- a/tests/ui/feature-gates/feature-gate-collapse_debuginfo.stderr
+++ b/tests/ui/feature-gates/feature-gate-collapse_debuginfo.stderr
@@ -7,6 +7,6 @@ LL | #[collapse_debuginfo]
= note: see issue #100758 <https://github.com/rust-lang/rust/issues/100758> for more information
= help: add `#![feature(collapse_debuginfo)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-compiler-builtins.stderr b/tests/ui/feature-gates/feature-gate-compiler-builtins.stderr
index 9d04aef86..eadc4ddcb 100644
--- a/tests/ui/feature-gates/feature-gate-compiler-builtins.stderr
+++ b/tests/ui/feature-gates/feature-gate-compiler-builtins.stderr
@@ -6,6 +6,6 @@ LL | #![compiler_builtins]
|
= help: add `#![feature(compiler_builtins)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-concat_bytes.stderr b/tests/ui/feature-gates/feature-gate-concat_bytes.stderr
index 4b3ee4c19..69b196335 100644
--- a/tests/ui/feature-gates/feature-gate-concat_bytes.stderr
+++ b/tests/ui/feature-gates/feature-gate-concat_bytes.stderr
@@ -7,6 +7,6 @@ LL | let a = concat_bytes!(b'A', b"BC");
= note: see issue #87555 <https://github.com/rust-lang/rust/issues/87555> for more information
= help: add `#![feature(concat_bytes)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-custom_mir.stderr b/tests/ui/feature-gates/feature-gate-custom_mir.stderr
index 3c149d30d..f0f67adcc 100644
--- a/tests/ui/feature-gates/feature-gate-custom_mir.stderr
+++ b/tests/ui/feature-gates/feature-gate-custom_mir.stderr
@@ -6,6 +6,6 @@ LL | #[custom_mir(dialect = "built")]
|
= help: add `#![feature(custom_mir)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-decl_macro.stderr b/tests/ui/feature-gates/feature-gate-decl_macro.stderr
index 800caf252..94b609f05 100644
--- a/tests/ui/feature-gates/feature-gate-decl_macro.stderr
+++ b/tests/ui/feature-gates/feature-gate-decl_macro.stderr
@@ -7,6 +7,6 @@ LL | macro m() {}
= note: see issue #39412 <https://github.com/rust-lang/rust/issues/39412> for more information
= help: add `#![feature(decl_macro)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-cell.stderr b/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-cell.stderr
index ce06ce916..e727b69ff 100644
--- a/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-cell.stderr
+++ b/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-cell.stderr
@@ -7,6 +7,6 @@ LL | fn cell(self: Cell<&Self>);
= note: type of `self` must be `Self` or a type that dereferences to it
= help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0307`.
diff --git a/tests/ui/feature-gates/feature-gate-doc_cfg.stderr b/tests/ui/feature-gates/feature-gate-doc_cfg.stderr
index fe88e08c1..1a313a86f 100644
--- a/tests/ui/feature-gates/feature-gate-doc_cfg.stderr
+++ b/tests/ui/feature-gates/feature-gate-doc_cfg.stderr
@@ -7,6 +7,6 @@ LL | #[doc(cfg(unix))]
= note: see issue #43781 <https://github.com/rust-lang/rust/issues/43781> for more information
= help: add `#![feature(doc_cfg)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-doc_masked.stderr b/tests/ui/feature-gates/feature-gate-doc_masked.stderr
index 80522b6ee..96377d8d0 100644
--- a/tests/ui/feature-gates/feature-gate-doc_masked.stderr
+++ b/tests/ui/feature-gates/feature-gate-doc_masked.stderr
@@ -7,6 +7,6 @@ LL | #[doc(masked)]
= note: see issue #44027 <https://github.com/rust-lang/rust/issues/44027> for more information
= help: add `#![feature(doc_masked)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-doc_notable_trait.stderr b/tests/ui/feature-gates/feature-gate-doc_notable_trait.stderr
index 1f9bef40c..d19d3fa0f 100644
--- a/tests/ui/feature-gates/feature-gate-doc_notable_trait.stderr
+++ b/tests/ui/feature-gates/feature-gate-doc_notable_trait.stderr
@@ -7,6 +7,6 @@ LL | #[doc(notable_trait)]
= note: see issue #45040 <https://github.com/rust-lang/rust/issues/45040> for more information
= help: add `#![feature(doc_notable_trait)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-exclusive-range-pattern.stderr b/tests/ui/feature-gates/feature-gate-exclusive-range-pattern.stderr
index 6d7f4844a..4a0c8d7fd 100644
--- a/tests/ui/feature-gates/feature-gate-exclusive-range-pattern.stderr
+++ b/tests/ui/feature-gates/feature-gate-exclusive-range-pattern.stderr
@@ -7,6 +7,6 @@ LL | 0 .. 3 => {}
= note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
= help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-exhaustive-patterns.stderr b/tests/ui/feature-gates/feature-gate-exhaustive-patterns.stderr
index 49e7ab608..d34f257c8 100644
--- a/tests/ui/feature-gates/feature-gate-exhaustive-patterns.stderr
+++ b/tests/ui/feature-gates/feature-gate-exhaustive-patterns.stderr
@@ -12,6 +12,6 @@ help: you might want to use `let else` to handle the variant that isn't matched
LL | let Ok(_x) = foo() else { todo!() };
| ++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0005`.
diff --git a/tests/ui/feature-gates/feature-gate-extern_absolute_paths.stderr b/tests/ui/feature-gates/feature-gate-extern_absolute_paths.stderr
index 7de67da9b..2fcad98be 100644
--- a/tests/ui/feature-gates/feature-gate-extern_absolute_paths.stderr
+++ b/tests/ui/feature-gates/feature-gate-extern_absolute_paths.stderr
@@ -2,9 +2,10 @@ error[E0432]: unresolved import `core`
--> $DIR/feature-gate-extern_absolute_paths.rs:1:5
|
LL | use core::default;
- | ^^^^ maybe a missing crate `core`?
- |
- = help: consider adding `extern crate core` to use the `core` crate
+ | ^^^^
+ | |
+ | maybe a missing crate `core`?
+ | help: try using `std` instead of `core`: `std`
error[E0433]: failed to resolve: maybe a missing crate `core`?
--> $DIR/feature-gate-extern_absolute_paths.rs:4:19
@@ -12,7 +13,10 @@ error[E0433]: failed to resolve: maybe a missing crate `core`?
LL | let _: u8 = ::core::default::Default();
| ^^^^ maybe a missing crate `core`?
|
- = help: consider adding `extern crate core` to use the `core` crate
+help: try using `std` instead of `core`
+ |
+LL | let _: u8 = ::std::default::Default();
+ | ~~~
help: consider importing this module
|
LL + use std::default;
diff --git a/tests/ui/feature-gates/feature-gate-extern_prelude.stderr b/tests/ui/feature-gates/feature-gate-extern_prelude.stderr
index d72e47e9e..3b0ffae86 100644
--- a/tests/ui/feature-gates/feature-gate-extern_prelude.stderr
+++ b/tests/ui/feature-gates/feature-gate-extern_prelude.stderr
@@ -4,5 +4,5 @@ error: expected one of `!` or `::`, found `-`
LL | can-only-test-this-in-run-make-fulldeps
| ^ expected one of `!` or `::`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/feature-gates/feature-gate-extern_types.stderr b/tests/ui/feature-gates/feature-gate-extern_types.stderr
index 923fae400..17ce01fd5 100644
--- a/tests/ui/feature-gates/feature-gate-extern_types.stderr
+++ b/tests/ui/feature-gates/feature-gate-extern_types.stderr
@@ -7,6 +7,6 @@ LL | type T;
= note: see issue #43467 <https://github.com/rust-lang/rust/issues/43467> for more information
= help: add `#![feature(extern_types)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-feature-gate.stderr b/tests/ui/feature-gates/feature-gate-feature-gate.stderr
index ad97741da..8ff99ddbe 100644
--- a/tests/ui/feature-gates/feature-gate-feature-gate.stderr
+++ b/tests/ui/feature-gates/feature-gate-feature-gate.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![forbid(unstable_features)]
| ^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/feature-gates/feature-gate-ffi_const.stderr b/tests/ui/feature-gates/feature-gate-ffi_const.stderr
index bed6a2ce4..c86606f33 100644
--- a/tests/ui/feature-gates/feature-gate-ffi_const.stderr
+++ b/tests/ui/feature-gates/feature-gate-ffi_const.stderr
@@ -7,6 +7,6 @@ LL | #[ffi_const]
= note: see issue #58328 <https://github.com/rust-lang/rust/issues/58328> for more information
= help: add `#![feature(ffi_const)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-ffi_pure.stderr b/tests/ui/feature-gates/feature-gate-ffi_pure.stderr
index 2b0308fd6..4392fb16d 100644
--- a/tests/ui/feature-gates/feature-gate-ffi_pure.stderr
+++ b/tests/ui/feature-gates/feature-gate-ffi_pure.stderr
@@ -7,6 +7,6 @@ LL | #[ffi_pure]
= note: see issue #58329 <https://github.com/rust-lang/rust/issues/58329> for more information
= help: add `#![feature(ffi_pure)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-ffi_returns_twice.stderr b/tests/ui/feature-gates/feature-gate-ffi_returns_twice.stderr
index 3585355ab..7a030d454 100644
--- a/tests/ui/feature-gates/feature-gate-ffi_returns_twice.stderr
+++ b/tests/ui/feature-gates/feature-gate-ffi_returns_twice.stderr
@@ -7,6 +7,6 @@ LL | #[ffi_returns_twice]
= note: see issue #58314 <https://github.com/rust-lang/rust/issues/58314> for more information
= help: add `#![feature(ffi_returns_twice)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-fn_align.stderr b/tests/ui/feature-gates/feature-gate-fn_align.stderr
index 5ff124e48..3351ceaf2 100644
--- a/tests/ui/feature-gates/feature-gate-fn_align.stderr
+++ b/tests/ui/feature-gates/feature-gate-fn_align.stderr
@@ -7,6 +7,6 @@ LL | #[repr(align(16))]
= note: see issue #82232 <https://github.com/rust-lang/rust/issues/82232> for more information
= help: add `#![feature(fn_align)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-fn_delegation.rs b/tests/ui/feature-gates/feature-gate-fn_delegation.rs
new file mode 100644
index 000000000..6ac367120
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-fn_delegation.rs
@@ -0,0 +1,3 @@
+todo!(); //~ ERROR
+
+fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-fn_delegation.stderr b/tests/ui/feature-gates/feature-gate-fn_delegation.stderr
new file mode 100644
index 000000000..14d85c526
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-fn_delegation.stderr
@@ -0,0 +1,13 @@
+error: expected one of `!` or `::`, found `(`
+ --> $DIR/feature-gate-fn_delegation.rs:1:1
+ |
+LL | todo!();
+ | ^^^^^^^
+ | |
+ | expected one of `!` or `::`
+ | in this macro invocation
+ |
+ = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/feature-gates/feature-gate-format_args_nl.stderr b/tests/ui/feature-gates/feature-gate-format_args_nl.stderr
index b211e2f8e..35a712aad 100644
--- a/tests/ui/feature-gates/feature-gate-format_args_nl.stderr
+++ b/tests/ui/feature-gates/feature-gate-format_args_nl.stderr
@@ -6,6 +6,6 @@ LL | format_args_nl!("");
|
= help: add `#![feature(format_args_nl)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-fundamental.stderr b/tests/ui/feature-gates/feature-gate-fundamental.stderr
index 1ae8d9128..14ee169bd 100644
--- a/tests/ui/feature-gates/feature-gate-fundamental.stderr
+++ b/tests/ui/feature-gates/feature-gate-fundamental.stderr
@@ -7,6 +7,6 @@ LL | #[fundamental]
= note: see issue #29635 <https://github.com/rust-lang/rust/issues/29635> for more information
= help: add `#![feature(fundamental)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-gen_blocks.e2024.stderr b/tests/ui/feature-gates/feature-gate-gen_blocks.e2024.stderr
index 1462c41e9..c582ca7ba 100644
--- a/tests/ui/feature-gates/feature-gate-gen_blocks.e2024.stderr
+++ b/tests/ui/feature-gates/feature-gate-gen_blocks.e2024.stderr
@@ -2,16 +2,34 @@ error[E0658]: gen blocks are experimental
--> $DIR/feature-gate-gen_blocks.rs:5:5
|
LL | gen {};
- | ^^^^^
+ | ^^^
|
= note: see issue #117078 <https://github.com/rust-lang/rust/issues/117078> for more information
= help: add `#![feature(gen_blocks)]` to the crate attributes to enable
error[E0658]: gen blocks are experimental
- --> $DIR/feature-gate-gen_blocks.rs:13:5
+ --> $DIR/feature-gate-gen_blocks.rs:12:5
+ |
+LL | async gen {};
+ | ^^^^^^^^^
+ |
+ = note: see issue #117078 <https://github.com/rust-lang/rust/issues/117078> for more information
+ = help: add `#![feature(gen_blocks)]` to the crate attributes to enable
+
+error[E0658]: gen blocks are experimental
+ --> $DIR/feature-gate-gen_blocks.rs:22:5
|
LL | gen {};
- | ^^^^^
+ | ^^^
+ |
+ = note: see issue #117078 <https://github.com/rust-lang/rust/issues/117078> for more information
+ = help: add `#![feature(gen_blocks)]` to the crate attributes to enable
+
+error[E0658]: gen blocks are experimental
+ --> $DIR/feature-gate-gen_blocks.rs:25:5
+ |
+LL | async gen {};
+ | ^^^^^^^^^
|
= note: see issue #117078 <https://github.com/rust-lang/rust/issues/117078> for more information
= help: add `#![feature(gen_blocks)]` to the crate attributes to enable
@@ -22,7 +40,13 @@ error[E0282]: type annotations needed
LL | gen {};
| ^^ cannot infer type
-error: aborting due to 3 previous errors
+error[E0282]: type annotations needed
+ --> $DIR/feature-gate-gen_blocks.rs:12:15
+ |
+LL | async gen {};
+ | ^^ cannot infer type
+
+error: aborting due to 6 previous errors
Some errors have detailed explanations: E0282, E0658.
For more information about an error, try `rustc --explain E0282`.
diff --git a/tests/ui/feature-gates/feature-gate-gen_blocks.none.stderr b/tests/ui/feature-gates/feature-gate-gen_blocks.none.stderr
index b448c35e8..b4b37f0e6 100644
--- a/tests/ui/feature-gates/feature-gate-gen_blocks.none.stderr
+++ b/tests/ui/feature-gates/feature-gate-gen_blocks.none.stderr
@@ -1,9 +1,21 @@
+error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `gen`
+ --> $DIR/feature-gate-gen_blocks.rs:12:11
+ |
+LL | async gen {};
+ | ^^^ expected one of 8 possible tokens
+
+error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `gen`
+ --> $DIR/feature-gate-gen_blocks.rs:25:11
+ |
+LL | async gen {};
+ | ^^^ expected one of 8 possible tokens
+
error[E0422]: cannot find struct, variant or union type `gen` in this scope
--> $DIR/feature-gate-gen_blocks.rs:5:5
|
LL | gen {};
| ^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0422`.
diff --git a/tests/ui/feature-gates/feature-gate-gen_blocks.rs b/tests/ui/feature-gates/feature-gate-gen_blocks.rs
index e2e1574a3..ff9a0b139 100644
--- a/tests/ui/feature-gates/feature-gate-gen_blocks.rs
+++ b/tests/ui/feature-gates/feature-gate-gen_blocks.rs
@@ -1,15 +1,28 @@
// revisions: e2024 none
//[e2024] compile-flags: --edition 2024 -Zunstable-options
-fn main() {
+fn test_gen() {
gen {};
//[none]~^ ERROR: cannot find struct, variant or union type `gen`
//[e2024]~^^ ERROR: gen blocks are experimental
//[e2024]~| ERROR: type annotations needed
}
+fn test_async_gen() {
+ async gen {};
+ //[none]~^ ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `gen`
+ //[e2024]~^^ ERROR: gen blocks are experimental
+ //[e2024]~| ERROR: type annotations needed
+}
+
+fn main() {}
+
#[cfg(FALSE)]
fn foo() {
gen {};
//[e2024]~^ ERROR: gen blocks are experimental
+
+ async gen {};
+ //[e2024]~^ ERROR: gen blocks are experimental
+ //[none]~^^ ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `gen`
}
diff --git a/tests/ui/feature-gates/feature-gate-generic_associated_types_extended.stderr b/tests/ui/feature-gates/feature-gate-generic_associated_types_extended.stderr
index bb1622628..e5265b67e 100644
--- a/tests/ui/feature-gates/feature-gate-generic_associated_types_extended.stderr
+++ b/tests/ui/feature-gates/feature-gate-generic_associated_types_extended.stderr
@@ -6,6 +6,6 @@ LL | #[rustc_error]
|
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-imported_main.stderr b/tests/ui/feature-gates/feature-gate-imported_main.stderr
index 3b879fdfc..94cb74047 100644
--- a/tests/ui/feature-gates/feature-gate-imported_main.stderr
+++ b/tests/ui/feature-gates/feature-gate-imported_main.stderr
@@ -7,6 +7,6 @@ LL | use foo::bar as main;
= note: see issue #28937 <https://github.com/rust-lang/rust/issues/28937> for more information
= help: add `#![feature(imported_main)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-inherent_associated_types.stderr b/tests/ui/feature-gates/feature-gate-inherent_associated_types.stderr
index 76e65d239..8e117422a 100644
--- a/tests/ui/feature-gates/feature-gate-inherent_associated_types.stderr
+++ b/tests/ui/feature-gates/feature-gate-inherent_associated_types.stderr
@@ -7,6 +7,6 @@ LL | type Bar = isize;
= note: see issue #8995 <https://github.com/rust-lang/rust/issues/8995> for more information
= help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-inline_const.stderr b/tests/ui/feature-gates/feature-gate-inline_const.stderr
index be2f56715..3cb4aad00 100644
--- a/tests/ui/feature-gates/feature-gate-inline_const.stderr
+++ b/tests/ui/feature-gates/feature-gate-inline_const.stderr
@@ -7,6 +7,6 @@ LL | let _ = const {
= note: see issue #76001 <https://github.com/rust-lang/rust/issues/76001> for more information
= help: add `#![feature(inline_const)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-inline_const_pat.stderr b/tests/ui/feature-gates/feature-gate-inline_const_pat.stderr
index ca533d850..eab024dde 100644
--- a/tests/ui/feature-gates/feature-gate-inline_const_pat.stderr
+++ b/tests/ui/feature-gates/feature-gate-inline_const_pat.stderr
@@ -7,6 +7,6 @@ LL | let const { () } = ();
= note: see issue #76001 <https://github.com/rust-lang/rust/issues/76001> for more information
= help: add `#![feature(inline_const_pat)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-large-assignments.stderr b/tests/ui/feature-gates/feature-gate-large-assignments.stderr
index 8ddc3043e..c025be4f6 100644
--- a/tests/ui/feature-gates/feature-gate-large-assignments.stderr
+++ b/tests/ui/feature-gates/feature-gate-large-assignments.stderr
@@ -7,6 +7,6 @@ LL | #![move_size_limit = "42"]
= note: see issue #83518 <https://github.com/rust-lang/rust/issues/83518> for more information
= help: add `#![feature(large_assignments)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-lifetime-capture-rules-2024.rs b/tests/ui/feature-gates/feature-gate-lifetime-capture-rules-2024.rs
new file mode 100644
index 000000000..c06107e66
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-lifetime-capture-rules-2024.rs
@@ -0,0 +1,6 @@
+fn foo(x: &Vec<i32>) -> impl Sized {
+ x
+ //~^ ERROR hidden type for `impl Sized` captures lifetime that does not appear in bounds
+}
+
+fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-lifetime-capture-rules-2024.stderr b/tests/ui/feature-gates/feature-gate-lifetime-capture-rules-2024.stderr
new file mode 100644
index 000000000..173e3dc02
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-lifetime-capture-rules-2024.stderr
@@ -0,0 +1,18 @@
+error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds
+ --> $DIR/feature-gate-lifetime-capture-rules-2024.rs:2:5
+ |
+LL | fn foo(x: &Vec<i32>) -> impl Sized {
+ | --------- ---------- opaque type defined here
+ | |
+ | hidden type `&Vec<i32>` captures the anonymous lifetime defined here
+LL | x
+ | ^
+ |
+help: to declare that `impl Sized` captures `'_`, you can add an explicit `'_` lifetime bound
+ |
+LL | fn foo(x: &Vec<i32>) -> impl Sized + '_ {
+ | ++++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0700`.
diff --git a/tests/ui/feature-gates/feature-gate-link-arg-attribute.rs b/tests/ui/feature-gates/feature-gate-link-arg-attribute.rs
new file mode 100644
index 000000000..9036095fb
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-link-arg-attribute.rs
@@ -0,0 +1,5 @@
+#[link(kind = "link-arg", name = "foo")]
+//~^ ERROR link kind `link-arg` is unstable
+extern "C" {}
+
+fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-link-arg-attribute.stderr b/tests/ui/feature-gates/feature-gate-link-arg-attribute.stderr
new file mode 100644
index 000000000..673835b8b
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-link-arg-attribute.stderr
@@ -0,0 +1,12 @@
+error[E0658]: link kind `link-arg` is unstable
+ --> $DIR/feature-gate-link-arg-attribute.rs:1:15
+ |
+LL | #[link(kind = "link-arg", name = "foo")]
+ | ^^^^^^^^^^
+ |
+ = note: see issue #99427 <https://github.com/rust-lang/rust/issues/99427> for more information
+ = help: add `#![feature(link_arg_attribute)]` to the crate attributes to enable
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-link_cfg.stderr b/tests/ui/feature-gates/feature-gate-link_cfg.stderr
index 97b6cbca4..6e42be395 100644
--- a/tests/ui/feature-gates/feature-gate-link_cfg.stderr
+++ b/tests/ui/feature-gates/feature-gate-link_cfg.stderr
@@ -6,6 +6,6 @@ LL | #[link(name = "foo", cfg(foo))]
|
= help: add `#![feature(link_cfg)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-link_llvm_intrinsics.stderr b/tests/ui/feature-gates/feature-gate-link_llvm_intrinsics.stderr
index 6bce5b823..0cad260a1 100644
--- a/tests/ui/feature-gates/feature-gate-link_llvm_intrinsics.stderr
+++ b/tests/ui/feature-gates/feature-gate-link_llvm_intrinsics.stderr
@@ -7,6 +7,6 @@ LL | fn sqrt(x: f32) -> f32;
= note: see issue #29602 <https://github.com/rust-lang/rust/issues/29602> for more information
= help: add `#![feature(link_llvm_intrinsics)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-linkage.stderr b/tests/ui/feature-gates/feature-gate-linkage.stderr
index a1c73e555..ca1f54145 100644
--- a/tests/ui/feature-gates/feature-gate-linkage.stderr
+++ b/tests/ui/feature-gates/feature-gate-linkage.stderr
@@ -7,6 +7,6 @@ LL | #[linkage = "extern_weak"] static foo: *mut isize;
= note: see issue #29603 <https://github.com/rust-lang/rust/issues/29603> for more information
= help: add `#![feature(linkage)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-log_syntax.stderr b/tests/ui/feature-gates/feature-gate-log_syntax.stderr
index fdc1c8553..500c752e2 100644
--- a/tests/ui/feature-gates/feature-gate-log_syntax.stderr
+++ b/tests/ui/feature-gates/feature-gate-log_syntax.stderr
@@ -7,6 +7,6 @@ LL | log_syntax!()
= note: see issue #29598 <https://github.com/rust-lang/rust/issues/29598> for more information
= help: add `#![feature(log_syntax)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-log_syntax2.stderr b/tests/ui/feature-gates/feature-gate-log_syntax2.stderr
index 6deb4a46c..a808a9463 100644
--- a/tests/ui/feature-gates/feature-gate-log_syntax2.stderr
+++ b/tests/ui/feature-gates/feature-gate-log_syntax2.stderr
@@ -7,6 +7,6 @@ LL | println!("{:?}", log_syntax!());
= note: see issue #29598 <https://github.com/rust-lang/rust/issues/29598> for more information
= help: add `#![feature(log_syntax)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-marker_trait_attr.stderr b/tests/ui/feature-gates/feature-gate-marker_trait_attr.stderr
index e3c3756fd..4555ef187 100644
--- a/tests/ui/feature-gates/feature-gate-marker_trait_attr.stderr
+++ b/tests/ui/feature-gates/feature-gate-marker_trait_attr.stderr
@@ -7,6 +7,6 @@ LL | #[marker] trait ExplicitMarker {}
= note: see issue #29864 <https://github.com/rust-lang/rust/issues/29864> for more information
= help: add `#![feature(marker_trait_attr)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-may-dangle.stderr b/tests/ui/feature-gates/feature-gate-may-dangle.stderr
index d47a76a50..c12b3ba51 100644
--- a/tests/ui/feature-gates/feature-gate-may-dangle.stderr
+++ b/tests/ui/feature-gates/feature-gate-may-dangle.stderr
@@ -7,6 +7,6 @@ LL | unsafe impl<#[may_dangle] A> Drop for Pt<A> {
= note: see issue #34761 <https://github.com/rust-lang/rust/issues/34761> for more information
= help: add `#![feature(dropck_eyepatch)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-native_link_modifiers_as_needed.stderr b/tests/ui/feature-gates/feature-gate-native_link_modifiers_as_needed.stderr
index 2ef6a1c04..4c7ae9e2e 100644
--- a/tests/ui/feature-gates/feature-gate-native_link_modifiers_as_needed.stderr
+++ b/tests/ui/feature-gates/feature-gate-native_link_modifiers_as_needed.stderr
@@ -7,6 +7,6 @@ LL | #[link(name = "foo", kind = "dylib", modifiers = "+as-needed")]
= note: see issue #81490 <https://github.com/rust-lang/rust/issues/81490> for more information
= help: add `#![feature(native_link_modifiers_as_needed)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-needs-allocator.stderr b/tests/ui/feature-gates/feature-gate-needs-allocator.stderr
index 2b213aceb..ca21f2225 100644
--- a/tests/ui/feature-gates/feature-gate-needs-allocator.stderr
+++ b/tests/ui/feature-gates/feature-gate-needs-allocator.stderr
@@ -6,6 +6,6 @@ LL | #![needs_allocator]
|
= help: add `#![feature(allocator_internals)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-negative_bounds.stderr b/tests/ui/feature-gates/feature-gate-negative_bounds.stderr
index ae010fdf3..74b9e4bc4 100644
--- a/tests/ui/feature-gates/feature-gate-negative_bounds.stderr
+++ b/tests/ui/feature-gates/feature-gate-negative_bounds.stderr
@@ -4,5 +4,5 @@ error: negative bounds are not supported
LL | fn test<T: !Copy>() {}
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/feature-gates/feature-gate-never_patterns.rs b/tests/ui/feature-gates/feature-gate-never_patterns.rs
new file mode 100644
index 000000000..f39106223
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-never_patterns.rs
@@ -0,0 +1,74 @@
+// Check that never patterns require the feature gate.
+use std::ptr::NonNull;
+
+enum Void {}
+
+fn main() {
+ let res: Result<u32, Void> = Ok(0);
+ let (Ok(_x) | Err(&!)) = res.as_ref();
+ //~^ ERROR `!` patterns are experimental
+ //~| ERROR: is not bound in all patterns
+
+ unsafe {
+ let ptr: *const Void = NonNull::dangling().as_ptr();
+ match *ptr {
+ !
+ //~^ ERROR `!` patterns are experimental
+ }
+ // Check that the gate operates even behind `cfg`.
+ #[cfg(FALSE)]
+ match *ptr {
+ !
+ //~^ ERROR `!` patterns are experimental
+ }
+ #[cfg(FALSE)]
+ match *ptr {
+ ! => {}
+ //~^ ERROR `!` patterns are experimental
+ }
+ }
+
+ // Correctly gate match arms with no body.
+ match Some(0) {
+ None => {}
+ Some(_),
+ //~^ ERROR unexpected `,` in pattern
+ }
+ match Some(0) {
+ None => {}
+ Some(_)
+ //~^ ERROR `match` arm with no body
+ }
+ match Some(0) {
+ _ => {}
+ Some(_) if false,
+ //~^ ERROR `match` arm with no body
+ Some(_) if false
+ //~^ ERROR `match` arm with no body
+ }
+ match res {
+ Ok(_) => {}
+ Err(!),
+ //~^ ERROR `!` patterns are experimental
+ }
+ match res {
+ Err(!) if false,
+ //~^ ERROR `!` patterns are experimental
+ //~| ERROR a guard on a never pattern will never be run
+ _ => {}
+ }
+
+ // Check that the gate operates even behind `cfg`.
+ match Some(0) {
+ None => {}
+ #[cfg(FALSE)]
+ Some(_)
+ //~^ ERROR `match` arm with no body
+ }
+ match Some(0) {
+ _ => {}
+ #[cfg(FALSE)]
+ Some(_) if false
+ //~^ ERROR `match` arm with no body
+ }
+}
diff --git a/tests/ui/feature-gates/feature-gate-never_patterns.stderr b/tests/ui/feature-gates/feature-gate-never_patterns.stderr
new file mode 100644
index 000000000..dd10829d4
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-never_patterns.stderr
@@ -0,0 +1,117 @@
+error: unexpected `,` in pattern
+ --> $DIR/feature-gate-never_patterns.rs:34:16
+ |
+LL | Some(_),
+ | ^
+ |
+help: try adding parentheses to match on a tuple...
+ |
+LL | (Some(_),)
+ | + +
+help: ...or a vertical bar to match on multiple alternatives
+ |
+LL | Some(_) |
+ |
+
+error[E0408]: variable `_x` is not bound in all patterns
+ --> $DIR/feature-gate-never_patterns.rs:8:19
+ |
+LL | let (Ok(_x) | Err(&!)) = res.as_ref();
+ | -- ^^^^^^^ pattern doesn't bind `_x`
+ | |
+ | variable not in all patterns
+
+error[E0658]: `!` patterns are experimental
+ --> $DIR/feature-gate-never_patterns.rs:8:24
+ |
+LL | let (Ok(_x) | Err(&!)) = res.as_ref();
+ | ^
+ |
+ = note: see issue #118155 <https://github.com/rust-lang/rust/issues/118155> for more information
+ = help: add `#![feature(never_patterns)]` to the crate attributes to enable
+
+error[E0658]: `!` patterns are experimental
+ --> $DIR/feature-gate-never_patterns.rs:15:13
+ |
+LL | !
+ | ^
+ |
+ = note: see issue #118155 <https://github.com/rust-lang/rust/issues/118155> for more information
+ = help: add `#![feature(never_patterns)]` to the crate attributes to enable
+
+error[E0658]: `!` patterns are experimental
+ --> $DIR/feature-gate-never_patterns.rs:21:13
+ |
+LL | !
+ | ^
+ |
+ = note: see issue #118155 <https://github.com/rust-lang/rust/issues/118155> for more information
+ = help: add `#![feature(never_patterns)]` to the crate attributes to enable
+
+error[E0658]: `!` patterns are experimental
+ --> $DIR/feature-gate-never_patterns.rs:26:13
+ |
+LL | ! => {}
+ | ^
+ |
+ = note: see issue #118155 <https://github.com/rust-lang/rust/issues/118155> for more information
+ = help: add `#![feature(never_patterns)]` to the crate attributes to enable
+
+error: `match` arm with no body
+ --> $DIR/feature-gate-never_patterns.rs:39:9
+ |
+LL | Some(_)
+ | ^^^^^^^- help: add a body after the pattern: `=> todo!(),`
+
+error: `match` arm with no body
+ --> $DIR/feature-gate-never_patterns.rs:44:9
+ |
+LL | Some(_) if false,
+ | ^^^^^^^- help: add a body after the pattern: `=> todo!(),`
+
+error: `match` arm with no body
+ --> $DIR/feature-gate-never_patterns.rs:46:9
+ |
+LL | Some(_) if false
+ | ^^^^^^^- help: add a body after the pattern: `=> todo!(),`
+
+error[E0658]: `!` patterns are experimental
+ --> $DIR/feature-gate-never_patterns.rs:51:13
+ |
+LL | Err(!),
+ | ^
+ |
+ = note: see issue #118155 <https://github.com/rust-lang/rust/issues/118155> for more information
+ = help: add `#![feature(never_patterns)]` to the crate attributes to enable
+
+error[E0658]: `!` patterns are experimental
+ --> $DIR/feature-gate-never_patterns.rs:55:13
+ |
+LL | Err(!) if false,
+ | ^
+ |
+ = note: see issue #118155 <https://github.com/rust-lang/rust/issues/118155> for more information
+ = help: add `#![feature(never_patterns)]` to the crate attributes to enable
+
+error: `match` arm with no body
+ --> $DIR/feature-gate-never_patterns.rs:65:9
+ |
+LL | Some(_)
+ | ^^^^^^^- help: add a body after the pattern: `=> todo!(),`
+
+error: `match` arm with no body
+ --> $DIR/feature-gate-never_patterns.rs:71:9
+ |
+LL | Some(_) if false
+ | ^^^^^^^- help: add a body after the pattern: `=> todo!(),`
+
+error: a guard on a never pattern will never be run
+ --> $DIR/feature-gate-never_patterns.rs:55:19
+ |
+LL | Err(!) if false,
+ | ^^^^^ help: remove this guard
+
+error: aborting due to 14 previous errors
+
+Some errors have detailed explanations: E0408, E0658.
+For more information about an error, try `rustc --explain E0408`.
diff --git a/tests/ui/feature-gates/feature-gate-no_core.stderr b/tests/ui/feature-gates/feature-gate-no_core.stderr
index 8430a9ec6..e525c95ac 100644
--- a/tests/ui/feature-gates/feature-gate-no_core.stderr
+++ b/tests/ui/feature-gates/feature-gate-no_core.stderr
@@ -7,6 +7,6 @@ LL | #![no_core]
= note: see issue #29639 <https://github.com/rust-lang/rust/issues/29639> for more information
= help: add `#![feature(no_core)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-no_sanitize.stderr b/tests/ui/feature-gates/feature-gate-no_sanitize.stderr
index 399335700..bb808961e 100644
--- a/tests/ui/feature-gates/feature-gate-no_sanitize.stderr
+++ b/tests/ui/feature-gates/feature-gate-no_sanitize.stderr
@@ -7,6 +7,6 @@ LL | #[no_sanitize(address)]
= note: see issue #39699 <https://github.com/rust-lang/rust/issues/39699> for more information
= help: add `#![feature(no_sanitize)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.stderr b/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.stderr
index 8af0eedc8..a53337139 100644
--- a/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.stderr
+++ b/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.stderr
@@ -192,6 +192,6 @@ LL | #[warn(non_exhaustive_omitted_patterns)]
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-error: aborting due to previous error; 16 warnings emitted
+error: aborting due to 1 previous error; 16 warnings emitted
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/feature-gates/feature-gate-non_lifetime_binders.stderr b/tests/ui/feature-gates/feature-gate-non_lifetime_binders.stderr
index 01c8ee30c..f727fdae9 100644
--- a/tests/ui/feature-gates/feature-gate-non_lifetime_binders.stderr
+++ b/tests/ui/feature-gates/feature-gate-non_lifetime_binders.stderr
@@ -7,6 +7,6 @@ LL | fn foo() where for<T> T:, {}
= note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
= help: add `#![feature(non_lifetime_binders)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.stderr b/tests/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.stderr
index a5ec3599f..86f6040b1 100644
--- a/tests/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.stderr
+++ b/tests/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.stderr
@@ -6,6 +6,6 @@ LL | #[omit_gdb_pretty_printer_section]
|
= help: add `#![feature(omit_gdb_pretty_printer_section)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-overlapping_marker_traits.stderr b/tests/ui/feature-gates/feature-gate-overlapping_marker_traits.stderr
index 0526c6dc8..fe9a88b5e 100644
--- a/tests/ui/feature-gates/feature-gate-overlapping_marker_traits.stderr
+++ b/tests/ui/feature-gates/feature-gate-overlapping_marker_traits.stderr
@@ -6,6 +6,6 @@ LL | impl<T: Display> MyMarker for T {}
LL | impl<T: Debug> MyMarker for T {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr b/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr
index 8694924e5..c89dcaf72 100644
--- a/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr
+++ b/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr
@@ -6,7 +6,6 @@ LL | match 0usize {
|
= note: the matched value is of type `usize`
= note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
- = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
LL ~ 0..=usize::MAX => {},
@@ -21,7 +20,6 @@ LL | match 0isize {
|
= note: the matched value is of type `isize`
= note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
- = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
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
|
LL ~ isize::MIN..=isize::MAX => {},
diff --git a/tests/ui/feature-gates/feature-gate-prelude_import.stderr b/tests/ui/feature-gates/feature-gate-prelude_import.stderr
index 8686aed8f..b2e2a7c8c 100644
--- a/tests/ui/feature-gates/feature-gate-prelude_import.stderr
+++ b/tests/ui/feature-gates/feature-gate-prelude_import.stderr
@@ -6,6 +6,6 @@ LL | #[prelude_import]
|
= help: add `#![feature(prelude_import)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-proc_macro_byte_character.stderr b/tests/ui/feature-gates/feature-gate-proc_macro_byte_character.stderr
index 006915389..f8fa8c541 100644
--- a/tests/ui/feature-gates/feature-gate-proc_macro_byte_character.stderr
+++ b/tests/ui/feature-gates/feature-gate-proc_macro_byte_character.stderr
@@ -7,6 +7,6 @@ LL | Literal::byte_character(b'a');
= note: see issue #115268 <https://github.com/rust-lang/rust/issues/115268> for more information
= help: add `#![feature(proc_macro_byte_character)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-profiler-runtime.stderr b/tests/ui/feature-gates/feature-gate-profiler-runtime.stderr
index 18e6503c5..cc6506c56 100644
--- a/tests/ui/feature-gates/feature-gate-profiler-runtime.stderr
+++ b/tests/ui/feature-gates/feature-gate-profiler-runtime.stderr
@@ -6,6 +6,6 @@ LL | #![profiler_runtime]
|
= help: add `#![feature(profiler_runtime)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-register_tool.stderr b/tests/ui/feature-gates/feature-gate-register_tool.stderr
index 9ffaaa8de..d72249e02 100644
--- a/tests/ui/feature-gates/feature-gate-register_tool.stderr
+++ b/tests/ui/feature-gates/feature-gate-register_tool.stderr
@@ -7,6 +7,6 @@ LL | #![register_tool(tool)]
= note: see issue #66079 <https://github.com/rust-lang/rust/issues/66079> for more information
= help: add `#![feature(register_tool)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-repr128.stderr b/tests/ui/feature-gates/feature-gate-repr128.stderr
index 3999a6d2d..657802632 100644
--- a/tests/ui/feature-gates/feature-gate-repr128.stderr
+++ b/tests/ui/feature-gates/feature-gate-repr128.stderr
@@ -7,6 +7,6 @@ LL | enum A {
= note: see issue #56071 <https://github.com/rust-lang/rust/issues/56071> for more information
= help: add `#![feature(repr128)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-return_type_notation.cfg.stderr b/tests/ui/feature-gates/feature-gate-return_type_notation.cfg.stderr
index 1bdb2574e..a15b01618 100644
--- a/tests/ui/feature-gates/feature-gate-return_type_notation.cfg.stderr
+++ b/tests/ui/feature-gates/feature-gate-return_type_notation.cfg.stderr
@@ -15,13 +15,18 @@ LL | fn foo<T: Trait<m(): Send>>() {}
| |
| help: remove these parentheses
-error[E0220]: associated type `m` not found for `Trait`
+error: expected type, found function
--> $DIR/feature-gate-return_type_notation.rs:14:17
|
LL | fn foo<T: Trait<m(): Send>>() {}
- | ^ associated type `m` not found
+ | ^ unexpected function
+ |
+note: the associated function is defined here
+ --> $DIR/feature-gate-return_type_notation.rs:10:5
+ |
+LL | async fn m();
+ | ^^^^^^^^^^^^^
error: aborting due to 3 previous errors
-Some errors have detailed explanations: E0220, E0658.
-For more information about an error, try `rustc --explain E0220`.
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-return_type_notation.rs b/tests/ui/feature-gates/feature-gate-return_type_notation.rs
index 86e2c48e1..60ac9f8d4 100644
--- a/tests/ui/feature-gates/feature-gate-return_type_notation.rs
+++ b/tests/ui/feature-gates/feature-gate-return_type_notation.rs
@@ -14,7 +14,7 @@ trait Trait {
fn foo<T: Trait<m(): Send>>() {}
//[cfg]~^ ERROR return type notation is experimental
//[cfg]~| ERROR parenthesized generic arguments cannot be used in associated type constraints
-//[cfg]~| ERROR associated type `m` not found for `Trait`
+//[cfg]~| ERROR expected type, found function
//[no]~^^^^ WARN return type notation is experimental
//[no]~| WARN unstable syntax can change at any point in the future, causing a hard error!
diff --git a/tests/ui/feature-gates/feature-gate-rustc-allow-const-fn-unstable.stderr b/tests/ui/feature-gates/feature-gate-rustc-allow-const-fn-unstable.stderr
index a549cb64e..b33721ca4 100644
--- a/tests/ui/feature-gates/feature-gate-rustc-allow-const-fn-unstable.stderr
+++ b/tests/ui/feature-gates/feature-gate-rustc-allow-const-fn-unstable.stderr
@@ -7,6 +7,6 @@ LL | #[rustc_allow_const_fn_unstable()]
= note: see issue #69399 <https://github.com/rust-lang/rust/issues/69399> for more information
= help: add `#![feature(rustc_allow_const_fn_unstable)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-rustc_const_unstable.stderr b/tests/ui/feature-gates/feature-gate-rustc_const_unstable.stderr
index 48493b786..869764fa4 100644
--- a/tests/ui/feature-gates/feature-gate-rustc_const_unstable.stderr
+++ b/tests/ui/feature-gates/feature-gate-rustc_const_unstable.stderr
@@ -4,6 +4,6 @@ error[E0734]: stability attributes may not be used outside of the standard libra
LL | #[rustc_const_unstable(feature="fzzzzzt")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0734`.
diff --git a/tests/ui/feature-gates/feature-gate-simd.stderr b/tests/ui/feature-gates/feature-gate-simd.stderr
index 6e0e0b270..fa30d461f 100644
--- a/tests/ui/feature-gates/feature-gate-simd.stderr
+++ b/tests/ui/feature-gates/feature-gate-simd.stderr
@@ -7,6 +7,6 @@ LL | #[repr(simd)]
= note: see issue #27731 <https://github.com/rust-lang/rust/issues/27731> for more information
= help: add `#![feature(repr_simd)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-start.stderr b/tests/ui/feature-gates/feature-gate-start.stderr
index eec9d1a29..157bf18c9 100644
--- a/tests/ui/feature-gates/feature-gate-start.stderr
+++ b/tests/ui/feature-gates/feature-gate-start.stderr
@@ -7,6 +7,6 @@ LL | fn foo(_: isize, _: *const *const u8) -> isize { 0 }
= note: see issue #29633 <https://github.com/rust-lang/rust/issues/29633> for more information
= help: add `#![feature(start)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-stmt_expr_attributes.stderr b/tests/ui/feature-gates/feature-gate-stmt_expr_attributes.stderr
index 57ffaed78..4ff85dc07 100644
--- a/tests/ui/feature-gates/feature-gate-stmt_expr_attributes.stderr
+++ b/tests/ui/feature-gates/feature-gate-stmt_expr_attributes.stderr
@@ -7,6 +7,6 @@ LL | const X: i32 = #[allow(dead_code)] 8;
= note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
= help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-thread_local.stderr b/tests/ui/feature-gates/feature-gate-thread_local.stderr
index 6352e9087..8fbbfb59a 100644
--- a/tests/ui/feature-gates/feature-gate-thread_local.stderr
+++ b/tests/ui/feature-gates/feature-gate-thread_local.stderr
@@ -7,6 +7,6 @@ LL | #[thread_local]
= note: see issue #29594 <https://github.com/rust-lang/rust/issues/29594> for more information
= help: add `#![feature(thread_local)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-trace_macros.stderr b/tests/ui/feature-gates/feature-gate-trace_macros.stderr
index 3978d4111..305186e51 100644
--- a/tests/ui/feature-gates/feature-gate-trace_macros.stderr
+++ b/tests/ui/feature-gates/feature-gate-trace_macros.stderr
@@ -7,6 +7,6 @@ LL | trace_macros!(true);
= note: see issue #29598 <https://github.com/rust-lang/rust/issues/29598> for more information
= help: add `#![feature(trace_macros)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-trait-alias.stderr b/tests/ui/feature-gates/feature-gate-trait-alias.stderr
index 41cd6dbd8..919a97673 100644
--- a/tests/ui/feature-gates/feature-gate-trait-alias.stderr
+++ b/tests/ui/feature-gates/feature-gate-trait-alias.stderr
@@ -7,6 +7,6 @@ LL | trait Foo = Default;
= note: see issue #41517 <https://github.com/rust-lang/rust/issues/41517> for more information
= help: add `#![feature(trait_alias)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-trait_upcasting.stderr b/tests/ui/feature-gates/feature-gate-trait_upcasting.stderr
index 93afa7845..ce2f3c0a8 100644
--- a/tests/ui/feature-gates/feature-gate-trait_upcasting.stderr
+++ b/tests/ui/feature-gates/feature-gate-trait_upcasting.stderr
@@ -8,6 +8,6 @@ LL | let foo: &dyn Foo = bar;
= help: add `#![feature(trait_upcasting)]` to the crate attributes to enable
= note: required when coercing `&dyn Bar` into `&dyn Foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-transparent_unions.stderr b/tests/ui/feature-gates/feature-gate-transparent_unions.stderr
index 65c8fe052..13ea3603a 100644
--- a/tests/ui/feature-gates/feature-gate-transparent_unions.stderr
+++ b/tests/ui/feature-gates/feature-gate-transparent_unions.stderr
@@ -7,6 +7,6 @@ LL | union OkButUnstableUnion {
= note: see issue #60405 <https://github.com/rust-lang/rust/issues/60405> for more information
= help: add `#![feature(transparent_unions)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-trivial_bounds.stderr b/tests/ui/feature-gates/feature-gate-trivial_bounds.stderr
index d2ad372df..1b87ebd9f 100644
--- a/tests/ui/feature-gates/feature-gate-trivial_bounds.stderr
+++ b/tests/ui/feature-gates/feature-gate-trivial_bounds.stderr
@@ -95,7 +95,7 @@ LL | fn unsized_local() where Dst<dyn A>: Sized {
| ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `Dst<(dyn A + 'static)>`, the trait `Sized` is not implemented for `(dyn A + 'static)`
-note: required because it appears within the type `Dst<dyn A>`
+note: required because it appears within the type `Dst<(dyn A + 'static)>`
--> $DIR/feature-gate-trivial_bounds.rs:48:8
|
LL | struct Dst<X: ?Sized> {
diff --git a/tests/ui/feature-gates/feature-gate-try_blocks.stderr b/tests/ui/feature-gates/feature-gate-try_blocks.stderr
index 022409f95..028dff34c 100644
--- a/tests/ui/feature-gates/feature-gate-try_blocks.stderr
+++ b/tests/ui/feature-gates/feature-gate-try_blocks.stderr
@@ -11,6 +11,6 @@ LL | | };
= note: see issue #31436 <https://github.com/rust-lang/rust/issues/31436> for more information
= help: add `#![feature(try_blocks)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-type_ascription.stderr b/tests/ui/feature-gates/feature-gate-type_ascription.stderr
index d747aea6d..2c78e4e38 100644
--- a/tests/ui/feature-gates/feature-gate-type_ascription.stderr
+++ b/tests/ui/feature-gates/feature-gate-type_ascription.stderr
@@ -7,6 +7,6 @@ LL | let a = type_ascribe!(10, u8);
= note: see issue #23416 <https://github.com/rust-lang/rust/issues/23416> for more information
= help: add `#![feature(type_ascription)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-unix_sigpipe.stderr b/tests/ui/feature-gates/feature-gate-unix_sigpipe.stderr
index cf3284467..6fbade424 100644
--- a/tests/ui/feature-gates/feature-gate-unix_sigpipe.stderr
+++ b/tests/ui/feature-gates/feature-gate-unix_sigpipe.stderr
@@ -7,6 +7,6 @@ LL | #[unix_sigpipe = "inherit"]
= note: see issue #97889 <https://github.com/rust-lang/rust/issues/97889> for more information
= help: add `#![feature(unix_sigpipe)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-unsafe_pin_internals.stderr b/tests/ui/feature-gates/feature-gate-unsafe_pin_internals.stderr
index 39afbf2db..fc9bcd90e 100644
--- a/tests/ui/feature-gates/feature-gate-unsafe_pin_internals.stderr
+++ b/tests/ui/feature-gates/feature-gate-unsafe_pin_internals.stderr
@@ -11,5 +11,5 @@ note: the lint level is defined here
LL | #![forbid(internal_features, unsafe_code)]
| ^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/feature-gates/feature-gate-unsized_locals.stderr b/tests/ui/feature-gates/feature-gate-unsized_locals.stderr
index 9aeeb88cf..f1595e034 100644
--- a/tests/ui/feature-gates/feature-gate-unsized_locals.stderr
+++ b/tests/ui/feature-gates/feature-gate-unsized_locals.stderr
@@ -15,6 +15,6 @@ help: function arguments must have a statically known size, borrowed types alway
LL | fn f(f: &dyn FnOnce()) {}
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/feature-gates/feature-gate-unsized_tuple_coercion.stderr b/tests/ui/feature-gates/feature-gate-unsized_tuple_coercion.stderr
index bea6cee0a..dd5a1cd89 100644
--- a/tests/ui/feature-gates/feature-gate-unsized_tuple_coercion.stderr
+++ b/tests/ui/feature-gates/feature-gate-unsized_tuple_coercion.stderr
@@ -7,6 +7,6 @@ LL | let _ : &(dyn Send,) = &((),);
= note: see issue #42877 <https://github.com/rust-lang/rust/issues/42877> for more information
= help: add `#![feature(unsized_tuple_coercion)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-with_negative_coherence.stderr b/tests/ui/feature-gates/feature-gate-with_negative_coherence.stderr
index d4c201b5d..ba0765680 100644
--- a/tests/ui/feature-gates/feature-gate-with_negative_coherence.stderr
+++ b/tests/ui/feature-gates/feature-gate-with_negative_coherence.stderr
@@ -7,6 +7,6 @@ LL |
LL | impl<T> Foo for &T { }
| ^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/feature-gates/feature-gated-feature-in-macro-arg.stderr b/tests/ui/feature-gates/feature-gated-feature-in-macro-arg.stderr
index 218e02927..0053d9d5c 100644
--- a/tests/ui/feature-gates/feature-gated-feature-in-macro-arg.stderr
+++ b/tests/ui/feature-gates/feature-gated-feature-in-macro-arg.stderr
@@ -6,6 +6,6 @@ LL | extern "rust-intrinsic" {
|
= help: add `#![feature(intrinsics)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/issue-49983-see-issue-0.stderr b/tests/ui/feature-gates/issue-49983-see-issue-0.stderr
index 314238a34..5f9e5d440 100644
--- a/tests/ui/feature-gates/issue-49983-see-issue-0.stderr
+++ b/tests/ui/feature-gates/issue-49983-see-issue-0.stderr
@@ -6,6 +6,6 @@ LL | #[allow(unused_imports)] use core::ptr::Unique;
|
= help: add `#![feature(ptr_internals)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/rustc-private.stderr b/tests/ui/feature-gates/rustc-private.stderr
index 1a8536d37..7419af80a 100644
--- a/tests/ui/feature-gates/rustc-private.stderr
+++ b/tests/ui/feature-gates/rustc-private.stderr
@@ -7,6 +7,6 @@ LL | extern crate libc;
= note: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
= help: add `#![feature(rustc_private)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/unknown-feature.stderr b/tests/ui/feature-gates/unknown-feature.stderr
index e5c05872d..0a731ddcc 100644
--- a/tests/ui/feature-gates/unknown-feature.stderr
+++ b/tests/ui/feature-gates/unknown-feature.stderr
@@ -4,6 +4,6 @@ error[E0635]: unknown feature `unknown_rust_feature`
LL | #![feature(unknown_rust_feature)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0635`.
diff --git a/tests/ui/ffi_const2.stderr b/tests/ui/ffi_const2.stderr
index 0c30c9dc5..b8cbc2963 100644
--- a/tests/ui/ffi_const2.stderr
+++ b/tests/ui/ffi_const2.stderr
@@ -4,6 +4,6 @@ error[E0757]: `#[ffi_const]` function cannot be `#[ffi_pure]`
LL | #[ffi_pure]
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0757`.
diff --git a/tests/ui/fmt/closing-brace-as-fill.stderr b/tests/ui/fmt/closing-brace-as-fill.stderr
index aa1e5aff6..70068fa3a 100644
--- a/tests/ui/fmt/closing-brace-as-fill.stderr
+++ b/tests/ui/fmt/closing-brace-as-fill.stderr
@@ -8,5 +8,5 @@ LL | println!("Hello, world! {0:}<3", 2);
|
= note: the character `'}'` is interpreted as a fill character because of the `:` that precedes it
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.stderr b/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.stderr
index bb6a14d88..950dea721 100644
--- a/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.stderr
+++ b/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.stderr
@@ -8,5 +8,5 @@ LL | format_string_proc_macro::bad_format_args_captures!();
= note: to avoid ambiguity, `format_args!` cannot capture variables when the format string is expanded from a macro
= note: this error originates in the macro `concat` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/fmt/format-raw-string-error.stderr b/tests/ui/fmt/format-raw-string-error.stderr
index 8d61950d8..090ca9353 100644
--- a/tests/ui/fmt/format-raw-string-error.stderr
+++ b/tests/ui/fmt/format-raw-string-error.stderr
@@ -6,5 +6,5 @@ LL | println!(r#"\'\'\'\'\'\'\'\'\'\'\'\'\'\'}"#);
|
= note: if you intended to print `}`, you can escape it using `}}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/fmt/ifmt-unimpl.stderr b/tests/ui/fmt/ifmt-unimpl.stderr
index 4c0ac5286..c0650ff17 100644
--- a/tests/ui/fmt/ifmt-unimpl.stderr
+++ b/tests/ui/fmt/ifmt-unimpl.stderr
@@ -21,6 +21,6 @@ note: required by a bound in `core::fmt::rt::Argument::<'a>::new_upper_hex`
--> $SRC_DIR/core/src/fmt/rt.rs:LL:COL
= note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/fmt/ifmt-unknown-trait.stderr b/tests/ui/fmt/ifmt-unknown-trait.stderr
index 459432bf4..66147ae45 100644
--- a/tests/ui/fmt/ifmt-unknown-trait.stderr
+++ b/tests/ui/fmt/ifmt-unknown-trait.stderr
@@ -15,5 +15,5 @@ LL | format!("{:notimplemented}", "3");
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/fmt/issue-104142.stderr b/tests/ui/fmt/issue-104142.stderr
index d41644faa..690ccb8d0 100644
--- a/tests/ui/fmt/issue-104142.stderr
+++ b/tests/ui/fmt/issue-104142.stderr
@@ -6,5 +6,5 @@ LL | \"\'}、"#
|
= note: if you intended to print `}`, you can escape it using `}}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/fmt/issue-75307.stderr b/tests/ui/fmt/issue-75307.stderr
index c5b0b11e7..986e805d4 100644
--- a/tests/ui/fmt/issue-75307.stderr
+++ b/tests/ui/fmt/issue-75307.stderr
@@ -4,5 +4,5 @@ error: 3 positional arguments in format string, but there is 1 argument
LL | format!(r"{}{}{}", named_arg=1);
| ^^^^^^ -
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/fmt/issue-86085.stderr b/tests/ui/fmt/issue-86085.stderr
index ee7d8a5cc..f325a3ce2 100644
--- a/tests/ui/fmt/issue-86085.stderr
+++ b/tests/ui/fmt/issue-86085.stderr
@@ -7,5 +7,5 @@ LL | format ! ( concat ! ( r#"lJ𐏿Æ�.𐏿�"# , "r} {}" ) ) ;
= note: if you intended to print `}`, you can escape it using `}}`
= note: this error originates in the macro `concat` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/fmt/issue-89173.stderr b/tests/ui/fmt/issue-89173.stderr
index ddeb769ea..62ca8862d 100644
--- a/tests/ui/fmt/issue-89173.stderr
+++ b/tests/ui/fmt/issue-89173.stderr
@@ -14,5 +14,5 @@ LL | print!("%0*x", width, num);
| ^^^^
= note: printf formatting is not supported; see the documentation for `std::fmt`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/fmt/issue-91556.stderr b/tests/ui/fmt/issue-91556.stderr
index dbd5aef45..beab3db0d 100644
--- a/tests/ui/fmt/issue-91556.stderr
+++ b/tests/ui/fmt/issue-91556.stderr
@@ -7,5 +7,5 @@ LL | let _ = format!(concat!("{0}𝖳𝖾𝗌𝗍{"), i);
= note: if you intended to print `{`, you can escape it using `{{`
= note: this error originates in the macro `concat` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/fmt/send-sync.stderr b/tests/ui/fmt/send-sync.stderr
index e3ebe6cdc..6c9c7941e 100644
--- a/tests/ui/fmt/send-sync.stderr
+++ b/tests/ui/fmt/send-sync.stderr
@@ -8,9 +8,9 @@ LL | send(format_args!("{:?}", c));
|
= help: within `[core::fmt::rt::Argument<'_>]`, the trait `Sync` is not implemented for `core::fmt::rt::Opaque`
= note: required because it appears within the type `&core::fmt::rt::Opaque`
-note: required because it appears within the type `Argument<'_>`
+note: required because it appears within the type `core::fmt::rt::Argument<'_>`
--> $SRC_DIR/core/src/fmt/rt.rs:LL:COL
- = note: required because it appears within the type `[Argument<'_>]`
+ = note: required because it appears within the type `[core::fmt::rt::Argument<'_>]`
= note: required for `&[core::fmt::rt::Argument<'_>]` to implement `Send`
note: required because it appears within the type `Arguments<'_>`
--> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
@@ -30,10 +30,10 @@ LL | sync(format_args!("{:?}", c));
|
= help: within `Arguments<'_>`, the trait `Sync` is not implemented for `core::fmt::rt::Opaque`
= note: required because it appears within the type `&core::fmt::rt::Opaque`
-note: required because it appears within the type `Argument<'_>`
+note: required because it appears within the type `core::fmt::rt::Argument<'_>`
--> $SRC_DIR/core/src/fmt/rt.rs:LL:COL
- = note: required because it appears within the type `[Argument<'_>]`
- = note: required because it appears within the type `&[Argument<'_>]`
+ = note: required because it appears within the type `[core::fmt::rt::Argument<'_>]`
+ = note: required because it appears within the type `&[core::fmt::rt::Argument<'_>]`
note: required because it appears within the type `Arguments<'_>`
--> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
note: required by a bound in `sync`
diff --git a/tests/ui/fn-in-pat.stderr b/tests/ui/fn-in-pat.stderr
index 2482d6326..41ea4df72 100644
--- a/tests/ui/fn-in-pat.stderr
+++ b/tests/ui/fn-in-pat.stderr
@@ -6,6 +6,6 @@ LL | A::new() => (),
|
= help: for more information, visit https://doc.rust-lang.org/book/ch18-00-patterns.html
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0164`.
diff --git a/tests/ui/fn/bad-main.stderr b/tests/ui/fn/bad-main.stderr
index 65140a079..47aa02c09 100644
--- a/tests/ui/fn/bad-main.stderr
+++ b/tests/ui/fn/bad-main.stderr
@@ -7,6 +7,6 @@ LL | fn main(x: isize) { }
= note: expected signature `fn()`
found signature `fn(isize)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0580`.
diff --git a/tests/ui/fn/fn-bad-block-type.stderr b/tests/ui/fn/fn-bad-block-type.stderr
index 13ebfd1e2..6917bea65 100644
--- a/tests/ui/fn/fn-bad-block-type.stderr
+++ b/tests/ui/fn/fn-bad-block-type.stderr
@@ -6,6 +6,6 @@ LL | fn f() -> isize { true }
| |
| expected `isize` because of return type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/fn/fn-closure-mutable-capture.stderr b/tests/ui/fn/fn-closure-mutable-capture.stderr
index 03e3d545a..5a2f92250 100644
--- a/tests/ui/fn/fn-closure-mutable-capture.stderr
+++ b/tests/ui/fn/fn-closure-mutable-capture.stderr
@@ -10,6 +10,6 @@ LL | bar(move || x = 1);
| | in this closure
| expects `Fn` instead of `FnMut`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/fn/fn-pointer-mismatch.rs b/tests/ui/fn/fn-pointer-mismatch.rs
index 0597478cb..1c50d8b0f 100644
--- a/tests/ui/fn/fn-pointer-mismatch.rs
+++ b/tests/ui/fn/fn-pointer-mismatch.rs
@@ -35,20 +35,20 @@ fn main() {
// suggest removing reference
let c: fn(u32) -> u32 = &foo;
//~^ ERROR mismatched types
- //~| expected fn pointer `fn(u32) -> u32`
- //~| found reference `&fn(u32) -> u32 {foo}`
+ //~| expected fn pointer `fn(_) -> _`
+ //~| found reference `&fn(_) -> _ {foo}`
// suggest using reference
let d: &fn(u32) -> u32 = foo;
//~^ ERROR mismatched types
- //~| expected reference `&fn(u32) -> u32`
- //~| found fn item `fn(u32) -> u32 {foo}`
+ //~| expected reference `&fn(_) -> _`
+ //~| found fn item `fn(_) -> _ {foo}`
// suggest casting with reference
let e: &fn(u32) -> u32 = &foo;
//~^ ERROR mismatched types
- //~| expected reference `&fn(u32) -> u32`
- //~| found reference `&fn(u32) -> u32 {foo}`
+ //~| expected reference `&fn(_) -> _`
+ //~| found reference `&fn(_) -> _ {foo}`
// OK
let mut z: fn(u32) -> u32 = foo as fn(u32) -> u32;
diff --git a/tests/ui/fn/fn-pointer-mismatch.stderr b/tests/ui/fn/fn-pointer-mismatch.stderr
index 87ece845b..9cda11639 100644
--- a/tests/ui/fn/fn-pointer-mismatch.stderr
+++ b/tests/ui/fn/fn-pointer-mismatch.stderr
@@ -6,8 +6,8 @@ LL | let g = if n % 2 == 0 { &foo } else { &bar };
| |
| expected because of this
|
- = note: expected reference `&fn(u32) -> u32 {foo}`
- found reference `&fn(u32) -> u32 {bar}`
+ = note: expected reference `&fn(_) -> _ {foo}`
+ found reference `&fn(_) -> _ {bar}`
= note: different fn items have unique types, even if their signatures are the same
= help: consider casting both fn items to fn pointers using `as fn(u32) -> u32`
@@ -47,8 +47,8 @@ LL | let c: fn(u32) -> u32 = &foo;
| |
| expected due to this
|
- = note: expected fn pointer `fn(u32) -> u32`
- found reference `&fn(u32) -> u32 {foo}`
+ = note: expected fn pointer `fn(_) -> _`
+ found reference `&fn(_) -> _ {foo}`
help: consider removing the reference
|
LL | let c: fn(u32) -> u32 = foo;
@@ -62,8 +62,8 @@ LL | let d: &fn(u32) -> u32 = foo;
| |
| expected due to this
|
- = note: expected reference `&fn(u32) -> u32`
- found fn item `fn(u32) -> u32 {foo}`
+ = note: expected reference `&fn(_) -> _`
+ found fn item `fn(_) -> _ {foo}`
help: consider using a reference
|
LL | let d: &fn(u32) -> u32 = &foo;
@@ -77,8 +77,8 @@ LL | let e: &fn(u32) -> u32 = &foo;
| |
| expected due to this
|
- = note: expected reference `&fn(u32) -> u32`
- found reference `&fn(u32) -> u32 {foo}`
+ = note: expected reference `&fn(_) -> _`
+ found reference `&fn(_) -> _ {foo}`
= note: fn items are distinct from fn pointers
help: consider casting to a fn pointer
|
diff --git a/tests/ui/fn/implied-bounds-unnorm-associated-type-2.stderr b/tests/ui/fn/implied-bounds-unnorm-associated-type-2.stderr
index 0c3df04ea..e57b5af82 100644
--- a/tests/ui/fn/implied-bounds-unnorm-associated-type-2.stderr
+++ b/tests/ui/fn/implied-bounds-unnorm-associated-type-2.stderr
@@ -13,5 +13,5 @@ LL | f::<'a, 'b>(());
= note: the function `f` is invariant over the parameter `'a`
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/fn/implied-bounds-unnorm-associated-type-4.stderr b/tests/ui/fn/implied-bounds-unnorm-associated-type-4.stderr
index 4df639232..3be630e2b 100644
--- a/tests/ui/fn/implied-bounds-unnorm-associated-type-4.stderr
+++ b/tests/ui/fn/implied-bounds-unnorm-associated-type-4.stderr
@@ -11,6 +11,6 @@ LL |
LL | println!("{}", y);
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0505`.
diff --git a/tests/ui/fn/implied-bounds-unnorm-associated-type-5.stderr b/tests/ui/fn/implied-bounds-unnorm-associated-type-5.stderr
index 3f6401b9f..4662eb32a 100644
--- a/tests/ui/fn/implied-bounds-unnorm-associated-type-5.stderr
+++ b/tests/ui/fn/implied-bounds-unnorm-associated-type-5.stderr
@@ -16,6 +16,6 @@ help: consider adding an explicit lifetime bound
LL | impl<'a, T: 'a> Trait<'a> for T {
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0309`.
diff --git a/tests/ui/fn/implied-bounds-unnorm-associated-type.stderr b/tests/ui/fn/implied-bounds-unnorm-associated-type.stderr
index d417f2883..c2a8fa741 100644
--- a/tests/ui/fn/implied-bounds-unnorm-associated-type.stderr
+++ b/tests/ui/fn/implied-bounds-unnorm-associated-type.stderr
@@ -11,6 +11,6 @@ LL |
LL | println!("{}", y);
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0505`.
diff --git a/tests/ui/fn/issue-3044.stderr b/tests/ui/fn/issue-3044.stderr
index 219029e2a..06254775b 100644
--- a/tests/ui/fn/issue-3044.stderr
+++ b/tests/ui/fn/issue-3044.stderr
@@ -16,6 +16,6 @@ LL +
LL ~ }, /* f */);
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0061`.
diff --git a/tests/ui/fn/issue-3099.stderr b/tests/ui/fn/issue-3099.stderr
index 32ee2e1d2..4417f2326 100644
--- a/tests/ui/fn/issue-3099.stderr
+++ b/tests/ui/fn/issue-3099.stderr
@@ -9,6 +9,6 @@ LL | fn a(x: String, y: String) -> String {
|
= note: `a` must be defined only once in the value namespace of this module
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0428`.
diff --git a/tests/ui/fn/issue-39259.stderr b/tests/ui/fn/issue-39259.stderr
index b656b76bf..bd102e581 100644
--- a/tests/ui/fn/issue-39259.stderr
+++ b/tests/ui/fn/issue-39259.stderr
@@ -10,6 +10,6 @@ help: parenthesized trait syntax expands to `Fn<(u32,), Output=u32>`
LL | impl Fn(u32) -> u32 for S {
| ^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0229`.
diff --git a/tests/ui/fn/signature-error-reporting-under-verbose.stderr b/tests/ui/fn/signature-error-reporting-under-verbose.stderr
index 067ee824d..6c6a313c4 100644
--- a/tests/ui/fn/signature-error-reporting-under-verbose.stderr
+++ b/tests/ui/fn/signature-error-reporting-under-verbose.stderr
@@ -14,6 +14,6 @@ note: function defined here
LL | fn needs_ptr(_: fn(i32, u32)) {}
| ^^^^^^^^^ ---------------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/for-loop-while/break-while-condition.stderr b/tests/ui/for-loop-while/break-while-condition.stderr
index e79f6a75f..48b29f44f 100644
--- a/tests/ui/for-loop-while/break-while-condition.stderr
+++ b/tests/ui/for-loop-while/break-while-condition.stderr
@@ -38,7 +38,7 @@ LL | while false {
| ^^^^^^^^^^^ this might have zero elements to iterate on
LL | return
| ------ if the loop doesn't execute, this value would never get returned
- = help: return a value for the case when the loop has zero elements to iterate on, or consider changing the return type to account for that possibility
+ = help: return a value for the case when the loop has zero elements to iterate on, otherwise consider changing the return type to account for that possibility
error: aborting due to 3 previous errors
diff --git a/tests/ui/for-loop-while/while-prelude-drop.rs b/tests/ui/for-loop-while/while-prelude-drop.rs
index 196b9daf6..947a70e1d 100644
--- a/tests/ui/for-loop-while/while-prelude-drop.rs
+++ b/tests/ui/for-loop-while/while-prelude-drop.rs
@@ -1,8 +1,5 @@
// run-pass
#![allow(non_camel_case_types)]
-
-use std::string::String;
-
#[derive(PartialEq)]
enum t { a, b(String), }
diff --git a/tests/ui/for/for-c-in-str.stderr b/tests/ui/for/for-c-in-str.stderr
index 959a7c43f..475cf8c88 100644
--- a/tests/ui/for/for-c-in-str.stderr
+++ b/tests/ui/for/for-c-in-str.stderr
@@ -7,6 +7,6 @@ LL | for c in "asdf" {
= help: the trait `Iterator` is not implemented for `&str`
= note: required for `&str` to implement `IntoIterator`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/for/for-else-err.stderr b/tests/ui/for/for-else-err.stderr
index b330d1076..bd49dc472 100644
--- a/tests/ui/for/for-else-err.stderr
+++ b/tests/ui/for/for-else-err.stderr
@@ -13,5 +13,5 @@ LL | | }
|
= note: consider moving this `else` clause to a separate `if` statement and use a `bool` variable to control if it should run
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/for/for-else-let-else-err.stderr b/tests/ui/for/for-else-let-else-err.stderr
index a2396a8fb..bb6558739 100644
--- a/tests/ui/for/for-else-let-else-err.stderr
+++ b/tests/ui/for/for-else-let-else-err.stderr
@@ -13,5 +13,5 @@ LL | | };
|
= note: consider moving this `else` clause to a separate `if` statement and use a `bool` variable to control if it should run
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/for/for-expn.stderr b/tests/ui/for/for-expn.stderr
index cdb211555..008223240 100644
--- a/tests/ui/for/for-expn.stderr
+++ b/tests/ui/for/for-expn.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `foo` in this scope
LL | foo
| ^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/for/for-loop-bogosity.stderr b/tests/ui/for/for-loop-bogosity.stderr
index 9bf8056e8..194a2fa08 100644
--- a/tests/ui/for/for-loop-bogosity.stderr
+++ b/tests/ui/for/for-loop-bogosity.stderr
@@ -7,6 +7,6 @@ LL | for x in bogus {
= help: the trait `Iterator` is not implemented for `MyStruct`
= note: required for `MyStruct` to implement `IntoIterator`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/for/for-loop-refutable-pattern-error-message.stderr b/tests/ui/for/for-loop-refutable-pattern-error-message.stderr
index 49a82a676..2082603d2 100644
--- a/tests/ui/for/for-loop-refutable-pattern-error-message.stderr
+++ b/tests/ui/for/for-loop-refutable-pattern-error-message.stderr
@@ -6,6 +6,6 @@ LL | for &1 in [1].iter() {}
|
= note: the matched value is of type `&i32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0005`.
diff --git a/tests/ui/for/for-loop-type-error.stderr b/tests/ui/for/for-loop-type-error.stderr
index c93a3b9b2..393becd1b 100644
--- a/tests/ui/for/for-loop-type-error.stderr
+++ b/tests/ui/for/for-loop-type-error.stderr
@@ -6,6 +6,6 @@ LL | let x = () + ();
| |
| ()
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/for/for-loop-unconstrained-element-type.stderr b/tests/ui/for/for-loop-unconstrained-element-type.stderr
index b1b38f6b9..3add3ae2e 100644
--- a/tests/ui/for/for-loop-unconstrained-element-type.stderr
+++ b/tests/ui/for/for-loop-unconstrained-element-type.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic argument
LL | for i in Vec::<T>::new() { }
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/for/issue-20605.current.stderr b/tests/ui/for/issue-20605.current.stderr
index b9a53cbd4..c8d39afde 100644
--- a/tests/ui/for/issue-20605.current.stderr
+++ b/tests/ui/for/issue-20605.current.stderr
@@ -11,6 +11,6 @@ help: consider mutably borrowing here
LL | for item in &mut *things { *item = 0 }
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/for/issue-20605.rs b/tests/ui/for/issue-20605.rs
index 50d4c3fdd..8ae9494fa 100644
--- a/tests/ui/for/issue-20605.rs
+++ b/tests/ui/for/issue-20605.rs
@@ -1,5 +1,5 @@
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
fn changer<'a>(mut things: Box<dyn Iterator<Item=&'a mut u8>>) {
for item in *things { *item = 0 }
@@ -13,7 +13,7 @@ fn changer<'a>(mut things: Box<dyn Iterator<Item=&'a mut u8>>) {
//[next]~| ERROR the type `Option<<<dyn Iterator<Item = &'a mut u8> as IntoIterator>::IntoIter as Iterator>::Item>` is not well-formed
//[next]~| ERROR the size for values of type `<<dyn Iterator<Item = &'a mut u8> as IntoIterator>::IntoIter as Iterator>::Item` cannot be known at compilation time
//[next]~| ERROR type `<<dyn Iterator<Item = &'a mut u8> as IntoIterator>::IntoIter as Iterator>::Item` cannot be dereferenced
- // FIXME(-Ztrait-solver=next): these error messages are horrible and have to be
+ // FIXME(-Znext-solver): these error messages are horrible and have to be
// improved before we stabilize the new solver.
}
diff --git a/tests/ui/foreign-fn-return-lifetime.fixed b/tests/ui/foreign-fn-return-lifetime.fixed
deleted file mode 100644
index 143d6343d..000000000
--- a/tests/ui/foreign-fn-return-lifetime.fixed
+++ /dev/null
@@ -1,8 +0,0 @@
-// run-rustfix
-
-extern "C" {
- pub fn g(_: &u8) -> &u8; // OK
- pub fn f() -> &'static u8; //~ ERROR missing lifetime specifier
-}
-
-fn main() {}
diff --git a/tests/ui/foreign-fn-return-lifetime.rs b/tests/ui/foreign-fn-return-lifetime.rs
index 76fe50a34..35595bab3 100644
--- a/tests/ui/foreign-fn-return-lifetime.rs
+++ b/tests/ui/foreign-fn-return-lifetime.rs
@@ -1,5 +1,3 @@
-// run-rustfix
-
extern "C" {
pub fn g(_: &u8) -> &u8; // OK
pub fn f() -> &u8; //~ ERROR missing lifetime specifier
diff --git a/tests/ui/foreign-fn-return-lifetime.stderr b/tests/ui/foreign-fn-return-lifetime.stderr
index df1a23a19..e24c0f23c 100644
--- a/tests/ui/foreign-fn-return-lifetime.stderr
+++ b/tests/ui/foreign-fn-return-lifetime.stderr
@@ -1,15 +1,20 @@
error[E0106]: missing lifetime specifier
- --> $DIR/foreign-fn-return-lifetime.rs:5:19
+ --> $DIR/foreign-fn-return-lifetime.rs:3:19
|
LL | pub fn f() -> &u8;
| ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
LL | pub fn f() -> &'static u8;
| +++++++
+help: instead, you are more likely to want to return an owned value
+ |
+LL - pub fn f() -> &u8;
+LL + pub fn f() -> u8;
+ |
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0106`.
diff --git a/tests/ui/foreign/issue-74120-lowering-of-ffi-block-bodies.stderr b/tests/ui/foreign/issue-74120-lowering-of-ffi-block-bodies.stderr
index d4a9ca3e7..564ee1466 100644
--- a/tests/ui/foreign/issue-74120-lowering-of-ffi-block-bodies.stderr
+++ b/tests/ui/foreign/issue-74120-lowering-of-ffi-block-bodies.stderr
@@ -15,5 +15,5 @@ LL | | }
= help: you might have meant to write a function accessible through FFI, which can be done by writing `extern fn` outside of the `extern` block
= note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/foreign/issue-91370-foreign-fn-block-impl.stderr b/tests/ui/foreign/issue-91370-foreign-fn-block-impl.stderr
index 4fb2f8c65..fea2ab61e 100644
--- a/tests/ui/foreign/issue-91370-foreign-fn-block-impl.stderr
+++ b/tests/ui/foreign/issue-91370-foreign-fn-block-impl.stderr
@@ -17,5 +17,5 @@ LL | | }
= help: you might have meant to write a function accessible through FFI, which can be done by writing `extern fn` outside of the `extern` block
= note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/fully-qualified-type/fully-qualified-type-name1.stderr b/tests/ui/fully-qualified-type/fully-qualified-type-name1.stderr
index 258a8d163..7497e48c5 100644
--- a/tests/ui/fully-qualified-type/fully-qualified-type-name1.stderr
+++ b/tests/ui/fully-qualified-type/fully-qualified-type-name1.stderr
@@ -15,6 +15,6 @@ help: try wrapping the expression in `Some`
LL | x = Some(5);
| +++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/fully-qualified-type/fully-qualified-type-name2.stderr b/tests/ui/fully-qualified-type/fully-qualified-type-name2.stderr
index c7c084659..af7169165 100644
--- a/tests/ui/fully-qualified-type/fully-qualified-type-name2.stderr
+++ b/tests/ui/fully-qualified-type/fully-qualified-type-name2.stderr
@@ -18,6 +18,6 @@ note: `y::Foo` is defined in module `crate::y` of the current crate
LL | pub enum Foo { }
| ^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/fully-qualified-type/fully-qualified-type-name4.stderr b/tests/ui/fully-qualified-type/fully-qualified-type-name4.stderr
index 6b312202b..45634131a 100644
--- a/tests/ui/fully-qualified-type/fully-qualified-type-name4.stderr
+++ b/tests/ui/fully-qualified-type/fully-qualified-type-name4.stderr
@@ -13,6 +13,6 @@ help: try wrapping the expression in `Some`
LL | return Some(x);
| +++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/function-pointer/unsized-ret.stderr b/tests/ui/function-pointer/unsized-ret.stderr
index dcfec53ee..66116273f 100644
--- a/tests/ui/function-pointer/unsized-ret.stderr
+++ b/tests/ui/function-pointer/unsized-ret.stderr
@@ -19,7 +19,7 @@ LL | foo::<for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a), _>(None, (&()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a)`, the trait `for<'a> Sized` is not implemented for `(dyn std::fmt::Display + 'a)`
- = note: required because it appears within the type `fn(&()) -> dyn Display`
+ = note: required because it appears within the type `for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a)`
note: required by a bound in `foo`
--> $DIR/unsized-ret.rs:5:11
|
diff --git a/tests/ui/functional-struct-update/functional-struct-update-noncopyable.stderr b/tests/ui/functional-struct-update/functional-struct-update-noncopyable.stderr
index 45cdd3d2d..16808f29d 100644
--- a/tests/ui/functional-struct-update/functional-struct-update-noncopyable.stderr
+++ b/tests/ui/functional-struct-update/functional-struct-update-noncopyable.stderr
@@ -7,6 +7,6 @@ LL | let _b = A { y: Arc::new(3), ..a };
| cannot move out of here
| move occurs because `a.x` has type `Arc<isize>`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0509`.
diff --git a/tests/ui/functional-struct-update/functional-struct-update-respects-privacy.stderr b/tests/ui/functional-struct-update/functional-struct-update-respects-privacy.stderr
index 0b8af90b4..692d98bc5 100644
--- a/tests/ui/functional-struct-update/functional-struct-update-respects-privacy.stderr
+++ b/tests/ui/functional-struct-update/functional-struct-update-respects-privacy.stderr
@@ -4,6 +4,6 @@ error[E0451]: field `secret_uid` of struct `S` is private
LL | let s_2 = foo::S { b: format!("ess two"), ..s_1 }; // FRU ...
| ^^^ field `secret_uid` is private
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0451`.
diff --git a/tests/ui/future-incompatible-lint-group.stderr b/tests/ui/future-incompatible-lint-group.stderr
index a8fb100a7..161fe82e3 100644
--- a/tests/ui/future-incompatible-lint-group.stderr
+++ b/tests/ui/future-incompatible-lint-group.stderr
@@ -24,5 +24,5 @@ LL | #![deny(future_incompatible)]
| ^^^^^^^^^^^^^^^^^^^
= note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(future_incompatible)]`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/generic-associated-types/assume-gat-normalization-for-nested-goals.stderr b/tests/ui/generic-associated-types/assume-gat-normalization-for-nested-goals.stderr
index abad0f25c..685c27949 100644
--- a/tests/ui/generic-associated-types/assume-gat-normalization-for-nested-goals.stderr
+++ b/tests/ui/generic-associated-types/assume-gat-normalization-for-nested-goals.stderr
@@ -19,6 +19,6 @@ help: consider further restricting the associated type
LL | trait Foo where <Self as Foo>::Bar<()>: Eq<i32> {
| +++++++++++++++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/generic-associated-types/bugs/hrtb-implied-1.stderr b/tests/ui/generic-associated-types/bugs/hrtb-implied-1.stderr
index 362aeae23..5dfc42bc8 100644
--- a/tests/ui/generic-associated-types/bugs/hrtb-implied-1.stderr
+++ b/tests/ui/generic-associated-types/bugs/hrtb-implied-1.stderr
@@ -15,6 +15,6 @@ note: due to current limitations in the borrow checker, this implies a `'static`
LL | for<'a> I::Item<'a>: Debug,
| ^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/generic-associated-types/bugs/hrtb-implied-2.stderr b/tests/ui/generic-associated-types/bugs/hrtb-implied-2.stderr
index 1ee270398..9a1a09b29 100644
--- a/tests/ui/generic-associated-types/bugs/hrtb-implied-2.stderr
+++ b/tests/ui/generic-associated-types/bugs/hrtb-implied-2.stderr
@@ -17,6 +17,6 @@ LL | let _next = iter2.next();
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
= note: due to current limitations in the borrow checker, this implies a `'static` lifetime
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0521`.
diff --git a/tests/ui/generic-associated-types/bugs/hrtb-implied-3.stderr b/tests/ui/generic-associated-types/bugs/hrtb-implied-3.stderr
index c67e02437..77f363ee8 100644
--- a/tests/ui/generic-associated-types/bugs/hrtb-implied-3.stderr
+++ b/tests/ui/generic-associated-types/bugs/hrtb-implied-3.stderr
@@ -17,6 +17,6 @@ note: due to current limitations in the borrow checker, this implies a `'static`
LL | for<'a> I::Item<'a>: Sized,
| ^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0521`.
diff --git a/tests/ui/generic-associated-types/bugs/issue-87735.stderr b/tests/ui/generic-associated-types/bugs/issue-87735.stderr
index ebe2054ce..b80e3e798 100644
--- a/tests/ui/generic-associated-types/bugs/issue-87735.stderr
+++ b/tests/ui/generic-associated-types/bugs/issue-87735.stderr
@@ -4,6 +4,6 @@ error[E0207]: the type parameter `U` is not constrained by the impl trait, self
LL | impl<'b, T, U> AsRef2 for Foo<T>
| ^ unconstrained type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0207`.
diff --git a/tests/ui/generic-associated-types/bugs/issue-87755.stderr b/tests/ui/generic-associated-types/bugs/issue-87755.stderr
index 5e94db9b0..e16312dbb 100644
--- a/tests/ui/generic-associated-types/bugs/issue-87755.stderr
+++ b/tests/ui/generic-associated-types/bugs/issue-87755.stderr
@@ -4,6 +4,6 @@ error[E0275]: overflow evaluating the requirement `<Bar as Foo>::Ass == _`
LL | type Ass = Bar;
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/generic-associated-types/bugs/issue-87803.stderr b/tests/ui/generic-associated-types/bugs/issue-87803.stderr
index fe2abdedb..31ed47749 100644
--- a/tests/ui/generic-associated-types/bugs/issue-87803.stderr
+++ b/tests/ui/generic-associated-types/bugs/issue-87803.stderr
@@ -7,6 +7,6 @@ LL | fn scan<'a>(&mut self, i : Self::Input<'a>) -> Self::Token<'a>;
LL | fn scan<'a>(&mut self, s : &'a str) -> &'a str {
| ^^^^ lifetimes do not match method in trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0195`.
diff --git a/tests/ui/generic-associated-types/bugs/issue-88382.stderr b/tests/ui/generic-associated-types/bugs/issue-88382.stderr
index a9a70bb71..9b061528e 100644
--- a/tests/ui/generic-associated-types/bugs/issue-88382.stderr
+++ b/tests/ui/generic-associated-types/bugs/issue-88382.stderr
@@ -16,7 +16,11 @@ note: required by a bound in `do_something`
|
LL | fn do_something<I: Iterable>(i: I, mut f: impl for<'a> Fn(&mut I::Iterator<'a>)) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `do_something`
+help: consider wrapping the function in a closure
+ |
+LL | do_something(SomeImplementation(), |arg0: &mut std::iter::Empty<usize>| test(/* &mut <_ as Iterable>::Iterator<'_> */));
+ | ++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0631`.
diff --git a/tests/ui/generic-associated-types/bugs/issue-88460.stderr b/tests/ui/generic-associated-types/bugs/issue-88460.stderr
index b9e2c4186..74418a0c0 100644
--- a/tests/ui/generic-associated-types/bugs/issue-88460.stderr
+++ b/tests/ui/generic-associated-types/bugs/issue-88460.stderr
@@ -24,6 +24,6 @@ LL | fn test<T>(value: T)
LL | for<'a> T::Assoc<'a>: Marker,
| ^^^^^^ required by this bound in `test`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/generic-associated-types/bugs/issue-88526.stderr b/tests/ui/generic-associated-types/bugs/issue-88526.stderr
index 56857c655..ba87ac918 100644
--- a/tests/ui/generic-associated-types/bugs/issue-88526.stderr
+++ b/tests/ui/generic-associated-types/bugs/issue-88526.stderr
@@ -4,6 +4,6 @@ error[E0207]: the type parameter `I` is not constrained by the impl trait, self
LL | impl<'q, Q, I, F> A for TestB<Q, F>
| ^ unconstrained type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0207`.
diff --git a/tests/ui/generic-associated-types/bugs/issue-91762.stderr b/tests/ui/generic-associated-types/bugs/issue-91762.stderr
index 1045e80f0..b4ca65889 100644
--- a/tests/ui/generic-associated-types/bugs/issue-91762.stderr
+++ b/tests/ui/generic-associated-types/bugs/issue-91762.stderr
@@ -10,6 +10,6 @@ help: consider specifying the generic arguments
LL | ret = <Self::Base as Functor>::fmap::<T, U>(arg);
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0284`.
diff --git a/tests/ui/generic-associated-types/collections-project-default.stderr b/tests/ui/generic-associated-types/collections-project-default.stderr
index 3c3ae24dd..db1deab92 100644
--- a/tests/ui/generic-associated-types/collections-project-default.stderr
+++ b/tests/ui/generic-associated-types/collections-project-default.stderr
@@ -11,6 +11,6 @@ LL | res
found associated type `<<C as Collection<i32>>::Family as CollectionFamily>::Member<f32>`
= note: an associated type was expected, but a different one was found
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/generic-associated-types/collectivity-regression.stderr b/tests/ui/generic-associated-types/collectivity-regression.stderr
index a085096e1..0c395a166 100644
--- a/tests/ui/generic-associated-types/collectivity-regression.stderr
+++ b/tests/ui/generic-associated-types/collectivity-regression.stderr
@@ -20,5 +20,5 @@ help: consider restricting the type parameter to the `'static` lifetime
LL | for<'a> T: Get<Value<'a> = ()> + 'static,
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generic-associated-types/const_params_have_right_type.stderr b/tests/ui/generic-associated-types/const_params_have_right_type.stderr
index fdedd3bf5..78992112a 100644
--- a/tests/ui/generic-associated-types/const_params_have_right_type.stderr
+++ b/tests/ui/generic-associated-types/const_params_have_right_type.stderr
@@ -11,6 +11,6 @@ LL | impl Trait for () {
LL | type Foo<const N: u64> = u32;
| ^^^^^^^^^^^^ found const parameter of type `u64`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0053`.
diff --git a/tests/ui/generic-associated-types/constraint-assoc-type-suggestion.stderr b/tests/ui/generic-associated-types/constraint-assoc-type-suggestion.stderr
index 3b65b32f4..54dbe28bd 100644
--- a/tests/ui/generic-associated-types/constraint-assoc-type-suggestion.stderr
+++ b/tests/ui/generic-associated-types/constraint-assoc-type-suggestion.stderr
@@ -13,6 +13,6 @@ help: consider constraining the associated type `<T as X>::Y<i32>` to `Vec<i32>`
LL | fn f<T: X<Y<i32> = Vec<i32>>>(a: T::Y<i32>) {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/generic-associated-types/cross-crate-bounds.stderr b/tests/ui/generic-associated-types/cross-crate-bounds.stderr
index 83ee04d5a..ebd733c2e 100644
--- a/tests/ui/generic-associated-types/cross-crate-bounds.stderr
+++ b/tests/ui/generic-associated-types/cross-crate-bounds.stderr
@@ -10,6 +10,6 @@ note: required by a bound in `foo_defn::Foo::Bar`
LL | type Bar: AsRef<()>;
| ^^^^^^^^^ required by this bound in `Foo::Bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/generic-associated-types/empty_generics.stderr b/tests/ui/generic-associated-types/empty_generics.stderr
index b753181cf..1ac35b318 100644
--- a/tests/ui/generic-associated-types/empty_generics.stderr
+++ b/tests/ui/generic-associated-types/empty_generics.stderr
@@ -9,5 +9,5 @@ LL |
LL | }
| - the item list ends here
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generic-associated-types/extended/lending_iterator.base.stderr b/tests/ui/generic-associated-types/extended/lending_iterator.base.stderr
index 614c4a34c..84210eeb1 100644
--- a/tests/ui/generic-associated-types/extended/lending_iterator.base.stderr
+++ b/tests/ui/generic-associated-types/extended/lending_iterator.base.stderr
@@ -7,6 +7,6 @@ LL | fn from_iter<T: for<'x> LendingIterator<Item<'x> = A>>(iter: T) -> Self
LL | fn from_iter<I: for<'x> LendingIterator<Item<'x> = A>>(mut iter: I) -> Self {
| ^^^^^^^^^^^^ impl has extra requirement `I: 'x`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0276`.
diff --git a/tests/ui/generic-associated-types/extended/lending_iterator_2.base.stderr b/tests/ui/generic-associated-types/extended/lending_iterator_2.base.stderr
index f6b0b644e..717d86705 100644
--- a/tests/ui/generic-associated-types/extended/lending_iterator_2.base.stderr
+++ b/tests/ui/generic-associated-types/extended/lending_iterator_2.base.stderr
@@ -7,6 +7,6 @@ LL | fn from_iter<T: for<'x> LendingIterator<Item<'x> = A>>(iter: T) -> Self
LL | fn from_iter<I: for<'x> LendingIterator<Item<'x> = A>>(mut iter: I) -> Self {
| ^^^^^^^^^^^^ impl has extra requirement `I: 'x`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0276`.
diff --git a/tests/ui/generic-associated-types/gat-bounds-not-checked-with-right-substitutions.stderr b/tests/ui/generic-associated-types/gat-bounds-not-checked-with-right-substitutions.stderr
index 7ea7a7b2d..8ae308303 100644
--- a/tests/ui/generic-associated-types/gat-bounds-not-checked-with-right-substitutions.stderr
+++ b/tests/ui/generic-associated-types/gat-bounds-not-checked-with-right-substitutions.stderr
@@ -7,5 +7,5 @@ LL | type Gat<'a> = &'a str;
= note: `Lengthen<&'0 str>` would have to be implemented for the type `&'a str`, for any lifetime `'0`...
= note: ...but `Lengthen<&'1 str>` is actually implemented for the type `&'1 str`, for some specific lifetime `'1`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generic-associated-types/gat-in-trait-path.base.stderr b/tests/ui/generic-associated-types/gat-in-trait-path.base.stderr
index 9013d4295..bd3728cec 100644
--- a/tests/ui/generic-associated-types/gat-in-trait-path.base.stderr
+++ b/tests/ui/generic-associated-types/gat-in-trait-path.base.stderr
@@ -16,6 +16,6 @@ LL | type A<'a> where Self: 'a;
Fooy
Fooer<T>
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/generic-associated-types/issue-101020.stderr b/tests/ui/generic-associated-types/issue-101020.stderr
index 91967fb85..9c3753c2d 100644
--- a/tests/ui/generic-associated-types/issue-101020.stderr
+++ b/tests/ui/generic-associated-types/issue-101020.stderr
@@ -23,6 +23,6 @@ LL | fn consume<F>(self, _f: F)
LL | for<'a> Self::Item<'a>: FuncInput<'a, Self::Item<'a>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `LendingIterator::consume`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/generic-associated-types/issue-102114.current.stderr b/tests/ui/generic-associated-types/issue-102114.current.stderr
index 6e7a0b1f6..69ae5676e 100644
--- a/tests/ui/generic-associated-types/issue-102114.current.stderr
+++ b/tests/ui/generic-associated-types/issue-102114.current.stderr
@@ -7,6 +7,6 @@ LL | type B<'b>;
LL | type B<T> = Wrapper<T>;
| ^ found 1 type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0049`.
diff --git a/tests/ui/generic-associated-types/issue-102114.next.stderr b/tests/ui/generic-associated-types/issue-102114.next.stderr
index 6e7a0b1f6..69ae5676e 100644
--- a/tests/ui/generic-associated-types/issue-102114.next.stderr
+++ b/tests/ui/generic-associated-types/issue-102114.next.stderr
@@ -7,6 +7,6 @@ LL | type B<'b>;
LL | type B<T> = Wrapper<T>;
| ^ found 1 type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0049`.
diff --git a/tests/ui/generic-associated-types/issue-102114.rs b/tests/ui/generic-associated-types/issue-102114.rs
index bb6622c0a..bb6369d7f 100644
--- a/tests/ui/generic-associated-types/issue-102114.rs
+++ b/tests/ui/generic-associated-types/issue-102114.rs
@@ -1,5 +1,5 @@
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
trait A {
type B<'b>;
diff --git a/tests/ui/generic-associated-types/issue-102335-gat.stderr b/tests/ui/generic-associated-types/issue-102335-gat.stderr
index 7a7900a1e..39ca7954e 100644
--- a/tests/ui/generic-associated-types/issue-102335-gat.stderr
+++ b/tests/ui/generic-associated-types/issue-102335-gat.stderr
@@ -4,6 +4,6 @@ error[E0229]: associated type bindings are not allowed here
LL | type A: S<C<(), i32 = ()> = ()>;
| ^^^^^^^^ associated type not allowed here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0229`.
diff --git a/tests/ui/generic-associated-types/issue-47206-where-clause.stderr b/tests/ui/generic-associated-types/issue-47206-where-clause.stderr
index 7006744df..da0924312 100644
--- a/tests/ui/generic-associated-types/issue-47206-where-clause.stderr
+++ b/tests/ui/generic-associated-types/issue-47206-where-clause.stderr
@@ -7,6 +7,6 @@ LL | type Assoc3<T>;
LL | type Assoc3<T> = Vec<T> where T: Iterator;
| ^^^^^^^^ impl has extra requirement `T: Iterator`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0276`.
diff --git a/tests/ui/generic-associated-types/issue-67510-pass.base.stderr b/tests/ui/generic-associated-types/issue-67510-pass.base.stderr
index 4cc68530e..f39d00554 100644
--- a/tests/ui/generic-associated-types/issue-67510-pass.base.stderr
+++ b/tests/ui/generic-associated-types/issue-67510-pass.base.stderr
@@ -13,6 +13,6 @@ LL | type Y<'a>;
| ^ ...because it contains the generic associated type `Y`
= help: consider moving `Y` to another trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/generic-associated-types/issue-68641-check-gat-bounds.stderr b/tests/ui/generic-associated-types/issue-68641-check-gat-bounds.stderr
index 6bb7492af..55901cf45 100644
--- a/tests/ui/generic-associated-types/issue-68641-check-gat-bounds.stderr
+++ b/tests/ui/generic-associated-types/issue-68641-check-gat-bounds.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `T`
LL | impl<T: std::marker::Copy> UnsafeCopy for T {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr b/tests/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr
index 2376bda81..6bf832bb9 100644
--- a/tests/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr
+++ b/tests/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr
@@ -15,6 +15,6 @@ help: consider restricting type parameter `T`
LL | impl<T: std::ops::Fn<()>> Fun for T {
| ++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/generic-associated-types/issue-68643-broken-mir.stderr b/tests/ui/generic-associated-types/issue-68643-broken-mir.stderr
index 2429531e4..d9f26ee6c 100644
--- a/tests/ui/generic-associated-types/issue-68643-broken-mir.stderr
+++ b/tests/ui/generic-associated-types/issue-68643-broken-mir.stderr
@@ -15,6 +15,6 @@ help: consider restricting type parameter `T`
LL | impl<T: std::ops::Fn<()>> Fun for T {
| ++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/generic-associated-types/issue-68644-codegen-selection.stderr b/tests/ui/generic-associated-types/issue-68644-codegen-selection.stderr
index 11221353a..3dc9ff102 100644
--- a/tests/ui/generic-associated-types/issue-68644-codegen-selection.stderr
+++ b/tests/ui/generic-associated-types/issue-68644-codegen-selection.stderr
@@ -15,6 +15,6 @@ help: consider restricting type parameter `T`
LL | impl<T: std::ops::Fn<()>> Fun for T {
| ++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr b/tests/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr
index 52300efc2..45fb65f6c 100644
--- a/tests/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr
+++ b/tests/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr
@@ -15,6 +15,6 @@ help: consider restricting type parameter `T`
LL | impl<T: std::ops::Fn<()>> Fun for T {
| ++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/generic-associated-types/issue-68648-2.stderr b/tests/ui/generic-associated-types/issue-68648-2.stderr
index 0514e7bd6..d71ad870d 100644
--- a/tests/ui/generic-associated-types/issue-68648-2.stderr
+++ b/tests/ui/generic-associated-types/issue-68648-2.stderr
@@ -16,6 +16,6 @@ note: associated function defined here
LL | fn identity<'a>(t: Self::F<'a>) -> Self::F<'a> { t }
| ^^^^^^^^ --------------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/generic-associated-types/issue-68656-unsized-values.stderr b/tests/ui/generic-associated-types/issue-68656-unsized-values.stderr
index 20c07db4c..ecb337bbc 100644
--- a/tests/ui/generic-associated-types/issue-68656-unsized-values.stderr
+++ b/tests/ui/generic-associated-types/issue-68656-unsized-values.stderr
@@ -18,6 +18,6 @@ help: consider further restricting this bound
LL | impl<T: Copy + std::ops::Deref<Target = T>> UnsafeCopy<T> for T {
| ++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/generic-associated-types/issue-70304.stderr b/tests/ui/generic-associated-types/issue-70304.stderr
index 99339e968..9b02c1b07 100644
--- a/tests/ui/generic-associated-types/issue-70304.stderr
+++ b/tests/ui/generic-associated-types/issue-70304.stderr
@@ -11,7 +11,7 @@ LL | fn create_doc() -> impl Document<Cursor<'_> = DocCursorImpl<'_>> {
| ^^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
|
LL | fn create_doc() -> impl Document<Cursor<'_> = DocCursorImpl<'static>> {
| ~~~~~~~
diff --git a/tests/ui/generic-associated-types/issue-71176.stderr b/tests/ui/generic-associated-types/issue-71176.stderr
index 4b4fe43e8..ed837f347 100644
--- a/tests/ui/generic-associated-types/issue-71176.stderr
+++ b/tests/ui/generic-associated-types/issue-71176.stderr
@@ -14,6 +14,6 @@ help: add missing lifetime argument
LL | inner: Box<dyn Provider<A<'a> = B>>,
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/generic-associated-types/issue-74684-1.stderr b/tests/ui/generic-associated-types/issue-74684-1.stderr
index b93ee3798..4bc13d7b2 100644
--- a/tests/ui/generic-associated-types/issue-74684-1.stderr
+++ b/tests/ui/generic-associated-types/issue-74684-1.stderr
@@ -14,6 +14,6 @@ LL | let _x = T::identity(&a);
LL | }
| - `a` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/generic-associated-types/issue-74684-2.stderr b/tests/ui/generic-associated-types/issue-74684-2.stderr
index 59b85abf5..e50e3df85 100644
--- a/tests/ui/generic-associated-types/issue-74684-2.stderr
+++ b/tests/ui/generic-associated-types/issue-74684-2.stderr
@@ -17,6 +17,6 @@ note: required by a bound in `bug`
LL | fn bug<'a, T: ?Sized + Fun<F<'a> = [u8]>>(t: Box<T>) -> &'static T::F<'a> {
| ^^^^^^^^^^^^ required by this bound in `bug`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/generic-associated-types/issue-76535.extended.stderr b/tests/ui/generic-associated-types/issue-76535.extended.stderr
index 369b86d29..f6fe8b169 100644
--- a/tests/ui/generic-associated-types/issue-76535.extended.stderr
+++ b/tests/ui/generic-associated-types/issue-76535.extended.stderr
@@ -14,6 +14,6 @@ help: add missing lifetime argument
LL | let sub: Box<dyn SuperTrait<SubType<'a> = SubStruct>> = Box::new(SuperStruct::new(0));
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/generic-associated-types/issue-78671.extended.stderr b/tests/ui/generic-associated-types/issue-78671.extended.stderr
index 1d8a3d410..a5d56256d 100644
--- a/tests/ui/generic-associated-types/issue-78671.extended.stderr
+++ b/tests/ui/generic-associated-types/issue-78671.extended.stderr
@@ -14,6 +14,6 @@ help: add missing generic argument
LL | Box::new(Family) as &dyn CollectionFamily<Member<T>=usize>
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/generic-associated-types/issue-79636-1.stderr b/tests/ui/generic-associated-types/issue-79636-1.stderr
index 6e0d2ff4d..4076e9518 100644
--- a/tests/ui/generic-associated-types/issue-79636-1.stderr
+++ b/tests/ui/generic-associated-types/issue-79636-1.stderr
@@ -14,6 +14,6 @@ help: add missing generic argument
LL | MInner: Monad<Unwrapped = A, Wrapped<B> = MOuter::Wrapped<A>>,
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/generic-associated-types/issue-79636-2.stderr b/tests/ui/generic-associated-types/issue-79636-2.stderr
index 162873239..a8b63f150 100644
--- a/tests/ui/generic-associated-types/issue-79636-2.stderr
+++ b/tests/ui/generic-associated-types/issue-79636-2.stderr
@@ -14,6 +14,6 @@ help: add missing generic argument
LL | W: SomeTrait<Wrapped<A> = W>,
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/generic-associated-types/issue-80433.stderr b/tests/ui/generic-associated-types/issue-80433.stderr
index 4f4f96a4b..488fbeced 100644
--- a/tests/ui/generic-associated-types/issue-80433.stderr
+++ b/tests/ui/generic-associated-types/issue-80433.stderr
@@ -14,6 +14,6 @@ help: add missing lifetime argument
LL | fn test_simpler<'a>(dst: &'a mut impl TestMut<Output<'a> = &'a mut f32>)
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/generic-associated-types/issue-81712-cyclic-traits.stderr b/tests/ui/generic-associated-types/issue-81712-cyclic-traits.stderr
index e0fc225f4..5eb988ea0 100644
--- a/tests/ui/generic-associated-types/issue-81712-cyclic-traits.stderr
+++ b/tests/ui/generic-associated-types/issue-81712-cyclic-traits.stderr
@@ -14,6 +14,6 @@ help: add missing generic argument
LL | type CType: C<DType<T> = Self>;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/generic-associated-types/issue-81862.stderr b/tests/ui/generic-associated-types/issue-81862.stderr
index df30be65e..730dc8fff 100644
--- a/tests/ui/generic-associated-types/issue-81862.stderr
+++ b/tests/ui/generic-associated-types/issue-81862.stderr
@@ -14,6 +14,6 @@ help: add missing lifetime argument
LL | fn next(&mut self) -> Option<Self::Item<'_>>;
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/generic-associated-types/issue-87258_a.stderr b/tests/ui/generic-associated-types/issue-87258_a.stderr
index eae9bd9b1..01f2a92f9 100644
--- a/tests/ui/generic-associated-types/issue-87258_a.stderr
+++ b/tests/ui/generic-associated-types/issue-87258_a.stderr
@@ -6,5 +6,5 @@ LL | type FooFuture<'a> = impl Trait1;
|
= note: `FooFuture` must be used in combination with a concrete type within the same impl
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generic-associated-types/issue-87258_b.stderr b/tests/ui/generic-associated-types/issue-87258_b.stderr
index 0ee665f38..73f984dcf 100644
--- a/tests/ui/generic-associated-types/issue-87258_b.stderr
+++ b/tests/ui/generic-associated-types/issue-87258_b.stderr
@@ -6,5 +6,5 @@ LL | type Helper<'xenon, 'yttrium, KABOOM: Trait2> = impl Trait1;
|
= note: `Helper` must be used in combination with a concrete type within the same module
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generic-associated-types/issue-87429-associated-type-default.stderr b/tests/ui/generic-associated-types/issue-87429-associated-type-default.stderr
index a44bb6993..c85b72fbf 100644
--- a/tests/ui/generic-associated-types/issue-87429-associated-type-default.stderr
+++ b/tests/ui/generic-associated-types/issue-87429-associated-type-default.stderr
@@ -16,6 +16,6 @@ LL + #[derive(PartialEq)]
LL | struct Foo;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/generic-associated-types/issue-87429-specialization.stderr b/tests/ui/generic-associated-types/issue-87429-specialization.stderr
index c259c89a7..44f871e71 100644
--- a/tests/ui/generic-associated-types/issue-87429-specialization.stderr
+++ b/tests/ui/generic-associated-types/issue-87429-specialization.stderr
@@ -26,6 +26,6 @@ LL + #[derive(PartialEq)]
LL | struct Foo;
|
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/generic-associated-types/issue-88287.stderr b/tests/ui/generic-associated-types/issue-88287.stderr
index d77076a28..79ac6d0f1 100644
--- a/tests/ui/generic-associated-types/issue-88287.stderr
+++ b/tests/ui/generic-associated-types/issue-88287.stderr
@@ -22,6 +22,6 @@ help: consider relaxing the implicit `Sized` restriction
LL | T: SearchableResource<Criteria> + ?Sized,
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/generic-associated-types/issue-88360.stderr b/tests/ui/generic-associated-types/issue-88360.stderr
index ad40ee180..49d36acad 100644
--- a/tests/ui/generic-associated-types/issue-88360.stderr
+++ b/tests/ui/generic-associated-types/issue-88360.stderr
@@ -9,14 +9,14 @@ LL | fn copy(&self) -> Self::Gat<'_> where T: Copy {
LL | *self.test()
| ^^^^^^^^^^^^ expected `&T`, found type parameter `T`
|
- = note: expected reference `&T`
- found type parameter `T`
+ = note: expected reference `&_`
+ found type parameter `_`
help: consider removing deref here
|
LL - *self.test()
LL + self.test()
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/generic-associated-types/issue-88595.stderr b/tests/ui/generic-associated-types/issue-88595.stderr
index 2b1a25acf..ab75a9240 100644
--- a/tests/ui/generic-associated-types/issue-88595.stderr
+++ b/tests/ui/generic-associated-types/issue-88595.stderr
@@ -10,5 +10,5 @@ note: for this opaque type
LL | type B<'b> = impl Clone;
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generic-associated-types/issue-90014-tait.stderr b/tests/ui/generic-associated-types/issue-90014-tait.stderr
index b86e2a204..e4bcc92bf 100644
--- a/tests/ui/generic-associated-types/issue-90014-tait.stderr
+++ b/tests/ui/generic-associated-types/issue-90014-tait.stderr
@@ -17,6 +17,6 @@ note: this item must have the opaque type in its signature in order to be able t
LL | fn make_fut<'a>(&'a self) -> Self::Fut<'a> {
| ^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/generic-associated-types/issue-90014-tait2.stderr b/tests/ui/generic-associated-types/issue-90014-tait2.stderr
index d04788a91..ed0b2085c 100644
--- a/tests/ui/generic-associated-types/issue-90014-tait2.stderr
+++ b/tests/ui/generic-associated-types/issue-90014-tait2.stderr
@@ -1,5 +1,5 @@
error[E0792]: expected generic lifetime parameter, found `'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0792`.
diff --git a/tests/ui/generic-associated-types/issue-90014.stderr b/tests/ui/generic-associated-types/issue-90014.stderr
index 0d49398ca..2bb9d0c7b 100644
--- a/tests/ui/generic-associated-types/issue-90014.stderr
+++ b/tests/ui/generic-associated-types/issue-90014.stderr
@@ -17,6 +17,6 @@ help: copy the `where` clause predicates from the trait
LL | type Fut<'a> = impl Future<Output = ()> where Self: 'a;
| ++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0477`.
diff --git a/tests/ui/generic-associated-types/issue-91139.migrate.stderr b/tests/ui/generic-associated-types/issue-91139.migrate.stderr
index 690160577..23b7bf45a 100644
--- a/tests/ui/generic-associated-types/issue-91139.migrate.stderr
+++ b/tests/ui/generic-associated-types/issue-91139.migrate.stderr
@@ -4,5 +4,5 @@ error: expected identifier, found `<<`
LL | <<<<<<< HEAD
| ^^ expected identifier
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generic-associated-types/issue-91883.stderr b/tests/ui/generic-associated-types/issue-91883.stderr
index d5db96209..ac636ebb6 100644
--- a/tests/ui/generic-associated-types/issue-91883.stderr
+++ b/tests/ui/generic-associated-types/issue-91883.stderr
@@ -22,6 +22,6 @@ help: copy the `where` clause predicates from the trait
LL | type Cursor<'tx> = CursorImpl<'tx> where 'db: 'tx, Self: 'tx;
| +++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0478`.
diff --git a/tests/ui/generic-associated-types/issue-92033.stderr b/tests/ui/generic-associated-types/issue-92033.stderr
index ddc420a7b..5dfd66d54 100644
--- a/tests/ui/generic-associated-types/issue-92033.stderr
+++ b/tests/ui/generic-associated-types/issue-92033.stderr
@@ -17,6 +17,6 @@ help: copy the `where` clause predicates from the trait
LL | type TextureIter<'a> = std::option::IntoIter<&'a Texture> where Self: 'a;
| ++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0477`.
diff --git a/tests/ui/generic-associated-types/issue-92096.stderr b/tests/ui/generic-associated-types/issue-92096.stderr
index 91a06d5ac..b9a16cf18 100644
--- a/tests/ui/generic-associated-types/issue-92096.stderr
+++ b/tests/ui/generic-associated-types/issue-92096.stderr
@@ -4,5 +4,5 @@ error: `C` does not live long enough
LL | async move { c.connect().await }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generic-associated-types/issue-95305.stderr b/tests/ui/generic-associated-types/issue-95305.stderr
index eb15cbc62..752bb3292 100644
--- a/tests/ui/generic-associated-types/issue-95305.stderr
+++ b/tests/ui/generic-associated-types/issue-95305.stderr
@@ -4,6 +4,6 @@ error[E0637]: `'_` cannot be used here
LL | fn foo(x: &impl Foo<Item<'_> = u32>) { }
| ^^ `'_` is a reserved lifetime name
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0637`.
diff --git a/tests/ui/generic-associated-types/method-unsatisfied-assoc-type-predicate.stderr b/tests/ui/generic-associated-types/method-unsatisfied-assoc-type-predicate.stderr
index 4246f8c06..7ca0b2912 100644
--- a/tests/ui/generic-associated-types/method-unsatisfied-assoc-type-predicate.stderr
+++ b/tests/ui/generic-associated-types/method-unsatisfied-assoc-type-predicate.stderr
@@ -19,6 +19,6 @@ LL | impl<T: X<Y<i32> = i32>> M for T {}
| |
| unsatisfied trait bound introduced here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/generic-associated-types/mismatched-where-clause-regions.stderr b/tests/ui/generic-associated-types/mismatched-where-clause-regions.stderr
index 91a030076..ee90f61aa 100644
--- a/tests/ui/generic-associated-types/mismatched-where-clause-regions.stderr
+++ b/tests/ui/generic-associated-types/mismatched-where-clause-regions.stderr
@@ -12,6 +12,6 @@ help: copy the `where` clause predicates from the trait
LL | type T<'a2, 'b2> = () where 'a2: 'b2;
| ~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0276`.
diff --git a/tests/ui/generic-associated-types/missing-item-sugg.stderr b/tests/ui/generic-associated-types/missing-item-sugg.stderr
index 378115f6d..1f142f7f6 100644
--- a/tests/ui/generic-associated-types/missing-item-sugg.stderr
+++ b/tests/ui/generic-associated-types/missing-item-sugg.stderr
@@ -6,6 +6,6 @@ LL | impl missing_item_sugg::Foo for Local {
|
= help: implement the missing item: `type Gat<T> = /* Type */ where T: std::fmt::Display;`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/generic-associated-types/missing-where-clause-on-trait.stderr b/tests/ui/generic-associated-types/missing-where-clause-on-trait.stderr
index 8a71fc73a..d0eb27343 100644
--- a/tests/ui/generic-associated-types/missing-where-clause-on-trait.stderr
+++ b/tests/ui/generic-associated-types/missing-where-clause-on-trait.stderr
@@ -13,6 +13,6 @@ LL - type Assoc<'a, 'b> = () where 'a: 'b;
LL + type Assoc<'a, 'b> = () ;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0276`.
diff --git a/tests/ui/generic-associated-types/missing_lifetime_const.stderr b/tests/ui/generic-associated-types/missing_lifetime_const.stderr
index 41945aabf..ac0960864 100644
--- a/tests/ui/generic-associated-types/missing_lifetime_const.stderr
+++ b/tests/ui/generic-associated-types/missing_lifetime_const.stderr
@@ -14,6 +14,6 @@ help: add missing lifetime argument
LL | let _: <T as Foo>::Assoc<'a, 3>;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/generic-associated-types/multiple-type-params-with-unmet-bounds.stderr b/tests/ui/generic-associated-types/multiple-type-params-with-unmet-bounds.stderr
index 72a987b4a..57bff7c9e 100644
--- a/tests/ui/generic-associated-types/multiple-type-params-with-unmet-bounds.stderr
+++ b/tests/ui/generic-associated-types/multiple-type-params-with-unmet-bounds.stderr
@@ -10,6 +10,6 @@ note: required by a bound in `Trait::P`
LL | type P<T: Copy, U: Copy>;
| ^^^^ required by this bound in `Trait::P`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/generic-associated-types/own-bound-span.stderr b/tests/ui/generic-associated-types/own-bound-span.stderr
index 4a0566ca7..7c34a0acd 100644
--- a/tests/ui/generic-associated-types/own-bound-span.stderr
+++ b/tests/ui/generic-associated-types/own-bound-span.stderr
@@ -10,6 +10,6 @@ note: required by a bound in `D::P`
LL | type P<T: Copy>;
| ^^^^ required by this bound in `D::P`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/generic-associated-types/parse/trait-path-expected-token.stderr b/tests/ui/generic-associated-types/parse/trait-path-expected-token.stderr
index 53d5f9de6..838d37cc6 100644
--- a/tests/ui/generic-associated-types/parse/trait-path-expected-token.stderr
+++ b/tests/ui/generic-associated-types/parse/trait-path-expected-token.stderr
@@ -2,9 +2,7 @@ error: expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `=`
--> $DIR/trait-path-expected-token.rs:5:33
|
LL | fn f1<'a>(arg : Box<dyn X<Y = B = &'a ()>>) {}
- | - ^ expected one of 7 possible tokens
- | |
- | maybe try to close unmatched angle bracket
+ | ^ expected one of 7 possible tokens
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generic-associated-types/parse/trait-path-expressions.stderr b/tests/ui/generic-associated-types/parse/trait-path-expressions.stderr
index cf2b1763f..06dbf00af 100644
--- a/tests/ui/generic-associated-types/parse/trait-path-expressions.stderr
+++ b/tests/ui/generic-associated-types/parse/trait-path-expressions.stderr
@@ -10,9 +10,7 @@ error: expected one of `,`, `:`, or `>`, found `=`
--> $DIR/trait-path-expressions.rs:16:36
|
LL | fn f2<'a>(arg : Box<dyn X< { 1 } = 32 >>) {}
- | - ^ expected one of `,`, `:`, or `>`
- | |
- | maybe try to close unmatched angle bracket
+ | ^ expected one of `,`, `:`, or `>`
|
help: you might have meant to end the type parameters here
|
diff --git a/tests/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr b/tests/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr
index bfddb6dc6..4bc57f550 100644
--- a/tests/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr
+++ b/tests/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr
@@ -8,9 +8,7 @@ error: expected one of `>`, a const expression, lifetime, or type, found `=`
--> $DIR/trait-path-missing-gen_arg.rs:11:30
|
LL | fn f1<'a>(arg : Box<dyn X< = 32 >>) {}
- | - ^ expected one of `>`, a const expression, lifetime, or type
- | |
- | maybe try to close unmatched angle bracket
+ | ^ expected one of `>`, a const expression, lifetime, or type
error: aborting due to 2 previous errors
diff --git a/tests/ui/generic-associated-types/parse/trait-path-segments.stderr b/tests/ui/generic-associated-types/parse/trait-path-segments.stderr
index 8bc737d67..0ab155590 100644
--- a/tests/ui/generic-associated-types/parse/trait-path-segments.stderr
+++ b/tests/ui/generic-associated-types/parse/trait-path-segments.stderr
@@ -2,9 +2,7 @@ error: expected one of `!`, `(`, `+`, `,`, `::`, `:`, `<`, or `>`, found `=`
--> $DIR/trait-path-segments.rs:6:36
|
LL | fn f1<'a>(arg : Box<dyn X<X::Y = u32>>) {}
- | - ^ expected one of 8 possible tokens
- | |
- | maybe try to close unmatched angle bracket
+ | ^ expected one of 8 possible tokens
|
help: you might have meant to end the type parameters here
|
@@ -15,9 +13,7 @@ error: expected one of `,`, `::`, `:`, or `>`, found `=`
--> $DIR/trait-path-segments.rs:17:35
|
LL | impl<T : X<<Self as X>::Y<'a> = &'a u32>> Z for T {}
- | - ^ expected one of `,`, `::`, `:`, or `>`
- | |
- | maybe try to close unmatched angle bracket
+ | ^ expected one of `,`, `::`, `:`, or `>`
|
help: you might have meant to end the type parameters here
|
@@ -28,9 +24,7 @@ error: expected one of `!`, `+`, `,`, `::`, `:`, or `>`, found `=`
--> $DIR/trait-path-segments.rs:28:25
|
LL | impl<T : X<X::Y<'a> = &'a u32>> Z for T {}
- | - ^ expected one of `!`, `+`, `,`, `::`, `:`, or `>`
- | |
- | maybe try to close unmatched angle bracket
+ | ^ expected one of `!`, `+`, `,`, `::`, `:`, or `>`
|
help: you might have meant to end the type parameters here
|
diff --git a/tests/ui/generic-associated-types/parse/trait-path-types.stderr b/tests/ui/generic-associated-types/parse/trait-path-types.stderr
index 8f7a73c95..ec1aa7184 100644
--- a/tests/ui/generic-associated-types/parse/trait-path-types.stderr
+++ b/tests/ui/generic-associated-types/parse/trait-path-types.stderr
@@ -2,9 +2,7 @@ error: expected one of `,`, `:`, or `>`, found `=`
--> $DIR/trait-path-types.rs:6:37
|
LL | fn f<'a>(arg : Box<dyn X< [u8; 1] = u32>>) {}
- | - ^ expected one of `,`, `:`, or `>`
- | |
- | maybe try to close unmatched angle bracket
+ | ^ expected one of `,`, `:`, or `>`
|
help: you might have meant to end the type parameters here
|
@@ -15,9 +13,7 @@ error: expected one of `,`, `:`, or `>`, found `=`
--> $DIR/trait-path-types.rs:11:37
|
LL | fn f1<'a>(arg : Box<dyn X<(Y<'a>) = &'a ()>>) {}
- | - ^ expected one of `,`, `:`, or `>`
- | |
- | maybe try to close unmatched angle bracket
+ | ^ expected one of `,`, `:`, or `>`
|
help: you might have meant to end the type parameters here
|
@@ -28,9 +24,7 @@ error: expected one of `,`, `:`, or `>`, found `=`
--> $DIR/trait-path-types.rs:16:33
|
LL | fn f1<'a>(arg : Box<dyn X< 'a = u32 >>) {}
- | -- ^ expected one of `,`, `:`, or `>`
- | |
- | maybe try to close unmatched angle bracket
+ | ^ expected one of `,`, `:`, or `>`
|
help: you might have meant to end the type parameters here
|
diff --git a/tests/ui/generic-associated-types/projection-bound-cycle-generic.stderr b/tests/ui/generic-associated-types/projection-bound-cycle-generic.stderr
index aae9a56bb..1b3b264e7 100644
--- a/tests/ui/generic-associated-types/projection-bound-cycle-generic.stderr
+++ b/tests/ui/generic-associated-types/projection-bound-cycle-generic.stderr
@@ -4,6 +4,6 @@ error[E0275]: overflow evaluating the requirement `<Number<T> as Foo>::Item == _
LL | type Item = [T] where [T]: Sized;
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/generic-associated-types/projection-bound-cycle.stderr b/tests/ui/generic-associated-types/projection-bound-cycle.stderr
index b1b8afeec..6f5eee992 100644
--- a/tests/ui/generic-associated-types/projection-bound-cycle.stderr
+++ b/tests/ui/generic-associated-types/projection-bound-cycle.stderr
@@ -4,6 +4,6 @@ error[E0275]: overflow evaluating the requirement `<Number as Foo>::Item == _`
LL | type Item = str where str: Sized;
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/generic-associated-types/trait-objects.base.stderr b/tests/ui/generic-associated-types/trait-objects.base.stderr
index 556422c27..e3cfd4652 100644
--- a/tests/ui/generic-associated-types/trait-objects.base.stderr
+++ b/tests/ui/generic-associated-types/trait-objects.base.stderr
@@ -13,6 +13,6 @@ LL | type Item<'a> where Self: 'a;
| ^^^^ ...because it contains the generic associated type `Item`
= help: consider moving `Item` to another trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/generic-associated-types/trait-objects.extended.stderr b/tests/ui/generic-associated-types/trait-objects.extended.stderr
index 45b64d2b0..9f9418e20 100644
--- a/tests/ui/generic-associated-types/trait-objects.extended.stderr
+++ b/tests/ui/generic-associated-types/trait-objects.extended.stderr
@@ -14,6 +14,6 @@ LL | x.size_hint().0
|
= note: due to current limitations in the borrow checker, this implies a `'static` lifetime
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0521`.
diff --git a/tests/ui/generic-const-items/const-trait-impl.rs b/tests/ui/generic-const-items/const-trait-impl.rs
index d30f7af17..43cdf818c 100644
--- a/tests/ui/generic-const-items/const-trait-impl.rs
+++ b/tests/ui/generic-const-items/const-trait-impl.rs
@@ -7,8 +7,8 @@
#![allow(incomplete_features)]
#![crate_type = "lib"]
-// FIXME(generic_const_items): Interpret `~const` as always-const.
-const CREATE<T: ~const Create>: T = T::create();
+// FIXME(generic_const_items, effects): Introduce `const` bounds to make this work.
+const CREATE<T: Create>: T = T::create();
pub const K0: i32 = CREATE::<i32>;
pub const K1: i32 = CREATE; // arg inferred
diff --git a/tests/ui/generic-const-items/const-trait-impl.stderr b/tests/ui/generic-const-items/const-trait-impl.stderr
index 34360c581..e7e905427 100644
--- a/tests/ui/generic-const-items/const-trait-impl.stderr
+++ b/tests/ui/generic-const-items/const-trait-impl.stderr
@@ -1,11 +1,11 @@
error[E0015]: cannot call non-const fn `<T as Create>::create` in constants
- --> $DIR/const-trait-impl.rs:11:37
+ --> $DIR/const-trait-impl.rs:11:30
|
-LL | const CREATE<T: ~const Create>: T = T::create();
- | ^^^^^^^^^^^
+LL | const CREATE<T: Create>: T = T::create();
+ | ^^^^^^^^^^^
|
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/generic-const-items/evaluatable-bounds.unconstrained.stderr b/tests/ui/generic-const-items/evaluatable-bounds.unconstrained.stderr
index 930080f7c..1475d988e 100644
--- a/tests/ui/generic-const-items/evaluatable-bounds.unconstrained.stderr
+++ b/tests/ui/generic-const-items/evaluatable-bounds.unconstrained.stderr
@@ -6,5 +6,5 @@ LL | const ARRAY: [i32; Self::LEN];
|
= help: try adding a `where` bound using this expression: `where [(); Self::LEN]:`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generic-const-items/parameter-defaults.stderr b/tests/ui/generic-const-items/parameter-defaults.stderr
index 62da45e55..598622869 100644
--- a/tests/ui/generic-const-items/parameter-defaults.stderr
+++ b/tests/ui/generic-const-items/parameter-defaults.stderr
@@ -4,5 +4,5 @@ error: defaults for type parameters are only allowed in `struct`, `enum`, `type`
LL | const NONE<T = ()>: Option<T> = None::<T>;
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generic-const-items/reference-outlives-referent.stderr b/tests/ui/generic-const-items/reference-outlives-referent.stderr
index 2b57713b5..34553c516 100644
--- a/tests/ui/generic-const-items/reference-outlives-referent.stderr
+++ b/tests/ui/generic-const-items/reference-outlives-referent.stderr
@@ -15,6 +15,6 @@ note: but the referenced data is only valid for the lifetime `'b` as defined her
LL | const Q<'a, 'b>: &'a &'b () = &&();
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0491`.
diff --git a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr
index c3ef94529..942e5dbd8 100644
--- a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr
+++ b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr
@@ -13,6 +13,6 @@ LL | where
LL | String: Copy;
| ^^^^ required by this bound in `UNUSABLE`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.stderr b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.stderr
index a68400798..b8438a058 100644
--- a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.stderr
+++ b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.stderr
@@ -6,6 +6,6 @@ LL | | where
LL | | String: Copy;
| |_________________^ entering unreachable code
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/generic-const-items/unsatisfied-evaluatable-bounds.stderr b/tests/ui/generic-const-items/unsatisfied-evaluatable-bounds.stderr
index bed213b0c..f522190e8 100644
--- a/tests/ui/generic-const-items/unsatisfied-evaluatable-bounds.stderr
+++ b/tests/ui/generic-const-items/unsatisfied-evaluatable-bounds.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of `POSITIVE::<0>::{constant#0}` failed
LL | [(); N - 1]:;
| ^^^^^ attempt to compute `0_usize - 1_usize`, which would overflow
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/generics/generic-extern.stderr b/tests/ui/generics/generic-extern.stderr
index c90215b61..4d9f6fede 100644
--- a/tests/ui/generics/generic-extern.stderr
+++ b/tests/ui/generics/generic-extern.stderr
@@ -6,6 +6,6 @@ LL | fn foo<T>();
|
= help: replace the type parameters with concrete types like `u32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0044`.
diff --git a/tests/ui/generics/generic-function-item-where-type.stderr b/tests/ui/generics/generic-function-item-where-type.stderr
index 88594129c..00e62843c 100644
--- a/tests/ui/generics/generic-function-item-where-type.stderr
+++ b/tests/ui/generics/generic-function-item-where-type.stderr
@@ -7,6 +7,6 @@ LL | foo::<main>()
= help: `main` is a function item, not a type
= help: function item types cannot be named directly
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0747`.
diff --git a/tests/ui/generics/generic-impl-less-params-with-defaults.stderr b/tests/ui/generics/generic-impl-less-params-with-defaults.stderr
index 262561fa8..11227328e 100644
--- a/tests/ui/generics/generic-impl-less-params-with-defaults.stderr
+++ b/tests/ui/generics/generic-impl-less-params-with-defaults.stderr
@@ -16,6 +16,6 @@ help: add missing generic argument
LL | Foo::<isize, B>::new();
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/generics/generic-impl-more-params-with-defaults.stderr b/tests/ui/generics/generic-impl-more-params-with-defaults.stderr
index 2f4682c4e..c5812abfd 100644
--- a/tests/ui/generics/generic-impl-more-params-with-defaults.stderr
+++ b/tests/ui/generics/generic-impl-more-params-with-defaults.stderr
@@ -12,6 +12,6 @@ note: struct defined here, with at most 2 generic parameters: `T`, `A`
LL | struct Vec<T, A = Heap>(
| ^^^ - --------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/generics/generic-lifetime-trait-impl.stderr b/tests/ui/generics/generic-lifetime-trait-impl.stderr
index 4ae5098a1..6974c8ad0 100644
--- a/tests/ui/generics/generic-lifetime-trait-impl.stderr
+++ b/tests/ui/generics/generic-lifetime-trait-impl.stderr
@@ -7,6 +7,6 @@ LL | fn bar<'b, T: Bar<'b>>(self) -> &'b str;
LL | fn bar<T: Bar<'a>>(self) -> &'a str { panic!() }
| ^^^^^^^^^^^^ lifetimes do not match method in trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0195`.
diff --git a/tests/ui/generics/generic-type-less-params-with-defaults.stderr b/tests/ui/generics/generic-type-less-params-with-defaults.stderr
index 6450bbd8b..6f79b09f6 100644
--- a/tests/ui/generics/generic-type-less-params-with-defaults.stderr
+++ b/tests/ui/generics/generic-type-less-params-with-defaults.stderr
@@ -14,6 +14,6 @@ help: add missing generic argument
LL | let _: Vec<T>;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/generics/generic-type-more-params-with-defaults.stderr b/tests/ui/generics/generic-type-more-params-with-defaults.stderr
index 4d01ba1f4..c44f6b7dd 100644
--- a/tests/ui/generics/generic-type-more-params-with-defaults.stderr
+++ b/tests/ui/generics/generic-type-more-params-with-defaults.stderr
@@ -12,6 +12,6 @@ note: struct defined here, with at most 2 generic parameters: `T`, `A`
LL | struct Vec<T, A = Heap>(
| ^^^ - --------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/generics/generic-type-params-forward-mention.stderr b/tests/ui/generics/generic-type-params-forward-mention.stderr
index fa661c274..d7a6faa19 100644
--- a/tests/ui/generics/generic-type-params-forward-mention.stderr
+++ b/tests/ui/generics/generic-type-params-forward-mention.stderr
@@ -4,6 +4,6 @@ error[E0128]: generic parameters with a default cannot use forward declared iden
LL | struct Foo<T = Option<U>, U = bool>(T, U);
| ^ defaulted generic parameters cannot be forward declared
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0128`.
diff --git a/tests/ui/generics/issue-59508-1.stderr b/tests/ui/generics/issue-59508-1.stderr
index 1c510044f..7d4fdb2d8 100644
--- a/tests/ui/generics/issue-59508-1.stderr
+++ b/tests/ui/generics/issue-59508-1.stderr
@@ -4,5 +4,5 @@ error: lifetime parameters must be declared prior to type and const parameters
LL | pub fn do_things<T, 'a, 'b: 'a>() {
| ----^^--^^----- help: reorder the parameters: lifetimes, then consts and types: `<'a, 'b: 'a, T>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generics/issue-59508.stderr b/tests/ui/generics/issue-59508.stderr
index fd23b6276..aeaf0187e 100644
--- a/tests/ui/generics/issue-59508.stderr
+++ b/tests/ui/generics/issue-59508.stderr
@@ -4,5 +4,5 @@ error: lifetime parameters must be declared prior to type and const parameters
LL | pub fn do_things<T, 'a, 'b: 'a>() {
| ----^^--^^----- help: reorder the parameters: lifetimes, then consts and types: `<'a, 'b: 'a, T>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr b/tests/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr
index 679118223..3f4f50562 100644
--- a/tests/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr
+++ b/tests/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `Tsized`
LL | trait Tsized<P: Sized = [Self]> {}
| ^^^^^^^^^^^^^^^^^ required by this bound in `Tsized`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/generics/issue-79605.stderr b/tests/ui/generics/issue-79605.stderr
index c5584962d..67fed200f 100644
--- a/tests/ui/generics/issue-79605.stderr
+++ b/tests/ui/generics/issue-79605.stderr
@@ -9,6 +9,6 @@ help: use type parameters instead
LL | impl<T> X<'_, T> {}
| +++ ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/ui/generics/issue-80512-param-reordering-with-defaults.stderr b/tests/ui/generics/issue-80512-param-reordering-with-defaults.stderr
index 70793a9c9..d7e12f07e 100644
--- a/tests/ui/generics/issue-80512-param-reordering-with-defaults.stderr
+++ b/tests/ui/generics/issue-80512-param-reordering-with-defaults.stderr
@@ -4,5 +4,5 @@ error: lifetime parameters must be declared prior to type and const parameters
LL | struct S<T = (), 'a>(&'a T);
| ---------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, T = ()>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generics/issue-83556.stderr b/tests/ui/generics/issue-83556.stderr
index 93affaffe..0c5a65f0c 100644
--- a/tests/ui/generics/issue-83556.stderr
+++ b/tests/ui/generics/issue-83556.stderr
@@ -4,5 +4,5 @@ error: lifetime parameters must be declared prior to type and const parameters
LL | struct Foo<T, 'a>(&'a ());
| ----^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, T>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generics/issue-95208-ignore-qself.stderr b/tests/ui/generics/issue-95208-ignore-qself.stderr
index acbc1300d..cf40e857d 100644
--- a/tests/ui/generics/issue-95208-ignore-qself.stderr
+++ b/tests/ui/generics/issue-95208-ignore-qself.stderr
@@ -6,5 +6,5 @@ LL | impl<T: Iterator> Struct<T> where <T as std:: iter::Iterator>::Item:: std::
| |
| help: use single colon: `:`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generics/issue-95208.stderr b/tests/ui/generics/issue-95208.stderr
index 559527663..0d856d096 100644
--- a/tests/ui/generics/issue-95208.stderr
+++ b/tests/ui/generics/issue-95208.stderr
@@ -6,5 +6,5 @@ LL | impl<T> Struct<T> where T:: std::fmt::Display {
| |
| help: use single colon: `:`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generics/issue-98432.stderr b/tests/ui/generics/issue-98432.stderr
index 0736d9410..2b09d4396 100644
--- a/tests/ui/generics/issue-98432.stderr
+++ b/tests/ui/generics/issue-98432.stderr
@@ -9,6 +9,6 @@ LL | struct _Obligation where T:;
| |
| help: try introducing a local generic parameter here: `<T>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0401`.
diff --git a/tests/ui/generics/param-in-ct-in-ty-param-default.stderr b/tests/ui/generics/param-in-ct-in-ty-param-default.stderr
index ab09ebcae..03dbb3eb9 100644
--- a/tests/ui/generics/param-in-ct-in-ty-param-default.stderr
+++ b/tests/ui/generics/param-in-ct-in-ty-param-default.stderr
@@ -5,7 +5,7 @@ LL | struct Foo<T, U = [u8; std::mem::size_of::<T>()]>(T, U);
| ^ cannot perform const operation using `T`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generics/single-colon-path-not-const-generics.stderr b/tests/ui/generics/single-colon-path-not-const-generics.stderr
index 96f07e190..d61562bb1 100644
--- a/tests/ui/generics/single-colon-path-not-const-generics.stderr
+++ b/tests/ui/generics/single-colon-path-not-const-generics.stderr
@@ -8,5 +8,5 @@ LL | a: Vec<foo::bar:A>,
|
= note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generics/slightly-nice-generic-literal-messages.stderr b/tests/ui/generics/slightly-nice-generic-literal-messages.stderr
index 83ef522ab..9811d30cf 100644
--- a/tests/ui/generics/slightly-nice-generic-literal-messages.stderr
+++ b/tests/ui/generics/slightly-nice-generic-literal-messages.stderr
@@ -9,6 +9,6 @@ LL | 1 => {}
= note: expected struct `Foo<{float}, _>`
found type `{integer}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/generics/unclosed-generics-in-impl-def.rs b/tests/ui/generics/unclosed-generics-in-impl-def.rs
new file mode 100644
index 000000000..2ec99b16e
--- /dev/null
+++ b/tests/ui/generics/unclosed-generics-in-impl-def.rs
@@ -0,0 +1,2 @@
+impl<S: Into<std::borrow::Cow<'static, str>> From<S> for Canonical {} //~ ERROR expected
+fn main() {}
diff --git a/tests/ui/generics/unclosed-generics-in-impl-def.stderr b/tests/ui/generics/unclosed-generics-in-impl-def.stderr
new file mode 100644
index 000000000..aa1977ad8
--- /dev/null
+++ b/tests/ui/generics/unclosed-generics-in-impl-def.stderr
@@ -0,0 +1,13 @@
+error: expected one of `+`, `,`, `::`, `=`, or `>`, found `From`
+ --> $DIR/unclosed-generics-in-impl-def.rs:1:46
+ |
+LL | impl<S: Into<std::borrow::Cow<'static, str>> From<S> for Canonical {}
+ | ^^^^ expected one of `+`, `,`, `::`, `=`, or `>`
+ |
+help: you might have meant to end the type parameters here
+ |
+LL | impl<S: Into<std::borrow::Cow<'static, str>>> From<S> for Canonical {}
+ | +
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision.stderr b/tests/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision.stderr
index 6ce56ba4b..357d3a4a1 100644
--- a/tests/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision.stderr
+++ b/tests/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision.stderr
@@ -9,6 +9,6 @@ LL | [_, 99.., _] => {},
= note: expected struct `std::ops::Range<{integer}>`
found type `{integer}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/half-open-range-patterns/feature-gate-half-open-range-patterns-in-slices.stderr b/tests/ui/half-open-range-patterns/feature-gate-half-open-range-patterns-in-slices.stderr
index ee5b0e11c..b44a69525 100644
--- a/tests/ui/half-open-range-patterns/feature-gate-half-open-range-patterns-in-slices.stderr
+++ b/tests/ui/half-open-range-patterns/feature-gate-half-open-range-patterns-in-slices.stderr
@@ -7,6 +7,6 @@ LL | let [a @ 3.., b @ ..3, c @ 4..6, ..] = xs;
= note: see issue #67264 <https://github.com/rust-lang/rust/issues/67264> for more information
= help: add `#![feature(half_open_range_patterns_in_slices)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/half-open-range-patterns/half-open-range-pats-inclusive-match-arrow.stderr b/tests/ui/half-open-range-patterns/half-open-range-pats-inclusive-match-arrow.stderr
index cb7f998df..8dfc46069 100644
--- a/tests/ui/half-open-range-patterns/half-open-range-pats-inclusive-match-arrow.stderr
+++ b/tests/ui/half-open-range-patterns/half-open-range-pats-inclusive-match-arrow.stderr
@@ -11,5 +11,5 @@ help: add a space between the pattern and `=>`
LL | 74.. => {},
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/half-open-range-patterns/pat-tuple-5.stderr b/tests/ui/half-open-range-patterns/pat-tuple-5.stderr
index 43e7f03b8..a7dd41397 100644
--- a/tests/ui/half-open-range-patterns/pat-tuple-5.stderr
+++ b/tests/ui/half-open-range-patterns/pat-tuple-5.stderr
@@ -9,6 +9,6 @@ LL | (PAT ..) => {}
= note: expected tuple `({integer}, {integer})`
found type `u8`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/half-open-range-patterns/range_pat_interactions1.rs b/tests/ui/half-open-range-patterns/range_pat_interactions1.rs
index 55353999b..9ffc2190d 100644
--- a/tests/ui/half-open-range-patterns/range_pat_interactions1.rs
+++ b/tests/ui/half-open-range-patterns/range_pat_interactions1.rs
@@ -17,7 +17,7 @@ fn main() {
}
match x as i32 {
0..5+1 => errors_only.push(x),
- //~^ error: expected one of `=>`, `if`, or `|`, found `+`
+ //~^ error: expected one of `,`, `=>`, `if`, `|`, or `}`, found `+`
1 | -3..0 => first_or.push(x),
y @ (0..5 | 6) => or_two.push(y),
y @ 0..const { 5 + 1 } => assert_eq!(y, 5),
diff --git a/tests/ui/half-open-range-patterns/range_pat_interactions1.stderr b/tests/ui/half-open-range-patterns/range_pat_interactions1.stderr
index 19ebcaf0f..05235c9b9 100644
--- a/tests/ui/half-open-range-patterns/range_pat_interactions1.stderr
+++ b/tests/ui/half-open-range-patterns/range_pat_interactions1.stderr
@@ -1,8 +1,8 @@
-error: expected one of `=>`, `if`, or `|`, found `+`
+error: expected one of `,`, `=>`, `if`, `|`, or `}`, found `+`
--> $DIR/range_pat_interactions1.rs:19:17
|
LL | 0..5+1 => errors_only.push(x),
- | ^ expected one of `=>`, `if`, or `|`
+ | ^ expected one of `,`, `=>`, `if`, `|`, or `}`
error[E0408]: variable `n` is not bound in all patterns
--> $DIR/range_pat_interactions1.rs:10:25
diff --git a/tests/ui/half-open-range-patterns/range_pat_interactions2.rs b/tests/ui/half-open-range-patterns/range_pat_interactions2.rs
index 4615ebd68..b212bfbe0 100644
--- a/tests/ui/half-open-range-patterns/range_pat_interactions2.rs
+++ b/tests/ui/half-open-range-patterns/range_pat_interactions2.rs
@@ -9,7 +9,7 @@ fn main() {
match x as i32 {
0..=(5+1) => errors_only.push(x),
//~^ error: inclusive range with no end
- //~| error: expected one of `=>`, `if`, or `|`, found `(`
+ //~| error: expected one of `,`, `=>`, `if`, `|`, or `}`, found `(`
1 | -3..0 => first_or.push(x),
y @ (0..5 | 6) => or_two.push(y),
y @ 0..const { 5 + 1 } => assert_eq!(y, 5),
diff --git a/tests/ui/half-open-range-patterns/range_pat_interactions2.stderr b/tests/ui/half-open-range-patterns/range_pat_interactions2.stderr
index 13a5542a4..0129f927e 100644
--- a/tests/ui/half-open-range-patterns/range_pat_interactions2.stderr
+++ b/tests/ui/half-open-range-patterns/range_pat_interactions2.stderr
@@ -6,11 +6,11 @@ LL | 0..=(5+1) => errors_only.push(x),
|
= note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
-error: expected one of `=>`, `if`, or `|`, found `(`
+error: expected one of `,`, `=>`, `if`, `|`, or `}`, found `(`
--> $DIR/range_pat_interactions2.rs:10:17
|
LL | 0..=(5+1) => errors_only.push(x),
- | ^ expected one of `=>`, `if`, or `|`
+ | ^ expected one of `,`, `=>`, `if`, `|`, or `}`
error: aborting due to 2 previous errors
diff --git a/tests/ui/half-open-range-patterns/slice_pattern_syntax_problem0.stderr b/tests/ui/half-open-range-patterns/slice_pattern_syntax_problem0.stderr
index ec3472a50..eca5c3301 100644
--- a/tests/ui/half-open-range-patterns/slice_pattern_syntax_problem0.stderr
+++ b/tests/ui/half-open-range-patterns/slice_pattern_syntax_problem0.stderr
@@ -4,6 +4,6 @@ error[E0527]: pattern requires 2 elements but array has 8
LL | let [first_three @ ..3, rest @ 2..] = xs;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 8 elements
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0527`.
diff --git a/tests/ui/hashmap/hashmap-index-mut.stderr b/tests/ui/hashmap/hashmap-index-mut.stderr
index c1948ab62..2381b8ecb 100644
--- a/tests/ui/hashmap/hashmap-index-mut.stderr
+++ b/tests/ui/hashmap/hashmap-index-mut.stderr
@@ -14,6 +14,6 @@ LL | map.get_mut(&0).map(|val| { *val = 1; });
LL | let val = map.entry(&0).or_insert(1);
| +++++++++ ~~~~~~~ ~~~~~~~~~~~~ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/hashmap/hashmap-iter-value-lifetime.stderr b/tests/ui/hashmap/hashmap-iter-value-lifetime.stderr
index de2591329..5cf188702 100644
--- a/tests/ui/hashmap/hashmap-iter-value-lifetime.stderr
+++ b/tests/ui/hashmap/hashmap-iter-value-lifetime.stderr
@@ -10,6 +10,6 @@ LL |
LL | println!("{}", *thing);
| ------ immutable borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/hashmap/hashmap-lifetimes.stderr b/tests/ui/hashmap/hashmap-lifetimes.stderr
index 497c7d121..a52f956d0 100644
--- a/tests/ui/hashmap/hashmap-lifetimes.stderr
+++ b/tests/ui/hashmap/hashmap-lifetimes.stderr
@@ -8,6 +8,6 @@ LL | my_stuff.insert(1, 43);
LL | it;
| -- immutable borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/higher-ranked/higher-ranked-lifetime-error.rs b/tests/ui/higher-ranked/higher-ranked-lifetime-error.rs
new file mode 100644
index 000000000..aee5db836
--- /dev/null
+++ b/tests/ui/higher-ranked/higher-ranked-lifetime-error.rs
@@ -0,0 +1,14 @@
+fn assert_all<F, T>(_f: F)
+where
+ F: FnMut(&String) -> T,
+{
+}
+
+fn id(x: &String) -> &String {
+ x
+}
+
+fn main() {
+ assert_all::<_, &String>(id);
+ //~^ mismatched types
+}
diff --git a/tests/ui/higher-ranked/higher-ranked-lifetime-error.stderr b/tests/ui/higher-ranked/higher-ranked-lifetime-error.stderr
new file mode 100644
index 000000000..d0892fd8b
--- /dev/null
+++ b/tests/ui/higher-ranked/higher-ranked-lifetime-error.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+ --> $DIR/higher-ranked-lifetime-error.rs:12:5
+ |
+LL | assert_all::<_, &String>(id);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
+ |
+ = note: expected reference `&String`
+ found reference `&String`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/higher-ranked/leak-check-in-selection.rs b/tests/ui/higher-ranked/leak-check-in-selection.rs
index e8d6cff85..5b36902ff 100644
--- a/tests/ui/higher-ranked/leak-check-in-selection.rs
+++ b/tests/ui/higher-ranked/leak-check-in-selection.rs
@@ -1,6 +1,6 @@
// run-pass
// revisions: old next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
#![allow(coherence_leak_check)]
trait Trait: Sized {
diff --git a/tests/ui/higher-ranked/subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr b/tests/ui/higher-ranked/subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr
index b7264c7e9..d7f0860a0 100644
--- a/tests/ui/higher-ranked/subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr
+++ b/tests/ui/higher-ranked/subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr
@@ -8,10 +8,10 @@ LL | / check! { bound_a_b_ret_a_vs_bound_a_ret_a: (for<'a,'b> fn(&'a u32, &'b u3
LL | | for<'a> fn(&'a u32, &'a u32) -> &'a u32) }
| |_____________________________________________- in this macro invocation
|
- = note: expected enum `Option<for<'a, 'b> fn(&'a u32, &'b u32) -> &'a u32>`
- found enum `Option<for<'a> fn(&'a u32, &'a u32) -> &'a u32>`
+ = note: expected enum `Option<for<'a, 'b> fn(&'a _, &'b _) -> &'a _>`
+ found enum `Option<for<'a> fn(&'a _, &'a _) -> &'a _>`
= note: this error originates in the macro `check` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/higher-ranked/subtype/hr-subtype.bound_a_vs_free_x.stderr b/tests/ui/higher-ranked/subtype/hr-subtype.bound_a_vs_free_x.stderr
index 2355979b0..9b5ca3b20 100644
--- a/tests/ui/higher-ranked/subtype/hr-subtype.bound_a_vs_free_x.stderr
+++ b/tests/ui/higher-ranked/subtype/hr-subtype.bound_a_vs_free_x.stderr
@@ -8,10 +8,10 @@ LL | / check! { bound_a_vs_free_x: (for<'a> fn(&'a u32),
LL | | fn(&'x u32)) }
| |______________- in this macro invocation
|
- = note: expected enum `Option<for<'a> fn(&'a u32)>`
- found enum `Option<fn(&u32)>`
+ = note: expected enum `Option<for<'a> fn(&'a _)>`
+ found enum `Option<fn(&_)>`
= note: this error originates in the macro `check` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/higher-ranked/subtype/hr-subtype.free_x_vs_free_y.stderr b/tests/ui/higher-ranked/subtype/hr-subtype.free_x_vs_free_y.stderr
index 269cde54c..a8e00125f 100644
--- a/tests/ui/higher-ranked/subtype/hr-subtype.free_x_vs_free_y.stderr
+++ b/tests/ui/higher-ranked/subtype/hr-subtype.free_x_vs_free_y.stderr
@@ -15,5 +15,5 @@ LL | | fn(&'y u32)) }
= help: consider adding the following bound: `'x: 'y`
= note: this error originates in the macro `check` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/higher-ranked/subtype/placeholder-pattern-fail.stderr b/tests/ui/higher-ranked/subtype/placeholder-pattern-fail.stderr
index 5241b475d..c6d6f5083 100644
--- a/tests/ui/higher-ranked/subtype/placeholder-pattern-fail.stderr
+++ b/tests/ui/higher-ranked/subtype/placeholder-pattern-fail.stderr
@@ -9,6 +9,6 @@ LL | let _: for<'a, 'b> fn(Inv<'a>, Inv<'b>) = sub;
= note: expected fn pointer `for<'a, 'b> fn(Inv<'a>, Inv<'b>)`
found fn pointer `for<'a> fn(Inv<'a>, Inv<'a>)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/higher-ranked/trait-bounds/due-to-where-clause.stderr b/tests/ui/higher-ranked/trait-bounds/due-to-where-clause.stderr
index 520938a63..916854e07 100644
--- a/tests/ui/higher-ranked/trait-bounds/due-to-where-clause.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/due-to-where-clause.stderr
@@ -7,5 +7,5 @@ LL | test::<FooS>(&mut 42);
= note: `FooS<'_>` must implement `Foo<'0>`, for any lifetime `'0`...
= note: ...but `FooS<'_>` actually implements `Foo<'1>`, for some specific lifetime `'1`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/higher-ranked/trait-bounds/fn-ptr.classic.stderr b/tests/ui/higher-ranked/trait-bounds/fn-ptr.classic.stderr
index 8ab88c580..77aa37cef 100644
--- a/tests/ui/higher-ranked/trait-bounds/fn-ptr.classic.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/fn-ptr.classic.stderr
@@ -14,6 +14,6 @@ LL | where
LL | for<'w> fn(&'w ()): Fn(&'w ()),
| ^^^^^^^^^^ required by this bound in `ice`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/higher-ranked/trait-bounds/fn-ptr.rs b/tests/ui/higher-ranked/trait-bounds/fn-ptr.rs
index adb19c035..41f24dde0 100644
--- a/tests/ui/higher-ranked/trait-bounds/fn-ptr.rs
+++ b/tests/ui/higher-ranked/trait-bounds/fn-ptr.rs
@@ -1,5 +1,5 @@
// revisions: classic next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
//[next] check-pass
fn ice()
diff --git a/tests/ui/higher-ranked/trait-bounds/future.rs b/tests/ui/higher-ranked/trait-bounds/future.rs
index 61d86a9cb..baeb56e5d 100644
--- a/tests/ui/higher-ranked/trait-bounds/future.rs
+++ b/tests/ui/higher-ranked/trait-bounds/future.rs
@@ -1,7 +1,7 @@
// ignore-tidy-linelength
// edition:2021
// revisions: classic next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
//[next] check-pass
//[classic] known-bug: #112347
//[classic] build-fail
diff --git a/tests/ui/higher-ranked/trait-bounds/hang-on-deeply-nested-dyn.stderr b/tests/ui/higher-ranked/trait-bounds/hang-on-deeply-nested-dyn.stderr
index 139c844d8..67417a5e5 100644
--- a/tests/ui/higher-ranked/trait-bounds/hang-on-deeply-nested-dyn.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/hang-on-deeply-nested-dyn.stderr
@@ -16,6 +16,6 @@ LL | f
= note: expected reference `&dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn Fn(u32) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a))`
found reference `&dyn Fn(u32)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-cache-issue-54302.stderr b/tests/ui/higher-ranked/trait-bounds/hrtb-cache-issue-54302.stderr
index f014eab86..7f81ee331 100644
--- a/tests/ui/higher-ranked/trait-bounds/hrtb-cache-issue-54302.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/hrtb-cache-issue-54302.stderr
@@ -7,5 +7,5 @@ LL | assert_deserialize_owned::<&'static str>();
= note: `&'static str` must implement `Deserialize<'0>`, for any lifetime `'0`...
= note: ...but `&str` actually implements `Deserialize<'1>`, for some specific lifetime `'1`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-debruijn-in-receiver.stderr b/tests/ui/higher-ranked/trait-bounds/hrtb-debruijn-in-receiver.stderr
index 70d5b3c2e..10904515f 100644
--- a/tests/ui/higher-ranked/trait-bounds/hrtb-debruijn-in-receiver.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/hrtb-debruijn-in-receiver.stderr
@@ -9,6 +9,6 @@ LL | foo.insert();
| second mutable borrow occurs here
| first borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-exists-forall-fn.stderr b/tests/ui/higher-ranked/trait-bounds/hrtb-exists-forall-fn.stderr
index db5fc4bf1..2d6b8063f 100644
--- a/tests/ui/higher-ranked/trait-bounds/hrtb-exists-forall-fn.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/hrtb-exists-forall-fn.stderr
@@ -6,9 +6,9 @@ LL | let _: for<'b> fn(&'b u32) = foo();
| |
| expected due to this
|
- = note: expected fn pointer `for<'b> fn(&'b u32)`
- found fn pointer `fn(&u32)`
+ = note: expected fn pointer `for<'b> fn(&'b _)`
+ found fn pointer `fn(&_)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-exists-forall-trait-contravariant.stderr b/tests/ui/higher-ranked/trait-bounds/hrtb-exists-forall-trait-contravariant.stderr
index 364b613fc..9697a270b 100644
--- a/tests/ui/higher-ranked/trait-bounds/hrtb-exists-forall-trait-contravariant.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/hrtb-exists-forall-trait-contravariant.stderr
@@ -7,5 +7,5 @@ LL | foo::<()>();
= note: `()` must implement `Trait<for<'b> fn(&'b u32)>`
= note: ...but it actually implements `Trait<fn(&'0 u32)>`, for some specific lifetime `'0`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-exists-forall-trait-invariant.stderr b/tests/ui/higher-ranked/trait-bounds/hrtb-exists-forall-trait-invariant.stderr
index cb2ce8a41..cf64c2acd 100644
--- a/tests/ui/higher-ranked/trait-bounds/hrtb-exists-forall-trait-invariant.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/hrtb-exists-forall-trait-invariant.stderr
@@ -7,5 +7,5 @@ LL | foo::<()>();
= note: `()` must implement `Trait<for<'b> fn(Cell<&'b u32>)>`
= note: ...but it actually implements `Trait<fn(Cell<&'0 u32>)>`, for some specific lifetime `'0`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits-transitive.stderr b/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits-transitive.stderr
index b1b8ffa8c..e10da2666 100644
--- a/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits-transitive.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits-transitive.stderr
@@ -18,6 +18,6 @@ help: consider further restricting this bound
LL | where B : Qux + for<'ccx> Bar<'ccx>
| +++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-identity-fn-borrows.stderr b/tests/ui/higher-ranked/trait-bounds/hrtb-identity-fn-borrows.stderr
index 25af011e3..b1081c073 100644
--- a/tests/ui/higher-ranked/trait-bounds/hrtb-identity-fn-borrows.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/hrtb-identity-fn-borrows.stderr
@@ -9,6 +9,6 @@ LL | x = 5;
LL | drop(y);
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-perfect-forwarding.polonius.stderr b/tests/ui/higher-ranked/trait-bounds/hrtb-perfect-forwarding.polonius.stderr
index a94c80eb3..795484f11 100644
--- a/tests/ui/higher-ranked/trait-bounds/hrtb-perfect-forwarding.polonius.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/hrtb-perfect-forwarding.polonius.stderr
@@ -67,5 +67,5 @@ LL | | }
|
= help: a `loop` may express intention better if this is on purpose
-error: aborting due to previous error; 4 warnings emitted
+error: aborting due to 1 previous error; 4 warnings emitted
diff --git a/tests/ui/higher-ranked/trait-bounds/issue-46989.stderr b/tests/ui/higher-ranked/trait-bounds/issue-46989.stderr
index 3f874220a..c50e79dd4 100644
--- a/tests/ui/higher-ranked/trait-bounds/issue-46989.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/issue-46989.stderr
@@ -7,5 +7,5 @@ LL | assert_foo::<fn(&i32)>();
= note: `Foo` would have to be implemented for the type `for<'a> fn(&'a i32)`
= note: ...but `Foo` is actually implemented for the type `fn(&'0 i32)`, for some specific lifetime `'0`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/higher-ranked/trait-bounds/issue-58451.stderr b/tests/ui/higher-ranked/trait-bounds/issue-58451.stderr
index 0f051be21..99d088799 100644
--- a/tests/ui/higher-ranked/trait-bounds/issue-58451.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/issue-58451.stderr
@@ -14,6 +14,6 @@ help: provide the argument
LL | f(&[f(/* i */)]);
| ~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0061`.
diff --git a/tests/ui/higher-ranked/trait-bounds/issue-95230.next.stderr b/tests/ui/higher-ranked/trait-bounds/issue-95230.next.stderr
index d4bc5b672..6155579c9 100644
--- a/tests/ui/higher-ranked/trait-bounds/issue-95230.next.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/issue-95230.next.stderr
@@ -14,6 +14,6 @@ LL | where
LL | for<'a> &'a mut Self:;
| ^^^^^^^^^^^^ required by this bound in `Bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/higher-ranked/trait-bounds/issue-95230.rs b/tests/ui/higher-ranked/trait-bounds/issue-95230.rs
index 49a1584d5..027644a28 100644
--- a/tests/ui/higher-ranked/trait-bounds/issue-95230.rs
+++ b/tests/ui/higher-ranked/trait-bounds/issue-95230.rs
@@ -1,5 +1,5 @@
// revisions: old next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
//[old] check-pass
//[next] known-bug: #109764
diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-3.stderr b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-3.stderr
index 7b0743cc7..64707642e 100644
--- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-3.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-3.stderr
@@ -22,6 +22,6 @@ note: required by a bound in `call`
LL | fn call<'b, T: for<'a> ATC<'a>, F: for<'a> Fn(<T as ATC<'a>>::Type)>(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `call`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-71955.stderr b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-71955.stderr
index 4ef96cd95..1cf364aa9 100644
--- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-71955.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-71955.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
LL | foo(bar, "string", |s| s.len() == 5);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
|
- = note: expected trait `for<'a, 'b> FnOnce<(&'a &'b str,)>`
- found trait `for<'a> FnOnce<(&'a &str,)>`
+ = note: expected trait `for<'a, 'b> FnOnce(&'a &'b str)`
+ found trait `for<'a> FnOnce(&'a &str)`
note: this closure does not fulfill the lifetime requirements
--> $DIR/issue-71955.rs:45:24
|
@@ -23,8 +23,8 @@ error[E0308]: mismatched types
LL | foo(bar, "string", |s| s.len() == 5);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
|
- = note: expected trait `for<'a, 'b> FnOnce<(&'a &'b str,)>`
- found trait `for<'a> FnOnce<(&'a &str,)>`
+ = note: expected trait `for<'a, 'b> FnOnce(&'a &'b str)`
+ found trait `for<'a> FnOnce(&'a &str)`
note: this closure does not fulfill the lifetime requirements
--> $DIR/issue-71955.rs:45:24
|
@@ -42,8 +42,8 @@ error[E0308]: mismatched types
LL | foo(baz, "string", |s| s.0.len() == 5);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
|
- = note: expected trait `for<'a, 'b> FnOnce<(&'a Wrapper<'b>,)>`
- found trait `for<'a> FnOnce<(&'a Wrapper<'_>,)>`
+ = note: expected trait `for<'a, 'b> FnOnce(&'a Wrapper<'b>)`
+ found trait `for<'a> FnOnce(&'a Wrapper<'_>)`
note: this closure does not fulfill the lifetime requirements
--> $DIR/issue-71955.rs:48:24
|
@@ -61,8 +61,8 @@ error[E0308]: mismatched types
LL | foo(baz, "string", |s| s.0.len() == 5);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
|
- = note: expected trait `for<'a, 'b> FnOnce<(&'a Wrapper<'b>,)>`
- found trait `for<'a> FnOnce<(&'a Wrapper<'_>,)>`
+ = note: expected trait `for<'a, 'b> FnOnce(&'a Wrapper<'b>)`
+ found trait `for<'a> FnOnce(&'a Wrapper<'_>)`
note: this closure does not fulfill the lifetime requirements
--> $DIR/issue-71955.rs:48:24
|
diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90950.stderr b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90950.stderr
index 55eaef786..075e422e2 100644
--- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90950.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90950.stderr
@@ -24,6 +24,6 @@ LL | Y: for<'a> Yokeable<'a>,
LL | for<'a> <Y as Yokeable<'a>>::Output: IsCovariant<'a>
| ^^^^^^^^^^^^^^^ required by this bound in `upcast`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution.stderr b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution.stderr
index 081dbb67d..a2ec96f1a 100644
--- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution.stderr
@@ -18,6 +18,6 @@ LL | fn weird_bound<X>() -> X
LL | for<'a> <X as Trait<'a>>::Out: Copy
| ^^^^ required by this bound in `weird_bound`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/hygiene/arguments.stderr b/tests/ui/hygiene/arguments.stderr
index 714178375..0d8d652b6 100644
--- a/tests/ui/hygiene/arguments.stderr
+++ b/tests/ui/hygiene/arguments.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `S` in this scope
LL | m!(S, S);
| ^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/hygiene/cross-crate-define-and-use.rs b/tests/ui/hygiene/cross-crate-define-and-use.rs
index 94f1adff6..62b182023 100644
--- a/tests/ui/hygiene/cross-crate-define-and-use.rs
+++ b/tests/ui/hygiene/cross-crate-define-and-use.rs
@@ -6,7 +6,6 @@
// check-pass
// aux-build:use_by_macro.rs
-#![feature(type_name_of_val)]
extern crate use_by_macro;
use use_by_macro::*;
diff --git a/tests/ui/hygiene/cross-crate-glob-hygiene.stderr b/tests/ui/hygiene/cross-crate-glob-hygiene.stderr
index 7369e77d0..1abc739fc 100644
--- a/tests/ui/hygiene/cross-crate-glob-hygiene.stderr
+++ b/tests/ui/hygiene/cross-crate-glob-hygiene.stderr
@@ -6,6 +6,6 @@ LL | let x = my_struct!(create);
|
= note: this error originates in the macro `my_struct` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0422`.
diff --git a/tests/ui/hygiene/cross-crate-name-hiding-2.stderr b/tests/ui/hygiene/cross-crate-name-hiding-2.stderr
index 46314cdd5..a5d509fab 100644
--- a/tests/ui/hygiene/cross-crate-name-hiding-2.stderr
+++ b/tests/ui/hygiene/cross-crate-name-hiding-2.stderr
@@ -4,6 +4,6 @@ error[E0422]: cannot find struct, variant or union type `MyStruct` in this scope
LL | let x = MyStruct {};
| ^^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0422`.
diff --git a/tests/ui/hygiene/cross-crate-name-hiding.stderr b/tests/ui/hygiene/cross-crate-name-hiding.stderr
index f8840c8f8..4abd14f93 100644
--- a/tests/ui/hygiene/cross-crate-name-hiding.stderr
+++ b/tests/ui/hygiene/cross-crate-name-hiding.stderr
@@ -4,6 +4,6 @@ error[E0422]: cannot find struct, variant or union type `MyStruct` in this scope
LL | let x = MyStruct {};
| ^^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0422`.
diff --git a/tests/ui/hygiene/cross-crate-redefine.stderr b/tests/ui/hygiene/cross-crate-redefine.stderr
index 4f1419de4..c0fd3f4b7 100644
--- a/tests/ui/hygiene/cross-crate-redefine.stderr
+++ b/tests/ui/hygiene/cross-crate-redefine.stderr
@@ -10,6 +10,6 @@ LL | my_struct!(define);
= note: `MyStruct` must be defined only once in the type namespace of this module
= note: this error originates in the macro `my_struct` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0428`.
diff --git a/tests/ui/hygiene/expansion-info-reset.stderr b/tests/ui/hygiene/expansion-info-reset.stderr
index 64d27e064..a3ae5042f 100644
--- a/tests/ui/hygiene/expansion-info-reset.stderr
+++ b/tests/ui/hygiene/expansion-info-reset.stderr
@@ -9,5 +9,5 @@ help: you might be missing a string literal to format with
LL | format_args!("{}", { #[derive(Clone)] struct S; });
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/hygiene/extern-prelude-from-opaque-fail-2018.stderr b/tests/ui/hygiene/extern-prelude-from-opaque-fail-2018.stderr
index 7ed15e89c..78e6376bc 100644
--- a/tests/ui/hygiene/extern-prelude-from-opaque-fail-2018.stderr
+++ b/tests/ui/hygiene/extern-prelude-from-opaque-fail-2018.stderr
@@ -25,8 +25,8 @@ LL | a!();
| ---- in this macro invocation
|
= help: consider importing one of these items:
- std::mem
core::mem
+ std::mem
= note: this error originates in the macro `a` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: use of undeclared crate or module `my_core`
diff --git a/tests/ui/hygiene/fields-definition.stderr b/tests/ui/hygiene/fields-definition.stderr
index 9d091cedd..701986ea7 100644
--- a/tests/ui/hygiene/fields-definition.stderr
+++ b/tests/ui/hygiene/fields-definition.stderr
@@ -11,6 +11,6 @@ LL | legacy!(a);
|
= note: this error originates in the macro `legacy` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0124`.
diff --git a/tests/ui/hygiene/fields-numeric-borrowck.stderr b/tests/ui/hygiene/fields-numeric-borrowck.stderr
index fb90825c0..a2dd83d56 100644
--- a/tests/ui/hygiene/fields-numeric-borrowck.stderr
+++ b/tests/ui/hygiene/fields-numeric-borrowck.stderr
@@ -9,6 +9,6 @@ LL | let S { 0: ref mut borrow2 } = s;
LL | borrow1.use_mut();
| ------- first borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/hygiene/for-loop.stderr b/tests/ui/hygiene/for-loop.stderr
index 932c951e7..5f334fd89 100644
--- a/tests/ui/hygiene/for-loop.stderr
+++ b/tests/ui/hygiene/for-loop.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `iter` in this scope
LL | iter.next();
| ^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/hygiene/hygienic-label-1.stderr b/tests/ui/hygiene/hygienic-label-1.stderr
index deb6a2059..5529d8dc8 100644
--- a/tests/ui/hygiene/hygienic-label-1.stderr
+++ b/tests/ui/hygiene/hygienic-label-1.stderr
@@ -9,6 +9,6 @@ LL | 'x: loop { foo!(); }
|
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0426`.
diff --git a/tests/ui/hygiene/hygienic-label-2.stderr b/tests/ui/hygiene/hygienic-label-2.stderr
index f23e741de..77a77c847 100644
--- a/tests/ui/hygiene/hygienic-label-2.stderr
+++ b/tests/ui/hygiene/hygienic-label-2.stderr
@@ -4,6 +4,6 @@ error[E0426]: use of undeclared label `'x`
LL | foo!(break 'x);
| ^^ undeclared label `'x`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0426`.
diff --git a/tests/ui/hygiene/hygienic-label-3.stderr b/tests/ui/hygiene/hygienic-label-3.stderr
index cf7f78a99..495afc69a 100644
--- a/tests/ui/hygiene/hygienic-label-3.stderr
+++ b/tests/ui/hygiene/hygienic-label-3.stderr
@@ -9,6 +9,6 @@ LL | foo!();
|
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0426`.
diff --git a/tests/ui/hygiene/hygienic-label-4.stderr b/tests/ui/hygiene/hygienic-label-4.stderr
index 1c93da02f..b9f447e15 100644
--- a/tests/ui/hygiene/hygienic-label-4.stderr
+++ b/tests/ui/hygiene/hygienic-label-4.stderr
@@ -4,6 +4,6 @@ error[E0426]: use of undeclared label `'x`
LL | foo!(break 'x);
| ^^ undeclared label `'x`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0426`.
diff --git a/tests/ui/hygiene/impl_items-2.stderr b/tests/ui/hygiene/impl_items-2.stderr
index 3c0ffeb10..e7128f83e 100644
--- a/tests/ui/hygiene/impl_items-2.stderr
+++ b/tests/ui/hygiene/impl_items-2.stderr
@@ -10,6 +10,6 @@ LL | fn foo() {}
LL | fn foo() {}
| ^^^^^^^^^^^ duplicate definition
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0201`.
diff --git a/tests/ui/hygiene/impl_items.stderr b/tests/ui/hygiene/impl_items.stderr
index 32ba3741a..35f275040 100644
--- a/tests/ui/hygiene/impl_items.stderr
+++ b/tests/ui/hygiene/impl_items.stderr
@@ -9,5 +9,5 @@ LL | foo::m!();
|
= note: this error originates in the macro `foo::m` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/hygiene/intercrate.stderr b/tests/ui/hygiene/intercrate.stderr
index f108617fb..230ad052d 100644
--- a/tests/ui/hygiene/intercrate.stderr
+++ b/tests/ui/hygiene/intercrate.stderr
@@ -6,5 +6,5 @@ LL | assert_eq!(intercrate::foo::m!(), 1);
|
= note: this error originates in the macro `intercrate::foo::m` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/hygiene/missing-self-diag.stderr b/tests/ui/hygiene/missing-self-diag.stderr
index 690bcd032..6921ed29e 100644
--- a/tests/ui/hygiene/missing-self-diag.stderr
+++ b/tests/ui/hygiene/missing-self-diag.stderr
@@ -12,6 +12,6 @@ LL | | }
|
= note: this error originates in the macro `call_bar` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0424`.
diff --git a/tests/ui/hygiene/nested_macro_privacy.stderr b/tests/ui/hygiene/nested_macro_privacy.stderr
index 1d11cd0f5..44d11cfba 100644
--- a/tests/ui/hygiene/nested_macro_privacy.stderr
+++ b/tests/ui/hygiene/nested_macro_privacy.stderr
@@ -4,6 +4,6 @@ error[E0616]: field `i` of struct `S` is private
LL | S::default().i;
| ^ private field
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0616`.
diff --git a/tests/ui/hygiene/no_implicit_prelude-2018.stderr b/tests/ui/hygiene/no_implicit_prelude-2018.stderr
index b22f3e75b..7b124edf6 100644
--- a/tests/ui/hygiene/no_implicit_prelude-2018.stderr
+++ b/tests/ui/hygiene/no_implicit_prelude-2018.stderr
@@ -9,5 +9,5 @@ help: consider importing this macro
LL + use std::print;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/hygiene/panic-location.run.stderr b/tests/ui/hygiene/panic-location.run.stderr
index e0dc13c0c..5c552411d 100644
--- a/tests/ui/hygiene/panic-location.run.stderr
+++ b/tests/ui/hygiene/panic-location.run.stderr
@@ -1,3 +1,3 @@
-thread 'main' panicked at library/alloc/src/raw_vec.rs:545:5:
+thread 'main' panicked at library/alloc/src/raw_vec.rs:571:5:
capacity overflow
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
diff --git a/tests/ui/hygiene/pattern-macro.stderr b/tests/ui/hygiene/pattern-macro.stderr
index edd05916e..a9764cea4 100644
--- a/tests/ui/hygiene/pattern-macro.stderr
+++ b/tests/ui/hygiene/pattern-macro.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `x` in this scope
LL | x + 1;
| ^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/hygiene/privacy-early.stderr b/tests/ui/hygiene/privacy-early.stderr
index 0375ed56d..1c2f9ff54 100644
--- a/tests/ui/hygiene/privacy-early.stderr
+++ b/tests/ui/hygiene/privacy-early.stderr
@@ -17,6 +17,6 @@ LL | foo::m!();
| --------- in this macro invocation
= note: this error originates in the macro `foo::m` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0364`.
diff --git a/tests/ui/hygiene/privacy.stderr b/tests/ui/hygiene/privacy.stderr
index 70a24304d..c677c8812 100644
--- a/tests/ui/hygiene/privacy.stderr
+++ b/tests/ui/hygiene/privacy.stderr
@@ -10,6 +10,6 @@ note: the function `f` is defined here
LL | fn f() {}
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/hygiene/trait_items.stderr b/tests/ui/hygiene/trait_items.stderr
index f303534c7..016ee8f71 100644
--- a/tests/ui/hygiene/trait_items.stderr
+++ b/tests/ui/hygiene/trait_items.stderr
@@ -17,6 +17,6 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f
LL + use foo::T;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/hygiene/unpretty-debug.stdout b/tests/ui/hygiene/unpretty-debug.stdout
index 51c21043d..3d686f95d 100644
--- a/tests/ui/hygiene/unpretty-debug.stdout
+++ b/tests/ui/hygiene/unpretty-debug.stdout
@@ -8,7 +8,7 @@
#![feature /* 0#0 */(no_core)]
#![no_core /* 0#0 */]
-macro_rules! foo /* 0#0 */ { ($x : ident) => { y + $x } }
+macro_rules! foo /* 0#0 */ { ($x: ident) => { y + $x } }
fn bar /* 0#0 */() {
let x /* 0#0 */ = 1;
diff --git a/tests/ui/illegal-sized-bound/mutability-mismatch-arg.stderr b/tests/ui/illegal-sized-bound/mutability-mismatch-arg.stderr
index 89613bd5c..b5ca62f4e 100644
--- a/tests/ui/illegal-sized-bound/mutability-mismatch-arg.stderr
+++ b/tests/ui/illegal-sized-bound/mutability-mismatch-arg.stderr
@@ -9,5 +9,5 @@ help: you need `&mut dyn Iterator<Item = &u64>` instead of `&dyn Iterator<Item =
LL | fn test(t: &mut dyn Iterator<Item=&u64>) -> u64 {
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/illegal-ufcs-drop.stderr b/tests/ui/illegal-ufcs-drop.stderr
index 7a5c0612c..4f214a127 100644
--- a/tests/ui/illegal-ufcs-drop.stderr
+++ b/tests/ui/illegal-ufcs-drop.stderr
@@ -7,6 +7,6 @@ LL | Drop::drop(&mut Foo)
| explicit destructor calls not allowed
| help: consider using `drop` function: `drop`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0040`.
diff --git a/tests/ui/impl-header-lifetime-elision/dyn-trait.stderr b/tests/ui/impl-header-lifetime-elision/dyn-trait.stderr
index 762698c4f..2ef35a377 100644
--- a/tests/ui/impl-header-lifetime-elision/dyn-trait.stderr
+++ b/tests/ui/impl-header-lifetime-elision/dyn-trait.stderr
@@ -11,6 +11,6 @@ LL | static_val(x);
| `x` escapes the function body here
| argument requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0521`.
diff --git a/tests/ui/impl-header-lifetime-elision/path-elided.stderr b/tests/ui/impl-header-lifetime-elision/path-elided.stderr
index 18e4c618d..4df7ffb29 100644
--- a/tests/ui/impl-header-lifetime-elision/path-elided.stderr
+++ b/tests/ui/impl-header-lifetime-elision/path-elided.stderr
@@ -9,6 +9,6 @@ help: indicate the anonymous lifetime
LL | impl MyTrait for Foo<'_> {
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0726`.
diff --git a/tests/ui/impl-header-lifetime-elision/trait-elided.stderr b/tests/ui/impl-header-lifetime-elision/trait-elided.stderr
index 74631a037..cbc6eee5a 100644
--- a/tests/ui/impl-header-lifetime-elision/trait-elided.stderr
+++ b/tests/ui/impl-header-lifetime-elision/trait-elided.stderr
@@ -9,6 +9,6 @@ help: indicate the anonymous lifetime
LL | impl MyTrait<'_> for u32 {}
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0726`.
diff --git a/tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.stderr b/tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.stderr
index 168a5aa18..825682c52 100644
--- a/tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.stderr
+++ b/tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.stderr
@@ -13,6 +13,6 @@ help: to declare that `impl Sized + 'a` captures `'b`, you can add an explicit `
LL | fn step2<'a, 'b: 'a>() -> impl Sized + 'a + 'b {
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0700`.
diff --git a/tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.stderr b/tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.stderr
index cabba4baf..b87e31acc 100644
--- a/tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.stderr
+++ b/tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.stderr
@@ -13,6 +13,6 @@ help: to declare that `impl Swap + 'a` captures `'b`, you can add an explicit `'
LL | fn hide<'a, 'b: 'a, T: 'static>(x: Rc<RefCell<&'b T>>) -> impl Swap + 'a + 'b {
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0700`.
diff --git a/tests/ui/impl-trait/alias-liveness/tait-hidden-erased-unsoundness.stderr b/tests/ui/impl-trait/alias-liveness/tait-hidden-erased-unsoundness.stderr
index baeec6d58..6c9b8cf24 100644
--- a/tests/ui/impl-trait/alias-liveness/tait-hidden-erased-unsoundness.stderr
+++ b/tests/ui/impl-trait/alias-liveness/tait-hidden-erased-unsoundness.stderr
@@ -8,6 +8,6 @@ LL | pub(super) fn step2<'a, 'b: 'a>() -> Tait<'a> {
LL | super::step1::<'a, 'b>()
| ^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0700`.
diff --git a/tests/ui/impl-trait/arg-position-impl-trait-too-long.stderr b/tests/ui/impl-trait/arg-position-impl-trait-too-long.stderr
index d5086c7bc..158cfc834 100644
--- a/tests/ui/impl-trait/arg-position-impl-trait-too-long.stderr
+++ b/tests/ui/impl-trait/arg-position-impl-trait-too-long.stderr
@@ -17,6 +17,6 @@ LL | let () = y;
= note: expected type parameter `impl FnOnce(&mut Header, &mut [EntryMetadata], &mut [Entry<C::EncodedKey, C::EncodedValue>]) -> R`
found unit type `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/impl-trait/auto-trait-coherence.next.stderr b/tests/ui/impl-trait/auto-trait-coherence.next.stderr
index 7833ac688..3f979d1a5 100644
--- a/tests/ui/impl-trait/auto-trait-coherence.next.stderr
+++ b/tests/ui/impl-trait/auto-trait-coherence.next.stderr
@@ -7,6 +7,6 @@ LL | impl<T: Send> AnotherTrait for T {}
LL | impl AnotherTrait for D<OpaqueType> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D<OpaqueType>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/impl-trait/auto-trait-coherence.old.stderr b/tests/ui/impl-trait/auto-trait-coherence.old.stderr
index 7833ac688..3f979d1a5 100644
--- a/tests/ui/impl-trait/auto-trait-coherence.old.stderr
+++ b/tests/ui/impl-trait/auto-trait-coherence.old.stderr
@@ -7,6 +7,6 @@ LL | impl<T: Send> AnotherTrait for T {}
LL | impl AnotherTrait for D<OpaqueType> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D<OpaqueType>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/impl-trait/auto-trait-coherence.rs b/tests/ui/impl-trait/auto-trait-coherence.rs
index a5cd01a87..e4226b200 100644
--- a/tests/ui/impl-trait/auto-trait-coherence.rs
+++ b/tests/ui/impl-trait/auto-trait-coherence.rs
@@ -1,5 +1,5 @@
// revisions: old next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// Tests that type alias impls traits do not leak auto-traits for
// the purposes of coherence checking
diff --git a/tests/ui/impl-trait/auto-trait-leak.stderr b/tests/ui/impl-trait/auto-trait-leak.stderr
index 28643ec03..3fab766fa 100644
--- a/tests/ui/impl-trait/auto-trait-leak.stderr
+++ b/tests/ui/impl-trait/auto-trait-leak.stderr
@@ -22,5 +22,5 @@ note: required by a bound in `send`
LL | fn send<T: Send>(_: T) {}
| ^^^^ required by this bound in `send`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/impl-trait/autoderef.rs b/tests/ui/impl-trait/autoderef.rs
index cd2cdd9e3..48ff8be65 100644
--- a/tests/ui/impl-trait/autoderef.rs
+++ b/tests/ui/impl-trait/autoderef.rs
@@ -1,5 +1,5 @@
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// check-pass
use std::path::Path;
diff --git a/tests/ui/impl-trait/coherence-treats-tait-ambig.current.stderr b/tests/ui/impl-trait/coherence-treats-tait-ambig.current.stderr
index 61fed1629..444f3d668 100644
--- a/tests/ui/impl-trait/coherence-treats-tait-ambig.current.stderr
+++ b/tests/ui/impl-trait/coherence-treats-tait-ambig.current.stderr
@@ -8,6 +8,6 @@ LL | impl Into<T> for Foo {
- impl<T, U> Into<U> for T
where U: From<T>;
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/impl-trait/coherence-treats-tait-ambig.stderr b/tests/ui/impl-trait/coherence-treats-tait-ambig.stderr
index 7c69c4bfe..faaad2769 100644
--- a/tests/ui/impl-trait/coherence-treats-tait-ambig.stderr
+++ b/tests/ui/impl-trait/coherence-treats-tait-ambig.stderr
@@ -8,6 +8,6 @@ LL | impl Into<T> for Foo {
- impl<T, U> Into<U> for T
where U: From<T>;
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/impl-trait/diagnostics/fully-qualified-path-impl-trait.stderr b/tests/ui/impl-trait/diagnostics/fully-qualified-path-impl-trait.stderr
index a1a629bdd..06b5ae6e3 100644
--- a/tests/ui/impl-trait/diagnostics/fully-qualified-path-impl-trait.stderr
+++ b/tests/ui/impl-trait/diagnostics/fully-qualified-path-impl-trait.stderr
@@ -4,6 +4,6 @@ error[E0282]: type annotations needed
LL | ().foo(|| ())
| ^^^ cannot infer type for type parameter `T` declared on the trait `Foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/impl-trait/does-not-live-long-enough.stderr b/tests/ui/impl-trait/does-not-live-long-enough.stderr
index 750687e23..cfc132980 100644
--- a/tests/ui/impl-trait/does-not-live-long-enough.stderr
+++ b/tests/ui/impl-trait/does-not-live-long-enough.stderr
@@ -16,6 +16,6 @@ help: to force the closure to take ownership of `prefix` (and any other referenc
LL | self.data.iter().filter(move |s| s.starts_with(prefix)).map(|s| s.as_ref())
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0373`.
diff --git a/tests/ui/impl-trait/dont-suggest-box-on-empty-else-arm.stderr b/tests/ui/impl-trait/dont-suggest-box-on-empty-else-arm.stderr
index 9b63911da..ea3d7f324 100644
--- a/tests/ui/impl-trait/dont-suggest-box-on-empty-else-arm.stderr
+++ b/tests/ui/impl-trait/dont-suggest-box-on-empty-else-arm.stderr
@@ -11,6 +11,6 @@ LL | |
LL | | }
| |_____^ expected `&str`, found `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr b/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr
index ed9261d0d..4a52f8254 100644
--- a/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr
+++ b/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr
@@ -16,7 +16,7 @@ LL | fn fuz() -> (usize, Trait) { (42, Struct) }
| doesn't have a size known at compile-time
|
= help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `(dyn Trait + 'static)`
- = note: required because it appears within the type `(usize, dyn Trait)`
+ = note: required because it appears within the type `(usize, (dyn Trait + 'static))`
= note: the return type of a function must have a statically known size
error[E0308]: mismatched types
@@ -37,7 +37,7 @@ LL | fn bar() -> (usize, dyn Trait) { (42, Struct) }
| doesn't have a size known at compile-time
|
= help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `(dyn Trait + 'static)`
- = note: required because it appears within the type `(usize, dyn Trait)`
+ = note: required because it appears within the type `(usize, (dyn Trait + 'static))`
= note: the return type of a function must have a statically known size
error[E0746]: return type cannot have an unboxed trait object
diff --git a/tests/ui/impl-trait/equality-in-canonical-query.clone.stderr b/tests/ui/impl-trait/equality-in-canonical-query.clone.stderr
index 83791f0d3..046d35e4e 100644
--- a/tests/ui/impl-trait/equality-in-canonical-query.clone.stderr
+++ b/tests/ui/impl-trait/equality-in-canonical-query.clone.stderr
@@ -1,4 +1,4 @@
-error: internal compiler error: no errors encountered even though `delay_span_bug` issued
+error: internal compiler error: no errors encountered even though `span_delayed_bug` issued
error: internal compiler error: {OpaqueTypeKey { def_id: DefId(rpit::{opaque#0}), args: [] }: OpaqueTypeDecl { hidden_type: OpaqueHiddenType { span: no-location (#0), ty: Alias(Opaque, AliasTy { args: [], def_id: DefId(foo::{opaque#0}) }) } }}
|
diff --git a/tests/ui/impl-trait/erased-regions-in-hidden-ty.current.stderr b/tests/ui/impl-trait/erased-regions-in-hidden-ty.current.stderr
index 84b61dc50..4cd4febc4 100644
--- a/tests/ui/impl-trait/erased-regions-in-hidden-ty.current.stderr
+++ b/tests/ui/impl-trait/erased-regions-in-hidden-ty.current.stderr
@@ -1,4 +1,4 @@
-error: {foo<ReEarlyBound(DefId(..), 0, 'a)>::{closure#0} closure_kind_ty=i8 closure_sig_as_fn_ptr_ty=extern "rust-call" fn(()) upvar_tys=()}
+error: {foo<ReEarlyParam(DefId(..), 0, 'a)>::{closure#0} closure_kind_ty=i8 closure_sig_as_fn_ptr_ty=extern "rust-call" fn(()) upvar_tys=()}
--> $DIR/erased-regions-in-hidden-ty.rs:11:36
|
LL | fn foo<'a: 'a>(x: &'a Vec<i32>) -> impl Fn() + 'static {
diff --git a/tests/ui/impl-trait/erased-regions-in-hidden-ty.next.stderr b/tests/ui/impl-trait/erased-regions-in-hidden-ty.next.stderr
index 84b61dc50..4cd4febc4 100644
--- a/tests/ui/impl-trait/erased-regions-in-hidden-ty.next.stderr
+++ b/tests/ui/impl-trait/erased-regions-in-hidden-ty.next.stderr
@@ -1,4 +1,4 @@
-error: {foo<ReEarlyBound(DefId(..), 0, 'a)>::{closure#0} closure_kind_ty=i8 closure_sig_as_fn_ptr_ty=extern "rust-call" fn(()) upvar_tys=()}
+error: {foo<ReEarlyParam(DefId(..), 0, 'a)>::{closure#0} closure_kind_ty=i8 closure_sig_as_fn_ptr_ty=extern "rust-call" fn(()) upvar_tys=()}
--> $DIR/erased-regions-in-hidden-ty.rs:11:36
|
LL | fn foo<'a: 'a>(x: &'a Vec<i32>) -> impl Fn() + 'static {
diff --git a/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs b/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs
index 698123a93..b1f36fc24 100644
--- a/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs
+++ b/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs
@@ -1,6 +1,6 @@
// revisions: current next
// compile-flags: -Zverbose
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// normalize-stderr-test "DefId\([^\)]+\)" -> "DefId(..)"
#![feature(rustc_attrs)]
diff --git a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args-for-impl.stderr b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args-for-impl.stderr
index 9c1011018..e8cd16bc3 100644
--- a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args-for-impl.stderr
+++ b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args-for-impl.stderr
@@ -13,6 +13,6 @@ LL | fn foo<T: ?Sized>(_f: impl AsRef<T>) {}
| ^^^ -
= note: `impl Trait` cannot be explicitly specified as a generic argument
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/not-enough-args.stderr b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/not-enough-args.stderr
index a26460c8e..b2478c4cd 100644
--- a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/not-enough-args.stderr
+++ b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/not-enough-args.stderr
@@ -16,6 +16,6 @@ help: add missing generic argument
LL | f::<[u8], U>("a", b"a");
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/impl-trait/extra-item.stderr b/tests/ui/impl-trait/extra-item.stderr
index 728bcc0aa..622997072 100644
--- a/tests/ui/impl-trait/extra-item.stderr
+++ b/tests/ui/impl-trait/extra-item.stderr
@@ -4,6 +4,6 @@ error[E0407]: method `extra` is not a member of trait `extra_item::MyTrait`
LL | fn extra() {}
| ^^^^^^^^^^^^^ not a member of trait `extra_item::MyTrait`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0407`.
diff --git a/tests/ui/impl-trait/fallback_inference.stderr b/tests/ui/impl-trait/fallback_inference.stderr
index 4ac3c238f..4f8121ae8 100644
--- a/tests/ui/impl-trait/fallback_inference.stderr
+++ b/tests/ui/impl-trait/fallback_inference.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic argument
LL | PhantomData::<T>
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr
index edf3911e2..6e36922b4 100644
--- a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr
+++ b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr
@@ -4,6 +4,6 @@ error[E0277]: the trait bound `(): AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is
LL | fn ice() -> impl AsRef<Fn(&())> {
| ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not implemented for `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr
index 30fbba168..2e13ca753 100644
--- a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr
+++ b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr
@@ -9,6 +9,6 @@ help: add `dyn` keyword before this trait
LL | fn ice() -> impl AsRef<dyn Fn(&())> {
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0782`.
diff --git a/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.stderr b/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.stderr
index 835f7f765..4e453c108 100644
--- a/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.stderr
+++ b/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.stderr
@@ -8,6 +8,6 @@ LL | |x| x
| |
| hidden type `&u8` captures the anonymous lifetime as defined here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0700`.
diff --git a/tests/ui/impl-trait/impl-fn-hrtb-bounds.stderr b/tests/ui/impl-trait/impl-fn-hrtb-bounds.stderr
index 443ffeb55..a5982a554 100644
--- a/tests/ui/impl-trait/impl-fn-hrtb-bounds.stderr
+++ b/tests/ui/impl-trait/impl-fn-hrtb-bounds.stderr
@@ -5,7 +5,7 @@ LL | fn d() -> impl Fn() -> (impl Debug + '_) {
| ^^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
|
LL | fn d() -> impl Fn() -> (impl Debug + 'static) {
| ~~~~~~~
diff --git a/tests/ui/impl-trait/impl-generic-mismatch-ab.stderr b/tests/ui/impl-trait/impl-generic-mismatch-ab.stderr
index db97fc2bd..7046e729e 100644
--- a/tests/ui/impl-trait/impl-generic-mismatch-ab.stderr
+++ b/tests/ui/impl-trait/impl-generic-mismatch-ab.stderr
@@ -18,6 +18,6 @@ LL | fn foo<A: Debug>(&self, a: &A, b: &impl Debug);
= note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
= note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0053`.
diff --git a/tests/ui/impl-trait/impl-trait-in-macro.stderr b/tests/ui/impl-trait/impl-trait-in-macro.stderr
index 7cfbe3447..4380f47c5 100644
--- a/tests/ui/impl-trait/impl-trait-in-macro.stderr
+++ b/tests/ui/impl-trait/impl-trait-in-macro.stderr
@@ -17,6 +17,6 @@ LL | a = y;
= note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
= note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/impl-trait/implicit-capture-late.rs b/tests/ui/impl-trait/implicit-capture-late.rs
new file mode 100644
index 000000000..8bfb16760
--- /dev/null
+++ b/tests/ui/impl-trait/implicit-capture-late.rs
@@ -0,0 +1,14 @@
+// known-bug: #117647
+
+#![feature(lifetime_capture_rules_2024)]
+#![feature(rustc_attrs)]
+#![allow(internal_features)]
+#![rustc_variance_of_opaques]
+
+use std::ops::Deref;
+
+fn foo(x: Vec<i32>) -> Box<dyn for<'a> Deref<Target = impl ?Sized>> {
+ Box::new(x)
+}
+
+fn main() {}
diff --git a/tests/ui/impl-trait/implicit-capture-late.stderr b/tests/ui/impl-trait/implicit-capture-late.stderr
new file mode 100644
index 000000000..9b3a4ff5f
--- /dev/null
+++ b/tests/ui/impl-trait/implicit-capture-late.stderr
@@ -0,0 +1,9 @@
+error[E0657]: `impl Trait` can only capture lifetimes bound at the fn or impl level
+ --> $DIR/implicit-capture-late.rs:10:36
+ |
+LL | fn foo(x: Vec<i32>) -> Box<dyn for<'a> Deref<Target = impl ?Sized>> {
+ | ^^
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0657`.
diff --git a/tests/ui/impl-trait/in-assoc-type.stderr b/tests/ui/impl-trait/in-assoc-type.stderr
index af60da07c..d5b543ea9 100644
--- a/tests/ui/impl-trait/in-assoc-type.stderr
+++ b/tests/ui/impl-trait/in-assoc-type.stderr
@@ -17,6 +17,6 @@ note: this item must have the opaque type in its signature in order to be able t
LL | fn foo(&self) -> <Self as Foo<()>>::Bar {}
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/impl-trait/in-trait/async-and-ret-ref.stderr b/tests/ui/impl-trait/in-trait/async-and-ret-ref.stderr
index 7c9028a8c..79a86b0a3 100644
--- a/tests/ui/impl-trait/in-trait/async-and-ret-ref.stderr
+++ b/tests/ui/impl-trait/in-trait/async-and-ret-ref.stderr
@@ -9,6 +9,6 @@ LL | async fn foo() -> &'static impl T;
|
= help: consider adding an explicit lifetime bound `<Self as MyTrait>::{opaque#0}: 'static`...
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0310`.
diff --git a/tests/ui/impl-trait/in-trait/bad-item-bound-within-rpitit.stderr b/tests/ui/impl-trait/in-trait/bad-item-bound-within-rpitit.stderr
index 324eaa37a..c898d17f4 100644
--- a/tests/ui/impl-trait/in-trait/bad-item-bound-within-rpitit.stderr
+++ b/tests/ui/impl-trait/in-trait/bad-item-bound-within-rpitit.stderr
@@ -28,6 +28,6 @@ help: replace the return type so that it matches the trait
LL | fn iter(&self) -> impl Iterator<Item = <Self as Iterable>::Item<'_>> + '_ {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0276`.
diff --git a/tests/ui/impl-trait/in-trait/check-wf-on-non-defaulted-rpitit.stderr b/tests/ui/impl-trait/in-trait/check-wf-on-non-defaulted-rpitit.stderr
index 1570b2ecd..86f9cc4d9 100644
--- a/tests/ui/impl-trait/in-trait/check-wf-on-non-defaulted-rpitit.stderr
+++ b/tests/ui/impl-trait/in-trait/check-wf-on-non-defaulted-rpitit.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `Wrapper`
LL | struct Wrapper<G: Send>(G);
| ^^^^ required by this bound in `Wrapper`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/impl-trait/in-trait/deep-match.stderr b/tests/ui/impl-trait/in-trait/deep-match.stderr
index a658d8fa0..8ec30239e 100644
--- a/tests/ui/impl-trait/in-trait/deep-match.stderr
+++ b/tests/ui/impl-trait/in-trait/deep-match.stderr
@@ -10,6 +10,6 @@ LL | fn bar() -> i32 {
= note: expected struct `Wrapper<_>`
found type `i32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0053`.
diff --git a/tests/ui/impl-trait/in-trait/default-body-type-err-2.stderr b/tests/ui/impl-trait/in-trait/default-body-type-err-2.stderr
index fcace10cd..77f6945f0 100644
--- a/tests/ui/impl-trait/in-trait/default-body-type-err-2.stderr
+++ b/tests/ui/impl-trait/in-trait/default-body-type-err-2.stderr
@@ -6,6 +6,6 @@ LL | 42
| |
| expected `String`, found integer
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/impl-trait/in-trait/default-body-type-err.stderr b/tests/ui/impl-trait/in-trait/default-body-type-err.stderr
index 596ff1011..6f1ac4bce 100644
--- a/tests/ui/impl-trait/in-trait/default-body-type-err.stderr
+++ b/tests/ui/impl-trait/in-trait/default-body-type-err.stderr
@@ -7,6 +7,6 @@ LL |
LL | &1i32
| ----- return type was inferred to be `&i32` here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/impl-trait/in-trait/doesnt-satisfy.stderr b/tests/ui/impl-trait/in-trait/doesnt-satisfy.stderr
index cd45c6a9c..baee1b5db 100644
--- a/tests/ui/impl-trait/in-trait/doesnt-satisfy.stderr
+++ b/tests/ui/impl-trait/in-trait/doesnt-satisfy.stderr
@@ -12,6 +12,6 @@ note: required by a bound in `Foo::{opaque#0}`
LL | fn bar() -> impl std::fmt::Display;
| ^^^^^^^^^^^^^^^^^ required by this bound in `Foo::{opaque#0}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.stderr b/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.stderr
index 830e663da..39f70e413 100644
--- a/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.stderr
+++ b/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.stderr
@@ -7,6 +7,6 @@ LL | fn foo(&self) -> impl Sized;
LL | impl MyTrait for i32 {
| ^^^^^^^^^^^^^^^^^^^^ missing `foo` in implementation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr b/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr
index f29ec95d5..9cc4c4b2f 100644
--- a/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr
+++ b/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr
@@ -11,6 +11,6 @@ LL | fn bar(self) -> impl Deref<Target = impl Sized>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait cannot be made into an object because method `bar` references an `impl Trait` type in its return type
= help: only type `rpitit::Foreign` implements the trait, consider using it directly instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/impl-trait/in-trait/generics-mismatch.stderr b/tests/ui/impl-trait/in-trait/generics-mismatch.stderr
index 043dbc8db..d847065eb 100644
--- a/tests/ui/impl-trait/in-trait/generics-mismatch.stderr
+++ b/tests/ui/impl-trait/in-trait/generics-mismatch.stderr
@@ -7,6 +7,6 @@ LL | fn bar(&self) -> impl Sized;
LL | fn bar<T>(&self) {}
| ^ found 1 type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0049`.
diff --git a/tests/ui/impl-trait/in-trait/issue-102571.stderr b/tests/ui/impl-trait/in-trait/issue-102571.stderr
index 872988faf..1f25069a0 100644
--- a/tests/ui/impl-trait/in-trait/issue-102571.stderr
+++ b/tests/ui/impl-trait/in-trait/issue-102571.stderr
@@ -9,6 +9,6 @@ LL | let () = t.bar();
= note: expected associated type `impl Deref<Target = impl std::fmt::Display + ?Sized>`
found unit type `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/impl-trait/in-trait/method-signature-matches.lt.stderr b/tests/ui/impl-trait/in-trait/method-signature-matches.lt.stderr
index 874a1b95a..59ffea6fb 100644
--- a/tests/ui/impl-trait/in-trait/method-signature-matches.lt.stderr
+++ b/tests/ui/impl-trait/in-trait/method-signature-matches.lt.stderr
@@ -16,6 +16,6 @@ LL | fn early<'early, T>(x: &'early T) -> impl Sized;
= note: expected signature `fn(&T)`
found signature `fn(&'late ())`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0053`.
diff --git a/tests/ui/impl-trait/in-trait/method-signature-matches.mismatch.stderr b/tests/ui/impl-trait/in-trait/method-signature-matches.mismatch.stderr
index e0bd1cc4f..f8980828b 100644
--- a/tests/ui/impl-trait/in-trait/method-signature-matches.mismatch.stderr
+++ b/tests/ui/impl-trait/in-trait/method-signature-matches.mismatch.stderr
@@ -15,6 +15,6 @@ LL | fn owo(x: ()) -> impl Sized;
= note: expected signature `fn(())`
found signature `fn(u8)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0053`.
diff --git a/tests/ui/impl-trait/in-trait/method-signature-matches.mismatch_async.stderr b/tests/ui/impl-trait/in-trait/method-signature-matches.mismatch_async.stderr
index 096e96c85..a6fb1a200 100644
--- a/tests/ui/impl-trait/in-trait/method-signature-matches.mismatch_async.stderr
+++ b/tests/ui/impl-trait/in-trait/method-signature-matches.mismatch_async.stderr
@@ -15,6 +15,6 @@ LL | async fn owo(x: ()) {}
= note: expected signature `fn(()) -> _`
found signature `fn(u8) -> _`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0053`.
diff --git a/tests/ui/impl-trait/in-trait/method-signature-matches.too_few.stderr b/tests/ui/impl-trait/in-trait/method-signature-matches.too_few.stderr
index 96eff1a58..0b26e039e 100644
--- a/tests/ui/impl-trait/in-trait/method-signature-matches.too_few.stderr
+++ b/tests/ui/impl-trait/in-trait/method-signature-matches.too_few.stderr
@@ -7,6 +7,6 @@ LL | fn come_on_a_little_more_effort(_: (), _: (), _: ()) -> impl Sized;
LL | fn come_on_a_little_more_effort() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 3 parameters, found 0
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0050`.
diff --git a/tests/ui/impl-trait/in-trait/method-signature-matches.too_many.stderr b/tests/ui/impl-trait/in-trait/method-signature-matches.too_many.stderr
index 0fc847051..9226e1f8b 100644
--- a/tests/ui/impl-trait/in-trait/method-signature-matches.too_many.stderr
+++ b/tests/ui/impl-trait/in-trait/method-signature-matches.too_many.stderr
@@ -7,6 +7,6 @@ LL | fn calm_down_please() -> impl Sized;
LL | fn calm_down_please(_: (), _: (), _: ()) {}
| ^^^^^^^^^^^^^^^^ expected 0 parameters, found 3
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0050`.
diff --git a/tests/ui/impl-trait/in-trait/missing-lt-outlives-in-rpitit-114274.stderr b/tests/ui/impl-trait/in-trait/missing-lt-outlives-in-rpitit-114274.stderr
index 1fd678a1f..3e763c9f1 100644
--- a/tests/ui/impl-trait/in-trait/missing-lt-outlives-in-rpitit-114274.stderr
+++ b/tests/ui/impl-trait/in-trait/missing-lt-outlives-in-rpitit-114274.stderr
@@ -18,6 +18,6 @@ help: consider introducing lifetime `'missing` here
LL | trait Iterable<'missing> {
| ++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0261`.
diff --git a/tests/ui/impl-trait/in-trait/object-safety-sized.rs b/tests/ui/impl-trait/in-trait/object-safety-sized.rs
index 35afe80c9..1a23493a9 100644
--- a/tests/ui/impl-trait/in-trait/object-safety-sized.rs
+++ b/tests/ui/impl-trait/in-trait/object-safety-sized.rs
@@ -1,6 +1,6 @@
// check-pass
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
fn main() {
diff --git a/tests/ui/impl-trait/in-trait/opaque-in-impl-is-opaque.stderr b/tests/ui/impl-trait/in-trait/opaque-in-impl-is-opaque.stderr
index e260762d8..4996e6839 100644
--- a/tests/ui/impl-trait/in-trait/opaque-in-impl-is-opaque.stderr
+++ b/tests/ui/impl-trait/in-trait/opaque-in-impl-is-opaque.stderr
@@ -12,6 +12,6 @@ LL | let x: &str = ().bar();
= note: expected reference `&str`
found opaque type `impl std::fmt::Display`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/impl-trait/in-trait/opaque-variances.rs b/tests/ui/impl-trait/in-trait/opaque-variances.rs
index 60bfab0de..63e56051d 100644
--- a/tests/ui/impl-trait/in-trait/opaque-variances.rs
+++ b/tests/ui/impl-trait/in-trait/opaque-variances.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
fn foo<'a: 'a>(x: &'a Vec<i32>) -> impl Sized {
()
diff --git a/tests/ui/impl-trait/in-trait/placeholder-implied-bounds.rs b/tests/ui/impl-trait/in-trait/placeholder-implied-bounds.rs
new file mode 100644
index 000000000..33d348703
--- /dev/null
+++ b/tests/ui/impl-trait/in-trait/placeholder-implied-bounds.rs
@@ -0,0 +1,14 @@
+// check-pass
+
+pub fn main() {}
+
+pub trait Iced {
+ fn get(&self) -> &impl Sized;
+}
+
+/// Impl causes ICE
+impl Iced for () {
+ fn get(&self) -> &impl Sized {
+ &()
+ }
+}
diff --git a/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.stderr b/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.stderr
index 181d6a284..db587d069 100644
--- a/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.stderr
+++ b/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `Foo::{opaque#0}`
LL | fn foo<F2>(self) -> impl Foo<T>;
| ^^^^^^ required by this bound in `Foo::{opaque#0}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/impl-trait/in-trait/rpitit-hidden-types-self-implied-wf-via-param.stderr b/tests/ui/impl-trait/in-trait/rpitit-hidden-types-self-implied-wf-via-param.stderr
index afc59cc5b..5ace64b69 100644
--- a/tests/ui/impl-trait/in-trait/rpitit-hidden-types-self-implied-wf-via-param.stderr
+++ b/tests/ui/impl-trait/in-trait/rpitit-hidden-types-self-implied-wf-via-param.stderr
@@ -11,6 +11,6 @@ note: but the referenced data is only valid for the lifetime `'a` as defined her
LL | fn extend<'a: 'a>(s: &'a str) -> (Option<&'static &'a ()>, &'static str)
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0491`.
diff --git a/tests/ui/impl-trait/in-trait/rpitit-hidden-types-self-implied-wf.stderr b/tests/ui/impl-trait/in-trait/rpitit-hidden-types-self-implied-wf.stderr
index 7e1a8f083..3430055da 100644
--- a/tests/ui/impl-trait/in-trait/rpitit-hidden-types-self-implied-wf.stderr
+++ b/tests/ui/impl-trait/in-trait/rpitit-hidden-types-self-implied-wf.stderr
@@ -11,6 +11,6 @@ note: but the referenced data is only valid for the anonymous lifetime defined h
LL | fn extend(s: &str) -> (Option<&'static &'_ ()>, &'static str) {
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0491`.
diff --git a/tests/ui/impl-trait/in-trait/rpitit-shadowed-by-missing-adt.stderr b/tests/ui/impl-trait/in-trait/rpitit-shadowed-by-missing-adt.stderr
index 6e4a5bb5d..73ada8d70 100644
--- a/tests/ui/impl-trait/in-trait/rpitit-shadowed-by-missing-adt.stderr
+++ b/tests/ui/impl-trait/in-trait/rpitit-shadowed-by-missing-adt.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `Missing` in this scope
LL | fn w() -> impl Deref<Target = Missing<impl Sized>>;
| ^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/impl-trait/in-trait/sibling-function-constraint.stderr b/tests/ui/impl-trait/in-trait/sibling-function-constraint.stderr
index 729963a81..b8ac826ad 100644
--- a/tests/ui/impl-trait/in-trait/sibling-function-constraint.stderr
+++ b/tests/ui/impl-trait/in-trait/sibling-function-constraint.stderr
@@ -12,6 +12,6 @@ LL | fn bar() -> impl Sized {
= note: expected struct `String`
found opaque type `impl Sized`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/impl-trait/in-trait/signature-mismatch.failure.stderr b/tests/ui/impl-trait/in-trait/signature-mismatch.failure.stderr
index 468cf12f1..0cd76815a 100644
--- a/tests/ui/impl-trait/in-trait/signature-mismatch.failure.stderr
+++ b/tests/ui/impl-trait/in-trait/signature-mismatch.failure.stderr
@@ -9,6 +9,6 @@ LL | ) -> impl Future<Output = Vec<u8>> {
| |
| ...but data from `buff` is returned here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0623`.
diff --git a/tests/ui/impl-trait/in-trait/specialization-broken.stderr b/tests/ui/impl-trait/in-trait/specialization-broken.stderr
index 25c0adedd..b8a8e2401 100644
--- a/tests/ui/impl-trait/in-trait/specialization-broken.stderr
+++ b/tests/ui/impl-trait/in-trait/specialization-broken.stderr
@@ -15,8 +15,8 @@ note: type in trait
|
LL | fn bar(&self) -> impl Sized;
| ^^^^^^^^^^
- = note: expected signature `fn(&U) -> impl Sized`
- found signature `fn(&U) -> U`
+ = note: expected signature `fn(&_) -> impl Sized`
+ found signature `fn(&_) -> U`
error: method with return-position `impl Trait` in trait cannot be specialized
--> $DIR/specialization-broken.rs:15:5
diff --git a/tests/ui/impl-trait/in-trait/suggest-missing-item.stderr b/tests/ui/impl-trait/in-trait/suggest-missing-item.stderr
index cec94e39a..cf68ed870 100644
--- a/tests/ui/impl-trait/in-trait/suggest-missing-item.stderr
+++ b/tests/ui/impl-trait/in-trait/suggest-missing-item.stderr
@@ -16,6 +16,6 @@ LL | async fn baz(&self) -> &i32;
LL | impl Trait for S {}
| ^^^^^^^^^^^^^^^^ missing `foo`, `bar`, `test`, `baz` in implementation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/impl-trait/in-trait/trait-more-generics-than-impl.stderr b/tests/ui/impl-trait/in-trait/trait-more-generics-than-impl.stderr
index 2836e9c78..eed4c0771 100644
--- a/tests/ui/impl-trait/in-trait/trait-more-generics-than-impl.stderr
+++ b/tests/ui/impl-trait/in-trait/trait-more-generics-than-impl.stderr
@@ -7,6 +7,6 @@ LL | fn bar<T>() -> impl Sized;
LL | fn bar() -> impl Sized {}
| ^ found 0 type parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0049`.
diff --git a/tests/ui/impl-trait/in-trait/unconstrained-lt.stderr b/tests/ui/impl-trait/in-trait/unconstrained-lt.stderr
index 61a0f8454..4c5a42c0b 100644
--- a/tests/ui/impl-trait/in-trait/unconstrained-lt.stderr
+++ b/tests/ui/impl-trait/in-trait/unconstrained-lt.stderr
@@ -4,6 +4,6 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait,
LL | impl<'a, T> Foo for T {
| ^^ unconstrained lifetime parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0207`.
diff --git a/tests/ui/impl-trait/issue-100075-2.stderr b/tests/ui/impl-trait/issue-100075-2.stderr
index d2dbd8c62..b3b696775 100644
--- a/tests/ui/impl-trait/issue-100075-2.stderr
+++ b/tests/ui/impl-trait/issue-100075-2.stderr
@@ -19,6 +19,6 @@ LL | fn opaque<T>(t: T) -> impl Sized {
LL | opaque(Some(t))
| --------------- returning here with type `impl Sized`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0720`.
diff --git a/tests/ui/impl-trait/issue-100075.stderr b/tests/ui/impl-trait/issue-100075.stderr
index 267ecfdae..759634892 100644
--- a/tests/ui/impl-trait/issue-100075.stderr
+++ b/tests/ui/impl-trait/issue-100075.stderr
@@ -7,6 +7,6 @@ LL | fn _g<T>(t: &'static T) -> &'static impl Marker {
LL | return _g(t);
| ----- returning here with type `&impl Marker`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0720`.
diff --git a/tests/ui/impl-trait/issue-103181-1.current.stderr b/tests/ui/impl-trait/issue-103181-1.current.stderr
index e87a9d28a..83410dfc6 100644
--- a/tests/ui/impl-trait/issue-103181-1.current.stderr
+++ b/tests/ui/impl-trait/issue-103181-1.current.stderr
@@ -7,6 +7,6 @@ LL | }
LL | impl HttpBody for () {
| ^^^^^^^^^^^^^^^^^^^^ missing `Error` in implementation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/impl-trait/issue-103181-1.next.stderr b/tests/ui/impl-trait/issue-103181-1.next.stderr
index e87a9d28a..83410dfc6 100644
--- a/tests/ui/impl-trait/issue-103181-1.next.stderr
+++ b/tests/ui/impl-trait/issue-103181-1.next.stderr
@@ -7,6 +7,6 @@ LL | }
LL | impl HttpBody for () {
| ^^^^^^^^^^^^^^^^^^^^ missing `Error` in implementation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/impl-trait/issue-103181-1.rs b/tests/ui/impl-trait/issue-103181-1.rs
index 5154abcd6..14c813cf0 100644
--- a/tests/ui/impl-trait/issue-103181-1.rs
+++ b/tests/ui/impl-trait/issue-103181-1.rs
@@ -1,5 +1,5 @@
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// edition:2021
mod hyper {
diff --git a/tests/ui/impl-trait/issue-103181-2.stderr b/tests/ui/impl-trait/issue-103181-2.stderr
index 5eb2dd918..cef4449db 100644
--- a/tests/ui/impl-trait/issue-103181-2.stderr
+++ b/tests/ui/impl-trait/issue-103181-2.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `ident_error` in this scope
LL | ident_error;
| ^^^^^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/impl-trait/issue-35668.stderr b/tests/ui/impl-trait/issue-35668.stderr
index 84add5799..ba02d2898 100644
--- a/tests/ui/impl-trait/issue-35668.stderr
+++ b/tests/ui/impl-trait/issue-35668.stderr
@@ -11,6 +11,6 @@ help: consider introducing a `where` clause, but there might be an alternative b
LL | fn func<'a, T>(a: &'a [T]) -> impl Iterator<Item=&'a T> where &T: Mul<&T> {
| +++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/impl-trait/issue-54966.stderr b/tests/ui/impl-trait/issue-54966.stderr
index aa9a61cb5..4024c5afa 100644
--- a/tests/ui/impl-trait/issue-54966.stderr
+++ b/tests/ui/impl-trait/issue-54966.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `Oper` in this scope
LL | fn generate_duration() -> Oper<impl FnMut()> {}
| ^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/impl-trait/issue-55872-3.stderr b/tests/ui/impl-trait/issue-55872-3.stderr
index b542b6141..9af0fad9c 100644
--- a/tests/ui/impl-trait/issue-55872-3.stderr
+++ b/tests/ui/impl-trait/issue-55872-3.stderr
@@ -4,6 +4,6 @@ error[E0277]: the trait bound `{async block@$DIR/issue-55872-3.rs:15:9: 15:17}:
LL | fn foo<T>() -> Self::E {
| ^^^^^^^ the trait `Copy` is not implemented for `{async block@$DIR/issue-55872-3.rs:15:9: 15:17}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/impl-trait/issue-55872.stderr b/tests/ui/impl-trait/issue-55872.stderr
index cb370fbe1..4ff8527bb 100644
--- a/tests/ui/impl-trait/issue-55872.stderr
+++ b/tests/ui/impl-trait/issue-55872.stderr
@@ -4,5 +4,5 @@ error: type parameter `T` is part of concrete type but not used in parameter lis
LL | || ()
| ^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/impl-trait/issue-86465.stderr b/tests/ui/impl-trait/issue-86465.stderr
index 90d6904ed..e330d178d 100644
--- a/tests/ui/impl-trait/issue-86465.stderr
+++ b/tests/ui/impl-trait/issue-86465.stderr
@@ -7,5 +7,5 @@ LL | (a, a)
| expected `&'a u32`, got `&'b u32`
| this expression supplies two conflicting concrete types for the same opaque type
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/impl-trait/issue-87450.stderr b/tests/ui/impl-trait/issue-87450.stderr
index 173fca63f..9567e0965 100644
--- a/tests/ui/impl-trait/issue-87450.stderr
+++ b/tests/ui/impl-trait/issue-87450.stderr
@@ -22,6 +22,6 @@ LL | wrap(wrap(wrap(wrap(wrap(wrap(wrap(foo())))))))
LL | fn wrap(f: impl Fn()) -> impl Fn() {
| --------- returning this opaque type `impl Fn()`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0720`.
diff --git a/tests/ui/impl-trait/issue-99914.stderr b/tests/ui/impl-trait/issue-99914.stderr
index c86e9eadc..06e85e521 100644
--- a/tests/ui/impl-trait/issue-99914.stderr
+++ b/tests/ui/impl-trait/issue-99914.stderr
@@ -9,6 +9,6 @@ help: try wrapping the expression in `Ok`
LL | t.and_then(|t| -> _ { Ok(bar(t)) });
| +++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.stderr b/tests/ui/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.stderr
index 9150d957d..e5d718393 100644
--- a/tests/ui/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.stderr
+++ b/tests/ui/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.stderr
@@ -14,6 +14,6 @@ note: `Foo` defines an item `foo`, perhaps you need to implement it
LL | trait Foo<A> {
| ^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/impl-trait/issues/issue-54600.stderr b/tests/ui/impl-trait/issues/issue-54600.stderr
index 9a8e3675b..946ad74b8 100644
--- a/tests/ui/impl-trait/issues/issue-54600.stderr
+++ b/tests/ui/impl-trait/issues/issue-54600.stderr
@@ -4,6 +4,6 @@ error[E0562]: `impl Trait` only allowed in function and inherent method argument
LL | let x: Option<impl Debug> = Some(44_u32);
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0562`.
diff --git a/tests/ui/impl-trait/issues/issue-54840.stderr b/tests/ui/impl-trait/issues/issue-54840.stderr
index 67cabf449..c4ab79f11 100644
--- a/tests/ui/impl-trait/issues/issue-54840.stderr
+++ b/tests/ui/impl-trait/issues/issue-54840.stderr
@@ -4,6 +4,6 @@ error[E0562]: `impl Trait` only allowed in function and inherent method argument
LL | let j: &impl Add = &i;
| ^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0562`.
diff --git a/tests/ui/impl-trait/issues/issue-54895.stderr b/tests/ui/impl-trait/issues/issue-54895.stderr
index 7d22f027a..999ffd521 100644
--- a/tests/ui/impl-trait/issues/issue-54895.stderr
+++ b/tests/ui/impl-trait/issues/issue-54895.stderr
@@ -10,5 +10,5 @@ note: lifetime declared here
LL | fn f() -> impl for<'a> Trait<'a, Out = impl Sized + 'a> {
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/impl-trait/issues/issue-57979-deeply-nested-impl-trait-in-assoc-proj.stderr b/tests/ui/impl-trait/issues/issue-57979-deeply-nested-impl-trait-in-assoc-proj.stderr
index 6bebbc01f..83d0d7765 100644
--- a/tests/ui/impl-trait/issues/issue-57979-deeply-nested-impl-trait-in-assoc-proj.stderr
+++ b/tests/ui/impl-trait/issues/issue-57979-deeply-nested-impl-trait-in-assoc-proj.stderr
@@ -7,6 +7,6 @@ LL | pub fn demo(_: impl Quux<Assoc=Deeper<impl Foo<impl Bar>>>) { }
| | nested `impl Trait` here
| outer `impl Trait`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0666`.
diff --git a/tests/ui/impl-trait/issues/issue-57979-impl-trait-in-path.stderr b/tests/ui/impl-trait/issues/issue-57979-impl-trait-in-path.stderr
index e31393181..55f47785f 100644
--- a/tests/ui/impl-trait/issues/issue-57979-impl-trait-in-path.stderr
+++ b/tests/ui/impl-trait/issues/issue-57979-impl-trait-in-path.stderr
@@ -4,6 +4,6 @@ error[E0667]: `impl Trait` is not allowed in path parameters
LL | pub fn demo(_: impl Quux<(), Assoc=<() as Quux<impl Bar>>::Assoc>) { }
| ^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0667`.
diff --git a/tests/ui/impl-trait/issues/issue-57979-nested-impl-trait-in-assoc-proj.stderr b/tests/ui/impl-trait/issues/issue-57979-nested-impl-trait-in-assoc-proj.stderr
index 8d3d4b5e2..0e105817b 100644
--- a/tests/ui/impl-trait/issues/issue-57979-nested-impl-trait-in-assoc-proj.stderr
+++ b/tests/ui/impl-trait/issues/issue-57979-nested-impl-trait-in-assoc-proj.stderr
@@ -7,6 +7,6 @@ LL | pub fn demo(_: impl Quux<Assoc=impl Foo<impl Bar>>) { }
| | nested `impl Trait` here
| outer `impl Trait`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0666`.
diff --git a/tests/ui/impl-trait/issues/issue-58504.stderr b/tests/ui/impl-trait/issues/issue-58504.stderr
index 49376f559..e67e48728 100644
--- a/tests/ui/impl-trait/issues/issue-58504.stderr
+++ b/tests/ui/impl-trait/issues/issue-58504.stderr
@@ -4,6 +4,6 @@ error[E0562]: `impl Trait` only allowed in function and inherent method argument
LL | let gens: [impl Coroutine<Return=!, Yield=()>;2] = [ mk_gen(), mk_gen() ];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0562`.
diff --git a/tests/ui/impl-trait/issues/issue-67830.stderr b/tests/ui/impl-trait/issues/issue-67830.stderr
index d3ea8cb03..17cfa151a 100644
--- a/tests/ui/impl-trait/issues/issue-67830.stderr
+++ b/tests/ui/impl-trait/issues/issue-67830.stderr
@@ -10,5 +10,5 @@ note: lifetime declared here
LL | fn test() -> impl for<'a> MyFn<&'a A, Output=impl Iterator + 'a> {
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/impl-trait/issues/issue-70877.stderr b/tests/ui/impl-trait/issues/issue-70877.stderr
index ee140e6f6..274139f01 100644
--- a/tests/ui/impl-trait/issues/issue-70877.stderr
+++ b/tests/ui/impl-trait/issues/issue-70877.stderr
@@ -15,5 +15,5 @@ note: opaque type being used as hidden type
LL | type FooRet = impl std::fmt::Debug;
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/impl-trait/issues/issue-70971.stderr b/tests/ui/impl-trait/issues/issue-70971.stderr
index 5609f8b9b..fcc67291e 100644
--- a/tests/ui/impl-trait/issues/issue-70971.stderr
+++ b/tests/ui/impl-trait/issues/issue-70971.stderr
@@ -4,6 +4,6 @@ error[E0562]: `impl Trait` only allowed in function and inherent method argument
LL | let x : (impl Copy,) = (true,);
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0562`.
diff --git a/tests/ui/impl-trait/issues/issue-82139.stderr b/tests/ui/impl-trait/issues/issue-82139.stderr
index 0adcd4a7a..b87084433 100644
--- a/tests/ui/impl-trait/issues/issue-82139.stderr
+++ b/tests/ui/impl-trait/issues/issue-82139.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `j` in this scope
LL | Some(42).map(|_| j)
| ^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/impl-trait/issues/issue-83919.stderr b/tests/ui/impl-trait/issues/issue-83919.stderr
index d39dcf7fb..200257235 100644
--- a/tests/ui/impl-trait/issues/issue-83919.stderr
+++ b/tests/ui/impl-trait/issues/issue-83919.stderr
@@ -7,6 +7,6 @@ LL | fn get_fut(&self) -> Self::Fut {
= help: the trait `Future` is not implemented for `{integer}`
= note: {integer} must be a future or must implement `IntoFuture` to be awaited
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/impl-trait/issues/issue-84073.stderr b/tests/ui/impl-trait/issues/issue-84073.stderr
index b4be16ff0..d03e458ae 100644
--- a/tests/ui/impl-trait/issues/issue-84073.stderr
+++ b/tests/ui/impl-trait/issues/issue-84073.stderr
@@ -9,6 +9,6 @@ help: consider giving this closure parameter an explicit type, where the type fo
LL | Race::new(|race: RaceBuilder<T, Never<T>>| race.when());
| ++++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/impl-trait/issues/issue-84919.stderr b/tests/ui/impl-trait/issues/issue-84919.stderr
index 20b131b8b..963865efa 100644
--- a/tests/ui/impl-trait/issues/issue-84919.stderr
+++ b/tests/ui/impl-trait/issues/issue-84919.stderr
@@ -4,6 +4,6 @@ error[E0562]: `impl Trait` only allowed in function and inherent method argument
LL | let _x: impl Trait = ();
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0562`.
diff --git a/tests/ui/impl-trait/issues/issue-86642.stderr b/tests/ui/impl-trait/issues/issue-86642.stderr
index 6d3be3fff..3ad18a132 100644
--- a/tests/ui/impl-trait/issues/issue-86642.stderr
+++ b/tests/ui/impl-trait/issues/issue-86642.stderr
@@ -4,6 +4,6 @@ error[E0562]: `impl Trait` only allowed in function and inherent method argument
LL | static x: impl Fn(&str) -> Result<&str, ()> = move |source| {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0562`.
diff --git a/tests/ui/impl-trait/issues/issue-87295.stderr b/tests/ui/impl-trait/issues/issue-87295.stderr
index 3fe4ee73c..e9a635f24 100644
--- a/tests/ui/impl-trait/issues/issue-87295.stderr
+++ b/tests/ui/impl-trait/issues/issue-87295.stderr
@@ -4,6 +4,6 @@ error[E0562]: `impl Trait` only allowed in function and inherent method argument
LL | let _do_not_waste: Struct<impl Trait<Output = i32>> = Struct::new(());
| ^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0562`.
diff --git a/tests/ui/impl-trait/issues/issue-87340.stderr b/tests/ui/impl-trait/issues/issue-87340.stderr
index 2ab1e6a03..8513cb288 100644
--- a/tests/ui/impl-trait/issues/issue-87340.stderr
+++ b/tests/ui/impl-trait/issues/issue-87340.stderr
@@ -4,6 +4,6 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self
LL | impl<T> X for () {
| ^ unconstrained type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0207`.
diff --git a/tests/ui/impl-trait/issues/issue-88236.stderr b/tests/ui/impl-trait/issues/issue-88236.stderr
index 7a4cc57b0..6cf1a42d6 100644
--- a/tests/ui/impl-trait/issues/issue-88236.stderr
+++ b/tests/ui/impl-trait/issues/issue-88236.stderr
@@ -10,5 +10,5 @@ note: lifetime declared here
LL | fn make_impl() -> impl for<'a> Hrtb<'a, Assoc = impl Send + 'a> {}
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/impl-trait/issues/issue-92305.stderr b/tests/ui/impl-trait/issues/issue-92305.stderr
index 86d7184da..88fb1fb27 100644
--- a/tests/ui/impl-trait/issues/issue-92305.stderr
+++ b/tests/ui/impl-trait/issues/issue-92305.stderr
@@ -9,6 +9,6 @@ help: add missing generic argument
LL | fn f<T>(data: &[T]) -> impl Iterator<Item = Vec<T>> {
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/impl-trait/issues/issue-99348-impl-compatibility.stderr b/tests/ui/impl-trait/issues/issue-99348-impl-compatibility.stderr
index f0dceb1b1..a83e0df91 100644
--- a/tests/ui/impl-trait/issues/issue-99348-impl-compatibility.stderr
+++ b/tests/ui/impl-trait/issues/issue-99348-impl-compatibility.stderr
@@ -20,6 +20,6 @@ note: required by a bound in `Foo::Item`
LL | type Item: Bar<Other = Self>;
| ^^^^^^^^^^^^ required by this bound in `Foo::Item`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/impl-trait/method-suggestion-no-duplication.stderr b/tests/ui/impl-trait/method-suggestion-no-duplication.stderr
index b727b2ca0..c401269da 100644
--- a/tests/ui/impl-trait/method-suggestion-no-duplication.stderr
+++ b/tests/ui/impl-trait/method-suggestion-no-duplication.stderr
@@ -11,6 +11,6 @@ LL | foo(|s| s.is_empty());
= note: the following trait defines an item `is_empty`, perhaps you need to implement it:
candidate #1: `ExactSizeIterator`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/impl-trait/multiple-defining-usages-in-body.stderr b/tests/ui/impl-trait/multiple-defining-usages-in-body.stderr
index f3c090408..faa5d3ba4 100644
--- a/tests/ui/impl-trait/multiple-defining-usages-in-body.stderr
+++ b/tests/ui/impl-trait/multiple-defining-usages-in-body.stderr
@@ -22,5 +22,5 @@ note: previous use here
LL | let a: T = foo::<T, U>();
| ^^^^^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/impl-trait/multiple-lifetimes/error-handling-2.stderr b/tests/ui/impl-trait/multiple-lifetimes/error-handling-2.stderr
index 5b0b1cc5e..b968592be 100644
--- a/tests/ui/impl-trait/multiple-lifetimes/error-handling-2.stderr
+++ b/tests/ui/impl-trait/multiple-lifetimes/error-handling-2.stderr
@@ -10,6 +10,6 @@ LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
LL | u.0
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0700`.
diff --git a/tests/ui/impl-trait/multiple-lifetimes/error-handling.polonius.stderr b/tests/ui/impl-trait/multiple-lifetimes/error-handling.polonius.stderr
index ccd004003..c511081a8 100644
--- a/tests/ui/impl-trait/multiple-lifetimes/error-handling.polonius.stderr
+++ b/tests/ui/impl-trait/multiple-lifetimes/error-handling.polonius.stderr
@@ -11,5 +11,5 @@ LL | let _: &'b i32 = *u.0;
|
= help: consider adding the following bound: `'a: 'b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/impl-trait/multiple-lifetimes/error-handling.stderr b/tests/ui/impl-trait/multiple-lifetimes/error-handling.stderr
index 01d9f506a..00709ee74 100644
--- a/tests/ui/impl-trait/multiple-lifetimes/error-handling.stderr
+++ b/tests/ui/impl-trait/multiple-lifetimes/error-handling.stderr
@@ -11,5 +11,5 @@ LL | let _: &'b i32 = *u.0;
|
= help: consider adding the following bound: `'a: 'b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.stderr b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.stderr
index 68ac22a05..4d4ba58c9 100644
--- a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.stderr
+++ b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.stderr
@@ -14,6 +14,6 @@ help: to declare that `impl Trait<'d, 'e>` captures `'b`, you can add an explici
LL | fn upper_bounds<'a, 'b, 'c, 'd, 'e>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'d, 'e> + 'b
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0700`.
diff --git a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.stderr b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.stderr
index 493a9e66e..060eaa7e6 100644
--- a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.stderr
+++ b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.stderr
@@ -14,6 +14,6 @@ help: to declare that `impl Trait<'a, 'b>` captures `'b`, you can add an explici
LL | fn upper_bounds<'a, 'b>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'a, 'b> + 'b
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0700`.
diff --git a/tests/ui/impl-trait/negative-reasoning.stderr b/tests/ui/impl-trait/negative-reasoning.stderr
index ddce5e7ec..3cb4be16f 100644
--- a/tests/ui/impl-trait/negative-reasoning.stderr
+++ b/tests/ui/impl-trait/negative-reasoning.stderr
@@ -9,6 +9,6 @@ LL | impl AnotherTrait for D<OpaqueType> {
|
= note: upstream crates may add a new impl of trait `std::marker::FnPtr` for type `OpaqueType` in future versions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/impl-trait/nested-return-type4.stderr b/tests/ui/impl-trait/nested-return-type4.stderr
index a1e2d227f..14d51a1b0 100644
--- a/tests/ui/impl-trait/nested-return-type4.stderr
+++ b/tests/ui/impl-trait/nested-return-type4.stderr
@@ -17,6 +17,6 @@ help: to declare that `impl Sized` captures `'s`, you can add an explicit `'s` l
LL | fn test<'s: 's>(s: &'s str) -> impl std::future::Future<Output = impl Sized + 's> {
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0700`.
diff --git a/tests/ui/impl-trait/nested-rpit-hrtb-2.stderr b/tests/ui/impl-trait/nested-rpit-hrtb-2.stderr
index 71d1d45f4..0fcacc19c 100644
--- a/tests/ui/impl-trait/nested-rpit-hrtb-2.stderr
+++ b/tests/ui/impl-trait/nested-rpit-hrtb-2.stderr
@@ -7,6 +7,6 @@ LL | fn test() -> impl for<'a> Trait<'a, Assoc = impl Sized> {}
| | opaque type defined here
| hidden type `&'a str` captures the lifetime `'a` as defined here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0700`.
diff --git a/tests/ui/impl-trait/no-trait.stderr b/tests/ui/impl-trait/no-trait.stderr
index 3a636f252..a58fa5cd7 100644
--- a/tests/ui/impl-trait/no-trait.stderr
+++ b/tests/ui/impl-trait/no-trait.stderr
@@ -4,5 +4,5 @@ error: at least one trait must be specified
LL | fn f() -> impl 'static {}
| ^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/impl-trait/normalize-tait-in-const.stderr b/tests/ui/impl-trait/normalize-tait-in-const.stderr
index ada8fd7fa..e0513433b 100644
--- a/tests/ui/impl-trait/normalize-tait-in-const.stderr
+++ b/tests/ui/impl-trait/normalize-tait-in-const.stderr
@@ -4,5 +4,5 @@ error: ~const can only be applied to `#[const_trait]` traits
LL | const fn with_positive<F: ~const for<'a> Fn(&'a Alias<'a>) + ~const Destruct>(fun: F) {
| ^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/impl-trait/opaque-cast-field-access-in-future.stderr b/tests/ui/impl-trait/opaque-cast-field-access-in-future.stderr
index 234780534..5ade6a69d 100644
--- a/tests/ui/impl-trait/opaque-cast-field-access-in-future.stderr
+++ b/tests/ui/impl-trait/opaque-cast-field-access-in-future.stderr
@@ -6,6 +6,6 @@ LL | fn run() -> Foo<impl Future<Output = ()>> {
|
= note: cannot satisfy `_: Future`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/impl-trait/projection-mismatch-in-impl-where-clause.stderr b/tests/ui/impl-trait/projection-mismatch-in-impl-where-clause.stderr
index a4ff51047..c4ea44740 100644
--- a/tests/ui/impl-trait/projection-mismatch-in-impl-where-clause.stderr
+++ b/tests/ui/impl-trait/projection-mismatch-in-impl-where-clause.stderr
@@ -15,6 +15,6 @@ note: required for `()` to implement `Test`
LL | impl<T> Test for T where T: Super<Assoc = ()> {}
| ^^^^ ^ ---------- unsatisfied trait bound introduced here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/impl-trait/recursive-coroutine.stderr b/tests/ui/impl-trait/recursive-coroutine.current.stderr
index d36a58a86..e838634ed 100644
--- a/tests/ui/impl-trait/recursive-coroutine.stderr
+++ b/tests/ui/impl-trait/recursive-coroutine.current.stderr
@@ -1,5 +1,5 @@
error[E0720]: cannot resolve opaque type
- --> $DIR/recursive-coroutine.rs:5:13
+ --> $DIR/recursive-coroutine.rs:7:13
|
LL | fn foo() -> impl Coroutine<Yield = (), Return = ()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive opaque type
@@ -7,6 +7,6 @@ LL | fn foo() -> impl Coroutine<Yield = (), Return = ()> {
LL | let mut gen = Box::pin(foo());
| ------- coroutine captures itself here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0720`.
diff --git a/tests/ui/impl-trait/recursive-coroutine.next.stderr b/tests/ui/impl-trait/recursive-coroutine.next.stderr
new file mode 100644
index 000000000..e838634ed
--- /dev/null
+++ b/tests/ui/impl-trait/recursive-coroutine.next.stderr
@@ -0,0 +1,12 @@
+error[E0720]: cannot resolve opaque type
+ --> $DIR/recursive-coroutine.rs:7:13
+ |
+LL | fn foo() -> impl Coroutine<Yield = (), Return = ()> {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive opaque type
+...
+LL | let mut gen = Box::pin(foo());
+ | ------- coroutine captures itself here
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0720`.
diff --git a/tests/ui/impl-trait/recursive-coroutine.rs b/tests/ui/impl-trait/recursive-coroutine.rs
index 6351cef95..b82fe134a 100644
--- a/tests/ui/impl-trait/recursive-coroutine.rs
+++ b/tests/ui/impl-trait/recursive-coroutine.rs
@@ -1,3 +1,5 @@
+// revisions: current next
+//[next] compile-flags: -Znext-solver
#![feature(coroutines, coroutine_trait)]
use std::ops::{Coroutine, CoroutineState};
diff --git a/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr b/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr
index fe765271b..07ac1a37e 100644
--- a/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr
+++ b/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr
@@ -18,8 +18,8 @@ LL | fn eq(&self, _other: &(Foo, i32)) -> bool {
| expected `a::Bar`, found opaque type
| help: change the parameter type to match the trait: `&(a::Bar, i32)`
|
- = note: expected signature `fn(&a::Bar, &(a::Bar, i32)) -> _`
- found signature `fn(&a::Bar, &(a::Foo, i32)) -> _`
+ = note: expected signature `fn(&a::Bar, &(a::Bar, _)) -> _`
+ found signature `fn(&a::Bar, &(a::Foo, _)) -> _`
error: unconstrained opaque type
--> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:18:16
@@ -41,8 +41,8 @@ LL | fn eq(&self, _other: &(Bar, i32)) -> bool {
| expected opaque type, found `b::Bar`
| help: change the parameter type to match the trait: `&(b::Foo, i32)`
|
- = note: expected signature `fn(&b::Bar, &(b::Foo, i32)) -> _`
- found signature `fn(&b::Bar, &(b::Bar, i32)) -> _`
+ = note: expected signature `fn(&b::Bar, &(b::Foo, _)) -> _`
+ found signature `fn(&b::Bar, &(b::Bar, _)) -> _`
note: this item must have the opaque type in its signature in order to be able to register hidden types
--> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:24:12
|
diff --git a/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration.stderr b/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration.stderr
index b98b859a9..bc810c0f8 100644
--- a/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration.stderr
+++ b/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration.stderr
@@ -10,6 +10,6 @@ LL | Bar
= help: the trait `PartialEq<(Foo, i32)>` is not implemented for `Bar`
= help: the trait `PartialEq<(Bar, i32)>` is implemented for `Bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/impl-trait/region-escape-via-bound.stderr b/tests/ui/impl-trait/region-escape-via-bound.stderr
index e4556bc21..43f0eeeb5 100644
--- a/tests/ui/impl-trait/region-escape-via-bound.stderr
+++ b/tests/ui/impl-trait/region-escape-via-bound.stderr
@@ -14,6 +14,6 @@ help: to declare that `impl Trait<'y>` captures `'x`, you can add an explicit `'
LL | fn foo<'x, 'y>(x: Cell<&'x u32>) -> impl Trait<'y> + 'x
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0700`.
diff --git a/tests/ui/impl-trait/reveal-during-codegen.rs b/tests/ui/impl-trait/reveal-during-codegen.rs
index 11463772e..7b2ca9c33 100644
--- a/tests/ui/impl-trait/reveal-during-codegen.rs
+++ b/tests/ui/impl-trait/reveal-during-codegen.rs
@@ -1,6 +1,6 @@
// build-pass
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
fn test() -> Option<impl Sized> {
Some("")
diff --git a/tests/ui/impl-trait/rpit-not-sized.stderr b/tests/ui/impl-trait/rpit-not-sized.stderr
index 608c94fc0..7fe275f06 100644
--- a/tests/ui/impl-trait/rpit-not-sized.stderr
+++ b/tests/ui/impl-trait/rpit-not-sized.stderr
@@ -7,6 +7,6 @@ LL | fn foo() -> impl ?Sized {
= help: the trait `Sized` is not implemented for `impl ?Sized`
= note: the return type of a function must have a statically known size
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/impl-trait/suggest-calling-rpit-closure.stderr b/tests/ui/impl-trait/suggest-calling-rpit-closure.stderr
index c10a856d8..b0ae10b8d 100644
--- a/tests/ui/impl-trait/suggest-calling-rpit-closure.stderr
+++ b/tests/ui/impl-trait/suggest-calling-rpit-closure.stderr
@@ -16,6 +16,6 @@ help: use parentheses to call this opaque type
LL | opaque()()
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/impl-trait/two_tait_defining_each_other.stderr b/tests/ui/impl-trait/two_tait_defining_each_other.current.stderr
index 1a42ac525..b60529ed0 100644
--- a/tests/ui/impl-trait/two_tait_defining_each_other.stderr
+++ b/tests/ui/impl-trait/two_tait_defining_each_other.current.stderr
@@ -1,19 +1,19 @@
error: opaque type's hidden type cannot be another opaque type from the same scope
- --> $DIR/two_tait_defining_each_other.rs:12:5
+ --> $DIR/two_tait_defining_each_other.rs:16:5
|
LL | x // A's hidden type is `Bar`, because all the hidden types of `B` are compared with each other
| ^ one of the two opaque types used here has to be outside its defining scope
|
note: opaque type whose hidden type is being assigned
- --> $DIR/two_tait_defining_each_other.rs:4:10
+ --> $DIR/two_tait_defining_each_other.rs:8:10
|
LL | type B = impl Foo;
| ^^^^^^^^
note: opaque type being used as hidden type
- --> $DIR/two_tait_defining_each_other.rs:3:10
+ --> $DIR/two_tait_defining_each_other.rs:7:10
|
LL | type A = impl Foo;
| ^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/impl-trait/two_tait_defining_each_other.rs b/tests/ui/impl-trait/two_tait_defining_each_other.rs
index 6eb2a11b2..6a9e33500 100644
--- a/tests/ui/impl-trait/two_tait_defining_each_other.rs
+++ b/tests/ui/impl-trait/two_tait_defining_each_other.rs
@@ -1,3 +1,7 @@
+// revisions: current next
+//[next] compile-flags: -Znext-solver
+//[next] check-pass
+
#![feature(type_alias_impl_trait)]
type A = impl Foo;
@@ -10,7 +14,7 @@ fn muh(x: A) -> B {
return Bar; // B's hidden type is Bar
}
x // A's hidden type is `Bar`, because all the hidden types of `B` are compared with each other
- //~^ ERROR opaque type's hidden type cannot be another opaque type
+ //[current]~^ ERROR opaque type's hidden type cannot be another opaque type
}
struct Bar;
diff --git a/tests/ui/impl-trait/two_tait_defining_each_other2.stderr b/tests/ui/impl-trait/two_tait_defining_each_other2.current.stderr
index 4d8f96de1..33866451c 100644
--- a/tests/ui/impl-trait/two_tait_defining_each_other2.stderr
+++ b/tests/ui/impl-trait/two_tait_defining_each_other2.current.stderr
@@ -1,5 +1,5 @@
error: unconstrained opaque type
- --> $DIR/two_tait_defining_each_other2.rs:3:10
+ --> $DIR/two_tait_defining_each_other2.rs:5:10
|
LL | type A = impl Foo;
| ^^^^^^^^
@@ -7,18 +7,18 @@ LL | type A = impl Foo;
= note: `A` must be used in combination with a concrete type within the same module
error: opaque type's hidden type cannot be another opaque type from the same scope
- --> $DIR/two_tait_defining_each_other2.rs:9:5
+ --> $DIR/two_tait_defining_each_other2.rs:11:5
|
LL | x // B's hidden type is A (opaquely)
| ^ one of the two opaque types used here has to be outside its defining scope
|
note: opaque type whose hidden type is being assigned
- --> $DIR/two_tait_defining_each_other2.rs:4:10
+ --> $DIR/two_tait_defining_each_other2.rs:6:10
|
LL | type B = impl Foo;
| ^^^^^^^^
note: opaque type being used as hidden type
- --> $DIR/two_tait_defining_each_other2.rs:3:10
+ --> $DIR/two_tait_defining_each_other2.rs:5:10
|
LL | type A = impl Foo;
| ^^^^^^^^
diff --git a/tests/ui/impl-trait/two_tait_defining_each_other2.next.stderr b/tests/ui/impl-trait/two_tait_defining_each_other2.next.stderr
new file mode 100644
index 000000000..e49d1d18b
--- /dev/null
+++ b/tests/ui/impl-trait/two_tait_defining_each_other2.next.stderr
@@ -0,0 +1,9 @@
+error[E0284]: type annotations needed: cannot satisfy `A <: B`
+ --> $DIR/two_tait_defining_each_other2.rs:11:5
+ |
+LL | x // B's hidden type is A (opaquely)
+ | ^ cannot satisfy `A <: B`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0284`.
diff --git a/tests/ui/impl-trait/two_tait_defining_each_other2.rs b/tests/ui/impl-trait/two_tait_defining_each_other2.rs
index 05b096680..8a79af197 100644
--- a/tests/ui/impl-trait/two_tait_defining_each_other2.rs
+++ b/tests/ui/impl-trait/two_tait_defining_each_other2.rs
@@ -1,13 +1,16 @@
+// revisions: current next
+//[next] compile-flags: -Znext-solver
#![feature(type_alias_impl_trait)]
-type A = impl Foo; //~ ERROR unconstrained opaque type
+type A = impl Foo; //[current]~ ERROR unconstrained opaque type
type B = impl Foo;
trait Foo {}
fn muh(x: A) -> B {
x // B's hidden type is A (opaquely)
- //~^ ERROR opaque type's hidden type cannot be another opaque type
+ //[current]~^ ERROR opaque type's hidden type cannot be another opaque type
+ //[next]~^^ ERROR type annotations needed: cannot satisfy `A <: B`
}
struct Bar;
diff --git a/tests/ui/impl-trait/two_tait_defining_each_other3.stderr b/tests/ui/impl-trait/two_tait_defining_each_other3.current.stderr
index b06dc16d5..1dccfd17a 100644
--- a/tests/ui/impl-trait/two_tait_defining_each_other3.stderr
+++ b/tests/ui/impl-trait/two_tait_defining_each_other3.current.stderr
@@ -1,19 +1,19 @@
error: opaque type's hidden type cannot be another opaque type from the same scope
- --> $DIR/two_tait_defining_each_other3.rs:10:16
+ --> $DIR/two_tait_defining_each_other3.rs:13:16
|
LL | return x; // B's hidden type is A (opaquely)
| ^ one of the two opaque types used here has to be outside its defining scope
|
note: opaque type whose hidden type is being assigned
- --> $DIR/two_tait_defining_each_other3.rs:4:10
+ --> $DIR/two_tait_defining_each_other3.rs:7:10
|
LL | type B = impl Foo;
| ^^^^^^^^
note: opaque type being used as hidden type
- --> $DIR/two_tait_defining_each_other3.rs:3:10
+ --> $DIR/two_tait_defining_each_other3.rs:6:10
|
LL | type A = impl Foo;
| ^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/impl-trait/two_tait_defining_each_other3.rs b/tests/ui/impl-trait/two_tait_defining_each_other3.rs
index 37f8ae1b8..55def937f 100644
--- a/tests/ui/impl-trait/two_tait_defining_each_other3.rs
+++ b/tests/ui/impl-trait/two_tait_defining_each_other3.rs
@@ -1,3 +1,6 @@
+// revisions: current next
+//[next] compile-flags: -Znext-solver
+//[next] check-pass
#![feature(type_alias_impl_trait)]
type A = impl Foo;
@@ -8,7 +11,7 @@ trait Foo {}
fn muh(x: A) -> B {
if false {
return x; // B's hidden type is A (opaquely)
- //~^ ERROR opaque type's hidden type cannot be another opaque type
+ //[current]~^ ERROR opaque type's hidden type cannot be another opaque type
}
Bar // A's hidden type is `Bar`, because all the return types are compared with each other
}
diff --git a/tests/ui/impl-trait/type-arg-mismatch-due-to-impl-trait.stderr b/tests/ui/impl-trait/type-arg-mismatch-due-to-impl-trait.stderr
index 30322f88c..d3d651a28 100644
--- a/tests/ui/impl-trait/type-arg-mismatch-due-to-impl-trait.stderr
+++ b/tests/ui/impl-trait/type-arg-mismatch-due-to-impl-trait.stderr
@@ -10,6 +10,6 @@ LL | fn foo(&self, t: impl Clone) {}
| found 1 type parameter
| `impl Trait` introduces an implicit type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0049`.
diff --git a/tests/ui/impl-trait/type_parameters_captured.stderr b/tests/ui/impl-trait/type_parameters_captured.stderr
index 46859296f..28dfcd8b8 100644
--- a/tests/ui/impl-trait/type_parameters_captured.stderr
+++ b/tests/ui/impl-trait/type_parameters_captured.stderr
@@ -12,6 +12,6 @@ help: consider adding an explicit lifetime bound
LL | fn foo<T: 'static>(x: T) -> impl Any + 'static {
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0310`.
diff --git a/tests/ui/impl-trait/unactionable_diagnostic.stderr b/tests/ui/impl-trait/unactionable_diagnostic.stderr
index 4df7f45c3..be37da08e 100644
--- a/tests/ui/impl-trait/unactionable_diagnostic.stderr
+++ b/tests/ui/impl-trait/unactionable_diagnostic.stderr
@@ -12,6 +12,6 @@ help: consider adding an explicit lifetime bound
LL | pub fn bar<'t, T: 't>(
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0309`.
diff --git a/tests/ui/impl-trait/universal-mismatched-type.stderr b/tests/ui/impl-trait/universal-mismatched-type.stderr
index 82e0f2396..21da1d087 100644
--- a/tests/ui/impl-trait/universal-mismatched-type.stderr
+++ b/tests/ui/impl-trait/universal-mismatched-type.stderr
@@ -11,6 +11,6 @@ LL | x
= note: expected struct `String`
found type parameter `impl Debug`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/impl-trait/universal-two-impl-traits.stderr b/tests/ui/impl-trait/universal-two-impl-traits.stderr
index ab8a53d0d..3b4844ab1 100644
--- a/tests/ui/impl-trait/universal-two-impl-traits.stderr
+++ b/tests/ui/impl-trait/universal-two-impl-traits.stderr
@@ -15,6 +15,6 @@ LL | a = y;
= note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
= note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/impl-trait/universal_wrong_hrtb.stderr b/tests/ui/impl-trait/universal_wrong_hrtb.stderr
index b5a091b61..e07189279 100644
--- a/tests/ui/impl-trait/universal_wrong_hrtb.stderr
+++ b/tests/ui/impl-trait/universal_wrong_hrtb.stderr
@@ -4,5 +4,5 @@ error: `impl Trait` can only mention lifetimes from an fn or impl
LL | fn test_argument_position(x: impl for<'a> Trait<'a, Assoc = impl Copy + 'a>) {}
| -- lifetime declared here ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/impl-trait/variance.e2024.stderr b/tests/ui/impl-trait/variance.e2024.stderr
new file mode 100644
index 000000000..172450557
--- /dev/null
+++ b/tests/ui/impl-trait/variance.e2024.stderr
@@ -0,0 +1,26 @@
+error: [*, o]
+ --> $DIR/variance.rs:14:36
+ |
+LL | fn not_captured_early<'a: 'a>() -> impl Sized {}
+ | ^^^^^^^^^^
+
+error: [*, o]
+ --> $DIR/variance.rs:19:32
+ |
+LL | fn captured_early<'a: 'a>() -> impl Sized + Captures<'a> {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: [o]
+ --> $DIR/variance.rs:21:40
+ |
+LL | fn not_captured_late<'a>(_: &'a ()) -> impl Sized {}
+ | ^^^^^^^^^^
+
+error: [o]
+ --> $DIR/variance.rs:26:36
+ |
+LL | fn captured_late<'a>(_: &'a ()) -> impl Sized + Captures<'a> {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 4 previous errors
+
diff --git a/tests/ui/impl-trait/variance.new.stderr b/tests/ui/impl-trait/variance.new.stderr
new file mode 100644
index 000000000..172450557
--- /dev/null
+++ b/tests/ui/impl-trait/variance.new.stderr
@@ -0,0 +1,26 @@
+error: [*, o]
+ --> $DIR/variance.rs:14:36
+ |
+LL | fn not_captured_early<'a: 'a>() -> impl Sized {}
+ | ^^^^^^^^^^
+
+error: [*, o]
+ --> $DIR/variance.rs:19:32
+ |
+LL | fn captured_early<'a: 'a>() -> impl Sized + Captures<'a> {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: [o]
+ --> $DIR/variance.rs:21:40
+ |
+LL | fn not_captured_late<'a>(_: &'a ()) -> impl Sized {}
+ | ^^^^^^^^^^
+
+error: [o]
+ --> $DIR/variance.rs:26:36
+ |
+LL | fn captured_late<'a>(_: &'a ()) -> impl Sized + Captures<'a> {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 4 previous errors
+
diff --git a/tests/ui/impl-trait/variance.stderr b/tests/ui/impl-trait/variance.old.stderr
index 644736754..9410b54b4 100644
--- a/tests/ui/impl-trait/variance.stderr
+++ b/tests/ui/impl-trait/variance.old.stderr
@@ -1,23 +1,23 @@
error: [*]
- --> $DIR/variance.rs:8:36
+ --> $DIR/variance.rs:14:36
|
LL | fn not_captured_early<'a: 'a>() -> impl Sized {}
| ^^^^^^^^^^
error: [*, o]
- --> $DIR/variance.rs:10:32
+ --> $DIR/variance.rs:19:32
|
LL | fn captured_early<'a: 'a>() -> impl Sized + Captures<'a> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error: []
- --> $DIR/variance.rs:12:40
+ --> $DIR/variance.rs:21:40
|
LL | fn not_captured_late<'a>(_: &'a ()) -> impl Sized {}
| ^^^^^^^^^^
error: [o]
- --> $DIR/variance.rs:14:36
+ --> $DIR/variance.rs:26:36
|
LL | fn captured_late<'a>(_: &'a ()) -> impl Sized + Captures<'a> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/impl-trait/variance.rs b/tests/ui/impl-trait/variance.rs
index d6212f8f3..86da19085 100644
--- a/tests/ui/impl-trait/variance.rs
+++ b/tests/ui/impl-trait/variance.rs
@@ -1,3 +1,9 @@
+// revisions: old new e2024
+//[e2024] edition: 2024
+//[e2024] compile-flags: -Z unstable-options
+
+#![cfg_attr(new, feature(lifetime_capture_rules_2024))]
+
#![feature(rustc_attrs)]
#![allow(internal_features)]
#![rustc_variance_of_opaques]
@@ -5,11 +11,17 @@
trait Captures<'a> {}
impl<T> Captures<'_> for T {}
-fn not_captured_early<'a: 'a>() -> impl Sized {} //~ [*]
+fn not_captured_early<'a: 'a>() -> impl Sized {}
+//[old]~^ [*]
+//[new]~^^ [*, o]
+//[e2024]~^^^ [*, o]
fn captured_early<'a: 'a>() -> impl Sized + Captures<'a> {} //~ [*, o]
-fn not_captured_late<'a>(_: &'a ()) -> impl Sized {} //~ []
+fn not_captured_late<'a>(_: &'a ()) -> impl Sized {}
+//[old]~^ []
+//[new]~^^ [o]
+//[e2024]~^^^ [o]
fn captured_late<'a>(_: &'a ()) -> impl Sized + Captures<'a> {} //~ [o]
diff --git a/tests/ui/impl-trait/where-allowed-2.stderr b/tests/ui/impl-trait/where-allowed-2.stderr
index b3765ac1a..c421e587a 100644
--- a/tests/ui/impl-trait/where-allowed-2.stderr
+++ b/tests/ui/impl-trait/where-allowed-2.stderr
@@ -6,6 +6,6 @@ LL | fn in_adt_in_return() -> Vec<impl Debug> { panic!() }
|
= note: cannot satisfy `_: Debug`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/impl-unused-rps-in-assoc-type.stderr b/tests/ui/impl-unused-rps-in-assoc-type.stderr
index c7ad1b4e6..ef61fa4be 100644
--- a/tests/ui/impl-unused-rps-in-assoc-type.stderr
+++ b/tests/ui/impl-unused-rps-in-assoc-type.stderr
@@ -4,6 +4,6 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait,
LL | impl<'a> Fun for Holder {
| ^^ unconstrained lifetime parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0207`.
diff --git a/tests/ui/implicit-method-bind.stderr b/tests/ui/implicit-method-bind.stderr
index e0a968527..e9357113f 100644
--- a/tests/ui/implicit-method-bind.stderr
+++ b/tests/ui/implicit-method-bind.stderr
@@ -9,6 +9,6 @@ help: use parentheses to call the method
LL | let _f = 10i32.abs();
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0615`.
diff --git a/tests/ui/implied-bounds/assoc-ty-wf-used-to-get-assoc-ty.stderr b/tests/ui/implied-bounds/assoc-ty-wf-used-to-get-assoc-ty.stderr
index 307899297..92284df41 100644
--- a/tests/ui/implied-bounds/assoc-ty-wf-used-to-get-assoc-ty.stderr
+++ b/tests/ui/implied-bounds/assoc-ty-wf-used-to-get-assoc-ty.stderr
@@ -12,6 +12,6 @@ LL | let _: &'static u8 = test(&x, &&3);
LL | }
| - `x` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/implied-bounds/auxiliary/bevy_ecs.rs b/tests/ui/implied-bounds/auxiliary/bevy_ecs.rs
new file mode 100644
index 000000000..b373d39f4
--- /dev/null
+++ b/tests/ui/implied-bounds/auxiliary/bevy_ecs.rs
@@ -0,0 +1,18 @@
+// Related to Bevy regression #118553
+
+pub trait WorldQuery {}
+impl WorldQuery for &u8 {}
+
+pub struct Query<Q: WorldQuery>(Q);
+
+pub trait SystemParam {
+ type State;
+}
+impl<Q: WorldQuery + 'static> SystemParam for Query<Q> {
+ type State = ();
+ // `Q: 'static` is required because we need the TypeId of Q ...
+}
+
+pub struct ParamSet<T: SystemParam>(T)
+where
+ T::State: Sized;
diff --git a/tests/ui/implied-bounds/bevy_world_query.rs b/tests/ui/implied-bounds/bevy_world_query.rs
new file mode 100644
index 000000000..f8e646326
--- /dev/null
+++ b/tests/ui/implied-bounds/bevy_world_query.rs
@@ -0,0 +1,11 @@
+// aux-crate:bevy_ecs=bevy_ecs.rs
+// check-pass
+// Related to Bevy regression #118553
+
+extern crate bevy_ecs;
+
+use bevy_ecs::*;
+
+fn handler<'a>(_: ParamSet<Query<&'a u8>>) {}
+
+fn main() {}
diff --git a/tests/ui/implied-bounds/from-trait-impl.rs b/tests/ui/implied-bounds/from-trait-impl.rs
new file mode 100644
index 000000000..d13fddd9b
--- /dev/null
+++ b/tests/ui/implied-bounds/from-trait-impl.rs
@@ -0,0 +1,24 @@
+// check-pass
+// known-bug: #109628
+
+trait Trait {
+ type Assoc;
+}
+
+impl<X: 'static> Trait for (X,) {
+ type Assoc = ();
+}
+
+struct Foo<T: Trait>(T)
+where
+ T::Assoc: Clone; // any predicate using `T::Assoc` works here
+
+fn func1(foo: Foo<(&str,)>) {
+ let _: &'static str = foo.0.0;
+}
+
+trait TestTrait {}
+
+impl<X> TestTrait for [Foo<(X,)>; 1] {}
+
+fn main() {}
diff --git a/tests/ui/implied-bounds/gluon_salsa.rs b/tests/ui/implied-bounds/gluon_salsa.rs
new file mode 100644
index 000000000..98951af8a
--- /dev/null
+++ b/tests/ui/implied-bounds/gluon_salsa.rs
@@ -0,0 +1,31 @@
+// check-pass
+// Related to Bevy regression #118553
+
+pub trait QueryBase {
+ type Db;
+}
+
+pub trait AsyncQueryFunction<'f>: // 'f is important
+ QueryBase<Db = <Self as AsyncQueryFunction<'f>>::SendDb> // bound is important
+{
+ type SendDb;
+}
+
+pub struct QueryTable<'me, Q, DB> {
+ _q: Option<Q>,
+ _db: Option<DB>,
+ _marker: Option<&'me ()>,
+}
+
+impl<'me, Q> QueryTable<'me, Q, <Q as QueryBase>::Db>
+// projection is important
+// ^^^ removing 'me (and in QueryTable) gives a different error
+where
+ Q: for<'f> AsyncQueryFunction<'f>,
+{
+ pub fn get_async<'a>(&'a mut self) {
+ panic!();
+ }
+}
+
+fn main() {}
diff --git a/tests/ui/implied-bounds/hrlt-implied-trait-bounds-guard.rs b/tests/ui/implied-bounds/hrlt-implied-trait-bounds-guard.rs
index c177655c5..27c8f30ec 100644
--- a/tests/ui/implied-bounds/hrlt-implied-trait-bounds-guard.rs
+++ b/tests/ui/implied-bounds/hrlt-implied-trait-bounds-guard.rs
@@ -1,5 +1,5 @@
// A test exploiting the bug behind #25860 except with
-// implied trait bounds which currently don't exist without `-Ztrait-solver=chalk`.
+// implied trait bounds which currently don't exist.
use std::marker::PhantomData;
struct Foo<'a, 'b, T>(PhantomData<(&'a (), &'b (), T)>)
where
diff --git a/tests/ui/implied-bounds/impl-header-unnormalized-types.stderr b/tests/ui/implied-bounds/impl-header-unnormalized-types.stderr
index 88abd5f54..07cb0aecd 100644
--- a/tests/ui/implied-bounds/impl-header-unnormalized-types.stderr
+++ b/tests/ui/implied-bounds/impl-header-unnormalized-types.stderr
@@ -15,6 +15,6 @@ note: but the referenced data is only valid for the lifetime `'b` as defined her
LL | impl<'a, 'b> NeedsWf<'a, 'b> for Foo<<&'a &'b () as GoodBye>::Forget> {
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0491`.
diff --git a/tests/ui/implied-bounds/impl-implied-bounds-compatibility-unnormalized.rs b/tests/ui/implied-bounds/impl-implied-bounds-compatibility-unnormalized.rs
index 6ccbb5bb2..280856805 100644
--- a/tests/ui/implied-bounds/impl-implied-bounds-compatibility-unnormalized.rs
+++ b/tests/ui/implied-bounds/impl-implied-bounds-compatibility-unnormalized.rs
@@ -1,5 +1,3 @@
-#![deny(implied_bounds_entailment)]
-
trait Project {
type Ty;
}
@@ -11,8 +9,7 @@ trait Trait {
}
impl Trait for () {
fn get<'s>(s: &'s str, _: <&'static &'s () as Project>::Ty) -> &'static str {
- //~^ ERROR impl method assumes more implied bounds than the corresponding trait method
- //~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+ //~^ ERROR cannot infer an appropriate lifetime for lifetime parameter 's in generic type due to conflicting requirements
s
}
}
diff --git a/tests/ui/implied-bounds/impl-implied-bounds-compatibility-unnormalized.stderr b/tests/ui/implied-bounds/impl-implied-bounds-compatibility-unnormalized.stderr
index ebe07027d..c8d1614a7 100644
--- a/tests/ui/implied-bounds/impl-implied-bounds-compatibility-unnormalized.stderr
+++ b/tests/ui/implied-bounds/impl-implied-bounds-compatibility-unnormalized.stderr
@@ -1,31 +1,28 @@
-error: impl method assumes more implied bounds than the corresponding trait method
- --> $DIR/impl-implied-bounds-compatibility-unnormalized.rs:13:31
+error[E0495]: cannot infer an appropriate lifetime for lifetime parameter 's in generic type due to conflicting requirements
+ --> $DIR/impl-implied-bounds-compatibility-unnormalized.rs:11:5
|
LL | fn get<'s>(s: &'s str, _: <&'static &'s () as Project>::Ty) -> &'static str {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this type to make the impl signature compatible: `()`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = 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 #105572 <https://github.com/rust-lang/rust/issues/105572>
-note: the lint level is defined here
- --> $DIR/impl-implied-bounds-compatibility-unnormalized.rs:1:9
- |
-LL | #![deny(implied_bounds_entailment)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
-Future incompatibility report: Future breakage diagnostic:
-error: impl method assumes more implied bounds than the corresponding trait method
- --> $DIR/impl-implied-bounds-compatibility-unnormalized.rs:13:31
+note: first, the lifetime cannot outlive the lifetime `'s` as defined here...
+ --> $DIR/impl-implied-bounds-compatibility-unnormalized.rs:11:12
|
LL | fn get<'s>(s: &'s str, _: <&'static &'s () as Project>::Ty) -> &'static str {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this type to make the impl signature compatible: `()`
+ | ^^
+note: ...so that the method type is compatible with trait
+ --> $DIR/impl-implied-bounds-compatibility-unnormalized.rs:11:5
|
- = 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 #105572 <https://github.com/rust-lang/rust/issues/105572>
-note: the lint level is defined here
- --> $DIR/impl-implied-bounds-compatibility-unnormalized.rs:1:9
+LL | fn get<'s>(s: &'s str, _: <&'static &'s () as Project>::Ty) -> &'static str {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ = note: expected `fn(&'s _, ()) -> &'static _`
+ found `fn(&_, ()) -> &'static _`
+ = note: but, the lifetime must be valid for the static lifetime...
+note: ...so that the reference type `&'static &()` does not outlive the data it points at
+ --> $DIR/impl-implied-bounds-compatibility-unnormalized.rs:11:5
|
-LL | #![deny(implied_bounds_entailment)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn get<'s>(s: &'s str, _: <&'static &'s () as Project>::Ty) -> &'static str {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+For more information about this error, try `rustc --explain E0495`.
diff --git a/tests/ui/implied-bounds/impl-implied-bounds-compatibility.rs b/tests/ui/implied-bounds/impl-implied-bounds-compatibility.rs
index d097bc16a..7f3817b32 100644
--- a/tests/ui/implied-bounds/impl-implied-bounds-compatibility.rs
+++ b/tests/ui/implied-bounds/impl-implied-bounds-compatibility.rs
@@ -1,5 +1,3 @@
-#![deny(implied_bounds_entailment)]
-
use std::cell::RefCell;
pub struct MessageListeners<'a> {
@@ -12,8 +10,7 @@ pub trait MessageListenersInterface {
impl<'a> MessageListenersInterface for MessageListeners<'a> {
fn listeners<'b>(&'b self) -> &'a MessageListeners<'b> {
- //~^ ERROR impl method assumes more implied bounds than the corresponding trait method
- //~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+ //~^ ERROR cannot infer an appropriate lifetime for lifetime parameter 'b in generic type due to conflicting requirements
self
}
}
diff --git a/tests/ui/implied-bounds/impl-implied-bounds-compatibility.stderr b/tests/ui/implied-bounds/impl-implied-bounds-compatibility.stderr
index 43d3e058f..6a412eb5e 100644
--- a/tests/ui/implied-bounds/impl-implied-bounds-compatibility.stderr
+++ b/tests/ui/implied-bounds/impl-implied-bounds-compatibility.stderr
@@ -1,31 +1,32 @@
-error: impl method assumes more implied bounds than the corresponding trait method
- --> $DIR/impl-implied-bounds-compatibility.rs:14:35
+error[E0495]: cannot infer an appropriate lifetime for lifetime parameter 'b in generic type due to conflicting requirements
+ --> $DIR/impl-implied-bounds-compatibility.rs:12:5
|
LL | fn listeners<'b>(&'b self) -> &'a MessageListeners<'b> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this type to make the impl signature compatible: `&'b MessageListeners<'b>`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = 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 #105572 <https://github.com/rust-lang/rust/issues/105572>
-note: the lint level is defined here
- --> $DIR/impl-implied-bounds-compatibility.rs:1:9
+note: first, the lifetime cannot outlive the lifetime `'c` as defined here...
+ --> $DIR/impl-implied-bounds-compatibility.rs:12:5
|
-LL | #![deny(implied_bounds_entailment)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
-Future incompatibility report: Future breakage diagnostic:
-error: impl method assumes more implied bounds than the corresponding trait method
- --> $DIR/impl-implied-bounds-compatibility.rs:14:35
+LL | fn listeners<'b>(&'b self) -> &'a MessageListeners<'b> {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+note: ...so that the method type is compatible with trait
+ --> $DIR/impl-implied-bounds-compatibility.rs:12:5
|
LL | fn listeners<'b>(&'b self) -> &'a MessageListeners<'b> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this type to make the impl signature compatible: `&'b MessageListeners<'b>`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ = note: expected `fn(&'c MessageListeners<'_>) -> &'c MessageListeners<'c>`
+ found `fn(&MessageListeners<'_>) -> &'a MessageListeners<'_>`
+note: but, the lifetime must be valid for the lifetime `'a` as defined here...
+ --> $DIR/impl-implied-bounds-compatibility.rs:11:6
|
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #105572 <https://github.com/rust-lang/rust/issues/105572>
-note: the lint level is defined here
- --> $DIR/impl-implied-bounds-compatibility.rs:1:9
+LL | impl<'a> MessageListenersInterface for MessageListeners<'a> {
+ | ^^
+note: ...so that the reference type `&'a MessageListeners<'_>` does not outlive the data it points at
+ --> $DIR/impl-implied-bounds-compatibility.rs:12:5
|
-LL | #![deny(implied_bounds_entailment)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn listeners<'b>(&'b self) -> &'a MessageListeners<'b> {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+For more information about this error, try `rustc --explain E0495`.
diff --git a/tests/ui/implied-bounds/issue-100690.stderr b/tests/ui/implied-bounds/issue-100690.stderr
index ac9f7ab25..df069d875 100644
--- a/tests/ui/implied-bounds/issue-100690.stderr
+++ b/tests/ui/implied-bounds/issue-100690.stderr
@@ -6,8 +6,8 @@ LL | real_dispatch(f)
| |
| required by a bound introduced by this call
|
- = note: expected a closure with arguments `(&mut UIView<'a, T>,)`
- found a closure with arguments `(&mut UIView<'_, T>,)`
+ = note: expected a closure with arguments `(&mut UIView<'a, _>,)`
+ found a closure with arguments `(&mut UIView<'_, _>,)`
note: required by a bound in `real_dispatch`
--> $DIR/issue-100690.rs:9:8
|
@@ -17,6 +17,6 @@ LL | fn real_dispatch<T, F>(f: F) -> Result<(), io::Error>
LL | F: FnOnce(&mut UIView<T>) -> Result<(), io::Error> + Send + 'static,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `real_dispatch`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/implied-bounds/issue-110161.stderr b/tests/ui/implied-bounds/issue-110161.stderr
index 9e0188694..0b7363179 100644
--- a/tests/ui/implied-bounds/issue-110161.stderr
+++ b/tests/ui/implied-bounds/issue-110161.stderr
@@ -7,6 +7,6 @@ LL | type Ty;
LL | impl LtTrait for () {
| ^^^^^^^^^^^^^^^^^^^ missing `Ty` in implementation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/implied-bounds/normalization-nested.lifetime.stderr b/tests/ui/implied-bounds/normalization-nested.lifetime.stderr
index 898e5e951..e020230d8 100644
--- a/tests/ui/implied-bounds/normalization-nested.lifetime.stderr
+++ b/tests/ui/implied-bounds/normalization-nested.lifetime.stderr
@@ -1,11 +1,11 @@
error[E0759]: `fn` parameter has lifetime `'x` but it needs to satisfy a `'static` lifetime requirement
- --> $DIR/normalization-nested.rs:35:20
+ --> $DIR/normalization-nested.rs:35:28
|
-LL | pub fn test<'x>(_: Map<Vec<&'x ()>>, s: &'x str) -> &'static str {
- | ^^^^^^^^^^^^^^^^
- | |
- | this data with lifetime `'x`...
- | ...is used and required to live as long as `'static` here
+LL | pub fn test_wfcheck<'x>(_: Map<Vec<&'x ()>>) {}
+ | ^^^^^^^^^^^^^^^^
+ | |
+ | this data with lifetime `'x`...
+ | ...is used and required to live as long as `'static` here
|
note: `'static` lifetime requirement introduced by this bound
--> $DIR/normalization-nested.rs:33:14
@@ -13,6 +13,21 @@ note: `'static` lifetime requirement introduced by this bound
LL | I::Item: 'static;
| ^^^^^^^
-error: aborting due to previous error
+error[E0759]: `fn` parameter has lifetime `'x` but it needs to satisfy a `'static` lifetime requirement
+ --> $DIR/normalization-nested.rs:37:29
+ |
+LL | pub fn test_borrowck<'x>(_: Map<Vec<&'x ()>>, s: &'x str) -> &'static str {
+ | ^^^^^^^^^^^^^^^^
+ | |
+ | this data with lifetime `'x`...
+ | ...is used and required to live as long as `'static` here
+ |
+note: `'static` lifetime requirement introduced by this bound
+ --> $DIR/normalization-nested.rs:33:14
+ |
+LL | I::Item: 'static;
+ | ^^^^^^^
+
+error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0759`.
diff --git a/tests/ui/implied-bounds/normalization-nested.rs b/tests/ui/implied-bounds/normalization-nested.rs
index 5f1cbb3f6..87903783a 100644
--- a/tests/ui/implied-bounds/normalization-nested.rs
+++ b/tests/ui/implied-bounds/normalization-nested.rs
@@ -32,7 +32,9 @@ where
I: Iter,
I::Item: 'static;
-pub fn test<'x>(_: Map<Vec<&'x ()>>, s: &'x str) -> &'static str {
+pub fn test_wfcheck<'x>(_: Map<Vec<&'x ()>>) {}
+
+pub fn test_borrowck<'x>(_: Map<Vec<&'x ()>>, s: &'x str) -> &'static str {
s
}
diff --git a/tests/ui/implied-bounds/normalization-placeholder-leak.fail.stderr b/tests/ui/implied-bounds/normalization-placeholder-leak.fail.stderr
new file mode 100644
index 000000000..a591d0f5d
--- /dev/null
+++ b/tests/ui/implied-bounds/normalization-placeholder-leak.fail.stderr
@@ -0,0 +1,15 @@
+error[E0477]: the type `&'lt u8` does not fulfill the required lifetime
+ --> $DIR/normalization-placeholder-leak.rs:31:40
+ |
+LL | fn test_lifetime<'lt, T: Trait>(_: Foo<&'lt u8>) {}
+ | ^^^^^^^^^^^^
+
+error[E0477]: the type `<T as AnotherTrait>::Ty2<'lt>` does not fulfill the required lifetime
+ --> $DIR/normalization-placeholder-leak.rs:36:44
+ |
+LL | fn test_alias<'lt, T: AnotherTrait>(_: Foo<T::Ty2::<'lt>>) {}
+ | ^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0477`.
diff --git a/tests/ui/implied-bounds/normalization-placeholder-leak.rs b/tests/ui/implied-bounds/normalization-placeholder-leak.rs
new file mode 100644
index 000000000..5350dcbb2
--- /dev/null
+++ b/tests/ui/implied-bounds/normalization-placeholder-leak.rs
@@ -0,0 +1,56 @@
+// Because of #109628, when we compute the implied bounds from `Foo<X>`,
+// we incorrectly get `X: placeholder('x)`.
+// Make sure we ignore these bogus bounds and not use them for anything useful.
+//
+// revisions: fail pass
+// [fail] check-fail
+// [pass] check-pass
+
+trait Trait {
+ type Ty<'a> where Self: 'a;
+}
+
+impl<T> Trait for T {
+ type Ty<'a> = () where Self: 'a;
+}
+
+struct Foo<T: Trait>(T)
+where
+ for<'x> T::Ty<'x>: Sized;
+
+trait AnotherTrait {
+ type Ty2<'a>: 'a;
+}
+
+#[cfg(fail)]
+mod fail {
+ use super::*;
+
+ // implied_bound: `'lt: placeholder('x)`.
+ // don't use the bound to prove `'lt: 'static`.
+ fn test_lifetime<'lt, T: Trait>(_: Foo<&'lt u8>) {}
+ //[fail]~^ ERROR `&'lt u8` does not fulfill the required lifetime
+
+ // implied bound: `T::Ty2<'lt>: placeholder('x)`.
+ // don't use the bound to prove `T::Ty2<'lt>: 'static`.
+ fn test_alias<'lt, T: AnotherTrait>(_: Foo<T::Ty2::<'lt>>) {}
+ //[fail]~^ ERROR `<T as AnotherTrait>::Ty2<'lt>` does not fulfill the required lifetime
+}
+
+
+mod pass {
+ use super::*;
+
+ // implied_bound: 'static: placeholder('x).
+ // don't ice.
+ fn test_lifetime<T: Trait>(_: Foo<&'static u8>) {}
+
+ // implied bound: T::Ty2<'static>: placeholder('x).
+ // don't add the bound to the environment,
+ // otherwise we would fail to infer a value for `'_`.
+ fn test_alias<T: AnotherTrait>(_: Foo<T::Ty2::<'static>>) {
+ None::<&'static T::Ty2<'_>>;
+ }
+}
+
+fn main() {}
diff --git a/tests/ui/implied-bounds/normalization-preserve-equality.borrowck.stderr b/tests/ui/implied-bounds/normalization-preserve-equality.borrowck.stderr
new file mode 100644
index 000000000..96c76ca9a
--- /dev/null
+++ b/tests/ui/implied-bounds/normalization-preserve-equality.borrowck.stderr
@@ -0,0 +1,28 @@
+error: lifetime may not live long enough
+ --> $DIR/normalization-preserve-equality.rs:24:1
+ |
+LL | fn test_borrowck<'a, 'b>(_: (<Equal<'a, 'b> as Trait>::Ty, Equal<'a, 'b>)) {
+ | ^^^^^^^^^^^^^^^^^--^^--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | | | |
+ | | | lifetime `'b` defined here
+ | | lifetime `'a` defined here
+ | requires that `'a` must outlive `'b`
+ |
+ = help: consider adding the following bound: `'a: 'b`
+
+error: lifetime may not live long enough
+ --> $DIR/normalization-preserve-equality.rs:24:1
+ |
+LL | fn test_borrowck<'a, 'b>(_: (<Equal<'a, 'b> as Trait>::Ty, Equal<'a, 'b>)) {
+ | ^^^^^^^^^^^^^^^^^--^^--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | | | |
+ | | | lifetime `'b` defined here
+ | | lifetime `'a` defined here
+ | requires that `'b` must outlive `'a`
+ |
+ = help: consider adding the following bound: `'b: 'a`
+
+help: `'a` and `'b` must be the same: replace one with the other
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/implied-bounds/normalization-preserve-equality.rs b/tests/ui/implied-bounds/normalization-preserve-equality.rs
new file mode 100644
index 000000000..557c171e5
--- /dev/null
+++ b/tests/ui/implied-bounds/normalization-preserve-equality.rs
@@ -0,0 +1,28 @@
+// Both revisions should pass. `borrowck` revision is a bug!
+//
+// revisions: wfcheck borrowck
+// [wfcheck] check-pass
+// [borrowck] check-fail
+// [borrowck] known-bug: #106569
+
+struct Equal<'a, 'b>(&'a &'b (), &'b &'a ()); // implies 'a == 'b
+
+trait Trait {
+ type Ty;
+}
+
+impl<'x> Trait for Equal<'x, 'x> {
+ type Ty = ();
+}
+
+trait WfCheckTrait {}
+
+#[cfg(wfcheck)]
+impl<'a, 'b> WfCheckTrait for (<Equal<'a, 'b> as Trait>::Ty, Equal<'a, 'b>) {}
+
+#[cfg(borrowck)]
+fn test_borrowck<'a, 'b>(_: (<Equal<'a, 'b> as Trait>::Ty, Equal<'a, 'b>)) {
+ let _ = None::<Equal<'a, 'b>>;
+}
+
+fn main() {}
diff --git a/tests/ui/implied-bounds/references-err.stderr b/tests/ui/implied-bounds/references-err.stderr
index 6076eea3c..df83fce3b 100644
--- a/tests/ui/implied-bounds/references-err.stderr
+++ b/tests/ui/implied-bounds/references-err.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `DoesNotExist` in this scope
LL | type Assoc = DoesNotExist;
| ^^^^^^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/implied-bounds/sod_service_chain.rs b/tests/ui/implied-bounds/sod_service_chain.rs
new file mode 100644
index 000000000..f45ced71f
--- /dev/null
+++ b/tests/ui/implied-bounds/sod_service_chain.rs
@@ -0,0 +1,37 @@
+// check-pass
+// Related to crater regressions on #118553
+
+pub trait Debug {}
+
+pub trait Service {
+ type Input;
+ type Output;
+ type Error;
+}
+
+pub struct ServiceChain<P, S> {
+ prev: P,
+ service: S,
+}
+impl<P: Service, S: Service<Input = P::Output>> Service for ServiceChain<P, S>
+where
+ P::Error: 'static,
+ S::Error: 'static,
+{
+ type Input = P::Input;
+ type Output = S::Output;
+ type Error = ();
+}
+
+pub struct ServiceChainBuilder<P: Service, S: Service<Input = P::Output>> {
+ chain: ServiceChain<P, S>,
+}
+impl<P: Service, S: Service<Input = P::Output>> ServiceChainBuilder<P, S> {
+ pub fn next<NS: Service<Input = S::Output>>(
+ self,
+ ) -> ServiceChainBuilder<ServiceChain<P, S>, NS> {
+ panic!();
+ }
+}
+
+fn main() {}
diff --git a/tests/ui/imports/ambiguous-11.stderr b/tests/ui/imports/ambiguous-11.stderr
index 765d6afa8..5b7f3059e 100644
--- a/tests/ui/imports/ambiguous-11.stderr
+++ b/tests/ui/imports/ambiguous-11.stderr
@@ -18,6 +18,6 @@ LL | use ambiguous_11_extern::*;
| ^^^^^^^^^^^^^^^^^^^^^^
= help: consider adding an explicit import of `Error` to disambiguate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0659`.
diff --git a/tests/ui/imports/ambiguous-7.stderr b/tests/ui/imports/ambiguous-7.stderr
index 2c6b56c61..addc28ff5 100644
--- a/tests/ui/imports/ambiguous-7.stderr
+++ b/tests/ui/imports/ambiguous-7.stderr
@@ -18,6 +18,6 @@ LL | pub use t2::*;
| ^^^^^
= help: consider adding an explicit import of `Error` to disambiguate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0659`.
diff --git a/tests/ui/imports/ambiguous-8.stderr b/tests/ui/imports/ambiguous-8.stderr
index 32056fba6..11914efe9 100644
--- a/tests/ui/imports/ambiguous-8.stderr
+++ b/tests/ui/imports/ambiguous-8.stderr
@@ -18,6 +18,6 @@ LL | use ambiguous_8_extern::*;
| ^^^^^^^^^^^^^^^^^^^^^
= help: consider adding an explicit import of `Error` to disambiguate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0659`.
diff --git a/tests/ui/imports/double-import.stderr b/tests/ui/imports/double-import.stderr
index 82f5eb83e..73bb73e34 100644
--- a/tests/ui/imports/double-import.stderr
+++ b/tests/ui/imports/double-import.stderr
@@ -12,6 +12,6 @@ help: you can use `as` to change the binding name of the import
LL | use sub2::foo as other_foo;
| ~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0252`.
diff --git a/tests/ui/imports/extern-crate-used.stderr b/tests/ui/imports/extern-crate-used.stderr
index 1b9a2e472..982da0c91 100644
--- a/tests/ui/imports/extern-crate-used.stderr
+++ b/tests/ui/imports/extern-crate-used.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(unused_extern_crates)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/imports/extern-with-ambiguous-1.stderr b/tests/ui/imports/extern-with-ambiguous-1.stderr
index dca2b4ebe..ab4aeacbd 100644
--- a/tests/ui/imports/extern-with-ambiguous-1.stderr
+++ b/tests/ui/imports/extern-with-ambiguous-1.stderr
@@ -18,6 +18,6 @@ LL | use extern_with_ambiguous_1_extern::*;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: consider adding an explicit import of `error` to disambiguate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0659`.
diff --git a/tests/ui/imports/import-crate-var.stderr b/tests/ui/imports/import-crate-var.stderr
index f1f1dfbdb..41a8772d2 100644
--- a/tests/ui/imports/import-crate-var.stderr
+++ b/tests/ui/imports/import-crate-var.stderr
@@ -6,5 +6,5 @@ LL | m!();
|
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/imports/import-from-missing.stderr b/tests/ui/imports/import-from-missing.stderr
index 4254bfb5e..4020ec1b5 100644
--- a/tests/ui/imports/import-from-missing.stderr
+++ b/tests/ui/imports/import-from-missing.stderr
@@ -4,6 +4,6 @@ error[E0432]: unresolved import `spam::eggs`
LL | use spam::{ham, eggs};
| ^^^^ no `eggs` in `spam`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/imports/import-glob-0.stderr b/tests/ui/imports/import-glob-0.stderr
index 820ff1bb5..6a2837e77 100644
--- a/tests/ui/imports/import-glob-0.stderr
+++ b/tests/ui/imports/import-glob-0.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find function `f999` in this scope
LL | f999();
| ^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/imports/import-glob-circular.stderr b/tests/ui/imports/import-glob-circular.stderr
index 86bbea579..2eb268813 100644
--- a/tests/ui/imports/import-glob-circular.stderr
+++ b/tests/ui/imports/import-glob-circular.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find function `f1066` in this scope
LL | fn test() { f1066(); }
| ^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/imports/import-loop-2.stderr b/tests/ui/imports/import-loop-2.stderr
index 1abfcde03..1a95200a6 100644
--- a/tests/ui/imports/import-loop-2.stderr
+++ b/tests/ui/imports/import-loop-2.stderr
@@ -4,6 +4,6 @@ error[E0432]: unresolved import `a::x`
LL | pub use a::x;
| ^^^^ no `x` in `a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/imports/import-loop.stderr b/tests/ui/imports/import-loop.stderr
index b87bfb1be..8ad2d6be4 100644
--- a/tests/ui/imports/import-loop.stderr
+++ b/tests/ui/imports/import-loop.stderr
@@ -4,6 +4,6 @@ error[E0432]: unresolved import `y::x`
LL | pub use y::x;
| ^^^^ no `x` in `y`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/imports/import-prefix-macro-1.stderr b/tests/ui/imports/import-prefix-macro-1.stderr
index a6a5b1393..bdc0e85b4 100644
--- a/tests/ui/imports/import-prefix-macro-1.stderr
+++ b/tests/ui/imports/import-prefix-macro-1.stderr
@@ -9,5 +9,5 @@ LL | import! { a::b::c }
|
= note: this error originates in the macro `import` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/imports/import-prefix-macro-2.stderr b/tests/ui/imports/import-prefix-macro-2.stderr
index 23f8d5764..070186f2b 100644
--- a/tests/ui/imports/import-prefix-macro-2.stderr
+++ b/tests/ui/imports/import-prefix-macro-2.stderr
@@ -9,5 +9,5 @@ LL | import! { a::b::c }
|
= note: this error originates in the macro `import` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/imports/import-trait-method.stderr b/tests/ui/imports/import-trait-method.stderr
index 3c26907d3..9786eb52d 100644
--- a/tests/ui/imports/import-trait-method.stderr
+++ b/tests/ui/imports/import-trait-method.stderr
@@ -4,6 +4,6 @@ error[E0253]: `foo` is not directly importable
LL | use Foo::foo;
| ^^^^^^^^ cannot be imported directly
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0253`.
diff --git a/tests/ui/imports/import2.stderr b/tests/ui/imports/import2.stderr
index da888979c..55eea66fd 100644
--- a/tests/ui/imports/import2.stderr
+++ b/tests/ui/imports/import2.stderr
@@ -4,6 +4,6 @@ error[E0432]: unresolved import `baz::zed`
LL | use baz::zed::bar;
| ^^^ could not find `zed` in `baz`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/imports/import3.stderr b/tests/ui/imports/import3.stderr
index ca75c9c18..80b0a7f06 100644
--- a/tests/ui/imports/import3.stderr
+++ b/tests/ui/imports/import3.stderr
@@ -6,6 +6,6 @@ LL | use main::bar;
|
= help: consider adding `extern crate main` to use the `main` crate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/imports/import4.stderr b/tests/ui/imports/import4.stderr
index e0b478f1a..c99e83851 100644
--- a/tests/ui/imports/import4.stderr
+++ b/tests/ui/imports/import4.stderr
@@ -4,6 +4,6 @@ error[E0432]: unresolved import `a::foo`
LL | mod b { pub use a::foo; }
| ^^^^^^ no `foo` in `a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/imports/issue-109148.stderr b/tests/ui/imports/issue-109148.stderr
index 6cc1221cf..b7f1f69dc 100644
--- a/tests/ui/imports/issue-109148.stderr
+++ b/tests/ui/imports/issue-109148.stderr
@@ -9,5 +9,5 @@ LL | m!();
|
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/imports/issue-109343.stderr b/tests/ui/imports/issue-109343.stderr
index 8d9a3aee9..1b95fcf55 100644
--- a/tests/ui/imports/issue-109343.stderr
+++ b/tests/ui/imports/issue-109343.stderr
@@ -6,6 +6,6 @@ LL | pub use unresolved::f;
|
= help: consider adding `extern crate unresolved` to use the `unresolved` crate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/imports/issue-113953.stderr b/tests/ui/imports/issue-113953.stderr
index 70f91bd3c..9daa73a9f 100644
--- a/tests/ui/imports/issue-113953.stderr
+++ b/tests/ui/imports/issue-113953.stderr
@@ -4,6 +4,6 @@ error[E0432]: unresolved import `unresolved`
LL | use unresolved as u8;
| ^^^^^^^^^^^^^^^^ no external crate `unresolved`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/imports/issue-13404.stderr b/tests/ui/imports/issue-13404.stderr
index 1f50debb0..a77f399e7 100644
--- a/tests/ui/imports/issue-13404.stderr
+++ b/tests/ui/imports/issue-13404.stderr
@@ -4,6 +4,6 @@ error[E0432]: unresolved import `b::f`
LL | use b::f;
| ^^^^ no `f` in `b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/imports/issue-1697.stderr b/tests/ui/imports/issue-1697.stderr
index 019ef9ad5..840608ca2 100644
--- a/tests/ui/imports/issue-1697.stderr
+++ b/tests/ui/imports/issue-1697.stderr
@@ -6,6 +6,6 @@ LL | use unresolved::*;
|
= help: consider adding `extern crate unresolved` to use the `unresolved` crate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/imports/issue-28388-1.stderr b/tests/ui/imports/issue-28388-1.stderr
index 7f5e47aa8..8256f96c6 100644
--- a/tests/ui/imports/issue-28388-1.stderr
+++ b/tests/ui/imports/issue-28388-1.stderr
@@ -4,6 +4,6 @@ error[E0432]: unresolved import `foo`
LL | use foo::{};
| ^^^^^^^ no `foo` in the root
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/imports/issue-28388-2.stderr b/tests/ui/imports/issue-28388-2.stderr
index 1afaf622b..4eda57dd9 100644
--- a/tests/ui/imports/issue-28388-2.stderr
+++ b/tests/ui/imports/issue-28388-2.stderr
@@ -10,6 +10,6 @@ note: the module `n` is defined here
LL | mod n {}
| ^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/imports/issue-2937.stderr b/tests/ui/imports/issue-2937.stderr
index 428634828..15622f233 100644
--- a/tests/ui/imports/issue-2937.stderr
+++ b/tests/ui/imports/issue-2937.stderr
@@ -4,6 +4,6 @@ error[E0432]: unresolved import `m::f`
LL | use m::f as x;
| ^^^^^^^^^ no `f` in `m`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/imports/issue-32354-suggest-import-rename.stderr b/tests/ui/imports/issue-32354-suggest-import-rename.stderr
index 4c5875ba7..de9bdc4f2 100644
--- a/tests/ui/imports/issue-32354-suggest-import-rename.stderr
+++ b/tests/ui/imports/issue-32354-suggest-import-rename.stderr
@@ -12,6 +12,6 @@ help: you can use `as` to change the binding name of the import
LL | use extension2::ConstructorExtension as OtherConstructorExtension;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0252`.
diff --git a/tests/ui/imports/issue-32833.stderr b/tests/ui/imports/issue-32833.stderr
index 430cc0fda..332561eca 100644
--- a/tests/ui/imports/issue-32833.stderr
+++ b/tests/ui/imports/issue-32833.stderr
@@ -4,6 +4,6 @@ error[E0432]: unresolved import `bar::Foo`
LL | use bar::Foo;
| ^^^^^^^^ no `Foo` in `bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/imports/issue-36881.stderr b/tests/ui/imports/issue-36881.stderr
index 2e1b46860..e9b632d27 100644
--- a/tests/ui/imports/issue-36881.stderr
+++ b/tests/ui/imports/issue-36881.stderr
@@ -6,6 +6,6 @@ LL | use issue_36881_aux::Foo;
|
= help: consider adding `extern crate issue_36881_aux` to use the `issue_36881_aux` crate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/imports/issue-4366.stderr b/tests/ui/imports/issue-4366.stderr
index 4d5b392a7..e63399d55 100644
--- a/tests/ui/imports/issue-4366.stderr
+++ b/tests/ui/imports/issue-4366.stderr
@@ -9,6 +9,6 @@ help: consider importing this function
LL + use foo::foo;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/imports/issue-45799-bad-extern-crate-rename-suggestion-formatting.stderr b/tests/ui/imports/issue-45799-bad-extern-crate-rename-suggestion-formatting.stderr
index 25aca4cb7..80cea1a83 100644
--- a/tests/ui/imports/issue-45799-bad-extern-crate-rename-suggestion-formatting.stderr
+++ b/tests/ui/imports/issue-45799-bad-extern-crate-rename-suggestion-formatting.stderr
@@ -10,6 +10,6 @@ help: you can use `as` to change the binding name of the import
LL | extern crate std as other_std;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0259`.
diff --git a/tests/ui/imports/issue-45829/import-twice.stderr b/tests/ui/imports/issue-45829/import-twice.stderr
index 656b011bc..b19d5d8f7 100644
--- a/tests/ui/imports/issue-45829/import-twice.stderr
+++ b/tests/ui/imports/issue-45829/import-twice.stderr
@@ -8,6 +8,6 @@ LL | use foo::{A, A};
|
= note: `A` must be defined only once in the type namespace of this module
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0252`.
diff --git a/tests/ui/imports/issue-45829/issue-45829.stderr b/tests/ui/imports/issue-45829/issue-45829.stderr
index e9a9d47ce..627a09a07 100644
--- a/tests/ui/imports/issue-45829/issue-45829.stderr
+++ b/tests/ui/imports/issue-45829/issue-45829.stderr
@@ -12,6 +12,6 @@ help: you can use `as` to change the binding name of the import
LL | use foo::{A, B as OtherA};
| ~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0252`.
diff --git a/tests/ui/imports/issue-45829/rename-extern-vs-use.stderr b/tests/ui/imports/issue-45829/rename-extern-vs-use.stderr
index 98fd8a623..8f2f7bbac 100644
--- a/tests/ui/imports/issue-45829/rename-extern-vs-use.stderr
+++ b/tests/ui/imports/issue-45829/rename-extern-vs-use.stderr
@@ -12,6 +12,6 @@ help: you can use `as` to change the binding name of the import
LL | extern crate issue_45829_b as other_bar;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0254`.
diff --git a/tests/ui/imports/issue-45829/rename-extern-with-tab.stderr b/tests/ui/imports/issue-45829/rename-extern-with-tab.stderr
index 2c4e8ce99..ae26d1fd0 100644
--- a/tests/ui/imports/issue-45829/rename-extern-with-tab.stderr
+++ b/tests/ui/imports/issue-45829/rename-extern-with-tab.stderr
@@ -12,6 +12,6 @@ help: you can use `as` to change the binding name of the import
LL | extern crate issue_45829_b as other_issue_45829_a;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0259`.
diff --git a/tests/ui/imports/issue-45829/rename-extern.stderr b/tests/ui/imports/issue-45829/rename-extern.stderr
index 209ae2201..46560ef92 100644
--- a/tests/ui/imports/issue-45829/rename-extern.stderr
+++ b/tests/ui/imports/issue-45829/rename-extern.stderr
@@ -12,6 +12,6 @@ help: you can use `as` to change the binding name of the import
LL | extern crate issue_45829_b as other_issue_45829_a;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0259`.
diff --git a/tests/ui/imports/issue-45829/rename-use-vs-extern.stderr b/tests/ui/imports/issue-45829/rename-use-vs-extern.stderr
index dfb5810c4..9b0a2534a 100644
--- a/tests/ui/imports/issue-45829/rename-use-vs-extern.stderr
+++ b/tests/ui/imports/issue-45829/rename-use-vs-extern.stderr
@@ -12,6 +12,6 @@ help: you can use `as` to change the binding name of the import
LL | use std as other_issue_45829_b;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0254`.
diff --git a/tests/ui/imports/issue-45829/rename-use-with-tabs.stderr b/tests/ui/imports/issue-45829/rename-use-with-tabs.stderr
index 5a63af588..5751f41ae 100644
--- a/tests/ui/imports/issue-45829/rename-use-with-tabs.stderr
+++ b/tests/ui/imports/issue-45829/rename-use-with-tabs.stderr
@@ -12,6 +12,6 @@ help: you can use `as` to change the binding name of the import
LL | use foo::{A, bar::B as OtherA};
| ~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0252`.
diff --git a/tests/ui/imports/issue-45829/rename-with-path.stderr b/tests/ui/imports/issue-45829/rename-with-path.stderr
index 2d26b0838..69e084db6 100644
--- a/tests/ui/imports/issue-45829/rename-with-path.stderr
+++ b/tests/ui/imports/issue-45829/rename-with-path.stderr
@@ -12,6 +12,6 @@ help: you can use `as` to change the binding name of the import
LL | use std::{collections::HashMap as A, sync::Arc as OtherA};
| ~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0252`.
diff --git a/tests/ui/imports/issue-45829/rename.stderr b/tests/ui/imports/issue-45829/rename.stderr
index ed185ae2a..f1ee5112d 100644
--- a/tests/ui/imports/issue-45829/rename.stderr
+++ b/tests/ui/imports/issue-45829/rename.stderr
@@ -12,6 +12,6 @@ help: you can use `as` to change the binding name of the import
LL | use std as other_core;
| ~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0252`.
diff --git a/tests/ui/imports/issue-47623.stderr b/tests/ui/imports/issue-47623.stderr
index 53968a296..be42a4a5b 100644
--- a/tests/ui/imports/issue-47623.stderr
+++ b/tests/ui/imports/issue-47623.stderr
@@ -4,6 +4,6 @@ error[E0429]: `self` imports are only allowed within a { } list
LL | use self;
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0429`.
diff --git a/tests/ui/imports/issue-53512.stderr b/tests/ui/imports/issue-53512.stderr
index 05fe111b3..6bcba1ad4 100644
--- a/tests/ui/imports/issue-53512.stderr
+++ b/tests/ui/imports/issue-53512.stderr
@@ -4,6 +4,6 @@ error[E0432]: unresolved import `m::assert`
LL | use m::assert;
| ^^^^^^^^^ no `assert` in `m`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/imports/issue-55884-1.stderr b/tests/ui/imports/issue-55884-1.stderr
index c38166dde..ae8edb049 100644
--- a/tests/ui/imports/issue-55884-1.stderr
+++ b/tests/ui/imports/issue-55884-1.stderr
@@ -18,6 +18,6 @@ LL | pub use self::m2::*;
| ^^^^^^^^^^^
= help: consider adding an explicit import of `S` to disambiguate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0659`.
diff --git a/tests/ui/imports/issue-55884-2.stderr b/tests/ui/imports/issue-55884-2.stderr
index 67d411414..8a9d5f2a6 100644
--- a/tests/ui/imports/issue-55884-2.stderr
+++ b/tests/ui/imports/issue-55884-2.stderr
@@ -13,18 +13,22 @@ note: ...and refers to the struct import `ParseOptions` which is defined here...
--> $DIR/issue-55884-2.rs:13:9
|
LL | pub use parser::ParseOptions;
- | ^^^^^^^^^^^^^^^^^^^^ consider importing it directly
+ | ^^^^^^^^^^^^^^^^^^^^ you could import this re-export
note: ...and refers to the struct import `ParseOptions` which is defined here...
--> $DIR/issue-55884-2.rs:6:13
|
LL | pub use options::*;
- | ^^^^^^^^^^ consider importing it directly
+ | ^^^^^^^^^^ you could import this re-export
note: ...and refers to the struct `ParseOptions` which is defined here
--> $DIR/issue-55884-2.rs:2:5
|
LL | pub struct ParseOptions {}
- | ^^^^^^^^^^^^^^^^^^^^^^^ consider importing it directly
+ | ^^^^^^^^^^^^^^^^^^^^^^^ you could import this directly
+help: import `ParseOptions` through the re-export
+ |
+LL | pub use parser::ParseOptions;
+ | ~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/imports/issue-57015.stderr b/tests/ui/imports/issue-57015.stderr
index 5374ba3dc..f1ae78452 100644
--- a/tests/ui/imports/issue-57015.stderr
+++ b/tests/ui/imports/issue-57015.stderr
@@ -9,6 +9,6 @@ help: consider importing this module instead
LL | use glob_ok::something;
| ~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/imports/issue-57539.stderr b/tests/ui/imports/issue-57539.stderr
index 88cc42ccf..c8473cc85 100644
--- a/tests/ui/imports/issue-57539.stderr
+++ b/tests/ui/imports/issue-57539.stderr
@@ -15,6 +15,6 @@ LL | use crate::*;
= help: consider adding an explicit import of `core` to disambiguate
= help: or use `self::core` to refer to this module unambiguously
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0659`.
diff --git a/tests/ui/imports/issue-81413.stderr b/tests/ui/imports/issue-81413.stderr
index e2dfe02bc..c2a321250 100644
--- a/tests/ui/imports/issue-81413.stderr
+++ b/tests/ui/imports/issue-81413.stderr
@@ -6,6 +6,6 @@ LL | pub use doesnt_exist::*;
|
= help: consider adding `extern crate doesnt_exist` to use the `doesnt_exist` crate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/imports/issue-85992.stderr b/tests/ui/imports/issue-85992.stderr
index 810d41009..6c75b45d9 100644
--- a/tests/ui/imports/issue-85992.stderr
+++ b/tests/ui/imports/issue-85992.stderr
@@ -4,6 +4,6 @@ error[E0432]: unresolved import `crate::issue_85992_extern_2`
LL | use crate::issue_85992_extern_2;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `issue_85992_extern_2` in the root
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/imports/issue-8640.stderr b/tests/ui/imports/issue-8640.stderr
index ab44f067f..ea350e97e 100644
--- a/tests/ui/imports/issue-8640.stderr
+++ b/tests/ui/imports/issue-8640.stderr
@@ -12,6 +12,6 @@ help: you can use `as` to change the binding name of the import
LL | use baz::bar as other_bar;
| ~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0255`.
diff --git a/tests/ui/imports/issue-99695-b.stderr b/tests/ui/imports/issue-99695-b.stderr
index b6f5c726a..d58d27987 100644
--- a/tests/ui/imports/issue-99695-b.stderr
+++ b/tests/ui/imports/issue-99695-b.stderr
@@ -11,6 +11,6 @@ LL ~ use ::nu;
LL ~ pub use self::p::{other_item as _};
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/imports/issue-99695.stderr b/tests/ui/imports/issue-99695.stderr
index 0ef762e1c..536f51dcb 100644
--- a/tests/ui/imports/issue-99695.stderr
+++ b/tests/ui/imports/issue-99695.stderr
@@ -11,6 +11,6 @@ LL ~ use ::nu;
LL ~ pub use self::{other_item as _};
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/imports/no-pub-reexports-but-used.rs b/tests/ui/imports/no-pub-reexports-but-used.rs
new file mode 100644
index 000000000..28991bde8
--- /dev/null
+++ b/tests/ui/imports/no-pub-reexports-but-used.rs
@@ -0,0 +1,15 @@
+// check-pass
+// https://github.com/rust-lang/rust/issues/115966
+
+mod m {
+ pub(crate) type A = u8;
+}
+
+#[warn(unused_imports)] //~ NOTE: the lint level is defined here
+pub use m::*;
+//~^ WARNING: glob import doesn't reexport anything with visibility `pub` because no imported item is public enough
+//~| NOTE: the most public imported item is `pub(crate)`
+
+fn main() {
+ let _: A;
+}
diff --git a/tests/ui/imports/no-pub-reexports-but-used.stderr b/tests/ui/imports/no-pub-reexports-but-used.stderr
new file mode 100644
index 000000000..b693dea19
--- /dev/null
+++ b/tests/ui/imports/no-pub-reexports-but-used.stderr
@@ -0,0 +1,20 @@
+warning: glob import doesn't reexport anything with visibility `pub` because no imported item is public enough
+ --> $DIR/no-pub-reexports-but-used.rs:9:9
+ |
+LL | pub use m::*;
+ | ^^^^
+ |
+note: the most public imported item is `pub(crate)`
+ --> $DIR/no-pub-reexports-but-used.rs:9:9
+ |
+LL | pub use m::*;
+ | ^^^^
+ = help: reduce the glob import's visibility or increase visibility of imported items
+note: the lint level is defined here
+ --> $DIR/no-pub-reexports-but-used.rs:8:8
+ |
+LL | #[warn(unused_imports)]
+ | ^^^^^^^^^^^^^^
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/imports/no-std-inject.stderr b/tests/ui/imports/no-std-inject.stderr
index 8e2268048..597ecdce9 100644
--- a/tests/ui/imports/no-std-inject.stderr
+++ b/tests/ui/imports/no-std-inject.stderr
@@ -10,6 +10,6 @@ help: you can use `as` to change the binding name of the import
LL | extern crate core as other_core;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0259`.
diff --git a/tests/ui/imports/overlapping_pub_trait.stderr b/tests/ui/imports/overlapping_pub_trait.stderr
index 490dccd3e..a82a4101c 100644
--- a/tests/ui/imports/overlapping_pub_trait.stderr
+++ b/tests/ui/imports/overlapping_pub_trait.stderr
@@ -15,6 +15,6 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f
LL + use overlapping_pub_trait_source::m::Tr;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/imports/private-std-reexport-suggest-public.fixed b/tests/ui/imports/private-std-reexport-suggest-public.fixed
new file mode 100644
index 000000000..b6fd22f5d
--- /dev/null
+++ b/tests/ui/imports/private-std-reexport-suggest-public.fixed
@@ -0,0 +1,9 @@
+// run-rustfix
+#![allow(unused_imports)]
+fn main() {
+ use std::mem; //~ ERROR module import `mem` is private
+}
+
+pub mod foo {
+ use std::mem;
+}
diff --git a/tests/ui/imports/private-std-reexport-suggest-public.rs b/tests/ui/imports/private-std-reexport-suggest-public.rs
new file mode 100644
index 000000000..1247055af
--- /dev/null
+++ b/tests/ui/imports/private-std-reexport-suggest-public.rs
@@ -0,0 +1,9 @@
+// run-rustfix
+#![allow(unused_imports)]
+fn main() {
+ use foo::mem; //~ ERROR module import `mem` is private
+}
+
+pub mod foo {
+ use std::mem;
+}
diff --git a/tests/ui/imports/private-std-reexport-suggest-public.stderr b/tests/ui/imports/private-std-reexport-suggest-public.stderr
new file mode 100644
index 000000000..222553235
--- /dev/null
+++ b/tests/ui/imports/private-std-reexport-suggest-public.stderr
@@ -0,0 +1,23 @@
+error[E0603]: module import `mem` is private
+ --> $DIR/private-std-reexport-suggest-public.rs:4:14
+ |
+LL | use foo::mem;
+ | ^^^ private module import
+ |
+note: the module import `mem` is defined here...
+ --> $DIR/private-std-reexport-suggest-public.rs:8:9
+ |
+LL | use std::mem;
+ | ^^^^^^^^
+note: ...and refers to the module `mem` which is defined here
+ --> $SRC_DIR/std/src/lib.rs:LL:COL
+ |
+ = note: you could import this directly
+help: import `mem` through the re-export
+ |
+LL | use std::mem;
+ | ~~~~~~~~
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/imports/reexports.rs b/tests/ui/imports/reexports.rs
index cb1a3ebe1..2a1a62834 100644
--- a/tests/ui/imports/reexports.rs
+++ b/tests/ui/imports/reexports.rs
@@ -9,7 +9,7 @@ mod a {
//~^ ERROR cannot be re-exported
//~| WARNING unused import: `super::foo`
pub use super::*;
- //~^ WARNING glob import doesn't reexport anything because no candidate is public enough
+ //~^ WARNING glob import doesn't reexport anything with visibility `pub` because no imported item is public enough
//~| WARNING unused import: `super::*`
}
}
diff --git a/tests/ui/imports/reexports.stderr b/tests/ui/imports/reexports.stderr
index 401e422af..bf4ba4748 100644
--- a/tests/ui/imports/reexports.stderr
+++ b/tests/ui/imports/reexports.stderr
@@ -56,11 +56,18 @@ note: the lint level is defined here
LL | #![warn(unused_imports)]
| ^^^^^^^^^^^^^^
-warning: glob import doesn't reexport anything because no candidate is public enough
+warning: glob import doesn't reexport anything with visibility `pub` because no imported item is public enough
--> $DIR/reexports.rs:11:17
|
LL | pub use super::*;
| ^^^^^^^^
+ |
+note: the most public imported item is `pub(a)`
+ --> $DIR/reexports.rs:11:17
+ |
+LL | pub use super::*;
+ | ^^^^^^^^
+ = help: reduce the glob import's visibility or increase visibility of imported items
warning: unused import: `super::*`
--> $DIR/reexports.rs:11:17
diff --git a/tests/ui/imports/resolve-other-libc.stderr b/tests/ui/imports/resolve-other-libc.stderr
index e57b88e50..81fe12946 100644
--- a/tests/ui/imports/resolve-other-libc.stderr
+++ b/tests/ui/imports/resolve-other-libc.stderr
@@ -4,5 +4,5 @@ error: extern location for libc does not exist: test.rlib
LL | extern crate libc;
| ^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/imports/rfc-1560-warning-cycle.stderr b/tests/ui/imports/rfc-1560-warning-cycle.stderr
index fd7e99165..8a83e5813 100644
--- a/tests/ui/imports/rfc-1560-warning-cycle.stderr
+++ b/tests/ui/imports/rfc-1560-warning-cycle.stderr
@@ -18,6 +18,6 @@ LL | use bar::*;
| ^^^^^^
= help: consider adding an explicit import of `Foo` to disambiguate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0659`.
diff --git a/tests/ui/imports/unnamed_pub_trait.stderr b/tests/ui/imports/unnamed_pub_trait.stderr
index 5133273c2..41772b8e6 100644
--- a/tests/ui/imports/unnamed_pub_trait.stderr
+++ b/tests/ui/imports/unnamed_pub_trait.stderr
@@ -15,6 +15,6 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f
LL + use unnamed_pub_trait_source::prelude::*; // trait Tr
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/imports/unused-import-issue-87973.stderr b/tests/ui/imports/unused-import-issue-87973.stderr
index 81b7ea791..a43e92b14 100644
--- a/tests/ui/imports/unused-import-issue-87973.stderr
+++ b/tests/ui/imports/unused-import-issue-87973.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(unused_imports)]
| ^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/imports/unused.stderr b/tests/ui/imports/unused.stderr
index 08128d794..a76c3c87a 100644
--- a/tests/ui/imports/unused.stderr
+++ b/tests/ui/imports/unused.stderr
@@ -11,5 +11,5 @@ LL | #![deny(unused)]
| ^^^^^^
= note: `#[deny(unused_imports)]` implied by `#[deny(unused)]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/indexing/index-bot.stderr b/tests/ui/indexing/index-bot.stderr
index bf231c92c..dca57f3d5 100644
--- a/tests/ui/indexing/index-bot.stderr
+++ b/tests/ui/indexing/index-bot.stderr
@@ -4,6 +4,6 @@ error[E0608]: cannot index into a value of type `!`
LL | (return)[0];
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0608`.
diff --git a/tests/ui/indexing/index-help.stderr b/tests/ui/indexing/index-help.stderr
index 2cb212a01..4ec28ddf8 100644
--- a/tests/ui/indexing/index-help.stderr
+++ b/tests/ui/indexing/index-help.stderr
@@ -9,6 +9,6 @@ LL | x[0i32];
= help: for that trait implementation, expected `usize`, found `i32`
= note: required for `Vec<{integer}>` to implement `Index<i32>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/indexing/index_message.stderr b/tests/ui/indexing/index_message.stderr
index 80f2bd523..6affb1ed9 100644
--- a/tests/ui/indexing/index_message.stderr
+++ b/tests/ui/indexing/index_message.stderr
@@ -4,6 +4,6 @@ error[E0608]: cannot index into a value of type `({integer},)`
LL | let _ = z[0];
| ^^^ help: to access tuple elements, use: `.0`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0608`.
diff --git a/tests/ui/indexing/indexing-requires-a-uint.stderr b/tests/ui/indexing/indexing-requires-a-uint.stderr
index 6ea6bb600..3041c2c99 100644
--- a/tests/ui/indexing/indexing-requires-a-uint.stderr
+++ b/tests/ui/indexing/indexing-requires-a-uint.stderr
@@ -8,6 +8,8 @@ LL | [0][0u8];
= help: the trait `SliceIndex<[{integer}]>` is implemented for `usize`
= help: for that trait implementation, expected `usize`, found `u8`
= note: required for `[{integer}]` to implement `Index<u8>`
+ = note: 1 redundant requirement hidden
+ = note: required for `[{integer}; 1]` to implement `Index<u8>`
error[E0308]: mismatched types
--> $DIR/indexing-requires-a-uint.rs:12:18
diff --git a/tests/ui/indexing/point-at-index-for-obligation-failure.rs b/tests/ui/indexing/point-at-index-for-obligation-failure.rs
new file mode 100644
index 000000000..e9c429b53
--- /dev/null
+++ b/tests/ui/indexing/point-at-index-for-obligation-failure.rs
@@ -0,0 +1,7 @@
+fn main() {
+ let a = std::collections::HashMap::<String,String>::new();
+ let s = "hello";
+ let _b = a[
+ &s //~ ERROR E0277
+ ];
+}
diff --git a/tests/ui/indexing/point-at-index-for-obligation-failure.stderr b/tests/ui/indexing/point-at-index-for-obligation-failure.stderr
new file mode 100644
index 000000000..4cced2278
--- /dev/null
+++ b/tests/ui/indexing/point-at-index-for-obligation-failure.stderr
@@ -0,0 +1,13 @@
+error[E0277]: the trait bound `String: Borrow<&str>` is not satisfied
+ --> $DIR/point-at-index-for-obligation-failure.rs:5:9
+ |
+LL | &s
+ | ^^ the trait `Borrow<&str>` is not implemented for `String`
+ |
+ = help: the trait `Borrow<str>` is implemented for `String`
+ = help: for that trait implementation, expected `str`, found `&str`
+ = note: required for `HashMap<String, String>` to implement `Index<&&str>`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/inference/ambiguous_type_parameter.stderr b/tests/ui/inference/ambiguous_type_parameter.stderr
index 9cbe221de..0674deb63 100644
--- a/tests/ui/inference/ambiguous_type_parameter.stderr
+++ b/tests/ui/inference/ambiguous_type_parameter.stderr
@@ -9,6 +9,6 @@ help: try using a fully qualified path to specify the expected types
LL | <InMemoryStore as Store<String, HashMap<K, String>>>::get_raw(&InMemoryStore, &String::default());
| +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/inference/cannot-infer-async.stderr b/tests/ui/inference/cannot-infer-async.stderr
index 0579cf238..346109fd5 100644
--- a/tests/ui/inference/cannot-infer-async.stderr
+++ b/tests/ui/inference/cannot-infer-async.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic arguments
LL | Ok::<(), E>(())
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/inference/cannot-infer-closure-circular.stderr b/tests/ui/inference/cannot-infer-closure-circular.stderr
index 98639f307..e3cf0cca8 100644
--- a/tests/ui/inference/cannot-infer-closure-circular.stderr
+++ b/tests/ui/inference/cannot-infer-closure-circular.stderr
@@ -12,6 +12,6 @@ help: consider giving this closure parameter an explicit type, where the type fo
LL | let x = |r: Result<(), E>| {
| +++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/inference/cannot-infer-closure.stderr b/tests/ui/inference/cannot-infer-closure.stderr
index a4b818e6e..507a70c1b 100644
--- a/tests/ui/inference/cannot-infer-closure.stderr
+++ b/tests/ui/inference/cannot-infer-closure.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic arguments
LL | Ok::<(), E>(b)
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/inference/cannot-infer-partial-try-return.stderr b/tests/ui/inference/cannot-infer-partial-try-return.stderr
index 888c321bc..ff4d7418a 100644
--- a/tests/ui/inference/cannot-infer-partial-try-return.stderr
+++ b/tests/ui/inference/cannot-infer-partial-try-return.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic arguments
LL | Ok::<(), QualifiedError<_>>(())
| +++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/inference/inference_unstable_featured.stderr b/tests/ui/inference/inference_unstable_featured.stderr
index dc43abf52..b908c7142 100644
--- a/tests/ui/inference/inference_unstable_featured.stderr
+++ b/tests/ui/inference/inference_unstable_featured.stderr
@@ -15,6 +15,6 @@ help: disambiguate the method for candidate #2
LL | assert_eq!(IpuItertools::ipu_flatten(&'x'), 0);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0034`.
diff --git a/tests/ui/inference/inference_unstable_forced.stderr b/tests/ui/inference/inference_unstable_forced.stderr
index a1c4cd851..2301eacc5 100644
--- a/tests/ui/inference/inference_unstable_forced.stderr
+++ b/tests/ui/inference/inference_unstable_forced.stderr
@@ -7,6 +7,6 @@ LL | assert_eq!('x'.ipu_flatten(), 0);
= note: see issue #99999 <https://github.com/rust-lang/rust/issues/99999> for more information
= help: add `#![feature(ipu_flatten)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/inference/issue-103587.stderr b/tests/ui/inference/issue-103587.stderr
index b373fbfbb..589cb7ea7 100644
--- a/tests/ui/inference/issue-103587.stderr
+++ b/tests/ui/inference/issue-103587.stderr
@@ -26,14 +26,10 @@ error[E0308]: mismatched types
LL | if None = x { }
| ^^^^^^^^ expected `bool`, found `()`
|
-help: you might have meant to use pattern matching
+help: consider adding `let`
|
LL | if let None = x { }
| +++
-help: you might have meant to compare for equality
- |
-LL | if None == x { }
- | +
error: aborting due to 3 previous errors
diff --git a/tests/ui/inference/issue-104649.stderr b/tests/ui/inference/issue-104649.stderr
index 281932927..afece9609 100644
--- a/tests/ui/inference/issue-104649.stderr
+++ b/tests/ui/inference/issue-104649.stderr
@@ -9,6 +9,6 @@ help: consider giving `a` an explicit type, where the type for type parameter `E
LL | let a: A<std::result::Result<std::result::Result<(), E>, Error>> = A(Result::Ok(Result::Ok(())));
| +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/inference/issue-113354.stderr b/tests/ui/inference/issue-113354.stderr
index 045a5aa7b..27cc7a332 100644
--- a/tests/ui/inference/issue-113354.stderr
+++ b/tests/ui/inference/issue-113354.stderr
@@ -9,6 +9,6 @@ help: consider adding `let`
LL | let _ = || { while let Some(_) = Some(1) { } };
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/inference/issue-70082.stderr b/tests/ui/inference/issue-70082.stderr
index 47229a5fe..442e7479a 100644
--- a/tests/ui/inference/issue-70082.stderr
+++ b/tests/ui/inference/issue-70082.stderr
@@ -12,6 +12,6 @@ help: try using a fully qualified path to specify the expected types
LL | let y: f64 = 0.01f64 * <i16 as Into<T>>::into(1i16);
| +++++++++++++++++++++++ ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0284`.
diff --git a/tests/ui/inference/issue-71309.stderr b/tests/ui/inference/issue-71309.stderr
index af8714f1c..673649c76 100644
--- a/tests/ui/inference/issue-71309.stderr
+++ b/tests/ui/inference/issue-71309.stderr
@@ -10,6 +10,6 @@ help: you can convert an `i32` to a `u32` and panic if the converted value doesn
LL | let y: u32 = x?.try_into().unwrap();
| ++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/inference/issue-71584.stderr b/tests/ui/inference/issue-71584.stderr
index 22c0f113d..391d3e761 100644
--- a/tests/ui/inference/issue-71584.stderr
+++ b/tests/ui/inference/issue-71584.stderr
@@ -12,6 +12,6 @@ help: try using a fully qualified path to specify the expected types
LL | d = d % <u32 as Into<T>>::into(n);
| +++++++++++++++++++++++ ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0284`.
diff --git a/tests/ui/inference/issue-71732.stderr b/tests/ui/inference/issue-71732.stderr
index e89e4dca6..af8b310fd 100644
--- a/tests/ui/inference/issue-71732.stderr
+++ b/tests/ui/inference/issue-71732.stderr
@@ -17,6 +17,6 @@ help: consider specifying the generic argument
LL | .get::<Q>(&"key".into())
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/inference/issue-80816.stderr b/tests/ui/inference/issue-80816.stderr
index 80c0c8abe..ab62db8e6 100644
--- a/tests/ui/inference/issue-80816.stderr
+++ b/tests/ui/inference/issue-80816.stderr
@@ -24,6 +24,6 @@ help: try using a fully qualified path to specify the expected types
LL | let guard: Guard<Arc<usize>> = <Arc<ArcSwapAny<Arc<usize>>> as Access<T>>::load(&s);
| ++++++++++++++++++++++++++++++++++++++++++++++++++ ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/inference/issue-83606.stderr b/tests/ui/inference/issue-83606.stderr
index 97ed53fb3..00de4029e 100644
--- a/tests/ui/inference/issue-83606.stderr
+++ b/tests/ui/inference/issue-83606.stderr
@@ -9,6 +9,6 @@ help: consider giving this pattern a type, where the value of const parameter `N
LL | let _: [usize; N] = foo("foo");
| ++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/inference/issue-86162-1.stderr b/tests/ui/inference/issue-86162-1.stderr
index 4f621b82d..fe3cee771 100644
--- a/tests/ui/inference/issue-86162-1.stderr
+++ b/tests/ui/inference/issue-86162-1.stderr
@@ -17,6 +17,6 @@ help: consider specifying the generic argument
LL | foo(gen::<T>()); //<- Do not suggest `foo::<impl Clone>()`!
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/inference/issue-86162-2.stderr b/tests/ui/inference/issue-86162-2.stderr
index 9aff2cec1..7b45b1966 100644
--- a/tests/ui/inference/issue-86162-2.stderr
+++ b/tests/ui/inference/issue-86162-2.stderr
@@ -17,6 +17,6 @@ help: consider specifying the generic argument
LL | Foo::bar(gen::<T>()); //<- Do not suggest `Foo::bar::<impl Clone>()`!
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/inference/multiple-impl-apply.stderr b/tests/ui/inference/multiple-impl-apply.stderr
index ec49e1520..1a81955e1 100644
--- a/tests/ui/inference/multiple-impl-apply.stderr
+++ b/tests/ui/inference/multiple-impl-apply.stderr
@@ -18,6 +18,6 @@ help: consider giving `y` an explicit type
LL | let y: /* Type */ = x.into();
| ++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/inference/need_type_info/concrete-impl.stderr b/tests/ui/inference/need_type_info/concrete-impl.stderr
index 6b86753ca..7b400fd17 100644
--- a/tests/ui/inference/need_type_info/concrete-impl.stderr
+++ b/tests/ui/inference/need_type_info/concrete-impl.stderr
@@ -13,6 +13,6 @@ LL |
LL | impl Ambiguous<Two> for Struct {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/inference/need_type_info/do-not-suggest-generic-arguments-for-turbofish.stderr b/tests/ui/inference/need_type_info/do-not-suggest-generic-arguments-for-turbofish.stderr
index 2ad35ab03..fcac537a9 100644
--- a/tests/ui/inference/need_type_info/do-not-suggest-generic-arguments-for-turbofish.stderr
+++ b/tests/ui/inference/need_type_info/do-not-suggest-generic-arguments-for-turbofish.stderr
@@ -4,6 +4,6 @@ error[E0282]: type annotations needed
LL | OhNo::C::<u32, _>;
| ^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `U` declared on the enum `OhNo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/inference/need_type_info/expr-struct-type-relative-enum.stderr b/tests/ui/inference/need_type_info/expr-struct-type-relative-enum.stderr
index 68ecb3813..dfbdc3266 100644
--- a/tests/ui/inference/need_type_info/expr-struct-type-relative-enum.stderr
+++ b/tests/ui/inference/need_type_info/expr-struct-type-relative-enum.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic argument
LL | needs_infer::<T>();
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/inference/need_type_info/expr-struct-type-relative-gat.stderr b/tests/ui/inference/need_type_info/expr-struct-type-relative-gat.stderr
index cbc2477de..c72529f71 100644
--- a/tests/ui/inference/need_type_info/expr-struct-type-relative-gat.stderr
+++ b/tests/ui/inference/need_type_info/expr-struct-type-relative-gat.stderr
@@ -4,6 +4,6 @@ error[E0282]: type annotations needed
LL | Self::Output::Simple {};
| ^^^^^^^^^^^^ cannot infer type for type parameter `T` declared on the associated type `Output`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/inference/need_type_info/expr-struct-type-relative.stderr b/tests/ui/inference/need_type_info/expr-struct-type-relative.stderr
index 397d8e7be..333c93859 100644
--- a/tests/ui/inference/need_type_info/expr-struct-type-relative.stderr
+++ b/tests/ui/inference/need_type_info/expr-struct-type-relative.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic argument
LL | needs_infer::<T>();
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/inference/need_type_info/infer-var-for-self-param.stderr b/tests/ui/inference/need_type_info/infer-var-for-self-param.stderr
index 36d754693..aeebf68e6 100644
--- a/tests/ui/inference/need_type_info/infer-var-for-self-param.stderr
+++ b/tests/ui/inference/need_type_info/infer-var-for-self-param.stderr
@@ -9,6 +9,6 @@ help: use a fully-qualified path to a specific available implementation
LL | let _ = (</* self type */ as Default>::default(),);
| +++++++++++++++++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0790`.
diff --git a/tests/ui/inference/need_type_info/issue-103053.stderr b/tests/ui/inference/need_type_info/issue-103053.stderr
index 84f0475d8..ed389393a 100644
--- a/tests/ui/inference/need_type_info/issue-103053.stderr
+++ b/tests/ui/inference/need_type_info/issue-103053.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic argument
LL | None::<T>;
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/inference/need_type_info/issue-107745-avoid-expr-from-macro-expansion.stderr b/tests/ui/inference/need_type_info/issue-107745-avoid-expr-from-macro-expansion.stderr
index 464655bbc..3de317d2a 100644
--- a/tests/ui/inference/need_type_info/issue-107745-avoid-expr-from-macro-expansion.stderr
+++ b/tests/ui/inference/need_type_info/issue-107745-avoid-expr-from-macro-expansion.stderr
@@ -6,6 +6,6 @@ LL | println!("{:?}", []);
|
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/inference/need_type_info/issue-113264-incorrect-impl-trait-in-path-suggestion.stderr b/tests/ui/inference/need_type_info/issue-113264-incorrect-impl-trait-in-path-suggestion.stderr
index 9ca94cd58..455304524 100644
--- a/tests/ui/inference/need_type_info/issue-113264-incorrect-impl-trait-in-path-suggestion.stderr
+++ b/tests/ui/inference/need_type_info/issue-113264-incorrect-impl-trait-in-path-suggestion.stderr
@@ -17,6 +17,6 @@ help: consider specifying the generic argument
LL | (S {}).owo(None::<&_>)
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/inference/need_type_info/self-ty-in-path.stderr b/tests/ui/inference/need_type_info/self-ty-in-path.stderr
index 04b521dbd..d65192778 100644
--- a/tests/ui/inference/need_type_info/self-ty-in-path.stderr
+++ b/tests/ui/inference/need_type_info/self-ty-in-path.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic argument
LL | Self::func_a::<U>();
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/inference/need_type_info/type-alias-indirect.stderr b/tests/ui/inference/need_type_info/type-alias-indirect.stderr
index 6161690df..535c0044a 100644
--- a/tests/ui/inference/need_type_info/type-alias-indirect.stderr
+++ b/tests/ui/inference/need_type_info/type-alias-indirect.stderr
@@ -4,6 +4,6 @@ error[E0282]: type annotations needed
LL | IndirectAlias::new();
| ^^^^^^^^^^^^^ cannot infer type for type parameter `T` declared on the type alias `IndirectAlias`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/inference/question-mark-type-infer.stderr b/tests/ui/inference/question-mark-type-infer.stderr
index 52baa2133..45303a2c8 100644
--- a/tests/ui/inference/question-mark-type-infer.stderr
+++ b/tests/ui/inference/question-mark-type-infer.stderr
@@ -12,6 +12,6 @@ help: consider specifying the generic argument
LL | l.iter().map(f).collect::<Vec<_>>()?
| ++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/inference/type-infer-generalize-ty-var.rs b/tests/ui/inference/type-infer-generalize-ty-var.rs
index 8b4a8c32b..6bf3c61ad 100644
--- a/tests/ui/inference/type-infer-generalize-ty-var.rs
+++ b/tests/ui/inference/type-infer-generalize-ty-var.rs
@@ -1,6 +1,6 @@
// check-pass
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
#![allow(non_upper_case_globals)]
#![allow(dead_code)]
diff --git a/tests/ui/infinite/infinite-alias.stderr b/tests/ui/infinite/infinite-alias.stderr
index 9d9265f8c..3862c1139 100644
--- a/tests/ui/infinite/infinite-alias.stderr
+++ b/tests/ui/infinite/infinite-alias.stderr
@@ -9,6 +9,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | struct Rec(Box<Wrapper<Rec>>);
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/infinite/infinite-instantiation.polonius.stderr b/tests/ui/infinite/infinite-instantiation.polonius.stderr
index 29eb8c481..f048c942f 100644
--- a/tests/ui/infinite/infinite-instantiation.polonius.stderr
+++ b/tests/ui/infinite/infinite-instantiation.polonius.stderr
@@ -11,5 +11,5 @@ LL | fn function<T:ToOpt + Clone>(counter: usize, t: T) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: the full type name has been written to '$TEST_BUILD_DIR/infinite/infinite-instantiation.polonius/infinite-instantiation.long-type.txt'
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/infinite/infinite-instantiation.stderr b/tests/ui/infinite/infinite-instantiation.stderr
index 951e0f587..43d267fa4 100644
--- a/tests/ui/infinite/infinite-instantiation.stderr
+++ b/tests/ui/infinite/infinite-instantiation.stderr
@@ -11,5 +11,5 @@ LL | fn function<T:ToOpt + Clone>(counter: usize, t: T) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: the full type name has been written to '$TEST_BUILD_DIR/infinite/infinite-instantiation/infinite-instantiation.long-type.txt'
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/infinite/infinite-macro-expansion.stderr b/tests/ui/infinite/infinite-macro-expansion.stderr
index 15654dfaf..08fb4fa77 100644
--- a/tests/ui/infinite/infinite-macro-expansion.stderr
+++ b/tests/ui/infinite/infinite-macro-expansion.stderr
@@ -10,5 +10,5 @@ LL | recursive!()
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`infinite_macro_expansion`)
= note: this error originates in the macro `recursive` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/infinite/infinite-recursion-const-fn.stderr b/tests/ui/infinite/infinite-recursion-const-fn.stderr
index 53b603a47..fd5a3c3c5 100644
--- a/tests/ui/infinite/infinite-recursion-const-fn.stderr
+++ b/tests/ui/infinite/infinite-recursion-const-fn.stderr
@@ -645,6 +645,6 @@ note: inside `ARR::{constant#0}`
LL | const ARR: [i32; a()] = [5; 6];
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/infinite/infinite-tag-type-recursion.stderr b/tests/ui/infinite/infinite-tag-type-recursion.stderr
index 513bbfc1b..4ca408260 100644
--- a/tests/ui/infinite/infinite-tag-type-recursion.stderr
+++ b/tests/ui/infinite/infinite-tag-type-recursion.stderr
@@ -9,6 +9,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | enum MList { Cons(isize, Box<MList>), Nil }
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/infinite/infinite-trait-alias-recursion.stderr b/tests/ui/infinite/infinite-trait-alias-recursion.stderr
index 39d7aa4c1..220d81031 100644
--- a/tests/ui/infinite/infinite-trait-alias-recursion.stderr
+++ b/tests/ui/infinite/infinite-trait-alias-recursion.stderr
@@ -23,6 +23,6 @@ LL | trait T1 = T2;
| ^^^^^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/infinite/infinite-type-alias-mutual-recursion.gated.stderr b/tests/ui/infinite/infinite-type-alias-mutual-recursion.gated.stderr
index ec63688fa..57ca1b24d 100644
--- a/tests/ui/infinite/infinite-type-alias-mutual-recursion.gated.stderr
+++ b/tests/ui/infinite/infinite-type-alias-mutual-recursion.gated.stderr
@@ -31,6 +31,6 @@ LL | | fn main() {}
| |____________^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/infinite/infinite-vec-type-recursion.feature.stderr b/tests/ui/infinite/infinite-vec-type-recursion.feature.stderr
index 3a1462159..3aac0d7d1 100644
--- a/tests/ui/infinite/infinite-vec-type-recursion.feature.stderr
+++ b/tests/ui/infinite/infinite-vec-type-recursion.feature.stderr
@@ -6,6 +6,6 @@ LL | type X = Vec<X>;
|
= note: in case this is a recursive type alias, consider using a struct, enum, or union instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/infinite/infinite-vec-type-recursion.gated.stderr b/tests/ui/infinite/infinite-vec-type-recursion.gated.stderr
index e47d9b652..efafc9b75 100644
--- a/tests/ui/infinite/infinite-vec-type-recursion.gated.stderr
+++ b/tests/ui/infinite/infinite-vec-type-recursion.gated.stderr
@@ -21,6 +21,6 @@ LL | | fn main() { let b: X = Vec::new(); }
| |____________________________________^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/infinite/issue-41731-infinite-macro-print.stderr b/tests/ui/infinite/issue-41731-infinite-macro-print.stderr
index e30b2039d..71510816d 100644
--- a/tests/ui/infinite/issue-41731-infinite-macro-print.stderr
+++ b/tests/ui/infinite/issue-41731-infinite-macro-print.stderr
@@ -14,13 +14,13 @@ LL | stack!("overflow");
| ^^^^^^^^^^^^^^^^^^
|
= note: expanding `stack! { "overflow" }`
- = note: to `print! (stack! ("overflow")) ;`
+ = note: to `print! (stack! ("overflow"));`
= note: expanding `print! { stack! ("overflow") }`
- = note: to `{ $crate :: io :: _print($crate :: format_args! (stack! ("overflow"))) ; }`
+ = note: to `{ $crate :: io :: _print($crate :: format_args! (stack! ("overflow"))); }`
= note: expanding `stack! { "overflow" }`
- = note: to `print! (stack! ("overflow")) ;`
+ = note: to `print! (stack! ("overflow"));`
= note: expanding `print! { stack! ("overflow") }`
- = note: to `{ $crate :: io :: _print($crate :: format_args! (stack! ("overflow"))) ; }`
+ = note: to `{ $crate :: io :: _print($crate :: format_args! (stack! ("overflow"))); }`
error: format argument must be a string literal
--> $DIR/issue-41731-infinite-macro-print.rs:14:5
diff --git a/tests/ui/infinite/issue-41731-infinite-macro-println.stderr b/tests/ui/infinite/issue-41731-infinite-macro-println.stderr
index 66b466daf..645176d45 100644
--- a/tests/ui/infinite/issue-41731-infinite-macro-println.stderr
+++ b/tests/ui/infinite/issue-41731-infinite-macro-println.stderr
@@ -14,13 +14,13 @@ LL | stack!("overflow");
| ^^^^^^^^^^^^^^^^^^
|
= note: expanding `stack! { "overflow" }`
- = note: to `println! (stack! ("overflow")) ;`
+ = note: to `println! (stack! ("overflow"));`
= note: expanding `println! { stack! ("overflow") }`
- = note: to `{ $crate :: io :: _print($crate :: format_args_nl! (stack! ("overflow"))) ; }`
+ = note: to `{ $crate :: io :: _print($crate :: format_args_nl! (stack! ("overflow"))); }`
= note: expanding `stack! { "overflow" }`
- = note: to `println! (stack! ("overflow")) ;`
+ = note: to `println! (stack! ("overflow"));`
= note: expanding `println! { stack! ("overflow") }`
- = note: to `{ $crate :: io :: _print($crate :: format_args_nl! (stack! ("overflow"))) ; }`
+ = note: to `{ $crate :: io :: _print($crate :: format_args_nl! (stack! ("overflow"))); }`
error: format argument must be a string literal
--> $DIR/issue-41731-infinite-macro-println.rs:14:5
diff --git a/tests/ui/inline-const/const-expr-generic-err2.stderr b/tests/ui/inline-const/const-expr-generic-err2.stderr
index 00b716cd2..5876a6c9e 100644
--- a/tests/ui/inline-const/const-expr-generic-err2.stderr
+++ b/tests/ui/inline-const/const-expr-generic-err2.stderr
@@ -6,5 +6,5 @@ LL | let _ = [0u8; const { std::mem::size_of::<T>() }];
|
= note: this may fail depending on what value the parameter takes
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/inline-const/const-expr-lifetime-err.stderr b/tests/ui/inline-const/const-expr-lifetime-err.stderr
index 443fcf89c..75877bc09 100644
--- a/tests/ui/inline-const/const-expr-lifetime-err.stderr
+++ b/tests/ui/inline-const/const-expr-lifetime-err.stderr
@@ -14,6 +14,6 @@ LL |
LL | }
| - `y` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/inline-const/expr-unsafe-err.mir.stderr b/tests/ui/inline-const/expr-unsafe-err.mir.stderr
index 1bec41e2e..ebd18f89d 100644
--- a/tests/ui/inline-const/expr-unsafe-err.mir.stderr
+++ b/tests/ui/inline-const/expr-unsafe-err.mir.stderr
@@ -6,6 +6,6 @@ LL | require_unsafe();
|
= note: consult the function's documentation for information on how to avoid undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/inline-const/expr-unsafe-err.thir.stderr b/tests/ui/inline-const/expr-unsafe-err.thir.stderr
index c971e8afb..45f850d1f 100644
--- a/tests/ui/inline-const/expr-unsafe-err.thir.stderr
+++ b/tests/ui/inline-const/expr-unsafe-err.thir.stderr
@@ -6,6 +6,6 @@ LL | require_unsafe();
|
= note: consult the function's documentation for information on how to avoid undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/inline-const/expr-with-block-err.stderr b/tests/ui/inline-const/expr-with-block-err.stderr
index 6f7408f4e..a46d73950 100644
--- a/tests/ui/inline-const/expr-with-block-err.stderr
+++ b/tests/ui/inline-const/expr-with-block-err.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | const { 2 } - const { 1 };
| ^ expected `()`, found integer
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/inline-const/pat-match-fndef.stderr b/tests/ui/inline-const/pat-match-fndef.stderr
index c94782b17..02c4a60b6 100644
--- a/tests/ui/inline-const/pat-match-fndef.stderr
+++ b/tests/ui/inline-const/pat-match-fndef.stderr
@@ -13,5 +13,5 @@ error: `fn() {uwu}` cannot be used in patterns
LL | const { uwu } => {}
| ^^^^^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/inline-const/promotion.stderr b/tests/ui/inline-const/promotion.stderr
index 795fc8f59..7f06b9781 100644
--- a/tests/ui/inline-const/promotion.stderr
+++ b/tests/ui/inline-const/promotion.stderr
@@ -9,6 +9,6 @@ LL |
LL | }
| - temporary value is freed at the end of this statement
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/inline-const/required-const.stderr b/tests/ui/inline-const/required-const.stderr
index d6948e7ac..cd8602018 100644
--- a/tests/ui/inline-const/required-const.stderr
+++ b/tests/ui/inline-const/required-const.stderr
@@ -6,6 +6,6 @@ LL | const { panic!() }
|
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/inline-disallow-on-variant.stderr b/tests/ui/inline-disallow-on-variant.stderr
index 1b176579b..255f6bc6a 100644
--- a/tests/ui/inline-disallow-on-variant.stderr
+++ b/tests/ui/inline-disallow-on-variant.stderr
@@ -7,6 +7,6 @@ LL |
LL | Variant,
| ------- not a function or closure
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0518`.
diff --git a/tests/ui/instrument-xray/target-not-supported.stderr b/tests/ui/instrument-xray/target-not-supported.stderr
index 6e3b0c8a3..119094bfc 100644
--- a/tests/ui/instrument-xray/target-not-supported.stderr
+++ b/tests/ui/instrument-xray/target-not-supported.stderr
@@ -1,4 +1,4 @@
error: XRay instrumentation is not supported for this target
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/integral-variable-unification-error.stderr b/tests/ui/integral-variable-unification-error.stderr
index f77c265a2..1caa6042f 100644
--- a/tests/ui/integral-variable-unification-error.stderr
+++ b/tests/ui/integral-variable-unification-error.stderr
@@ -9,6 +9,6 @@ LL | 2;
LL | x = 5.0;
| ^^^ expected integer, found floating-point number
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/interior-mutability/interior-mutability.stderr b/tests/ui/interior-mutability/interior-mutability.stderr
index 0c3be7ca6..36686565e 100644
--- a/tests/ui/interior-mutability/interior-mutability.stderr
+++ b/tests/ui/interior-mutability/interior-mutability.stderr
@@ -18,6 +18,6 @@ LL | catch_unwind(|| { x.set(23); });
note: required by a bound in `catch_unwind`
--> $SRC_DIR/std/src/panic.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/internal-lints/existing_doc_keyword.stderr b/tests/ui/internal-lints/existing_doc_keyword.stderr
index 5110b9be0..8f519fe6b 100644
--- a/tests/ui/internal-lints/existing_doc_keyword.stderr
+++ b/tests/ui/internal-lints/existing_doc_keyword.stderr
@@ -11,5 +11,5 @@ note: the lint level is defined here
LL | #![deny(rustc::existing_doc_keyword)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/internal/internal-unstable-const.stderr b/tests/ui/internal/internal-unstable-const.stderr
index 5c63992d8..ed9196d2b 100644
--- a/tests/ui/internal/internal-unstable-const.stderr
+++ b/tests/ui/internal/internal-unstable-const.stderr
@@ -15,5 +15,5 @@ LL + #[rustc_allow_const_fn_unstable(const_fn_floating_point_arithmetic)]
LL | pub const fn foo() -> f32 {
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/internal/internal-unstable-thread-local.stderr b/tests/ui/internal/internal-unstable-thread-local.stderr
index 558e3dbb7..7c07c7628 100644
--- a/tests/ui/internal/internal-unstable-thread-local.stderr
+++ b/tests/ui/internal/internal-unstable-thread-local.stderr
@@ -6,6 +6,6 @@ LL | thread_local!(static BAR: () = internal_unstable::unstable());
|
= help: add `#![feature(function)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/intrinsics/const-eval-select-bad.stderr b/tests/ui/intrinsics/const-eval-select-bad.stderr
index e6ff9d5a0..85e22178c 100644
--- a/tests/ui/intrinsics/const-eval-select-bad.stderr
+++ b/tests/ui/intrinsics/const-eval-select-bad.stderr
@@ -16,20 +16,24 @@ LL | const_eval_select((), || {}, || {});
= note: expected a function item, found {closure@$DIR/const-eval-select-bad.rs:7:34: 7:36}
= help: consult the documentation on `const_eval_select` for more information
-error: this argument must be a function item
+error[E0277]: expected a `FnOnce()` closure, found `{integer}`
--> $DIR/const-eval-select-bad.rs:10:27
|
LL | const_eval_select((), 42, 0xDEADBEEF);
- | ^^
+ | ----------------- ^^ expected an `FnOnce()` closure, found `{integer}`
+ | |
+ | required by a bound introduced by this call
|
- = note: expected a function item, found {integer}
- = help: consult the documentation on `const_eval_select` for more information
+ = help: the trait `FnOnce<()>` is not implemented for `{integer}`
+ = note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }`
+note: required by a bound in `const_eval_select`
+ --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
error[E0277]: expected a `FnOnce()` closure, found `{integer}`
- --> $DIR/const-eval-select-bad.rs:10:27
+ --> $DIR/const-eval-select-bad.rs:10:31
|
LL | const_eval_select((), 42, 0xDEADBEEF);
- | ----------------- ^^ expected an `FnOnce()` closure, found `{integer}`
+ | ----------------- ^^^^^^^^^^ expected an `FnOnce()` closure, found `{integer}`
| |
| required by a bound introduced by this call
|
@@ -39,26 +43,22 @@ note: required by a bound in `const_eval_select`
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
error: this argument must be a function item
- --> $DIR/const-eval-select-bad.rs:10:31
+ --> $DIR/const-eval-select-bad.rs:10:27
|
LL | const_eval_select((), 42, 0xDEADBEEF);
- | ^^^^^^^^^^
+ | ^^
|
= note: expected a function item, found {integer}
= help: consult the documentation on `const_eval_select` for more information
-error[E0277]: expected a `FnOnce()` closure, found `{integer}`
+error: this argument must be a function item
--> $DIR/const-eval-select-bad.rs:10:31
|
LL | const_eval_select((), 42, 0xDEADBEEF);
- | ----------------- ^^^^^^^^^^ expected an `FnOnce()` closure, found `{integer}`
- | |
- | required by a bound introduced by this call
+ | ^^^^^^^^^^
|
- = help: the trait `FnOnce<()>` is not implemented for `{integer}`
- = note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }`
-note: required by a bound in `const_eval_select`
- --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
+ = note: expected a function item, found {integer}
+ = help: consult the documentation on `const_eval_select` for more information
error[E0271]: expected `bar` to be a fn item that returns `i32`, but it returns `bool`
--> $DIR/const-eval-select-bad.rs:32:34
@@ -86,6 +86,10 @@ LL | const_eval_select((true,), foo, baz);
found function signature `fn(i32) -> _`
note: required by a bound in `const_eval_select`
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
+help: consider wrapping the function in a closure
+ |
+LL | const_eval_select((true,), |arg0: bool| foo(/* i32 */), baz);
+ | ++++++++++++ +++++++++++
error: this argument must be a `const fn`
--> $DIR/const-eval-select-bad.rs:42:29
diff --git a/tests/ui/intrinsics/const-eval-select-stability.stderr b/tests/ui/intrinsics/const-eval-select-stability.stderr
index 65b507b88..335b9877a 100644
--- a/tests/ui/intrinsics/const-eval-select-stability.stderr
+++ b/tests/ui/intrinsics/const-eval-select-stability.stderr
@@ -6,5 +6,5 @@ LL | const_eval_select((), nothing, log);
|
= help: const-stable functions can only call other const-stable functions
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/intrinsics/issue-28575.mir.stderr b/tests/ui/intrinsics/issue-28575.mir.stderr
index c42498390..4b29b4c1b 100644
--- a/tests/ui/intrinsics/issue-28575.mir.stderr
+++ b/tests/ui/intrinsics/issue-28575.mir.stderr
@@ -6,6 +6,6 @@ LL | FOO()
|
= note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/intrinsics/issue-28575.thir.stderr b/tests/ui/intrinsics/issue-28575.thir.stderr
index c42498390..4b29b4c1b 100644
--- a/tests/ui/intrinsics/issue-28575.thir.stderr
+++ b/tests/ui/intrinsics/issue-28575.thir.stderr
@@ -6,6 +6,6 @@ LL | FOO()
|
= note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/invalid-compile-flags/branch-protection-missing-pac-ret.BADTARGET.stderr b/tests/ui/invalid-compile-flags/branch-protection-missing-pac-ret.BADTARGET.stderr
index 52a591902..7bc17c5c6 100644
--- a/tests/ui/invalid-compile-flags/branch-protection-missing-pac-ret.BADTARGET.stderr
+++ b/tests/ui/invalid-compile-flags/branch-protection-missing-pac-ret.BADTARGET.stderr
@@ -1,4 +1,4 @@
error: `-Zbranch-protection` is only supported on aarch64
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/invalid-compile-flags/fuel.rs b/tests/ui/invalid-compile-flags/fuel.rs
new file mode 100644
index 000000000..456bc47d3
--- /dev/null
+++ b/tests/ui/invalid-compile-flags/fuel.rs
@@ -0,0 +1,11 @@
+// revisions: incremental threads
+// dont-check-compiler-stderr
+//
+// [threads] compile-flags: -Zfuel=a=1 -Zthreads=2
+// [threads] error-pattern:optimization fuel is incompatible with multiple threads
+//
+// [incremental] incremental
+// [incremental] compile-flags: -Zprint-fuel=a
+// [incremental] error-pattern:optimization fuel is incompatible with incremental compilation
+
+fn main() {}
diff --git a/tests/ui/invalid-compile-flags/function-return/requires-x86-or-x86_64.aarch64.stderr b/tests/ui/invalid-compile-flags/function-return/requires-x86-or-x86_64.aarch64.stderr
new file mode 100644
index 000000000..a4fe77f5c
--- /dev/null
+++ b/tests/ui/invalid-compile-flags/function-return/requires-x86-or-x86_64.aarch64.stderr
@@ -0,0 +1,4 @@
+error: `-Zfunction-return` (except `keep`) is only supported on x86 and x86_64
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/invalid-compile-flags/function-return/requires-x86-or-x86_64.rs b/tests/ui/invalid-compile-flags/function-return/requires-x86-or-x86_64.rs
new file mode 100644
index 000000000..15a88ebdb
--- /dev/null
+++ b/tests/ui/invalid-compile-flags/function-return/requires-x86-or-x86_64.rs
@@ -0,0 +1,20 @@
+// revisions: x86 x86_64 aarch64
+
+// compile-flags: -Zfunction-return=thunk-extern
+
+//[x86] check-pass
+//[x86] needs-llvm-components: x86
+//[x86] compile-flags: --target i686-unknown-linux-gnu
+
+//[x86_64] check-pass
+//[x86_64] needs-llvm-components: x86
+//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu
+
+//[aarch64] check-fail
+//[aarch64] needs-llvm-components: aarch64
+//[aarch64] compile-flags: --target aarch64-unknown-linux-gnu
+//[aarch64] error-pattern: `-Zfunction-return` (except `keep`) is only supported on x86 and x86_64
+
+#![feature(no_core)]
+#![no_core]
+#![no_main]
diff --git a/tests/ui/invalid-compile-flags/function-return/thunk-extern-requires-non-large-code-model.large.stderr b/tests/ui/invalid-compile-flags/function-return/thunk-extern-requires-non-large-code-model.large.stderr
new file mode 100644
index 000000000..683b3213d
--- /dev/null
+++ b/tests/ui/invalid-compile-flags/function-return/thunk-extern-requires-non-large-code-model.large.stderr
@@ -0,0 +1,4 @@
+error: `-Zfunction-return=thunk-extern` is only supported on non-large code models
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/invalid-compile-flags/function-return/thunk-extern-requires-non-large-code-model.rs b/tests/ui/invalid-compile-flags/function-return/thunk-extern-requires-non-large-code-model.rs
new file mode 100644
index 000000000..f925905de
--- /dev/null
+++ b/tests/ui/invalid-compile-flags/function-return/thunk-extern-requires-non-large-code-model.rs
@@ -0,0 +1,21 @@
+// revisions: small kernel medium large
+
+// needs-llvm-components: x86
+// compile-flags: --target x86_64-unknown-linux-gnu -Zfunction-return=thunk-extern
+
+//[small] check-pass
+//[small] compile-flags: -Ccode-model=small
+
+//[kernel] check-pass
+//[kernel] compile-flags: -Ccode-model=kernel
+
+//[medium] check-pass
+//[medium] compile-flags: -Ccode-model=medium
+
+//[large] check-fail
+//[large] compile-flags: -Ccode-model=large
+//[large] error-pattern: `-Zfunction-return=thunk-extern` is only supported on non-large code models
+
+#![feature(no_core)]
+#![no_core]
+#![no_main]
diff --git a/tests/ui/invalid-compile-flags/invalid-llvm-passes.stderr b/tests/ui/invalid-compile-flags/invalid-llvm-passes.stderr
index ae1f85e41..bbacf3f46 100644
--- a/tests/ui/invalid-compile-flags/invalid-llvm-passes.stderr
+++ b/tests/ui/invalid-compile-flags/invalid-llvm-passes.stderr
@@ -1,4 +1,4 @@
error: failed to run LLVM passes: unknown pass name 'unknown-pass'
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/invalid-module-declaration/invalid-module-declaration.stderr b/tests/ui/invalid-module-declaration/invalid-module-declaration.stderr
index 08aec2592..a8f65883d 100644
--- a/tests/ui/invalid-module-declaration/invalid-module-declaration.stderr
+++ b/tests/ui/invalid-module-declaration/invalid-module-declaration.stderr
@@ -7,6 +7,6 @@ LL | pub mod baz;
= help: to create the module `baz`, create file "$DIR/auxiliary/foo/bar/baz.rs" or "$DIR/auxiliary/foo/bar/baz/mod.rs"
= note: if there is a `mod baz` elsewhere in the crate already, import it with `use crate::...` instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0583`.
diff --git a/tests/ui/invalid-self-argument/bare-fn-start.stderr b/tests/ui/invalid-self-argument/bare-fn-start.stderr
index 37753e61f..bf7160bcd 100644
--- a/tests/ui/invalid-self-argument/bare-fn-start.stderr
+++ b/tests/ui/invalid-self-argument/bare-fn-start.stderr
@@ -6,5 +6,5 @@ LL | fn a(&self) { }
|
= note: associated functions are those in `impl` or `trait` definitions
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/invalid-self-argument/bare-fn.stderr b/tests/ui/invalid-self-argument/bare-fn.stderr
index ff2217b5e..7abb56602 100644
--- a/tests/ui/invalid-self-argument/bare-fn.stderr
+++ b/tests/ui/invalid-self-argument/bare-fn.stderr
@@ -4,5 +4,5 @@ error: unexpected `self` parameter in function
LL | fn b(foo: u32, &mut self) { }
| ^^^^^^^^^ must be the first parameter of an associated function
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/invalid-self-argument/trait-fn.stderr b/tests/ui/invalid-self-argument/trait-fn.stderr
index b9887af96..c9d0a338e 100644
--- a/tests/ui/invalid-self-argument/trait-fn.stderr
+++ b/tests/ui/invalid-self-argument/trait-fn.stderr
@@ -4,5 +4,5 @@ error: unexpected `self` parameter in function
LL | fn c(foo: u32, self) {}
| ^^^^ must be the first parameter of an associated function
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/invalid/invalid-crate-type-macro.stderr b/tests/ui/invalid/invalid-crate-type-macro.stderr
index c196d4278..1cf77d408 100644
--- a/tests/ui/invalid/invalid-crate-type-macro.stderr
+++ b/tests/ui/invalid/invalid-crate-type-macro.stderr
@@ -4,5 +4,5 @@ error: malformed `crate_type` attribute input
LL | #![crate_type = foo!()]
| ^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![crate_type = "bin|lib|..."]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/invalid/invalid-debugger-visualizer-target.stderr b/tests/ui/invalid/invalid-debugger-visualizer-target.stderr
index c8a4d6813..1df345325 100644
--- a/tests/ui/invalid/invalid-debugger-visualizer-target.stderr
+++ b/tests/ui/invalid/invalid-debugger-visualizer-target.stderr
@@ -4,5 +4,5 @@ error: attribute should be applied to a module
LL | #[debugger_visualizer(natvis_file = "./foo.natvis.xml")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/invalid/invalid-macro-matcher.stderr b/tests/ui/invalid/invalid-macro-matcher.stderr
index dbe025b73..f85adc10c 100644
--- a/tests/ui/invalid/invalid-macro-matcher.stderr
+++ b/tests/ui/invalid/invalid-macro-matcher.stderr
@@ -4,5 +4,5 @@ error: invalid macro matcher; matchers must be contained in balanced delimiters
LL | _ => ();
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/invalid/invalid-no-sanitize.stderr b/tests/ui/invalid/invalid-no-sanitize.stderr
index 460003495..b1c80438b 100644
--- a/tests/ui/invalid/invalid-no-sanitize.stderr
+++ b/tests/ui/invalid/invalid-no-sanitize.stderr
@@ -6,5 +6,5 @@ LL | #[no_sanitize(brontosaurus)]
|
= note: expected one of: `address`, `cfi`, `hwaddress`, `kcfi`, `memory`, `memtag`, `shadow-call-stack`, or `thread`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/invalid/invalid-path-in-const.stderr b/tests/ui/invalid/invalid-path-in-const.stderr
index a14ab7d85..31528ab85 100644
--- a/tests/ui/invalid/invalid-path-in-const.stderr
+++ b/tests/ui/invalid/invalid-path-in-const.stderr
@@ -4,6 +4,6 @@ error[E0599]: no associated item named `DOESNOTEXIST` found for type `u32` in th
LL | fn f(a: [u8; u32::DOESNOTEXIST]) {}
| ^^^^^^^^^^^^ associated item not found in `u32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/invalid_crate_type_syntax.stderr b/tests/ui/invalid_crate_type_syntax.stderr
index 4072a2fa1..a5563720f 100644
--- a/tests/ui/invalid_crate_type_syntax.stderr
+++ b/tests/ui/invalid_crate_type_syntax.stderr
@@ -4,5 +4,5 @@ error: malformed `crate_type` attribute input
LL | #![crate_type(lib)]
| ^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![crate_type = "bin|lib|..."]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.stderr b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.stderr
index f1d9ed8ac..5775a4032 100644
--- a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.stderr
+++ b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.stderr
@@ -2,5 +2,5 @@ warning: ignoring --out-dir flag due to -o flag
error: io error modifying ./does-not-exist/
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/issues/issue-10291.stderr b/tests/ui/issues/issue-10291.stderr
index a7b827d27..68ed9a0de 100644
--- a/tests/ui/issues/issue-10291.stderr
+++ b/tests/ui/issues/issue-10291.stderr
@@ -7,5 +7,5 @@ LL | drop::<Box<dyn for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
LL | x
| ^ returning this value requires that `'x` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-102964.stderr b/tests/ui/issues/issue-102964.stderr
index c0766480a..0e2761f3f 100644
--- a/tests/ui/issues/issue-102964.stderr
+++ b/tests/ui/issues/issue-102964.stderr
@@ -14,6 +14,6 @@ LL ~ let rc = Rc::new(function);
LL + rc
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-10465.stderr b/tests/ui/issues/issue-10465.stderr
index 1b7b9d590..c6bc0786a 100644
--- a/tests/ui/issues/issue-10465.stderr
+++ b/tests/ui/issues/issue-10465.stderr
@@ -10,6 +10,6 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f
LL + use a::A;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-10545.stderr b/tests/ui/issues/issue-10545.stderr
index f1da33eab..9aa042171 100644
--- a/tests/ui/issues/issue-10545.stderr
+++ b/tests/ui/issues/issue-10545.stderr
@@ -10,6 +10,6 @@ note: the struct `S` is defined here
LL | struct S;
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/issues/issue-10656.stderr b/tests/ui/issues/issue-10656.stderr
index 2e4365f1e..61828f9c0 100644
--- a/tests/ui/issues/issue-10656.stderr
+++ b/tests/ui/issues/issue-10656.stderr
@@ -11,5 +11,5 @@ note: the lint level is defined here
LL | #![deny(missing_docs)]
| ^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-10764.stderr b/tests/ui/issues/issue-10764.stderr
index 4d8a85a13..f3bd0100a 100644
--- a/tests/ui/issues/issue-10764.stderr
+++ b/tests/ui/issues/issue-10764.stderr
@@ -14,6 +14,6 @@ note: function defined here
LL | fn f(_: extern "Rust" fn()) {}
| ^ ---------------------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-11004.stderr b/tests/ui/issues/issue-11004.stderr
index b5831e42e..ea141e61d 100644
--- a/tests/ui/issues/issue-11004.stderr
+++ b/tests/ui/issues/issue-11004.stderr
@@ -3,7 +3,8 @@ error[E0609]: no field `x` on type `*mut A`
|
LL | let x : i32 = n.x;
| --^
- | |
+ | | |
+ | | unknown field
| help: `n` is a raw pointer; try dereferencing it: `(*n).x`
error[E0609]: no field `y` on type `*mut A`
@@ -11,7 +12,8 @@ error[E0609]: no field `y` on type `*mut A`
|
LL | let y : f64 = n.y;
| --^
- | |
+ | | |
+ | | unknown field
| help: `n` is a raw pointer; try dereferencing it: `(*n).y`
error: aborting due to 2 previous errors
diff --git a/tests/ui/issues/issue-11192.stderr b/tests/ui/issues/issue-11192.stderr
index fc1548013..a8a18c495 100644
--- a/tests/ui/issues/issue-11192.stderr
+++ b/tests/ui/issues/issue-11192.stderr
@@ -12,6 +12,6 @@ LL | test(&*ptr);
| |
| mutable borrow later used by call
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/issues/issue-11374.stderr b/tests/ui/issues/issue-11374.stderr
index 879dc5b76..275a0e6b5 100644
--- a/tests/ui/issues/issue-11374.stderr
+++ b/tests/ui/issues/issue-11374.stderr
@@ -18,6 +18,6 @@ help: consider mutably borrowing here
LL | c.read_to(&mut v);
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-11593.stderr b/tests/ui/issues/issue-11593.stderr
index aa9768b18..8262bc932 100644
--- a/tests/ui/issues/issue-11593.stderr
+++ b/tests/ui/issues/issue-11593.stderr
@@ -10,6 +10,6 @@ note: the trait `Foo` is defined here
LL | trait Foo {}
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/issues/issue-11681.stderr b/tests/ui/issues/issue-11681.stderr
index f2f930766..4f23ba86e 100644
--- a/tests/ui/issues/issue-11681.stderr
+++ b/tests/ui/issues/issue-11681.stderr
@@ -6,6 +6,6 @@ LL | let testValue = &Test;
LL | return testValue;
| ^^^^^^^^^ returns a value referencing data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/issues/issue-11692-1.stderr b/tests/ui/issues/issue-11692-1.stderr
index 386463436..46382f652 100644
--- a/tests/ui/issues/issue-11692-1.stderr
+++ b/tests/ui/issues/issue-11692-1.stderr
@@ -4,5 +4,5 @@ error: cannot find macro `testo` in this scope
LL | print!(testo!());
| ^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-11692-2.stderr b/tests/ui/issues/issue-11692-2.stderr
index 84746ca2c..53add509c 100644
--- a/tests/ui/issues/issue-11692-2.stderr
+++ b/tests/ui/issues/issue-11692-2.stderr
@@ -6,5 +6,5 @@ LL | concat!(test!());
|
= note: `test` is in scope, but it is an attribute: `#[test]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-11844.stderr b/tests/ui/issues/issue-11844.stderr
index 9afd20977..9ff66eaef 100644
--- a/tests/ui/issues/issue-11844.stderr
+++ b/tests/ui/issues/issue-11844.stderr
@@ -9,6 +9,6 @@ LL | Ok(a) =>
= note: expected enum `Option<Box<{integer}>>`
found enum `Result<_, _>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-12028.stderr b/tests/ui/issues/issue-12028.stderr
index 8d6b81c24..3d7fb13d4 100644
--- a/tests/ui/issues/issue-12028.stderr
+++ b/tests/ui/issues/issue-12028.stderr
@@ -10,6 +10,6 @@ help: try using a fully qualified path to specify the expected types
LL | <u8 as StreamHash<H>>::input_stream(self, &mut stream);
| ++++++++++++++++++++++++++++++++++++ ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0284`.
diff --git a/tests/ui/issues/issue-12041.stderr b/tests/ui/issues/issue-12041.stderr
index b9ffa499a..51061c026 100644
--- a/tests/ui/issues/issue-12041.stderr
+++ b/tests/ui/issues/issue-12041.stderr
@@ -6,6 +6,6 @@ LL | let tx = tx;
|
= note: move occurs because `tx` has type `Sender<i32>`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/issues/issue-12127.stderr b/tests/ui/issues/issue-12127.stderr
index 2e5858679..2a6233547 100644
--- a/tests/ui/issues/issue-12127.stderr
+++ b/tests/ui/issues/issue-12127.stderr
@@ -13,6 +13,6 @@ LL | f();
| ^
= note: move occurs because `f` has type `{closure@$DIR/issue-12127.rs:8:24: 8:30}`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/issues/issue-12187-1.stderr b/tests/ui/issues/issue-12187-1.stderr
index d2a6a9608..93dc1df8f 100644
--- a/tests/ui/issues/issue-12187-1.stderr
+++ b/tests/ui/issues/issue-12187-1.stderr
@@ -9,6 +9,6 @@ help: consider giving this pattern a type, where the type for type parameter `T`
LL | let &v: &T = new();
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/issues/issue-12187-2.stderr b/tests/ui/issues/issue-12187-2.stderr
index ac75ebb42..e9ba52ff4 100644
--- a/tests/ui/issues/issue-12187-2.stderr
+++ b/tests/ui/issues/issue-12187-2.stderr
@@ -9,6 +9,6 @@ help: consider giving this pattern a type, where the type for type parameter `T`
LL | let &v: &T = new();
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/issues/issue-12863.stderr b/tests/ui/issues/issue-12863.stderr
index 9c29a37cb..95d4a704e 100644
--- a/tests/ui/issues/issue-12863.stderr
+++ b/tests/ui/issues/issue-12863.stderr
@@ -4,6 +4,6 @@ error[E0532]: expected unit struct, unit variant or constant, found function `fo
LL | foo::bar => {}
| ^^^^^^^^ not a unit struct, unit variant or constant
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0532`.
diff --git a/tests/ui/issues/issue-13058.stderr b/tests/ui/issues/issue-13058.stderr
index 8368978de..7cc2860eb 100644
--- a/tests/ui/issues/issue-13058.stderr
+++ b/tests/ui/issues/issue-13058.stderr
@@ -7,6 +7,6 @@ LL | {
LL | let cont_iter = cont.iter();
| ^^^^^^^^^^^ lifetime `'r` required
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0621`.
diff --git a/tests/ui/issues/issue-13167.rs b/tests/ui/issues/issue-13167.rs
index 9a9f129ec..747f652d4 100644
--- a/tests/ui/issues/issue-13167.rs
+++ b/tests/ui/issues/issue-13167.rs
@@ -1,7 +1,7 @@
// check-pass
// pretty-expanded FIXME #23616
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
use std::slice;
diff --git a/tests/ui/issues/issue-13407.rs b/tests/ui/issues/issue-13407.rs
index 7ea81ffb5..7794be37b 100644
--- a/tests/ui/issues/issue-13407.rs
+++ b/tests/ui/issues/issue-13407.rs
@@ -4,6 +4,6 @@ mod A {
fn main() {
A::C = 1;
- //~^ ERROR: invalid left-hand side of assignment
- //~| ERROR: struct `C` is private
+ //~^ ERROR: mismatched types
+ //~| ERROR: unit struct `C` is private
}
diff --git a/tests/ui/issues/issue-13407.stderr b/tests/ui/issues/issue-13407.stderr
index 54b6c640d..ac2eb6581 100644
--- a/tests/ui/issues/issue-13407.stderr
+++ b/tests/ui/issues/issue-13407.stderr
@@ -10,15 +10,18 @@ note: the unit struct `C` is defined here
LL | struct C;
| ^^^^^^^^^
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/issue-13407.rs:6:10
+error[E0308]: mismatched types
+ --> $DIR/issue-13407.rs:6:5
|
+LL | struct C;
+ | -------- unit struct defined here
+...
LL | A::C = 1;
- | ---- ^
+ | ^^^^ - this expression has type `{integer}`
| |
- | cannot assign to this expression
+ | expected integer, found `C`
error: aborting due to 2 previous errors
-Some errors have detailed explanations: E0070, E0603.
-For more information about an error, try `rustc --explain E0070`.
+Some errors have detailed explanations: E0308, E0603.
+For more information about an error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-13446.stderr b/tests/ui/issues/issue-13446.stderr
index 139c34c88..28c459e6e 100644
--- a/tests/ui/issues/issue-13446.stderr
+++ b/tests/ui/issues/issue-13446.stderr
@@ -8,6 +8,6 @@ LL | static VEC: [u32; 256] = vec![];
found struct `Vec<_>`
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-13482-2.stderr b/tests/ui/issues/issue-13482-2.stderr
index ccab95878..87a6782a5 100644
--- a/tests/ui/issues/issue-13482-2.stderr
+++ b/tests/ui/issues/issue-13482-2.stderr
@@ -4,6 +4,6 @@ error[E0527]: pattern requires 0 elements but array has 2
LL | [] => None,
| ^^ expected 2 elements
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0527`.
diff --git a/tests/ui/issues/issue-13482.stderr b/tests/ui/issues/issue-13482.stderr
index 3eb05f504..6226c5808 100644
--- a/tests/ui/issues/issue-13482.stderr
+++ b/tests/ui/issues/issue-13482.stderr
@@ -4,6 +4,6 @@ error[E0527]: pattern requires 0 elements but array has 2
LL | [] => None,
| ^^ expected 2 elements
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0527`.
diff --git a/tests/ui/issues/issue-13497-2.stderr b/tests/ui/issues/issue-13497-2.stderr
index 8ad921027..e2ba1150d 100644
--- a/tests/ui/issues/issue-13497-2.stderr
+++ b/tests/ui/issues/issue-13497-2.stderr
@@ -9,6 +9,6 @@ LL | rawLines
LL | | .iter().map(|l| l.trim()).collect()
| |___________________________________________^ returns a value referencing data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/issues/issue-13497.stderr b/tests/ui/issues/issue-13497.stderr
index 4b1d979da..fb3de637a 100644
--- a/tests/ui/issues/issue-13497.stderr
+++ b/tests/ui/issues/issue-13497.stderr
@@ -5,11 +5,15 @@ LL | &str
| ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
LL | &'static str
| +++++++
+help: instead, you are more likely to want to return an owned value
+ |
+LL | String
+ | ~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0106`.
diff --git a/tests/ui/issues/issue-1362.stderr b/tests/ui/issues/issue-1362.stderr
index babbb6e51..6f6fdff66 100644
--- a/tests/ui/issues/issue-1362.stderr
+++ b/tests/ui/issues/issue-1362.stderr
@@ -11,6 +11,6 @@ help: change the type of the numeric literal from `i32` to `u32`
LL | let x: u32 = 20u32;
| ~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-13847.stderr b/tests/ui/issues/issue-13847.stderr
index 52b8dc049..1c1855ce9 100644
--- a/tests/ui/issues/issue-13847.stderr
+++ b/tests/ui/issues/issue-13847.stderr
@@ -2,8 +2,8 @@ error[E0609]: no field `is_failure` on type `!`
--> $DIR/issue-13847.rs:2:12
|
LL | return.is_failure
- | ^^^^^^^^^^
+ | ^^^^^^^^^^ unknown field
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0609`.
diff --git a/tests/ui/issues/issue-14091-2.stderr b/tests/ui/issues/issue-14091-2.stderr
index f8375d4ef..ac8947670 100644
--- a/tests/ui/issues/issue-14091-2.stderr
+++ b/tests/ui/issues/issue-14091-2.stderr
@@ -13,6 +13,6 @@ note: the trait `Not` must be implemented
--> $SRC_DIR/core/src/ops/bit.rs:LL:COL
= 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
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0600`.
diff --git a/tests/ui/issues/issue-14091.stderr b/tests/ui/issues/issue-14091.stderr
index 0a9640a9e..83879583b 100644
--- a/tests/ui/issues/issue-14091.stderr
+++ b/tests/ui/issues/issue-14091.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | assert!(1,1);
| ^^^^^^^^^^^^ expected `bool`, found integer
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-14092.stderr b/tests/ui/issues/issue-14092.stderr
index 3a43627e6..0de7b902f 100644
--- a/tests/ui/issues/issue-14092.stderr
+++ b/tests/ui/issues/issue-14092.stderr
@@ -9,6 +9,6 @@ help: add missing generic argument
LL | fn fn1(0: Box<T>) {}
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/issues/issue-14285.stderr b/tests/ui/issues/issue-14285.stderr
index 5c0706601..4f89ae511 100644
--- a/tests/ui/issues/issue-14285.stderr
+++ b/tests/ui/issues/issue-14285.stderr
@@ -6,6 +6,6 @@ LL | fn foo<'a>(a: &dyn Foo) -> B<'a> {
LL | B(a)
| ^^^^ lifetime `'a` required
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0621`.
diff --git a/tests/ui/issues/issue-14366.stderr b/tests/ui/issues/issue-14366.stderr
index df61aabf0..e7bf555c1 100644
--- a/tests/ui/issues/issue-14366.stderr
+++ b/tests/ui/issues/issue-14366.stderr
@@ -11,6 +11,6 @@ help: consider borrowing the value, since `&&'static str` can be coerced into `&
LL | let _x = &"test" as &dyn (::std::any::Any);
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-1448-2.stderr b/tests/ui/issues/issue-1448-2.stderr
index 203dd92c9..a6f1daefe 100644
--- a/tests/ui/issues/issue-1448-2.stderr
+++ b/tests/ui/issues/issue-1448-2.stderr
@@ -16,6 +16,6 @@ help: change the type of the numeric literal from `i32` to `u32`
LL | println!("{}", foo(10u32));
| ~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-14541.stderr b/tests/ui/issues/issue-14541.stderr
index b80c68ce4..370e64779 100644
--- a/tests/ui/issues/issue-14541.stderr
+++ b/tests/ui/issues/issue-14541.stderr
@@ -6,6 +6,6 @@ LL | let Vec3 { y: _, z: _ } = v;
| |
| expected `Vec2`, found `Vec3`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-14721.stderr b/tests/ui/issues/issue-14721.stderr
index 49ebb2976..c71b0363e 100644
--- a/tests/ui/issues/issue-14721.stderr
+++ b/tests/ui/issues/issue-14721.stderr
@@ -2,8 +2,8 @@ error[E0609]: no field `desc` on type `&str`
--> $DIR/issue-14721.rs:3:24
|
LL | println!("{}", foo.desc);
- | ^^^^
+ | ^^^^ unknown field
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0609`.
diff --git a/tests/ui/issues/issue-1476.stderr b/tests/ui/issues/issue-1476.stderr
index 670bd5463..e30dbfd20 100644
--- a/tests/ui/issues/issue-1476.stderr
+++ b/tests/ui/issues/issue-1476.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `x` in this scope
LL | println!("{}", x);
| ^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/issues/issue-14853.stderr b/tests/ui/issues/issue-14853.stderr
index 2adcf55ec..25dd1e337 100644
--- a/tests/ui/issues/issue-14853.stderr
+++ b/tests/ui/issues/issue-14853.stderr
@@ -7,6 +7,6 @@ LL | fn yay<T: Debug>(_: Option<Self>, thing: &[T]);
LL | fn yay<T: Str>(_:Option<X>, thing: &[T]) {
| ^^^ impl has extra requirement `T: Str`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0276`.
diff --git a/tests/ui/issues/issue-14915.stderr b/tests/ui/issues/issue-14915.stderr
index 6e6326929..279f5772d 100644
--- a/tests/ui/issues/issue-14915.stderr
+++ b/tests/ui/issues/issue-14915.stderr
@@ -6,6 +6,6 @@ LL | println!("{}", x + 1);
| |
| Box<isize>
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/issues/issue-15034.stderr b/tests/ui/issues/issue-15034.stderr
index f142e260a..587a5c85e 100644
--- a/tests/ui/issues/issue-15034.stderr
+++ b/tests/ui/issues/issue-15034.stderr
@@ -6,6 +6,6 @@ LL | pub fn new(lexer: &'a mut Lexer) -> Parser<'a> {
LL | Parser { lexer: lexer }
| ^^^^^^^^^^^^^^^^^^^^^^^ lifetime `'a` required
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0621`.
diff --git a/tests/ui/issues/issue-15094.stderr b/tests/ui/issues/issue-15094.stderr
index b7c950892..8e0fc8f17 100644
--- a/tests/ui/issues/issue-15094.stderr
+++ b/tests/ui/issues/issue-15094.stderr
@@ -7,6 +7,6 @@ LL | fn call_once(self, _args: ()) {
= note: expected signature `extern "rust-call" fn(Debuger<_>, ())`
found signature `fn(Debuger<_>, ())`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0053`.
diff --git a/tests/ui/issues/issue-15207.stderr b/tests/ui/issues/issue-15207.stderr
index 25ce7cb5c..a1047e27b 100644
--- a/tests/ui/issues/issue-15207.stderr
+++ b/tests/ui/issues/issue-15207.stderr
@@ -4,6 +4,6 @@ error[E0599]: no method named `push` found for type `!` in the current scope
LL | break.push(1)
| ^^^^ method not found in `!`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-15381.stderr b/tests/ui/issues/issue-15381.stderr
index 085958411..03a0100f1 100644
--- a/tests/ui/issues/issue-15381.stderr
+++ b/tests/ui/issues/issue-15381.stderr
@@ -6,6 +6,6 @@ LL | for &[x,y,z] in values.chunks(3).filter(|&xs| xs.len() == 3) {
|
= note: the matched value is of type `&[u8]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0005`.
diff --git a/tests/ui/issues/issue-15734.rs b/tests/ui/issues/issue-15734.rs
index 27410d4c3..77517f618 100644
--- a/tests/ui/issues/issue-15734.rs
+++ b/tests/ui/issues/issue-15734.rs
@@ -1,6 +1,6 @@
// run-pass
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
use std::ops::Index;
diff --git a/tests/ui/issues/issue-15756.stderr b/tests/ui/issues/issue-15756.stderr
index d9bdc69ad..af50fe467 100644
--- a/tests/ui/issues/issue-15756.stderr
+++ b/tests/ui/issues/issue-15756.stderr
@@ -8,6 +8,6 @@ LL | &mut something
= note: all local variables must have a statically known size
= help: unsized locals are gated as an unstable feature
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-15783.stderr b/tests/ui/issues/issue-15783.stderr
index 598ec7e60..7ed2e1991 100644
--- a/tests/ui/issues/issue-15783.stderr
+++ b/tests/ui/issues/issue-15783.stderr
@@ -14,6 +14,6 @@ note: function defined here
LL | pub fn foo(params: Option<&[&str]>) -> usize {
| ^^^ -----------------------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-15896.stderr b/tests/ui/issues/issue-15896.stderr
index ec0d74596..381f6dc22 100644
--- a/tests/ui/issues/issue-15896.stderr
+++ b/tests/ui/issues/issue-15896.stderr
@@ -7,6 +7,6 @@ LL | E::B(
LL | Tau{t: x},
| ^^^^^^^^^ expected `R`, found `Tau`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-15965.stderr b/tests/ui/issues/issue-15965.stderr
index fe06810b8..14727e743 100644
--- a/tests/ui/issues/issue-15965.stderr
+++ b/tests/ui/issues/issue-15965.stderr
@@ -6,6 +6,6 @@ LL | |
LL | | ()
| |______^ cannot infer type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/issues/issue-16149.stderr b/tests/ui/issues/issue-16149.stderr
index bb809840b..9ffd0e7e6 100644
--- a/tests/ui/issues/issue-16149.stderr
+++ b/tests/ui/issues/issue-16149.stderr
@@ -7,6 +7,6 @@ LL | static externalValue: isize;
LL | externalValue => true,
| ^^^^^^^^^^^^^ cannot be named the same as a static
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0530`.
diff --git a/tests/ui/issues/issue-16250.stderr b/tests/ui/issues/issue-16250.stderr
index 5eb5e0864..9d3e88114 100644
--- a/tests/ui/issues/issue-16250.stderr
+++ b/tests/ui/issues/issue-16250.stderr
@@ -18,5 +18,5 @@ LL | #![deny(warnings)]
| ^^^^^^^^
= note: `#[deny(improper_ctypes)]` implied by `#[deny(warnings)]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-16338.stderr b/tests/ui/issues/issue-16338.stderr
index 0f08485e5..e24b9bfa3 100644
--- a/tests/ui/issues/issue-16338.stderr
+++ b/tests/ui/issues/issue-16338.stderr
@@ -9,6 +9,6 @@ LL | let Slice { data: data, len: len } = "foo";
= note: expected type `str`
found struct `Slice<_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-16401.stderr b/tests/ui/issues/issue-16401.stderr
index 02f9f3ea8..6af920ca4 100644
--- a/tests/ui/issues/issue-16401.stderr
+++ b/tests/ui/issues/issue-16401.stderr
@@ -9,6 +9,6 @@ LL | Slice { data: data, len: len } => (),
= note: expected unit type `()`
found struct `Slice<_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-16562.stderr b/tests/ui/issues/issue-16562.stderr
index 3fe7507e8..efbd7f712 100644
--- a/tests/ui/issues/issue-16562.stderr
+++ b/tests/ui/issues/issue-16562.stderr
@@ -4,6 +4,6 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self
LL | impl<T, M: MatrixShape> Collection for Col<M, usize> {
| ^ unconstrained type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0207`.
diff --git a/tests/ui/issues/issue-16683.stderr b/tests/ui/issues/issue-16683.stderr
index fff681b2e..39b22ed1f 100644
--- a/tests/ui/issues/issue-16683.stderr
+++ b/tests/ui/issues/issue-16683.stderr
@@ -9,5 +9,5 @@ LL | fn b(&self) {
LL | self.a();
| ^^^^^^^^ argument requires that `'1` must outlive `'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-16725.stderr b/tests/ui/issues/issue-16725.stderr
index 5f6eae73e..a4a406b3d 100644
--- a/tests/ui/issues/issue-16725.stderr
+++ b/tests/ui/issues/issue-16725.stderr
@@ -10,6 +10,6 @@ note: the function `bar` is defined here
LL | fn bar();
| ^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/issues/issue-16939.stderr b/tests/ui/issues/issue-16939.stderr
index 6db29bc61..229ff9f18 100644
--- a/tests/ui/issues/issue-16939.stderr
+++ b/tests/ui/issues/issue-16939.stderr
@@ -13,6 +13,6 @@ note: callable defined here
LL | fn _foo<F: Fn()> (f: F) {
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0057`.
diff --git a/tests/ui/issues/issue-16966.stderr b/tests/ui/issues/issue-16966.stderr
index c53707c5d..0ed12d3a2 100644
--- a/tests/ui/issues/issue-16966.stderr
+++ b/tests/ui/issues/issue-16966.stderr
@@ -11,6 +11,6 @@ LL | panic!(std::default::Default::default());
note: required by a bound in `begin_panic`
--> $SRC_DIR/std/src/panicking.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/issues/issue-17001.stderr b/tests/ui/issues/issue-17001.stderr
index d7e606997..6ea32e0a4 100644
--- a/tests/ui/issues/issue-17001.stderr
+++ b/tests/ui/issues/issue-17001.stderr
@@ -4,6 +4,6 @@ error[E0574]: expected struct, variant or union type, found module `foo`
LL | let p = foo { x: () };
| ^^^ not a struct, variant or union type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0574`.
diff --git a/tests/ui/issues/issue-17033.stderr b/tests/ui/issues/issue-17033.stderr
index 3419c0798..0b4227422 100644
--- a/tests/ui/issues/issue-17033.stderr
+++ b/tests/ui/issues/issue-17033.stderr
@@ -11,6 +11,6 @@ help: consider mutably borrowing here
LL | (*p)(&mut ())
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-17252.stderr b/tests/ui/issues/issue-17252.stderr
index 32e20d774..d89848604 100644
--- a/tests/ui/issues/issue-17252.stderr
+++ b/tests/ui/issues/issue-17252.stderr
@@ -17,6 +17,6 @@ LL | let _x: [u8; FOO]; // caused stack overflow prior to fix
| ^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/issues/issue-17336.rs b/tests/ui/issues/issue-17336.rs
index 89ce59b11..97782ff9f 100644
--- a/tests/ui/issues/issue-17336.rs
+++ b/tests/ui/issues/issue-17336.rs
@@ -1,5 +1,8 @@
// build-pass
+
#![allow(unused_must_use)]
+#![allow(ambiguous_wide_pointer_comparisons)]
+
#[allow(dead_code)]
fn check(a: &str) {
let x = a as *const str;
diff --git a/tests/ui/issues/issue-17337.stderr b/tests/ui/issues/issue-17337.stderr
index 55e51e566..8fbf68826 100644
--- a/tests/ui/issues/issue-17337.stderr
+++ b/tests/ui/issues/issue-17337.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(deprecated)]
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-17373.stderr b/tests/ui/issues/issue-17373.stderr
index 5c429d111..9438f5c63 100644
--- a/tests/ui/issues/issue-17373.stderr
+++ b/tests/ui/issues/issue-17373.stderr
@@ -4,6 +4,6 @@ error[E0614]: type `!` cannot be dereferenced
LL | *return
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0614`.
diff --git a/tests/ui/issues/issue-17405.stderr b/tests/ui/issues/issue-17405.stderr
index 37274e239..47f5bf4dc 100644
--- a/tests/ui/issues/issue-17405.stderr
+++ b/tests/ui/issues/issue-17405.stderr
@@ -4,6 +4,6 @@ error[E0574]: expected struct, variant or union type, found enum `Foo`
LL | Foo { i } => ()
| ^^^ not a struct, variant or union type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0574`.
diff --git a/tests/ui/issues/issue-17551.stderr b/tests/ui/issues/issue-17551.stderr
index 3a8f569a3..68f54a310 100644
--- a/tests/ui/issues/issue-17551.stderr
+++ b/tests/ui/issues/issue-17551.stderr
@@ -9,6 +9,6 @@ help: consider giving `foo` an explicit type, where the type for type parameter
LL | let foo: B<T> = B(marker::PhantomData);
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/issues/issue-17651.stderr b/tests/ui/issues/issue-17651.stderr
index b37811e19..0c95a3c0c 100644
--- a/tests/ui/issues/issue-17651.stderr
+++ b/tests/ui/issues/issue-17651.stderr
@@ -10,6 +10,6 @@ LL | (|| Box::new(*(&[0][..])))();
note: required by a bound in `Box::<T>::new`
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-17758.stderr b/tests/ui/issues/issue-17758.stderr
index 613ef6b90..7a7d2374e 100644
--- a/tests/ui/issues/issue-17758.stderr
+++ b/tests/ui/issues/issue-17758.stderr
@@ -9,5 +9,5 @@ LL | fn bar(&self) {
LL | self.foo();
| ^^^^^^^^^^ argument requires that `'1` must outlive `'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-17800.stderr b/tests/ui/issues/issue-17800.stderr
index baab67583..2a15af50d 100644
--- a/tests/ui/issues/issue-17800.stderr
+++ b/tests/ui/issues/issue-17800.stderr
@@ -9,6 +9,6 @@ help: use the tuple variant pattern syntax instead
LL | MyOption::MySome(42) => (),
| ~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0769`.
diff --git a/tests/ui/issues/issue-17904-2.stderr b/tests/ui/issues/issue-17904-2.stderr
index 62b7b7953..102c8537f 100644
--- a/tests/ui/issues/issue-17904-2.stderr
+++ b/tests/ui/issues/issue-17904-2.stderr
@@ -6,6 +6,6 @@ LL | struct Foo<T> where T: Copy;
|
= help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0392`.
diff --git a/tests/ui/issues/issue-17905-2.stderr b/tests/ui/issues/issue-17905-2.stderr
index 88b5fbec6..c66cb2224 100644
--- a/tests/ui/issues/issue-17905-2.stderr
+++ b/tests/ui/issues/issue-17905-2.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched `self` parameter type
LL | fn say(self: &Pair<&str, isize>) {
| ^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
- = note: expected struct `Pair<&str, _>`
- found struct `Pair<&str, _>`
+ = note: expected struct `Pair<&_, _>`
+ found struct `Pair<&_, _>`
note: the anonymous lifetime defined here...
--> $DIR/issue-17905-2.rs:8:24
|
@@ -23,8 +23,8 @@ error[E0308]: mismatched `self` parameter type
LL | fn say(self: &Pair<&str, isize>) {
| ^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
- = note: expected struct `Pair<&str, _>`
- found struct `Pair<&str, _>`
+ = note: expected struct `Pair<&_, _>`
+ found struct `Pair<&_, _>`
note: the anonymous lifetime as defined here...
--> $DIR/issue-17905-2.rs:5:5
|
diff --git a/tests/ui/issues/issue-17933.stderr b/tests/ui/issues/issue-17933.stderr
index 33534d3f8..42a7e0442 100644
--- a/tests/ui/issues/issue-17933.stderr
+++ b/tests/ui/issues/issue-17933.stderr
@@ -4,6 +4,6 @@ error[E0532]: expected unit struct, unit variant or constant, found static `self
LL | self::X => { },
| ^^^^^^^ not a unit struct, unit variant or constant
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0532`.
diff --git a/tests/ui/issues/issue-17954.stderr b/tests/ui/issues/issue-17954.stderr
index 3e3706bcb..bba7e725b 100644
--- a/tests/ui/issues/issue-17954.stderr
+++ b/tests/ui/issues/issue-17954.stderr
@@ -7,6 +7,6 @@ LL | let a = &FOO;
LL | }
| - end of enclosing function is here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0712`.
diff --git a/tests/ui/issues/issue-17959.stderr b/tests/ui/issues/issue-17959.stderr
index fb795febf..604413c4b 100644
--- a/tests/ui/issues/issue-17959.stderr
+++ b/tests/ui/issues/issue-17959.stderr
@@ -10,6 +10,6 @@ note: the implementor must specify the same requirement
LL | struct G<T: ?Sized> {
| ^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0367`.
diff --git a/tests/ui/issues/issue-17994.stderr b/tests/ui/issues/issue-17994.stderr
index 61e1e496f..ba3def64d 100644
--- a/tests/ui/issues/issue-17994.stderr
+++ b/tests/ui/issues/issue-17994.stderr
@@ -4,6 +4,6 @@ error[E0091]: type parameter `T` is unused
LL | type Huh<T> where T: Tr = isize;
| ^ unused type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0091`.
diff --git a/tests/ui/issues/issue-18058.stderr b/tests/ui/issues/issue-18058.stderr
index 18159ffc2..c880bb002 100644
--- a/tests/ui/issues/issue-18058.stderr
+++ b/tests/ui/issues/issue-18058.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `Undefined` in this scope
LL | impl Undefined {}
| ^^^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/issues/issue-18107.stderr b/tests/ui/issues/issue-18107.stderr
index cf4e06316..702207c30 100644
--- a/tests/ui/issues/issue-18107.stderr
+++ b/tests/ui/issues/issue-18107.stderr
@@ -17,6 +17,6 @@ LL | match 0 {
LL ~ _ => Box::new(unimplemented!())
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0746`.
diff --git a/tests/ui/issues/issue-18159.stderr b/tests/ui/issues/issue-18159.stderr
index 5e0589eed..5de13a5c3 100644
--- a/tests/ui/issues/issue-18159.stderr
+++ b/tests/ui/issues/issue-18159.stderr
@@ -9,6 +9,6 @@ help: consider giving `x` an explicit type
LL | let x: /* Type */;
| ++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/issues/issue-18183.stderr b/tests/ui/issues/issue-18183.stderr
index a7dc64708..11015d75d 100644
--- a/tests/ui/issues/issue-18183.stderr
+++ b/tests/ui/issues/issue-18183.stderr
@@ -4,6 +4,6 @@ error[E0128]: generic parameters with a default cannot use forward declared iden
LL | pub struct Foo<Bar=Bar>(Bar);
| ^^^ defaulted generic parameters cannot be forward declared
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0128`.
diff --git a/tests/ui/issues/issue-18423.stderr b/tests/ui/issues/issue-18423.stderr
index 5d154dbbb..2c6015eaa 100644
--- a/tests/ui/issues/issue-18423.stderr
+++ b/tests/ui/issues/issue-18423.stderr
@@ -6,6 +6,6 @@ LL | x: Box<'a, isize>
| |
| expected 0 lifetime arguments
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/issues/issue-18446.stderr b/tests/ui/issues/issue-18446.stderr
index 602b80c68..d84c490df 100644
--- a/tests/ui/issues/issue-18446.stderr
+++ b/tests/ui/issues/issue-18446.stderr
@@ -19,6 +19,6 @@ help: disambiguate the method for candidate #2
LL | T::foo(&x);
| ~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0034`.
diff --git a/tests/ui/issues/issue-18532.stderr b/tests/ui/issues/issue-18532.stderr
index 4c224eb2d..059c7f137 100644
--- a/tests/ui/issues/issue-18532.stderr
+++ b/tests/ui/issues/issue-18532.stderr
@@ -6,6 +6,6 @@ LL | (return)((),());
| |
| call expression requires function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0618`.
diff --git a/tests/ui/issues/issue-18566.stderr b/tests/ui/issues/issue-18566.stderr
index 8db78935f..e8ec48b0d 100644
--- a/tests/ui/issues/issue-18566.stderr
+++ b/tests/ui/issues/issue-18566.stderr
@@ -7,6 +7,6 @@ LL | MyPtr(s).poke(s);
| | first borrow later used by call
| first mutable borrow occurs here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/issues/issue-18611.stderr b/tests/ui/issues/issue-18611.stderr
index 784b9b984..ab2374586 100644
--- a/tests/ui/issues/issue-18611.stderr
+++ b/tests/ui/issues/issue-18611.stderr
@@ -10,6 +10,6 @@ help: this trait has no implementations, consider adding one
LL | trait HasState {
| ^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-18804/main.rs b/tests/ui/issues/issue-18804/main.rs
index c36048ea5..47c3f13d2 100644
--- a/tests/ui/issues/issue-18804/main.rs
+++ b/tests/ui/issues/issue-18804/main.rs
@@ -2,7 +2,6 @@
// Test for issue #18804, #[linkage] does not propagate through generic
// functions. Failure results in a linker error.
-// ignore-asmjs no weak symbol support
// ignore-emscripten no weak symbol support
// ignore-windows no extern_weak linkage
// ignore-macos no extern_weak linkage
diff --git a/tests/ui/issues/issue-18819.stderr b/tests/ui/issues/issue-18819.stderr
index 40098f962..b2cf0bad1 100644
--- a/tests/ui/issues/issue-18819.stderr
+++ b/tests/ui/issues/issue-18819.stderr
@@ -25,6 +25,6 @@ help: provide the argument
LL | print_x(/* &dyn Foo<Item = bool> */, /* &str */);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0061`.
diff --git a/tests/ui/issues/issue-18919.stderr b/tests/ui/issues/issue-18919.stderr
index b0b03a0ee..6dcd891ce 100644
--- a/tests/ui/issues/issue-18919.stderr
+++ b/tests/ui/issues/issue-18919.stderr
@@ -18,6 +18,6 @@ LL | enum Option<T> {
LL | Some(T),
| - ...if indirection were used here: `Box<T>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-18959.stderr b/tests/ui/issues/issue-18959.stderr
index b9e278736..76082dadd 100644
--- a/tests/ui/issues/issue-18959.stderr
+++ b/tests/ui/issues/issue-18959.stderr
@@ -13,6 +13,6 @@ LL | pub trait Bar: Foo { }
| --- this trait cannot be made into an object...
= help: consider moving `foo` to another trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/issues/issue-1900.stderr b/tests/ui/issues/issue-1900.stderr
index ce413662f..31fd46c8e 100644
--- a/tests/ui/issues/issue-1900.stderr
+++ b/tests/ui/issues/issue-1900.stderr
@@ -4,6 +4,6 @@ error[E0131]: `main` function is not allowed to have generic parameters
LL | fn main<T>() { }
| ^^^ `main` cannot have generic parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0131`.
diff --git a/tests/ui/issues/issue-19086.stderr b/tests/ui/issues/issue-19086.stderr
index 90d0bb406..03b9249bb 100644
--- a/tests/ui/issues/issue-19086.stderr
+++ b/tests/ui/issues/issue-19086.stderr
@@ -7,6 +7,6 @@ LL | FooB { x: i32, y: i32 }
LL | FooB(a, b) => println!("{} {}", a, b),
| ^^^^^^^^^^ help: use struct pattern syntax instead: `FooB { x: a, y: b }`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0532`.
diff --git a/tests/ui/issues/issue-1920-1.stderr b/tests/ui/issues/issue-1920-1.stderr
index a54692425..b7c7da006 100644
--- a/tests/ui/issues/issue-1920-1.stderr
+++ b/tests/ui/issues/issue-1920-1.stderr
@@ -10,6 +10,6 @@ note: required by a bound in `assert_clone`
LL | fn assert_clone<T>() where T : Clone { }
| ^^^^^ required by this bound in `assert_clone`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-1920-2.stderr b/tests/ui/issues/issue-1920-2.stderr
index 1083b0112..844cb0ff1 100644
--- a/tests/ui/issues/issue-1920-2.stderr
+++ b/tests/ui/issues/issue-1920-2.stderr
@@ -10,6 +10,6 @@ note: required by a bound in `assert_clone`
LL | fn assert_clone<T>() where T : Clone { }
| ^^^^^ required by this bound in `assert_clone`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-1920-3.stderr b/tests/ui/issues/issue-1920-3.stderr
index 3f0787c88..525ca4685 100644
--- a/tests/ui/issues/issue-1920-3.stderr
+++ b/tests/ui/issues/issue-1920-3.stderr
@@ -10,6 +10,6 @@ note: required by a bound in `assert_clone`
LL | fn assert_clone<T>() where T : Clone { }
| ^^^^^ required by this bound in `assert_clone`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-19244-1.stderr b/tests/ui/issues/issue-19244-1.stderr
index 1eb530542..9c1336402 100644
--- a/tests/ui/issues/issue-19244-1.stderr
+++ b/tests/ui/issues/issue-19244-1.stderr
@@ -2,8 +2,8 @@ error[E0609]: no field `1` on type `(usize,)`
--> $DIR/issue-19244-1.rs:4:24
|
LL | let a: [isize; TUP.1];
- | ^
+ | ^ unknown field
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0609`.
diff --git a/tests/ui/issues/issue-19244-2.stderr b/tests/ui/issues/issue-19244-2.stderr
index 54529fdf5..533861b11 100644
--- a/tests/ui/issues/issue-19244-2.stderr
+++ b/tests/ui/issues/issue-19244-2.stderr
@@ -4,8 +4,8 @@ error[E0609]: no field `nonexistent_field` on type `MyStruct`
LL | let a: [isize; STRUCT.nonexistent_field];
| ^^^^^^^^^^^^^^^^^ unknown field
|
- = note: available fields are: `field`
+ = note: available field is: `field`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0609`.
diff --git a/tests/ui/issues/issue-19482.stderr b/tests/ui/issues/issue-19482.stderr
index 90e6f7995..903a9f98c 100644
--- a/tests/ui/issues/issue-19482.stderr
+++ b/tests/ui/issues/issue-19482.stderr
@@ -7,6 +7,6 @@ LL | type A;
LL | fn bar(x: &dyn Foo) {}
| ^^^ help: specify the associated type: `Foo<A = Type>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0191`.
diff --git a/tests/ui/issues/issue-19521.stderr b/tests/ui/issues/issue-19521.stderr
index 13a12acb3..f451dc36d 100644
--- a/tests/ui/issues/issue-19521.stderr
+++ b/tests/ui/issues/issue-19521.stderr
@@ -4,6 +4,6 @@ error[E0599]: no method named `homura` found for reference `&'static str` in the
LL | "".homura()();
| ^^^^^^ method not found in `&str`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-1962.stderr b/tests/ui/issues/issue-1962.stderr
index 4c32a4cf3..db235d473 100644
--- a/tests/ui/issues/issue-1962.stderr
+++ b/tests/ui/issues/issue-1962.stderr
@@ -6,5 +6,5 @@ LL | 'a: while true {
|
= note: requested on the command line with `-D while-true`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-19692.stderr b/tests/ui/issues/issue-19692.stderr
index 9e888ed75..1e3d7a2e2 100644
--- a/tests/ui/issues/issue-19692.stderr
+++ b/tests/ui/issues/issue-19692.stderr
@@ -7,6 +7,6 @@ LL | struct Homura;
LL | let Some(ref madoka) = Some(homura.kaname());
| ^^^^^^ method not found in `Homura`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-19734.stderr b/tests/ui/issues/issue-19734.stderr
index 81757974d..ed48714fe 100644
--- a/tests/ui/issues/issue-19734.stderr
+++ b/tests/ui/issues/issue-19734.stderr
@@ -4,5 +4,5 @@ error: cannot find macro `undef` in this scope
LL | undef!();
| ^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-19922.stderr b/tests/ui/issues/issue-19922.stderr
index 826b2ac04..0355d3a89 100644
--- a/tests/ui/issues/issue-19922.stderr
+++ b/tests/ui/issues/issue-19922.stderr
@@ -6,6 +6,6 @@ LL | let homura = Homura::Akemi { kaname: () };
|
= note: available fields are: `madoka`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0559`.
diff --git a/tests/ui/issues/issue-19991.stderr b/tests/ui/issues/issue-19991.stderr
index 57b0882b6..ff039f3ad 100644
--- a/tests/ui/issues/issue-19991.stderr
+++ b/tests/ui/issues/issue-19991.stderr
@@ -11,6 +11,6 @@ LL | | };
= note: `if` expressions without `else` evaluate to `()`
= help: consider adding an `else` block that evaluates to the expected type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0317`.
diff --git a/tests/ui/issues/issue-20162.stderr b/tests/ui/issues/issue-20162.stderr
index ebdf2528f..8f45f0d36 100644
--- a/tests/ui/issues/issue-20162.stderr
+++ b/tests/ui/issues/issue-20162.stderr
@@ -12,6 +12,6 @@ LL + #[derive(Ord)]
LL | struct X { x: i32 }
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-20225.stderr b/tests/ui/issues/issue-20225.stderr
index b34aa8e1f..2d24a5bbd 100644
--- a/tests/ui/issues/issue-20225.stderr
+++ b/tests/ui/issues/issue-20225.stderr
@@ -9,8 +9,8 @@ LL | extern "rust-call" fn call(&self, (_,): (T,)) {}
| expected `&'a T`, found type parameter `T`
| help: change the parameter type to match the trait: `(&'a T,)`
|
- = note: expected signature `extern "rust-call" fn(&Foo, (&'a T,))`
- found signature `extern "rust-call" fn(&Foo, (T,))`
+ = note: expected signature `extern "rust-call" fn(&Foo, (&'a _,))`
+ found signature `extern "rust-call" fn(&Foo, (_,))`
error[E0053]: method `call_mut` has an incompatible type for trait
--> $DIR/issue-20225.rs:11:51
@@ -23,8 +23,8 @@ LL | extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {}
| expected `&'a T`, found type parameter `T`
| help: change the parameter type to match the trait: `(&'a T,)`
|
- = note: expected signature `extern "rust-call" fn(&mut Foo, (&'a T,))`
- found signature `extern "rust-call" fn(&mut Foo, (T,))`
+ = note: expected signature `extern "rust-call" fn(&mut Foo, (&'a _,))`
+ found signature `extern "rust-call" fn(&mut Foo, (_,))`
error[E0053]: method `call_once` has an incompatible type for trait
--> $DIR/issue-20225.rs:18:47
@@ -38,8 +38,8 @@ LL | extern "rust-call" fn call_once(self, (_,): (T,)) {}
| expected `&'a T`, found type parameter `T`
| help: change the parameter type to match the trait: `(&'a T,)`
|
- = note: expected signature `extern "rust-call" fn(Foo, (&'a T,))`
- found signature `extern "rust-call" fn(Foo, (T,))`
+ = note: expected signature `extern "rust-call" fn(Foo, (&'a _,))`
+ found signature `extern "rust-call" fn(Foo, (_,))`
error: aborting due to 3 previous errors
diff --git a/tests/ui/issues/issue-20261.stderr b/tests/ui/issues/issue-20261.stderr
index 9ac751e4d..6738708ca 100644
--- a/tests/ui/issues/issue-20261.stderr
+++ b/tests/ui/issues/issue-20261.stderr
@@ -4,6 +4,6 @@ error[E0282]: type annotations needed
LL | i.clone();
| ^^^^^ cannot infer type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/issues/issue-20313.stderr b/tests/ui/issues/issue-20313.stderr
index 7a0b344a5..f740b0cca 100644
--- a/tests/ui/issues/issue-20313.stderr
+++ b/tests/ui/issues/issue-20313.stderr
@@ -7,6 +7,6 @@ LL | fn sqrt(x: f32) -> f32;
= note: see issue #29602 <https://github.com/rust-lang/rust/issues/29602> for more information
= help: add `#![feature(link_llvm_intrinsics)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/issues/issue-20433.stderr b/tests/ui/issues/issue-20433.stderr
index 3ae952546..2dd0b3c2f 100644
--- a/tests/ui/issues/issue-20433.stderr
+++ b/tests/ui/issues/issue-20433.stderr
@@ -8,6 +8,6 @@ LL | fn iceman(c: Vec<[i32]>) {}
note: required by a bound in `Vec`
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-20714.stderr b/tests/ui/issues/issue-20714.stderr
index a3447aa68..f537a0158 100644
--- a/tests/ui/issues/issue-20714.stderr
+++ b/tests/ui/issues/issue-20714.stderr
@@ -15,6 +15,6 @@ LL - let g = G();
LL + let g = G;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0618`.
diff --git a/tests/ui/issues/issue-20772.stderr b/tests/ui/issues/issue-20772.stderr
index 0c7e728c6..81f80aef5 100644
--- a/tests/ui/issues/issue-20772.stderr
+++ b/tests/ui/issues/issue-20772.stderr
@@ -12,6 +12,6 @@ LL | trait T : Iterator<Item=Self::Item>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/issues/issue-20831-debruijn.stderr b/tests/ui/issues/issue-20831-debruijn.stderr
index c3af1f678..bd3ff5d59 100644
--- a/tests/ui/issues/issue-20831-debruijn.stderr
+++ b/tests/ui/issues/issue-20831-debruijn.stderr
@@ -22,6 +22,6 @@ LL | fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher
= note: expected `<MyStruct<'a> as Publisher<'_>>`
found `<MyStruct<'_> as Publisher<'_>>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0495`.
diff --git a/tests/ui/issues/issue-20847.rs b/tests/ui/issues/issue-20847.rs
index 0cd7edf89..03e632263 100644
--- a/tests/ui/issues/issue-20847.rs
+++ b/tests/ui/issues/issue-20847.rs
@@ -1,8 +1,6 @@
// run-pass
#![feature(fn_traits)]
-use std::ops::Fn;
-
fn say(x: u32, y: u32) {
println!("{} {}", x, y);
}
diff --git a/tests/ui/issues/issue-20939.stderr b/tests/ui/issues/issue-20939.stderr
index 3819a21a2..00357155c 100644
--- a/tests/ui/issues/issue-20939.stderr
+++ b/tests/ui/issues/issue-20939.stderr
@@ -4,6 +4,6 @@ error[E0371]: the object type `(dyn Foo + 'a)` automatically implements the trai
LL | impl<'a> Foo for dyn Foo + 'a {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Foo + 'a)` automatically implements trait `Foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0371`.
diff --git a/tests/ui/issues/issue-21160.stderr b/tests/ui/issues/issue-21160.stderr
index b39a3aad3..892a4530e 100644
--- a/tests/ui/issues/issue-21160.stderr
+++ b/tests/ui/issues/issue-21160.stderr
@@ -13,6 +13,6 @@ LL + #[derive(Hash)]
LL | struct Bar;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-21174.stderr b/tests/ui/issues/issue-21174.stderr
index 5981d9dc7..a6b75c913 100644
--- a/tests/ui/issues/issue-21174.stderr
+++ b/tests/ui/issues/issue-21174.stderr
@@ -7,6 +7,6 @@ LL | let new: T::B = unsafe { std::mem::transmute(value) };
= note: source type: `<T as Trait<'_>>::A` (this type does not have a fixed size)
= note: target type: `<T as Trait<'_>>::B` (this type does not have a fixed size)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0512`.
diff --git a/tests/ui/issues/issue-21177.stderr b/tests/ui/issues/issue-21177.stderr
index 8b749edcc..9f66f43a1 100644
--- a/tests/ui/issues/issue-21177.stderr
+++ b/tests/ui/issues/issue-21177.stderr
@@ -12,6 +12,6 @@ LL | fn foo<T: Trait<A = T::B>>() { }
| ^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/issues/issue-21202.stderr b/tests/ui/issues/issue-21202.stderr
index e7c3f2f9a..3485994e8 100644
--- a/tests/ui/issues/issue-21202.stderr
+++ b/tests/ui/issues/issue-21202.stderr
@@ -9,6 +9,6 @@ LL | Foo::foo(&f);
LL | fn foo(&self) { }
| ------------- private method defined here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0624`.
diff --git a/tests/ui/issues/issue-21332.stderr b/tests/ui/issues/issue-21332.stderr
index 825492880..96e0f5fdb 100644
--- a/tests/ui/issues/issue-21332.stderr
+++ b/tests/ui/issues/issue-21332.stderr
@@ -10,6 +10,6 @@ LL | fn next(&mut self) -> Result<i32, i32> { Ok(7) }
= note: expected signature `fn(&mut S) -> Option<i32>`
found signature `fn(&mut S) -> Result<i32, i32>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0053`.
diff --git a/tests/ui/issues/issue-21449.stderr b/tests/ui/issues/issue-21449.stderr
index ecaf6faba..cd1059d48 100644
--- a/tests/ui/issues/issue-21449.stderr
+++ b/tests/ui/issues/issue-21449.stderr
@@ -4,6 +4,6 @@ error[E0574]: expected struct, variant or union type, found module `MyMod`
LL | let myVar = MyMod { T: 0 };
| ^^^^^ not a struct, variant or union type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0574`.
diff --git a/tests/ui/issues/issue-2150.stderr b/tests/ui/issues/issue-2150.stderr
index 26874faa2..a9268646e 100644
--- a/tests/ui/issues/issue-2150.stderr
+++ b/tests/ui/issues/issue-2150.stderr
@@ -12,5 +12,5 @@ note: the lint level is defined here
LL | #![deny(unreachable_code)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-2151.stderr b/tests/ui/issues/issue-2151.stderr
index c75038b61..b130f1624 100644
--- a/tests/ui/issues/issue-2151.stderr
+++ b/tests/ui/issues/issue-2151.stderr
@@ -11,6 +11,6 @@ help: consider giving `x` an explicit type
LL | let x: /* Type */ = panic!();
| ++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/issues/issue-21554.stderr b/tests/ui/issues/issue-21554.stderr
index 6ea552a26..b1b59af6e 100644
--- a/tests/ui/issues/issue-21554.stderr
+++ b/tests/ui/issues/issue-21554.stderr
@@ -4,6 +4,6 @@ error[E0606]: casting `fn(i32) -> Inches {Inches}` as `f32` is invalid
LL | Inches as f32;
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0606`.
diff --git a/tests/ui/issues/issue-21596.stderr b/tests/ui/issues/issue-21596.stderr
index a336d1b0e..8a7fca5f4 100644
--- a/tests/ui/issues/issue-21596.stderr
+++ b/tests/ui/issues/issue-21596.stderr
@@ -10,6 +10,6 @@ LL | println!("{}", z.to_string());
`*const u8: std::fmt::Display`
which is required by `*const u8: ToString`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-21763.stderr b/tests/ui/issues/issue-21763.stderr
index a887635d3..135b705ee 100644
--- a/tests/ui/issues/issue-21763.stderr
+++ b/tests/ui/issues/issue-21763.stderr
@@ -7,7 +7,7 @@ LL | foo::<HashMap<Rc<()>, Rc<()>>>();
= help: within `(Rc<()>, Rc<()>)`, the trait `Send` is not implemented for `Rc<()>`
= note: required because it appears within the type `(Rc<()>, Rc<()>)`
= note: required for `hashbrown::raw::RawTable<(Rc<()>, Rc<()>)>` to implement `Send`
-note: required because it appears within the type `HashMap<Rc<()>, Rc<()>, RandomState>`
+note: required because it appears within the type `hashbrown::map::HashMap<Rc<()>, Rc<()>, RandomState>`
--> $HASHBROWN_SRC_LOCATION
note: required because it appears within the type `HashMap<Rc<()>, Rc<()>>`
--> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
@@ -17,6 +17,6 @@ note: required by a bound in `foo`
LL | fn foo<T: Send>() {}
| ^^^^ required by this bound in `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-21837.stderr b/tests/ui/issues/issue-21837.stderr
index 3d3852664..f19893926 100644
--- a/tests/ui/issues/issue-21837.stderr
+++ b/tests/ui/issues/issue-21837.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `T`
LL | impl<T: Bound> Trait2 for Foo<T> {}
| +++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-21946.stderr b/tests/ui/issues/issue-21946.stderr
index 67f6b3081..d1b4a808d 100644
--- a/tests/ui/issues/issue-21946.stderr
+++ b/tests/ui/issues/issue-21946.stderr
@@ -4,6 +4,6 @@ error[E0275]: overflow evaluating the requirement `<FooStruct as Foo>::A == _`
LL | type A = <FooStruct as Foo>::A;
| ^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/issues/issue-21974.stderr b/tests/ui/issues/issue-21974.stderr
index 2d60b18b1..3934846ea 100644
--- a/tests/ui/issues/issue-21974.stderr
+++ b/tests/ui/issues/issue-21974.stderr
@@ -12,6 +12,6 @@ LL | where &'a T : Foo,
LL | &'b T : Foo
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/issues/issue-22034.stderr b/tests/ui/issues/issue-22034.stderr
index d64b02409..6d899618d 100644
--- a/tests/ui/issues/issue-22034.stderr
+++ b/tests/ui/issues/issue-22034.stderr
@@ -8,6 +8,6 @@ LL | &mut *(ptr as *mut dyn Fn())
= note: wrap the `()` in a closure with no arguments: `|| { /* code */ }`
= note: required for the cast from `*mut ()` to `*mut dyn Fn()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-22289.stderr b/tests/ui/issues/issue-22289.stderr
index b594e8b7a..560fbc73b 100644
--- a/tests/ui/issues/issue-22289.stderr
+++ b/tests/ui/issues/issue-22289.stderr
@@ -9,6 +9,6 @@ help: consider borrowing the value
LL | &0 as &dyn std::any::Any;
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0605`.
diff --git a/tests/ui/issues/issue-22312.stderr b/tests/ui/issues/issue-22312.stderr
index da15c092f..be3f5ace5 100644
--- a/tests/ui/issues/issue-22312.stderr
+++ b/tests/ui/issues/issue-22312.stderr
@@ -9,6 +9,6 @@ help: consider borrowing the value
LL | let indexer = &(&*self as &dyn Index<usize, Output = <Self as Index<usize>>::Output>);
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0605`.
diff --git a/tests/ui/issues/issue-22370.stderr b/tests/ui/issues/issue-22370.stderr
index cd27c4e4e..977cfe06b 100644
--- a/tests/ui/issues/issue-22370.stderr
+++ b/tests/ui/issues/issue-22370.stderr
@@ -9,6 +9,6 @@ LL | fn f(a: &dyn A) {}
|
= note: because of the default `Self` reference, type parameters must be specified on object types
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0393`.
diff --git a/tests/ui/issues/issue-22434.stderr b/tests/ui/issues/issue-22434.stderr
index dab62bcbb..172ae386c 100644
--- a/tests/ui/issues/issue-22434.stderr
+++ b/tests/ui/issues/issue-22434.stderr
@@ -7,6 +7,6 @@ LL | type A;
LL | type I<'a> = &'a (dyn Foo + 'a);
| ^^^ help: specify the associated type: `Foo<A = Type>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0191`.
diff --git a/tests/ui/issues/issue-22468.stderr b/tests/ui/issues/issue-22468.stderr
index 3fff91acb..052888d20 100644
--- a/tests/ui/issues/issue-22468.stderr
+++ b/tests/ui/issues/issue-22468.stderr
@@ -7,7 +7,10 @@ LL | let x = foo("baz");
| ^^^-------
| |
| call expression requires function
+...
+LL | fn foo(file: &str) -> bool {
+ | -------------------------- this function of the same name is available here, but it's shadowed by the local binding
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0618`.
diff --git a/tests/ui/issues/issue-22599.stderr b/tests/ui/issues/issue-22599.stderr
index 2b34830d0..b599f6feb 100644
--- a/tests/ui/issues/issue-22599.stderr
+++ b/tests/ui/issues/issue-22599.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(unused_variables)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-22638.polonius.stderr b/tests/ui/issues/issue-22638.polonius.stderr
index 87a7c00e4..3a94ed7bd 100644
--- a/tests/ui/issues/issue-22638.polonius.stderr
+++ b/tests/ui/issues/issue-22638.polonius.stderr
@@ -11,5 +11,5 @@ LL | pub fn matches<F: Fn()>(&self, f: &F) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-22638.polonius/issue-22638.long-type.txt'
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-22638.rs b/tests/ui/issues/issue-22638.rs
index c2407227c..67fd147ae 100644
--- a/tests/ui/issues/issue-22638.rs
+++ b/tests/ui/issues/issue-22638.rs
@@ -1,6 +1,7 @@
// build-fail
// normalize-stderr-test: "<\{closure@.+`" -> "$$CLOSURE`"
// normalize-stderr-test: ".nll/" -> "/"
+// ignore-compare-mode-next-solver (hangs)
#![allow(unused)]
diff --git a/tests/ui/issues/issue-22638.stderr b/tests/ui/issues/issue-22638.stderr
index 1caa4221f..45290f6af 100644
--- a/tests/ui/issues/issue-22638.stderr
+++ b/tests/ui/issues/issue-22638.stderr
@@ -1,14 +1,14 @@
error: reached the recursion limit while instantiating `A::matches::$CLOSURE`
- --> $DIR/issue-22638.rs:56:9
+ --> $DIR/issue-22638.rs:57:9
|
LL | a.matches(f)
| ^^^^^^^^^^^^
|
note: `A::matches` defined here
- --> $DIR/issue-22638.rs:15:5
+ --> $DIR/issue-22638.rs:16:5
|
LL | pub fn matches<F: Fn()>(&self, f: &F) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-22684.stderr b/tests/ui/issues/issue-22684.stderr
index 2407ece5e..e2ca54cae 100644
--- a/tests/ui/issues/issue-22684.stderr
+++ b/tests/ui/issues/issue-22684.stderr
@@ -6,6 +6,6 @@ LL | let _: () = foo::Foo.bar();
| |
| expected due to this
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-22706.stderr b/tests/ui/issues/issue-22706.stderr
index 5366a36b1..309e11a25 100644
--- a/tests/ui/issues/issue-22706.stderr
+++ b/tests/ui/issues/issue-22706.stderr
@@ -6,6 +6,6 @@ LL | fn is_copy<T: ::std::marker<i32>::Copy>() {}
| |
| not allowed on module `marker`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0109`.
diff --git a/tests/ui/issues/issue-2281-part1.stderr b/tests/ui/issues/issue-2281-part1.stderr
index c2391a7c0..47a1ef8cc 100644
--- a/tests/ui/issues/issue-2281-part1.stderr
+++ b/tests/ui/issues/issue-2281-part1.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `foobar` in this scope
LL | fn main() { println!("{}", foobar); }
| ^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/issues/issue-22872.stderr b/tests/ui/issues/issue-22872.stderr
index 63222d25c..6ff710b11 100644
--- a/tests/ui/issues/issue-22872.stderr
+++ b/tests/ui/issues/issue-22872.stderr
@@ -19,6 +19,6 @@ help: consider further restricting the associated type
LL | fn push_process<P>(process: P) where P: Process<'static>, <P as Process<'_>>::Item: Iterator {
| ++++++++++++++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-22874.stderr b/tests/ui/issues/issue-22874.stderr
index d64899080..717ce72b9 100644
--- a/tests/ui/issues/issue-22874.stderr
+++ b/tests/ui/issues/issue-22874.stderr
@@ -7,6 +7,6 @@ LL | rows: [[String]],
= help: the trait `Sized` is not implemented for `[String]`
= note: slice and array elements must have `Sized` type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-22886.stderr b/tests/ui/issues/issue-22886.stderr
index c4b396559..a04fa677f 100644
--- a/tests/ui/issues/issue-22886.stderr
+++ b/tests/ui/issues/issue-22886.stderr
@@ -4,6 +4,6 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait,
LL | impl<'a> Iterator for Newtype {
| ^^ unconstrained lifetime parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0207`.
diff --git a/tests/ui/issues/issue-22933-2.stderr b/tests/ui/issues/issue-22933-2.stderr
index 1a0e87e15..8cda8598f 100644
--- a/tests/ui/issues/issue-22933-2.stderr
+++ b/tests/ui/issues/issue-22933-2.stderr
@@ -10,6 +10,6 @@ LL | ApplePie = Delicious::Apple as isize | Delicious::PIE as isize,
| variant or associated item not found in `Delicious`
| help: there is a variant with a similar name: `Pie`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-23041.stderr b/tests/ui/issues/issue-23041.stderr
index 4271c67c3..0142926dd 100644
--- a/tests/ui/issues/issue-23041.stderr
+++ b/tests/ui/issues/issue-23041.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic argument
LL | b.downcast_ref::<fn(_) -> _>();
| ~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/issues/issue-23046.stderr b/tests/ui/issues/issue-23046.stderr
index 1403ecbd9..b6e238145 100644
--- a/tests/ui/issues/issue-23046.stderr
+++ b/tests/ui/issues/issue-23046.stderr
@@ -9,6 +9,6 @@ help: consider giving this closure parameter an explicit type, where the type fo
LL | let ex = |x: Expr<'_, VAR>| {
| +++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/issues/issue-23073.stderr b/tests/ui/issues/issue-23073.stderr
index 3a9f49ef1..6a61df8d4 100644
--- a/tests/ui/issues/issue-23073.stderr
+++ b/tests/ui/issues/issue-23073.stderr
@@ -9,6 +9,6 @@ help: if there were a trait named `Example` with associated type `T` implemented
LL | type FooT = <<Self as Bar>::Foo as Example>::T;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0223`.
diff --git a/tests/ui/issues/issue-23122-1.stderr b/tests/ui/issues/issue-23122-1.stderr
index 0b568b30e..c432a502c 100644
--- a/tests/ui/issues/issue-23122-1.stderr
+++ b/tests/ui/issues/issue-23122-1.stderr
@@ -4,6 +4,6 @@ error[E0275]: overflow evaluating the requirement `<GetNext<T> as Next>::Next ==
LL | type Next = <GetNext<T> as Next>::Next;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/issues/issue-23122-2.stderr b/tests/ui/issues/issue-23122-2.stderr
index af77e4b1a..b8aa587a7 100644
--- a/tests/ui/issues/issue-23122-2.stderr
+++ b/tests/ui/issues/issue-23122-2.stderr
@@ -13,6 +13,6 @@ LL | impl<T: Next> Next for GetNext<T> {
| |
| unsatisfied trait bound introduced here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/issues/issue-23189.stderr b/tests/ui/issues/issue-23189.stderr
index ed065212c..37d778dc9 100644
--- a/tests/ui/issues/issue-23189.stderr
+++ b/tests/ui/issues/issue-23189.stderr
@@ -4,6 +4,6 @@ error[E0574]: expected struct, variant or union type, found module `module`
LL | let _ = module { x: 0 };
| ^^^^^^ not a struct, variant or union type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0574`.
diff --git a/tests/ui/issues/issue-23217.stderr b/tests/ui/issues/issue-23217.stderr
index 5d3d8a4f8..05ee0474c 100644
--- a/tests/ui/issues/issue-23217.stderr
+++ b/tests/ui/issues/issue-23217.stderr
@@ -9,6 +9,6 @@ LL | B = SomeEnum::A,
| variant or associated item not found in `SomeEnum`
| help: there is a variant with a similar name: `B`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-23253.stderr b/tests/ui/issues/issue-23253.stderr
index be5714cd9..ec7696909 100644
--- a/tests/ui/issues/issue-23253.stderr
+++ b/tests/ui/issues/issue-23253.stderr
@@ -2,8 +2,8 @@ error[E0609]: no field `a` on type `Foo`
--> $DIR/issue-23253.rs:4:14
|
LL | Foo::Bar.a;
- | ^
+ | ^ unknown field
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0609`.
diff --git a/tests/ui/issues/issue-23281.stderr b/tests/ui/issues/issue-23281.stderr
index 804334c9b..e1f4e8a96 100644
--- a/tests/ui/issues/issue-23281.stderr
+++ b/tests/ui/issues/issue-23281.stderr
@@ -18,6 +18,6 @@ LL | struct Vec<T> {
LL | t: T,
| - ...if indirection were used here: `Box<T>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-23302-1.stderr b/tests/ui/issues/issue-23302-1.stderr
index d753bdeb9..5c2758dc6 100644
--- a/tests/ui/issues/issue-23302-1.stderr
+++ b/tests/ui/issues/issue-23302-1.stderr
@@ -17,6 +17,6 @@ LL | A = X::A as isize,
| ^^^^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/issues/issue-23302-2.stderr b/tests/ui/issues/issue-23302-2.stderr
index b756ee1d5..93665af69 100644
--- a/tests/ui/issues/issue-23302-2.stderr
+++ b/tests/ui/issues/issue-23302-2.stderr
@@ -17,6 +17,6 @@ LL | A = Y::B as isize,
| ^^^^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/issues/issue-23302-3.stderr b/tests/ui/issues/issue-23302-3.stderr
index 6cdc94551..b3e933a21 100644
--- a/tests/ui/issues/issue-23302-3.stderr
+++ b/tests/ui/issues/issue-23302-3.stderr
@@ -27,6 +27,6 @@ LL | const A: i32 = B;
| ^^^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/issues/issue-23477.rs b/tests/ui/issues/issue-23477.rs
index 988ebe03c..1ce05ba39 100644
--- a/tests/ui/issues/issue-23477.rs
+++ b/tests/ui/issues/issue-23477.rs
@@ -1,5 +1,4 @@
// build-pass
-// ignore-asmjs wasm2js does not support source maps yet
// compile-flags: -g
pub struct Dst {
diff --git a/tests/ui/issues/issue-23543.stderr b/tests/ui/issues/issue-23543.stderr
index ebb70afe3..d917a4c51 100644
--- a/tests/ui/issues/issue-23543.stderr
+++ b/tests/ui/issues/issue-23543.stderr
@@ -4,6 +4,6 @@ error[E0229]: associated type bindings are not allowed here
LL | where T<Bogus = Foo>: A;
| ^^^^^^^^^^^ associated type not allowed here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0229`.
diff --git a/tests/ui/issues/issue-23544.stderr b/tests/ui/issues/issue-23544.stderr
index c912baccb..2a7e93f0e 100644
--- a/tests/ui/issues/issue-23544.stderr
+++ b/tests/ui/issues/issue-23544.stderr
@@ -4,6 +4,6 @@ error[E0229]: associated type bindings are not allowed here
LL | where T<Bogus = Self::AlsoBogus>: A;
| ^^^^^^^^^^^^^^^^^^^^^^^ associated type not allowed here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0229`.
diff --git a/tests/ui/issues/issue-23966.stderr b/tests/ui/issues/issue-23966.stderr
index 542aed0eb..c29e88614 100644
--- a/tests/ui/issues/issue-23966.stderr
+++ b/tests/ui/issues/issue-23966.stderr
@@ -10,6 +10,6 @@ LL | "".chars().fold(|_, _| (), ());
note: required by a bound in `fold`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-24013.stderr b/tests/ui/issues/issue-24013.stderr
index 72102f460..37a86ecc5 100644
--- a/tests/ui/issues/issue-24013.stderr
+++ b/tests/ui/issues/issue-24013.stderr
@@ -4,6 +4,6 @@ error[E0282]: type annotations needed
LL | unsafe {swap::<&mut _>(transmute(&a), transmute(&b))};
| ^^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `swap`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/issues/issue-24322.stderr b/tests/ui/issues/issue-24322.stderr
index 954fd4928..d078069ad 100644
--- a/tests/ui/issues/issue-24322.stderr
+++ b/tests/ui/issues/issue-24322.stderr
@@ -6,9 +6,9 @@ LL | let x: &fn(&B) -> u32 = &B::func;
| |
| expected due to this
|
- = note: expected reference `&for<'a> fn(&'a B) -> u32`
- found reference `&for<'a> fn(&'a B) -> u32 {B::func}`
+ = note: expected reference `&for<'a> fn(&'a B) -> _`
+ found reference `&for<'a> fn(&'a B) -> _ {B::func}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-24352.stderr b/tests/ui/issues/issue-24352.stderr
index f1c3891b8..015569cce 100644
--- a/tests/ui/issues/issue-24352.stderr
+++ b/tests/ui/issues/issue-24352.stderr
@@ -15,6 +15,6 @@ help: consider using a floating-point literal by writing it with `.0`
LL | 1.0f64 - 1.0
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-24357.stderr b/tests/ui/issues/issue-24357.stderr
index b9e15f5e2..08a5a8ac5 100644
--- a/tests/ui/issues/issue-24357.stderr
+++ b/tests/ui/issues/issue-24357.stderr
@@ -12,6 +12,6 @@ LL | let f = move || { let y = x; };
LL | let z = x;
| ^ value used here after move
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/issues/issue-24365.stderr b/tests/ui/issues/issue-24365.stderr
index f9eead8a4..3f6ed0231 100644
--- a/tests/ui/issues/issue-24365.stderr
+++ b/tests/ui/issues/issue-24365.stderr
@@ -2,19 +2,19 @@ error[E0609]: no field `b` on type `Foo`
--> $DIR/issue-24365.rs:10:22
|
LL | println!("{}", a.b);
- | ^
+ | ^ unknown field
error[E0609]: no field `attr_name_idx` on type `&Attribute`
--> $DIR/issue-24365.rs:17:18
|
LL | let z = (&x).attr_name_idx;
- | ^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^ unknown field
error[E0609]: no field `attr_name_idx` on type `Attribute`
--> $DIR/issue-24365.rs:18:15
|
LL | let y = x.attr_name_idx;
- | ^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^ unknown field
error: aborting due to 3 previous errors
diff --git a/tests/ui/issues/issue-24424.stderr b/tests/ui/issues/issue-24424.stderr
index 50d7f988e..d42750e7a 100644
--- a/tests/ui/issues/issue-24424.stderr
+++ b/tests/ui/issues/issue-24424.stderr
@@ -10,6 +10,6 @@ note: multiple `impl`s or `where` clauses satisfying `T0: Trait0<'l0>` found
LL | impl <'l0, 'l1, T0> Trait1<'l0, T0> for bool where T0 : Trait0<'l0>, T0 : Trait0<'l1> {}
| ^^^^^^^^^^^ ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/issues/issue-24687-embed-debuginfo/main.rs b/tests/ui/issues/issue-24687-embed-debuginfo/main.rs
index f08bcdfe6..773792c7a 100644
--- a/tests/ui/issues/issue-24687-embed-debuginfo/main.rs
+++ b/tests/ui/issues/issue-24687-embed-debuginfo/main.rs
@@ -1,7 +1,6 @@
// run-pass
// aux-build:issue-24687-lib.rs
// compile-flags:-g
-// ignore-asmjs wasm2js does not support source maps yet
extern crate issue_24687_lib as d;
diff --git a/tests/ui/issues/issue-24819.stderr b/tests/ui/issues/issue-24819.stderr
index 8b4f1dbce..8ec34aa13 100644
--- a/tests/ui/issues/issue-24819.stderr
+++ b/tests/ui/issues/issue-24819.stderr
@@ -14,6 +14,6 @@ note: function defined here
LL | fn foo(h: &mut HashSet<u32>) {
| ^^^ --------------------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-24945-repeat-dash-opts.rs b/tests/ui/issues/issue-24945-repeat-dash-opts.rs
index 0f92fc2f7..cf3834952 100644
--- a/tests/ui/issues/issue-24945-repeat-dash-opts.rs
+++ b/tests/ui/issues/issue-24945-repeat-dash-opts.rs
@@ -3,7 +3,6 @@
// as options to the compiler.
// compile-flags:-g -g -O -O
-// ignore-asmjs wasm2js does not support source maps yet
fn main() {
assert_eq!(1, 1);
diff --git a/tests/ui/issues/issue-25076.stderr b/tests/ui/issues/issue-25076.stderr
index 065bf7def..2acfe70b4 100644
--- a/tests/ui/issues/issue-25076.stderr
+++ b/tests/ui/issues/issue-25076.stderr
@@ -17,6 +17,6 @@ note: required by a bound in `do_fold`
LL | fn do_fold<B, F: InOut<B, Out=B>>(init: B, f: F) {}
| ^^^^^^^^^^^^^^^ required by this bound in `do_fold`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-25368.stderr b/tests/ui/issues/issue-25368.stderr
index e6ed3aac7..23f1441e6 100644
--- a/tests/ui/issues/issue-25368.stderr
+++ b/tests/ui/issues/issue-25368.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic argument
LL | tx.send(Foo{ foo: PhantomData::<T> });
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/issues/issue-25386.stderr b/tests/ui/issues/issue-25386.stderr
index 727b96908..720b77866 100644
--- a/tests/ui/issues/issue-25386.stderr
+++ b/tests/ui/issues/issue-25386.stderr
@@ -9,6 +9,6 @@ LL | println!("{}", check_ptr_exist!(item, name));
|
= note: this error originates in the macro `check_ptr_exist` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0616`.
diff --git a/tests/ui/issues/issue-2590.stderr b/tests/ui/issues/issue-2590.stderr
index 6aacd563a..517b4814e 100644
--- a/tests/ui/issues/issue-2590.stderr
+++ b/tests/ui/issues/issue-2590.stderr
@@ -4,6 +4,6 @@ error[E0507]: cannot move out of `self.tokens` which is behind a shared referenc
LL | self.tokens
| ^^^^^^^^^^^ move occurs because `self.tokens` has type `Vec<isize>`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/issues/issue-25901.stderr b/tests/ui/issues/issue-25901.stderr
index 1427e4385..673f29fff 100644
--- a/tests/ui/issues/issue-25901.stderr
+++ b/tests/ui/issues/issue-25901.stderr
@@ -19,6 +19,6 @@ LL | impl Deref for A {
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/issues/issue-26056.stderr b/tests/ui/issues/issue-26056.stderr
index 2c873243f..f1f553adf 100644
--- a/tests/ui/issues/issue-26056.stderr
+++ b/tests/ui/issues/issue-26056.stderr
@@ -12,6 +12,6 @@ LL | trait Map: MapLookup<<Self as Map>::Key> {
| |
| this trait cannot be made into an object...
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/issues/issue-26217.stderr b/tests/ui/issues/issue-26217.stderr
index 73c772205..0b153ad74 100644
--- a/tests/ui/issues/issue-26217.stderr
+++ b/tests/ui/issues/issue-26217.stderr
@@ -12,5 +12,5 @@ note: due to current limitations in the borrow checker, this implies a `'static`
LL | fn foo<T>() where for<'a> T: 'a {}
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-26237.stderr b/tests/ui/issues/issue-26237.stderr
index 91d28a5e1..d15e5753a 100644
--- a/tests/ui/issues/issue-26237.stderr
+++ b/tests/ui/issues/issue-26237.stderr
@@ -10,6 +10,6 @@ LL | let mut value_b = 0;
LL | macro_panic!(value_a, value_b);
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0618`.
diff --git a/tests/ui/issues/issue-26484.rs b/tests/ui/issues/issue-26484.rs
index 2a8750d3e..3b40b3dd8 100644
--- a/tests/ui/issues/issue-26484.rs
+++ b/tests/ui/issues/issue-26484.rs
@@ -1,6 +1,5 @@
// run-pass
// compile-flags:-g
-// ignore-asmjs wasm2js does not support source maps yet
fn helper<F: FnOnce(usize) -> bool>(_f: F) {
print!("");
diff --git a/tests/ui/issues/issue-26619.stderr b/tests/ui/issues/issue-26619.stderr
index 1282fd7d3..9175bd2a3 100644
--- a/tests/ui/issues/issue-26619.stderr
+++ b/tests/ui/issues/issue-26619.stderr
@@ -6,6 +6,6 @@ LL | for s in vec!["1|2".to_string()].into_iter().filter_map(|ref line|
| |
| function parameter borrowed here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/issues/issue-26812.stderr b/tests/ui/issues/issue-26812.stderr
index fd1bbb9c5..c2a3d4b83 100644
--- a/tests/ui/issues/issue-26812.stderr
+++ b/tests/ui/issues/issue-26812.stderr
@@ -4,6 +4,6 @@ error[E0128]: generic parameters with a default cannot use forward declared iden
LL | fn avg<T=T::Item>(_: T) {}
| ^^^^^^^ defaulted generic parameters cannot be forward declared
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0128`.
diff --git a/tests/ui/issues/issue-26905.stderr b/tests/ui/issues/issue-26905.stderr
index 10dbb7325..86f6a14cd 100644
--- a/tests/ui/issues/issue-26905.stderr
+++ b/tests/ui/issues/issue-26905.stderr
@@ -7,6 +7,6 @@ LL | impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<MyRc<U>> for MyRc<T>{
= note: `CoerceUnsized` may only be implemented for a coercion between structures with one field being coerced
= note: currently, 2 fields need coercions: `_ptr` (`*const T` to `*const U`), `_boo` (`NotPhantomData<T>` to `NotPhantomData<U>`)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0375`.
diff --git a/tests/ui/issues/issue-26948.stderr b/tests/ui/issues/issue-26948.stderr
index faede1687..982c9758a 100644
--- a/tests/ui/issues/issue-26948.stderr
+++ b/tests/ui/issues/issue-26948.stderr
@@ -4,6 +4,6 @@ error[E0436]: functional record update syntax requires a struct
LL | Foo::A { x: 6, ..orig };
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0436`.
diff --git a/tests/ui/issues/issue-27008.stderr b/tests/ui/issues/issue-27008.stderr
index 9d18045aa..b4bfaa278 100644
--- a/tests/ui/issues/issue-27008.stderr
+++ b/tests/ui/issues/issue-27008.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | let b = [0; S];
| ^ expected `usize`, found `S`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-27078.stderr b/tests/ui/issues/issue-27078.stderr
index ced92bbd4..d0ba9f6ae 100644
--- a/tests/ui/issues/issue-27078.stderr
+++ b/tests/ui/issues/issue-27078.stderr
@@ -14,6 +14,6 @@ help: function arguments must have a statically known size, borrowed types alway
LL | fn foo(&self) -> &'static i32 {
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-27340.stderr b/tests/ui/issues/issue-27340.stderr
index 9caaffd9c..3353b83f4 100644
--- a/tests/ui/issues/issue-27340.stderr
+++ b/tests/ui/issues/issue-27340.stderr
@@ -9,6 +9,6 @@ LL | struct Bar(Foo);
|
= note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0204`.
diff --git a/tests/ui/issues/issue-27433.stderr b/tests/ui/issues/issue-27433.stderr
index da751a649..aba8e6128 100644
--- a/tests/ui/issues/issue-27433.stderr
+++ b/tests/ui/issues/issue-27433.stderr
@@ -6,6 +6,6 @@ LL | const FOO : u32 = foo;
| |
| help: consider using `let` instead of `const`: `let FOO`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0435`.
diff --git a/tests/ui/issues/issue-2823.stderr b/tests/ui/issues/issue-2823.stderr
index b5a2b2f55..5cd3f0804 100644
--- a/tests/ui/issues/issue-2823.stderr
+++ b/tests/ui/issues/issue-2823.stderr
@@ -11,6 +11,6 @@ LL | let _d = c.clone();
= note: the following trait defines an item `clone`, perhaps you need to implement it:
candidate #1: `Clone`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-2848.stderr b/tests/ui/issues/issue-2848.stderr
index 71ed7d70b..873f7efcd 100644
--- a/tests/ui/issues/issue-2848.stderr
+++ b/tests/ui/issues/issue-2848.stderr
@@ -6,6 +6,6 @@ LL | alpha | beta => {}
| |
| pattern doesn't bind `beta`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0408`.
diff --git a/tests/ui/issues/issue-2849.stderr b/tests/ui/issues/issue-2849.stderr
index 9027098d2..ef5cdb42e 100644
--- a/tests/ui/issues/issue-2849.stderr
+++ b/tests/ui/issues/issue-2849.stderr
@@ -6,6 +6,6 @@ LL | Foo::Alpha | Foo::Beta(i) => {}
| |
| pattern doesn't bind `i`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0408`.
diff --git a/tests/ui/issues/issue-28568.stderr b/tests/ui/issues/issue-28568.stderr
index 960259080..c8db0403e 100644
--- a/tests/ui/issues/issue-28568.stderr
+++ b/tests/ui/issues/issue-28568.stderr
@@ -7,6 +7,6 @@ LL | impl Drop for MyStruct {
LL | impl Drop for MyStruct {
| ^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyStruct`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/issues/issue-28586.stderr b/tests/ui/issues/issue-28586.stderr
index d19c4af2d..33f40a341 100644
--- a/tests/ui/issues/issue-28586.stderr
+++ b/tests/ui/issues/issue-28586.stderr
@@ -4,6 +4,6 @@ error[E0599]: no associated item named `BYTES` found for type `usize` in the cur
LL | impl Foo for [u8; usize::BYTES] {}
| ^^^^^ associated item not found in `usize`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-28625.stderr b/tests/ui/issues/issue-28625.stderr
index 7ee0cd486..3600622a4 100644
--- a/tests/ui/issues/issue-28625.stderr
+++ b/tests/ui/issues/issue-28625.stderr
@@ -7,6 +7,6 @@ LL | unsafe { std::mem::transmute(a) }
= note: source type: `&ArrayPeano<T>` (N bits)
= note: target type: `&[T]` (N bits)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0512`.
diff --git a/tests/ui/issues/issue-28776.mir.stderr b/tests/ui/issues/issue-28776.mir.stderr
index 1d470fb5e..e7b7ba082 100644
--- a/tests/ui/issues/issue-28776.mir.stderr
+++ b/tests/ui/issues/issue-28776.mir.stderr
@@ -6,6 +6,6 @@ LL | (&ptr::write)(1 as *mut _, 42);
|
= note: consult the function's documentation for information on how to avoid undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/issues/issue-28776.thir.stderr b/tests/ui/issues/issue-28776.thir.stderr
index e3562810b..63172b854 100644
--- a/tests/ui/issues/issue-28776.thir.stderr
+++ b/tests/ui/issues/issue-28776.thir.stderr
@@ -6,6 +6,6 @@ LL | (&ptr::write)(1 as *mut _, 42);
|
= note: consult the function's documentation for information on how to avoid undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/issues/issue-28971.stderr b/tests/ui/issues/issue-28971.stderr
index 2eb8a1c26..8fd3c7ffc 100644
--- a/tests/ui/issues/issue-28971.stderr
+++ b/tests/ui/issues/issue-28971.stderr
@@ -10,6 +10,6 @@ LL | Foo::Baz(..) => (),
| variant or associated item not found in `Foo`
| help: there is a variant with a similar name: `Bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-29147.stderr b/tests/ui/issues/issue-29147.stderr
index d0d948531..a9cda55fd 100644
--- a/tests/ui/issues/issue-29147.stderr
+++ b/tests/ui/issues/issue-29147.stderr
@@ -12,6 +12,6 @@ LL | impl Foo for S5<u32> { fn xxx(&self) {} }
LL | impl Foo for S5<u64> { fn xxx(&self) {} }
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/issues/issue-2951.stderr b/tests/ui/issues/issue-2951.stderr
index 538bbe2f5..134808b4d 100644
--- a/tests/ui/issues/issue-2951.stderr
+++ b/tests/ui/issues/issue-2951.stderr
@@ -15,6 +15,6 @@ LL | xx = y;
= note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
= note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-29861.stderr b/tests/ui/issues/issue-29861.stderr
index d9d3cf360..e7860c19e 100644
--- a/tests/ui/issues/issue-29861.stderr
+++ b/tests/ui/issues/issue-29861.stderr
@@ -4,6 +4,6 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait,
LL | impl<'a, T: 'a> MakeRef2 for T {
| ^^ unconstrained lifetime parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0207`.
diff --git a/tests/ui/issues/issue-2995.stderr b/tests/ui/issues/issue-2995.stderr
index 0d09612c6..f4a08e175 100644
--- a/tests/ui/issues/issue-2995.stderr
+++ b/tests/ui/issues/issue-2995.stderr
@@ -10,6 +10,6 @@ LL - let _q: &isize = p as &isize;
LL + let _q: &isize = &*p;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0605`.
diff --git a/tests/ui/issues/issue-30007.stderr b/tests/ui/issues/issue-30007.stderr
index 87e770e15..f303221cf 100644
--- a/tests/ui/issues/issue-30007.stderr
+++ b/tests/ui/issues/issue-30007.stderr
@@ -9,5 +9,5 @@ LL | let i: Vec<t!()>;
|
= note: the usage of `t!` is likely invalid in type context
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-30123.stderr b/tests/ui/issues/issue-30123.stderr
index a00a1dbb8..cf71a01b5 100644
--- a/tests/ui/issues/issue-30123.stderr
+++ b/tests/ui/issues/issue-30123.stderr
@@ -7,6 +7,6 @@ LL | let ug = Graph::<i32, i32>::new_undirected();
= note: the function or associated item was found for
- `issue_30123_aux::Graph<N, E, Undirected>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-3021-b.stderr b/tests/ui/issues/issue-3021-b.stderr
index 72289c5f9..48777fec0 100644
--- a/tests/ui/issues/issue-3021-b.stderr
+++ b/tests/ui/issues/issue-3021-b.stderr
@@ -6,6 +6,6 @@ LL | self.v0 = k0 ^ 0x736f6d6570736575;
|
= help: use the `|| { ... }` closure form instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0434`.
diff --git a/tests/ui/issues/issue-30236.stderr b/tests/ui/issues/issue-30236.stderr
index 64cbd58d6..0f69f49f5 100644
--- a/tests/ui/issues/issue-30236.stderr
+++ b/tests/ui/issues/issue-30236.stderr
@@ -4,6 +4,6 @@ error[E0091]: type parameter `Unused` is unused
LL | Unused
| ^^^^^^ unused type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0091`.
diff --git a/tests/ui/issues/issue-30589.stderr b/tests/ui/issues/issue-30589.stderr
index 4b88547a1..6f97a189c 100644
--- a/tests/ui/issues/issue-30589.stderr
+++ b/tests/ui/issues/issue-30589.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `DecoderError` in this scope
LL | impl fmt::Display for DecoderError {
| ^^^^^^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/issues/issue-31011.stderr b/tests/ui/issues/issue-31011.stderr
index 58c170409..9785d56f4 100644
--- a/tests/ui/issues/issue-31011.stderr
+++ b/tests/ui/issues/issue-31011.stderr
@@ -2,7 +2,7 @@ error[E0609]: no field `trace` on type `&T`
--> $DIR/issue-31011.rs:3:17
|
LL | if $ctx.trace {
- | ^^^^^
+ | ^^^^^ unknown field
...
LL | fn wrap<T>(context: &T) -> ()
| - type parameter 'T' declared here
@@ -12,6 +12,6 @@ LL | log!(context, "entered wrapper");
|
= note: this error originates in the macro `log` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0609`.
diff --git a/tests/ui/issues/issue-31511.stderr b/tests/ui/issues/issue-31511.stderr
index cb2991809..177b78754 100644
--- a/tests/ui/issues/issue-31511.stderr
+++ b/tests/ui/issues/issue-31511.stderr
@@ -4,6 +4,6 @@ error[E0607]: cannot cast thin pointer `*const ()` to fat pointer `*const [u8]`
LL | x as *const [u8];
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0607`.
diff --git a/tests/ui/issues/issue-3154.stderr b/tests/ui/issues/issue-3154.stderr
index da2af83ff..3106aaddc 100644
--- a/tests/ui/issues/issue-3154.stderr
+++ b/tests/ui/issues/issue-3154.stderr
@@ -6,6 +6,6 @@ LL | fn thing<'a,Q>(x: &Q) -> Thing<'a,Q> {
LL | Thing { x: x }
| ^^^^^^^^^^^^^^ lifetime `'a` required
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0621`.
diff --git a/tests/ui/issues/issue-31910.stderr b/tests/ui/issues/issue-31910.stderr
index 2603c9442..6ef84d7da 100644
--- a/tests/ui/issues/issue-31910.stderr
+++ b/tests/ui/issues/issue-31910.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | X = Trait::Number,
| ^^^^^^^^^^^^^ expected `isize`, found `i32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-32122-1.stderr b/tests/ui/issues/issue-32122-1.stderr
index b4f5b1296..ae5dffe1f 100644
--- a/tests/ui/issues/issue-32122-1.stderr
+++ b/tests/ui/issues/issue-32122-1.stderr
@@ -13,6 +13,6 @@ help: consider dereferencing
LL | let _: *const u8 = &*a;
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-32122-2.stderr b/tests/ui/issues/issue-32122-2.stderr
index 02c335c15..eb4327bef 100644
--- a/tests/ui/issues/issue-32122-2.stderr
+++ b/tests/ui/issues/issue-32122-2.stderr
@@ -13,6 +13,6 @@ help: consider dereferencing
LL | let _: *const u8 = &***a;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-32326.stderr b/tests/ui/issues/issue-32326.stderr
index dc51198d9..1989a915c 100644
--- a/tests/ui/issues/issue-32326.stderr
+++ b/tests/ui/issues/issue-32326.stderr
@@ -11,6 +11,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | Plus(Box<Expr>, Expr),
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/issues/issue-32377.stderr b/tests/ui/issues/issue-32377.stderr
index 5e870eb3e..01a81cea1 100644
--- a/tests/ui/issues/issue-32377.stderr
+++ b/tests/ui/issues/issue-32377.stderr
@@ -7,6 +7,6 @@ LL | unsafe { mem::transmute(x) }
= note: source type: `[usize; 2]` (N bits)
= note: target type: `Bar<U>` (N bits)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0512`.
diff --git a/tests/ui/issues/issue-32782.stderr b/tests/ui/issues/issue-32782.stderr
index a6c55ba03..477c01f68 100644
--- a/tests/ui/issues/issue-32782.stderr
+++ b/tests/ui/issues/issue-32782.stderr
@@ -10,6 +10,6 @@ LL | foo!();
= help: add `#![feature(allow_internal_unstable)]` to the crate attributes to enable
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/issues/issue-33096.rs b/tests/ui/issues/issue-33096.rs
index 2501e1430..f0b472e2f 100644
--- a/tests/ui/issues/issue-33096.rs
+++ b/tests/ui/issues/issue-33096.rs
@@ -1,6 +1,5 @@
// run-pass
// compile-flags: -g
-// ignore-asmjs wasm2js does not support source maps yet
use std::ops::Deref;
diff --git a/tests/ui/issues/issue-33293.stderr b/tests/ui/issues/issue-33293.stderr
index c8450f400..5badaa153 100644
--- a/tests/ui/issues/issue-33293.stderr
+++ b/tests/ui/issues/issue-33293.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: use of undeclared crate or module `aaa`
LL | aaa::bbb(_) => ()
| ^^^ use of undeclared crate or module `aaa`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/issues/issue-3344.stderr b/tests/ui/issues/issue-3344.stderr
index e849f5d04..eac8f10fc 100644
--- a/tests/ui/issues/issue-3344.stderr
+++ b/tests/ui/issues/issue-3344.stderr
@@ -6,6 +6,6 @@ LL | impl PartialOrd for Thing {
|
= help: implement the missing item: `fn partial_cmp(&self, _: &Thing) -> Option<std::cmp::Ordering> { todo!() }`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/issues/issue-33504.stderr b/tests/ui/issues/issue-33504.stderr
index a831cf585..f3e1ca08b 100644
--- a/tests/ui/issues/issue-33504.stderr
+++ b/tests/ui/issues/issue-33504.stderr
@@ -11,6 +11,6 @@ LL | let Test = 1;
| `Test` is interpreted as a unit struct, not a new binding
| help: introduce a new binding instead: `other_test`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-33525.stderr b/tests/ui/issues/issue-33525.stderr
index f8d703dc3..ee9f4d4c3 100644
--- a/tests/ui/issues/issue-33525.stderr
+++ b/tests/ui/issues/issue-33525.stderr
@@ -8,13 +8,13 @@ error[E0609]: no field `lorem` on type `&'static str`
--> $DIR/issue-33525.rs:3:8
|
LL | "".lorem;
- | ^^^^^
+ | ^^^^^ unknown field
error[E0609]: no field `ipsum` on type `&'static str`
--> $DIR/issue-33525.rs:4:8
|
LL | "".ipsum;
- | ^^^^^
+ | ^^^^^ unknown field
error: aborting due to 3 previous errors
diff --git a/tests/ui/issues/issue-34047.stderr b/tests/ui/issues/issue-34047.stderr
index f770ded50..97b1230ce 100644
--- a/tests/ui/issues/issue-34047.stderr
+++ b/tests/ui/issues/issue-34047.stderr
@@ -7,6 +7,6 @@ LL | const C: u8 = 0;
LL | mut C => {}
| ^ cannot be named the same as a constant
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0530`.
diff --git a/tests/ui/issues/issue-34209.stderr b/tests/ui/issues/issue-34209.stderr
index f9a25b69f..41bc60d03 100644
--- a/tests/ui/issues/issue-34209.stderr
+++ b/tests/ui/issues/issue-34209.stderr
@@ -7,6 +7,6 @@ LL | enum S {
LL | S::B {} => {},
| ^ help: there is a variant with a similar name: `A`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-34229.stderr b/tests/ui/issues/issue-34229.stderr
index 69ef876d2..e6aa0d259 100644
--- a/tests/ui/issues/issue-34229.stderr
+++ b/tests/ui/issues/issue-34229.stderr
@@ -13,6 +13,6 @@ help: consider annotating `Comparable` with `#[derive(PartialOrd)]`
LL | #[derive(PartialEq)] #[derive(PartialOrd)]
| +++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-34334.stderr b/tests/ui/issues/issue-34334.stderr
index 753942dd1..ac2e63eca 100644
--- a/tests/ui/issues/issue-34334.stderr
+++ b/tests/ui/issues/issue-34334.stderr
@@ -2,9 +2,8 @@ error: expected one of `,`, `:`, or `>`, found `=`
--> $DIR/issue-34334.rs:2:29
|
LL | let sr: Vec<(u32, _, _) = vec![];
- | -- - ^ expected one of `,`, `:`, or `>`
- | | |
- | | maybe try to close unmatched angle bracket
+ | -- ^ expected one of `,`, `:`, or `>`
+ | |
| while parsing the type for `sr`
|
help: you might have meant to end the type parameters here
diff --git a/tests/ui/issues/issue-34349.stderr b/tests/ui/issues/issue-34349.stderr
index 8e9a16619..6a6188f10 100644
--- a/tests/ui/issues/issue-34349.stderr
+++ b/tests/ui/issues/issue-34349.stderr
@@ -17,6 +17,6 @@ note: required by a bound in `apply`
LL | fn apply<F>(f: F) where F: Fn() {
| ^^^^ required by this bound in `apply`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0525`.
diff --git a/tests/ui/issues/issue-34373.stderr b/tests/ui/issues/issue-34373.stderr
index 0f0821518..c6906734b 100644
--- a/tests/ui/issues/issue-34373.stderr
+++ b/tests/ui/issues/issue-34373.stderr
@@ -23,6 +23,6 @@ LL | | }
| |_^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/issues/issue-34569.rs b/tests/ui/issues/issue-34569.rs
index 88dcdd411..1f6856050 100644
--- a/tests/ui/issues/issue-34569.rs
+++ b/tests/ui/issues/issue-34569.rs
@@ -1,6 +1,5 @@
// run-pass
// compile-flags:-g
-// ignore-asmjs wasm2js does not support source maps yet
// In this test we just want to make sure that the code below does not lead to
// a debuginfo verification assertion during compilation. This was caused by the
diff --git a/tests/ui/issues/issue-3477.stderr b/tests/ui/issues/issue-3477.stderr
index fd5f7dcf6..2a4d6d244 100644
--- a/tests/ui/issues/issue-3477.stderr
+++ b/tests/ui/issues/issue-3477.stderr
@@ -6,6 +6,6 @@ LL | let _p: char = 100;
| |
| expected due to this
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-35139.stderr b/tests/ui/issues/issue-35139.stderr
index 79e889b7e..875af7048 100644
--- a/tests/ui/issues/issue-35139.stderr
+++ b/tests/ui/issues/issue-35139.stderr
@@ -4,6 +4,6 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait,
LL | impl<'a> MethodType for MTFn {
| ^^ unconstrained lifetime parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0207`.
diff --git a/tests/ui/issues/issue-3521-2.stderr b/tests/ui/issues/issue-3521-2.stderr
index 84c7a9efa..0be0e93c1 100644
--- a/tests/ui/issues/issue-3521-2.stderr
+++ b/tests/ui/issues/issue-3521-2.stderr
@@ -6,6 +6,6 @@ LL | static y: isize = foo + 1;
| |
| help: consider using `let` instead of `static`: `let y`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0435`.
diff --git a/tests/ui/issues/issue-35241.stderr b/tests/ui/issues/issue-35241.stderr
index 4a2c15511..6f6602793 100644
--- a/tests/ui/issues/issue-35241.stderr
+++ b/tests/ui/issues/issue-35241.stderr
@@ -16,6 +16,6 @@ help: use parentheses to construct this tuple struct
LL | fn test() -> Foo { Foo(/* u32 */) }
| +++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-35570.stderr b/tests/ui/issues/issue-35570.stderr
index 197e80ac0..f23b55689 100644
--- a/tests/ui/issues/issue-35570.stderr
+++ b/tests/ui/issues/issue-35570.stderr
@@ -10,6 +10,6 @@ help: this trait has no implementations, consider adding one
LL | trait Trait2<'a> {
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-35976.unimported.stderr b/tests/ui/issues/issue-35976.unimported.stderr
index b31d2a315..169e3d05d 100644
--- a/tests/ui/issues/issue-35976.unimported.stderr
+++ b/tests/ui/issues/issue-35976.unimported.stderr
@@ -12,5 +12,5 @@ help: another candidate was found in the following trait, perhaps add a `use` fo
LL + use private::Future;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-35988.stderr b/tests/ui/issues/issue-35988.stderr
index 55988844c..4a674b010 100644
--- a/tests/ui/issues/issue-35988.stderr
+++ b/tests/ui/issues/issue-35988.stderr
@@ -16,6 +16,6 @@ help: the `Box` type always has a statically known size and allocates its conten
LL | V(Box<[Box<E>]>),
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-36400.stderr b/tests/ui/issues/issue-36400.stderr
index 5b753c69d..522fb36e1 100644
--- a/tests/ui/issues/issue-36400.stderr
+++ b/tests/ui/issues/issue-36400.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be mutable
LL | let mut x = Box::new(3);
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/issues/issue-3668-2.stderr b/tests/ui/issues/issue-3668-2.stderr
index ba9651041..3676f3888 100644
--- a/tests/ui/issues/issue-3668-2.stderr
+++ b/tests/ui/issues/issue-3668-2.stderr
@@ -6,6 +6,6 @@ LL | static child: isize = x + 1;
| |
| help: consider using `let` instead of `static`: `let child`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0435`.
diff --git a/tests/ui/issues/issue-3668.stderr b/tests/ui/issues/issue-3668.stderr
index edc49979c..d761b2d87 100644
--- a/tests/ui/issues/issue-3668.stderr
+++ b/tests/ui/issues/issue-3668.stderr
@@ -6,6 +6,6 @@ LL | static childVal: Box<P> = self.child.get();
| |
| help: consider using `let` instead of `static`: `let childVal`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0435`.
diff --git a/tests/ui/issues/issue-3680.stderr b/tests/ui/issues/issue-3680.stderr
index 0b0ae419e..2a757b44d 100644
--- a/tests/ui/issues/issue-3680.stderr
+++ b/tests/ui/issues/issue-3680.stderr
@@ -13,6 +13,6 @@ help: try wrapping the pattern in `Some`
LL | Some(Err(_)) => ()
| +++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-36836.stderr b/tests/ui/issues/issue-36836.stderr
index 418194fac..e5c943c7c 100644
--- a/tests/ui/issues/issue-36836.stderr
+++ b/tests/ui/issues/issue-36836.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `Bar` in this scope
LL | impl<T> Foo for Bar<T> {}
| ^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/issues/issue-36856.rs b/tests/ui/issues/issue-36856.rs
index 5657ba69f..f2dfaf3dd 100644
--- a/tests/ui/issues/issue-36856.rs
+++ b/tests/ui/issues/issue-36856.rs
@@ -2,7 +2,6 @@
// Regression test for #36856.
// compile-flags:-g
-// ignore-asmjs wasm2js does not support source maps yet
fn g() -> bool {
false
diff --git a/tests/ui/issues/issue-3702-2.stderr b/tests/ui/issues/issue-3702-2.stderr
index 0b94c3135..4edca796f 100644
--- a/tests/ui/issues/issue-3702-2.stderr
+++ b/tests/ui/issues/issue-3702-2.stderr
@@ -23,6 +23,6 @@ help: disambiguate the method for candidate #2
LL | Add::to_int(&self) + other.to_int()
| ~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0034`.
diff --git a/tests/ui/issues/issue-37311-type-length-limit/issue-37311.polonius.stderr b/tests/ui/issues/issue-37311-type-length-limit/issue-37311.polonius.stderr
index 3a1c0b82c..08b4573dd 100644
--- a/tests/ui/issues/issue-37311-type-length-limit/issue-37311.polonius.stderr
+++ b/tests/ui/issues/issue-37311-type-length-limit/issue-37311.polonius.stderr
@@ -11,5 +11,5 @@ LL | fn recurse(&self) {
| ^^^^^^^^^^^^^^^^^
= note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-37311-type-length-limit/issue-37311.polonius/issue-37311.long-type.txt'
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-37311-type-length-limit/issue-37311.stderr b/tests/ui/issues/issue-37311-type-length-limit/issue-37311.stderr
index 87832dd29..ccee9ed4d 100644
--- a/tests/ui/issues/issue-37311-type-length-limit/issue-37311.stderr
+++ b/tests/ui/issues/issue-37311-type-length-limit/issue-37311.stderr
@@ -11,5 +11,5 @@ LL | fn recurse(&self) {
| ^^^^^^^^^^^^^^^^^
= note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-37311-type-length-limit/issue-37311/issue-37311.long-type.txt'
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-37665.stderr b/tests/ui/issues/issue-37665.stderr
index 1e1f451b4..2c404b4e7 100644
--- a/tests/ui/issues/issue-37665.stderr
+++ b/tests/ui/issues/issue-37665.stderr
@@ -6,6 +6,6 @@ LL | let x: () = 0;
| |
| expected due to this
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-3779.stderr b/tests/ui/issues/issue-3779.stderr
index a0dbcc920..d4f4b7910 100644
--- a/tests/ui/issues/issue-3779.stderr
+++ b/tests/ui/issues/issue-3779.stderr
@@ -12,6 +12,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | element: Option<Box<S>>
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/issues/issue-37884.stderr b/tests/ui/issues/issue-37884.stderr
index 7ddb36c8e..b7c0095d6 100644
--- a/tests/ui/issues/issue-37884.stderr
+++ b/tests/ui/issues/issue-37884.stderr
@@ -4,8 +4,8 @@ error[E0308]: method not compatible with trait
LL | fn next(&'a mut self) -> Option<Self::Item>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
- = note: expected signature `fn(&mut RepeatMut<'a, T>) -> Option<_>`
- found signature `fn(&'a mut RepeatMut<'a, T>) -> Option<_>`
+ = note: expected signature `fn(&mut RepeatMut<'_, _>) -> Option<_>`
+ found signature `fn(&'a mut RepeatMut<'_, _>) -> Option<_>`
note: the anonymous lifetime as defined here...
--> $DIR/issue-37884.rs:6:5
|
@@ -17,6 +17,6 @@ note: ...does not necessarily outlive the lifetime `'a` as defined here
LL | impl<'a, T: 'a> Iterator for RepeatMut<'a, T> {
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-38412.stderr b/tests/ui/issues/issue-38412.stderr
index 610696f84..ed8b6b60a 100644
--- a/tests/ui/issues/issue-38412.stderr
+++ b/tests/ui/issues/issue-38412.stderr
@@ -4,6 +4,6 @@ error[E0532]: cannot match against a tuple struct which contains private fields
LL | let Box(a) = loop { };
| ^^^ constructor is not visible here due to private fields
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0532`.
diff --git a/tests/ui/issues/issue-38458.stderr b/tests/ui/issues/issue-38458.stderr
index c04a01118..fbf88d503 100644
--- a/tests/ui/issues/issue-38458.stderr
+++ b/tests/ui/issues/issue-38458.stderr
@@ -4,6 +4,6 @@ error[E0572]: return statement outside of function body
LL | return;
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0572`.
diff --git a/tests/ui/issues/issue-38919.stderr b/tests/ui/issues/issue-38919.stderr
index f9ab8a515..4a4bd2ee4 100644
--- a/tests/ui/issues/issue-38919.stderr
+++ b/tests/ui/issues/issue-38919.stderr
@@ -6,6 +6,6 @@ LL | fn foo<T: Iterator>() {
LL | T::Item;
| ^^^^ associated item not found in `T`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-38954.stderr b/tests/ui/issues/issue-38954.stderr
index ab15bb1af..4dd83ddf3 100644
--- a/tests/ui/issues/issue-38954.stderr
+++ b/tests/ui/issues/issue-38954.stderr
@@ -11,6 +11,6 @@ help: function arguments must have a statically known size, borrowed types alway
LL | fn _test(ref _p: &str) {}
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-39175.stderr b/tests/ui/issues/issue-39175.stderr
index 3a1476ac0..1bc11dab3 100644
--- a/tests/ui/issues/issue-39175.stderr
+++ b/tests/ui/issues/issue-39175.stderr
@@ -10,6 +10,6 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f
LL + use std::os::unix::process::CommandExt;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-39211.stderr b/tests/ui/issues/issue-39211.stderr
index cd2a014bb..15c9a80bb 100644
--- a/tests/ui/issues/issue-39211.stderr
+++ b/tests/ui/issues/issue-39211.stderr
@@ -6,5 +6,5 @@ LL | let a = [3; M::Row::DIM];
|
= note: this may fail depending on what value the parameter takes
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-39687.stderr b/tests/ui/issues/issue-39687.stderr
index b1b3041ea..f4742115a 100644
--- a/tests/ui/issues/issue-39687.stderr
+++ b/tests/ui/issues/issue-39687.stderr
@@ -4,6 +4,6 @@ error[E0229]: associated type bindings are not allowed here
LL | <fn() as Fn()>::call;
| ^^^^ associated type not allowed here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0229`.
diff --git a/tests/ui/issues/issue-39848.rs b/tests/ui/issues/issue-39848.rs
index 1964d7399..2a059120e 100644
--- a/tests/ui/issues/issue-39848.rs
+++ b/tests/ui/issues/issue-39848.rs
@@ -1,6 +1,6 @@
macro_rules! get_opt {
($tgt:expr, $field:ident) => {
- if $tgt.has_$field() {} //~ ERROR expected `{`, found `foo`
+ if $tgt.has_$field() {} //~ ERROR expected `{`, found identifier `foo`
}
}
diff --git a/tests/ui/issues/issue-39848.stderr b/tests/ui/issues/issue-39848.stderr
index 387ef0776..a6c6c61f1 100644
--- a/tests/ui/issues/issue-39848.stderr
+++ b/tests/ui/issues/issue-39848.stderr
@@ -1,4 +1,4 @@
-error: expected `{`, found `foo`
+error: expected `{`, found identifier `foo`
--> $DIR/issue-39848.rs:3:21
|
LL | if $tgt.has_$field() {}
@@ -21,5 +21,5 @@ help: try placing this code inside a block
LL | if $tgt.has_{ $field() } {}
| + +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-3993.stderr b/tests/ui/issues/issue-3993.stderr
index deecf7a9d..cf839a131 100644
--- a/tests/ui/issues/issue-3993.stderr
+++ b/tests/ui/issues/issue-3993.stderr
@@ -10,6 +10,6 @@ note: the function `fly` is defined here
LL | fn fly() {}
| ^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/issues/issue-39970.stderr b/tests/ui/issues/issue-39970.stderr
index 713bc404f..0fe73574b 100644
--- a/tests/ui/issues/issue-39970.stderr
+++ b/tests/ui/issues/issue-39970.stderr
@@ -18,6 +18,6 @@ LL | //(): for<'a> Array<'a, Element=&'a ()>, // No ICE
LL | (): for<'a> Array<'a, Element=()>, // ICE
| ---------- unsatisfied trait bound introduced here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/issues/issue-40288.stderr b/tests/ui/issues/issue-40288.stderr
index db5d06437..180adcd6e 100644
--- a/tests/ui/issues/issue-40288.stderr
+++ b/tests/ui/issues/issue-40288.stderr
@@ -10,6 +10,6 @@ LL | *refr = 3;
LL | println!("{:?}", out[0]);
| ------ borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/issues/issue-40402-ref-hints/issue-40402-1.stderr b/tests/ui/issues/issue-40402-ref-hints/issue-40402-1.stderr
index e15eed656..7976d0905 100644
--- a/tests/ui/issues/issue-40402-ref-hints/issue-40402-1.stderr
+++ b/tests/ui/issues/issue-40402-ref-hints/issue-40402-1.stderr
@@ -9,6 +9,6 @@ help: consider borrowing here
LL | let e = &f.v[0];
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/issues/issue-40402-ref-hints/issue-40402-2.stderr b/tests/ui/issues/issue-40402-ref-hints/issue-40402-2.stderr
index 1bc554efb..987558903 100644
--- a/tests/ui/issues/issue-40402-ref-hints/issue-40402-2.stderr
+++ b/tests/ui/issues/issue-40402-ref-hints/issue-40402-2.stderr
@@ -13,6 +13,6 @@ help: consider borrowing here
LL | let (a, b) = &x[0];
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/issues/issue-40510-1.migrate.stderr b/tests/ui/issues/issue-40510-1.migrate.stderr
index 776a724d3..209053057 100644
--- a/tests/ui/issues/issue-40510-1.migrate.stderr
+++ b/tests/ui/issues/issue-40510-1.migrate.stderr
@@ -9,5 +9,5 @@ LL | &mut x
= note: `FnMut` closures only have access to their captured variables while they are executing...
= note: ...therefore, they cannot allow references to captured variables to escape
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-40510-1.stderr b/tests/ui/issues/issue-40510-1.stderr
index e88f31ea1..81fed1305 100644
--- a/tests/ui/issues/issue-40510-1.stderr
+++ b/tests/ui/issues/issue-40510-1.stderr
@@ -15,5 +15,5 @@ LL | &mut x
= note: `FnMut` closures only have access to their captured variables while they are executing...
= note: ...therefore, they cannot allow references to captured variables to escape
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-40510-3.migrate.stderr b/tests/ui/issues/issue-40510-3.migrate.stderr
index a49475a85..59aba4a8e 100644
--- a/tests/ui/issues/issue-40510-3.migrate.stderr
+++ b/tests/ui/issues/issue-40510-3.migrate.stderr
@@ -11,5 +11,5 @@ LL | | }
= note: `FnMut` closures only have access to their captured variables while they are executing...
= note: ...therefore, they cannot allow references to captured variables to escape
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-40510-3.stderr b/tests/ui/issues/issue-40510-3.stderr
index eb077415e..43e8a73b8 100644
--- a/tests/ui/issues/issue-40510-3.stderr
+++ b/tests/ui/issues/issue-40510-3.stderr
@@ -19,5 +19,5 @@ help: consider adding 'move' keyword before the nested closure
LL | move || {
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-40610.stderr b/tests/ui/issues/issue-40610.stderr
index b4e302dff..1bd1c4dd5 100644
--- a/tests/ui/issues/issue-40610.stderr
+++ b/tests/ui/issues/issue-40610.stderr
@@ -6,6 +6,6 @@ LL | () + f(&[1.0]);
| |
| ()
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/issues/issue-40749.stderr b/tests/ui/issues/issue-40749.stderr
index afc39adec..f7770e000 100644
--- a/tests/ui/issues/issue-40749.stderr
+++ b/tests/ui/issues/issue-40749.stderr
@@ -7,6 +7,6 @@ LL | [0; ..10];
= note: expected type `usize`
found struct `RangeTo<{integer}>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-40861.stderr b/tests/ui/issues/issue-40861.stderr
index 9b6469d05..dec9af4b6 100644
--- a/tests/ui/issues/issue-40861.stderr
+++ b/tests/ui/issues/issue-40861.stderr
@@ -6,6 +6,6 @@ LL | ()[f(&[1.0])];
|
= help: to access tuple elements, use tuple indexing syntax (e.g., `tuple.0`)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0608`.
diff --git a/tests/ui/issues/issue-41139.stderr b/tests/ui/issues/issue-41139.stderr
index 97492e6e0..d7b35245d 100644
--- a/tests/ui/issues/issue-41139.stderr
+++ b/tests/ui/issues/issue-41139.stderr
@@ -7,6 +7,6 @@ LL | fn get_function<'a>() -> &'a dyn Fn() -> dyn Trait {
LL | let t: &dyn Trait = &get_function()();
| ^^^^^^^^^^^^^^ this trait object returns an unsized value `(dyn Trait + 'static)`, so it cannot be called
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0618`.
diff --git a/tests/ui/issues/issue-41229-ref-str.stderr b/tests/ui/issues/issue-41229-ref-str.stderr
index 31fdf3b72..afc2cac73 100644
--- a/tests/ui/issues/issue-41229-ref-str.stderr
+++ b/tests/ui/issues/issue-41229-ref-str.stderr
@@ -11,6 +11,6 @@ help: function arguments must have a statically known size, borrowed types alway
LL | pub fn example(ref s: &str) {}
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-41549.stderr b/tests/ui/issues/issue-41549.stderr
index 62307d387..55be59684 100644
--- a/tests/ui/issues/issue-41549.stderr
+++ b/tests/ui/issues/issue-41549.stderr
@@ -4,6 +4,6 @@ error[E0326]: implemented const `CONST` has an incompatible type for trait
LL | const CONST: () = ();
| ^^ expected `u32`, found `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0326`.
diff --git a/tests/ui/issues/issue-41652/issue-41652.stderr b/tests/ui/issues/issue-41652/issue-41652.stderr
index 1618f0f5a..a5a2fab2e 100644
--- a/tests/ui/issues/issue-41652/issue-41652.stderr
+++ b/tests/ui/issues/issue-41652/issue-41652.stderr
@@ -9,6 +9,6 @@ help: you must specify a concrete type for this numeric value, like `i32`
LL | 3_i32.f()
| ~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0689`.
diff --git a/tests/ui/issues/issue-41726.stderr b/tests/ui/issues/issue-41726.stderr
index 7c87fde54..fe7d4df70 100644
--- a/tests/ui/issues/issue-41726.stderr
+++ b/tests/ui/issues/issue-41726.stderr
@@ -7,6 +7,6 @@ LL | things[src.as_str()].sort();
= help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `HashMap<String, Vec<String>>`
= help: to modify a `HashMap<String, Vec<String>>`, use `.get_mut()`, `.insert()` or the entry API
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/issues/issue-41742.stderr b/tests/ui/issues/issue-41742.stderr
index 61a0ae5fa..47c7e5dc1 100644
--- a/tests/ui/issues/issue-41742.stderr
+++ b/tests/ui/issues/issue-41742.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | H["?"].f();
| ^^^ expected `u32`, found `&str`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-41880.stderr b/tests/ui/issues/issue-41880.stderr
index 6414e2692..9d09be663 100644
--- a/tests/ui/issues/issue-41880.stderr
+++ b/tests/ui/issues/issue-41880.stderr
@@ -7,6 +7,6 @@ LL | pub struct Iterate<T, F> {
LL | println!("{:?}", a.iter().take(10).collect::<Vec<usize>>());
| ^^^^ method not found in `Iterate<{integer}, {closure@issue-41880.rs:26:24}>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-42106.stderr b/tests/ui/issues/issue-42106.stderr
index d5a9d233b..d5919870d 100644
--- a/tests/ui/issues/issue-42106.stderr
+++ b/tests/ui/issues/issue-42106.stderr
@@ -8,6 +8,6 @@ LL | collection.swap(1, 2);
LL | _a.use_ref();
| -- immutable borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/issues/issue-42210.rs b/tests/ui/issues/issue-42210.rs
index 01a5d5636..318e3099f 100644
--- a/tests/ui/issues/issue-42210.rs
+++ b/tests/ui/issues/issue-42210.rs
@@ -2,7 +2,6 @@
// Regression test for #42210.
// compile-flags: -g
-// ignore-asmjs wasm2js does not support source maps yet
trait Foo {
fn foo() { }
diff --git a/tests/ui/issues/issue-4265.stderr b/tests/ui/issues/issue-4265.stderr
index 8c7303f3c..48b1c762e 100644
--- a/tests/ui/issues/issue-4265.stderr
+++ b/tests/ui/issues/issue-4265.stderr
@@ -7,6 +7,6 @@ LL | fn bar() {
LL | fn bar() {
| ^^^^^^^^ duplicate definitions for `bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0592`.
diff --git a/tests/ui/issues/issue-42755.stderr b/tests/ui/issues/issue-42755.stderr
index 12047e22f..41f6cc97e 100644
--- a/tests/ui/issues/issue-42755.stderr
+++ b/tests/ui/issues/issue-42755.stderr
@@ -4,5 +4,5 @@ error: repetition matches empty token tree
LL | ($($p:vis)*) => {}
| ^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-42796.stderr b/tests/ui/issues/issue-42796.stderr
index f2971df5d..670b98c77 100644
--- a/tests/ui/issues/issue-42796.stderr
+++ b/tests/ui/issues/issue-42796.stderr
@@ -15,6 +15,6 @@ help: consider cloning the value if the performance cost is acceptable
LL | let mut s_copy = s.clone();
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/issues/issue-42880.stderr b/tests/ui/issues/issue-42880.stderr
index bec14429d..f174f42b2 100644
--- a/tests/ui/issues/issue-42880.stderr
+++ b/tests/ui/issues/issue-42880.stderr
@@ -4,6 +4,6 @@ error[E0599]: no associated item named `String` found for struct `String` in the
LL | let f = |&Value::String(_)| ();
| ^^^^^^ associated item not found in `String`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-4335.stderr b/tests/ui/issues/issue-4335.stderr
index ecc1fa523..8b4aff54d 100644
--- a/tests/ui/issues/issue-4335.stderr
+++ b/tests/ui/issues/issue-4335.stderr
@@ -8,6 +8,6 @@ LL | id(Box::new(|| *v))
| |
| captured by this `FnMut` closure
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/issues/issue-43355.stderr b/tests/ui/issues/issue-43355.stderr
index 9aeca8efe..25179ef6a 100644
--- a/tests/ui/issues/issue-43355.stderr
+++ b/tests/ui/issues/issue-43355.stderr
@@ -9,6 +9,6 @@ LL | impl<X> Trait1<Box<X>> for A {
|
= note: downstream crates may implement trait `Trait2<std::boxed::Box<_>>` for type `A`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/issues/issue-43420-no-over-suggest.stderr b/tests/ui/issues/issue-43420-no-over-suggest.stderr
index 9b141e2bf..3da8cc728 100644
--- a/tests/ui/issues/issue-43420-no-over-suggest.stderr
+++ b/tests/ui/issues/issue-43420-no-over-suggest.stderr
@@ -14,6 +14,6 @@ note: function defined here
LL | fn foo(b: &[u16]) {}
| ^^^ ---------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-43424.stderr b/tests/ui/issues/issue-43424.stderr
index 8f59d7cc3..64a3c2a3d 100644
--- a/tests/ui/issues/issue-43424.stderr
+++ b/tests/ui/issues/issue-43424.stderr
@@ -4,5 +4,5 @@ error: unexpected generic arguments in path
LL | m!(inline<u8>);
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-43431.stderr b/tests/ui/issues/issue-43431.stderr
index 4edb52869..6d47ba271 100644
--- a/tests/ui/issues/issue-43431.stderr
+++ b/tests/ui/issues/issue-43431.stderr
@@ -4,6 +4,6 @@ error[E0229]: associated type bindings are not allowed here
LL | <Self as Fn(A) -> B>::call(self, (a,))
| ^ associated type not allowed here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0229`.
diff --git a/tests/ui/issues/issue-43925.stderr b/tests/ui/issues/issue-43925.stderr
index b0ad25063..7cc347c61 100644
--- a/tests/ui/issues/issue-43925.stderr
+++ b/tests/ui/issues/issue-43925.stderr
@@ -4,5 +4,5 @@ error: link cfg must have a single predicate argument
LL | #[link(name = "foo", cfg("rlib"))]
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-43926.stderr b/tests/ui/issues/issue-43926.stderr
index f67f91a6b..7c5c50a38 100644
--- a/tests/ui/issues/issue-43926.stderr
+++ b/tests/ui/issues/issue-43926.stderr
@@ -4,5 +4,5 @@ error: link cfg must have a single predicate argument
LL | #[link(name = "foo", cfg())]
| ^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-44023.stderr b/tests/ui/issues/issue-44023.stderr
index 9e9701241..8554154fb 100644
--- a/tests/ui/issues/issue-44023.stderr
+++ b/tests/ui/issues/issue-44023.stderr
@@ -6,6 +6,6 @@ LL | fn საჭმელად_გემრიელი_სადილი ( )
| |
| implicitly returns `()` as its body has no tail or `return` expression
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-44078.stderr b/tests/ui/issues/issue-44078.stderr
index daf67219f..3e12de34e 100644
--- a/tests/ui/issues/issue-44078.stderr
+++ b/tests/ui/issues/issue-44078.stderr
@@ -6,6 +6,6 @@ LL | "😊"";
LL | | }
| |__^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0765`.
diff --git a/tests/ui/issues/issue-44239.stderr b/tests/ui/issues/issue-44239.stderr
index 2a245c92c..633fb177b 100644
--- a/tests/ui/issues/issue-44239.stderr
+++ b/tests/ui/issues/issue-44239.stderr
@@ -7,6 +7,6 @@ LL | let n: usize = 0;
LL | const N: usize = n;
| ^ non-constant value
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0435`.
diff --git a/tests/ui/issues/issue-44405.stderr b/tests/ui/issues/issue-44405.stderr
index 1fd69f6e7..26d2b385e 100644
--- a/tests/ui/issues/issue-44405.stderr
+++ b/tests/ui/issues/issue-44405.stderr
@@ -6,6 +6,6 @@ LL | container[&mut val].test();
|
= help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `Container`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/issues/issue-4517.stderr b/tests/ui/issues/issue-4517.stderr
index 78ee336f1..5d544ee10 100644
--- a/tests/ui/issues/issue-4517.stderr
+++ b/tests/ui/issues/issue-4517.stderr
@@ -12,6 +12,6 @@ note: function defined here
LL | fn bar(int_param: usize) {}
| ^^^ ----------------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-45562.stderr b/tests/ui/issues/issue-45562.stderr
index be259d3f8..6fae86f9f 100644
--- a/tests/ui/issues/issue-45562.stderr
+++ b/tests/ui/issues/issue-45562.stderr
@@ -8,5 +8,5 @@ LL | #[no_mangle] pub const RAH: usize = 5;
|
= note: `#[deny(no_mangle_const_items)]` on by default
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-45731.rs b/tests/ui/issues/issue-45731.rs
index 5c5ac5987..d20c07276 100644
--- a/tests/ui/issues/issue-45731.rs
+++ b/tests/ui/issues/issue-45731.rs
@@ -1,7 +1,6 @@
// run-pass
#![allow(unused_variables)]
// compile-flags:--test -g
-// ignore-asmjs wasm2js does not support source maps yet
#[cfg(target_os = "macos")]
#[test]
diff --git a/tests/ui/issues/issue-45801.stderr b/tests/ui/issues/issue-45801.stderr
index e651e2a68..5a10c4295 100644
--- a/tests/ui/issues/issue-45801.stderr
+++ b/tests/ui/issues/issue-45801.stderr
@@ -7,6 +7,6 @@ LL | req.get_ref::<Params>();
= help: the trait `Plugin<Foo>` is implemented for `Params`
= help: for that trait implementation, expected `Foo`, found `i32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-45965.stderr b/tests/ui/issues/issue-45965.stderr
index f3eaa9176..95a39b1d1 100644
--- a/tests/ui/issues/issue-45965.stderr
+++ b/tests/ui/issues/issue-45965.stderr
@@ -6,6 +6,6 @@ LL | let a = |r: f64| if r != 0.0(r != 0.0) { 1.0 } else { 0.0 };
| |
| call expression requires function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0618`.
diff --git a/tests/ui/issues/issue-46302.stderr b/tests/ui/issues/issue-46302.stderr
index 6e126038c..e87c17b2a 100644
--- a/tests/ui/issues/issue-46302.stderr
+++ b/tests/ui/issues/issue-46302.stderr
@@ -9,6 +9,6 @@ help: consider borrowing here
LL | let u: &str = if true { &s[..2] } else { s };
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-46311.stderr b/tests/ui/issues/issue-46311.stderr
index d72d6477d..86a360289 100644
--- a/tests/ui/issues/issue-46311.stderr
+++ b/tests/ui/issues/issue-46311.stderr
@@ -4,5 +4,5 @@ error: invalid label name `'break`
LL | 'break: loop {
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-46332.stderr b/tests/ui/issues/issue-46332.stderr
index 890ef8014..8c0c1dfa6 100644
--- a/tests/ui/issues/issue-46332.stderr
+++ b/tests/ui/issues/issue-46332.stderr
@@ -7,6 +7,6 @@ LL | struct TyUint {}
LL | TyUInt {};
| ^^^^^^ help: a struct with a similar name exists (notice the capitalization): `TyUint`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0422`.
diff --git a/tests/ui/issues/issue-46438.stderr b/tests/ui/issues/issue-46438.stderr
index c1fad44b8..aff2d77a0 100644
--- a/tests/ui/issues/issue-46438.stderr
+++ b/tests/ui/issues/issue-46438.stderr
@@ -4,5 +4,5 @@ error: expected a trait, found type
LL | m!(&'static u8);
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-46471-1.stderr b/tests/ui/issues/issue-46471-1.stderr
index 2ae6e709d..d45172239 100644
--- a/tests/ui/issues/issue-46471-1.stderr
+++ b/tests/ui/issues/issue-46471-1.stderr
@@ -8,6 +8,6 @@ LL | &mut z
LL | };
| - `z` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/issues/issue-46472.stderr b/tests/ui/issues/issue-46472.stderr
index 6e561e03a..6115da28c 100644
--- a/tests/ui/issues/issue-46472.stderr
+++ b/tests/ui/issues/issue-46472.stderr
@@ -7,6 +7,6 @@ LL | &mut 4
| | temporary value created here
| returns a reference to data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/issues/issue-46771.stderr b/tests/ui/issues/issue-46771.stderr
index 512827b2d..fab55fbfd 100644
--- a/tests/ui/issues/issue-46771.stderr
+++ b/tests/ui/issues/issue-46771.stderr
@@ -8,6 +8,6 @@ LL | (1 .. 2).find(|_| Foo(0) == 0);
| |
| call expression requires function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0618`.
diff --git a/tests/ui/issues/issue-46983.stderr b/tests/ui/issues/issue-46983.stderr
index 38a219bbd..f47df306a 100644
--- a/tests/ui/issues/issue-46983.stderr
+++ b/tests/ui/issues/issue-46983.stderr
@@ -6,5 +6,5 @@ LL | fn foo(x: &u32) -> &'static u32 {
LL | &*x
| ^^^ returning this value requires that `'1` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-47073-zero-padded-tuple-struct-indices.stderr b/tests/ui/issues/issue-47073-zero-padded-tuple-struct-indices.stderr
index 5e1b816de..0aa1ae722 100644
--- a/tests/ui/issues/issue-47073-zero-padded-tuple-struct-indices.stderr
+++ b/tests/ui/issues/issue-47073-zero-padded-tuple-struct-indices.stderr
@@ -2,7 +2,12 @@ error[E0609]: no field `00` on type `Verdict`
--> $DIR/issue-47073-zero-padded-tuple-struct-indices.rs:8:30
|
LL | let _condemned = justice.00;
- | ^^ help: a field with a similar name exists: `0`
+ | ^^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | let _condemned = justice.0;
+ | ~
error[E0609]: no field `001` on type `Verdict`
--> $DIR/issue-47073-zero-padded-tuple-struct-indices.rs:10:31
diff --git a/tests/ui/issues/issue-47184.stderr b/tests/ui/issues/issue-47184.stderr
index c2c7df7a3..d25c6eda9 100644
--- a/tests/ui/issues/issue-47184.stderr
+++ b/tests/ui/issues/issue-47184.stderr
@@ -7,6 +7,6 @@ LL | let _vec: Vec<&'static String> = vec![&String::new()];
| | creates a temporary value which is freed while still in use
| type annotation requires that borrow lasts for `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/issues/issue-4736.stderr b/tests/ui/issues/issue-4736.stderr
index 2a1f1819c..146dd1d57 100644
--- a/tests/ui/issues/issue-4736.stderr
+++ b/tests/ui/issues/issue-4736.stderr
@@ -12,6 +12,6 @@ help: `NonCopyable` is a tuple struct, use the appropriate syntax
LL | let z = NonCopyable(/* fields */);
| ~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0560`.
diff --git a/tests/ui/issues/issue-47377.stderr b/tests/ui/issues/issue-47377.stderr
index 4f0fd948e..12e5c15d7 100644
--- a/tests/ui/issues/issue-47377.stderr
+++ b/tests/ui/issues/issue-47377.stderr
@@ -13,6 +13,6 @@ help: create an owned `String` from a string reference
LL | let _a = b.to_owned() + ", World!";
| +++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/issues/issue-47380.stderr b/tests/ui/issues/issue-47380.stderr
index b04ac5536..4fca0296e 100644
--- a/tests/ui/issues/issue-47380.stderr
+++ b/tests/ui/issues/issue-47380.stderr
@@ -13,6 +13,6 @@ help: create an owned `String` from a string reference
LL | println!("🦀🦀🦀🦀🦀"); let _a = b.to_owned() + ", World!";
| +++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/issues/issue-47725.stderr b/tests/ui/issues/issue-47725.stderr
index 7143fb4d6..0d3b77b46 100644
--- a/tests/ui/issues/issue-47725.stderr
+++ b/tests/ui/issues/issue-47725.stderr
@@ -56,5 +56,5 @@ help: try `#[link(name = "...")]` instead
LL | #[link_name]
| ^^^^^^^^^^^^
-error: aborting due to previous error; 3 warnings emitted
+error: aborting due to 1 previous error; 3 warnings emitted
diff --git a/tests/ui/issues/issue-48364.stderr b/tests/ui/issues/issue-48364.stderr
index 3f2e1b83a..74bfa1e06 100644
--- a/tests/ui/issues/issue-48364.stderr
+++ b/tests/ui/issues/issue-48364.stderr
@@ -11,6 +11,6 @@ LL | b"".starts_with(stringify!(foo))
note: method defined here
--> $SRC_DIR/core/src/slice/mod.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-48728.stderr b/tests/ui/issues/issue-48728.stderr
index 0bb46724f..6b4247f1d 100644
--- a/tests/ui/issues/issue-48728.stderr
+++ b/tests/ui/issues/issue-48728.stderr
@@ -10,6 +10,6 @@ LL | impl<T: Clone + ?Sized> Clone for Node<[T]> {
= note: upstream crates may add a new impl of trait `std::clone::Clone` for type `[_]` in future versions
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/issues/issue-48838.stderr b/tests/ui/issues/issue-48838.stderr
index 159199a7f..504ea3e80 100644
--- a/tests/ui/issues/issue-48838.stderr
+++ b/tests/ui/issues/issue-48838.stderr
@@ -7,6 +7,6 @@ LL | Square = |x| x,
= note: expected type `isize`
found closure `{closure@$DIR/issue-48838.rs:2:14: 2:17}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-4935.stderr b/tests/ui/issues/issue-4935.stderr
index e544e4244..25f299ae5 100644
--- a/tests/ui/issues/issue-4935.stderr
+++ b/tests/ui/issues/issue-4935.stderr
@@ -13,6 +13,6 @@ note: function defined here
LL | fn foo(a: usize) {}
| ^^^ --------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0061`.
diff --git a/tests/ui/issues/issue-4968.stderr b/tests/ui/issues/issue-4968.stderr
index 1ce033384..549e55094 100644
--- a/tests/ui/issues/issue-4968.stderr
+++ b/tests/ui/issues/issue-4968.stderr
@@ -15,6 +15,6 @@ LL | match 42 { A => () }
= note: expected type `{integer}`
found tuple `(isize, isize)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-4972.stderr b/tests/ui/issues/issue-4972.stderr
index 83daded7e..8de3909ca 100644
--- a/tests/ui/issues/issue-4972.stderr
+++ b/tests/ui/issues/issue-4972.stderr
@@ -4,6 +4,6 @@ error[E0033]: type `Box<(dyn MyTrait + 'static)>` cannot be dereferenced
LL | TraitWrapper::A(box ref map) => map,
| ^^^^^^^^^^^ type `Box<(dyn MyTrait + 'static)>` cannot be dereferenced
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0033`.
diff --git a/tests/ui/issues/issue-49824.stderr b/tests/ui/issues/issue-49824.stderr
index 14beadece..1c77090de 100644
--- a/tests/ui/issues/issue-49824.stderr
+++ b/tests/ui/issues/issue-49824.stderr
@@ -19,5 +19,5 @@ help: consider adding 'move' keyword before the nested closure
LL | move || {
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-49919.stderr b/tests/ui/issues/issue-49919.stderr
index 8098be5cc..597d76fc2 100644
--- a/tests/ui/issues/issue-49919.stderr
+++ b/tests/ui/issues/issue-49919.stderr
@@ -4,6 +4,6 @@ error[E0582]: binding for associated type `Output` references lifetime `'c`, whi
LL | let foo: Box<dyn for <'c> Fn() -> &'c T> = Box::new(move || &t);
| ^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0582`.
diff --git a/tests/ui/issues/issue-50264-inner-deref-trait/option-as_deref.stderr b/tests/ui/issues/issue-50264-inner-deref-trait/option-as_deref.stderr
index ce8173169..84247a427 100644
--- a/tests/ui/issues/issue-50264-inner-deref-trait/option-as_deref.stderr
+++ b/tests/ui/issues/issue-50264-inner-deref-trait/option-as_deref.stderr
@@ -7,6 +7,6 @@ LL | let _result = &Some(42).as_deref();
= note: the following trait bounds were not satisfied:
`{integer}: Deref`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.stderr b/tests/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.stderr
index 943f77486..bf05ab566 100644
--- a/tests/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.stderr
+++ b/tests/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.stderr
@@ -7,6 +7,6 @@ LL | let _result = &mut Some(42).as_deref_mut();
= note: the following trait bounds were not satisfied:
`{integer}: Deref`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr b/tests/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr
index a3b9ac677..ac744a6d3 100644
--- a/tests/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr
+++ b/tests/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr
@@ -7,6 +7,6 @@ LL | let _result = &Ok(42).as_deref();
= note: the following trait bounds were not satisfied:
`{integer}: Deref`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr b/tests/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr
index aa771e4c0..688d2cf34 100644
--- a/tests/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr
+++ b/tests/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr
@@ -7,6 +7,6 @@ LL | let _result = &mut Ok(42).as_deref_mut();
= note: the following trait bounds were not satisfied:
`{integer}: Deref`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-50403.stderr b/tests/ui/issues/issue-50403.stderr
index d50befa5e..193d815d5 100644
--- a/tests/ui/issues/issue-50403.stderr
+++ b/tests/ui/issues/issue-50403.stderr
@@ -4,5 +4,5 @@ error: `concat_idents!()` takes 1 or more arguments
LL | let x = concat_idents!();
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-50571.stderr b/tests/ui/issues/issue-50571.stderr
index f69963bb7..fe47790f1 100644
--- a/tests/ui/issues/issue-50571.stderr
+++ b/tests/ui/issues/issue-50571.stderr
@@ -9,6 +9,6 @@ help: give this argument a name or use an underscore to ignore it
LL | fn foo(_: [i32; 2]) {}
| ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0642`.
diff --git a/tests/ui/issues/issue-50581.stderr b/tests/ui/issues/issue-50581.stderr
index 07b6df072..bac1ade3b 100644
--- a/tests/ui/issues/issue-50581.stderr
+++ b/tests/ui/issues/issue-50581.stderr
@@ -4,6 +4,6 @@ error[E0268]: `break` outside of a loop or labeled block
LL | |_: [u8; break]| ();
| ^^^^^ cannot `break` outside of a loop or labeled block
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0268`.
diff --git a/tests/ui/issues/issue-50600.stderr b/tests/ui/issues/issue-50600.stderr
index d285c3467..e3ae7f144 100644
--- a/tests/ui/issues/issue-50600.stderr
+++ b/tests/ui/issues/issue-50600.stderr
@@ -7,6 +7,6 @@ LL | fn([u8; |x: u8| {}]),
= note: expected type `usize`
found closure `{closure@$DIR/issue-50600.rs:2:13: 2:20}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-50618.stderr b/tests/ui/issues/issue-50618.stderr
index 1ac5dde66..1a3514fb7 100644
--- a/tests/ui/issues/issue-50618.stderr
+++ b/tests/ui/issues/issue-50618.stderr
@@ -6,6 +6,6 @@ LL | nonexistent: 0,
|
= note: available fields are: `x`, `y`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0560`.
diff --git a/tests/ui/issues/issue-5062.stderr b/tests/ui/issues/issue-5062.stderr
index 3191bd3de..0839ece79 100644
--- a/tests/ui/issues/issue-5062.stderr
+++ b/tests/ui/issues/issue-5062.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic argument
LL | fn main() { format!("{:?}", None::<T>); }
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/issues/issue-50688.stderr b/tests/ui/issues/issue-50688.stderr
index df7603d79..873f179f5 100644
--- a/tests/ui/issues/issue-50688.stderr
+++ b/tests/ui/issues/issue-50688.stderr
@@ -7,6 +7,6 @@ LL | [1; || {}];
= note: expected type `usize`
found closure `{closure@$DIR/issue-50688.rs:2:9: 2:11}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-50714-1.stderr b/tests/ui/issues/issue-50714-1.stderr
index bacd09b2a..7593ac383 100644
--- a/tests/ui/issues/issue-50714-1.stderr
+++ b/tests/ui/issues/issue-50714-1.stderr
@@ -4,6 +4,6 @@ error[E0647]: `#[start]` function is not allowed to have a `where` clause
LL | fn start(_: isize, _: *const *const u8) -> isize where fn(&()): Eq {
| ^^^^^^^^^^^^^^^^^ `#[start]` function cannot have a `where` clause
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0647`.
diff --git a/tests/ui/issues/issue-50714.stderr b/tests/ui/issues/issue-50714.stderr
index a11aceb62..57f9769d1 100644
--- a/tests/ui/issues/issue-50714.stderr
+++ b/tests/ui/issues/issue-50714.stderr
@@ -4,6 +4,6 @@ error[E0646]: `main` function is not allowed to have a `where` clause
LL | fn main() where fn(&()): Eq {}
| ^^^^^^^^^^^^^^^^^ `main` cannot have a `where` clause
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0646`.
diff --git a/tests/ui/issues/issue-50781.stderr b/tests/ui/issues/issue-50781.stderr
index e185ecdda..beaea1e63 100644
--- a/tests/ui/issues/issue-50781.stderr
+++ b/tests/ui/issues/issue-50781.stderr
@@ -20,5 +20,5 @@ note: the lint level is defined here
LL | #![deny(where_clauses_object_safety)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-50802.stderr b/tests/ui/issues/issue-50802.stderr
index e064fabcc..e1b5ae325 100644
--- a/tests/ui/issues/issue-50802.stderr
+++ b/tests/ui/issues/issue-50802.stderr
@@ -4,6 +4,6 @@ error[E0590]: `break` or `continue` with no label in the condition of a `while`
LL | break while continue {
| ^^^^^^^^ unlabeled `continue` in the condition of a `while` loop
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0590`.
diff --git a/tests/ui/issues/issue-51022.stderr b/tests/ui/issues/issue-51022.stderr
index 5e196bd4e..c02c0ac93 100644
--- a/tests/ui/issues/issue-51022.stderr
+++ b/tests/ui/issues/issue-51022.stderr
@@ -4,6 +4,6 @@ error[E0131]: `main` function is not allowed to have generic parameters
LL | fn main<'a>() { }
| ^^^^ `main` cannot have generic parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0131`.
diff --git a/tests/ui/issues/issue-51116.stderr b/tests/ui/issues/issue-51116.stderr
index c07f8735e..4839a0d46 100644
--- a/tests/ui/issues/issue-51116.stderr
+++ b/tests/ui/issues/issue-51116.stderr
@@ -4,6 +4,6 @@ error[E0282]: type annotations needed
LL | *tile = 0;
| ^^^^^ cannot infer type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/issues/issue-51154.stderr b/tests/ui/issues/issue-51154.stderr
index 5ae8e0678..b7451ea28 100644
--- a/tests/ui/issues/issue-51154.stderr
+++ b/tests/ui/issues/issue-51154.stderr
@@ -14,6 +14,6 @@ LL | let _: Box<F> = Box::new(|| ());
note: associated function defined here
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-5153.stderr b/tests/ui/issues/issue-5153.stderr
index 93aaf4b9d..53c140b5b 100644
--- a/tests/ui/issues/issue-5153.stderr
+++ b/tests/ui/issues/issue-5153.stderr
@@ -7,6 +7,6 @@ LL | fn foo(self: Box<Self>);
LL | (&5isize as &dyn Foo).foo();
| ^^^ method not found in `&dyn Foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-51632-try-desugar-incompatible-types.stderr b/tests/ui/issues/issue-51632-try-desugar-incompatible-types.stderr
index c92da53db..99fce1eee 100644
--- a/tests/ui/issues/issue-51632-try-desugar-incompatible-types.stderr
+++ b/tests/ui/issues/issue-51632-try-desugar-incompatible-types.stderr
@@ -19,6 +19,6 @@ help: try wrapping the expression in `Ok`
LL | Ok(missing_discourses()?)
| +++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-51874.stderr b/tests/ui/issues/issue-51874.stderr
index b39159a65..5be3695dd 100644
--- a/tests/ui/issues/issue-51874.stderr
+++ b/tests/ui/issues/issue-51874.stderr
@@ -9,6 +9,6 @@ help: you must specify a concrete type for this numeric value, like `f32`
LL | let a = (1.0_f32).pow(1.0);
| ~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0689`.
diff --git a/tests/ui/issues/issue-52049.stderr b/tests/ui/issues/issue-52049.stderr
index 0812976cf..1d8e136f2 100644
--- a/tests/ui/issues/issue-52049.stderr
+++ b/tests/ui/issues/issue-52049.stderr
@@ -7,6 +7,6 @@ LL | foo(&unpromotable(5u32));
| | creates a temporary value which is freed while still in use
| argument requires that borrow lasts for `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/issues/issue-52126-assign-op-invariance.stderr b/tests/ui/issues/issue-52126-assign-op-invariance.stderr
index 316e755f4..af9553e5c 100644
--- a/tests/ui/issues/issue-52126-assign-op-invariance.stderr
+++ b/tests/ui/issues/issue-52126-assign-op-invariance.stderr
@@ -12,6 +12,6 @@ LL | acc += cnt2;
LL | }
| - `line` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/issues/issue-52262.stderr b/tests/ui/issues/issue-52262.stderr
index ef41f078b..ce8e6fe2b 100644
--- a/tests/ui/issues/issue-52262.stderr
+++ b/tests/ui/issues/issue-52262.stderr
@@ -4,6 +4,6 @@ error[E0507]: cannot move out of `*key` which is behind a shared reference
LL | String::from_utf8(*key).unwrap()
| ^^^^ move occurs because `*key` has type `Vec<u8>`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/issues/issue-5239-1.stderr b/tests/ui/issues/issue-5239-1.stderr
index f53ddb954..63c2dbfc5 100644
--- a/tests/ui/issues/issue-5239-1.stderr
+++ b/tests/ui/issues/issue-5239-1.stderr
@@ -6,6 +6,6 @@ LL | let x = |ref x: isize| { x += 1; };
| |
| cannot use `+=` on type `&isize`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0368`.
diff --git a/tests/ui/issues/issue-52489.stderr b/tests/ui/issues/issue-52489.stderr
index 842ebd196..442902bd1 100644
--- a/tests/ui/issues/issue-52489.stderr
+++ b/tests/ui/issues/issue-52489.stderr
@@ -6,6 +6,6 @@ LL | use issue_52489;
|
= help: add `#![feature(issue_52489_unstable)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/issues/issue-52533.stderr b/tests/ui/issues/issue-52533.stderr
index c764736d7..8b56b36d3 100644
--- a/tests/ui/issues/issue-52533.stderr
+++ b/tests/ui/issues/issue-52533.stderr
@@ -7,5 +7,5 @@ LL | foo(|a, b| b)
| | has type `&'1 u32`
| has type `&'2 u32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-52717.stderr b/tests/ui/issues/issue-52717.stderr
index 468cdf2dc..ab8c37225 100644
--- a/tests/ui/issues/issue-52717.stderr
+++ b/tests/ui/issues/issue-52717.stderr
@@ -7,6 +7,6 @@ LL | A::A { fob } => { println!("{}", fob); }
| variant `A::A` does not have this field
| help: a field with a similar name exists: `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0026`.
diff --git a/tests/ui/issues/issue-53300.stderr b/tests/ui/issues/issue-53300.stderr
index 2fedef7d2..293465ecb 100644
--- a/tests/ui/issues/issue-53300.stderr
+++ b/tests/ui/issues/issue-53300.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `Wrapper` in this scope
LL | fn addition() -> Wrapper<impl A> {}
| ^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/issues/issue-53348.stderr b/tests/ui/issues/issue-53348.stderr
index e4cdb7e88..38fa98e65 100644
--- a/tests/ui/issues/issue-53348.stderr
+++ b/tests/ui/issues/issue-53348.stderr
@@ -7,6 +7,6 @@ LL | for i in v {
LL | a = *i.to_string();
| ^^^^^^^^^^^^^^ expected `String`, found `str`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-53498.stderr b/tests/ui/issues/issue-53498.stderr
index b28fbff62..61a1aedf5 100644
--- a/tests/ui/issues/issue-53498.stderr
+++ b/tests/ui/issues/issue-53498.stderr
@@ -7,6 +7,6 @@ LL | fn foo() {}
LL | test::Foo::<test::B>::foo();
| ^^^ private associated function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0624`.
diff --git a/tests/ui/issues/issue-5358-1.stderr b/tests/ui/issues/issue-5358-1.stderr
index 059462a36..1bb946ce4 100644
--- a/tests/ui/issues/issue-5358-1.stderr
+++ b/tests/ui/issues/issue-5358-1.stderr
@@ -17,6 +17,6 @@ help: you might have meant to use field `0` whose type is `Either<usize, usize>`
LL | match S(Either::Left(5)).0 {
| ~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-54062.stderr b/tests/ui/issues/issue-54062.stderr
index 5361ee1d3..75eef543f 100644
--- a/tests/ui/issues/issue-54062.stderr
+++ b/tests/ui/issues/issue-54062.stderr
@@ -4,6 +4,6 @@ error[E0616]: field `inner` of struct `Mutex` is private
LL | let _ = test.comps.inner.try_lock();
| ^^^^^ private field
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0616`.
diff --git a/tests/ui/issues/issue-5439.stderr b/tests/ui/issues/issue-5439.stderr
index a91e4b31f..6d1d74e30 100644
--- a/tests/ui/issues/issue-5439.stderr
+++ b/tests/ui/issues/issue-5439.stderr
@@ -6,6 +6,6 @@ LL | return Box::new(Foo { nonexistent: self, foo: i });
|
= note: all struct fields are already assigned
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0560`.
diff --git a/tests/ui/issues/issue-54410.stderr b/tests/ui/issues/issue-54410.stderr
index 516c59afb..97e599075 100644
--- a/tests/ui/issues/issue-54410.stderr
+++ b/tests/ui/issues/issue-54410.stderr
@@ -6,6 +6,6 @@ LL | pub static mut symbol: [i8];
|
= help: the trait `Sized` is not implemented for `[i8]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-5554.rs b/tests/ui/issues/issue-5554.rs
index 7737536f4..afe333ed7 100644
--- a/tests/ui/issues/issue-5554.rs
+++ b/tests/ui/issues/issue-5554.rs
@@ -2,7 +2,6 @@
#![allow(dead_code)]
// pretty-expanded FIXME #23616
-use std::default::Default;
pub struct X<T> {
a: T,
diff --git a/tests/ui/issues/issue-55587.stderr b/tests/ui/issues/issue-55587.stderr
index faf78cfe8..eec6426a2 100644
--- a/tests/ui/issues/issue-55587.stderr
+++ b/tests/ui/issues/issue-55587.stderr
@@ -6,6 +6,6 @@ LL | let Path::new();
|
= help: for more information, visit https://doc.rust-lang.org/book/ch18-00-patterns.html
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0164`.
diff --git a/tests/ui/issues/issue-55731.stderr b/tests/ui/issues/issue-55731.stderr
index 97fd6678c..2c3804164 100644
--- a/tests/ui/issues/issue-55731.stderr
+++ b/tests/ui/issues/issue-55731.stderr
@@ -10,5 +10,5 @@ LL | | });
= note: `DistributedIteratorMulti<&'0 ()>` would have to be implemented for the type `Cloned<&()>`, for any lifetime `'0`...
= note: ...but `DistributedIteratorMulti<&'1 ()>` is actually implemented for the type `Cloned<&'1 ()>`, for some specific lifetime `'1`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-56806.stderr b/tests/ui/issues/issue-56806.stderr
index f164fd0c5..f3d4c2fef 100644
--- a/tests/ui/issues/issue-56806.stderr
+++ b/tests/ui/issues/issue-56806.stderr
@@ -7,6 +7,6 @@ LL | fn dyn_instead_of_self(self: Box<dyn Trait>);
= note: type of `self` must be `Self` or a type that dereferences to it
= help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0307`.
diff --git a/tests/ui/issues/issue-56943.stderr b/tests/ui/issues/issue-56943.stderr
index c394e620b..60a2e92dc 100644
--- a/tests/ui/issues/issue-56943.stderr
+++ b/tests/ui/issues/issue-56943.stderr
@@ -6,6 +6,6 @@ LL | let _: issue_56943::S = issue_56943::S2;
| |
| expected due to this
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-57271.stderr b/tests/ui/issues/issue-57271.stderr
index 391e69c91..10cbb34ef 100644
--- a/tests/ui/issues/issue-57271.stderr
+++ b/tests/ui/issues/issue-57271.stderr
@@ -22,6 +22,6 @@ LL | Base(BaseType),
LL ~ Object(Box<ObjectType>),
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/issues/issue-57362-1.stderr b/tests/ui/issues/issue-57362-1.stderr
index b10273f14..79b1b131a 100644
--- a/tests/ui/issues/issue-57362-1.stderr
+++ b/tests/ui/issues/issue-57362-1.stderr
@@ -11,6 +11,6 @@ note: `Trait` defines an item `f`, perhaps you need to implement it
LL | trait Trait {
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-57362-2.stderr b/tests/ui/issues/issue-57362-2.stderr
index 37beb587d..57477f534 100644
--- a/tests/ui/issues/issue-57362-2.stderr
+++ b/tests/ui/issues/issue-57362-2.stderr
@@ -13,6 +13,6 @@ note: `X` defines an item `make_g`, perhaps you need to implement it
LL | trait X {
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-57924.stderr b/tests/ui/issues/issue-57924.stderr
index 0323a4dfb..40435fd0f 100644
--- a/tests/ui/issues/issue-57924.stderr
+++ b/tests/ui/issues/issue-57924.stderr
@@ -6,6 +6,6 @@ LL | Self::<E>(e)
| |
| not allowed on self constructor
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0109`.
diff --git a/tests/ui/issues/issue-5844.mir.stderr b/tests/ui/issues/issue-5844.mir.stderr
index 6134d6889..4434f5a0f 100644
--- a/tests/ui/issues/issue-5844.mir.stderr
+++ b/tests/ui/issues/issue-5844.mir.stderr
@@ -6,6 +6,6 @@ LL | issue_5844_aux::rand();
|
= note: consult the function's documentation for information on how to avoid undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/issues/issue-5844.thir.stderr b/tests/ui/issues/issue-5844.thir.stderr
index 310a2b593..6074f7d0e 100644
--- a/tests/ui/issues/issue-5844.thir.stderr
+++ b/tests/ui/issues/issue-5844.thir.stderr
@@ -6,6 +6,6 @@ LL | issue_5844_aux::rand();
|
= note: consult the function's documentation for information on how to avoid undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/issues/issue-58463.rs b/tests/ui/issues/issue-58463.rs
index af93f7622..9573c9b70 100644
--- a/tests/ui/issues/issue-58463.rs
+++ b/tests/ui/issues/issue-58463.rs
@@ -1,6 +1,5 @@
// run-pass
// compile-flags:-C debuginfo=2
-// ignore-asmjs wasm2js does not support source maps yet
fn foo() -> impl Copy {
foo
diff --git a/tests/ui/issues/issue-58734.stderr b/tests/ui/issues/issue-58734.stderr
index d2314626d..5ae1ec7ca 100644
--- a/tests/ui/issues/issue-58734.stderr
+++ b/tests/ui/issues/issue-58734.stderr
@@ -18,6 +18,6 @@ error[E0599]: no function or associated item named `nonexistent` found for trait
LL | Trait::nonexistent(());
| ^^^^^^^^^^^ function or associated item not found in `dyn Trait`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-5883.stderr b/tests/ui/issues/issue-5883.stderr
index a3e2531b5..51d9708e0 100644
--- a/tests/ui/issues/issue-5883.stderr
+++ b/tests/ui/issues/issue-5883.stderr
@@ -15,6 +15,6 @@ help: function arguments must have a statically known size, borrowed types alway
LL | r: &dyn A + 'static
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-58857.stderr b/tests/ui/issues/issue-58857.stderr
index 6aef35f0b..ac70bc725 100644
--- a/tests/ui/issues/issue-58857.stderr
+++ b/tests/ui/issues/issue-58857.stderr
@@ -4,5 +4,5 @@ error: negative bounds are not supported
LL | impl<A: !Valid> Conj<A>{}
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-59494.stderr b/tests/ui/issues/issue-59494.stderr
index e9a4bf967..960de1be2 100644
--- a/tests/ui/issues/issue-59494.stderr
+++ b/tests/ui/issues/issue-59494.stderr
@@ -13,6 +13,6 @@ note: required by a bound in `t8n`
LL | fn t8n<A, B, C>(f: impl Fn(A) -> B, g: impl Fn(A) -> C) -> impl Fn(A) -> (B, C)
| ^^^^^^^^^^ required by this bound in `t8n`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-59756.stderr b/tests/ui/issues/issue-59756.stderr
index 9066e57aa..27c07fecd 100644
--- a/tests/ui/issues/issue-59756.stderr
+++ b/tests/ui/issues/issue-59756.stderr
@@ -15,6 +15,6 @@ help: try using a variant of the expected enum
LL | Ok(foo()?)
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-5997-enum.stderr b/tests/ui/issues/issue-5997-enum.stderr
index d07258ea7..c0b3cd6de 100644
--- a/tests/ui/issues/issue-5997-enum.stderr
+++ b/tests/ui/issues/issue-5997-enum.stderr
@@ -8,6 +8,6 @@ LL | enum E { V(Z) }
| |
| help: try introducing a local generic parameter here: `<Z>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0401`.
diff --git a/tests/ui/issues/issue-5997-struct.stderr b/tests/ui/issues/issue-5997-struct.stderr
index 83229e02c..670a54894 100644
--- a/tests/ui/issues/issue-5997-struct.stderr
+++ b/tests/ui/issues/issue-5997-struct.stderr
@@ -8,6 +8,6 @@ LL | struct S(T);
| |
| help: try introducing a local generic parameter here: `<T>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0401`.
diff --git a/tests/ui/issues/issue-60218.stderr b/tests/ui/issues/issue-60218.stderr
index ae3c4d120..b9317621b 100644
--- a/tests/ui/issues/issue-60218.stderr
+++ b/tests/ui/issues/issue-60218.stderr
@@ -20,6 +20,6 @@ LL | pub fn trigger_error<I, F>(iterable: I, functor: F)
LL | for<'t> <Map<<&'t I as IntoIterator>::IntoIter, F> as Iterator>::Item: Foo,
| ^^^ required by this bound in `trigger_error`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-61106.stderr b/tests/ui/issues/issue-61106.stderr
index aa922e268..f825141fa 100644
--- a/tests/ui/issues/issue-61106.stderr
+++ b/tests/ui/issues/issue-61106.stderr
@@ -16,6 +16,6 @@ help: consider borrowing here
LL | foo(&x.clone());
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-61108.stderr b/tests/ui/issues/issue-61108.stderr
index dd87b6266..d018986ef 100644
--- a/tests/ui/issues/issue-61108.stderr
+++ b/tests/ui/issues/issue-61108.stderr
@@ -16,6 +16,6 @@ help: consider iterating over a slice of the `Vec<char>`'s content to avoid movi
LL | for l in &bad_letters {
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/issues/issue-61623.stderr b/tests/ui/issues/issue-61623.stderr
index bedea3890..be6e28edf 100644
--- a/tests/ui/issues/issue-61623.stderr
+++ b/tests/ui/issues/issue-61623.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be a mutable reference
LL | fn f3<'a>(x: &'a mut ((), &'a mut ())) {
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/issues/issue-62375.stderr b/tests/ui/issues/issue-62375.stderr
index f6d7968c0..8750fbcf4 100644
--- a/tests/ui/issues/issue-62375.stderr
+++ b/tests/ui/issues/issue-62375.stderr
@@ -21,6 +21,6 @@ help: use parentheses to construct this tuple variant
LL | a == A::Value(/* () */);
| ++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/issues/issue-64430.stderr b/tests/ui/issues/issue-64430.stderr
index b6b1f3a66..1c8e020e9 100644
--- a/tests/ui/issues/issue-64430.stderr
+++ b/tests/ui/issues/issue-64430.stderr
@@ -7,6 +7,6 @@ LL | pub struct Foo;
LL | Foo.bar()
| ^^^ method not found in `Foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-64559.stderr b/tests/ui/issues/issue-64559.stderr
index 386ac794d..0cab37553 100644
--- a/tests/ui/issues/issue-64559.stderr
+++ b/tests/ui/issues/issue-64559.stderr
@@ -17,6 +17,6 @@ help: consider iterating over a slice of the `Vec<bool>`'s content to avoid movi
LL | for _val in &orig {}
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/issues/issue-64792-bad-unicode-ctor.stderr b/tests/ui/issues/issue-64792-bad-unicode-ctor.stderr
index 2ec151d24..7fc414602 100644
--- a/tests/ui/issues/issue-64792-bad-unicode-ctor.stderr
+++ b/tests/ui/issues/issue-64792-bad-unicode-ctor.stderr
@@ -7,6 +7,6 @@ LL |
LL | const Y: X = X("ö");
| ^^^^^^ help: use struct literal syntax instead: `X {}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0423`.
diff --git a/tests/ui/issues/issue-65131.stderr b/tests/ui/issues/issue-65131.stderr
index e234e6da5..70e85b584 100644
--- a/tests/ui/issues/issue-65131.stderr
+++ b/tests/ui/issues/issue-65131.stderr
@@ -7,6 +7,6 @@ LL | get_pair(&mut x, &mut x);
| | first mutable borrow occurs here
| first borrow later used by call
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/issues/issue-65230.stderr b/tests/ui/issues/issue-65230.stderr
index 7ccab8894..c959658c0 100644
--- a/tests/ui/issues/issue-65230.stderr
+++ b/tests/ui/issues/issue-65230.stderr
@@ -13,6 +13,6 @@ LL | impl T1 for &dyn T2 {}
| ^
= note: ...does not necessarily outlive the static lifetime
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-65634-raw-ident-suggestion.edition2015.stderr b/tests/ui/issues/issue-65634-raw-ident-suggestion.edition2015.stderr
index 4af3672ef..d4266814a 100644
--- a/tests/ui/issues/issue-65634-raw-ident-suggestion.edition2015.stderr
+++ b/tests/ui/issues/issue-65634-raw-ident-suggestion.edition2015.stderr
@@ -23,6 +23,6 @@ help: disambiguate the method for candidate #2
LL | await::r#struct(&r#fn {});
| ~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0034`.
diff --git a/tests/ui/issues/issue-65634-raw-ident-suggestion.edition2018.stderr b/tests/ui/issues/issue-65634-raw-ident-suggestion.edition2018.stderr
index 2b96a0fb5..fe104bfe4 100644
--- a/tests/ui/issues/issue-65634-raw-ident-suggestion.edition2018.stderr
+++ b/tests/ui/issues/issue-65634-raw-ident-suggestion.edition2018.stderr
@@ -23,6 +23,6 @@ help: disambiguate the method for candidate #2
LL | r#await::r#struct(&r#fn {});
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0034`.
diff --git a/tests/ui/issues/issue-6596-2.stderr b/tests/ui/issues/issue-6596-2.stderr
index 4fa73a464..e6281eb54 100644
--- a/tests/ui/issues/issue-6596-2.stderr
+++ b/tests/ui/issues/issue-6596-2.stderr
@@ -9,5 +9,5 @@ LL | g!(foo);
|
= note: this error originates in the macro `g` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-66706.stderr b/tests/ui/issues/issue-66706.stderr
index 8a30c0cad..ffdd61e77 100644
--- a/tests/ui/issues/issue-66706.stderr
+++ b/tests/ui/issues/issue-66706.stderr
@@ -24,7 +24,9 @@ error: expected identifier, found reserved identifier `_`
--> $DIR/issue-66706.rs:18:26
|
LL | [0; match [|f @ &ref _| () ] {} ]
- | ^ expected identifier, found reserved identifier
+ | ----- ^ expected identifier, found reserved identifier
+ | |
+ | while parsing this `match` expression
error[E0282]: type annotations needed
--> $DIR/issue-66706.rs:2:11
diff --git a/tests/ui/issues/issue-67039-unsound-pin-partialeq.stderr b/tests/ui/issues/issue-67039-unsound-pin-partialeq.stderr
index 6fde44eaf..1ea2d48b4 100644
--- a/tests/ui/issues/issue-67039-unsound-pin-partialeq.stderr
+++ b/tests/ui/issues/issue-67039-unsound-pin-partialeq.stderr
@@ -8,6 +8,6 @@ LL | let _ = Pin::new(Apple) == Rc::pin(Apple);
found struct `Rc<Apple>`
= note: required for `Pin<Apple>` to implement `PartialEq<Pin<Rc<Apple>>>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/issues/issue-6738.stderr b/tests/ui/issues/issue-6738.stderr
index f97d899c2..9c25c0fd9 100644
--- a/tests/ui/issues/issue-6738.stderr
+++ b/tests/ui/issues/issue-6738.stderr
@@ -11,6 +11,6 @@ help: consider restricting type parameter `T`
LL | impl<T: std::ops::AddAssign> Foo<T> {
| +++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0368`.
diff --git a/tests/ui/issues/issue-67552.polonius.stderr b/tests/ui/issues/issue-67552.polonius.stderr
index 9ab77d344..ca42f87e8 100644
--- a/tests/ui/issues/issue-67552.polonius.stderr
+++ b/tests/ui/issues/issue-67552.polonius.stderr
@@ -13,5 +13,5 @@ LL | | T: Iterator,
| |________________^
= note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-67552.polonius/issue-67552.long-type.txt'
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-67552.rs b/tests/ui/issues/issue-67552.rs
index 7336b873d..ec1997ccd 100644
--- a/tests/ui/issues/issue-67552.rs
+++ b/tests/ui/issues/issue-67552.rs
@@ -1,7 +1,6 @@
// build-fail
// compile-flags: -Copt-level=0
// normalize-stderr-test: ".nll/" -> "/"
-// ignore-compare-mode-next-solver (hangs)
fn main() {
rec(Empty);
diff --git a/tests/ui/issues/issue-67552.stderr b/tests/ui/issues/issue-67552.stderr
index f93ed67da..1a8d7248b 100644
--- a/tests/ui/issues/issue-67552.stderr
+++ b/tests/ui/issues/issue-67552.stderr
@@ -1,11 +1,11 @@
error: reached the recursion limit while instantiating `rec::<&mut &mut &mut &mut &mut ...>`
- --> $DIR/issue-67552.rs:30:9
+ --> $DIR/issue-67552.rs:29:9
|
LL | rec(identity(&mut it))
| ^^^^^^^^^^^^^^^^^^^^^^
|
note: `rec` defined here
- --> $DIR/issue-67552.rs:23:1
+ --> $DIR/issue-67552.rs:22:1
|
LL | / fn rec<T>(mut it: T)
LL | | where
@@ -13,5 +13,5 @@ LL | | T: Iterator,
| |________________^
= note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-67552/issue-67552.long-type.txt'
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-70381.stderr b/tests/ui/issues/issue-70381.stderr
index 96b8e6569..298a1cf9e 100644
--- a/tests/ui/issues/issue-70381.stderr
+++ b/tests/ui/issues/issue-70381.stderr
@@ -4,5 +4,5 @@ error: 1 positional argument in format string, but no arguments were given
LL | println!("\r¡{}")
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-7044.stderr b/tests/ui/issues/issue-7044.stderr
index 2ad67ec23..9d1fb3a10 100644
--- a/tests/ui/issues/issue-7044.stderr
+++ b/tests/ui/issues/issue-7044.stderr
@@ -8,6 +8,6 @@ LL | struct X;
|
= note: `X` must be defined only once in the value namespace of this module
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0428`.
diff --git a/tests/ui/issues/issue-7061.stderr b/tests/ui/issues/issue-7061.stderr
index a209f8a42..4fca2ff39 100644
--- a/tests/ui/issues/issue-7061.stderr
+++ b/tests/ui/issues/issue-7061.stderr
@@ -9,6 +9,6 @@ LL | fn foo(&'a mut self) -> Box<BarStruct> { self }
= note: expected struct `Box<BarStruct>`
found mutable reference `&'a mut BarStruct`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-7092.stderr b/tests/ui/issues/issue-7092.stderr
index e35379fd1..e2e574867 100644
--- a/tests/ui/issues/issue-7092.stderr
+++ b/tests/ui/issues/issue-7092.stderr
@@ -9,6 +9,6 @@ LL | Some(field) =>
= note: expected enum `Whatever`
found enum `Option<_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-71406.stderr b/tests/ui/issues/issue-71406.stderr
index 918163b60..cd7921f55 100644
--- a/tests/ui/issues/issue-71406.stderr
+++ b/tests/ui/issues/issue-71406.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: expected type, found function `channel` in `mps
LL | let (tx, rx) = mpsc::channel::new(1);
| ^^^^^^^ expected type, found function `channel` in `mpsc`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/issues/issue-71676-2.stderr b/tests/ui/issues/issue-71676-2.stderr
index 80fb4aed1..6ed318c87 100644
--- a/tests/ui/issues/issue-71676-2.stderr
+++ b/tests/ui/issues/issue-71676-2.stderr
@@ -13,6 +13,6 @@ help: consider dereferencing
LL | let _: *mut u8 = &mut ***a;
| +++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-72076.stderr b/tests/ui/issues/issue-72076.stderr
index b942cf75b..a08704c90 100644
--- a/tests/ui/issues/issue-72076.stderr
+++ b/tests/ui/issues/issue-72076.stderr
@@ -9,6 +9,6 @@ LL | fn f() -> Self::S {}
= help: consider constraining the associated type `<Self as X>::S` to `()` or calling a method that returns `<Self as X>::S`
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-7246.stderr b/tests/ui/issues/issue-7246.stderr
index a9bf2bf76..1fb6ab14e 100644
--- a/tests/ui/issues/issue-7246.stderr
+++ b/tests/ui/issues/issue-7246.stderr
@@ -20,5 +20,5 @@ LL | if *ptr::null() {};
|
= note: `#[warn(deref_nullptr)]` on by default
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/issues/issue-72839-error-overflow.stderr b/tests/ui/issues/issue-72839-error-overflow.stderr
index c4b6f90ca..35be632f5 100644
--- a/tests/ui/issues/issue-72839-error-overflow.stderr
+++ b/tests/ui/issues/issue-72839-error-overflow.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `missing_var` in this scope
LL | if missing_var % 8 == 0 {}
| ^^^^^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/issues/issue-73112.stderr b/tests/ui/issues/issue-73112.stderr
index 4b8b97966..c2c15ca10 100644
--- a/tests/ui/issues/issue-73112.stderr
+++ b/tests/ui/issues/issue-73112.stderr
@@ -10,6 +10,6 @@ note: `PageTable` has a `#[repr(align)]` attribute
LL | pub struct PageTable {
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0588`.
diff --git a/tests/ui/issues/issue-7364.stderr b/tests/ui/issues/issue-7364.stderr
index 7449fe697..7371e2105 100644
--- a/tests/ui/issues/issue-7364.stderr
+++ b/tests/ui/issues/issue-7364.stderr
@@ -11,6 +11,6 @@ note: required because it appears within the type `Box<RefCell<isize>>`
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
= note: shared static variables must have a type that implements `Sync`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-74236/main.stderr b/tests/ui/issues/issue-74236/main.stderr
index 5cd64e48a..a31d29de1 100644
--- a/tests/ui/issues/issue-74236/main.stderr
+++ b/tests/ui/issues/issue-74236/main.stderr
@@ -6,6 +6,6 @@ LL | let () = dep::Renamed;
| |
| expected `Renamed`, found `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-75283.stderr b/tests/ui/issues/issue-75283.stderr
index da3800aff..240d9716a 100644
--- a/tests/ui/issues/issue-75283.stderr
+++ b/tests/ui/issues/issue-75283.stderr
@@ -14,5 +14,5 @@ LL | | }
= help: you might have meant to write a function accessible through FFI, which can be done by writing `extern fn` outside of the `extern` block
= note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-7607-1.stderr b/tests/ui/issues/issue-7607-1.stderr
index c98302699..db4c8f25d 100644
--- a/tests/ui/issues/issue-7607-1.stderr
+++ b/tests/ui/issues/issue-7607-1.stderr
@@ -7,6 +7,6 @@ LL | impl Fo {
|
= note: similarly named trait `Fn` defined here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/issues/issue-76077.stderr b/tests/ui/issues/issue-76077.stderr
index 197ca8d5a..3fef5ffce 100644
--- a/tests/ui/issues/issue-76077.stderr
+++ b/tests/ui/issues/issue-76077.stderr
@@ -4,7 +4,7 @@ error: cannot construct `Foo` with struct literal syntax due to private fields
LL | foo::Foo {};
| ^^^^^^^^
|
- = note: ... and other private field `you_cant_use_this_field` that was not provided
+ = note: private field `you_cant_use_this_field` that was not provided
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-77218/issue-77218-2.stderr b/tests/ui/issues/issue-77218/issue-77218-2.stderr
index 58c1c18f9..dfed0b6e6 100644
--- a/tests/ui/issues/issue-77218/issue-77218-2.stderr
+++ b/tests/ui/issues/issue-77218/issue-77218-2.stderr
@@ -11,6 +11,6 @@ help: you might have meant to use pattern destructuring
LL | while let Some(0) = value.get(0) {
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0070`.
diff --git a/tests/ui/issues/issue-77218/issue-77218.stderr b/tests/ui/issues/issue-77218/issue-77218.stderr
index eda635646..e98e69314 100644
--- a/tests/ui/issues/issue-77218/issue-77218.stderr
+++ b/tests/ui/issues/issue-77218/issue-77218.stderr
@@ -11,6 +11,6 @@ help: you might have meant to use pattern destructuring
LL | while let Some(0) = value.get(0) {}
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0070`.
diff --git a/tests/ui/issues/issue-78622.stderr b/tests/ui/issues/issue-78622.stderr
index 70daf8a2f..985d6dde9 100644
--- a/tests/ui/issues/issue-78622.stderr
+++ b/tests/ui/issues/issue-78622.stderr
@@ -9,6 +9,6 @@ help: if there were a trait named `Example` with associated type `A` implemented
LL | <S as Example>::A::<f> {}
| ~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0223`.
diff --git a/tests/ui/issues/issue-7867.stderr b/tests/ui/issues/issue-7867.stderr
index 4fb1af344..1a0cf5da8 100644
--- a/tests/ui/issues/issue-7867.stderr
+++ b/tests/ui/issues/issue-7867.stderr
@@ -12,6 +12,6 @@ LL | A::B => (),
= note: expected tuple `(bool, bool)`
found enum `A`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-7950.stderr b/tests/ui/issues/issue-7950.stderr
index b8b0eb310..80504c070 100644
--- a/tests/ui/issues/issue-7950.stderr
+++ b/tests/ui/issues/issue-7950.stderr
@@ -7,6 +7,6 @@ LL | struct Foo;
LL | Foo::bar();
| ^^^ function or associated item not found in `Foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-7970a.stderr b/tests/ui/issues/issue-7970a.stderr
index b04a0eef3..1e6bb92ea 100644
--- a/tests/ui/issues/issue-7970a.stderr
+++ b/tests/ui/issues/issue-7970a.stderr
@@ -13,5 +13,5 @@ note: while trying to match meta-variable `$fmt:expr`
LL | ($fmt:expr) => (print!(concat!($fmt, "\n")));
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/issues/issue-80607.stderr b/tests/ui/issues/issue-80607.stderr
index 38e46683b..20494f319 100644
--- a/tests/ui/issues/issue-80607.stderr
+++ b/tests/ui/issues/issue-80607.stderr
@@ -12,6 +12,6 @@ help: `Enum::V1` is a tuple variant, use the appropriate syntax
LL | Enum::V1(/* fields */)
| ~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0559`.
diff --git a/tests/ui/issues/issue-81584.stderr b/tests/ui/issues/issue-81584.stderr
index d57f1b778..eb97916ad 100644
--- a/tests/ui/issues/issue-81584.stderr
+++ b/tests/ui/issues/issue-81584.stderr
@@ -9,6 +9,6 @@ LL | .map(|y| y.iter().map(|x| x + 1))
|
= help: use `.collect()` to allocate the iterator
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/issues/issue-83048.stderr b/tests/ui/issues/issue-83048.stderr
index dade9e469..672bf69a7 100644
--- a/tests/ui/issues/issue-83048.stderr
+++ b/tests/ui/issues/issue-83048.stderr
@@ -4,6 +4,6 @@ error[E0268]: `break` outside of a loop or labeled block
LL | break;
| ^^^^^ cannot `break` outside of a loop or labeled block
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0268`.
diff --git a/tests/ui/issues/issue-87199.stderr b/tests/ui/issues/issue-87199.stderr
index e02cd7fcf..d81bc3615 100644
--- a/tests/ui/issues/issue-87199.stderr
+++ b/tests/ui/issues/issue-87199.stderr
@@ -33,6 +33,6 @@ help: consider relaxing the implicit `Sized` restriction
LL | fn ref_arg<T: ?Send + ?Sized>(_: &T) {}
| ++++++++
-error: aborting due to previous error; 3 warnings emitted
+error: aborting due to 1 previous error; 3 warnings emitted
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-8727.polonius.stderr b/tests/ui/issues/issue-8727.polonius.stderr
index 283c01b6b..4fb8c2b3a 100644
--- a/tests/ui/issues/issue-8727.polonius.stderr
+++ b/tests/ui/issues/issue-8727.polonius.stderr
@@ -22,5 +22,5 @@ LL | fn generic<T>() {
| ^^^^^^^^^^^^^^^
= note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-8727.polonius/issue-8727.long-type.txt'
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/issues/issue-8727.stderr b/tests/ui/issues/issue-8727.stderr
index 22332b357..9af598fe4 100644
--- a/tests/ui/issues/issue-8727.stderr
+++ b/tests/ui/issues/issue-8727.stderr
@@ -22,5 +22,5 @@ LL | fn generic<T>() {
| ^^^^^^^^^^^^^^^
= note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-8727/issue-8727.long-type.txt'
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/issues/issue-87490.stderr b/tests/ui/issues/issue-87490.stderr
index f359dd638..5a4ec5583 100644
--- a/tests/ui/issues/issue-87490.stderr
+++ b/tests/ui/issues/issue-87490.stderr
@@ -9,6 +9,6 @@ LL | String::new
= note: expected type `usize`
found fn item `fn() -> String {String::new}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-8767.stderr b/tests/ui/issues/issue-8767.stderr
index 91d99f393..66141628e 100644
--- a/tests/ui/issues/issue-8767.stderr
+++ b/tests/ui/issues/issue-8767.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `B` in this scope
LL | impl B {
| ^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/issues/issue-8783.rs b/tests/ui/issues/issue-8783.rs
index 4eb49c821..cfffd9eb0 100644
--- a/tests/ui/issues/issue-8783.rs
+++ b/tests/ui/issues/issue-8783.rs
@@ -2,8 +2,6 @@
#![allow(unused_variables)]
// pretty-expanded FIXME #23616
-use std::default::Default;
-
struct X { pub x: usize }
impl Default for X {
fn default() -> X {
diff --git a/tests/ui/issues/issue-9575.stderr b/tests/ui/issues/issue-9575.stderr
index e49eac3ba..2f6e2687d 100644
--- a/tests/ui/issues/issue-9575.stderr
+++ b/tests/ui/issues/issue-9575.stderr
@@ -7,6 +7,6 @@ LL | fn start(argc: isize, argv: *const *const u8, crate_map: *const u8) -> isiz
= note: expected signature `fn(isize, *const *const u8) -> _`
found signature `fn(isize, *const *const u8, *const u8) -> _`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-9814.stderr b/tests/ui/issues/issue-9814.stderr
index bd9e7df49..d647edaf3 100644
--- a/tests/ui/issues/issue-9814.stderr
+++ b/tests/ui/issues/issue-9814.stderr
@@ -4,6 +4,6 @@ error[E0614]: type `Foo` cannot be dereferenced
LL | let _ = *Foo::Bar(2);
| ^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0614`.
diff --git a/tests/ui/issues/issue-98299.stderr b/tests/ui/issues/issue-98299.stderr
index 4fd9f3030..e99d8e5cc 100644
--- a/tests/ui/issues/issue-98299.stderr
+++ b/tests/ui/issues/issue-98299.stderr
@@ -9,6 +9,6 @@ help: consider giving this closure parameter an explicit type, where the value o
LL | SmallCString::try_from(p).map(|cstr: SmallCString<N>| cstr);
| +++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/iterators/bound.stderr b/tests/ui/iterators/bound.stderr
index cc7ded498..e5ed19f37 100644
--- a/tests/ui/iterators/bound.stderr
+++ b/tests/ui/iterators/bound.stderr
@@ -12,6 +12,6 @@ note: required by a bound in `S`
LL | struct S<I: Iterator>(I);
| ^^^^^^^^ required by this bound in `S`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/iterators/collect-into-array.stderr b/tests/ui/iterators/collect-into-array.stderr
index e38745cc1..38e5de803 100644
--- a/tests/ui/iterators/collect-into-array.stderr
+++ b/tests/ui/iterators/collect-into-array.stderr
@@ -8,6 +8,6 @@ LL | let whatever: [u32; 10] = (0..10).collect();
note: required by a bound in `collect`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/iterators/float_iterator_hint.stderr b/tests/ui/iterators/float_iterator_hint.stderr
index bae23a1f8..c3cb00c3c 100644
--- a/tests/ui/iterators/float_iterator_hint.stderr
+++ b/tests/ui/iterators/float_iterator_hint.stderr
@@ -8,6 +8,6 @@ LL | for i in 0.2 {
= note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end`
= note: required for `{float}` to implement `IntoIterator`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/iterators/invalid-iterator-chain-with-int-infer.stderr b/tests/ui/iterators/invalid-iterator-chain-with-int-infer.stderr
index e728fec29..f68c59636 100644
--- a/tests/ui/iterators/invalid-iterator-chain-with-int-infer.stderr
+++ b/tests/ui/iterators/invalid-iterator-chain-with-int-infer.stderr
@@ -21,6 +21,6 @@ LL | let x = Some(()).iter().map(|()| 1).sum::<f32>();
note: required by a bound in `std::iter::Iterator::sum`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/iterators/vec-on-unimplemented.stderr b/tests/ui/iterators/vec-on-unimplemented.stderr
index a7d9c481a..e2a80dbff 100644
--- a/tests/ui/iterators/vec-on-unimplemented.stderr
+++ b/tests/ui/iterators/vec-on-unimplemented.stderr
@@ -13,6 +13,6 @@ LL | vec![true, false].map(|v| !v).collect::<Vec<_>>();
`[bool]: Iterator`
which is required by `&mut [bool]: Iterator`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/json/json-bom-plus-crlf-multifile.stderr b/tests/ui/json/json-bom-plus-crlf-multifile.stderr
index 84040e805..0c6c654d6 100644
--- a/tests/ui/json/json-bom-plus-crlf-multifile.stderr
+++ b/tests/ui/json/json-bom-plus-crlf-multifile.stderr
@@ -1,4 +1,4 @@
-{"message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.
+{"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.
Erroneous code examples:
@@ -26,7 +26,7 @@ most common being when calling a function and passing an argument which has a
different type than the matching type in the function declaration.
"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":612,"byte_end":618,"line_start":17,"line_end":17,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":622,"byte_end":622,"line_start":17,"line_end":17,"column_start":23,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":23,"highlight_end":23}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:17:22: error[E0308]: mismatched types
"}
-{"message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.
+{"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.
Erroneous code examples:
@@ -54,7 +54,7 @@ most common being when calling a function and passing an argument which has a
different type than the matching type in the function declaration.
"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":681,"byte_end":682,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":672,"byte_end":678,"line_start":19,"line_end":19,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":682,"byte_end":682,"line_start":19,"line_end":19,"column_start":23,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":23,"highlight_end":23}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:19:22: error[E0308]: mismatched types
"}
-{"message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.
+{"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.
Erroneous code examples:
@@ -82,7 +82,7 @@ most common being when calling a function and passing an argument which has a
different type than the matching type in the function declaration.
"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":745,"byte_end":746,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":735,"byte_end":741,"line_start":22,"line_end":22,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String =","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":746,"byte_end":746,"line_start":23,"line_end":23,"column_start":2,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":2,"highlight_end":2}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:23:1: error[E0308]: mismatched types
"}
-{"message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.
+{"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.
Erroneous code examples:
@@ -110,5 +110,5 @@ most common being when calling a function and passing an argument which has a
different type than the matching type in the function declaration.
"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":801,"byte_end":809,"line_start":25,"line_end":26,"column_start":22,"column_end":6,"is_primary":true,"text":[{"text":" let s : String = (","highlight_start":22,"highlight_end":23},{"text":" ); // Error spanning the newline.","highlight_start":1,"highlight_end":6}],"label":"expected `String`, found `()`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":792,"byte_end":798,"line_start":25,"line_end":25,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = (","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:25:22: error[E0308]: mismatched types
"}
-{"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors
+{"$message_type":"diagnostic","message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors
"}
diff --git a/tests/ui/json/json-bom-plus-crlf.stderr b/tests/ui/json/json-bom-plus-crlf.stderr
index b0f450e9e..31dbacb59 100644
--- a/tests/ui/json/json-bom-plus-crlf.stderr
+++ b/tests/ui/json/json-bom-plus-crlf.stderr
@@ -1,4 +1,4 @@
-{"message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.
+{"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.
Erroneous code examples:
@@ -26,7 +26,7 @@ most common being when calling a function and passing an argument which has a
different type than the matching type in the function declaration.
"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":606,"byte_end":607,"line_start":16,"line_end":16,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":597,"byte_end":603,"line_start":16,"line_end":16,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":607,"byte_end":607,"line_start":16,"line_end":16,"column_start":23,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":23,"highlight_end":23}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:16:22: error[E0308]: mismatched types
"}
-{"message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.
+{"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.
Erroneous code examples:
@@ -54,7 +54,7 @@ most common being when calling a function and passing an argument which has a
different type than the matching type in the function declaration.
"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":666,"byte_end":667,"line_start":18,"line_end":18,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":657,"byte_end":663,"line_start":18,"line_end":18,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":667,"byte_end":667,"line_start":18,"line_end":18,"column_start":23,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":23,"highlight_end":23}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:18:22: error[E0308]: mismatched types
"}
-{"message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.
+{"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.
Erroneous code examples:
@@ -82,7 +82,7 @@ most common being when calling a function and passing an argument which has a
different type than the matching type in the function declaration.
"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":730,"byte_end":731,"line_start":22,"line_end":22,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":720,"byte_end":726,"line_start":21,"line_end":21,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String =","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":731,"byte_end":731,"line_start":22,"line_end":22,"column_start":2,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":2,"highlight_end":2}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:22:1: error[E0308]: mismatched types
"}
-{"message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.
+{"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.
Erroneous code examples:
@@ -110,5 +110,5 @@ most common being when calling a function and passing an argument which has a
different type than the matching type in the function declaration.
"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":786,"byte_end":794,"line_start":24,"line_end":25,"column_start":22,"column_end":6,"is_primary":true,"text":[{"text":" let s : String = (","highlight_start":22,"highlight_end":23},{"text":" ); // Error spanning the newline.","highlight_start":1,"highlight_end":6}],"label":"expected `String`, found `()`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":777,"byte_end":783,"line_start":24,"line_end":24,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = (","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"$DIR/json-bom-plus-crlf.rs:24:22: error[E0308]: mismatched types
"}
-{"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors
+{"$message_type":"diagnostic","message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors
"}
diff --git a/tests/ui/json/json-multiple.stderr b/tests/ui/json/json-multiple.stderr
index 55ccfd5fa..7689fb94a 100644
--- a/tests/ui/json/json-multiple.stderr
+++ b/tests/ui/json/json-multiple.stderr
@@ -1 +1 @@
-{"artifact":"$TEST_BUILD_DIR/json/json-multiple/libjson_multiple.rlib","emit":"link"}
+{"$message_type":"artifact","artifact":"$TEST_BUILD_DIR/json/json-multiple/libjson_multiple.rlib","emit":"link"}
diff --git a/tests/ui/json/json-options.stderr b/tests/ui/json/json-options.stderr
index 645a26f5a..668fc1809 100644
--- a/tests/ui/json/json-options.stderr
+++ b/tests/ui/json/json-options.stderr
@@ -1 +1 @@
-{"artifact":"$TEST_BUILD_DIR/json/json-options/libjson_options.rlib","emit":"link"}
+{"$message_type":"artifact","artifact":"$TEST_BUILD_DIR/json/json-options/libjson_options.rlib","emit":"link"}
diff --git a/tests/ui/json/json-short.stderr b/tests/ui/json/json-short.stderr
index 3bd85b083..a18bceaa6 100644
--- a/tests/ui/json/json-short.stderr
+++ b/tests/ui/json/json-short.stderr
@@ -1,4 +1,4 @@
-{"message":"`main` function not found in crate `json_short`","code":{"code":"E0601","explanation":"No `main` function was found in a binary crate.
+{"$message_type":"diagnostic","message":"`main` function not found in crate `json_short`","code":{"code":"E0601","explanation":"No `main` function was found in a binary crate.
To fix this error, add a `main` function:
@@ -15,5 +15,5 @@ If you don't know the basics of Rust, you can look at the
[rust-book]: https://doc.rust-lang.org/book/
"},"level":"error","spans":[{"file_name":"$DIR/json-short.rs","byte_start":62,"byte_end":62,"line_start":1,"line_end":1,"column_start":63,"column_end":63,"is_primary":true,"text":[{"text":"// compile-flags: --json=diagnostic-short --error-format=json","highlight_start":63,"highlight_end":63}],"label":"consider adding a `main` function to `$DIR/json-short.rs`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"$DIR/json-short.rs:1:63: error[E0601]: `main` function not found in crate `json_short`
"}
-{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error
+{"$message_type":"diagnostic","message":"aborting due to 1 previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 1 previous error
"}
diff --git a/tests/ui/keyword/extern/keyword-extern-as-identifier-expr.stderr b/tests/ui/keyword/extern/keyword-extern-as-identifier-expr.stderr
index 8bb89d2ee..7cc4a95ac 100644
--- a/tests/ui/keyword/extern/keyword-extern-as-identifier-expr.stderr
+++ b/tests/ui/keyword/extern/keyword-extern-as-identifier-expr.stderr
@@ -4,5 +4,5 @@ error: expected expression, found keyword `extern`
LL | let s = extern::foo::Bar;
| ^^^^^^ expected expression
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/keyword/extern/keyword-extern-as-identifier-pat.stderr b/tests/ui/keyword/extern/keyword-extern-as-identifier-pat.stderr
index 9bf416341..f9def6fd8 100644
--- a/tests/ui/keyword/extern/keyword-extern-as-identifier-pat.stderr
+++ b/tests/ui/keyword/extern/keyword-extern-as-identifier-pat.stderr
@@ -9,5 +9,5 @@ help: escape `extern` to use it as an identifier
LL | let r#extern = 0;
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/keyword/extern/keyword-extern-as-identifier-type.stderr b/tests/ui/keyword/extern/keyword-extern-as-identifier-type.stderr
index 20ecf6bac..50cac77c1 100644
--- a/tests/ui/keyword/extern/keyword-extern-as-identifier-type.stderr
+++ b/tests/ui/keyword/extern/keyword-extern-as-identifier-type.stderr
@@ -4,5 +4,5 @@ error: expected type, found keyword `extern`
LL | type A = extern::foo::bar;
| ^^^^^^ expected type
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/keyword/keyword-false-as-identifier.stderr b/tests/ui/keyword/keyword-false-as-identifier.stderr
index 6dcfa3a48..b8f0901bc 100644
--- a/tests/ui/keyword/keyword-false-as-identifier.stderr
+++ b/tests/ui/keyword/keyword-false-as-identifier.stderr
@@ -6,6 +6,6 @@ LL | let false = 22;
| |
| expected integer, found `bool`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/keyword/keyword-self-as-identifier.stderr b/tests/ui/keyword/keyword-self-as-identifier.stderr
index 060e7c3ea..098ef8d82 100644
--- a/tests/ui/keyword/keyword-self-as-identifier.stderr
+++ b/tests/ui/keyword/keyword-self-as-identifier.stderr
@@ -4,6 +4,6 @@ error[E0531]: cannot find unit struct, unit variant or constant `Self` in this s
LL | let Self = 22;
| ^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0531`.
diff --git a/tests/ui/keyword/keyword-super-as-identifier.stderr b/tests/ui/keyword/keyword-super-as-identifier.stderr
index 1f64f3b73..bfb27c143 100644
--- a/tests/ui/keyword/keyword-super-as-identifier.stderr
+++ b/tests/ui/keyword/keyword-super-as-identifier.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: there are too many leading `super` keywords
LL | let super = 22;
| ^^^^^ there are too many leading `super` keywords
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/keyword/keyword-super.stderr b/tests/ui/keyword/keyword-super.stderr
index 0e0d67cb9..bf595442c 100644
--- a/tests/ui/keyword/keyword-super.stderr
+++ b/tests/ui/keyword/keyword-super.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: there are too many leading `super` keywords
LL | let super: isize;
| ^^^^^ there are too many leading `super` keywords
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/keyword/keyword-true-as-identifier.stderr b/tests/ui/keyword/keyword-true-as-identifier.stderr
index 86f6e0006..0f7a8a7e7 100644
--- a/tests/ui/keyword/keyword-true-as-identifier.stderr
+++ b/tests/ui/keyword/keyword-true-as-identifier.stderr
@@ -6,6 +6,6 @@ LL | let true = 22;
| |
| expected integer, found `bool`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/kindck/kindck-impl-type-params-2.stderr b/tests/ui/kindck/kindck-impl-type-params-2.stderr
index 1d26ae51f..a51232090 100644
--- a/tests/ui/kindck/kindck-impl-type-params-2.stderr
+++ b/tests/ui/kindck/kindck-impl-type-params-2.stderr
@@ -19,6 +19,6 @@ note: required by a bound in `take_param`
LL | fn take_param<T:Foo>(foo: &T) { }
| ^^^ required by this bound in `take_param`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/kindck/kindck-nonsendable-1.stderr b/tests/ui/kindck/kindck-nonsendable-1.stderr
index 077004ae7..8bb784d1d 100644
--- a/tests/ui/kindck/kindck-nonsendable-1.stderr
+++ b/tests/ui/kindck/kindck-nonsendable-1.stderr
@@ -20,6 +20,6 @@ note: required by a bound in `bar`
LL | fn bar<F:FnOnce() + Send>(_: F) { }
| ^^^^ required by this bound in `bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/kindck/kindck-send-object1.stderr b/tests/ui/kindck/kindck-send-object1.stderr
index 269193f73..c0d516e3f 100644
--- a/tests/ui/kindck/kindck-send-object1.stderr
+++ b/tests/ui/kindck/kindck-send-object1.stderr
@@ -20,7 +20,7 @@ LL | assert_send::<Box<dyn Dummy + 'a>>();
|
= help: the trait `Send` is not implemented for `(dyn Dummy + 'a)`
= note: required for `Unique<(dyn Dummy + 'a)>` to implement `Send`
-note: required because it appears within the type `Box<dyn Dummy>`
+note: required because it appears within the type `Box<(dyn Dummy + 'a)>`
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
note: required by a bound in `assert_send`
--> $DIR/kindck-send-object1.rs:5:18
diff --git a/tests/ui/kindck/kindck-send-owned.stderr b/tests/ui/kindck/kindck-send-owned.stderr
index dc1bb6206..860a9391b 100644
--- a/tests/ui/kindck/kindck-send-owned.stderr
+++ b/tests/ui/kindck/kindck-send-owned.stderr
@@ -14,6 +14,6 @@ note: required by a bound in `assert_send`
LL | fn assert_send<T:Send>() { }
| ^^^^ required by this bound in `assert_send`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/lang-items/bad-add-impl.stderr b/tests/ui/lang-items/bad-add-impl.stderr
index 3143729f9..c5ad9ff2a 100644
--- a/tests/ui/lang-items/bad-add-impl.stderr
+++ b/tests/ui/lang-items/bad-add-impl.stderr
@@ -6,6 +6,6 @@ LL | 1u32 + 1u32;
| |
| u32
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/lang-items/issue-19660.stderr b/tests/ui/lang-items/issue-19660.stderr
index f5d903f38..e5a8a143d 100644
--- a/tests/ui/lang-items/issue-19660.stderr
+++ b/tests/ui/lang-items/issue-19660.stderr
@@ -1,4 +1,4 @@
error: requires `copy` lang_item
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lang-items/issue-86238.stderr b/tests/ui/lang-items/issue-86238.stderr
index c6e811a94..b492904bc 100644
--- a/tests/ui/lang-items/issue-86238.stderr
+++ b/tests/ui/lang-items/issue-86238.stderr
@@ -6,5 +6,5 @@ LL | one()
|
= help: make sure the `fn`/`fn_mut`/`fn_once` lang items are defined and have correctly defined `call`/`call_mut`/`call_once` methods
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lang-items/lang-item-generic-requirements.rs b/tests/ui/lang-items/lang-item-generic-requirements.rs
index 3d33adf68..21bd7187e 100644
--- a/tests/ui/lang-items/lang-item-generic-requirements.rs
+++ b/tests/ui/lang-items/lang-item-generic-requirements.rs
@@ -22,6 +22,8 @@ trait MyIndex<'a, T> {}
#[lang = "phantom_data"]
//~^ ERROR `phantom_data` language item must be applied to a struct with 1 generic argument
struct MyPhantomData<T, U>;
+//~^ ERROR parameter `T` is never used
+//~| ERROR parameter `U` is never used
#[lang = "owned_box"]
//~^ ERROR `owned_box` language item must be applied to a struct with at least 1 generic argument
@@ -40,6 +42,7 @@ fn ice() {
let r = 5;
let a = 6;
r + a;
+ //~^ ERROR cannot add `{integer}` to `{integer}`
// Use drop in place
my_ptr_drop();
diff --git a/tests/ui/lang-items/lang-item-generic-requirements.stderr b/tests/ui/lang-items/lang-item-generic-requirements.stderr
index 4d349a25f..8072e6797 100644
--- a/tests/ui/lang-items/lang-item-generic-requirements.stderr
+++ b/tests/ui/lang-items/lang-item-generic-requirements.stderr
@@ -33,7 +33,7 @@ LL | struct MyPhantomData<T, U>;
| ------ this struct has 2 generic arguments
error[E0718]: `owned_box` language item must be applied to a struct with at least 1 generic argument
- --> $DIR/lang-item-generic-requirements.rs:26:1
+ --> $DIR/lang-item-generic-requirements.rs:28:1
|
LL | #[lang = "owned_box"]
| ^^^^^^^^^^^^^^^^^^^^^
@@ -42,7 +42,7 @@ LL | struct Foo;
| - this struct has 0 generic arguments
error[E0718]: `start` language item must be applied to a function with 1 generic argument
- --> $DIR/lang-item-generic-requirements.rs:32:1
+ --> $DIR/lang-item-generic-requirements.rs:34:1
|
LL | #[lang = "start"]
| ^^^^^^^^^^^^^^^^^
@@ -50,6 +50,35 @@ LL |
LL | fn start(_: *const u8, _: isize, _: *const *const u8) -> isize {
| - this function has 0 generic arguments
-error: aborting due to 6 previous errors
+error[E0392]: parameter `T` is never used
+ --> $DIR/lang-item-generic-requirements.rs:24:22
+ |
+LL | struct MyPhantomData<T, U>;
+ | ^ unused parameter
+ |
+ = help: consider removing `T` or referring to it in a field
+ = help: if you intended `T` to be a const parameter, use `const T: usize` instead
+
+error[E0392]: parameter `U` is never used
+ --> $DIR/lang-item-generic-requirements.rs:24:25
+ |
+LL | struct MyPhantomData<T, U>;
+ | ^ unused parameter
+ |
+ = help: consider removing `U` or referring to it in a field
+ = help: if you intended `U` to be a const parameter, use `const U: usize` instead
+
+error[E0369]: cannot add `{integer}` to `{integer}`
+ --> $DIR/lang-item-generic-requirements.rs:44:7
+ |
+LL | r + a;
+ | - ^ - {integer}
+ | |
+ | {integer}
+
+error: requires `copy` lang_item
+
+error: aborting due to 10 previous errors
-For more information about this error, try `rustc --explain E0718`.
+Some errors have detailed explanations: E0369, E0392, E0718.
+For more information about an error, try `rustc --explain E0369`.
diff --git a/tests/ui/lang-items/lang-item-missing.stderr b/tests/ui/lang-items/lang-item-missing.stderr
index f7516c7d3..08e679a7c 100644
--- a/tests/ui/lang-items/lang-item-missing.stderr
+++ b/tests/ui/lang-items/lang-item-missing.stderr
@@ -1,4 +1,4 @@
error: requires `sized` lang_item
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lang-items/missing-clone-for-suggestion.stderr b/tests/ui/lang-items/missing-clone-for-suggestion.stderr
index 35783a1be..0187f965b 100644
--- a/tests/ui/lang-items/missing-clone-for-suggestion.stderr
+++ b/tests/ui/lang-items/missing-clone-for-suggestion.stderr
@@ -16,6 +16,6 @@ LL | fn g<T>(x: T) {}
| |
| in this function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/lang-items/required-lang-item.stderr b/tests/ui/lang-items/required-lang-item.stderr
index 83764a91a..bb53d336b 100644
--- a/tests/ui/lang-items/required-lang-item.stderr
+++ b/tests/ui/lang-items/required-lang-item.stderr
@@ -1,4 +1,4 @@
error: requires `start` lang_item
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lang-items/start_lang_item_args.argc.stderr b/tests/ui/lang-items/start_lang_item_args.argc.stderr
index 66d4397a2..cd7361255 100644
--- a/tests/ui/lang-items/start_lang_item_args.argc.stderr
+++ b/tests/ui/lang-items/start_lang_item_args.argc.stderr
@@ -7,6 +7,6 @@ LL | fn start<T>(_main: fn() -> T, _argc: i8, _argv: *const *const u8, _sigpipe:
= note: expected signature `fn(fn() -> _, isize, _, _) -> _`
found signature `fn(fn() -> _, i8, _, _) -> _`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/lang-items/start_lang_item_args.argv.stderr b/tests/ui/lang-items/start_lang_item_args.argv.stderr
index 53d776cd8..1a5905ab8 100644
--- a/tests/ui/lang-items/start_lang_item_args.argv.stderr
+++ b/tests/ui/lang-items/start_lang_item_args.argv.stderr
@@ -7,6 +7,6 @@ LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: u8, _sigpipe: u8) -> isi
= note: expected signature `fn(fn() -> _, _, *const *const u8, _) -> _`
found signature `fn(fn() -> _, _, u8, _) -> _`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/lang-items/start_lang_item_args.argv_inner_ptr.stderr b/tests/ui/lang-items/start_lang_item_args.argv_inner_ptr.stderr
index 7d002e090..c61ace3cd 100644
--- a/tests/ui/lang-items/start_lang_item_args.argv_inner_ptr.stderr
+++ b/tests/ui/lang-items/start_lang_item_args.argv_inner_ptr.stderr
@@ -7,6 +7,6 @@ LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const usize, _si
= note: expected signature `fn(fn() -> _, _, *const *const u8, _) -> _`
found signature `fn(fn() -> _, _, *const *const usize, _) -> _`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/lang-items/start_lang_item_args.main_args.stderr b/tests/ui/lang-items/start_lang_item_args.main_args.stderr
index 91994b9d7..ef943d6b3 100644
--- a/tests/ui/lang-items/start_lang_item_args.main_args.stderr
+++ b/tests/ui/lang-items/start_lang_item_args.main_args.stderr
@@ -7,6 +7,6 @@ LL | fn start<T>(_main: fn(i32) -> T, _argc: isize, _argv: *const *const u8, _si
= note: expected signature `fn(fn() -> _, _, _, _) -> _`
found signature `fn(fn(i32) -> _, _, _, _) -> _`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/lang-items/start_lang_item_args.main_ret.stderr b/tests/ui/lang-items/start_lang_item_args.main_ret.stderr
index 25570f960..00395a05d 100644
--- a/tests/ui/lang-items/start_lang_item_args.main_ret.stderr
+++ b/tests/ui/lang-items/start_lang_item_args.main_ret.stderr
@@ -9,6 +9,6 @@ LL | fn start<T>(_main: fn() -> u16, _argc: isize, _argv: *const *const u8, _sig
= note: expected signature `fn(fn() -> T, _, _, _) -> _`
found signature `fn(fn() -> u16, _, _, _) -> _`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/lang-items/start_lang_item_args.main_ty.stderr b/tests/ui/lang-items/start_lang_item_args.main_ty.stderr
index 87940d05e..193f25bab 100644
--- a/tests/ui/lang-items/start_lang_item_args.main_ty.stderr
+++ b/tests/ui/lang-items/start_lang_item_args.main_ty.stderr
@@ -7,6 +7,6 @@ LL | fn start<T>(_main: u64, _argc: isize, _argv: *const *const u8, _sigpipe: u8
= note: expected signature `fn(fn() -> T, _, _, _) -> _`
found signature `fn(u64, _, _, _) -> _`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/lang-items/start_lang_item_args.missing_all_args.stderr b/tests/ui/lang-items/start_lang_item_args.missing_all_args.stderr
index 5363871e2..56b787d2a 100644
--- a/tests/ui/lang-items/start_lang_item_args.missing_all_args.stderr
+++ b/tests/ui/lang-items/start_lang_item_args.missing_all_args.stderr
@@ -7,6 +7,6 @@ LL | fn start<T>() -> isize {
= note: expected signature `fn(fn() -> T, isize, *const *const u8, u8) -> _`
found signature `fn() -> _`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/lang-items/start_lang_item_args.missing_ret.stderr b/tests/ui/lang-items/start_lang_item_args.missing_ret.stderr
index 14bfcc3d0..aa1b1b73b 100644
--- a/tests/ui/lang-items/start_lang_item_args.missing_ret.stderr
+++ b/tests/ui/lang-items/start_lang_item_args.missing_ret.stderr
@@ -7,6 +7,6 @@ LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8, _sigpi
= note: expected signature `fn(fn() -> _, _, _, _) -> isize`
found signature `fn(fn() -> _, _, _, _)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/lang-items/start_lang_item_args.missing_sigpipe_arg.stderr b/tests/ui/lang-items/start_lang_item_args.missing_sigpipe_arg.stderr
index f873f7614..98814dcd2 100644
--- a/tests/ui/lang-items/start_lang_item_args.missing_sigpipe_arg.stderr
+++ b/tests/ui/lang-items/start_lang_item_args.missing_sigpipe_arg.stderr
@@ -7,6 +7,6 @@ LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8) -> isi
= note: expected signature `fn(fn() -> T, isize, *const *const u8, u8) -> _`
found signature `fn(fn() -> T, isize, *const *const u8) -> _`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/lang-items/start_lang_item_args.sigpipe.stderr b/tests/ui/lang-items/start_lang_item_args.sigpipe.stderr
index 280d423bd..e0a8496db 100644
--- a/tests/ui/lang-items/start_lang_item_args.sigpipe.stderr
+++ b/tests/ui/lang-items/start_lang_item_args.sigpipe.stderr
@@ -7,6 +7,6 @@ LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8, _sigpi
= note: expected signature `fn(fn() -> _, _, _, u8) -> _`
found signature `fn(fn() -> _, _, _, i64) -> _`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/lang-items/start_lang_item_args.start_ret.stderr b/tests/ui/lang-items/start_lang_item_args.start_ret.stderr
index 4e4f8a5cd..4437b0fdc 100644
--- a/tests/ui/lang-items/start_lang_item_args.start_ret.stderr
+++ b/tests/ui/lang-items/start_lang_item_args.start_ret.stderr
@@ -7,6 +7,6 @@ LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8, _sigpi
= note: expected signature `fn(fn() -> _, _, _, _) -> isize`
found signature `fn(fn() -> _, _, _, _) -> u8`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/lang-items/start_lang_item_args.too_many_args.stderr b/tests/ui/lang-items/start_lang_item_args.too_many_args.stderr
index 085d4b1f2..8570d96fc 100644
--- a/tests/ui/lang-items/start_lang_item_args.too_many_args.stderr
+++ b/tests/ui/lang-items/start_lang_item_args.too_many_args.stderr
@@ -13,6 +13,6 @@ LL | | ) -> isize {
= note: expected signature `fn(fn() -> T, isize, *const *const u8, u8) -> _`
found signature `fn(fn() -> T, isize, *const *const u8, u8, ()) -> _`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/lang-items/start_lang_item_with_target_feature.stderr b/tests/ui/lang-items/start_lang_item_with_target_feature.stderr
index ff55a1365..bb0583dfd 100644
--- a/tests/ui/lang-items/start_lang_item_with_target_feature.stderr
+++ b/tests/ui/lang-items/start_lang_item_with_target_feature.stderr
@@ -7,5 +7,5 @@ LL |
LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8, _sigpipe: u8) -> isize {
| ------------------------------------------------------------------------------------------- `start` language item function is not allowed to have `#[target_feature]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/late-bound-lifetimes/issue-80618.stderr b/tests/ui/late-bound-lifetimes/issue-80618.stderr
index cf7423fc1..28ea61f38 100644
--- a/tests/ui/late-bound-lifetimes/issue-80618.stderr
+++ b/tests/ui/late-bound-lifetimes/issue-80618.stderr
@@ -10,6 +10,6 @@ note: the late bound lifetime parameter is introduced here
LL | fn foo<'a>(x: &'a str) -> &'a str {
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0794`.
diff --git a/tests/ui/late-bound-lifetimes/mismatched_arg_count.stderr b/tests/ui/late-bound-lifetimes/mismatched_arg_count.stderr
index de58a014e..1b8f1c3fd 100644
--- a/tests/ui/late-bound-lifetimes/mismatched_arg_count.stderr
+++ b/tests/ui/late-bound-lifetimes/mismatched_arg_count.stderr
@@ -12,6 +12,6 @@ note: type alias defined here, with 1 lifetime parameter: `'a`
LL | type Alias<'a, T> = <T as Trait<'a>>::Assoc;
| ^^^^^ --
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/layout/cannot-transmute-unnormalizable-type.stderr b/tests/ui/layout/cannot-transmute-unnormalizable-type.stderr
index ee2c5ab7e..d17564a1e 100644
--- a/tests/ui/layout/cannot-transmute-unnormalizable-type.stderr
+++ b/tests/ui/layout/cannot-transmute-unnormalizable-type.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `Missing` in this scope
LL | Missing: Trait,
| ^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/layout/malformed-unsized-type-in-union.stderr b/tests/ui/layout/malformed-unsized-type-in-union.stderr
index cbb8d6af3..ad4f0cda1 100644
--- a/tests/ui/layout/malformed-unsized-type-in-union.stderr
+++ b/tests/ui/layout/malformed-unsized-type-in-union.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `Missing` in this scope
LL | union W { s: dyn Iterator<Item = Missing> }
| ^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/layout/too-big-with-padding.stderr b/tests/ui/layout/too-big-with-padding.stderr
index 5cc854adc..71309788d 100644
--- a/tests/ui/layout/too-big-with-padding.stderr
+++ b/tests/ui/layout/too-big-with-padding.stderr
@@ -4,5 +4,5 @@ error: values of the type `Example` are too big for the current architecture
LL | pub fn lib(_x: Example) {}
| ^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/layout/transmute-to-tail-with-err.stderr b/tests/ui/layout/transmute-to-tail-with-err.stderr
index 97ab59c39..433c6b38d 100644
--- a/tests/ui/layout/transmute-to-tail-with-err.stderr
+++ b/tests/ui/layout/transmute-to-tail-with-err.stderr
@@ -9,6 +9,6 @@ help: you might be missing a type parameter
LL | struct Bar<T>(Box<dyn Trait<T>>);
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/lazy-type-alias-impl-trait/branches.stderr b/tests/ui/lazy-type-alias-impl-trait/branches.stderr
index 0b206f31e..9e9376227 100644
--- a/tests/ui/lazy-type-alias-impl-trait/branches.stderr
+++ b/tests/ui/lazy-type-alias-impl-trait/branches.stderr
@@ -8,6 +8,6 @@ LL | std::iter::empty().collect()
note: required by a bound in `collect`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/lazy-type-alias/coerce-behind-lazy.rs b/tests/ui/lazy-type-alias/coerce-behind-lazy.rs
index 745eadb96..ec9a67399 100644
--- a/tests/ui/lazy-type-alias/coerce-behind-lazy.rs
+++ b/tests/ui/lazy-type-alias/coerce-behind-lazy.rs
@@ -1,6 +1,6 @@
// check-pass
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
#![feature(lazy_type_alias)]
//~^ WARN the feature `lazy_type_alias` is incomplete
diff --git a/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.locally_eager.stderr b/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.locally_eager.stderr
index 3b216ac15..fdc5bae15 100644
--- a/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.locally_eager.stderr
+++ b/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.locally_eager.stderr
@@ -10,6 +10,6 @@ note: required by a bound in `lazy::Alias`
LL | pub type Alias<T: Copy> = Option<T>;
| ^^^^ required by this bound in `Alias`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.locally_lazy.stderr b/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.locally_lazy.stderr
index 3b216ac15..fdc5bae15 100644
--- a/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.locally_lazy.stderr
+++ b/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.locally_lazy.stderr
@@ -10,6 +10,6 @@ note: required by a bound in `lazy::Alias`
LL | pub type Alias<T: Copy> = Option<T>;
| ^^^^ required by this bound in `Alias`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/lazy-type-alias/leading-where-clause.stderr b/tests/ui/lazy-type-alias/leading-where-clause.stderr
index 8ddf0ce6c..6b0613787 100644
--- a/tests/ui/lazy-type-alias/leading-where-clause.stderr
+++ b/tests/ui/lazy-type-alias/leading-where-clause.stderr
@@ -12,5 +12,5 @@ LL +
LL ~ = T where String: From<T>;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lazy-type-alias/trailing-where-clause.stderr b/tests/ui/lazy-type-alias/trailing-where-clause.stderr
index 193f80b23..baf4215bb 100644
--- a/tests/ui/lazy-type-alias/trailing-where-clause.stderr
+++ b/tests/ui/lazy-type-alias/trailing-where-clause.stderr
@@ -20,6 +20,6 @@ LL | where
LL | String: From<T>;
| ^^^^^^^ required by this bound in `Alias`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/lazy-type-alias/unsatisfied-bounds-type-alias-body.stderr b/tests/ui/lazy-type-alias/unsatisfied-bounds-type-alias-body.stderr
index d022f8251..bd8095224 100644
--- a/tests/ui/lazy-type-alias/unsatisfied-bounds-type-alias-body.stderr
+++ b/tests/ui/lazy-type-alias/unsatisfied-bounds-type-alias-body.stderr
@@ -9,6 +9,6 @@ help: consider restricting type parameter `T`
LL | type Alias<T: std::ops::Mul> = <T as std::ops::Mul>::Output;
| +++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/let-else/accidental-if.stderr b/tests/ui/let-else/accidental-if.stderr
index 57e525917..12948e956 100644
--- a/tests/ui/let-else/accidental-if.stderr
+++ b/tests/ui/let-else/accidental-if.stderr
@@ -15,5 +15,5 @@ LL - if let Some(y) = x else {
LL + let Some(y) = x else {
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/let-else/issue-94176.stderr b/tests/ui/let-else/issue-94176.stderr
index 6a015aced..1ff5000e7 100644
--- a/tests/ui/let-else/issue-94176.stderr
+++ b/tests/ui/let-else/issue-94176.stderr
@@ -14,6 +14,6 @@ LL ~ println!("Foo");
LL + a
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/let-else/let-else-allow-unused.stderr b/tests/ui/let-else/let-else-allow-unused.stderr
index 05b8a9169..2cad1be8c 100644
--- a/tests/ui/let-else/let-else-allow-unused.stderr
+++ b/tests/ui/let-else/let-else-allow-unused.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #[deny(unused_variables)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/let-else/let-else-binding-explicit-mut-annotated.stderr b/tests/ui/let-else/let-else-binding-explicit-mut-annotated.stderr
index 065787cab..1d4133503 100644
--- a/tests/ui/let-else/let-else-binding-explicit-mut-annotated.stderr
+++ b/tests/ui/let-else/let-else-binding-explicit-mut-annotated.stderr
@@ -6,8 +6,8 @@ LL | let Some(n): &mut Option<i32> = &&Some(5i32) else { return };
| |
| expected due to this
|
- = note: expected mutable reference `&mut Option<i32>`
- found reference `&&Option<i32>`
+ = note: expected mutable reference `&mut Option<_>`
+ found reference `&&Option<_>`
error[E0308]: mismatched types
--> $DIR/let-else-binding-explicit-mut-annotated.rs:13:37
@@ -17,8 +17,8 @@ LL | let Some(n): &mut Option<i32> = &&mut Some(5i32) else { return };
| |
| expected due to this
|
- = note: expected mutable reference `&mut Option<i32>`
- found reference `&&mut Option<i32>`
+ = note: expected mutable reference `&mut Option<_>`
+ found reference `&&mut Option<_>`
error: aborting due to 2 previous errors
diff --git a/tests/ui/let-else/let-else-binding-explicit-mut-borrow.stderr b/tests/ui/let-else/let-else-binding-explicit-mut-borrow.stderr
index 023fab8fe..e4d6534c5 100644
--- a/tests/ui/let-else/let-else-binding-explicit-mut-borrow.stderr
+++ b/tests/ui/let-else/let-else-binding-explicit-mut-borrow.stderr
@@ -4,6 +4,6 @@ error[E0596]: cannot borrow data in a `&` reference as mutable
LL | let Some(n): &mut Option<i32> = &mut &Some(5i32) else {
| ^^^^^^^^^^^^^^^^ cannot borrow as mutable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/let-else/let-else-binding-immutable.stderr b/tests/ui/let-else/let-else-binding-immutable.stderr
index dd1365a9e..0f854493b 100644
--- a/tests/ui/let-else/let-else-binding-immutable.stderr
+++ b/tests/ui/let-else/let-else-binding-immutable.stderr
@@ -4,6 +4,6 @@ error[E0594]: cannot assign to `*x`, which is behind a `&` reference
LL | *x += 1;
| ^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/let-else/let-else-if.stderr b/tests/ui/let-else/let-else-if.stderr
index c63fd61c5..c8058ec66 100644
--- a/tests/ui/let-else/let-else-if.stderr
+++ b/tests/ui/let-else/let-else-if.stderr
@@ -13,5 +13,5 @@ LL | return;
LL ~ } };
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/let-else/let-else-no-double-error.stderr b/tests/ui/let-else/let-else-no-double-error.stderr
index 941e588b1..05668a231 100644
--- a/tests/ui/let-else/let-else-no-double-error.stderr
+++ b/tests/ui/let-else/let-else-no-double-error.stderr
@@ -4,6 +4,6 @@ error[E0599]: no associated item named `XXX` found for type `u32` in the current
LL | let u32::XXX = foo else { return };
| ^^^ associated item not found in `u32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/let-else/let-else-scope.stderr b/tests/ui/let-else/let-else-scope.stderr
index 3b4f09829..335ee3dfb 100644
--- a/tests/ui/let-else/let-else-scope.stderr
+++ b/tests/ui/let-else/let-else-scope.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `x` in this scope
LL | panic!("{}", x);
| ^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/let-else/let-else-slicing-error.stderr b/tests/ui/let-else/let-else-slicing-error.stderr
index 064025e03..73c357dd5 100644
--- a/tests/ui/let-else/let-else-slicing-error.stderr
+++ b/tests/ui/let-else/let-else-slicing-error.stderr
@@ -6,6 +6,6 @@ LL | let [x, y] = nums else {
| |
| pattern cannot match with input type `Vec<{integer}>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0529`.
diff --git a/tests/ui/let-else/let-else-then-diverge.stderr b/tests/ui/let-else/let-else-then-diverge.stderr
index 470a11d47..eda0025af 100644
--- a/tests/ui/let-else/let-else-then-diverge.stderr
+++ b/tests/ui/let-else/let-else-then-diverge.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(unused_variables)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lexer/lex-bad-char-literals-2.stderr b/tests/ui/lexer/lex-bad-char-literals-2.stderr
index c2b19a7ad..1518a37ab 100644
--- a/tests/ui/lexer/lex-bad-char-literals-2.stderr
+++ b/tests/ui/lexer/lex-bad-char-literals-2.stderr
@@ -9,5 +9,5 @@ help: if you meant to write a `str` literal, use double quotes
LL | "nope"
| ~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lexer/lex-bad-char-literals-4.stderr b/tests/ui/lexer/lex-bad-char-literals-4.stderr
index fec4421c4..1a1dd85e6 100644
--- a/tests/ui/lexer/lex-bad-char-literals-4.stderr
+++ b/tests/ui/lexer/lex-bad-char-literals-4.stderr
@@ -4,6 +4,6 @@ error[E0762]: unterminated character literal
LL | '●
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0762`.
diff --git a/tests/ui/lexer/lex-bad-token.stderr b/tests/ui/lexer/lex-bad-token.stderr
index 43c43721b..6ce309ca2 100644
--- a/tests/ui/lexer/lex-bad-token.stderr
+++ b/tests/ui/lexer/lex-bad-token.stderr
@@ -4,5 +4,5 @@ error: unknown start of token: \u{25cf}
LL | ●
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lexer/lex-stray-backslash.stderr b/tests/ui/lexer/lex-stray-backslash.stderr
index 06dc0f2b5..6173a4b1d 100644
--- a/tests/ui/lexer/lex-stray-backslash.stderr
+++ b/tests/ui/lexer/lex-stray-backslash.stderr
@@ -4,5 +4,5 @@ error: unknown start of token: \
LL | \
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lexer/unterminated-comment.stderr b/tests/ui/lexer/unterminated-comment.stderr
index c513fafee..ea65bffd1 100644
--- a/tests/ui/lexer/unterminated-comment.stderr
+++ b/tests/ui/lexer/unterminated-comment.stderr
@@ -4,6 +4,6 @@ error[E0758]: unterminated block comment
LL | /*
| ^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0758`.
diff --git a/tests/ui/lexer/unterminated-nested-comment.stderr b/tests/ui/lexer/unterminated-nested-comment.stderr
index 3653e76c9..9117b689c 100644
--- a/tests/ui/lexer/unterminated-nested-comment.stderr
+++ b/tests/ui/lexer/unterminated-nested-comment.stderr
@@ -16,6 +16,6 @@ LL | | */
| |
| ...and last nested comment terminates here.
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0758`.
diff --git a/tests/ui/lifetimes/borrowck-let-suggestion.stderr b/tests/ui/lifetimes/borrowck-let-suggestion.stderr
index 621196647..cca7f5295 100644
--- a/tests/ui/lifetimes/borrowck-let-suggestion.stderr
+++ b/tests/ui/lifetimes/borrowck-let-suggestion.stderr
@@ -20,6 +20,6 @@ LL ~ let binding = vec![1];
LL ~ let mut x = binding.iter();
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/lifetimes/conflicting-bounds.stderr b/tests/ui/lifetimes/conflicting-bounds.stderr
index 42aa39366..cd66eb5e3 100644
--- a/tests/ui/lifetimes/conflicting-bounds.stderr
+++ b/tests/ui/lifetimes/conflicting-bounds.stderr
@@ -9,6 +9,6 @@ LL | pub trait Gen<'source> {
LL | Self: for<'s> Gen<'s, Output = T>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/lifetimes/copy_modulo_regions.stderr b/tests/ui/lifetimes/copy_modulo_regions.stderr
index 87dbb64ab..310ddb216 100644
--- a/tests/ui/lifetimes/copy_modulo_regions.stderr
+++ b/tests/ui/lifetimes/copy_modulo_regions.stderr
@@ -10,5 +10,5 @@ LL | [mk_foo::<'a>(); 100]
= note: the struct `Foo<'a>` is invariant over the parameter `'a`
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.stderr b/tests/ui/lifetimes/issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.stderr
index 808d8bb90..24bb9e2ef 100644
--- a/tests/ui/lifetimes/issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.stderr
+++ b/tests/ui/lifetimes/issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.stderr
@@ -11,5 +11,5 @@ help: to declare that the trait object captures data from argument `self`, you c
LL | type BoxedGreeter<'a> = (Box<dyn Greeter0 + 'a>, Box<dyn Greeter1 + 'a>);
| ++++ ++++ ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/issue-105675.stderr b/tests/ui/lifetimes/issue-105675.stderr
index 54ecd35ed..f1fa5a598 100644
--- a/tests/ui/lifetimes/issue-105675.stderr
+++ b/tests/ui/lifetimes/issue-105675.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
LL | thing(f);
| ^^^^^^^^ one type is more general than the other
|
- = note: expected trait `for<'a, 'b> FnOnce<(&'a u32, &'b u32, u32)>`
- found trait `for<'a> FnOnce<(&u32, &'a u32, u32)>`
+ = note: expected trait `for<'a, 'b> FnOnce(&'a u32, &'b u32, u32)`
+ found trait `for<'a> FnOnce(&u32, &'a u32, u32)`
note: this closure does not fulfill the lifetime requirements
--> $DIR/issue-105675.rs:4:13
|
@@ -27,8 +27,8 @@ error[E0308]: mismatched types
LL | thing(f);
| ^^^^^^^^ one type is more general than the other
|
- = note: expected trait `for<'a, 'b> FnOnce<(&'a u32, &'b u32, u32)>`
- found trait `for<'a> FnOnce<(&u32, &'a u32, u32)>`
+ = note: expected trait `for<'a, 'b> FnOnce(&'a u32, &'b u32, u32)`
+ found trait `for<'a> FnOnce(&u32, &'a u32, u32)`
note: this closure does not fulfill the lifetime requirements
--> $DIR/issue-105675.rs:4:13
|
@@ -46,8 +46,8 @@ error[E0308]: mismatched types
LL | thing(f);
| ^^^^^^^^ one type is more general than the other
|
- = note: expected trait `for<'a, 'b> FnOnce<(&'a u32, &'b u32, u32)>`
- found trait `FnOnce<(&u32, &u32, u32)>`
+ = note: expected trait `for<'a, 'b> FnOnce(&'a u32, &'b u32, u32)`
+ found trait `FnOnce(&u32, &u32, u32)`
note: this closure does not fulfill the lifetime requirements
--> $DIR/issue-105675.rs:8:13
|
@@ -69,8 +69,8 @@ error[E0308]: mismatched types
LL | thing(f);
| ^^^^^^^^ one type is more general than the other
|
- = note: expected trait `for<'a, 'b> FnOnce<(&'a u32, &'b u32, u32)>`
- found trait `FnOnce<(&u32, &u32, u32)>`
+ = note: expected trait `for<'a, 'b> FnOnce(&'a u32, &'b u32, u32)`
+ found trait `FnOnce(&u32, &u32, u32)`
note: this closure does not fulfill the lifetime requirements
--> $DIR/issue-105675.rs:8:13
|
diff --git a/tests/ui/lifetimes/issue-107492-default-value-for-lifetime.stderr b/tests/ui/lifetimes/issue-107492-default-value-for-lifetime.stderr
index c235c3180..9bc2263ab 100644
--- a/tests/ui/lifetimes/issue-107492-default-value-for-lifetime.stderr
+++ b/tests/ui/lifetimes/issue-107492-default-value-for-lifetime.stderr
@@ -4,5 +4,5 @@ error: unexpected default lifetime parameter
LL | pub struct DefaultLifetime<'a, 'b = 'static> {
| ^^^^^^^^^ lifetime parameters cannot have default values
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/issue-17728.stderr b/tests/ui/lifetimes/issue-17728.stderr
index 535073d6e..fb1c7cf7a 100644
--- a/tests/ui/lifetimes/issue-17728.stderr
+++ b/tests/ui/lifetimes/issue-17728.stderr
@@ -16,6 +16,6 @@ LL | | }
= note: expected enum `RoomDirection`
found enum `Option<_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/lifetimes/issue-26638.stderr b/tests/ui/lifetimes/issue-26638.stderr
index e61158a5d..ee9586862 100644
--- a/tests/ui/lifetimes/issue-26638.stderr
+++ b/tests/ui/lifetimes/issue-26638.stderr
@@ -17,10 +17,18 @@ LL | fn parse_type_2(iter: fn(&u8)->&u8) -> &str { iter() }
| ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
LL | fn parse_type_2(iter: fn(&u8)->&u8) -> &'static str { iter() }
| +++++++
+help: instead, you are more likely to want to change the argument to be borrowed...
+ |
+LL | fn parse_type_2(iter: &fn(&u8)->&u8) -> &str { iter() }
+ | +
+help: ...or alternatively, you might want to return an owned value
+ |
+LL | fn parse_type_2(iter: fn(&u8)->&u8) -> String { iter() }
+ | ~~~~~~
error[E0106]: missing lifetime specifier
--> $DIR/issue-26638.rs:10:22
@@ -29,10 +37,14 @@ LL | fn parse_type_3() -> &str { unimplemented!() }
| ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
LL | fn parse_type_3() -> &'static str { unimplemented!() }
| +++++++
+help: instead, you are more likely to want to return an owned value
+ |
+LL | fn parse_type_3() -> String { unimplemented!() }
+ | ~~~~~~
error[E0308]: mismatched types
--> $DIR/issue-26638.rs:1:69
diff --git a/tests/ui/lifetimes/issue-34979.stderr b/tests/ui/lifetimes/issue-34979.stderr
index 3d4208031..0877f1548 100644
--- a/tests/ui/lifetimes/issue-34979.stderr
+++ b/tests/ui/lifetimes/issue-34979.stderr
@@ -15,6 +15,6 @@ LL | &'a (): Foo,
LL | &'static (): Foo;
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/lifetimes/issue-64173-unused-lifetimes.stderr b/tests/ui/lifetimes/issue-64173-unused-lifetimes.stderr
index 02ca10b2e..ec4aea623 100644
--- a/tests/ui/lifetimes/issue-64173-unused-lifetimes.stderr
+++ b/tests/ui/lifetimes/issue-64173-unused-lifetimes.stderr
@@ -5,7 +5,7 @@ LL | beta: [(); foo::<&'a ()>()],
| ^^ cannot perform const operation using `'a`
|
= note: lifetime parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic `Self` types are currently not permitted in anonymous constants
--> $DIR/issue-64173-unused-lifetimes.rs:4:28
diff --git a/tests/ui/lifetimes/issue-79187-2.stderr b/tests/ui/lifetimes/issue-79187-2.stderr
index 75fd87b3f..e8115bb6b 100644
--- a/tests/ui/lifetimes/issue-79187-2.stderr
+++ b/tests/ui/lifetimes/issue-79187-2.stderr
@@ -31,8 +31,8 @@ error[E0308]: mismatched types
LL | take_foo(|a| a);
| ^^^^^^^^^^^^^^^ one type is more general than the other
|
- = note: expected trait `for<'a> Fn<(&'a i32,)>`
- found trait `Fn<(&i32,)>`
+ = note: expected trait `for<'a> Fn(&'a i32)`
+ found trait `Fn(&i32)`
note: this closure does not fulfill the lifetime requirements
--> $DIR/issue-79187-2.rs:8:14
|
@@ -54,8 +54,8 @@ error[E0308]: mismatched types
LL | take_foo(|a: &i32| a);
| ^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
|
- = note: expected reference `&i32`
- found reference `&i32`
+ = note: expected reference `&_`
+ found reference `&_`
note: the lifetime requirement is introduced here
--> $DIR/issue-79187-2.rs:5:21
|
@@ -68,8 +68,8 @@ error[E0308]: mismatched types
LL | take_foo(|a: &i32| -> &i32 { a });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
|
- = note: expected reference `&i32`
- found reference `&i32`
+ = note: expected reference `&_`
+ found reference `&_`
note: the lifetime requirement is introduced here
--> $DIR/issue-79187-2.rs:5:21
|
diff --git a/tests/ui/lifetimes/issue-79187.stderr b/tests/ui/lifetimes/issue-79187.stderr
index 209f2b7b7..14bdfe75c 100644
--- a/tests/ui/lifetimes/issue-79187.stderr
+++ b/tests/ui/lifetimes/issue-79187.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
LL | thing(f);
| ^^^^^^^^ one type is more general than the other
|
- = note: expected trait `for<'a> FnOnce<(&'a u32,)>`
- found trait `FnOnce<(&u32,)>`
+ = note: expected trait `for<'a> FnOnce(&'a u32)`
+ found trait `FnOnce(&u32)`
note: this closure does not fulfill the lifetime requirements
--> $DIR/issue-79187.rs:4:13
|
diff --git a/tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.stderr b/tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.stderr
index f7bdee633..d99ea6a0c 100644
--- a/tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.stderr
+++ b/tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.stderr
@@ -4,6 +4,6 @@ error[E0229]: associated type bindings are not allowed here
LL | fn bar(foo: Foo<Target = usize>) {}
| ^^^^^^^^^^^^^^ associated type not allowed here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0229`.
diff --git a/tests/ui/lifetimes/issue-91763.stderr b/tests/ui/lifetimes/issue-91763.stderr
index 6ccf008c0..f7293ed80 100644
--- a/tests/ui/lifetimes/issue-91763.stderr
+++ b/tests/ui/lifetimes/issue-91763.stderr
@@ -14,5 +14,5 @@ help: indicate the anonymous lifetime
LL | fn f() -> Ptr<Thing><'_>;
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr b/tests/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr
index 5eee953ef..23ef36888 100644
--- a/tests/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr
+++ b/tests/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr
@@ -5,10 +5,15 @@ LL | fn f() -> &isize {
| ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
LL | fn f() -> &'static isize {
| +++++++
+help: instead, you are more likely to want to return an owned value
+ |
+LL - fn f() -> &isize {
+LL + fn f() -> isize {
+ |
error[E0106]: missing lifetime specifier
--> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:7:33
@@ -41,10 +46,19 @@ LL | fn i(_x: isize) -> &isize {
| ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
LL | fn i(_x: isize) -> &'static isize {
| +++++++
+help: instead, you are more likely to want to change the argument to be borrowed...
+ |
+LL | fn i(_x: &isize) -> &isize {
+ | +
+help: ...or alternatively, you might want to return an owned value
+ |
+LL - fn i(_x: isize) -> &isize {
+LL + fn i(_x: isize) -> isize {
+ |
error[E0106]: missing lifetime specifier
--> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:34:24
@@ -53,10 +67,19 @@ LL | fn j(_x: StaticStr) -> &isize {
| ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
LL | fn j(_x: StaticStr) -> &'static isize {
| +++++++
+help: instead, you are more likely to want to change the argument to be borrowed...
+ |
+LL | fn j(_x: &StaticStr) -> &isize {
+ | +
+help: ...or alternatively, you might want to return an owned value
+ |
+LL - fn j(_x: StaticStr) -> &isize {
+LL + fn j(_x: StaticStr) -> isize {
+ |
error[E0106]: missing lifetime specifier
--> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:40:49
diff --git a/tests/ui/lifetimes/lifetime-elision-return-type-trait.stderr b/tests/ui/lifetimes/lifetime-elision-return-type-trait.stderr
index 421ab3fcf..1664466df 100644
--- a/tests/ui/lifetimes/lifetime-elision-return-type-trait.stderr
+++ b/tests/ui/lifetimes/lifetime-elision-return-type-trait.stderr
@@ -10,6 +10,6 @@ help: this trait has no implementations, consider adding one
LL | trait Future {
| ^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.stderr b/tests/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.stderr
index 63d00875d..af22078af 100644
--- a/tests/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.stderr
@@ -7,6 +7,6 @@ LL | fn foo2<'a>(a: &'a Foo, x: &i32) -> &'a i32 {
LL | &*x
| ^^^ lifetime `'a` required
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0621`.
diff --git a/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr
index 64aa8361c..e202c3121 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr
@@ -7,6 +7,6 @@ LL | fn bar(&self, other: Foo) -> Foo<'a> {
LL | other
| ^^^^^ lifetime `'a` required
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0621`.
diff --git a/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr
index b40481ecd..5518ded01 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr
@@ -6,6 +6,6 @@ LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 {
LL | if x > y { x } else { y }
| ^ lifetime `'a` required
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0621`.
diff --git a/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr
index 194fd9589..c689fa988 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr
@@ -6,6 +6,6 @@ LL | fn foo<'a>((x, y): (&'a i32, &i32)) -> &'a i32 {
LL | if x > y { x } else { y }
| ^ lifetime `'a` required
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0621`.
diff --git a/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr
index 64f4bd0fc..3da50cfbb 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr
@@ -6,6 +6,6 @@ LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 {
LL | if x > y { x } else { y }
| ^ lifetime `'a` required
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0621`.
diff --git a/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr
index 961f9de66..6dda9e61a 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr
@@ -7,6 +7,6 @@ LL |
LL | if true { &self.field } else { x }
| ^ lifetime `'a` required
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0621`.
diff --git a/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr
index 5bb763813..5827b2fe6 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr
@@ -9,5 +9,5 @@ LL |
LL | if x > y { x } else { y }
| ^ associated function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.stderr b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.stderr
index 29a706957..1df0776a5 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.stderr
@@ -6,6 +6,6 @@ LL | fn foo<'a>(x: &'a i32, y: &i32) -> &'a i32 {
LL | if x > y { x } else { y }
| ^ lifetime `'a` required
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0621`.
diff --git a/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr
index 6fd7f67d1..da454b8fd 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr
@@ -9,5 +9,5 @@ LL |
LL | x
| ^ method was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr
index 2687266e0..a1dfff883 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr
@@ -9,5 +9,5 @@ LL |
LL | if true { x } else { self }
| ^^^^ method was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr b/tests/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr
index bcc3e9510..62b0a8a04 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr
@@ -10,6 +10,6 @@ help: consider introducing a named lifetime parameter
LL | fn foo<'a>(x: &'a i32, y: &'a i32) -> &'a i32 {
| ++++ ++ ++ ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0106`.
diff --git a/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.stderr b/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.stderr
index 90d4754eb..25a2f4b96 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.stderr
@@ -6,6 +6,6 @@ LL | fn foo<'a>(x: Ref<i32>, y: &mut Vec<Ref<'a, i32>>) {
LL | y.push(x);
| ^^^^^^^^^ lifetime `'a` required
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0621`.
diff --git a/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr b/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr
index a03e16b3b..e2725977d 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr
@@ -7,6 +7,6 @@ LL | fn baz<'a, 'b, T>(x: &mut Vec<&'a T>, y: &T)
LL | x.push(y);
| ^^^^^^^^^ lifetime `'a` required
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0621`.
diff --git a/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.stderr b/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.stderr
index 487b34e3d..1025581d5 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.stderr
@@ -6,6 +6,6 @@ LL | fn foo<'a>(x: &mut Vec<Ref<'a, i32>>, y: Ref<i32>) {
LL | x.push(y);
| ^^^^^^^^^ lifetime `'a` required
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0621`.
diff --git a/tests/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.stderr b/tests/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.stderr
index 1622ce422..df1d03d51 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.stderr
@@ -8,5 +8,5 @@ LL | fn foo(x: &mut Vec<Ref<i32>>, y: Ref<i32>) {
LL | x.push(y);
| ^^^^^^^^^ argument requires that `'1` must outlive `'2`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr b/tests/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr
index 99fab4631..cace80272 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr
@@ -11,5 +11,5 @@ LL | x.push(z);
|
= help: consider adding the following bound: `'c: 'b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.stderr b/tests/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.stderr
index 52c5752f6..4a981e4de 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.stderr
@@ -11,5 +11,5 @@ LL | a.push(b);
|
= help: consider adding the following bound: `'c: 'b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.stderr b/tests/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.stderr
index e90c81ee3..2bd047113 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.stderr
@@ -11,5 +11,5 @@ LL | Vec::push(a, b);
|
= help: consider adding the following bound: `'c: 'b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.stderr
index 5a23f1e0e..30083b5ef 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.stderr
@@ -13,5 +13,5 @@ help: consider introducing a named lifetime parameter
LL | fn foo<'a>(&mut (ref mut v, w): &mut (&'a u8, &u8), x: &'a u8) {
| ++++ ++ ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr
index 4c0ffe5c0..4f1cb1e79 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr
@@ -8,5 +8,5 @@ LL | fn foo(mut x: Ref, y: Ref) {
LL | x.b = y.b;
| ^^^^^^^^^ assignment requires that `'1` must outlive `'2`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr
index 97c665347..3a1947973 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr
@@ -9,5 +9,5 @@ LL | fn foo(mut x: Ref) {
LL | x.a = x.b;
| ^^^^^^^^^ assignment requires that `'1` must outlive `'2`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr
index b3d0bc2b8..352619c0f 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr
@@ -11,5 +11,5 @@ LL | x.push(y);
|
= help: consider adding the following bound: `'b: 'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr
index fbe98a426..16cf009ee 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr
@@ -10,5 +10,5 @@ LL | x.push(y);
|
= help: consider adding the following bound: `'b: 'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr
index 9630729d0..c778f7736 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr
@@ -8,5 +8,5 @@ LL | fn foo(mut x: Vec<Ref>, y: Ref) {
LL | x.push(y);
| ^^^^^^^^^ argument requires that `'1` must outlive `'2`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr
index 1e24032fc..080eb43ce 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr
@@ -10,5 +10,5 @@ LL | x.push(y);
|
= help: consider adding the following bound: `'b: 'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr
index 79e7e8e15..60ca41684 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr
@@ -8,5 +8,5 @@ LL | fn foo(mut y: Ref, x: &u32) {
LL | y.b = x;
| ^^^^^^^ assignment requires that `'1` must outlive `'2`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr
index 53615fd1a..98e490c38 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr
@@ -8,5 +8,5 @@ LL | fn foo(mut y: Ref, x: &u32) {
LL | y.b = x;
| ^^^^^^^ assignment requires that `'1` must outlive `'2`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr
index 6ff441167..ea1cc1f18 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr
@@ -8,5 +8,5 @@ LL | fn foo(mut x: Ref, y: &u32) {
LL | x.b = y;
| ^^^^^^^ assignment requires that `'1` must outlive `'2`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr
index 9ff5e42d7..e934ce7c0 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr
@@ -13,5 +13,5 @@ help: consider introducing a named lifetime parameter and update trait if needed
LL | fn foo<'a>(&'a self, x: &'a i32) -> &i32 {
| ++ ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr
index e4c855e11..dde271d10 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr
@@ -13,5 +13,5 @@ help: consider introducing a named lifetime parameter and update trait if needed
LL | fn foo<'a>(&'a self, x: &'a Foo) -> &Foo {
| ++ ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr
index 9661f1e51..420cfa6b5 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr
@@ -13,5 +13,5 @@ help: consider introducing a named lifetime parameter and update trait if needed
LL | fn foo<'a>(x: &mut Vec<&'a u8>, y: &'a u8) {
| ++++ ++ ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.stderr
index ec9fac0c2..875d22576 100644
--- a/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.stderr
@@ -13,5 +13,5 @@ help: consider introducing a named lifetime parameter
LL | fn foo<'a>(x: &mut Vec<&'a u8>, y: &'a u8) {
| ++++ ++ ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/lifetime-errors/issue_74400.stderr b/tests/ui/lifetimes/lifetime-errors/issue_74400.stderr
index dbc587dd0..677f918fe 100644
--- a/tests/ui/lifetimes/lifetime-errors/issue_74400.stderr
+++ b/tests/ui/lifetimes/lifetime-errors/issue_74400.stderr
@@ -18,8 +18,8 @@ error[E0308]: mismatched types
LL | f(data, identity)
| ^^^^^^^^^^^^^^^^^ one type is more general than the other
|
- = note: expected trait `for<'a> Fn<(&'a T,)>`
- found trait `Fn<(&T,)>`
+ = note: expected trait `for<'a> Fn(&'a T)`
+ found trait `Fn(&T)`
note: the lifetime requirement is introduced here
--> $DIR/issue_74400.rs:8:34
|
diff --git a/tests/ui/lifetimes/lifetime-mismatch-between-trait-and-impl.stderr b/tests/ui/lifetimes/lifetime-mismatch-between-trait-and-impl.stderr
index 9c61d5a0c..917d20436 100644
--- a/tests/ui/lifetimes/lifetime-mismatch-between-trait-and-impl.stderr
+++ b/tests/ui/lifetimes/lifetime-mismatch-between-trait-and-impl.stderr
@@ -12,5 +12,5 @@ LL | fn foo<'a>(x: &'a i32, y: &'a i32) -> &'a i32 {
= help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
= help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/nested-binder-print.stderr b/tests/ui/lifetimes/nested-binder-print.stderr
index 32dd89693..fb93b7855 100644
--- a/tests/ui/lifetimes/nested-binder-print.stderr
+++ b/tests/ui/lifetimes/nested-binder-print.stderr
@@ -9,6 +9,6 @@ LL | let x: u32 = y;
= note: expected type `u32`
found fn pointer `for<'a> fn(for<'b> fn(TwoLt<'b, 'a>))`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/lifetimes/re-empty-in-error.stderr b/tests/ui/lifetimes/re-empty-in-error.stderr
index c35d8ecec..554bcb545 100644
--- a/tests/ui/lifetimes/re-empty-in-error.stderr
+++ b/tests/ui/lifetimes/re-empty-in-error.stderr
@@ -6,5 +6,5 @@ LL | foo(&10);
|
= note: could not prove `for<'b> &'b (): 'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.stderr b/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.stderr
index 79df2c8df..a491de8ac 100644
--- a/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.stderr
+++ b/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.stderr
@@ -11,6 +11,6 @@ help: consider adding an explicit lifetime bound
LL | fn no_restriction<'a, T: 'a>(x: &'a ()) -> &'a () {
| +++ ++++ ++ ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0311`.
diff --git a/tests/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.stderr b/tests/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.stderr
index 439904509..3f457da1b 100644
--- a/tests/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.stderr
+++ b/tests/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.stderr
@@ -16,6 +16,6 @@ help: to force the closure to take ownership of `a` (and any other referenced va
LL | [0].iter().flat_map(|a| [0].iter().map(move |_| &a));
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0373`.
diff --git a/tests/ui/limits/huge-array-simple-32.stderr b/tests/ui/limits/huge-array-simple-32.stderr
index d1e4e6295..1b86b0229 100644
--- a/tests/ui/limits/huge-array-simple-32.stderr
+++ b/tests/ui/limits/huge-array-simple-32.stderr
@@ -4,5 +4,5 @@ error: values of the type `[u8; 2147516416]` are too big for the current archite
LL | let _fat: [u8; (1<<31)+(1<<15)] =
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/limits/huge-array-simple-64.stderr b/tests/ui/limits/huge-array-simple-64.stderr
index 5791b6439..8d395c3c6 100644
--- a/tests/ui/limits/huge-array-simple-64.stderr
+++ b/tests/ui/limits/huge-array-simple-64.stderr
@@ -4,5 +4,5 @@ error: values of the type `[u8; 2305843011361177600]` are too big for the curren
LL | let _fat: [u8; (1<<61)+(1<<31)] =
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/limits/huge-array.stderr b/tests/ui/limits/huge-array.stderr
index 24adb33b0..2ebaf17a1 100644
--- a/tests/ui/limits/huge-array.stderr
+++ b/tests/ui/limits/huge-array.stderr
@@ -4,5 +4,5 @@ error: values of the type `[[u8; 1518599999]; 1518600000]` are too big for the c
LL | let s: [T; 1518600000] = [t; 1518600000];
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/limits/huge-enum.stderr b/tests/ui/limits/huge-enum.stderr
index 5e2bda9be..fcd40607a 100644
--- a/tests/ui/limits/huge-enum.stderr
+++ b/tests/ui/limits/huge-enum.stderr
@@ -4,5 +4,5 @@ error: values of the type `Option<TYPE>` are too big for the current architectur
LL | let big: BIG = None;
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/limits/huge-struct.stderr b/tests/ui/limits/huge-struct.stderr
index ce14bc5b8..782db20c7 100644
--- a/tests/ui/limits/huge-struct.stderr
+++ b/tests/ui/limits/huge-struct.stderr
@@ -4,5 +4,5 @@ error: values of the type `SXX<SXX<SXX<u32>>>` are too big for the current archi
LL | let fat: Option<SXX<SXX<SXX<u32>>>> = None;
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/limits/issue-15919-32.stderr b/tests/ui/limits/issue-15919-32.stderr
index f9e48a52c..abd65ff3c 100644
--- a/tests/ui/limits/issue-15919-32.stderr
+++ b/tests/ui/limits/issue-15919-32.stderr
@@ -4,5 +4,5 @@ error: values of the type `[usize; usize::MAX]` are too big for the current arch
LL | let x = [0usize; 0xffff_ffff];
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/limits/issue-15919-64.stderr b/tests/ui/limits/issue-15919-64.stderr
index 167272890..d1f0cc39c 100644
--- a/tests/ui/limits/issue-15919-64.stderr
+++ b/tests/ui/limits/issue-15919-64.stderr
@@ -4,5 +4,5 @@ error: values of the type `[usize; usize::MAX]` are too big for the current arch
LL | let x = [0usize; 0xffff_ffff_ffff_ffff];
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/limits/issue-17913.stderr b/tests/ui/limits/issue-17913.stderr
index 0d21a4288..893730cbb 100644
--- a/tests/ui/limits/issue-17913.stderr
+++ b/tests/ui/limits/issue-17913.stderr
@@ -1,5 +1,5 @@
error: values of the type `[&usize; usize::MAX]` are too big for the current architecture
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/limits/issue-55878.stderr b/tests/ui/limits/issue-55878.stderr
index 6b463930b..97ca0f4fb 100644
--- a/tests/ui/limits/issue-55878.stderr
+++ b/tests/ui/limits/issue-55878.stderr
@@ -28,6 +28,6 @@ LL | println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>());
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
= note: this note originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/limits/issue-69485-var-size-diffs-too-large.stderr b/tests/ui/limits/issue-69485-var-size-diffs-too-large.stderr
index 44b2be269..7b9b8f76d 100644
--- a/tests/ui/limits/issue-69485-var-size-diffs-too-large.stderr
+++ b/tests/ui/limits/issue-69485-var-size-diffs-too-large.stderr
@@ -4,5 +4,5 @@ error: values of the type `[u8; usize::MAX]` are too big for the current archite
LL | Bug::V([0; !0]);
| ^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/limits/issue-75158-64.stderr b/tests/ui/limits/issue-75158-64.stderr
index d5991bcf5..06aad9616 100644
--- a/tests/ui/limits/issue-75158-64.stderr
+++ b/tests/ui/limits/issue-75158-64.stderr
@@ -1,4 +1,4 @@
error: values of the type `[u8; usize::MAX]` are too big for the current architecture
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/linkage-attr/incompatible-flavor.stderr b/tests/ui/linkage-attr/incompatible-flavor.stderr
index aabdd14b6..a0f6bff66 100644
--- a/tests/ui/linkage-attr/incompatible-flavor.stderr
+++ b/tests/ui/linkage-attr/incompatible-flavor.stderr
@@ -2,5 +2,5 @@ error: linker flavor `msvc` is incompatible with the current target
|
= note: compatible flavors are: gnu, gnu-lld, gnu-cc, gnu-lld-cc, gcc, ld, ld.lld
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/linkage-attr/issue-109144.stderr b/tests/ui/linkage-attr/issue-109144.stderr
index 33187cfdb..0748d9418 100644
--- a/tests/ui/linkage-attr/issue-109144.stderr
+++ b/tests/ui/linkage-attr/issue-109144.stderr
@@ -4,6 +4,6 @@ error[E0459]: `#[link]` attribute requires a `name = "string"` argument
LL | #[link(kind = "static", modifiers = "+whole-archive,+bundle")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `name` argument
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0459`.
diff --git a/tests/ui/linkage-attr/linkage-detect-extern-generated-name-collision.stderr b/tests/ui/linkage-attr/linkage-detect-extern-generated-name-collision.stderr
index 06a070822..2448c160c 100644
--- a/tests/ui/linkage-attr/linkage-detect-extern-generated-name-collision.stderr
+++ b/tests/ui/linkage-attr/linkage-detect-extern-generated-name-collision.stderr
@@ -4,5 +4,5 @@ error: symbol `collision` is already defined
LL | pub static collision: *const i32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/linkage-attr/linkage-detect-local-generated-name-collision.stderr b/tests/ui/linkage-attr/linkage-detect-local-generated-name-collision.stderr
index e0be1ac21..fcaaa39b6 100644
--- a/tests/ui/linkage-attr/linkage-detect-local-generated-name-collision.stderr
+++ b/tests/ui/linkage-attr/linkage-detect-local-generated-name-collision.stderr
@@ -4,5 +4,5 @@ error: symbol `collision` is already defined
LL | pub static collision: *const i32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/linkage-attr/linkage2.stderr b/tests/ui/linkage-attr/linkage2.stderr
index 7265f711f..49290d5a1 100644
--- a/tests/ui/linkage-attr/linkage2.stderr
+++ b/tests/ui/linkage-attr/linkage2.stderr
@@ -4,6 +4,6 @@ error[E0791]: invalid type for variable with `#[linkage]` attribute
LL | static foo: i32;
| ^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0791`.
diff --git a/tests/ui/linkage-attr/linkage3.stderr b/tests/ui/linkage-attr/linkage3.stderr
index dbb5880ab..5f7b7ef22 100644
--- a/tests/ui/linkage-attr/linkage3.stderr
+++ b/tests/ui/linkage-attr/linkage3.stderr
@@ -4,5 +4,5 @@ error: invalid linkage specified
LL | static foo: *const i32;
| ^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/linkage-attr/linkage4.stderr b/tests/ui/linkage-attr/linkage4.stderr
index 30d4d2b7b..f76655b3c 100644
--- a/tests/ui/linkage-attr/linkage4.stderr
+++ b/tests/ui/linkage-attr/linkage4.stderr
@@ -7,6 +7,6 @@ LL | #[linkage = "external"]
= note: see issue #29603 <https://github.com/rust-lang/rust/issues/29603> for more information
= help: add `#![feature(linkage)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/lint-group-forbid-always-trumps-cli.stderr b/tests/ui/lint-group-forbid-always-trumps-cli.stderr
index cd042179c..04a0f56c1 100644
--- a/tests/ui/lint-group-forbid-always-trumps-cli.stderr
+++ b/tests/ui/lint-group-forbid-always-trumps-cli.stderr
@@ -7,5 +7,5 @@ LL | let x = 1;
= note: `-F unused-variables` implied by `-F unused`
= help: to override `-F unused` add `#[allow(unused_variables)]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/bad-lint-cap2.stderr b/tests/ui/lint/bad-lint-cap2.stderr
index 3f3affe5a..05b16b44c 100644
--- a/tests/ui/lint/bad-lint-cap2.stderr
+++ b/tests/ui/lint/bad-lint-cap2.stderr
@@ -11,5 +11,5 @@ LL | #![deny(warnings)]
| ^^^^^^^^
= note: `#[deny(unused_imports)]` implied by `#[deny(warnings)]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/bare-trait-objects-path.stderr b/tests/ui/lint/bare-trait-objects-path.stderr
index 01ca08a6f..c5d72707f 100644
--- a/tests/ui/lint/bare-trait-objects-path.stderr
+++ b/tests/ui/lint/bare-trait-objects-path.stderr
@@ -57,6 +57,6 @@ help: use `dyn`
LL | <dyn Dyn>::CONST;
| ++++ +
-error: aborting due to previous error; 4 warnings emitted
+error: aborting due to 1 previous error; 4 warnings emitted
For more information about this error, try `rustc --explain E0223`.
diff --git a/tests/ui/lint/cli-lint-override.forbid_warn.stderr b/tests/ui/lint/cli-lint-override.forbid_warn.stderr
index d1c66a81c..d8c75c33b 100644
--- a/tests/ui/lint/cli-lint-override.forbid_warn.stderr
+++ b/tests/ui/lint/cli-lint-override.forbid_warn.stderr
@@ -7,5 +7,5 @@ LL | extern fn foo() {}
= help: the default ABI is C
= note: requested on the command line with `-F missing-abi`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/cli-lint-override.warn_deny.stderr b/tests/ui/lint/cli-lint-override.warn_deny.stderr
index f034cfa93..1ba42e9ce 100644
--- a/tests/ui/lint/cli-lint-override.warn_deny.stderr
+++ b/tests/ui/lint/cli-lint-override.warn_deny.stderr
@@ -7,5 +7,5 @@ LL | extern fn foo() {}
= help: the default ABI is C
= note: requested on the command line with `-D missing-abi`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/command-line-lint-group-deny.stderr b/tests/ui/lint/command-line-lint-group-deny.stderr
index 59d8429ea..d78f198e7 100644
--- a/tests/ui/lint/command-line-lint-group-deny.stderr
+++ b/tests/ui/lint/command-line-lint-group-deny.stderr
@@ -7,5 +7,5 @@ LL | let _InappropriateCamelCasing = true;
= note: `-D non-snake-case` implied by `-D bad-style`
= help: to override `-D bad-style` add `#[allow(non_snake_case)]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/command-line-lint-group-forbid.stderr b/tests/ui/lint/command-line-lint-group-forbid.stderr
index 486d32a9f..7b527e7b8 100644
--- a/tests/ui/lint/command-line-lint-group-forbid.stderr
+++ b/tests/ui/lint/command-line-lint-group-forbid.stderr
@@ -7,5 +7,5 @@ LL | let _InappropriateCamelCasing = true;
= note: `-F non-snake-case` implied by `-F bad-style`
= help: to override `-F bad-style` add `#[allow(non_snake_case)]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/dead-code/basic.stderr b/tests/ui/lint/dead-code/basic.stderr
index 7d068cead..9f7d25502 100644
--- a/tests/ui/lint/dead-code/basic.stderr
+++ b/tests/ui/lint/dead-code/basic.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(dead_code)]
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/dead-code/closure-bang.stderr b/tests/ui/lint/dead-code/closure-bang.stderr
index 119ce11e3..a0f5962df 100644
--- a/tests/ui/lint/dead-code/closure-bang.stderr
+++ b/tests/ui/lint/dead-code/closure-bang.stderr
@@ -13,5 +13,5 @@ LL | #![deny(unreachable_code)]
| ^^^^^^^^^^^^^^^^
= note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/dead-code/empty-unused-enum.stderr b/tests/ui/lint/dead-code/empty-unused-enum.stderr
index 6391f0941..a6bf2e1f4 100644
--- a/tests/ui/lint/dead-code/empty-unused-enum.stderr
+++ b/tests/ui/lint/dead-code/empty-unused-enum.stderr
@@ -11,5 +11,5 @@ LL | #![deny(unused)]
| ^^^^^^
= note: `#[deny(dead_code)]` implied by `#[deny(unused)]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/dead-code/impl-trait.stderr b/tests/ui/lint/dead-code/impl-trait.stderr
index e35e13a9e..1c7d6d945 100644
--- a/tests/ui/lint/dead-code/impl-trait.stderr
+++ b/tests/ui/lint/dead-code/impl-trait.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(dead_code)]
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/dead-code/type-alias.stderr b/tests/ui/lint/dead-code/type-alias.stderr
index 446447d97..87c858fdb 100644
--- a/tests/ui/lint/dead-code/type-alias.stderr
+++ b/tests/ui/lint/dead-code/type-alias.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(dead_code)]
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/dead-code/unused-assoc-fns.stderr b/tests/ui/lint/dead-code/unused-assoc-fns.stderr
index 6344a70ea..2e43a67d5 100644
--- a/tests/ui/lint/dead-code/unused-assoc-fns.stderr
+++ b/tests/ui/lint/dead-code/unused-assoc-fns.stderr
@@ -25,5 +25,5 @@ LL | #![deny(unused)]
| ^^^^^^
= note: `#[deny(dead_code)]` implied by `#[deny(unused)]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/dead-code/unused-struct-variant.stderr b/tests/ui/lint/dead-code/unused-struct-variant.stderr
index d26dd3aff..bd7b41256 100644
--- a/tests/ui/lint/dead-code/unused-struct-variant.stderr
+++ b/tests/ui/lint/dead-code/unused-struct-variant.stderr
@@ -14,5 +14,5 @@ LL | #![deny(unused)]
| ^^^^^^
= note: `#[deny(dead_code)]` implied by `#[deny(unused)]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/dead-code/unused-variant.stderr b/tests/ui/lint/dead-code/unused-variant.stderr
index 6029bf268..0ae15fde4 100644
--- a/tests/ui/lint/dead-code/unused-variant.stderr
+++ b/tests/ui/lint/dead-code/unused-variant.stderr
@@ -13,5 +13,5 @@ note: the lint level is defined here
LL | #![deny(dead_code)]
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/dead-code/with-core-crate.stderr b/tests/ui/lint/dead-code/with-core-crate.stderr
index 7adcf8848..f466a6165 100644
--- a/tests/ui/lint/dead-code/with-core-crate.stderr
+++ b/tests/ui/lint/dead-code/with-core-crate.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(dead_code)]
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/enable-unstable-lib-feature.stderr b/tests/ui/lint/enable-unstable-lib-feature.stderr
index bb4e928ad..327e6e3e9 100644
--- a/tests/ui/lint/enable-unstable-lib-feature.stderr
+++ b/tests/ui/lint/enable-unstable-lib-feature.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(non_snake_case)] // To trigger a hard error
| ^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/expr_attr_paren_order.stderr b/tests/ui/lint/expr_attr_paren_order.stderr
index 42beed10c..b3a3741d2 100644
--- a/tests/ui/lint/expr_attr_paren_order.stderr
+++ b/tests/ui/lint/expr_attr_paren_order.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #[allow(non_snake_case)] #[deny(non_snake_case)] (
| ^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/forbid-group-group-1.stderr b/tests/ui/lint/forbid-group-group-1.stderr
index fd425e5f7..bbea56ac6 100644
--- a/tests/ui/lint/forbid-group-group-1.stderr
+++ b/tests/ui/lint/forbid-group-group-1.stderr
@@ -11,5 +11,5 @@ LL | #![forbid(nonstandard_style)]
| ^^^^^^^^^^^^^^^^^
= note: `#[forbid(non_snake_case)]` implied by `#[forbid(nonstandard_style)]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/future-incompat-json-test.rs b/tests/ui/lint/future-incompat-json-test.rs
new file mode 100644
index 000000000..6ccd67029
--- /dev/null
+++ b/tests/ui/lint/future-incompat-json-test.rs
@@ -0,0 +1,10 @@
+// compile-flags: -Zfuture-incompat-test --json=future-incompat --error-format=json
+// check-pass
+
+// The `-Zfuture-incompat-test flag causes any normal warning to be included
+// in the future-incompatible report. The stderr output here should mention
+// the future incompatible report (as extracted by compiletest).
+
+fn main() {
+ let x = 1;
+}
diff --git a/tests/ui/lint/future-incompat-json-test.stderr b/tests/ui/lint/future-incompat-json-test.stderr
new file mode 100644
index 000000000..c4ab5a00d
--- /dev/null
+++ b/tests/ui/lint/future-incompat-json-test.stderr
@@ -0,0 +1,10 @@
+{"$message_type":"future_incompat","future_incompat_report":[{"diagnostic":{"$message_type":"diagnostic","message":"unused variable: `x`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"$DIR/future-incompat-json-test.rs","byte_start":338,"byte_end":339,"line_start":9,"line_end":9,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" let x = 1;","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`-A unused-variables` implied by `-A unused`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"to override `-A unused` add `#[allow(unused_variables)]`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"if this is intentional, prefix it with an underscore","code":null,"level":"help","spans":[{"file_name":"$DIR/future-incompat-json-test.rs","byte_start":338,"byte_end":339,"line_start":9,"line_end":9,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" let x = 1;","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":"_x","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"warning: unused variable: `x`
+ --> $DIR/future-incompat-json-test.rs:9:9
+ |
+LL | let x = 1;
+ | ^ help: if this is intentional, prefix it with an underscore: `_x`
+ |
+ = note: `-A unused-variables` implied by `-A unused`
+ = help: to override `-A unused` add `#[allow(unused_variables)]`
+
+"}}]}
diff --git a/tests/ui/lint/internal_features.rs b/tests/ui/lint/internal_features.rs
new file mode 100644
index 000000000..32ce9540c
--- /dev/null
+++ b/tests/ui/lint/internal_features.rs
@@ -0,0 +1,11 @@
+#![forbid(internal_features)]
+// A lang feature and a lib feature.
+#![feature(intrinsics, panic_internals)]
+//~^ ERROR: internal
+//~| ERROR: internal
+
+extern "rust-intrinsic" {
+ fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize);
+}
+
+fn main() {}
diff --git a/tests/ui/lint/internal_features.stderr b/tests/ui/lint/internal_features.stderr
new file mode 100644
index 000000000..8b52bef8f
--- /dev/null
+++ b/tests/ui/lint/internal_features.stderr
@@ -0,0 +1,23 @@
+error: the feature `intrinsics` is internal to the compiler or standard library
+ --> $DIR/internal_features.rs:3:12
+ |
+LL | #![feature(intrinsics, panic_internals)]
+ | ^^^^^^^^^^
+ |
+ = note: using it is strongly discouraged
+note: the lint level is defined here
+ --> $DIR/internal_features.rs:1:11
+ |
+LL | #![forbid(internal_features)]
+ | ^^^^^^^^^^^^^^^^^
+
+error: the feature `panic_internals` is internal to the compiler or standard library
+ --> $DIR/internal_features.rs:3:24
+ |
+LL | #![feature(intrinsics, panic_internals)]
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: using it is strongly discouraged
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/lint/issue-103435-extra-parentheses.fixed b/tests/ui/lint/issue-103435-extra-parentheses.fixed
index 2b01b414b..74b5aa06e 100644
--- a/tests/ui/lint/issue-103435-extra-parentheses.fixed
+++ b/tests/ui/lint/issue-103435-extra-parentheses.fixed
@@ -13,6 +13,5 @@ fn main() {
// reported by parser
for _x in 1..10 {}
- //~^ ERROR expected one of
- //~| ERROR unexpected parentheses surrounding
+ //~^ ERROR unexpected parentheses surrounding
}
diff --git a/tests/ui/lint/issue-103435-extra-parentheses.rs b/tests/ui/lint/issue-103435-extra-parentheses.rs
index 8261610cf..cc81a64f2 100644
--- a/tests/ui/lint/issue-103435-extra-parentheses.rs
+++ b/tests/ui/lint/issue-103435-extra-parentheses.rs
@@ -8,11 +8,10 @@ fn main() {
for(_x)in 1..10 {}
//~^ ERROR unnecessary parentheses around pattern
- if(2 == 1){}
+ if(2 == 1) {}
//~^ ERROR unnecessary parentheses around `if` condition
// reported by parser
- for(_x in 1..10){}
- //~^ ERROR expected one of
- //~| ERROR unexpected parentheses surrounding
+ for(_x in 1..10) {}
+ //~^ ERROR unexpected parentheses surrounding
}
diff --git a/tests/ui/lint/issue-103435-extra-parentheses.stderr b/tests/ui/lint/issue-103435-extra-parentheses.stderr
index 29c41c910..5a166eb50 100644
--- a/tests/ui/lint/issue-103435-extra-parentheses.stderr
+++ b/tests/ui/lint/issue-103435-extra-parentheses.stderr
@@ -1,18 +1,12 @@
-error: expected one of `)`, `,`, `@`, or `|`, found keyword `in`
- --> $DIR/issue-103435-extra-parentheses.rs:15:12
- |
-LL | for(_x in 1..10){}
- | ^^ expected one of `)`, `,`, `@`, or `|`
-
error: unexpected parentheses surrounding `for` loop head
--> $DIR/issue-103435-extra-parentheses.rs:15:8
|
-LL | for(_x in 1..10){}
+LL | for(_x in 1..10) {}
| ^ ^
|
help: remove parentheses in `for` loop
|
-LL - for(_x in 1..10){}
+LL - for(_x in 1..10) {}
LL + for _x in 1..10 {}
|
@@ -48,14 +42,14 @@ LL + for _x in 1..10 {}
error: unnecessary parentheses around `if` condition
--> $DIR/issue-103435-extra-parentheses.rs:11:7
|
-LL | if(2 == 1){}
+LL | if(2 == 1) {}
| ^ ^
|
help: remove these parentheses
|
-LL - if(2 == 1){}
+LL - if(2 == 1) {}
LL + if 2 == 1 {}
|
-error: aborting due to 5 previous errors
+error: aborting due to 4 previous errors
diff --git a/tests/ui/lint/issue-104897.stderr b/tests/ui/lint/issue-104897.stderr
index 728d51f34..1f3d40605 100644
--- a/tests/ui/lint/issue-104897.stderr
+++ b/tests/ui/lint/issue-104897.stderr
@@ -8,5 +8,5 @@ LL | fn f(){(print!(á
| |unclosed delimiter
| unclosed delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/issue-106991.stderr b/tests/ui/lint/issue-106991.stderr
index 7b43f0b2c..4704e9ef8 100644
--- a/tests/ui/lint/issue-106991.stderr
+++ b/tests/ui/lint/issue-106991.stderr
@@ -6,6 +6,6 @@ LL | fn bar() -> impl Iterator<Item = i32> {
|
= note: required for `Map<std::slice::IterMut<'_, Vec<u8>>, for<'a> fn(&'a mut Vec<u8>) {foo}>` to implement `Iterator`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/lint/issue-109152.stderr b/tests/ui/lint/issue-109152.stderr
index 7db9e71a5..a175964cc 100644
--- a/tests/ui/lint/issue-109152.stderr
+++ b/tests/ui/lint/issue-109152.stderr
@@ -19,5 +19,5 @@ help: you might have meant to use `Iterator::for_each`
LL | vec![42].iter().for_each(drop);
| ~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/issue-63364.stderr b/tests/ui/lint/issue-63364.stderr
index 9b5453fa8..f4305f37f 100644
--- a/tests/ui/lint/issue-63364.stderr
+++ b/tests/ui/lint/issue-63364.stderr
@@ -7,5 +7,5 @@ LL | for n in 100_000.. {
= note: the literal `100_000` does not fit into the type `u16` whose range is `0..=65535`
= note: `#[deny(overflowing_literals)]` on by default
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/issue-70819-dont-override-forbid-in-same-scope.stderr b/tests/ui/lint/issue-70819-dont-override-forbid-in-same-scope.stderr
index cc44f8aa5..f78bf899b 100644
--- a/tests/ui/lint/issue-70819-dont-override-forbid-in-same-scope.stderr
+++ b/tests/ui/lint/issue-70819-dont-override-forbid-in-same-scope.stderr
@@ -14,5 +14,5 @@ note: the lint level is defined here
LL | #![forbid(forbidden_lint_groups)]
| ^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/issue-79744.stderr b/tests/ui/lint/issue-79744.stderr
index c1b56250d..4cb79f7fd 100644
--- a/tests/ui/lint/issue-79744.stderr
+++ b/tests/ui/lint/issue-79744.stderr
@@ -8,5 +8,5 @@ LL | let e2 = 230;
= help: consider using the type `u8` instead
= note: `#[deny(overflowing_literals)]` on by default
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/issue-99387.stderr b/tests/ui/lint/issue-99387.stderr
index 3a46ce7e1..0005e5532 100644
--- a/tests/ui/lint/issue-99387.stderr
+++ b/tests/ui/lint/issue-99387.stderr
@@ -11,5 +11,5 @@ note: this item must mention the opaque type in its signature in order to be abl
LL | pub fn ohno<'a>() -> <&'a () as Tr>::Item {
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/let_underscore/let_underscore_lock.stderr b/tests/ui/lint/let_underscore/let_underscore_lock.stderr
index fb58af0a4..f88a1df55 100644
--- a/tests/ui/lint/let_underscore/let_underscore_lock.stderr
+++ b/tests/ui/lint/let_underscore/let_underscore_lock.stderr
@@ -16,5 +16,5 @@ help: consider immediately dropping the value
LL | drop(data.lock().unwrap());
| ~~~~~ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-attr-non-item-node.stderr b/tests/ui/lint/lint-attr-non-item-node.stderr
index 583579140..7922d1c08 100644
--- a/tests/ui/lint/lint-attr-non-item-node.stderr
+++ b/tests/ui/lint/lint-attr-non-item-node.stderr
@@ -12,5 +12,5 @@ note: the lint level is defined here
LL | #[deny(unreachable_code)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-ctypes-73249-2.stderr b/tests/ui/lint/lint-ctypes-73249-2.stderr
index 49fa54114..ef30a4069 100644
--- a/tests/ui/lint/lint-ctypes-73249-2.stderr
+++ b/tests/ui/lint/lint-ctypes-73249-2.stderr
@@ -11,5 +11,5 @@ note: the lint level is defined here
LL | #![deny(improper_ctypes)]
| ^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-ctypes-73249-3.stderr b/tests/ui/lint/lint-ctypes-73249-3.stderr
index c41ce666d..e5607ba72 100644
--- a/tests/ui/lint/lint-ctypes-73249-3.stderr
+++ b/tests/ui/lint/lint-ctypes-73249-3.stderr
@@ -11,5 +11,5 @@ note: the lint level is defined here
LL | #![deny(improper_ctypes)]
| ^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-ctypes-73249-5.stderr b/tests/ui/lint/lint-ctypes-73249-5.stderr
index 98245c4f1..fcb106c48 100644
--- a/tests/ui/lint/lint-ctypes-73249-5.stderr
+++ b/tests/ui/lint/lint-ctypes-73249-5.stderr
@@ -11,5 +11,5 @@ note: the lint level is defined here
LL | #![deny(improper_ctypes)]
| ^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-ctypes-73251-1.stderr b/tests/ui/lint/lint-ctypes-73251-1.stderr
index b4eb921b9..a3b3ebaac 100644
--- a/tests/ui/lint/lint-ctypes-73251-1.stderr
+++ b/tests/ui/lint/lint-ctypes-73251-1.stderr
@@ -11,5 +11,5 @@ note: the lint level is defined here
LL | #![deny(improper_ctypes)]
| ^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-ctypes-73251-2.stderr b/tests/ui/lint/lint-ctypes-73251-2.stderr
index e44cd45bd..40a9cd00c 100644
--- a/tests/ui/lint/lint-ctypes-73251-2.stderr
+++ b/tests/ui/lint/lint-ctypes-73251-2.stderr
@@ -11,5 +11,5 @@ note: the lint level is defined here
LL | #![deny(improper_ctypes)]
| ^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-ctypes-option-nonnull-unsized.stderr b/tests/ui/lint/lint-ctypes-option-nonnull-unsized.stderr
index f59fb3cc7..746304694 100644
--- a/tests/ui/lint/lint-ctypes-option-nonnull-unsized.stderr
+++ b/tests/ui/lint/lint-ctypes-option-nonnull-unsized.stderr
@@ -12,5 +12,5 @@ note: the lint level is defined here
LL | #![deny(improper_ctypes_definitions)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-forbid-internal-unsafe.stderr b/tests/ui/lint/lint-forbid-internal-unsafe.stderr
index ba425ceb4..52d9c8471 100644
--- a/tests/ui/lint/lint-forbid-internal-unsafe.stderr
+++ b/tests/ui/lint/lint-forbid-internal-unsafe.stderr
@@ -18,5 +18,5 @@ LL | println!("{}", evil!(*(0 as *const u8)));
|
= note: `#[warn(deref_nullptr)]` on by default
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/lint/lint-match-arms.stderr b/tests/ui/lint/lint-match-arms.stderr
index 1bc0e41fd..eccfa19fd 100644
--- a/tests/ui/lint/lint-match-arms.stderr
+++ b/tests/ui/lint/lint-match-arms.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #[deny(unused_variables)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-missing-copy-implementations.stderr b/tests/ui/lint/lint-missing-copy-implementations.stderr
index e5f5ce20d..37c9192d2 100644
--- a/tests/ui/lint/lint-missing-copy-implementations.stderr
+++ b/tests/ui/lint/lint-missing-copy-implementations.stderr
@@ -12,5 +12,5 @@ note: the lint level is defined here
LL | #![deny(missing_copy_implementations)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-non-snake-case-crate-2.stderr b/tests/ui/lint/lint-non-snake-case-crate-2.stderr
index 4b42145bb..f3207226c 100644
--- a/tests/ui/lint/lint-non-snake-case-crate-2.stderr
+++ b/tests/ui/lint/lint-non-snake-case-crate-2.stderr
@@ -7,5 +7,5 @@ note: the lint level is defined here
LL | #![deny(non_snake_case)]
| ^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-non-snake-case-crate.stderr b/tests/ui/lint/lint-non-snake-case-crate.stderr
index da6b89c1e..1136b707d 100644
--- a/tests/ui/lint/lint-non-snake-case-crate.stderr
+++ b/tests/ui/lint/lint-non-snake-case-crate.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(non_snake_case)]
| ^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-non-snake-case-lifetimes.stderr b/tests/ui/lint/lint-non-snake-case-lifetimes.stderr
index d4fe26a43..8be7365cf 100644
--- a/tests/ui/lint/lint-non-snake-case-lifetimes.stderr
+++ b/tests/ui/lint/lint-non-snake-case-lifetimes.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(non_snake_case)]
| ^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-non-snake-case-modules.stderr b/tests/ui/lint/lint-non-snake-case-modules.stderr
index c8b997c87..f21f9a934 100644
--- a/tests/ui/lint/lint-non-snake-case-modules.stderr
+++ b/tests/ui/lint/lint-non-snake-case-modules.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(non_snake_case)]
| ^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-non-uppercase-associated-const.stderr b/tests/ui/lint/lint-non-uppercase-associated-const.stderr
index 411ff51aa..54c951b1f 100644
--- a/tests/ui/lint/lint-non-uppercase-associated-const.stderr
+++ b/tests/ui/lint/lint-non-uppercase-associated-const.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(non_upper_case_globals)]
| ^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-non-uppercase-trait-assoc-const.stderr b/tests/ui/lint/lint-non-uppercase-trait-assoc-const.stderr
index 98d8d1dd2..a5ac540d1 100644
--- a/tests/ui/lint/lint-non-uppercase-trait-assoc-const.stderr
+++ b/tests/ui/lint/lint-non-uppercase-trait-assoc-const.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(non_upper_case_globals)]
| ^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-nonstandard-style-unicode-3.stderr b/tests/ui/lint/lint-nonstandard-style-unicode-3.stderr
index 970e6b838..3d4337bbc 100644
--- a/tests/ui/lint/lint-nonstandard-style-unicode-3.stderr
+++ b/tests/ui/lint/lint-nonstandard-style-unicode-3.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![forbid(non_upper_case_globals)]
| ^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-qualification.stderr b/tests/ui/lint/lint-qualification.stderr
index 90a06bc6c..2448a64f1 100644
--- a/tests/ui/lint/lint-qualification.stderr
+++ b/tests/ui/lint/lint-qualification.stderr
@@ -15,5 +15,5 @@ LL - foo::bar();
LL + bar();
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-removed-allow.stderr b/tests/ui/lint/lint-removed-allow.stderr
index 029334c2e..849c9ec5c 100644
--- a/tests/ui/lint/lint-removed-allow.stderr
+++ b/tests/ui/lint/lint-removed-allow.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #[deny(unused_variables)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-removed-cmdline.stderr b/tests/ui/lint/lint-removed-cmdline.stderr
index 6b76ad3b5..fd63433c3 100644
--- a/tests/ui/lint/lint-removed-cmdline.stderr
+++ b/tests/ui/lint/lint-removed-cmdline.stderr
@@ -26,5 +26,5 @@ LL | #[deny(warnings)]
| ^^^^^^^^
= note: `#[deny(unused_variables)]` implied by `#[deny(warnings)]`
-error: aborting due to previous error; 3 warnings emitted
+error: aborting due to 1 previous error; 3 warnings emitted
diff --git a/tests/ui/lint/lint-removed.stderr b/tests/ui/lint/lint-removed.stderr
index dc0515b84..6d3629ba3 100644
--- a/tests/ui/lint/lint-removed.stderr
+++ b/tests/ui/lint/lint-removed.stderr
@@ -18,5 +18,5 @@ note: the lint level is defined here
LL | #[deny(unused_variables)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/lint/lint-renamed-allow.stderr b/tests/ui/lint/lint-renamed-allow.stderr
index 46f6a10de..8bc8530b4 100644
--- a/tests/ui/lint/lint-renamed-allow.stderr
+++ b/tests/ui/lint/lint-renamed-allow.stderr
@@ -11,5 +11,5 @@ LL | #[deny(unused)]
| ^^^^^^
= note: `#[deny(unused_variables)]` implied by `#[deny(unused)]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-renamed-cmdline.stderr b/tests/ui/lint/lint-renamed-cmdline.stderr
index 675443dde..d6bb72f34 100644
--- a/tests/ui/lint/lint-renamed-cmdline.stderr
+++ b/tests/ui/lint/lint-renamed-cmdline.stderr
@@ -29,5 +29,5 @@ LL | #[deny(unused)]
| ^^^^^^
= note: `#[deny(unused_variables)]` implied by `#[deny(unused)]`
-error: aborting due to previous error; 3 warnings emitted
+error: aborting due to 1 previous error; 3 warnings emitted
diff --git a/tests/ui/lint/lint-renamed.stderr b/tests/ui/lint/lint-renamed.stderr
index 984254571..a1aa85e67 100644
--- a/tests/ui/lint/lint-renamed.stderr
+++ b/tests/ui/lint/lint-renamed.stderr
@@ -19,5 +19,5 @@ LL | #[deny(unused)]
| ^^^^^^
= note: `#[deny(unused_variables)]` implied by `#[deny(unused)]`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/lint/lint-stability2.stderr b/tests/ui/lint/lint-stability2.stderr
index 51bdf84a3..3df0c4281 100644
--- a/tests/ui/lint/lint-stability2.stderr
+++ b/tests/ui/lint/lint-stability2.stderr
@@ -11,5 +11,5 @@ LL | #![deny(deprecated)]
| ^^^^^^^^^^
= note: this error originates in the macro `macro_test` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-stability3.stderr b/tests/ui/lint/lint-stability3.stderr
index 3bbb60dd3..3a2af452c 100644
--- a/tests/ui/lint/lint-stability3.stderr
+++ b/tests/ui/lint/lint-stability3.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(deprecated)]
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-strict-provenance-fuzzy-casts.stderr b/tests/ui/lint/lint-strict-provenance-fuzzy-casts.stderr
index 383623b48..0b1289742 100644
--- a/tests/ui/lint/lint-strict-provenance-fuzzy-casts.stderr
+++ b/tests/ui/lint/lint-strict-provenance-fuzzy-casts.stderr
@@ -15,5 +15,5 @@ help: use `.with_addr()` to adjust a valid pointer in the same allocation, to th
LL | let dangling = (...).with_addr(16_usize);
| ++++++++++++++++ ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-struct-necessary.stderr b/tests/ui/lint/lint-struct-necessary.stderr
index eb65a9e98..90b2af7de 100644
--- a/tests/ui/lint/lint-struct-necessary.stderr
+++ b/tests/ui/lint/lint-struct-necessary.stderr
@@ -15,5 +15,5 @@ LL - match (e) {
LL + match e {
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-temporary-cstring-as-param.stderr b/tests/ui/lint/lint-temporary-cstring-as-param.stderr
index 838b3bc13..7aa21f256 100644
--- a/tests/ui/lint/lint-temporary-cstring-as-param.stderr
+++ b/tests/ui/lint/lint-temporary-cstring-as-param.stderr
@@ -14,5 +14,5 @@ note: the lint level is defined here
LL | #![deny(temporary_cstring_as_ptr)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-type-limits2.stderr b/tests/ui/lint/lint-type-limits2.stderr
index b3420ad8a..913633508 100644
--- a/tests/ui/lint/lint-type-limits2.stderr
+++ b/tests/ui/lint/lint-type-limits2.stderr
@@ -20,5 +20,5 @@ note: the lint level is defined here
LL | #![warn(overflowing_literals)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/lint/lint-type-limits3.stderr b/tests/ui/lint/lint-type-limits3.stderr
index db46e7ae7..77487164a 100644
--- a/tests/ui/lint/lint-type-limits3.stderr
+++ b/tests/ui/lint/lint-type-limits3.stderr
@@ -20,5 +20,5 @@ note: the lint level is defined here
LL | #![warn(overflowing_literals)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/lint/lint-unconditional-drop-recursion.stderr b/tests/ui/lint/lint-unconditional-drop-recursion.stderr
index 76f954816..5ac56499c 100644
--- a/tests/ui/lint/lint-unconditional-drop-recursion.stderr
+++ b/tests/ui/lint/lint-unconditional-drop-recursion.stderr
@@ -13,5 +13,5 @@ note: the lint level is defined here
LL | #![deny(unconditional_recursion)]
| ^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/lint-unnecessary-import-braces.stderr b/tests/ui/lint/lint-unnecessary-import-braces.stderr
index 2d289404d..5f441ef4a 100644
--- a/tests/ui/lint/lint-unnecessary-import-braces.stderr
+++ b/tests/ui/lint/lint-unnecessary-import-braces.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(unused_import_braces)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/must_not_suspend/boxed.stderr b/tests/ui/lint/must_not_suspend/boxed.stderr
index a2abfffc1..6170a36a8 100644
--- a/tests/ui/lint/must_not_suspend/boxed.stderr
+++ b/tests/ui/lint/must_not_suspend/boxed.stderr
@@ -22,5 +22,5 @@ note: the lint level is defined here
LL | #![deny(must_not_suspend)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/must_not_suspend/dedup.stderr b/tests/ui/lint/must_not_suspend/dedup.stderr
index 5d5b04a5d..2876e1cf6 100644
--- a/tests/ui/lint/must_not_suspend/dedup.stderr
+++ b/tests/ui/lint/must_not_suspend/dedup.stderr
@@ -18,5 +18,5 @@ note: the lint level is defined here
LL | #![deny(must_not_suspend)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/must_not_suspend/feature-gate-must_not_suspend.stderr b/tests/ui/lint/must_not_suspend/feature-gate-must_not_suspend.stderr
index ab20a8be8..9ec33b1c4 100644
--- a/tests/ui/lint/must_not_suspend/feature-gate-must_not_suspend.stderr
+++ b/tests/ui/lint/must_not_suspend/feature-gate-must_not_suspend.stderr
@@ -7,6 +7,6 @@ LL | #[must_not_suspend = "You gotta use Umm's, ya know?"]
= note: see issue #83310 <https://github.com/rust-lang/rust/issues/83310> for more information
= help: add `#![feature(must_not_suspend)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/lint/must_not_suspend/mutex.stderr b/tests/ui/lint/must_not_suspend/mutex.stderr
index 9b5fc37a3..ca53a7531 100644
--- a/tests/ui/lint/must_not_suspend/mutex.stderr
+++ b/tests/ui/lint/must_not_suspend/mutex.stderr
@@ -22,5 +22,5 @@ note: the lint level is defined here
LL | #![deny(must_not_suspend)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/must_not_suspend/other_items.stderr b/tests/ui/lint/must_not_suspend/other_items.stderr
index 41c889692..e6c36b789 100644
--- a/tests/ui/lint/must_not_suspend/other_items.stderr
+++ b/tests/ui/lint/must_not_suspend/other_items.stderr
@@ -6,5 +6,5 @@ LL | #[must_not_suspend]
LL | mod inner {}
| ------------ is not a struct, enum, or trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/must_not_suspend/ref.stderr b/tests/ui/lint/must_not_suspend/ref.stderr
index ed91a4a0b..aa772afc7 100644
--- a/tests/ui/lint/must_not_suspend/ref.stderr
+++ b/tests/ui/lint/must_not_suspend/ref.stderr
@@ -23,5 +23,5 @@ note: the lint level is defined here
LL | #![deny(must_not_suspend)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/must_not_suspend/return.stderr b/tests/ui/lint/must_not_suspend/return.stderr
index fdada85eb..5a73064c7 100644
--- a/tests/ui/lint/must_not_suspend/return.stderr
+++ b/tests/ui/lint/must_not_suspend/return.stderr
@@ -8,5 +8,5 @@ LL | | 0
LL | | }
| |_- is not a struct, enum, or trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/must_not_suspend/tuple-mismatch.stderr b/tests/ui/lint/must_not_suspend/tuple-mismatch.stderr
index 294476107..3adf26cfe 100644
--- a/tests/ui/lint/must_not_suspend/tuple-mismatch.stderr
+++ b/tests/ui/lint/must_not_suspend/tuple-mismatch.stderr
@@ -7,6 +7,6 @@ LL | yield ((), ());
= note: expected tuple `((), ())`
found unit type `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/lint/must_not_suspend/unit.stderr b/tests/ui/lint/must_not_suspend/unit.stderr
index 11c95c146..716369d8e 100644
--- a/tests/ui/lint/must_not_suspend/unit.stderr
+++ b/tests/ui/lint/must_not_suspend/unit.stderr
@@ -22,5 +22,5 @@ note: the lint level is defined here
LL | #![deny(must_not_suspend)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/opaque-ty-ffi-normalization-cycle.stderr b/tests/ui/lint/opaque-ty-ffi-normalization-cycle.stderr
index e8d696477..9efc18783 100644
--- a/tests/ui/lint/opaque-ty-ffi-normalization-cycle.stderr
+++ b/tests/ui/lint/opaque-ty-ffi-normalization-cycle.stderr
@@ -11,5 +11,5 @@ note: the lint level is defined here
LL | #![deny(improper_ctypes)]
| ^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/opaque-ty-ffi-unsafe.stderr b/tests/ui/lint/opaque-ty-ffi-unsafe.stderr
index ba9e18bcc..7f5d1792b 100644
--- a/tests/ui/lint/opaque-ty-ffi-unsafe.stderr
+++ b/tests/ui/lint/opaque-ty-ffi-unsafe.stderr
@@ -11,5 +11,5 @@ note: the lint level is defined here
LL | #![deny(improper_ctypes)]
| ^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/ptr_null_checks.rs b/tests/ui/lint/ptr_null_checks.rs
index 3028084e9..4925019be 100644
--- a/tests/ui/lint/ptr_null_checks.rs
+++ b/tests/ui/lint/ptr_null_checks.rs
@@ -1,7 +1,5 @@
// check-pass
-#![feature(ptr_from_ref)]
-
use std::ptr;
extern "C" fn c_fn() {}
diff --git a/tests/ui/lint/ptr_null_checks.stderr b/tests/ui/lint/ptr_null_checks.stderr
index 0edc1b865..70a27790c 100644
--- a/tests/ui/lint/ptr_null_checks.stderr
+++ b/tests/ui/lint/ptr_null_checks.stderr
@@ -1,5 +1,5 @@
warning: function pointers are not nullable, so checking them for null will always return false
- --> $DIR/ptr_null_checks.rs:14:8
+ --> $DIR/ptr_null_checks.rs:12:8
|
LL | if (fn_ptr as *mut ()).is_null() {}
| ^------^^^^^^^^^^^^^^^^^^^^^^
@@ -10,7 +10,7 @@ LL | if (fn_ptr as *mut ()).is_null() {}
= note: `#[warn(useless_ptr_null_checks)]` on by default
warning: function pointers are not nullable, so checking them for null will always return false
- --> $DIR/ptr_null_checks.rs:16:8
+ --> $DIR/ptr_null_checks.rs:14:8
|
LL | if (fn_ptr as *const u8).is_null() {}
| ^------^^^^^^^^^^^^^^^^^^^^^^^^
@@ -20,7 +20,7 @@ LL | if (fn_ptr as *const u8).is_null() {}
= help: wrap the function pointer inside an `Option` and use `Option::is_none` to check for null pointer value
warning: function pointers are not nullable, so checking them for null will always return false
- --> $DIR/ptr_null_checks.rs:18:8
+ --> $DIR/ptr_null_checks.rs:16:8
|
LL | if (fn_ptr as *const ()) == std::ptr::null() {}
| ^------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -30,7 +30,7 @@ LL | if (fn_ptr as *const ()) == std::ptr::null() {}
= help: wrap the function pointer inside an `Option` and use `Option::is_none` to check for null pointer value
warning: function pointers are not nullable, so checking them for null will always return false
- --> $DIR/ptr_null_checks.rs:20:8
+ --> $DIR/ptr_null_checks.rs:18:8
|
LL | if (fn_ptr as *mut ()) == std::ptr::null_mut() {}
| ^------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -40,7 +40,7 @@ LL | if (fn_ptr as *mut ()) == std::ptr::null_mut() {}
= help: wrap the function pointer inside an `Option` and use `Option::is_none` to check for null pointer value
warning: function pointers are not nullable, so checking them for null will always return false
- --> $DIR/ptr_null_checks.rs:22:8
+ --> $DIR/ptr_null_checks.rs:20:8
|
LL | if (fn_ptr as *const ()) == (0 as *const ()) {}
| ^------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -50,7 +50,7 @@ LL | if (fn_ptr as *const ()) == (0 as *const ()) {}
= help: wrap the function pointer inside an `Option` and use `Option::is_none` to check for null pointer value
warning: function pointers are not nullable, so checking them for null will always return false
- --> $DIR/ptr_null_checks.rs:24:8
+ --> $DIR/ptr_null_checks.rs:22:8
|
LL | if <*const _>::is_null(fn_ptr as *const ()) {}
| ^^^^^^^^^^^^^^^^^^^^------^^^^^^^^^^^^^^
@@ -60,7 +60,7 @@ LL | if <*const _>::is_null(fn_ptr as *const ()) {}
= help: wrap the function pointer inside an `Option` and use `Option::is_none` to check for null pointer value
warning: function pointers are not nullable, so checking them for null will always return false
- --> $DIR/ptr_null_checks.rs:26:8
+ --> $DIR/ptr_null_checks.rs:24:8
|
LL | if (fn_ptr as *mut fn() as *const fn() as *const ()).is_null() {}
| ^------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -70,7 +70,7 @@ LL | if (fn_ptr as *mut fn() as *const fn() as *const ()).is_null() {}
= help: wrap the function pointer inside an `Option` and use `Option::is_none` to check for null pointer value
warning: function pointers are not nullable, so checking them for null will always return false
- --> $DIR/ptr_null_checks.rs:28:8
+ --> $DIR/ptr_null_checks.rs:26:8
|
LL | if (fn_ptr as *mut fn() as *const fn()).cast_mut().is_null() {}
| ^------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -80,7 +80,7 @@ LL | if (fn_ptr as *mut fn() as *const fn()).cast_mut().is_null() {}
= help: wrap the function pointer inside an `Option` and use `Option::is_none` to check for null pointer value
warning: function pointers are not nullable, so checking them for null will always return false
- --> $DIR/ptr_null_checks.rs:30:8
+ --> $DIR/ptr_null_checks.rs:28:8
|
LL | if ((fn_ptr as *mut fn()).cast() as *const fn()).cast_mut().is_null() {}
| ^^------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -90,7 +90,7 @@ LL | if ((fn_ptr as *mut fn()).cast() as *const fn()).cast_mut().is_null() {
= help: wrap the function pointer inside an `Option` and use `Option::is_none` to check for null pointer value
warning: function pointers are not nullable, so checking them for null will always return false
- --> $DIR/ptr_null_checks.rs:32:8
+ --> $DIR/ptr_null_checks.rs:30:8
|
LL | if (fn_ptr as fn() as *const ()).is_null() {}
| ^--------------^^^^^^^^^^^^^^^^^^^^^^^^
@@ -100,7 +100,7 @@ LL | if (fn_ptr as fn() as *const ()).is_null() {}
= help: wrap the function pointer inside an `Option` and use `Option::is_none` to check for null pointer value
warning: function pointers are not nullable, so checking them for null will always return false
- --> $DIR/ptr_null_checks.rs:34:8
+ --> $DIR/ptr_null_checks.rs:32:8
|
LL | if (c_fn as *const fn()).is_null() {}
| ^----^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -110,7 +110,7 @@ LL | if (c_fn as *const fn()).is_null() {}
= help: wrap the function pointer inside an `Option` and use `Option::is_none` to check for null pointer value
warning: references are not nullable, so checking them for null will always return false
- --> $DIR/ptr_null_checks.rs:38:8
+ --> $DIR/ptr_null_checks.rs:36:8
|
LL | if (&mut 8 as *mut i32).is_null() {}
| ^------^^^^^^^^^^^^^^^^^^^^^^^
@@ -118,13 +118,13 @@ LL | if (&mut 8 as *mut i32).is_null() {}
| expression has type `&mut i32`
warning: returned pointer of `from_mut` call is never null, so checking it for null will always return false
- --> $DIR/ptr_null_checks.rs:40:8
+ --> $DIR/ptr_null_checks.rs:38:8
|
LL | if ptr::from_mut(&mut 8).is_null() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: references are not nullable, so checking them for null will always return false
- --> $DIR/ptr_null_checks.rs:42:8
+ --> $DIR/ptr_null_checks.rs:40:8
|
LL | if (&8 as *const i32).is_null() {}
| ^--^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -132,25 +132,25 @@ LL | if (&8 as *const i32).is_null() {}
| expression has type `&i32`
warning: returned pointer of `from_ref` call is never null, so checking it for null will always return false
- --> $DIR/ptr_null_checks.rs:44:8
+ --> $DIR/ptr_null_checks.rs:42:8
|
LL | if ptr::from_ref(&8).is_null() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: returned pointer of `from_ref` call is never null, so checking it for null will always return false
- --> $DIR/ptr_null_checks.rs:46:8
+ --> $DIR/ptr_null_checks.rs:44:8
|
LL | if ptr::from_ref(&8).cast_mut().is_null() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: returned pointer of `from_ref` call is never null, so checking it for null will always return false
- --> $DIR/ptr_null_checks.rs:48:8
+ --> $DIR/ptr_null_checks.rs:46:8
|
LL | if (ptr::from_ref(&8).cast_mut() as *mut i32).is_null() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: references are not nullable, so checking them for null will always return false
- --> $DIR/ptr_null_checks.rs:50:8
+ --> $DIR/ptr_null_checks.rs:48:8
|
LL | if (&8 as *const i32) == std::ptr::null() {}
| ^--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -158,7 +158,7 @@ LL | if (&8 as *const i32) == std::ptr::null() {}
| expression has type `&i32`
warning: references are not nullable, so checking them for null will always return false
- --> $DIR/ptr_null_checks.rs:53:8
+ --> $DIR/ptr_null_checks.rs:51:8
|
LL | if (ref_num as *const i32) == std::ptr::null() {}
| ^-------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -166,7 +166,7 @@ LL | if (ref_num as *const i32) == std::ptr::null() {}
| expression has type `&i32`
warning: references are not nullable, so checking them for null will always return false
- --> $DIR/ptr_null_checks.rs:55:8
+ --> $DIR/ptr_null_checks.rs:53:8
|
LL | if (b"\0" as *const u8).is_null() {}
| ^-----^^^^^^^^^^^^^^^^^^^^^^^^
@@ -174,7 +174,7 @@ LL | if (b"\0" as *const u8).is_null() {}
| expression has type `&[u8; 1]`
warning: references are not nullable, so checking them for null will always return false
- --> $DIR/ptr_null_checks.rs:57:8
+ --> $DIR/ptr_null_checks.rs:55:8
|
LL | if ("aa" as *const str).is_null() {}
| ^----^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -182,7 +182,7 @@ LL | if ("aa" as *const str).is_null() {}
| expression has type `&str`
warning: references are not nullable, so checking them for null will always return false
- --> $DIR/ptr_null_checks.rs:59:8
+ --> $DIR/ptr_null_checks.rs:57:8
|
LL | if (&[1, 2] as *const i32).is_null() {}
| ^-------^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -190,7 +190,7 @@ LL | if (&[1, 2] as *const i32).is_null() {}
| expression has type `&[i32; 2]`
warning: references are not nullable, so checking them for null will always return false
- --> $DIR/ptr_null_checks.rs:61:8
+ --> $DIR/ptr_null_checks.rs:59:8
|
LL | if (&mut [1, 2] as *mut i32) == std::ptr::null_mut() {}
| ^-----------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -198,7 +198,7 @@ LL | if (&mut [1, 2] as *mut i32) == std::ptr::null_mut() {}
| expression has type `&mut [i32; 2]`
warning: references are not nullable, so checking them for null will always return false
- --> $DIR/ptr_null_checks.rs:63:8
+ --> $DIR/ptr_null_checks.rs:61:8
|
LL | if (static_i32() as *const i32).is_null() {}
| ^------------^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -206,7 +206,7 @@ LL | if (static_i32() as *const i32).is_null() {}
| expression has type `&i32`
warning: references are not nullable, so checking them for null will always return false
- --> $DIR/ptr_null_checks.rs:65:8
+ --> $DIR/ptr_null_checks.rs:63:8
|
LL | if (&*{ static_i32() } as *const i32).is_null() {}
| ^------------------^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -214,13 +214,13 @@ LL | if (&*{ static_i32() } as *const i32).is_null() {}
| expression has type `&i32`
warning: returned pointer of `as_ptr` call is never null, so checking it for null will always return false
- --> $DIR/ptr_null_checks.rs:69:8
+ --> $DIR/ptr_null_checks.rs:67:8
|
LL | if ptr::NonNull::new(&mut 8).unwrap().as_ptr().is_null() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: returned pointer of `as_ptr` call is never null, so checking it for null will always return false
- --> $DIR/ptr_null_checks.rs:71:8
+ --> $DIR/ptr_null_checks.rs:69:8
|
LL | if ptr::NonNull::<u8>::dangling().as_ptr().is_null() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/lint/reference_casting.rs b/tests/ui/lint/reference_casting.rs
index 25e0c75f7..84267c0af 100644
--- a/tests/ui/lint/reference_casting.rs
+++ b/tests/ui/lint/reference_casting.rs
@@ -1,7 +1,5 @@
// check-fail
-#![feature(ptr_from_ref)]
-
extern "C" {
// N.B., mutability can be easily incorrect in FFI calls -- as
// in C, the default is mutable pointers.
@@ -116,6 +114,13 @@ unsafe fn assign_to_ref() {
let value = num as *const i32 as *mut i32;
*value = 1;
//~^ ERROR assigning to `&T` is undefined behavior
+ let value = num as *const i32;
+ let value = value as *mut i32;
+ *value = 1;
+ //~^ ERROR assigning to `&T` is undefined behavior
+ let value = num as *const i32 as *mut i32;
+ *value = 1;
+ //~^ ERROR assigning to `&T` is undefined behavior
let value_rebind = value;
*value_rebind = 1;
//~^ ERROR assigning to `&T` is undefined behavior
diff --git a/tests/ui/lint/reference_casting.stderr b/tests/ui/lint/reference_casting.stderr
index 8d5f8da68..374a58d7b 100644
--- a/tests/ui/lint/reference_casting.stderr
+++ b/tests/ui/lint/reference_casting.stderr
@@ -1,5 +1,5 @@
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
- --> $DIR/reference_casting.rs:19:16
+ --> $DIR/reference_casting.rs:17:16
|
LL | let _num = &mut *(num as *const i32 as *mut i32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -8,7 +8,7 @@ LL | let _num = &mut *(num as *const i32 as *mut i32);
= note: `#[deny(invalid_reference_casting)]` on by default
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
- --> $DIR/reference_casting.rs:21:16
+ --> $DIR/reference_casting.rs:19:16
|
LL | let _num = &mut *(num as *const i32).cast_mut();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -16,7 +16,7 @@ LL | let _num = &mut *(num as *const i32).cast_mut();
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
- --> $DIR/reference_casting.rs:23:16
+ --> $DIR/reference_casting.rs:21:16
|
LL | let _num = &mut *std::ptr::from_ref(num).cast_mut();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -24,7 +24,7 @@ LL | let _num = &mut *std::ptr::from_ref(num).cast_mut();
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
- --> $DIR/reference_casting.rs:25:16
+ --> $DIR/reference_casting.rs:23:16
|
LL | let _num = &mut *std::ptr::from_ref({ num }).cast_mut();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -32,7 +32,7 @@ LL | let _num = &mut *std::ptr::from_ref({ num }).cast_mut();
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
- --> $DIR/reference_casting.rs:27:16
+ --> $DIR/reference_casting.rs:25:16
|
LL | let _num = &mut *{ std::ptr::from_ref(num) }.cast_mut();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -40,7 +40,7 @@ LL | let _num = &mut *{ std::ptr::from_ref(num) }.cast_mut();
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
- --> $DIR/reference_casting.rs:29:16
+ --> $DIR/reference_casting.rs:27:16
|
LL | let _num = &mut *(std::ptr::from_ref({ num }) as *mut i32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -48,7 +48,7 @@ LL | let _num = &mut *(std::ptr::from_ref({ num }) as *mut i32);
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
- --> $DIR/reference_casting.rs:31:16
+ --> $DIR/reference_casting.rs:29:16
|
LL | let _num = &mut *(num as *const i32).cast::<i32>().cast_mut();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -56,7 +56,7 @@ LL | let _num = &mut *(num as *const i32).cast::<i32>().cast_mut();
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
- --> $DIR/reference_casting.rs:33:16
+ --> $DIR/reference_casting.rs:31:16
|
LL | let _num = &mut *(num as *const i32).cast::<i32>().cast_mut().cast_const().cast_mut();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -64,7 +64,7 @@ LL | let _num = &mut *(num as *const i32).cast::<i32>().cast_mut().cast_cons
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
- --> $DIR/reference_casting.rs:35:16
+ --> $DIR/reference_casting.rs:33:16
|
LL | let _num = &mut *(std::ptr::from_ref(static_u8()) as *mut i32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -72,7 +72,7 @@ LL | let _num = &mut *(std::ptr::from_ref(static_u8()) as *mut i32);
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
- --> $DIR/reference_casting.rs:37:16
+ --> $DIR/reference_casting.rs:35:16
|
LL | let _num = &mut *std::mem::transmute::<_, *mut i32>(num);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -80,7 +80,7 @@ LL | let _num = &mut *std::mem::transmute::<_, *mut i32>(num);
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
- --> $DIR/reference_casting.rs:39:16
+ --> $DIR/reference_casting.rs:37:16
|
LL | let _num = &mut *(std::mem::transmute::<_, *mut i32>(num) as *mut i32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -88,7 +88,7 @@ LL | let _num = &mut *(std::mem::transmute::<_, *mut i32>(num) as *mut i32);
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
- --> $DIR/reference_casting.rs:41:16
+ --> $DIR/reference_casting.rs:39:16
|
LL | let _num = &mut *std::cell::UnsafeCell::raw_get(
| ________________^
@@ -100,7 +100,7 @@ LL | | );
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
- --> $DIR/reference_casting.rs:47:16
+ --> $DIR/reference_casting.rs:45:16
|
LL | let deferred = num as *const i32 as *mut i32;
| ----------------------------- casting happend here
@@ -110,7 +110,7 @@ LL | let _num = &mut *deferred;
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
- --> $DIR/reference_casting.rs:50:16
+ --> $DIR/reference_casting.rs:48:16
|
LL | let deferred = (std::ptr::from_ref(num) as *const i32 as *const i32).cast_mut() as *mut i32;
| ---------------------------------------------------------------------------- casting happend here
@@ -120,7 +120,7 @@ LL | let _num = &mut *deferred;
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
- --> $DIR/reference_casting.rs:53:16
+ --> $DIR/reference_casting.rs:51:16
|
LL | let deferred = (std::ptr::from_ref(num) as *const i32 as *const i32).cast_mut() as *mut i32;
| ---------------------------------------------------------------------------- casting happend here
@@ -131,7 +131,7 @@ LL | let _num = &mut *deferred_rebind;
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
- --> $DIR/reference_casting.rs:55:16
+ --> $DIR/reference_casting.rs:53:16
|
LL | let _num = &mut *(num as *const _ as usize as *mut i32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -139,7 +139,7 @@ LL | let _num = &mut *(num as *const _ as usize as *mut i32);
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
- --> $DIR/reference_casting.rs:57:16
+ --> $DIR/reference_casting.rs:55:16
|
LL | let _num = &mut *(std::mem::transmute::<_, *mut _>(num as *const i32) as *mut i32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -147,7 +147,7 @@ LL | let _num = &mut *(std::mem::transmute::<_, *mut _>(num as *const i32) a
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
- --> $DIR/reference_casting.rs:64:16
+ --> $DIR/reference_casting.rs:62:16
|
LL | let num = NUM as *const i32 as *mut i32;
| ----------------------------- casting happend here
@@ -158,7 +158,7 @@ LL | let _num = &mut *num;
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
- --> $DIR/reference_casting.rs:68:16
+ --> $DIR/reference_casting.rs:66:16
|
LL | let _num = &mut *(cell as *const _ as *mut i32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -167,7 +167,7 @@ LL | let _num = &mut *(cell as *const _ as *mut i32);
= note: even for types with interior mutability, the only legal way to obtain a mutable pointer from a shared reference is through `UnsafeCell::get`
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
- --> $DIR/reference_casting.rs:72:9
+ --> $DIR/reference_casting.rs:70:9
|
LL | &mut *((this as *const _) as *mut _)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -175,7 +175,7 @@ LL | &mut *((this as *const _) as *mut _)
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
- --> $DIR/reference_casting.rs:77:18
+ --> $DIR/reference_casting.rs:75:18
|
LL | unsafe { &mut *std::cell::UnsafeCell::raw_get(x as *const _ as *const _) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -183,7 +183,7 @@ LL | unsafe { &mut *std::cell::UnsafeCell::raw_get(x as *const _ as *con
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
- --> $DIR/reference_casting.rs:82:18
+ --> $DIR/reference_casting.rs:80:18
|
LL | unsafe { &mut *std::cell::UnsafeCell::raw_get(x as *const _ as *const _) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -191,7 +191,7 @@ LL | unsafe { &mut *std::cell::UnsafeCell::raw_get(x as *const _ as *con
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
- --> $DIR/reference_casting.rs:92:5
+ --> $DIR/reference_casting.rs:90:5
|
LL | *(a as *const _ as *mut _) = String::from("Replaced");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -199,7 +199,7 @@ LL | *(a as *const _ as *mut _) = String::from("Replaced");
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
- --> $DIR/reference_casting.rs:94:5
+ --> $DIR/reference_casting.rs:92:5
|
LL | *(a as *const _ as *mut String) += " world";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -207,7 +207,7 @@ LL | *(a as *const _ as *mut String) += " world";
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
- --> $DIR/reference_casting.rs:96:5
+ --> $DIR/reference_casting.rs:94:5
|
LL | *std::ptr::from_ref(num).cast_mut() += 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -215,7 +215,7 @@ LL | *std::ptr::from_ref(num).cast_mut() += 1;
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
- --> $DIR/reference_casting.rs:98:5
+ --> $DIR/reference_casting.rs:96:5
|
LL | *std::ptr::from_ref({ num }).cast_mut() += 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -223,7 +223,7 @@ LL | *std::ptr::from_ref({ num }).cast_mut() += 1;
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
- --> $DIR/reference_casting.rs:100:5
+ --> $DIR/reference_casting.rs:98:5
|
LL | *{ std::ptr::from_ref(num) }.cast_mut() += 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -231,7 +231,7 @@ LL | *{ std::ptr::from_ref(num) }.cast_mut() += 1;
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
- --> $DIR/reference_casting.rs:102:5
+ --> $DIR/reference_casting.rs:100:5
|
LL | *(std::ptr::from_ref({ num }) as *mut i32) += 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -239,7 +239,7 @@ LL | *(std::ptr::from_ref({ num }) as *mut i32) += 1;
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
- --> $DIR/reference_casting.rs:104:5
+ --> $DIR/reference_casting.rs:102:5
|
LL | *std::mem::transmute::<_, *mut i32>(num) += 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -247,7 +247,7 @@ LL | *std::mem::transmute::<_, *mut i32>(num) += 1;
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
- --> $DIR/reference_casting.rs:106:5
+ --> $DIR/reference_casting.rs:104:5
|
LL | *(std::mem::transmute::<_, *mut i32>(num) as *mut i32) += 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -255,7 +255,7 @@ LL | *(std::mem::transmute::<_, *mut i32>(num) as *mut i32) += 1;
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
- --> $DIR/reference_casting.rs:108:5
+ --> $DIR/reference_casting.rs:106:5
|
LL | / std::ptr::write(
LL | |
@@ -267,7 +267,7 @@ LL | | );
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
- --> $DIR/reference_casting.rs:113:5
+ --> $DIR/reference_casting.rs:111:5
|
LL | *((&std::cell::UnsafeCell::new(0)) as *const _ as *mut i32) = 5;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -276,7 +276,27 @@ LL | *((&std::cell::UnsafeCell::new(0)) as *const _ as *mut i32) = 5;
= note: even for types with interior mutability, the only legal way to obtain a mutable pointer from a shared reference is through `UnsafeCell::get`
error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
- --> $DIR/reference_casting.rs:117:5
+ --> $DIR/reference_casting.rs:115:5
+ |
+LL | let value = num as *const i32 as *mut i32;
+ | ----------------------------- casting happend here
+LL | *value = 1;
+ | ^^^^^^^^^^
+ |
+ = note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
+
+error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
+ --> $DIR/reference_casting.rs:119:5
+ |
+LL | let value = value as *mut i32;
+ | ----------------- casting happend here
+LL | *value = 1;
+ | ^^^^^^^^^^
+ |
+ = note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
+
+error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
+ --> $DIR/reference_casting.rs:122:5
|
LL | let value = num as *const i32 as *mut i32;
| ----------------------------- casting happend here
@@ -286,7 +306,7 @@ LL | *value = 1;
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
- --> $DIR/reference_casting.rs:120:5
+ --> $DIR/reference_casting.rs:125:5
|
LL | let value = num as *const i32 as *mut i32;
| ----------------------------- casting happend here
@@ -297,7 +317,7 @@ LL | *value_rebind = 1;
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
- --> $DIR/reference_casting.rs:122:5
+ --> $DIR/reference_casting.rs:127:5
|
LL | *(num as *const i32).cast::<i32>().cast_mut() = 2;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -305,7 +325,7 @@ LL | *(num as *const i32).cast::<i32>().cast_mut() = 2;
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
- --> $DIR/reference_casting.rs:124:5
+ --> $DIR/reference_casting.rs:129:5
|
LL | *(num as *const _ as usize as *mut i32) = 2;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -313,7 +333,7 @@ LL | *(num as *const _ as usize as *mut i32) = 2;
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
- --> $DIR/reference_casting.rs:126:5
+ --> $DIR/reference_casting.rs:131:5
|
LL | let value = num as *const i32 as *mut i32;
| ----------------------------- casting happend here
@@ -324,7 +344,7 @@ LL | std::ptr::write(value, 2);
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
- --> $DIR/reference_casting.rs:128:5
+ --> $DIR/reference_casting.rs:133:5
|
LL | let value = num as *const i32 as *mut i32;
| ----------------------------- casting happend here
@@ -335,7 +355,7 @@ LL | std::ptr::write_unaligned(value, 2);
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
- --> $DIR/reference_casting.rs:130:5
+ --> $DIR/reference_casting.rs:135:5
|
LL | let value = num as *const i32 as *mut i32;
| ----------------------------- casting happend here
@@ -346,12 +366,12 @@ LL | std::ptr::write_volatile(value, 2);
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
- --> $DIR/reference_casting.rs:134:9
+ --> $DIR/reference_casting.rs:139:9
|
LL | *(this as *const _ as *mut _) = a;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
-error: aborting due to 40 previous errors
+error: aborting due to 42 previous errors
diff --git a/tests/ui/lint/renamed-lints-still-apply.stderr b/tests/ui/lint/renamed-lints-still-apply.stderr
index e926719bb..9eaf71129 100644
--- a/tests/ui/lint/renamed-lints-still-apply.stderr
+++ b/tests/ui/lint/renamed-lints-still-apply.stderr
@@ -25,5 +25,5 @@ LL - fn _foo<'a>(_x: &'a u32) {}
LL + fn _foo(_x: &u32) {}
|
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/lint/rfc-2383-lint-reason/expect_missing_feature_gate.stderr b/tests/ui/lint/rfc-2383-lint-reason/expect_missing_feature_gate.stderr
index b5601cf9e..b8e7d61a1 100644
--- a/tests/ui/lint/rfc-2383-lint-reason/expect_missing_feature_gate.stderr
+++ b/tests/ui/lint/rfc-2383-lint-reason/expect_missing_feature_gate.stderr
@@ -7,6 +7,6 @@ LL | #[expect(unused)]
= note: see issue #54503 <https://github.com/rust-lang/rust/issues/54503> for more information
= help: add `#![feature(lint_reasons)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/lint/rfc-2383-lint-reason/expect_nested_lint_levels.stderr b/tests/ui/lint/rfc-2383-lint-reason/expect_nested_lint_levels.stderr
index 4852c3313..0e445d243 100644
--- a/tests/ui/lint/rfc-2383-lint-reason/expect_nested_lint_levels.stderr
+++ b/tests/ui/lint/rfc-2383-lint-reason/expect_nested_lint_levels.stderr
@@ -48,5 +48,5 @@ warning: this lint expectation is unfulfilled
LL | #[expect(unused_variables)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error; 4 warnings emitted
+error: aborting due to 1 previous error; 4 warnings emitted
diff --git a/tests/ui/lint/rustdoc-renamed.stderr b/tests/ui/lint/rustdoc-renamed.stderr
index 096e867aa..8491a4327 100644
--- a/tests/ui/lint/rustdoc-renamed.stderr
+++ b/tests/ui/lint/rustdoc-renamed.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(renamed_and_removed_lints)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/unaligned_references_external_macro.stderr b/tests/ui/lint/unaligned_references_external_macro.stderr
index 94a95c1d8..9945c78e8 100644
--- a/tests/ui/lint/unaligned_references_external_macro.stderr
+++ b/tests/ui/lint/unaligned_references_external_macro.stderr
@@ -14,6 +14,6 @@ LL | | }
= help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
= note: this error originates in the macro `unaligned_references_external_crate::mac` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0793`.
diff --git a/tests/ui/lint/unconditional_panic_98444.stderr b/tests/ui/lint/unconditional_panic_98444.stderr
index a34745809..29719b2da 100644
--- a/tests/ui/lint/unconditional_panic_98444.stderr
+++ b/tests/ui/lint/unconditional_panic_98444.stderr
@@ -6,5 +6,5 @@ LL | let _ = xs[7];
|
= note: `#[deny(unconditional_panic)]` on by default
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/unused/assoc-types.assoc_ty.stderr b/tests/ui/lint/unused/assoc-types.assoc_ty.stderr
new file mode 100644
index 000000000..190c4ef0c
--- /dev/null
+++ b/tests/ui/lint/unused/assoc-types.assoc_ty.stderr
@@ -0,0 +1,15 @@
+error: unused implementer of `Future` that must be used
+ --> $DIR/assoc-types.rs:19:5
+ |
+LL | T::foo();
+ | ^^^^^^^^
+ |
+ = note: futures do nothing unless you `.await` or poll them
+note: the lint level is defined here
+ --> $DIR/assoc-types.rs:4:9
+ |
+LL | #![deny(unused_must_use)]
+ | ^^^^^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/lint/unused/assoc-types.rpitit.stderr b/tests/ui/lint/unused/assoc-types.rpitit.stderr
new file mode 100644
index 000000000..190c4ef0c
--- /dev/null
+++ b/tests/ui/lint/unused/assoc-types.rpitit.stderr
@@ -0,0 +1,15 @@
+error: unused implementer of `Future` that must be used
+ --> $DIR/assoc-types.rs:19:5
+ |
+LL | T::foo();
+ | ^^^^^^^^
+ |
+ = note: futures do nothing unless you `.await` or poll them
+note: the lint level is defined here
+ --> $DIR/assoc-types.rs:4:9
+ |
+LL | #![deny(unused_must_use)]
+ | ^^^^^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/lint/unused/assoc-types.rs b/tests/ui/lint/unused/assoc-types.rs
new file mode 100644
index 000000000..cebb9b409
--- /dev/null
+++ b/tests/ui/lint/unused/assoc-types.rs
@@ -0,0 +1,23 @@
+// edition: 2021
+// revisions: rpitit assoc_ty
+
+#![deny(unused_must_use)]
+
+use std::future::Future;
+
+pub trait Tr {
+ type Fut: Future<Output = ()>;
+
+ #[cfg(rpitit)]
+ fn foo() -> impl Future<Output = ()>;
+
+ #[cfg(assoc_ty)]
+ fn foo() -> Self::Fut;
+}
+
+pub async fn bar<T: Tr>() {
+ T::foo();
+ //~^ ERROR unused implementer of `Future` that must be used
+}
+
+fn main() {}
diff --git a/tests/ui/lint/unused/issue-105061.stderr b/tests/ui/lint/unused/issue-105061.stderr
index f07aa2012..b41f14d82 100644
--- a/tests/ui/lint/unused/issue-105061.stderr
+++ b/tests/ui/lint/unused/issue-105061.stderr
@@ -16,5 +16,5 @@ LL - ((for<'a> fn(Inv<'a>)),): Trait,
LL + (for<'a> fn(Inv<'a>),): Trait,
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/unused/issue-30730.stderr b/tests/ui/lint/unused/issue-30730.stderr
index b299e99a3..c815045df 100644
--- a/tests/ui/lint/unused/issue-30730.stderr
+++ b/tests/ui/lint/unused/issue-30730.stderr
@@ -11,5 +11,5 @@ LL | #![deny(warnings)]
| ^^^^^^^^
= note: `#[deny(unused_imports)]` implied by `#[deny(warnings)]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/unused/issue-46576.stderr b/tests/ui/lint/unused/issue-46576.stderr
index 6f4d97068..44e4fb582 100644
--- a/tests/ui/lint/unused/issue-46576.stderr
+++ b/tests/ui/lint/unused/issue-46576.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(unused_imports)]
| ^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/unused/issue-59896.stderr b/tests/ui/lint/unused/issue-59896.stderr
index 95b7938ae..3e8298c6b 100644
--- a/tests/ui/lint/unused/issue-59896.stderr
+++ b/tests/ui/lint/unused/issue-59896.stderr
@@ -13,5 +13,5 @@ note: the lint level is defined here
LL | #![deny(unused_imports)]
| ^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/unused/issue-85913.stderr b/tests/ui/lint/unused/issue-85913.stderr
index 8234ed3b1..b69ac3d97 100644
--- a/tests/ui/lint/unused/issue-85913.stderr
+++ b/tests/ui/lint/unused/issue-85913.stderr
@@ -14,5 +14,5 @@ help: use `let _ = ...` to ignore the resulting value
LL | let _ = function() && return 1;
| +++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/unused/lint-unused-mut-variables.stderr b/tests/ui/lint/unused/lint-unused-mut-variables.stderr
index 5f66c0315..dcda1e530 100644
--- a/tests/ui/lint/unused/lint-unused-mut-variables.stderr
+++ b/tests/ui/lint/unused/lint-unused-mut-variables.stderr
@@ -226,5 +226,5 @@ LL | fn write_through_reference(mut arg: &mut Arg) {
| |
| help: remove this `mut`
-error: aborting due to previous error; 26 warnings emitted
+error: aborting due to 1 previous error; 26 warnings emitted
diff --git a/tests/ui/lint/unused/must_use-pin.rs b/tests/ui/lint/unused/must_use-pin.rs
new file mode 100644
index 000000000..b08515428
--- /dev/null
+++ b/tests/ui/lint/unused/must_use-pin.rs
@@ -0,0 +1,45 @@
+#![deny(unused_must_use)]
+
+use std::{ops::Deref, pin::Pin};
+
+#[must_use]
+struct MustUse;
+
+#[must_use]
+struct MustUsePtr<'a, T>(&'a T);
+
+impl<'a, T> Deref for MustUsePtr<'a, T> {
+ type Target = T;
+
+ fn deref(&self) -> &Self::Target {
+ self.0
+ }
+}
+
+fn pin_ref() -> Pin<&'static ()> {
+ Pin::new(&())
+}
+
+fn pin_ref_mut() -> Pin<&'static mut ()> {
+ Pin::new(unimplemented!())
+}
+
+fn pin_must_use_ptr() -> Pin<MustUsePtr<'static, ()>> {
+ Pin::new(MustUsePtr(&()))
+}
+
+fn pin_box() -> Pin<Box<()>> {
+ Box::pin(())
+}
+
+fn pin_box_must_use() -> Pin<Box<MustUse>> {
+ Box::pin(MustUse)
+}
+
+fn main() {
+ pin_ref();
+ pin_ref_mut();
+ pin_must_use_ptr(); //~ ERROR unused pinned `MustUsePtr` that must be used
+ pin_box();
+ pin_box_must_use(); //~ ERROR unused pinned boxed `MustUse` that must be used
+}
diff --git a/tests/ui/lint/unused/must_use-pin.stderr b/tests/ui/lint/unused/must_use-pin.stderr
new file mode 100644
index 000000000..c04f8fef4
--- /dev/null
+++ b/tests/ui/lint/unused/must_use-pin.stderr
@@ -0,0 +1,20 @@
+error: unused pinned `MustUsePtr` that must be used
+ --> $DIR/must_use-pin.rs:42:5
+ |
+LL | pin_must_use_ptr();
+ | ^^^^^^^^^^^^^^^^^^
+ |
+note: the lint level is defined here
+ --> $DIR/must_use-pin.rs:1:9
+ |
+LL | #![deny(unused_must_use)]
+ | ^^^^^^^^^^^^^^^
+
+error: unused pinned boxed `MustUse` that must be used
+ --> $DIR/must_use-pin.rs:44:5
+ |
+LL | pin_box_must_use();
+ | ^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/lint/unused/unused-macro-rules-malformed-rule.stderr b/tests/ui/lint/unused/unused-macro-rules-malformed-rule.stderr
index 797c86710..76b2a0556 100644
--- a/tests/ui/lint/unused/unused-macro-rules-malformed-rule.stderr
+++ b/tests/ui/lint/unused/unused-macro-rules-malformed-rule.stderr
@@ -4,5 +4,5 @@ error: macro rhs must be delimited
LL | () => 0;
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/unused/unused-macro-with-bad-frag-spec.stderr b/tests/ui/lint/unused/unused-macro-with-bad-frag-spec.stderr
index 6edf0a2cf..f027e169b 100644
--- a/tests/ui/lint/unused/unused-macro-with-bad-frag-spec.stderr
+++ b/tests/ui/lint/unused/unused-macro-with-bad-frag-spec.stderr
@@ -6,5 +6,5 @@ LL | ($wrong:t_ty) => ()
|
= help: valid fragment specifiers are `ident`, `block`, `stmt`, `expr`, `pat`, `ty`, `lifetime`, `literal`, `path`, `meta`, `tt`, `item` and `vis`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/unused/unused-macro-with-follow-violation.stderr b/tests/ui/lint/unused/unused-macro-with-follow-violation.stderr
index 5eced4f06..a8a41e081 100644
--- a/tests/ui/lint/unused/unused-macro-with-follow-violation.stderr
+++ b/tests/ui/lint/unused/unused-macro-with-follow-violation.stderr
@@ -6,5 +6,5 @@ LL | ($e:expr +) => ()
|
= note: allowed there are: `=>`, `,` or `;`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/unused/unused-mut-warning-captured-var.stderr b/tests/ui/lint/unused/unused-mut-warning-captured-var.stderr
index 20aeedcc2..d4fa96c10 100644
--- a/tests/ui/lint/unused/unused-mut-warning-captured-var.stderr
+++ b/tests/ui/lint/unused/unused-mut-warning-captured-var.stderr
@@ -12,5 +12,5 @@ note: the lint level is defined here
LL | #![forbid(unused_mut)]
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/unused/unused-supertrait.stderr b/tests/ui/lint/unused/unused-supertrait.stderr
index cb45add9c..c7ccf30ea 100644
--- a/tests/ui/lint/unused/unused-supertrait.stderr
+++ b/tests/ui/lint/unused/unused-supertrait.stderr
@@ -11,5 +11,5 @@ note: the lint level is defined here
LL | #![deny(unused_must_use)]
| ^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/unused_parens_json_suggestion.stderr b/tests/ui/lint/unused_parens_json_suggestion.stderr
index ea19e0cdc..4bdfee915 100644
--- a/tests/ui/lint/unused_parens_json_suggestion.stderr
+++ b/tests/ui/lint/unused_parens_json_suggestion.stderr
@@ -1,4 +1,4 @@
-{"message":"unnecessary parentheses around assigned value","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":577,"byte_end":578,"line_start":16,"line_end":16,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));
+{"$message_type":"diagnostic","message":"unnecessary parentheses around assigned value","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":577,"byte_end":578,"line_start":16,"line_end":16,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));
--> $DIR/unused_parens_json_suggestion.rs:16:14
|
LL | let _a = (1 / (2 + 3));
@@ -16,6 +16,6 @@ LL + let _a = 1 / (2 + 3);
|
"}
-{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error
+{"$message_type":"diagnostic","message":"aborting due to 1 previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 1 previous error
"}
diff --git a/tests/ui/lint/unused_parens_multibyte_recovery.stderr b/tests/ui/lint/unused_parens_multibyte_recovery.stderr
index adbf27fcc..ef4089f31 100644
--- a/tests/ui/lint/unused_parens_multibyte_recovery.stderr
+++ b/tests/ui/lint/unused_parens_multibyte_recovery.stderr
@@ -8,5 +8,5 @@ LL | fn f(){(print!(á
| |unclosed delimiter
| unclosed delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/unused_parens_remove_json_suggestion.stderr b/tests/ui/lint/unused_parens_remove_json_suggestion.stderr
index f4c6ceaf1..7521d41cc 100644
--- a/tests/ui/lint/unused_parens_remove_json_suggestion.stderr
+++ b/tests/ui/lint/unused_parens_remove_json_suggestion.stderr
@@ -1,4 +1,4 @@
-{"message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":481,"byte_end":482,"line_start":17,"line_end":17,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (_b) {
+{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":481,"byte_end":482,"line_start":17,"line_end":17,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (_b) {
--> $DIR/unused_parens_remove_json_suggestion.rs:17:8
|
LL | if (_b) {
@@ -16,7 +16,7 @@ LL + if _b {
|
"}
-{"message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":612,"byte_end":613,"line_start":28,"line_end":28,"column_start":7,"column_end":8,"is_primary":true,"text":[{"text":" if(c) {
+{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":612,"byte_end":613,"line_start":28,"line_end":28,"column_start":7,"column_end":8,"is_primary":true,"text":[{"text":" if(c) {
--> $DIR/unused_parens_remove_json_suggestion.rs:28:7
|
LL | if(c) {
@@ -29,7 +29,7 @@ LL + if c {
|
"}
-{"message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":692,"byte_end":693,"line_start":32,"line_end":32,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (c){
+{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":692,"byte_end":693,"line_start":32,"line_end":32,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (c){
--> $DIR/unused_parens_remove_json_suggestion.rs:32:8
|
LL | if (c){
@@ -42,7 +42,7 @@ LL + if c {
|
"}
-{"message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":774,"byte_end":775,"line_start":36,"line_end":36,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":788,"byte_end":789,"line_start":36,"line_end":36,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":774,"byte_end":775,"line_start":36,"line_end":36,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":788,"byte_end":789,"line_start":36,"line_end":36,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition
+{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":774,"byte_end":775,"line_start":36,"line_end":36,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":788,"byte_end":789,"line_start":36,"line_end":36,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":774,"byte_end":775,"line_start":36,"line_end":36,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":788,"byte_end":789,"line_start":36,"line_end":36,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition
--> $DIR/unused_parens_remove_json_suggestion.rs:36:11
|
LL | while (false && true){
@@ -55,7 +55,7 @@ LL + while false && true {
|
"}
-{"message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":802,"byte_end":803,"line_start":37,"line_end":37,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":" if (c) {
+{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":802,"byte_end":803,"line_start":37,"line_end":37,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":" if (c) {
--> $DIR/unused_parens_remove_json_suggestion.rs:37:12
|
LL | if (c) {
@@ -68,7 +68,7 @@ LL + if c {
|
"}
-{"message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":899,"byte_end":900,"line_start":43,"line_end":43,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" while(true && false) {
+{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":899,"byte_end":900,"line_start":43,"line_end":43,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" while(true && false) {
--> $DIR/unused_parens_remove_json_suggestion.rs:43:10
|
LL | while(true && false) {
@@ -81,7 +81,7 @@ LL + while true && false {
|
"}
-{"message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":968,"byte_end":969,"line_start":44,"line_end":44,"column_start":18,"column_end":19,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){
+{"$message_type":"diagnostic","message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":968,"byte_end":969,"line_start":44,"line_end":44,"column_start":18,"column_end":19,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){
--> $DIR/unused_parens_remove_json_suggestion.rs:44:18
|
LL | for _ in (0 .. 3){
@@ -94,7 +94,7 @@ LL + for _ in 0 .. 3 {
|
"}
-{"message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":1069,"byte_end":1070,"line_start":49,"line_end":49,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {
+{"$message_type":"diagnostic","message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":1069,"byte_end":1070,"line_start":49,"line_end":49,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {
--> $DIR/unused_parens_remove_json_suggestion.rs:49:14
|
LL | for _ in (0 .. 3) {
@@ -107,7 +107,7 @@ LL + for _ in 0 .. 3 {
|
"}
-{"message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":1128,"byte_end":1129,"line_start":50,"line_end":50,"column_start":15,"column_end":16,"is_primary":true,"text":[{"text":" while (true && false) {
+{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":1128,"byte_end":1129,"line_start":50,"line_end":50,"column_start":15,"column_end":16,"is_primary":true,"text":[{"text":" while (true && false) {
--> $DIR/unused_parens_remove_json_suggestion.rs:50:15
|
LL | while (true && false) {
@@ -120,6 +120,6 @@ LL + while true && false {
|
"}
-{"message":"aborting due to 9 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 9 previous errors
+{"$message_type":"diagnostic","message":"aborting due to 9 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 9 previous errors
"}
diff --git a/tests/ui/lint/unused_variables-issue-82488.stderr b/tests/ui/lint/unused_variables-issue-82488.stderr
index dce03a0f7..3babc94b4 100644
--- a/tests/ui/lint/unused_variables-issue-82488.stderr
+++ b/tests/ui/lint/unused_variables-issue-82488.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(unused_variables)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lint/use_suggestion_json.stderr b/tests/ui/lint/use_suggestion_json.stderr
index d17514303..7dfd269a4 100644
--- a/tests/ui/lint/use_suggestion_json.stderr
+++ b/tests/ui/lint/use_suggestion_json.stderr
@@ -1,3 +1,3 @@
-{"message":"`--error-format=pretty-json` is unstable","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: `--error-format=pretty-json` is unstable\u001b[0m
+{"$message_type":"diagnostic","message":"`--error-format=pretty-json` is unstable","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: `--error-format=pretty-json` is unstable\u001b[0m
"}
diff --git a/tests/ui/lint/wide_pointer_comparisons.rs b/tests/ui/lint/wide_pointer_comparisons.rs
new file mode 100644
index 000000000..8334575cf
--- /dev/null
+++ b/tests/ui/lint/wide_pointer_comparisons.rs
@@ -0,0 +1,138 @@
+// check-pass
+
+use std::rc::Rc;
+use std::sync::Arc;
+use std::cmp::PartialEq;
+
+struct A;
+struct B;
+
+trait T {}
+impl T for A {}
+impl T for B {}
+
+fn main() {
+ let ab = (A, B);
+ let a = &ab.0 as *const dyn T;
+ let b = &ab.1 as *const dyn T;
+
+ let _ = a == b;
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = a != b;
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = a < b;
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = a <= b;
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = a > b;
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = a >= b;
+ //~^ WARN ambiguous wide pointer comparison
+
+ let _ = PartialEq::eq(&a, &b);
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = PartialEq::ne(&a, &b);
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = a.eq(&b);
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = a.ne(&b);
+ //~^ WARN ambiguous wide pointer comparison
+
+ {
+ // &*const ?Sized
+ let a = &a;
+ let b = &b;
+
+ let _ = a == b;
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = a != b;
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = a < b;
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = a <= b;
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = a > b;
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = a >= b;
+ //~^ WARN ambiguous wide pointer comparison
+
+ let _ = PartialEq::eq(a, b);
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = PartialEq::ne(a, b);
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = PartialEq::eq(&a, &b);
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = PartialEq::ne(&a, &b);
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = a.eq(b);
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = a.ne(b);
+ //~^ WARN ambiguous wide pointer comparison
+ }
+
+ let s = "" as *const str;
+ let _ = s == s;
+ //~^ WARN ambiguous wide pointer comparison
+
+ let s = &[8, 7][..] as *const [i32];
+ let _ = s == s;
+ //~^ WARN ambiguous wide pointer comparison
+
+ fn cmp<T: ?Sized>(a: *mut T, b: *mut T) -> bool {
+ let _ = a == b;
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = a != b;
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = a < b;
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = a <= b;
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = a > b;
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = a >= b;
+ //~^ WARN ambiguous wide pointer comparison
+
+ let _ = PartialEq::eq(&a, &b);
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = PartialEq::ne(&a, &b);
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = a.eq(&b);
+ //~^ WARN ambiguous wide pointer comparison
+ let _ = a.ne(&b);
+ //~^ WARN ambiguous wide pointer comparison
+
+ let a = &a;
+ let b = &b;
+ &*a == &*b
+ //~^ WARN ambiguous wide pointer comparison
+ }
+
+ {
+ macro_rules! cmp {
+ ($a:ident, $b:ident) => { $a == $b }
+ //~^ WARN ambiguous wide pointer comparison
+ }
+
+ cmp!(a, b);
+ }
+
+ {
+ // this produce weird diagnostics
+ macro_rules! cmp {
+ ($a:expr, $b:expr) => { $a == $b }
+ //~^ WARN ambiguous wide pointer comparison
+ }
+
+ cmp!(&a, &b);
+ }
+
+ let _ = std::ptr::eq(a, b);
+ let _ = std::ptr::addr_eq(a, b);
+ let _ = a as *const () == b as *const ();
+
+ let a: Rc<dyn std::fmt::Debug> = Rc::new(1);
+ Rc::ptr_eq(&a, &a);
+
+ let a: Arc<dyn std::fmt::Debug> = Arc::new(1);
+ Arc::ptr_eq(&a, &a);
+}
diff --git a/tests/ui/lint/wide_pointer_comparisons.stderr b/tests/ui/lint/wide_pointer_comparisons.stderr
new file mode 100644
index 000000000..926b87759
--- /dev/null
+++ b/tests/ui/lint/wide_pointer_comparisons.stderr
@@ -0,0 +1,452 @@
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:19:13
+ |
+LL | let _ = a == b;
+ | ^^^^^^
+ |
+ = note: `#[warn(ambiguous_wide_pointer_comparisons)]` on by default
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = std::ptr::addr_eq(a, b);
+ | ++++++++++++++++++ ~ +
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:21:13
+ |
+LL | let _ = a != b;
+ | ^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = !std::ptr::addr_eq(a, b);
+ | +++++++++++++++++++ ~ +
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:23:13
+ |
+LL | let _ = a < b;
+ | ^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = a as *const () < b as *const ();
+ | ++++++++++++ ++++++++++++
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:25:13
+ |
+LL | let _ = a <= b;
+ | ^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = a as *const () <= b as *const ();
+ | ++++++++++++ ++++++++++++
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:27:13
+ |
+LL | let _ = a > b;
+ | ^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = a as *const () > b as *const ();
+ | ++++++++++++ ++++++++++++
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:29:13
+ |
+LL | let _ = a >= b;
+ | ^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = a as *const () >= b as *const ();
+ | ++++++++++++ ++++++++++++
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:32:13
+ |
+LL | let _ = PartialEq::eq(&a, &b);
+ | ^^^^^^^^^^^^^^^^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = std::ptr::addr_eq(a, b);
+ | ~~~~~~~~~~~~~~~~~~ ~ ~
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:34:13
+ |
+LL | let _ = PartialEq::ne(&a, &b);
+ | ^^^^^^^^^^^^^^^^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = !std::ptr::addr_eq(a, b);
+ | ~~~~~~~~~~~~~~~~~~~ ~ ~
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:36:13
+ |
+LL | let _ = a.eq(&b);
+ | ^^^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = std::ptr::addr_eq(a, b);
+ | ++++++++++++++++++ ~ ~
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:38:13
+ |
+LL | let _ = a.ne(&b);
+ | ^^^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = !std::ptr::addr_eq(a, b);
+ | +++++++++++++++++++ ~ ~
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:46:17
+ |
+LL | let _ = a == b;
+ | ^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = std::ptr::addr_eq(*a, *b);
+ | +++++++++++++++++++ ~~~ +
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:48:17
+ |
+LL | let _ = a != b;
+ | ^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = !std::ptr::addr_eq(*a, *b);
+ | ++++++++++++++++++++ ~~~ +
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:50:17
+ |
+LL | let _ = a < b;
+ | ^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = *a as *const () < *b as *const ();
+ | + ++++++++++++ + ++++++++++++
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:52:17
+ |
+LL | let _ = a <= b;
+ | ^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = *a as *const () <= *b as *const ();
+ | + ++++++++++++ + ++++++++++++
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:54:17
+ |
+LL | let _ = a > b;
+ | ^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = *a as *const () > *b as *const ();
+ | + ++++++++++++ + ++++++++++++
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:56:17
+ |
+LL | let _ = a >= b;
+ | ^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = *a as *const () >= *b as *const ();
+ | + ++++++++++++ + ++++++++++++
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:59:17
+ |
+LL | let _ = PartialEq::eq(a, b);
+ | ^^^^^^^^^^^^^^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = std::ptr::addr_eq(*a, *b);
+ | ~~~~~~~~~~~~~~~~~~~ ~~~ ~
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:61:17
+ |
+LL | let _ = PartialEq::ne(a, b);
+ | ^^^^^^^^^^^^^^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = !std::ptr::addr_eq(*a, *b);
+ | ~~~~~~~~~~~~~~~~~~~~ ~~~ ~
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:63:17
+ |
+LL | let _ = PartialEq::eq(&a, &b);
+ | ^^^^^^^^^^^^^^^^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = std::ptr::addr_eq(*a, *b);
+ | ~~~~~~~~~~~~~~~~~~~ ~~~ ~
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:65:17
+ |
+LL | let _ = PartialEq::ne(&a, &b);
+ | ^^^^^^^^^^^^^^^^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = !std::ptr::addr_eq(*a, *b);
+ | ~~~~~~~~~~~~~~~~~~~~ ~~~ ~
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:67:17
+ |
+LL | let _ = a.eq(b);
+ | ^^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = std::ptr::addr_eq(*a, *b);
+ | +++++++++++++++++++ ~~~ ~
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:69:17
+ |
+LL | let _ = a.ne(b);
+ | ^^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = !std::ptr::addr_eq(*a, *b);
+ | ++++++++++++++++++++ ~~~ ~
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:74:13
+ |
+LL | let _ = s == s;
+ | ^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = std::ptr::addr_eq(s, s);
+ | ++++++++++++++++++ ~ +
+help: use explicit `std::ptr::eq` method to compare metadata and addresses
+ |
+LL | let _ = std::ptr::eq(s, s);
+ | +++++++++++++ ~ +
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:78:13
+ |
+LL | let _ = s == s;
+ | ^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = std::ptr::addr_eq(s, s);
+ | ++++++++++++++++++ ~ +
+help: use explicit `std::ptr::eq` method to compare metadata and addresses
+ |
+LL | let _ = std::ptr::eq(s, s);
+ | +++++++++++++ ~ +
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:82:17
+ |
+LL | let _ = a == b;
+ | ^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = std::ptr::addr_eq(a, b);
+ | ++++++++++++++++++ ~ +
+help: use explicit `std::ptr::eq` method to compare metadata and addresses
+ |
+LL | let _ = std::ptr::eq(a, b);
+ | +++++++++++++ ~ +
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:84:17
+ |
+LL | let _ = a != b;
+ | ^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = !std::ptr::addr_eq(a, b);
+ | +++++++++++++++++++ ~ +
+help: use explicit `std::ptr::eq` method to compare metadata and addresses
+ |
+LL | let _ = !std::ptr::eq(a, b);
+ | ++++++++++++++ ~ +
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:86:17
+ |
+LL | let _ = a < b;
+ | ^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = a as *const () < b as *const ();
+ | ++++++++++++ ++++++++++++
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:88:17
+ |
+LL | let _ = a <= b;
+ | ^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = a as *const () <= b as *const ();
+ | ++++++++++++ ++++++++++++
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:90:17
+ |
+LL | let _ = a > b;
+ | ^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = a as *const () > b as *const ();
+ | ++++++++++++ ++++++++++++
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:92:17
+ |
+LL | let _ = a >= b;
+ | ^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = a as *const () >= b as *const ();
+ | ++++++++++++ ++++++++++++
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:95:17
+ |
+LL | let _ = PartialEq::eq(&a, &b);
+ | ^^^^^^^^^^^^^^^^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = std::ptr::addr_eq(a, b);
+ | ~~~~~~~~~~~~~~~~~~ ~ ~
+help: use explicit `std::ptr::eq` method to compare metadata and addresses
+ |
+LL | let _ = std::ptr::eq(a, b);
+ | ~~~~~~~~~~~~~ ~ ~
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:97:17
+ |
+LL | let _ = PartialEq::ne(&a, &b);
+ | ^^^^^^^^^^^^^^^^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = !std::ptr::addr_eq(a, b);
+ | ~~~~~~~~~~~~~~~~~~~ ~ ~
+help: use explicit `std::ptr::eq` method to compare metadata and addresses
+ |
+LL | let _ = !std::ptr::eq(a, b);
+ | ~~~~~~~~~~~~~~ ~ ~
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:99:17
+ |
+LL | let _ = a.eq(&b);
+ | ^^^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = std::ptr::addr_eq(a, b);
+ | ++++++++++++++++++ ~ ~
+help: use explicit `std::ptr::eq` method to compare metadata and addresses
+ |
+LL | let _ = std::ptr::eq(a, b);
+ | +++++++++++++ ~ ~
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:101:17
+ |
+LL | let _ = a.ne(&b);
+ | ^^^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | let _ = !std::ptr::addr_eq(a, b);
+ | +++++++++++++++++++ ~ ~
+help: use explicit `std::ptr::eq` method to compare metadata and addresses
+ |
+LL | let _ = !std::ptr::eq(a, b);
+ | ++++++++++++++ ~ ~
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:106:9
+ |
+LL | &*a == &*b
+ | ^^^^^^^^^^
+ |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | std::ptr::addr_eq(*a, *b)
+ | ~~~~~~~~~~~~~~~~~~ ~ +
+help: use explicit `std::ptr::eq` method to compare metadata and addresses
+ |
+LL | std::ptr::eq(*a, *b)
+ | ~~~~~~~~~~~~~ ~ +
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:112:39
+ |
+LL | ($a:ident, $b:ident) => { $a == $b }
+ | ^^^^^^^^
+...
+LL | cmp!(a, b);
+ | ---------- in this macro invocation
+ |
+ = note: this warning originates in the macro `cmp` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ |
+LL | ($a:ident, $b:ident) => { std::ptr::addr_eq($a, $b) }
+ | ++++++++++++++++++ ~ +
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+ --> $DIR/wide_pointer_comparisons.rs:122:37
+ |
+LL | ($a:expr, $b:expr) => { $a == $b }
+ | ^^
+...
+LL | cmp!(&a, &b);
+ | ------------ in this macro invocation
+ |
+ = help: use explicit `std::ptr::eq` method to compare metadata and addresses
+ = help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+ = note: this warning originates in the macro `cmp` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+warning: 37 warnings emitted
+
diff --git a/tests/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.stderr b/tests/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.stderr
index 66cdce7da..f0174560f 100644
--- a/tests/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.stderr
+++ b/tests/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.stderr
@@ -7,6 +7,6 @@ LL | let v: isize;
LL | v = 1;
| ^^^^^ cannot assign twice to immutable variable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0384`.
diff --git a/tests/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.stderr b/tests/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.stderr
index 5db9539cb..578a40e40 100644
--- a/tests/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.stderr
+++ b/tests/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.stderr
@@ -9,6 +9,6 @@ LL | v = 2;
LL | v += 1;
| ^^^^^^ cannot assign twice to immutable variable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0384`.
diff --git a/tests/ui/liveness/liveness-assign/liveness-assign-imm-local-with-drop.stderr b/tests/ui/liveness/liveness-assign/liveness-assign-imm-local-with-drop.stderr
index bb7e7e27a..2f55b50f0 100644
--- a/tests/ui/liveness/liveness-assign/liveness-assign-imm-local-with-drop.stderr
+++ b/tests/ui/liveness/liveness-assign/liveness-assign-imm-local-with-drop.stderr
@@ -10,6 +10,6 @@ LL | let b = Box::new(1);
LL | b = Box::new(2);
| ^ cannot assign twice to immutable variable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0384`.
diff --git a/tests/ui/liveness/liveness-assign/liveness-assign-imm-local-with-init.stderr b/tests/ui/liveness/liveness-assign/liveness-assign-imm-local-with-init.stderr
index 80458a70a..8eb71cd99 100644
--- a/tests/ui/liveness/liveness-assign/liveness-assign-imm-local-with-init.stderr
+++ b/tests/ui/liveness/liveness-assign/liveness-assign-imm-local-with-init.stderr
@@ -10,6 +10,6 @@ LL | let v: isize = 1;
LL | v = 2;
| ^^^^^ cannot assign twice to immutable variable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0384`.
diff --git a/tests/ui/liveness/liveness-closure-require-ret.stderr b/tests/ui/liveness/liveness-closure-require-ret.stderr
index 07b2ef6cd..b5d48f498 100644
--- a/tests/ui/liveness/liveness-closure-require-ret.stderr
+++ b/tests/ui/liveness/liveness-closure-require-ret.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | fn main() { println!("{}", force(|| {})); }
| ^^ expected `isize`, found `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/liveness/liveness-forgot-ret.stderr b/tests/ui/liveness/liveness-forgot-ret.stderr
index ddbdbdb0f..a5adadca2 100644
--- a/tests/ui/liveness/liveness-forgot-ret.stderr
+++ b/tests/ui/liveness/liveness-forgot-ret.stderr
@@ -11,6 +11,6 @@ help: consider returning the local binding `a`
LL | fn f(a: isize) -> isize { if god_exists(a) { return 5; }; a }
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/liveness/liveness-issue-2163.stderr b/tests/ui/liveness/liveness-issue-2163.stderr
index 2adc2d438..216469bf6 100644
--- a/tests/ui/liveness/liveness-issue-2163.stderr
+++ b/tests/ui/liveness/liveness-issue-2163.stderr
@@ -7,6 +7,6 @@ LL | |
LL | | });
| |_____^ expected `bool`, found `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/liveness/liveness-missing-ret2.stderr b/tests/ui/liveness/liveness-missing-ret2.stderr
index afdb733cd..8fe999e02 100644
--- a/tests/ui/liveness/liveness-missing-ret2.stderr
+++ b/tests/ui/liveness/liveness-missing-ret2.stderr
@@ -6,6 +6,6 @@ LL | fn f() -> isize {
| |
| implicitly returns `()` as its body has no tail or `return` expression
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/liveness/liveness-move-call-arg-2.stderr b/tests/ui/liveness/liveness-move-call-arg-2.stderr
index 479a086a8..f4252e1ac 100644
--- a/tests/ui/liveness/liveness-move-call-arg-2.stderr
+++ b/tests/ui/liveness/liveness-move-call-arg-2.stderr
@@ -21,6 +21,6 @@ help: consider cloning the value if the performance cost is acceptable
LL | take(x.clone());
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/liveness/liveness-move-call-arg.stderr b/tests/ui/liveness/liveness-move-call-arg.stderr
index d14cd6cb4..9697ed5cb 100644
--- a/tests/ui/liveness/liveness-move-call-arg.stderr
+++ b/tests/ui/liveness/liveness-move-call-arg.stderr
@@ -21,6 +21,6 @@ help: consider cloning the value if the performance cost is acceptable
LL | take(x.clone());
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/liveness/liveness-move-in-loop.stderr b/tests/ui/liveness/liveness-move-in-loop.stderr
index a060914f1..7180eb23b 100644
--- a/tests/ui/liveness/liveness-move-in-loop.stderr
+++ b/tests/ui/liveness/liveness-move-in-loop.stderr
@@ -21,6 +21,6 @@ help: consider cloning the value if the performance cost is acceptable
LL | x = y.clone();
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/liveness/liveness-move-in-while.stderr b/tests/ui/liveness/liveness-move-in-while.stderr
index 4dff7447d..dc48c4cc9 100644
--- a/tests/ui/liveness/liveness-move-in-while.stderr
+++ b/tests/ui/liveness/liveness-move-in-while.stderr
@@ -41,6 +41,6 @@ help: consider cloning the value if the performance cost is acceptable
LL | while true { while true { while true { x = y.clone(); x.clone(); } } }
| ++++++++
-error: aborting due to previous error; 3 warnings emitted
+error: aborting due to 1 previous error; 3 warnings emitted
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/liveness/liveness-use-after-move.stderr b/tests/ui/liveness/liveness-use-after-move.stderr
index 3accba197..eab51edca 100644
--- a/tests/ui/liveness/liveness-use-after-move.stderr
+++ b/tests/ui/liveness/liveness-use-after-move.stderr
@@ -15,6 +15,6 @@ help: consider cloning the value if the performance cost is acceptable
LL | let y = x.clone();
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/liveness/liveness-use-after-send.stderr b/tests/ui/liveness/liveness-use-after-send.stderr
index 65d55ca8f..2323451a7 100644
--- a/tests/ui/liveness/liveness-use-after-send.stderr
+++ b/tests/ui/liveness/liveness-use-after-send.stderr
@@ -19,6 +19,6 @@ help: consider cloning the value if the performance cost is acceptable
LL | send(ch, message.clone());
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/loops/issue-82916.stderr b/tests/ui/loops/issue-82916.stderr
index e6a60d7bc..5a5e9c4f0 100644
--- a/tests/ui/loops/issue-82916.stderr
+++ b/tests/ui/loops/issue-82916.stderr
@@ -16,6 +16,6 @@ help: consider iterating over a slice of the `Vec<S>`'s content to avoid moving
LL | for y in &x {
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/loops/loop-break-value-no-repeat.stderr b/tests/ui/loops/loop-break-value-no-repeat.stderr
index 605a1841c..946057d05 100644
--- a/tests/ui/loops/loop-break-value-no-repeat.stderr
+++ b/tests/ui/loops/loop-break-value-no-repeat.stderr
@@ -11,6 +11,6 @@ help: use `break` on its own without a value inside this `for` loop
LL | break
| ~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0571`.
diff --git a/tests/ui/loops/loop-else-break-with-value.stderr b/tests/ui/loops/loop-else-break-with-value.stderr
index 972e2d341..c933e0d0c 100644
--- a/tests/ui/loops/loop-else-break-with-value.stderr
+++ b/tests/ui/loops/loop-else-break-with-value.stderr
@@ -14,5 +14,5 @@ LL | | };
|
= note: consider moving this `else` clause to a separate `if` statement and use a `bool` variable to control if it should run
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/loops/loop-else-err.stderr b/tests/ui/loops/loop-else-err.stderr
index c2c5c84cd..c1cbd544a 100644
--- a/tests/ui/loops/loop-else-err.stderr
+++ b/tests/ui/loops/loop-else-err.stderr
@@ -13,5 +13,5 @@ LL | | }
|
= note: consider moving this `else` clause to a separate `if` statement and use a `bool` variable to control if it should run
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/loops/loop-else-let-else-err.stderr b/tests/ui/loops/loop-else-let-else-err.stderr
index a57c784ff..6ee77fb47 100644
--- a/tests/ui/loops/loop-else-let-else-err.stderr
+++ b/tests/ui/loops/loop-else-let-else-err.stderr
@@ -13,5 +13,5 @@ LL | | };
|
= note: consider moving this `else` clause to a separate `if` statement and use a `bool` variable to control if it should run
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/loops/loop-proper-liveness.stderr b/tests/ui/loops/loop-proper-liveness.stderr
index f9d94b681..bcd6eb353 100644
--- a/tests/ui/loops/loop-proper-liveness.stderr
+++ b/tests/ui/loops/loop-proper-liveness.stderr
@@ -13,6 +13,6 @@ help: consider assigning a value
LL | let x: i32 = 0;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/loops/loop-properly-diverging-2.stderr b/tests/ui/loops/loop-properly-diverging-2.stderr
index 1d1ae60cd..c9f27a6a6 100644
--- a/tests/ui/loops/loop-properly-diverging-2.stderr
+++ b/tests/ui/loops/loop-properly-diverging-2.stderr
@@ -12,6 +12,6 @@ help: give it a value of the expected type
LL | let x: i32 = loop { break 42 };
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/lto/debuginfo-lto.rs b/tests/ui/lto/debuginfo-lto.rs
index 43f75b034..e4beee9e7 100644
--- a/tests/ui/lto/debuginfo-lto.rs
+++ b/tests/ui/lto/debuginfo-lto.rs
@@ -7,7 +7,6 @@
// aux-build:debuginfo-lto-aux.rs
// compile-flags: -C lto -g
// no-prefer-dynamic
-// ignore-asmjs wasm2js does not support source maps yet
extern crate debuginfo_lto_aux;
diff --git a/tests/ui/lto/issue-11154.stderr b/tests/ui/lto/issue-11154.stderr
index 8eec8b37c..4d52f6c0f 100644
--- a/tests/ui/lto/issue-11154.stderr
+++ b/tests/ui/lto/issue-11154.stderr
@@ -2,5 +2,5 @@ error: cannot prefer dynamic linking when performing LTO
note: only 'staticlib', 'bin', and 'cdylib' outputs are supported with LTO
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/lto/lto-duplicate-symbols.stderr b/tests/ui/lto/lto-duplicate-symbols.stderr
index f66afa94f..7e4218452 100644
--- a/tests/ui/lto/lto-duplicate-symbols.stderr
+++ b/tests/ui/lto/lto-duplicate-symbols.stderr
@@ -2,5 +2,5 @@ warning: Linking globals named 'foo': symbol multiply defined!
error: failed to load bitcode of module "lto-duplicate-symbols2.lto_duplicate_symbols2.HASH-cgu.0.rcgu.o":
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/lub-glb/old-lub-glb-hr-noteq1.baseleak.stderr b/tests/ui/lub-glb/old-lub-glb-hr-noteq1.baseleak.stderr
index 4448f9326..0d1f9a769 100644
--- a/tests/ui/lub-glb/old-lub-glb-hr-noteq1.baseleak.stderr
+++ b/tests/ui/lub-glb/old-lub-glb-hr-noteq1.baseleak.stderr
@@ -16,6 +16,6 @@ LL | | };
= note: expected fn pointer `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`
found fn pointer `for<'a> fn(&'a u8, &'a u8) -> &'a u8`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/lub-glb/old-lub-glb-hr-noteq1.basenoleak.stderr b/tests/ui/lub-glb/old-lub-glb-hr-noteq1.basenoleak.stderr
index 0d6131135..839626535 100644
--- a/tests/ui/lub-glb/old-lub-glb-hr-noteq1.basenoleak.stderr
+++ b/tests/ui/lub-glb/old-lub-glb-hr-noteq1.basenoleak.stderr
@@ -7,6 +7,6 @@ LL | _ => y,
= note: expected fn pointer `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`
found fn pointer `for<'a> fn(&'a u8, &'a u8) -> &'a u8`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/lub-glb/old-lub-glb-hr-noteq1.leak.stderr b/tests/ui/lub-glb/old-lub-glb-hr-noteq1.leak.stderr
index dd0fdf3a1..10e3fc928 100644
--- a/tests/ui/lub-glb/old-lub-glb-hr-noteq1.leak.stderr
+++ b/tests/ui/lub-glb/old-lub-glb-hr-noteq1.leak.stderr
@@ -12,9 +12,9 @@ LL | |
LL | | };
| |_____- `match` arms have incompatible types
|
- = note: expected fn pointer `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`
- found fn pointer `for<'a> fn(&'a u8, &'a u8) -> &'a u8`
+ = note: expected fn pointer `for<'a, 'b> fn(&'a _, &'b _) -> &'a _`
+ found fn pointer `for<'a> fn(&'a _, &'a _) -> &'a _`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/lub-glb/old-lub-glb-hr-noteq1.noleak.stderr b/tests/ui/lub-glb/old-lub-glb-hr-noteq1.noleak.stderr
index cb046d0b0..bf77875fa 100644
--- a/tests/ui/lub-glb/old-lub-glb-hr-noteq1.noleak.stderr
+++ b/tests/ui/lub-glb/old-lub-glb-hr-noteq1.noleak.stderr
@@ -4,9 +4,9 @@ error[E0308]: mismatched types
LL | _ => y,
| ^ one type is more general than the other
|
- = note: expected fn pointer `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`
- found fn pointer `for<'a> fn(&'a u8, &'a u8) -> &'a u8`
+ = note: expected fn pointer `for<'a, 'b> fn(&'a _, &'b _) -> &'a _`
+ found fn pointer `for<'a> fn(&'a _, &'a _) -> &'a _`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/lub-glb/old-lub-glb-hr-noteq2.leak.stderr b/tests/ui/lub-glb/old-lub-glb-hr-noteq2.leak.stderr
index e54fcf068..1c8925e0b 100644
--- a/tests/ui/lub-glb/old-lub-glb-hr-noteq2.leak.stderr
+++ b/tests/ui/lub-glb/old-lub-glb-hr-noteq2.leak.stderr
@@ -11,9 +11,9 @@ LL | |
LL | | };
| |_____- `match` arms have incompatible types
|
- = note: expected fn pointer `for<'a> fn(&'a u8, &'a u8) -> &'a u8`
- found fn pointer `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`
+ = note: expected fn pointer `for<'a> fn(&'a _, &'a _) -> &'a _`
+ found fn pointer `for<'a, 'b> fn(&'a _, &'b _) -> &'a _`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/macros/bad-concat.stderr b/tests/ui/macros/bad-concat.stderr
index d67f3c33d..85f5994c7 100644
--- a/tests/ui/macros/bad-concat.stderr
+++ b/tests/ui/macros/bad-concat.stderr
@@ -6,5 +6,5 @@ LL | let _ = concat!(x, y, z, "bar");
|
= note: only literals (like `"foo"`, `-42` and `3.14`) can be passed to `concat!()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/bang-after-name.stderr b/tests/ui/macros/bang-after-name.stderr
index f609c4943..27853161e 100644
--- a/tests/ui/macros/bang-after-name.stderr
+++ b/tests/ui/macros/bang-after-name.stderr
@@ -4,5 +4,5 @@ error: macro names aren't followed by a `!`
LL | macro_rules! foo! {
| ^ help: remove the `!`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/best-failure.stderr b/tests/ui/macros/best-failure.stderr
index a52fc5e3d..c5f8b9abc 100644
--- a/tests/ui/macros/best-failure.stderr
+++ b/tests/ui/macros/best-failure.stderr
@@ -17,5 +17,5 @@ LL | (neg false, $self:ident) => { $self };
| ^^^^^^^^^^^
= note: this error originates in the macro `number` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/derive-in-eager-expansion-hang.stderr b/tests/ui/macros/derive-in-eager-expansion-hang.stderr
index e0a4f3878..e0f6d5b2d 100644
--- a/tests/ui/macros/derive-in-eager-expansion-hang.stderr
+++ b/tests/ui/macros/derive-in-eager-expansion-hang.stderr
@@ -18,5 +18,5 @@ help: you might be missing a string literal to format with
LL | format_args!("{}", hang!());
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/duplicate-builtin.stderr b/tests/ui/macros/duplicate-builtin.stderr
index 58accea27..887a4fbbd 100644
--- a/tests/ui/macros/duplicate-builtin.stderr
+++ b/tests/ui/macros/duplicate-builtin.stderr
@@ -16,6 +16,6 @@ LL | | /* compiler built-in */
LL | | }
| |_^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0773`.
diff --git a/tests/ui/macros/include-single-expr.stderr b/tests/ui/macros/include-single-expr.stderr
index 80eecf8f1..e99109e11 100644
--- a/tests/ui/macros/include-single-expr.stderr
+++ b/tests/ui/macros/include-single-expr.stderr
@@ -6,5 +6,5 @@ LL | 10
|
= note: `#[deny(incomplete_include)]` on by default
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/issue-100199.stderr b/tests/ui/macros/issue-100199.stderr
index 89a6f585c..89c634ce4 100644
--- a/tests/ui/macros/issue-100199.stderr
+++ b/tests/ui/macros/issue-100199.stderr
@@ -10,6 +10,6 @@ help: consider importing this trait
LL + use traits::MyTrait;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0405`.
diff --git a/tests/ui/macros/issue-102878.stderr b/tests/ui/macros/issue-102878.stderr
index 034e3731b..1971a6bd1 100644
--- a/tests/ui/macros/issue-102878.stderr
+++ b/tests/ui/macros/issue-102878.stderr
@@ -7,5 +7,5 @@ LL | macro_rules!test{($l:expr,$_:r)=>({const:y y)}
| |unclosed delimiter
| closing delimiter possibly meant for this
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/issue-105011.stderr b/tests/ui/macros/issue-105011.stderr
index e898af7fa..ae5910268 100644
--- a/tests/ui/macros/issue-105011.stderr
+++ b/tests/ui/macros/issue-105011.stderr
@@ -4,5 +4,5 @@ error: suffixes on string literals are invalid
LL | println!(""y);
| ^^^ invalid suffix `y`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/issue-109237.stderr b/tests/ui/macros/issue-109237.stderr
index d125cff63..a335786df 100644
--- a/tests/ui/macros/issue-109237.stderr
+++ b/tests/ui/macros/issue-109237.stderr
@@ -14,5 +14,5 @@ help: surround the macro invocation with `{}` to interpret the expansion as a st
LL | let _ = { statement!(); };
| ~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/issue-118048.rs b/tests/ui/macros/issue-118048.rs
new file mode 100644
index 000000000..15a834fa2
--- /dev/null
+++ b/tests/ui/macros/issue-118048.rs
@@ -0,0 +1,10 @@
+macro_rules! foo {
+ ($ty:ty) => {
+ fn foo(_: $ty, _: $ty) {}
+ }
+}
+
+foo!(_);
+//~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
+
+fn main() {}
diff --git a/tests/ui/macros/issue-118048.stderr b/tests/ui/macros/issue-118048.stderr
new file mode 100644
index 000000000..6acf78f63
--- /dev/null
+++ b/tests/ui/macros/issue-118048.stderr
@@ -0,0 +1,21 @@
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
+ --> $DIR/issue-118048.rs:7:6
+ |
+LL | foo!(_);
+ | ^
+ | |
+ | not allowed in type signatures
+ | not allowed in type signatures
+ |
+help: use type parameters instead
+ |
+LL ~ fn foo<T>(_: $ty, _: $ty) {}
+LL | }
+LL | }
+LL |
+LL ~ foo!(T);
+ |
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/ui/macros/issue-118786.rs b/tests/ui/macros/issue-118786.rs
new file mode 100644
index 000000000..84af3a651
--- /dev/null
+++ b/tests/ui/macros/issue-118786.rs
@@ -0,0 +1,16 @@
+// compile-flags: --crate-type lib -O -C debug-assertions=yes
+
+// Regression test for issue 118786
+
+macro_rules! make_macro {
+ ($macro_name:tt) => {
+ macro_rules! $macro_name {
+ //~^ ERROR macros that expand to items must be delimited with braces or followed by a semicolon
+ //~| ERROR macro expansion ignores token `{` and any following
+ //~| ERROR cannot find macro `macro_rules` in this scope
+ () => {}
+ }
+ }
+}
+
+make_macro!((meow));
diff --git a/tests/ui/macros/issue-118786.stderr b/tests/ui/macros/issue-118786.stderr
new file mode 100644
index 000000000..ca3a40f31
--- /dev/null
+++ b/tests/ui/macros/issue-118786.stderr
@@ -0,0 +1,47 @@
+error: macros that expand to items must be delimited with braces or followed by a semicolon
+ --> $DIR/issue-118786.rs:7:22
+ |
+LL | macro_rules! $macro_name {
+ | ^^^^^^^^^^^
+ |
+help: change the delimiters to curly braces
+ |
+LL | macro_rules! {} {
+ | ~ +
+help: add a semicolon
+ |
+LL | macro_rules! $macro_name; {
+ | +
+
+error: macro expansion ignores token `{` and any following
+ --> $DIR/issue-118786.rs:7:34
+ |
+LL | macro_rules! $macro_name {
+ | ^
+...
+LL | make_macro!((meow));
+ | ------------------- caused by the macro expansion here
+ |
+ = note: the usage of `make_macro!` is likely invalid in item context
+
+error: cannot find macro `macro_rules` in this scope
+ --> $DIR/issue-118786.rs:7:9
+ |
+LL | macro_rules! $macro_name {
+ | ^^^^^^^^^^^
+...
+LL | make_macro!((meow));
+ | ------------------- in this macro invocation
+ |
+note: maybe you have forgotten to define a name for this `macro_rules!`
+ --> $DIR/issue-118786.rs:7:9
+ |
+LL | macro_rules! $macro_name {
+ | ^^^^^^^^^^^
+...
+LL | make_macro!((meow));
+ | ------------------- in this macro invocation
+ = note: this error originates in the macro `make_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to 3 previous errors
+
diff --git a/tests/ui/macros/issue-16098.stderr b/tests/ui/macros/issue-16098.stderr
index 64280219d..a72499816 100644
--- a/tests/ui/macros/issue-16098.stderr
+++ b/tests/ui/macros/issue-16098.stderr
@@ -10,5 +10,5 @@ LL | println!("Problem 1: {}", prob1!(1000));
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_16098`)
= note: this error originates in the macro `prob1` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/issue-19163.stderr b/tests/ui/macros/issue-19163.stderr
index af509aa59..95af07d82 100644
--- a/tests/ui/macros/issue-19163.stderr
+++ b/tests/ui/macros/issue-19163.stderr
@@ -4,6 +4,6 @@ error[E0596]: cannot borrow data in a `&` reference as mutable
LL | mywrite!(&v, "Hello world");
| ^^ cannot borrow as mutable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/macros/issue-21356.stderr b/tests/ui/macros/issue-21356.stderr
index 17014c6ce..dd09da6df 100644
--- a/tests/ui/macros/issue-21356.stderr
+++ b/tests/ui/macros/issue-21356.stderr
@@ -6,5 +6,5 @@ LL | macro_rules! test { ($wrong:t_ty ..) => () }
|
= help: valid fragment specifiers are `ident`, `block`, `stmt`, `expr`, `pat`, `ty`, `lifetime`, `literal`, `path`, `meta`, `tt`, `item` and `vis`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/issue-26094.stderr b/tests/ui/macros/issue-26094.stderr
index ecdf48470..0b614e3e5 100644
--- a/tests/ui/macros/issue-26094.stderr
+++ b/tests/ui/macros/issue-26094.stderr
@@ -13,6 +13,6 @@ note: function defined here
LL | fn some_function() {}
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0061`.
diff --git a/tests/ui/macros/issue-29084.stderr b/tests/ui/macros/issue-29084.stderr
index f83e19213..9c33e4e84 100644
--- a/tests/ui/macros/issue-29084.stderr
+++ b/tests/ui/macros/issue-29084.stderr
@@ -19,6 +19,6 @@ LL | foo!(0u8);
| --------- in this macro invocation
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/macros/issue-35450.stderr b/tests/ui/macros/issue-35450.stderr
index f2065689f..6f06df386 100644
--- a/tests/ui/macros/issue-35450.stderr
+++ b/tests/ui/macros/issue-35450.stderr
@@ -4,5 +4,5 @@ error: expected expression, found `$`
LL | m!($t);
| ^ expected expression
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/issue-39388.stderr b/tests/ui/macros/issue-39388.stderr
index 62e7dff54..c94662c2d 100644
--- a/tests/ui/macros/issue-39388.stderr
+++ b/tests/ui/macros/issue-39388.stderr
@@ -4,5 +4,5 @@ error: expected one of: `*`, `+`, or `?`
LL | (($($a:tt)*) = ($($b:tt))*) => {
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/issue-39404.stderr b/tests/ui/macros/issue-39404.stderr
index 3886a70bb..33cafd93a 100644
--- a/tests/ui/macros/issue-39404.stderr
+++ b/tests/ui/macros/issue-39404.stderr
@@ -8,5 +8,5 @@ LL | macro_rules! m { ($i) => {} }
= note: for more information, see issue #40107 <https://github.com/rust-lang/rust/issues/40107>
= note: `#[deny(missing_fragment_specifier)]` on by default
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/issue-41776.stderr b/tests/ui/macros/issue-41776.stderr
index e06873b50..ea926e010 100644
--- a/tests/ui/macros/issue-41776.stderr
+++ b/tests/ui/macros/issue-41776.stderr
@@ -4,5 +4,5 @@ error: argument must be a string literal
LL | include!(line!());
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/issue-42954.stderr b/tests/ui/macros/issue-42954.stderr
index 396a91994..d5a8a117f 100644
--- a/tests/ui/macros/issue-42954.stderr
+++ b/tests/ui/macros/issue-42954.stderr
@@ -15,5 +15,5 @@ help: try comparing the cast value
LL | ($i as u32) < 0
| + +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/issue-54441.stderr b/tests/ui/macros/issue-54441.stderr
index bbbca211b..fb2c10313 100644
--- a/tests/ui/macros/issue-54441.stderr
+++ b/tests/ui/macros/issue-54441.stderr
@@ -9,5 +9,5 @@ LL | m!();
|
= note: the usage of `m!` is likely invalid in foreign item context
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/issue-58490.stderr b/tests/ui/macros/issue-58490.stderr
index b1f0896f3..4e7963337 100644
--- a/tests/ui/macros/issue-58490.stderr
+++ b/tests/ui/macros/issue-58490.stderr
@@ -9,6 +9,6 @@ LL | macro_rules! b { () => () }
|
= note: `b` must be defined only once in the macro namespace of this module
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0428`.
diff --git a/tests/ui/macros/issue-61053-duplicate-binder.stderr b/tests/ui/macros/issue-61053-duplicate-binder.stderr
index 5a2af45d0..7c7cb26b4 100644
--- a/tests/ui/macros/issue-61053-duplicate-binder.stderr
+++ b/tests/ui/macros/issue-61053-duplicate-binder.stderr
@@ -12,5 +12,5 @@ note: the lint level is defined here
LL | #![deny(meta_variable_misuse)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/issue-6596-1.stderr b/tests/ui/macros/issue-6596-1.stderr
index 7ab3685c5..f20d67329 100644
--- a/tests/ui/macros/issue-6596-1.stderr
+++ b/tests/ui/macros/issue-6596-1.stderr
@@ -9,5 +9,5 @@ LL | e!(foo);
|
= note: this error originates in the macro `e` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/issue-78325-inconsistent-resolution.stderr b/tests/ui/macros/issue-78325-inconsistent-resolution.stderr
index 53a0a0793..b75e4a9c9 100644
--- a/tests/ui/macros/issue-78325-inconsistent-resolution.stderr
+++ b/tests/ui/macros/issue-78325-inconsistent-resolution.stderr
@@ -9,5 +9,5 @@ LL | define_other_core!();
|
= note: this error originates in the macro `define_other_core` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/issue-83340.stderr b/tests/ui/macros/issue-83340.stderr
index 1935de02b..0a083ec1d 100644
--- a/tests/ui/macros/issue-83340.stderr
+++ b/tests/ui/macros/issue-83340.stderr
@@ -4,5 +4,5 @@ error: 1 positional argument in format string, but no arguments were given
LL | \n {} │",
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/issue-83344.stderr b/tests/ui/macros/issue-83344.stderr
index 1ef70f87a..9c404aeb4 100644
--- a/tests/ui/macros/issue-83344.stderr
+++ b/tests/ui/macros/issue-83344.stderr
@@ -4,5 +4,5 @@ error: 1 positional argument in format string, but no arguments were given
LL | println!("{}\
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/issue-84195-lint-anon-const.stderr b/tests/ui/macros/issue-84195-lint-anon-const.stderr
index 29ccd17e0..d9042adfc 100644
--- a/tests/ui/macros/issue-84195-lint-anon-const.stderr
+++ b/tests/ui/macros/issue-84195-lint-anon-const.stderr
@@ -16,7 +16,7 @@ LL | #![deny(semicolon_in_expressions_from_macros)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `len` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
Future incompatibility report: Future breakage diagnostic:
error: trailing semicolon in macro used in expression position
diff --git a/tests/ui/macros/issue-84632-eager-expansion-recursion-limit.stderr b/tests/ui/macros/issue-84632-eager-expansion-recursion-limit.stderr
index e266617bd..c395e0c91 100644
--- a/tests/ui/macros/issue-84632-eager-expansion-recursion-limit.stderr
+++ b/tests/ui/macros/issue-84632-eager-expansion-recursion-limit.stderr
@@ -10,5 +10,5 @@ LL | a!(A, A, A, A, A, A, A, A, A, A, A);
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "30"]` attribute to your crate (`issue_84632_eager_expansion_recursion_limit`)
= note: this error originates in the macro `a` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/issue-92267.stderr b/tests/ui/macros/issue-92267.stderr
index 5359f68cd..425981532 100644
--- a/tests/ui/macros/issue-92267.stderr
+++ b/tests/ui/macros/issue-92267.stderr
@@ -12,5 +12,5 @@ LL | pub fn main() { println!("🦀%%%", 0) }
| ^^
= note: printf formatting is not supported; see the documentation for `std::fmt`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/macro-attribute.stderr b/tests/ui/macros/macro-attribute.stderr
index 3316d3872..bbcaaba66 100644
--- a/tests/ui/macros/macro-attribute.stderr
+++ b/tests/ui/macros/macro-attribute.stderr
@@ -4,5 +4,5 @@ error: expected expression, found `$`
LL | #[doc = $not_there]
| ^ expected expression
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/macro-backtrace-println.stderr b/tests/ui/macros/macro-backtrace-println.stderr
index b4e2883e8..9e65cc3dc 100644
--- a/tests/ui/macros/macro-backtrace-println.stderr
+++ b/tests/ui/macros/macro-backtrace-println.stderr
@@ -9,5 +9,5 @@ LL | myprintln!("{}");
|
= note: this error originates in the macro `concat` which comes from the expansion of the macro `myprintln` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/macro-crate-nonterminal-non-root.stderr b/tests/ui/macros/macro-crate-nonterminal-non-root.stderr
index 1eca0186d..10b78d6eb 100644
--- a/tests/ui/macros/macro-crate-nonterminal-non-root.stderr
+++ b/tests/ui/macros/macro-crate-nonterminal-non-root.stderr
@@ -4,6 +4,6 @@ error[E0468]: an `extern crate` loading macros must be at the crate root
LL | extern crate macro_crate_nonterminal;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0468`.
diff --git a/tests/ui/macros/macro-in-expression-context-2.stderr b/tests/ui/macros/macro-in-expression-context-2.stderr
index d0312c485..1813a2ec7 100644
--- a/tests/ui/macros/macro-in-expression-context-2.stderr
+++ b/tests/ui/macros/macro-in-expression-context-2.stderr
@@ -13,5 +13,5 @@ help: add `;` to interpret the expansion as a statement
LL | _ => { empty!(); }
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/macro-in-expression-context.stderr b/tests/ui/macros/macro-in-expression-context.stderr
index 3f492b141..2eee63f30 100644
--- a/tests/ui/macros/macro-in-expression-context.stderr
+++ b/tests/ui/macros/macro-in-expression-context.stderr
@@ -29,7 +29,7 @@ LL | foo!()
= note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
= note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
Future incompatibility report: Future breakage diagnostic:
warning: trailing semicolon in macro used in expression position
diff --git a/tests/ui/macros/macro-inner-attributes.stderr b/tests/ui/macros/macro-inner-attributes.stderr
index 77b648615..b6e10f45e 100644
--- a/tests/ui/macros/macro-inner-attributes.stderr
+++ b/tests/ui/macros/macro-inner-attributes.stderr
@@ -9,6 +9,6 @@ help: there is a crate or module with a similar name
LL | b::bar();
| ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/macros/macro-interpolation.stderr b/tests/ui/macros/macro-interpolation.stderr
index 7ef1fcbbc..e6b39dfef 100644
--- a/tests/ui/macros/macro-interpolation.stderr
+++ b/tests/ui/macros/macro-interpolation.stderr
@@ -12,5 +12,5 @@ LL | let _: qpath!(ty, <str as !>::Owned);
|
= note: this error originates in the macro `qpath` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/macro-invalid-fragment-spec.stderr b/tests/ui/macros/macro-invalid-fragment-spec.stderr
index b04734482..919111ede 100644
--- a/tests/ui/macros/macro-invalid-fragment-spec.stderr
+++ b/tests/ui/macros/macro-invalid-fragment-spec.stderr
@@ -6,5 +6,5 @@ LL | ($x:foo) => ()
|
= help: valid fragment specifiers are `ident`, `block`, `stmt`, `expr`, `pat`, `ty`, `lifetime`, `literal`, `path`, `meta`, `tt`, `item` and `vis`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/macro-local-data-key-priv.stderr b/tests/ui/macros/macro-local-data-key-priv.stderr
index 0f412bc86..e93bd1104 100644
--- a/tests/ui/macros/macro-local-data-key-priv.stderr
+++ b/tests/ui/macros/macro-local-data-key-priv.stderr
@@ -11,6 +11,6 @@ LL | thread_local!(static baz: f64 = 0.0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `$crate::thread::local_impl::thread_local_inner` which comes from the expansion of the macro `thread_local` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/macros/macro-missing-delimiters.stderr b/tests/ui/macros/macro-missing-delimiters.stderr
index e7c37c8dd..1fe714aa7 100644
--- a/tests/ui/macros/macro-missing-delimiters.stderr
+++ b/tests/ui/macros/macro-missing-delimiters.stderr
@@ -4,5 +4,5 @@ error: invalid macro matcher; matchers must be contained in balanced delimiters
LL | baz => ()
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/macro-missing-fragment.stderr b/tests/ui/macros/macro-missing-fragment.stderr
index 2aa1e58f6..1089f67f4 100644
--- a/tests/ui/macros/macro-missing-fragment.stderr
+++ b/tests/ui/macros/macro-missing-fragment.stderr
@@ -36,5 +36,5 @@ LL | ( $name ) => {};
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #40107 <https://github.com/rust-lang/rust/issues/40107>
-error: aborting due to previous error; 3 warnings emitted
+error: aborting due to 1 previous error; 3 warnings emitted
diff --git a/tests/ui/macros/macro-name-typo.stderr b/tests/ui/macros/macro-name-typo.stderr
index d7c8aaae2..9059b10fa 100644
--- a/tests/ui/macros/macro-name-typo.stderr
+++ b/tests/ui/macros/macro-name-typo.stderr
@@ -7,5 +7,5 @@ LL | printlx!("oh noes!");
|
= note: similarly named macro `println` defined here
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/macro-non-lifetime.stderr b/tests/ui/macros/macro-non-lifetime.stderr
index e1ed87f94..9ff3d741c 100644
--- a/tests/ui/macros/macro-non-lifetime.stderr
+++ b/tests/ui/macros/macro-non-lifetime.stderr
@@ -13,5 +13,5 @@ note: while trying to match meta-variable `$x:lifetime`
LL | macro_rules! m { ($x:lifetime) => { } }
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/macro-outer-attributes.stderr b/tests/ui/macros/macro-outer-attributes.stderr
index 0418e6116..87c0655a4 100644
--- a/tests/ui/macros/macro-outer-attributes.stderr
+++ b/tests/ui/macros/macro-outer-attributes.stderr
@@ -19,6 +19,6 @@ LL - a::bar();
LL + bar();
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/macros/macro-parameter-span.stderr b/tests/ui/macros/macro-parameter-span.stderr
index 24e3e89ea..247750a8a 100644
--- a/tests/ui/macros/macro-parameter-span.stderr
+++ b/tests/ui/macros/macro-parameter-span.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `x` in this scope
LL | x
| ^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/macros/macro-path-prelude-fail-2.stderr b/tests/ui/macros/macro-path-prelude-fail-2.stderr
index 9574b7a1e..87646031c 100644
--- a/tests/ui/macros/macro-path-prelude-fail-2.stderr
+++ b/tests/ui/macros/macro-path-prelude-fail-2.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: partially resolved path in a macro
LL | Result::Ok!();
| ^^^^^^^^^^ partially resolved path in a macro
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/macros/macro-path-prelude-fail-3.stderr b/tests/ui/macros/macro-path-prelude-fail-3.stderr
index f1c3512bc..485d7b786 100644
--- a/tests/ui/macros/macro-path-prelude-fail-3.stderr
+++ b/tests/ui/macros/macro-path-prelude-fail-3.stderr
@@ -9,5 +9,5 @@ LL | inline!();
|
= note: `inline` is in scope, but it is an attribute: `#[inline]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/macro-path-prelude-fail-4.stderr b/tests/ui/macros/macro-path-prelude-fail-4.stderr
index 81c6722b5..642d9e848 100644
--- a/tests/ui/macros/macro-path-prelude-fail-4.stderr
+++ b/tests/ui/macros/macro-path-prelude-fail-4.stderr
@@ -12,5 +12,5 @@ LL | #[derive(inline)]
= help: add as non-Derive macro
`#[inline]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/macro-path-prelude-shadowing.stderr b/tests/ui/macros/macro-path-prelude-shadowing.stderr
index 4a864c2e9..e719c397f 100644
--- a/tests/ui/macros/macro-path-prelude-shadowing.stderr
+++ b/tests/ui/macros/macro-path-prelude-shadowing.stderr
@@ -14,6 +14,6 @@ LL | use m2::*; // glob-import user-defined `std`
= help: consider adding an explicit import of `std` to disambiguate
= help: or use `self::std` to refer to this module unambiguously
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0659`.
diff --git a/tests/ui/macros/macro-use-bad-args-1.stderr b/tests/ui/macros/macro-use-bad-args-1.stderr
index 4e5482a51..6d2f159a5 100644
--- a/tests/ui/macros/macro-use-bad-args-1.stderr
+++ b/tests/ui/macros/macro-use-bad-args-1.stderr
@@ -4,6 +4,6 @@ error[E0466]: bad macro import
LL | #[macro_use(foo(bar))]
| ^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0466`.
diff --git a/tests/ui/macros/macro-use-bad-args-2.stderr b/tests/ui/macros/macro-use-bad-args-2.stderr
index c958104ea..364f3da6e 100644
--- a/tests/ui/macros/macro-use-bad-args-2.stderr
+++ b/tests/ui/macros/macro-use-bad-args-2.stderr
@@ -4,6 +4,6 @@ error[E0466]: bad macro import
LL | #[macro_use(foo="bar")]
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0466`.
diff --git a/tests/ui/macros/macro-use-undef.stderr b/tests/ui/macros/macro-use-undef.stderr
index 85b86e221..adbf5274e 100644
--- a/tests/ui/macros/macro-use-undef.stderr
+++ b/tests/ui/macros/macro-use-undef.stderr
@@ -4,6 +4,6 @@ error[E0469]: imported macro not found
LL | #[macro_use(macro_two, no_way)]
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0469`.
diff --git a/tests/ui/macros/macro-use-wrong-name.stderr b/tests/ui/macros/macro-use-wrong-name.stderr
index 36339542a..89345866b 100644
--- a/tests/ui/macros/macro-use-wrong-name.stderr
+++ b/tests/ui/macros/macro-use-wrong-name.stderr
@@ -18,5 +18,5 @@ help: consider importing this macro
LL + use two_macros::macro_two;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/macro_path_as_generic_bound.stderr b/tests/ui/macros/macro_path_as_generic_bound.stderr
index 00d954d24..e25ff57e5 100644
--- a/tests/ui/macros/macro_path_as_generic_bound.stderr
+++ b/tests/ui/macros/macro_path_as_generic_bound.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: use of undeclared crate or module `m`
LL | foo!(m::m2::A);
| ^ use of undeclared crate or module `m`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/macros/macro_undefined.stderr b/tests/ui/macros/macro_undefined.stderr
index 4ab16bd10..cc3efacbc 100644
--- a/tests/ui/macros/macro_undefined.stderr
+++ b/tests/ui/macros/macro_undefined.stderr
@@ -7,5 +7,5 @@ LL | macro_rules! kl {
LL | k!();
| ^ help: a macro with a similar name exists: `kl`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/malformed_macro_lhs.stderr b/tests/ui/macros/malformed_macro_lhs.stderr
index adf64b089..0c8c4850b 100644
--- a/tests/ui/macros/malformed_macro_lhs.stderr
+++ b/tests/ui/macros/malformed_macro_lhs.stderr
@@ -4,5 +4,5 @@ error: invalid macro matcher; matchers must be contained in balanced delimiters
LL | t => (1);
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/meta-variable-depth-outside-repeat.stderr b/tests/ui/macros/meta-variable-depth-outside-repeat.stderr
index fad150cad..49b5053a0 100644
--- a/tests/ui/macros/meta-variable-depth-outside-repeat.stderr
+++ b/tests/ui/macros/meta-variable-depth-outside-repeat.stderr
@@ -4,5 +4,5 @@ error: meta-variable expression `length` with depth parameter must be called ins
LL | ${length(0)}
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/nonterminal-matching.stderr b/tests/ui/macros/nonterminal-matching.stderr
index c2b047022..499f9a763 100644
--- a/tests/ui/macros/nonterminal-matching.stderr
+++ b/tests/ui/macros/nonterminal-matching.stderr
@@ -1,6 +1,8 @@
error: no rules expected the token `enum E {}`
--> $DIR/nonterminal-matching.rs:19:10
|
+LL | macro complex_nonterminal($nt_item: item) {
+ | --------------
LL | macro n(a $nt_item b) {
| --------------------- when calling this macro
...
@@ -23,5 +25,5 @@ LL | complex_nonterminal!(enum E {});
= help: try using `:tt` instead in the macro definition
= note: this error originates in the macro `complex_nonterminal` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/not-utf8.stderr b/tests/ui/macros/not-utf8.stderr
index 7e1f2dcad..bf4704285 100644
--- a/tests/ui/macros/not-utf8.stderr
+++ b/tests/ui/macros/not-utf8.stderr
@@ -6,5 +6,5 @@ LL | include!("not-utf8.bin")
|
= note: this error originates in the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/out-of-order-shadowing.stderr b/tests/ui/macros/out-of-order-shadowing.stderr
index dedefac5c..8795f7d43 100644
--- a/tests/ui/macros/out-of-order-shadowing.stderr
+++ b/tests/ui/macros/out-of-order-shadowing.stderr
@@ -17,6 +17,6 @@ LL | macro_rules! bar { () => {} }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `define_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0659`.
diff --git a/tests/ui/macros/recovery-allowed.stderr b/tests/ui/macros/recovery-allowed.stderr
index ec036e8b1..44689853d 100644
--- a/tests/ui/macros/recovery-allowed.stderr
+++ b/tests/ui/macros/recovery-allowed.stderr
@@ -6,5 +6,5 @@ LL | please_recover! { not 1 }
| |
| help: use `!` to perform bitwise not
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/rfc-3086-metavar-expr/count-and-length-are-distinct.rs b/tests/ui/macros/rfc-3086-metavar-expr/count-and-length-are-distinct.rs
index ab8d95a41..1b8ce10cc 100644
--- a/tests/ui/macros/rfc-3086-metavar-expr/count-and-length-are-distinct.rs
+++ b/tests/ui/macros/rfc-3086-metavar-expr/count-and-length-are-distinct.rs
@@ -10,11 +10,11 @@ fn main() {
$(
// inner-most repetition
$(
- ${ignore(l)} ${index()}, ${length()},
+ ${ignore($l)} ${index()}, ${length()},
)*
- ${count(l)}, ${index()}, ${length()},
+ ${count($l)}, ${index()}, ${length()},
)*
- ${count(l)},
+ ${count($l)},
]
};
}
@@ -72,30 +72,30 @@ fn main() {
&[
$( $( $(
&[
- ${ignore(i)} ${count(i, 0)},
+ ${ignore($i)} ${count($i, 0)},
][..],
)* )* )*
$( $(
&[
- ${ignore(i)} ${count(i, 0)},
- ${ignore(i)} ${count(i, 1)},
+ ${ignore($i)} ${count($i, 0)},
+ ${ignore($i)} ${count($i, 1)},
][..],
)* )*
$(
&[
- ${ignore(i)} ${count(i, 0)},
- ${ignore(i)} ${count(i, 1)},
- ${ignore(i)} ${count(i, 2)},
+ ${ignore($i)} ${count($i, 0)},
+ ${ignore($i)} ${count($i, 1)},
+ ${ignore($i)} ${count($i, 2)},
][..],
)*
&[
- ${count(i, 0)},
- ${count(i, 1)},
- ${count(i, 2)},
- ${count(i, 3)},
+ ${count($i, 0)},
+ ${count($i, 1)},
+ ${count($i, 2)},
+ ${count($i, 3)},
][..]
][..]
}
@@ -133,23 +133,23 @@ fn main() {
&[7][..],
// (a b c) (d e f)
- &[2, 6][..],
+ &[6, 2][..],
// (g h) (i j k l m)
- &[2, 7][..],
+ &[7, 2][..],
// (n)
&[1, 1][..],
// (o) (p q) (r s)
- &[3, 5][..],
+ &[5, 3][..],
// (t u v w x y z)
- &[1, 7][..],
+ &[7, 1][..],
// [ (a b c) (d e f) ]
// [ (g h) (i j k l m) ]
// [ (n) ]
- &[3, 5, 14][..],
+ &[14, 5, 3][..],
// [ (o) (p q) (r s) ]
// [ (t u v w x y z) ]
- &[2, 4, 12][..],
+ &[12, 4, 2][..],
// {
// [ (a b c) (d e f) ]
@@ -160,7 +160,7 @@ fn main() {
// [ (o) (p q) (r s) ]
// [ (t u v w x y z) ]
// }
- &[2, 5, 9, 26][..]
+ &[26, 9, 5, 2][..]
][..]
);
@@ -170,31 +170,31 @@ fn main() {
&[
$( $( $( $(
&[
- ${ignore(i)} ${length(3)},
- ${ignore(i)} ${length(2)},
- ${ignore(i)} ${length(1)},
- ${ignore(i)} ${length(0)},
+ ${ignore($i)} ${length(3)},
+ ${ignore($i)} ${length(2)},
+ ${ignore($i)} ${length(1)},
+ ${ignore($i)} ${length(0)},
][..],
)* )* )* )*
$( $( $(
&[
- ${ignore(i)} ${length(2)},
- ${ignore(i)} ${length(1)},
- ${ignore(i)} ${length(0)},
+ ${ignore($i)} ${length(2)},
+ ${ignore($i)} ${length(1)},
+ ${ignore($i)} ${length(0)},
][..],
)* )* )*
$( $(
&[
- ${ignore(i)} ${length(1)},
- ${ignore(i)} ${length(0)},
+ ${ignore($i)} ${length(1)},
+ ${ignore($i)} ${length(0)},
][..],
)* )*
$(
&[
- ${ignore(i)} ${length(0)},
+ ${ignore($i)} ${length(0)},
][..],
)*
][..]
diff --git a/tests/ui/macros/rfc-3086-metavar-expr/feature-gate-macro_metavar_expr.rs b/tests/ui/macros/rfc-3086-metavar-expr/feature-gate-macro_metavar_expr.rs
index d05cd1b31..950e70153 100644
--- a/tests/ui/macros/rfc-3086-metavar-expr/feature-gate-macro_metavar_expr.rs
+++ b/tests/ui/macros/rfc-3086-metavar-expr/feature-gate-macro_metavar_expr.rs
@@ -5,14 +5,14 @@
/// Count the number of idents in a macro repetition.
macro_rules! count_idents {
( $( $i:ident ),* ) => {
- ${count(i)}
+ ${count($i)}
};
}
/// Count the number of idents in a 2-dimensional macro repetition.
macro_rules! count_idents_2 {
( $( [ $( $i:ident ),* ] ),* ) => {
- ${count(i)}
+ ${count($i)}
};
}
@@ -21,17 +21,17 @@ macro_rules! count_depth_limits {
( $( { $( [ $( $outer:ident : ( $( $inner:ident )* ) )* ] )* } )* ) => {
(
(
- ${count(inner)},
- ${count(inner, 0)},
- ${count(inner, 1)},
- ${count(inner, 2)},
- ${count(inner, 3)},
+ ${count($inner)},
+ ${count($inner, 0)},
+ ${count($inner, 1)},
+ ${count($inner, 2)},
+ ${count($inner, 3)},
),
(
- ${count(outer)},
- ${count(outer, 0)},
- ${count(outer, 1)},
- ${count(outer, 2)},
+ ${count($outer)},
+ ${count($outer, 0)},
+ ${count($outer, 1)},
+ ${count($outer, 2)},
),
)
};
@@ -43,7 +43,7 @@ macro_rules! count_depth_limits {
/// repetition binding.
macro_rules! enumerate_literals {
( $( ($l:stmt) ),* ) => {
- [$( ${ignore(l)} (${index()}, ${length()}) ),*]
+ [$( ${ignore($l)} (${index()}, ${length()}) ),*]
};
}
@@ -77,7 +77,7 @@ macro_rules! make_count_adders {
$(
macro_rules! $i {
( $$( $$j:ident ),* ) => {
- $b + $${count(j)}
+ $b + $${count($j)}
};
}
)*
@@ -122,7 +122,7 @@ fn main() {
[ T: (t u v w x y z) ]
}
},
- ((26, 2, 5, 9, 26), (9, 2, 5, 9))
+ ((26, 26, 9, 5, 2), (9, 9, 5, 2))
);
assert_eq!(enumerate_literals![("foo"), ("bar")], [(0, 2), (1, 2)]);
assert_eq!(
diff --git a/tests/ui/macros/rfc-3086-metavar-expr/issue-111904.rs b/tests/ui/macros/rfc-3086-metavar-expr/issue-111904.rs
index 9cc572c23..3000bfed6 100644
--- a/tests/ui/macros/rfc-3086-metavar-expr/issue-111904.rs
+++ b/tests/ui/macros/rfc-3086-metavar-expr/issue-111904.rs
@@ -1,7 +1,7 @@
#![feature(macro_metavar_expr)]
macro_rules! foo {
- ( $( $($t:ident),* );* ) => { ${count(t,)} }
+ ( $( $($t:ident),* );* ) => { ${count($t,)} }
//~^ ERROR `count` followed by a comma must have an associated
//~| ERROR expected expression, found `$`
}
diff --git a/tests/ui/macros/rfc-3086-metavar-expr/issue-111904.stderr b/tests/ui/macros/rfc-3086-metavar-expr/issue-111904.stderr
index e9317a5c3..fd53c1686 100644
--- a/tests/ui/macros/rfc-3086-metavar-expr/issue-111904.stderr
+++ b/tests/ui/macros/rfc-3086-metavar-expr/issue-111904.stderr
@@ -1,13 +1,13 @@
error: `count` followed by a comma must have an associated index indicating its depth
--> $DIR/issue-111904.rs:4:37
|
-LL | ( $( $($t:ident),* );* ) => { ${count(t,)} }
+LL | ( $( $($t:ident),* );* ) => { ${count($t,)} }
| ^^^^^
error: expected expression, found `$`
--> $DIR/issue-111904.rs:4:35
|
-LL | ( $( $($t:ident),* );* ) => { ${count(t,)} }
+LL | ( $( $($t:ident),* );* ) => { ${count($t,)} }
| ^ expected expression
...
LL | foo!(a, a; b, b);
diff --git a/tests/ui/macros/rfc-3086-metavar-expr/macro-expansion.rs b/tests/ui/macros/rfc-3086-metavar-expr/macro-expansion.rs
index b954967c4..04924f0ef 100644
--- a/tests/ui/macros/rfc-3086-metavar-expr/macro-expansion.rs
+++ b/tests/ui/macros/rfc-3086-metavar-expr/macro-expansion.rs
@@ -13,17 +13,17 @@ macro_rules! example {
( $( [ $( ( $( $x:ident )* ) )* ] )* ) => {
Example {
_indexes: &[],
- _counts: &[${count(x, 0)}, ${count(x, 1)}, ${count(x, 2)}],
+ _counts: &[${count($x, 0)}, ${count($x, 1)}, ${count($x, 2)}],
_nested: vec![
$(
Example {
_indexes: &[(${index()}, ${length()})],
- _counts: &[${count(x, 0)}, ${count(x, 1)}],
+ _counts: &[${count($x, 0)}, ${count($x, 1)}],
_nested: vec![
$(
Example {
_indexes: &[(${index(1)}, ${length(1)}), (${index()}, ${length()})],
- _counts: &[${count(x)}],
+ _counts: &[${count($x)}],
_nested: vec![
$(
Example {
@@ -34,7 +34,7 @@ macro_rules! example {
],
_counts: &[],
_nested: vec![],
- ${ignore(x)}
+ ${ignore($x)}
}
),*
]
@@ -49,9 +49,9 @@ macro_rules! example {
}
static EXPECTED: &str = concat!(
- "Example { _indexes: [], _counts: [2, 4, 13], _nested: [",
+ "Example { _indexes: [], _counts: [13, 4, 2], _nested: [",
concat!(
- "Example { _indexes: [(0, 2)], _counts: [3, 10], _nested: [",
+ "Example { _indexes: [(0, 2)], _counts: [10, 3], _nested: [",
concat!(
"Example { _indexes: [(0, 2), (0, 3)], _counts: [4], _nested: [",
concat!(
@@ -77,7 +77,7 @@ static EXPECTED: &str = concat!(
"] }",
),
"] }, ",
- "Example { _indexes: [(1, 2)], _counts: [1, 3], _nested: [",
+ "Example { _indexes: [(1, 2)], _counts: [3, 1], _nested: [",
concat!(
"Example { _indexes: [(1, 2), (0, 1)], _counts: [3], _nested: [",
concat!(
diff --git a/tests/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.rs b/tests/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.rs
index 6a0d68bd6..d195506af 100644
--- a/tests/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.rs
+++ b/tests/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.rs
@@ -3,9 +3,9 @@
macro_rules! a {
( $( { $( [ $( ( $( $foo:ident )* ) )* ] )* } )* ) => {
(
- ${count(foo, 0)},
- ${count(foo, 10)},
- //~^ ERROR depth parameter on meta-variable expression `count` must be less than 4
+ ${count($foo, 0)},
+ ${count($foo, 10)},
+ //~^ ERROR depth parameter of meta-variable expression `count` must be less than 4
)
};
}
@@ -14,10 +14,10 @@ macro_rules! b {
( $( { $( [ $( $foo:ident )* ] )* } )* ) => {
(
$( $( $(
- ${ignore(foo)}
+ ${ignore($foo)}
${index(0)},
${index(10)},
- //~^ ERROR depth parameter on meta-variable expression `index` must be less than 3
+ //~^ ERROR depth parameter of meta-variable expression `index` must be less than 3
)* )* )*
)
};
@@ -27,10 +27,10 @@ macro_rules! c {
( $( { $( $foo:ident )* } )* ) => {
(
$( $(
- ${ignore(foo)}
+ ${ignore($foo)}
${length(0)}
${length(10)}
- //~^ ERROR depth parameter on meta-variable expression `length` must be less than 2
+ //~^ ERROR depth parameter of meta-variable expression `length` must be less than 2
)* )*
)
};
diff --git a/tests/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.stderr b/tests/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.stderr
index 236122b64..f757b8af2 100644
--- a/tests/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.stderr
+++ b/tests/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.stderr
@@ -1,16 +1,16 @@
-error: depth parameter on meta-variable expression `count` must be less than 4
+error: depth parameter of meta-variable expression `count` must be less than 4
--> $DIR/out-of-bounds-arguments.rs:7:14
|
-LL | ${count(foo, 10)},
- | ^^^^^^^^^^^^^^^^
+LL | ${count($foo, 10)},
+ | ^^^^^^^^^^^^^^^^^
-error: depth parameter on meta-variable expression `index` must be less than 3
+error: depth parameter of meta-variable expression `index` must be less than 3
--> $DIR/out-of-bounds-arguments.rs:19:18
|
LL | ${index(10)},
| ^^^^^^^^^^^
-error: depth parameter on meta-variable expression `length` must be less than 2
+error: depth parameter of meta-variable expression `length` must be less than 2
--> $DIR/out-of-bounds-arguments.rs:32:18
|
LL | ${length(10)}
diff --git a/tests/ui/macros/rfc-3086-metavar-expr/required-feature.rs b/tests/ui/macros/rfc-3086-metavar-expr/required-feature.rs
index b4fef11f1..53d045700 100644
--- a/tests/ui/macros/rfc-3086-metavar-expr/required-feature.rs
+++ b/tests/ui/macros/rfc-3086-metavar-expr/required-feature.rs
@@ -1,6 +1,6 @@
macro_rules! count {
( $( $e:stmt ),* ) => {
- ${ count(e) }
+ ${ count($e) }
//~^ ERROR meta-variable expressions are unstable
};
}
@@ -19,7 +19,7 @@ macro_rules! dollar_dollar {
macro_rules! index {
( $( $e:stmt ),* ) => {
- $( ${ignore(e)} ${index()} )*
+ $( ${ignore($e)} ${index()} )*
//~^ ERROR meta-variable expressions are unstable
//~| ERROR meta-variable expressions are unstable
};
@@ -27,14 +27,14 @@ macro_rules! index {
macro_rules! ignore {
( $( $i:stmt ),* ) => {{
- 0 $( + 1 ${ignore(i)} )*
+ 0 $( + 1 ${ignore($i)} )*
//~^ ERROR meta-variable expressions are unstable
}};
}
macro_rules! length {
( $( $e:stmt ),* ) => {
- $( ${ignore(e)} ${length()} )*
+ $( ${ignore($e)} ${length()} )*
//~^ ERROR meta-variable expressions are unstable
//~| ERROR meta-variable expressions are unstable
};
diff --git a/tests/ui/macros/rfc-3086-metavar-expr/required-feature.stderr b/tests/ui/macros/rfc-3086-metavar-expr/required-feature.stderr
index ecf598b10..2c2cbb15b 100644
--- a/tests/ui/macros/rfc-3086-metavar-expr/required-feature.stderr
+++ b/tests/ui/macros/rfc-3086-metavar-expr/required-feature.stderr
@@ -1,8 +1,8 @@
error[E0658]: meta-variable expressions are unstable
--> $DIR/required-feature.rs:3:10
|
-LL | ${ count(e) }
- | ^^^^^^^^^^^^
+LL | ${ count($e) }
+ | ^^^^^^^^^^^^^
|
= note: see issue #83527 <https://github.com/rust-lang/rust/issues/83527> for more information
= help: add `#![feature(macro_metavar_expr)]` to the crate attributes to enable
@@ -46,17 +46,17 @@ LL | ( $$( $$any:tt )* ) => { $$( $$any )* };
error[E0658]: meta-variable expressions are unstable
--> $DIR/required-feature.rs:22:13
|
-LL | $( ${ignore(e)} ${index()} )*
- | ^^^^^^^^^^^
+LL | $( ${ignore($e)} ${index()} )*
+ | ^^^^^^^^^^^^
|
= note: see issue #83527 <https://github.com/rust-lang/rust/issues/83527> for more information
= help: add `#![feature(macro_metavar_expr)]` to the crate attributes to enable
error[E0658]: meta-variable expressions are unstable
- --> $DIR/required-feature.rs:22:26
+ --> $DIR/required-feature.rs:22:27
|
-LL | $( ${ignore(e)} ${index()} )*
- | ^^^^^^^^^
+LL | $( ${ignore($e)} ${index()} )*
+ | ^^^^^^^^^
|
= note: see issue #83527 <https://github.com/rust-lang/rust/issues/83527> for more information
= help: add `#![feature(macro_metavar_expr)]` to the crate attributes to enable
@@ -64,8 +64,8 @@ LL | $( ${ignore(e)} ${index()} )*
error[E0658]: meta-variable expressions are unstable
--> $DIR/required-feature.rs:30:19
|
-LL | 0 $( + 1 ${ignore(i)} )*
- | ^^^^^^^^^^^
+LL | 0 $( + 1 ${ignore($i)} )*
+ | ^^^^^^^^^^^^
|
= note: see issue #83527 <https://github.com/rust-lang/rust/issues/83527> for more information
= help: add `#![feature(macro_metavar_expr)]` to the crate attributes to enable
@@ -73,17 +73,17 @@ LL | 0 $( + 1 ${ignore(i)} )*
error[E0658]: meta-variable expressions are unstable
--> $DIR/required-feature.rs:37:13
|
-LL | $( ${ignore(e)} ${length()} )*
- | ^^^^^^^^^^^
+LL | $( ${ignore($e)} ${length()} )*
+ | ^^^^^^^^^^^^
|
= note: see issue #83527 <https://github.com/rust-lang/rust/issues/83527> for more information
= help: add `#![feature(macro_metavar_expr)]` to the crate attributes to enable
error[E0658]: meta-variable expressions are unstable
- --> $DIR/required-feature.rs:37:26
+ --> $DIR/required-feature.rs:37:27
|
-LL | $( ${ignore(e)} ${length()} )*
- | ^^^^^^^^^^
+LL | $( ${ignore($e)} ${length()} )*
+ | ^^^^^^^^^^
|
= note: see issue #83527 <https://github.com/rust-lang/rust/issues/83527> for more information
= help: add `#![feature(macro_metavar_expr)]` to the crate attributes to enable
diff --git a/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.rs b/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.rs
index fdf16442d..05c65fe86 100644
--- a/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.rs
+++ b/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.rs
@@ -5,24 +5,17 @@
// `round` = Left hand side round brackets
macro_rules! curly__no_rhs_dollar__round {
- ( $( $i:ident ),* ) => { ${ count(i) } };
+ ( $( $i:ident ),* ) => { ${ count($i) } };
}
macro_rules! curly__no_rhs_dollar__no_round {
- ( $i:ident ) => { ${ count(i) } };
+ ( $i:ident ) => { ${ count($i) } };
//~^ ERROR `count` can not be placed inside the inner-most repetition
}
-macro_rules! curly__rhs_dollar__round {
- ( $( $i:ident ),* ) => { ${ count($i) } };
- //~^ ERROR expected identifier, found `$`
- //~| ERROR expected expression, found `$`
-}
-
macro_rules! curly__rhs_dollar__no_round {
( $i:ident ) => { ${ count($i) } };
- //~^ ERROR expected identifier, found `$`
- //~| ERROR expected expression, found `$`
+ //~^ ERROR `count` can not be placed inside the inner-most repetition
}
macro_rules! no_curly__no_rhs_dollar__round {
@@ -60,16 +53,16 @@ macro_rules! extra_garbage_after_metavar {
${count() a b c}
//~^ ERROR unexpected token: a
//~| ERROR expected expression, found `$`
- ${count(i a b c)}
+ ${count($i a b c)}
//~^ ERROR unexpected token: a
- ${count(i, 1 a b c)}
+ ${count($i, 1 a b c)}
//~^ ERROR unexpected token: a
- ${count(i) a b c}
+ ${count($i) a b c}
//~^ ERROR unexpected token: a
- ${ignore(i) a b c}
+ ${ignore($i) a b c}
//~^ ERROR unexpected token: a
- ${ignore(i a b c)}
+ ${ignore($i a b c)}
//~^ ERROR unexpected token: a
${index() a b c}
@@ -100,8 +93,8 @@ macro_rules! metavar_in_the_lhs {
macro_rules! metavar_token_without_ident {
( $( $i:ident ),* ) => { ${ ignore() } };
- //~^ ERROR expected identifier
- //~| ERROR expected expression, found `$`
+ //~^ ERROR meta-variable expressions must be referenced using a dollar sign
+ //~| ERROR expected expression
}
macro_rules! metavar_with_literal_suffix {
@@ -125,14 +118,16 @@ macro_rules! open_brackets_without_tokens {
macro_rules! unknown_count_ident {
( $( $i:ident )* ) => {
${count(foo)}
- //~^ ERROR variable `foo` is not recognized in meta-variable expression
+ //~^ ERROR meta-variable expressions must be referenced using a dollar sign
+ //~| ERROR expected expression
};
}
macro_rules! unknown_ignore_ident {
( $( $i:ident )* ) => {
${ignore(bar)}
- //~^ ERROR variable `bar` is not recognized in meta-variable expression
+ //~^ ERROR meta-variable expressions must be referenced using a dollar sign
+ //~| ERROR expected expression
};
}
@@ -145,7 +140,6 @@ macro_rules! unknown_metavar {
fn main() {
curly__no_rhs_dollar__round!(a, b, c);
curly__no_rhs_dollar__no_round!(a);
- curly__rhs_dollar__round!(a, b, c);
curly__rhs_dollar__no_round!(a);
no_curly__no_rhs_dollar__round!(a, b, c);
no_curly__no_rhs_dollar__no_round!(a);
diff --git a/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.stderr b/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.stderr
index a6cff95fd..0dda38290 100644
--- a/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.stderr
+++ b/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.stderr
@@ -1,197 +1,197 @@
-error: expected identifier, found `$`
- --> $DIR/syntax-errors.rs:17:33
- |
-LL | ( $( $i:ident ),* ) => { ${ count($i) } };
- | ^^^^^ - help: try removing `$`
-
-error: expected identifier, found `$`
- --> $DIR/syntax-errors.rs:23:26
- |
-LL | ( $i:ident ) => { ${ count($i) } };
- | ^^^^^ - help: try removing `$`
-
error: unexpected token: $
- --> $DIR/syntax-errors.rs:53:8
+ --> $DIR/syntax-errors.rs:46:8
|
LL | ( $$ $a:ident ) => {
| ^
note: `$$` and meta-variable expressions are not allowed inside macro parameter definitions
- --> $DIR/syntax-errors.rs:53:8
+ --> $DIR/syntax-errors.rs:46:8
|
LL | ( $$ $a:ident ) => {
| ^
error: unexpected token: a
- --> $DIR/syntax-errors.rs:60:19
+ --> $DIR/syntax-errors.rs:53:19
|
LL | ${count() a b c}
| ^
|
note: meta-variable expression must not have trailing tokens
- --> $DIR/syntax-errors.rs:60:19
+ --> $DIR/syntax-errors.rs:53:19
|
LL | ${count() a b c}
| ^
error: unexpected token: a
- --> $DIR/syntax-errors.rs:63:19
+ --> $DIR/syntax-errors.rs:56:20
|
-LL | ${count(i a b c)}
- | ^
+LL | ${count($i a b c)}
+ | ^
|
note: meta-variable expression must not have trailing tokens
- --> $DIR/syntax-errors.rs:63:19
+ --> $DIR/syntax-errors.rs:56:20
|
-LL | ${count(i a b c)}
- | ^
+LL | ${count($i a b c)}
+ | ^
error: unexpected token: a
- --> $DIR/syntax-errors.rs:65:22
+ --> $DIR/syntax-errors.rs:58:23
|
-LL | ${count(i, 1 a b c)}
- | ^
+LL | ${count($i, 1 a b c)}
+ | ^
|
note: meta-variable expression must not have trailing tokens
- --> $DIR/syntax-errors.rs:65:22
+ --> $DIR/syntax-errors.rs:58:23
|
-LL | ${count(i, 1 a b c)}
- | ^
+LL | ${count($i, 1 a b c)}
+ | ^
error: unexpected token: a
- --> $DIR/syntax-errors.rs:67:20
+ --> $DIR/syntax-errors.rs:60:21
|
-LL | ${count(i) a b c}
- | ^
+LL | ${count($i) a b c}
+ | ^
|
note: meta-variable expression must not have trailing tokens
- --> $DIR/syntax-errors.rs:67:20
+ --> $DIR/syntax-errors.rs:60:21
|
-LL | ${count(i) a b c}
- | ^
+LL | ${count($i) a b c}
+ | ^
error: unexpected token: a
- --> $DIR/syntax-errors.rs:70:21
+ --> $DIR/syntax-errors.rs:63:22
|
-LL | ${ignore(i) a b c}
- | ^
+LL | ${ignore($i) a b c}
+ | ^
|
note: meta-variable expression must not have trailing tokens
- --> $DIR/syntax-errors.rs:70:21
+ --> $DIR/syntax-errors.rs:63:22
|
-LL | ${ignore(i) a b c}
- | ^
+LL | ${ignore($i) a b c}
+ | ^
error: unexpected token: a
- --> $DIR/syntax-errors.rs:72:20
+ --> $DIR/syntax-errors.rs:65:21
|
-LL | ${ignore(i a b c)}
- | ^
+LL | ${ignore($i a b c)}
+ | ^
|
note: meta-variable expression must not have trailing tokens
- --> $DIR/syntax-errors.rs:72:20
+ --> $DIR/syntax-errors.rs:65:21
|
-LL | ${ignore(i a b c)}
- | ^
+LL | ${ignore($i a b c)}
+ | ^
error: unexpected token: a
- --> $DIR/syntax-errors.rs:75:19
+ --> $DIR/syntax-errors.rs:68:19
|
LL | ${index() a b c}
| ^
|
note: meta-variable expression must not have trailing tokens
- --> $DIR/syntax-errors.rs:75:19
+ --> $DIR/syntax-errors.rs:68:19
|
LL | ${index() a b c}
| ^
error: unexpected token: a
- --> $DIR/syntax-errors.rs:77:19
+ --> $DIR/syntax-errors.rs:70:19
|
LL | ${index(1 a b c)}
| ^
|
note: meta-variable expression must not have trailing tokens
- --> $DIR/syntax-errors.rs:77:19
+ --> $DIR/syntax-errors.rs:70:19
|
LL | ${index(1 a b c)}
| ^
error: unexpected token: a
- --> $DIR/syntax-errors.rs:80:19
+ --> $DIR/syntax-errors.rs:73:19
|
LL | ${index() a b c}
| ^
|
note: meta-variable expression must not have trailing tokens
- --> $DIR/syntax-errors.rs:80:19
+ --> $DIR/syntax-errors.rs:73:19
|
LL | ${index() a b c}
| ^
error: unexpected token: a
- --> $DIR/syntax-errors.rs:82:19
+ --> $DIR/syntax-errors.rs:75:19
|
LL | ${index(1 a b c)}
| ^
|
note: meta-variable expression must not have trailing tokens
- --> $DIR/syntax-errors.rs:82:19
+ --> $DIR/syntax-errors.rs:75:19
|
LL | ${index(1 a b c)}
| ^
error: meta-variable expression depth must be a literal
- --> $DIR/syntax-errors.rs:89:33
+ --> $DIR/syntax-errors.rs:82:33
|
LL | ( $( $i:ident ),* ) => { ${ index(IDX) } };
| ^^^^^
error: unexpected token: {
- --> $DIR/syntax-errors.rs:95:8
+ --> $DIR/syntax-errors.rs:88:8
|
LL | ( ${ length() } ) => {
| ^^^^^^^^^^^^
note: `$$` and meta-variable expressions are not allowed inside macro parameter definitions
- --> $DIR/syntax-errors.rs:95:8
+ --> $DIR/syntax-errors.rs:88:8
|
LL | ( ${ length() } ) => {
| ^^^^^^^^^^^^
error: expected one of: `*`, `+`, or `?`
- --> $DIR/syntax-errors.rs:95:8
+ --> $DIR/syntax-errors.rs:88:8
|
LL | ( ${ length() } ) => {
| ^^^^^^^^^^^^
-error: expected identifier
- --> $DIR/syntax-errors.rs:102:33
+error: meta-variables within meta-variable expressions must be referenced using a dollar sign
+ --> $DIR/syntax-errors.rs:95:33
|
LL | ( $( $i:ident ),* ) => { ${ ignore() } };
| ^^^^^^
error: only unsuffixes integer literals are supported in meta-variable expressions
- --> $DIR/syntax-errors.rs:108:33
+ --> $DIR/syntax-errors.rs:101:33
|
LL | ( $( $i:ident ),* ) => { ${ index(1u32) } };
| ^^^^^
error: meta-variable expression parameter must be wrapped in parentheses
- --> $DIR/syntax-errors.rs:114:33
+ --> $DIR/syntax-errors.rs:107:33
|
LL | ( $( $i:ident ),* ) => { ${ count{i} } };
| ^^^^^
error: expected identifier
- --> $DIR/syntax-errors.rs:120:31
+ --> $DIR/syntax-errors.rs:113:31
|
LL | ( $( $i:ident ),* ) => { ${ {} } };
| ^^^^^^
+error: meta-variables within meta-variable expressions must be referenced using a dollar sign
+ --> $DIR/syntax-errors.rs:120:11
+ |
+LL | ${count(foo)}
+ | ^^^^^
+
+error: meta-variables within meta-variable expressions must be referenced using a dollar sign
+ --> $DIR/syntax-errors.rs:128:11
+ |
+LL | ${ignore(bar)}
+ | ^^^^^^
+
error: unrecognized meta-variable expression
- --> $DIR/syntax-errors.rs:140:33
+ --> $DIR/syntax-errors.rs:135:33
|
LL | ( $( $i:ident ),* ) => { ${ aaaaaaaaaaaaaa(i) } };
| ^^^^^^^^^^^^^^ help: supported expressions are count, ignore, index and length
@@ -199,39 +199,23 @@ LL | ( $( $i:ident ),* ) => { ${ aaaaaaaaaaaaaa(i) } };
error: `count` can not be placed inside the inner-most repetition
--> $DIR/syntax-errors.rs:12:24
|
-LL | ( $i:ident ) => { ${ count(i) } };
- | ^^^^^^^^^^^^
-
-error: expected expression, found `$`
- --> $DIR/syntax-errors.rs:17:30
- |
-LL | ( $( $i:ident ),* ) => { ${ count($i) } };
- | ^ expected expression
-...
-LL | curly__rhs_dollar__round!(a, b, c);
- | ---------------------------------- in this macro invocation
- |
- = note: this error originates in the macro `curly__rhs_dollar__round` (in Nightly builds, run with -Z macro-backtrace for more info)
+LL | ( $i:ident ) => { ${ count($i) } };
+ | ^^^^^^^^^^^^^
-error: expected expression, found `$`
- --> $DIR/syntax-errors.rs:23:23
+error: `count` can not be placed inside the inner-most repetition
+ --> $DIR/syntax-errors.rs:17:24
|
LL | ( $i:ident ) => { ${ count($i) } };
- | ^ expected expression
-...
-LL | curly__rhs_dollar__no_round!(a);
- | ------------------------------- in this macro invocation
- |
- = note: this error originates in the macro `curly__rhs_dollar__no_round` (in Nightly builds, run with -Z macro-backtrace for more info)
+ | ^^^^^^^^^^^^^
error: variable 'i' is still repeating at this depth
- --> $DIR/syntax-errors.rs:41:36
+ --> $DIR/syntax-errors.rs:34:36
|
LL | ( $( $i:ident ),* ) => { count($i) };
| ^^
error: expected expression, found `$`
- --> $DIR/syntax-errors.rs:60:9
+ --> $DIR/syntax-errors.rs:53:9
|
LL | ${count() a b c}
| ^ expected expression
@@ -242,7 +226,7 @@ LL | extra_garbage_after_metavar!(a);
= note: this error originates in the macro `extra_garbage_after_metavar` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected expression, found `$`
- --> $DIR/syntax-errors.rs:89:30
+ --> $DIR/syntax-errors.rs:82:30
|
LL | ( $( $i:ident ),* ) => { ${ index(IDX) } };
| ^ expected expression
@@ -253,7 +237,7 @@ LL | metavar_depth_is_not_literal!(a);
= note: this error originates in the macro `metavar_depth_is_not_literal` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected expression, found `$`
- --> $DIR/syntax-errors.rs:102:30
+ --> $DIR/syntax-errors.rs:95:30
|
LL | ( $( $i:ident ),* ) => { ${ ignore() } };
| ^ expected expression
@@ -264,7 +248,7 @@ LL | metavar_token_without_ident!(a);
= note: this error originates in the macro `metavar_token_without_ident` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected expression, found `$`
- --> $DIR/syntax-errors.rs:108:30
+ --> $DIR/syntax-errors.rs:101:30
|
LL | ( $( $i:ident ),* ) => { ${ index(1u32) } };
| ^ expected expression
@@ -275,7 +259,7 @@ LL | metavar_with_literal_suffix!(a);
= note: this error originates in the macro `metavar_with_literal_suffix` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected expression, found `$`
- --> $DIR/syntax-errors.rs:114:30
+ --> $DIR/syntax-errors.rs:107:30
|
LL | ( $( $i:ident ),* ) => { ${ count{i} } };
| ^ expected expression
@@ -286,7 +270,7 @@ LL | metavar_without_parens!(a);
= note: this error originates in the macro `metavar_without_parens` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected expression, found `$`
- --> $DIR/syntax-errors.rs:120:30
+ --> $DIR/syntax-errors.rs:113:30
|
LL | ( $( $i:ident ),* ) => { ${ {} } };
| ^ expected expression
@@ -296,20 +280,30 @@ LL | open_brackets_without_tokens!(a);
|
= note: this error originates in the macro `open_brackets_without_tokens` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: variable `foo` is not recognized in meta-variable expression
- --> $DIR/syntax-errors.rs:127:17
+error: expected expression, found `$`
+ --> $DIR/syntax-errors.rs:120:9
|
LL | ${count(foo)}
- | ^^^
+ | ^ expected expression
+...
+LL | unknown_count_ident!(a);
+ | ----------------------- in this macro invocation
+ |
+ = note: this error originates in the macro `unknown_count_ident` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: variable `bar` is not recognized in meta-variable expression
- --> $DIR/syntax-errors.rs:134:18
+error: expected expression, found `$`
+ --> $DIR/syntax-errors.rs:128:9
|
LL | ${ignore(bar)}
- | ^^^
+ | ^ expected expression
+...
+LL | unknown_ignore_ident!(a);
+ | ------------------------ in this macro invocation
+ |
+ = note: this error originates in the macro `unknown_ignore_ident` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected expression, found `$`
- --> $DIR/syntax-errors.rs:140:30
+ --> $DIR/syntax-errors.rs:135:30
|
LL | ( $( $i:ident ),* ) => { ${ aaaaaaaaaaaaaa(i) } };
| ^ expected expression
@@ -320,7 +314,7 @@ LL | unknown_metavar!(a);
= note: this error originates in the macro `unknown_metavar` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0425]: cannot find value `i` in this scope
- --> $DIR/syntax-errors.rs:29:36
+ --> $DIR/syntax-errors.rs:22:36
|
LL | ( $( $i:ident ),* ) => { count(i) };
| ^ not found in this scope
@@ -331,7 +325,7 @@ LL | no_curly__no_rhs_dollar__round!(a, b, c);
= note: this error originates in the macro `no_curly__no_rhs_dollar__round` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0425]: cannot find value `i` in this scope
- --> $DIR/syntax-errors.rs:35:29
+ --> $DIR/syntax-errors.rs:28:29
|
LL | ( $i:ident ) => { count(i) };
| ^ not found in this scope
@@ -342,13 +336,13 @@ LL | no_curly__no_rhs_dollar__no_round!(a);
= note: this error originates in the macro `no_curly__no_rhs_dollar__no_round` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0425]: cannot find value `a` in this scope
- --> $DIR/syntax-errors.rs:153:37
+ --> $DIR/syntax-errors.rs:147:37
|
LL | no_curly__rhs_dollar__no_round!(a);
| ^ not found in this scope
error[E0425]: cannot find function `count` in this scope
- --> $DIR/syntax-errors.rs:29:30
+ --> $DIR/syntax-errors.rs:22:30
|
LL | ( $( $i:ident ),* ) => { count(i) };
| ^^^^^ not found in this scope
@@ -359,7 +353,7 @@ LL | no_curly__no_rhs_dollar__round!(a, b, c);
= note: this error originates in the macro `no_curly__no_rhs_dollar__round` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0425]: cannot find function `count` in this scope
- --> $DIR/syntax-errors.rs:35:23
+ --> $DIR/syntax-errors.rs:28:23
|
LL | ( $i:ident ) => { count(i) };
| ^^^^^ not found in this scope
@@ -370,7 +364,7 @@ LL | no_curly__no_rhs_dollar__no_round!(a);
= note: this error originates in the macro `no_curly__no_rhs_dollar__no_round` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0425]: cannot find function `count` in this scope
- --> $DIR/syntax-errors.rs:46:23
+ --> $DIR/syntax-errors.rs:39:23
|
LL | ( $i:ident ) => { count($i) };
| ^^^^^ not found in this scope
@@ -380,6 +374,6 @@ LL | no_curly__rhs_dollar__no_round!(a);
|
= note: this error originates in the macro `no_curly__rhs_dollar__no_round` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to 40 previous errors
+error: aborting due to 39 previous errors
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/macros/span-covering-argument-1.stderr b/tests/ui/macros/span-covering-argument-1.stderr
index e57347b36..9ad2bc73a 100644
--- a/tests/ui/macros/span-covering-argument-1.stderr
+++ b/tests/ui/macros/span-covering-argument-1.stderr
@@ -13,6 +13,6 @@ help: consider changing this to be mutable
LL | let mut $s = 0;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/macros/stringify.rs b/tests/ui/macros/stringify.rs
index 70ca00285..6fc12509a 100644
--- a/tests/ui/macros/stringify.rs
+++ b/tests/ui/macros/stringify.rs
@@ -10,7 +10,10 @@
#![feature(coroutines)]
#![feature(decl_macro)]
#![feature(explicit_tail_calls)]
+#![feature(if_let_guard)]
+#![feature(let_chains)]
#![feature(more_qualified_paths)]
+#![feature(never_patterns)]
#![feature(raw_ref_op)]
#![feature(trait_alias)]
#![feature(try_blocks)]
@@ -46,7 +49,7 @@ macro_rules! c1 {
// easy to find the cases where the two pretty-printing approaches give
// different results.
macro_rules! c2 {
- ($frag:ident, [$($tt:tt)*], $s1:literal, $s2:literal) => {
+ ($frag:ident, [$($tt:tt)*], $s1:literal, $s2:literal $(,)?) => {
assert_ne!($s1, $s2, "should use `c1!` instead");
assert_eq!($frag!($($tt)*), $s1);
assert_eq!(stringify!($($tt)*), $s2);
@@ -58,19 +61,13 @@ fn test_block() {
c1!(block, [ {} ], "{}");
c1!(block, [ { true } ], "{ true }");
c1!(block, [ { return } ], "{ return }");
- c2!(block, [ {
- return;
- } ],
- "{ return; }",
- "{ return ; }"
- );
- c2!(block,
+ c1!(block, [ { return; } ], "{ return; }");
+ c1!(block,
[ {
let _;
true
} ],
- "{ let _; true }",
- "{ let _ ; true }"
+ "{ let _; true }"
);
}
@@ -87,17 +84,18 @@ fn test_expr() {
// ExprKind::Call
c1!(expr, [ f() ], "f()");
- c2!(expr, [ f::<u8>() ], "f::<u8>()", "f :: < u8 > ()");
- c2!(expr, [ f::<1>() ], "f::<1>()", "f :: < 1 > ()");
- c2!(expr, [ f::<'a, u8, 1>() ], "f::<'a, u8, 1>()", "f :: < 'a, u8, 1 > ()");
+ c1!(expr, [ f::<u8>() ], "f::<u8>()");
+ c2!(expr, [ f :: < u8>( ) ], "f::<u8>()", "f :: < u8>()");
+ c1!(expr, [ f::<1>() ], "f::<1>()");
+ c1!(expr, [ f::<'a, u8, 1>() ], "f::<'a, u8, 1>()");
c1!(expr, [ f(true) ], "f(true)");
c2!(expr, [ f(true,) ], "f(true)", "f(true,)");
- c2!(expr, [ ()() ], "()()", "() ()");
+ c1!(expr, [ ()() ], "()()");
// ExprKind::MethodCall
c1!(expr, [ x.f() ], "x.f()");
- c2!(expr, [ x.f::<u8>() ], "x.f::<u8>()", "x.f :: < u8 > ()");
- c2!(expr, [ x.collect::<Vec<_>>() ], "x.collect::<Vec<_>>()", "x.collect :: < Vec < _ >> ()");
+ c1!(expr, [ x.f::<u8>() ], "x.f::<u8>()");
+ c1!(expr, [ x.collect::<Vec<_>>() ], "x.collect::<Vec<_>>()");
// ExprKind::Tup
c1!(expr, [ () ], "()");
@@ -109,18 +107,14 @@ fn test_expr() {
c1!(expr, [ true || false ], "true || false");
c1!(expr, [ true || false && false ], "true || false && false");
c1!(expr, [ a < 1 && 2 < b && c > 3 && 4 > d ], "a < 1 && 2 < b && c > 3 && 4 > d");
- c2!(expr, [ a & b & !c ], "a & b & !c", "a & b &! c"); // FIXME
- c2!(expr,
- [ a + b * c - d + -1 * -2 - -3],
- "a + b * c - d + -1 * -2 - -3",
- "a + b * c - d + - 1 * - 2 - - 3"
- );
- c2!(expr, [ x = !y ], "x = !y", "x =! y"); // FIXME
+ c2!(expr, [ a & b & !c ], "a & b & !c", "a & b &!c"); // FIXME
+ c1!(expr, [ a + b * c - d + -1 * -2 - -3], "a + b * c - d + -1 * -2 - -3");
+ c2!(expr, [ x = !y ], "x = !y", "x =!y"); // FIXME
// ExprKind::Unary
- c2!(expr, [ *expr ], "*expr", "* expr");
- c2!(expr, [ !expr ], "!expr", "! expr");
- c2!(expr, [ -expr ], "-expr", "- expr");
+ c1!(expr, [ *expr ], "*expr");
+ c1!(expr, [ !expr ], "!expr");
+ c1!(expr, [ -expr ], "-expr");
// ExprKind::Lit
c1!(expr, [ 'x' ], "'x'");
@@ -129,21 +123,34 @@ fn test_expr() {
// ExprKind::Cast
c1!(expr, [ expr as T ], "expr as T");
- c2!(expr, [ expr as T<u8> ], "expr as T<u8>", "expr as T < u8 >");
+ c1!(expr, [ expr as T<u8> ], "expr as T<u8>");
// ExprKind::Type: there is no syntax for type ascription.
// ExprKind::Let
c1!(expr, [ if let Some(a) = b { c } else { d } ], "if let Some(a) = b { c } else { d }");
+ c1!(expr, [ if let _ = true && false {} ], "if let _ = true && false {}");
+ c1!(expr, [ if let _ = (true && false) {} ], "if let _ = (true && false) {}");
+ macro_rules! c2_if_let {
+ ($expr:expr, $expr_expected:expr, $tokens_expected:expr $(,)?) => {
+ c2!(expr, [ if let _ = $expr {} ], $expr_expected, $tokens_expected);
+ };
+ }
+ c2_if_let!(
+ true && false,
+ "if let _ = (true && false) {}",
+ "if let _ = true && false {}",
+ );
+ c2!(expr,
+ [ match () { _ if let _ = Struct {} => {} } ],
+ "match () { _ if let _ = Struct {} => {} }",
+ "match() { _ if let _ = Struct {} => {} }",
+ );
// ExprKind::If
c1!(expr, [ if true {} ], "if true {}");
- c2!(expr, [ if !true {} ], "if !true {}", "if! true {}"); // FIXME
- c2!(expr,
- [ if ::std::blah() { } else { } ],
- "if ::std::blah() {} else {}",
- "if :: std :: blah() {} else {}"
- );
+ c2!(expr, [ if !true {} ], "if !true {}", "if!true {}"); // FIXME
+ c1!(expr, [ if ::std::blah() { } else { } ], "if ::std::blah() {} else {}");
c1!(expr, [ if let true = true {} else {} ], "if let true = true {} else {}");
c1!(expr,
[ if true {
@@ -158,7 +165,7 @@ fn test_expr() {
} ],
"if true {} else if false {} else {}"
);
- c2!(expr,
+ c1!(expr,
[ if true {
return;
} else if false {
@@ -166,22 +173,21 @@ fn test_expr() {
} else {
0
} ],
- "if true { return; } else if false { 0 } else { 0 }",
- "if true { return ; } else if false { 0 } else { 0 }"
+ "if true { return; } else if false { 0 } else { 0 }"
);
// ExprKind::While
c1!(expr, [ while true {} ], "while true {}");
- c2!(expr, [ 'a: while true {} ], "'a: while true {}", "'a : while true {}");
+ c1!(expr, [ 'a: while true {} ], "'a: while true {}");
c1!(expr, [ while let true = true {} ], "while let true = true {}");
// ExprKind::ForLoop
c1!(expr, [ for _ in x {} ], "for _ in x {}");
- c2!(expr, [ 'a: for _ in x {} ], "'a: for _ in x {}", "'a : for _ in x {}");
+ c1!(expr, [ 'a: for _ in x {} ], "'a: for _ in x {}");
// ExprKind::Loop
c1!(expr, [ loop {} ], "loop {}");
- c2!(expr, [ 'a: loop {} ], "'a: loop {}", "'a : loop {}");
+ c1!(expr, [ 'a: loop {} ], "'a: loop {}");
// ExprKind::Match
c1!(expr, [ match self {} ], "match self {}");
@@ -201,8 +207,8 @@ fn test_expr() {
// ExprKind::Closure
c1!(expr, [ || {} ], "|| {}");
- c2!(expr, [ |x| {} ], "|x| {}", "| x | {}");
- c2!(expr, [ |x: u8| {} ], "|x: u8| {}", "| x : u8 | {}");
+ c1!(expr, [ |x| {} ], "|x| {}");
+ c1!(expr, [ |x: u8| {} ], "|x: u8| {}");
c1!(expr, [ || () ], "|| ()");
c1!(expr, [ move || self ], "move || self");
c1!(expr, [ async || self ], "async || self");
@@ -217,7 +223,7 @@ fn test_expr() {
// ExprKind::Block
c1!(expr, [ {} ], "{}");
c1!(expr, [ unsafe {} ], "unsafe {}");
- c2!(expr, [ 'a: {} ], "'a: {}", "'a : {}");
+ c1!(expr, [ 'a: {} ], "'a: {}");
c1!(expr, [ #[attr] {} ], "#[attr] {}");
c2!(expr,
[
@@ -228,7 +234,7 @@ fn test_expr() {
"{\n\
\x20 #![attr]\n\
}",
- "{ #! [attr] }"
+ "{ #![attr] }"
);
// ExprKind::Async
@@ -252,34 +258,35 @@ fn test_expr() {
c1!(expr, [ expr.0 ], "expr.0");
// ExprKind::Index
- c2!(expr, [ expr[true] ], "expr[true]", "expr [true]");
+ c1!(expr, [ expr[true] ], "expr[true]");
// ExprKind::Range
c1!(expr, [ .. ], "..");
- c2!(expr, [ ..hi ], "..hi", ".. hi");
- c2!(expr, [ lo.. ], "lo..", "lo ..");
- c2!(expr, [ lo..hi ], "lo..hi", "lo .. hi");
- c2!(expr, [ ..=hi ], "..=hi", "..= hi");
- c2!(expr, [ lo..=hi ], "lo..=hi", "lo ..= hi");
- c2!(expr, [ -2..=-1 ], "-2..=-1", "- 2 ..= - 1");
+ c1!(expr, [ ..hi ], "..hi");
+ c1!(expr, [ lo.. ], "lo..");
+ c1!(expr, [ lo..hi ], "lo..hi");
+ c2!(expr, [ lo .. hi ], "lo..hi", "lo .. hi");
+ c1!(expr, [ ..=hi ], "..=hi");
+ c1!(expr, [ lo..=hi ], "lo..=hi");
+ c1!(expr, [ -2..=-1 ], "-2..=-1");
// ExprKind::Underscore
// FIXME: todo
// ExprKind::Path
c1!(expr, [ thing ], "thing");
- c2!(expr, [ m::thing ], "m::thing", "m :: thing");
- c2!(expr, [ self::thing ], "self::thing", "self :: thing");
- c2!(expr, [ crate::thing ], "crate::thing", "crate :: thing");
- c2!(expr, [ Self::thing ], "Self::thing", "Self :: thing");
- c2!(expr, [ <Self as T>::thing ], "<Self as T>::thing", "< Self as T > :: thing");
- c2!(expr, [ Self::<'static> ], "Self::<'static>", "Self :: < 'static >");
+ c1!(expr, [ m::thing ], "m::thing");
+ c1!(expr, [ self::thing ], "self::thing");
+ c1!(expr, [ crate::thing ], "crate::thing");
+ c1!(expr, [ Self::thing ], "Self::thing");
+ c1!(expr, [ <Self as T>::thing ], "<Self as T>::thing");
+ c1!(expr, [ Self::<'static> ], "Self::<'static>");
// ExprKind::AddrOf
- c2!(expr, [ &expr ], "&expr", "& expr");
- c2!(expr, [ &mut expr ], "&mut expr", "& mut expr");
- c2!(expr, [ &raw const expr ], "&raw const expr", "& raw const expr");
- c2!(expr, [ &raw mut expr ], "&raw mut expr", "& raw mut expr");
+ c1!(expr, [ &expr ], "&expr");
+ c1!(expr, [ &mut expr ], "&mut expr");
+ c1!(expr, [ &raw const expr ], "&raw const expr");
+ c1!(expr, [ &raw mut expr ], "&raw mut expr");
// ExprKind::Break
c1!(expr, [ break ], "break");
@@ -300,38 +307,30 @@ fn test_expr() {
// ExprKind::OffsetOf: untestable because this test works pre-expansion.
// ExprKind::MacCall
- c2!(expr, [ mac!(...) ], "mac!(...)", "mac! (...)");
- c2!(expr, [ mac![...] ], "mac![...]", "mac! [...]");
+ c1!(expr, [ mac!(...) ], "mac!(...)");
+ c1!(expr, [ mac![...] ], "mac![...]");
c1!(expr, [ mac! { ... } ], "mac! { ... }");
// ExprKind::Struct
c1!(expr, [ Struct {} ], "Struct {}");
- c2!(expr,
- [ <Struct as Trait>::Type {} ],
- "<Struct as Trait>::Type {}",
- "< Struct as Trait > :: Type {}"
- );
+ c1!(expr, [ <Struct as Trait>::Type {} ], "<Struct as Trait>::Type {}");
c1!(expr, [ Struct { .. } ], "Struct { .. }");
- c2!(expr, [ Struct { ..base } ], "Struct { ..base }", "Struct { .. base }");
+ c1!(expr, [ Struct { ..base } ], "Struct { ..base }");
c1!(expr, [ Struct { x } ], "Struct { x }");
c1!(expr, [ Struct { x, .. } ], "Struct { x, .. }");
- c2!(expr, [ Struct { x, ..base } ], "Struct { x, ..base }", "Struct { x, .. base }");
- c2!(expr, [ Struct { x: true } ], "Struct { x: true }", "Struct { x : true }");
- c2!(expr, [ Struct { x: true, .. } ], "Struct { x: true, .. }", "Struct { x : true, .. }");
- c2!(expr,
- [ Struct { x: true, ..base } ],
- "Struct { x: true, ..base }",
- "Struct { x : true, .. base }"
- );
+ c1!(expr, [ Struct { x, ..base } ], "Struct { x, ..base }");
+ c1!(expr, [ Struct { x: true } ], "Struct { x: true }");
+ c1!(expr, [ Struct { x: true, .. } ], "Struct { x: true, .. }");
+ c1!(expr, [ Struct { x: true, ..base } ], "Struct { x: true, ..base }");
// ExprKind::Repeat
- c2!(expr, [ [(); 0] ], "[(); 0]", "[() ; 0]");
+ c1!(expr, [ [(); 0] ], "[(); 0]");
// ExprKind::Paren
c1!(expr, [ (expr) ], "(expr)");
// ExprKind::Try
- c2!(expr, [ expr? ], "expr?", "expr ?");
+ c1!(expr, [ expr? ], "expr?");
// ExprKind::Yield
c1!(expr, [ yield ], "yield");
@@ -355,51 +354,42 @@ fn test_expr() {
#[test]
fn test_item() {
// ItemKind::ExternCrate
- c2!(item, [ extern crate std; ], "extern crate std;", "extern crate std ;");
- c2!(item,
- [ pub extern crate self as std; ],
- "pub extern crate self as std;",
- "pub extern crate self as std ;"
- );
+ c1!(item, [ extern crate std; ], "extern crate std;");
+ c1!(item, [ pub extern crate self as std; ], "pub extern crate self as std;");
// ItemKind::Use
c2!(item,
[ pub use crate::{a, b::c}; ],
"pub use crate::{a, b::c};",
- "pub use crate :: { a, b :: c } ;"
+ "pub use crate::{ a, b::c };" // FIXME
);
- c2!(item, [ pub use A::*; ], "pub use A::*;", "pub use A :: * ;");
+ c1!(item, [ pub use A::*; ], "pub use A::*;");
// ItemKind::Static
- c2!(item, [ pub static S: () = {}; ], "pub static S: () = {};", "pub static S : () = {} ;");
- c2!(item, [ static mut S: () = {}; ], "static mut S: () = {};", "static mut S : () = {} ;");
- c2!(item, [ static S: (); ], "static S: ();", "static S : () ;");
- c2!(item, [ static mut S: (); ], "static mut S: ();", "static mut S : () ;");
+ c1!(item, [ pub static S: () = {}; ], "pub static S: () = {};");
+ c1!(item, [ static mut S: () = {}; ], "static mut S: () = {};");
+ c1!(item, [ static S: (); ], "static S: ();");
+ c1!(item, [ static mut S: (); ], "static mut S: ();");
// ItemKind::Const
- c2!(item, [ pub const S: () = {}; ], "pub const S: () = {};", "pub const S : () = {} ;");
- c2!(item, [ const S: (); ], "const S: ();", "const S : () ;");
+ c1!(item, [ pub const S: () = {}; ], "pub const S: () = {};");
+ c1!(item, [ const S: (); ], "const S: ();");
// ItemKind::Fn
c1!(item,
[ pub default const async unsafe extern "C" fn f() {} ],
"pub default const async unsafe extern \"C\" fn f() {}"
);
- c2!(item,
- [ fn g<T>(t: Vec<Vec<Vec<T>>>) {} ],
- "fn g<T>(t: Vec<Vec<Vec<T>>>) {}",
- "fn g < T > (t : Vec < Vec < Vec < T >> >) {}"
- );
- c2!(item,
+ c1!(item, [ fn g<T>(t: Vec<Vec<Vec<T>>>) {} ], "fn g<T>(t: Vec<Vec<Vec<T>>>) {}");
+ c1!(item,
[ fn h<'a>(t: &'a Vec<Cell<dyn D>>) {} ],
- "fn h<'a>(t: &'a Vec<Cell<dyn D>>) {}",
- "fn h < 'a > (t : & 'a Vec < Cell < dyn D >>) {}"
+ "fn h<'a>(t: &'a Vec<Cell<dyn D>>) {}"
);
// ItemKind::Mod
- c2!(item, [ pub mod m; ], "pub mod m;", "pub mod m ;");
+ c1!(item, [ pub mod m; ], "pub mod m;");
c1!(item, [ mod m {} ], "mod m {}");
- c2!(item, [ unsafe mod m; ], "unsafe mod m;", "unsafe mod m ;");
+ c1!(item, [ unsafe mod m; ], "unsafe mod m;");
c1!(item, [ unsafe mod m {} ], "unsafe mod m {}");
// ItemKind::ForeignMod
@@ -422,7 +412,7 @@ fn test_item() {
= T;
],
"pub default type Type<'a>: Bound where Self: 'a = T;",
- "pub default type Type < 'a > : Bound where Self : 'a, = T ;"
+ "pub default type Type<'a>: Bound where Self: 'a, = T;"
);
// ItemKind::Enum
@@ -455,13 +445,13 @@ fn test_item() {
\x20 t: T,\n\
\x20 },\n\
}",
- "enum Enum < T > where T : 'a, { Unit, Tuple(T), Struct { t : T }, }"
+ "enum Enum<T> where T: 'a, { Unit, Tuple(T), Struct { t: T }, }"
);
// ItemKind::Struct
- c2!(item, [ pub struct Unit; ], "pub struct Unit;", "pub struct Unit ;");
- c2!(item, [ struct Tuple(); ], "struct Tuple();", "struct Tuple() ;");
- c2!(item, [ struct Tuple(T); ], "struct Tuple(T);", "struct Tuple(T) ;");
+ c1!(item, [ pub struct Unit; ], "pub struct Unit;");
+ c1!(item, [ struct Tuple(); ], "struct Tuple();");
+ c1!(item, [ struct Tuple(T); ], "struct Tuple(T);");
c1!(item, [ struct Struct {} ], "struct Struct {}");
c2!(item,
[
@@ -475,7 +465,7 @@ fn test_item() {
"struct Struct<T> where T: 'a {\n\
\x20 t: T,\n\
}",
- "struct Struct < T > where T : 'a, { t : T, }"
+ "struct Struct<T> where T: 'a, { t: T, }"
);
// ItemKind::Union
@@ -489,7 +479,7 @@ fn test_item() {
"union Union<T> where T: 'a {\n\
\x20 t: T,\n\
}",
- "union Union < T > where T : 'a { t : T, }"
+ "union Union<T> where T: 'a { t: T, }"
);
// ItemKind::Trait
@@ -503,30 +493,25 @@ fn test_item() {
}
],
"trait Trait<'a>: Sized where Self: 'a {}",
- "trait Trait < 'a > : Sized where Self : 'a, {}"
+ "trait Trait<'a>: Sized where Self: 'a, {}"
);
// ItemKind::TraitAlias
- c2!(item,
+ c1!(item,
[ pub trait Trait<T> = Sized where T: 'a; ],
- "pub trait Trait<T> = Sized where T: 'a;",
- "pub trait Trait < T > = Sized where T : 'a ;"
+ "pub trait Trait<T> = Sized where T: 'a;"
);
// ItemKind::Impl
c1!(item, [ pub impl Struct {} ], "pub impl Struct {}");
- c2!(item, [ impl<T> Struct<T> {} ], "impl<T> Struct<T> {}", "impl < T > Struct < T > {}");
+ c1!(item, [ impl<T> Struct<T> {} ], "impl<T> Struct<T> {}");
c1!(item, [ pub impl Trait for Struct {} ], "pub impl Trait for Struct {}");
- c2!(item,
- [ impl<T> const Trait for T {} ],
- "impl<T> const Trait for T {}",
- "impl < T > const Trait for T {}"
- );
- c2!(item, [ impl ~const Struct {} ], "impl ~const Struct {}", "impl ~ const Struct {}");
+ c1!(item, [ impl<T> const Trait for T {} ], "impl<T> const Trait for T {}");
+ c1!(item, [ impl ~const Struct {} ], "impl ~const Struct {}");
// ItemKind::MacCall
- c2!(item, [ mac!(...); ], "mac!(...);", "mac! (...) ;");
- c2!(item, [ mac![...]; ], "mac![...];", "mac! [...] ;");
+ c1!(item, [ mac!(...); ], "mac!(...);");
+ c1!(item, [ mac![...]; ], "mac![...];");
c1!(item, [ mac! { ... } ], "mac! { ... }");
// ItemKind::MacroDef
@@ -536,7 +521,7 @@ fn test_item() {
() => {};
}
],
- "macro_rules! stringify { () => {} ; }"
+ "macro_rules! stringify { () => {}; }"
);
c2!(item,
[ pub macro stringify() {} ],
@@ -550,7 +535,7 @@ fn test_meta() {
c1!(meta, [ k ], "k");
c1!(meta, [ k = "v" ], "k = \"v\"");
c1!(meta, [ list(k1, k2 = "v") ], "list(k1, k2 = \"v\")");
- c2!(meta, [ serde::k ], "serde::k", "serde :: k");
+ c1!(meta, [ serde::k ], "serde::k");
}
#[test]
@@ -567,42 +552,35 @@ fn test_pat() {
// PatKind::Struct
c1!(pat, [ Struct {} ], "Struct {}");
- c2!(pat, [ Struct::<u8> {} ], "Struct::<u8> {}", "Struct :: < u8 > {}");
- c2!(pat, [ Struct::<'static> {} ], "Struct::<'static> {}", "Struct :: < 'static > {}");
+ c1!(pat, [ Struct::<u8> {} ], "Struct::<u8> {}");
+ c2!(pat, [ Struct ::< u8 > {} ], "Struct::<u8> {}", "Struct ::< u8 > {}");
+ c1!(pat, [ Struct::<'static> {} ], "Struct::<'static> {}");
c1!(pat, [ Struct { x } ], "Struct { x }");
- c2!(pat, [ Struct { x: _x } ], "Struct { x: _x }", "Struct { x : _x }");
+ c1!(pat, [ Struct { x: _x } ], "Struct { x: _x }");
c1!(pat, [ Struct { .. } ], "Struct { .. }");
c1!(pat, [ Struct { x, .. } ], "Struct { x, .. }");
- c2!(pat, [ Struct { x: _x, .. } ], "Struct { x: _x, .. }", "Struct { x : _x, .. }");
- c2!(pat,
- [ <Struct as Trait>::Type {} ],
- "<Struct as Trait>::Type {}",
- "< Struct as Trait > :: Type {}"
- );
+ c1!(pat, [ Struct { x: _x, .. } ], "Struct { x: _x, .. }");
+ c1!(pat, [ <Struct as Trait>::Type {} ], "<Struct as Trait>::Type {}");
// PatKind::TupleStruct
c1!(pat, [ Tuple() ], "Tuple()");
- c2!(pat, [ Tuple::<u8>() ], "Tuple::<u8>()", "Tuple :: < u8 > ()");
- c2!(pat, [ Tuple::<'static>() ], "Tuple::<'static>()", "Tuple :: < 'static > ()");
+ c1!(pat, [ Tuple::<u8>() ], "Tuple::<u8>()");
+ c1!(pat, [ Tuple::<'static>() ], "Tuple::<'static>()");
c1!(pat, [ Tuple(x) ], "Tuple(x)");
c1!(pat, [ Tuple(..) ], "Tuple(..)");
c1!(pat, [ Tuple(x, ..) ], "Tuple(x, ..)");
- c2!(pat,
- [ <Struct as Trait>::Type() ],
- "<Struct as Trait>::Type()",
- "< Struct as Trait > :: Type()"
- );
+ c1!(pat, [ <Struct as Trait>::Type() ], "<Struct as Trait>::Type()");
// PatKind::Or
c1!(pat, [ true | false ], "true | false");
c2!(pat, [ | true ], "true", "| true");
- c2!(pat, [ |true| false ], "true | false", "| true | false");
+ c2!(pat, [ |true| false ], "true | false", "|true| false");
// PatKind::Path
- c2!(pat, [ crate::Path ], "crate::Path", "crate :: Path");
- c2!(pat, [ Path::<u8> ], "Path::<u8>", "Path :: < u8 >");
- c2!(pat, [ Path::<'static> ], "Path::<'static>", "Path :: < 'static >");
- c2!(pat, [ <Struct as Trait>::Type ], "<Struct as Trait>::Type", "< Struct as Trait > :: Type");
+ c1!(pat, [ crate::Path ], "crate::Path");
+ c1!(pat, [ Path::<u8> ], "Path::<u8>");
+ c1!(pat, [ Path::<'static> ], "Path::<'static>");
+ c1!(pat, [ <Struct as Trait>::Type ], "<Struct as Trait>::Type");
// PatKind::Tuple
c1!(pat, [ () ], "()");
@@ -613,18 +591,18 @@ fn test_pat() {
c1!(pat, [ box pat ], "box pat");
// PatKind::Ref
- c2!(pat, [ &pat ], "&pat", "& pat");
- c2!(pat, [ &mut pat ], "&mut pat", "& mut pat");
+ c1!(pat, [ &pat ], "&pat");
+ c1!(pat, [ &mut pat ], "&mut pat");
// PatKind::Lit
c1!(pat, [ 1_000_i8 ], "1_000_i8");
// PatKind::Range
- c2!(pat, [ ..1 ], "..1", ".. 1");
- c2!(pat, [ 0.. ], "0..", "0 ..");
- c2!(pat, [ 0..1 ], "0..1", "0 .. 1");
- c2!(pat, [ 0..=1 ], "0..=1", "0 ..= 1");
- c2!(pat, [ -2..=-1 ], "-2..=-1", "- 2 ..= - 1");
+ c1!(pat, [ ..1 ], "..1");
+ c1!(pat, [ 0.. ], "0..");
+ c1!(pat, [ 0..1 ], "0..1");
+ c1!(pat, [ 0..=1 ], "0..=1");
+ c1!(pat, [ -2..=-1 ], "-2..=-1");
// PatKind::Slice
c1!(pat, [ [] ], "[]");
@@ -635,24 +613,28 @@ fn test_pat() {
// PatKind::Rest
c1!(pat, [ .. ], "..");
+ // PatKind::Never
+ c1!(pat, [ Some(!) ], "Some(!)");
+ c1!(pat, [ None | Some(!) ], "None | Some(!)");
+
// PatKind::Paren
c1!(pat, [ (pat) ], "(pat)");
// PatKind::MacCall
- c2!(pat, [ mac!(...) ], "mac!(...)", "mac! (...)");
- c2!(pat, [ mac![...] ], "mac![...]", "mac! [...]");
+ c1!(pat, [ mac!(...) ], "mac!(...)");
+ c1!(pat, [ mac![...] ], "mac![...]");
c1!(pat, [ mac! { ... } ], "mac! { ... }");
}
#[test]
fn test_path() {
c1!(path, [ thing ], "thing");
- c2!(path, [ m::thing ], "m::thing", "m :: thing");
- c2!(path, [ self::thing ], "self::thing", "self :: thing");
- c2!(path, [ crate::thing ], "crate::thing", "crate :: thing");
- c2!(path, [ Self::thing ], "Self::thing", "Self :: thing");
- c2!(path, [ Self<'static> ], "Self<'static>", "Self < 'static >");
- c2!(path, [ Self::<'static> ], "Self<'static>", "Self :: < 'static >");
+ c1!(path, [ m::thing ], "m::thing");
+ c1!(path, [ self::thing ], "self::thing");
+ c1!(path, [ crate::thing ], "crate::thing");
+ c1!(path, [ Self::thing ], "Self::thing");
+ c1!(path, [ Self<'static> ], "Self<'static>");
+ c2!(path, [ Self::<'static> ], "Self<'static>", "Self::<'static>");
c1!(path, [ Self() ], "Self()");
c1!(path, [ Self() -> () ], "Self() -> ()");
}
@@ -662,16 +644,16 @@ fn test_stmt() {
// StmtKind::Local
c2!(stmt, [ let _ ], "let _;", "let _");
c2!(stmt, [ let x = true ], "let x = true;", "let x = true");
- c2!(stmt, [ let x: bool = true ], "let x: bool = true;", "let x : bool = true");
+ c2!(stmt, [ let x: bool = true ], "let x: bool = true;", "let x: bool = true");
c2!(stmt, [ let (a, b) = (1, 2) ], "let (a, b) = (1, 2);", "let(a, b) = (1, 2)"); // FIXME
c2!(stmt,
[ let (a, b): (u32, u32) = (1, 2) ],
"let (a, b): (u32, u32) = (1, 2);",
- "let(a, b) : (u32, u32) = (1, 2)"
+ "let(a, b): (u32, u32) = (1, 2)" // FIXME
);
// StmtKind::Item
- c2!(stmt, [ struct S; ], "struct S;", "struct S ;");
+ c1!(stmt, [ struct S; ], "struct S;");
c1!(stmt, [ struct S {} ], "struct S {}");
// StmtKind::Expr
@@ -684,8 +666,8 @@ fn test_stmt() {
c1!(stmt, [ ; ], ";");
// StmtKind::MacCall
- c2!(stmt, [ mac!(...) ], "mac!(...)", "mac! (...)");
- c2!(stmt, [ mac![...] ], "mac![...]", "mac! [...]");
+ c1!(stmt, [ mac!(...) ], "mac!(...)");
+ c1!(stmt, [ mac![...] ], "mac![...]");
c1!(stmt, [ mac! { ... } ], "mac! { ... }");
}
@@ -695,26 +677,27 @@ fn test_ty() {
c1!(ty, [ [T] ], "[T]");
// TyKind::Array
- c2!(ty, [ [T; 0] ], "[T; 0]", "[T ; 0]");
+ c1!(ty, [ [T; 0] ], "[T; 0]");
// TyKind::Ptr
- c2!(ty, [ *const T ], "*const T", "* const T");
- c2!(ty, [ *mut T ], "*mut T", "* mut T");
+ c1!(ty, [ *const T ], "*const T");
+ c1!(ty, [ *mut T ], "*mut T");
// TyKind::Ref
- c2!(ty, [ &T ], "&T", "& T");
- c2!(ty, [ &mut T ], "&mut T", "& mut T");
- c2!(ty, [ &'a T ], "&'a T", "& 'a T");
- c2!(ty, [ &'a mut [T] ], "&'a mut [T]", "& 'a mut [T]");
- c2!(ty, [ &A<B<C<D<E>>>> ], "&A<B<C<D<E>>>>", "& A < B < C < D < E >> >>");
+ c1!(ty, [ &T ], "&T");
+ c1!(ty, [ &mut T ], "&mut T");
+ c1!(ty, [ &'a T ], "&'a T");
+ c1!(ty, [ &'a mut [T] ], "&'a mut [T]");
+ c1!(ty, [ &A<B<C<D<E>>>> ], "&A<B<C<D<E>>>>");
+ c2!(ty, [ &A<B<C<D<E> > > > ], "&A<B<C<D<E>>>>", "&A<B<C<D<E> > > >");
// TyKind::BareFn
c1!(ty, [ fn() ], "fn()");
c1!(ty, [ fn() -> () ], "fn() -> ()");
c1!(ty, [ fn(u8) ], "fn(u8)");
- c2!(ty, [ fn(x: u8) ], "fn(x: u8)", "fn(x : u8)");
- c2!(ty, [ for<> fn() ], "fn()", "for < > fn()");
- c2!(ty, [ for<'a> fn() ], "for<'a> fn()", "for < 'a > fn()");
+ c1!(ty, [ fn(x: u8) ], "fn(x: u8)");
+ c2!(ty, [ for<> fn() ], "fn()", "for<> fn()");
+ c1!(ty, [ for<'a> fn() ], "for<'a> fn()");
// TyKind::Never
c1!(ty, [ ! ], "!");
@@ -730,28 +713,28 @@ fn test_ty() {
// TyKind::Path
c1!(ty, [ T ], "T");
- c2!(ty, [ Ref<'a> ], "Ref<'a>", "Ref < 'a >");
- c2!(ty, [ PhantomData<T> ], "PhantomData<T>", "PhantomData < T >");
- c2!(ty, [ PhantomData::<T> ], "PhantomData<T>", "PhantomData :: < T >");
+ c1!(ty, [ Ref<'a> ], "Ref<'a>");
+ c1!(ty, [ PhantomData<T> ], "PhantomData<T>");
+ c2!(ty, [ PhantomData::<T> ], "PhantomData<T>", "PhantomData::<T>");
c2!(ty, [ Fn() -> ! ], "Fn() -> !", "Fn() ->!");
c2!(ty, [ Fn(u8) -> ! ], "Fn(u8) -> !", "Fn(u8) ->!"); // FIXME
- c2!(ty, [ <Struct as Trait>::Type ], "<Struct as Trait>::Type", "< Struct as Trait > :: Type");
+ c1!(ty, [ <Struct as Trait>::Type ], "<Struct as Trait>::Type");
// TyKind::TraitObject
c1!(ty, [ dyn Send ], "dyn Send");
c1!(ty, [ dyn Send + 'a ], "dyn Send + 'a");
c1!(ty, [ dyn 'a + Send ], "dyn 'a + Send");
- c2!(ty, [ dyn ?Sized ], "dyn ?Sized", "dyn ? Sized");
- c2!(ty, [ dyn ~const Clone ], "dyn ~const Clone", "dyn ~ const Clone");
- c2!(ty, [ dyn for<'a> Send ], "dyn for<'a> Send", "dyn for < 'a > Send");
+ c1!(ty, [ dyn ?Sized ], "dyn ?Sized");
+ c1!(ty, [ dyn ~const Clone ], "dyn ~const Clone");
+ c1!(ty, [ dyn for<'a> Send ], "dyn for<'a> Send");
// TyKind::ImplTrait
c1!(ty, [ impl Send ], "impl Send");
c1!(ty, [ impl Send + 'a ], "impl Send + 'a");
c1!(ty, [ impl 'a + Send ], "impl 'a + Send");
- c2!(ty, [ impl ?Sized ], "impl ?Sized", "impl ? Sized");
- c2!(ty, [ impl ~const Clone ], "impl ~const Clone", "impl ~ const Clone");
- c2!(ty, [ impl for<'a> Send ], "impl for<'a> Send", "impl for < 'a > Send");
+ c1!(ty, [ impl ?Sized ], "impl ?Sized");
+ c1!(ty, [ impl ~const Clone ], "impl ~const Clone");
+ c1!(ty, [ impl for<'a> Send ], "impl for<'a> Send");
// TyKind::Paren
c1!(ty, [ (T) ], "(T)");
@@ -764,8 +747,8 @@ fn test_ty() {
// TyKind::ImplicitSelf: there is no syntax for this.
// TyKind::MacCall
- c2!(ty, [ mac!(...) ], "mac!(...)", "mac! (...)");
- c2!(ty, [ mac![...] ], "mac![...]", "mac! [...]");
+ c1!(ty, [ mac!(...) ], "mac!(...)");
+ c1!(ty, [ mac![...] ], "mac![...]");
c1!(ty, [ mac! { ... } ], "mac! { ... }");
// TyKind::Err: untestable.
@@ -786,13 +769,13 @@ fn test_vis() {
c2!(vis, [ pub(in crate) ], "pub(in crate) ", "pub(in crate)");
c2!(vis, [ pub(in self) ], "pub(in self) ", "pub(in self)");
c2!(vis, [ pub(in super) ], "pub(in super) ", "pub(in super)");
- c2!(vis, [ pub(in path::to) ], "pub(in path::to) ", "pub(in path :: to)");
- c2!(vis, [ pub(in ::path::to) ], "pub(in ::path::to) ", "pub(in :: path :: to)");
- c2!(vis, [ pub(in self::path::to) ], "pub(in self::path::to) ", "pub(in self :: path :: to)");
+ c2!(vis, [ pub(in path::to) ], "pub(in path::to) ", "pub(in path::to)");
+ c2!(vis, [ pub(in ::path::to) ], "pub(in ::path::to) ", "pub(in ::path::to)");
+ c2!(vis, [ pub(in self::path::to) ], "pub(in self::path::to) ", "pub(in self::path::to)");
c2!(vis,
[ pub(in super::path::to) ],
"pub(in super::path::to) ",
- "pub(in super :: path :: to)"
+ "pub(in super::path::to)"
);
// VisibilityKind::Inherited
@@ -810,7 +793,7 @@ macro_rules! p {
#[test]
fn test_punct() {
- // For all these cases, we must preserve spaces between the tokens.
+ // For all these cases, we should preserve spaces between the tokens.
// Otherwise, any old proc macro that parses pretty-printed code might glue
// together tokens that shouldn't be glued.
p!([ = = < < <= <= == == != != >= >= > > ], "= = < < <= <= == == != != >= >= > >");
@@ -823,10 +806,7 @@ fn test_punct() {
p!([ + + += += - - -= -= * * *= *= / / /= /= ], "+ + += += - - -= -= * * *= *= / / /= /=");
p!([ % % %= %= ^ ^ ^= ^= << << <<= <<= >> >> >>= >>= ],
"% % %= %= ^ ^ ^= ^= << << <<= <<= >> >> >>= >>=");
-
- // For these one we must insert spaces between adjacent tokens, again due
- // to proc macros.
- p!([ +! ?= |> >>@ --> <-- $$ =====> ], "+! ? = | > >> @ - -> <- - $$== == =>"); // FIXME
- p!([ ,; ;, ** @@ $+$ >< <> ?? +== ], ", ; ;, * * @ @ $+ $> < < > ? ? += ="); // FIXME
- p!([ :#!@|$=&*,+;*~? ], ": #! @ | $= & *, + ; * ~ ?"); // FIXME
+ p!([ +! ?= |> >>@ --> <-- $$ =====> ], "+! ?= |> >>@ --> <-- $$=====>");
+ p!([ ,; ;, ** @@ $+$ >< <> ?? +== ], ",; ;, ** @@ $+$>< <> ?? +=="); // FIXME: `$ >` -> `$>`
+ p!([ :#!@|$=&*,+;*~? ], ":#!@|$=&*,+;*~?");
}
diff --git a/tests/ui/macros/syntax-error-recovery.rs b/tests/ui/macros/syntax-error-recovery.rs
index ae6de3c50..f6178c137 100644
--- a/tests/ui/macros/syntax-error-recovery.rs
+++ b/tests/ui/macros/syntax-error-recovery.rs
@@ -9,7 +9,7 @@ macro_rules! values {
}
};
}
-//~^^^^^ ERROR expected one of `(`, `,`, `=`, `{`, or `}`, found `(String)`
+//~^^^^^ ERROR expected one of `(`, `,`, `=`, `{`, or `}`, found type `(String)`
//~| ERROR macro expansion ignores token `(String)` and any following
values!(STRING(1) as (String) => cfg(test),);
diff --git a/tests/ui/macros/syntax-error-recovery.stderr b/tests/ui/macros/syntax-error-recovery.stderr
index c42ee9b29..6218bf43a 100644
--- a/tests/ui/macros/syntax-error-recovery.stderr
+++ b/tests/ui/macros/syntax-error-recovery.stderr
@@ -1,4 +1,4 @@
-error: expected one of `(`, `,`, `=`, `{`, or `}`, found `(String)`
+error: expected one of `(`, `,`, `=`, `{`, or `}`, found type `(String)`
--> $DIR/syntax-error-recovery.rs:7:26
|
LL | $token $($inner)? = $value,
diff --git a/tests/ui/macros/syntax-extension-source-utils.rs b/tests/ui/macros/syntax-extension-source-utils.rs
index f41fadddd..aa894c839 100644
--- a/tests/ui/macros/syntax-extension-source-utils.rs
+++ b/tests/ui/macros/syntax-extension-source-utils.rs
@@ -17,7 +17,7 @@ pub fn main() {
assert_eq!(column!(), 16);
assert_eq!(indirect_line!(), 18);
assert!((file!().ends_with("syntax-extension-source-utils.rs")));
- assert_eq!(stringify!((2*3) + 5).to_string(), "(2 * 3) + 5".to_string());
+ assert_eq!(stringify!((2*3) + 5).to_string(), "(2*3) + 5".to_string());
assert!(include!("syntax-extension-source-utils-files/includeme.\
fragment").to_string()
== "victory robot 6".to_string());
@@ -32,5 +32,5 @@ pub fn main() {
// The Windows tests are wrapped in an extra module for some reason
assert!((m1::m2::where_am_i().ends_with("m1::m2")));
- assert_eq!((35, "(2 * 3) + 5"), (line!(), stringify!((2*3) + 5)));
+ assert_eq!((35, "(2*3) + 5"), (line!(), stringify!((2*3) + 5)));
}
diff --git a/tests/ui/macros/trace-macro.stderr b/tests/ui/macros/trace-macro.stderr
index 43272248c..dac4cc12f 100644
--- a/tests/ui/macros/trace-macro.stderr
+++ b/tests/ui/macros/trace-macro.stderr
@@ -5,5 +5,5 @@ LL | println!("Hello, World!");
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expanding `println! { "Hello, World!" }`
- = note: to `{ $crate :: io :: _print($crate :: format_args_nl! ("Hello, World!")) ; }`
+ = note: to `{ $crate :: io :: _print($crate :: format_args_nl! ("Hello, World!")); }`
diff --git a/tests/ui/macros/trace_faulty_macros.rs b/tests/ui/macros/trace_faulty_macros.rs
index b2fdd2e19..00eb75937 100644
--- a/tests/ui/macros/trace_faulty_macros.rs
+++ b/tests/ui/macros/trace_faulty_macros.rs
@@ -41,3 +41,14 @@ fn use_bang_macro_as_attr() {}
#[derive(Debug)] //~ ERROR `derive` may only be applied to `struct`s
fn use_derive_macro_as_attr() {}
+
+macro_rules! test {
+ (let $p:pat = $e:expr) => {test!(($p,$e))};
+ // this should be expr
+ // vvv
+ (($p:pat, $e:pat)) => {let $p = $e;}; //~ ERROR expected expression, found pattern `1 + 1`
+}
+
+fn foo() {
+ test!(let x = 1+1);
+}
diff --git a/tests/ui/macros/trace_faulty_macros.stderr b/tests/ui/macros/trace_faulty_macros.stderr
index 21e47da07..81047c7a2 100644
--- a/tests/ui/macros/trace_faulty_macros.stderr
+++ b/tests/ui/macros/trace_faulty_macros.stderr
@@ -20,7 +20,7 @@ LL | my_faulty_macro!();
| ^^^^^^^^^^^^^^^^^^
|
= note: expanding `my_faulty_macro! { }`
- = note: to `my_faulty_macro! (bcd) ;`
+ = note: to `my_faulty_macro! (bcd);`
= note: expanding `my_faulty_macro! { bcd }`
error: recursion limit reached while expanding `my_recursive_macro!`
@@ -42,15 +42,15 @@ LL | my_recursive_macro!();
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: expanding `my_recursive_macro! { }`
- = note: to `my_recursive_macro! () ;`
+ = note: to `my_recursive_macro! ();`
= note: expanding `my_recursive_macro! { }`
- = note: to `my_recursive_macro! () ;`
+ = note: to `my_recursive_macro! ();`
= note: expanding `my_recursive_macro! { }`
- = note: to `my_recursive_macro! () ;`
+ = note: to `my_recursive_macro! ();`
= note: expanding `my_recursive_macro! { }`
- = note: to `my_recursive_macro! () ;`
+ = note: to `my_recursive_macro! ();`
-error: expected expression, found `A { a: a, b: 0, c: _, .. }`
+error: expected expression, found pattern `A { a: a, b: 0, c: _, .. }`
--> $DIR/trace_faulty_macros.rs:16:9
|
LL | $a
@@ -69,6 +69,28 @@ LL | #[derive(Debug)]
LL | fn use_derive_macro_as_attr() {}
| -------------------------------- not a `struct`, `enum` or `union`
+error: expected expression, found pattern `1 + 1`
+ --> $DIR/trace_faulty_macros.rs:49:37
+ |
+LL | (let $p:pat = $e:expr) => {test!(($p,$e))};
+ | ------- -- this is interpreted as expression, but it is expected to be pattern
+ | |
+ | this macro fragment matcher is expression
+...
+LL | (($p:pat, $e:pat)) => {let $p = $e;};
+ | ------ ^^ expected expression
+ | |
+ | this macro fragment matcher is pattern
+...
+LL | test!(let x = 1+1);
+ | ------------------
+ | | |
+ | | this is expected to be expression
+ | in this macro invocation
+ |
+ = note: when forwarding a matched fragment to another macro-by-example, matchers in the second macro will see an opaque AST of the fragment type, not the underlying tokens
+ = note: this error originates in the macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
+
note: trace_macro
--> $DIR/trace_faulty_macros.rs:36:13
|
@@ -76,10 +98,21 @@ LL | let a = pat_macro!();
| ^^^^^^^^^^^^
|
= note: expanding `pat_macro! { }`
- = note: to `pat_macro! (A { a : a, b : 0, c : _, .. }) ;`
+ = note: to `pat_macro! (A { a : a, b : 0, c : _, .. });`
= note: expanding `pat_macro! { A { a : a, b : 0, c : _, .. } }`
= note: to `A { a: a, b: 0, c: _, .. }`
-error: aborting due to 4 previous errors
+note: trace_macro
+ --> $DIR/trace_faulty_macros.rs:53:5
+ |
+LL | test!(let x = 1+1);
+ | ^^^^^^^^^^^^^^^^^^
+ |
+ = note: expanding `test! { let x = 1+1 }`
+ = note: to `test! ((x, 1 + 1))`
+ = note: expanding `test! { (x, 1 + 1) }`
+ = note: to `let x = 1 + 1 ;`
+
+error: aborting due to 5 previous errors
For more information about this error, try `rustc --explain E0774`.
diff --git a/tests/ui/macros/unreachable-arg.edition_2021.stderr b/tests/ui/macros/unreachable-arg.edition_2021.stderr
index d70ef31ee..ddaa2b9c1 100644
--- a/tests/ui/macros/unreachable-arg.edition_2021.stderr
+++ b/tests/ui/macros/unreachable-arg.edition_2021.stderr
@@ -9,5 +9,5 @@ help: you might be missing a string literal to format with
LL | unreachable!("{}", a);
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/unreachable-format-args.edition_2015.stderr b/tests/ui/macros/unreachable-format-args.edition_2015.stderr
index 2cc2e134b..6a133d5e4 100644
--- a/tests/ui/macros/unreachable-format-args.edition_2015.stderr
+++ b/tests/ui/macros/unreachable-format-args.edition_2015.stderr
@@ -8,5 +8,5 @@ LL | unreachable!("x is {x} and y is {y}", y = 0);
= note: to avoid ambiguity, `format_args!` cannot capture variables when the format string is expanded from a macro
= note: this error originates in the macro `$crate::concat` which comes from the expansion of the macro `unreachable` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/macros/vec-macro-in-pattern.stderr b/tests/ui/macros/vec-macro-in-pattern.stderr
index 7060f5d8b..447f5dcf8 100644
--- a/tests/ui/macros/vec-macro-in-pattern.stderr
+++ b/tests/ui/macros/vec-macro-in-pattern.stderr
@@ -6,5 +6,5 @@ LL | Some(vec![43]) => {}
|
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/main-wrong-location.stderr b/tests/ui/main-wrong-location.stderr
index 3d64b0a67..9486a9405 100644
--- a/tests/ui/main-wrong-location.stderr
+++ b/tests/ui/main-wrong-location.stderr
@@ -12,6 +12,6 @@ LL | fn main() { }
= note: you have one or more functions named `main` not defined at the crate level
= help: consider moving the `main` function definitions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0601`.
diff --git a/tests/ui/main-wrong-type.stderr b/tests/ui/main-wrong-type.stderr
index 1e5f36875..d07fc0906 100644
--- a/tests/ui/main-wrong-type.stderr
+++ b/tests/ui/main-wrong-type.stderr
@@ -7,6 +7,6 @@ LL | fn main(foo: S) {
= note: expected signature `fn()`
found signature `fn(S)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0580`.
diff --git a/tests/ui/malformed/issue-107423-unused-delim-only-one-no-pair.stderr b/tests/ui/malformed/issue-107423-unused-delim-only-one-no-pair.stderr
index 89e0d982e..ad90aeda1 100644
--- a/tests/ui/malformed/issue-107423-unused-delim-only-one-no-pair.stderr
+++ b/tests/ui/malformed/issue-107423-unused-delim-only-one-no-pair.stderr
@@ -8,5 +8,5 @@ LL | fn a(){{{
| |unclosed delimiter
| unclosed delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/malformed/issue-69341-malformed-derive-inert.stderr b/tests/ui/malformed/issue-69341-malformed-derive-inert.stderr
index 04f7ebe01..99f709ead 100644
--- a/tests/ui/malformed/issue-69341-malformed-derive-inert.stderr
+++ b/tests/ui/malformed/issue-69341-malformed-derive-inert.stderr
@@ -4,5 +4,5 @@ error: expected non-macro attribute, found attribute macro `derive`
LL | #[derive(parse())]
| ^^^^^^ not a non-macro attribute
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/malformed/malformed-interpolated.rs b/tests/ui/malformed/malformed-interpolated.rs
index 0d84e723f..0d801ebd3 100644
--- a/tests/ui/malformed/malformed-interpolated.rs
+++ b/tests/ui/malformed/malformed-interpolated.rs
@@ -10,7 +10,7 @@ macro_rules! check {
check!("0"); // OK
check!(0); // OK
check!(0u8); //~ ERROR suffixed literals are not allowed in attributes
-check!(-0); //~ ERROR unexpected expression: `-0`
-check!(0 + 0); //~ ERROR unexpected expression: `0 + 0`
+check!(-0); //~ ERROR attribute value must be a literal
+check!(0 + 0); //~ ERROR attribute value must be a literal
fn main() {}
diff --git a/tests/ui/malformed/malformed-interpolated.stderr b/tests/ui/malformed/malformed-interpolated.stderr
index c24d9f153..92e99b7a7 100644
--- a/tests/ui/malformed/malformed-interpolated.stderr
+++ b/tests/ui/malformed/malformed-interpolated.stderr
@@ -6,13 +6,13 @@ LL | check!(0u8);
|
= help: instead of using a suffixed literal (`1u8`, `1.0f32`, etc.), use an unsuffixed version (`1`, `1.0`, etc.)
-error: unexpected expression: `-0`
+error: attribute value must be a literal
--> $DIR/malformed-interpolated.rs:13:8
|
LL | check!(-0);
| ^^
-error: unexpected expression: `0 + 0`
+error: attribute value must be a literal
--> $DIR/malformed-interpolated.rs:14:8
|
LL | check!(0 + 0);
diff --git a/tests/ui/manual/manual-link-framework.stderr b/tests/ui/manual/manual-link-framework.stderr
index de045d56c..38d2302a4 100644
--- a/tests/ui/manual/manual-link-framework.stderr
+++ b/tests/ui/manual/manual-link-framework.stderr
@@ -1,4 +1,4 @@
error: library kind `framework` is only supported on Apple targets
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/marker_trait_attr/overlap-marker-trait.stderr b/tests/ui/marker_trait_attr/overlap-marker-trait.stderr
index 133bc0484..cdad382d1 100644
--- a/tests/ui/marker_trait_attr/overlap-marker-trait.stderr
+++ b/tests/ui/marker_trait_attr/overlap-marker-trait.stderr
@@ -10,6 +10,6 @@ note: required by a bound in `is_marker`
LL | fn is_marker<T: Marker>() { }
| ^^^^^^ required by this bound in `is_marker`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/marker_trait_attr/overlapping-impl-1-modulo-regions.stderr b/tests/ui/marker_trait_attr/overlapping-impl-1-modulo-regions.stderr
index 64bccda56..daee4e66a 100644
--- a/tests/ui/marker_trait_attr/overlapping-impl-1-modulo-regions.stderr
+++ b/tests/ui/marker_trait_attr/overlapping-impl-1-modulo-regions.stderr
@@ -12,6 +12,6 @@ help: consider adding an explicit lifetime bound
LL | impl<T: Copy + 'static> F for T {}
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0310`.
diff --git a/tests/ui/marker_trait_attr/unsound-overlap.stderr b/tests/ui/marker_trait_attr/unsound-overlap.stderr
index 5ebac8270..5e58f5227 100644
--- a/tests/ui/marker_trait_attr/unsound-overlap.stderr
+++ b/tests/ui/marker_trait_attr/unsound-overlap.stderr
@@ -7,6 +7,6 @@ LL | impl<T: A> TraitWithAssoc for T {
LL | impl TraitWithAssoc for ((&str,),) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `((&str,),)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/match/issue-11319.stderr b/tests/ui/match/issue-11319.stderr
index fc44205e8..8280547af 100644
--- a/tests/ui/match/issue-11319.stderr
+++ b/tests/ui/match/issue-11319.stderr
@@ -16,6 +16,6 @@ LL | | _ => true
LL | | }
| |_____- `match` arms have incompatible types
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/match/issue-70972-dyn-trait.stderr b/tests/ui/match/issue-70972-dyn-trait.stderr
index f4dc910c3..b0af50f85 100644
--- a/tests/ui/match/issue-70972-dyn-trait.stderr
+++ b/tests/ui/match/issue-70972-dyn-trait.stderr
@@ -4,5 +4,5 @@ error: `dyn Send` cannot be used in patterns
LL | F => panic!(),
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/match/issue-74050-end-span.stderr b/tests/ui/match/issue-74050-end-span.stderr
index 0dafeae87..3a311eb00 100644
--- a/tests/ui/match/issue-74050-end-span.stderr
+++ b/tests/ui/match/issue-74050-end-span.stderr
@@ -11,6 +11,6 @@ LL | match arg.to_str() {
LL | }
| - `arg` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/match/issue-91058.stderr b/tests/ui/match/issue-91058.stderr
index 12f37274b..e91063de8 100644
--- a/tests/ui/match/issue-91058.stderr
+++ b/tests/ui/match/issue-91058.stderr
@@ -6,6 +6,6 @@ LL | match array {
LL | [()] => {}
| ^^ expected `S`, found `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/match/issue-92100.stderr b/tests/ui/match/issue-92100.stderr
index 0f694c587..eb9f4ba1a 100644
--- a/tests/ui/match/issue-92100.stderr
+++ b/tests/ui/match/issue-92100.stderr
@@ -3,7 +3,12 @@ error[E0425]: cannot find value `a` in this scope
|
LL | [a.., a] => {}
| ^ not found in this scope
+ |
+help: if you meant to collect the rest of the slice in `a`, use the at operator
+ |
+LL | [a @ .., a] => {}
+ | +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/match/match-arm-resolving-to-never.stderr b/tests/ui/match/match-arm-resolving-to-never.stderr
index 686fbd0ba..6cbdf03d4 100644
--- a/tests/ui/match/match-arm-resolving-to-never.stderr
+++ b/tests/ui/match/match-arm-resolving-to-never.stderr
@@ -13,6 +13,6 @@ LL | | E::F => "",
LL | | };
| |_____- `match` arms have incompatible types
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/match/match-ill-type2.stderr b/tests/ui/match/match-ill-type2.stderr
index 5078f03d6..9d6bb5d1d 100644
--- a/tests/ui/match/match-ill-type2.stderr
+++ b/tests/ui/match/match-ill-type2.stderr
@@ -7,6 +7,6 @@ LL | 1i32 => 1,
LL | 2u32 => 1,
| ^^^^ expected `i32`, found `u32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/match/match-join.stderr b/tests/ui/match/match-join.stderr
index 27a82c124..4feb1bef9 100644
--- a/tests/ui/match/match-join.stderr
+++ b/tests/ui/match/match-join.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `x` in this scope
LL | println!("{}", x);
| ^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/match/match-no-arms-unreachable-after.stderr b/tests/ui/match/match-no-arms-unreachable-after.stderr
index a0a369726..65ac1bae3 100644
--- a/tests/ui/match/match-no-arms-unreachable-after.stderr
+++ b/tests/ui/match/match-no-arms-unreachable-after.stderr
@@ -12,5 +12,5 @@ note: the lint level is defined here
LL | #![deny(unreachable_code)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/match/match-pattern-field-mismatch-2.stderr b/tests/ui/match/match-pattern-field-mismatch-2.stderr
index ba32d0e99..12b143dd2 100644
--- a/tests/ui/match/match-pattern-field-mismatch-2.stderr
+++ b/tests/ui/match/match-pattern-field-mismatch-2.stderr
@@ -7,6 +7,6 @@ LL | NoColor,
LL | Color::NoColor(_) => { }
| ^^^^^^^^^^^^^^^^^ help: use this syntax instead: `Color::NoColor`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0532`.
diff --git a/tests/ui/match/match-pattern-field-mismatch.stderr b/tests/ui/match/match-pattern-field-mismatch.stderr
index c994ee4f6..cde7ac972 100644
--- a/tests/ui/match/match-pattern-field-mismatch.stderr
+++ b/tests/ui/match/match-pattern-field-mismatch.stderr
@@ -16,6 +16,6 @@ help: use `..` to ignore all fields
LL | Color::Rgb(..) => { }
| ~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0023`.
diff --git a/tests/ui/match/match-ref-mut-invariance.stderr b/tests/ui/match/match-ref-mut-invariance.stderr
index b353d3514..b9878a195 100644
--- a/tests/ui/match/match-ref-mut-invariance.stderr
+++ b/tests/ui/match/match-ref-mut-invariance.stderr
@@ -13,5 +13,5 @@ LL | match self.0 { ref mut x => x }
= note: mutable references are invariant over their type parameter
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/match/match-ref-mut-let-invariance.stderr b/tests/ui/match/match-ref-mut-let-invariance.stderr
index bb0fcdb99..27968239a 100644
--- a/tests/ui/match/match-ref-mut-let-invariance.stderr
+++ b/tests/ui/match/match-ref-mut-let-invariance.stderr
@@ -14,5 +14,5 @@ LL | x
= note: mutable references are invariant over their type parameter
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/match/match-struct.stderr b/tests/ui/match/match-struct.stderr
index fdc6fd770..b8abeab15 100644
--- a/tests/ui/match/match-struct.stderr
+++ b/tests/ui/match/match-struct.stderr
@@ -6,6 +6,6 @@ LL | match (S { a: 1 }) {
LL | E::C(_) => (),
| ^^^^^^^ expected `S`, found `E`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/match/match-tag-nullary.stderr b/tests/ui/match/match-tag-nullary.stderr
index aac873c76..c9446d164 100644
--- a/tests/ui/match/match-tag-nullary.stderr
+++ b/tests/ui/match/match-tag-nullary.stderr
@@ -9,6 +9,6 @@ LL | fn main() { let x: A = A::A; match x { B::B => { } } }
| |
| this expression has type `A`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/match/match-tag-unary.stderr b/tests/ui/match/match-tag-unary.stderr
index 25e8152d8..fb4ec2664 100644
--- a/tests/ui/match/match-tag-unary.stderr
+++ b/tests/ui/match/match-tag-unary.stderr
@@ -6,6 +6,6 @@ LL | fn main() { let x: A = A::A(0); match x { B::B(y) => { } } }
| |
| this expression has type `A`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/match/match-tail-expr-never-type-error.rs b/tests/ui/match/match-tail-expr-never-type-error.rs
new file mode 100644
index 000000000..786ed3fa9
--- /dev/null
+++ b/tests/ui/match/match-tail-expr-never-type-error.rs
@@ -0,0 +1,16 @@
+fn never() -> ! {
+ loop {}
+}
+
+fn bar(a: bool) {
+ match a {
+ true => 1,
+ false => {
+ never() //~ ERROR `match` arms have incompatible types
+ }
+ }
+}
+fn main() {
+ bar(true);
+ bar(false);
+}
diff --git a/tests/ui/match/match-tail-expr-never-type-error.stderr b/tests/ui/match/match-tail-expr-never-type-error.stderr
new file mode 100644
index 000000000..226d33dae
--- /dev/null
+++ b/tests/ui/match/match-tail-expr-never-type-error.stderr
@@ -0,0 +1,21 @@
+error[E0308]: `match` arms have incompatible types
+ --> $DIR/match-tail-expr-never-type-error.rs:9:13
+ |
+LL | fn bar(a: bool) {
+ | - help: try adding a return type: `-> i32`
+LL | / match a {
+LL | | true => 1,
+ | | - this is found to be of type `{integer}`
+LL | | false => {
+LL | | never()
+ | | ^^^^^^^
+ | | |
+ | | expected integer, found `()`
+ | | this expression is of type `!`, but it is coerced to `()` due to its surrounding expression
+LL | | }
+LL | | }
+ | |_____- `match` arms have incompatible types
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/match/match-unresolved-one-arm.stderr b/tests/ui/match/match-unresolved-one-arm.stderr
index e3b501b2f..44571ac53 100644
--- a/tests/ui/match/match-unresolved-one-arm.stderr
+++ b/tests/ui/match/match-unresolved-one-arm.stderr
@@ -9,6 +9,6 @@ help: consider giving `x` an explicit type
LL | let x: /* Type */ = match () {
| ++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/match/match-vec-mismatch-2.stderr b/tests/ui/match/match-vec-mismatch-2.stderr
index 5247bea62..bdfe063d5 100644
--- a/tests/ui/match/match-vec-mismatch-2.stderr
+++ b/tests/ui/match/match-vec-mismatch-2.stderr
@@ -4,6 +4,6 @@ error[E0529]: expected an array or slice, found `()`
LL | [()] => { }
| ^^^^ pattern cannot match with input type `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0529`.
diff --git a/tests/ui/match/non-first-arm-doesnt-match-expected-return-type.stderr b/tests/ui/match/non-first-arm-doesnt-match-expected-return-type.stderr
index e6d93b8b5..5a6c9dff7 100644
--- a/tests/ui/match/non-first-arm-doesnt-match-expected-return-type.stderr
+++ b/tests/ui/match/non-first-arm-doesnt-match-expected-return-type.stderr
@@ -7,6 +7,6 @@ LL | fn test(shouldwe: Option<u32>, shouldwe2: Option<u32>) -> u32 {
LL | None => (),
| ^^ expected `u32`, found `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/match/single-line.stderr b/tests/ui/match/single-line.stderr
index ec3b76e3f..15dc672c1 100644
--- a/tests/ui/match/single-line.stderr
+++ b/tests/ui/match/single-line.stderr
@@ -7,6 +7,6 @@ LL | let _ = match Some(42) { Some(x) => x, None => "" };
| | this is found to be of type `{integer}`
| `match` arms have incompatible types
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/meta/expected-error-correct-rev.a.stderr b/tests/ui/meta/expected-error-correct-rev.a.stderr
index 4adeebe2a..d5b7603d3 100644
--- a/tests/ui/meta/expected-error-correct-rev.a.stderr
+++ b/tests/ui/meta/expected-error-correct-rev.a.stderr
@@ -11,6 +11,6 @@ help: change the type of the numeric literal from `usize` to `u32`
LL | let x: u32 = 22_u32;
| ~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/meta/meta-expected-error-wrong-rev.a.stderr b/tests/ui/meta/meta-expected-error-wrong-rev.a.stderr
index 87330155e..4221dd04c 100644
--- a/tests/ui/meta/meta-expected-error-wrong-rev.a.stderr
+++ b/tests/ui/meta/meta-expected-error-wrong-rev.a.stderr
@@ -11,6 +11,6 @@ help: change the type of the numeric literal from `usize` to `u32`
LL | let x: u32 = 22_u32;
| ~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/methods/issue-3707.stderr b/tests/ui/methods/issue-3707.stderr
index 07c8101cb..b3d4dfe5a 100644
--- a/tests/ui/methods/issue-3707.stderr
+++ b/tests/ui/methods/issue-3707.stderr
@@ -14,6 +14,6 @@ note: the candidate is defined in an impl for the type `Obj`
LL | pub fn boom() -> bool {
| ^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/methods/issues/issue-84495.stderr b/tests/ui/methods/issues/issue-84495.stderr
index b0217a7c8..1603c0026 100644
--- a/tests/ui/methods/issues/issue-84495.stderr
+++ b/tests/ui/methods/issues/issue-84495.stderr
@@ -8,6 +8,6 @@ LL | println!("{:?}", x.count());
`i32: Iterator`
which is required by `&mut i32: Iterator`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/methods/issues/issue-94581.stderr b/tests/ui/methods/issues/issue-94581.stderr
index d6be29cf5..ae7446d48 100644
--- a/tests/ui/methods/issues/issue-94581.stderr
+++ b/tests/ui/methods/issues/issue-94581.stderr
@@ -10,6 +10,6 @@ LL | let sqsum = get_slice().map(|i| i * i).sum();
`[i32]: Iterator`
which is required by `&mut [i32]: Iterator`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/methods/method-ambig-two-traits-cross-crate.stderr b/tests/ui/methods/method-ambig-two-traits-cross-crate.stderr
index 5132d9277..0c775612b 100644
--- a/tests/ui/methods/method-ambig-two-traits-cross-crate.stderr
+++ b/tests/ui/methods/method-ambig-two-traits-cross-crate.stderr
@@ -19,6 +19,6 @@ help: disambiguate the method for candidate #2
LL | fn main() { Me2::me(&1_usize); }
| ~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0034`.
diff --git a/tests/ui/methods/method-ambig-two-traits-from-bounds.stderr b/tests/ui/methods/method-ambig-two-traits-from-bounds.stderr
index 9a84768a9..690f979fa 100644
--- a/tests/ui/methods/method-ambig-two-traits-from-bounds.stderr
+++ b/tests/ui/methods/method-ambig-two-traits-from-bounds.stderr
@@ -23,6 +23,6 @@ help: disambiguate the method for candidate #2
LL | B::foo(&t);
| ~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0034`.
diff --git a/tests/ui/methods/method-ambig-two-traits-from-impls.stderr b/tests/ui/methods/method-ambig-two-traits-from-impls.stderr
index 313591433..8be6d6d64 100644
--- a/tests/ui/methods/method-ambig-two-traits-from-impls.stderr
+++ b/tests/ui/methods/method-ambig-two-traits-from-impls.stderr
@@ -23,6 +23,6 @@ help: disambiguate the method for candidate #2
LL | B::foo(AB {});
| ~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0034`.
diff --git a/tests/ui/methods/method-ambig-two-traits-from-impls2.stderr b/tests/ui/methods/method-ambig-two-traits-from-impls2.stderr
index 5bb887b45..333520847 100644
--- a/tests/ui/methods/method-ambig-two-traits-from-impls2.stderr
+++ b/tests/ui/methods/method-ambig-two-traits-from-impls2.stderr
@@ -21,6 +21,6 @@ LL | <AB as A>::foo();
LL | <AB as B>::foo();
| ~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0034`.
diff --git a/tests/ui/methods/method-ambig-two-traits-with-default-method.stderr b/tests/ui/methods/method-ambig-two-traits-with-default-method.stderr
index df01966b3..9da307436 100644
--- a/tests/ui/methods/method-ambig-two-traits-with-default-method.stderr
+++ b/tests/ui/methods/method-ambig-two-traits-with-default-method.stderr
@@ -23,6 +23,6 @@ help: disambiguate the method for candidate #2
LL | Bar::method(&1_usize);
| ~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0034`.
diff --git a/tests/ui/methods/method-ambiguity-no-rcvr.rs b/tests/ui/methods/method-ambiguity-no-rcvr.rs
new file mode 100644
index 000000000..8f36011d4
--- /dev/null
+++ b/tests/ui/methods/method-ambiguity-no-rcvr.rs
@@ -0,0 +1,14 @@
+struct Qux;
+
+trait Foo {
+ fn foo();
+}
+
+trait FooBar {
+ fn foo() {}
+}
+
+fn main() {
+ Qux.foo();
+ //~^ ERROR no method named `foo` found for struct `Qux` in the current scope
+}
diff --git a/tests/ui/methods/method-ambiguity-no-rcvr.stderr b/tests/ui/methods/method-ambiguity-no-rcvr.stderr
new file mode 100644
index 000000000..73f6043f2
--- /dev/null
+++ b/tests/ui/methods/method-ambiguity-no-rcvr.stderr
@@ -0,0 +1,32 @@
+error[E0599]: no method named `foo` found for struct `Qux` in the current scope
+ --> $DIR/method-ambiguity-no-rcvr.rs:12:9
+ |
+LL | struct Qux;
+ | ---------- method `foo` not found for this struct
+...
+LL | Qux.foo();
+ | ^^^ this is an associated function, not a method
+ |
+ = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
+note: candidate #1 is defined in the trait `Foo`
+ --> $DIR/method-ambiguity-no-rcvr.rs:4:5
+ |
+LL | fn foo();
+ | ^^^^^^^^^
+note: candidate #2 is defined in the trait `FooBar`
+ --> $DIR/method-ambiguity-no-rcvr.rs:8:5
+ |
+LL | fn foo() {}
+ | ^^^^^^^^
+help: disambiguate the associated function for candidate #1
+ |
+LL | <Qux as Foo>::foo(Qux);
+ | ~~~~~~~~~~~~~~~~~~~~~~
+help: disambiguate the associated function for candidate #2
+ |
+LL | <Qux as FooBar>::foo(Qux);
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/methods/method-call-lifetime-args-unresolved.stderr b/tests/ui/methods/method-call-lifetime-args-unresolved.stderr
index 25ad360b3..c72e7e0cd 100644
--- a/tests/ui/methods/method-call-lifetime-args-unresolved.stderr
+++ b/tests/ui/methods/method-call-lifetime-args-unresolved.stderr
@@ -19,6 +19,6 @@ LL | 0.clone::<'a>();
= note: for more information, see issue #42868 <https://github.com/rust-lang/rust/issues/42868>
= note: `#[warn(late_bound_lifetime_arguments)]` on by default
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0261`.
diff --git a/tests/ui/methods/method-call-type-binding.stderr b/tests/ui/methods/method-call-type-binding.stderr
index 4b93082ac..54d855d34 100644
--- a/tests/ui/methods/method-call-type-binding.stderr
+++ b/tests/ui/methods/method-call-type-binding.stderr
@@ -4,6 +4,6 @@ error[E0229]: associated type bindings are not allowed here
LL | 0.clone::<T = u8>();
| ^^^^^^ associated type not allowed here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0229`.
diff --git a/tests/ui/methods/method-macro-backtrace.stderr b/tests/ui/methods/method-macro-backtrace.stderr
index dd616c4a5..f0b111379 100644
--- a/tests/ui/methods/method-macro-backtrace.stderr
+++ b/tests/ui/methods/method-macro-backtrace.stderr
@@ -6,6 +6,6 @@ LL | fn bar(&self) { }
LL | fn bar(&self) { }
| ^^^^^^^^^^^^^ duplicate definitions for `bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0592`.
diff --git a/tests/ui/methods/method-not-found-but-doc-alias.stderr b/tests/ui/methods/method-not-found-but-doc-alias.stderr
index 5102a452f..9746c4040 100644
--- a/tests/ui/methods/method-not-found-but-doc-alias.stderr
+++ b/tests/ui/methods/method-not-found-but-doc-alias.stderr
@@ -7,6 +7,6 @@ LL | struct Foo;
LL | Foo.quux();
| ^^^^ help: there is a method with a similar name: `bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/methods/method-resolvable-path-in-pattern.stderr b/tests/ui/methods/method-resolvable-path-in-pattern.stderr
index 7c454a9a7..070d912d1 100644
--- a/tests/ui/methods/method-resolvable-path-in-pattern.stderr
+++ b/tests/ui/methods/method-resolvable-path-in-pattern.stderr
@@ -4,6 +4,6 @@ error[E0532]: expected unit struct, unit variant or constant, found associated f
LL | <Foo as MyTrait>::trait_bar => {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a unit struct, unit variant or constant
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0532`.
diff --git a/tests/ui/methods/suggest-method-on-call-with-macro-rcvr.stderr b/tests/ui/methods/suggest-method-on-call-with-macro-rcvr.stderr
index 9694f80ab..86c2f6431 100644
--- a/tests/ui/methods/suggest-method-on-call-with-macro-rcvr.stderr
+++ b/tests/ui/methods/suggest-method-on-call-with-macro-rcvr.stderr
@@ -10,6 +10,6 @@ LL - let hello = len(vec![]);
LL + let hello = vec![].len();
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/minus-string.stderr b/tests/ui/minus-string.stderr
index b429ad304..105274ee7 100644
--- a/tests/ui/minus-string.stderr
+++ b/tests/ui/minus-string.stderr
@@ -4,6 +4,6 @@ error[E0600]: cannot apply unary operator `-` to type `String`
LL | fn main() { -"foo".to_string(); }
| ^^^^^^^^^^^^^^^^^^ cannot apply unary operator `-`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0600`.
diff --git a/tests/ui/mir/build-async-error-body-correctly.stderr b/tests/ui/mir/build-async-error-body-correctly.stderr
index 3d18c249a..4b9cdc4f9 100644
--- a/tests/ui/mir/build-async-error-body-correctly.stderr
+++ b/tests/ui/mir/build-async-error-body-correctly.stderr
@@ -12,6 +12,6 @@ LL + _ => todo!(),
LL ~ };
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/mir/field-projection-mutating-context.stderr b/tests/ui/mir/field-projection-mutating-context.stderr
index 9b18b3427..c7289c0f0 100644
--- a/tests/ui/mir/field-projection-mutating-context.stderr
+++ b/tests/ui/mir/field-projection-mutating-context.stderr
@@ -4,9 +4,9 @@ error[E0308]: mismatched types
LL | let Foo(ref mut y): Foo<fn(&'static str)> = x;
| ^^^^^^^^^ one type is more general than the other
|
- = note: expected fn pointer `for<'a> fn(&'a str)`
- found fn pointer `fn(&str)`
+ = note: expected fn pointer `for<'a> fn(&'a _)`
+ found fn pointer `fn(&_)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/mir/field-projection-mutating-context2.stderr b/tests/ui/mir/field-projection-mutating-context2.stderr
index a7b66fe10..167400170 100644
--- a/tests/ui/mir/field-projection-mutating-context2.stderr
+++ b/tests/ui/mir/field-projection-mutating-context2.stderr
@@ -6,5 +6,5 @@ LL | fn foo<'a>(mut x: Foo<fn(&'a str)>, string: &'a str) {
LL | let Foo(ref mut y): Foo<fn(&'static str)> = x;
| ^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/mir/issue-102389.stderr b/tests/ui/mir/issue-102389.stderr
index 925dc258a..1f04d119b 100644
--- a/tests/ui/mir/issue-102389.stderr
+++ b/tests/ui/mir/issue-102389.stderr
@@ -4,6 +4,6 @@ error[E0507]: cannot move out of `*inbounds` which is behind a shared reference
LL | array[*inbounds as usize]
| ^^^^^^^^^ move occurs because `*inbounds` has type `Enum`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/mir/issue-106062.stderr b/tests/ui/mir/issue-106062.stderr
index 2f6524d03..30635148d 100644
--- a/tests/ui/mir/issue-106062.stderr
+++ b/tests/ui/mir/issue-106062.stderr
@@ -11,6 +11,6 @@ LL | async fn connection_handler(handler: impl Sized) -> Result<core::result
LL | async fn connection_handler(handler: impl Sized) -> Result<std::result::Result, std::io::Error> {
| ~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0573`.
diff --git a/tests/ui/mir/issue-75053.stderr b/tests/ui/mir/issue-75053.stderr
index 64e59e6c4..bd37f0c92 100644
--- a/tests/ui/mir/issue-75053.stderr
+++ b/tests/ui/mir/issue-75053.stderr
@@ -4,5 +4,5 @@ error: fatal error triggered by #[rustc_error]
LL | fn main() {
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/mir/issue-92893.stderr b/tests/ui/mir/issue-92893.stderr
index 6c1a9dc03..3bf056d15 100644
--- a/tests/ui/mir/issue-92893.stderr
+++ b/tests/ui/mir/issue-92893.stderr
@@ -6,5 +6,5 @@ LL | struct Bug<A = [(); (let a = (), 1).1]> {
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/mir/mir_raw_fat_ptr.rs b/tests/ui/mir/mir_raw_fat_ptr.rs
index 6aceefbe7..f4a9afd23 100644
--- a/tests/ui/mir/mir_raw_fat_ptr.rs
+++ b/tests/ui/mir/mir_raw_fat_ptr.rs
@@ -1,7 +1,9 @@
// run-pass
// check raw fat pointer ops in mir
// FIXME: please improve this when we get monomorphization support
+
#![feature(raw_ref_op)]
+#![allow(ambiguous_wide_pointer_comparisons)]
use std::mem;
diff --git a/tests/ui/mir/ssa_call_ret.rs b/tests/ui/mir/ssa_call_ret.rs
new file mode 100644
index 000000000..6132a6691
--- /dev/null
+++ b/tests/ui/mir/ssa_call_ret.rs
@@ -0,0 +1,30 @@
+// Regression test for issue #117331, where variable `a` was misidentified as
+// being in SSA form (the definition occurs on the return edge only).
+//
+// edition:2021
+// compile-flags: --crate-type=lib
+// build-pass
+// needs-unwind
+#![feature(custom_mir, core_intrinsics)]
+use core::intrinsics::mir::*;
+
+#[custom_mir(dialect = "runtime", phase = "optimized")]
+pub fn f() -> u32 {
+ mir!(
+ let a: u32;
+ {
+ Call(a = g(), bb1, UnwindCleanup(bb2))
+ }
+ bb1 = {
+ RET = a;
+ Return()
+ }
+ bb2 (cleanup) = {
+ RET = a;
+ UnwindResume()
+ }
+ )
+}
+
+#[inline(never)]
+pub fn g() -> u32 { 0 }
diff --git a/tests/ui/mir/validate/critical-edge.rs b/tests/ui/mir/validate/critical-edge.rs
new file mode 100644
index 000000000..9ef655cd1
--- /dev/null
+++ b/tests/ui/mir/validate/critical-edge.rs
@@ -0,0 +1,31 @@
+// Optimized MIR shouldn't have critical call edges
+//
+// build-fail
+// edition: 2021
+// compile-flags: --crate-type=lib
+// failure-status: 101
+// dont-check-compiler-stderr
+// error-pattern: encountered critical edge in `Call` terminator
+#![feature(custom_mir, core_intrinsics)]
+use core::intrinsics::mir::*;
+
+#[custom_mir(dialect = "runtime", phase = "optimized")]
+#[inline(always)]
+pub fn f(a: u32) -> u32 {
+ mir!(
+ {
+ match a {
+ 0 => bb1,
+ _ => bb2,
+ }
+ }
+ bb1 = {
+ Call(RET = f(1), bb2, UnwindTerminate(ReasonAbi))
+ }
+
+ bb2 = {
+ RET = 2;
+ Return()
+ }
+ )
+}
diff --git a/tests/ui/mir/validate/noncleanup-cleanup.rs b/tests/ui/mir/validate/noncleanup-cleanup.rs
new file mode 100644
index 000000000..0a1c4528a
--- /dev/null
+++ b/tests/ui/mir/validate/noncleanup-cleanup.rs
@@ -0,0 +1,21 @@
+// Check that validation rejects cleanup edge to a non-cleanup block.
+//
+// failure-status: 101
+// dont-check-compiler-stderr
+// error-pattern: cleanuppad mismatch
+#![feature(custom_mir, core_intrinsics)]
+extern crate core;
+use core::intrinsics::mir::*;
+
+#[custom_mir(dialect = "built")]
+pub fn main() {
+ mir!(
+ {
+ Call(RET = main(), block, UnwindCleanup(block))
+ }
+ block = {
+ Return()
+ }
+ )
+
+}
diff --git a/tests/ui/mir/validate/noncleanup-resume.rs b/tests/ui/mir/validate/noncleanup-resume.rs
new file mode 100644
index 000000000..e80d09bc9
--- /dev/null
+++ b/tests/ui/mir/validate/noncleanup-resume.rs
@@ -0,0 +1,17 @@
+// Check that validation rejects resume terminator in a non-cleanup block.
+//
+// failure-status: 101
+// dont-check-compiler-stderr
+// error-pattern: resume on non-cleanup block
+#![feature(custom_mir, core_intrinsics)]
+extern crate core;
+use core::intrinsics::mir::*;
+
+#[custom_mir(dialect = "built")]
+pub fn main() {
+ mir!(
+ {
+ UnwindResume()
+ }
+ )
+}
diff --git a/tests/ui/mir/validate/noncleanup-terminate.rs b/tests/ui/mir/validate/noncleanup-terminate.rs
new file mode 100644
index 000000000..2a7466837
--- /dev/null
+++ b/tests/ui/mir/validate/noncleanup-terminate.rs
@@ -0,0 +1,17 @@
+// Check that validation rejects terminate terminator in a non-cleanup block.
+//
+// failure-status: 101
+// dont-check-compiler-stderr
+// error-pattern: terminate on non-cleanup block
+#![feature(custom_mir, core_intrinsics)]
+extern crate core;
+use core::intrinsics::mir::*;
+
+#[custom_mir(dialect = "built")]
+pub fn main() {
+ mir!(
+ {
+ UnwindTerminate(ReasonAbi)
+ }
+ )
+}
diff --git a/tests/ui/mismatched_types/E0631.stderr b/tests/ui/mismatched_types/E0631.stderr
index 410ea4b0b..9ba8f5035 100644
--- a/tests/ui/mismatched_types/E0631.stderr
+++ b/tests/ui/mismatched_types/E0631.stderr
@@ -48,6 +48,10 @@ note: required by a bound in `foo`
|
LL | fn foo<F: Fn(usize)>(_: F) {}
| ^^^^^^^^^ required by this bound in `foo`
+help: consider wrapping the function in a closure
+ |
+LL | foo(|arg0: usize| f(/* u64 */));
+ | +++++++++++++ +++++++++++
error[E0631]: type mismatch in function arguments
--> $DIR/E0631.rs:10:9
@@ -67,6 +71,10 @@ note: required by a bound in `bar`
|
LL | fn bar<F: Fn<(usize,)>>(_: F) {}
| ^^^^^^^^^^^^ required by this bound in `bar`
+help: consider wrapping the function in a closure
+ |
+LL | bar(|arg0: usize| f(/* u64 */));
+ | +++++++++++++ +++++++++++
error: aborting due to 4 previous errors
diff --git a/tests/ui/mismatched_types/assignment-operator-unimplemented.stderr b/tests/ui/mismatched_types/assignment-operator-unimplemented.stderr
index 66a85c465..6609fa8c0 100644
--- a/tests/ui/mismatched_types/assignment-operator-unimplemented.stderr
+++ b/tests/ui/mismatched_types/assignment-operator-unimplemented.stderr
@@ -14,6 +14,6 @@ LL | struct Foo;
note: the trait `AddAssign` must be implemented
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0368`.
diff --git a/tests/ui/mismatched_types/cast-rfc0401.stderr b/tests/ui/mismatched_types/cast-rfc0401.stderr
index d63cec489..142a52aef 100644
--- a/tests/ui/mismatched_types/cast-rfc0401.stderr
+++ b/tests/ui/mismatched_types/cast-rfc0401.stderr
@@ -18,7 +18,7 @@ error[E0609]: no field `f` on type `fn() {main}`
--> $DIR/cast-rfc0401.rs:65:18
|
LL | let _ = main.f as *const u32;
- | ^
+ | ^ unknown field
error[E0605]: non-primitive cast: `*const u8` as `&u8`
--> $DIR/cast-rfc0401.rs:29:13
diff --git a/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.stderr b/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.stderr
index d7db90e50..801e8a0ff 100644
--- a/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.stderr
+++ b/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.stderr
@@ -11,6 +11,6 @@ help: change the closure to accept a tuple instead of individual arguments
LL | let _n = m.iter().map(|(_, b)| {
| ~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0593`.
diff --git a/tests/ui/mismatched_types/closure-arg-type-mismatch.stderr b/tests/ui/mismatched_types/closure-arg-type-mismatch.stderr
index 760e3327b..e9808b869 100644
--- a/tests/ui/mismatched_types/closure-arg-type-mismatch.stderr
+++ b/tests/ui/mismatched_types/closure-arg-type-mismatch.stderr
@@ -6,8 +6,8 @@ LL | a.iter().map(|_: (u32, u32)| 45);
| |
| expected due to this
|
- = note: expected closure signature `fn(&(u32, u32)) -> _`
- found closure signature `fn((u32, u32)) -> _`
+ = note: expected closure signature `fn(&(_, _)) -> _`
+ found closure signature `fn((_, _)) -> _`
note: required by a bound in `map`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
help: consider adjusting the signature so it borrows its argument
diff --git a/tests/ui/mismatched_types/closure-mismatch.stderr b/tests/ui/mismatched_types/closure-mismatch.stderr
index c5b8270ba..74033c185 100644
--- a/tests/ui/mismatched_types/closure-mismatch.stderr
+++ b/tests/ui/mismatched_types/closure-mismatch.stderr
@@ -13,8 +13,8 @@ error[E0308]: mismatched types
LL | baz(|_| ());
| ^^^^^^^^^^^ one type is more general than the other
|
- = note: expected trait `for<'a> Fn<(&'a (),)>`
- found trait `Fn<(&(),)>`
+ = note: expected trait `for<'a> Fn(&'a ())`
+ found trait `Fn(&())`
note: this closure does not fulfill the lifetime requirements
--> $DIR/closure-mismatch.rs:8:9
|
@@ -45,8 +45,8 @@ error[E0308]: mismatched types
LL | baz(|x| ());
| ^^^^^^^^^^^ one type is more general than the other
|
- = note: expected trait `for<'a> Fn<(&'a (),)>`
- found trait `Fn<(&(),)>`
+ = note: expected trait `for<'a> Fn(&'a ())`
+ found trait `Fn(&())`
note: this closure does not fulfill the lifetime requirements
--> $DIR/closure-mismatch.rs:11:9
|
diff --git a/tests/ui/mismatched_types/closure-ref-114180.stderr b/tests/ui/mismatched_types/closure-ref-114180.stderr
index 8a146d784..27649822e 100644
--- a/tests/ui/mismatched_types/closure-ref-114180.stderr
+++ b/tests/ui/mismatched_types/closure-ref-114180.stderr
@@ -12,11 +12,15 @@ LL | v.sort_by(compare);
found closure signature `fn((_,), (_,)) -> _`
note: required by a bound in `slice::<impl [T]>::sort_by`
--> $SRC_DIR/alloc/src/slice.rs:LL:COL
+help: consider wrapping the function in a closure
+ |
+LL | v.sort_by(|arg0, arg1| compare(*arg0, *arg1));
+ | ++++++++++++ ++++++++++++++
help: consider adjusting the signature so it borrows its arguments
|
LL | let compare = |&(a,), &(e,)| todo!();
| + +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0631`.
diff --git a/tests/ui/mismatched_types/dont-point-return-on-E0308.stderr b/tests/ui/mismatched_types/dont-point-return-on-E0308.stderr
index 7be94ef4a..9d4852cff 100644
--- a/tests/ui/mismatched_types/dont-point-return-on-E0308.stderr
+++ b/tests/ui/mismatched_types/dont-point-return-on-E0308.stderr
@@ -16,6 +16,6 @@ help: consider borrowing here
LL | f(&());
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/mismatched_types/fn-variance-1.stderr b/tests/ui/mismatched_types/fn-variance-1.stderr
index 5794e606e..fdb2e6f00 100644
--- a/tests/ui/mismatched_types/fn-variance-1.stderr
+++ b/tests/ui/mismatched_types/fn-variance-1.stderr
@@ -16,6 +16,10 @@ note: required by a bound in `apply`
|
LL | fn apply<T, F>(t: T, f: F) where F: FnOnce(T) {
| ^^^^^^^^^ required by this bound in `apply`
+help: consider wrapping the function in a closure
+ |
+LL | apply(&3, |x| takes_mut(&mut *x));
+ | +++ +++++++++
error[E0631]: type mismatch in function arguments
--> $DIR/fn-variance-1.rs:15:19
@@ -35,6 +39,10 @@ note: required by a bound in `apply`
|
LL | fn apply<T, F>(t: T, f: F) where F: FnOnce(T) {
| ^^^^^^^^^ required by this bound in `apply`
+help: consider wrapping the function in a closure
+ |
+LL | apply(&mut 3, |x| takes_imm(&*x));
+ | +++ +++++
error: aborting due to 2 previous errors
diff --git a/tests/ui/mismatched_types/for-loop-has-unit-body.stderr b/tests/ui/mismatched_types/for-loop-has-unit-body.stderr
index f36fe64bf..f75244790 100644
--- a/tests/ui/mismatched_types/for-loop-has-unit-body.stderr
+++ b/tests/ui/mismatched_types/for-loop-has-unit-body.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | x
| ^ expected `()`, found integer
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/mismatched_types/issue-106182.stderr b/tests/ui/mismatched_types/issue-106182.stderr
index 96ab3a029..2f33628a4 100644
--- a/tests/ui/mismatched_types/issue-106182.stderr
+++ b/tests/ui/mismatched_types/issue-106182.stderr
@@ -13,6 +13,6 @@ help: consider removing `&` from the pattern
LL | _S(mut _y, _v) => {
| ~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/mismatched_types/issue-112036.stderr b/tests/ui/mismatched_types/issue-112036.stderr
index a883aba35..b93ce4a86 100644
--- a/tests/ui/mismatched_types/issue-112036.stderr
+++ b/tests/ui/mismatched_types/issue-112036.stderr
@@ -10,6 +10,6 @@ LL | fn drop(self) {}
= note: expected signature `fn(&mut Foo)`
found signature `fn(Foo)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0053`.
diff --git a/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.fixed b/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.fixed
new file mode 100644
index 000000000..15d4e3938
--- /dev/null
+++ b/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.fixed
@@ -0,0 +1,20 @@
+// run-rustfix
+#![allow(unused, dead_code)]
+
+#[derive(Clone, Copy)]
+struct Stuff {
+ count: i32,
+}
+struct Error;
+
+fn demo() -> Result<Stuff, Error> {
+ let count = Ok(1);
+ Ok(Stuff { count: count? }) //~ ERROR mismatched types
+}
+
+fn demo_unwrap() -> Stuff {
+ let count = Some(1);
+ Stuff { count: count.expect("REASON") } //~ ERROR mismatched types
+}
+
+fn main() {}
diff --git a/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.rs b/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.rs
new file mode 100644
index 000000000..8e811caa3
--- /dev/null
+++ b/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.rs
@@ -0,0 +1,20 @@
+// run-rustfix
+#![allow(unused, dead_code)]
+
+#[derive(Clone, Copy)]
+struct Stuff {
+ count: i32,
+}
+struct Error;
+
+fn demo() -> Result<Stuff, Error> {
+ let count = Ok(1);
+ Ok(Stuff { count }) //~ ERROR mismatched types
+}
+
+fn demo_unwrap() -> Stuff {
+ let count = Some(1);
+ Stuff { count } //~ ERROR mismatched types
+}
+
+fn main() {}
diff --git a/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.stderr b/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.stderr
new file mode 100644
index 000000000..0bcbd6f27
--- /dev/null
+++ b/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.stderr
@@ -0,0 +1,29 @@
+error[E0308]: mismatched types
+ --> $DIR/issue-118145-unwrap-for-shorthand.rs:12:16
+ |
+LL | Ok(Stuff { count })
+ | ^^^^^ expected `i32`, found `Result<{integer}, _>`
+ |
+ = note: expected type `i32`
+ found enum `Result<{integer}, _>`
+help: use the `?` operator to extract the `Result<{integer}, _>` value, propagating a `Result::Err` value to the caller
+ |
+LL | Ok(Stuff { count: count? })
+ | ++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/issue-118145-unwrap-for-shorthand.rs:17:13
+ |
+LL | Stuff { count }
+ | ^^^^^ expected `i32`, found `Option<{integer}>`
+ |
+ = note: expected type `i32`
+ found enum `Option<{integer}>`
+help: consider using `Option::expect` to unwrap the `Option<{integer}>` value, panicking if the value is an `Option::None`
+ |
+LL | Stuff { count: count.expect("REASON") }
+ | ++++++++++++++++++++++++
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/mismatched_types/issue-118510.rs b/tests/ui/mismatched_types/issue-118510.rs
new file mode 100644
index 000000000..86b9d44a3
--- /dev/null
+++ b/tests/ui/mismatched_types/issue-118510.rs
@@ -0,0 +1,10 @@
+pub enum Sexpr<'a, S> {
+ Ident(&'a mut S),
+}
+
+fn map<Foo, T, F: FnOnce(&Foo) -> T>(f: F) {}
+
+fn main() {
+ map(Sexpr::Ident);
+ //~^ ERROR type mismatch in function arguments
+}
diff --git a/tests/ui/mismatched_types/issue-118510.stderr b/tests/ui/mismatched_types/issue-118510.stderr
new file mode 100644
index 000000000..e8bf92d90
--- /dev/null
+++ b/tests/ui/mismatched_types/issue-118510.stderr
@@ -0,0 +1,26 @@
+error[E0631]: type mismatch in function arguments
+ --> $DIR/issue-118510.rs:8:9
+ |
+LL | Ident(&'a mut S),
+ | ----- found signature defined here
+...
+LL | map(Sexpr::Ident);
+ | --- ^^^^^^^^^^^^ expected due to this
+ | |
+ | required by a bound introduced by this call
+ |
+ = note: expected function signature `for<'a> fn(&'a _) -> _`
+ found function signature `fn(&mut _) -> _`
+note: required by a bound in `map`
+ --> $DIR/issue-118510.rs:5:19
+ |
+LL | fn map<Foo, T, F: FnOnce(&Foo) -> T>(f: F) {}
+ | ^^^^^^^^^^^^^^^^^ required by this bound in `map`
+help: consider wrapping the function in a closure
+ |
+LL | map(|arg0| Sexpr::Ident(&mut *arg0));
+ | ++++++ ++++++++++++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0631`.
diff --git a/tests/ui/mismatched_types/issue-13033.stderr b/tests/ui/mismatched_types/issue-13033.stderr
index db2c1189e..4886fa30e 100644
--- a/tests/ui/mismatched_types/issue-13033.stderr
+++ b/tests/ui/mismatched_types/issue-13033.stderr
@@ -15,6 +15,6 @@ LL | fn bar(&mut self, other: &mut dyn Foo);
= note: expected signature `fn(&mut Baz, &mut dyn Foo)`
found signature `fn(&mut Baz, &dyn Foo)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0053`.
diff --git a/tests/ui/mismatched_types/issue-19109.stderr b/tests/ui/mismatched_types/issue-19109.stderr
index ca819d93a..e769ed0c1 100644
--- a/tests/ui/mismatched_types/issue-19109.stderr
+++ b/tests/ui/mismatched_types/issue-19109.stderr
@@ -9,6 +9,6 @@ LL | t as *mut dyn Trait
= note: expected unit type `()`
found raw pointer `*mut dyn Trait`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/mismatched_types/issue-35030.stderr b/tests/ui/mismatched_types/issue-35030.stderr
index 881ff9097..62f83ce70 100644
--- a/tests/ui/mismatched_types/issue-35030.stderr
+++ b/tests/ui/mismatched_types/issue-35030.stderr
@@ -21,6 +21,6 @@ LL | Some(true)
note: tuple variant defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/mismatched_types/issue-36053-2.stderr b/tests/ui/mismatched_types/issue-36053-2.stderr
index bac27788a..292525daa 100644
--- a/tests/ui/mismatched_types/issue-36053-2.stderr
+++ b/tests/ui/mismatched_types/issue-36053-2.stderr
@@ -6,8 +6,8 @@ LL | once::<&str>("str").fuse().filter(|a: &str| true).count();
| |
| expected due to this
|
- = note: expected closure signature `for<'a> fn(&'a &str) -> _`
- found closure signature `for<'a> fn(&'a str) -> _`
+ = note: expected closure signature `for<'a> fn(&'a &_) -> _`
+ found closure signature `for<'a> fn(&'a _) -> _`
note: required by a bound in `filter`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
help: consider adjusting the signature so it borrows its argument
diff --git a/tests/ui/mismatched_types/issue-47706-trait.stderr b/tests/ui/mismatched_types/issue-47706-trait.stderr
index a5f38dd53..c54a62c5e 100644
--- a/tests/ui/mismatched_types/issue-47706-trait.stderr
+++ b/tests/ui/mismatched_types/issue-47706-trait.stderr
@@ -11,6 +11,6 @@ LL | None::<()>.map(Self::f);
note: required by a bound in `Option::<T>::map`
--> $SRC_DIR/core/src/option.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0593`.
diff --git a/tests/ui/mismatched_types/issue-75361-mismatched-impl.stderr b/tests/ui/mismatched_types/issue-75361-mismatched-impl.stderr
index 88416ba4b..5c2278ddf 100644
--- a/tests/ui/mismatched_types/issue-75361-mismatched-impl.stderr
+++ b/tests/ui/mismatched_types/issue-75361-mismatched-impl.stderr
@@ -15,5 +15,5 @@ help: the lifetime requirements from the `impl` do not correspond to the require
LL | fn adjacent_edges(&self) -> Box<dyn MyTrait<Item = &Self::EdgeType>>;
| ^^^^ consider borrowing this type parameter in the trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/mismatched_types/main.stderr b/tests/ui/mismatched_types/main.stderr
index a662741af..38146cef3 100644
--- a/tests/ui/mismatched_types/main.stderr
+++ b/tests/ui/mismatched_types/main.stderr
@@ -8,6 +8,6 @@ LL | let x: u32 = (
LL | | );
| |_____^ expected `u32`, found `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/mismatched_types/method-help-unsatisfied-bound.stderr b/tests/ui/mismatched_types/method-help-unsatisfied-bound.stderr
index 9dab3e522..be3a3e2ab 100644
--- a/tests/ui/mismatched_types/method-help-unsatisfied-bound.stderr
+++ b/tests/ui/mismatched_types/method-help-unsatisfied-bound.stderr
@@ -14,6 +14,6 @@ LL + #[derive(Debug)]
LL | struct Foo;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.fixed b/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.fixed
new file mode 100644
index 000000000..e1f929e61
--- /dev/null
+++ b/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.fixed
@@ -0,0 +1,77 @@
+// run-rustfix
+// edition:2021
+#![allow(dead_code)]
+#![allow(unused_variables)]
+use std::future::Future;
+use std::pin::Pin;
+
+fn test1() {
+ let string = String::from("Hello, world");
+
+ struct Demo<'a> {
+ option: Option<&'a str>,
+ }
+
+ let option: Option<String> = Some(string.clone());
+ let s = Demo { option: option.as_deref() }; //~ ERROR mismatched types
+}
+
+fn test2() {
+ let string = String::from("Hello, world");
+
+ struct Demo<'a> {
+ option_ref: Option<&'a str>,
+ }
+
+ let option_ref = Some(&string);
+ let s = Demo { option_ref: option_ref.map(|x| x.as_str()) }; //~ ERROR mismatched types
+}
+
+fn test3() {
+ let string = String::from("Hello, world");
+
+ struct Demo<'a> {
+ option_ref_ref: Option<&'a str>,
+ }
+
+ let option_ref = Some(&string);
+ let option_ref_ref = option_ref.as_ref();
+
+ let s = Demo { option_ref_ref: option_ref_ref.map(|x| x.as_str()) }; //~ ERROR mismatched types
+}
+
+fn test4() {
+ let a = 1;
+ struct Demo {
+ a: String,
+ }
+ let s = Demo { a: a.to_string() }; //~ ERROR mismatched types
+}
+
+type BoxFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>;
+fn test5() {
+ let a = async { 42 };
+ struct Demo {
+ a: BoxFuture<'static, i32>,
+ }
+ let s = Demo { a: Box::pin(a) }; //~ ERROR mismatched types
+}
+
+fn test6() {
+ struct A;
+ struct B;
+
+ impl From<B> for A {
+ fn from(_: B) -> Self {
+ A
+ }
+ }
+
+ struct Demo {
+ a: A,
+ }
+ let a = B;
+ let s = Demo { a: a.into() }; //~ ERROR mismatched types
+}
+
+fn main() {}
diff --git a/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.rs b/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.rs
new file mode 100644
index 000000000..956936c92
--- /dev/null
+++ b/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.rs
@@ -0,0 +1,77 @@
+// run-rustfix
+// edition:2021
+#![allow(dead_code)]
+#![allow(unused_variables)]
+use std::future::Future;
+use std::pin::Pin;
+
+fn test1() {
+ let string = String::from("Hello, world");
+
+ struct Demo<'a> {
+ option: Option<&'a str>,
+ }
+
+ let option: Option<String> = Some(string.clone());
+ let s = Demo { option }; //~ ERROR mismatched types
+}
+
+fn test2() {
+ let string = String::from("Hello, world");
+
+ struct Demo<'a> {
+ option_ref: Option<&'a str>,
+ }
+
+ let option_ref = Some(&string);
+ let s = Demo { option_ref }; //~ ERROR mismatched types
+}
+
+fn test3() {
+ let string = String::from("Hello, world");
+
+ struct Demo<'a> {
+ option_ref_ref: Option<&'a str>,
+ }
+
+ let option_ref = Some(&string);
+ let option_ref_ref = option_ref.as_ref();
+
+ let s = Demo { option_ref_ref }; //~ ERROR mismatched types
+}
+
+fn test4() {
+ let a = 1;
+ struct Demo {
+ a: String,
+ }
+ let s = Demo { a }; //~ ERROR mismatched types
+}
+
+type BoxFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>;
+fn test5() {
+ let a = async { 42 };
+ struct Demo {
+ a: BoxFuture<'static, i32>,
+ }
+ let s = Demo { a }; //~ ERROR mismatched types
+}
+
+fn test6() {
+ struct A;
+ struct B;
+
+ impl From<B> for A {
+ fn from(_: B) -> Self {
+ A
+ }
+ }
+
+ struct Demo {
+ a: A,
+ }
+ let a = B;
+ let s = Demo { a }; //~ ERROR mismatched types
+}
+
+fn main() {}
diff --git a/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.stderr b/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.stderr
new file mode 100644
index 000000000..1baf95d2b
--- /dev/null
+++ b/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.stderr
@@ -0,0 +1,80 @@
+error[E0308]: mismatched types
+ --> $DIR/mismatch-sugg-for-shorthand-field.rs:16:20
+ |
+LL | let s = Demo { option };
+ | ^^^^^^ expected `Option<&str>`, found `Option<String>`
+ |
+ = note: expected enum `Option<&str>`
+ found enum `Option<String>`
+help: try using `: option.as_deref()` to convert `Option<String>` to `Option<&str>`
+ |
+LL | let s = Demo { option: option.as_deref() };
+ | +++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/mismatch-sugg-for-shorthand-field.rs:27:20
+ |
+LL | let s = Demo { option_ref };
+ | ^^^^^^^^^^ expected `Option<&str>`, found `Option<&String>`
+ |
+ = note: expected enum `Option<&str>`
+ found enum `Option<&String>`
+help: try converting the passed type into a `&str`
+ |
+LL | let s = Demo { option_ref: option_ref.map(|x| x.as_str()) };
+ | ++++++++++++++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/mismatch-sugg-for-shorthand-field.rs:40:20
+ |
+LL | let s = Demo { option_ref_ref };
+ | ^^^^^^^^^^^^^^ expected `Option<&str>`, found `Option<&&String>`
+ |
+ = note: expected enum `Option<&str>`
+ found enum `Option<&&String>`
+help: try converting the passed type into a `&str`
+ |
+LL | let s = Demo { option_ref_ref: option_ref_ref.map(|x| x.as_str()) };
+ | ++++++++++++++++++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/mismatch-sugg-for-shorthand-field.rs:48:20
+ |
+LL | let s = Demo { a };
+ | ^ expected `String`, found integer
+ |
+help: try using a conversion method
+ |
+LL | let s = Demo { a: a.to_string() };
+ | ++ ++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/mismatch-sugg-for-shorthand-field.rs:57:20
+ |
+LL | let a = async { 42 };
+ | ------------ the found `async` block
+...
+LL | let s = Demo { a };
+ | ^ expected `Pin<Box<...>>`, found `async` block
+ |
+ = note: expected struct `Pin<Box<(dyn Future<Output = i32> + Send + 'static)>>`
+ found `async` block `{async block@$DIR/mismatch-sugg-for-shorthand-field.rs:53:13: 53:25}`
+help: you need to pin and box this expression
+ |
+LL | let s = Demo { a: Box::pin(a) };
+ | ++++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/mismatch-sugg-for-shorthand-field.rs:74:20
+ |
+LL | let s = Demo { a };
+ | ^ expected `A`, found `B`
+ |
+help: call `Into::into` on this expression to convert `B` into `A`
+ |
+LL | let s = Demo { a: a.into() };
+ | ++ +++++++
+
+error: aborting due to 6 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/mismatched_types/normalize-fn-sig.stderr b/tests/ui/mismatched_types/normalize-fn-sig.stderr
index 252e56387..0fb3975c3 100644
--- a/tests/ui/mismatched_types/normalize-fn-sig.stderr
+++ b/tests/ui/mismatched_types/normalize-fn-sig.stderr
@@ -6,14 +6,14 @@ LL | needs_i32_ref_fn(foo::<()>);
| |
| arguments to this function are incorrect
|
- = note: expected fn pointer `fn(&'static i32, i32)`
- found fn item `fn(i32, &'static i32) {foo::<()>}`
+ = note: expected fn pointer `fn(&'static _, _)`
+ found fn item `fn(_, &'static _) {foo::<()>}`
note: function defined here
--> $DIR/normalize-fn-sig.rs:11:4
|
LL | fn needs_i32_ref_fn(_: fn(&'static i32, i32)) {}
| ^^^^^^^^^^^^^^^^ ------------------------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/mismatched_types/recovered-block.stderr b/tests/ui/mismatched_types/recovered-block.stderr
index 88d625456..51b5f3b1a 100644
--- a/tests/ui/mismatched_types/recovered-block.stderr
+++ b/tests/ui/mismatched_types/recovered-block.stderr
@@ -9,5 +9,5 @@ help: add `struct` here to parse `Foo` as a public struct
LL | pub struct Foo { text }
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/mismatched_types/show_module.stderr b/tests/ui/mismatched_types/show_module.stderr
index 4bbeaaab9..e95467add 100644
--- a/tests/ui/mismatched_types/show_module.stderr
+++ b/tests/ui/mismatched_types/show_module.stderr
@@ -18,6 +18,6 @@ note: `baz::Foo` is defined in module `crate::blah::baz` of the current crate
LL | pub struct Foo;
| ^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/mismatched_types/similar_paths.stderr b/tests/ui/mismatched_types/similar_paths.stderr
index 3e44fb759..a7a35ec27 100644
--- a/tests/ui/mismatched_types/similar_paths.stderr
+++ b/tests/ui/mismatched_types/similar_paths.stderr
@@ -15,6 +15,6 @@ note: `Option<u8>` is defined in the current crate
LL | enum Option<T> {
| ^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/mismatched_types/similar_paths_primitive.stderr b/tests/ui/mismatched_types/similar_paths_primitive.stderr
index 80e78a4e4..c98818913 100644
--- a/tests/ui/mismatched_types/similar_paths_primitive.stderr
+++ b/tests/ui/mismatched_types/similar_paths_primitive.stderr
@@ -19,6 +19,6 @@ note: function defined here
LL | fn foo(_: bool) {}
| ^^^ -------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/mismatched_types/suggest-option-asderef-inference-var.stderr b/tests/ui/mismatched_types/suggest-option-asderef-inference-var.stderr
index 5c4c13266..0ed57466e 100644
--- a/tests/ui/mismatched_types/suggest-option-asderef-inference-var.stderr
+++ b/tests/ui/mismatched_types/suggest-option-asderef-inference-var.stderr
@@ -13,12 +13,16 @@ LL | let _has_inference_vars: Option<i32> = Some(0).map(deref_int);
found function signature `for<'a> fn(&'a i32) -> _`
note: required by a bound in `Option::<T>::map`
--> $SRC_DIR/core/src/option.rs:LL:COL
+help: consider wrapping the function in a closure
+ |
+LL | let _has_inference_vars: Option<i32> = Some(0).map(|a| deref_int(&a));
+ | +++ ++++
help: consider adjusting the signature so it does not borrow its argument
|
LL - fn deref_int(a: &i32) -> i32 {
LL + fn deref_int(a: i32) -> i32 {
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0631`.
diff --git a/tests/ui/mismatched_types/suggest-option-asderef-unfixable.stderr b/tests/ui/mismatched_types/suggest-option-asderef-unfixable.stderr
index 3175a2589..1ac057a5f 100644
--- a/tests/ui/mismatched_types/suggest-option-asderef-unfixable.stderr
+++ b/tests/ui/mismatched_types/suggest-option-asderef-unfixable.stderr
@@ -13,6 +13,10 @@ LL | let _ = produces_string().and_then(takes_str_but_too_many_refs);
found function signature `for<'a, 'b> fn(&'a &'b str) -> _`
note: required by a bound in `Option::<T>::and_then`
--> $SRC_DIR/core/src/option.rs:LL:COL
+help: consider wrapping the function in a closure
+ |
+LL | let _ = produces_string().and_then(|arg0: String| takes_str_but_too_many_refs(/* &&str */));
+ | ++++++++++++++ +++++++++++++
error[E0277]: expected a `FnOnce(String)` closure, found `for<'a> extern "C" fn(&'a str) -> Option<()> {takes_str_but_wrong_abi}`
--> $DIR/suggest-option-asderef-unfixable.rs:26:40
@@ -68,6 +72,10 @@ LL | let _ = Some(TypeWithoutDeref).and_then(takes_str_but_too_many_refs);
found function signature `for<'a, 'b> fn(&'a &'b str) -> _`
note: required by a bound in `Option::<T>::and_then`
--> $SRC_DIR/core/src/option.rs:LL:COL
+help: consider wrapping the function in a closure
+ |
+LL | let _ = Some(TypeWithoutDeref).and_then(|arg0: TypeWithoutDeref| takes_str_but_too_many_refs(/* &&str */));
+ | ++++++++++++++++++++++++ +++++++++++++
error: aborting due to 5 previous errors
diff --git a/tests/ui/mismatched_types/suggest-option-asderef.fixed b/tests/ui/mismatched_types/suggest-option-asderef.fixed
deleted file mode 100644
index fc488b790..000000000
--- a/tests/ui/mismatched_types/suggest-option-asderef.fixed
+++ /dev/null
@@ -1,39 +0,0 @@
-// run-rustfix
-
-fn produces_string() -> Option<String> {
- Some("my cool string".to_owned())
-}
-
-fn takes_str(_: &str) -> Option<()> {
- Some(())
-}
-
-fn takes_str_mut(_: &mut str) -> Option<()> {
- Some(())
-}
-
-fn generic<T>(_: T) -> Option<()> {
- Some(())
-}
-
-fn generic_ref<T>(_: T) -> Option<()> {
- //~^ HELP consider adjusting the signature so it does not borrow its argument
- Some(())
-}
-
-fn main() {
- let _: Option<()> = produces_string().as_deref().and_then(takes_str);
- //~^ ERROR type mismatch in function arguments
- //~| HELP call `Option::as_deref()` first
- let _: Option<Option<()>> = produces_string().as_deref().map(takes_str);
- //~^ ERROR type mismatch in function arguments
- //~| HELP call `Option::as_deref()` first
- let _: Option<Option<()>> = produces_string().as_deref_mut().map(takes_str_mut);
- //~^ ERROR type mismatch in function arguments
- //~| HELP call `Option::as_deref_mut()` first
- let _ = produces_string().and_then(generic);
-
- let _ = produces_string().as_deref().and_then(generic_ref);
- //~^ ERROR type mismatch in function arguments
- //~| HELP call `Option::as_deref()` first
-}
diff --git a/tests/ui/mismatched_types/suggest-option-asderef.rs b/tests/ui/mismatched_types/suggest-option-asderef.rs
index 28f46808a..5f5617e17 100644
--- a/tests/ui/mismatched_types/suggest-option-asderef.rs
+++ b/tests/ui/mismatched_types/suggest-option-asderef.rs
@@ -1,4 +1,4 @@
-// run-rustfix
+// this isn't auto-fixable now because we produce two similar suggestions
fn produces_string() -> Option<String> {
Some("my cool string".to_owned())
@@ -25,15 +25,19 @@ fn main() {
let _: Option<()> = produces_string().and_then(takes_str);
//~^ ERROR type mismatch in function arguments
//~| HELP call `Option::as_deref()` first
+ //~| HELP consider wrapping the function in a closure
let _: Option<Option<()>> = produces_string().map(takes_str);
//~^ ERROR type mismatch in function arguments
//~| HELP call `Option::as_deref()` first
+ //~| HELP consider wrapping the function in a closure
let _: Option<Option<()>> = produces_string().map(takes_str_mut);
//~^ ERROR type mismatch in function arguments
//~| HELP call `Option::as_deref_mut()` first
+ //~| HELP consider wrapping the function in a closure
let _ = produces_string().and_then(generic);
let _ = produces_string().and_then(generic_ref);
//~^ ERROR type mismatch in function arguments
//~| HELP call `Option::as_deref()` first
+ //~| HELP consider wrapping the function in a closure
}
diff --git a/tests/ui/mismatched_types/suggest-option-asderef.stderr b/tests/ui/mismatched_types/suggest-option-asderef.stderr
index bfea08673..1702a7f1d 100644
--- a/tests/ui/mismatched_types/suggest-option-asderef.stderr
+++ b/tests/ui/mismatched_types/suggest-option-asderef.stderr
@@ -13,13 +13,17 @@ LL | let _: Option<()> = produces_string().and_then(takes_str);
found function signature `for<'a> fn(&'a str) -> _`
note: required by a bound in `Option::<T>::and_then`
--> $SRC_DIR/core/src/option.rs:LL:COL
+help: consider wrapping the function in a closure
+ |
+LL | let _: Option<()> = produces_string().and_then(|arg0: String| takes_str(/* &str */));
+ | ++++++++++++++ ++++++++++++
help: call `Option::as_deref()` first
|
LL | let _: Option<()> = produces_string().as_deref().and_then(takes_str);
| +++++++++++
error[E0631]: type mismatch in function arguments
- --> $DIR/suggest-option-asderef.rs:28:55
+ --> $DIR/suggest-option-asderef.rs:29:55
|
LL | fn takes_str(_: &str) -> Option<()> {
| ----------------------------------- found signature defined here
@@ -33,13 +37,17 @@ LL | let _: Option<Option<()>> = produces_string().map(takes_str);
found function signature `for<'a> fn(&'a str) -> _`
note: required by a bound in `Option::<T>::map`
--> $SRC_DIR/core/src/option.rs:LL:COL
+help: consider wrapping the function in a closure
+ |
+LL | let _: Option<Option<()>> = produces_string().map(|arg0: String| takes_str(/* &str */));
+ | ++++++++++++++ ++++++++++++
help: call `Option::as_deref()` first
|
LL | let _: Option<Option<()>> = produces_string().as_deref().map(takes_str);
| +++++++++++
error[E0631]: type mismatch in function arguments
- --> $DIR/suggest-option-asderef.rs:31:55
+ --> $DIR/suggest-option-asderef.rs:33:55
|
LL | fn takes_str_mut(_: &mut str) -> Option<()> {
| ------------------------------------------- found signature defined here
@@ -53,13 +61,17 @@ LL | let _: Option<Option<()>> = produces_string().map(takes_str_mut);
found function signature `for<'a> fn(&'a mut str) -> _`
note: required by a bound in `Option::<T>::map`
--> $SRC_DIR/core/src/option.rs:LL:COL
+help: consider wrapping the function in a closure
+ |
+LL | let _: Option<Option<()>> = produces_string().map(|arg0: String| takes_str_mut(/* &mut str */));
+ | ++++++++++++++ ++++++++++++++++
help: call `Option::as_deref_mut()` first
|
LL | let _: Option<Option<()>> = produces_string().as_deref_mut().map(takes_str_mut);
| +++++++++++++++
error[E0631]: type mismatch in function arguments
- --> $DIR/suggest-option-asderef.rs:36:40
+ --> $DIR/suggest-option-asderef.rs:39:40
|
LL | fn generic_ref<T>(_: &T) -> Option<()> {
| -------------------------------------- found signature defined here
@@ -73,6 +85,10 @@ LL | let _ = produces_string().and_then(generic_ref);
found function signature `for<'a> fn(&'a _) -> _`
note: required by a bound in `Option::<T>::and_then`
--> $SRC_DIR/core/src/option.rs:LL:COL
+help: consider wrapping the function in a closure
+ |
+LL | let _ = produces_string().and_then(|arg0: String| generic_ref(&arg0));
+ | ++++++++++++++ +++++++
help: consider adjusting the signature so it does not borrow its argument
|
LL - fn generic_ref<T>(_: &T) -> Option<()> {
diff --git a/tests/ui/mismatched_types/trait-bounds-cant-coerce.stderr b/tests/ui/mismatched_types/trait-bounds-cant-coerce.stderr
index 80aef7fcb..aaa3a9f19 100644
--- a/tests/ui/mismatched_types/trait-bounds-cant-coerce.stderr
+++ b/tests/ui/mismatched_types/trait-bounds-cant-coerce.stderr
@@ -14,6 +14,6 @@ note: function defined here
LL | fn a(_x: Box<dyn Foo + Send>) {
| ^ -----------------------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr b/tests/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr
index 54b220065..d92d5dbd1 100644
--- a/tests/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr
+++ b/tests/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr
@@ -16,7 +16,11 @@ note: required by a bound in `call_it`
|
LL | fn call_it<F: FnMut(isize, isize) -> isize>(y: isize, mut f: F) -> isize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `call_it`
+help: consider wrapping the function in a closure
+ |
+LL | let z = call_it(3, |arg0: isize, arg1: isize| f(/* usize */, arg1));
+ | ++++++++++++++++++++++++++ +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0631`.
diff --git a/tests/ui/missing-trait-bounds/issue-35677.stderr b/tests/ui/missing-trait-bounds/issue-35677.stderr
index 05d3de80d..f73bff51e 100644
--- a/tests/ui/missing-trait-bounds/issue-35677.stderr
+++ b/tests/ui/missing-trait-bounds/issue-35677.stderr
@@ -14,6 +14,6 @@ help: consider restricting the type parameters to satisfy the trait bounds
LL | fn is_subset<T>(this: &HashSet<T>, other: &HashSet<T>) -> bool where T: Eq, T: Hash {
| ++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/missing-trait-bounds/issue-69725.stderr b/tests/ui/missing-trait-bounds/issue-69725.stderr
index 980d9dd16..f483ea849 100644
--- a/tests/ui/missing-trait-bounds/issue-69725.stderr
+++ b/tests/ui/missing-trait-bounds/issue-69725.stderr
@@ -17,6 +17,6 @@ help: consider restricting the type parameter to satisfy the trait bound
LL | fn crash<A>() where A: Clone {
| ++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/missing-trait-bounds/missing-trait-bound-for-op.stderr b/tests/ui/missing-trait-bounds/missing-trait-bound-for-op.stderr
index cde075501..b3089cecf 100644
--- a/tests/ui/missing-trait-bounds/missing-trait-bound-for-op.stderr
+++ b/tests/ui/missing-trait-bounds/missing-trait-bound-for-op.stderr
@@ -11,6 +11,6 @@ help: consider restricting type parameter `T`
LL | pub fn foo<T: std::cmp::PartialEq>(s: &[T], t: &[T]) {
| +++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/missing/missing-allocator.stderr b/tests/ui/missing/missing-allocator.stderr
index 0da5651c1..007c488c9 100644
--- a/tests/ui/missing/missing-allocator.stderr
+++ b/tests/ui/missing/missing-allocator.stderr
@@ -1,4 +1,4 @@
error: no global memory allocator found but one is required; link to std or add `#[global_allocator]` to a static item that implements the GlobalAlloc trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/missing/missing-comma-in-match.stderr b/tests/ui/missing/missing-comma-in-match.stderr
index fe210f697..50f74eeb5 100644
--- a/tests/ui/missing/missing-comma-in-match.stderr
+++ b/tests/ui/missing/missing-comma-in-match.stderr
@@ -6,5 +6,5 @@ LL | &None => 1
LL | &Some(2) => { 3 }
| ^^ expected one of `,`, `.`, `?`, `}`, or an operator
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/missing/missing-derivable-attr.stderr b/tests/ui/missing/missing-derivable-attr.stderr
index 9b8c0c583..f2e23b62f 100644
--- a/tests/ui/missing/missing-derivable-attr.stderr
+++ b/tests/ui/missing/missing-derivable-attr.stderr
@@ -7,6 +7,6 @@ LL | fn eq(&self, other: &Self) -> bool;
LL | impl MyEq for A {}
| ^^^^^^^^^^^^^^^ missing `eq` in implementation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/missing/missing-fields-in-struct-pattern.stderr b/tests/ui/missing/missing-fields-in-struct-pattern.stderr
index 1fe9f5299..91a7bd354 100644
--- a/tests/ui/missing/missing-fields-in-struct-pattern.stderr
+++ b/tests/ui/missing/missing-fields-in-struct-pattern.stderr
@@ -9,6 +9,6 @@ help: use the tuple variant pattern syntax instead
LL | if let S(a, b, c, d) = S(1, 2, 3, 4) {
| ~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0769`.
diff --git a/tests/ui/missing/missing-items/m2.stderr b/tests/ui/missing/missing-items/m2.stderr
index 835c9b2aa..c552abcce 100644
--- a/tests/ui/missing/missing-items/m2.stderr
+++ b/tests/ui/missing/missing-items/m2.stderr
@@ -12,6 +12,6 @@ LL | impl m1::X for X {
= help: implement the missing item: `fn method4(&self, _: &Self) -> <Self as m1::X>::Type { todo!() }`
= help: implement the missing item: `fn method5(self: &Box<Self>) -> <Self as m1::X>::Type { todo!() }`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/missing/missing-items/missing-type-parameter.stderr b/tests/ui/missing/missing-items/missing-type-parameter.stderr
index 722539fca..658e2c8e8 100644
--- a/tests/ui/missing/missing-items/missing-type-parameter.stderr
+++ b/tests/ui/missing/missing-items/missing-type-parameter.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic argument
LL | foo::<X>();
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/missing/missing-macro-use.stderr b/tests/ui/missing/missing-macro-use.stderr
index e1d80f52d..5d8ff486e 100644
--- a/tests/ui/missing/missing-macro-use.stderr
+++ b/tests/ui/missing/missing-macro-use.stderr
@@ -9,5 +9,5 @@ help: consider importing this macro
LL + use two_macros::macro_two;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/missing/missing-main.stderr b/tests/ui/missing/missing-main.stderr
index 5113dc6ec..2139981ea 100644
--- a/tests/ui/missing/missing-main.stderr
+++ b/tests/ui/missing/missing-main.stderr
@@ -4,6 +4,6 @@ error[E0601]: `main` function not found in crate `missing_main`
LL | fn mian() { }
| ^ consider adding a `main` function to `$DIR/missing-main.rs`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0601`.
diff --git a/tests/ui/missing/missing-return.stderr b/tests/ui/missing/missing-return.stderr
index ff7f261e0..5f7fb5040 100644
--- a/tests/ui/missing/missing-return.stderr
+++ b/tests/ui/missing/missing-return.stderr
@@ -6,6 +6,6 @@ LL | fn f() -> isize { }
| |
| implicitly returns `()` as its body has no tail or `return` expression
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/missing_non_modrs_mod/missing_non_modrs_mod.stderr b/tests/ui/missing_non_modrs_mod/missing_non_modrs_mod.stderr
index 5f4d19439..4e4879931 100644
--- a/tests/ui/missing_non_modrs_mod/missing_non_modrs_mod.stderr
+++ b/tests/ui/missing_non_modrs_mod/missing_non_modrs_mod.stderr
@@ -7,6 +7,6 @@ LL | mod missing;
= help: to create the module `missing`, create file "$DIR/foo/missing.rs" or "$DIR/foo/missing/mod.rs"
= note: if there is a `mod missing` elsewhere in the crate already, import it with `use crate::...` instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0583`.
diff --git a/tests/ui/missing_non_modrs_mod/missing_non_modrs_mod_inline.stderr b/tests/ui/missing_non_modrs_mod/missing_non_modrs_mod_inline.stderr
index d5f5ea870..86193dd26 100644
--- a/tests/ui/missing_non_modrs_mod/missing_non_modrs_mod_inline.stderr
+++ b/tests/ui/missing_non_modrs_mod/missing_non_modrs_mod_inline.stderr
@@ -7,6 +7,6 @@ LL | mod missing;
= help: to create the module `missing`, create file "$DIR/foo_inline/inline/missing.rs" or "$DIR/foo_inline/inline/missing/mod.rs"
= note: if there is a `mod missing` elsewhere in the crate already, import it with `use crate::...` instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0583`.
diff --git a/tests/ui/mod-subitem-as-enum-variant.stderr b/tests/ui/mod-subitem-as-enum-variant.stderr
index cf61e94bd..92d972eba 100644
--- a/tests/ui/mod-subitem-as-enum-variant.stderr
+++ b/tests/ui/mod-subitem-as-enum-variant.stderr
@@ -6,6 +6,6 @@ LL | Mod::<i32>::FakeVariant(0);
| |
| not allowed on module `Mod`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0109`.
diff --git a/tests/ui/module-macro_use-arguments.stderr b/tests/ui/module-macro_use-arguments.stderr
index af799cb6d..3ac645ad3 100644
--- a/tests/ui/module-macro_use-arguments.stderr
+++ b/tests/ui/module-macro_use-arguments.stderr
@@ -4,5 +4,5 @@ error: arguments to `macro_use` are not allowed here
LL | #[macro_use(foo, bar)]
| ^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/modules/issue-107649.stderr b/tests/ui/modules/issue-107649.stderr
index 5705e84e0..0d203c1aa 100644
--- a/tests/ui/modules/issue-107649.stderr
+++ b/tests/ui/modules/issue-107649.stderr
@@ -14,6 +14,6 @@ help: consider annotating `Dummy` with `#[derive(Debug)]`
3 | pub struct Dummy;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/modules/path-invalid-form.stderr b/tests/ui/modules/path-invalid-form.stderr
index 7e8aa44ef..e8ded1343 100644
--- a/tests/ui/modules/path-invalid-form.stderr
+++ b/tests/ui/modules/path-invalid-form.stderr
@@ -4,5 +4,5 @@ error: malformed `path` attribute input
LL | #[path = 123]
| ^^^^^^^^^^^^^ help: must be of the form: `#[path = "file"]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/modules/path-macro.stderr b/tests/ui/modules/path-macro.stderr
index 9a2e01ea2..eb02c721e 100644
--- a/tests/ui/modules/path-macro.stderr
+++ b/tests/ui/modules/path-macro.stderr
@@ -4,5 +4,5 @@ error: malformed `path` attribute input
LL | #[path = foo!()]
| ^^^^^^^^^^^^^^^^ help: must be of the form: `#[path = "file"]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/modules/path-no-file-name.stderr b/tests/ui/modules/path-no-file-name.stderr
index 32a213c68..834e8ea6b 100644
--- a/tests/ui/modules/path-no-file-name.stderr
+++ b/tests/ui/modules/path-no-file-name.stderr
@@ -4,5 +4,5 @@ error: couldn't read $DIR/.: $ACCESS_DENIED_MSG (os error $ACCESS_DENIED_CODE)
LL | mod m;
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/modules_and_files_visibility/mod_file_correct_spans.stderr b/tests/ui/modules_and_files_visibility/mod_file_correct_spans.stderr
index 73044752b..3426505cd 100644
--- a/tests/ui/modules_and_files_visibility/mod_file_correct_spans.stderr
+++ b/tests/ui/modules_and_files_visibility/mod_file_correct_spans.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find function `bar` in module `mod_file_aux`
LL | assert!(mod_file_aux::bar() == 10);
| ^^^ not found in `mod_file_aux`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.fixed b/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.fixed
new file mode 100644
index 000000000..e88ca6079
--- /dev/null
+++ b/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.fixed
@@ -0,0 +1,30 @@
+// run-rustfix
+#![allow(unused_variables, dead_code)]
+use std::collections::BTreeMap;
+use std::collections::HashSet;
+
+#[derive(Debug,Eq,PartialEq,Hash)]
+#[derive(Clone)]
+enum Day {
+ Mon,
+}
+
+struct Class {
+ days: BTreeMap<u32, HashSet<Day>>
+}
+
+impl Class {
+ fn do_stuff(&self) {
+ for (_, v) in &self.days {
+ let mut x: HashSet<Day> = v.clone(); //~ ERROR
+ let y: Vec<Day> = x.drain().collect();
+ println!("{:?}", x);
+ }
+ }
+}
+
+fn fail() {
+ let c = Class { days: BTreeMap::new() };
+ c.do_stuff();
+}
+fn main() {}
diff --git a/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.rs b/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.rs
new file mode 100644
index 000000000..ba277c4a9
--- /dev/null
+++ b/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.rs
@@ -0,0 +1,29 @@
+// run-rustfix
+#![allow(unused_variables, dead_code)]
+use std::collections::BTreeMap;
+use std::collections::HashSet;
+
+#[derive(Debug,Eq,PartialEq,Hash)]
+enum Day {
+ Mon,
+}
+
+struct Class {
+ days: BTreeMap<u32, HashSet<Day>>
+}
+
+impl Class {
+ fn do_stuff(&self) {
+ for (_, v) in &self.days {
+ let mut x: HashSet<Day> = v.clone(); //~ ERROR
+ let y: Vec<Day> = x.drain().collect();
+ println!("{:?}", x);
+ }
+ }
+}
+
+fn fail() {
+ let c = Class { days: BTreeMap::new() };
+ c.do_stuff();
+}
+fn main() {}
diff --git a/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.stderr b/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.stderr
new file mode 100644
index 000000000..6a9d76f79
--- /dev/null
+++ b/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.stderr
@@ -0,0 +1,25 @@
+error[E0308]: mismatched types
+ --> $DIR/assignment-of-clone-call-on-ref-due-to-missing-bound.rs:18:39
+ |
+LL | let mut x: HashSet<Day> = v.clone();
+ | ------------ ^^^^^^^^^ expected `HashSet<Day>`, found `&HashSet<Day>`
+ | |
+ | expected due to this
+ |
+ = note: expected struct `HashSet<_>`
+ found reference `&HashSet<_>`
+note: `HashSet<Day>` does not implement `Clone`, so `&HashSet<Day>` was cloned instead
+ --> $DIR/assignment-of-clone-call-on-ref-due-to-missing-bound.rs:18:39
+ |
+LL | let mut x: HashSet<Day> = v.clone();
+ | ^
+ = help: `Clone` is not implemented because the trait bound `Day: Clone` is not satisfied
+help: consider annotating `Day` with `#[derive(Clone)]`
+ |
+LL + #[derive(Clone)]
+LL | enum Day {
+ |
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/moves/issue-34721.stderr b/tests/ui/moves/issue-34721.stderr
index f2bf22227..94780a04c 100644
--- a/tests/ui/moves/issue-34721.stderr
+++ b/tests/ui/moves/issue-34721.stderr
@@ -23,6 +23,6 @@ help: consider further restricting this bound
LL | pub fn baz<T: Foo + Copy>(x: T) -> T {
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/moves/issue-46099-move-in-macro.stderr b/tests/ui/moves/issue-46099-move-in-macro.stderr
index 94bc9e6f4..2865a4e2b 100644
--- a/tests/ui/moves/issue-46099-move-in-macro.stderr
+++ b/tests/ui/moves/issue-46099-move-in-macro.stderr
@@ -11,6 +11,6 @@ help: consider cloning the value if the performance cost is acceptable
LL | test!({b.clone()});
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/moves/issue-75904-move-closure-loop.stderr b/tests/ui/moves/issue-75904-move-closure-loop.stderr
index 5e427a1fc..6f04105a3 100644
--- a/tests/ui/moves/issue-75904-move-closure-loop.stderr
+++ b/tests/ui/moves/issue-75904-move-closure-loop.stderr
@@ -10,6 +10,6 @@ LL | &mut a;
LL | a;
| - use occurs due to use in closure
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/moves/issue-99470-move-out-of-some.stderr b/tests/ui/moves/issue-99470-move-out-of-some.stderr
index c5159471f..71ec5adfd 100644
--- a/tests/ui/moves/issue-99470-move-out-of-some.stderr
+++ b/tests/ui/moves/issue-99470-move-out-of-some.stderr
@@ -16,6 +16,6 @@ LL - &Some(_y) => (),
LL + Some(_y) => (),
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/moves/move-fn-self-receiver.stderr b/tests/ui/moves/move-fn-self-receiver.stderr
index c91a8b5ef..462deacbe 100644
--- a/tests/ui/moves/move-fn-self-receiver.stderr
+++ b/tests/ui/moves/move-fn-self-receiver.stderr
@@ -55,6 +55,10 @@ note: `Foo::use_box_self` takes ownership of the receiver `self`, which moves `b
|
LL | fn use_box_self(self: Box<Self>) {}
| ^^^^
+help: you could `clone` the value and consume it, if the `Box<Foo>: Clone` trait bound could be satisfied
+ |
+LL | boxed_foo.clone().use_box_self();
+ | ++++++++
error[E0382]: use of moved value: `pin_box_foo`
--> $DIR/move-fn-self-receiver.rs:46:5
@@ -71,6 +75,10 @@ note: `Foo::use_pin_box_self` takes ownership of the receiver `self`, which move
|
LL | fn use_pin_box_self(self: Pin<Box<Self>>) {}
| ^^^^
+help: you could `clone` the value and consume it, if the `Box<Foo>: Clone` trait bound could be satisfied
+ |
+LL | pin_box_foo.clone().use_pin_box_self();
+ | ++++++++
error[E0505]: cannot move out of `mut_foo` because it is borrowed
--> $DIR/move-fn-self-receiver.rs:50:5
diff --git a/tests/ui/moves/move-guard-same-consts.stderr b/tests/ui/moves/move-guard-same-consts.stderr
index 86e5f6524..37ddb831a 100644
--- a/tests/ui/moves/move-guard-same-consts.stderr
+++ b/tests/ui/moves/move-guard-same-consts.stderr
@@ -21,6 +21,6 @@ help: consider cloning the value if the performance cost is acceptable
LL | (1, 2) if take(x.clone()) => (),
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/moves/move-in-guard-1.stderr b/tests/ui/moves/move-in-guard-1.stderr
index f04cb34d7..0b9082388 100644
--- a/tests/ui/moves/move-in-guard-1.stderr
+++ b/tests/ui/moves/move-in-guard-1.stderr
@@ -21,6 +21,6 @@ help: consider cloning the value if the performance cost is acceptable
LL | (1, _) if take(x.clone()) => (),
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/moves/move-in-guard-2.stderr b/tests/ui/moves/move-in-guard-2.stderr
index 26047861f..6d1bd4f95 100644
--- a/tests/ui/moves/move-in-guard-2.stderr
+++ b/tests/ui/moves/move-in-guard-2.stderr
@@ -19,6 +19,6 @@ help: consider cloning the value if the performance cost is acceptable
LL | (_, 2) if take(x.clone()) => (),
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/moves/move-into-dead-array-1.stderr b/tests/ui/moves/move-into-dead-array-1.stderr
index 6db0f0bcb..83779fb16 100644
--- a/tests/ui/moves/move-into-dead-array-1.stderr
+++ b/tests/ui/moves/move-into-dead-array-1.stderr
@@ -11,6 +11,6 @@ help: consider assigning a value
LL | let mut a: [D; 4] = todo!();
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/moves/move-into-dead-array-2.stderr b/tests/ui/moves/move-into-dead-array-2.stderr
index 19e476c04..689aecdfc 100644
--- a/tests/ui/moves/move-into-dead-array-2.stderr
+++ b/tests/ui/moves/move-into-dead-array-2.stderr
@@ -8,6 +8,6 @@ LL | drop(a);
LL | a[i] = d();
| ^^^^ value used here after move
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/moves/move-of-addr-of-mut.stderr b/tests/ui/moves/move-of-addr-of-mut.stderr
index ddebaa012..706b52d34 100644
--- a/tests/ui/moves/move-of-addr-of-mut.stderr
+++ b/tests/ui/moves/move-of-addr-of-mut.stderr
@@ -12,6 +12,6 @@ help: consider assigning a value
LL | let mut x: S = todo!();
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/moves/move-out-of-array-1.stderr b/tests/ui/moves/move-out-of-array-1.stderr
index 0af083e5b..aa0251dbd 100644
--- a/tests/ui/moves/move-out-of-array-1.stderr
+++ b/tests/ui/moves/move-out-of-array-1.stderr
@@ -7,6 +7,6 @@ LL | a[i]
| cannot move out of here
| move occurs because `a[_]` has type `D`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0508`.
diff --git a/tests/ui/moves/move-out-of-field.rs b/tests/ui/moves/move-out-of-field.rs
index 9f697db4f..4166d8dc8 100644
--- a/tests/ui/moves/move-out-of-field.rs
+++ b/tests/ui/moves/move-out-of-field.rs
@@ -1,7 +1,5 @@
// run-pass
-use std::string::String;
-
struct StringBuffer {
s: String,
}
diff --git a/tests/ui/moves/move-out-of-slice-1.stderr b/tests/ui/moves/move-out-of-slice-1.stderr
index 5a0357cf5..865337144 100644
--- a/tests/ui/moves/move-out-of-slice-1.stderr
+++ b/tests/ui/moves/move-out-of-slice-1.stderr
@@ -14,6 +14,6 @@ help: consider borrowing the pattern binding
LL | box [ref a] => {},
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0508`.
diff --git a/tests/ui/moves/moves-based-on-type-access-to-field.stderr b/tests/ui/moves/moves-based-on-type-access-to-field.stderr
index 739018663..1e656e686 100644
--- a/tests/ui/moves/moves-based-on-type-access-to-field.stderr
+++ b/tests/ui/moves/moves-based-on-type-access-to-field.stderr
@@ -15,6 +15,6 @@ help: you can `clone` the value and consume it, but this might not be your desir
LL | consume(x.clone().into_iter().next().unwrap());
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/moves/moves-based-on-type-block-bad.stderr b/tests/ui/moves/moves-based-on-type-block-bad.stderr
index df09ababa..431ee1c0b 100644
--- a/tests/ui/moves/moves-based-on-type-block-bad.stderr
+++ b/tests/ui/moves/moves-based-on-type-block-bad.stderr
@@ -15,6 +15,6 @@ help: consider borrowing here
LL | match &hellothere.x {
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/moves/moves-based-on-type-capture-clause-bad.stderr b/tests/ui/moves/moves-based-on-type-capture-clause-bad.stderr
index 34b7ea658..5e527bf44 100644
--- a/tests/ui/moves/moves-based-on-type-capture-clause-bad.stderr
+++ b/tests/ui/moves/moves-based-on-type-capture-clause-bad.stderr
@@ -13,6 +13,6 @@ LL | println!("{}", x);
|
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/moves/moves-based-on-type-cyclic-types-issue-4821.stderr b/tests/ui/moves/moves-based-on-type-cyclic-types-issue-4821.stderr
index db4382b58..ec483cb3d 100644
--- a/tests/ui/moves/moves-based-on-type-cyclic-types-issue-4821.stderr
+++ b/tests/ui/moves/moves-based-on-type-cyclic-types-issue-4821.stderr
@@ -13,6 +13,6 @@ help: borrow this binding in the pattern to avoid moving the value
LL | Some(ref right) => consume(right),
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/moves/moves-based-on-type-match-bindings.stderr b/tests/ui/moves/moves-based-on-type-match-bindings.stderr
index 225935532..b99b2bd9e 100644
--- a/tests/ui/moves/moves-based-on-type-match-bindings.stderr
+++ b/tests/ui/moves/moves-based-on-type-match-bindings.stderr
@@ -13,6 +13,6 @@ help: borrow this binding in the pattern to avoid moving the value
LL | Foo {ref f} => {}
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr b/tests/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr
index 125e446c3..513631b20 100644
--- a/tests/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr
+++ b/tests/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr
@@ -8,6 +8,6 @@ LL | let _f = to_fn(|| test(i));
| |
| captured by this `Fn` closure
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/moves/moves-based-on-type-tuple.stderr b/tests/ui/moves/moves-based-on-type-tuple.stderr
index 0bcce3012..6383e4a82 100644
--- a/tests/ui/moves/moves-based-on-type-tuple.stderr
+++ b/tests/ui/moves/moves-based-on-type-tuple.stderr
@@ -14,6 +14,6 @@ help: consider cloning the value if the performance cost is acceptable
LL | Box::new((x.clone(), x))
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/moves/moves-sru-moved-field.stderr b/tests/ui/moves/moves-sru-moved-field.stderr
index cf7213637..f6a5c02ad 100644
--- a/tests/ui/moves/moves-sru-moved-field.stderr
+++ b/tests/ui/moves/moves-sru-moved-field.stderr
@@ -8,6 +8,6 @@ LL | let _c = Foo {noncopyable: h, ..f};
|
= note: move occurs because `f.moved` has type `Box<isize>`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/moves/needs-clone-through-deref.fixed b/tests/ui/moves/needs-clone-through-deref.fixed
new file mode 100644
index 000000000..419718175
--- /dev/null
+++ b/tests/ui/moves/needs-clone-through-deref.fixed
@@ -0,0 +1,18 @@
+// run-rustfix
+#![allow(dead_code, noop_method_call)]
+use std::ops::Deref;
+struct S(Vec<usize>);
+impl Deref for S {
+ type Target = Vec<usize>;
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+
+impl S {
+ fn foo(&self) {
+ // `self.clone()` returns `&S`, not `Vec`
+ for _ in <Vec<usize> as Clone>::clone(&self.clone()).into_iter() {} //~ ERROR cannot move out of dereference of `S`
+ }
+}
+fn main() {}
diff --git a/tests/ui/moves/needs-clone-through-deref.rs b/tests/ui/moves/needs-clone-through-deref.rs
new file mode 100644
index 000000000..8116008ff
--- /dev/null
+++ b/tests/ui/moves/needs-clone-through-deref.rs
@@ -0,0 +1,18 @@
+// run-rustfix
+#![allow(dead_code, noop_method_call)]
+use std::ops::Deref;
+struct S(Vec<usize>);
+impl Deref for S {
+ type Target = Vec<usize>;
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+
+impl S {
+ fn foo(&self) {
+ // `self.clone()` returns `&S`, not `Vec`
+ for _ in self.clone().into_iter() {} //~ ERROR cannot move out of dereference of `S`
+ }
+}
+fn main() {}
diff --git a/tests/ui/moves/needs-clone-through-deref.stderr b/tests/ui/moves/needs-clone-through-deref.stderr
new file mode 100644
index 000000000..ff92f32e8
--- /dev/null
+++ b/tests/ui/moves/needs-clone-through-deref.stderr
@@ -0,0 +1,18 @@
+error[E0507]: cannot move out of dereference of `S`
+ --> $DIR/needs-clone-through-deref.rs:15:18
+ |
+LL | for _ in self.clone().into_iter() {}
+ | ^^^^^^^^^^^^ ----------- value moved due to this method call
+ | |
+ | move occurs because value has type `Vec<usize>`, which does not implement the `Copy` trait
+ |
+note: `into_iter` takes ownership of the receiver `self`, which moves value
+ --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
+help: you can `clone` the value and consume it, but this might not be your desired behavior
+ |
+LL | for _ in <Vec<usize> as Clone>::clone(&self.clone()).into_iter() {}
+ | ++++++++++++++++++++++++++++++ +
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.stderr b/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.stderr
index a184482a4..bb179e149 100644
--- a/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.stderr
+++ b/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.stderr
@@ -15,6 +15,6 @@ help: consider reborrowing the `Pin` instead of moving it
LL | foo(r.as_mut().get_mut());
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/moves/pin-mut-reborrow.stderr b/tests/ui/moves/pin-mut-reborrow.stderr
index 4bf207e7e..d3ccb0a65 100644
--- a/tests/ui/moves/pin-mut-reborrow.stderr
+++ b/tests/ui/moves/pin-mut-reborrow.stderr
@@ -18,6 +18,6 @@ help: consider reborrowing the `Pin` instead of moving it
LL | foo.as_mut().foo();
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.fixed b/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.fixed
new file mode 100644
index 000000000..a4e219e1c
--- /dev/null
+++ b/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.fixed
@@ -0,0 +1,28 @@
+// run-rustfix
+// Issue #109429
+use std::collections::hash_map::DefaultHasher;
+use std::collections::HashMap;
+use std::hash::BuildHasher;
+use std::hash::Hash;
+
+#[derive(Clone)]
+pub struct Hash128_1;
+
+impl BuildHasher for Hash128_1 {
+ type Hasher = DefaultHasher;
+ fn build_hasher(&self) -> DefaultHasher { DefaultHasher::default() }
+}
+
+#[allow(unused)]
+pub fn hashmap_copy<T, U>(
+ map: &HashMap<T, U, Hash128_1>,
+) where T: Hash + Clone, U: Clone
+{
+ let mut copy: Vec<U> = <HashMap<T, U, Hash128_1> as Clone>::clone(&map.clone()).into_values().collect(); //~ ERROR
+}
+
+pub fn make_map() -> HashMap<String, i64, Hash128_1>
+{
+ HashMap::with_hasher(Hash128_1)
+}
+fn main() {}
diff --git a/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.rs b/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.rs
new file mode 100644
index 000000000..efe035eba
--- /dev/null
+++ b/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.rs
@@ -0,0 +1,27 @@
+// run-rustfix
+// Issue #109429
+use std::collections::hash_map::DefaultHasher;
+use std::collections::HashMap;
+use std::hash::BuildHasher;
+use std::hash::Hash;
+
+pub struct Hash128_1;
+
+impl BuildHasher for Hash128_1 {
+ type Hasher = DefaultHasher;
+ fn build_hasher(&self) -> DefaultHasher { DefaultHasher::default() }
+}
+
+#[allow(unused)]
+pub fn hashmap_copy<T, U>(
+ map: &HashMap<T, U, Hash128_1>,
+) where T: Hash + Clone, U: Clone
+{
+ let mut copy: Vec<U> = map.clone().into_values().collect(); //~ ERROR
+}
+
+pub fn make_map() -> HashMap<String, i64, Hash128_1>
+{
+ HashMap::with_hasher(Hash128_1)
+}
+fn main() {}
diff --git a/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.stderr b/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.stderr
new file mode 100644
index 000000000..403daf8ff
--- /dev/null
+++ b/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.stderr
@@ -0,0 +1,23 @@
+error[E0507]: cannot move out of a shared reference
+ --> $DIR/suggest-clone-when-some-obligation-is-unmet.rs:20:28
+ |
+LL | let mut copy: Vec<U> = map.clone().into_values().collect();
+ | ^^^^^^^^^^^ ------------- value moved due to this method call
+ | |
+ | move occurs because value has type `HashMap<T, U, Hash128_1>`, which does not implement the `Copy` trait
+ |
+note: `HashMap::<K, V, S>::into_values` takes ownership of the receiver `self`, which moves value
+ --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
+help: you could `clone` the value and consume it, if the `Hash128_1: Clone` trait bound could be satisfied
+ |
+LL | let mut copy: Vec<U> = <HashMap<T, U, Hash128_1> as Clone>::clone(&map.clone()).into_values().collect();
+ | ++++++++++++++++++++++++++++++++++++++++++++ +
+help: consider annotating `Hash128_1` with `#[derive(Clone)]`
+ |
+LL + #[derive(Clone)]
+LL | pub struct Hash128_1;
+ |
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/moves/suggest-clone.fixed b/tests/ui/moves/suggest-clone.fixed
index 204bfdb10..0c4a94d77 100644
--- a/tests/ui/moves/suggest-clone.fixed
+++ b/tests/ui/moves/suggest-clone.fixed
@@ -7,5 +7,5 @@ impl Foo {
}
fn main() {
let foo = &Foo;
- foo.clone().foo(); //~ ERROR cannot move out
+ <Foo as Clone>::clone(&foo).foo(); //~ ERROR cannot move out
}
diff --git a/tests/ui/moves/suggest-clone.stderr b/tests/ui/moves/suggest-clone.stderr
index 065acf904..25e89a589 100644
--- a/tests/ui/moves/suggest-clone.stderr
+++ b/tests/ui/moves/suggest-clone.stderr
@@ -13,9 +13,9 @@ LL | fn foo(self) {}
| ^^^^
help: you can `clone` the value and consume it, but this might not be your desired behavior
|
-LL | foo.clone().foo();
- | ++++++++
+LL | <Foo as Clone>::clone(&foo).foo();
+ | +++++++++++++++++++++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/moves/use_of_moved_value_clone_suggestions.stderr b/tests/ui/moves/use_of_moved_value_clone_suggestions.stderr
index 0bb486a88..785329565 100644
--- a/tests/ui/moves/use_of_moved_value_clone_suggestions.stderr
+++ b/tests/ui/moves/use_of_moved_value_clone_suggestions.stderr
@@ -13,6 +13,6 @@ help: clone the value to increment its reference count
LL | (t.clone(), t)
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/mut/mut-cant-alias.stderr b/tests/ui/mut/mut-cant-alias.stderr
index d56e45db1..4106ebdd1 100644
--- a/tests/ui/mut/mut-cant-alias.stderr
+++ b/tests/ui/mut/mut-cant-alias.stderr
@@ -8,6 +8,6 @@ LL | let b2 = &mut *b;
LL | b1.use_mut();
| -- first borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/mut/mut-cross-borrowing.stderr b/tests/ui/mut/mut-cross-borrowing.stderr
index 8a3076db9..4cfe56bfa 100644
--- a/tests/ui/mut/mut-cross-borrowing.stderr
+++ b/tests/ui/mut/mut-cross-borrowing.stderr
@@ -18,6 +18,6 @@ help: consider mutably borrowing here
LL | f(&mut x)
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/mut/mut-ref.stderr b/tests/ui/mut/mut-ref.stderr
index e6d4901aa..b91392f22 100644
--- a/tests/ui/mut/mut-ref.stderr
+++ b/tests/ui/mut/mut-ref.stderr
@@ -4,5 +4,5 @@ error: the order of `mut` and `ref` is incorrect
LL | let mut ref x = 10;
| ^^^^^^^ help: try switching the order: `ref mut`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/mut/mutable-class-fields-2.stderr b/tests/ui/mut/mutable-class-fields-2.stderr
index c53c6ea30..eb0c54f88 100644
--- a/tests/ui/mut/mutable-class-fields-2.stderr
+++ b/tests/ui/mut/mutable-class-fields-2.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be a mutable reference
LL | pub fn eat(&mut self) {
| ~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/mut/mutable-class-fields.stderr b/tests/ui/mut/mutable-class-fields.stderr
index 1d731be8a..e57cce62e 100644
--- a/tests/ui/mut/mutable-class-fields.stderr
+++ b/tests/ui/mut/mutable-class-fields.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be mutable
LL | let mut nyan : Cat = cat(52, 99);
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/mut/mutable-enum-indirect.stderr b/tests/ui/mut/mutable-enum-indirect.stderr
index 9e1f4e1fe..0b7783b33 100644
--- a/tests/ui/mut/mutable-enum-indirect.stderr
+++ b/tests/ui/mut/mutable-enum-indirect.stderr
@@ -19,6 +19,6 @@ note: required by a bound in `bar`
LL | fn bar<T: Sync>(_: T) {}
| ^^^^ required by this bound in `bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/native-library-link-flags/link-arg-from-rs.rs b/tests/ui/native-library-link-flags/link-arg-from-rs.rs
index 075e4d9e7..4a6017fea 100644
--- a/tests/ui/native-library-link-flags/link-arg-from-rs.rs
+++ b/tests/ui/native-library-link-flags/link-arg-from-rs.rs
@@ -1,8 +1,7 @@
-// link-arg is not supposed to be usable in #[link] attributes
+#![feature(link_arg_attribute)]
-// compile-flags:
-// error-pattern: error[E0458]: unknown link kind `link-arg`, expected one of: static, dylib, framework, raw-dylib
-
-#[link(kind = "link-arg")]
+#[link(kind = "link-arg", name = "arg", modifiers = "+bundle")]
+//~^ ERROR linking modifier `bundle` is only compatible with `static` linking kind
extern "C" {}
+
pub fn main() {}
diff --git a/tests/ui/native-library-link-flags/link-arg-from-rs.stderr b/tests/ui/native-library-link-flags/link-arg-from-rs.stderr
index 69a7825c0..f31e15f1d 100644
--- a/tests/ui/native-library-link-flags/link-arg-from-rs.stderr
+++ b/tests/ui/native-library-link-flags/link-arg-from-rs.stderr
@@ -1,16 +1,8 @@
-error[E0458]: unknown link kind `link-arg`, expected one of: static, dylib, framework, raw-dylib
- --> $DIR/link-arg-from-rs.rs:6:15
+error: linking modifier `bundle` is only compatible with `static` linking kind
+ --> $DIR/link-arg-from-rs.rs:3:53
|
-LL | #[link(kind = "link-arg")]
- | ^^^^^^^^^^ unknown link kind
+LL | #[link(kind = "link-arg", name = "arg", modifiers = "+bundle")]
+ | ^^^^^^^^^
-error[E0459]: `#[link]` attribute requires a `name = "string"` argument
- --> $DIR/link-arg-from-rs.rs:6:1
- |
-LL | #[link(kind = "link-arg")]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `name` argument
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
-Some errors have detailed explanations: E0458, E0459.
-For more information about an error, try `rustc --explain E0458`.
diff --git a/tests/ui/native-library-link-flags/modifiers-override-3.stderr b/tests/ui/native-library-link-flags/modifiers-override-3.stderr
index 365e56181..3eb9459f6 100644
--- a/tests/ui/native-library-link-flags/modifiers-override-3.stderr
+++ b/tests/ui/native-library-link-flags/modifiers-override-3.stderr
@@ -1,4 +1,4 @@
error: overriding linking modifiers from command line is not supported
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/native-library-link-flags/suggest-libname-only-1.stderr b/tests/ui/native-library-link-flags/suggest-libname-only-1.stderr
index 64d0a9077..e142835a9 100644
--- a/tests/ui/native-library-link-flags/suggest-libname-only-1.stderr
+++ b/tests/ui/native-library-link-flags/suggest-libname-only-1.stderr
@@ -2,5 +2,5 @@ error: could not find native static library `libfoo.a`, perhaps an -L flag is mi
|
= help: only provide the library name `foo`, not the full filename
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/native-library-link-flags/suggest-libname-only-2.stderr b/tests/ui/native-library-link-flags/suggest-libname-only-2.stderr
index e166af9ed..392d2f01f 100644
--- a/tests/ui/native-library-link-flags/suggest-libname-only-2.stderr
+++ b/tests/ui/native-library-link-flags/suggest-libname-only-2.stderr
@@ -2,5 +2,5 @@ error: could not find native static library `bar.lib`, perhaps an -L flag is mis
|
= help: only provide the library name `bar`, not the full filename
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nested-cfg-attrs.stderr b/tests/ui/nested-cfg-attrs.stderr
index f63888b2f..16c293071 100644
--- a/tests/ui/nested-cfg-attrs.stderr
+++ b/tests/ui/nested-cfg-attrs.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find function `f` in this scope
LL | fn main() { f() }
| ^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/never_type/call-fn-never-arg-wrong-type.stderr b/tests/ui/never_type/call-fn-never-arg-wrong-type.stderr
index fa3db33c9..bdeb2fb90 100644
--- a/tests/ui/never_type/call-fn-never-arg-wrong-type.stderr
+++ b/tests/ui/never_type/call-fn-never-arg-wrong-type.stderr
@@ -14,6 +14,6 @@ note: function defined here
LL | fn foo(x: !) -> ! {
| ^^^ ----
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/never_type/defaulted-never-note.fallback.stderr b/tests/ui/never_type/defaulted-never-note.fallback.stderr
index 283aca1b0..92fa9068c 100644
--- a/tests/ui/never_type/defaulted-never-note.fallback.stderr
+++ b/tests/ui/never_type/defaulted-never-note.fallback.stderr
@@ -15,6 +15,6 @@ note: required by a bound in `foo`
LL | fn foo<T: ImplementedForUnitButNotNever>(_t: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/never_type/diverging-fallback-no-leak.fallback.stderr b/tests/ui/never_type/diverging-fallback-no-leak.fallback.stderr
index df29fe227..ff28480bd 100644
--- a/tests/ui/never_type/diverging-fallback-no-leak.fallback.stderr
+++ b/tests/ui/never_type/diverging-fallback-no-leak.fallback.stderr
@@ -17,6 +17,6 @@ note: required by a bound in `unconstrained_arg`
LL | fn unconstrained_arg<T: Test>(_: T) {}
| ^^^^ required by this bound in `unconstrained_arg`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/never_type/diverging-fallback-unconstrained-return.rs b/tests/ui/never_type/diverging-fallback-unconstrained-return.rs
index 7ea97126f..26c8175be 100644
--- a/tests/ui/never_type/diverging-fallback-unconstrained-return.rs
+++ b/tests/ui/never_type/diverging-fallback-unconstrained-return.rs
@@ -1,4 +1,4 @@
-// Variant of diverging-falllback-control-flow that tests
+// Variant of diverging-fallback-control-flow that tests
// the specific case of a free function with an unconstrained
// return type. This captures the pattern we saw in the wild
// in the objc crate, where changing the fallback from `!` to `()`
@@ -9,7 +9,7 @@
// revisions: nofallback fallback
#![cfg_attr(fallback, feature(never_type, never_type_fallback))]
-
+#![allow(unit_bindings)]
fn make_unit() {}
diff --git a/tests/ui/never_type/exhaustive_patterns.stderr b/tests/ui/never_type/exhaustive_patterns.stderr
index f7bf85815..ee7d9070c 100644
--- a/tests/ui/never_type/exhaustive_patterns.stderr
+++ b/tests/ui/never_type/exhaustive_patterns.stderr
@@ -21,6 +21,6 @@ help: you might want to use `if let` to ignore the variant that isn't matched
LL | if let Either::A(()) = foo() { todo!() };
| ++ +++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0005`.
diff --git a/tests/ui/never_type/fallback-closure-wrap.fallback.stderr b/tests/ui/never_type/fallback-closure-wrap.fallback.stderr
index 49f55db1e..aa4a2760f 100644
--- a/tests/ui/never_type/fallback-closure-wrap.fallback.stderr
+++ b/tests/ui/never_type/fallback-closure-wrap.fallback.stderr
@@ -12,6 +12,6 @@ LL | | }) as Box<dyn FnMut()>);
found type `!`
= note: required for the cast from `Box<{closure@$DIR/fallback-closure-wrap.rs:18:40: 18:47}>` to `Box<dyn FnMut()>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/never_type/feature-gate-never_type_fallback.stderr b/tests/ui/never_type/feature-gate-never_type_fallback.stderr
index 56aafbb4c..cbb670ea7 100644
--- a/tests/ui/never_type/feature-gate-never_type_fallback.stderr
+++ b/tests/ui/never_type/feature-gate-never_type_fallback.stderr
@@ -19,6 +19,6 @@ note: required by a bound in `foo`
LL | fn foo(_: impl T) {}
| ^ required by this bound in `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/never_type/impl_trait_fallback3.stderr b/tests/ui/never_type/impl_trait_fallback3.stderr
index 821d14156..e2246eea1 100644
--- a/tests/ui/never_type/impl_trait_fallback3.stderr
+++ b/tests/ui/never_type/impl_trait_fallback3.stderr
@@ -10,6 +10,6 @@ help: this trait has no implementations, consider adding one
LL | trait T {
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/never_type/impl_trait_fallback4.stderr b/tests/ui/never_type/impl_trait_fallback4.stderr
index 67421ba8d..8f6b5cfea 100644
--- a/tests/ui/never_type/impl_trait_fallback4.stderr
+++ b/tests/ui/never_type/impl_trait_fallback4.stderr
@@ -10,6 +10,6 @@ help: this trait has no implementations, consider adding one
LL | trait T {
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/never_type/issue-10176.stderr b/tests/ui/never_type/issue-10176.stderr
index 3f381b9ae..cd6473e06 100644
--- a/tests/ui/never_type/issue-10176.stderr
+++ b/tests/ui/never_type/issue-10176.stderr
@@ -9,6 +9,6 @@ LL | (return 1, return 2)
= note: expected type `isize`
found tuple `(!, !)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/never_type/issue-13352.stderr b/tests/ui/never_type/issue-13352.stderr
index 406785bfe..91885380b 100644
--- a/tests/ui/never_type/issue-13352.stderr
+++ b/tests/ui/never_type/issue-13352.stderr
@@ -11,6 +11,6 @@ LL | 2_usize + (loop {});
<&'a usize as Add<usize>>
<&usize as Add<&usize>>
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/never_type/issue-51506.stderr b/tests/ui/never_type/issue-51506.stderr
index 293ec3a72..09379257c 100644
--- a/tests/ui/never_type/issue-51506.stderr
+++ b/tests/ui/never_type/issue-51506.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `Trait::Out`
LL | type Out: Iterator<Item = u32>;
| ^^^^^^^^^^^^^^^^^^^^ required by this bound in `Trait::Out`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/never_type/never-assign-wrong-type.stderr b/tests/ui/never_type/never-assign-wrong-type.stderr
index ce34d9483..f59de5d2a 100644
--- a/tests/ui/never_type/never-assign-wrong-type.stderr
+++ b/tests/ui/never_type/never-assign-wrong-type.stderr
@@ -9,6 +9,6 @@ LL | let x: ! = "hello";
= note: expected type `!`
found reference `&'static str`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/never_type/never-from-impl-is-reserved.stderr b/tests/ui/never_type/never-from-impl-is-reserved.current.stderr
index 871c51205..d008f88c1 100644
--- a/tests/ui/never_type/never-from-impl-is-reserved.stderr
+++ b/tests/ui/never_type/never-from-impl-is-reserved.current.stderr
@@ -1,5 +1,5 @@
error[E0119]: conflicting implementations of trait `MyTrait` for type `MyFoo`
- --> $DIR/never-from-impl-is-reserved.rs:10:1
+ --> $DIR/never-from-impl-is-reserved.rs:13:1
|
LL | impl MyTrait for MyFoo {}
| ---------------------- first implementation here
@@ -9,6 +9,6 @@ LL | impl<T> MyTrait for T where T: From<!> {}
|
= note: permitting this impl would forbid us from adding `impl<T> From<!> for T` later; see rust-lang/rust#64715 for details
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/never_type/never-from-impl-is-reserved.next.stderr b/tests/ui/never_type/never-from-impl-is-reserved.next.stderr
new file mode 100644
index 000000000..d008f88c1
--- /dev/null
+++ b/tests/ui/never_type/never-from-impl-is-reserved.next.stderr
@@ -0,0 +1,14 @@
+error[E0119]: conflicting implementations of trait `MyTrait` for type `MyFoo`
+ --> $DIR/never-from-impl-is-reserved.rs:13:1
+ |
+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`
+ |
+ = note: permitting this impl would forbid us from adding `impl<T> From<!> for T` later; see rust-lang/rust#64715 for details
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/never_type/never-from-impl-is-reserved.rs b/tests/ui/never_type/never-from-impl-is-reserved.rs
index 9d16015bd..97fac5914 100644
--- a/tests/ui/never_type/never-from-impl-is-reserved.rs
+++ b/tests/ui/never_type/never-from-impl-is-reserved.rs
@@ -1,5 +1,8 @@
// check that the `for<T> T: From<!>` impl is reserved
+// revisions: current next
+//[next] compile-flags: -Znext-solver=coherence
+
#![feature(never_type)]
pub struct MyFoo;
diff --git a/tests/ui/never_type/never-value-fallback-issue-66757.nofallback.stderr b/tests/ui/never_type/never-value-fallback-issue-66757.nofallback.stderr
index cb3786305..f5249814c 100644
--- a/tests/ui/never_type/never-value-fallback-issue-66757.nofallback.stderr
+++ b/tests/ui/never_type/never-value-fallback-issue-66757.nofallback.stderr
@@ -7,6 +7,6 @@ LL | <E as From<_>>::from(never);
= help: the trait `From<!>` is implemented for `E`
= help: for that trait implementation, expected `!`, found `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/nll/borrowed-local-error.stderr b/tests/ui/nll/borrowed-local-error.stderr
index 1cca4077d..acefdea97 100644
--- a/tests/ui/nll/borrowed-local-error.stderr
+++ b/tests/ui/nll/borrowed-local-error.stderr
@@ -11,6 +11,6 @@ LL |
LL | });
| - `v` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/borrowed-match-issue-45045.stderr b/tests/ui/nll/borrowed-match-issue-45045.stderr
index 33e3eb797..b2ec724f3 100644
--- a/tests/ui/nll/borrowed-match-issue-45045.stderr
+++ b/tests/ui/nll/borrowed-match-issue-45045.stderr
@@ -10,6 +10,6 @@ LL | match e {
LL | *g = Xyz::B;
| ----------- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0503`.
diff --git a/tests/ui/nll/borrowed-referent-issue-38899.stderr b/tests/ui/nll/borrowed-referent-issue-38899.stderr
index 16588cbcf..707596528 100644
--- a/tests/ui/nll/borrowed-referent-issue-38899.stderr
+++ b/tests/ui/nll/borrowed-referent-issue-38899.stderr
@@ -10,6 +10,6 @@ LL |
LL | drop(x);
| - mutable borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/nll/borrowed-temporary-error.stderr b/tests/ui/nll/borrowed-temporary-error.stderr
index 89781d96f..a17de890e 100644
--- a/tests/ui/nll/borrowed-temporary-error.stderr
+++ b/tests/ui/nll/borrowed-temporary-error.stderr
@@ -11,6 +11,6 @@ LL | println!("{:?}", x);
|
= note: consider using a `let` binding to create a longer lived value
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/nll/borrowed-universal-error-2.stderr b/tests/ui/nll/borrowed-universal-error-2.stderr
index 7213ed3ba..aa31142b2 100644
--- a/tests/ui/nll/borrowed-universal-error-2.stderr
+++ b/tests/ui/nll/borrowed-universal-error-2.stderr
@@ -4,6 +4,6 @@ error[E0515]: cannot return reference to local variable `v`
LL | &v
| ^^ returns a reference to data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/nll/borrowed-universal-error.stderr b/tests/ui/nll/borrowed-universal-error.stderr
index 88a2d8fcf..d93e2ffc8 100644
--- a/tests/ui/nll/borrowed-universal-error.stderr
+++ b/tests/ui/nll/borrowed-universal-error.stderr
@@ -7,6 +7,6 @@ LL | gimme(&(v,))
| | temporary value created here
| returns a value referencing data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/nll/capture-mut-ref.stderr b/tests/ui/nll/capture-mut-ref.stderr
index 4898d5692..d76e03146 100644
--- a/tests/ui/nll/capture-mut-ref.stderr
+++ b/tests/ui/nll/capture-mut-ref.stderr
@@ -12,5 +12,5 @@ note: the lint level is defined here
LL | #![deny(unused_mut)]
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/capture-ref-in-struct.stderr b/tests/ui/nll/capture-ref-in-struct.stderr
index 84b7ecf2f..81b937051 100644
--- a/tests/ui/nll/capture-ref-in-struct.stderr
+++ b/tests/ui/nll/capture-ref-in-struct.stderr
@@ -13,6 +13,6 @@ LL |
LL | deref(p);
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/closure-requirements/escape-argument-callee.stderr b/tests/ui/nll/closure-requirements/escape-argument-callee.stderr
index b3cb7813e..8debea6a0 100644
--- a/tests/ui/nll/closure-requirements/escape-argument-callee.stderr
+++ b/tests/ui/nll/closure-requirements/escape-argument-callee.stderr
@@ -6,7 +6,7 @@ LL | let mut closure = expect_sig(|p, y| *p = y);
|
= note: defining type: test::{closure#0} with closure args [
i16,
- for<Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) mut &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) i32, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) i32)),
+ for<Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) mut &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) i32, &ReBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) i32)),
(),
]
@@ -27,5 +27,5 @@ LL | fn test() {
|
= note: defining type: test
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/closure-requirements/escape-argument.stderr b/tests/ui/nll/closure-requirements/escape-argument.stderr
index 4f0156728..b050c0566 100644
--- a/tests/ui/nll/closure-requirements/escape-argument.stderr
+++ b/tests/ui/nll/closure-requirements/escape-argument.stderr
@@ -6,7 +6,7 @@ LL | let mut closure = expect_sig(|p, y| *p = y);
|
= note: defining type: test::{closure#0} with closure args [
i16,
- for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) mut &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) i32, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) i32)),
+ for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) mut &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) i32, &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) i32)),
(),
]
@@ -33,6 +33,6 @@ LL |
LL | deref(p);
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/closure-requirements/escape-upvar-nested.stderr b/tests/ui/nll/closure-requirements/escape-upvar-nested.stderr
index 727df1cf8..aa73e91cc 100644
--- a/tests/ui/nll/closure-requirements/escape-upvar-nested.stderr
+++ b/tests/ui/nll/closure-requirements/escape-upvar-nested.stderr
@@ -48,6 +48,6 @@ LL |
LL | deref(p);
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/closure-requirements/escape-upvar-ref.stderr b/tests/ui/nll/closure-requirements/escape-upvar-ref.stderr
index ff638f2a1..949dcc787 100644
--- a/tests/ui/nll/closure-requirements/escape-upvar-ref.stderr
+++ b/tests/ui/nll/closure-requirements/escape-upvar-ref.stderr
@@ -34,6 +34,6 @@ LL |
LL | deref(p);
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr b/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr
index ccf56bf6f..bffd365b9 100644
--- a/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr
@@ -6,7 +6,7 @@ LL | |_outlives1, _outlives2, _outlives3, x, y| {
|
= note: defining type: supply::{closure#0} with closure args [
i16,
- for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&'?2 &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?3 u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>)),
+ for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&'?2 &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?3 u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>)),
(),
]
= note: late-bound region is '?4
@@ -32,5 +32,5 @@ LL | fn supply<'a, 'b, 'c>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>, cell_c:
|
= note: defining type: supply
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-ref.stderr b/tests/ui/nll/closure-requirements/propagate-approximated-ref.stderr
index a16433c9d..843d307b8 100644
--- a/tests/ui/nll/closure-requirements/propagate-approximated-ref.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-ref.stderr
@@ -6,7 +6,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y
|
= note: defining type: supply::{closure#0} with closure args [
i16,
- for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&'?1 &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) &'?2 u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>)),
+ for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) &'?2 u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>)),
(),
]
= note: late-bound region is '?3
@@ -35,5 +35,5 @@ LL | demand_y(x, y, x.get())
|
= help: consider adding the following bound: `'a: 'b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr
index 9e0f16c0f..5ce3dae5a 100644
--- a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr
@@ -6,7 +6,7 @@ LL | foo(cell, |cell_a, cell_x| {
|
= note: defining type: case1::{closure#0} with closure args [
i32,
- for<Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>)),
+ for<Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>)),
(),
]
@@ -36,7 +36,7 @@ LL | foo(cell, |cell_a, cell_x| {
|
= note: defining type: case2::{closure#0} with closure args [
i32,
- for<Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>)),
+ for<Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>)),
(),
]
= note: number of external vids: 2
diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr
index e4989e321..54784df52 100644
--- a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr
@@ -6,7 +6,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
|
= note: defining type: supply::{closure#0} with closure args [
i16,
- for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&'?1 &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) u32>)),
+ for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) u32>)),
(),
]
= note: late-bound region is '?2
@@ -44,6 +44,6 @@ LL | | });
= note: the struct `Cell<T>` is invariant over the parameter `T`
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0521`.
diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr
index be35e62d0..53547afbf 100644
--- a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr
@@ -6,7 +6,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y
|
= note: defining type: supply::{closure#0} with closure args [
i16,
- for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&'?1 &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&'?2 &ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>)),
+ for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&'?2 &ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>)),
(),
]
= note: late-bound region is '?3
@@ -44,6 +44,6 @@ LL | | });
= note: the struct `Cell<T>` is invariant over the parameter `T`
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0521`.
diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-val.stderr b/tests/ui/nll/closure-requirements/propagate-approximated-val.stderr
index 8880dd816..5566c76d8 100644
--- a/tests/ui/nll/closure-requirements/propagate-approximated-val.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-val.stderr
@@ -6,7 +6,7 @@ LL | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| {
|
= note: defining type: test::{closure#0} with closure args [
i16,
- for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?2 u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>)),
+ for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?2 u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>)),
(),
]
= note: late-bound region is '?3
@@ -35,5 +35,5 @@ LL | demand_y(outlives1, outlives2, x.get())
|
= help: consider adding the following bound: `'a: 'b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr b/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr
index 47774b63f..0dd53f81a 100644
--- a/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr
@@ -6,7 +6,7 @@ LL | |_outlives1, _outlives2, x, y| {
|
= note: defining type: supply::{closure#0} with closure args [
i16,
- for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?2 u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>)),
+ for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?2 u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>)),
(),
]
= note: late-bound region is '?3
diff --git a/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr
index 3404bb128..64deaa00f 100644
--- a/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr
@@ -6,7 +6,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
|
= note: defining type: supply::{closure#0} with closure args [
i16,
- for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?1 u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>)),
+ for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?1 u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>)),
(),
]
= note: late-bound region is '?2
@@ -31,5 +31,5 @@ LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
|
= note: defining type: supply
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr
index e40648912..ee49b4dac 100644
--- a/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr
@@ -6,7 +6,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y
|
= note: defining type: supply::{closure#0} with closure args [
i16,
- for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?1 u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) &'?2 u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrAnon }) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>)),
+ for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?1 u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) &'?2 u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>)),
(),
]
= note: late-bound region is '?3
@@ -31,5 +31,5 @@ LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
|
= note: defining type: supply
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/closure-requirements/propagate-from-trait-match.stderr b/tests/ui/nll/closure-requirements/propagate-from-trait-match.stderr
index a20f885fe..28c5c43a6 100644
--- a/tests/ui/nll/closure-requirements/propagate-from-trait-match.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-from-trait-match.stderr
@@ -36,6 +36,6 @@ help: consider adding an explicit lifetime bound
LL | T: Trait<'a> + 'a,
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0309`.
diff --git a/tests/ui/nll/closure-requirements/propagate-multiple-requirements.stderr b/tests/ui/nll/closure-requirements/propagate-multiple-requirements.stderr
index 2fec9bc62..81b5f09b0 100644
--- a/tests/ui/nll/closure-requirements/propagate-multiple-requirements.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-multiple-requirements.stderr
@@ -12,6 +12,6 @@ LL | z = &local_arr;
LL | }
| - `local_arr` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr b/tests/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr
index 7034492ce..0f3e9314d 100644
--- a/tests/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr
+++ b/tests/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr
@@ -6,5 +6,5 @@ LL | fn foo(x: &u32) -> &'static u32 {
LL | &*x
| ^^^ returning this value requires that `'1` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr b/tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr
index d0a24a267..36478e723 100644
--- a/tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr
+++ b/tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr
@@ -6,5 +6,5 @@ LL | fn foo<'a>(x: &'a u32) -> &'static u32 {
LL | &*x
| ^^^ returning this value requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr b/tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr
index d0ba53925..9a0f4bb6d 100644
--- a/tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr
+++ b/tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr
@@ -10,5 +10,5 @@ LL | &*x
|
= help: consider adding the following bound: `'a: 'b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/closure-requirements/return-wrong-bound-region.stderr b/tests/ui/nll/closure-requirements/return-wrong-bound-region.stderr
index 18fb7195d..a13caf8c2 100644
--- a/tests/ui/nll/closure-requirements/return-wrong-bound-region.stderr
+++ b/tests/ui/nll/closure-requirements/return-wrong-bound-region.stderr
@@ -6,7 +6,7 @@ LL | expect_sig(|a, b| b); // ought to return `a`
|
= note: defining type: test::{closure#0} with closure args [
i16,
- for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) i32, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) i32)) -> &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) i32,
+ for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) i32, &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) i32)) -> &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) i32,
(),
]
@@ -27,5 +27,5 @@ LL | fn test() {
|
= note: defining type: test
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/constant-thread-locals-issue-47053.stderr b/tests/ui/nll/constant-thread-locals-issue-47053.stderr
index a44acfb5f..1c6844d6e 100644
--- a/tests/ui/nll/constant-thread-locals-issue-47053.stderr
+++ b/tests/ui/nll/constant-thread-locals-issue-47053.stderr
@@ -4,6 +4,6 @@ error[E0594]: cannot assign to immutable static item `FOO`
LL | FOO = 6;
| ^^^^^^^ cannot assign
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/nll/continue-after-missing-main.stderr b/tests/ui/nll/continue-after-missing-main.stderr
index 0df8d8d70..960503e8f 100644
--- a/tests/ui/nll/continue-after-missing-main.stderr
+++ b/tests/ui/nll/continue-after-missing-main.stderr
@@ -4,6 +4,6 @@ error[E0601]: `main` function not found in crate `continue_after_missing_main`
LL | }
| ^ consider adding a `main` function to `$DIR/continue-after-missing-main.rs`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0601`.
diff --git a/tests/ui/nll/coroutine-upvar-mutability.stderr b/tests/ui/nll/coroutine-upvar-mutability.stderr
index 464bbc769..8922eae31 100644
--- a/tests/ui/nll/coroutine-upvar-mutability.stderr
+++ b/tests/ui/nll/coroutine-upvar-mutability.stderr
@@ -7,6 +7,6 @@ LL | move || {
LL | x = 1;
| ^^^^^ cannot assign
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/nll/decl-macro-illegal-copy.stderr b/tests/ui/nll/decl-macro-illegal-copy.stderr
index 7948485bd..82fb8cdc9 100644
--- a/tests/ui/nll/decl-macro-illegal-copy.stderr
+++ b/tests/ui/nll/decl-macro-illegal-copy.stderr
@@ -9,6 +9,6 @@ LL | wrapper.inner,
|
= note: move occurs because `wrapper.inner` has type `NonCopy`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/nll/do-not-ignore-lifetime-bounds-in-copy-proj.stderr b/tests/ui/nll/do-not-ignore-lifetime-bounds-in-copy-proj.stderr
index 862c925b4..6c96f474a 100644
--- a/tests/ui/nll/do-not-ignore-lifetime-bounds-in-copy-proj.stderr
+++ b/tests/ui/nll/do-not-ignore-lifetime-bounds-in-copy-proj.stderr
@@ -11,6 +11,6 @@ LL | drop(a.0);
LL | }
| - `s` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/do-not-ignore-lifetime-bounds-in-copy.stderr b/tests/ui/nll/do-not-ignore-lifetime-bounds-in-copy.stderr
index ebaf6d124..d86ede629 100644
--- a/tests/ui/nll/do-not-ignore-lifetime-bounds-in-copy.stderr
+++ b/tests/ui/nll/do-not-ignore-lifetime-bounds-in-copy.stderr
@@ -11,6 +11,6 @@ LL | drop(a);
LL | }
| - `s` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/get_default.polonius.stderr b/tests/ui/nll/get_default.polonius.stderr
index 476d86cfb..613d06cce 100644
--- a/tests/ui/nll/get_default.polonius.stderr
+++ b/tests/ui/nll/get_default.polonius.stderr
@@ -13,6 +13,6 @@ LL |
LL | return v;
| - returning this value requires that `*map` is borrowed for `'1`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/nll/issue-27282-mutate-before-diverging-arm-1.stderr b/tests/ui/nll/issue-27282-mutate-before-diverging-arm-1.stderr
index a1f973e0f..a37639883 100644
--- a/tests/ui/nll/issue-27282-mutate-before-diverging-arm-1.stderr
+++ b/tests/ui/nll/issue-27282-mutate-before-diverging-arm-1.stderr
@@ -9,6 +9,6 @@ LL | (|| { *x = None; drop(force_fn_once); })();
| |
| cannot mutably borrow
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0510`.
diff --git a/tests/ui/nll/issue-27282-mutate-before-diverging-arm-2.stderr b/tests/ui/nll/issue-27282-mutate-before-diverging-arm-2.stderr
index dd46308d1..5cd098252 100644
--- a/tests/ui/nll/issue-27282-mutate-before-diverging-arm-2.stderr
+++ b/tests/ui/nll/issue-27282-mutate-before-diverging-arm-2.stderr
@@ -9,6 +9,6 @@ LL | (|| { *x = None; drop(force_fn_once); })();
| |
| cannot mutably borrow
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0510`.
diff --git a/tests/ui/nll/issue-27282-mutate-before-diverging-arm-3.stderr b/tests/ui/nll/issue-27282-mutate-before-diverging-arm-3.stderr
index 4a4a25790..e4d0cf311 100644
--- a/tests/ui/nll/issue-27282-mutate-before-diverging-arm-3.stderr
+++ b/tests/ui/nll/issue-27282-mutate-before-diverging-arm-3.stderr
@@ -9,6 +9,6 @@ LL | (|| { *x = &None; drop(force_fn_once); })();
| |
| cannot mutably borrow
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0510`.
diff --git a/tests/ui/nll/issue-27868.stderr b/tests/ui/nll/issue-27868.stderr
index 204eda3d2..5e70b3017 100644
--- a/tests/ui/nll/issue-27868.stderr
+++ b/tests/ui/nll/issue-27868.stderr
@@ -13,6 +13,6 @@ LL | | 0
LL | | };
| |_____- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/nll/issue-30438-a.stderr b/tests/ui/nll/issue-30438-a.stderr
index 53845af82..73599f6b7 100644
--- a/tests/ui/nll/issue-30438-a.stderr
+++ b/tests/ui/nll/issue-30438-a.stderr
@@ -7,6 +7,6 @@ LL | return &Test { s: &self.s};
| |temporary value created here
| returns a reference to data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/nll/issue-30438-b.stderr b/tests/ui/nll/issue-30438-b.stderr
index fd6bd25b1..b8eb4632a 100644
--- a/tests/ui/nll/issue-30438-b.stderr
+++ b/tests/ui/nll/issue-30438-b.stderr
@@ -7,6 +7,6 @@ LL | &Test { s: &self.s}
| |temporary value created here
| returns a reference to data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/nll/issue-30438-c.stderr b/tests/ui/nll/issue-30438-c.stderr
index 7c0010880..c8ca2bff7 100644
--- a/tests/ui/nll/issue-30438-c.stderr
+++ b/tests/ui/nll/issue-30438-c.stderr
@@ -4,6 +4,6 @@ error[E0515]: cannot return reference to local variable `x`
LL | &x
| ^^ returns a reference to data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/nll/issue-31567.stderr b/tests/ui/nll/issue-31567.stderr
index 7d43383e8..0f35fc1bf 100644
--- a/tests/ui/nll/issue-31567.stderr
+++ b/tests/ui/nll/issue-31567.stderr
@@ -11,6 +11,6 @@ LL | &s_inner.0
LL | }
| - here, drop of `v` needs exclusive access to `*v.0`, because the type `VecWrapper<'_>` implements the `Drop` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0713`.
diff --git a/tests/ui/nll/issue-45157.stderr b/tests/ui/nll/issue-45157.stderr
index 57fd8d49c..2dbf1c47d 100644
--- a/tests/ui/nll/issue-45157.stderr
+++ b/tests/ui/nll/issue-45157.stderr
@@ -12,6 +12,6 @@ LL | println!("{} {}", mref, nref)
|
= note: `u.z.c` is a field of the union `U`, so it overlaps the field `u.s.a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/nll/issue-46023.stderr b/tests/ui/nll/issue-46023.stderr
index ca19c2501..062e07407 100644
--- a/tests/ui/nll/issue-46023.stderr
+++ b/tests/ui/nll/issue-46023.stderr
@@ -7,6 +7,6 @@ LL | let x = 0;
LL | x = 1;
| ^^^^^ cannot assign
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/nll/issue-46036.stderr b/tests/ui/nll/issue-46036.stderr
index f337e2345..69753df14 100644
--- a/tests/ui/nll/issue-46036.stderr
+++ b/tests/ui/nll/issue-46036.stderr
@@ -12,6 +12,6 @@ LL | loop { }
LL | }
| - `a` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/issue-46589.stderr b/tests/ui/nll/issue-46589.stderr
index 82cd364ee..abf62aaa5 100644
--- a/tests/ui/nll/issue-46589.stderr
+++ b/tests/ui/nll/issue-46589.stderr
@@ -10,6 +10,6 @@ LL | None => (*other).new_self()
| second mutable borrow occurs here
| first borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/nll/issue-47388.stderr b/tests/ui/nll/issue-47388.stderr
index 09b9d638a..bd8b4c1ee 100644
--- a/tests/ui/nll/issue-47388.stderr
+++ b/tests/ui/nll/issue-47388.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be a mutable reference
LL | let fancy_ref = &mut (&mut fancy);
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/nll/issue-47470.stderr b/tests/ui/nll/issue-47470.stderr
index 0b1247d60..ae30f4182 100644
--- a/tests/ui/nll/issue-47470.stderr
+++ b/tests/ui/nll/issue-47470.stderr
@@ -4,6 +4,6 @@ error[E0515]: cannot return reference to local variable `local`
LL | &local
| ^^^^^^ returns a reference to data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/nll/issue-48238.stderr b/tests/ui/nll/issue-48238.stderr
index 0aa1eedad..e15fbbdcd 100644
--- a/tests/ui/nll/issue-48238.stderr
+++ b/tests/ui/nll/issue-48238.stderr
@@ -9,5 +9,5 @@ LL | move || use_val(&orig);
|
= note: closure implements `Fn`, so references to captured variables can't escape the closure
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/issue-48697.stderr b/tests/ui/nll/issue-48697.stderr
index f0c29b72b..243a60117 100644
--- a/tests/ui/nll/issue-48697.stderr
+++ b/tests/ui/nll/issue-48697.stderr
@@ -6,6 +6,6 @@ LL | let k = f(&z);
LL | f(x)
| ^^^^ returns a value referencing data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/nll/issue-48803.stderr b/tests/ui/nll/issue-48803.stderr
index e24606e0b..41dc7c8f9 100644
--- a/tests/ui/nll/issue-48803.stderr
+++ b/tests/ui/nll/issue-48803.stderr
@@ -10,6 +10,6 @@ LL |
LL | println!("{}", w); // prints "modified"
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/nll/issue-50716.stderr b/tests/ui/nll/issue-50716.stderr
index 38dd1b5f6..a09e76705 100644
--- a/tests/ui/nll/issue-50716.stderr
+++ b/tests/ui/nll/issue-50716.stderr
@@ -7,5 +7,5 @@ LL | fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>)
LL | let _x = *s;
| ^^ proving this value is `Sized` requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/issue-51244.stderr b/tests/ui/nll/issue-51244.stderr
index 8ccb5809e..610482f8b 100644
--- a/tests/ui/nll/issue-51244.stderr
+++ b/tests/ui/nll/issue-51244.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be a mutable reference
LL | let ref mut my_ref @ _ = 0;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/nll/issue-51268.stderr b/tests/ui/nll/issue-51268.stderr
index 0483bda63..b0c3d8b87 100644
--- a/tests/ui/nll/issue-51268.stderr
+++ b/tests/ui/nll/issue-51268.stderr
@@ -12,6 +12,6 @@ LL | | &self.number;
LL | | });
| |__________^ mutable borrow occurs here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/nll/issue-51512.stderr b/tests/ui/nll/issue-51512.stderr
index 072e96788..ed42899dc 100644
--- a/tests/ui/nll/issue-51512.stderr
+++ b/tests/ui/nll/issue-51512.stderr
@@ -13,6 +13,6 @@ help: consider cloning the value if the performance cost is acceptable
LL | let r = range.clone();
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/nll/issue-52113.stderr b/tests/ui/nll/issue-52113.stderr
index 84d4eb266..0a5e2e5a4 100644
--- a/tests/ui/nll/issue-52113.stderr
+++ b/tests/ui/nll/issue-52113.stderr
@@ -11,5 +11,5 @@ LL | data.push(value);
|
= help: consider adding the following bound: `'a: 'b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/issue-52213.stderr b/tests/ui/nll/issue-52213.stderr
index da31bcd54..ed3723a7f 100644
--- a/tests/ui/nll/issue-52213.stderr
+++ b/tests/ui/nll/issue-52213.stderr
@@ -11,5 +11,5 @@ LL | ((u,),) => u,
|
= help: consider adding the following bound: `'a: 'b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/issue-52533-1.stderr b/tests/ui/nll/issue-52533-1.stderr
index 20f19b259..b23ef3f33 100644
--- a/tests/ui/nll/issue-52533-1.stderr
+++ b/tests/ui/nll/issue-52533-1.stderr
@@ -7,5 +7,5 @@ LL | gimme(|x, y| y)
| | has type `&Foo<'_, '1, u32>`
| has type `&Foo<'_, '2, u32>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/issue-52534-2.stderr b/tests/ui/nll/issue-52534-2.stderr
index 35d39bb6e..62715b836 100644
--- a/tests/ui/nll/issue-52534-2.stderr
+++ b/tests/ui/nll/issue-52534-2.stderr
@@ -12,6 +12,6 @@ LL |
LL | println!("{}", y);
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/issue-52663-span-decl-captured-variable.stderr b/tests/ui/nll/issue-52663-span-decl-captured-variable.stderr
index fb61b30f0..587f30710 100644
--- a/tests/ui/nll/issue-52663-span-decl-captured-variable.stderr
+++ b/tests/ui/nll/issue-52663-span-decl-captured-variable.stderr
@@ -8,6 +8,6 @@ LL | expect_fn(|| drop(x.0));
| |
| captured by this `Fn` closure
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/nll/issue-52663-trait-object.stderr b/tests/ui/nll/issue-52663-trait-object.stderr
index 338f64841..fe55d8d49 100644
--- a/tests/ui/nll/issue-52663-trait-object.stderr
+++ b/tests/ui/nll/issue-52663-trait-object.stderr
@@ -10,6 +10,6 @@ LL | Box::new(tmp1) as Box<dyn Foo + '_>
LL | };
| - `tmp0` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/issue-52669.stderr b/tests/ui/nll/issue-52669.stderr
index db53e444b..f3cba9afb 100644
--- a/tests/ui/nll/issue-52669.stderr
+++ b/tests/ui/nll/issue-52669.stderr
@@ -9,6 +9,6 @@ LL | foo(a);
LL | a.b.clone()
| ^^^ value borrowed here after move
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/nll/issue-52742.stderr b/tests/ui/nll/issue-52742.stderr
index a79738296..8c09e542c 100644
--- a/tests/ui/nll/issue-52742.stderr
+++ b/tests/ui/nll/issue-52742.stderr
@@ -8,5 +8,5 @@ LL | fn take_bar(&mut self, b: Bar<'_>) {
LL | self.y = b.z
| ^^^^^^^^^^^^ assignment requires that `'1` must outlive `'2`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/issue-53040.stderr b/tests/ui/nll/issue-53040.stderr
index 87ffe9b1a..6c82459cc 100644
--- a/tests/ui/nll/issue-53040.stderr
+++ b/tests/ui/nll/issue-53040.stderr
@@ -13,5 +13,5 @@ LL | || &mut v;
= note: `FnMut` closures only have access to their captured variables while they are executing...
= note: ...therefore, they cannot allow references to captured variables to escape
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/issue-53119.rs b/tests/ui/nll/issue-53119.rs
index 015b72367..d19a9a032 100644
--- a/tests/ui/nll/issue-53119.rs
+++ b/tests/ui/nll/issue-53119.rs
@@ -1,6 +1,6 @@
// check-pass
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
use std::ops::Deref;
diff --git a/tests/ui/nll/issue-53773.stderr b/tests/ui/nll/issue-53773.stderr
index fc185d42d..580f6727a 100644
--- a/tests/ui/nll/issue-53773.stderr
+++ b/tests/ui/nll/issue-53773.stderr
@@ -11,6 +11,6 @@ LL | }
|
= note: consider using a `let` binding to create a longer lived value
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0713`.
diff --git a/tests/ui/nll/issue-53807.stderr b/tests/ui/nll/issue-53807.stderr
index d8f58b591..b07e3669f 100644
--- a/tests/ui/nll/issue-53807.stderr
+++ b/tests/ui/nll/issue-53807.stderr
@@ -10,6 +10,6 @@ help: borrow this binding in the pattern to avoid moving the value
LL | if let Some(ref thing) = maybe {
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/nll/issue-54189.stderr b/tests/ui/nll/issue-54189.stderr
index 4787abd49..14ed2bb22 100644
--- a/tests/ui/nll/issue-54189.stderr
+++ b/tests/ui/nll/issue-54189.stderr
@@ -4,6 +4,6 @@ error[E0582]: binding for associated type `Output` references lifetime `'r`, whi
LL | fn bug() -> impl for <'r> Fn() -> &'r () { || { &() } }
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0582`.
diff --git a/tests/ui/nll/issue-54302.stderr b/tests/ui/nll/issue-54302.stderr
index 26c46571f..269739af6 100644
--- a/tests/ui/nll/issue-54302.stderr
+++ b/tests/ui/nll/issue-54302.stderr
@@ -7,5 +7,5 @@ LL | assert_deserialize_owned::<&'static str>();
= note: `&'static str` must implement `Deserialize<'0>`, for any lifetime `'0`...
= note: ...but `&str` actually implements `Deserialize<'1>`, for some specific lifetime `'1`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/issue-54382-use-span-of-tail-of-block.stderr b/tests/ui/nll/issue-54382-use-span-of-tail-of-block.stderr
index 4a32c777a..4f1139458 100644
--- a/tests/ui/nll/issue-54382-use-span-of-tail-of-block.stderr
+++ b/tests/ui/nll/issue-54382-use-span-of-tail-of-block.stderr
@@ -21,6 +21,6 @@ help: consider adding semicolon after the expression so its temporaries are drop
LL | D("other").next(&_thing1);
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/issue-54556-niconii.stderr b/tests/ui/nll/issue-54556-niconii.stderr
index ad0a2d1e3..015d9e182 100644
--- a/tests/ui/nll/issue-54556-niconii.stderr
+++ b/tests/ui/nll/issue-54556-niconii.stderr
@@ -21,6 +21,6 @@ help: consider adding semicolon after the expression so its temporaries are drop
LL | if let Ok(_) = counter.lock() { };
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/issue-54556-stephaneyfx.stderr b/tests/ui/nll/issue-54556-stephaneyfx.stderr
index 0dfea0fd7..229640753 100644
--- a/tests/ui/nll/issue-54556-stephaneyfx.stderr
+++ b/tests/ui/nll/issue-54556-stephaneyfx.stderr
@@ -21,6 +21,6 @@ help: for example, you could save the expression's value in a new local variable
LL | let x = rows.map(|row| row).next(); x
| +++++++ +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr b/tests/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr
index 4eae9fdcd..b5bfdfd7f 100644
--- a/tests/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr
+++ b/tests/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr
@@ -20,6 +20,6 @@ help: consider adding semicolon after the expression so its temporaries are drop
LL | D(&_thing1).end();
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/issue-54556-wrap-it-up.stderr b/tests/ui/nll/issue-54556-wrap-it-up.stderr
index adc419ae5..591303321 100644
--- a/tests/ui/nll/issue-54556-wrap-it-up.stderr
+++ b/tests/ui/nll/issue-54556-wrap-it-up.stderr
@@ -9,6 +9,6 @@ LL | x = 1;
LL | }
| - borrow might be used here, when `foo` is dropped and runs the destructor for type `Foo<'_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/nll/issue-54779-anon-static-lifetime.stderr b/tests/ui/nll/issue-54779-anon-static-lifetime.stderr
index 64ad7a21a..92298c661 100644
--- a/tests/ui/nll/issue-54779-anon-static-lifetime.stderr
+++ b/tests/ui/nll/issue-54779-anon-static-lifetime.stderr
@@ -7,5 +7,5 @@ LL | cx: &dyn DebugContext,
LL | bar.debug_with(cx);
| ^^ cast requires that `'1` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/issue-54943.stderr b/tests/ui/nll/issue-54943.stderr
index 59be0f983..7ea736336 100644
--- a/tests/ui/nll/issue-54943.stderr
+++ b/tests/ui/nll/issue-54943.stderr
@@ -7,5 +7,5 @@ LL | fn boo<'a>() {
LL | let x = foo::<&'a u32>();
| ^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/issue-55394.stderr b/tests/ui/nll/issue-55394.stderr
index 24b8c84b4..69df90102 100644
--- a/tests/ui/nll/issue-55394.stderr
+++ b/tests/ui/nll/issue-55394.stderr
@@ -8,5 +8,5 @@ LL | fn new(bar: &mut Bar) -> Self {
LL | Foo { bar }
| ^^^^^^^^^^^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/issue-55401.stderr b/tests/ui/nll/issue-55401.stderr
index 4f797f26a..50167dd28 100644
--- a/tests/ui/nll/issue-55401.stderr
+++ b/tests/ui/nll/issue-55401.stderr
@@ -7,5 +7,5 @@ LL | let (ref y, _z): (&'a u32, u32) = (&22, 44);
LL | *y
| ^^ returning this value requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/issue-55511.stderr b/tests/ui/nll/issue-55511.stderr
index ecb9ef0ae..ac7cd54df 100644
--- a/tests/ui/nll/issue-55511.stderr
+++ b/tests/ui/nll/issue-55511.stderr
@@ -12,6 +12,6 @@ LL | <() as Foo<'static>>::C => { }
LL | }
| - `a` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/issue-57265-return-type-wf-check.stderr b/tests/ui/nll/issue-57265-return-type-wf-check.stderr
index bb45575fa..d6810fe09 100644
--- a/tests/ui/nll/issue-57265-return-type-wf-check.stderr
+++ b/tests/ui/nll/issue-57265-return-type-wf-check.stderr
@@ -7,6 +7,6 @@ LL | let (_, z) = foo(&"hello".to_string());
| | creates a temporary value which is freed while still in use
| argument requires that borrow lasts for `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/nll/issue-57280-1-flipped.stderr b/tests/ui/nll/issue-57280-1-flipped.stderr
index 7a2135a2a..81bff3ba0 100644
--- a/tests/ui/nll/issue-57280-1-flipped.stderr
+++ b/tests/ui/nll/issue-57280-1-flipped.stderr
@@ -7,5 +7,5 @@ LL | match x {
LL | <() as Foo<'a>>::C => { }
| ^^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/issue-57843.stderr b/tests/ui/nll/issue-57843.stderr
index 2ab49ec61..eed511460 100644
--- a/tests/ui/nll/issue-57843.stderr
+++ b/tests/ui/nll/issue-57843.stderr
@@ -7,5 +7,5 @@ LL | Foo(Box::new(|_| ()));
= note: closure with signature `fn(&'2 bool)` must implement `FnOnce<(&'1 bool,)>`, for any lifetime `'1`...
= note: ...but it actually implements `FnOnce<(&'2 bool,)>`, for some specific lifetime `'2`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/issue-61424.stderr b/tests/ui/nll/issue-61424.stderr
index 6de6b7f3a..8dc66cbae 100644
--- a/tests/ui/nll/issue-61424.stderr
+++ b/tests/ui/nll/issue-61424.stderr
@@ -12,5 +12,5 @@ note: the lint level is defined here
LL | #![deny(unused_mut)]
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/issue-67007-escaping-data.stderr b/tests/ui/nll/issue-67007-escaping-data.stderr
index ac9c59bf7..eb7b57c7e 100644
--- a/tests/ui/nll/issue-67007-escaping-data.stderr
+++ b/tests/ui/nll/issue-67007-escaping-data.stderr
@@ -10,5 +10,5 @@ LL | let other = self.use_fcx(fcx);
|
= help: consider adding the following bound: `'a: 'tcx`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/issue-68550.stderr b/tests/ui/nll/issue-68550.stderr
index 851e36287..323ba7b84 100644
--- a/tests/ui/nll/issue-68550.stderr
+++ b/tests/ui/nll/issue-68550.stderr
@@ -13,6 +13,6 @@ LL | let _: &'a A = &x;
LL | }
| - `x` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/issue-69114-static-ty.stderr b/tests/ui/nll/issue-69114-static-ty.stderr
index 9215e850f..a77ae8516 100644
--- a/tests/ui/nll/issue-69114-static-ty.stderr
+++ b/tests/ui/nll/issue-69114-static-ty.stderr
@@ -12,6 +12,6 @@ LL |
LL | }
| - `n` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/issue-73159-rpit-static.stderr b/tests/ui/nll/issue-73159-rpit-static.stderr
index 4d3a90153..472db30fb 100644
--- a/tests/ui/nll/issue-73159-rpit-static.stderr
+++ b/tests/ui/nll/issue-73159-rpit-static.stderr
@@ -8,6 +8,6 @@ LL | fn make_it(&self) -> impl Iterator<Item = u8> {
LL | self.0.iter().copied()
| ^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0700`.
diff --git a/tests/ui/nll/issue-75777.stderr b/tests/ui/nll/issue-75777.stderr
index 370cd72fd..402c411a6 100644
--- a/tests/ui/nll/issue-75777.stderr
+++ b/tests/ui/nll/issue-75777.stderr
@@ -7,5 +7,5 @@ LL | let fut: BoxFuture<'a, A> = Box::pin(future::ready(v));
LL | Box::new(move |_| fut)
| ^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/issue-95272.stderr b/tests/ui/nll/issue-95272.stderr
index 03edbc3a6..0453ef8e5 100644
--- a/tests/ui/nll/issue-95272.stderr
+++ b/tests/ui/nll/issue-95272.stderr
@@ -13,5 +13,5 @@ LL | let f = check;
= note: the function `check` is invariant over the parameter `'a`
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/issue-98693.stderr b/tests/ui/nll/issue-98693.stderr
index a3d87d74a..b5e281538 100644
--- a/tests/ui/nll/issue-98693.stderr
+++ b/tests/ui/nll/issue-98693.stderr
@@ -12,6 +12,6 @@ help: consider adding an explicit lifetime bound
LL | fn test<T: 'static>() {
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0310`.
diff --git a/tests/ui/nll/loan_ends_mid_block_pair.stderr b/tests/ui/nll/loan_ends_mid_block_pair.stderr
index 58e378ab0..5f8e9d5c6 100644
--- a/tests/ui/nll/loan_ends_mid_block_pair.stderr
+++ b/tests/ui/nll/loan_ends_mid_block_pair.stderr
@@ -10,6 +10,6 @@ LL | data.0 = 'e';
LL | capitalize(c);
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/nll/match-cfg-fake-edges2.stderr b/tests/ui/nll/match-cfg-fake-edges2.stderr
index 36f2cd0b8..639cba140 100644
--- a/tests/ui/nll/match-cfg-fake-edges2.stderr
+++ b/tests/ui/nll/match-cfg-fake-edges2.stderr
@@ -10,6 +10,6 @@ LL | match y {
LL | r;
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0503`.
diff --git a/tests/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr b/tests/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr
index 55646b9dc..56c1fce06 100644
--- a/tests/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr
+++ b/tests/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr
@@ -10,6 +10,6 @@ LL | // FIXME ^ Should not error in the future with implicit dtors, only man
LL | }
| - borrow might be used here, when `foo` is dropped and runs the destructor for type `Foo<'_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/nll/maybe-initialized-drop-with-fragment.stderr b/tests/ui/nll/maybe-initialized-drop-with-fragment.stderr
index c89f94a78..e6f275a24 100644
--- a/tests/ui/nll/maybe-initialized-drop-with-fragment.stderr
+++ b/tests/ui/nll/maybe-initialized-drop-with-fragment.stderr
@@ -9,6 +9,6 @@ LL | x = 1;
LL | }
| - borrow might be used here, when `foo` is dropped and runs the destructor for type `Foo<'_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.stderr b/tests/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.stderr
index 90db13bc5..610a0d6e9 100644
--- a/tests/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.stderr
+++ b/tests/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.stderr
@@ -10,6 +10,6 @@ LL | // FIXME ^ This currently errors and it should not.
LL | }
| - borrow might be used here, when `foo` is dropped and runs the destructor for type `Foo<'_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/nll/maybe-initialized-drop.stderr b/tests/ui/nll/maybe-initialized-drop.stderr
index 15a53a09a..7f231c488 100644
--- a/tests/ui/nll/maybe-initialized-drop.stderr
+++ b/tests/ui/nll/maybe-initialized-drop.stderr
@@ -8,6 +8,6 @@ LL | x = 1;
LL | }
| - borrow might be used here, when `wrap` is dropped and runs the `Drop` code for type `Wrap`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/nll/mir_check_cast_closure.stderr b/tests/ui/nll/mir_check_cast_closure.stderr
index 72d99aad9..fcb191891 100644
--- a/tests/ui/nll/mir_check_cast_closure.stderr
+++ b/tests/ui/nll/mir_check_cast_closure.stderr
@@ -11,5 +11,5 @@ LL | g
|
= help: consider adding the following bound: `'b: 'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/mir_check_cast_reify.stderr b/tests/ui/nll/mir_check_cast_reify.stderr
index 9be2670fe..9500e474b 100644
--- a/tests/ui/nll/mir_check_cast_reify.stderr
+++ b/tests/ui/nll/mir_check_cast_reify.stderr
@@ -7,5 +7,5 @@ LL | fn bar<'a>(x: &'a u32) -> &'static u32 {
LL | f(x)
| ^^^^ returning this value requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/mir_check_cast_unsafe_fn.stderr b/tests/ui/nll/mir_check_cast_unsafe_fn.stderr
index 321d17ba6..94483e94a 100644
--- a/tests/ui/nll/mir_check_cast_unsafe_fn.stderr
+++ b/tests/ui/nll/mir_check_cast_unsafe_fn.stderr
@@ -7,5 +7,5 @@ LL | fn bar<'a>(input: &'a u32, f: fn(&'a u32) -> &'a u32) -> &'static u32 {
LL | unsafe { g(input) }
| ^^^^^^^^ returning this value requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/mir_check_cast_unsize.stderr b/tests/ui/nll/mir_check_cast_unsize.stderr
index 1cd2579e4..84958eae5 100644
--- a/tests/ui/nll/mir_check_cast_unsize.stderr
+++ b/tests/ui/nll/mir_check_cast_unsize.stderr
@@ -11,5 +11,5 @@ help: to declare that the trait object captures data from argument `x`, you can
LL | fn bar<'a>(x: &'a u32) -> &'static dyn Debug + 'a {
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/missing-universe-cause-issue-114907.stderr b/tests/ui/nll/missing-universe-cause-issue-114907.stderr
index 988eee610..a616d29c4 100644
--- a/tests/ui/nll/missing-universe-cause-issue-114907.stderr
+++ b/tests/ui/nll/missing-universe-cause-issue-114907.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
LL | accept(callback);
| ^^^^^^^^^^^^^^^^ one type is more general than the other
|
- = note: expected trait `for<'a> FnOnce<(&'a (),)>`
- found trait `FnOnce<(&(),)>`
+ = note: expected trait `for<'a> FnOnce(&'a ())`
+ found trait `FnOnce(&())`
note: this closure does not fulfill the lifetime requirements
--> $DIR/missing-universe-cause-issue-114907.rs:32:20
|
@@ -46,8 +46,8 @@ error[E0308]: mismatched types
LL | accept(callback);
| ^^^^^^^^^^^^^^^^ one type is more general than the other
|
- = note: expected trait `for<'a> FnOnce<(&'a (),)>`
- found trait `FnOnce<(&(),)>`
+ = note: expected trait `for<'a> FnOnce(&'a ())`
+ found trait `FnOnce(&())`
note: this closure does not fulfill the lifetime requirements
--> $DIR/missing-universe-cause-issue-114907.rs:32:20
|
diff --git a/tests/ui/nll/move-subpaths-moves-root.stderr b/tests/ui/nll/move-subpaths-moves-root.stderr
index ae9287f92..7a7c78016 100644
--- a/tests/ui/nll/move-subpaths-moves-root.stderr
+++ b/tests/ui/nll/move-subpaths-moves-root.stderr
@@ -8,6 +8,6 @@ LL | drop(x);
|
= note: partial move occurs because `x.0` has type `Vec<i32>`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/nll/normalization-bounds-error.stderr b/tests/ui/nll/normalization-bounds-error.stderr
index 0fc3670d6..c6f3f2fd0 100644
--- a/tests/ui/nll/normalization-bounds-error.stderr
+++ b/tests/ui/nll/normalization-bounds-error.stderr
@@ -22,6 +22,6 @@ LL | fn visit_seq<'d, 'a: 'd>() -> <&'a () as Visitor<'d>>::Value {}
= note: expected `Visitor<'d>`
found `Visitor<'_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0495`.
diff --git a/tests/ui/nll/polonius/location-insensitive-scopes-liveness.rs b/tests/ui/nll/polonius/location-insensitive-scopes-liveness.rs
new file mode 100644
index 000000000..5fabf31ce
--- /dev/null
+++ b/tests/ui/nll/polonius/location-insensitive-scopes-liveness.rs
@@ -0,0 +1,46 @@
+// This is a non-regression test about differences in scopes computed by NLLs and `-Zpolonius=next`
+// found during the crater run for PR #117593.
+//
+// Live loans were computed too early compared to some of the liveness data coming from later passes
+// than `liveness::trace`, on some specific CFGs shapes: a variable was dead during tracing but its
+// regions were marked live later, and live loans were not recomputed at this point.
+
+// check-pass
+// revisions: nll polonius
+// [polonius] compile-flags: -Zpolonius=next
+
+// minimized from wavefc-cli-3.0.0
+fn repro1() {
+ let a = 0;
+ let closure = || {
+ let _b = a;
+ };
+
+ let callback = if true { Some(closure) } else { None };
+ do_it(callback);
+}
+fn do_it<F>(_: Option<F>)
+where
+ F: Fn(),
+{
+}
+
+// minimized from simple-server-0.4.0
+fn repro2() {
+ let mut a = &();
+ let s = S(&mut a);
+ let _ = if true { Some(s) } else { None };
+}
+struct S<'a>(&'a mut &'a ());
+
+// minimized from https://github.com/SHaaD94/AICup2022
+fn repro3() {
+ let runner = ();
+ let writer = debug_interface(&runner);
+ let _ = if true { Some(writer) } else { None };
+}
+fn debug_interface(_: &()) -> &mut dyn std::io::Write {
+ unimplemented!()
+}
+
+fn main() {}
diff --git a/tests/ui/nll/polonius/subset-relations.stderr b/tests/ui/nll/polonius/subset-relations.stderr
index 6df5563ea..9deca6449 100644
--- a/tests/ui/nll/polonius/subset-relations.stderr
+++ b/tests/ui/nll/polonius/subset-relations.stderr
@@ -10,5 +10,5 @@ LL | y
|
= help: consider adding the following bound: `'b: 'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/promoted-bounds.stderr b/tests/ui/nll/promoted-bounds.stderr
index d111256b8..73fda3805 100644
--- a/tests/ui/nll/promoted-bounds.stderr
+++ b/tests/ui/nll/promoted-bounds.stderr
@@ -11,6 +11,6 @@ LL | let b = &l;
LL | };
| - `l` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/promoted-closure-pair.stderr b/tests/ui/nll/promoted-closure-pair.stderr
index 000bdf858..ee00b7ba5 100644
--- a/tests/ui/nll/promoted-closure-pair.stderr
+++ b/tests/ui/nll/promoted-closure-pair.stderr
@@ -7,6 +7,6 @@ LL | p.1(&z)
| | `z` is borrowed here
| returns a value referencing data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/nll/reference-carried-through-struct-field.stderr b/tests/ui/nll/reference-carried-through-struct-field.stderr
index 5672b9cd7..b26f73fc7 100644
--- a/tests/ui/nll/reference-carried-through-struct-field.stderr
+++ b/tests/ui/nll/reference-carried-through-struct-field.stderr
@@ -8,6 +8,6 @@ LL | x += 1;
LL | *wrapper.w += 1;
| --------------- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0503`.
diff --git a/tests/ui/nll/region-ends-after-if-condition.stderr b/tests/ui/nll/region-ends-after-if-condition.stderr
index c03e38579..b7c37caa2 100644
--- a/tests/ui/nll/region-ends-after-if-condition.stderr
+++ b/tests/ui/nll/region-ends-after-if-condition.stderr
@@ -10,6 +10,6 @@ LL | my_struct.field.push_str("Hello, world!");
LL | drop(value);
| ----- immutable borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/nll/relate_tys/fn-subtype.stderr b/tests/ui/nll/relate_tys/fn-subtype.stderr
index 21073647e..0e3ab41da 100644
--- a/tests/ui/nll/relate_tys/fn-subtype.stderr
+++ b/tests/ui/nll/relate_tys/fn-subtype.stderr
@@ -7,6 +7,6 @@ LL | let y: for<'a> fn(&'a ()) = x;
= note: expected fn pointer `for<'a> fn(&'a ())`
found fn pointer `fn(&())`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/nll/relate_tys/hr-fn-aaa-as-aba.stderr b/tests/ui/nll/relate_tys/hr-fn-aaa-as-aba.stderr
index 7d76c916d..58fd7776f 100644
--- a/tests/ui/nll/relate_tys/hr-fn-aaa-as-aba.stderr
+++ b/tests/ui/nll/relate_tys/hr-fn-aaa-as-aba.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
LL | let a: for<'a, 'b> fn(&'a u32, &'b u32) -> &'a u32 = make_it();
| ^^^^^^^^^ one type is more general than the other
|
- = note: expected fn pointer `for<'a, 'b> fn(&'a u32, &'b u32) -> &'a u32`
- found fn pointer `for<'a> fn(&'a u32, &'a u32) -> &'a u32`
+ = note: expected fn pointer `for<'a, 'b> fn(&'a _, &'b _) -> &'a _`
+ found fn pointer `for<'a> fn(&'a _, &'a _) -> &'a _`
error[E0308]: mismatched types
--> $DIR/hr-fn-aaa-as-aba.rs:20:12
@@ -13,8 +13,8 @@ error[E0308]: mismatched types
LL | let _: for<'a, 'b> fn(&'a u32, &'b u32) -> &'a u32 = make_it();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
|
- = note: expected fn pointer `for<'a, 'b> fn(&'a u32, &'b u32) -> &'a u32`
- found fn pointer `for<'a> fn(&'a u32, &'a u32) -> &'a u32`
+ = note: expected fn pointer `for<'a, 'b> fn(&'a _, &'b _) -> &'a _`
+ found fn pointer `for<'a> fn(&'a _, &'a _) -> &'a _`
error: aborting due to 2 previous errors
diff --git a/tests/ui/nll/relate_tys/opaque-hrtb.stderr b/tests/ui/nll/relate_tys/opaque-hrtb.stderr
index d75ec2b57..d48745d2d 100644
--- a/tests/ui/nll/relate_tys/opaque-hrtb.stderr
+++ b/tests/ui/nll/relate_tys/opaque-hrtb.stderr
@@ -7,5 +7,5 @@ LL | bar()
= note: `impl MyTrait<&'2 str>` must implement `MyTrait<&'1 str>`, for any lifetime `'1`...
= note: ...but it actually implements `MyTrait<&'2 str>`, for some specific lifetime `'2`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/relate_tys/trait-hrtb.stderr b/tests/ui/nll/relate_tys/trait-hrtb.stderr
index aa1927711..7f7b94c0b 100644
--- a/tests/ui/nll/relate_tys/trait-hrtb.stderr
+++ b/tests/ui/nll/relate_tys/trait-hrtb.stderr
@@ -7,6 +7,6 @@ LL | let y: Box<dyn for<'a> Foo<'a>> = x;
= note: expected trait object `dyn for<'a> Foo<'a>`
found trait object `dyn Foo<'_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/nll/relate_tys/universe-violation.stderr b/tests/ui/nll/relate_tys/universe-violation.stderr
index fe801b42c..a538a59a4 100644
--- a/tests/ui/nll/relate_tys/universe-violation.stderr
+++ b/tests/ui/nll/relate_tys/universe-violation.stderr
@@ -4,9 +4,9 @@ error[E0308]: mismatched types
LL | let b: fn(&u32) -> &u32 = a;
| ^ one type is more general than the other
|
- = note: expected fn pointer `for<'a> fn(&'a u32) -> &'a u32`
- found fn pointer `fn(&u32) -> &u32`
+ = note: expected fn pointer `for<'a> fn(&'a _) -> &'a _`
+ found fn pointer `fn(&_) -> &_`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/nll/relate_tys/var-appears-twice.stderr b/tests/ui/nll/relate_tys/var-appears-twice.stderr
index ff6ea598f..3f9a6cec0 100644
--- a/tests/ui/nll/relate_tys/var-appears-twice.stderr
+++ b/tests/ui/nll/relate_tys/var-appears-twice.stderr
@@ -12,6 +12,6 @@ LL | let x: DoubleCell<_> = make_cell(&b);
LL | }
| - `b` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/return-ref-mut-issue-46557.stderr b/tests/ui/nll/return-ref-mut-issue-46557.stderr
index 720440a0a..358830fd5 100644
--- a/tests/ui/nll/return-ref-mut-issue-46557.stderr
+++ b/tests/ui/nll/return-ref-mut-issue-46557.stderr
@@ -6,6 +6,6 @@ LL | let ref mut x = 1234543;
LL | x
| ^ returns a value referencing data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/nll/return_from_loop.stderr b/tests/ui/nll/return_from_loop.stderr
index efd56ea2d..9fe681680 100644
--- a/tests/ui/nll/return_from_loop.stderr
+++ b/tests/ui/nll/return_from_loop.stderr
@@ -10,6 +10,6 @@ LL |
LL | value.len();
| ----- first borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/nll/snocat-regression.stderr b/tests/ui/nll/snocat-regression.stderr
index 086898473..135b69515 100644
--- a/tests/ui/nll/snocat-regression.stderr
+++ b/tests/ui/nll/snocat-regression.stderr
@@ -10,5 +10,5 @@ LL | | let _x = link;
LL | | };
| |_____^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/trait-associated-constant.stderr b/tests/ui/nll/trait-associated-constant.stderr
index cf1c52ba7..371f7860d 100644
--- a/tests/ui/nll/trait-associated-constant.stderr
+++ b/tests/ui/nll/trait-associated-constant.stderr
@@ -4,8 +4,8 @@ error[E0308]: const not compatible with trait
LL | const AC: Option<&'c str> = None;
| ^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
- = note: expected enum `Option<&'b str>`
- found enum `Option<&'c str>`
+ = note: expected enum `Option<&'b _>`
+ found enum `Option<&'c _>`
note: the lifetime `'c` as defined here...
--> $DIR/trait-associated-constant.rs:20:18
|
@@ -17,6 +17,6 @@ note: ...does not necessarily outlive the lifetime `'b` as defined here
LL | impl<'a: 'b, 'b, 'c> Anything<'a, 'b> for FailStruct {
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/nll/ty-outlives/impl-trait-captures.stderr b/tests/ui/nll/ty-outlives/impl-trait-captures.stderr
index ba885d1b9..693c5b8b0 100644
--- a/tests/ui/nll/ty-outlives/impl-trait-captures.stderr
+++ b/tests/ui/nll/ty-outlives/impl-trait-captures.stderr
@@ -1,18 +1,18 @@
-error[E0700]: hidden type for `Opaque(DefId(0:13 ~ impl_trait_captures[aeb9]::foo::{opaque#0}), [ReEarlyBound(DefId(0:9 ~ impl_trait_captures[aeb9]::foo::'a), 0, 'a), T, ReEarlyBound(DefId(0:9 ~ impl_trait_captures[aeb9]::foo::'a), 0, 'a)])` captures lifetime that does not appear in bounds
+error[E0700]: hidden type for `Opaque(DefId(0:13 ~ impl_trait_captures[aeb9]::foo::{opaque#0}), [ReEarlyParam(DefId(0:9 ~ impl_trait_captures[aeb9]::foo::'a), 0, 'a), T, ReEarlyParam(DefId(0:9 ~ impl_trait_captures[aeb9]::foo::'a), 0, 'a)])` captures lifetime that does not appear in bounds
--> $DIR/impl-trait-captures.rs:11:5
|
LL | fn foo<'a, T>(x: &T) -> impl Foo<'a> {
| -- ------------ opaque type defined here
| |
- | hidden type `&ReFree(DefId(0:8 ~ impl_trait_captures[aeb9]::foo), BrNamed(DefId(0:12 ~ impl_trait_captures[aeb9]::foo::'_), '_)) T` captures the anonymous lifetime defined here
+ | hidden type `&ReLateParam(DefId(0:8 ~ impl_trait_captures[aeb9]::foo), BrNamed(DefId(0:12 ~ impl_trait_captures[aeb9]::foo::'_), '_)) T` captures the anonymous lifetime defined here
LL | x
| ^
|
-help: to declare that `Opaque(DefId(0:13 ~ impl_trait_captures[aeb9]::foo::{opaque#0}), [ReEarlyBound(DefId(0:9 ~ impl_trait_captures[aeb9]::foo::'a), 0, 'a), T, ReEarlyBound(DefId(0:14 ~ impl_trait_captures[aeb9]::foo::{opaque#0}::'a), 2, 'a)])` captures `ReFree(DefId(0:8 ~ impl_trait_captures[aeb9]::foo), BrNamed(DefId(0:12 ~ impl_trait_captures[aeb9]::foo::'_), '_))`, you can add an explicit `ReFree(DefId(0:8 ~ impl_trait_captures[aeb9]::foo), BrNamed(DefId(0:12 ~ impl_trait_captures[aeb9]::foo::'_), '_))` lifetime bound
+help: to declare that `Opaque(DefId(0:13 ~ impl_trait_captures[aeb9]::foo::{opaque#0}), [ReEarlyParam(DefId(0:9 ~ impl_trait_captures[aeb9]::foo::'a), 0, 'a), T, ReEarlyParam(DefId(0:14 ~ impl_trait_captures[aeb9]::foo::{opaque#0}::'a), 2, 'a)])` captures `ReLateParam(DefId(0:8 ~ impl_trait_captures[aeb9]::foo), BrNamed(DefId(0:12 ~ impl_trait_captures[aeb9]::foo::'_), '_))`, you can add an explicit `ReLateParam(DefId(0:8 ~ impl_trait_captures[aeb9]::foo), BrNamed(DefId(0:12 ~ impl_trait_captures[aeb9]::foo::'_), '_))` lifetime bound
|
-LL | fn foo<'a, T>(x: &T) -> impl Foo<'a> + ReFree(DefId(0:8 ~ impl_trait_captures[aeb9]::foo), BrNamed(DefId(0:12 ~ impl_trait_captures[aeb9]::foo::'_), '_)) {
- | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+LL | fn foo<'a, T>(x: &T) -> impl Foo<'a> + ReLateParam(DefId(0:8 ~ impl_trait_captures[aeb9]::foo), BrNamed(DefId(0:12 ~ impl_trait_captures[aeb9]::foo::'_), '_)) {
+ | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0700`.
diff --git a/tests/ui/nll/ty-outlives/projection-implied-bounds.stderr b/tests/ui/nll/ty-outlives/projection-implied-bounds.stderr
index 6de023ffd..2aab03ee7 100644
--- a/tests/ui/nll/ty-outlives/projection-implied-bounds.stderr
+++ b/tests/ui/nll/ty-outlives/projection-implied-bounds.stderr
@@ -12,6 +12,6 @@ help: consider adding an explicit lifetime bound
LL | fn generic2<T: Iterator + 'static>(value: T) {
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0310`.
diff --git a/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr b/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr
index 1fa74f67c..f8ecc0c68 100644
--- a/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr
+++ b/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr
@@ -9,6 +9,6 @@ LL | bar::<T::Output>()
|
= help: consider adding an explicit lifetime bound `<T as MyTrait<'_>>::Output: 'a`...
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0309`.
diff --git a/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr b/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr
index c8dbe4ebc..13ad665e2 100644
--- a/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr
+++ b/tests/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr
@@ -9,6 +9,6 @@ LL | bar::<<T as MyTrait<'a>>::Output>()
|
= help: consider adding an explicit lifetime bound `<T as MyTrait<'_>>::Output: 'a`...
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0309`.
diff --git a/tests/ui/nll/ty-outlives/projection-where-clause-none.stderr b/tests/ui/nll/ty-outlives/projection-where-clause-none.stderr
index f78708dc4..b4136be36 100644
--- a/tests/ui/nll/ty-outlives/projection-where-clause-none.stderr
+++ b/tests/ui/nll/ty-outlives/projection-where-clause-none.stderr
@@ -12,6 +12,6 @@ help: consider adding an explicit lifetime bound
LL | T: MyTrait<'a> + 'a,
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0309`.
diff --git a/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr b/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr
index 59e29e9a4..acbcb9f0b 100644
--- a/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr
+++ b/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr
@@ -6,7 +6,7 @@ LL | twice(cell, value, |a, b| invoke(a, b));
|
= note: defining type: generic::<T>::{closure#0} with closure args [
i16,
- for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'?1 &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) ()>>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) T)),
+ for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) ()>>, &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) T)),
(),
]
= note: number of external vids: 2
@@ -28,7 +28,7 @@ LL | twice(cell, value, |a, b| invoke(a, b));
|
= note: defining type: generic_fail::<T>::{closure#0} with closure args [
i16,
- for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'?1 &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) ()>>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) T)),
+ for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) ()>>, &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) T)),
(),
]
= note: late-bound region is '?2
@@ -56,6 +56,6 @@ help: consider adding an explicit lifetime bound
LL | fn generic_fail<'a, T: 'a>(cell: Cell<&'a ()>, value: T) {
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0309`.
diff --git a/tests/ui/nll/ty-outlives/ty-param-fn-body.stderr b/tests/ui/nll/ty-outlives/ty-param-fn-body.stderr
index 73f01ff15..c884909c9 100644
--- a/tests/ui/nll/ty-outlives/ty-param-fn-body.stderr
+++ b/tests/ui/nll/ty-outlives/ty-param-fn-body.stderr
@@ -11,6 +11,6 @@ help: consider adding an explicit lifetime bound
LL | fn region_static<'a, T: 'a>(cell: Cell<&'a usize>, t: T) {
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0309`.
diff --git a/tests/ui/nll/unused-mut-issue-50343.stderr b/tests/ui/nll/unused-mut-issue-50343.stderr
index cb02d7620..582ca17cc 100644
--- a/tests/ui/nll/unused-mut-issue-50343.stderr
+++ b/tests/ui/nll/unused-mut-issue-50343.stderr
@@ -12,5 +12,5 @@ note: the lint level is defined here
LL | #![deny(unused_mut)]
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/user-annotations/ascribed-type-wf.stderr b/tests/ui/nll/user-annotations/ascribed-type-wf.stderr
index 91e7c6b8e..2bd00a51f 100644
--- a/tests/ui/nll/user-annotations/ascribed-type-wf.stderr
+++ b/tests/ui/nll/user-annotations/ascribed-type-wf.stderr
@@ -6,5 +6,5 @@ LL | fn extend<'a>() {
LL | None::<<&'a () as Trait>::Ty>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/user-annotations/cast_static_lifetime.stderr b/tests/ui/nll/user-annotations/cast_static_lifetime.stderr
index 3b9363c41..35eec233e 100644
--- a/tests/ui/nll/user-annotations/cast_static_lifetime.stderr
+++ b/tests/ui/nll/user-annotations/cast_static_lifetime.stderr
@@ -11,6 +11,6 @@ LL | let y: &u32 = (&x) as &'static u32;
LL | }
| - `x` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr b/tests/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr
index c39301588..cf699a3e4 100644
--- a/tests/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr
+++ b/tests/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr
@@ -6,5 +6,5 @@ LL | fn foo<'a>(_: &'a u32) -> &'static u32 {
LL | <Foo<'a>>::C
| ^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/user-annotations/constant-in-expr-normalize.stderr b/tests/ui/nll/user-annotations/constant-in-expr-normalize.stderr
index 541a2cfaf..ee06ac740 100644
--- a/tests/ui/nll/user-annotations/constant-in-expr-normalize.stderr
+++ b/tests/ui/nll/user-annotations/constant-in-expr-normalize.stderr
@@ -6,5 +6,5 @@ LL | fn foo<'a>(_: &'a u32) -> &'static u32 {
LL | <() as Foo<'a>>::C
| ^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/user-annotations/constant-in-expr-trait-item-1.stderr b/tests/ui/nll/user-annotations/constant-in-expr-trait-item-1.stderr
index ea0fcb6d6..02b17a385 100644
--- a/tests/ui/nll/user-annotations/constant-in-expr-trait-item-1.stderr
+++ b/tests/ui/nll/user-annotations/constant-in-expr-trait-item-1.stderr
@@ -6,5 +6,5 @@ LL | fn foo<'a>(_: &'a u32) -> &'static u32 {
LL | <() as Foo<'a>>::C
| ^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/user-annotations/constant-in-expr-trait-item-2.stderr b/tests/ui/nll/user-annotations/constant-in-expr-trait-item-2.stderr
index ff549f1d8..06e4848e7 100644
--- a/tests/ui/nll/user-annotations/constant-in-expr-trait-item-2.stderr
+++ b/tests/ui/nll/user-annotations/constant-in-expr-trait-item-2.stderr
@@ -6,5 +6,5 @@ LL | fn foo<'a, T: Foo<'a>>() -> &'static u32 {
LL | <T as Foo<'a>>::C
| ^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/user-annotations/constant-in-expr-trait-item-3.stderr b/tests/ui/nll/user-annotations/constant-in-expr-trait-item-3.stderr
index 7f160d8e3..754e09fe3 100644
--- a/tests/ui/nll/user-annotations/constant-in-expr-trait-item-3.stderr
+++ b/tests/ui/nll/user-annotations/constant-in-expr-trait-item-3.stderr
@@ -6,5 +6,5 @@ LL | fn foo<'a, T: Foo<'a>>() -> &'static u32 {
LL | T::C
| ^^^^ returning this value requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/user-annotations/dump-adt-brace-struct.stderr b/tests/ui/nll/user-annotations/dump-adt-brace-struct.stderr
index 7809b2470..0cabc02c6 100644
--- a/tests/ui/nll/user-annotations/dump-adt-brace-struct.stderr
+++ b/tests/ui/nll/user-annotations/dump-adt-brace-struct.stderr
@@ -4,5 +4,5 @@ error: user args: UserArgs { args: [&ReStatic u32], user_self_ty: None }
LL | SomeStruct::<&'static u32> { t: &22 };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/user-annotations/inherent-associated-constants.stderr b/tests/ui/nll/user-annotations/inherent-associated-constants.stderr
index ffbfc40f5..c10301528 100644
--- a/tests/ui/nll/user-annotations/inherent-associated-constants.stderr
+++ b/tests/ui/nll/user-annotations/inherent-associated-constants.stderr
@@ -6,5 +6,5 @@ LL | fn non_wf_associated_const<'a>(x: i32) {
LL | A::<'a>::IC;
| ^^^^^^^^^^^ requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/user-annotations/method-ufcs-inherent-1.stderr b/tests/ui/nll/user-annotations/method-ufcs-inherent-1.stderr
index fb26b8d09..2d2397456 100644
--- a/tests/ui/nll/user-annotations/method-ufcs-inherent-1.stderr
+++ b/tests/ui/nll/user-annotations/method-ufcs-inherent-1.stderr
@@ -14,6 +14,6 @@ LL |
LL | }
| - `v` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/user-annotations/method-ufcs-inherent-3.stderr b/tests/ui/nll/user-annotations/method-ufcs-inherent-3.stderr
index 69dd1d1aa..99d57902d 100644
--- a/tests/ui/nll/user-annotations/method-ufcs-inherent-3.stderr
+++ b/tests/ui/nll/user-annotations/method-ufcs-inherent-3.stderr
@@ -14,6 +14,6 @@ LL |
LL | }
| - `v` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/user-annotations/promoted-annotation.stderr b/tests/ui/nll/user-annotations/promoted-annotation.stderr
index 132a00ba4..ca99e5318 100644
--- a/tests/ui/nll/user-annotations/promoted-annotation.stderr
+++ b/tests/ui/nll/user-annotations/promoted-annotation.stderr
@@ -13,6 +13,6 @@ LL |
LL | }
| - `x` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/user-annotations/type_ascription_static_lifetime.stderr b/tests/ui/nll/user-annotations/type_ascription_static_lifetime.stderr
index 766877f88..3e2706309 100644
--- a/tests/ui/nll/user-annotations/type_ascription_static_lifetime.stderr
+++ b/tests/ui/nll/user-annotations/type_ascription_static_lifetime.stderr
@@ -11,6 +11,6 @@ LL | let y: &u32 = type_ascribe!(&x, &'static u32);
LL | }
| - `x` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/user-annotations/wf-self-type.stderr b/tests/ui/nll/user-annotations/wf-self-type.stderr
index 1d3ae7cfb..dfc5410b7 100644
--- a/tests/ui/nll/user-annotations/wf-self-type.stderr
+++ b/tests/ui/nll/user-annotations/wf-self-type.stderr
@@ -10,5 +10,5 @@ LL | Foo::xmute(u)
|
= help: consider adding the following bound: `'b: 'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/where_clauses_in_functions.stderr b/tests/ui/nll/where_clauses_in_functions.stderr
index afb25e3bc..41d7e6237 100644
--- a/tests/ui/nll/where_clauses_in_functions.stderr
+++ b/tests/ui/nll/where_clauses_in_functions.stderr
@@ -10,5 +10,5 @@ LL | foo(x, y)
|
= help: consider adding the following bound: `'a: 'b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/nll/where_clauses_in_structs.stderr b/tests/ui/nll/where_clauses_in_structs.stderr
index c46cfcb41..4cc7e5ab1 100644
--- a/tests/ui/nll/where_clauses_in_structs.stderr
+++ b/tests/ui/nll/where_clauses_in_structs.stderr
@@ -13,5 +13,5 @@ LL | Foo { x, y };
= note: the struct `Cell<T>` is invariant over the parameter `T`
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/no-capture-arc.stderr b/tests/ui/no-capture-arc.stderr
index 296e1fb3f..38432c851 100644
--- a/tests/ui/no-capture-arc.stderr
+++ b/tests/ui/no-capture-arc.stderr
@@ -14,6 +14,6 @@ LL | assert_eq!((*arc_v)[2], 3);
|
= note: borrow occurs due to deref coercion to `Vec<i32>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/no-link-unknown-crate.stderr b/tests/ui/no-link-unknown-crate.stderr
index 068c7139e..edc248db0 100644
--- a/tests/ui/no-link-unknown-crate.stderr
+++ b/tests/ui/no-link-unknown-crate.stderr
@@ -4,6 +4,6 @@ error[E0463]: can't find crate for `doesnt_exist`
LL | extern crate doesnt_exist;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0463`.
diff --git a/tests/ui/no-reuse-move-arc.stderr b/tests/ui/no-reuse-move-arc.stderr
index bcd481c33..cdeb6eadc 100644
--- a/tests/ui/no-reuse-move-arc.stderr
+++ b/tests/ui/no-reuse-move-arc.stderr
@@ -14,6 +14,6 @@ LL | assert_eq!((*arc_v)[2], 3);
|
= note: borrow occurs due to deref coercion to `Vec<i32>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/no-send-res-ports.stderr b/tests/ui/no-send-res-ports.stderr
index 33446e9d1..9c30261e5 100644
--- a/tests/ui/no-send-res-ports.stderr
+++ b/tests/ui/no-send-res-ports.stderr
@@ -32,6 +32,6 @@ LL | thread::spawn(move|| {
note: required by a bound in `spawn`
--> $SRC_DIR/std/src/thread/mod.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/no_crate_type.stderr b/tests/ui/no_crate_type.stderr
index 93da7c3e0..85d8f87af 100644
--- a/tests/ui/no_crate_type.stderr
+++ b/tests/ui/no_crate_type.stderr
@@ -4,5 +4,5 @@ error: malformed `crate_type` attribute input
LL | #![crate_type]
| ^^^^^^^^^^^^^^ help: must be of the form: `#![crate_type = "bin|lib|..."]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/no_send-enum.stderr b/tests/ui/no_send-enum.stderr
index b5a14b551..3b66c7db5 100644
--- a/tests/ui/no_send-enum.stderr
+++ b/tests/ui/no_send-enum.stderr
@@ -18,6 +18,6 @@ note: required by a bound in `bar`
LL | fn bar<T: Send>(_: T) {}
| ^^^^ required by this bound in `bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/no_send-rc.stderr b/tests/ui/no_send-rc.stderr
index ce25da559..353416787 100644
--- a/tests/ui/no_send-rc.stderr
+++ b/tests/ui/no_send-rc.stderr
@@ -13,6 +13,6 @@ note: required by a bound in `bar`
LL | fn bar<T: Send>(_: T) {}
| ^^^^ required by this bound in `bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/no_share-enum.stderr b/tests/ui/no_share-enum.stderr
index 5b453e0da..89939216d 100644
--- a/tests/ui/no_share-enum.stderr
+++ b/tests/ui/no_share-enum.stderr
@@ -18,6 +18,6 @@ note: required by a bound in `bar`
LL | fn bar<T: Sync>(_: T) {}
| ^^^^ required by this bound in `bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/no_share-struct.stderr b/tests/ui/no_share-struct.stderr
index 9ce3a318f..9c7a921b8 100644
--- a/tests/ui/no_share-struct.stderr
+++ b/tests/ui/no_share-struct.stderr
@@ -13,6 +13,6 @@ note: required by a bound in `bar`
LL | fn bar<T: Sync>(_: T) {}
| ^^^^ required by this bound in `bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/noexporttypeexe.stderr b/tests/ui/noexporttypeexe.stderr
index bf88ceaa5..59759b696 100644
--- a/tests/ui/noexporttypeexe.stderr
+++ b/tests/ui/noexporttypeexe.stderr
@@ -13,6 +13,6 @@ help: consider using `Option::expect` to unwrap the `Option<isize>` value, panic
LL | let x: isize = noexporttypelib::foo().expect("REASON");
| +++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/non-constant-expr-for-arr-len.stderr b/tests/ui/non-constant-expr-for-arr-len.stderr
index d684b8eaa..c9f977fba 100644
--- a/tests/ui/non-constant-expr-for-arr-len.stderr
+++ b/tests/ui/non-constant-expr-for-arr-len.stderr
@@ -6,6 +6,6 @@ LL | fn bar(n: usize) {
LL | let _x = [0; n];
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0435`.
diff --git a/tests/ui/non-copyable-void.stderr b/tests/ui/non-copyable-void.stderr
index 99af04e7c..bef1e1077 100644
--- a/tests/ui/non-copyable-void.stderr
+++ b/tests/ui/non-copyable-void.stderr
@@ -4,6 +4,6 @@ error[E0599]: no method named `clone` found for enum `c_void` in the current sco
LL | let _z = (*y).clone();
| ^^^^^ method not found in `c_void`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/noncopyable-class.stderr b/tests/ui/noncopyable-class.stderr
index 0c696163a..b8f7276c8 100644
--- a/tests/ui/noncopyable-class.stderr
+++ b/tests/ui/noncopyable-class.stderr
@@ -11,6 +11,6 @@ LL | let _y = x.clone();
= note: the following trait defines an item `clone`, perhaps you need to implement it:
candidate #1: `Clone`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/nonscalar-cast.stderr b/tests/ui/nonscalar-cast.stderr
index 2a7037121..01b4a9a7c 100644
--- a/tests/ui/nonscalar-cast.stderr
+++ b/tests/ui/nonscalar-cast.stderr
@@ -6,6 +6,6 @@ LL | println!("{}", Foo { x: 1 } as isize);
|
= note: an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0605`.
diff --git a/tests/ui/not-clone-closure.stderr b/tests/ui/not-clone-closure.stderr
index 17cf938d1..783c165ee 100644
--- a/tests/ui/not-clone-closure.stderr
+++ b/tests/ui/not-clone-closure.stderr
@@ -18,6 +18,6 @@ LL + #[derive(Clone)]
LL | struct S(i32);
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/not-copy-closure.stderr b/tests/ui/not-copy-closure.stderr
index 93e011cce..50e25a24d 100644
--- a/tests/ui/not-copy-closure.stderr
+++ b/tests/ui/not-copy-closure.stderr
@@ -16,6 +16,6 @@ help: consider mutably borrowing `hello`
LL | let b = &mut hello;
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/not-panic/not-panic-safe-5.stderr b/tests/ui/not-panic/not-panic-safe-5.stderr
index cb78370b4..fbbd81d6d 100644
--- a/tests/ui/not-panic/not-panic-safe-5.stderr
+++ b/tests/ui/not-panic/not-panic-safe-5.stderr
@@ -12,6 +12,6 @@ note: required by a bound in `assert`
LL | fn assert<T: UnwindSafe + ?Sized>() {}
| ^^^^^^^^^^ required by this bound in `assert`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/not-panic/not-panic-safe.stderr b/tests/ui/not-panic/not-panic-safe.stderr
index 37a6aee39..cd792eff9 100644
--- a/tests/ui/not-panic/not-panic-safe.stderr
+++ b/tests/ui/not-panic/not-panic-safe.stderr
@@ -17,6 +17,6 @@ LL - assert::<&mut &mut &i32>();
LL + assert::<&i32>();
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/numbers-arithmetic/issue-105626.rs b/tests/ui/numbers-arithmetic/issue-105626.rs
index f97edd510..5466f8e18 100644
--- a/tests/ui/numbers-arithmetic/issue-105626.rs
+++ b/tests/ui/numbers-arithmetic/issue-105626.rs
@@ -1,6 +1,5 @@
// run-pass
// only-x86
-// min-system-llvm-version: 16
// compile-flags: -Ctarget-feature=+sse2
use std::hint::black_box;
diff --git a/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs b/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs
new file mode 100644
index 000000000..2c4bdad3e
--- /dev/null
+++ b/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs
@@ -0,0 +1,8 @@
+// run-fail
+// ignore-wasm32
+// error-pattern:location-add-assign-overflow.rs
+
+fn main() {
+ let mut a: u8 = 255;
+ a += &1;
+}
diff --git a/tests/ui/numbers-arithmetic/location-add-overflow.rs b/tests/ui/numbers-arithmetic/location-add-overflow.rs
new file mode 100644
index 000000000..085623c9b
--- /dev/null
+++ b/tests/ui/numbers-arithmetic/location-add-overflow.rs
@@ -0,0 +1,7 @@
+// run-fail
+// ignore-wasm32
+// error-pattern:location-add-overflow.rs
+
+fn main() {
+ let _: u8 = 255 + &1;
+}
diff --git a/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs b/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs
new file mode 100644
index 000000000..21b5e7a81
--- /dev/null
+++ b/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs
@@ -0,0 +1,8 @@
+// run-fail
+// ignore-wasm32
+// error-pattern:location-divide-assign-by-zero.rs
+
+fn main() {
+ let mut a = 1;
+ a /= &0;
+}
diff --git a/tests/ui/numbers-arithmetic/location-divide-by-zero.rs b/tests/ui/numbers-arithmetic/location-divide-by-zero.rs
new file mode 100644
index 000000000..7d045fc56
--- /dev/null
+++ b/tests/ui/numbers-arithmetic/location-divide-by-zero.rs
@@ -0,0 +1,9 @@
+// run-fail
+// ignore-wasm32
+// error-pattern:location-divide-by-zero.rs
+
+// https://github.com/rust-lang/rust/issues/114814
+
+fn main() {
+ let _ = 1 / &0;
+}
diff --git a/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs b/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs
new file mode 100644
index 000000000..88d602e4b
--- /dev/null
+++ b/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs
@@ -0,0 +1,8 @@
+// run-fail
+// ignore-wasm32
+// error-pattern:location-mod-assign-by-zero.rs
+
+fn main() {
+ let mut a = 1;
+ a %= &0;
+}
diff --git a/tests/ui/numbers-arithmetic/location-mod-by-zero.rs b/tests/ui/numbers-arithmetic/location-mod-by-zero.rs
new file mode 100644
index 000000000..4397adb75
--- /dev/null
+++ b/tests/ui/numbers-arithmetic/location-mod-by-zero.rs
@@ -0,0 +1,7 @@
+// run-fail
+// ignore-wasm32
+// error-pattern:location-mod-by-zero.rs
+
+fn main() {
+ let _ = 1 % &0;
+}
diff --git a/tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs b/tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs
new file mode 100644
index 000000000..b042751de
--- /dev/null
+++ b/tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs
@@ -0,0 +1,8 @@
+// run-fail
+// ignore-wasm32
+// error-pattern:location-mul-assign-overflow.rs
+
+fn main() {
+ let mut a: u8 = 255;
+ a *= &2;
+}
diff --git a/tests/ui/numbers-arithmetic/location-mul-overflow.rs b/tests/ui/numbers-arithmetic/location-mul-overflow.rs
new file mode 100644
index 000000000..6dd588748
--- /dev/null
+++ b/tests/ui/numbers-arithmetic/location-mul-overflow.rs
@@ -0,0 +1,7 @@
+// run-fail
+// ignore-wasm32
+// error-pattern:location-mul-overflow.rs
+
+fn main() {
+ let _: u8 = 255 * &2;
+}
diff --git a/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs b/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs
new file mode 100644
index 000000000..5b92ada2e
--- /dev/null
+++ b/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs
@@ -0,0 +1,8 @@
+// run-fail
+// ignore-wasm32
+// error-pattern:location-sub-assign-overflow.rs
+
+fn main() {
+ let mut a: u8 = 0;
+ a -= &1;
+}
diff --git a/tests/ui/numbers-arithmetic/location-sub-overflow.rs b/tests/ui/numbers-arithmetic/location-sub-overflow.rs
new file mode 100644
index 000000000..2d77cb8f5
--- /dev/null
+++ b/tests/ui/numbers-arithmetic/location-sub-overflow.rs
@@ -0,0 +1,7 @@
+// run-fail
+// ignore-wasm32
+// error-pattern:location-sub-overflow.rs
+
+fn main() {
+ let _: u8 = 0 - &1;
+}
diff --git a/tests/ui/numbers-arithmetic/overflowing-lsh-1.stderr b/tests/ui/numbers-arithmetic/overflowing-lsh-1.stderr
index 434c9d5b4..5d2c4a6c8 100644
--- a/tests/ui/numbers-arithmetic/overflowing-lsh-1.stderr
+++ b/tests/ui/numbers-arithmetic/overflowing-lsh-1.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(arithmetic_overflow)]
| ^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/numbers-arithmetic/overflowing-lsh-2.stderr b/tests/ui/numbers-arithmetic/overflowing-lsh-2.stderr
index c3b44e5a0..8ac72aefe 100644
--- a/tests/ui/numbers-arithmetic/overflowing-lsh-2.stderr
+++ b/tests/ui/numbers-arithmetic/overflowing-lsh-2.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(arithmetic_overflow)]
| ^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/numbers-arithmetic/overflowing-lsh-3.stderr b/tests/ui/numbers-arithmetic/overflowing-lsh-3.stderr
index 9d6479bd7..43d541b03 100644
--- a/tests/ui/numbers-arithmetic/overflowing-lsh-3.stderr
+++ b/tests/ui/numbers-arithmetic/overflowing-lsh-3.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(arithmetic_overflow)]
| ^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/numbers-arithmetic/overflowing-lsh-4.stderr b/tests/ui/numbers-arithmetic/overflowing-lsh-4.stderr
index 2bb5b6a6d..00a358106 100644
--- a/tests/ui/numbers-arithmetic/overflowing-lsh-4.stderr
+++ b/tests/ui/numbers-arithmetic/overflowing-lsh-4.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(arithmetic_overflow)]
| ^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/numbers-arithmetic/overflowing-rsh-1.stderr b/tests/ui/numbers-arithmetic/overflowing-rsh-1.stderr
index b2b3114d1..62763e9e1 100644
--- a/tests/ui/numbers-arithmetic/overflowing-rsh-1.stderr
+++ b/tests/ui/numbers-arithmetic/overflowing-rsh-1.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(arithmetic_overflow)]
| ^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/numbers-arithmetic/overflowing-rsh-2.stderr b/tests/ui/numbers-arithmetic/overflowing-rsh-2.stderr
index ad18c3bb7..519e62fef 100644
--- a/tests/ui/numbers-arithmetic/overflowing-rsh-2.stderr
+++ b/tests/ui/numbers-arithmetic/overflowing-rsh-2.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(arithmetic_overflow)]
| ^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/numbers-arithmetic/overflowing-rsh-3.stderr b/tests/ui/numbers-arithmetic/overflowing-rsh-3.stderr
index 37d02e09d..de24ea1fc 100644
--- a/tests/ui/numbers-arithmetic/overflowing-rsh-3.stderr
+++ b/tests/ui/numbers-arithmetic/overflowing-rsh-3.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(arithmetic_overflow)]
| ^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/numbers-arithmetic/overflowing-rsh-4.stderr b/tests/ui/numbers-arithmetic/overflowing-rsh-4.stderr
index 692602c07..47588012f 100644
--- a/tests/ui/numbers-arithmetic/overflowing-rsh-4.stderr
+++ b/tests/ui/numbers-arithmetic/overflowing-rsh-4.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(arithmetic_overflow)]
| ^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/numbers-arithmetic/overflowing-rsh-5.stderr b/tests/ui/numbers-arithmetic/overflowing-rsh-5.stderr
index e3b5859df..e9a1572d3 100644
--- a/tests/ui/numbers-arithmetic/overflowing-rsh-5.stderr
+++ b/tests/ui/numbers-arithmetic/overflowing-rsh-5.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(arithmetic_overflow)]
| ^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/numbers-arithmetic/overflowing-rsh-6.stderr b/tests/ui/numbers-arithmetic/overflowing-rsh-6.stderr
index a3475c04c..005f73782 100644
--- a/tests/ui/numbers-arithmetic/overflowing-rsh-6.stderr
+++ b/tests/ui/numbers-arithmetic/overflowing-rsh-6.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(arithmetic_overflow)]
| ^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/numeric/len.stderr b/tests/ui/numeric/len.stderr
index 55a61b5e4..7b20d35c8 100644
--- a/tests/ui/numeric/len.stderr
+++ b/tests/ui/numeric/len.stderr
@@ -16,6 +16,6 @@ help: you can convert a `usize` to a `u32` and panic if the converted value does
LL | test(array.len().try_into().unwrap());
| ++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic1.stderr b/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic1.stderr
index f06a9da1d..8d44b4de5 100644
--- a/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic1.stderr
+++ b/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic1.stderr
@@ -4,6 +4,6 @@ error[E0228]: the lifetime bound for this object type cannot be deduced from con
LL | fn bar<'a>(x: &'a str) -> &'a dyn Foo<'a, Item = dyn Bar> { &() }
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0228`.
diff --git a/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic2.stderr b/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic2.stderr
index 51d8450af..0846dd607 100644
--- a/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic2.stderr
+++ b/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic2.stderr
@@ -4,6 +4,6 @@ error[E0228]: the lifetime bound for this object type cannot be deduced from con
LL | fn bar<'a>(x: &'a str) -> &'a dyn Foo<'a, Item = dyn Bar> { &() }
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0228`.
diff --git a/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic3.stderr b/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic3.stderr
index f721bf394..688f8af08 100644
--- a/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic3.stderr
+++ b/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic3.stderr
@@ -4,6 +4,6 @@ error[E0228]: the lifetime bound for this object type cannot be deduced from con
LL | fn bar(x: &str) -> &dyn Foo<Item = dyn Bar> { &() }
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0228`.
diff --git a/tests/ui/object-lifetime/object-lifetime-default-elision.stderr b/tests/ui/object-lifetime/object-lifetime-default-elision.stderr
index 61e96f59f..b59956879 100644
--- a/tests/ui/object-lifetime/object-lifetime-default-elision.stderr
+++ b/tests/ui/object-lifetime/object-lifetime-default-elision.stderr
@@ -11,5 +11,5 @@ LL | ss
|
= help: consider adding the following bound: `'a: 'b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr
index 7d6f9f39d..b49e506a1 100644
--- a/tests/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr
+++ b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr
@@ -6,5 +6,5 @@ LL | fn c<'a>(t: &'a Box<dyn Test+'a>, mut ss: SomeStruct<'a>) {
LL | ss.t = t;
| ^^^^^^^^ assignment requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr
index 2bc8e0978..9e2422fdc 100644
--- a/tests/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr
+++ b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr
@@ -6,5 +6,5 @@ LL | fn c<'a>(t: &'a MyBox<dyn Test+'a>, mut ss: SomeStruct<'a>) {
LL | ss.t = t;
| ^^^^^^^^ assignment requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.stderr b/tests/ui/object-safety/assoc_type_bounds_implicit_sized.stderr
index 110e71507..cd2aa9fdb 100644
--- a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.stderr
+++ b/tests/ui/object-safety/assoc_type_bounds_implicit_sized.stderr
@@ -15,6 +15,6 @@ help: consider relaxing the implicit `Sized` restriction
LL | type Item: ?Sized;
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/object-safety/call-when-assoc-ty-is-sized.rs b/tests/ui/object-safety/call-when-assoc-ty-is-sized.rs
index 0b30a88fd..21dda7b8c 100644
--- a/tests/ui/object-safety/call-when-assoc-ty-is-sized.rs
+++ b/tests/ui/object-safety/call-when-assoc-ty-is-sized.rs
@@ -1,6 +1,6 @@
// check-pass
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
trait Foo {
type Bar<'a>
diff --git a/tests/ui/object-safety/issue-102762.stderr b/tests/ui/object-safety/issue-102762.stderr
index 5041ebe77..2215ec677 100644
--- a/tests/ui/object-safety/issue-102762.stderr
+++ b/tests/ui/object-safety/issue-102762.stderr
@@ -15,6 +15,6 @@ LL | pub trait Fetcher: Send + Sync {
LL | fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>> + 'a>>
| ^^^^^^^^^^^^^ ...because method `get`'s `self` parameter cannot be dispatched on
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/object-safety/object-safety-associated-consts.curr.stderr b/tests/ui/object-safety/object-safety-associated-consts.curr.stderr
index 5f94c9284..462d3d95f 100644
--- a/tests/ui/object-safety/object-safety-associated-consts.curr.stderr
+++ b/tests/ui/object-safety/object-safety-associated-consts.curr.stderr
@@ -13,6 +13,6 @@ LL | const X: usize;
| ^ ...because it contains this associated `const`
= help: consider moving `X` to another trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/object-safety/object-safety-associated-consts.object_safe_for_dispatch.stderr b/tests/ui/object-safety/object-safety-associated-consts.object_safe_for_dispatch.stderr
index db3e0885a..d0c78f9cd 100644
--- a/tests/ui/object-safety/object-safety-associated-consts.object_safe_for_dispatch.stderr
+++ b/tests/ui/object-safety/object-safety-associated-consts.object_safe_for_dispatch.stderr
@@ -14,6 +14,6 @@ LL | const X: usize;
= help: consider moving `X` to another trait
= note: required for the cast from `&T` to `&dyn Bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/object-safety/object-safety-bounds.stderr b/tests/ui/object-safety/object-safety-bounds.stderr
index 29ffb5448..bf3c055f4 100644
--- a/tests/ui/object-safety/object-safety-bounds.stderr
+++ b/tests/ui/object-safety/object-safety-bounds.stderr
@@ -12,6 +12,6 @@ LL | trait X {
LL | type U: PartialEq<Self>;
| ^^^^^^^^^^^^^^^ ...because it uses `Self` as a type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/object-safety/object-safety-by-value-self-use.stderr b/tests/ui/object-safety/object-safety-by-value-self-use.stderr
index 17f4cb4d4..1701f6059 100644
--- a/tests/ui/object-safety/object-safety-by-value-self-use.stderr
+++ b/tests/ui/object-safety/object-safety-by-value-self-use.stderr
@@ -4,6 +4,6 @@ error[E0161]: cannot move a value of type `dyn Bar`
LL | t.bar()
| ^ the size of `dyn Bar` cannot be statically determined
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0161`.
diff --git a/tests/ui/object-safety/object-safety-issue-22040.stderr b/tests/ui/object-safety/object-safety-issue-22040.stderr
index 2e59d88bd..c9c1437a2 100644
--- a/tests/ui/object-safety/object-safety-issue-22040.stderr
+++ b/tests/ui/object-safety/object-safety-issue-22040.stderr
@@ -13,6 +13,6 @@ LL | trait Expr: Debug + PartialEq {
| this trait cannot be made into an object...
= help: only type `SExpr<'x>` implements the trait, consider using it directly instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/object-safety/object-safety-no-static.curr.stderr b/tests/ui/object-safety/object-safety-no-static.curr.stderr
index b40470b45..c9e076c65 100644
--- a/tests/ui/object-safety/object-safety-no-static.curr.stderr
+++ b/tests/ui/object-safety/object-safety-no-static.curr.stderr
@@ -21,6 +21,6 @@ help: alternatively, consider constraining `foo` so it does not apply to trait o
LL | fn foo() where Self: Sized {}
| +++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr b/tests/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr
index 1eae9a9b9..e155a350f 100644
--- a/tests/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr
+++ b/tests/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr
@@ -22,6 +22,6 @@ help: alternatively, consider constraining `foo` so it does not apply to trait o
LL | fn foo() where Self: Sized {}
| +++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/object-safety/object-safety-sized-2.curr.stderr b/tests/ui/object-safety/object-safety-sized-2.curr.stderr
index b01926412..7b91c4d66 100644
--- a/tests/ui/object-safety/object-safety-sized-2.curr.stderr
+++ b/tests/ui/object-safety/object-safety-sized-2.curr.stderr
@@ -12,6 +12,6 @@ LL | trait Bar
LL | where Self : Sized
| ^^^^^ ...because it requires `Self: Sized`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/object-safety/object-safety-sized-2.object_safe_for_dispatch.stderr b/tests/ui/object-safety/object-safety-sized-2.object_safe_for_dispatch.stderr
index 90e5c59dd..69af9bfe9 100644
--- a/tests/ui/object-safety/object-safety-sized-2.object_safe_for_dispatch.stderr
+++ b/tests/ui/object-safety/object-safety-sized-2.object_safe_for_dispatch.stderr
@@ -13,6 +13,6 @@ LL | where Self : Sized
| ^^^^^ ...because it requires `Self: Sized`
= note: required for the cast from `&T` to `&dyn Bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/object-safety/object-safety-sized.curr.stderr b/tests/ui/object-safety/object-safety-sized.curr.stderr
index 974813121..66b523974 100644
--- a/tests/ui/object-safety/object-safety-sized.curr.stderr
+++ b/tests/ui/object-safety/object-safety-sized.curr.stderr
@@ -12,6 +12,6 @@ LL | trait Bar : Sized {
| |
| this trait cannot be made into an object...
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/object-safety/object-safety-sized.object_safe_for_dispatch.stderr b/tests/ui/object-safety/object-safety-sized.object_safe_for_dispatch.stderr
index a6c22b874..1d0ffcffd 100644
--- a/tests/ui/object-safety/object-safety-sized.object_safe_for_dispatch.stderr
+++ b/tests/ui/object-safety/object-safety-sized.object_safe_for_dispatch.stderr
@@ -13,6 +13,6 @@ LL | trait Bar : Sized {
| this trait cannot be made into an object...
= note: required for the cast from `&T` to `&dyn Bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/object-safety/object-safety-supertrait-mentions-Self.stderr b/tests/ui/object-safety/object-safety-supertrait-mentions-Self.stderr
index a106ab995..08df06927 100644
--- a/tests/ui/object-safety/object-safety-supertrait-mentions-Self.stderr
+++ b/tests/ui/object-safety/object-safety-supertrait-mentions-Self.stderr
@@ -12,6 +12,6 @@ LL | trait Baz : Bar<Self> {
| |
| this trait cannot be made into an object...
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/occurs-check-2.stderr b/tests/ui/occurs-check-2.stderr
index b68c3fa5b..7b6fb9faf 100644
--- a/tests/ui/occurs-check-2.stderr
+++ b/tests/ui/occurs-check-2.stderr
@@ -9,6 +9,6 @@ help: consider unboxing the value
LL | f = *Box::new(g);
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/occurs-check-3.stderr b/tests/ui/occurs-check-3.stderr
index 04c404d54..675133b6d 100644
--- a/tests/ui/occurs-check-3.stderr
+++ b/tests/ui/occurs-check-3.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | fn main() { let c; c = Clam::A(c); match c { Clam::A::<isize>(_) => { } } }
| ^^^^^^^^^^ cyclic type of infinite size
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/occurs-check.stderr b/tests/ui/occurs-check.stderr
index fdbbdc3ab..1cb6b32cb 100644
--- a/tests/ui/occurs-check.stderr
+++ b/tests/ui/occurs-check.stderr
@@ -9,6 +9,6 @@ help: consider unboxing the value
LL | f = *Box::new(f);
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/offset-of/offset-of-inference.stderr b/tests/ui/offset-of/offset-of-inference.stderr
index 2a520f6f9..1845822f1 100644
--- a/tests/ui/offset-of/offset-of-inference.stderr
+++ b/tests/ui/offset-of/offset-of-inference.stderr
@@ -4,6 +4,6 @@ error[E0282]: type annotations needed
LL | let _ = core::mem::offset_of!(Foo<_>, x);
| ^^^^^^ cannot infer type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/offset-of/offset-of-self.stderr b/tests/ui/offset-of/offset-of-self.stderr
index df555463f..2dc17189a 100644
--- a/tests/ui/offset-of/offset-of-self.stderr
+++ b/tests/ui/offset-of/offset-of-self.stderr
@@ -54,6 +54,8 @@ error[E0609]: no field `Self` on type `S`
|
LL | offset_of!(S, Self);
| ^^^^
+ |
+ = note: available fields are: `v`, `w`
error[E0616]: field `v` of struct `T` is private
--> $DIR/offset-of-self.rs:41:30
@@ -66,6 +68,8 @@ error[E0609]: no field `self` on type `S`
|
LL | offset_of!(S, self);
| ^^^^
+ |
+ = note: available fields are: `v`, `w`
error[E0609]: no field `self` on type `u8`
--> $DIR/offset-of-self.rs:56:21
diff --git a/tests/ui/on-unimplemented/expected-comma-found-token.stderr b/tests/ui/on-unimplemented/expected-comma-found-token.stderr
index 048b72ee3..7c0874e36 100644
--- a/tests/ui/on-unimplemented/expected-comma-found-token.stderr
+++ b/tests/ui/on-unimplemented/expected-comma-found-token.stderr
@@ -6,5 +6,5 @@ LL | message="the message"
LL | label="the label"
| ^^^^^ unexpected token
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/on-unimplemented/feature-gate-on-unimplemented.stderr b/tests/ui/on-unimplemented/feature-gate-on-unimplemented.stderr
index a4b33963f..45ef22f44 100644
--- a/tests/ui/on-unimplemented/feature-gate-on-unimplemented.stderr
+++ b/tests/ui/on-unimplemented/feature-gate-on-unimplemented.stderr
@@ -6,6 +6,6 @@ LL | #[rustc_on_unimplemented = "test error `{Self}` with `{Bar}`"]
|
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/on-unimplemented/impl-substs.stderr b/tests/ui/on-unimplemented/impl-substs.stderr
index 36d80f3e6..e2ba2474d 100644
--- a/tests/ui/on-unimplemented/impl-substs.stderr
+++ b/tests/ui/on-unimplemented/impl-substs.stderr
@@ -10,6 +10,6 @@ LL | Foo::<usize>::foo((1i32, 1i32, 1i32));
= help: the trait `Foo<i32>` is implemented for `(i32, i32, i32)`
= help: for that trait implementation, expected `i32`, found `usize`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/on-unimplemented/issue-104140.stderr b/tests/ui/on-unimplemented/issue-104140.stderr
index ddb1f50f0..4ba5475d9 100644
--- a/tests/ui/on-unimplemented/issue-104140.stderr
+++ b/tests/ui/on-unimplemented/issue-104140.stderr
@@ -11,5 +11,5 @@ LL | #[rustc_on_unimplemented = "message"]
LL | #[rustc_on_unimplemented(/*opt*/ message = "...", /*opt*/ label = "...", /*opt*/ note = "...")]
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/once-cant-call-twice-on-heap.stderr b/tests/ui/once-cant-call-twice-on-heap.stderr
index 335ac6338..33dd840db 100644
--- a/tests/ui/once-cant-call-twice-on-heap.stderr
+++ b/tests/ui/once-cant-call-twice-on-heap.stderr
@@ -18,6 +18,6 @@ help: consider further restricting this bound
LL | fn foo<F:FnOnce() + Copy>(blk: F) {
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/operator-recovery/less-than-greater-than.stderr b/tests/ui/operator-recovery/less-than-greater-than.stderr
index 80c921535..21b2e77db 100644
--- a/tests/ui/operator-recovery/less-than-greater-than.stderr
+++ b/tests/ui/operator-recovery/less-than-greater-than.stderr
@@ -4,5 +4,5 @@ error: invalid comparison operator `<>`
LL | println!("{}", 1 <> 2);
| ^^ help: `<>` is not a valid comparison operator, use `!=`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/operator-recovery/spaceship.stderr b/tests/ui/operator-recovery/spaceship.stderr
index ed6bd74c9..46a81db62 100644
--- a/tests/ui/operator-recovery/spaceship.stderr
+++ b/tests/ui/operator-recovery/spaceship.stderr
@@ -4,5 +4,5 @@ error: invalid comparison operator `<=>`
LL | println!("{}", 1 <=> 2);
| ^^^ `<=>` is not a valid comparison operator, use `std::cmp::Ordering`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/or-patterns/exhaustiveness-pass.rs b/tests/ui/or-patterns/exhaustiveness-pass.rs
index 428b9a19f..a52e08c50 100644
--- a/tests/ui/or-patterns/exhaustiveness-pass.rs
+++ b/tests/ui/or-patterns/exhaustiveness-pass.rs
@@ -35,6 +35,17 @@ fn main() {
((0, 0) | (1, 0),) => {}
_ => {}
}
+ match ((0, 0),) {
+ // Note how the second one would be redundant without the guard.
+ ((x, y) | (y, x),) if x == 0 => {}
+ _ => {}
+ }
+ match 0 {
+ // We don't warn the second one as redundant in general because of cases like the one above.
+ // We could technically do it if there are no bindings.
+ 0 | 0 if 0 == 0 => {}
+ _ => {}
+ }
// This one caused ICE https://github.com/rust-lang/rust/issues/117378
match (0u8, 0) {
diff --git a/tests/ui/or-patterns/exhaustiveness-unreachable-pattern.rs b/tests/ui/or-patterns/exhaustiveness-unreachable-pattern.rs
index 8429799ca..20a8d7549 100644
--- a/tests/ui/or-patterns/exhaustiveness-unreachable-pattern.rs
+++ b/tests/ui/or-patterns/exhaustiveness-unreachable-pattern.rs
@@ -1,6 +1,7 @@
#![deny(unreachable_patterns)]
// We wrap patterns in a tuple because top-level or-patterns were special-cased.
+#[rustfmt::skip]
fn main() {
match (0u8,) {
(1 | 2,) => {}
@@ -73,6 +74,11 @@ fn main() {
| 0] => {} //~ ERROR unreachable
_ => {}
}
+ match (true, 0) {
+ (true, 0 | 0) => {} //~ ERROR unreachable
+ (_, 0 | 0) => {} //~ ERROR unreachable
+ _ => {}
+ }
match &[][..] {
[0] => {}
[0, _] => {}
@@ -149,4 +155,8 @@ fn main() {
| true, //~ ERROR unreachable
false | true) => {}
}
+ match (true, true) {
+ (x, y)
+ | (y, x) => {} //~ ERROR unreachable
+ }
}
diff --git a/tests/ui/or-patterns/exhaustiveness-unreachable-pattern.stderr b/tests/ui/or-patterns/exhaustiveness-unreachable-pattern.stderr
index 3f7d47dcb..3616dda99 100644
--- a/tests/ui/or-patterns/exhaustiveness-unreachable-pattern.stderr
+++ b/tests/ui/or-patterns/exhaustiveness-unreachable-pattern.stderr
@@ -1,5 +1,5 @@
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:7:9
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:8:9
|
LL | (1,) => {}
| ^^^^
@@ -11,128 +11,140 @@ LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:12:9
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:13:9
|
LL | (2,) => {}
| ^^^^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:18:9
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:19:9
|
LL | (1 | 2,) => {}
| ^^^^^^^^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:23:9
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:24:9
|
LL | (1, 3) => {}
| ^^^^^^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:24:9
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:25:9
|
LL | (1, 4) => {}
| ^^^^^^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:25:9
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:26:9
|
LL | (2, 4) => {}
| ^^^^^^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:26:9
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:27:9
|
LL | (2 | 1, 4) => {}
| ^^^^^^^^^^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:28:9
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:29:9
|
LL | (1, 4 | 5) => {}
| ^^^^^^^^^^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:36:9
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:37:9
|
LL | (Some(1),) => {}
| ^^^^^^^^^^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:37:9
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:38:9
|
LL | (None,) => {}
| ^^^^^^^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:42:9
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:43:9
|
LL | ((1..=4,),) => {}
| ^^^^^^^^^^^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:47:14
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:48:14
|
LL | (1 | 1,) => {}
| ^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:51:19
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:52:19
|
LL | (0 | 1) | 1 => {}
| ^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:57:14
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:58:14
|
LL | 0 | (0 | 0) => {}
| ^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:57:18
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:58:18
|
LL | 0 | (0 | 0) => {}
| ^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:65:13
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:66:13
|
LL | / Some(
LL | | 0 | 0) => {}
| |______________________^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:71:15
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:72:15
|
LL | | 0
| ^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:73:15
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:74:15
|
LL | | 0] => {}
| ^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:81:10
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:78:20
+ |
+LL | (true, 0 | 0) => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:79:17
+ |
+LL | (_, 0 | 0) => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:87:10
|
LL | [1
| ^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:93:10
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:99:10
|
LL | [true
| ^^^^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:100:36
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:106:36
|
LL | (true | false, None | Some(true
| ^^^^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:105:14
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:111:14
|
LL | (true
| ^^^^
@@ -143,28 +155,34 @@ LL | (true | false, None | Some(t_or_f!())) => {}
= note: this error originates in the macro `t_or_f` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:116:14
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:122:14
|
LL | Some(0
| ^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:135:19
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:141:19
|
LL | | false) => {}
| ^^^^^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:143:15
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:149:15
|
LL | | true) => {}
| ^^^^
error: unreachable pattern
- --> $DIR/exhaustiveness-unreachable-pattern.rs:149:15
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:155:15
|
LL | | true,
| ^^^^
-error: aborting due to 26 previous errors
+error: unreachable pattern
+ --> $DIR/exhaustiveness-unreachable-pattern.rs:160:15
+ |
+LL | | (y, x) => {}
+ | ^^^^^^
+
+error: aborting due to 29 previous errors
diff --git a/tests/ui/or-patterns/fn-param-wrap-parens.stderr b/tests/ui/or-patterns/fn-param-wrap-parens.stderr
index 732702841..1b9614a13 100644
--- a/tests/ui/or-patterns/fn-param-wrap-parens.stderr
+++ b/tests/ui/or-patterns/fn-param-wrap-parens.stderr
@@ -4,5 +4,5 @@ error: top-level or-patterns are not allowed in function parameters
LL | fn fun1(A | B: E) {}
| ^^^^^ help: wrap the pattern in parentheses: `(A | B)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/or-patterns/inconsistent-modes.stderr b/tests/ui/or-patterns/inconsistent-modes.stderr
index f6367ef82..19618d336 100644
--- a/tests/ui/or-patterns/inconsistent-modes.stderr
+++ b/tests/ui/or-patterns/inconsistent-modes.stderr
@@ -57,8 +57,8 @@ LL | let (Ok(ref a) | Err(ref mut a)): Result<&u8, &mut u8> = Ok(&0);
| | types differ in mutability
| first introduced with type `&&u8` here
|
- = note: expected reference `&&u8`
- found mutable reference `&mut &mut u8`
+ = note: expected reference `&&_`
+ found mutable reference `&mut &mut _`
= note: a binding must have the same type in all alternatives
error[E0308]: mismatched types
diff --git a/tests/ui/or-patterns/inner-or-pat.or3.stderr b/tests/ui/or-patterns/inner-or-pat.or3.stderr
index 2236a38c3..10ec7c202 100644
--- a/tests/ui/or-patterns/inner-or-pat.or3.stderr
+++ b/tests/ui/or-patterns/inner-or-pat.or3.stderr
@@ -6,6 +6,6 @@ LL | match x {
LL | x @ ((("h" | "ho" | "yo" | ("dude" | "w")) | () | "nop") | ("hey" | "gg")) |
| ^^ expected `str`, found `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/or-patterns/inner-or-pat.or4.stderr b/tests/ui/or-patterns/inner-or-pat.or4.stderr
index 058873ff5..97800161d 100644
--- a/tests/ui/or-patterns/inner-or-pat.or4.stderr
+++ b/tests/ui/or-patterns/inner-or-pat.or4.stderr
@@ -6,6 +6,6 @@ LL | (x @ "red" | (x @ "blue" | "red")) => {
| |
| variable not in all patterns
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0408`.
diff --git a/tests/ui/or-patterns/while-parsing-this-or-pattern.stderr b/tests/ui/or-patterns/while-parsing-this-or-pattern.stderr
index 7ad62ff99..1f3d2d5d6 100644
--- a/tests/ui/or-patterns/while-parsing-this-or-pattern.stderr
+++ b/tests/ui/or-patterns/while-parsing-this-or-pattern.stderr
@@ -6,5 +6,5 @@ LL | Some(42) | .=. => {}
| |
| while parsing this or-pattern starting here
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/order-dependent-cast-inference.stderr b/tests/ui/order-dependent-cast-inference.stderr
index 9f4ac0fea..ab33b703a 100644
--- a/tests/ui/order-dependent-cast-inference.stderr
+++ b/tests/ui/order-dependent-cast-inference.stderr
@@ -6,6 +6,6 @@ LL | let mut y = 0 as *const _;
|
= note: the type information given here is insufficient to check whether the pointer cast is valid
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0641`.
diff --git a/tests/ui/orphan-check-diagnostics.stderr b/tests/ui/orphan-check-diagnostics.stderr
index 7a7cea563..b9fa7baf4 100644
--- a/tests/ui/orphan-check-diagnostics.stderr
+++ b/tests/ui/orphan-check-diagnostics.stderr
@@ -7,6 +7,6 @@ LL | impl<T> RemoteTrait for T where T: LocalTrait {}
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
= note: only traits defined in the current crate can be implemented for a type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/osx-frameworks.stderr b/tests/ui/osx-frameworks.stderr
index e4a5c98dc..8582b8123 100644
--- a/tests/ui/osx-frameworks.stderr
+++ b/tests/ui/osx-frameworks.stderr
@@ -4,6 +4,6 @@ error[E0455]: link kind `framework` is only supported on Apple targets
LL | #[link(name = "foo", kind = "framework")]
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0455`.
diff --git a/tests/ui/overloaded/overloaded-calls-param-vtables.rs b/tests/ui/overloaded/overloaded-calls-param-vtables.rs
index fde1ad20f..74ee1c176 100644
--- a/tests/ui/overloaded/overloaded-calls-param-vtables.rs
+++ b/tests/ui/overloaded/overloaded-calls-param-vtables.rs
@@ -6,7 +6,6 @@
#![feature(unboxed_closures, fn_traits)]
use std::marker::PhantomData;
-use std::ops::Fn;
use std::ops::Add;
struct G<A>(PhantomData<A>);
diff --git a/tests/ui/overloaded/overloaded-calls-simple.rs b/tests/ui/overloaded/overloaded-calls-simple.rs
index 413183607..8fed18b8e 100644
--- a/tests/ui/overloaded/overloaded-calls-simple.rs
+++ b/tests/ui/overloaded/overloaded-calls-simple.rs
@@ -2,8 +2,6 @@
#![feature(lang_items, unboxed_closures, fn_traits)]
-use std::ops::{Fn, FnMut, FnOnce};
-
struct S1 {
x: i32,
y: i32,
diff --git a/tests/ui/overloaded/overloaded-calls-zero-args.rs b/tests/ui/overloaded/overloaded-calls-zero-args.rs
index 69ca88619..b12373067 100644
--- a/tests/ui/overloaded/overloaded-calls-zero-args.rs
+++ b/tests/ui/overloaded/overloaded-calls-zero-args.rs
@@ -2,8 +2,6 @@
#![feature(unboxed_closures, fn_traits)]
-use std::ops::FnMut;
-
struct S {
x: i32,
y: i32,
diff --git a/tests/ui/overloaded/overloaded-deref-count.rs b/tests/ui/overloaded/overloaded-deref-count.rs
index e2f1e10b5..d2482b125 100644
--- a/tests/ui/overloaded/overloaded-deref-count.rs
+++ b/tests/ui/overloaded/overloaded-deref-count.rs
@@ -2,7 +2,6 @@
use std::cell::Cell;
use std::ops::{Deref, DerefMut};
-use std::vec::Vec;
struct DerefCounter<T> {
count_imm: Cell<usize>,
diff --git a/tests/ui/overloaded/overloaded-deref.rs b/tests/ui/overloaded/overloaded-deref.rs
index 73d8232a3..b08d8f3f7 100644
--- a/tests/ui/overloaded/overloaded-deref.rs
+++ b/tests/ui/overloaded/overloaded-deref.rs
@@ -1,7 +1,6 @@
// run-pass
use std::cell::RefCell;
use std::rc::Rc;
-use std::string::String;
#[derive(PartialEq, Debug)]
struct Point {
diff --git a/tests/ui/packed/dyn-trait.rs b/tests/ui/packed/dyn-trait.rs
new file mode 100644
index 000000000..bb73c26c1
--- /dev/null
+++ b/tests/ui/packed/dyn-trait.rs
@@ -0,0 +1,21 @@
+// run-pass
+use std::ptr::addr_of;
+
+// When the unsized tail is a `dyn Trait`, its alignments is only dynamically known. This means the
+// packed(2) needs to be applied at runtime: the actual alignment of the field is `min(2,
+// usual_alignment)`. Here we check that we do this right by comparing size, alignment, and field
+// offset before and after unsizing.
+fn main() {
+ #[repr(C, packed(2))]
+ struct Packed<T: ?Sized>(u8, core::mem::ManuallyDrop<T>);
+
+ let p = Packed(0, core::mem::ManuallyDrop::new(1));
+ let p: &Packed<usize> = &p;
+ let sized = (core::mem::size_of_val(p), core::mem::align_of_val(p));
+ let sized_offset = unsafe { addr_of!(p.1).cast::<u8>().offset_from(addr_of!(p.0)) };
+ let p: &Packed<dyn Send> = p;
+ let un_sized = (core::mem::size_of_val(p), core::mem::align_of_val(p));
+ let un_sized_offset = unsafe { addr_of!(p.1).cast::<u8>().offset_from(addr_of!(p.0)) };
+ assert_eq!(sized, un_sized);
+ assert_eq!(sized_offset, un_sized_offset);
+}
diff --git a/tests/ui/packed/issue-118537-field-offset-ice.rs b/tests/ui/packed/issue-118537-field-offset-ice.rs
new file mode 100644
index 000000000..657aec640
--- /dev/null
+++ b/tests/ui/packed/issue-118537-field-offset-ice.rs
@@ -0,0 +1,39 @@
+// run-pass
+#![feature(layout_for_ptr)]
+use std::mem;
+
+#[repr(packed(4))]
+struct Slice([u32]);
+
+#[repr(packed(2), C)]
+struct PackedSized {
+ f: u8,
+ d: [u32; 4],
+}
+
+#[repr(packed(2), C)]
+struct PackedUnsized {
+ f: u8,
+ d: Slice,
+}
+
+impl PackedSized {
+ fn unsize(&self) -> &PackedUnsized {
+ // We can't unsize via a generic type since then we get the error
+ // that packed structs with unsized tail don't work if the tail
+ // might need dropping.
+ let len = 4usize;
+ unsafe { mem::transmute((self, len)) }
+ }
+}
+
+fn main() { unsafe {
+ let p = PackedSized { f: 0, d: [1, 2, 3, 4] };
+ let p = p.unsize() as *const PackedUnsized;
+ // Make sure the size computation correctly adds exact 1 byte of padding
+ // in front of the `d` field.
+ assert_eq!(mem::size_of_val_raw(p), 1 + 1 + 4*4);
+ // And likewise for the offset computation.
+ let d = std::ptr::addr_of!((*p).d);
+ assert_eq!(d.cast::<u32>().read_unaligned(), 1);
+} }
diff --git a/tests/ui/packed/issue-118537-field-offset.rs b/tests/ui/packed/issue-118537-field-offset.rs
new file mode 100644
index 000000000..cd17f7679
--- /dev/null
+++ b/tests/ui/packed/issue-118537-field-offset.rs
@@ -0,0 +1,36 @@
+// run-pass
+#![feature(layout_for_ptr)]
+use std::mem;
+
+#[repr(packed, C)]
+struct PackedSized {
+ f: u8,
+ d: [u32; 4],
+}
+
+#[repr(packed, C)]
+struct PackedUnsized {
+ f: u8,
+ d: [u32],
+}
+
+impl PackedSized {
+ fn unsize(&self) -> &PackedUnsized {
+ // We can't unsize via a generic type since then we get the error
+ // that packed structs with unsized tail don't work if the tail
+ // might need dropping.
+ let len = 4usize;
+ unsafe { mem::transmute((self, len)) }
+ }
+}
+
+fn main() { unsafe {
+ let p = PackedSized { f: 0, d: [1, 2, 3, 4] };
+ let p = p.unsize() as *const PackedUnsized;
+ // Make sure the size computation does *not* think there is
+ // any padding in front of the `d` field.
+ assert_eq!(mem::size_of_val_raw(p), 1 + 4*4);
+ // And likewise for the offset computation.
+ let d = std::ptr::addr_of!((*p).d);
+ assert_eq!(d.cast::<u32>().read_unaligned(), 1);
+} }
diff --git a/tests/ui/packed/issue-27060-2.stderr b/tests/ui/packed/issue-27060-2.stderr
index cf5f4e530..7ee732217 100644
--- a/tests/ui/packed/issue-27060-2.stderr
+++ b/tests/ui/packed/issue-27060-2.stderr
@@ -22,6 +22,6 @@ help: the `Box` type always has a statically known size and allocates its conten
LL | data: Box<T>,
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/packed/packed-struct-borrow-element-64bit.stderr b/tests/ui/packed/packed-struct-borrow-element-64bit.stderr
index 57630a4b4..a464b1893 100644
--- a/tests/ui/packed/packed-struct-borrow-element-64bit.stderr
+++ b/tests/ui/packed/packed-struct-borrow-element-64bit.stderr
@@ -8,6 +8,6 @@ LL | let brw = &foo.baz;
= note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
= help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0793`.
diff --git a/tests/ui/packed-struct/packed-struct-generic-transmute.rs b/tests/ui/packed/packed-struct-generic-transmute.rs
index c6264b6d2..c6264b6d2 100644
--- a/tests/ui/packed-struct/packed-struct-generic-transmute.rs
+++ b/tests/ui/packed/packed-struct-generic-transmute.rs
diff --git a/tests/ui/packed-struct/packed-struct-generic-transmute.stderr b/tests/ui/packed/packed-struct-generic-transmute.stderr
index 744c832db..e91f49884 100644
--- a/tests/ui/packed-struct/packed-struct-generic-transmute.stderr
+++ b/tests/ui/packed/packed-struct-generic-transmute.stderr
@@ -7,6 +7,6 @@ LL | let oof: Oof<[u8; 5], i32> = mem::transmute(foo);
= note: source type: `Foo<[u8; 5], i32>` (72 bits)
= note: target type: `Oof<[u8; 5], i32>` (96 bits)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0512`.
diff --git a/tests/ui/packed-struct/packed-struct-transmute.rs b/tests/ui/packed/packed-struct-transmute.rs
index a7d284025..a7d284025 100644
--- a/tests/ui/packed-struct/packed-struct-transmute.rs
+++ b/tests/ui/packed/packed-struct-transmute.rs
diff --git a/tests/ui/packed-struct/packed-struct-transmute.stderr b/tests/ui/packed/packed-struct-transmute.stderr
index 80a8919f7..4d75820e9 100644
--- a/tests/ui/packed-struct/packed-struct-transmute.stderr
+++ b/tests/ui/packed/packed-struct-transmute.stderr
@@ -7,6 +7,6 @@ LL | let oof: Oof = mem::transmute(foo);
= note: source type: `Foo` (N bits)
= note: target type: `Oof` (N bits)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0512`.
diff --git a/tests/ui/panic-handler/panic-handler-bad-signature-1.stderr b/tests/ui/panic-handler/panic-handler-bad-signature-1.stderr
index 85555c439..812f7a069 100644
--- a/tests/ui/panic-handler/panic-handler-bad-signature-1.stderr
+++ b/tests/ui/panic-handler/panic-handler-bad-signature-1.stderr
@@ -7,6 +7,6 @@ LL | fn panic(info: PanicInfo) -> () {}
= note: expected signature `for<'a, 'b> fn(&'a PanicInfo<'b>) -> !`
found signature `for<'a> fn(PanicInfo<'a>)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/panic-handler/panic-handler-bad-signature-2.stderr b/tests/ui/panic-handler/panic-handler-bad-signature-2.stderr
index 84eba2a5a..736a4c709 100644
--- a/tests/ui/panic-handler/panic-handler-bad-signature-2.stderr
+++ b/tests/ui/panic-handler/panic-handler-bad-signature-2.stderr
@@ -7,6 +7,6 @@ LL | fn panic(info: &'static PanicInfo) -> !
= note: expected signature `for<'a, 'b> fn(&'a PanicInfo<'b>) -> _`
found signature `for<'a> fn(&'static PanicInfo<'a>) -> _`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/panic-handler/panic-handler-bad-signature-3.stderr b/tests/ui/panic-handler/panic-handler-bad-signature-3.stderr
index cdf55ab65..6cd072c63 100644
--- a/tests/ui/panic-handler/panic-handler-bad-signature-3.stderr
+++ b/tests/ui/panic-handler/panic-handler-bad-signature-3.stderr
@@ -7,6 +7,6 @@ LL | fn panic() -> ! {
= note: expected signature `for<'a, 'b> fn(&'a PanicInfo<'b>) -> _`
found signature `fn() -> _`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/panic-handler/panic-handler-bad-signature-4.stderr b/tests/ui/panic-handler/panic-handler-bad-signature-4.stderr
index 5e46da121..41a12e8dd 100644
--- a/tests/ui/panic-handler/panic-handler-bad-signature-4.stderr
+++ b/tests/ui/panic-handler/panic-handler-bad-signature-4.stderr
@@ -4,5 +4,5 @@ error: should have no type parameters
LL | fn panic<T>(pi: &PanicInfo) -> ! {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/panic-handler/panic-handler-bad-signature-5.stderr b/tests/ui/panic-handler/panic-handler-bad-signature-5.stderr
index 20c175875..3dcd253d3 100644
--- a/tests/ui/panic-handler/panic-handler-bad-signature-5.stderr
+++ b/tests/ui/panic-handler/panic-handler-bad-signature-5.stderr
@@ -7,6 +7,6 @@ LL | fn panic(info: &PanicInfo<'static>) -> !
= note: expected signature `for<'a, 'b> fn(&'a PanicInfo<'b>) -> _`
found signature `for<'a> fn(&'a PanicInfo<'static>) -> _`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/panic-handler/panic-handler-duplicate.stderr b/tests/ui/panic-handler/panic-handler-duplicate.stderr
index 8cdc4888d..299847474 100644
--- a/tests/ui/panic-handler/panic-handler-duplicate.stderr
+++ b/tests/ui/panic-handler/panic-handler-duplicate.stderr
@@ -1,15 +1,19 @@
error[E0152]: found duplicate lang item `panic_impl`
--> $DIR/panic-handler-duplicate.rs:15:1
|
-LL | fn panic2(info: &PanicInfo) -> ! {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | / fn panic2(info: &PanicInfo) -> ! {
+LL | | loop {}
+LL | | }
+ | |_^
|
note: the lang item is first defined here
--> $DIR/panic-handler-duplicate.rs:10:1
|
-LL | fn panic(info: &PanicInfo) -> ! {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | / fn panic(info: &PanicInfo) -> ! {
+LL | | loop {}
+LL | | }
+ | |_^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0152`.
diff --git a/tests/ui/panic-handler/panic-handler-requires-panic-info.stderr b/tests/ui/panic-handler/panic-handler-requires-panic-info.stderr
index 2bae12efb..06ff8e309 100644
--- a/tests/ui/panic-handler/panic-handler-requires-panic-info.stderr
+++ b/tests/ui/panic-handler/panic-handler-requires-panic-info.stderr
@@ -1,4 +1,4 @@
error: language item required, but not found: `panic_info`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/panic-handler/panic-handler-std.stderr b/tests/ui/panic-handler/panic-handler-std.stderr
index 7c7feffe7..48c216ce2 100644
--- a/tests/ui/panic-handler/panic-handler-std.stderr
+++ b/tests/ui/panic-handler/panic-handler-std.stderr
@@ -1,13 +1,15 @@
error[E0152]: found duplicate lang item `panic_impl`
--> $DIR/panic-handler-std.rs:8:1
|
-LL | fn panic(info: PanicInfo) -> ! {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | / fn panic(info: PanicInfo) -> ! {
+LL | | loop {}
+LL | | }
+ | |_^
|
= note: the lang item is first defined in crate `std` (which `panic_handler_std` depends on)
= note: first definition in `std` loaded from SYSROOT/libstd-*.rlib
= note: second definition in the local crate (`panic_handler_std`)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0152`.
diff --git a/tests/ui/panic-handler/panic-handler-with-target-feature.stderr b/tests/ui/panic-handler/panic-handler-with-target-feature.stderr
index 4210a4200..c38feab49 100644
--- a/tests/ui/panic-handler/panic-handler-with-target-feature.stderr
+++ b/tests/ui/panic-handler/panic-handler-with-target-feature.stderr
@@ -7,5 +7,5 @@ LL |
LL | fn panic(info: &PanicInfo) -> ! {
| ------------------------------- `panic_impl` language item function is not allowed to have `#[target_feature]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/panic-runtime/abort-link-to-unwind-dylib.stderr b/tests/ui/panic-runtime/abort-link-to-unwind-dylib.stderr
index 704b81ae1..bea1172f0 100644
--- a/tests/ui/panic-runtime/abort-link-to-unwind-dylib.stderr
+++ b/tests/ui/panic-runtime/abort-link-to-unwind-dylib.stderr
@@ -1,4 +1,4 @@
error: the linked panic runtime `panic_unwind` is not compiled with this crate's panic strategy `abort`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/panic-runtime/need-abort-got-unwind.stderr b/tests/ui/panic-runtime/need-abort-got-unwind.stderr
index d29c7875f..2a13f45c1 100644
--- a/tests/ui/panic-runtime/need-abort-got-unwind.stderr
+++ b/tests/ui/panic-runtime/need-abort-got-unwind.stderr
@@ -1,4 +1,4 @@
error: the crate `needs_abort` requires panic strategy `abort` which is incompatible with this crate's strategy of `unwind`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/panic-runtime/need-unwind-got-abort.stderr b/tests/ui/panic-runtime/need-unwind-got-abort.stderr
index 4c71df3eb..2a0647fe7 100644
--- a/tests/ui/panic-runtime/need-unwind-got-abort.stderr
+++ b/tests/ui/panic-runtime/need-unwind-got-abort.stderr
@@ -1,4 +1,4 @@
error: the crate `needs_unwind` requires panic strategy `unwind` which is incompatible with this crate's strategy of `abort`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/panic-runtime/want-unwind-got-abort.stderr b/tests/ui/panic-runtime/want-unwind-got-abort.stderr
index d306ce6c5..ced0a7610 100644
--- a/tests/ui/panic-runtime/want-unwind-got-abort.stderr
+++ b/tests/ui/panic-runtime/want-unwind-got-abort.stderr
@@ -1,4 +1,4 @@
error: the linked panic runtime `panic_runtime_abort` is not compiled with this crate's panic strategy `unwind`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/panics/abort-on-panic.rs b/tests/ui/panics/abort-on-panic.rs
index 7fbee85ff..ff31fc243 100644
--- a/tests/ui/panics/abort-on-panic.rs
+++ b/tests/ui/panics/abort-on-panic.rs
@@ -1,6 +1,6 @@
// run-pass
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
#![allow(unused_must_use)]
#![feature(c_unwind)]
diff --git a/tests/ui/paren-span.stderr b/tests/ui/paren-span.stderr
index fc3137157..da2f57033 100644
--- a/tests/ui/paren-span.stderr
+++ b/tests/ui/paren-span.stderr
@@ -4,6 +4,6 @@ error[E0616]: field `x` of struct `S` is private
LL | paren!(s.x);
| ^ private field
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0616`.
diff --git a/tests/ui/parser/assoc/assoc-oddities-1.stderr b/tests/ui/parser/assoc/assoc-oddities-1.stderr
index acf71b489..0d49d542f 100644
--- a/tests/ui/parser/assoc/assoc-oddities-1.stderr
+++ b/tests/ui/parser/assoc/assoc-oddities-1.stderr
@@ -4,5 +4,5 @@ error: expected one of `.`, `;`, `?`, or `}`, found `[`
LL | ..if c { a } else { b }[n];
| ^ expected one of `.`, `;`, `?`, or `}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/assoc/assoc-oddities-2.stderr b/tests/ui/parser/assoc/assoc-oddities-2.stderr
index d3b90c34c..5ba8eb51b 100644
--- a/tests/ui/parser/assoc/assoc-oddities-2.stderr
+++ b/tests/ui/parser/assoc/assoc-oddities-2.stderr
@@ -4,5 +4,5 @@ error: expected one of `.`, `;`, `?`, or `}`, found `[`
LL | x..if c { a } else { b }[n];
| ^ expected one of `.`, `;`, `?`, or `}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/assoc/assoc-type-in-type-arg.stderr b/tests/ui/parser/assoc/assoc-type-in-type-arg.stderr
index b637702f2..259a836d0 100644
--- a/tests/ui/parser/assoc/assoc-type-in-type-arg.stderr
+++ b/tests/ui/parser/assoc/assoc-type-in-type-arg.stderr
@@ -4,5 +4,5 @@ error: bounds on associated types do not belong here
LL | struct Bar<'a, Item: Tr, <Item as Tr>::TrSubtype: 'a> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ belongs in `where` clause
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/attribute/attr-bad-meta-2.stderr b/tests/ui/parser/attribute/attr-bad-meta-2.stderr
index 6fc6fb665..98321827d 100644
--- a/tests/ui/parser/attribute/attr-bad-meta-2.stderr
+++ b/tests/ui/parser/attribute/attr-bad-meta-2.stderr
@@ -4,5 +4,5 @@ error: expected expression, found `]`
LL | #[path =]
| ^ expected expression
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/attribute/attr-bad-meta-3.stderr b/tests/ui/parser/attribute/attr-bad-meta-3.stderr
index 4fa420c79..13eed2e1d 100644
--- a/tests/ui/parser/attribute/attr-bad-meta-3.stderr
+++ b/tests/ui/parser/attribute/attr-bad-meta-3.stderr
@@ -4,5 +4,5 @@ error: expected `]`, found `token`
LL | #[path() token]
| ^^^^^ expected `]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/attribute/attr-bad-meta.stderr b/tests/ui/parser/attribute/attr-bad-meta.stderr
index 8d65c423c..4ca7d6d9f 100644
--- a/tests/ui/parser/attribute/attr-bad-meta.stderr
+++ b/tests/ui/parser/attribute/attr-bad-meta.stderr
@@ -4,5 +4,5 @@ error: expected one of `(`, `::`, `=`, `[`, `]`, or `{`, found `*`
LL | #[path*]
| ^ expected one of `(`, `::`, `=`, `[`, `]`, or `{`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/attribute/attr-before-eof.stderr b/tests/ui/parser/attribute/attr-before-eof.stderr
index a2acb9437..18a9d77bf 100644
--- a/tests/ui/parser/attribute/attr-before-eof.stderr
+++ b/tests/ui/parser/attribute/attr-before-eof.stderr
@@ -4,5 +4,5 @@ error: expected item after attributes
LL | #[derive(Debug)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/attribute/attr-dangling-in-fn.stderr b/tests/ui/parser/attribute/attr-dangling-in-fn.stderr
index b1bb3ab3b..c7b948ea8 100644
--- a/tests/ui/parser/attribute/attr-dangling-in-fn.stderr
+++ b/tests/ui/parser/attribute/attr-dangling-in-fn.stderr
@@ -4,5 +4,5 @@ error: expected statement after outer attribute
LL | #[foo = "bar"]
| ^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/attribute/attr-dangling-in-mod.stderr b/tests/ui/parser/attribute/attr-dangling-in-mod.stderr
index 1c892eac0..882400c1d 100644
--- a/tests/ui/parser/attribute/attr-dangling-in-mod.stderr
+++ b/tests/ui/parser/attribute/attr-dangling-in-mod.stderr
@@ -4,5 +4,5 @@ error: expected item after attributes
LL | #[foo = "bar"]
| ^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/attribute/attr-stmt-expr-attr-bad.rs b/tests/ui/parser/attribute/attr-stmt-expr-attr-bad.rs
index d1950087c..2c402e4c6 100644
--- a/tests/ui/parser/attribute/attr-stmt-expr-attr-bad.rs
+++ b/tests/ui/parser/attribute/attr-stmt-expr-attr-bad.rs
@@ -84,15 +84,15 @@ fn main() {}
#[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } }
//~^ ERROR inclusive range with no end
-//~| ERROR expected one of `=>`, `if`, or `|`, found `#`
+//~| ERROR expected one of `,`, `=>`, `if`, `|`, or `}`, found `#`
#[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } }
//~^ ERROR inclusive range with no end
-//~| ERROR expected one of `=>`, `if`, or `|`, found `#`
+//~| ERROR expected one of `,`, `=>`, `if`, `|`, or `}`, found `#`
#[cfg(FALSE)] fn e() { match 0 { 0..=-#[attr] 10 => () } }
//~^ ERROR unexpected token: `#`
#[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } }
//~^ ERROR inclusive range with no end
-//~| ERROR expected one of `=>`, `if`, or `|`, found `#`
+//~| ERROR expected one of `,`, `=>`, `if`, `|`, or `}`, found `#`
#[cfg(FALSE)] fn e() { let _ = x.#![attr]foo(); }
//~^ ERROR unexpected token: `#`
diff --git a/tests/ui/parser/attribute/attr-stmt-expr-attr-bad.stderr b/tests/ui/parser/attribute/attr-stmt-expr-attr-bad.stderr
index e46c59108..a0e95c5c1 100644
--- a/tests/ui/parser/attribute/attr-stmt-expr-attr-bad.stderr
+++ b/tests/ui/parser/attribute/attr-stmt-expr-attr-bad.stderr
@@ -365,11 +365,11 @@ LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } }
|
= note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
-error: expected one of `=>`, `if`, or `|`, found `#`
+error: expected one of `,`, `=>`, `if`, `|`, or `}`, found `#`
--> $DIR/attr-stmt-expr-attr-bad.rs:85:38
|
LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } }
- | ^ expected one of `=>`, `if`, or `|`
+ | ^ expected one of `,`, `=>`, `if`, `|`, or `}`
error[E0586]: inclusive range with no end
--> $DIR/attr-stmt-expr-attr-bad.rs:88:35
@@ -379,11 +379,11 @@ LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } }
|
= note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
-error: expected one of `=>`, `if`, or `|`, found `#`
+error: expected one of `,`, `=>`, `if`, `|`, or `}`, found `#`
--> $DIR/attr-stmt-expr-attr-bad.rs:88:38
|
LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } }
- | ^ expected one of `=>`, `if`, or `|`
+ | ^ expected one of `,`, `=>`, `if`, `|`, or `}`
error: unexpected token: `#`
--> $DIR/attr-stmt-expr-attr-bad.rs:91:39
@@ -399,11 +399,11 @@ LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } }
|
= note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
-error: expected one of `=>`, `if`, or `|`, found `#`
+error: expected one of `,`, `=>`, `if`, `|`, or `}`, found `#`
--> $DIR/attr-stmt-expr-attr-bad.rs:93:38
|
LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } }
- | ^ expected one of `=>`, `if`, or `|`
+ | ^ expected one of `,`, `=>`, `if`, `|`, or `}`
error: unexpected token: `#`
--> $DIR/attr-stmt-expr-attr-bad.rs:97:34
diff --git a/tests/ui/parser/attribute/attr-with-a-semicolon.stderr b/tests/ui/parser/attribute/attr-with-a-semicolon.stderr
index 0de3490b8..b77f30fdb 100644
--- a/tests/ui/parser/attribute/attr-with-a-semicolon.stderr
+++ b/tests/ui/parser/attribute/attr-with-a-semicolon.stderr
@@ -10,5 +10,5 @@ LL - #[derive(Debug, Clone)];
LL + #[derive(Debug, Clone)]
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/attribute/attr.stderr b/tests/ui/parser/attribute/attr.stderr
index 7cd0ac224..2e0b16efb 100644
--- a/tests/ui/parser/attribute/attr.stderr
+++ b/tests/ui/parser/attribute/attr.stderr
@@ -13,5 +13,5 @@ LL - #![lang = "foo"]
LL + #[lang = "foo"]
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/attribute/attribute-with-no-generics-in-parameter-list.stderr b/tests/ui/parser/attribute/attribute-with-no-generics-in-parameter-list.stderr
index 4c5964715..3279e4e59 100644
--- a/tests/ui/parser/attribute/attribute-with-no-generics-in-parameter-list.stderr
+++ b/tests/ui/parser/attribute/attribute-with-no-generics-in-parameter-list.stderr
@@ -4,5 +4,5 @@ error: attribute without generic parameters
LL | fn foo<#[attr]>() {}
| ^^^^^^^ attributes are only permitted when preceding parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/attribute/attrs-after-extern-mod.stderr b/tests/ui/parser/attribute/attrs-after-extern-mod.stderr
index 135d98457..f2bafa54f 100644
--- a/tests/ui/parser/attribute/attrs-after-extern-mod.stderr
+++ b/tests/ui/parser/attribute/attrs-after-extern-mod.stderr
@@ -8,5 +8,5 @@ LL | #[cfg(stage37)]
LL | }
| - the item list ends here
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.rs b/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.rs
new file mode 100644
index 000000000..d97f24a3d
--- /dev/null
+++ b/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.rs
@@ -0,0 +1,19 @@
+#![feature(stmt_expr_attributes)]
+
+fn foo() -> String {
+ #[cfg(feature = "validation")]
+ [1, 2, 3].iter().map(|c| c.to_string()).collect::<String>() //~ ERROR expected `;`, found `#`
+ #[cfg(not(feature = "validation"))]
+ String::new()
+}
+
+fn bar() -> String {
+ #[attr]
+ [1, 2, 3].iter().map(|c| c.to_string()).collect::<String>() //~ ERROR expected `;`, found `#`
+ #[attr] //~ ERROR cannot find attribute `attr` in this scope
+ String::new()
+}
+
+fn main() {
+ println!("{}", foo());
+}
diff --git a/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.stderr b/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.stderr
new file mode 100644
index 000000000..a71253a5e
--- /dev/null
+++ b/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.stderr
@@ -0,0 +1,54 @@
+error: expected `;`, found `#`
+ --> $DIR/multiple-tail-expr-behind-cfg.rs:5:64
+ |
+LL | #[cfg(feature = "validation")]
+ | ------------------------------ only `;` terminated statements or tail expressions are allowed after this attribute
+LL | [1, 2, 3].iter().map(|c| c.to_string()).collect::<String>()
+ | ^ expected `;` here
+LL | #[cfg(not(feature = "validation"))]
+ | - unexpected token
+ |
+help: add `;` here
+ |
+LL | [1, 2, 3].iter().map(|c| c.to_string()).collect::<String>();
+ | +
+help: alternatively, consider surrounding the expression with a block
+ |
+LL | { [1, 2, 3].iter().map(|c| c.to_string()).collect::<String>() }
+ | + +
+help: it seems like you are trying to provide different expressions depending on `cfg`, consider using `if cfg!(..)`
+ |
+LL ~ if cfg!(feature = "validation") {
+LL ~ [1, 2, 3].iter().map(|c| c.to_string()).collect::<String>()
+LL ~ } else if cfg!(not(feature = "validation")) {
+LL ~ String::new()
+LL + }
+ |
+
+error: expected `;`, found `#`
+ --> $DIR/multiple-tail-expr-behind-cfg.rs:12:64
+ |
+LL | #[attr]
+ | ------- only `;` terminated statements or tail expressions are allowed after this attribute
+LL | [1, 2, 3].iter().map(|c| c.to_string()).collect::<String>()
+ | ^ expected `;` here
+LL | #[attr]
+ | - unexpected token
+ |
+help: add `;` here
+ |
+LL | [1, 2, 3].iter().map(|c| c.to_string()).collect::<String>();
+ | +
+help: alternatively, consider surrounding the expression with a block
+ |
+LL | { [1, 2, 3].iter().map(|c| c.to_string()).collect::<String>() }
+ | + +
+
+error: cannot find attribute `attr` in this scope
+ --> $DIR/multiple-tail-expr-behind-cfg.rs:13:7
+ |
+LL | #[attr]
+ | ^^^^
+
+error: aborting due to 3 previous errors
+
diff --git a/tests/ui/parser/bad-escape-suggest-raw-string.stderr b/tests/ui/parser/bad-escape-suggest-raw-string.stderr
index 45d24bc0f..6dd4ad512 100644
--- a/tests/ui/parser/bad-escape-suggest-raw-string.stderr
+++ b/tests/ui/parser/bad-escape-suggest-raw-string.stderr
@@ -10,5 +10,5 @@ help: if you meant to write a literal backslash (perhaps escaping in a regular e
LL | let bad = r"ab\[c";
| ~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/bad-let-as-field.stderr b/tests/ui/parser/bad-let-as-field.stderr
index 57def42b1..8568036d0 100644
--- a/tests/ui/parser/bad-let-as-field.stderr
+++ b/tests/ui/parser/bad-let-as-field.stderr
@@ -11,5 +11,5 @@ help: escape `let` to use it as an identifier
LL | r#let: i32,
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/bad-let-else-statement.rs b/tests/ui/parser/bad-let-else-statement.rs
new file mode 100644
index 000000000..7b927c89b
--- /dev/null
+++ b/tests/ui/parser/bad-let-else-statement.rs
@@ -0,0 +1,164 @@
+#![feature(inline_const)]
+#![feature(yeet_expr)]
+#![allow(incomplete_features)] // Necessary for now, while explicit_tail_calls is incomplete
+#![feature(explicit_tail_calls)]
+
+fn a() {
+ let foo = {
+ 1
+ } else {
+ //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed
+ return;
+ };
+}
+
+fn b() {
+ let foo = for i in 1..2 {
+ break;
+ } else {
+ //~^ ERROR `for...else` loops are not supported
+ return;
+ };
+}
+
+fn c() {
+ let foo = if true {
+ 1
+ } else {
+ 0
+ } else {
+ //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed
+ return;
+ };
+}
+
+fn d() {
+ let foo = loop {
+ break;
+ } else {
+ //~^ ERROR loop...else` loops are not supported
+ return;
+ };
+}
+
+fn e() {
+ let foo = match true {
+ true => 1,
+ false => 0
+ } else {
+ //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed
+ return;
+ };
+}
+
+struct X {a: i32}
+fn f() {
+ let foo = X {
+ a: 1
+ } else {
+ //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed
+ return;
+ };
+}
+
+fn g() {
+ let foo = while false {
+ break;
+ } else {
+ //~^ ERROR `while...else` loops are not supported
+ return;
+ };
+}
+
+fn h() {
+ let foo = const {
+ 1
+ } else {
+ //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed
+ return;
+ };
+}
+
+fn i() {
+ let foo = &{
+ 1
+ } else {
+ //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed
+ return;
+ };
+}
+
+fn j() {
+ let bar = 0;
+ let foo = bar = {
+ 1
+ } else {
+ //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed
+ return;
+ };
+}
+
+fn k() {
+ let foo = 1 + {
+ 1
+ } else {
+ //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed
+ return;
+ };
+}
+
+fn l() {
+ let foo = 1..{
+ 1
+ } else {
+ //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed
+ return;
+ };
+}
+
+fn m() {
+ let foo = return {
+ ()
+ } else {
+ //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed
+ return;
+ };
+}
+
+fn n() {
+ let foo = -{
+ 1
+ } else {
+ //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed
+ return;
+ };
+}
+
+fn o() -> Result<(), ()> {
+ let foo = do yeet {
+ ()
+ } else {
+ //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed
+ return Ok(());
+ };
+}
+
+fn p() {
+ let foo = become {
+ ()
+ } else {
+ //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed
+ return;
+ };
+}
+
+fn q() {
+ let foo = |x: i32| {
+ x
+ } else {
+ //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed
+ return;
+ };
+}
+
+fn main() {}
diff --git a/tests/ui/parser/bad-let-else-statement.stderr b/tests/ui/parser/bad-let-else-statement.stderr
new file mode 100644
index 000000000..7cbda25e4
--- /dev/null
+++ b/tests/ui/parser/bad-let-else-statement.stderr
@@ -0,0 +1,232 @@
+error: right curly brace `}` before `else` in a `let...else` statement not allowed
+ --> $DIR/bad-let-else-statement.rs:9:5
+ |
+LL | } else {
+ | ^
+ |
+help: wrap the expression in parentheses
+ |
+LL ~ let foo = ({
+LL | 1
+LL ~ }) else {
+ |
+
+error: `for...else` loops are not supported
+ --> $DIR/bad-let-else-statement.rs:18:7
+ |
+LL | let foo = for i in 1..2 {
+ | --- `else` is attached to this loop
+LL | break;
+LL | } else {
+ | _______^
+LL | |
+LL | | return;
+LL | | };
+ | |_____^
+ |
+ = note: consider moving this `else` clause to a separate `if` statement and use a `bool` variable to control if it should run
+
+error: right curly brace `}` before `else` in a `let...else` statement not allowed
+ --> $DIR/bad-let-else-statement.rs:29:5
+ |
+LL | } else {
+ | ^
+ |
+help: wrap the expression in parentheses
+ |
+LL ~ let foo = (if true {
+LL | 1
+LL | } else {
+LL | 0
+LL ~ }) else {
+ |
+
+error: `loop...else` loops are not supported
+ --> $DIR/bad-let-else-statement.rs:38:7
+ |
+LL | let foo = loop {
+ | ---- `else` is attached to this loop
+LL | break;
+LL | } else {
+ | _______^
+LL | |
+LL | | return;
+LL | | };
+ | |_____^
+ |
+ = note: consider moving this `else` clause to a separate `if` statement and use a `bool` variable to control if it should run
+
+error: right curly brace `}` before `else` in a `let...else` statement not allowed
+ --> $DIR/bad-let-else-statement.rs:48:5
+ |
+LL | } else {
+ | ^
+ |
+help: wrap the expression in parentheses
+ |
+LL ~ let foo = (match true {
+LL | true => 1,
+LL | false => 0
+LL ~ }) else {
+ |
+
+error: right curly brace `}` before `else` in a `let...else` statement not allowed
+ --> $DIR/bad-let-else-statement.rs:58:5
+ |
+LL | } else {
+ | ^
+ |
+help: wrap the expression in parentheses
+ |
+LL ~ let foo = (X {
+LL | a: 1
+LL ~ }) else {
+ |
+
+error: `while...else` loops are not supported
+ --> $DIR/bad-let-else-statement.rs:67:7
+ |
+LL | let foo = while false {
+ | ----- `else` is attached to this loop
+LL | break;
+LL | } else {
+ | _______^
+LL | |
+LL | | return;
+LL | | };
+ | |_____^
+ |
+ = note: consider moving this `else` clause to a separate `if` statement and use a `bool` variable to control if it should run
+
+error: right curly brace `}` before `else` in a `let...else` statement not allowed
+ --> $DIR/bad-let-else-statement.rs:76:5
+ |
+LL | } else {
+ | ^
+ |
+help: wrap the expression in parentheses
+ |
+LL ~ let foo = (const {
+LL | 1
+LL ~ }) else {
+ |
+
+error: right curly brace `}` before `else` in a `let...else` statement not allowed
+ --> $DIR/bad-let-else-statement.rs:85:5
+ |
+LL | } else {
+ | ^
+ |
+help: wrap the expression in parentheses
+ |
+LL ~ let foo = &({
+LL | 1
+LL ~ }) else {
+ |
+
+error: right curly brace `}` before `else` in a `let...else` statement not allowed
+ --> $DIR/bad-let-else-statement.rs:95:5
+ |
+LL | } else {
+ | ^
+ |
+help: wrap the expression in parentheses
+ |
+LL ~ let foo = bar = ({
+LL | 1
+LL ~ }) else {
+ |
+
+error: right curly brace `}` before `else` in a `let...else` statement not allowed
+ --> $DIR/bad-let-else-statement.rs:104:5
+ |
+LL | } else {
+ | ^
+ |
+help: wrap the expression in parentheses
+ |
+LL ~ let foo = 1 + ({
+LL | 1
+LL ~ }) else {
+ |
+
+error: right curly brace `}` before `else` in a `let...else` statement not allowed
+ --> $DIR/bad-let-else-statement.rs:113:5
+ |
+LL | } else {
+ | ^
+ |
+help: wrap the expression in parentheses
+ |
+LL ~ let foo = 1..({
+LL | 1
+LL ~ }) else {
+ |
+
+error: right curly brace `}` before `else` in a `let...else` statement not allowed
+ --> $DIR/bad-let-else-statement.rs:122:5
+ |
+LL | } else {
+ | ^
+ |
+help: wrap the expression in parentheses
+ |
+LL ~ let foo = return ({
+LL | ()
+LL ~ }) else {
+ |
+
+error: right curly brace `}` before `else` in a `let...else` statement not allowed
+ --> $DIR/bad-let-else-statement.rs:131:5
+ |
+LL | } else {
+ | ^
+ |
+help: wrap the expression in parentheses
+ |
+LL ~ let foo = -({
+LL | 1
+LL ~ }) else {
+ |
+
+error: right curly brace `}` before `else` in a `let...else` statement not allowed
+ --> $DIR/bad-let-else-statement.rs:140:5
+ |
+LL | } else {
+ | ^
+ |
+help: wrap the expression in parentheses
+ |
+LL ~ let foo = do yeet ({
+LL | ()
+LL ~ }) else {
+ |
+
+error: right curly brace `}` before `else` in a `let...else` statement not allowed
+ --> $DIR/bad-let-else-statement.rs:149:5
+ |
+LL | } else {
+ | ^
+ |
+help: wrap the expression in parentheses
+ |
+LL ~ let foo = become ({
+LL | ()
+LL ~ }) else {
+ |
+
+error: right curly brace `}` before `else` in a `let...else` statement not allowed
+ --> $DIR/bad-let-else-statement.rs:158:5
+ |
+LL | } else {
+ | ^
+ |
+help: wrap the expression in parentheses
+ |
+LL ~ let foo = |x: i32| ({
+LL | x
+LL ~ }) else {
+ |
+
+error: aborting due to 17 previous errors
+
diff --git a/tests/ui/parser/bad-lit-suffixes.rs b/tests/ui/parser/bad-lit-suffixes.rs
index 8cb9ef7e0..c614f4938 100644
--- a/tests/ui/parser/bad-lit-suffixes.rs
+++ b/tests/ui/parser/bad-lit-suffixes.rs
@@ -28,11 +28,12 @@ fn main() {
}
#[rustc_dummy = "string"suffix]
-//~^ ERROR unexpected expression: `"string"suffix`
+//~^ ERROR suffixes on string literals are invalid
fn f() {}
#[must_use = "string"suffix]
-//~^ ERROR unexpected expression: `"string"suffix`
+//~^ ERROR suffixes on string literals are invalid
+//~| ERROR malformed `must_use` attribute input
fn g() {}
#[link(name = "string"suffix)]
diff --git a/tests/ui/parser/bad-lit-suffixes.stderr b/tests/ui/parser/bad-lit-suffixes.stderr
index 756f99ab1..b5dacdf7d 100644
--- a/tests/ui/parser/bad-lit-suffixes.stderr
+++ b/tests/ui/parser/bad-lit-suffixes.stderr
@@ -10,26 +10,39 @@ error: suffixes on string literals are invalid
LL | "C"suffix
| ^^^^^^^^^ invalid suffix `suffix`
-error: unexpected expression: `"string"suffix`
+error: suffixes on string literals are invalid
--> $DIR/bad-lit-suffixes.rs:30:17
|
LL | #[rustc_dummy = "string"suffix]
- | ^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^ invalid suffix `suffix`
-error: unexpected expression: `"string"suffix`
+error: suffixes on string literals are invalid
--> $DIR/bad-lit-suffixes.rs:34:14
|
LL | #[must_use = "string"suffix]
- | ^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^ invalid suffix `suffix`
+
+error: malformed `must_use` attribute input
+ --> $DIR/bad-lit-suffixes.rs:34:1
+ |
+LL | #[must_use = "string"suffix]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+help: the following are the possible correct uses
+ |
+LL | #[must_use = "reason"]
+ |
+LL | #[must_use]
+ |
error: suffixes on string literals are invalid
- --> $DIR/bad-lit-suffixes.rs:38:15
+ --> $DIR/bad-lit-suffixes.rs:39:15
|
LL | #[link(name = "string"suffix)]
| ^^^^^^^^^^^^^^ invalid suffix `suffix`
error: invalid suffix `suffix` for number literal
- --> $DIR/bad-lit-suffixes.rs:42:41
+ --> $DIR/bad-lit-suffixes.rs:43:41
|
LL | #[rustc_layout_scalar_valid_range_start(0suffix)]
| ^^^^^^^ invalid suffix `suffix`
@@ -136,5 +149,5 @@ LL | 1.0e10suffix;
|
= help: valid suffixes are `f32` and `f64`
-error: aborting due to 20 previous errors
+error: aborting due to 21 previous errors
diff --git a/tests/ui/parser/bad-match.stderr b/tests/ui/parser/bad-match.stderr
index 13784c409..8e7878c2b 100644
--- a/tests/ui/parser/bad-match.stderr
+++ b/tests/ui/parser/bad-match.stderr
@@ -4,5 +4,5 @@ error: expected one of `:`, `;`, `=`, `@`, or `|`, found `x`
LL | let isize x = 5;
| ^ expected one of `:`, `;`, `=`, `@`, or `|`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/bad-name.stderr b/tests/ui/parser/bad-name.stderr
index a36b67794..e133d4e48 100644
--- a/tests/ui/parser/bad-name.stderr
+++ b/tests/ui/parser/bad-name.stderr
@@ -4,5 +4,5 @@ error: expected one of `:`, `;`, `=`, `@`, or `|`, found `.`
LL | let x.y::<isize>.z foo;
| ^ expected one of `:`, `;`, `=`, `@`, or `|`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/bad-pointer-type.stderr b/tests/ui/parser/bad-pointer-type.stderr
index b7225ca88..f409d4d99 100644
--- a/tests/ui/parser/bad-pointer-type.stderr
+++ b/tests/ui/parser/bad-pointer-type.stderr
@@ -6,10 +6,10 @@ LL | fn foo(_: *()) {
|
help: add `mut` or `const` here
|
-LL | fn foo(_: *const ()) {
- | +++++
LL | fn foo(_: *mut ()) {
| +++
+LL | fn foo(_: *const ()) {
+ | +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/bad-struct-following-where.stderr b/tests/ui/parser/bad-struct-following-where.stderr
index bb79776dc..f27efc95f 100644
--- a/tests/ui/parser/bad-struct-following-where.stderr
+++ b/tests/ui/parser/bad-struct-following-where.stderr
@@ -4,5 +4,5 @@ error: expected `{` after struct name, found `!`
LL | struct A where T: Sized !
| ^ expected `{` after struct name
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/bad-value-ident-false.stderr b/tests/ui/parser/bad-value-ident-false.stderr
index 30c05ecf3..971219496 100644
--- a/tests/ui/parser/bad-value-ident-false.stderr
+++ b/tests/ui/parser/bad-value-ident-false.stderr
@@ -9,5 +9,5 @@ help: escape `false` to use it as an identifier
LL | fn r#false() { }
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/bad-value-ident-true.stderr b/tests/ui/parser/bad-value-ident-true.stderr
index 74137fa70..b7b73e5f8 100644
--- a/tests/ui/parser/bad-value-ident-true.stderr
+++ b/tests/ui/parser/bad-value-ident-true.stderr
@@ -9,5 +9,5 @@ help: escape `true` to use it as an identifier
LL | fn r#true() { }
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/better-expected.stderr b/tests/ui/parser/better-expected.stderr
index 21bf8d19a..6cb9a4960 100644
--- a/tests/ui/parser/better-expected.stderr
+++ b/tests/ui/parser/better-expected.stderr
@@ -6,5 +6,5 @@ LL | let x: [isize 3];
| |
| while parsing the type for `x`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/bind-struct-early-modifiers.stderr b/tests/ui/parser/bind-struct-early-modifiers.stderr
index b35762a88..6b366a995 100644
--- a/tests/ui/parser/bind-struct-early-modifiers.stderr
+++ b/tests/ui/parser/bind-struct-early-modifiers.stderr
@@ -6,5 +6,5 @@ LL | Foo { ref x: ref x } => {},
| |
| while parsing the fields for this pattern
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/bound-single-question-mark.stderr b/tests/ui/parser/bound-single-question-mark.stderr
index 82937a517..f339c2022 100644
--- a/tests/ui/parser/bound-single-question-mark.stderr
+++ b/tests/ui/parser/bound-single-question-mark.stderr
@@ -4,5 +4,5 @@ error: expected identifier, found `>`
LL | fn f<T: ?>() {}
| ^ expected identifier
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/bounds-lifetime-1.stderr b/tests/ui/parser/bounds-lifetime-1.stderr
index 000e84f63..101704f64 100644
--- a/tests/ui/parser/bounds-lifetime-1.stderr
+++ b/tests/ui/parser/bounds-lifetime-1.stderr
@@ -4,5 +4,5 @@ error: expected one of `,`, `:`, or `>`, found `'b`
LL | type A = for<'a 'b> fn();
| ^^ expected one of `,`, `:`, or `>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/bounds-lifetime-2.stderr b/tests/ui/parser/bounds-lifetime-2.stderr
index dd3e69c11..f39cc604e 100644
--- a/tests/ui/parser/bounds-lifetime-2.stderr
+++ b/tests/ui/parser/bounds-lifetime-2.stderr
@@ -4,5 +4,5 @@ error: expected one of `,`, `:`, or `>`, found `+`
LL | type A = for<'a + 'b> fn();
| ^ expected one of `,`, `:`, or `>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/bounds-lifetime-where-1.stderr b/tests/ui/parser/bounds-lifetime-where-1.stderr
index b6bd86693..f79b4fa03 100644
--- a/tests/ui/parser/bounds-lifetime-where-1.stderr
+++ b/tests/ui/parser/bounds-lifetime-where-1.stderr
@@ -4,5 +4,5 @@ error: expected `:`, found `;`
LL | type A where 'a;
| ^ expected `:`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/bounds-lifetime-where.stderr b/tests/ui/parser/bounds-lifetime-where.stderr
index 785a1fb67..9dd963afc 100644
--- a/tests/ui/parser/bounds-lifetime-where.stderr
+++ b/tests/ui/parser/bounds-lifetime-where.stderr
@@ -4,5 +4,5 @@ error: expected one of `;`, `=`, `where`, lifetime, or type, found `,`
LL | type A where , = u8;
| ^ expected one of `;`, `=`, `where`, lifetime, or type
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/bounds-lifetime.stderr b/tests/ui/parser/bounds-lifetime.stderr
index e47a21d89..26a3e7863 100644
--- a/tests/ui/parser/bounds-lifetime.stderr
+++ b/tests/ui/parser/bounds-lifetime.stderr
@@ -4,5 +4,5 @@ error: expected one of `#`, `>`, `const`, identifier, or lifetime, found `,`
LL | type A = for<,> fn();
| ^ expected one of `#`, `>`, `const`, identifier, or lifetime
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/bounds-type-where.stderr b/tests/ui/parser/bounds-type-where.stderr
index 5636ee75c..709d31430 100644
--- a/tests/ui/parser/bounds-type-where.stderr
+++ b/tests/ui/parser/bounds-type-where.stderr
@@ -4,5 +4,5 @@ error: expected one of `!`, `(`, `+`, `::`, `:`, `<`, `==`, or `=`, found `,`
LL | type A where T, = u8;
| ^ expected one of 8 possible tokens
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/brace-in-let-chain.rs b/tests/ui/parser/brace-in-let-chain.rs
new file mode 100644
index 000000000..1f34c73a2
--- /dev/null
+++ b/tests/ui/parser/brace-in-let-chain.rs
@@ -0,0 +1,58 @@
+// issue #117766
+
+#![feature(let_chains)]
+fn main() {
+ if let () = ()
+ && let () = () { //~ERROR: found a `{` in the middle of a let-chain
+ && let () = ()
+ {
+ }
+}
+
+fn quux() {
+ while let () = ()
+ && let () = () { //~ERROR: found a `{` in the middle of a let-chain
+ && let () = ()
+ {
+ }
+}
+
+fn foobar() {
+ while false {}
+ {
+ && let () = ()
+}
+
+fn fubar() {
+ while false {
+ {
+ && let () = ()
+ }
+}
+
+fn qux() {
+ let foo = false;
+ match foo {
+ _ if foo => {
+ && let () = ()
+ _ => {}
+ }
+}
+
+fn foo() {
+ {
+ && let () = ()
+}
+
+fn bar() {
+ if false {}
+ {
+ && let () = ()
+}
+
+fn baz() {
+ if false {
+ {
+ && let () = ()
+ }
+} //~ERROR: this file contains an unclosed delimiter
diff --git a/tests/ui/parser/brace-in-let-chain.stderr b/tests/ui/parser/brace-in-let-chain.stderr
new file mode 100644
index 000000000..7182d86d0
--- /dev/null
+++ b/tests/ui/parser/brace-in-let-chain.stderr
@@ -0,0 +1,65 @@
+error: this file contains an unclosed delimiter
+ --> $DIR/brace-in-let-chain.rs:58:54
+ |
+LL | fn main() {
+ | - unclosed delimiter
+...
+LL | fn quux() {
+ | - unclosed delimiter
+...
+LL | fn foobar() {
+ | - unclosed delimiter
+...
+LL | fn fubar() {
+ | - unclosed delimiter
+...
+LL | fn qux() {
+ | - unclosed delimiter
+...
+LL | fn foo() {
+ | - unclosed delimiter
+...
+LL | fn bar() {
+ | - unclosed delimiter
+...
+LL | fn baz() {
+ | - unclosed delimiter
+LL | if false {
+LL | {
+ | - this delimiter might not be properly closed...
+LL | && let () = ()
+LL | }
+ | - ...as it matches this but it has different indentation
+LL | }
+ | ^
+
+error: found a `{` in the middle of a let-chain
+ --> $DIR/brace-in-let-chain.rs:14:24
+ |
+LL | && let () = () {
+ | ^
+LL | && let () = ()
+ | ------ you might have meant to continue the let-chain here
+ |
+help: consider removing this brace to parse the `let` as part of the same chain
+ |
+LL - && let () = () {
+LL + && let () = ()
+ |
+
+error: found a `{` in the middle of a let-chain
+ --> $DIR/brace-in-let-chain.rs:6:24
+ |
+LL | && let () = () {
+ | ^
+LL | && let () = ()
+ | ------ you might have meant to continue the let-chain here
+ |
+help: consider removing this brace to parse the `let` as part of the same chain
+ |
+LL - && let () = () {
+LL + && let () = ()
+ |
+
+error: aborting due to 3 previous errors
+
diff --git a/tests/ui/parser/can-begin-expr-check.stderr b/tests/ui/parser/can-begin-expr-check.stderr
index 9569ababa..247009be0 100644
--- a/tests/ui/parser/can-begin-expr-check.stderr
+++ b/tests/ui/parser/can-begin-expr-check.stderr
@@ -4,5 +4,5 @@ error: expected one of `;`, `}`, or an operator, found keyword `enum`
LL | return enum;
| ^^^^ expected one of `;`, `}`, or an operator
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/char/whitespace-character-literal.stderr b/tests/ui/parser/char/whitespace-character-literal.stderr
index d73de41a8..3bd048f8f 100644
--- a/tests/ui/parser/char/whitespace-character-literal.stderr
+++ b/tests/ui/parser/char/whitespace-character-literal.stderr
@@ -12,5 +12,5 @@ note: there are non-printing characters, the full sequence is `\u{200a}x\u{200b}
LL | let _hair_space_around = ' x​';
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/class-implements-bad-trait.stderr b/tests/ui/parser/class-implements-bad-trait.stderr
index 3a4dea95d..5290e3594 100644
--- a/tests/ui/parser/class-implements-bad-trait.stderr
+++ b/tests/ui/parser/class-implements-bad-trait.stderr
@@ -4,5 +4,5 @@ error: expected one of `!` or `::`, found `cat`
LL | class cat : nonexistent {
| ^^^ expected one of `!` or `::`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/closure-return-syntax.stderr b/tests/ui/parser/closure-return-syntax.stderr
index 3d16a2067..eb8428854 100644
--- a/tests/ui/parser/closure-return-syntax.stderr
+++ b/tests/ui/parser/closure-return-syntax.stderr
@@ -9,5 +9,5 @@ help: try placing this code inside a block
LL | let x = || -> i32 { 22 };
| + +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/column-offset-1-based.stderr b/tests/ui/parser/column-offset-1-based.stderr
index 766d72a0a..d837466d9 100644
--- a/tests/ui/parser/column-offset-1-based.stderr
+++ b/tests/ui/parser/column-offset-1-based.stderr
@@ -4,5 +4,5 @@ error: expected one of `!` or `[`, found `<eof>`
LL | #
| ^ expected one of `!` or `[`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/deep-unmatched-angle-brackets.stderr b/tests/ui/parser/deep-unmatched-angle-brackets.stderr
index 1f2850374..7c9033f2f 100644
--- a/tests/ui/parser/deep-unmatched-angle-brackets.stderr
+++ b/tests/ui/parser/deep-unmatched-angle-brackets.stderr
@@ -9,5 +9,5 @@ help: you might have meant to end the type parameters here
LL | <f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<>>();
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/trait-item-with-defaultness-fail-semantic.rs b/tests/ui/parser/defaultness-invalid-places-fail-semantic.rs
index f2d97b7ba..bff53f66e 100644
--- a/tests/ui/parser/trait-item-with-defaultness-fail-semantic.rs
+++ b/tests/ui/parser/defaultness-invalid-places-fail-semantic.rs
@@ -10,3 +10,7 @@ trait X {
default fn f1(); //~ ERROR `default` is only allowed on items in trait impls
default fn f2() {} //~ ERROR `default` is only allowed on items in trait impls
}
+
+default const E: u8 = 0; //~ ERROR `default` is only allowed on items in trait impls
+default type F = (); //~ ERROR `default` is only allowed on items in trait impls
+default fn h() {} //~ ERROR `default` is only allowed on items in trait impls
diff --git a/tests/ui/parser/trait-item-with-defaultness-fail-semantic.stderr b/tests/ui/parser/defaultness-invalid-places-fail-semantic.stderr
index be858cd65..41fad3a5d 100644
--- a/tests/ui/parser/trait-item-with-defaultness-fail-semantic.stderr
+++ b/tests/ui/parser/defaultness-invalid-places-fail-semantic.stderr
@@ -1,5 +1,5 @@
error: `default` is only allowed on items in trait impls
- --> $DIR/trait-item-with-defaultness-fail-semantic.rs:6:5
+ --> $DIR/defaultness-invalid-places-fail-semantic.rs:6:5
|
LL | default const A: u8;
| -------^^^^^^^^^^^^^
@@ -7,7 +7,7 @@ LL | default const A: u8;
| `default` because of this
error: `default` is only allowed on items in trait impls
- --> $DIR/trait-item-with-defaultness-fail-semantic.rs:7:5
+ --> $DIR/defaultness-invalid-places-fail-semantic.rs:7:5
|
LL | default const B: u8 = 0;
| -------^^^^^^^^^^^^^^^^^
@@ -15,7 +15,7 @@ LL | default const B: u8 = 0;
| `default` because of this
error: `default` is only allowed on items in trait impls
- --> $DIR/trait-item-with-defaultness-fail-semantic.rs:8:5
+ --> $DIR/defaultness-invalid-places-fail-semantic.rs:8:5
|
LL | default type D;
| -------^^^^^^^^
@@ -23,7 +23,7 @@ LL | default type D;
| `default` because of this
error: `default` is only allowed on items in trait impls
- --> $DIR/trait-item-with-defaultness-fail-semantic.rs:9:5
+ --> $DIR/defaultness-invalid-places-fail-semantic.rs:9:5
|
LL | default type C: Ord;
| -------^^^^^^^^^^^^^
@@ -31,7 +31,7 @@ LL | default type C: Ord;
| `default` because of this
error: `default` is only allowed on items in trait impls
- --> $DIR/trait-item-with-defaultness-fail-semantic.rs:10:5
+ --> $DIR/defaultness-invalid-places-fail-semantic.rs:10:5
|
LL | default fn f1();
| -------^^^^^^^^^
@@ -39,15 +39,39 @@ LL | default fn f1();
| `default` because of this
error: `default` is only allowed on items in trait impls
- --> $DIR/trait-item-with-defaultness-fail-semantic.rs:11:5
+ --> $DIR/defaultness-invalid-places-fail-semantic.rs:11:5
|
LL | default fn f2() {}
| -------^^^^^^^^
| |
| `default` because of this
+error: `default` is only allowed on items in trait impls
+ --> $DIR/defaultness-invalid-places-fail-semantic.rs:14:1
+ |
+LL | default const E: u8 = 0;
+ | -------^^^^^^^^^^^^^^^^^
+ | |
+ | `default` because of this
+
+error: `default` is only allowed on items in trait impls
+ --> $DIR/defaultness-invalid-places-fail-semantic.rs:15:1
+ |
+LL | default type F = ();
+ | -------^^^^^^^^^^^^^
+ | |
+ | `default` because of this
+
+error: `default` is only allowed on items in trait impls
+ --> $DIR/defaultness-invalid-places-fail-semantic.rs:16:1
+ |
+LL | default fn h() {}
+ | -------^^^^^^^
+ | |
+ | `default` because of this
+
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/trait-item-with-defaultness-fail-semantic.rs:1:12
+ --> $DIR/defaultness-invalid-places-fail-semantic.rs:1:12
|
LL | #![feature(specialization)]
| ^^^^^^^^^^^^^^
@@ -56,5 +80,5 @@ LL | #![feature(specialization)]
= help: consider using `min_specialization` instead, which is more stable and complete
= note: `#[warn(incomplete_features)]` on by default
-error: aborting due to 6 previous errors; 1 warning emitted
+error: aborting due to 9 previous errors; 1 warning emitted
diff --git a/tests/ui/parser/deli-ident-issue-1.stderr b/tests/ui/parser/deli-ident-issue-1.stderr
index eb5073e14..78f5d7b63 100644
--- a/tests/ui/parser/deli-ident-issue-1.stderr
+++ b/tests/ui/parser/deli-ident-issue-1.stderr
@@ -13,5 +13,5 @@ LL | }
LL | fn main() { }
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/diff-markers/enum-2.stderr b/tests/ui/parser/diff-markers/enum-2.stderr
index 63da5c2a6..20e551c2f 100644
--- a/tests/ui/parser/diff-markers/enum-2.stderr
+++ b/tests/ui/parser/diff-markers/enum-2.stderr
@@ -17,5 +17,5 @@ LL | >>>>>>> branch
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/diff-markers/enum.stderr b/tests/ui/parser/diff-markers/enum.stderr
index abbf3fb41..be94331dc 100644
--- a/tests/ui/parser/diff-markers/enum.stderr
+++ b/tests/ui/parser/diff-markers/enum.stderr
@@ -14,5 +14,5 @@ LL | >>>>>>> branch
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/diff-markers/fn-arg.stderr b/tests/ui/parser/diff-markers/fn-arg.stderr
index 933a20641..aabcb826c 100644
--- a/tests/ui/parser/diff-markers/fn-arg.stderr
+++ b/tests/ui/parser/diff-markers/fn-arg.stderr
@@ -14,5 +14,5 @@ LL | >>>>>>> branch
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/diff-markers/item-with-attr.stderr b/tests/ui/parser/diff-markers/item-with-attr.stderr
index 850e2368e..eefb2792e 100644
--- a/tests/ui/parser/diff-markers/item-with-attr.stderr
+++ b/tests/ui/parser/diff-markers/item-with-attr.stderr
@@ -14,5 +14,5 @@ LL | >>>>>>> branch
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/diff-markers/item.stderr b/tests/ui/parser/diff-markers/item.stderr
index 9ab3631a6..a3092ebfc 100644
--- a/tests/ui/parser/diff-markers/item.stderr
+++ b/tests/ui/parser/diff-markers/item.stderr
@@ -14,5 +14,5 @@ LL | >>>>>>> branch
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/diff-markers/statement.stderr b/tests/ui/parser/diff-markers/statement.stderr
index 7ca2495b8..c6c6cae87 100644
--- a/tests/ui/parser/diff-markers/statement.stderr
+++ b/tests/ui/parser/diff-markers/statement.stderr
@@ -14,5 +14,5 @@ LL | >>>>>>> branch
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/diff-markers/struct-expr.stderr b/tests/ui/parser/diff-markers/struct-expr.stderr
index d70476a98..bdea8c841 100644
--- a/tests/ui/parser/diff-markers/struct-expr.stderr
+++ b/tests/ui/parser/diff-markers/struct-expr.stderr
@@ -14,5 +14,5 @@ LL | >>>>>>> branch
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/diff-markers/struct.stderr b/tests/ui/parser/diff-markers/struct.stderr
index cc0b3da66..749941290 100644
--- a/tests/ui/parser/diff-markers/struct.stderr
+++ b/tests/ui/parser/diff-markers/struct.stderr
@@ -14,5 +14,5 @@ LL | >>>>>>> branch
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/diff-markers/trait-item.stderr b/tests/ui/parser/diff-markers/trait-item.stderr
index cdc19f8e0..f01bbe8ba 100644
--- a/tests/ui/parser/diff-markers/trait-item.stderr
+++ b/tests/ui/parser/diff-markers/trait-item.stderr
@@ -14,5 +14,5 @@ LL | >>>>>>> branch
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/diff-markers/tuple-struct.stderr b/tests/ui/parser/diff-markers/tuple-struct.stderr
index d673db898..8dae123c9 100644
--- a/tests/ui/parser/diff-markers/tuple-struct.stderr
+++ b/tests/ui/parser/diff-markers/tuple-struct.stderr
@@ -14,5 +14,5 @@ LL | >>>>>>> branch
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/diff-markers/unclosed-delims-in-macro.stderr b/tests/ui/parser/diff-markers/unclosed-delims-in-macro.stderr
index e0b6f1b5e..6995b8e6f 100644
--- a/tests/ui/parser/diff-markers/unclosed-delims-in-macro.stderr
+++ b/tests/ui/parser/diff-markers/unclosed-delims-in-macro.stderr
@@ -14,5 +14,5 @@ LL | >>>>>>> 7a4f13c blah blah blah
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/diff-markers/unclosed-delims.stderr b/tests/ui/parser/diff-markers/unclosed-delims.stderr
index 67199179b..d4636150e 100644
--- a/tests/ui/parser/diff-markers/unclosed-delims.stderr
+++ b/tests/ui/parser/diff-markers/unclosed-delims.stderr
@@ -14,5 +14,5 @@ LL | >>>>>>> 7a4f13c blah blah blah
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/diff-markers/use-statement.stderr b/tests/ui/parser/diff-markers/use-statement.stderr
index 12e6f57dd..6d376166a 100644
--- a/tests/ui/parser/diff-markers/use-statement.stderr
+++ b/tests/ui/parser/diff-markers/use-statement.stderr
@@ -14,5 +14,5 @@ LL | >>>>>>> branch
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/do-not-suggest-semicolon-before-array.stderr b/tests/ui/parser/do-not-suggest-semicolon-before-array.stderr
index 7b43c7700..0227439ce 100644
--- a/tests/ui/parser/do-not-suggest-semicolon-before-array.stderr
+++ b/tests/ui/parser/do-not-suggest-semicolon-before-array.stderr
@@ -6,5 +6,5 @@ LL | [1, 3)
| |
| unclosed delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/do-not-suggest-semicolon-between-macro-without-exclamation-mark-and-array.stderr b/tests/ui/parser/do-not-suggest-semicolon-between-macro-without-exclamation-mark-and-array.stderr
index 2fe6a28ee..2796312f4 100644
--- a/tests/ui/parser/do-not-suggest-semicolon-between-macro-without-exclamation-mark-and-array.stderr
+++ b/tests/ui/parser/do-not-suggest-semicolon-between-macro-without-exclamation-mark-and-array.stderr
@@ -4,5 +4,5 @@ error: expected one of `.`, `?`, `]`, or an operator, found `,`
LL | let _x = vec[1, 2, 3];
| ^ expected one of `.`, `?`, `]`, or an operator
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/doc-before-attr.stderr b/tests/ui/parser/doc-before-attr.stderr
index 14fd01af2..0298b9b60 100644
--- a/tests/ui/parser/doc-before-attr.stderr
+++ b/tests/ui/parser/doc-before-attr.stderr
@@ -6,5 +6,5 @@ LL | /// hi
LL | #[derive(Debug)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/doc-before-eof.stderr b/tests/ui/parser/doc-before-eof.stderr
index 827566267..e41d02f0e 100644
--- a/tests/ui/parser/doc-before-eof.stderr
+++ b/tests/ui/parser/doc-before-eof.stderr
@@ -4,5 +4,5 @@ error: expected item after doc comment
LL | /// hi
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this doc comment doesn't document anything
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/doc-before-extern-rbrace.stderr b/tests/ui/parser/doc-before-extern-rbrace.stderr
index 8fa12ec26..4d952e294 100644
--- a/tests/ui/parser/doc-before-extern-rbrace.stderr
+++ b/tests/ui/parser/doc-before-extern-rbrace.stderr
@@ -6,6 +6,6 @@ LL | /// hi
|
= help: doc comments must come before what they document, if a comment was intended use `//`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0584`.
diff --git a/tests/ui/parser/doc-before-fn-rbrace.stderr b/tests/ui/parser/doc-before-fn-rbrace.stderr
index 6ea68e42b..bbe6b7144 100644
--- a/tests/ui/parser/doc-before-fn-rbrace.stderr
+++ b/tests/ui/parser/doc-before-fn-rbrace.stderr
@@ -6,6 +6,6 @@ LL | /// document
|
= help: doc comments must come before what they document, if a comment was intended use `//`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0585`.
diff --git a/tests/ui/parser/doc-before-identifier.stderr b/tests/ui/parser/doc-before-identifier.stderr
index 940d293b6..501b05c5a 100644
--- a/tests/ui/parser/doc-before-identifier.stderr
+++ b/tests/ui/parser/doc-before-identifier.stderr
@@ -4,5 +4,5 @@ error: expected identifier, found doc comment `/// document`
LL | fn /// document
| ^^^^^^^^^^^^ expected identifier, found doc comment
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/doc-before-mod-rbrace.stderr b/tests/ui/parser/doc-before-mod-rbrace.stderr
index d5749c66c..00aa40b62 100644
--- a/tests/ui/parser/doc-before-mod-rbrace.stderr
+++ b/tests/ui/parser/doc-before-mod-rbrace.stderr
@@ -4,5 +4,5 @@ error: expected item after doc comment
LL | /// document
| ^^^^^^^^^^^^ this doc comment doesn't document anything
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/doc-before-rbrace.stderr b/tests/ui/parser/doc-before-rbrace.stderr
index 4d4741dfe..3c4ea5375 100644
--- a/tests/ui/parser/doc-before-rbrace.stderr
+++ b/tests/ui/parser/doc-before-rbrace.stderr
@@ -6,6 +6,6 @@ LL | println!("Hi"); /// hi
|
= help: doc comments must come before what they document, if a comment was intended use `//`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0585`.
diff --git a/tests/ui/parser/doc-before-semi.stderr b/tests/ui/parser/doc-before-semi.stderr
index a879e13ff..f3454d30d 100644
--- a/tests/ui/parser/doc-before-semi.stderr
+++ b/tests/ui/parser/doc-before-semi.stderr
@@ -6,6 +6,6 @@ LL | /// hi
|
= help: doc comments must come before what they document, if a comment was intended use `//`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0585`.
diff --git a/tests/ui/parser/doc-before-struct-rbrace-1.stderr b/tests/ui/parser/doc-before-struct-rbrace-1.stderr
index 94934f734..62a27740f 100644
--- a/tests/ui/parser/doc-before-struct-rbrace-1.stderr
+++ b/tests/ui/parser/doc-before-struct-rbrace-1.stderr
@@ -9,6 +9,6 @@ LL | /// document
|
= help: doc comments must come before what they document, if a comment was intended use `//`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0585`.
diff --git a/tests/ui/parser/doc-before-struct-rbrace-2.stderr b/tests/ui/parser/doc-before-struct-rbrace-2.stderr
index 6b5c8c1f8..66c6ce894 100644
--- a/tests/ui/parser/doc-before-struct-rbrace-2.stderr
+++ b/tests/ui/parser/doc-before-struct-rbrace-2.stderr
@@ -6,6 +6,6 @@ LL | a: u8 /// document
|
= help: doc comments must come before what they document, if a comment was intended use `//`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0585`.
diff --git a/tests/ui/parser/doc-inside-trait-item.stderr b/tests/ui/parser/doc-inside-trait-item.stderr
index 900124adc..df1ebc110 100644
--- a/tests/ui/parser/doc-inside-trait-item.stderr
+++ b/tests/ui/parser/doc-inside-trait-item.stderr
@@ -6,6 +6,6 @@ LL | /// empty doc
|
= help: doc comments must come before what they document, if a comment was intended use `//`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0584`.
diff --git a/tests/ui/parser/dotdotdot-expr.stderr b/tests/ui/parser/dotdotdot-expr.stderr
index e7203f24d..208c04bd3 100644
--- a/tests/ui/parser/dotdotdot-expr.stderr
+++ b/tests/ui/parser/dotdotdot-expr.stderr
@@ -13,5 +13,5 @@ help: or `..=` for an inclusive range
LL | let _redemptive = 1..=21;
| ~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/double-pointer.stderr b/tests/ui/parser/double-pointer.stderr
index 28037f932..25403c5b0 100644
--- a/tests/ui/parser/double-pointer.stderr
+++ b/tests/ui/parser/double-pointer.stderr
@@ -6,10 +6,10 @@ LL | let dptr: **const i32 = &ptr;
|
help: add `mut` or `const` here
|
-LL | let dptr: *const *const i32 = &ptr;
- | +++++
LL | let dptr: *mut *const i32 = &ptr;
| +++
+LL | let dptr: *const *const i32 = &ptr;
+ | +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/duplicate-visibility.stderr b/tests/ui/parser/duplicate-visibility.stderr
index 8ecebf01f..b578b1fe2 100644
--- a/tests/ui/parser/duplicate-visibility.stderr
+++ b/tests/ui/parser/duplicate-visibility.stderr
@@ -18,5 +18,5 @@ note: explicit visibility first seen here
LL | pub pub fn foo();
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/empty-impl-semicolon.stderr b/tests/ui/parser/empty-impl-semicolon.stderr
index 6ed309eba..cb15c36e6 100644
--- a/tests/ui/parser/empty-impl-semicolon.stderr
+++ b/tests/ui/parser/empty-impl-semicolon.stderr
@@ -6,5 +6,5 @@ LL | impl Foo;
|
= help: try using `{}` instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/extern-crate-unexpected-token.stderr b/tests/ui/parser/extern-crate-unexpected-token.stderr
index e9d287ac0..f83bb3e3e 100644
--- a/tests/ui/parser/extern-crate-unexpected-token.stderr
+++ b/tests/ui/parser/extern-crate-unexpected-token.stderr
@@ -4,5 +4,5 @@ error: expected one of `crate` or `{`, found `crte`
LL | extern crte foo;
| ^^^^ expected one of `crate` or `{`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/extern-expected-fn-or-brace.stderr b/tests/ui/parser/extern-expected-fn-or-brace.stderr
index 258a2c268..c2200e037 100644
--- a/tests/ui/parser/extern-expected-fn-or-brace.stderr
+++ b/tests/ui/parser/extern-expected-fn-or-brace.stderr
@@ -4,5 +4,5 @@ error: expected `{`, found keyword `mod`
LL | extern "C" mod foo;
| ^^^ expected `{`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/extern-foreign-crate.stderr b/tests/ui/parser/extern-foreign-crate.stderr
index eb75c0fc9..10c58aeb5 100644
--- a/tests/ui/parser/extern-foreign-crate.stderr
+++ b/tests/ui/parser/extern-foreign-crate.stderr
@@ -4,5 +4,5 @@ error: expected one of `;` or `as`, found `{`
LL | extern crate foo {}
| ^ expected one of `;` or `as`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/extern-no-fn.stderr b/tests/ui/parser/extern-no-fn.stderr
index d9183d564..2e434afb2 100644
--- a/tests/ui/parser/extern-no-fn.stderr
+++ b/tests/ui/parser/extern-no-fn.stderr
@@ -8,5 +8,5 @@ LL | f();
LL | }
| - the item list ends here
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/float-field-interpolated.rs b/tests/ui/parser/float-field-interpolated.rs
index a30532035..990f2926d 100644
--- a/tests/ui/parser/float-field-interpolated.rs
+++ b/tests/ui/parser/float-field-interpolated.rs
@@ -6,9 +6,9 @@ macro_rules! generate_field_accesses {
s.$a; // OK
{ s.$b; } //~ ERROR unexpected token: `1.1`
- //~| ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `1.1`
+ //~| ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found literal `1.1`
{ s.$c; } //~ ERROR unexpected token: `1.1`
- //~| ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `1.1`
+ //~| ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found expression `1.1`
};
}
diff --git a/tests/ui/parser/float-field-interpolated.stderr b/tests/ui/parser/float-field-interpolated.stderr
index 664adb358..2a1a4926c 100644
--- a/tests/ui/parser/float-field-interpolated.stderr
+++ b/tests/ui/parser/float-field-interpolated.stderr
@@ -9,7 +9,7 @@ LL | generate_field_accesses!(1.1, 1.1, 1.1);
|
= note: this error originates in the macro `generate_field_accesses` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: expected one of `.`, `;`, `?`, `}`, or an operator, found `1.1`
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found literal `1.1`
--> $DIR/float-field-interpolated.rs:8:13
|
LL | { s.$b; }
@@ -31,7 +31,7 @@ LL | generate_field_accesses!(1.1, 1.1, 1.1);
|
= note: this error originates in the macro `generate_field_accesses` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: expected one of `.`, `;`, `?`, `}`, or an operator, found `1.1`
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found expression `1.1`
--> $DIR/float-field-interpolated.rs:10:13
|
LL | { s.$c; }
diff --git a/tests/ui/parser/float-field.stderr b/tests/ui/parser/float-field.stderr
index 7090efc50..d67d270ef 100644
--- a/tests/ui/parser/float-field.stderr
+++ b/tests/ui/parser/float-field.stderr
@@ -274,7 +274,7 @@ error[E0609]: no field `1e1` on type `(u8, u8)`
--> $DIR/float-field.rs:9:9
|
LL | s.1.1e1;
- | ^^^
+ | ^^^ unknown field
error[E0609]: no field `0x1e1` on type `S`
--> $DIR/float-field.rs:24:7
@@ -336,13 +336,13 @@ error[E0609]: no field `f32` on type `(u8, u8)`
--> $DIR/float-field.rs:44:9
|
LL | s.1.f32;
- | ^^^
+ | ^^^ unknown field
error[E0609]: no field `1e1` on type `(u8, u8)`
--> $DIR/float-field.rs:46:7
|
LL | s.1.1e1f32;
- | ^^^^^^^^
+ | ^^^^^^^^ unknown field
error: aborting due to 55 previous errors
diff --git a/tests/ui/parser/fn-colon-return-type.stderr b/tests/ui/parser/fn-colon-return-type.stderr
index 1de918782..b61a62a17 100644
--- a/tests/ui/parser/fn-colon-return-type.stderr
+++ b/tests/ui/parser/fn-colon-return-type.stderr
@@ -4,5 +4,5 @@ error: return types are denoted using `->`
LL | fn foo(x: i32): i32 {
| ^ help: use `->` instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/fn-defined-using-def.stderr b/tests/ui/parser/fn-defined-using-def.stderr
index f34329012..972c861c7 100644
--- a/tests/ui/parser/fn-defined-using-def.stderr
+++ b/tests/ui/parser/fn-defined-using-def.stderr
@@ -6,5 +6,5 @@ LL | def foo() {}
| |
| help: write `fn` instead of `def` to declare a function
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/fn-defined-using-fun.stderr b/tests/ui/parser/fn-defined-using-fun.stderr
index 2f6cfff35..3c8e586c0 100644
--- a/tests/ui/parser/fn-defined-using-fun.stderr
+++ b/tests/ui/parser/fn-defined-using-fun.stderr
@@ -6,5 +6,5 @@ LL | fun foo() {}
| |
| help: write `fn` instead of `fun` to declare a function
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/fn-defined-using-func.stderr b/tests/ui/parser/fn-defined-using-func.stderr
index 355741e89..9dd90798d 100644
--- a/tests/ui/parser/fn-defined-using-func.stderr
+++ b/tests/ui/parser/fn-defined-using-func.stderr
@@ -6,5 +6,5 @@ LL | func foo() {}
| |
| help: write `fn` instead of `func` to declare a function
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/fn-defined-using-function.stderr b/tests/ui/parser/fn-defined-using-function.stderr
index 43c33a2cd..504ab1bb9 100644
--- a/tests/ui/parser/fn-defined-using-function.stderr
+++ b/tests/ui/parser/fn-defined-using-function.stderr
@@ -6,5 +6,5 @@ LL | function foo() {}
| |
| help: write `fn` instead of `function` to declare a function
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/generic-statics.stderr b/tests/ui/parser/generic-statics.stderr
index c757232b0..eb2e27360 100644
--- a/tests/ui/parser/generic-statics.stderr
+++ b/tests/ui/parser/generic-statics.stderr
@@ -4,5 +4,5 @@ error: static items may not have generic parameters
LL | static S<T>: i32 = 0;
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/if-in-in.stderr b/tests/ui/parser/if-in-in.stderr
index 0e69bc4b2..6117370c0 100644
--- a/tests/ui/parser/if-in-in.stderr
+++ b/tests/ui/parser/if-in-in.stderr
@@ -6,5 +6,5 @@ LL | for i in in 1..2 {
| |
| help: remove the duplicated `in`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/impl-item-const-semantic-fail.stderr b/tests/ui/parser/impl-item-const-semantic-fail.stderr
index ec3bee0ce..579f4c29c 100644
--- a/tests/ui/parser/impl-item-const-semantic-fail.stderr
+++ b/tests/ui/parser/impl-item-const-semantic-fail.stderr
@@ -6,5 +6,5 @@ LL | const Y: u8;
| |
| help: provide a definition for the constant: `= <expr>;`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/impl-item-fn-no-body-semantic-fail.stderr b/tests/ui/parser/impl-item-fn-no-body-semantic-fail.stderr
index 1acb72736..1704d99cf 100644
--- a/tests/ui/parser/impl-item-fn-no-body-semantic-fail.stderr
+++ b/tests/ui/parser/impl-item-fn-no-body-semantic-fail.stderr
@@ -6,5 +6,5 @@ LL | fn f();
| |
| help: provide a definition for the function: `{ <body> }`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/impl-on-unsized-typo.stderr b/tests/ui/parser/impl-on-unsized-typo.stderr
index 23dcc1efd..62e0d085e 100644
--- a/tests/ui/parser/impl-on-unsized-typo.stderr
+++ b/tests/ui/parser/impl-on-unsized-typo.stderr
@@ -4,5 +4,5 @@ error: expected one of `,`, `:`, `=`, or `>`, found `?`
LL | impl<T ?Sized> Tr for T {}
| ^ expected one of `,`, `:`, `=`, or `>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/import-from-path.stderr b/tests/ui/parser/import-from-path.stderr
index 93bdf82d0..b63e48d66 100644
--- a/tests/ui/parser/import-from-path.stderr
+++ b/tests/ui/parser/import-from-path.stderr
@@ -6,5 +6,5 @@ LL | use foo::{bar}::baz
|
= note: glob-like brace syntax must be last on the path
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/import-from-rename.stderr b/tests/ui/parser/import-from-rename.stderr
index d78f6de92..2f267a8d0 100644
--- a/tests/ui/parser/import-from-rename.stderr
+++ b/tests/ui/parser/import-from-rename.stderr
@@ -6,5 +6,5 @@ LL | use foo::{bar} as baz;
|
= note: glob-like brace syntax must be last on the path
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/import-glob-path.stderr b/tests/ui/parser/import-glob-path.stderr
index a93ef255c..3bde32d1e 100644
--- a/tests/ui/parser/import-glob-path.stderr
+++ b/tests/ui/parser/import-glob-path.stderr
@@ -6,5 +6,5 @@ LL | use foo::*::bar
|
= note: the wildcard token must be last on the path
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/import-glob-rename.stderr b/tests/ui/parser/import-glob-rename.stderr
index e1a026b63..24e6c3f00 100644
--- a/tests/ui/parser/import-glob-rename.stderr
+++ b/tests/ui/parser/import-glob-rename.stderr
@@ -6,5 +6,5 @@ LL | use foo::* as baz;
|
= note: the wildcard token must be last on the path
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/inner-attr-after-doc-comment.stderr b/tests/ui/parser/inner-attr-after-doc-comment.stderr
index 3ec3ad8e9..6dbc0fd93 100644
--- a/tests/ui/parser/inner-attr-after-doc-comment.stderr
+++ b/tests/ui/parser/inner-attr-after-doc-comment.stderr
@@ -19,5 +19,5 @@ LL - #![recursion_limit="100"]
LL + #[recursion_limit="100"]
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/inner-attr.stderr b/tests/ui/parser/inner-attr.stderr
index 331c254a5..57ca164fc 100644
--- a/tests/ui/parser/inner-attr.stderr
+++ b/tests/ui/parser/inner-attr.stderr
@@ -16,5 +16,5 @@ LL - #![recursion_limit="100"]
LL + #[recursion_limit="100"]
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/int-literal-too-large-span.stderr b/tests/ui/parser/int-literal-too-large-span.stderr
index 49d6aa5ef..d65a3052b 100644
--- a/tests/ui/parser/int-literal-too-large-span.stderr
+++ b/tests/ui/parser/int-literal-too-large-span.stderr
@@ -6,5 +6,5 @@ LL | 99999999999999999999999999999999999999999999999999999999999999999999999
|
= note: value exceeds limit of `340282366920938463463374607431768211455`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/integer-literal-start-ident.stderr b/tests/ui/parser/integer-literal-start-ident.stderr
index b2c661296..27f0baec8 100644
--- a/tests/ui/parser/integer-literal-start-ident.stderr
+++ b/tests/ui/parser/integer-literal-start-ident.stderr
@@ -10,5 +10,5 @@ help: identifiers cannot start with a number
LL | fn 1main() {}
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/intersection-patterns-2.stderr b/tests/ui/parser/intersection-patterns-2.stderr
index f7e78814c..df34e2a42 100644
--- a/tests/ui/parser/intersection-patterns-2.stderr
+++ b/tests/ui/parser/intersection-patterns-2.stderr
@@ -9,5 +9,5 @@ LL | Some(x) @ Some(y) => {}
|
= note: bindings are `x`, `mut x`, `ref x`, and `ref mut x`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-100197-mut-let.stderr b/tests/ui/parser/issues/issue-100197-mut-let.stderr
index 86658e4f3..07d136881 100644
--- a/tests/ui/parser/issues/issue-100197-mut-let.stderr
+++ b/tests/ui/parser/issues/issue-100197-mut-let.stderr
@@ -4,5 +4,5 @@ error: invalid variable declaration
LL | mut let _x = 123;
| ^^^^^^^ help: switch the order of `mut` and `let`: `let mut`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-101477-let.stderr b/tests/ui/parser/issues/issue-101477-let.stderr
index 1b30d4b17..563483573 100644
--- a/tests/ui/parser/issues/issue-101477-let.stderr
+++ b/tests/ui/parser/issues/issue-101477-let.stderr
@@ -4,5 +4,5 @@ error: unexpected `==`
LL | let x == 2;
| ^^ help: try using `=` instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-101540.stderr b/tests/ui/parser/issues/issue-101540.stderr
index 8af887050..40f1d339a 100644
--- a/tests/ui/parser/issues/issue-101540.stderr
+++ b/tests/ui/parser/issues/issue-101540.stderr
@@ -8,5 +8,5 @@ LL | struct S2 {
|
= help: consider creating a new `struct` definition instead of nesting
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-102182-impl-trait-recover.stderr b/tests/ui/parser/issues/issue-102182-impl-trait-recover.stderr
index 52b6ae5df..cf05337f2 100644
--- a/tests/ui/parser/issues/issue-102182-impl-trait-recover.stderr
+++ b/tests/ui/parser/issues/issue-102182-impl-trait-recover.stderr
@@ -10,5 +10,5 @@ LL - fn foo<T: impl Trait>() {}
LL + fn foo<T: Trait>() {}
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-103451.stderr b/tests/ui/parser/issues/issue-103451.stderr
index 6aacd5012..7ad816e45 100644
--- a/tests/ui/parser/issues/issue-103451.stderr
+++ b/tests/ui/parser/issues/issue-103451.stderr
@@ -8,5 +8,5 @@ LL | x: [u8; R
| |
| unclosed delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-10392-2.stderr b/tests/ui/parser/issues/issue-10392-2.stderr
index 4154ecfeb..3e5d5062b 100644
--- a/tests/ui/parser/issues/issue-10392-2.stderr
+++ b/tests/ui/parser/issues/issue-10392-2.stderr
@@ -8,5 +8,5 @@ LL | let A { .., } = a();
| | help: remove this comma
| `..` must be at the end and cannot have a trailing comma
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-10392.stderr b/tests/ui/parser/issues/issue-10392.stderr
index 438ea67d3..85090d054 100644
--- a/tests/ui/parser/issues/issue-10392.stderr
+++ b/tests/ui/parser/issues/issue-10392.stderr
@@ -6,5 +6,5 @@ LL | let A { , } = a();
| |
| while parsing the fields for this pattern
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-104620.rs b/tests/ui/parser/issues/issue-104620.rs
index f49476c44..fd0916b44 100644
--- a/tests/ui/parser/issues/issue-104620.rs
+++ b/tests/ui/parser/issues/issue-104620.rs
@@ -1,4 +1,4 @@
#![feature(rustc_attrs)]
-#![rustc_dummy=5z] //~ ERROR unexpected expression: `5z`
+#![rustc_dummy=5z] //~ ERROR invalid suffix `z` for number literal
fn main() {}
diff --git a/tests/ui/parser/issues/issue-104620.stderr b/tests/ui/parser/issues/issue-104620.stderr
index d06a6b255..040c63a5f 100644
--- a/tests/ui/parser/issues/issue-104620.stderr
+++ b/tests/ui/parser/issues/issue-104620.stderr
@@ -1,8 +1,10 @@
-error: unexpected expression: `5z`
+error: invalid suffix `z` for number literal
--> $DIR/issue-104620.rs:3:16
|
LL | #![rustc_dummy=5z]
- | ^^
+ | ^^ invalid suffix `z`
+ |
+ = help: the suffix must be one of the numeric types (`u32`, `isize`, `f32`, etc.)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-105366.stderr b/tests/ui/parser/issues/issue-105366.stderr
index 0a7408e2c..18c04dfaf 100644
--- a/tests/ui/parser/issues/issue-105366.stderr
+++ b/tests/ui/parser/issues/issue-105366.stderr
@@ -9,5 +9,5 @@ help: replace `fn` with `impl` here
LL | impl From<i32> for Foo {
| ~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-10636-1.stderr b/tests/ui/parser/issues/issue-10636-1.stderr
index 1e6294ebe..a7402e071 100644
--- a/tests/ui/parser/issues/issue-10636-1.stderr
+++ b/tests/ui/parser/issues/issue-10636-1.stderr
@@ -7,5 +7,5 @@ LL | struct Obj {
LL | )
| ^ mismatched closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-10636-2.stderr b/tests/ui/parser/issues/issue-10636-2.stderr
index 4cd4be180..2dc615246 100644
--- a/tests/ui/parser/issues/issue-10636-2.stderr
+++ b/tests/ui/parser/issues/issue-10636-2.stderr
@@ -9,5 +9,5 @@ LL | option.map(|some| 42;
LL | }
| ^ mismatched closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-107705.stderr b/tests/ui/parser/issues/issue-107705.stderr
index d2d613461..2d0c3e0e6 100644
--- a/tests/ui/parser/issues/issue-107705.stderr
+++ b/tests/ui/parser/issues/issue-107705.stderr
@@ -6,5 +6,5 @@ LL | fn f() {a(b:&,
| |
| unclosed delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.stderr b/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.stderr
index 7cda66757..78017babb 100644
--- a/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.stderr
+++ b/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.stderr
@@ -7,5 +7,5 @@ LL | pub fn func<F>() where F: FnOnce -> () {}
| | help: try adding parentheses
| `Fn` bounds require arguments in parentheses
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-108242-semicolon-recovery.stderr b/tests/ui/parser/issues/issue-108242-semicolon-recovery.stderr
index f68d6d501..e12283b25 100644
--- a/tests/ui/parser/issues/issue-108242-semicolon-recovery.stderr
+++ b/tests/ui/parser/issues/issue-108242-semicolon-recovery.stderr
@@ -9,5 +9,5 @@ LL | foo(;
LL | }
| ^ mismatched closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-111148.stderr b/tests/ui/parser/issues/issue-111148.stderr
index e6595a5cb..bcfca981d 100644
--- a/tests/ui/parser/issues/issue-111148.stderr
+++ b/tests/ui/parser/issues/issue-111148.stderr
@@ -4,5 +4,5 @@ error: expected one of `#`, `>`, `const`, identifier, or lifetime, found `<`
LL | fn a<<i<Y<w<>#
| ^ expected one of `#`, `>`, `const`, identifier, or lifetime
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-111416.stderr b/tests/ui/parser/issues/issue-111416.stderr
index ddacf4d6d..36f6c5b01 100644
--- a/tests/ui/parser/issues/issue-111416.stderr
+++ b/tests/ui/parser/issues/issue-111416.stderr
@@ -14,5 +14,5 @@ LL - let my = monad_bind(mx, T: Try);
LL + let my = monad_bind(mx, Try);
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-113110-non-item-at-module-root.stderr b/tests/ui/parser/issues/issue-113110-non-item-at-module-root.stderr
index 0789c4548..a47dd4103 100644
--- a/tests/ui/parser/issues/issue-113110-non-item-at-module-root.stderr
+++ b/tests/ui/parser/issues/issue-113110-non-item-at-module-root.stderr
@@ -6,5 +6,5 @@ LL | 5
|
= note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-113203.stderr b/tests/ui/parser/issues/issue-113203.stderr
index 97304a89c..5db628d59 100644
--- a/tests/ui/parser/issues/issue-113203.stderr
+++ b/tests/ui/parser/issues/issue-113203.stderr
@@ -4,5 +4,5 @@ error: incorrect use of `await`
LL | await {}()
| ^^^^^^^^ help: `await` is a postfix operation: `{}.await`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-113342.stderr b/tests/ui/parser/issues/issue-113342.stderr
index a0c5e665f..6d9f22f6a 100644
--- a/tests/ui/parser/issues/issue-113342.stderr
+++ b/tests/ui/parser/issues/issue-113342.stderr
@@ -7,5 +7,5 @@ LL | extern "C" pub fn id(x: i32) -> i32 { x }
| | expected `fn`
| help: visibility `pub` must come before `extern "C"`: `pub extern "C"`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-114219.stderr b/tests/ui/parser/issues/issue-114219.stderr
index 90dcdc427..02323cb99 100644
--- a/tests/ui/parser/issues/issue-114219.stderr
+++ b/tests/ui/parser/issues/issue-114219.stderr
@@ -4,5 +4,5 @@ error: `async move` blocks are only allowed in Rust 2018 or later
LL | async move {};
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-118530-ice.rs b/tests/ui/parser/issues/issue-118530-ice.rs
new file mode 100644
index 000000000..e758e5af4
--- /dev/null
+++ b/tests/ui/parser/issues/issue-118530-ice.rs
@@ -0,0 +1,15 @@
+fn bar() -> String {
+ #[cfg]
+ [1, 2, 3].iter() //~ ERROR expected `;`, found `#`
+ #[feature]
+ attr::fn bar() -> String { //~ ERROR expected identifier, found keyword `fn`
+ //~^ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `->`
+ //~| ERROR expected `;`, found `bar`
+ #[attr]
+ [1, 2, 3].iter().map().collect::<String>()
+ #[attr]
+
+}()
+}
+
+fn main() { }
diff --git a/tests/ui/parser/issues/issue-118530-ice.stderr b/tests/ui/parser/issues/issue-118530-ice.stderr
new file mode 100644
index 000000000..ef573fb7b
--- /dev/null
+++ b/tests/ui/parser/issues/issue-118530-ice.stderr
@@ -0,0 +1,43 @@
+error: expected `;`, found `#`
+ --> $DIR/issue-118530-ice.rs:3:21
+ |
+LL | #[cfg]
+ | ------ only `;` terminated statements or tail expressions are allowed after this attribute
+LL | [1, 2, 3].iter()
+ | ^ expected `;` here
+LL | #[feature]
+ | - unexpected token
+ |
+help: add `;` here
+ |
+LL | [1, 2, 3].iter();
+ | +
+help: alternatively, consider surrounding the expression with a block
+ |
+LL | { [1, 2, 3].iter() }
+ | + +
+
+error: expected identifier, found keyword `fn`
+ --> $DIR/issue-118530-ice.rs:5:11
+ |
+LL | attr::fn bar() -> String {
+ | ^^ expected identifier, found keyword
+
+error: expected `;`, found `bar`
+ --> $DIR/issue-118530-ice.rs:5:13
+ |
+LL | #[feature]
+ | ---------- only `;` terminated statements or tail expressions are allowed after this attribute
+LL | attr::fn bar() -> String {
+ | ^--- unexpected token
+ | |
+ | help: add `;` here
+
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found `->`
+ --> $DIR/issue-118530-ice.rs:5:20
+ |
+LL | attr::fn bar() -> String {
+ | ^^ expected one of `.`, `;`, `?`, `}`, or an operator
+
+error: aborting due to 4 previous errors
+
diff --git a/tests/ui/parser/issues/issue-118531-ice.rs b/tests/ui/parser/issues/issue-118531-ice.rs
new file mode 100644
index 000000000..24794f060
--- /dev/null
+++ b/tests/ui/parser/issues/issue-118531-ice.rs
@@ -0,0 +1,10 @@
+fn bar() -> String {
+ #[cfg(feature = )]
+ [1, 2, 3].iter().map().collect::<String>() //~ ERROR expected `;`, found `#`
+
+ #[attr] //~ ERROR attributes on expressions are experimental [E0658]
+ //~^ ERROR cannot find attribute `attr` in this scope
+ String::new()
+}
+
+fn main() { }
diff --git a/tests/ui/parser/issues/issue-118531-ice.stderr b/tests/ui/parser/issues/issue-118531-ice.stderr
new file mode 100644
index 000000000..a32292dcb
--- /dev/null
+++ b/tests/ui/parser/issues/issue-118531-ice.stderr
@@ -0,0 +1,38 @@
+error: expected `;`, found `#`
+ --> $DIR/issue-118531-ice.rs:3:47
+ |
+LL | #[cfg(feature = )]
+ | ------------------ only `;` terminated statements or tail expressions are allowed after this attribute
+LL | [1, 2, 3].iter().map().collect::<String>()
+ | ^ expected `;` here
+LL |
+LL | #[attr]
+ | - unexpected token
+ |
+help: add `;` here
+ |
+LL | [1, 2, 3].iter().map().collect::<String>();
+ | +
+help: alternatively, consider surrounding the expression with a block
+ |
+LL | { [1, 2, 3].iter().map().collect::<String>() }
+ | + +
+
+error[E0658]: attributes on expressions are experimental
+ --> $DIR/issue-118531-ice.rs:5:5
+ |
+LL | #[attr]
+ | ^^^^^^^
+ |
+ = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
+ = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
+
+error: cannot find attribute `attr` in this scope
+ --> $DIR/issue-118531-ice.rs:5:7
+ |
+LL | #[attr]
+ | ^^^^
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/parser/issues/issue-14303-fncall.full.stderr b/tests/ui/parser/issues/issue-14303-fncall.full.stderr
index 0c152516a..1986f70bf 100644
--- a/tests/ui/parser/issues/issue-14303-fncall.full.stderr
+++ b/tests/ui/parser/issues/issue-14303-fncall.full.stderr
@@ -4,6 +4,6 @@ error[E0747]: type provided when a lifetime was expected
LL | .collect::<Vec<S<_, 'a>>>();
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0747`.
diff --git a/tests/ui/parser/issues/issue-14303-fncall.generic_arg.stderr b/tests/ui/parser/issues/issue-14303-fncall.generic_arg.stderr
index 571815776..2de59b8c7 100644
--- a/tests/ui/parser/issues/issue-14303-fncall.generic_arg.stderr
+++ b/tests/ui/parser/issues/issue-14303-fncall.generic_arg.stderr
@@ -4,6 +4,6 @@ error[E0747]: inferred provided when a lifetime was expected
LL | .collect::<Vec<S<_, 'a>>>();
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0747`.
diff --git a/tests/ui/parser/issues/issue-15914.stderr b/tests/ui/parser/issues/issue-15914.stderr
index ea26453f8..c88fd4e55 100644
--- a/tests/ui/parser/issues/issue-15914.stderr
+++ b/tests/ui/parser/issues/issue-15914.stderr
@@ -4,5 +4,5 @@ error: expected identifier, found `(`
LL | ();
| ^ expected identifier
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-15980.stderr b/tests/ui/parser/issues/issue-15980.stderr
index cf8d01147..c3c56c46a 100644
--- a/tests/ui/parser/issues/issue-15980.stderr
+++ b/tests/ui/parser/issues/issue-15980.stderr
@@ -16,5 +16,5 @@ help: you might have meant to start a match arm after the match guard
LL | Err(ref e) if e.kind == io::EndOfFile => {
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-1655.stderr b/tests/ui/parser/issues/issue-1655.stderr
index 0c390a0ec..536b583aa 100644
--- a/tests/ui/parser/issues/issue-1655.stderr
+++ b/tests/ui/parser/issues/issue-1655.stderr
@@ -4,5 +4,5 @@ error: expected one of `!` or `[`, found `vec`
LL | #vec[doc(
| ^^^ expected one of `!` or `[`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-17718-const-mut.stderr b/tests/ui/parser/issues/issue-17718-const-mut.stderr
index 8251ce999..a27f51708 100644
--- a/tests/ui/parser/issues/issue-17718-const-mut.stderr
+++ b/tests/ui/parser/issues/issue-17718-const-mut.stderr
@@ -6,5 +6,5 @@ LL | const
LL | mut
| ^^^ cannot be mutable
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-17904-2.stderr b/tests/ui/parser/issues/issue-17904-2.stderr
index 7185a5e57..211ffcedd 100644
--- a/tests/ui/parser/issues/issue-17904-2.stderr
+++ b/tests/ui/parser/issues/issue-17904-2.stderr
@@ -6,5 +6,5 @@ LL | struct Bar<T> { x: T } where T: Copy
|
= note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-17904.stderr b/tests/ui/parser/issues/issue-17904.stderr
index aa343975d..81c6e3bed 100644
--- a/tests/ui/parser/issues/issue-17904.stderr
+++ b/tests/ui/parser/issues/issue-17904.stderr
@@ -13,5 +13,5 @@ LL - struct Foo<T> where T: Copy, (T);
LL + struct Foo<T>(T) where T: Copy;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-1802-1.stderr b/tests/ui/parser/issues/issue-1802-1.stderr
index 954cc0bee..5ddc5ae58 100644
--- a/tests/ui/parser/issues/issue-1802-1.stderr
+++ b/tests/ui/parser/issues/issue-1802-1.stderr
@@ -4,6 +4,6 @@ error[E0768]: no valid digits found for number
LL | log(error, 0b);
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0768`.
diff --git a/tests/ui/parser/issues/issue-1802-2.stderr b/tests/ui/parser/issues/issue-1802-2.stderr
index 49043d07b..7c802e4bd 100644
--- a/tests/ui/parser/issues/issue-1802-2.stderr
+++ b/tests/ui/parser/issues/issue-1802-2.stderr
@@ -4,6 +4,6 @@ error[E0768]: no valid digits found for number
LL | log(error, 0b);
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0768`.
diff --git a/tests/ui/parser/issues/issue-19398.stderr b/tests/ui/parser/issues/issue-19398.stderr
index 1da00960a..236fac673 100644
--- a/tests/ui/parser/issues/issue-19398.stderr
+++ b/tests/ui/parser/issues/issue-19398.stderr
@@ -9,5 +9,5 @@ LL |
LL | }
| - the item list ends here
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-20616-1.stderr b/tests/ui/parser/issues/issue-20616-1.stderr
index 816046237..b7a8d22d8 100644
--- a/tests/ui/parser/issues/issue-20616-1.stderr
+++ b/tests/ui/parser/issues/issue-20616-1.stderr
@@ -4,5 +4,5 @@ error: expected one of `,`, `:`, or `>`, found `T`
LL | type Type_1<'a T> = &'a T;
| ^ expected one of `,`, `:`, or `>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-20616-2.stderr b/tests/ui/parser/issues/issue-20616-2.stderr
index 42059685c..038b2ffc7 100644
--- a/tests/ui/parser/issues/issue-20616-2.stderr
+++ b/tests/ui/parser/issues/issue-20616-2.stderr
@@ -9,5 +9,5 @@ help: you might have meant to end the type parameters here
LL | type Type_2 = Type_1_<'static> ()>;
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-20616-3.stderr b/tests/ui/parser/issues/issue-20616-3.stderr
index dbff116e5..10e5befe2 100644
--- a/tests/ui/parser/issues/issue-20616-3.stderr
+++ b/tests/ui/parser/issues/issue-20616-3.stderr
@@ -9,5 +9,5 @@ help: you might have meant to end the type parameters here
LL | type Type_3<T> = Box<T>,,>;
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-20616-4.stderr b/tests/ui/parser/issues/issue-20616-4.stderr
index 48a06e00b..df619b4c7 100644
--- a/tests/ui/parser/issues/issue-20616-4.stderr
+++ b/tests/ui/parser/issues/issue-20616-4.stderr
@@ -9,5 +9,5 @@ help: you might have meant to end the type parameters here
LL | type Type_4<T> = Type_1_<'static>,, T>;
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-20616-5.stderr b/tests/ui/parser/issues/issue-20616-5.stderr
index 84bee2ad1..709a5467d 100644
--- a/tests/ui/parser/issues/issue-20616-5.stderr
+++ b/tests/ui/parser/issues/issue-20616-5.stderr
@@ -9,5 +9,5 @@ help: you might have meant to end the type parameters here
LL | type Type_5<'a> = Type_1_<'a, ()>,,>;
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-20616-6.stderr b/tests/ui/parser/issues/issue-20616-6.stderr
index 67de41b97..7fe1f1c45 100644
--- a/tests/ui/parser/issues/issue-20616-6.stderr
+++ b/tests/ui/parser/issues/issue-20616-6.stderr
@@ -9,5 +9,5 @@ help: you might have meant to end the type parameters here
LL | type Type_6 = Type_5_<'a>,,>;
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-20616-7.stderr b/tests/ui/parser/issues/issue-20616-7.stderr
index 3b8e07fa0..d9e97301f 100644
--- a/tests/ui/parser/issues/issue-20616-7.stderr
+++ b/tests/ui/parser/issues/issue-20616-7.stderr
@@ -9,5 +9,5 @@ help: you might have meant to end the type parameters here
LL | type Type_7 = Box<()>,,>;
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-20616-8.stderr b/tests/ui/parser/issues/issue-20616-8.stderr
index e9f37e50f..f8d7dc63c 100644
--- a/tests/ui/parser/issues/issue-20616-8.stderr
+++ b/tests/ui/parser/issues/issue-20616-8.stderr
@@ -4,5 +4,5 @@ error: expected one of `#`, `>`, `const`, identifier, or lifetime, found `,`
LL | type Type_8<'a,,> = &'a ();
| ^ expected one of `#`, `>`, `const`, identifier, or lifetime
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-20616-9.stderr b/tests/ui/parser/issues/issue-20616-9.stderr
index dc309d1bc..5dccacdb6 100644
--- a/tests/ui/parser/issues/issue-20616-9.stderr
+++ b/tests/ui/parser/issues/issue-20616-9.stderr
@@ -4,5 +4,5 @@ error: expected one of `#`, `>`, `const`, identifier, or lifetime, found `,`
LL | type Type_9<T,,> = Box<T>;
| ^ expected one of `#`, `>`, `const`, identifier, or lifetime
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-20711-2.stderr b/tests/ui/parser/issues/issue-20711-2.stderr
index 12b18bbc5..9fb729895 100644
--- a/tests/ui/parser/issues/issue-20711-2.stderr
+++ b/tests/ui/parser/issues/issue-20711-2.stderr
@@ -10,5 +10,5 @@ LL |
LL | }
| - the item list ends here
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-20711.stderr b/tests/ui/parser/issues/issue-20711.stderr
index 4af4b22be..256fb0ade 100644
--- a/tests/ui/parser/issues/issue-20711.stderr
+++ b/tests/ui/parser/issues/issue-20711.stderr
@@ -9,5 +9,5 @@ LL |
LL | }
| - the item list ends here
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-21146.stderr b/tests/ui/parser/issues/issue-21146.stderr
index c71fda3d6..e83c62afe 100644
--- a/tests/ui/parser/issues/issue-21146.stderr
+++ b/tests/ui/parser/issues/issue-21146.stderr
@@ -4,5 +4,5 @@ error: expected one of `!` or `::`, found `<eof>`
LL | parse_error
| ^^^^^^^^^^^ expected one of `!` or `::`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-21153.stderr b/tests/ui/parser/issues/issue-21153.stderr
index cbfa9ded3..8839eed84 100644
--- a/tests/ui/parser/issues/issue-21153.stderr
+++ b/tests/ui/parser/issues/issue-21153.stderr
@@ -9,5 +9,5 @@ LL |
LL | }
| - the item list ends here
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-22647.stderr b/tests/ui/parser/issues/issue-22647.stderr
index 585e70266..bdf74af63 100644
--- a/tests/ui/parser/issues/issue-22647.stderr
+++ b/tests/ui/parser/issues/issue-22647.stderr
@@ -9,5 +9,5 @@ help: use `::<...>` instead of `<...>` to specify lifetime, type, or const argum
LL | let caller::<F> = |f: F|
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-22712.stderr b/tests/ui/parser/issues/issue-22712.stderr
index 7f9d99d8e..aeca95ed6 100644
--- a/tests/ui/parser/issues/issue-22712.stderr
+++ b/tests/ui/parser/issues/issue-22712.stderr
@@ -9,5 +9,5 @@ help: use `::<...>` instead of `<...>` to specify lifetime, type, or const argum
LL | let Foo::<Vec<u8>>
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-2354-1.stderr b/tests/ui/parser/issues/issue-2354-1.stderr
index 7ea0f2a98..edd64ecf3 100644
--- a/tests/ui/parser/issues/issue-2354-1.stderr
+++ b/tests/ui/parser/issues/issue-2354-1.stderr
@@ -4,5 +4,5 @@ error: unexpected closing delimiter: `}`
LL | static foo: isize = 2; }
| ^ unexpected closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-2354.stderr b/tests/ui/parser/issues/issue-2354.stderr
index b89ed3958..fd649a575 100644
--- a/tests/ui/parser/issues/issue-2354.stderr
+++ b/tests/ui/parser/issues/issue-2354.stderr
@@ -12,5 +12,5 @@ LL | }
LL |
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-24197.stderr b/tests/ui/parser/issues/issue-24197.stderr
index fd7015ccd..3ef707f39 100644
--- a/tests/ui/parser/issues/issue-24197.stderr
+++ b/tests/ui/parser/issues/issue-24197.stderr
@@ -4,5 +4,5 @@ error: expected one of `:`, `;`, `=`, `@`, or `|`, found `[`
LL | let buf[0] = 0;
| ^ expected one of `:`, `;`, `=`, `@`, or `|`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-24375.rs b/tests/ui/parser/issues/issue-24375.rs
index 1d128d33e..8d1bc579e 100644
--- a/tests/ui/parser/issues/issue-24375.rs
+++ b/tests/ui/parser/issues/issue-24375.rs
@@ -3,7 +3,7 @@ static tmp : [&'static str; 2] = ["hello", "he"];
fn main() {
let z = "hello";
match z {
- tmp[0] => {} //~ ERROR expected one of `=>`, `@`, `if`, or `|`, found `[`
+ tmp[0] => {} //~ ERROR expected one of `,`, `=>`, `@`, `if`, `|`, or `}`, found `[`
_ => {}
}
}
diff --git a/tests/ui/parser/issues/issue-24375.stderr b/tests/ui/parser/issues/issue-24375.stderr
index 7aed88768..2b980a552 100644
--- a/tests/ui/parser/issues/issue-24375.stderr
+++ b/tests/ui/parser/issues/issue-24375.stderr
@@ -1,8 +1,8 @@
-error: expected one of `=>`, `@`, `if`, or `|`, found `[`
+error: expected one of `,`, `=>`, `@`, `if`, `|`, or `}`, found `[`
--> $DIR/issue-24375.rs:6:12
|
LL | tmp[0] => {}
- | ^ expected one of `=>`, `@`, `if`, or `|`
+ | ^ expected one of `,`, `=>`, `@`, `if`, `|`, or `}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-24780.stderr b/tests/ui/parser/issues/issue-24780.stderr
index d9470191b..43e200102 100644
--- a/tests/ui/parser/issues/issue-24780.stderr
+++ b/tests/ui/parser/issues/issue-24780.stderr
@@ -4,5 +4,5 @@ error: expected one of `!`, `+`, `::`, `where`, or `{`, found `>`
LL | fn foo() -> Vec<usize>> {
| ^ expected one of `!`, `+`, `::`, `where`, or `{`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-3036.stderr b/tests/ui/parser/issues/issue-3036.stderr
index e02223931..3dd89b7e8 100644
--- a/tests/ui/parser/issues/issue-3036.stderr
+++ b/tests/ui/parser/issues/issue-3036.stderr
@@ -6,5 +6,5 @@ LL | let _x = 3
LL | }
| - unexpected token
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-31804.stderr b/tests/ui/parser/issues/issue-31804.stderr
index 76e68b0b3..d3d2c2a0f 100644
--- a/tests/ui/parser/issues/issue-31804.stderr
+++ b/tests/ui/parser/issues/issue-31804.stderr
@@ -4,5 +4,5 @@ error: expected pattern, found `}`
LL | }
| ^ expected pattern
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-32214.stderr b/tests/ui/parser/issues/issue-32214.stderr
index d0a9b5299..2ef4305df 100644
--- a/tests/ui/parser/issues/issue-32214.stderr
+++ b/tests/ui/parser/issues/issue-32214.stderr
@@ -11,5 +11,5 @@ help: move the constraint after the generic argument
LL | pub fn test<W, I: Trait<W, Item = ()> >() {}
| ~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-32446.stderr b/tests/ui/parser/issues/issue-32446.stderr
index 7515369aa..7319e839b 100644
--- a/tests/ui/parser/issues/issue-32446.stderr
+++ b/tests/ui/parser/issues/issue-32446.stderr
@@ -7,5 +7,5 @@ LL | trait T { ... }
| | non-item starts here
| item list starts here
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-32501.stderr b/tests/ui/parser/issues/issue-32501.stderr
index d53302449..c0513a640 100644
--- a/tests/ui/parser/issues/issue-32501.stderr
+++ b/tests/ui/parser/issues/issue-32501.stderr
@@ -2,9 +2,9 @@ error: `mut` must be followed by a named binding
--> $DIR/issue-32501.rs:7:9
|
LL | let mut _ = 0;
- | ^^^^^ help: remove the `mut` prefix: `_`
+ | ^^^^ help: remove the `mut` prefix
|
= note: `mut` may be followed by `variable` and `variable @ pattern`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-33262.stderr b/tests/ui/parser/issues/issue-33262.stderr
index 2aff32839..ec4934eb7 100644
--- a/tests/ui/parser/issues/issue-33262.stderr
+++ b/tests/ui/parser/issues/issue-33262.stderr
@@ -4,5 +4,5 @@ error: expected type, found `{`
LL | for i in 0..a as { }
| ^ expected type
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-33455.stderr b/tests/ui/parser/issues/issue-33455.stderr
index c535ef23b..573614a5e 100644
--- a/tests/ui/parser/issues/issue-33455.stderr
+++ b/tests/ui/parser/issues/issue-33455.stderr
@@ -4,5 +4,5 @@ error: expected one of `::`, `;`, or `as`, found `.`
LL | use foo.bar;
| ^ expected one of `::`, `;`, or `as`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-34222-1.stderr b/tests/ui/parser/issues/issue-34222-1.stderr
index b451484ba..b2a6ae93a 100644
--- a/tests/ui/parser/issues/issue-34222-1.stderr
+++ b/tests/ui/parser/issues/issue-34222-1.stderr
@@ -6,6 +6,6 @@ LL | /// comment
|
= help: doc comments must come before what they document, if a comment was intended use `//`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0585`.
diff --git a/tests/ui/parser/issues/issue-34255-1.stderr b/tests/ui/parser/issues/issue-34255-1.stderr
index 0e2b0d62e..1e72f040b 100644
--- a/tests/ui/parser/issues/issue-34255-1.stderr
+++ b/tests/ui/parser/issues/issue-34255-1.stderr
@@ -14,5 +14,5 @@ LL - Test::Drill(field: 42);
LL + Test::Drill(42);
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-39616.stderr b/tests/ui/parser/issues/issue-39616.stderr
index 393d1f2e2..da85bcb44 100644
--- a/tests/ui/parser/issues/issue-39616.stderr
+++ b/tests/ui/parser/issues/issue-39616.stderr
@@ -4,5 +4,5 @@ error: expected type, found `0`
LL | fn foo(a: [0; 1]) {}
| ^ expected type
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-43692.stderr b/tests/ui/parser/issues/issue-43692.stderr
index baf998035..1ce3aa671 100644
--- a/tests/ui/parser/issues/issue-43692.stderr
+++ b/tests/ui/parser/issues/issue-43692.stderr
@@ -4,5 +4,5 @@ error: invalid start of unicode escape: `_`
LL | '\u{_10FFFF}';
| ^ invalid start of unicode escape
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-44021.stderr b/tests/ui/parser/issues/issue-44021.stderr
index b888cd989..8a9326f90 100644
--- a/tests/ui/parser/issues/issue-44021.stderr
+++ b/tests/ui/parser/issues/issue-44021.stderr
@@ -4,5 +4,5 @@ error: expected one of `:`, `@`, or `|`, found `}`
LL | fn f() {|x, y}
| ^ expected one of `:`, `@`, or `|`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-44406.stderr b/tests/ui/parser/issues/issue-44406.stderr
index 69ff64c27..d005f116e 100644
--- a/tests/ui/parser/issues/issue-44406.stderr
+++ b/tests/ui/parser/issues/issue-44406.stderr
@@ -18,5 +18,5 @@ LL - bar(baz: $rest)
LL + bar(: $rest)
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-45296.stderr b/tests/ui/parser/issues/issue-45296.stderr
index 081a72054..1d2281df1 100644
--- a/tests/ui/parser/issues/issue-45296.stderr
+++ b/tests/ui/parser/issues/issue-45296.stderr
@@ -13,5 +13,5 @@ LL - #![allow(unused_variables)]
LL + #[allow(unused_variables)]
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-46186.stderr b/tests/ui/parser/issues/issue-46186.stderr
index 0766c8a33..c67c271e1 100644
--- a/tests/ui/parser/issues/issue-46186.stderr
+++ b/tests/ui/parser/issues/issue-46186.stderr
@@ -6,5 +6,5 @@ LL | };
|
= help: braced struct declarations are not followed by a semicolon
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-48508.rs b/tests/ui/parser/issues/issue-48508.rs
index 1e7db9df8..b66e09620 100644
--- a/tests/ui/parser/issues/issue-48508.rs
+++ b/tests/ui/parser/issues/issue-48508.rs
@@ -7,7 +7,6 @@
// issue-48508-aux.rs
// compile-flags:-g
-// ignore-asmjs wasm2js does not support source maps yet
#![allow(uncommon_codepoints)]
diff --git a/tests/ui/parser/issues/issue-48636.stderr b/tests/ui/parser/issues/issue-48636.stderr
index 6177870d1..488a046a5 100644
--- a/tests/ui/parser/issues/issue-48636.stderr
+++ b/tests/ui/parser/issues/issue-48636.stderr
@@ -10,6 +10,6 @@ LL | /// The ID of the parent core
|
= help: doc comments must come before what they document, if a comment was intended use `//`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0585`.
diff --git a/tests/ui/parser/issues/issue-51602.stderr b/tests/ui/parser/issues/issue-51602.stderr
index 4a5653fdb..7b50e0ad0 100644
--- a/tests/ui/parser/issues/issue-51602.stderr
+++ b/tests/ui/parser/issues/issue-51602.stderr
@@ -10,5 +10,5 @@ note: the `if` expression is missing a block after this condition
LL | if i in 1..10 {
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-5544-a.stderr b/tests/ui/parser/issues/issue-5544-a.stderr
index 6e68c7585..aeb134600 100644
--- a/tests/ui/parser/issues/issue-5544-a.stderr
+++ b/tests/ui/parser/issues/issue-5544-a.stderr
@@ -6,5 +6,5 @@ LL | let __isize = 340282366920938463463374607431768211456; // 2^128
|
= note: value exceeds limit of `340282366920938463463374607431768211455`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-5544-b.stderr b/tests/ui/parser/issues/issue-5544-b.stderr
index 5d0e76d5d..65e6f196b 100644
--- a/tests/ui/parser/issues/issue-5544-b.stderr
+++ b/tests/ui/parser/issues/issue-5544-b.stderr
@@ -6,5 +6,5 @@ LL | let __isize = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff_ff;
|
= note: value exceeds limit of `0xffffffffffffffffffffffffffffffff`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-56031.stderr b/tests/ui/parser/issues/issue-56031.stderr
index 2fa05dd2d..8031bf82f 100644
--- a/tests/ui/parser/issues/issue-56031.stderr
+++ b/tests/ui/parser/issues/issue-56031.stderr
@@ -14,5 +14,5 @@ LL - impl for T {}
LL + impl T {}
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-57198.stderr b/tests/ui/parser/issues/issue-57198.stderr
index dd70b4022..dca0d3ea4 100644
--- a/tests/ui/parser/issues/issue-57198.stderr
+++ b/tests/ui/parser/issues/issue-57198.stderr
@@ -9,5 +9,5 @@ help: escape `for` to use it as an identifier
LL | m::r#for();
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-5806.stderr b/tests/ui/parser/issues/issue-5806.stderr
index bdb5c91ff..4b025bd19 100644
--- a/tests/ui/parser/issues/issue-5806.stderr
+++ b/tests/ui/parser/issues/issue-5806.stderr
@@ -4,5 +4,5 @@ error: couldn't read $DIR/../parser: $ACCESS_DENIED_MSG (os error $ACCESS_DENIED
LL | mod foo;
| ^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs b/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs
index a596a9f2d..a2ea8ad36 100644
--- a/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs
+++ b/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs
@@ -1,5 +1,5 @@
// Fixed in #66054.
// ignore-tidy-trailing-newlines
// error-pattern: this file contains an unclosed delimiter
-// error-pattern: aborting due to previous error
+// error-pattern: aborting due to 1 previous error
#[Ѕ \ No newline at end of file
diff --git a/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.stderr b/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.stderr
index c79e8b4fb..14f5469f6 100644
--- a/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.stderr
+++ b/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.stderr
@@ -6,5 +6,5 @@ LL | #[Ѕ
| |
| unclosed delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-58856-1.stderr b/tests/ui/parser/issues/issue-58856-1.stderr
index 77ad8acbd..2c3334391 100644
--- a/tests/ui/parser/issues/issue-58856-1.stderr
+++ b/tests/ui/parser/issues/issue-58856-1.stderr
@@ -8,5 +8,5 @@ LL | fn b(self>
LL | }
| ^ mismatched closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-58856-2.stderr b/tests/ui/parser/issues/issue-58856-2.stderr
index 5fcf5bcc1..d3255fca0 100644
--- a/tests/ui/parser/issues/issue-58856-2.stderr
+++ b/tests/ui/parser/issues/issue-58856-2.stderr
@@ -9,5 +9,5 @@ LL | fn how_are_you(&self -> Empty {
LL | }
| ^ mismatched closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-60075.stderr b/tests/ui/parser/issues/issue-60075.stderr
index cd8f1231f..b40412aba 100644
--- a/tests/ui/parser/issues/issue-60075.stderr
+++ b/tests/ui/parser/issues/issue-60075.stderr
@@ -7,5 +7,5 @@ LL | let _ = if true {
LL | });
| ^ mismatched closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-61858.stderr b/tests/ui/parser/issues/issue-61858.stderr
index 03f51c6e3..6bdfec938 100644
--- a/tests/ui/parser/issues/issue-61858.stderr
+++ b/tests/ui/parser/issues/issue-61858.stderr
@@ -10,5 +10,5 @@ note: the `if` expression is missing a block after this condition
LL | (if foobar)
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-62524.rs b/tests/ui/parser/issues/issue-62524.rs
index fa7c626f5..dd86fc9a7 100644
--- a/tests/ui/parser/issues/issue-62524.rs
+++ b/tests/ui/parser/issues/issue-62524.rs
@@ -1,5 +1,5 @@
// ignore-tidy-trailing-newlines
-// error-pattern: aborting due to previous error
+// error-pattern: aborting due to 1 previous error
#![allow(uncommon_codepoints)]
y![
diff --git a/tests/ui/parser/issues/issue-62524.stderr b/tests/ui/parser/issues/issue-62524.stderr
index 0cbaacd4c..d83a49aed 100644
--- a/tests/ui/parser/issues/issue-62524.stderr
+++ b/tests/ui/parser/issues/issue-62524.stderr
@@ -6,5 +6,5 @@ LL | y![
LL | Ϥ,
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-62546.stderr b/tests/ui/parser/issues/issue-62546.stderr
index 80c1c7168..6889cb3b8 100644
--- a/tests/ui/parser/issues/issue-62546.stderr
+++ b/tests/ui/parser/issues/issue-62546.stderr
@@ -4,5 +4,5 @@ error: this file contains an unclosed delimiter
LL | pub t(#
| - unclosed delimiter ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-62554.stderr b/tests/ui/parser/issues/issue-62554.stderr
index 4637c795a..37314dd39 100644
--- a/tests/ui/parser/issues/issue-62554.stderr
+++ b/tests/ui/parser/issues/issue-62554.stderr
@@ -9,5 +9,5 @@ LL | fn foo(u: u8) { if u8 macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s
| | | unclosed delimiter
| unclosed delimiter unclosed delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-62660.stderr b/tests/ui/parser/issues/issue-62660.stderr
index 14c0bdcb1..310b433f2 100644
--- a/tests/ui/parser/issues/issue-62660.stderr
+++ b/tests/ui/parser/issues/issue-62660.stderr
@@ -9,5 +9,5 @@ help: you might have meant to end the type parameters here
LL | pub fn foo(_: i32, self: Box<Self>) {}
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-62881.stderr b/tests/ui/parser/issues/issue-62881.stderr
index e57cbd181..2165a81a0 100644
--- a/tests/ui/parser/issues/issue-62881.stderr
+++ b/tests/ui/parser/issues/issue-62881.stderr
@@ -4,5 +4,5 @@ error: this file contains an unclosed delimiter
LL | fn f() -> isize { fn f() -> isize {} pub f<
| - unclosed delimiter ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-62894.stderr b/tests/ui/parser/issues/issue-62894.stderr
index 700479076..870633fc9 100644
--- a/tests/ui/parser/issues/issue-62894.stderr
+++ b/tests/ui/parser/issues/issue-62894.stderr
@@ -10,5 +10,5 @@ LL |
LL | fn main() {}
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-63135.rs b/tests/ui/parser/issues/issue-63135.rs
index d61197dc5..2e1ac080b 100644
--- a/tests/ui/parser/issues/issue-63135.rs
+++ b/tests/ui/parser/issues/issue-63135.rs
@@ -1,3 +1,3 @@
// error-pattern: this file contains an unclosed delimiter
-// error-pattern: aborting due to previous error
+// error-pattern: aborting due to 1 previous error
fn i(n{...,f #
diff --git a/tests/ui/parser/issues/issue-63135.stderr b/tests/ui/parser/issues/issue-63135.stderr
index ff9d99c28..9204f561e 100644
--- a/tests/ui/parser/issues/issue-63135.stderr
+++ b/tests/ui/parser/issues/issue-63135.stderr
@@ -7,5 +7,5 @@ LL | fn i(n{...,f #
| | unclosed delimiter
| unclosed delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-65122-mac-invoc-in-mut-patterns.stderr b/tests/ui/parser/issues/issue-65122-mac-invoc-in-mut-patterns.stderr
index 8c032e588..2bd87ee0c 100644
--- a/tests/ui/parser/issues/issue-65122-mac-invoc-in-mut-patterns.stderr
+++ b/tests/ui/parser/issues/issue-65122-mac-invoc-in-mut-patterns.stderr
@@ -2,7 +2,7 @@ error: `mut` must be followed by a named binding
--> $DIR/issue-65122-mac-invoc-in-mut-patterns.rs:6:13
|
LL | let mut $eval = ();
- | ^^^^^^^^^ help: remove the `mut` prefix: `does_not_exist!()`
+ | ^^^^ help: remove the `mut` prefix
...
LL | mac1! { does_not_exist!() }
| --------------------------- in this macro invocation
@@ -25,7 +25,7 @@ error: `mut` must be followed by a named binding
--> $DIR/issue-65122-mac-invoc-in-mut-patterns.rs:13:13
|
LL | let mut $eval = ();
- | ^^^ help: remove the `mut` prefix: `does_not_exist!()`
+ | ^^^ help: remove the `mut` prefix
...
LL | mac2! { does_not_exist!() }
| --------------------------- in this macro invocation
diff --git a/tests/ui/parser/issues/issue-6610.stderr b/tests/ui/parser/issues/issue-6610.stderr
index 4a3bc7525..83fc02996 100644
--- a/tests/ui/parser/issues/issue-6610.stderr
+++ b/tests/ui/parser/issues/issue-6610.stderr
@@ -6,5 +6,5 @@ LL | trait Foo { fn a() }
| |
| while parsing this `fn`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-66357-unexpected-unreachable.stderr b/tests/ui/parser/issues/issue-66357-unexpected-unreachable.stderr
index 079fff37e..a265cbf70 100644
--- a/tests/ui/parser/issues/issue-66357-unexpected-unreachable.stderr
+++ b/tests/ui/parser/issues/issue-66357-unexpected-unreachable.stderr
@@ -7,5 +7,5 @@ LL | fn f() { |[](* }
| | unclosed delimiter
| closing delimiter possibly meant for this
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-68091-unicode-ident-after-if.stderr b/tests/ui/parser/issues/issue-68091-unicode-ident-after-if.stderr
index 6674b924e..2423a7526 100644
--- a/tests/ui/parser/issues/issue-68091-unicode-ident-after-if.stderr
+++ b/tests/ui/parser/issues/issue-68091-unicode-ident-after-if.stderr
@@ -6,5 +6,5 @@ LL | $($c)ö* {}
| |
| expected condition here
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-68092-unicode-ident-after-incomplete-expr.stderr b/tests/ui/parser/issues/issue-68092-unicode-ident-after-incomplete-expr.stderr
index 0b9c364f1..43047ff88 100644
--- a/tests/ui/parser/issues/issue-68092-unicode-ident-after-incomplete-expr.stderr
+++ b/tests/ui/parser/issues/issue-68092-unicode-ident-after-incomplete-expr.stderr
@@ -4,5 +4,5 @@ error: macro expansion ends with an incomplete expression: expected expression
LL | $($c)ö*
| ^ expected expression
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-68890.stderr b/tests/ui/parser/issues/issue-68890.stderr
index 0d7b53a67..43ed69dcf 100644
--- a/tests/ui/parser/issues/issue-68890.stderr
+++ b/tests/ui/parser/issues/issue-68890.stderr
@@ -8,7 +8,11 @@ error: expected one of `)`, `+`, or `,`, found `a`
--> $DIR/issue-68890.rs:1:15
|
LL | enum e{A((?'a a+?+l))}
- | ^ expected one of `)`, `+`, or `,`
+ | - ^ expected one of `)`, `+`, or `,`
+ | |
+ | while parsing this enum
+ |
+ = help: enum variants can be `Variant`, `Variant = <integer>`, `Variant(Type, ..., TypeN)` or `Variant { fields: Types }`
error: expected item, found `)`
--> $DIR/issue-68890.rs:1:21
diff --git a/tests/ui/parser/issues/issue-68987-unmatch-issue-1.stderr b/tests/ui/parser/issues/issue-68987-unmatch-issue-1.stderr
index 2d873b461..5b5d45a7e 100644
--- a/tests/ui/parser/issues/issue-68987-unmatch-issue-1.stderr
+++ b/tests/ui/parser/issues/issue-68987-unmatch-issue-1.stderr
@@ -12,5 +12,5 @@ LL | }
LL | }
| ^ unexpected closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-68987-unmatch-issue.stderr b/tests/ui/parser/issues/issue-68987-unmatch-issue.stderr
index cabd13324..782b85f09 100644
--- a/tests/ui/parser/issues/issue-68987-unmatch-issue.stderr
+++ b/tests/ui/parser/issues/issue-68987-unmatch-issue.stderr
@@ -12,5 +12,5 @@ LL | }
LL | }
| ^ unexpected closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-69259.stderr b/tests/ui/parser/issues/issue-69259.stderr
index 604b7de33..a8487b5f4 100644
--- a/tests/ui/parser/issues/issue-69259.stderr
+++ b/tests/ui/parser/issues/issue-69259.stderr
@@ -4,5 +4,5 @@ error: unexpected closing delimiter: `)`
LL | fn f) {}
| ^ unexpected closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-70552-ascription-in-parens-after-call.stderr b/tests/ui/parser/issues/issue-70552-ascription-in-parens-after-call.stderr
index f03c92e1b..14cf52ce6 100644
--- a/tests/ui/parser/issues/issue-70552-ascription-in-parens-after-call.stderr
+++ b/tests/ui/parser/issues/issue-70552-ascription-in-parens-after-call.stderr
@@ -4,5 +4,5 @@ error: expected expression, found `:`
LL | expr as fun()(:);
| ^ expected expression
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-70583-block-is-empty-1.stderr b/tests/ui/parser/issues/issue-70583-block-is-empty-1.stderr
index 46cbb056d..c4621b2b8 100644
--- a/tests/ui/parser/issues/issue-70583-block-is-empty-1.stderr
+++ b/tests/ui/parser/issues/issue-70583-block-is-empty-1.stderr
@@ -9,5 +9,5 @@ LL | }
LL | }
| ^ unexpected closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-70583-block-is-empty-2.stderr b/tests/ui/parser/issues/issue-70583-block-is-empty-2.stderr
index c590e04bb..a21cd4875 100644
--- a/tests/ui/parser/issues/issue-70583-block-is-empty-2.stderr
+++ b/tests/ui/parser/issues/issue-70583-block-is-empty-2.stderr
@@ -12,5 +12,5 @@ LL | ErrorHandled::Reported => {}}
LL | }
| ^ unexpected closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-72253.stderr b/tests/ui/parser/issues/issue-72253.stderr
index 477fa09f4..c4fc662f5 100644
--- a/tests/ui/parser/issues/issue-72253.stderr
+++ b/tests/ui/parser/issues/issue-72253.stderr
@@ -6,5 +6,5 @@ LL | .arg("1")
LL | ,arg("2")
| ^ unexpected token
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-72373.stderr b/tests/ui/parser/issues/issue-72373.stderr
index 0bb99a01e..c596c6abd 100644
--- a/tests/ui/parser/issues/issue-72373.stderr
+++ b/tests/ui/parser/issues/issue-72373.stderr
@@ -9,5 +9,5 @@ help: if you meant to bind the contents of the rest of the array pattern into `t
LL | [h, ref ts @ ..] => foo(c, n - h) + foo(ts, n),
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-76437-async.stderr b/tests/ui/parser/issues/issue-76437-async.stderr
index 2c9c2a8cf..7f2df5c87 100644
--- a/tests/ui/parser/issues/issue-76437-async.stderr
+++ b/tests/ui/parser/issues/issue-76437-async.stderr
@@ -7,5 +7,5 @@ LL | async pub fn t() {}
| | expected one of `extern`, `fn`, or `unsafe`
| help: visibility `pub` must come before `async`: `pub async`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-76437-const-async-unsafe.stderr b/tests/ui/parser/issues/issue-76437-const-async-unsafe.stderr
index 2e91beda1..a703fc4e8 100644
--- a/tests/ui/parser/issues/issue-76437-const-async-unsafe.stderr
+++ b/tests/ui/parser/issues/issue-76437-const-async-unsafe.stderr
@@ -7,5 +7,5 @@ LL | const async unsafe pub fn t() {}
| | expected one of `extern` or `fn`
| help: visibility `pub` must come before `const async unsafe`: `pub const async unsafe`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-76437-const-async.stderr b/tests/ui/parser/issues/issue-76437-const-async.stderr
index 21b96c14d..a9acccdce 100644
--- a/tests/ui/parser/issues/issue-76437-const-async.stderr
+++ b/tests/ui/parser/issues/issue-76437-const-async.stderr
@@ -7,5 +7,5 @@ LL | const async pub fn t() {}
| | expected one of `extern`, `fn`, or `unsafe`
| help: visibility `pub` must come before `const async`: `pub const async`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-76437-const.stderr b/tests/ui/parser/issues/issue-76437-const.stderr
index cf80d9a90..4c36d773d 100644
--- a/tests/ui/parser/issues/issue-76437-const.stderr
+++ b/tests/ui/parser/issues/issue-76437-const.stderr
@@ -7,5 +7,5 @@ LL | const pub fn t() {}
| | expected one of `async`, `extern`, `fn`, or `unsafe`
| help: visibility `pub` must come before `const`: `pub const`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-76437-pub-crate-unsafe.stderr b/tests/ui/parser/issues/issue-76437-pub-crate-unsafe.stderr
index fa8f13721..4ea76179b 100644
--- a/tests/ui/parser/issues/issue-76437-pub-crate-unsafe.stderr
+++ b/tests/ui/parser/issues/issue-76437-pub-crate-unsafe.stderr
@@ -7,5 +7,5 @@ LL | unsafe pub(crate) fn t() {}
| | expected one of `extern` or `fn`
| help: visibility `pub(crate)` must come before `unsafe`: `pub(crate) unsafe`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-76437-unsafe.stderr b/tests/ui/parser/issues/issue-76437-unsafe.stderr
index c63292ef8..69f792775 100644
--- a/tests/ui/parser/issues/issue-76437-unsafe.stderr
+++ b/tests/ui/parser/issues/issue-76437-unsafe.stderr
@@ -7,5 +7,5 @@ LL | unsafe pub fn t() {}
| | expected one of `extern` or `fn`
| help: visibility `pub` must come before `unsafe`: `pub unsafe`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-76597.stderr b/tests/ui/parser/issues/issue-76597.stderr
index 50b23329f..25858981c 100644
--- a/tests/ui/parser/issues/issue-76597.stderr
+++ b/tests/ui/parser/issues/issue-76597.stderr
@@ -9,5 +9,5 @@ LL | ... x: u8
LL | ... y: u8,
| ^ unexpected token
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-7970b.stderr b/tests/ui/parser/issues/issue-7970b.stderr
index a62226a8a..b23b09e75 100644
--- a/tests/ui/parser/issues/issue-7970b.stderr
+++ b/tests/ui/parser/issues/issue-7970b.stderr
@@ -4,5 +4,5 @@ error: unexpected end of macro invocation
LL | macro_rules! test {}
| ^^^^^^^^^^^^^^^^^^^^ missing tokens in macro arguments
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-81806.stderr b/tests/ui/parser/issues/issue-81806.stderr
index 40873388d..f1287b82f 100644
--- a/tests/ui/parser/issues/issue-81806.stderr
+++ b/tests/ui/parser/issues/issue-81806.stderr
@@ -13,5 +13,5 @@ help: escape `impl` to use it as an identifier
LL | r#impl
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-83639.stderr b/tests/ui/parser/issues/issue-83639.stderr
index 4c10df191..87218a448 100644
--- a/tests/ui/parser/issues/issue-83639.stderr
+++ b/tests/ui/parser/issues/issue-83639.stderr
@@ -4,5 +4,5 @@ error: expected one of `.`, `;`, `?`, `}`, or an operator, found `" "`
LL | """ "
| ^^^^^^ expected one of `.`, `;`, `?`, `}`, or an operator
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-84104.stderr b/tests/ui/parser/issues/issue-84104.stderr
index 7ad59f845..e866d3922 100644
--- a/tests/ui/parser/issues/issue-84104.stderr
+++ b/tests/ui/parser/issues/issue-84104.stderr
@@ -6,5 +6,5 @@ LL | #[i=i::<ښܖ<
| |
| unclosed delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-84148-2.stderr b/tests/ui/parser/issues/issue-84148-2.stderr
index 20761180e..d9b6b336a 100644
--- a/tests/ui/parser/issues/issue-84148-2.stderr
+++ b/tests/ui/parser/issues/issue-84148-2.stderr
@@ -6,5 +6,5 @@ LL | fn f(t:for<>t?
| |
| unclosed delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-8537.stderr b/tests/ui/parser/issues/issue-8537.stderr
index 523cc9dc5..0d636bd28 100644
--- a/tests/ui/parser/issues/issue-8537.stderr
+++ b/tests/ui/parser/issues/issue-8537.stderr
@@ -6,6 +6,6 @@ LL | "invalid-ab_isize"
|
= note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions.
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0703`.
diff --git a/tests/ui/parser/issues/issue-86895.stderr b/tests/ui/parser/issues/issue-86895.stderr
index 575d857c0..dcde7242d 100644
--- a/tests/ui/parser/issues/issue-86895.stderr
+++ b/tests/ui/parser/issues/issue-86895.stderr
@@ -4,5 +4,5 @@ error: expected one of `async`, `extern`, `fn`, or `unsafe`, found keyword `pub`
LL | const pub () {}
| ^^^ expected one of `async`, `extern`, `fn`, or `unsafe`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.stderr b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.stderr
index e9eb14bf0..74989502e 100644
--- a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.stderr
+++ b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.stderr
@@ -9,5 +9,5 @@ LL | unsafe async fn test() {}
|
= note: keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.stderr b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.stderr
index 0d2bc3472..5958f0c7d 100644
--- a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.stderr
+++ b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.stderr
@@ -9,5 +9,5 @@ LL | unsafe const fn test() {}
|
= note: keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.stderr b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.stderr
index 4224713cc..0e9f7c51e 100644
--- a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.stderr
+++ b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.stderr
@@ -9,5 +9,5 @@ LL | extern unsafe fn test() {}
|
= note: keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-87694-duplicated-pub.stderr b/tests/ui/parser/issues/issue-87694-duplicated-pub.stderr
index 8d242bc9d..a21023865 100644
--- a/tests/ui/parser/issues/issue-87694-duplicated-pub.stderr
+++ b/tests/ui/parser/issues/issue-87694-duplicated-pub.stderr
@@ -13,5 +13,5 @@ note: explicit visibility first seen here
LL | pub const pub fn test() {}
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-87694-misplaced-pub.stderr b/tests/ui/parser/issues/issue-87694-misplaced-pub.stderr
index 94c6a29ef..6f686a7e5 100644
--- a/tests/ui/parser/issues/issue-87694-misplaced-pub.stderr
+++ b/tests/ui/parser/issues/issue-87694-misplaced-pub.stderr
@@ -7,5 +7,5 @@ LL | const pub fn test() {}
| | expected one of `async`, `extern`, `fn`, or `unsafe`
| help: visibility `pub` must come before `const`: `pub const`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-87812-path.stderr b/tests/ui/parser/issues/issue-87812-path.stderr
index d045f4821..fbe26ea39 100644
--- a/tests/ui/parser/issues/issue-87812-path.stderr
+++ b/tests/ui/parser/issues/issue-87812-path.stderr
@@ -11,6 +11,6 @@ LL | foo!(Baz);
|
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/parser/issues/issue-87812.stderr b/tests/ui/parser/issues/issue-87812.stderr
index d61ee23a5..35dc66a52 100644
--- a/tests/ui/parser/issues/issue-87812.stderr
+++ b/tests/ui/parser/issues/issue-87812.stderr
@@ -18,5 +18,5 @@ help: wrap this expression in parentheses
LL | break '_l ($f);
| + +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-88770.stderr b/tests/ui/parser/issues/issue-88770.stderr
index 836f44953..60ef025fa 100644
--- a/tests/ui/parser/issues/issue-88770.stderr
+++ b/tests/ui/parser/issues/issue-88770.stderr
@@ -10,5 +10,5 @@ LL | fn m(){print!("",(c for&g
LL | e
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-88818.stderr b/tests/ui/parser/issues/issue-88818.stderr
index 6e624c5a2..10e016106 100644
--- a/tests/ui/parser/issues/issue-88818.stderr
+++ b/tests/ui/parser/issues/issue-88818.stderr
@@ -14,5 +14,5 @@ LL - impl for S { }
LL + impl S { }
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-89388.stderr b/tests/ui/parser/issues/issue-89388.stderr
index 366d05c2d..d4987234a 100644
--- a/tests/ui/parser/issues/issue-89388.stderr
+++ b/tests/ui/parser/issues/issue-89388.stderr
@@ -9,5 +9,5 @@ help: types that don't start with an identifier need to be surrounded with angle
LL | let _ = option.map(<[_]>::to_vec);
| + +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-89574.stderr b/tests/ui/parser/issues/issue-89574.stderr
index fb1312c78..5f8f6f939 100644
--- a/tests/ui/parser/issues/issue-89574.stderr
+++ b/tests/ui/parser/issues/issue-89574.stderr
@@ -4,5 +4,5 @@ error: missing type for `const` item
LL | const EMPTY_ARRAY = [];
| ^ help: provide a type for the item: `: <type>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.stderr b/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.stderr
index a5ee24445..51df17c7c 100644
--- a/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.stderr
+++ b/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.stderr
@@ -14,5 +14,5 @@ LL - #![deny(missing_docs)]
LL + #[deny(missing_docs)]
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-91421.stderr b/tests/ui/parser/issues/issue-91421.stderr
index 2d9652051..99339a285 100644
--- a/tests/ui/parser/issues/issue-91421.stderr
+++ b/tests/ui/parser/issues/issue-91421.stderr
@@ -10,5 +10,5 @@ help: this binary operation is possibly unfinished
LL | let value = if true && {
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-93867.stderr b/tests/ui/parser/issues/issue-93867.stderr
index ee0cb4efd..c653c8dd4 100644
--- a/tests/ui/parser/issues/issue-93867.stderr
+++ b/tests/ui/parser/issues/issue-93867.stderr
@@ -9,5 +9,5 @@ help: you might have meant to end the type parameters here
LL | pub fn entry<'a, K, V>() -> Entry<'a> K, V> {
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-98601-delimiter-error-1.stderr b/tests/ui/parser/issues/issue-98601-delimiter-error-1.stderr
index d568a4c58..7dd059c6e 100644
--- a/tests/ui/parser/issues/issue-98601-delimiter-error-1.stderr
+++ b/tests/ui/parser/issues/issue-98601-delimiter-error-1.stderr
@@ -12,5 +12,5 @@ LL | }
LL | }
| ^ unexpected closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-98601-delimiter-error-unexpected-close.stderr b/tests/ui/parser/issues/issue-98601-delimiter-error-unexpected-close.stderr
index 81dd39bb7..5e4b4dd30 100644
--- a/tests/ui/parser/issues/issue-98601-delimiter-error-unexpected-close.stderr
+++ b/tests/ui/parser/issues/issue-98601-delimiter-error-unexpected-close.stderr
@@ -10,5 +10,5 @@ LL |
LL | fn other(_: i32)) {}
| ^ unexpected closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.stderr b/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.stderr
index edc640bf5..c503bc3cc 100644
--- a/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.stderr
+++ b/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.stderr
@@ -4,5 +4,5 @@ error: `enum` and `struct` are mutually exclusive
LL | pub enum struct Range {
| ^^^^^^^^^^^ help: replace `enum struct` with: `enum`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/issues/recover-ge-as-fat-arrow.fixed b/tests/ui/parser/issues/recover-ge-as-fat-arrow.fixed
new file mode 100644
index 000000000..7b73dfb02
--- /dev/null
+++ b/tests/ui/parser/issues/recover-ge-as-fat-arrow.fixed
@@ -0,0 +1,7 @@
+// run-rustfix
+fn main() {
+ match 1 {
+ 1 => {} //~ ERROR
+ _ => { let _: u16 = 2u16; } //~ ERROR
+ }
+}
diff --git a/tests/ui/parser/issues/recover-ge-as-fat-arrow.rs b/tests/ui/parser/issues/recover-ge-as-fat-arrow.rs
new file mode 100644
index 000000000..92143fcf3
--- /dev/null
+++ b/tests/ui/parser/issues/recover-ge-as-fat-arrow.rs
@@ -0,0 +1,7 @@
+// run-rustfix
+fn main() {
+ match 1 {
+ 1 >= {} //~ ERROR
+ _ => { let _: u16 = 2u8; } //~ ERROR
+ }
+}
diff --git a/tests/ui/parser/issues/recover-ge-as-fat-arrow.stderr b/tests/ui/parser/issues/recover-ge-as-fat-arrow.stderr
new file mode 100644
index 000000000..2df5cca24
--- /dev/null
+++ b/tests/ui/parser/issues/recover-ge-as-fat-arrow.stderr
@@ -0,0 +1,25 @@
+error: expected one of `...`, `..=`, `..`, `=>`, `if`, or `|`, found `>=`
+ --> $DIR/recover-ge-as-fat-arrow.rs:4:11
+ |
+LL | 1 >= {}
+ | ^^
+ | |
+ | expected one of `...`, `..=`, `..`, `=>`, `if`, or `|`
+ | help: use a fat arrow to start a match arm: `=>`
+
+error[E0308]: mismatched types
+ --> $DIR/recover-ge-as-fat-arrow.rs:5:29
+ |
+LL | _ => { let _: u16 = 2u8; }
+ | --- ^^^ expected `u16`, found `u8`
+ | |
+ | expected due to this
+ |
+help: change the type of the numeric literal from `u8` to `u16`
+ |
+LL | _ => { let _: u16 = 2u16; }
+ | ~~~
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/parser/keyword-abstract.stderr b/tests/ui/parser/keyword-abstract.stderr
index b7d1ce7cd..156e098da 100644
--- a/tests/ui/parser/keyword-abstract.stderr
+++ b/tests/ui/parser/keyword-abstract.stderr
@@ -9,5 +9,5 @@ help: escape `abstract` to use it as an identifier
LL | let r#abstract = ();
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-as-as-identifier.stderr b/tests/ui/parser/keyword-as-as-identifier.stderr
index 3c5ad950d..bc654cbc7 100644
--- a/tests/ui/parser/keyword-as-as-identifier.stderr
+++ b/tests/ui/parser/keyword-as-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `as` to use it as an identifier
LL | let r#as = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-break-as-identifier.stderr b/tests/ui/parser/keyword-break-as-identifier.stderr
index a4535eb40..63a9cbae5 100644
--- a/tests/ui/parser/keyword-break-as-identifier.stderr
+++ b/tests/ui/parser/keyword-break-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `break` to use it as an identifier
LL | let r#break = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-const-as-identifier.stderr b/tests/ui/parser/keyword-const-as-identifier.stderr
index 31922f150..61e454174 100644
--- a/tests/ui/parser/keyword-const-as-identifier.stderr
+++ b/tests/ui/parser/keyword-const-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `const` to use it as an identifier
LL | let r#const = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-continue-as-identifier.stderr b/tests/ui/parser/keyword-continue-as-identifier.stderr
index 81285633f..2519000d2 100644
--- a/tests/ui/parser/keyword-continue-as-identifier.stderr
+++ b/tests/ui/parser/keyword-continue-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `continue` to use it as an identifier
LL | let r#continue = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-else-as-identifier.stderr b/tests/ui/parser/keyword-else-as-identifier.stderr
index 2125fe84a..e3eafa8fb 100644
--- a/tests/ui/parser/keyword-else-as-identifier.stderr
+++ b/tests/ui/parser/keyword-else-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `else` to use it as an identifier
LL | let r#else = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-enum-as-identifier.stderr b/tests/ui/parser/keyword-enum-as-identifier.stderr
index 92d092ccb..280f8a2e1 100644
--- a/tests/ui/parser/keyword-enum-as-identifier.stderr
+++ b/tests/ui/parser/keyword-enum-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `enum` to use it as an identifier
LL | let r#enum = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-final.stderr b/tests/ui/parser/keyword-final.stderr
index f1f9f2e2c..74866c9e7 100644
--- a/tests/ui/parser/keyword-final.stderr
+++ b/tests/ui/parser/keyword-final.stderr
@@ -9,5 +9,5 @@ help: escape `final` to use it as an identifier
LL | let r#final = ();
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-fn-as-identifier.stderr b/tests/ui/parser/keyword-fn-as-identifier.stderr
index 645efbcae..32fff1a61 100644
--- a/tests/ui/parser/keyword-fn-as-identifier.stderr
+++ b/tests/ui/parser/keyword-fn-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `fn` to use it as an identifier
LL | let r#fn = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-for-as-identifier.stderr b/tests/ui/parser/keyword-for-as-identifier.stderr
index 26407cc4d..813bb3f3b 100644
--- a/tests/ui/parser/keyword-for-as-identifier.stderr
+++ b/tests/ui/parser/keyword-for-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `for` to use it as an identifier
LL | let r#for = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-if-as-identifier.stderr b/tests/ui/parser/keyword-if-as-identifier.stderr
index 26f9a15a7..245ff8977 100644
--- a/tests/ui/parser/keyword-if-as-identifier.stderr
+++ b/tests/ui/parser/keyword-if-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `if` to use it as an identifier
LL | let r#if = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-impl-as-identifier.stderr b/tests/ui/parser/keyword-impl-as-identifier.stderr
index 73a50bc38..fe840ba3d 100644
--- a/tests/ui/parser/keyword-impl-as-identifier.stderr
+++ b/tests/ui/parser/keyword-impl-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `impl` to use it as an identifier
LL | let r#impl = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-in-as-identifier.stderr b/tests/ui/parser/keyword-in-as-identifier.stderr
index 98332b723..12fc0479f 100644
--- a/tests/ui/parser/keyword-in-as-identifier.stderr
+++ b/tests/ui/parser/keyword-in-as-identifier.stderr
@@ -4,5 +4,5 @@ error: expected pattern, found keyword `in`
LL | let in = "foo";
| ^^ expected pattern
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-let-as-identifier.stderr b/tests/ui/parser/keyword-let-as-identifier.stderr
index 86faaed38..69f570aa8 100644
--- a/tests/ui/parser/keyword-let-as-identifier.stderr
+++ b/tests/ui/parser/keyword-let-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `let` to use it as an identifier
LL | let r#let = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-loop-as-identifier.stderr b/tests/ui/parser/keyword-loop-as-identifier.stderr
index 304ad61cc..ff14af0c7 100644
--- a/tests/ui/parser/keyword-loop-as-identifier.stderr
+++ b/tests/ui/parser/keyword-loop-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `loop` to use it as an identifier
LL | let r#loop = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-match-as-identifier.stderr b/tests/ui/parser/keyword-match-as-identifier.stderr
index 25ac397fb..3811ef058 100644
--- a/tests/ui/parser/keyword-match-as-identifier.stderr
+++ b/tests/ui/parser/keyword-match-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `match` to use it as an identifier
LL | let r#match = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-mod-as-identifier.stderr b/tests/ui/parser/keyword-mod-as-identifier.stderr
index d5688e871..c60d6f129 100644
--- a/tests/ui/parser/keyword-mod-as-identifier.stderr
+++ b/tests/ui/parser/keyword-mod-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `mod` to use it as an identifier
LL | let r#mod = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-move-as-identifier.stderr b/tests/ui/parser/keyword-move-as-identifier.stderr
index 75653cffc..91cded8e9 100644
--- a/tests/ui/parser/keyword-move-as-identifier.stderr
+++ b/tests/ui/parser/keyword-move-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `move` to use it as an identifier
LL | let r#move = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-mut-as-identifier.stderr b/tests/ui/parser/keyword-mut-as-identifier.stderr
index 040960835..335b31a20 100644
--- a/tests/ui/parser/keyword-mut-as-identifier.stderr
+++ b/tests/ui/parser/keyword-mut-as-identifier.stderr
@@ -4,5 +4,5 @@ error: expected identifier, found `=`
LL | let mut = "foo";
| ^ expected identifier
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-override.stderr b/tests/ui/parser/keyword-override.stderr
index cdb573686..108a621a2 100644
--- a/tests/ui/parser/keyword-override.stderr
+++ b/tests/ui/parser/keyword-override.stderr
@@ -9,5 +9,5 @@ help: escape `override` to use it as an identifier
LL | let r#override = ();
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-pub-as-identifier.stderr b/tests/ui/parser/keyword-pub-as-identifier.stderr
index 8d513507c..ec62fd4cf 100644
--- a/tests/ui/parser/keyword-pub-as-identifier.stderr
+++ b/tests/ui/parser/keyword-pub-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `pub` to use it as an identifier
LL | let r#pub = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-ref-as-identifier.stderr b/tests/ui/parser/keyword-ref-as-identifier.stderr
index 618043d89..54c258d7a 100644
--- a/tests/ui/parser/keyword-ref-as-identifier.stderr
+++ b/tests/ui/parser/keyword-ref-as-identifier.stderr
@@ -4,5 +4,5 @@ error: expected identifier, found `=`
LL | let ref = "foo";
| ^ expected identifier
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-return-as-identifier.stderr b/tests/ui/parser/keyword-return-as-identifier.stderr
index eeb8e468b..9e41d0ccb 100644
--- a/tests/ui/parser/keyword-return-as-identifier.stderr
+++ b/tests/ui/parser/keyword-return-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `return` to use it as an identifier
LL | let r#return = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-static-as-identifier.stderr b/tests/ui/parser/keyword-static-as-identifier.stderr
index a3213e2f2..76fb3afd6 100644
--- a/tests/ui/parser/keyword-static-as-identifier.stderr
+++ b/tests/ui/parser/keyword-static-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `static` to use it as an identifier
LL | let r#static = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-struct-as-identifier.stderr b/tests/ui/parser/keyword-struct-as-identifier.stderr
index b73361a55..89eb644e1 100644
--- a/tests/ui/parser/keyword-struct-as-identifier.stderr
+++ b/tests/ui/parser/keyword-struct-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `struct` to use it as an identifier
LL | let r#struct = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-trait-as-identifier.stderr b/tests/ui/parser/keyword-trait-as-identifier.stderr
index 56ef5f606..3f19f6f3c 100644
--- a/tests/ui/parser/keyword-trait-as-identifier.stderr
+++ b/tests/ui/parser/keyword-trait-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `trait` to use it as an identifier
LL | let r#trait = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-try-as-identifier-edition2018.stderr b/tests/ui/parser/keyword-try-as-identifier-edition2018.stderr
index 94a106d47..ded652302 100644
--- a/tests/ui/parser/keyword-try-as-identifier-edition2018.stderr
+++ b/tests/ui/parser/keyword-try-as-identifier-edition2018.stderr
@@ -9,5 +9,5 @@ help: escape `try` to use it as an identifier
LL | let r#try = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-type-as-identifier.stderr b/tests/ui/parser/keyword-type-as-identifier.stderr
index 624c1006b..5e6c6d9e1 100644
--- a/tests/ui/parser/keyword-type-as-identifier.stderr
+++ b/tests/ui/parser/keyword-type-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `type` to use it as an identifier
LL | let r#type = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-typeof.stderr b/tests/ui/parser/keyword-typeof.stderr
index 4c5324505..c671ba94c 100644
--- a/tests/ui/parser/keyword-typeof.stderr
+++ b/tests/ui/parser/keyword-typeof.stderr
@@ -9,5 +9,5 @@ help: escape `typeof` to use it as an identifier
LL | let r#typeof = ();
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-unsafe-as-identifier.stderr b/tests/ui/parser/keyword-unsafe-as-identifier.stderr
index b552c9cd3..25a8001c6 100644
--- a/tests/ui/parser/keyword-unsafe-as-identifier.stderr
+++ b/tests/ui/parser/keyword-unsafe-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `unsafe` to use it as an identifier
LL | let r#unsafe = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-use-as-identifier.stderr b/tests/ui/parser/keyword-use-as-identifier.stderr
index 630798659..26bf2b4f6 100644
--- a/tests/ui/parser/keyword-use-as-identifier.stderr
+++ b/tests/ui/parser/keyword-use-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `use` to use it as an identifier
LL | let r#use = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-where-as-identifier.stderr b/tests/ui/parser/keyword-where-as-identifier.stderr
index 9e72f7940..5243f0488 100644
--- a/tests/ui/parser/keyword-where-as-identifier.stderr
+++ b/tests/ui/parser/keyword-where-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `where` to use it as an identifier
LL | let r#where = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword-while-as-identifier.stderr b/tests/ui/parser/keyword-while-as-identifier.stderr
index 2bb62105d..ea396c613 100644
--- a/tests/ui/parser/keyword-while-as-identifier.stderr
+++ b/tests/ui/parser/keyword-while-as-identifier.stderr
@@ -9,5 +9,5 @@ help: escape `while` to use it as an identifier
LL | let r#while = "foo";
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/keyword.stderr b/tests/ui/parser/keyword.stderr
index ee7d72b39..54539519e 100644
--- a/tests/ui/parser/keyword.stderr
+++ b/tests/ui/parser/keyword.stderr
@@ -9,5 +9,5 @@ help: escape `break` to use it as an identifier
LL | pub mod r#break {
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/lifetime-semicolon.stderr b/tests/ui/parser/lifetime-semicolon.stderr
index ee486c236..4f8e2835e 100644
--- a/tests/ui/parser/lifetime-semicolon.stderr
+++ b/tests/ui/parser/lifetime-semicolon.stderr
@@ -9,5 +9,5 @@ help: use a comma to separate type parameters
LL | fn foo<'a, 'b>(_x: &mut Foo<'a, 'b>) {}
| ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/lit-err-in-macro.stderr b/tests/ui/parser/lit-err-in-macro.stderr
index a61fb5c85..12e6d5190 100644
--- a/tests/ui/parser/lit-err-in-macro.stderr
+++ b/tests/ui/parser/lit-err-in-macro.stderr
@@ -4,5 +4,5 @@ error: suffixes on string literals are invalid
LL | f!("Foo"__);
| ^^^^^^^ invalid suffix `__`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/macro-bad-delimiter-ident.stderr b/tests/ui/parser/macro-bad-delimiter-ident.stderr
index f2365fed2..06f72cdec 100644
--- a/tests/ui/parser/macro-bad-delimiter-ident.stderr
+++ b/tests/ui/parser/macro-bad-delimiter-ident.stderr
@@ -4,5 +4,5 @@ error: expected one of `(`, `[`, or `{`, found `bar`
LL | foo! bar <
| ^^^ expected one of `(`, `[`, or `{`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/macro-keyword.stderr b/tests/ui/parser/macro-keyword.stderr
index d794671f8..bfe89e320 100644
--- a/tests/ui/parser/macro-keyword.stderr
+++ b/tests/ui/parser/macro-keyword.stderr
@@ -9,5 +9,5 @@ help: escape `macro` to use it as an identifier
LL | fn r#macro() {
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/macro-mismatched-delim-brace-paren.stderr b/tests/ui/parser/macro-mismatched-delim-brace-paren.stderr
index 077d31800..f9a307222 100644
--- a/tests/ui/parser/macro-mismatched-delim-brace-paren.stderr
+++ b/tests/ui/parser/macro-mismatched-delim-brace-paren.stderr
@@ -7,5 +7,5 @@ LL | bar, "baz", 1, 2.0
LL | )
| ^ mismatched closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/macro/bad-macro-argument.stderr b/tests/ui/parser/macro/bad-macro-argument.stderr
index 3cd8accb6..ba6499d71 100644
--- a/tests/ui/parser/macro/bad-macro-argument.stderr
+++ b/tests/ui/parser/macro/bad-macro-argument.stderr
@@ -4,5 +4,5 @@ error: expected expression, found end of macro arguments
LL | println!("Hello, {}", message/);
| ^ expected expression
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/macro/issue-37113.stderr b/tests/ui/parser/macro/issue-37113.stderr
index da9e743a0..1f2fe2310 100644
--- a/tests/ui/parser/macro/issue-37113.stderr
+++ b/tests/ui/parser/macro/issue-37113.stderr
@@ -12,5 +12,5 @@ LL | test_macro!(String,);
= help: enum variants can be `Variant`, `Variant = <integer>`, `Variant(Type, ..., TypeN)` or `Variant { fields: Types }`
= note: this error originates in the macro `test_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/macro/issue-37234.stderr b/tests/ui/parser/macro/issue-37234.stderr
index d79196204..cd91ea441 100644
--- a/tests/ui/parser/macro/issue-37234.stderr
+++ b/tests/ui/parser/macro/issue-37234.stderr
@@ -9,5 +9,5 @@ LL | failed!();
|
= note: this error originates in the macro `failed` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/macro/macro-doc-comments-1.stderr b/tests/ui/parser/macro/macro-doc-comments-1.stderr
index eaeb62d2c..9d2d1bc00 100644
--- a/tests/ui/parser/macro/macro-doc-comments-1.stderr
+++ b/tests/ui/parser/macro/macro-doc-comments-1.stderr
@@ -16,5 +16,5 @@ note: while trying to match `[`
LL | (#[$outer:meta]) => ()
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/macro/macro-doc-comments-2.stderr b/tests/ui/parser/macro/macro-doc-comments-2.stderr
index 1dcd95f6f..22efd995b 100644
--- a/tests/ui/parser/macro/macro-doc-comments-2.stderr
+++ b/tests/ui/parser/macro/macro-doc-comments-2.stderr
@@ -16,5 +16,5 @@ note: while trying to match `!`
LL | (#![$inner:meta]) => ()
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/macro/macro-expand-to-match-arm.rs b/tests/ui/parser/macro/macro-expand-to-match-arm.rs
index 39d1d065e..db38fa0d7 100644
--- a/tests/ui/parser/macro/macro-expand-to-match-arm.rs
+++ b/tests/ui/parser/macro/macro-expand-to-match-arm.rs
@@ -1,6 +1,9 @@
macro_rules! arm {
($pattern:pat => $block:block) => {
$pattern => $block
+ //~^ ERROR macro expansion ignores token `=>` and any following
+ //~| NOTE the usage of `arm!` is likely invalid in pattern context
+ //~| NOTE macros cannot expand to match arms
};
}
@@ -9,9 +12,8 @@ fn main() {
match x {
Some(1) => {},
arm!(None => {}),
- //~^ NOTE macros cannot expand to match arms
- //~| ERROR unexpected `,` in pattern
- // doesn't recover
+ //~^ NOTE caused by the macro expansion here
+ //~| ERROR `match` arm with no body
Some(2) => {},
_ => {},
};
diff --git a/tests/ui/parser/macro/macro-expand-to-match-arm.stderr b/tests/ui/parser/macro/macro-expand-to-match-arm.stderr
index 1a5f46968..e3e7ff89c 100644
--- a/tests/ui/parser/macro/macro-expand-to-match-arm.stderr
+++ b/tests/ui/parser/macro/macro-expand-to-match-arm.stderr
@@ -1,10 +1,20 @@
-error: unexpected `,` in pattern
- --> $DIR/macro-expand-to-match-arm.rs:11:25
+error: macro expansion ignores token `=>` and any following
+ --> $DIR/macro-expand-to-match-arm.rs:3:18
|
+LL | $pattern => $block
+ | ^^
+...
LL | arm!(None => {}),
- | ^
+ | ---------------- caused by the macro expansion here
|
+ = note: the usage of `arm!` is likely invalid in pattern context
= note: macros cannot expand to match arms
-error: aborting due to previous error
+error: `match` arm with no body
+ --> $DIR/macro-expand-to-match-arm.rs:14:9
+ |
+LL | arm!(None => {}),
+ | ^^^^^^^^^^^^^^^^- help: add a body after the pattern: `=> todo!(),`
+
+error: aborting due to 2 previous errors
diff --git a/tests/ui/parser/match-arm-without-body.rs b/tests/ui/parser/match-arm-without-body.rs
new file mode 100644
index 000000000..4723abff8
--- /dev/null
+++ b/tests/ui/parser/match-arm-without-body.rs
@@ -0,0 +1,77 @@
+macro_rules! pat {
+ () => { Some(_) }
+}
+
+fn main() {
+ match Some(false) {
+ Some(_)
+ //~^ ERROR `match` arm with no body
+ //~| HELP add a body after the pattern
+ }
+ match Some(false) {
+ Some(_)
+ _ => {}
+ //~^ ERROR expected one of
+ }
+ match Some(false) {
+ Some(_),
+ //~^ ERROR unexpected `,` in pattern
+ //~| HELP try adding parentheses to match on a tuple
+ //~| HELP or a vertical bar to match on multiple alternatives
+ }
+ match Some(false) {
+ Some(_),
+ //~^ ERROR unexpected `,` in pattern
+ //~| HELP try adding parentheses to match on a tuple
+ //~| HELP or a vertical bar to match on multiple alternatives
+ _ => {}
+ }
+ match Some(false) {
+ Some(_) if true
+ //~^ ERROR `match` arm with no body
+ //~| HELP add a body after the pattern
+ }
+ match Some(false) {
+ Some(_) if true
+ _ => {}
+ //~^ ERROR expected one of
+ }
+ match Some(false) {
+ Some(_) if true,
+ //~^ ERROR `match` arm with no body
+ //~| HELP add a body after the pattern
+ }
+ match Some(false) {
+ Some(_) if true,
+ //~^ ERROR `match` arm with no body
+ //~| HELP add a body after the pattern
+ _ => {}
+ }
+ match Some(false) {
+ pat!()
+ //~^ ERROR `match` arm with no body
+ //~| HELP add a body after the pattern
+ }
+ match Some(false) {
+ pat!(),
+ //~^ ERROR `match` arm with no body
+ //~| HELP add a body after the pattern
+ }
+ match Some(false) {
+ pat!() if true,
+ //~^ ERROR `match` arm with no body
+ //~| HELP add a body after the pattern
+ }
+ match Some(false) {
+ pat!()
+ //~^ ERROR expected `,` following `match` arm
+ //~| HELP missing a comma here
+ _ => {}
+ }
+ match Some(false) {
+ pat!(),
+ //~^ ERROR `match` arm with no body
+ //~| HELP add a body after the pattern
+ _ => {}
+ }
+}
diff --git a/tests/ui/parser/match-arm-without-body.stderr b/tests/ui/parser/match-arm-without-body.stderr
new file mode 100644
index 000000000..d98c7ec28
--- /dev/null
+++ b/tests/ui/parser/match-arm-without-body.stderr
@@ -0,0 +1,110 @@
+error: expected one of `,`, `=>`, `if`, `|`, or `}`, found reserved identifier `_`
+ --> $DIR/match-arm-without-body.rs:13:9
+ |
+LL | Some(_)
+ | - expected one of `,`, `=>`, `if`, `|`, or `}`
+LL | _ => {}
+ | ^ unexpected token
+
+error: unexpected `,` in pattern
+ --> $DIR/match-arm-without-body.rs:17:16
+ |
+LL | Some(_),
+ | ^
+ |
+help: try adding parentheses to match on a tuple...
+ |
+LL | (Some(_),)
+ | + +
+help: ...or a vertical bar to match on multiple alternatives
+ |
+LL | Some(_) |
+ |
+
+error: unexpected `,` in pattern
+ --> $DIR/match-arm-without-body.rs:23:16
+ |
+LL | Some(_),
+ | ^
+ |
+help: try adding parentheses to match on a tuple...
+ |
+LL ~ (Some(_),
+LL |
+LL |
+LL |
+LL ~ _) => {}
+ |
+help: ...or a vertical bar to match on multiple alternatives
+ |
+LL ~ Some(_) |
+LL +
+LL +
+LL +
+LL ~ _ => {}
+ |
+
+error: expected one of `,`, `.`, `=>`, `?`, `}`, or an operator, found reserved identifier `_`
+ --> $DIR/match-arm-without-body.rs:36:9
+ |
+LL | Some(_) if true
+ | - expected one of `,`, `.`, `=>`, `?`, `}`, or an operator
+LL | _ => {}
+ | ^ unexpected token
+
+error: expected `,` following `match` arm
+ --> $DIR/match-arm-without-body.rs:66:15
+ |
+LL | pat!()
+ | ^ help: missing a comma here to end this `match` arm: `,`
+
+error: `match` arm with no body
+ --> $DIR/match-arm-without-body.rs:7:9
+ |
+LL | Some(_)
+ | ^^^^^^^- help: add a body after the pattern: `=> todo!(),`
+
+error: `match` arm with no body
+ --> $DIR/match-arm-without-body.rs:30:9
+ |
+LL | Some(_) if true
+ | ^^^^^^^- help: add a body after the pattern: `=> todo!(),`
+
+error: `match` arm with no body
+ --> $DIR/match-arm-without-body.rs:40:9
+ |
+LL | Some(_) if true,
+ | ^^^^^^^- help: add a body after the pattern: `=> todo!(),`
+
+error: `match` arm with no body
+ --> $DIR/match-arm-without-body.rs:45:9
+ |
+LL | Some(_) if true,
+ | ^^^^^^^- help: add a body after the pattern: `=> todo!(),`
+
+error: `match` arm with no body
+ --> $DIR/match-arm-without-body.rs:51:9
+ |
+LL | pat!()
+ | ^^^^^^- help: add a body after the pattern: `=> todo!(),`
+
+error: `match` arm with no body
+ --> $DIR/match-arm-without-body.rs:56:9
+ |
+LL | pat!(),
+ | ^^^^^^- help: add a body after the pattern: `=> todo!(),`
+
+error: `match` arm with no body
+ --> $DIR/match-arm-without-body.rs:61:9
+ |
+LL | pat!() if true,
+ | ^^^^^^- help: add a body after the pattern: `=> todo!(),`
+
+error: `match` arm with no body
+ --> $DIR/match-arm-without-body.rs:72:9
+ |
+LL | pat!(),
+ | ^^^^^^- help: add a body after the pattern: `=> todo!(),`
+
+error: aborting due to 13 previous errors
+
diff --git a/tests/ui/parser/match-arrows-block-then-binop.stderr b/tests/ui/parser/match-arrows-block-then-binop.stderr
index cb361a3db..7ef5228a8 100644
--- a/tests/ui/parser/match-arrows-block-then-binop.stderr
+++ b/tests/ui/parser/match-arrows-block-then-binop.stderr
@@ -11,5 +11,5 @@ LL | 0
LL ~ }) + 5
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/match-refactor-to-expr.stderr b/tests/ui/parser/match-refactor-to-expr.stderr
index 851bef8f2..72dfcd7dd 100644
--- a/tests/ui/parser/match-refactor-to-expr.stderr
+++ b/tests/ui/parser/match-refactor-to-expr.stderr
@@ -12,5 +12,5 @@ LL |
LL | ;
| ^ unexpected token
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/mbe_missing_right_paren.stderr b/tests/ui/parser/mbe_missing_right_paren.stderr
index d2af94683..d45a2e3ab 100644
--- a/tests/ui/parser/mbe_missing_right_paren.stderr
+++ b/tests/ui/parser/mbe_missing_right_paren.stderr
@@ -6,5 +6,5 @@ LL | macro_rules! abc(ؼ
| |
| unclosed delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/method-call-on-struct-literal-in-if-condition.stderr b/tests/ui/parser/method-call-on-struct-literal-in-if-condition.stderr
index dedbad909..f7822ba11 100644
--- a/tests/ui/parser/method-call-on-struct-literal-in-if-condition.stderr
+++ b/tests/ui/parser/method-call-on-struct-literal-in-if-condition.stderr
@@ -9,5 +9,5 @@ help: you might need to surround the struct literal with parentheses
LL | if (Example { a: one(), }).is_pos() {
| + +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.stderr b/tests/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.stderr
index d91a7f054..97aac661d 100644
--- a/tests/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.stderr
+++ b/tests/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.stderr
@@ -7,5 +7,5 @@ LL | impl T for () {
LL |
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/mismatched-braces/missing-close-brace-in-struct.stderr b/tests/ui/parser/mismatched-braces/missing-close-brace-in-struct.stderr
index d01d9ed60..f70dac443 100644
--- a/tests/ui/parser/mismatched-braces/missing-close-brace-in-struct.stderr
+++ b/tests/ui/parser/mismatched-braces/missing-close-brace-in-struct.stderr
@@ -7,5 +7,5 @@ LL | pub(crate) struct Bar<T> {
LL | fn main() {}
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/mismatched-braces/missing-close-brace-in-trait.stderr b/tests/ui/parser/mismatched-braces/missing-close-brace-in-trait.stderr
index 7418dd64c..a565ad49b 100644
--- a/tests/ui/parser/mismatched-braces/missing-close-brace-in-trait.stderr
+++ b/tests/ui/parser/mismatched-braces/missing-close-brace-in-trait.stderr
@@ -7,5 +7,5 @@ LL | trait T {
LL | fn main() {}
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/mismatched-delim-brace-empty-block.stderr b/tests/ui/parser/mismatched-delim-brace-empty-block.stderr
index 165eb8ae9..180798788 100644
--- a/tests/ui/parser/mismatched-delim-brace-empty-block.stderr
+++ b/tests/ui/parser/mismatched-delim-brace-empty-block.stderr
@@ -10,5 +10,5 @@ LL | let _ = ();
LL | }
| ^ unexpected closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/missing-closing-angle-bracket-eq-constraint.stderr b/tests/ui/parser/missing-closing-angle-bracket-eq-constraint.stderr
index b2448774a..e40d98582 100644
--- a/tests/ui/parser/missing-closing-angle-bracket-eq-constraint.stderr
+++ b/tests/ui/parser/missing-closing-angle-bracket-eq-constraint.stderr
@@ -2,9 +2,8 @@ error: expected one of `,`, `:`, or `>`, found `=`
--> $DIR/missing-closing-angle-bracket-eq-constraint.rs:7:23
|
LL | let v : Vec<(u32,_) = vec![];
- | - - ^ expected one of `,`, `:`, or `>`
- | | |
- | | maybe try to close unmatched angle bracket
+ | - ^ expected one of `,`, `:`, or `>`
+ | |
| while parsing the type for `v`
|
help: you might have meant to end the type parameters here
@@ -29,9 +28,8 @@ error: expected one of `,`, `:`, or `>`, found `=`
--> $DIR/missing-closing-angle-bracket-eq-constraint.rs:18:18
|
LL | let v : Vec<'a = vec![];
- | - -- ^ expected one of `,`, `:`, or `>`
- | | |
- | | maybe try to close unmatched angle bracket
+ | - ^ expected one of `,`, `:`, or `>`
+ | |
| while parsing the type for `v`
|
help: you might have meant to end the type parameters here
diff --git a/tests/ui/parser/missing-closing-angle-bracket-struct-field-ty.stderr b/tests/ui/parser/missing-closing-angle-bracket-struct-field-ty.stderr
index 6d8b0c3fc..29a5dbb73 100644
--- a/tests/ui/parser/missing-closing-angle-bracket-struct-field-ty.stderr
+++ b/tests/ui/parser/missing-closing-angle-bracket-struct-field-ty.stderr
@@ -14,5 +14,5 @@ help: you might have meant to end the type parameters here
LL | b: Arc<Mutex<usize>>,
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/missing-expression-in-for-loop.stderr b/tests/ui/parser/missing-expression-in-for-loop.stderr
index 74a7c4224..74acfc829 100644
--- a/tests/ui/parser/missing-expression-in-for-loop.stderr
+++ b/tests/ui/parser/missing-expression-in-for-loop.stderr
@@ -9,5 +9,5 @@ help: try adding an expression to the `for` loop
LL | for i in /* expression */ {
| ++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/missing-semicolon.stderr b/tests/ui/parser/missing-semicolon.stderr
index e0d5e84ec..4108cced3 100644
--- a/tests/ui/parser/missing-semicolon.stderr
+++ b/tests/ui/parser/missing-semicolon.stderr
@@ -9,5 +9,5 @@ LL | fn main() { m!(0, 0; 0, 0); }
|
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/missing_right_paren.rs b/tests/ui/parser/missing_right_paren.rs
index e240f8c67..cc6d30c9c 100644
--- a/tests/ui/parser/missing_right_paren.rs
+++ b/tests/ui/parser/missing_right_paren.rs
@@ -1,4 +1,4 @@
// ignore-tidy-trailing-newlines
// error-pattern: this file contains an unclosed delimiter
-// error-pattern: aborting due to previous error
+// error-pattern: aborting due to 1 previous error
fn main((ؼ \ No newline at end of file
diff --git a/tests/ui/parser/missing_right_paren.stderr b/tests/ui/parser/missing_right_paren.stderr
index 994ce4d85..4815f04fb 100644
--- a/tests/ui/parser/missing_right_paren.stderr
+++ b/tests/ui/parser/missing_right_paren.stderr
@@ -7,5 +7,5 @@ LL | fn main((ؼ
| |unclosed delimiter
| unclosed delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/misspelled-macro-rules.stderr b/tests/ui/parser/misspelled-macro-rules.stderr
index 56df71238..fc718d855 100644
--- a/tests/ui/parser/misspelled-macro-rules.stderr
+++ b/tests/ui/parser/misspelled-macro-rules.stderr
@@ -6,5 +6,5 @@ LL | marco_rules! thing {
| |
| help: perhaps you meant to define a macro: `macro_rules`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/mod_file_with_path_attr.stderr b/tests/ui/parser/mod_file_with_path_attr.stderr
index cd1add73d..9ccb775da 100644
--- a/tests/ui/parser/mod_file_with_path_attr.stderr
+++ b/tests/ui/parser/mod_file_with_path_attr.stderr
@@ -4,5 +4,5 @@ error: couldn't read $DIR/not_a_real_file.rs: $FILE_NOT_FOUND_MSG (os error 2)
LL | mod m;
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/multiline-comment-line-tracking.stderr b/tests/ui/parser/multiline-comment-line-tracking.stderr
index cac0c801a..450a91207 100644
--- a/tests/ui/parser/multiline-comment-line-tracking.stderr
+++ b/tests/ui/parser/multiline-comment-line-tracking.stderr
@@ -4,5 +4,5 @@ error: expected expression, found `%`
LL | %;
| ^ expected expression
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/multitrait.stderr b/tests/ui/parser/multitrait.stderr
index 5a8bb2f7a..6100f64e3 100644
--- a/tests/ui/parser/multitrait.stderr
+++ b/tests/ui/parser/multitrait.stderr
@@ -4,5 +4,5 @@ error: expected one of `!`, `(`, `+`, `::`, `<`, `for`, `where`, or `{`, found `
LL | impl Cmp, ToString for S {
| ^ expected one of 8 possible tokens
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/mut-patterns.rs b/tests/ui/parser/mut-patterns.rs
index 8b83d6ab2..f2d2df0af 100644
--- a/tests/ui/parser/mut-patterns.rs
+++ b/tests/ui/parser/mut-patterns.rs
@@ -27,7 +27,7 @@ pub fn main() {
struct r#yield(u8, u8);
let mut mut yield(become, await) = r#yield(0, 0);
//~^ ERROR `mut` on a binding may not be repeated
- //~| ERROR `mut` must be attached to each individual binding
+ //~| ERROR `mut` must be followed by a named binding
//~| ERROR expected identifier, found reserved keyword `yield`
//~| ERROR expected identifier, found reserved keyword `become`
//~| ERROR expected identifier, found keyword `await`
diff --git a/tests/ui/parser/mut-patterns.stderr b/tests/ui/parser/mut-patterns.stderr
index f179d8c9e..6559cf09c 100644
--- a/tests/ui/parser/mut-patterns.stderr
+++ b/tests/ui/parser/mut-patterns.stderr
@@ -2,7 +2,7 @@ error: `mut` must be followed by a named binding
--> $DIR/mut-patterns.rs:9:9
|
LL | let mut _ = 0;
- | ^^^^^ help: remove the `mut` prefix: `_`
+ | ^^^^ help: remove the `mut` prefix
|
= note: `mut` may be followed by `variable` and `variable @ pattern`
@@ -10,7 +10,7 @@ error: `mut` must be followed by a named binding
--> $DIR/mut-patterns.rs:10:9
|
LL | let mut (_, _) = (0, 0);
- | ^^^^^^^^^^ help: remove the `mut` prefix: `(_, _)`
+ | ^^^^ help: remove the `mut` prefix
|
= note: `mut` may be followed by `variable` and `variable @ pattern`
@@ -83,11 +83,11 @@ help: escape `await` to use it as an identifier
LL | let mut mut yield(become, r#await) = r#yield(0, 0);
| ++
-error: `mut` must be attached to each individual binding
+error: `mut` must be followed by a named binding
--> $DIR/mut-patterns.rs:28:9
|
LL | let mut mut yield(become, await) = r#yield(0, 0);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `mut` to each binding: `r#yield(mut r#become, mut r#await)`
+ | ^^^^^^^^ help: remove the `mut` prefix
|
= note: `mut` may be followed by `variable` and `variable @ pattern`
diff --git a/tests/ui/parser/nested-bad-turbofish.stderr b/tests/ui/parser/nested-bad-turbofish.stderr
index d82fa80e5..a23c23c41 100644
--- a/tests/ui/parser/nested-bad-turbofish.stderr
+++ b/tests/ui/parser/nested-bad-turbofish.stderr
@@ -7,5 +7,5 @@ LL | foo<<S as T>::V>();
= help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments
= help: or use `(...)` if you meant to specify fn arguments
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/nested-missing-closing-angle-bracket.stderr b/tests/ui/parser/nested-missing-closing-angle-bracket.stderr
index b85bc0256..8d69125f8 100644
--- a/tests/ui/parser/nested-missing-closing-angle-bracket.stderr
+++ b/tests/ui/parser/nested-missing-closing-angle-bracket.stderr
@@ -4,5 +4,5 @@ error: expected one of `,` or `>`, found `;`
LL | let v : Vec::<Vec<(u32,_,_)> = vec![vec![]];
| - while parsing the type for `v` ^ expected one of `,` or `>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/new-unicode-escapes-1.stderr b/tests/ui/parser/new-unicode-escapes-1.stderr
index d133e46b4..491915c89 100644
--- a/tests/ui/parser/new-unicode-escapes-1.stderr
+++ b/tests/ui/parser/new-unicode-escapes-1.stderr
@@ -9,5 +9,5 @@ help: terminate the unicode escape
LL | let s = "\u{2603}";
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/new-unicode-escapes-2.stderr b/tests/ui/parser/new-unicode-escapes-2.stderr
index 2f3f8c0f9..e0bdf533d 100644
--- a/tests/ui/parser/new-unicode-escapes-2.stderr
+++ b/tests/ui/parser/new-unicode-escapes-2.stderr
@@ -4,5 +4,5 @@ error: overlong unicode escape
LL | let s = "\u{260311111111}";
| ^^^^^^^^^^^^^^^^ must have at most 6 hex digits
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/new-unicode-escapes-4.stderr b/tests/ui/parser/new-unicode-escapes-4.stderr
index 514591af1..d62afee7f 100644
--- a/tests/ui/parser/new-unicode-escapes-4.stderr
+++ b/tests/ui/parser/new-unicode-escapes-4.stderr
@@ -4,5 +4,5 @@ error: invalid character in unicode escape: `l`
LL | let s = "\u{lol}";
| ^ invalid character in unicode escape
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/obsolete-syntax-impl-for-dotdot.stderr b/tests/ui/parser/obsolete-syntax-impl-for-dotdot.stderr
index b7108ced0..d5f404bed 100644
--- a/tests/ui/parser/obsolete-syntax-impl-for-dotdot.stderr
+++ b/tests/ui/parser/obsolete-syntax-impl-for-dotdot.stderr
@@ -6,5 +6,5 @@ LL | impl Trait2 for .. {}
|
= help: use `auto trait Trait {}` instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/omitted-arg-in-item-fn.stderr b/tests/ui/parser/omitted-arg-in-item-fn.stderr
index ce2eab051..6f2a9f64c 100644
--- a/tests/ui/parser/omitted-arg-in-item-fn.stderr
+++ b/tests/ui/parser/omitted-arg-in-item-fn.stderr
@@ -18,5 +18,5 @@ help: if this is a type, explicitly ignore the parameter name
LL | fn foo(_: x) {
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/paamayim-nekudotayim.stderr b/tests/ui/parser/paamayim-nekudotayim.stderr
index 6ceba07f4..7d40cd63f 100644
--- a/tests/ui/parser/paamayim-nekudotayim.stderr
+++ b/tests/ui/parser/paamayim-nekudotayim.stderr
@@ -4,5 +4,5 @@ error: expected identifier, found `;`
LL | ::;
| ^ expected identifier
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/parser-recovery-1.stderr b/tests/ui/parser/parser-recovery-1.stderr
index 7045b6f5b..8162db3d8 100644
--- a/tests/ui/parser/parser-recovery-1.stderr
+++ b/tests/ui/parser/parser-recovery-1.stderr
@@ -12,5 +12,5 @@ LL | }
LL | }
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/parser-recovery-2.stderr b/tests/ui/parser/parser-recovery-2.stderr
index f396e5fde..d3d6c9b08 100644
--- a/tests/ui/parser/parser-recovery-2.stderr
+++ b/tests/ui/parser/parser-recovery-2.stderr
@@ -7,5 +7,5 @@ LL | let x = foo();
LL | )
| ^ mismatched closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/pat-lt-bracket-1.rs b/tests/ui/parser/pat-lt-bracket-1.rs
index 2e2001434..33da15adb 100644
--- a/tests/ui/parser/pat-lt-bracket-1.rs
+++ b/tests/ui/parser/pat-lt-bracket-1.rs
@@ -1,7 +1,7 @@
fn main() {
match 42 {
x < 7 => (),
- //~^ error: expected one of `=>`, `@`, `if`, or `|`, found `<`
+ //~^ error: expected one of `,`, `=>`, `@`, `if`, `|`, or `}`, found `<`
_ => ()
}
}
diff --git a/tests/ui/parser/pat-lt-bracket-1.stderr b/tests/ui/parser/pat-lt-bracket-1.stderr
index e8ccbad66..f39487052 100644
--- a/tests/ui/parser/pat-lt-bracket-1.stderr
+++ b/tests/ui/parser/pat-lt-bracket-1.stderr
@@ -1,8 +1,8 @@
-error: expected one of `=>`, `@`, `if`, or `|`, found `<`
+error: expected one of `,`, `=>`, `@`, `if`, `|`, or `}`, found `<`
--> $DIR/pat-lt-bracket-1.rs:3:7
|
LL | x < 7 => (),
- | ^ expected one of `=>`, `@`, `if`, or `|`
+ | ^ expected one of `,`, `=>`, `@`, `if`, `|`, or `}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/pat-lt-bracket-2.stderr b/tests/ui/parser/pat-lt-bracket-2.stderr
index c78f96e1a..5fe97b2ef 100644
--- a/tests/ui/parser/pat-lt-bracket-2.stderr
+++ b/tests/ui/parser/pat-lt-bracket-2.stderr
@@ -14,5 +14,5 @@ help: if this is a type, explicitly ignore the parameter name
LL | fn a(_: B<) {}
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/pat-lt-bracket-3.stderr b/tests/ui/parser/pat-lt-bracket-3.stderr
index afdf1e9a5..cdb1b3177 100644
--- a/tests/ui/parser/pat-lt-bracket-3.stderr
+++ b/tests/ui/parser/pat-lt-bracket-3.stderr
@@ -9,5 +9,5 @@ help: use `::<...>` instead of `<...>` to specify lifetime, type, or const argum
LL | Foo::<T>(x, y) => {
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/pat-lt-bracket-4.stderr b/tests/ui/parser/pat-lt-bracket-4.stderr
index b71a5ad93..92d16564a 100644
--- a/tests/ui/parser/pat-lt-bracket-4.stderr
+++ b/tests/ui/parser/pat-lt-bracket-4.stderr
@@ -9,5 +9,5 @@ help: use `::<...>` instead of `<...>` to specify lifetime, type, or const argum
LL | Foo::<T>::A(value) => value,
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/pat-lt-bracket-5.stderr b/tests/ui/parser/pat-lt-bracket-5.stderr
index e23674bce..e556e6c02 100644
--- a/tests/ui/parser/pat-lt-bracket-5.stderr
+++ b/tests/ui/parser/pat-lt-bracket-5.stderr
@@ -4,5 +4,5 @@ error: expected one of `:`, `;`, `=`, `@`, or `|`, found `[`
LL | let v[0] = v[1];
| ^ expected one of `:`, `;`, `=`, `@`, or `|`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/pat-ranges-1.stderr b/tests/ui/parser/pat-ranges-1.stderr
index b64a3ce5c..e4d4e145c 100644
--- a/tests/ui/parser/pat-ranges-1.stderr
+++ b/tests/ui/parser/pat-ranges-1.stderr
@@ -4,5 +4,5 @@ error: expected one of `:`, `;`, `=`, or `|`, found `..=`
LL | let macropus!() ..= 11 = 12;
| ^^^ expected one of `:`, `;`, `=`, or `|`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/pat-ranges-2.stderr b/tests/ui/parser/pat-ranges-2.stderr
index 1a9e33beb..c27436a81 100644
--- a/tests/ui/parser/pat-ranges-2.stderr
+++ b/tests/ui/parser/pat-ranges-2.stderr
@@ -4,5 +4,5 @@ error: expected one of `::`, `:`, `;`, `=`, or `|`, found `!`
LL | let 10 ..= makropulos!() = 12;
| ^ expected one of `::`, `:`, `;`, `=`, or `|`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/pat-ranges-3.stderr b/tests/ui/parser/pat-ranges-3.stderr
index c9787b789..611b35a65 100644
--- a/tests/ui/parser/pat-ranges-3.stderr
+++ b/tests/ui/parser/pat-ranges-3.stderr
@@ -4,5 +4,5 @@ error: expected one of `:`, `;`, `=`, or `|`, found `+`
LL | let 10 ..= 10 + 3 = 12;
| ^ expected one of `:`, `;`, `=`, or `|`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/pat-ranges-4.stderr b/tests/ui/parser/pat-ranges-4.stderr
index 69084b5a4..c30160291 100644
--- a/tests/ui/parser/pat-ranges-4.stderr
+++ b/tests/ui/parser/pat-ranges-4.stderr
@@ -4,5 +4,5 @@ error: expected one of `...`, `..=`, `..`, `:`, `;`, `=`, or `|`, found `-`
LL | let 10 - 3 ..= 10 = 8;
| ^ expected one of 7 possible tokens
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/pat-ref-enum.stderr b/tests/ui/parser/pat-ref-enum.stderr
index a3bce3372..ecda487d0 100644
--- a/tests/ui/parser/pat-ref-enum.stderr
+++ b/tests/ui/parser/pat-ref-enum.stderr
@@ -4,5 +4,5 @@ error: expected identifier, found enum pattern
LL | ref Some(i) => {}
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/pat-tuple-1.stderr b/tests/ui/parser/pat-tuple-1.stderr
index 391f2c428..579365730 100644
--- a/tests/ui/parser/pat-tuple-1.stderr
+++ b/tests/ui/parser/pat-tuple-1.stderr
@@ -4,5 +4,5 @@ error: expected pattern, found `,`
LL | (, ..) => {}
| ^ expected pattern
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/pat-tuple-3.stderr b/tests/ui/parser/pat-tuple-3.stderr
index 9ac0611c5..7ce00462b 100644
--- a/tests/ui/parser/pat-tuple-3.stderr
+++ b/tests/ui/parser/pat-tuple-3.stderr
@@ -6,5 +6,5 @@ LL | (.., pat, ..) => {}
| |
| previously used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/pub-method-macro.stderr b/tests/ui/parser/pub-method-macro.stderr
index 7c7a90926..35cbf4230 100644
--- a/tests/ui/parser/pub-method-macro.stderr
+++ b/tests/ui/parser/pub-method-macro.stderr
@@ -6,5 +6,5 @@ LL | pub defn!(f);
|
= help: try adjusting the macro to put `pub` inside the invocation
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/public-instead-of-pub-1.stderr b/tests/ui/parser/public-instead-of-pub-1.stderr
index 795a5bcf5..3fbe8d0b1 100644
--- a/tests/ui/parser/public-instead-of-pub-1.stderr
+++ b/tests/ui/parser/public-instead-of-pub-1.stderr
@@ -9,5 +9,5 @@ help: write `pub` instead of `public` to make the item public
LL | pub enum Test {
| ~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/public-instead-of-pub-2.stderr b/tests/ui/parser/public-instead-of-pub-2.stderr
index efe225656..09d564d7a 100644
--- a/tests/ui/parser/public-instead-of-pub-2.stderr
+++ b/tests/ui/parser/public-instead-of-pub-2.stderr
@@ -4,5 +4,5 @@ error: expected one of `!` or `::`, found keyword `let`
LL | public let x = 1;
| ^^^ expected one of `!` or `::`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/public-instead-of-pub-3.stderr b/tests/ui/parser/public-instead-of-pub-3.stderr
index 72efae08d..b9b924e67 100644
--- a/tests/ui/parser/public-instead-of-pub-3.stderr
+++ b/tests/ui/parser/public-instead-of-pub-3.stderr
@@ -9,5 +9,5 @@ help: write `pub` instead of `public` to make the item public
LL | pub const X: i32 = 123;
| ~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/public-instead-of-pub.stderr b/tests/ui/parser/public-instead-of-pub.stderr
index af875491e..c98f8a991 100644
--- a/tests/ui/parser/public-instead-of-pub.stderr
+++ b/tests/ui/parser/public-instead-of-pub.stderr
@@ -9,5 +9,5 @@ help: write `pub` instead of `public` to make the item public
LL | pub struct X;
| ~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/qualified-path-in-turbofish.stderr b/tests/ui/parser/qualified-path-in-turbofish.stderr
index 8857d2ef3..6e5af8cc1 100644
--- a/tests/ui/parser/qualified-path-in-turbofish.stderr
+++ b/tests/ui/parser/qualified-path-in-turbofish.stderr
@@ -4,5 +4,5 @@ error: found single colon before projection in qualified path
LL | template::<<Impl as T>:Ty>();
| ^ help: use double colon: `::`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/range-3.stderr b/tests/ui/parser/range-3.stderr
index 340167f18..c8f26a3ba 100644
--- a/tests/ui/parser/range-3.stderr
+++ b/tests/ui/parser/range-3.stderr
@@ -4,5 +4,5 @@ error: expected one of `.`, `;`, `?`, `else`, or an operator, found `..`
LL | let r = 1..2..3;
| ^^ expected one of `.`, `;`, `?`, `else`, or an operator
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/range-4.stderr b/tests/ui/parser/range-4.stderr
index 720d48938..a797fa319 100644
--- a/tests/ui/parser/range-4.stderr
+++ b/tests/ui/parser/range-4.stderr
@@ -4,5 +4,5 @@ error: expected one of `.`, `;`, `?`, `else`, or an operator, found `..`
LL | let r = ..1..2;
| ^^ expected one of `.`, `;`, `?`, `else`, or an operator
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/range-inclusive-extra-equals.stderr b/tests/ui/parser/range-inclusive-extra-equals.stderr
index d37b6be4f..83df719dd 100644
--- a/tests/ui/parser/range-inclusive-extra-equals.stderr
+++ b/tests/ui/parser/range-inclusive-extra-equals.stderr
@@ -6,5 +6,5 @@ LL | if let 1..==3 = 1 {}
|
= note: inclusive ranges end with a single equals sign (`..=`)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/range_inclusive.stderr b/tests/ui/parser/range_inclusive.stderr
index 8a9178263..0fd7f28db 100644
--- a/tests/ui/parser/range_inclusive.stderr
+++ b/tests/ui/parser/range_inclusive.stderr
@@ -6,6 +6,6 @@ LL | for _ in 1..= {}
|
= note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0586`.
diff --git a/tests/ui/parser/raw/issue-70677-panic-on-unterminated-raw-str-at-eof.stderr b/tests/ui/parser/raw/issue-70677-panic-on-unterminated-raw-str-at-eof.stderr
index 3a7e2a4b1..796b1324a 100644
--- a/tests/ui/parser/raw/issue-70677-panic-on-unterminated-raw-str-at-eof.stderr
+++ b/tests/ui/parser/raw/issue-70677-panic-on-unterminated-raw-str-at-eof.stderr
@@ -4,6 +4,6 @@ error[E0748]: unterminated raw string
LL | r"
| ^ unterminated raw string
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0748`.
diff --git a/tests/ui/parser/raw/raw-byte-string-eof.stderr b/tests/ui/parser/raw/raw-byte-string-eof.stderr
index a76668e80..88fd53904 100644
--- a/tests/ui/parser/raw/raw-byte-string-eof.stderr
+++ b/tests/ui/parser/raw/raw-byte-string-eof.stderr
@@ -8,6 +8,6 @@ LL | br##"a"#;
|
= note: this raw string should be terminated with `"##`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0748`.
diff --git a/tests/ui/parser/raw/raw-literal-self.stderr b/tests/ui/parser/raw/raw-literal-self.stderr
index 2a40dfe20..f42c3e8e7 100644
--- a/tests/ui/parser/raw/raw-literal-self.stderr
+++ b/tests/ui/parser/raw/raw-literal-self.stderr
@@ -4,5 +4,5 @@ error: `self` cannot be a raw identifier
LL | let r#self: ();
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/raw/raw-literal-underscore.stderr b/tests/ui/parser/raw/raw-literal-underscore.stderr
index d7a364d85..2edba430d 100644
--- a/tests/ui/parser/raw/raw-literal-underscore.stderr
+++ b/tests/ui/parser/raw/raw-literal-underscore.stderr
@@ -4,5 +4,5 @@ error: `_` cannot be a raw identifier
LL | let r#_: ();
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/raw/raw-str-delim.stderr b/tests/ui/parser/raw/raw-str-delim.stderr
index 8a04f99a1..5edd18cb4 100644
--- a/tests/ui/parser/raw/raw-str-delim.stderr
+++ b/tests/ui/parser/raw/raw-str-delim.stderr
@@ -4,5 +4,5 @@ error: found invalid character; only `#` is allowed in raw string delimitation:
LL | r#~"#"~#
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/raw/raw-str-unterminated.stderr b/tests/ui/parser/raw/raw-str-unterminated.stderr
index 077f763f1..9d15a2817 100644
--- a/tests/ui/parser/raw/raw-str-unterminated.stderr
+++ b/tests/ui/parser/raw/raw-str-unterminated.stderr
@@ -6,6 +6,6 @@ LL | r#" string literal goes on
|
= note: this raw string should be terminated with `"#`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0748`.
diff --git a/tests/ui/parser/raw/raw-string-2.stderr b/tests/ui/parser/raw/raw-string-2.stderr
index 8bbac9d7b..90dd9775e 100644
--- a/tests/ui/parser/raw/raw-string-2.stderr
+++ b/tests/ui/parser/raw/raw-string-2.stderr
@@ -6,6 +6,6 @@ LL | let x = r###"here's a long string"# "# "##;
|
= note: this raw string should be terminated with `"###`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0748`.
diff --git a/tests/ui/parser/raw/raw-string.stderr b/tests/ui/parser/raw/raw-string.stderr
index b2b853a89..6654ef7a7 100644
--- a/tests/ui/parser/raw/raw-string.stderr
+++ b/tests/ui/parser/raw/raw-string.stderr
@@ -8,6 +8,6 @@ LL | let x = r##"lol"#;
|
= note: this raw string should be terminated with `"##`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0748`.
diff --git a/tests/ui/parser/raw/too-many-hash.stderr b/tests/ui/parser/raw/too-many-hash.stderr
index 29ec17842..1c46b5385 100644
--- a/tests/ui/parser/raw/too-many-hash.stderr
+++ b/tests/ui/parser/raw/too-many-hash.stderr
@@ -4,5 +4,5 @@ error: too many `#` symbols: raw strings may be delimited by up to 255 `#` symbo
LL | ... = r################################################################################################################################################################################################################################################################"very raw"##############################################################################################################################################################################################################################################################...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/recover-enum2.stderr b/tests/ui/parser/recover-enum2.stderr
deleted file mode 100644
index 7634bca92..000000000
--- a/tests/ui/parser/recover-enum2.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-error: expected type, found `{`
- --> $DIR/recover-enum2.rs:6:18
- |
-LL | Var3 {
- | ---- while parsing this struct
-LL | abc: {},
- | ^ expected type
-
-error: expected one of `!`, `(`, `)`, `+`, `,`, `::`, or `<`, found `{`
- --> $DIR/recover-enum2.rs:25:22
- |
-LL | Nope(i32 {})
- | ^ expected one of 7 possible tokens
-
-error: aborting due to 2 previous errors
-
diff --git a/tests/ui/parser/recover-for-loop-parens-around-head.stderr b/tests/ui/parser/recover-for-loop-parens-around-head.stderr
deleted file mode 100644
index 3bad29f20..000000000
--- a/tests/ui/parser/recover-for-loop-parens-around-head.stderr
+++ /dev/null
@@ -1,27 +0,0 @@
-error: expected one of `)`, `,`, `@`, or `|`, found keyword `in`
- --> $DIR/recover-for-loop-parens-around-head.rs:10:16
- |
-LL | for ( elem in vec ) {
- | ^^ expected one of `)`, `,`, `@`, or `|`
-
-error: unexpected parentheses surrounding `for` loop head
- --> $DIR/recover-for-loop-parens-around-head.rs:10:9
- |
-LL | for ( elem in vec ) {
- | ^ ^
- |
-help: remove parentheses in `for` loop
- |
-LL - for ( elem in vec ) {
-LL + for elem in vec {
- |
-
-error[E0308]: mismatched types
- --> $DIR/recover-for-loop-parens-around-head.rs:13:38
- |
-LL | const RECOVERY_WITNESS: () = 0;
- | ^ expected `()`, found integer
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/parser/recover-hrtb-before-dyn-impl-kw.rs b/tests/ui/parser/recover-hrtb-before-dyn-impl-kw.rs
new file mode 100644
index 000000000..b9e3c5783
--- /dev/null
+++ b/tests/ui/parser/recover-hrtb-before-dyn-impl-kw.rs
@@ -0,0 +1,13 @@
+trait Trait {}
+
+fn test(_: &for<'a> dyn Trait) {}
+//~^ ERROR `for<...>` expected after `dyn`, not before
+
+fn test2(_: for<'a> impl Trait) {}
+//~^ ERROR `for<...>` expected after `impl`, not before
+
+// Issue #118564
+type A2 = dyn<for<> dyn>;
+//~^ ERROR expected identifier, found `>`
+
+fn main() {}
diff --git a/tests/ui/parser/recover-hrtb-before-dyn-impl-kw.stderr b/tests/ui/parser/recover-hrtb-before-dyn-impl-kw.stderr
new file mode 100644
index 000000000..a012220e8
--- /dev/null
+++ b/tests/ui/parser/recover-hrtb-before-dyn-impl-kw.stderr
@@ -0,0 +1,32 @@
+error: `for<...>` expected after `dyn`, not before
+ --> $DIR/recover-hrtb-before-dyn-impl-kw.rs:3:21
+ |
+LL | fn test(_: &for<'a> dyn Trait) {}
+ | ^^^
+ |
+help: move `dyn` before the `for<...>`
+ |
+LL - fn test(_: &for<'a> dyn Trait) {}
+LL + fn test(_: &dyn for<'a> Trait) {}
+ |
+
+error: `for<...>` expected after `impl`, not before
+ --> $DIR/recover-hrtb-before-dyn-impl-kw.rs:6:21
+ |
+LL | fn test2(_: for<'a> impl Trait) {}
+ | ^^^^
+ |
+help: move `impl` before the `for<...>`
+ |
+LL - fn test2(_: for<'a> impl Trait) {}
+LL + fn test2(_: impl for<'a> Trait) {}
+ |
+
+error: expected identifier, found `>`
+ --> $DIR/recover-hrtb-before-dyn-impl-kw.rs:10:24
+ |
+LL | type A2 = dyn<for<> dyn>;
+ | ^ expected identifier
+
+error: aborting due to 3 previous errors
+
diff --git a/tests/ui/parser/issues/issue-104088.rs b/tests/ui/parser/recover/binding-name-starting-with-number.rs
index 3dc636b6a..6b279c553 100644
--- a/tests/ui/parser/issues/issue-104088.rs
+++ b/tests/ui/parser/recover/binding-name-starting-with-number.rs
@@ -8,10 +8,12 @@ fn 1234test() {
let 23name = 123;
//~^ ERROR expected identifier, found `23name`
-
+}
+fn foo() {
let 2x: i32 = 123;
//~^ ERROR expected identifier, found `2x`
-
+}
+fn bar() {
let 1x = 123;
//~^ ERROR expected identifier, found `1x`
}
diff --git a/tests/ui/parser/issues/issue-104088.stderr b/tests/ui/parser/recover/binding-name-starting-with-number.stderr
index 8b751759d..de59a7de0 100644
--- a/tests/ui/parser/issues/issue-104088.stderr
+++ b/tests/ui/parser/recover/binding-name-starting-with-number.stderr
@@ -1,53 +1,53 @@
error: expected identifier, found `1234test`
- --> $DIR/issue-104088.rs:1:4
+ --> $DIR/binding-name-starting-with-number.rs:1:4
|
LL | fn 1234test() {
| ^^^^^^^^ expected identifier
|
help: identifiers cannot start with a number
- --> $DIR/issue-104088.rs:1:4
+ --> $DIR/binding-name-starting-with-number.rs:1:4
|
LL | fn 1234test() {
| ^^^^
error: expected identifier, found `23name`
- --> $DIR/issue-104088.rs:9:9
+ --> $DIR/binding-name-starting-with-number.rs:9:9
|
LL | let 23name = 123;
| ^^^^^^ expected identifier
|
help: identifiers cannot start with a number
- --> $DIR/issue-104088.rs:9:9
+ --> $DIR/binding-name-starting-with-number.rs:9:9
|
LL | let 23name = 123;
| ^^
error: expected identifier, found `2x`
- --> $DIR/issue-104088.rs:12:9
+ --> $DIR/binding-name-starting-with-number.rs:13:9
|
LL | let 2x: i32 = 123;
| ^^ expected identifier
|
help: identifiers cannot start with a number
- --> $DIR/issue-104088.rs:12:9
+ --> $DIR/binding-name-starting-with-number.rs:13:9
|
LL | let 2x: i32 = 123;
| ^
error: expected identifier, found `1x`
- --> $DIR/issue-104088.rs:15:9
+ --> $DIR/binding-name-starting-with-number.rs:17:9
|
LL | let 1x = 123;
| ^^ expected identifier
|
help: identifiers cannot start with a number
- --> $DIR/issue-104088.rs:15:9
+ --> $DIR/binding-name-starting-with-number.rs:17:9
|
LL | let 1x = 123;
| ^
error[E0308]: mismatched types
- --> $DIR/issue-104088.rs:5:12
+ --> $DIR/binding-name-starting-with-number.rs:5:12
|
LL | if let 2e1 = 123 {
| ^^^ --- this expression has type `{integer}`
diff --git a/tests/ui/parser/recover-assoc-const-constraint.rs b/tests/ui/parser/recover/recover-assoc-const-constraint.rs
index 1453e6cb5..1453e6cb5 100644
--- a/tests/ui/parser/recover-assoc-const-constraint.rs
+++ b/tests/ui/parser/recover/recover-assoc-const-constraint.rs
diff --git a/tests/ui/parser/recover-assoc-const-constraint.stderr b/tests/ui/parser/recover/recover-assoc-const-constraint.stderr
index 2d36ce4e9..2d36ce4e9 100644
--- a/tests/ui/parser/recover-assoc-const-constraint.stderr
+++ b/tests/ui/parser/recover/recover-assoc-const-constraint.stderr
diff --git a/tests/ui/parser/recover-assoc-eq-missing-term.rs b/tests/ui/parser/recover/recover-assoc-eq-missing-term.rs
index 4b42c44dc..4b42c44dc 100644
--- a/tests/ui/parser/recover-assoc-eq-missing-term.rs
+++ b/tests/ui/parser/recover/recover-assoc-eq-missing-term.rs
diff --git a/tests/ui/parser/recover-assoc-eq-missing-term.stderr b/tests/ui/parser/recover/recover-assoc-eq-missing-term.stderr
index 152f7f2fb..cf50c0266 100644
--- a/tests/ui/parser/recover-assoc-eq-missing-term.stderr
+++ b/tests/ui/parser/recover/recover-assoc-eq-missing-term.stderr
@@ -14,5 +14,5 @@ LL - bar::<Item = >();
LL + bar::<Item >();
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/recover-assoc-lifetime-constraint.rs b/tests/ui/parser/recover/recover-assoc-lifetime-constraint.rs
index 558fcdfe1..558fcdfe1 100644
--- a/tests/ui/parser/recover-assoc-lifetime-constraint.rs
+++ b/tests/ui/parser/recover/recover-assoc-lifetime-constraint.rs
diff --git a/tests/ui/parser/recover-assoc-lifetime-constraint.stderr b/tests/ui/parser/recover/recover-assoc-lifetime-constraint.stderr
index 79437533d..39a6682fc 100644
--- a/tests/ui/parser/recover-assoc-lifetime-constraint.stderr
+++ b/tests/ui/parser/recover/recover-assoc-lifetime-constraint.stderr
@@ -8,5 +8,5 @@ LL | bar::<Item = 'a>();
|
= help: if you meant to specify a trait object, write `dyn Trait + 'lifetime`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/recover-const-async-fn-ptr.rs b/tests/ui/parser/recover/recover-const-async-fn-ptr.rs
index 25af8772c..25af8772c 100644
--- a/tests/ui/parser/recover-const-async-fn-ptr.rs
+++ b/tests/ui/parser/recover/recover-const-async-fn-ptr.rs
diff --git a/tests/ui/parser/recover-const-async-fn-ptr.stderr b/tests/ui/parser/recover/recover-const-async-fn-ptr.stderr
index 7012096b6..7012096b6 100644
--- a/tests/ui/parser/recover-const-async-fn-ptr.stderr
+++ b/tests/ui/parser/recover/recover-const-async-fn-ptr.stderr
diff --git a/tests/ui/parser/recover-enum.rs b/tests/ui/parser/recover/recover-enum.rs
index 08dd939e2..08dd939e2 100644
--- a/tests/ui/parser/recover-enum.rs
+++ b/tests/ui/parser/recover/recover-enum.rs
diff --git a/tests/ui/parser/recover-enum.stderr b/tests/ui/parser/recover/recover-enum.stderr
index a2b650e4f..a2b650e4f 100644
--- a/tests/ui/parser/recover-enum.stderr
+++ b/tests/ui/parser/recover/recover-enum.stderr
diff --git a/tests/ui/parser/recover-enum2.rs b/tests/ui/parser/recover/recover-enum2.rs
index 0c9420889..56b57f625 100644
--- a/tests/ui/parser/recover-enum2.rs
+++ b/tests/ui/parser/recover/recover-enum2.rs
@@ -8,7 +8,7 @@ fn main() {
}
// recover...
- let a = 1;
+ let () = 1; //~ ERROR mismatched types
enum Test2 {
Fine,
}
@@ -24,5 +24,6 @@ fn main() {
enum Test4 {
Nope(i32 {}) //~ ERROR: found `{`
}
+ let () = 1; //~ ERROR mismatched types
}
}
diff --git a/tests/ui/parser/recover/recover-enum2.stderr b/tests/ui/parser/recover/recover-enum2.stderr
new file mode 100644
index 000000000..132f84cc7
--- /dev/null
+++ b/tests/ui/parser/recover/recover-enum2.stderr
@@ -0,0 +1,37 @@
+error: expected type, found `{`
+ --> $DIR/recover-enum2.rs:6:18
+ |
+LL | Var3 {
+ | ---- while parsing this struct
+LL | abc: {},
+ | ^ expected type
+
+error: expected one of `!`, `(`, `)`, `+`, `,`, `::`, or `<`, found `{`
+ --> $DIR/recover-enum2.rs:25:22
+ |
+LL | enum Test4 {
+ | ----- while parsing this enum
+LL | Nope(i32 {})
+ | ^ expected one of 7 possible tokens
+ |
+ = help: enum variants can be `Variant`, `Variant = <integer>`, `Variant(Type, ..., TypeN)` or `Variant { fields: Types }`
+
+error[E0308]: mismatched types
+ --> $DIR/recover-enum2.rs:11:9
+ |
+LL | let () = 1;
+ | ^^ - this expression has type `{integer}`
+ | |
+ | expected integer, found `()`
+
+error[E0308]: mismatched types
+ --> $DIR/recover-enum2.rs:27:13
+ |
+LL | let () = 1;
+ | ^^ - this expression has type `{integer}`
+ | |
+ | expected integer, found `()`
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/parser/recover-field-extra-angle-brackets-in-struct-with-a-field.rs b/tests/ui/parser/recover/recover-field-extra-angle-brackets-in-struct-with-a-field.rs
index e815c7611..e815c7611 100644
--- a/tests/ui/parser/recover-field-extra-angle-brackets-in-struct-with-a-field.rs
+++ b/tests/ui/parser/recover/recover-field-extra-angle-brackets-in-struct-with-a-field.rs
diff --git a/tests/ui/parser/recover-field-extra-angle-brackets-in-struct-with-a-field.stderr b/tests/ui/parser/recover/recover-field-extra-angle-brackets-in-struct-with-a-field.stderr
index 17237c930..2b56498c5 100644
--- a/tests/ui/parser/recover-field-extra-angle-brackets-in-struct-with-a-field.stderr
+++ b/tests/ui/parser/recover/recover-field-extra-angle-brackets-in-struct-with-a-field.stderr
@@ -7,5 +7,5 @@ LL | |
LL | | }
| |_ help: remove extra angle bracket
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/recover-field-extra-angle-brackets.rs b/tests/ui/parser/recover/recover-field-extra-angle-brackets.rs
index 5e0e00bcb..5e0e00bcb 100644
--- a/tests/ui/parser/recover-field-extra-angle-brackets.rs
+++ b/tests/ui/parser/recover/recover-field-extra-angle-brackets.rs
diff --git a/tests/ui/parser/recover-field-extra-angle-brackets.stderr b/tests/ui/parser/recover/recover-field-extra-angle-brackets.stderr
index 318e55f6e..628626926 100644
--- a/tests/ui/parser/recover-field-extra-angle-brackets.stderr
+++ b/tests/ui/parser/recover/recover-field-extra-angle-brackets.stderr
@@ -4,5 +4,5 @@ error: unmatched angle bracket
LL | first: Vec<u8>>,
| ^ help: remove extra angle bracket
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/recover-field-semi.rs b/tests/ui/parser/recover/recover-field-semi.rs
index b70357886..b70357886 100644
--- a/tests/ui/parser/recover-field-semi.rs
+++ b/tests/ui/parser/recover/recover-field-semi.rs
diff --git a/tests/ui/parser/recover-field-semi.stderr b/tests/ui/parser/recover/recover-field-semi.stderr
index 3cf484748..3cf484748 100644
--- a/tests/ui/parser/recover-field-semi.stderr
+++ b/tests/ui/parser/recover/recover-field-semi.stderr
diff --git a/tests/ui/parser/recover-fn-ptr-with-generics.rs b/tests/ui/parser/recover/recover-fn-ptr-with-generics.rs
index 31de418be..31de418be 100644
--- a/tests/ui/parser/recover-fn-ptr-with-generics.rs
+++ b/tests/ui/parser/recover/recover-fn-ptr-with-generics.rs
diff --git a/tests/ui/parser/recover-fn-ptr-with-generics.stderr b/tests/ui/parser/recover/recover-fn-ptr-with-generics.stderr
index 069fcffe9..069fcffe9 100644
--- a/tests/ui/parser/recover-fn-ptr-with-generics.stderr
+++ b/tests/ui/parser/recover/recover-fn-ptr-with-generics.stderr
diff --git a/tests/ui/parser/recover-fn-trait-from-fn-kw.rs b/tests/ui/parser/recover/recover-fn-trait-from-fn-kw.rs
index b6611e627..b6611e627 100644
--- a/tests/ui/parser/recover-fn-trait-from-fn-kw.rs
+++ b/tests/ui/parser/recover/recover-fn-trait-from-fn-kw.rs
diff --git a/tests/ui/parser/recover-fn-trait-from-fn-kw.stderr b/tests/ui/parser/recover/recover-fn-trait-from-fn-kw.stderr
index 3681a796c..3681a796c 100644
--- a/tests/ui/parser/recover-fn-trait-from-fn-kw.stderr
+++ b/tests/ui/parser/recover/recover-fn-trait-from-fn-kw.stderr
diff --git a/tests/ui/parser/recover/recover-for-loop-parens-around-head.fixed b/tests/ui/parser/recover/recover-for-loop-parens-around-head.fixed
new file mode 100644
index 000000000..6afc2d993
--- /dev/null
+++ b/tests/ui/parser/recover/recover-for-loop-parens-around-head.fixed
@@ -0,0 +1,15 @@
+// run-rustfix
+// Here we test that the parser is able to recover in a situation like
+// `for ( $pat in $expr )` since that is familiar syntax in other languages.
+// Instead we suggest that the user writes `for $pat in $expr`.
+
+#![deny(unused)] // Make sure we don't trigger `unused_parens`.
+
+fn main() {
+ let vec = vec![1, 2, 3];
+
+ for _elem in vec {
+ //~^ ERROR unexpected parentheses surrounding `for` loop head
+ const _RECOVERY_WITNESS: u32 = 0u32; //~ ERROR mismatched types
+ }
+}
diff --git a/tests/ui/parser/recover-for-loop-parens-around-head.rs b/tests/ui/parser/recover/recover-for-loop-parens-around-head.rs
index 053b428bd..b1716900c 100644
--- a/tests/ui/parser/recover-for-loop-parens-around-head.rs
+++ b/tests/ui/parser/recover/recover-for-loop-parens-around-head.rs
@@ -1,3 +1,4 @@
+// run-rustfix
// Here we test that the parser is able to recover in a situation like
// `for ( $pat in $expr )` since that is familiar syntax in other languages.
// Instead we suggest that the user writes `for $pat in $expr`.
@@ -7,9 +8,8 @@
fn main() {
let vec = vec![1, 2, 3];
- for ( elem in vec ) {
- //~^ ERROR expected one of `)`, `,`, `@`, or `|`, found keyword `in`
- //~| ERROR unexpected parentheses surrounding `for` loop head
- const RECOVERY_WITNESS: () = 0; //~ ERROR mismatched types
+ for ( _elem in vec ) {
+ //~^ ERROR unexpected parentheses surrounding `for` loop head
+ const _RECOVERY_WITNESS: u32 = 0u8; //~ ERROR mismatched types
}
}
diff --git a/tests/ui/parser/recover/recover-for-loop-parens-around-head.stderr b/tests/ui/parser/recover/recover-for-loop-parens-around-head.stderr
new file mode 100644
index 000000000..beaa346e7
--- /dev/null
+++ b/tests/ui/parser/recover/recover-for-loop-parens-around-head.stderr
@@ -0,0 +1,26 @@
+error: unexpected parentheses surrounding `for` loop head
+ --> $DIR/recover-for-loop-parens-around-head.rs:11:9
+ |
+LL | for ( _elem in vec ) {
+ | ^ ^
+ |
+help: remove parentheses in `for` loop
+ |
+LL - for ( _elem in vec ) {
+LL + for _elem in vec {
+ |
+
+error[E0308]: mismatched types
+ --> $DIR/recover-for-loop-parens-around-head.rs:13:40
+ |
+LL | const _RECOVERY_WITNESS: u32 = 0u8;
+ | ^^^ expected `u32`, found `u8`
+ |
+help: change the type of the numeric literal from `u8` to `u32`
+ |
+LL | const _RECOVERY_WITNESS: u32 = 0u32;
+ | ~~~
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/parser/recover-from-bad-variant.rs b/tests/ui/parser/recover/recover-from-bad-variant.rs
index e8887147c..e8887147c 100644
--- a/tests/ui/parser/recover-from-bad-variant.rs
+++ b/tests/ui/parser/recover/recover-from-bad-variant.rs
diff --git a/tests/ui/parser/recover-from-bad-variant.stderr b/tests/ui/parser/recover/recover-from-bad-variant.stderr
index 04968bbdf..04968bbdf 100644
--- a/tests/ui/parser/recover-from-bad-variant.stderr
+++ b/tests/ui/parser/recover/recover-from-bad-variant.stderr
diff --git a/tests/ui/parser/recover-from-homoglyph.rs b/tests/ui/parser/recover/recover-from-homoglyph.rs
index 99ce0d1a6..99ce0d1a6 100644
--- a/tests/ui/parser/recover-from-homoglyph.rs
+++ b/tests/ui/parser/recover/recover-from-homoglyph.rs
diff --git a/tests/ui/parser/recover-from-homoglyph.stderr b/tests/ui/parser/recover/recover-from-homoglyph.stderr
index f11ca9fd5..f11ca9fd5 100644
--- a/tests/ui/parser/recover-from-homoglyph.stderr
+++ b/tests/ui/parser/recover/recover-from-homoglyph.stderr
diff --git a/tests/ui/parser/recover-labeled-non-block-expr.fixed b/tests/ui/parser/recover/recover-labeled-non-block-expr.fixed
index c2e76444d..c2e76444d 100644
--- a/tests/ui/parser/recover-labeled-non-block-expr.fixed
+++ b/tests/ui/parser/recover/recover-labeled-non-block-expr.fixed
diff --git a/tests/ui/parser/recover-labeled-non-block-expr.rs b/tests/ui/parser/recover/recover-labeled-non-block-expr.rs
index fc11c646a..fc11c646a 100644
--- a/tests/ui/parser/recover-labeled-non-block-expr.rs
+++ b/tests/ui/parser/recover/recover-labeled-non-block-expr.rs
diff --git a/tests/ui/parser/recover-labeled-non-block-expr.stderr b/tests/ui/parser/recover/recover-labeled-non-block-expr.stderr
index d66ce6950..d66ce6950 100644
--- a/tests/ui/parser/recover-labeled-non-block-expr.stderr
+++ b/tests/ui/parser/recover/recover-labeled-non-block-expr.stderr
diff --git a/tests/ui/parser/recover-missing-semi-before-item.fixed b/tests/ui/parser/recover/recover-missing-semi-before-item.fixed
index acb846373..acb846373 100644
--- a/tests/ui/parser/recover-missing-semi-before-item.fixed
+++ b/tests/ui/parser/recover/recover-missing-semi-before-item.fixed
diff --git a/tests/ui/parser/recover-missing-semi-before-item.rs b/tests/ui/parser/recover/recover-missing-semi-before-item.rs
index ef6cfe3c4..ef6cfe3c4 100644
--- a/tests/ui/parser/recover-missing-semi-before-item.rs
+++ b/tests/ui/parser/recover/recover-missing-semi-before-item.rs
diff --git a/tests/ui/parser/recover-missing-semi-before-item.stderr b/tests/ui/parser/recover/recover-missing-semi-before-item.stderr
index 61c43f2f1..61c43f2f1 100644
--- a/tests/ui/parser/recover-missing-semi-before-item.stderr
+++ b/tests/ui/parser/recover/recover-missing-semi-before-item.stderr
diff --git a/tests/ui/parser/recover-missing-semi.rs b/tests/ui/parser/recover/recover-missing-semi.rs
index f47d5e680..f47d5e680 100644
--- a/tests/ui/parser/recover-missing-semi.rs
+++ b/tests/ui/parser/recover/recover-missing-semi.rs
diff --git a/tests/ui/parser/recover-missing-semi.stderr b/tests/ui/parser/recover/recover-missing-semi.stderr
index ba4798285..ba4798285 100644
--- a/tests/ui/parser/recover-missing-semi.stderr
+++ b/tests/ui/parser/recover/recover-missing-semi.stderr
diff --git a/tests/ui/parser/recover/recover-parens-around-match-arm-head.fixed b/tests/ui/parser/recover/recover-parens-around-match-arm-head.fixed
new file mode 100644
index 000000000..6b9b7fa88
--- /dev/null
+++ b/tests/ui/parser/recover/recover-parens-around-match-arm-head.fixed
@@ -0,0 +1,12 @@
+// run-rustfix
+fn main() {
+ let val = 42;
+ let x = match val {
+ 0 if true => {
+ //~^ ERROR unexpected parentheses surrounding `match` arm pattern
+ 42u8
+ }
+ _ => 0u8,
+ };
+ let _y: u32 = x.into(); //~ ERROR mismatched types
+}
diff --git a/tests/ui/parser/recover/recover-parens-around-match-arm-head.rs b/tests/ui/parser/recover/recover-parens-around-match-arm-head.rs
new file mode 100644
index 000000000..f523581e2
--- /dev/null
+++ b/tests/ui/parser/recover/recover-parens-around-match-arm-head.rs
@@ -0,0 +1,12 @@
+// run-rustfix
+fn main() {
+ let val = 42;
+ let x = match val {
+ (0 if true) => {
+ //~^ ERROR unexpected parentheses surrounding `match` arm pattern
+ 42u8
+ }
+ _ => 0u8,
+ };
+ let _y: u32 = x; //~ ERROR mismatched types
+}
diff --git a/tests/ui/parser/recover/recover-parens-around-match-arm-head.stderr b/tests/ui/parser/recover/recover-parens-around-match-arm-head.stderr
new file mode 100644
index 000000000..bad4d7d2f
--- /dev/null
+++ b/tests/ui/parser/recover/recover-parens-around-match-arm-head.stderr
@@ -0,0 +1,28 @@
+error: unexpected parentheses surrounding `match` arm pattern
+ --> $DIR/recover-parens-around-match-arm-head.rs:5:9
+ |
+LL | (0 if true) => {
+ | ^ ^
+ |
+help: remove parentheses surrounding the pattern
+ |
+LL - (0 if true) => {
+LL + 0 if true => {
+ |
+
+error[E0308]: mismatched types
+ --> $DIR/recover-parens-around-match-arm-head.rs:11:19
+ |
+LL | let _y: u32 = x;
+ | --- ^ expected `u32`, found `u8`
+ | |
+ | expected due to this
+ |
+help: you can convert a `u8` to a `u32`
+ |
+LL | let _y: u32 = x.into();
+ | +++++++
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/parser/recover-quantified-closure.rs b/tests/ui/parser/recover/recover-quantified-closure.rs
index 10af39b70..10af39b70 100644
--- a/tests/ui/parser/recover-quantified-closure.rs
+++ b/tests/ui/parser/recover/recover-quantified-closure.rs
diff --git a/tests/ui/parser/recover-quantified-closure.stderr b/tests/ui/parser/recover/recover-quantified-closure.stderr
index 37e93cbee..37e93cbee 100644
--- a/tests/ui/parser/recover-quantified-closure.stderr
+++ b/tests/ui/parser/recover/recover-quantified-closure.stderr
diff --git a/tests/ui/parser/recover-range-pats.rs b/tests/ui/parser/recover/recover-range-pats.rs
index 156c7ad94..156c7ad94 100644
--- a/tests/ui/parser/recover-range-pats.rs
+++ b/tests/ui/parser/recover/recover-range-pats.rs
diff --git a/tests/ui/parser/recover-range-pats.stderr b/tests/ui/parser/recover/recover-range-pats.stderr
index 5b69ca5cd..5b69ca5cd 100644
--- a/tests/ui/parser/recover-range-pats.stderr
+++ b/tests/ui/parser/recover/recover-range-pats.stderr
diff --git a/tests/ui/parser/recover-ref-dyn-mut.rs b/tests/ui/parser/recover/recover-ref-dyn-mut.rs
index 3016275cc..3016275cc 100644
--- a/tests/ui/parser/recover-ref-dyn-mut.rs
+++ b/tests/ui/parser/recover/recover-ref-dyn-mut.rs
diff --git a/tests/ui/parser/recover-ref-dyn-mut.stderr b/tests/ui/parser/recover/recover-ref-dyn-mut.stderr
index c048c8ea1..c048c8ea1 100644
--- a/tests/ui/parser/recover-ref-dyn-mut.stderr
+++ b/tests/ui/parser/recover/recover-ref-dyn-mut.stderr
diff --git a/tests/ui/parser/recover-struct.rs b/tests/ui/parser/recover/recover-struct.rs
index bfa5b454c..bfa5b454c 100644
--- a/tests/ui/parser/recover-struct.rs
+++ b/tests/ui/parser/recover/recover-struct.rs
diff --git a/tests/ui/parser/recover-struct.stderr b/tests/ui/parser/recover/recover-struct.stderr
index 9f6fb06ca..51a9e7077 100644
--- a/tests/ui/parser/recover-struct.stderr
+++ b/tests/ui/parser/recover/recover-struct.stderr
@@ -8,5 +8,5 @@ LL | Very
LL | Bad
| ^^^ unexpected token
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/recover-tuple-pat.rs b/tests/ui/parser/recover/recover-tuple-pat.rs
index 7fded752d..7fded752d 100644
--- a/tests/ui/parser/recover-tuple-pat.rs
+++ b/tests/ui/parser/recover/recover-tuple-pat.rs
diff --git a/tests/ui/parser/recover-tuple-pat.stderr b/tests/ui/parser/recover/recover-tuple-pat.stderr
index 93a6a66a6..e181f0720 100644
--- a/tests/ui/parser/recover-tuple-pat.stderr
+++ b/tests/ui/parser/recover/recover-tuple-pat.stderr
@@ -4,5 +4,5 @@ error: expected pattern, found `.`
LL | (1, .=., 4) => { let _: usize = ""; }
| ^ expected pattern
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/recover-tuple.rs b/tests/ui/parser/recover/recover-tuple.rs
index 59e2695de..59e2695de 100644
--- a/tests/ui/parser/recover-tuple.rs
+++ b/tests/ui/parser/recover/recover-tuple.rs
diff --git a/tests/ui/parser/recover-tuple.stderr b/tests/ui/parser/recover/recover-tuple.stderr
index 88891b54b..88891b54b 100644
--- a/tests/ui/parser/recover-tuple.stderr
+++ b/tests/ui/parser/recover/recover-tuple.stderr
diff --git a/tests/ui/parser/recover-unticked-labels.fixed b/tests/ui/parser/recover/recover-unticked-labels.fixed
index 159d995b8..159d995b8 100644
--- a/tests/ui/parser/recover-unticked-labels.fixed
+++ b/tests/ui/parser/recover/recover-unticked-labels.fixed
diff --git a/tests/ui/parser/recover-unticked-labels.rs b/tests/ui/parser/recover/recover-unticked-labels.rs
index 56034de68..56034de68 100644
--- a/tests/ui/parser/recover-unticked-labels.rs
+++ b/tests/ui/parser/recover/recover-unticked-labels.rs
diff --git a/tests/ui/parser/recover-unticked-labels.stderr b/tests/ui/parser/recover/recover-unticked-labels.stderr
index fbd108ca6..fbd108ca6 100644
--- a/tests/ui/parser/recover-unticked-labels.stderr
+++ b/tests/ui/parser/recover/recover-unticked-labels.stderr
diff --git a/tests/ui/parser/recover-where-clause-before-tuple-struct-body-0.fixed b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed
index 227c40e97..227c40e97 100644
--- a/tests/ui/parser/recover-where-clause-before-tuple-struct-body-0.fixed
+++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed
diff --git a/tests/ui/parser/recover-where-clause-before-tuple-struct-body-0.rs b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs
index 3699e6fe5..3699e6fe5 100644
--- a/tests/ui/parser/recover-where-clause-before-tuple-struct-body-0.rs
+++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs
diff --git a/tests/ui/parser/recover-where-clause-before-tuple-struct-body-0.stderr b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.stderr
index 18aa5fadb..18aa5fadb 100644
--- a/tests/ui/parser/recover-where-clause-before-tuple-struct-body-0.stderr
+++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.stderr
diff --git a/tests/ui/parser/recover-where-clause-before-tuple-struct-body-1.rs b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-1.rs
index f515ae81e..f515ae81e 100644
--- a/tests/ui/parser/recover-where-clause-before-tuple-struct-body-1.rs
+++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-1.rs
diff --git a/tests/ui/parser/recover-where-clause-before-tuple-struct-body-1.stderr b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-1.stderr
index 2219c2a73..2219c2a73 100644
--- a/tests/ui/parser/recover-where-clause-before-tuple-struct-body-1.stderr
+++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-1.stderr
diff --git a/tests/ui/parser/recovered-struct-variant.stderr b/tests/ui/parser/recovered-struct-variant.stderr
index 78c67866f..f0050394b 100644
--- a/tests/ui/parser/recovered-struct-variant.stderr
+++ b/tests/ui/parser/recovered-struct-variant.stderr
@@ -6,5 +6,5 @@ LL | A { a, b: usize }
| |
| while parsing this struct
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/regions-out-of-scope-slice.stderr b/tests/ui/parser/regions-out-of-scope-slice.stderr
index bbc657ffd..5d8f6af16 100644
--- a/tests/ui/parser/regions-out-of-scope-slice.stderr
+++ b/tests/ui/parser/regions-out-of-scope-slice.stderr
@@ -7,5 +7,5 @@ LL | x = &'blk [1,2,3];
| annotated with lifetime here
| help: remove the lifetime annotation
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/removed-syntax-closure-lifetime.stderr b/tests/ui/parser/removed-syntax-closure-lifetime.stderr
index e107c6b78..4c991d67e 100644
--- a/tests/ui/parser/removed-syntax-closure-lifetime.stderr
+++ b/tests/ui/parser/removed-syntax-closure-lifetime.stderr
@@ -9,5 +9,5 @@ help: you might have meant to end the type parameters here
LL | type closure = Box<lt>/fn()>;
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/removed-syntax-enum-newtype.stderr b/tests/ui/parser/removed-syntax-enum-newtype.stderr
index 8f7ca3567..5b917e938 100644
--- a/tests/ui/parser/removed-syntax-enum-newtype.stderr
+++ b/tests/ui/parser/removed-syntax-enum-newtype.stderr
@@ -6,5 +6,5 @@ LL | enum e = isize;
| |
| while parsing this enum
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/removed-syntax-field-let.stderr b/tests/ui/parser/removed-syntax-field-let.stderr
index 9bc18dabd..339d056e6 100644
--- a/tests/ui/parser/removed-syntax-field-let.stderr
+++ b/tests/ui/parser/removed-syntax-field-let.stderr
@@ -10,5 +10,5 @@ LL | let foo: (),
= note: the `let` keyword is not allowed in `struct` fields
= note: see <https://doc.rust-lang.org/book/ch05-01-defining-structs.html> for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/removed-syntax-field-semicolon.stderr b/tests/ui/parser/removed-syntax-field-semicolon.stderr
index 532d4fb2b..522912a9e 100644
--- a/tests/ui/parser/removed-syntax-field-semicolon.stderr
+++ b/tests/ui/parser/removed-syntax-field-semicolon.stderr
@@ -6,5 +6,5 @@ LL | struct S {
LL | bar: ();
| ^ help: replace `;` with `,`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/removed-syntax-fixed-vec.stderr b/tests/ui/parser/removed-syntax-fixed-vec.stderr
index a2b97544f..5bc9c2ccf 100644
--- a/tests/ui/parser/removed-syntax-fixed-vec.stderr
+++ b/tests/ui/parser/removed-syntax-fixed-vec.stderr
@@ -4,5 +4,5 @@ error: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `*`
LL | type v = [isize * 3];
| ^ expected one of 7 possible tokens
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/removed-syntax-mode.stderr b/tests/ui/parser/removed-syntax-mode.stderr
index d0393b379..fd964c4b7 100644
--- a/tests/ui/parser/removed-syntax-mode.stderr
+++ b/tests/ui/parser/removed-syntax-mode.stderr
@@ -4,5 +4,5 @@ error: expected parameter name, found `+`
LL | fn f(+x: isize) {}
| ^ expected parameter name
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/removed-syntax-mut-vec-expr.stderr b/tests/ui/parser/removed-syntax-mut-vec-expr.stderr
index 313420fb9..a1aa1ae49 100644
--- a/tests/ui/parser/removed-syntax-mut-vec-expr.stderr
+++ b/tests/ui/parser/removed-syntax-mut-vec-expr.stderr
@@ -4,5 +4,5 @@ error: expected expression, found keyword `mut`
LL | let v = [mut 1, 2, 3, 4];
| ^^^ expected expression
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/removed-syntax-mut-vec-ty.stderr b/tests/ui/parser/removed-syntax-mut-vec-ty.stderr
index 02b518e25..beaae7cdd 100644
--- a/tests/ui/parser/removed-syntax-mut-vec-ty.stderr
+++ b/tests/ui/parser/removed-syntax-mut-vec-ty.stderr
@@ -4,5 +4,5 @@ error: expected type, found keyword `mut`
LL | type v = [mut isize];
| ^^^ expected type
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/removed-syntax-ptr-lifetime.stderr b/tests/ui/parser/removed-syntax-ptr-lifetime.stderr
index 914de43e6..5c74efffa 100644
--- a/tests/ui/parser/removed-syntax-ptr-lifetime.stderr
+++ b/tests/ui/parser/removed-syntax-ptr-lifetime.stderr
@@ -4,5 +4,5 @@ error: expected one of `!`, `(`, `::`, `;`, `<`, or `where`, found `/`
LL | type bptr = &lifetime/isize;
| ^ expected one of `!`, `(`, `::`, `;`, `<`, or `where`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/removed-syntax-record.stderr b/tests/ui/parser/removed-syntax-record.stderr
index 0a1655840..dbf09f1c7 100644
--- a/tests/ui/parser/removed-syntax-record.stderr
+++ b/tests/ui/parser/removed-syntax-record.stderr
@@ -4,5 +4,5 @@ error: expected type, found `{`
LL | type t = { f: () };
| ^ expected type
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/removed-syntax-uniq-mut-expr.stderr b/tests/ui/parser/removed-syntax-uniq-mut-expr.stderr
index 63d2fdb8c..7aaedad19 100644
--- a/tests/ui/parser/removed-syntax-uniq-mut-expr.stderr
+++ b/tests/ui/parser/removed-syntax-uniq-mut-expr.stderr
@@ -4,5 +4,5 @@ error: expected expression, found keyword `mut`
LL | let a_box = box mut 42;
| ^^^ expected expression
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/removed-syntax-uniq-mut-ty.stderr b/tests/ui/parser/removed-syntax-uniq-mut-ty.stderr
index 39db0be9f..5ae1f4f58 100644
--- a/tests/ui/parser/removed-syntax-uniq-mut-ty.stderr
+++ b/tests/ui/parser/removed-syntax-uniq-mut-ty.stderr
@@ -4,5 +4,5 @@ error: expected one of `>`, a const expression, lifetime, or type, found keyword
LL | type mut_box = Box<mut isize>;
| ^^^ expected one of `>`, a const expression, lifetime, or type
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/removed-syntax-with-1.stderr b/tests/ui/parser/removed-syntax-with-1.stderr
index c3f747b61..78042678a 100644
--- a/tests/ui/parser/removed-syntax-with-1.stderr
+++ b/tests/ui/parser/removed-syntax-with-1.stderr
@@ -7,5 +7,5 @@ LL | let b = S { foo: () with a, bar: () };
| | help: try adding a comma: `,`
| while parsing this struct
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/self-in-function-arg.stderr b/tests/ui/parser/self-in-function-arg.stderr
index 47d8381b0..9ceec8d46 100644
--- a/tests/ui/parser/self-in-function-arg.stderr
+++ b/tests/ui/parser/self-in-function-arg.stderr
@@ -4,5 +4,5 @@ error: unexpected `self` parameter in function
LL | fn foo(x:i32, self: i32) -> i32 { self }
| ^^^^ must be the first parameter of an associated function
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/shebang/issue-71471-ignore-tidy.stderr b/tests/ui/parser/shebang/issue-71471-ignore-tidy.stderr
index 896a9dc83..41cd4fb93 100644
--- a/tests/ui/parser/shebang/issue-71471-ignore-tidy.stderr
+++ b/tests/ui/parser/shebang/issue-71471-ignore-tidy.stderr
@@ -4,5 +4,5 @@ error: expected `[`, found `B`
LL | #!B
| ^ expected `[`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/shebang/shebang-doc-comment.stderr b/tests/ui/parser/shebang/shebang-doc-comment.stderr
index a36b2a2f7..92fefded5 100644
--- a/tests/ui/parser/shebang/shebang-doc-comment.stderr
+++ b/tests/ui/parser/shebang/shebang-doc-comment.stderr
@@ -6,5 +6,5 @@ LL | [allow(unused_variables)]
|
= note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/shebang/shebang-must-start-file.stderr b/tests/ui/parser/shebang/shebang-must-start-file.stderr
index 50543e8bd..56991c96b 100644
--- a/tests/ui/parser/shebang/shebang-must-start-file.stderr
+++ b/tests/ui/parser/shebang/shebang-must-start-file.stderr
@@ -4,5 +4,5 @@ error: expected `[`, found `/`
LL | #!/bin/bash
| ^ expected `[`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/similar-tokens.stderr b/tests/ui/parser/similar-tokens.stderr
index 90acfc052..7070232c1 100644
--- a/tests/ui/parser/similar-tokens.stderr
+++ b/tests/ui/parser/similar-tokens.stderr
@@ -7,5 +7,5 @@ LL | use x::{A. B};
| expected one of `,`, `::`, `as`, or `}`
| help: missing `,`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/struct-filed-with-attr.stderr b/tests/ui/parser/struct-filed-with-attr.stderr
index c2cd7e82e..d850ed620 100644
--- a/tests/ui/parser/struct-filed-with-attr.stderr
+++ b/tests/ui/parser/struct-filed-with-attr.stderr
@@ -4,5 +4,5 @@ error: expected `,`, or `}`, found `#`
LL | owo: bool
| ^ help: try adding a comma: `,`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/struct-literal-in-match-discriminant.stderr b/tests/ui/parser/struct-literal-in-match-discriminant.stderr
index 692b4d735..5177f5f12 100644
--- a/tests/ui/parser/struct-literal-in-match-discriminant.stderr
+++ b/tests/ui/parser/struct-literal-in-match-discriminant.stderr
@@ -14,5 +14,5 @@ LL | x: 3
LL ~ }) {
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/suggest-assoc-const.stderr b/tests/ui/parser/suggest-assoc-const.stderr
index 2ddfa07c5..7ba1dbdff 100644
--- a/tests/ui/parser/suggest-assoc-const.stderr
+++ b/tests/ui/parser/suggest-assoc-const.stderr
@@ -4,5 +4,5 @@ error: non-item in item list
LL | let _X: i32;
| ^^^ help: consider using `const` instead of `let` for associated const: `const`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/suggest-const-for-global-var.stderr b/tests/ui/parser/suggest-const-for-global-var.stderr
index 94e44ec7f..235e621d8 100644
--- a/tests/ui/parser/suggest-const-for-global-var.stderr
+++ b/tests/ui/parser/suggest-const-for-global-var.stderr
@@ -4,5 +4,5 @@ error: expected item, found keyword `let`
LL | let X: i32 = 12;
| ^^^ consider using `const` or `static` instead of `let` for global variables
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.stderr b/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.stderr
index 396e0c130..c716d5908 100644
--- a/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.stderr
+++ b/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.stderr
@@ -11,5 +11,5 @@ LL | fn bar() {};
LL | }
| - item list ends here
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/suggest-semi-in-array.stderr b/tests/ui/parser/suggest-semi-in-array.stderr
index d7cd6efae..25b067995 100644
--- a/tests/ui/parser/suggest-semi-in-array.stderr
+++ b/tests/ui/parser/suggest-semi-in-array.stderr
@@ -6,5 +6,5 @@ LL | let v = [1
LL | 2];
| ^ unexpected token
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/suggest-semicolon-before-array.stderr b/tests/ui/parser/suggest-semicolon-before-array.stderr
index 8a33321fb..f5573f5e4 100644
--- a/tests/ui/parser/suggest-semicolon-before-array.stderr
+++ b/tests/ui/parser/suggest-semicolon-before-array.stderr
@@ -9,5 +9,5 @@ help: consider adding `;` here
LL | foo();
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/suggest_misplaced_generics/enum.stderr b/tests/ui/parser/suggest_misplaced_generics/enum.stderr
index 5f5947627..7bef9d709 100644
--- a/tests/ui/parser/suggest_misplaced_generics/enum.stderr
+++ b/tests/ui/parser/suggest_misplaced_generics/enum.stderr
@@ -10,5 +10,5 @@ LL - enum<T> Foo { Variant(T) }
LL + enum Foo<T> { Variant(T) }
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/suggest_misplaced_generics/existing_generics.stderr b/tests/ui/parser/suggest_misplaced_generics/existing_generics.stderr
index 89716e6f1..e887c0881 100644
--- a/tests/ui/parser/suggest_misplaced_generics/existing_generics.stderr
+++ b/tests/ui/parser/suggest_misplaced_generics/existing_generics.stderr
@@ -6,5 +6,5 @@ LL | fn<'a, B: 'a + std::ops::Add<Output = u32>> f<T>(_x: B) { }
|
= help: place the generic parameter name after the fn name
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.stderr b/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.stderr
index 061d0910a..18e173a9d 100644
--- a/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.stderr
+++ b/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.stderr
@@ -10,5 +10,5 @@ LL - fn<'a, B: 'a + std::ops::Add<Output = u32>> f(_x: B) { }
LL + fn f<'a, B: 'a + std::ops::Add<Output = u32>>(_x: B) { }
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/suggest_misplaced_generics/fn-invalid-generics.stderr b/tests/ui/parser/suggest_misplaced_generics/fn-invalid-generics.stderr
index 47e120169..cde690835 100644
--- a/tests/ui/parser/suggest_misplaced_generics/fn-invalid-generics.stderr
+++ b/tests/ui/parser/suggest_misplaced_generics/fn-invalid-generics.stderr
@@ -4,5 +4,5 @@ error: expected identifier, found `<`
LL | fn<~>()> id(x: T) -> T { x }
| ^ expected identifier
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/suggest_misplaced_generics/fn-simple.stderr b/tests/ui/parser/suggest_misplaced_generics/fn-simple.stderr
index e749f1a0d..e77df69ee 100644
--- a/tests/ui/parser/suggest_misplaced_generics/fn-simple.stderr
+++ b/tests/ui/parser/suggest_misplaced_generics/fn-simple.stderr
@@ -10,5 +10,5 @@ LL - fn<T> id(x: T) -> T { x }
LL + fn id<T>(x: T) -> T { x }
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/suggest_misplaced_generics/struct.stderr b/tests/ui/parser/suggest_misplaced_generics/struct.stderr
index 2b6509070..09e176adb 100644
--- a/tests/ui/parser/suggest_misplaced_generics/struct.stderr
+++ b/tests/ui/parser/suggest_misplaced_generics/struct.stderr
@@ -10,5 +10,5 @@ LL - struct<T> Foo { x: T }
LL + struct Foo<T> { x: T }
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/suggest_misplaced_generics/trait.stderr b/tests/ui/parser/suggest_misplaced_generics/trait.stderr
index ac86cfa46..0d0b780d4 100644
--- a/tests/ui/parser/suggest_misplaced_generics/trait.stderr
+++ b/tests/ui/parser/suggest_misplaced_generics/trait.stderr
@@ -10,5 +10,5 @@ LL - trait<T> Foo {
LL + trait Foo<T> {
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/suggest_misplaced_generics/type.stderr b/tests/ui/parser/suggest_misplaced_generics/type.stderr
index 22744f6cf..3034535d5 100644
--- a/tests/ui/parser/suggest_misplaced_generics/type.stderr
+++ b/tests/ui/parser/suggest_misplaced_generics/type.stderr
@@ -10,5 +10,5 @@ LL - type<T> Foo = T;
LL + type Foo<T> = T;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/trailing-carriage-return-in-string.stderr b/tests/ui/parser/trailing-carriage-return-in-string.stderr
index 8a44e0270..fa2677921 100644
--- a/tests/ui/parser/trailing-carriage-return-in-string.stderr
+++ b/tests/ui/parser/trailing-carriage-return-in-string.stderr
@@ -6,5 +6,5 @@ LL | let bad = "This is \ a test";
|
= help: this is an isolated carriage return; consider checking your editor and version control settings
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/trailing-question-in-macro-type.stderr b/tests/ui/parser/trailing-question-in-macro-type.stderr
index c096ae04f..e3d33bf25 100644
--- a/tests/ui/parser/trailing-question-in-macro-type.stderr
+++ b/tests/ui/parser/trailing-question-in-macro-type.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `o` in this scope
LL | fn_expr!{ o?.when(|&i| i > 0)?.when(|&i| i%2 == 0) };
| ^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/parser/trait-bounds-not-on-impl.stderr b/tests/ui/parser/trait-bounds-not-on-impl.stderr
index 8d2d5e3d7..7f51bd97e 100644
--- a/tests/ui/parser/trait-bounds-not-on-impl.stderr
+++ b/tests/ui/parser/trait-bounds-not-on-impl.stderr
@@ -4,5 +4,5 @@ error: expected a trait, found type
LL | impl Foo + Owned for Bar {}
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/trait-object-polytrait-priority.stderr b/tests/ui/parser/trait-object-polytrait-priority.stderr
index a6add6079..23ec1e9cf 100644
--- a/tests/ui/parser/trait-object-polytrait-priority.stderr
+++ b/tests/ui/parser/trait-object-polytrait-priority.stderr
@@ -4,6 +4,6 @@ error[E0178]: expected a path on the left-hand side of `+`, not `&for<'a> Trait<
LL | let _: &for<'a> Trait<'a> + 'static;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try adding parentheses: `&(for<'a> Trait<'a> + 'static)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0178`.
diff --git a/tests/ui/parser/trait-pub-assoc-const.stderr b/tests/ui/parser/trait-pub-assoc-const.stderr
index c14a2f2ee..436f6a390 100644
--- a/tests/ui/parser/trait-pub-assoc-const.stderr
+++ b/tests/ui/parser/trait-pub-assoc-const.stderr
@@ -6,6 +6,6 @@ LL | pub const Foo: u32;
|
= note: trait items always share the visibility of their trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0449`.
diff --git a/tests/ui/parser/trait-pub-assoc-ty.stderr b/tests/ui/parser/trait-pub-assoc-ty.stderr
index 7f6e7350c..279e3a953 100644
--- a/tests/ui/parser/trait-pub-assoc-ty.stderr
+++ b/tests/ui/parser/trait-pub-assoc-ty.stderr
@@ -6,6 +6,6 @@ LL | pub type Foo;
|
= note: trait items always share the visibility of their trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0449`.
diff --git a/tests/ui/parser/trait-pub-method.stderr b/tests/ui/parser/trait-pub-method.stderr
index 2bf1d468a..ee8b6f7cb 100644
--- a/tests/ui/parser/trait-pub-method.stderr
+++ b/tests/ui/parser/trait-pub-method.stderr
@@ -6,6 +6,6 @@ LL | pub fn foo();
|
= note: trait items always share the visibility of their trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0449`.
diff --git a/tests/ui/parser/unbalanced-doublequote.stderr b/tests/ui/parser/unbalanced-doublequote.stderr
index 94b300a7b..d40b982da 100644
--- a/tests/ui/parser/unbalanced-doublequote.stderr
+++ b/tests/ui/parser/unbalanced-doublequote.stderr
@@ -5,6 +5,6 @@ LL | / "
LL | | }
| |__^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0765`.
diff --git a/tests/ui/parser/unclosed-braces.stderr b/tests/ui/parser/unclosed-braces.stderr
index cbc5f8de4..acd92ac79 100644
--- a/tests/ui/parser/unclosed-braces.stderr
+++ b/tests/ui/parser/unclosed-braces.stderr
@@ -13,5 +13,5 @@ LL | }
LL |
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/unclosed-delimiter-in-dep.stderr b/tests/ui/parser/unclosed-delimiter-in-dep.stderr
index a46d020b9..1231decd9 100644
--- a/tests/ui/parser/unclosed-delimiter-in-dep.stderr
+++ b/tests/ui/parser/unclosed-delimiter-in-dep.stderr
@@ -9,5 +9,5 @@ LL | }
LL | }
| ^ mismatched closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/unclosed_delim_mod.stderr b/tests/ui/parser/unclosed_delim_mod.stderr
index a46d020b9..1231decd9 100644
--- a/tests/ui/parser/unclosed_delim_mod.stderr
+++ b/tests/ui/parser/unclosed_delim_mod.stderr
@@ -9,5 +9,5 @@ LL | }
LL | }
| ^ mismatched closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/unmatched-delimiter-at-end-of-file.stderr b/tests/ui/parser/unmatched-delimiter-at-end-of-file.stderr
index 430a13e6e..c6960892b 100644
--- a/tests/ui/parser/unmatched-delimiter-at-end-of-file.stderr
+++ b/tests/ui/parser/unmatched-delimiter-at-end-of-file.stderr
@@ -4,5 +4,5 @@ error: this file contains an unclosed delimiter
LL | fn foo() {
| - unclosed delimiter ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/unmatched-langle-2.stderr b/tests/ui/parser/unmatched-langle-2.stderr
index 773bb33d8..9881c6ba5 100644
--- a/tests/ui/parser/unmatched-langle-2.stderr
+++ b/tests/ui/parser/unmatched-langle-2.stderr
@@ -4,5 +4,5 @@ error: expected `::`, found `(`
LL | foo::<Ty<<<i32>();
| ^ expected `::`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/unsafe-foreign-mod.stderr b/tests/ui/parser/unsafe-foreign-mod.stderr
index 4acf72c5d..77f6e93be 100644
--- a/tests/ui/parser/unsafe-foreign-mod.stderr
+++ b/tests/ui/parser/unsafe-foreign-mod.stderr
@@ -4,5 +4,5 @@ error: extern block cannot be declared unsafe
LL | unsafe extern "C" {
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/unsized.stderr b/tests/ui/parser/unsized.stderr
index 3d4ed526b..1bb4aa97d 100644
--- a/tests/ui/parser/unsized.stderr
+++ b/tests/ui/parser/unsized.stderr
@@ -4,5 +4,5 @@ error: expected `where`, `{`, `(`, or `;` after struct name, found keyword `for`
LL | struct S1 for type;
| ^^^ expected `where`, `{`, `(`, or `;` after struct name
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/unsized2.stderr b/tests/ui/parser/unsized2.stderr
index 17e39b292..10f4c8332 100644
--- a/tests/ui/parser/unsized2.stderr
+++ b/tests/ui/parser/unsized2.stderr
@@ -4,5 +4,5 @@ error: expected expression, found keyword `type`
LL | f<type>();
| ^^^^ expected expression
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/use-ends-with-mod-sep.stderr b/tests/ui/parser/use-ends-with-mod-sep.stderr
index bd0d881a0..2f8e09c07 100644
--- a/tests/ui/parser/use-ends-with-mod-sep.stderr
+++ b/tests/ui/parser/use-ends-with-mod-sep.stderr
@@ -4,5 +4,5 @@ error: expected identifier, found `;`
LL | use std::any::;
| ^ expected identifier
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/use-unclosed-brace.stderr b/tests/ui/parser/use-unclosed-brace.stderr
index ad5bb2de1..6e624cb91 100644
--- a/tests/ui/parser/use-unclosed-brace.stderr
+++ b/tests/ui/parser/use-unclosed-brace.stderr
@@ -7,5 +7,5 @@ LL | use foo::{bar, baz;
LL | fn main() {}
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/virtual-structs.stderr b/tests/ui/parser/virtual-structs.stderr
index 268fc1057..7b45e77ba 100644
--- a/tests/ui/parser/virtual-structs.stderr
+++ b/tests/ui/parser/virtual-structs.stderr
@@ -6,5 +6,5 @@ LL | virtual struct SuperStruct {
|
= note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/where-clauses-no-bounds-or-predicates.stderr b/tests/ui/parser/where-clauses-no-bounds-or-predicates.stderr
index b80b0a409..4bd0cc885 100644
--- a/tests/ui/parser/where-clauses-no-bounds-or-predicates.stderr
+++ b/tests/ui/parser/where-clauses-no-bounds-or-predicates.stderr
@@ -4,5 +4,5 @@ error: expected `:`, found `{`
LL | fn foo<'a>() where 'a {}
| ^ expected `:`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/parser/while-if-let-without-body.stderr b/tests/ui/parser/while-if-let-without-body.stderr
index 2dac45c11..0bd68b7b9 100644
--- a/tests/ui/parser/while-if-let-without-body.stderr
+++ b/tests/ui/parser/while-if-let-without-body.stderr
@@ -14,5 +14,5 @@ LL | | }
LL | }
| ^ expected `{`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pattern/bindings-after-at/bind-by-move-no-subbindings-fun-param.stderr b/tests/ui/pattern/bindings-after-at/bind-by-move-no-subbindings-fun-param.stderr
index a481ca468..4a6d36a4e 100644
--- a/tests/ui/pattern/bindings-after-at/bind-by-move-no-subbindings-fun-param.stderr
+++ b/tests/ui/pattern/bindings-after-at/bind-by-move-no-subbindings-fun-param.stderr
@@ -8,6 +8,6 @@ LL | fn f(a @ A(u): A) -> Box<u8> {
|
= note: partial move occurs because value has type `Box<u8>`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse-promotion.stderr b/tests/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse-promotion.stderr
index c440f4619..815a4ade9 100644
--- a/tests/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse-promotion.stderr
+++ b/tests/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse-promotion.stderr
@@ -12,5 +12,5 @@ help: borrow this binding in the pattern to avoid moving the value
LL | let ref a @ ref b = U;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pattern/bindings-after-at/copy-and-move-mixed.stderr b/tests/ui/pattern/bindings-after-at/copy-and-move-mixed.stderr
index e0e623fa5..d0ffb59a6 100644
--- a/tests/ui/pattern/bindings-after-at/copy-and-move-mixed.stderr
+++ b/tests/ui/pattern/bindings-after-at/copy-and-move-mixed.stderr
@@ -12,6 +12,6 @@ help: borrow this binding in the pattern to avoid moving the value
LL | let ref a @ NC(b, ref c @ NC(d, e)) = NC(C, NC(C, C));
| +++ +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/pattern/issue-114896.stderr b/tests/ui/pattern/issue-114896.stderr
index ffeb7bc13..285c9109e 100644
--- a/tests/ui/pattern/issue-114896.stderr
+++ b/tests/ui/pattern/issue-114896.stderr
@@ -6,6 +6,6 @@ LL | let &b = a;
LL | b.make_ascii_uppercase();
| ^ cannot borrow as mutable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/pattern/issue-115599.stderr b/tests/ui/pattern/issue-115599.stderr
index e6cb6c1dd..c1e85d0bb 100644
--- a/tests/ui/pattern/issue-115599.stderr
+++ b/tests/ui/pattern/issue-115599.stderr
@@ -7,5 +7,5 @@ LL | if let CONST_STRING = empty_str {}
= note: the traits must be derived, manual `impl`s are not sufficient
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pattern/issue-52240.stderr b/tests/ui/pattern/issue-52240.stderr
index 69b663b17..dcf3da45e 100644
--- a/tests/ui/pattern/issue-52240.stderr
+++ b/tests/ui/pattern/issue-52240.stderr
@@ -4,6 +4,6 @@ error[E0596]: cannot borrow data in a `&` reference as mutable
LL | if let (Some(Foo::Bar(ref mut val)), _) = (&arr.get(0), 0) {
| ^^^^^^^^^^^ cannot borrow as mutable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/pattern/issue-66270-pat-struct-parser-recovery.stderr b/tests/ui/pattern/issue-66270-pat-struct-parser-recovery.stderr
index f40642f30..087ff513b 100644
--- a/tests/ui/pattern/issue-66270-pat-struct-parser-recovery.stderr
+++ b/tests/ui/pattern/issue-66270-pat-struct-parser-recovery.stderr
@@ -6,5 +6,5 @@ LL | struct Bug {
LL | incorrect_field: 0,
| ^ expected type
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pattern/issue-72565.stderr b/tests/ui/pattern/issue-72565.stderr
index 051972069..b503a17fe 100644
--- a/tests/ui/pattern/issue-72565.stderr
+++ b/tests/ui/pattern/issue-72565.stderr
@@ -4,5 +4,5 @@ error: `dyn PartialEq<u32>` cannot be used in patterns
LL | F => panic!(),
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pattern/issue-80186-mut-binding-help-suggestion.stderr b/tests/ui/pattern/issue-80186-mut-binding-help-suggestion.stderr
index 75b6c163b..167016397 100644
--- a/tests/ui/pattern/issue-80186-mut-binding-help-suggestion.stderr
+++ b/tests/ui/pattern/issue-80186-mut-binding-help-suggestion.stderr
@@ -6,5 +6,5 @@ LL | let mut &x = &0;
|
= note: `mut` may be followed by `variable` and `variable @ pattern`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pattern/issue-94866.stderr b/tests/ui/pattern/issue-94866.stderr
index dee4b3f55..8edb95f76 100644
--- a/tests/ui/pattern/issue-94866.stderr
+++ b/tests/ui/pattern/issue-94866.stderr
@@ -16,6 +16,6 @@ LL ~ Enum::A => m!(),
LL + Enum::B => todo!()
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/issue-95878.stderr b/tests/ui/pattern/issue-95878.stderr
index e0eea06e0..e938c67f3 100644
--- a/tests/ui/pattern/issue-95878.stderr
+++ b/tests/ui/pattern/issue-95878.stderr
@@ -4,5 +4,5 @@ error: expected identifier, found keyword `Self`
LL | ref Self => (),
| ^^^^ expected identifier, found keyword
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes-fixable.stderr b/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes-fixable.stderr
index d3ab533e3..85379d660 100644
--- a/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes-fixable.stderr
+++ b/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes-fixable.stderr
@@ -12,6 +12,6 @@ help: consider borrowing the pattern binding
LL | let (a, ref mut b) = &mut p;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes.stderr b/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes.stderr
index 65030b622..494e5e2b2 100644
--- a/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes.stderr
+++ b/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes.stderr
@@ -12,6 +12,6 @@ help: consider borrowing the pattern binding
LL | let (a, ref mut b) = &p;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/pattern/never_patterns.rs b/tests/ui/pattern/never_patterns.rs
new file mode 100644
index 000000000..915f3e75e
--- /dev/null
+++ b/tests/ui/pattern/never_patterns.rs
@@ -0,0 +1,99 @@
+#![feature(never_patterns)]
+#![allow(incomplete_features)]
+
+enum Void {}
+
+fn main() {}
+
+// The classic use for empty types.
+fn safe_unwrap_result<T>(res: Result<T, Void>) {
+ let Ok(_x) = res;
+ // FIXME(never_patterns): These should be allowed
+ let (Ok(_x) | Err(!)) = &res;
+ //~^ ERROR: is not bound in all patterns
+ let (Ok(_x) | Err(&!)) = res.as_ref();
+ //~^ ERROR: is not bound in all patterns
+}
+
+// Check we only accept `!` where we want to.
+fn never_pattern_location(void: Void) {
+ // FIXME(never_patterns): Don't accept on a non-empty type.
+ match Some(0) {
+ None => {}
+ Some(!),
+ }
+ // FIXME(never_patterns): Don't accept on an arbitrary type, even if there are no more branches.
+ match () {
+ () => {}
+ !,
+ }
+ // FIXME(never_patterns): Don't accept even on an empty branch.
+ match None::<Void> {
+ None => {}
+ !,
+ }
+ // FIXME(never_patterns): Let alone if the emptiness is behind a reference.
+ match None::<&Void> {
+ None => {}
+ !,
+ }
+ // Participate in match ergonomics.
+ match &void {
+ !
+ }
+ match &&void {
+ !
+ }
+ match &&void {
+ &!
+ }
+ match &None::<Void> {
+ None => {}
+ Some(!)
+ }
+ match None::<&Void> {
+ None => {}
+ Some(!),
+ }
+ // Accept on a composite empty type.
+ match None::<&(u32, Void)> {
+ None => {}
+ Some(&!),
+ }
+ // Accept on an simple empty type.
+ match None::<Void> {
+ None => {}
+ Some(!),
+ }
+ match None::<&Void> {
+ None => {}
+ Some(&!),
+ }
+ match None::<&(u32, Void)> {
+ None => {}
+ Some(&(_, !)),
+ }
+}
+
+fn never_and_bindings() {
+ let x: Result<bool, &(u32, Void)> = Ok(false);
+
+ // FIXME(never_patterns): Never patterns in or-patterns don't need to share the same bindings.
+ match x {
+ Ok(_x) | Err(&!) => {}
+ //~^ ERROR: is not bound in all patterns
+ }
+ let (Ok(_x) | Err(&!)) = x;
+ //~^ ERROR: is not bound in all patterns
+
+ // FIXME(never_patterns): A never pattern mustn't have bindings.
+ match x {
+ Ok(_) => {}
+ Err(&(_b, !)),
+ }
+ match x {
+ Ok(_a) | Err(&(_b, !)) => {}
+ //~^ ERROR: is not bound in all patterns
+ //~| ERROR: is not bound in all patterns
+ }
+}
diff --git a/tests/ui/pattern/never_patterns.stderr b/tests/ui/pattern/never_patterns.stderr
new file mode 100644
index 000000000..11e50debf
--- /dev/null
+++ b/tests/ui/pattern/never_patterns.stderr
@@ -0,0 +1,51 @@
+error[E0408]: variable `_x` is not bound in all patterns
+ --> $DIR/never_patterns.rs:12:19
+ |
+LL | let (Ok(_x) | Err(!)) = &res;
+ | -- ^^^^^^ pattern doesn't bind `_x`
+ | |
+ | variable not in all patterns
+
+error[E0408]: variable `_x` is not bound in all patterns
+ --> $DIR/never_patterns.rs:14:19
+ |
+LL | let (Ok(_x) | Err(&!)) = res.as_ref();
+ | -- ^^^^^^^ pattern doesn't bind `_x`
+ | |
+ | variable not in all patterns
+
+error[E0408]: variable `_x` is not bound in all patterns
+ --> $DIR/never_patterns.rs:83:18
+ |
+LL | Ok(_x) | Err(&!) => {}
+ | -- ^^^^^^^ pattern doesn't bind `_x`
+ | |
+ | variable not in all patterns
+
+error[E0408]: variable `_x` is not bound in all patterns
+ --> $DIR/never_patterns.rs:86:19
+ |
+LL | let (Ok(_x) | Err(&!)) = x;
+ | -- ^^^^^^^ pattern doesn't bind `_x`
+ | |
+ | variable not in all patterns
+
+error[E0408]: variable `_b` is not bound in all patterns
+ --> $DIR/never_patterns.rs:95:9
+ |
+LL | Ok(_a) | Err(&(_b, !)) => {}
+ | ^^^^^^ -- variable not in all patterns
+ | |
+ | pattern doesn't bind `_b`
+
+error[E0408]: variable `_a` is not bound in all patterns
+ --> $DIR/never_patterns.rs:95:18
+ |
+LL | Ok(_a) | Err(&(_b, !)) => {}
+ | -- ^^^^^^^^^^^^^ pattern doesn't bind `_a`
+ | |
+ | variable not in all patterns
+
+error: aborting due to 6 previous errors
+
+For more information about this error, try `rustc --explain E0408`.
diff --git a/tests/ui/pattern/pat-shadow-in-nested-binding.stderr b/tests/ui/pattern/pat-shadow-in-nested-binding.stderr
index 0c5824be9..ad175710b 100644
--- a/tests/ui/pattern/pat-shadow-in-nested-binding.stderr
+++ b/tests/ui/pattern/pat-shadow-in-nested-binding.stderr
@@ -7,6 +7,6 @@ LL | struct foo(usize);
LL | let (foo, _) = (2, 3);
| ^^^ cannot be named the same as a tuple struct
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0530`.
diff --git a/tests/ui/pattern/pat-struct-field-expr-has-type.stderr b/tests/ui/pattern/pat-struct-field-expr-has-type.stderr
index 029075293..80bedfe78 100644
--- a/tests/ui/pattern/pat-struct-field-expr-has-type.stderr
+++ b/tests/ui/pattern/pat-struct-field-expr-has-type.stderr
@@ -9,6 +9,6 @@ LL | S { f: Ok(_) } => {}
= note: expected type `u8`
found enum `Result<_, _>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/pattern/pat-type-err-formal-param.stderr b/tests/ui/pattern/pat-type-err-formal-param.stderr
index 4f482c52a..c100aa607 100644
--- a/tests/ui/pattern/pat-type-err-formal-param.stderr
+++ b/tests/ui/pattern/pat-type-err-formal-param.stderr
@@ -6,6 +6,6 @@ LL | fn foo(Tuple(_): String) {}
| |
| expected `String`, found `Tuple`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/pattern/pattern-bad-ref-box-order.fixed b/tests/ui/pattern/pattern-bad-ref-box-order.fixed
new file mode 100644
index 000000000..8825744a0
--- /dev/null
+++ b/tests/ui/pattern/pattern-bad-ref-box-order.fixed
@@ -0,0 +1,14 @@
+// run-rustfix
+
+#![feature(box_patterns)]
+#![allow(dead_code)]
+
+fn foo(f: Option<Box<i32>>) {
+ match f {
+ Some(box ref _i) => {},
+ //~^ ERROR switch the order of `ref` and `box`
+ None => {}
+ }
+}
+
+fn main() { }
diff --git a/tests/ui/pattern/pattern-bad-ref-box-order.rs b/tests/ui/pattern/pattern-bad-ref-box-order.rs
new file mode 100644
index 000000000..f3fcf0cea
--- /dev/null
+++ b/tests/ui/pattern/pattern-bad-ref-box-order.rs
@@ -0,0 +1,14 @@
+// run-rustfix
+
+#![feature(box_patterns)]
+#![allow(dead_code)]
+
+fn foo(f: Option<Box<i32>>) {
+ match f {
+ Some(ref box _i) => {},
+ //~^ ERROR switch the order of `ref` and `box`
+ None => {}
+ }
+}
+
+fn main() { }
diff --git a/tests/ui/pattern/pattern-bad-ref-box-order.stderr b/tests/ui/pattern/pattern-bad-ref-box-order.stderr
new file mode 100644
index 000000000..a49f05c10
--- /dev/null
+++ b/tests/ui/pattern/pattern-bad-ref-box-order.stderr
@@ -0,0 +1,8 @@
+error: switch the order of `ref` and `box`
+ --> $DIR/pattern-bad-ref-box-order.rs:8:14
+ |
+LL | Some(ref box _i) => {},
+ | ^^^^^^^ help: swap them: `box ref`
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/pattern/pattern-ident-path-generics.stderr b/tests/ui/pattern/pattern-ident-path-generics.stderr
index 62283dfe9..942a42650 100644
--- a/tests/ui/pattern/pattern-ident-path-generics.stderr
+++ b/tests/ui/pattern/pattern-ident-path-generics.stderr
@@ -9,6 +9,6 @@ LL | None::<isize> => {}
= note: expected enum `Option<&str>`
found enum `Option<isize>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/pattern/pattern-tyvar-2.stderr b/tests/ui/pattern/pattern-tyvar-2.stderr
index 121817e70..c6540e795 100644
--- a/tests/ui/pattern/pattern-tyvar-2.stderr
+++ b/tests/ui/pattern/pattern-tyvar-2.stderr
@@ -6,6 +6,6 @@ LL | fn foo(t: Bar) -> isize { match t { Bar::T1(_, Some(x)) => { return x * 3;
| |
| Vec<isize>
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/pattern/pattern-tyvar.stderr b/tests/ui/pattern/pattern-tyvar.stderr
index 4eb002548..492b34cd2 100644
--- a/tests/ui/pattern/pattern-tyvar.stderr
+++ b/tests/ui/pattern/pattern-tyvar.stderr
@@ -9,6 +9,6 @@ LL | Bar::T1(_, Some::<isize>(x)) => {
= note: expected enum `Option<Vec<isize>>`
found enum `Option<isize>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/pattern/range-pattern-meant-to-be-slice-rest-pattern.rs b/tests/ui/pattern/range-pattern-meant-to-be-slice-rest-pattern.rs
new file mode 100644
index 000000000..a619fcafc
--- /dev/null
+++ b/tests/ui/pattern/range-pattern-meant-to-be-slice-rest-pattern.rs
@@ -0,0 +1,9 @@
+fn main() {
+ match &[1, 2, 3][..] {
+ [1, rest..] => println!("{rest:?}"),
+ //~^ ERROR cannot find value `rest` in this scope
+ //~| ERROR cannot find value `rest` in this scope
+ //~| ERROR `X..` patterns in slices are experimental
+ _ => {}
+ }
+}
diff --git a/tests/ui/pattern/range-pattern-meant-to-be-slice-rest-pattern.stderr b/tests/ui/pattern/range-pattern-meant-to-be-slice-rest-pattern.stderr
new file mode 100644
index 000000000..cddd01212
--- /dev/null
+++ b/tests/ui/pattern/range-pattern-meant-to-be-slice-rest-pattern.stderr
@@ -0,0 +1,30 @@
+error[E0425]: cannot find value `rest` in this scope
+ --> $DIR/range-pattern-meant-to-be-slice-rest-pattern.rs:3:13
+ |
+LL | [1, rest..] => println!("{rest:?}"),
+ | ^^^^ not found in this scope
+ |
+help: if you meant to collect the rest of the slice in `rest`, use the at operator
+ |
+LL | [1, rest @ ..] => println!("{rest:?}"),
+ | +
+
+error[E0425]: cannot find value `rest` in this scope
+ --> $DIR/range-pattern-meant-to-be-slice-rest-pattern.rs:3:35
+ |
+LL | [1, rest..] => println!("{rest:?}"),
+ | ^^^^ not found in this scope
+
+error[E0658]: `X..` patterns in slices are experimental
+ --> $DIR/range-pattern-meant-to-be-slice-rest-pattern.rs:3:13
+ |
+LL | [1, rest..] => println!("{rest:?}"),
+ | ^^^^^^
+ |
+ = note: see issue #67264 <https://github.com/rust-lang/rust/issues/67264> for more information
+ = help: add `#![feature(half_open_range_patterns_in_slices)]` to the crate attributes to enable
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0425, E0658.
+For more information about an error, try `rustc --explain E0425`.
diff --git a/tests/ui/pattern/slice-patterns-irrefutable.stderr b/tests/ui/pattern/slice-patterns-irrefutable.stderr
index e98ee28d6..9b46f8a88 100644
--- a/tests/ui/pattern/slice-patterns-irrefutable.stderr
+++ b/tests/ui/pattern/slice-patterns-irrefutable.stderr
@@ -12,6 +12,6 @@ help: consider giving `b` an explicit type, where the placeholders `_` are speci
LL | let b: [_; 3];
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.stderr b/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.stderr
index 5f2c89246..77d552b0c 100644
--- a/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.stderr
+++ b/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.stderr
@@ -16,6 +16,6 @@ LL ~ Some(_) => {},
LL + None => todo!()
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/const-partial_eq-fallback-ice.stderr b/tests/ui/pattern/usefulness/const-partial_eq-fallback-ice.stderr
index dbd46da44..2352ecd0a 100644
--- a/tests/ui/pattern/usefulness/const-partial_eq-fallback-ice.stderr
+++ b/tests/ui/pattern/usefulness/const-partial_eq-fallback-ice.stderr
@@ -7,5 +7,5 @@ LL | if let CONSTANT = &&MyType {
= note: the traits must be derived, manual `impl`s are not sufficient
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pattern/usefulness/empty-match-check-notes.exhaustive_patterns.stderr b/tests/ui/pattern/usefulness/empty-match-check-notes.exhaustive_patterns.stderr
new file mode 100644
index 000000000..304435cb2
--- /dev/null
+++ b/tests/ui/pattern/usefulness/empty-match-check-notes.exhaustive_patterns.stderr
@@ -0,0 +1,63 @@
+error: unreachable pattern
+ --> $DIR/empty-match-check-notes.rs:17:9
+ |
+LL | _ => {}
+ | ^
+ |
+note: the lint level is defined here
+ --> $DIR/empty-match-check-notes.rs:7:9
+ |
+LL | #![deny(unreachable_patterns)]
+ | ^^^^^^^^^^^^^^^^^^^^
+
+error: unreachable pattern
+ --> $DIR/empty-match-check-notes.rs:20:9
+ |
+LL | _ if false => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-match-check-notes.rs:27:9
+ |
+LL | _ => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-match-check-notes.rs:30:9
+ |
+LL | _ if false => {}
+ | ^
+
+error[E0005]: refutable pattern in local binding
+ --> $DIR/empty-match-check-notes.rs:35:9
+ |
+LL | let None = x;
+ | ^^^^ pattern `Some(_)` not covered
+ |
+ = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
+ = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
+ = note: pattern `Some(_)` is currently uninhabited, but this variant contains private fields which may become inhabited in the future
+ = note: the matched value is of type `Option<SecretlyUninhabitedForeignStruct>`
+help: you might want to use `if let` to ignore the variant that isn't matched
+ |
+LL | if let None = x { todo!() };
+ | ++ +++++++++++
+
+error[E0004]: non-exhaustive patterns: `_` not covered
+ --> $DIR/empty-match-check-notes.rs:45:11
+ |
+LL | match 0u8 {
+ | ^^^ pattern `_` not covered
+ |
+ = note: the matched value is of type `u8`
+ = note: match arms with guards don't count towards exhaustivity
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+ |
+LL ~ _ if false => {},
+LL + _ => todo!()
+ |
+
+error: aborting due to 6 previous errors
+
+Some errors have detailed explanations: E0004, E0005.
+For more information about an error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/empty-match-check-notes.normal.stderr b/tests/ui/pattern/usefulness/empty-match-check-notes.normal.stderr
new file mode 100644
index 000000000..40494b726
--- /dev/null
+++ b/tests/ui/pattern/usefulness/empty-match-check-notes.normal.stderr
@@ -0,0 +1,62 @@
+error: unreachable pattern
+ --> $DIR/empty-match-check-notes.rs:17:9
+ |
+LL | _ => {}
+ | ^
+ |
+note: the lint level is defined here
+ --> $DIR/empty-match-check-notes.rs:7:9
+ |
+LL | #![deny(unreachable_patterns)]
+ | ^^^^^^^^^^^^^^^^^^^^
+
+error: unreachable pattern
+ --> $DIR/empty-match-check-notes.rs:20:9
+ |
+LL | _ if false => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-match-check-notes.rs:27:9
+ |
+LL | _ => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-match-check-notes.rs:30:9
+ |
+LL | _ if false => {}
+ | ^
+
+error[E0005]: refutable pattern in local binding
+ --> $DIR/empty-match-check-notes.rs:35:9
+ |
+LL | let None = x;
+ | ^^^^ pattern `Some(_)` not covered
+ |
+ = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
+ = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
+ = note: the matched value is of type `Option<SecretlyUninhabitedForeignStruct>`
+help: you might want to use `if let` to ignore the variant that isn't matched
+ |
+LL | if let None = x { todo!() };
+ | ++ +++++++++++
+
+error[E0004]: non-exhaustive patterns: `_` not covered
+ --> $DIR/empty-match-check-notes.rs:45:11
+ |
+LL | match 0u8 {
+ | ^^^ pattern `_` not covered
+ |
+ = note: the matched value is of type `u8`
+ = note: match arms with guards don't count towards exhaustivity
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+ |
+LL ~ _ if false => {},
+LL + _ => todo!()
+ |
+
+error: aborting due to 6 previous errors
+
+Some errors have detailed explanations: E0004, E0005.
+For more information about an error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/empty-match-check-notes.rs b/tests/ui/pattern/usefulness/empty-match-check-notes.rs
new file mode 100644
index 000000000..ee9ff3dcf
--- /dev/null
+++ b/tests/ui/pattern/usefulness/empty-match-check-notes.rs
@@ -0,0 +1,52 @@
+// aux-build:empty.rs
+// revisions: normal exhaustive_patterns
+//
+// This tests a match with no arms on various types, and checks NOTEs.
+#![feature(never_type)]
+#![cfg_attr(exhaustive_patterns, feature(exhaustive_patterns))]
+#![deny(unreachable_patterns)]
+//~^ NOTE the lint level is defined here
+
+extern crate empty;
+
+enum EmptyEnum {}
+
+fn empty_enum(x: EmptyEnum) {
+ match x {} // ok
+ match x {
+ _ => {} //~ ERROR unreachable pattern
+ }
+ match x {
+ _ if false => {} //~ ERROR unreachable pattern
+ }
+}
+
+fn empty_foreign_enum(x: empty::EmptyForeignEnum) {
+ match x {} // ok
+ match x {
+ _ => {} //~ ERROR unreachable pattern
+ }
+ match x {
+ _ if false => {} //~ ERROR unreachable pattern
+ }
+}
+
+fn empty_foreign_enum_private(x: Option<empty::SecretlyUninhabitedForeignStruct>) {
+ let None = x;
+ //~^ ERROR refutable pattern in local binding
+ //~| NOTE `let` bindings require an "irrefutable pattern"
+ //~| NOTE for more information, visit
+ //~| NOTE the matched value is of type
+ //~| NOTE pattern `Some(_)` not covered
+ //[exhaustive_patterns]~| NOTE currently uninhabited, but this variant contains private fields
+}
+
+fn main() {
+ match 0u8 {
+ //~^ ERROR `_` not covered
+ //~| NOTE the matched value is of type
+ //~| NOTE match arms with guards don't count towards exhaustivity
+ //~| NOTE pattern `_` not covered
+ _ if false => {}
+ }
+}
diff --git a/tests/ui/pattern/usefulness/empty-match.exhaustive_patterns.stderr b/tests/ui/pattern/usefulness/empty-match.exhaustive_patterns.stderr
index 8f9bd5bde..9c3bebd77 100644
--- a/tests/ui/pattern/usefulness/empty-match.exhaustive_patterns.stderr
+++ b/tests/ui/pattern/usefulness/empty-match.exhaustive_patterns.stderr
@@ -1,62 +1,5 @@
-error: unreachable pattern
- --> $DIR/empty-match.rs:68:9
- |
-LL | _ => {},
- | ^
- |
-note: the lint level is defined here
- --> $DIR/empty-match.rs:8:9
- |
-LL | #![deny(unreachable_patterns)]
- | ^^^^^^^^^^^^^^^^^^^^
-
-error: unreachable pattern
- --> $DIR/empty-match.rs:71:9
- |
-LL | _ if false => {},
- | ^
-
-error: unreachable pattern
- --> $DIR/empty-match.rs:78:9
- |
-LL | _ => {},
- | ^
-
-error: unreachable pattern
- --> $DIR/empty-match.rs:81:9
- |
-LL | _ if false => {},
- | ^
-
-error[E0005]: refutable pattern in local binding
- --> $DIR/empty-match.rs:86:9
- |
-LL | let None = x;
- | ^^^^ pattern `Some(_)` not covered
- |
- = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
- = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
- = note: pattern `Some(_)` is currently uninhabited, but this variant contains private fields which may become inhabited in the future
- = note: the matched value is of type `Option<SecretlyUninhabitedForeignStruct>`
-help: you might want to use `if let` to ignore the variant that isn't matched
- |
-LL | if let None = x { todo!() };
- | ++ +++++++++++
-
-error: unreachable pattern
- --> $DIR/empty-match.rs:98:9
- |
-LL | _ => {},
- | ^
-
-error: unreachable pattern
- --> $DIR/empty-match.rs:101:9
- |
-LL | _ if false => {},
- | ^
-
error[E0004]: non-exhaustive patterns: type `u8` is non-empty
- --> $DIR/empty-match.rs:119:20
+ --> $DIR/empty-match.rs:46:20
|
LL | match_no_arms!(0u8);
| ^^^
@@ -65,122 +8,121 @@ LL | match_no_arms!(0u8);
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
error[E0004]: non-exhaustive patterns: type `NonEmptyStruct1` is non-empty
- --> $DIR/empty-match.rs:121:20
+ --> $DIR/empty-match.rs:47:20
|
LL | match_no_arms!(NonEmptyStruct1);
| ^^^^^^^^^^^^^^^
|
note: `NonEmptyStruct1` defined here
- --> $DIR/empty-match.rs:15:8
+ --> $DIR/empty-match.rs:22:12
|
-LL | struct NonEmptyStruct1;
- | ^^^^^^^^^^^^^^^
+LL | struct NonEmptyStruct1;
+ | ^^^^^^^^^^^^^^^
= note: the matched value is of type `NonEmptyStruct1`
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
error[E0004]: non-exhaustive patterns: type `NonEmptyStruct2` is non-empty
- --> $DIR/empty-match.rs:123:20
+ --> $DIR/empty-match.rs:48:20
|
LL | match_no_arms!(NonEmptyStruct2(true));
| ^^^^^^^^^^^^^^^^^^^^^
|
note: `NonEmptyStruct2` defined here
- --> $DIR/empty-match.rs:18:8
+ --> $DIR/empty-match.rs:23:12
|
-LL | struct NonEmptyStruct2(bool);
- | ^^^^^^^^^^^^^^^
+LL | struct NonEmptyStruct2(bool);
+ | ^^^^^^^^^^^^^^^
= note: the matched value is of type `NonEmptyStruct2`
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
error[E0004]: non-exhaustive patterns: type `NonEmptyUnion1` is non-empty
- --> $DIR/empty-match.rs:125:20
+ --> $DIR/empty-match.rs:49:20
|
LL | match_no_arms!((NonEmptyUnion1 { foo: () }));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: `NonEmptyUnion1` defined here
- --> $DIR/empty-match.rs:21:7
+ --> $DIR/empty-match.rs:24:11
|
-LL | union NonEmptyUnion1 {
- | ^^^^^^^^^^^^^^
+LL | union NonEmptyUnion1 {
+ | ^^^^^^^^^^^^^^
= note: the matched value is of type `NonEmptyUnion1`
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
error[E0004]: non-exhaustive patterns: type `NonEmptyUnion2` is non-empty
- --> $DIR/empty-match.rs:127:20
+ --> $DIR/empty-match.rs:50:20
|
LL | match_no_arms!((NonEmptyUnion2 { foo: () }));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: `NonEmptyUnion2` defined here
- --> $DIR/empty-match.rs:26:7
+ --> $DIR/empty-match.rs:27:11
|
-LL | union NonEmptyUnion2 {
- | ^^^^^^^^^^^^^^
+LL | union NonEmptyUnion2 {
+ | ^^^^^^^^^^^^^^
= note: the matched value is of type `NonEmptyUnion2`
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
error[E0004]: non-exhaustive patterns: `NonEmptyEnum1::Foo(_)` not covered
- --> $DIR/empty-match.rs:129:20
+ --> $DIR/empty-match.rs:51:20
|
LL | match_no_arms!(NonEmptyEnum1::Foo(true));
| ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyEnum1::Foo(_)` not covered
|
note: `NonEmptyEnum1` defined here
- --> $DIR/empty-match.rs:32:6
+ --> $DIR/empty-match.rs:31:10
|
-LL | enum NonEmptyEnum1 {
- | ^^^^^^^^^^^^^
-...
-LL | Foo(bool),
- | --- not covered
+LL | enum NonEmptyEnum1 {
+ | ^^^^^^^^^^^^^
+LL | Foo(bool),
+ | --- not covered
= note: the matched value is of type `NonEmptyEnum1`
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern
error[E0004]: non-exhaustive patterns: `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
- --> $DIR/empty-match.rs:132:20
+ --> $DIR/empty-match.rs:52:20
|
LL | match_no_arms!(NonEmptyEnum2::Foo(true));
| ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
|
note: `NonEmptyEnum2` defined here
- --> $DIR/empty-match.rs:39:6
- |
-LL | enum NonEmptyEnum2 {
- | ^^^^^^^^^^^^^
-...
-LL | Foo(bool),
- | --- not covered
-...
-LL | Bar,
- | --- not covered
+ --> $DIR/empty-match.rs:34:10
+ |
+LL | enum NonEmptyEnum2 {
+ | ^^^^^^^^^^^^^
+LL | Foo(bool),
+ | --- not covered
+LL | Bar,
+ | --- not covered
= note: the matched value is of type `NonEmptyEnum2`
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or multiple match arms
error[E0004]: non-exhaustive patterns: `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
- --> $DIR/empty-match.rs:135:20
+ --> $DIR/empty-match.rs:53:20
|
LL | match_no_arms!(NonEmptyEnum5::V1);
| ^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
|
note: `NonEmptyEnum5` defined here
- --> $DIR/empty-match.rs:49:6
- |
-LL | enum NonEmptyEnum5 {
- | ^^^^^^^^^^^^^
-...
-LL | V1, V2, V3, V4, V5,
- | -- -- -- -- -- not covered
- | | | | |
- | | | | not covered
- | | | not covered
- | | not covered
- | not covered
+ --> $DIR/empty-match.rs:38:10
+ |
+LL | enum NonEmptyEnum5 {
+ | ^^^^^^^^^^^^^
+LL | V1,
+ | -- not covered
+LL | V2,
+ | -- not covered
+LL | V3,
+ | -- not covered
+LL | V4,
+ | -- not covered
+LL | V5,
+ | -- not covered
= note: the matched value is of type `NonEmptyEnum5`
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or multiple match arms
error[E0004]: non-exhaustive patterns: `_` not covered
- --> $DIR/empty-match.rs:139:24
+ --> $DIR/empty-match.rs:55:24
|
LL | match_guarded_arm!(0u8);
| ^^^ pattern `_` not covered
@@ -189,161 +131,159 @@ LL | match_guarded_arm!(0u8);
= note: match arms with guards don't count towards exhaustivity
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
-LL ~ _ if false => {},
-LL + _ => todo!()
+LL ~ _ if false => {},
+LL + _ => todo!()
|
error[E0004]: non-exhaustive patterns: `NonEmptyStruct1` not covered
- --> $DIR/empty-match.rs:144:24
+ --> $DIR/empty-match.rs:56:24
|
LL | match_guarded_arm!(NonEmptyStruct1);
| ^^^^^^^^^^^^^^^ pattern `NonEmptyStruct1` not covered
|
note: `NonEmptyStruct1` defined here
- --> $DIR/empty-match.rs:15:8
+ --> $DIR/empty-match.rs:22:12
|
-LL | struct NonEmptyStruct1;
- | ^^^^^^^^^^^^^^^
+LL | struct NonEmptyStruct1;
+ | ^^^^^^^^^^^^^^^
= note: the matched value is of type `NonEmptyStruct1`
= note: match arms with guards don't count towards exhaustivity
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
-LL ~ _ if false => {},
-LL + NonEmptyStruct1 => todo!()
+LL ~ _ if false => {},
+LL + NonEmptyStruct1 => todo!()
|
error[E0004]: non-exhaustive patterns: `NonEmptyStruct2(_)` not covered
- --> $DIR/empty-match.rs:149:24
+ --> $DIR/empty-match.rs:57:24
|
LL | match_guarded_arm!(NonEmptyStruct2(true));
| ^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyStruct2(_)` not covered
|
note: `NonEmptyStruct2` defined here
- --> $DIR/empty-match.rs:18:8
+ --> $DIR/empty-match.rs:23:12
|
-LL | struct NonEmptyStruct2(bool);
- | ^^^^^^^^^^^^^^^
+LL | struct NonEmptyStruct2(bool);
+ | ^^^^^^^^^^^^^^^
= note: the matched value is of type `NonEmptyStruct2`
= note: match arms with guards don't count towards exhaustivity
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
-LL ~ _ if false => {},
-LL + NonEmptyStruct2(_) => todo!()
+LL ~ _ if false => {},
+LL + NonEmptyStruct2(_) => todo!()
|
error[E0004]: non-exhaustive patterns: `NonEmptyUnion1 { .. }` not covered
- --> $DIR/empty-match.rs:154:24
+ --> $DIR/empty-match.rs:58:24
|
LL | match_guarded_arm!((NonEmptyUnion1 { foo: () }));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion1 { .. }` not covered
|
note: `NonEmptyUnion1` defined here
- --> $DIR/empty-match.rs:21:7
+ --> $DIR/empty-match.rs:24:11
|
-LL | union NonEmptyUnion1 {
- | ^^^^^^^^^^^^^^
+LL | union NonEmptyUnion1 {
+ | ^^^^^^^^^^^^^^
= note: the matched value is of type `NonEmptyUnion1`
= note: match arms with guards don't count towards exhaustivity
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
-LL ~ _ if false => {},
-LL + NonEmptyUnion1 { .. } => todo!()
+LL ~ _ if false => {},
+LL + NonEmptyUnion1 { .. } => todo!()
|
error[E0004]: non-exhaustive patterns: `NonEmptyUnion2 { .. }` not covered
- --> $DIR/empty-match.rs:159:24
+ --> $DIR/empty-match.rs:59:24
|
LL | match_guarded_arm!((NonEmptyUnion2 { foo: () }));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion2 { .. }` not covered
|
note: `NonEmptyUnion2` defined here
- --> $DIR/empty-match.rs:26:7
+ --> $DIR/empty-match.rs:27:11
|
-LL | union NonEmptyUnion2 {
- | ^^^^^^^^^^^^^^
+LL | union NonEmptyUnion2 {
+ | ^^^^^^^^^^^^^^
= note: the matched value is of type `NonEmptyUnion2`
= note: match arms with guards don't count towards exhaustivity
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
-LL ~ _ if false => {},
-LL + NonEmptyUnion2 { .. } => todo!()
+LL ~ _ if false => {},
+LL + NonEmptyUnion2 { .. } => todo!()
|
error[E0004]: non-exhaustive patterns: `NonEmptyEnum1::Foo(_)` not covered
- --> $DIR/empty-match.rs:164:24
+ --> $DIR/empty-match.rs:60:24
|
LL | match_guarded_arm!(NonEmptyEnum1::Foo(true));
| ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyEnum1::Foo(_)` not covered
|
note: `NonEmptyEnum1` defined here
- --> $DIR/empty-match.rs:32:6
+ --> $DIR/empty-match.rs:31:10
|
-LL | enum NonEmptyEnum1 {
- | ^^^^^^^^^^^^^
-...
-LL | Foo(bool),
- | --- not covered
+LL | enum NonEmptyEnum1 {
+ | ^^^^^^^^^^^^^
+LL | Foo(bool),
+ | --- not covered
= note: the matched value is of type `NonEmptyEnum1`
= note: match arms with guards don't count towards exhaustivity
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
-LL ~ _ if false => {},
-LL + NonEmptyEnum1::Foo(_) => todo!()
+LL ~ _ if false => {},
+LL + NonEmptyEnum1::Foo(_) => todo!()
|
error[E0004]: non-exhaustive patterns: `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
- --> $DIR/empty-match.rs:169:24
+ --> $DIR/empty-match.rs:61:24
|
LL | match_guarded_arm!(NonEmptyEnum2::Foo(true));
| ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
|
note: `NonEmptyEnum2` defined here
- --> $DIR/empty-match.rs:39:6
- |
-LL | enum NonEmptyEnum2 {
- | ^^^^^^^^^^^^^
-...
-LL | Foo(bool),
- | --- not covered
-...
-LL | Bar,
- | --- not covered
+ --> $DIR/empty-match.rs:34:10
+ |
+LL | enum NonEmptyEnum2 {
+ | ^^^^^^^^^^^^^
+LL | Foo(bool),
+ | --- not covered
+LL | Bar,
+ | --- not covered
= note: the matched value is of type `NonEmptyEnum2`
= note: match arms with guards don't count towards exhaustivity
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
|
-LL ~ _ if false => {},
-LL + NonEmptyEnum2::Foo(_) | NonEmptyEnum2::Bar => todo!()
+LL ~ _ if false => {},
+LL + NonEmptyEnum2::Foo(_) | NonEmptyEnum2::Bar => todo!()
|
error[E0004]: non-exhaustive patterns: `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
- --> $DIR/empty-match.rs:174:24
+ --> $DIR/empty-match.rs:62:24
|
LL | match_guarded_arm!(NonEmptyEnum5::V1);
| ^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
|
note: `NonEmptyEnum5` defined here
- --> $DIR/empty-match.rs:49:6
- |
-LL | enum NonEmptyEnum5 {
- | ^^^^^^^^^^^^^
-...
-LL | V1, V2, V3, V4, V5,
- | -- -- -- -- -- not covered
- | | | | |
- | | | | not covered
- | | | not covered
- | | not covered
- | not covered
+ --> $DIR/empty-match.rs:38:10
+ |
+LL | enum NonEmptyEnum5 {
+ | ^^^^^^^^^^^^^
+LL | V1,
+ | -- not covered
+LL | V2,
+ | -- not covered
+LL | V3,
+ | -- not covered
+LL | V4,
+ | -- not covered
+LL | V5,
+ | -- not covered
= note: the matched value is of type `NonEmptyEnum5`
= note: match arms with guards don't count towards exhaustivity
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown, or multiple match arms
|
-LL ~ _ if false => {},
-LL + _ => todo!()
+LL ~ _ if false => {},
+LL + _ => todo!()
|
-error: aborting due to 23 previous errors
+error: aborting due to 16 previous errors
-Some errors have detailed explanations: E0004, E0005.
-For more information about an error, try `rustc --explain E0004`.
+For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/empty-match.normal.stderr b/tests/ui/pattern/usefulness/empty-match.normal.stderr
index 7f0389f40..9c3bebd77 100644
--- a/tests/ui/pattern/usefulness/empty-match.normal.stderr
+++ b/tests/ui/pattern/usefulness/empty-match.normal.stderr
@@ -1,61 +1,5 @@
-error: unreachable pattern
- --> $DIR/empty-match.rs:68:9
- |
-LL | _ => {},
- | ^
- |
-note: the lint level is defined here
- --> $DIR/empty-match.rs:8:9
- |
-LL | #![deny(unreachable_patterns)]
- | ^^^^^^^^^^^^^^^^^^^^
-
-error: unreachable pattern
- --> $DIR/empty-match.rs:71:9
- |
-LL | _ if false => {},
- | ^
-
-error: unreachable pattern
- --> $DIR/empty-match.rs:78:9
- |
-LL | _ => {},
- | ^
-
-error: unreachable pattern
- --> $DIR/empty-match.rs:81:9
- |
-LL | _ if false => {},
- | ^
-
-error[E0005]: refutable pattern in local binding
- --> $DIR/empty-match.rs:86:9
- |
-LL | let None = x;
- | ^^^^ pattern `Some(_)` not covered
- |
- = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
- = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
- = note: the matched value is of type `Option<SecretlyUninhabitedForeignStruct>`
-help: you might want to use `if let` to ignore the variant that isn't matched
- |
-LL | if let None = x { todo!() };
- | ++ +++++++++++
-
-error: unreachable pattern
- --> $DIR/empty-match.rs:98:9
- |
-LL | _ => {},
- | ^
-
-error: unreachable pattern
- --> $DIR/empty-match.rs:101:9
- |
-LL | _ if false => {},
- | ^
-
error[E0004]: non-exhaustive patterns: type `u8` is non-empty
- --> $DIR/empty-match.rs:119:20
+ --> $DIR/empty-match.rs:46:20
|
LL | match_no_arms!(0u8);
| ^^^
@@ -64,122 +8,121 @@ LL | match_no_arms!(0u8);
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
error[E0004]: non-exhaustive patterns: type `NonEmptyStruct1` is non-empty
- --> $DIR/empty-match.rs:121:20
+ --> $DIR/empty-match.rs:47:20
|
LL | match_no_arms!(NonEmptyStruct1);
| ^^^^^^^^^^^^^^^
|
note: `NonEmptyStruct1` defined here
- --> $DIR/empty-match.rs:15:8
+ --> $DIR/empty-match.rs:22:12
|
-LL | struct NonEmptyStruct1;
- | ^^^^^^^^^^^^^^^
+LL | struct NonEmptyStruct1;
+ | ^^^^^^^^^^^^^^^
= note: the matched value is of type `NonEmptyStruct1`
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
error[E0004]: non-exhaustive patterns: type `NonEmptyStruct2` is non-empty
- --> $DIR/empty-match.rs:123:20
+ --> $DIR/empty-match.rs:48:20
|
LL | match_no_arms!(NonEmptyStruct2(true));
| ^^^^^^^^^^^^^^^^^^^^^
|
note: `NonEmptyStruct2` defined here
- --> $DIR/empty-match.rs:18:8
+ --> $DIR/empty-match.rs:23:12
|
-LL | struct NonEmptyStruct2(bool);
- | ^^^^^^^^^^^^^^^
+LL | struct NonEmptyStruct2(bool);
+ | ^^^^^^^^^^^^^^^
= note: the matched value is of type `NonEmptyStruct2`
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
error[E0004]: non-exhaustive patterns: type `NonEmptyUnion1` is non-empty
- --> $DIR/empty-match.rs:125:20
+ --> $DIR/empty-match.rs:49:20
|
LL | match_no_arms!((NonEmptyUnion1 { foo: () }));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: `NonEmptyUnion1` defined here
- --> $DIR/empty-match.rs:21:7
+ --> $DIR/empty-match.rs:24:11
|
-LL | union NonEmptyUnion1 {
- | ^^^^^^^^^^^^^^
+LL | union NonEmptyUnion1 {
+ | ^^^^^^^^^^^^^^
= note: the matched value is of type `NonEmptyUnion1`
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
error[E0004]: non-exhaustive patterns: type `NonEmptyUnion2` is non-empty
- --> $DIR/empty-match.rs:127:20
+ --> $DIR/empty-match.rs:50:20
|
LL | match_no_arms!((NonEmptyUnion2 { foo: () }));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: `NonEmptyUnion2` defined here
- --> $DIR/empty-match.rs:26:7
+ --> $DIR/empty-match.rs:27:11
|
-LL | union NonEmptyUnion2 {
- | ^^^^^^^^^^^^^^
+LL | union NonEmptyUnion2 {
+ | ^^^^^^^^^^^^^^
= note: the matched value is of type `NonEmptyUnion2`
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
error[E0004]: non-exhaustive patterns: `NonEmptyEnum1::Foo(_)` not covered
- --> $DIR/empty-match.rs:129:20
+ --> $DIR/empty-match.rs:51:20
|
LL | match_no_arms!(NonEmptyEnum1::Foo(true));
| ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyEnum1::Foo(_)` not covered
|
note: `NonEmptyEnum1` defined here
- --> $DIR/empty-match.rs:32:6
+ --> $DIR/empty-match.rs:31:10
|
-LL | enum NonEmptyEnum1 {
- | ^^^^^^^^^^^^^
-...
-LL | Foo(bool),
- | --- not covered
+LL | enum NonEmptyEnum1 {
+ | ^^^^^^^^^^^^^
+LL | Foo(bool),
+ | --- not covered
= note: the matched value is of type `NonEmptyEnum1`
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern
error[E0004]: non-exhaustive patterns: `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
- --> $DIR/empty-match.rs:132:20
+ --> $DIR/empty-match.rs:52:20
|
LL | match_no_arms!(NonEmptyEnum2::Foo(true));
| ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
|
note: `NonEmptyEnum2` defined here
- --> $DIR/empty-match.rs:39:6
- |
-LL | enum NonEmptyEnum2 {
- | ^^^^^^^^^^^^^
-...
-LL | Foo(bool),
- | --- not covered
-...
-LL | Bar,
- | --- not covered
+ --> $DIR/empty-match.rs:34:10
+ |
+LL | enum NonEmptyEnum2 {
+ | ^^^^^^^^^^^^^
+LL | Foo(bool),
+ | --- not covered
+LL | Bar,
+ | --- not covered
= note: the matched value is of type `NonEmptyEnum2`
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or multiple match arms
error[E0004]: non-exhaustive patterns: `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
- --> $DIR/empty-match.rs:135:20
+ --> $DIR/empty-match.rs:53:20
|
LL | match_no_arms!(NonEmptyEnum5::V1);
| ^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
|
note: `NonEmptyEnum5` defined here
- --> $DIR/empty-match.rs:49:6
- |
-LL | enum NonEmptyEnum5 {
- | ^^^^^^^^^^^^^
-...
-LL | V1, V2, V3, V4, V5,
- | -- -- -- -- -- not covered
- | | | | |
- | | | | not covered
- | | | not covered
- | | not covered
- | not covered
+ --> $DIR/empty-match.rs:38:10
+ |
+LL | enum NonEmptyEnum5 {
+ | ^^^^^^^^^^^^^
+LL | V1,
+ | -- not covered
+LL | V2,
+ | -- not covered
+LL | V3,
+ | -- not covered
+LL | V4,
+ | -- not covered
+LL | V5,
+ | -- not covered
= note: the matched value is of type `NonEmptyEnum5`
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or multiple match arms
error[E0004]: non-exhaustive patterns: `_` not covered
- --> $DIR/empty-match.rs:139:24
+ --> $DIR/empty-match.rs:55:24
|
LL | match_guarded_arm!(0u8);
| ^^^ pattern `_` not covered
@@ -188,161 +131,159 @@ LL | match_guarded_arm!(0u8);
= note: match arms with guards don't count towards exhaustivity
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
-LL ~ _ if false => {},
-LL + _ => todo!()
+LL ~ _ if false => {},
+LL + _ => todo!()
|
error[E0004]: non-exhaustive patterns: `NonEmptyStruct1` not covered
- --> $DIR/empty-match.rs:144:24
+ --> $DIR/empty-match.rs:56:24
|
LL | match_guarded_arm!(NonEmptyStruct1);
| ^^^^^^^^^^^^^^^ pattern `NonEmptyStruct1` not covered
|
note: `NonEmptyStruct1` defined here
- --> $DIR/empty-match.rs:15:8
+ --> $DIR/empty-match.rs:22:12
|
-LL | struct NonEmptyStruct1;
- | ^^^^^^^^^^^^^^^
+LL | struct NonEmptyStruct1;
+ | ^^^^^^^^^^^^^^^
= note: the matched value is of type `NonEmptyStruct1`
= note: match arms with guards don't count towards exhaustivity
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
-LL ~ _ if false => {},
-LL + NonEmptyStruct1 => todo!()
+LL ~ _ if false => {},
+LL + NonEmptyStruct1 => todo!()
|
error[E0004]: non-exhaustive patterns: `NonEmptyStruct2(_)` not covered
- --> $DIR/empty-match.rs:149:24
+ --> $DIR/empty-match.rs:57:24
|
LL | match_guarded_arm!(NonEmptyStruct2(true));
| ^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyStruct2(_)` not covered
|
note: `NonEmptyStruct2` defined here
- --> $DIR/empty-match.rs:18:8
+ --> $DIR/empty-match.rs:23:12
|
-LL | struct NonEmptyStruct2(bool);
- | ^^^^^^^^^^^^^^^
+LL | struct NonEmptyStruct2(bool);
+ | ^^^^^^^^^^^^^^^
= note: the matched value is of type `NonEmptyStruct2`
= note: match arms with guards don't count towards exhaustivity
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
-LL ~ _ if false => {},
-LL + NonEmptyStruct2(_) => todo!()
+LL ~ _ if false => {},
+LL + NonEmptyStruct2(_) => todo!()
|
error[E0004]: non-exhaustive patterns: `NonEmptyUnion1 { .. }` not covered
- --> $DIR/empty-match.rs:154:24
+ --> $DIR/empty-match.rs:58:24
|
LL | match_guarded_arm!((NonEmptyUnion1 { foo: () }));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion1 { .. }` not covered
|
note: `NonEmptyUnion1` defined here
- --> $DIR/empty-match.rs:21:7
+ --> $DIR/empty-match.rs:24:11
|
-LL | union NonEmptyUnion1 {
- | ^^^^^^^^^^^^^^
+LL | union NonEmptyUnion1 {
+ | ^^^^^^^^^^^^^^
= note: the matched value is of type `NonEmptyUnion1`
= note: match arms with guards don't count towards exhaustivity
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
-LL ~ _ if false => {},
-LL + NonEmptyUnion1 { .. } => todo!()
+LL ~ _ if false => {},
+LL + NonEmptyUnion1 { .. } => todo!()
|
error[E0004]: non-exhaustive patterns: `NonEmptyUnion2 { .. }` not covered
- --> $DIR/empty-match.rs:159:24
+ --> $DIR/empty-match.rs:59:24
|
LL | match_guarded_arm!((NonEmptyUnion2 { foo: () }));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion2 { .. }` not covered
|
note: `NonEmptyUnion2` defined here
- --> $DIR/empty-match.rs:26:7
+ --> $DIR/empty-match.rs:27:11
|
-LL | union NonEmptyUnion2 {
- | ^^^^^^^^^^^^^^
+LL | union NonEmptyUnion2 {
+ | ^^^^^^^^^^^^^^
= note: the matched value is of type `NonEmptyUnion2`
= note: match arms with guards don't count towards exhaustivity
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
-LL ~ _ if false => {},
-LL + NonEmptyUnion2 { .. } => todo!()
+LL ~ _ if false => {},
+LL + NonEmptyUnion2 { .. } => todo!()
|
error[E0004]: non-exhaustive patterns: `NonEmptyEnum1::Foo(_)` not covered
- --> $DIR/empty-match.rs:164:24
+ --> $DIR/empty-match.rs:60:24
|
LL | match_guarded_arm!(NonEmptyEnum1::Foo(true));
| ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyEnum1::Foo(_)` not covered
|
note: `NonEmptyEnum1` defined here
- --> $DIR/empty-match.rs:32:6
+ --> $DIR/empty-match.rs:31:10
|
-LL | enum NonEmptyEnum1 {
- | ^^^^^^^^^^^^^
-...
-LL | Foo(bool),
- | --- not covered
+LL | enum NonEmptyEnum1 {
+ | ^^^^^^^^^^^^^
+LL | Foo(bool),
+ | --- not covered
= note: the matched value is of type `NonEmptyEnum1`
= note: match arms with guards don't count towards exhaustivity
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
-LL ~ _ if false => {},
-LL + NonEmptyEnum1::Foo(_) => todo!()
+LL ~ _ if false => {},
+LL + NonEmptyEnum1::Foo(_) => todo!()
|
error[E0004]: non-exhaustive patterns: `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
- --> $DIR/empty-match.rs:169:24
+ --> $DIR/empty-match.rs:61:24
|
LL | match_guarded_arm!(NonEmptyEnum2::Foo(true));
| ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
|
note: `NonEmptyEnum2` defined here
- --> $DIR/empty-match.rs:39:6
- |
-LL | enum NonEmptyEnum2 {
- | ^^^^^^^^^^^^^
-...
-LL | Foo(bool),
- | --- not covered
-...
-LL | Bar,
- | --- not covered
+ --> $DIR/empty-match.rs:34:10
+ |
+LL | enum NonEmptyEnum2 {
+ | ^^^^^^^^^^^^^
+LL | Foo(bool),
+ | --- not covered
+LL | Bar,
+ | --- not covered
= note: the matched value is of type `NonEmptyEnum2`
= note: match arms with guards don't count towards exhaustivity
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
|
-LL ~ _ if false => {},
-LL + NonEmptyEnum2::Foo(_) | NonEmptyEnum2::Bar => todo!()
+LL ~ _ if false => {},
+LL + NonEmptyEnum2::Foo(_) | NonEmptyEnum2::Bar => todo!()
|
error[E0004]: non-exhaustive patterns: `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
- --> $DIR/empty-match.rs:174:24
+ --> $DIR/empty-match.rs:62:24
|
LL | match_guarded_arm!(NonEmptyEnum5::V1);
| ^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
|
note: `NonEmptyEnum5` defined here
- --> $DIR/empty-match.rs:49:6
- |
-LL | enum NonEmptyEnum5 {
- | ^^^^^^^^^^^^^
-...
-LL | V1, V2, V3, V4, V5,
- | -- -- -- -- -- not covered
- | | | | |
- | | | | not covered
- | | | not covered
- | | not covered
- | not covered
+ --> $DIR/empty-match.rs:38:10
+ |
+LL | enum NonEmptyEnum5 {
+ | ^^^^^^^^^^^^^
+LL | V1,
+ | -- not covered
+LL | V2,
+ | -- not covered
+LL | V3,
+ | -- not covered
+LL | V4,
+ | -- not covered
+LL | V5,
+ | -- not covered
= note: the matched value is of type `NonEmptyEnum5`
= note: match arms with guards don't count towards exhaustivity
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown, or multiple match arms
|
-LL ~ _ if false => {},
-LL + _ => todo!()
+LL ~ _ if false => {},
+LL + _ => todo!()
|
-error: aborting due to 23 previous errors
+error: aborting due to 16 previous errors
-Some errors have detailed explanations: E0004, E0005.
-For more information about an error, try `rustc --explain E0004`.
+For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/empty-match.rs b/tests/ui/pattern/usefulness/empty-match.rs
index fe5d0bce1..321f24adc 100644
--- a/tests/ui/pattern/usefulness/empty-match.rs
+++ b/tests/ui/pattern/usefulness/empty-match.rs
@@ -1,179 +1,65 @@
-// aux-build:empty.rs
// revisions: normal exhaustive_patterns
//
// This tests a match with no arms on various types.
#![feature(never_type)]
-#![feature(never_type_fallback)]
#![cfg_attr(exhaustive_patterns, feature(exhaustive_patterns))]
#![deny(unreachable_patterns)]
-//~^ NOTE the lint level is defined here
-extern crate empty;
-
-enum EmptyEnum {}
-
-struct NonEmptyStruct1;
-//~^ NOTE `NonEmptyStruct1` defined here
-//~| NOTE `NonEmptyStruct1` defined here
-struct NonEmptyStruct2(bool);
-//~^ NOTE `NonEmptyStruct2` defined here
-//~| NOTE `NonEmptyStruct2` defined here
-union NonEmptyUnion1 {
- //~^ NOTE `NonEmptyUnion1` defined here
- //~| NOTE `NonEmptyUnion1` defined here
- foo: (),
-}
-union NonEmptyUnion2 {
- //~^ NOTE `NonEmptyUnion2` defined here
- //~| NOTE `NonEmptyUnion2` defined here
- foo: (),
- bar: (),
-}
-enum NonEmptyEnum1 {
- //~^ NOTE `NonEmptyEnum1` defined here
- //~| NOTE `NonEmptyEnum1` defined here
- Foo(bool),
- //~^ NOTE not covered
- //~| NOTE not covered
-}
-enum NonEmptyEnum2 {
- //~^ NOTE `NonEmptyEnum2` defined here
- //~| NOTE `NonEmptyEnum2` defined here
- Foo(bool),
- //~^ NOTE not covered
- //~| NOTE not covered
- Bar,
- //~^ NOTE not covered
- //~| NOTE not covered
-}
-enum NonEmptyEnum5 {
- //~^ NOTE `NonEmptyEnum5` defined here
- //~| NOTE `NonEmptyEnum5` defined here
- V1, V2, V3, V4, V5,
- //~^ NOTE not covered
- //~| NOTE not covered
- //~| NOTE not covered
- //~| NOTE not covered
- //~| NOTE not covered
- //~| NOTE not covered
- //~| NOTE not covered
- //~| NOTE not covered
- //~| NOTE not covered
- //~| NOTE not covered
-}
-
-fn empty_enum(x: EmptyEnum) {
- match x {} // ok
- match x {
- _ => {}, //~ ERROR unreachable pattern
+fn nonempty() {
+ macro_rules! match_no_arms {
+ ($e:expr) => {
+ match $e {}
+ };
}
- match x {
- _ if false => {}, //~ ERROR unreachable pattern
+ macro_rules! match_guarded_arm {
+ ($e:expr) => {
+ match $e {
+ _ if false => {}
+ }
+ };
}
-}
-fn empty_foreign_enum(x: empty::EmptyForeignEnum) {
- match x {} // ok
- match x {
- _ => {}, //~ ERROR unreachable pattern
+ struct NonEmptyStruct1;
+ struct NonEmptyStruct2(bool);
+ union NonEmptyUnion1 {
+ foo: (),
}
- match x {
- _ if false => {}, //~ ERROR unreachable pattern
+ union NonEmptyUnion2 {
+ foo: (),
+ bar: !,
}
-}
-
-fn empty_foreign_enum_private(x: Option<empty::SecretlyUninhabitedForeignStruct>) {
- let None = x;
- //~^ ERROR refutable pattern in local binding
- //~| NOTE `let` bindings require an "irrefutable pattern"
- //~| NOTE for more information, visit
- //~| NOTE the matched value is of type
- //~| NOTE pattern `Some(_)` not covered
- //[exhaustive_patterns]~| NOTE currently uninhabited, but this variant contains private fields
-}
-
-fn never(x: !) {
- match x {} // ok
- match x {
- _ => {}, //~ ERROR unreachable pattern
+ enum NonEmptyEnum1 {
+ Foo(bool),
}
- match x {
- _ if false => {}, //~ ERROR unreachable pattern
+ enum NonEmptyEnum2 {
+ Foo(bool),
+ Bar,
+ }
+ enum NonEmptyEnum5 {
+ V1,
+ V2,
+ V3,
+ V4,
+ V5,
}
-}
-
-macro_rules! match_no_arms {
- ($e:expr) => {
- match $e {}
- };
-}
-macro_rules! match_guarded_arm {
- ($e:expr) => {
- match $e {
- _ if false => {}
- }
- };
-}
-fn main() {
match_no_arms!(0u8); //~ ERROR type `u8` is non-empty
- //~| NOTE the matched value is of type
match_no_arms!(NonEmptyStruct1); //~ ERROR type `NonEmptyStruct1` is non-empty
- //~| NOTE the matched value is of type
match_no_arms!(NonEmptyStruct2(true)); //~ ERROR type `NonEmptyStruct2` is non-empty
- //~| NOTE the matched value is of type
match_no_arms!((NonEmptyUnion1 { foo: () })); //~ ERROR type `NonEmptyUnion1` is non-empty
- //~| NOTE the matched value is of type
match_no_arms!((NonEmptyUnion2 { foo: () })); //~ ERROR type `NonEmptyUnion2` is non-empty
- //~| NOTE the matched value is of type
match_no_arms!(NonEmptyEnum1::Foo(true)); //~ ERROR `NonEmptyEnum1::Foo(_)` not covered
- //~| NOTE pattern `NonEmptyEnum1::Foo(_)` not covered
- //~| NOTE the matched value is of type
match_no_arms!(NonEmptyEnum2::Foo(true)); //~ ERROR `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
- //~| NOTE patterns `NonEmptyEnum2::Foo(_)` and
- //~| NOTE the matched value is of type
match_no_arms!(NonEmptyEnum5::V1); //~ ERROR `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
- //~| NOTE patterns `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`
- //~| NOTE the matched value is of type
match_guarded_arm!(0u8); //~ ERROR `_` not covered
- //~| NOTE the matched value is of type
- //~| NOTE match arms with guards don't count towards exhaustivity
- //~| NOTE pattern `_` not covered
- //~| NOTE in this expansion of match_guarded_arm!
match_guarded_arm!(NonEmptyStruct1); //~ ERROR `NonEmptyStruct1` not covered
- //~| NOTE pattern `NonEmptyStruct1` not covered
- //~| NOTE the matched value is of type
- //~| NOTE match arms with guards don't count towards exhaustivity
- //~| NOTE in this expansion of match_guarded_arm!
match_guarded_arm!(NonEmptyStruct2(true)); //~ ERROR `NonEmptyStruct2(_)` not covered
- //~| NOTE the matched value is of type
- //~| NOTE pattern `NonEmptyStruct2(_)` not covered
- //~| NOTE match arms with guards don't count towards exhaustivity
- //~| NOTE in this expansion of match_guarded_arm!
match_guarded_arm!((NonEmptyUnion1 { foo: () })); //~ ERROR `NonEmptyUnion1 { .. }` not covered
- //~| NOTE the matched value is of type
- //~| NOTE pattern `NonEmptyUnion1 { .. }` not covered
- //~| NOTE match arms with guards don't count towards exhaustivity
- //~| NOTE in this expansion of match_guarded_arm!
match_guarded_arm!((NonEmptyUnion2 { foo: () })); //~ ERROR `NonEmptyUnion2 { .. }` not covered
- //~| NOTE the matched value is of type
- //~| NOTE pattern `NonEmptyUnion2 { .. }` not covered
- //~| NOTE match arms with guards don't count towards exhaustivity
- //~| NOTE in this expansion of match_guarded_arm!
match_guarded_arm!(NonEmptyEnum1::Foo(true)); //~ ERROR `NonEmptyEnum1::Foo(_)` not covered
- //~| NOTE the matched value is of type
- //~| NOTE pattern `NonEmptyEnum1::Foo(_)` not covered
- //~| NOTE match arms with guards don't count towards exhaustivity
- //~| NOTE in this expansion of match_guarded_arm!
match_guarded_arm!(NonEmptyEnum2::Foo(true)); //~ ERROR `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
- //~| NOTE the matched value is of type
- //~| NOTE patterns `NonEmptyEnum2::Foo(_)` and
- //~| NOTE match arms with guards don't count towards exhaustivity
- //~| NOTE in this expansion of match_guarded_arm!
match_guarded_arm!(NonEmptyEnum5::V1); //~ ERROR `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
- //~| NOTE the matched value is of type
- //~| NOTE patterns `NonEmptyEnum5::V1`,
- //~| NOTE match arms with guards don't count towards exhaustivity
- //~| NOTE in this expansion of match_guarded_arm!
}
+
+fn main() {}
diff --git a/tests/ui/pattern/usefulness/empty-types.exhaustive_patterns.stderr b/tests/ui/pattern/usefulness/empty-types.exhaustive_patterns.stderr
new file mode 100644
index 000000000..367aba3bd
--- /dev/null
+++ b/tests/ui/pattern/usefulness/empty-types.exhaustive_patterns.stderr
@@ -0,0 +1,393 @@
+error: unreachable pattern
+ --> $DIR/empty-types.rs:47:9
+ |
+LL | _ => {}
+ | ^
+ |
+note: the lint level is defined here
+ --> $DIR/empty-types.rs:13:9
+ |
+LL | #![deny(unreachable_patterns)]
+ | ^^^^^^^^^^^^^^^^^^^^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:50:9
+ |
+LL | _x => {}
+ | ^^
+
+error[E0004]: non-exhaustive patterns: type `&!` is non-empty
+ --> $DIR/empty-types.rs:54:11
+ |
+LL | match ref_never {}
+ | ^^^^^^^^^
+ |
+ = note: the matched value is of type `&!`
+ = note: references are always considered inhabited
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
+ |
+LL ~ match ref_never {
+LL + _ => todo!(),
+LL + }
+ |
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:69:9
+ |
+LL | (_, _) => {}
+ | ^^^^^^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:76:9
+ |
+LL | _ => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:79:9
+ |
+LL | (_, _) => {}
+ | ^^^^^^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:83:9
+ |
+LL | _ => {}
+ | ^
+
+error[E0004]: non-exhaustive patterns: `Ok(_)` not covered
+ --> $DIR/empty-types.rs:87:11
+ |
+LL | match res_u32_never {}
+ | ^^^^^^^^^^^^^ pattern `Ok(_)` not covered
+ |
+note: `Result<u32, !>` defined here
+ --> $SRC_DIR/core/src/result.rs:LL:COL
+ ::: $SRC_DIR/core/src/result.rs:LL:COL
+ |
+ = note: not covered
+ = note: the matched value is of type `Result<u32, !>`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+ |
+LL ~ match res_u32_never {
+LL + Ok(_) => todo!(),
+LL + }
+ |
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:95:9
+ |
+LL | Err(_) => {}
+ | ^^^^^^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:100:9
+ |
+LL | Err(_) => {}
+ | ^^^^^^
+
+error[E0004]: non-exhaustive patterns: `Ok(1_u32..=u32::MAX)` not covered
+ --> $DIR/empty-types.rs:97:11
+ |
+LL | match res_u32_never {
+ | ^^^^^^^^^^^^^ pattern `Ok(1_u32..=u32::MAX)` not covered
+ |
+note: `Result<u32, !>` defined here
+ --> $SRC_DIR/core/src/result.rs:LL:COL
+ ::: $SRC_DIR/core/src/result.rs:LL:COL
+ |
+ = note: not covered
+ = note: the matched value is of type `Result<u32, !>`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+ |
+LL ~ Err(_) => {},
+LL ~ Ok(1_u32..=u32::MAX) => todo!()
+ |
+
+error[E0005]: refutable pattern in local binding
+ --> $DIR/empty-types.rs:104:9
+ |
+LL | let Ok(_x) = res_u32_never.as_ref();
+ | ^^^^^^ pattern `Err(_)` not covered
+ |
+ = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
+ = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
+ = note: the matched value is of type `Result<&u32, &!>`
+help: you might want to use `let else` to handle the variant that isn't matched
+ |
+LL | let Ok(_x) = res_u32_never.as_ref() else { todo!() };
+ | ++++++++++++++++
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:115:9
+ |
+LL | _ => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:119:9
+ |
+LL | Ok(_) => {}
+ | ^^^^^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:122:9
+ |
+LL | Ok(_) => {}
+ | ^^^^^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:123:9
+ |
+LL | _ => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:126:9
+ |
+LL | Ok(_) => {}
+ | ^^^^^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:127:9
+ |
+LL | Err(_) => {}
+ | ^^^^^^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:136:13
+ |
+LL | _ => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:139:13
+ |
+LL | _ if false => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:148:13
+ |
+LL | Some(_) => {}
+ | ^^^^^^^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:152:13
+ |
+LL | _ => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:204:13
+ |
+LL | _ => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:209:13
+ |
+LL | _ => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:214:13
+ |
+LL | _ => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:219:13
+ |
+LL | _ => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:225:13
+ |
+LL | _ => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:284:9
+ |
+LL | _ => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:287:9
+ |
+LL | (_, _) => {}
+ | ^^^^^^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:290:9
+ |
+LL | Ok(_) => {}
+ | ^^^^^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:291:9
+ |
+LL | Err(_) => {}
+ | ^^^^^^
+
+error[E0004]: non-exhaustive patterns: type `&[!]` is non-empty
+ --> $DIR/empty-types.rs:323:11
+ |
+LL | match slice_never {}
+ | ^^^^^^^^^^^
+ |
+ = note: the matched value is of type `&[!]`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
+ |
+LL ~ match slice_never {
+LL + _ => todo!(),
+LL + }
+ |
+
+error[E0004]: non-exhaustive patterns: `&[]` not covered
+ --> $DIR/empty-types.rs:334:11
+ |
+LL | match slice_never {
+ | ^^^^^^^^^^^ pattern `&[]` not covered
+ |
+ = note: the matched value is of type `&[!]`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+ |
+LL ~ [_, _, _, ..] => {},
+LL + &[] => todo!()
+ |
+
+error[E0004]: non-exhaustive patterns: `&[]` not covered
+ --> $DIR/empty-types.rs:347:11
+ |
+LL | match slice_never {
+ | ^^^^^^^^^^^ pattern `&[]` not covered
+ |
+ = note: the matched value is of type `&[!]`
+ = note: match arms with guards don't count towards exhaustivity
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+ |
+LL ~ &[..] if false => {},
+LL + &[] => todo!()
+ |
+
+error[E0004]: non-exhaustive patterns: type `[!]` is non-empty
+ --> $DIR/empty-types.rs:353:11
+ |
+LL | match *slice_never {}
+ | ^^^^^^^^^^^^
+ |
+ = note: the matched value is of type `[!]`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
+ |
+LL ~ match *slice_never {
+LL + _ => todo!(),
+LL + }
+ |
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:363:9
+ |
+LL | _ => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:366:9
+ |
+LL | [_, _, _] => {}
+ | ^^^^^^^^^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:369:9
+ |
+LL | [_, ..] => {}
+ | ^^^^^^^
+
+error[E0004]: non-exhaustive patterns: type `[!; 0]` is non-empty
+ --> $DIR/empty-types.rs:383:11
+ |
+LL | match array_0_never {}
+ | ^^^^^^^^^^^^^
+ |
+ = note: the matched value is of type `[!; 0]`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
+ |
+LL ~ match array_0_never {
+LL + _ => todo!(),
+LL + }
+ |
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:390:9
+ |
+LL | _ => {}
+ | ^
+
+error[E0004]: non-exhaustive patterns: `[]` not covered
+ --> $DIR/empty-types.rs:392:11
+ |
+LL | match array_0_never {
+ | ^^^^^^^^^^^^^ pattern `[]` not covered
+ |
+ = note: the matched value is of type `[!; 0]`
+ = note: match arms with guards don't count towards exhaustivity
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+ |
+LL ~ [..] if false => {},
+LL + [] => todo!()
+ |
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:411:9
+ |
+LL | Some(_) => {}
+ | ^^^^^^^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:416:9
+ |
+LL | Some(_a) => {}
+ | ^^^^^^^^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:421:9
+ |
+LL | _ => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:426:9
+ |
+LL | _a => {}
+ | ^^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:598:9
+ |
+LL | _ => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:601:9
+ |
+LL | _x => {}
+ | ^^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:604:9
+ |
+LL | _ if false => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:607:9
+ |
+LL | _x if false => {}
+ | ^^
+
+error: aborting due to 49 previous errors
+
+Some errors have detailed explanations: E0004, E0005.
+For more information about an error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/empty-types.normal.stderr b/tests/ui/pattern/usefulness/empty-types.normal.stderr
new file mode 100644
index 000000000..133a95a82
--- /dev/null
+++ b/tests/ui/pattern/usefulness/empty-types.normal.stderr
@@ -0,0 +1,617 @@
+error: unreachable pattern
+ --> $DIR/empty-types.rs:47:9
+ |
+LL | _ => {}
+ | ^
+ |
+note: the lint level is defined here
+ --> $DIR/empty-types.rs:13:9
+ |
+LL | #![deny(unreachable_patterns)]
+ | ^^^^^^^^^^^^^^^^^^^^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:50:9
+ |
+LL | _x => {}
+ | ^^
+
+error[E0004]: non-exhaustive patterns: type `&!` is non-empty
+ --> $DIR/empty-types.rs:54:11
+ |
+LL | match ref_never {}
+ | ^^^^^^^^^
+ |
+ = note: the matched value is of type `&!`
+ = note: references are always considered inhabited
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
+ |
+LL ~ match ref_never {
+LL + _ => todo!(),
+LL + }
+ |
+
+error[E0004]: non-exhaustive patterns: type `(u32, !)` is non-empty
+ --> $DIR/empty-types.rs:66:11
+ |
+LL | match tuple_half_never {}
+ | ^^^^^^^^^^^^^^^^
+ |
+ = note: the matched value is of type `(u32, !)`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
+ |
+LL ~ match tuple_half_never {
+LL + _ => todo!(),
+LL + }
+ |
+
+error[E0004]: non-exhaustive patterns: type `(!, !)` is non-empty
+ --> $DIR/empty-types.rs:73:11
+ |
+LL | match tuple_never {}
+ | ^^^^^^^^^^^
+ |
+ = note: the matched value is of type `(!, !)`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
+ |
+LL ~ match tuple_never {
+LL + _ => todo!(),
+LL + }
+ |
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:83:9
+ |
+LL | _ => {}
+ | ^
+
+error[E0004]: non-exhaustive patterns: `Ok(_)` and `Err(_)` not covered
+ --> $DIR/empty-types.rs:87:11
+ |
+LL | match res_u32_never {}
+ | ^^^^^^^^^^^^^ patterns `Ok(_)` and `Err(_)` not covered
+ |
+note: `Result<u32, !>` defined here
+ --> $SRC_DIR/core/src/result.rs:LL:COL
+ ::: $SRC_DIR/core/src/result.rs:LL:COL
+ |
+ = note: not covered
+ ::: $SRC_DIR/core/src/result.rs:LL:COL
+ |
+ = note: not covered
+ = note: the matched value is of type `Result<u32, !>`
+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
+ |
+LL ~ match res_u32_never {
+LL + Ok(_) | Err(_) => todo!(),
+LL + }
+ |
+
+error[E0004]: non-exhaustive patterns: `Err(_)` not covered
+ --> $DIR/empty-types.rs:89:11
+ |
+LL | match res_u32_never {
+ | ^^^^^^^^^^^^^ pattern `Err(_)` not covered
+ |
+note: `Result<u32, !>` defined here
+ --> $SRC_DIR/core/src/result.rs:LL:COL
+ ::: $SRC_DIR/core/src/result.rs:LL:COL
+ |
+ = note: not covered
+ = note: the matched value is of type `Result<u32, !>`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+ |
+LL ~ Ok(_) => {},
+LL + Err(_) => todo!()
+ |
+
+error[E0004]: non-exhaustive patterns: `Ok(1_u32..=u32::MAX)` not covered
+ --> $DIR/empty-types.rs:97:11
+ |
+LL | match res_u32_never {
+ | ^^^^^^^^^^^^^ pattern `Ok(1_u32..=u32::MAX)` not covered
+ |
+note: `Result<u32, !>` defined here
+ --> $SRC_DIR/core/src/result.rs:LL:COL
+ ::: $SRC_DIR/core/src/result.rs:LL:COL
+ |
+ = note: not covered
+ = note: the matched value is of type `Result<u32, !>`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+ |
+LL ~ Err(_) => {},
+LL ~ Ok(1_u32..=u32::MAX) => todo!()
+ |
+
+error[E0005]: refutable pattern in local binding
+ --> $DIR/empty-types.rs:102:9
+ |
+LL | let Ok(_x) = res_u32_never;
+ | ^^^^^^ pattern `Err(_)` not covered
+ |
+ = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
+ = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
+ = note: the matched value is of type `Result<u32, !>`
+help: you might want to use `let else` to handle the variant that isn't matched
+ |
+LL | let Ok(_x) = res_u32_never else { todo!() };
+ | ++++++++++++++++
+
+error[E0005]: refutable pattern in local binding
+ --> $DIR/empty-types.rs:104:9
+ |
+LL | let Ok(_x) = res_u32_never.as_ref();
+ | ^^^^^^ pattern `Err(_)` not covered
+ |
+ = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
+ = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
+ = note: the matched value is of type `Result<&u32, &!>`
+help: you might want to use `let else` to handle the variant that isn't matched
+ |
+LL | let Ok(_x) = res_u32_never.as_ref() else { todo!() };
+ | ++++++++++++++++
+
+error[E0005]: refutable pattern in local binding
+ --> $DIR/empty-types.rs:108:9
+ |
+LL | let Ok(_x) = &res_u32_never;
+ | ^^^^^^ pattern `&Err(_)` not covered
+ |
+ = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
+ = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
+ = note: the matched value is of type `&Result<u32, !>`
+help: you might want to use `let else` to handle the variant that isn't matched
+ |
+LL | let Ok(_x) = &res_u32_never else { todo!() };
+ | ++++++++++++++++
+
+error[E0004]: non-exhaustive patterns: `Ok(_)` and `Err(_)` not covered
+ --> $DIR/empty-types.rs:112:11
+ |
+LL | match result_never {}
+ | ^^^^^^^^^^^^ patterns `Ok(_)` and `Err(_)` not covered
+ |
+note: `Result<!, !>` defined here
+ --> $SRC_DIR/core/src/result.rs:LL:COL
+ ::: $SRC_DIR/core/src/result.rs:LL:COL
+ |
+ = note: not covered
+ ::: $SRC_DIR/core/src/result.rs:LL:COL
+ |
+ = note: not covered
+ = note: the matched value is of type `Result<!, !>`
+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
+ |
+LL ~ match result_never {
+LL + Ok(_) | Err(_) => todo!(),
+LL + }
+ |
+
+error[E0004]: non-exhaustive patterns: `Err(_)` not covered
+ --> $DIR/empty-types.rs:117:11
+ |
+LL | match result_never {
+ | ^^^^^^^^^^^^ pattern `Err(_)` not covered
+ |
+note: `Result<!, !>` defined here
+ --> $SRC_DIR/core/src/result.rs:LL:COL
+ ::: $SRC_DIR/core/src/result.rs:LL:COL
+ |
+ = note: not covered
+ = note: the matched value is of type `Result<!, !>`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+ |
+LL | Ok(_) => {}, Err(_) => todo!()
+ | +++++++++++++++++++
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:136:13
+ |
+LL | _ => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:139:13
+ |
+LL | _ if false => {}
+ | ^
+
+error[E0004]: non-exhaustive patterns: `Some(_)` not covered
+ --> $DIR/empty-types.rs:142:15
+ |
+LL | match opt_void {
+ | ^^^^^^^^ pattern `Some(_)` not covered
+ |
+note: `Option<Void>` defined here
+ --> $SRC_DIR/core/src/option.rs:LL:COL
+ ::: $SRC_DIR/core/src/option.rs:LL:COL
+ |
+ = note: not covered
+ = note: the matched value is of type `Option<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
+ |
+LL ~ None => {},
+LL + Some(_) => todo!()
+ |
+
+error[E0004]: non-exhaustive patterns: `Some(_)` not covered
+ --> $DIR/empty-types.rs:161:15
+ |
+LL | match *ref_opt_void {
+ | ^^^^^^^^^^^^^ pattern `Some(_)` not covered
+ |
+note: `Option<Void>` defined here
+ --> $SRC_DIR/core/src/option.rs:LL:COL
+ ::: $SRC_DIR/core/src/option.rs:LL:COL
+ |
+ = note: not covered
+ = note: the matched value is of type `Option<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
+ |
+LL ~ None => {},
+LL + Some(_) => todo!()
+ |
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:204:13
+ |
+LL | _ => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:209:13
+ |
+LL | _ => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:214:13
+ |
+LL | _ => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:219:13
+ |
+LL | _ => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:225:13
+ |
+LL | _ => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:284:9
+ |
+LL | _ => {}
+ | ^
+
+error[E0004]: non-exhaustive patterns: type `(u32, !)` is non-empty
+ --> $DIR/empty-types.rs:312:11
+ |
+LL | match *x {}
+ | ^^
+ |
+ = note: the matched value is of type `(u32, !)`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
+ |
+LL ~ match *x {
+LL + _ => todo!(),
+LL ~ }
+ |
+
+error[E0004]: non-exhaustive patterns: type `(!, !)` is non-empty
+ --> $DIR/empty-types.rs:314:11
+ |
+LL | match *x {}
+ | ^^
+ |
+ = note: the matched value is of type `(!, !)`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
+ |
+LL ~ match *x {
+LL + _ => todo!(),
+LL ~ }
+ |
+
+error[E0004]: non-exhaustive patterns: `Ok(_)` and `Err(_)` not covered
+ --> $DIR/empty-types.rs:316:11
+ |
+LL | match *x {}
+ | ^^ patterns `Ok(_)` and `Err(_)` not covered
+ |
+note: `Result<!, !>` defined here
+ --> $SRC_DIR/core/src/result.rs:LL:COL
+ ::: $SRC_DIR/core/src/result.rs:LL:COL
+ |
+ = note: not covered
+ ::: $SRC_DIR/core/src/result.rs:LL:COL
+ |
+ = note: not covered
+ = note: the matched value is of type `Result<!, !>`
+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
+ |
+LL ~ match *x {
+LL + Ok(_) | Err(_) => todo!(),
+LL ~ }
+ |
+
+error[E0004]: non-exhaustive patterns: type `[!; 3]` is non-empty
+ --> $DIR/empty-types.rs:318:11
+ |
+LL | match *x {}
+ | ^^
+ |
+ = note: the matched value is of type `[!; 3]`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
+ |
+LL ~ match *x {
+LL + _ => todo!(),
+LL ~ }
+ |
+
+error[E0004]: non-exhaustive patterns: type `&[!]` is non-empty
+ --> $DIR/empty-types.rs:323:11
+ |
+LL | match slice_never {}
+ | ^^^^^^^^^^^
+ |
+ = note: the matched value is of type `&[!]`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
+ |
+LL ~ match slice_never {
+LL + _ => todo!(),
+LL + }
+ |
+
+error[E0004]: non-exhaustive patterns: `&[_, ..]` not covered
+ --> $DIR/empty-types.rs:325:11
+ |
+LL | match slice_never {
+ | ^^^^^^^^^^^ pattern `&[_, ..]` not covered
+ |
+ = note: the matched value is of type `&[!]`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+ |
+LL ~ [] => {},
+LL + &[_, ..] => todo!()
+ |
+
+error[E0004]: non-exhaustive patterns: `&[]`, `&[_]` and `&[_, _]` not covered
+ --> $DIR/empty-types.rs:334:11
+ |
+LL | match slice_never {
+ | ^^^^^^^^^^^ patterns `&[]`, `&[_]` and `&[_, _]` not covered
+ |
+ = note: the matched value is of type `&[!]`
+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
+ |
+LL ~ [_, _, _, ..] => {},
+LL + &[] | &[_] | &[_, _] => todo!()
+ |
+
+error[E0004]: non-exhaustive patterns: `&[]` and `&[_, ..]` not covered
+ --> $DIR/empty-types.rs:347:11
+ |
+LL | match slice_never {
+ | ^^^^^^^^^^^ patterns `&[]` and `&[_, ..]` not covered
+ |
+ = note: the matched value is of type `&[!]`
+ = note: match arms with guards don't count towards exhaustivity
+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
+ |
+LL ~ &[..] if false => {},
+LL + &[] | &[_, ..] => todo!()
+ |
+
+error[E0004]: non-exhaustive patterns: type `[!]` is non-empty
+ --> $DIR/empty-types.rs:353:11
+ |
+LL | match *slice_never {}
+ | ^^^^^^^^^^^^
+ |
+ = note: the matched value is of type `[!]`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
+ |
+LL ~ match *slice_never {
+LL + _ => todo!(),
+LL + }
+ |
+
+error[E0004]: non-exhaustive patterns: type `[!; 3]` is non-empty
+ --> $DIR/empty-types.rs:360:11
+ |
+LL | match array_3_never {}
+ | ^^^^^^^^^^^^^
+ |
+ = note: the matched value is of type `[!; 3]`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
+ |
+LL ~ match array_3_never {
+LL + _ => todo!(),
+LL + }
+ |
+
+error[E0004]: non-exhaustive patterns: type `[!; 0]` is non-empty
+ --> $DIR/empty-types.rs:383:11
+ |
+LL | match array_0_never {}
+ | ^^^^^^^^^^^^^
+ |
+ = note: the matched value is of type `[!; 0]`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
+ |
+LL ~ match array_0_never {
+LL + _ => todo!(),
+LL + }
+ |
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:390:9
+ |
+LL | _ => {}
+ | ^
+
+error[E0004]: non-exhaustive patterns: `[]` not covered
+ --> $DIR/empty-types.rs:392:11
+ |
+LL | match array_0_never {
+ | ^^^^^^^^^^^^^ pattern `[]` not covered
+ |
+ = note: the matched value is of type `[!; 0]`
+ = note: match arms with guards don't count towards exhaustivity
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+ |
+LL ~ [..] if false => {},
+LL + [] => todo!()
+ |
+
+error[E0004]: non-exhaustive patterns: `&Some(_)` not covered
+ --> $DIR/empty-types.rs:446:11
+ |
+LL | match ref_opt_never {
+ | ^^^^^^^^^^^^^ pattern `&Some(_)` not covered
+ |
+note: `Option<!>` defined here
+ --> $SRC_DIR/core/src/option.rs:LL:COL
+ ::: $SRC_DIR/core/src/option.rs:LL:COL
+ |
+ = note: not covered
+ = note: the matched value is of type `&Option<!>`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+ |
+LL ~ &None => {},
+LL + &Some(_) => todo!()
+ |
+
+error[E0004]: non-exhaustive patterns: `Some(_)` not covered
+ --> $DIR/empty-types.rs:487:11
+ |
+LL | match *ref_opt_never {
+ | ^^^^^^^^^^^^^^ pattern `Some(_)` not covered
+ |
+note: `Option<!>` defined here
+ --> $SRC_DIR/core/src/option.rs:LL:COL
+ ::: $SRC_DIR/core/src/option.rs:LL:COL
+ |
+ = note: not covered
+ = note: the matched value is of type `Option<!>`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+ |
+LL ~ None => {},
+LL + Some(_) => todo!()
+ |
+
+error[E0004]: non-exhaustive patterns: `Err(_)` not covered
+ --> $DIR/empty-types.rs:535:11
+ |
+LL | match *ref_res_never {
+ | ^^^^^^^^^^^^^^ pattern `Err(_)` not covered
+ |
+note: `Result<!, !>` defined here
+ --> $SRC_DIR/core/src/result.rs:LL:COL
+ ::: $SRC_DIR/core/src/result.rs:LL:COL
+ |
+ = note: not covered
+ = note: the matched value is of type `Result<!, !>`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+ |
+LL ~ Ok(_) => {},
+LL + Err(_) => todo!()
+ |
+
+error[E0004]: non-exhaustive patterns: `Err(_)` not covered
+ --> $DIR/empty-types.rs:546:11
+ |
+LL | match *ref_res_never {
+ | ^^^^^^^^^^^^^^ pattern `Err(_)` not covered
+ |
+note: `Result<!, !>` defined here
+ --> $SRC_DIR/core/src/result.rs:LL:COL
+ ::: $SRC_DIR/core/src/result.rs:LL:COL
+ |
+ = note: not covered
+ = note: the matched value is of type `Result<!, !>`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+ |
+LL ~ Ok(_a) => {},
+LL + Err(_) => todo!()
+ |
+
+error[E0004]: non-exhaustive patterns: type `(u32, !)` is non-empty
+ --> $DIR/empty-types.rs:565:11
+ |
+LL | match *ref_tuple_half_never {}
+ | ^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: the matched value is of type `(u32, !)`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
+ |
+LL ~ match *ref_tuple_half_never {
+LL + _ => todo!(),
+LL + }
+ |
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:598:9
+ |
+LL | _ => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:601:9
+ |
+LL | _x => {}
+ | ^^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:604:9
+ |
+LL | _ if false => {}
+ | ^
+
+error: unreachable pattern
+ --> $DIR/empty-types.rs:607:9
+ |
+LL | _x if false => {}
+ | ^^
+
+error[E0004]: non-exhaustive patterns: `&_` not covered
+ --> $DIR/empty-types.rs:631:11
+ |
+LL | match ref_never {
+ | ^^^^^^^^^ pattern `&_` not covered
+ |
+ = note: the matched value is of type `&!`
+ = note: references are always considered inhabited
+ = note: match arms with guards don't count towards exhaustivity
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+ |
+LL ~ &_a if false => {},
+LL + &_ => todo!()
+ |
+
+error[E0004]: non-exhaustive patterns: `Some(_)` not covered
+ --> $DIR/empty-types.rs:659:11
+ |
+LL | match *x {
+ | ^^ pattern `Some(_)` not covered
+ |
+note: `Option<Result<!, !>>` defined here
+ --> $SRC_DIR/core/src/option.rs:LL:COL
+ ::: $SRC_DIR/core/src/option.rs:LL:COL
+ |
+ = note: not covered
+ = note: the matched value is of type `Option<Result<!, !>>`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+ |
+LL ~ None => {},
+LL + Some(_) => todo!()
+ |
+
+error: aborting due to 48 previous errors
+
+Some errors have detailed explanations: E0004, E0005.
+For more information about an error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/empty-types.rs b/tests/ui/pattern/usefulness/empty-types.rs
new file mode 100644
index 000000000..1e1d23e44
--- /dev/null
+++ b/tests/ui/pattern/usefulness/empty-types.rs
@@ -0,0 +1,665 @@
+// revisions: normal exhaustive_patterns
+//
+// This tests correct handling of empty types in exhaustiveness checking.
+//
+// Most of the subtlety of this file happens in scrutinee places which are not required to hold
+// valid data, namely dereferences and union field accesses. In these cases, empty arms can
+// generally not be omitted, except with `exhaustive_patterns` which ignores this..
+#![feature(never_type)]
+// This feature is useful to avoid `!` falling back to `()` all the time.
+#![feature(never_type_fallback)]
+#![cfg_attr(exhaustive_patterns, feature(exhaustive_patterns))]
+#![allow(dead_code, unreachable_code)]
+#![deny(unreachable_patterns)]
+
+#[derive(Copy, Clone)]
+enum Void {}
+
+/// A bunch of never situations that can't be normally constructed.
+#[derive(Copy, Clone)]
+struct NeverBundle {
+ never: !,
+ void: Void,
+ tuple_never: (!, !),
+ tuple_half_never: (u32, !),
+ array_3_never: [!; 3],
+ result_never: Result<!, !>,
+}
+
+/// A simplified `MaybeUninit` to test union field accesses.
+#[derive(Copy, Clone)]
+union Uninit<T: Copy> {
+ value: T,
+ uninit: (),
+}
+
+impl<T: Copy> Uninit<T> {
+ fn new() -> Self {
+ Self { uninit: () }
+ }
+}
+
+// Simple cases of omitting empty arms, all with known_valid scrutinees.
+fn basic(x: NeverBundle) {
+ let never: ! = x.never;
+ match never {}
+ match never {
+ _ => {} //~ ERROR unreachable pattern
+ }
+ match never {
+ _x => {} //~ ERROR unreachable pattern
+ }
+
+ let ref_never: &! = &x.never;
+ match ref_never {}
+ //~^ ERROR non-empty
+ match ref_never {
+ // useful, reachable
+ _ => {}
+ }
+ match ref_never {
+ // useful, reachable
+ &_ => {}
+ }
+
+ let tuple_half_never: (u32, !) = x.tuple_half_never;
+ match tuple_half_never {}
+ //[normal]~^ ERROR non-empty
+ match tuple_half_never {
+ (_, _) => {} //[exhaustive_patterns]~ ERROR unreachable pattern
+ }
+
+ let tuple_never: (!, !) = x.tuple_never;
+ match tuple_never {}
+ //[normal]~^ ERROR non-empty
+ match tuple_never {
+ _ => {} //[exhaustive_patterns]~ ERROR unreachable pattern
+ }
+ match tuple_never {
+ (_, _) => {} //[exhaustive_patterns]~ ERROR unreachable pattern
+ }
+ match tuple_never.0 {}
+ match tuple_never.0 {
+ _ => {} //~ ERROR unreachable pattern
+ }
+
+ let res_u32_never: Result<u32, !> = Ok(0);
+ match res_u32_never {}
+ //~^ ERROR non-exhaustive
+ match res_u32_never {
+ //[normal]~^ ERROR non-exhaustive
+ Ok(_) => {}
+ }
+ match res_u32_never {
+ Ok(_) => {}
+ Err(_) => {} //[exhaustive_patterns]~ ERROR unreachable pattern
+ }
+ match res_u32_never {
+ //~^ ERROR non-exhaustive
+ Ok(0) => {}
+ Err(_) => {} //[exhaustive_patterns]~ ERROR unreachable pattern
+ }
+ let Ok(_x) = res_u32_never;
+ //[normal]~^ ERROR refutable
+ let Ok(_x) = res_u32_never.as_ref();
+ //~^ ERROR refutable
+ // Non-obvious difference: here there's an implicit dereference in the patterns, which makes the
+ // inner place !known_valid. `exhaustive_patterns` ignores this.
+ let Ok(_x) = &res_u32_never;
+ //[normal]~^ ERROR refutable
+
+ let result_never: Result<!, !> = x.result_never;
+ match result_never {}
+ //[normal]~^ ERROR non-exhaustive
+ match result_never {
+ _ => {} //[exhaustive_patterns]~ ERROR unreachable pattern
+ }
+ match result_never {
+ //[normal]~^ ERROR non-exhaustive
+ Ok(_) => {} //[exhaustive_patterns]~ ERROR unreachable pattern
+ }
+ match result_never {
+ Ok(_) => {} //[exhaustive_patterns]~ ERROR unreachable pattern
+ _ => {} //[exhaustive_patterns]~ ERROR unreachable pattern
+ }
+ match result_never {
+ Ok(_) => {} //[exhaustive_patterns]~ ERROR unreachable pattern
+ Err(_) => {} //[exhaustive_patterns]~ ERROR unreachable pattern
+ }
+}
+
+// Check for a few cases that `Void` and `!` are treated the same.
+fn void_same_as_never(x: NeverBundle) {
+ unsafe {
+ match x.void {}
+ match x.void {
+ _ => {} //~ ERROR unreachable pattern
+ }
+ match x.void {
+ _ if false => {} //~ ERROR unreachable pattern
+ }
+ let opt_void: Option<Void> = None;
+ match opt_void {
+ //[normal]~^ ERROR non-exhaustive
+ None => {}
+ }
+ match opt_void {
+ None => {}
+ Some(_) => {} //[exhaustive_patterns]~ ERROR unreachable pattern
+ }
+ match opt_void {
+ None => {}
+ _ => {} //[exhaustive_patterns]~ ERROR unreachable pattern
+ }
+
+ let ref_void: &Void = &x.void;
+ match *ref_void {}
+ match *ref_void {
+ _ => {}
+ }
+ let ref_opt_void: &Option<Void> = &None;
+ match *ref_opt_void {
+ //[normal]~^ ERROR non-exhaustive
+ None => {}
+ }
+ match *ref_opt_void {
+ None => {}
+ Some(_) => {}
+ }
+ match *ref_opt_void {
+ None => {}
+ _ => {}
+ }
+ match *ref_opt_void {
+ None => {}
+ _a => {}
+ }
+ let union_void = Uninit::<Void>::new();
+ match union_void.value {}
+ match union_void.value {
+ _ => {}
+ }
+ let ptr_void: *const Void = std::ptr::null();
+ match *ptr_void {}
+ match *ptr_void {
+ _ => {}
+ }
+ }
+}
+
+// Test if we correctly determine validity from the scrutinee expression.
+fn invalid_scrutinees(x: NeverBundle) {
+ let ptr_never: *const ! = std::ptr::null();
+ let never: ! = x.never;
+ let ref_never: &! = &never;
+
+ struct NestedNeverBundle(NeverBundle);
+ let nested_x = NestedNeverBundle(x);
+
+ // These should be considered known_valid and warn unreachable.
+ unsafe {
+ // A plain `!` value must be valid.
+ match never {}
+ match never {
+ _ => {} //~ ERROR unreachable pattern
+ }
+ // A block forces a copy.
+ match { *ptr_never } {}
+ match { *ptr_never } {
+ _ => {} //~ ERROR unreachable pattern
+ }
+ // This field access is not a dereference.
+ match x.never {}
+ match x.never {
+ _ => {} //~ ERROR unreachable pattern
+ }
+ // This nested field access is not a dereference.
+ match nested_x.0.never {}
+ match nested_x.0.never {
+ _ => {} //~ ERROR unreachable pattern
+ }
+ // Indexing is like a field access. This one does not access behind a reference.
+ let array_3_never: [!; 3] = x.array_3_never;
+ match array_3_never[0] {}
+ match array_3_never[0] {
+ _ => {} //~ ERROR unreachable pattern
+ }
+ }
+
+ // These should be considered !known_valid and not warn unreachable.
+ unsafe {
+ // A pointer may point to a place with an invalid value.
+ match *ptr_never {}
+ match *ptr_never {
+ _ => {}
+ }
+ // A reference may point to a place with an invalid value.
+ match *ref_never {}
+ match *ref_never {
+ _ => {}
+ }
+ // This field access is a dereference.
+ let ref_x: &NeverBundle = &x;
+ match ref_x.never {}
+ match ref_x.never {
+ _ => {}
+ }
+ // This nested field access is a dereference.
+ let nested_ref_x: &NestedNeverBundle = &nested_x;
+ match nested_ref_x.0.never {}
+ match nested_ref_x.0.never {
+ _ => {}
+ }
+ // A cast does not load.
+ match (*ptr_never as Void) {}
+ match (*ptr_never as Void) {
+ _ => {}
+ }
+ // A union field may contain invalid data.
+ let union_never = Uninit::<!>::new();
+ match union_never.value {}
+ match union_never.value {
+ _ => {}
+ }
+ // Indexing is like a field access. This one accesses behind a reference.
+ let slice_never: &[!] = &[];
+ match slice_never[0] {}
+ match slice_never[0] {
+ _ => {}
+ }
+ }
+}
+
+// Test we correctly track validity as we dig into patterns. Validity changes when we go under a
+// dereference or a union field access, and it otherwise preserved.
+fn nested_validity_tracking(bundle: NeverBundle) {
+ let never: ! = bundle.never;
+ let ref_never: &! = &never;
+ let tuple_never: (!, !) = bundle.tuple_never;
+ let result_never: Result<!, !> = bundle.result_never;
+ let union_never = Uninit::<!>::new();
+
+ // These should be considered known_valid and warn unreachable.
+ match never {
+ _ => {} //~ ERROR unreachable pattern
+ }
+ match tuple_never {
+ (_, _) => {} //[exhaustive_patterns]~ ERROR unreachable pattern
+ }
+ match result_never {
+ Ok(_) => {} //[exhaustive_patterns]~ ERROR unreachable pattern
+ Err(_) => {} //[exhaustive_patterns]~ ERROR unreachable pattern
+ }
+
+ // These should be considered !known_valid and not warn unreachable.
+ match ref_never {
+ &_ => {}
+ }
+ match union_never {
+ Uninit { value: _ } => {}
+ }
+}
+
+// Test we don't allow empty matches on empty types if the scrutinee is `!known_valid`.
+fn invalid_empty_match(bundle: NeverBundle) {
+ // We allow these two for backwards-compability.
+ let x: &! = &bundle.never;
+ match *x {}
+ let x: &Void = &bundle.void;
+ match *x {}
+
+ let x: &(u32, !) = &bundle.tuple_half_never;
+ match *x {} //[normal]~ ERROR non-exhaustive
+ let x: &(!, !) = &bundle.tuple_never;
+ match *x {} //[normal]~ ERROR non-exhaustive
+ let x: &Result<!, !> = &bundle.result_never;
+ match *x {} //[normal]~ ERROR non-exhaustive
+ let x: &[!; 3] = &bundle.array_3_never;
+ match *x {} //[normal]~ ERROR non-exhaustive
+}
+
+fn arrays_and_slices(x: NeverBundle) {
+ let slice_never: &[!] = &[];
+ match slice_never {}
+ //~^ ERROR non-empty
+ match slice_never {
+ //[normal]~^ ERROR not covered
+ [] => {}
+ }
+ match slice_never {
+ [] => {}
+ [_] => {}
+ [_, _, ..] => {}
+ }
+ match slice_never {
+ //[normal]~^ ERROR `&[]`, `&[_]` and `&[_, _]` not covered
+ //[exhaustive_patterns]~^^ ERROR `&[]` not covered
+ [_, _, _, ..] => {}
+ }
+ match slice_never {
+ [] => {}
+ _ => {}
+ }
+ match slice_never {
+ [] => {}
+ _x => {}
+ }
+ match slice_never {
+ //[normal]~^ ERROR `&[]` and `&[_, ..]` not covered
+ //[exhaustive_patterns]~^^ ERROR `&[]` not covered
+ &[..] if false => {}
+ }
+
+ match *slice_never {}
+ //~^ ERROR non-empty
+ match *slice_never {
+ _ => {}
+ }
+
+ let array_3_never: [!; 3] = x.array_3_never;
+ match array_3_never {}
+ //[normal]~^ ERROR non-empty
+ match array_3_never {
+ _ => {} //[exhaustive_patterns]~ ERROR unreachable pattern
+ }
+ match array_3_never {
+ [_, _, _] => {} //[exhaustive_patterns]~ ERROR unreachable pattern
+ }
+ match array_3_never {
+ [_, ..] => {} //[exhaustive_patterns]~ ERROR unreachable pattern
+ }
+
+ let ref_array_3_never: &[!; 3] = &array_3_never;
+ match ref_array_3_never {
+ // useful, reachable
+ &[_, _, _] => {}
+ }
+ match ref_array_3_never {
+ // useful, !reachable
+ &[_x, _, _] => {}
+ }
+
+ let array_0_never: [!; 0] = [];
+ match array_0_never {}
+ //~^ ERROR non-empty
+ match array_0_never {
+ [] => {}
+ }
+ match array_0_never {
+ [] => {}
+ _ => {} //~ ERROR unreachable pattern
+ }
+ match array_0_never {
+ //~^ ERROR `[]` not covered
+ [..] if false => {}
+ }
+}
+
+// The difference between `_` and `_a` patterns is that `_a` loads the value. In case of an empty
+// type, this asserts validity of the value, and thus the binding is unreachable. We don't yet
+// distinguish these cases since we don't lint "unreachable" on `useful && !reachable` arms.
+// Once/if never patterns are a thing, we can warn that the `_a` cases should be never patterns.
+fn bindings(x: NeverBundle) {
+ let opt_never: Option<!> = None;
+ let ref_never: &! = &x.never;
+ let ref_opt_never: &Option<!> = &None;
+
+ // On a known_valid place.
+ match opt_never {
+ None => {}
+ // !useful, !reachable
+ Some(_) => {} //[exhaustive_patterns]~ ERROR unreachable pattern
+ }
+ match opt_never {
+ None => {}
+ // !useful, !reachable
+ Some(_a) => {} //[exhaustive_patterns]~ ERROR unreachable pattern
+ }
+ match opt_never {
+ None => {}
+ // !useful, !reachable
+ _ => {} //[exhaustive_patterns]~ ERROR unreachable pattern
+ }
+ match opt_never {
+ None => {}
+ // !useful, !reachable
+ _a => {} //[exhaustive_patterns]~ ERROR unreachable pattern
+ }
+
+ // The scrutinee is known_valid, but under the `&` isn't anymore.
+ match ref_never {
+ // useful, reachable
+ _ => {}
+ }
+ match ref_never {
+ // useful, reachable
+ &_ => {}
+ }
+ match ref_never {
+ // useful, reachable
+ _a => {}
+ }
+ match ref_never {
+ // useful, !reachable
+ &_a => {}
+ }
+ match ref_opt_never {
+ //[normal]~^ ERROR non-exhaustive
+ &None => {}
+ }
+ match ref_opt_never {
+ &None => {}
+ // useful, reachable
+ _ => {}
+ }
+ match ref_opt_never {
+ &None => {}
+ // useful, reachable
+ _a => {}
+ }
+ match ref_opt_never {
+ &None => {}
+ // useful, reachable
+ &_ => {}
+ }
+ match ref_opt_never {
+ &None => {}
+ // useful, !reachable
+ &_a => {}
+ }
+
+ // On a !known_valid place.
+ match *ref_never {}
+ match *ref_never {
+ // useful, reachable
+ _ => {}
+ }
+ match *ref_never {
+ // useful, !reachable
+ _a => {}
+ }
+ // This is equivalent to `match ref_never { _a => {} }`. In other words, it asserts validity of
+ // `ref_never` but says nothing of the data at `*ref_never`.
+ match *ref_never {
+ // useful, reachable
+ ref _a => {}
+ }
+ match *ref_opt_never {
+ //[normal]~^ ERROR non-exhaustive
+ None => {}
+ }
+ match *ref_opt_never {
+ None => {}
+ // useful, reachable
+ Some(_) => {}
+ }
+ match *ref_opt_never {
+ None => {}
+ // useful, !reachable
+ Some(_a) => {}
+ }
+ match *ref_opt_never {
+ None => {}
+ // useful, reachable
+ _ => {}
+ }
+ match *ref_opt_never {
+ None => {}
+ // useful, !reachable
+ _a => {}
+ }
+ match *ref_opt_never {
+ None => {}
+ // useful, !reachable
+ _a @ Some(_) => {}
+ }
+ // This is equivalent to `match ref_opt_never { None => {}, _a => {} }`. In other words, it
+ // asserts validity of `ref_opt_never` but says nothing of the data at `*ref_opt_never`.
+ match *ref_opt_never {
+ None => {}
+ // useful, reachable
+ ref _a => {}
+ }
+ match *ref_opt_never {
+ None => {}
+ // useful, reachable
+ ref _a @ Some(_) => {}
+ }
+ match *ref_opt_never {
+ None => {}
+ // useful, !reachable
+ ref _a @ Some(_b) => {}
+ }
+
+ let ref_res_never: &Result<!, !> = &x.result_never;
+ match *ref_res_never {
+ //[normal]~^ ERROR non-exhaustive
+ // useful, reachable
+ Ok(_) => {}
+ }
+ match *ref_res_never {
+ // useful, reachable
+ Ok(_) => {}
+ // useful, reachable
+ _ => {}
+ }
+ match *ref_res_never {
+ //[normal]~^ ERROR non-exhaustive
+ // useful, !reachable
+ Ok(_a) => {}
+ }
+ match *ref_res_never {
+ // useful, !reachable
+ Ok(_a) => {}
+ // useful, reachable
+ _ => {}
+ }
+ match *ref_res_never {
+ // useful, !reachable
+ Ok(_a) => {}
+ // useful, reachable
+ Err(_) => {}
+ }
+
+ let ref_tuple_half_never: &(u32, !) = &x.tuple_half_never;
+ match *ref_tuple_half_never {}
+ //[normal]~^ ERROR non-empty
+ match *ref_tuple_half_never {
+ // useful, reachable
+ (_, _) => {}
+ }
+ match *ref_tuple_half_never {
+ // useful, reachable
+ (_x, _) => {}
+ }
+ match *ref_tuple_half_never {
+ // useful, !reachable
+ (_, _x) => {}
+ }
+ match *ref_tuple_half_never {
+ // useful, !reachable
+ (0, _x) => {}
+ // useful, reachable
+ (1.., _) => {}
+ }
+}
+
+// When we execute the condition for a guard we loads from all bindings. This asserts validity at
+// all places with bindings. Surprisingly this can make subsequent arms unreachable. We choose to
+// not detect this in exhaustiveness because this is rather subtle. With never patterns, we would
+// recommend using a never pattern instead.
+fn guards_and_validity(x: NeverBundle) {
+ let never: ! = x.never;
+ let ref_never: &! = &never;
+
+ // Basic guard behavior when known_valid.
+ match never {}
+ match never {
+ _ => {} //~ ERROR unreachable pattern
+ }
+ match never {
+ _x => {} //~ ERROR unreachable pattern
+ }
+ match never {
+ _ if false => {} //~ ERROR unreachable pattern
+ }
+ match never {
+ _x if false => {} //~ ERROR unreachable pattern
+ }
+
+ // If the pattern under the guard doesn't load, all is normal.
+ match *ref_never {
+ // useful, reachable
+ _ if false => {}
+ // useful, reachable
+ _ => {}
+ }
+ // Now the madness commences. The guard caused a load of the value thus asserting validity. So
+ // there's no invalid value for `_` to catch. So the second pattern is unreachable despite the
+ // guard not being taken.
+ match *ref_never {
+ // useful, !reachable
+ _a if false => {}
+ // !useful, !reachable
+ _ => {}
+ }
+ // The above still applies to the implicit `_` pattern used for exhaustiveness.
+ match *ref_never {
+ // useful, !reachable
+ _a if false => {}
+ }
+ match ref_never {
+ //[normal]~^ ERROR non-exhaustive
+ // useful, !reachable
+ &_a if false => {}
+ }
+
+ // Same but with subpatterns.
+ let ref_result_never: &Result<!, !> = &x.result_never;
+ match *ref_result_never {
+ // useful, !reachable
+ Ok(_x) if false => {}
+ // !useful, !reachable
+ Ok(_) => {}
+ // useful, !reachable
+ Err(_) => {}
+ }
+ let ref_tuple_never: &(!, !) = &x.tuple_never;
+ match *ref_tuple_never {
+ // useful, !reachable
+ (_, _x) if false => {}
+ // !useful, !reachable
+ (_, _) => {}
+ }
+}
+
+fn diagnostics_subtlety(x: NeverBundle) {
+ // Regression test for diagnostics: don't report `Some(Ok(_))` and `Some(Err(_))`.
+ let x: &Option<Result<!, !>> = &None;
+ match *x {
+ //[normal]~^ ERROR `Some(_)` not covered
+ None => {}
+ }
+}
+
+fn main() {}
diff --git a/tests/ui/pattern/usefulness/guards.stderr b/tests/ui/pattern/usefulness/guards.stderr
index fc6748958..ad9046fe2 100644
--- a/tests/ui/pattern/usefulness/guards.stderr
+++ b/tests/ui/pattern/usefulness/guards.stderr
@@ -11,6 +11,6 @@ LL ~ 128 ..= 255 if true => {},
LL + 128_u8..=u8::MAX => todo!()
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.allow.stderr b/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.allow.stderr
deleted file mode 100644
index 7f26c93aa..000000000
--- a/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.allow.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0004]: non-exhaustive patterns: type `usize` is non-empty
- --> $DIR/pointer-sized-int.rs:54:11
- |
-LL | match 7usize {}
- | ^^^^^^
- |
- = note: the matched value is of type `usize`
-help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
- |
-LL ~ match 7usize {
-LL + _ => todo!(),
-LL + }
- |
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.deny.stderr b/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.deny.stderr
index d16ec5412..416523213 100644
--- a/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.deny.stderr
+++ b/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.deny.stderr
@@ -1,162 +1,150 @@
error[E0004]: non-exhaustive patterns: `usize::MAX..` not covered
- --> $DIR/pointer-sized-int.rs:14:11
+ --> $DIR/pointer-sized-int.rs:13:11
|
LL | match 0usize {
| ^^^^^^ pattern `usize::MAX..` not covered
|
= note: the matched value is of type `usize`
= note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
- = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
-LL ~ 0 ..= usize::MAX => {},
+LL ~ 0..=usize::MAX => {},
LL + usize::MAX.. => todo!()
|
error[E0004]: non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
- --> $DIR/pointer-sized-int.rs:19:11
+ --> $DIR/pointer-sized-int.rs:18:11
|
LL | match 0isize {
| ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
|
= note: the matched value is of type `isize`
= note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
- = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
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
|
-LL ~ isize::MIN ..= isize::MAX => {},
+LL ~ isize::MIN..=isize::MAX => {},
LL + ..isize::MIN | isize::MAX.. => todo!()
|
error[E0004]: non-exhaustive patterns: `usize::MAX..` not covered
- --> $DIR/pointer-sized-int.rs:25:8
+ --> $DIR/pointer-sized-int.rs:23:8
|
LL | m!(0usize, 0..=usize::MAX);
| ^^^^^^ pattern `usize::MAX..` not covered
|
= note: the matched value is of type `usize`
= note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
- = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
LL | match $s { $($t)+ => {}, usize::MAX.. => todo!() }
| +++++++++++++++++++++++++
error[E0004]: non-exhaustive patterns: `usize::MAX..` not covered
- --> $DIR/pointer-sized-int.rs:27:8
+ --> $DIR/pointer-sized-int.rs:25:8
|
LL | m!(0usize, 0..5 | 5..=usize::MAX);
| ^^^^^^ pattern `usize::MAX..` not covered
|
= note: the matched value is of type `usize`
= note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
- = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
LL | match $s { $($t)+ => {}, usize::MAX.. => todo!() }
| +++++++++++++++++++++++++
error[E0004]: non-exhaustive patterns: `usize::MAX..` not covered
- --> $DIR/pointer-sized-int.rs:29:8
+ --> $DIR/pointer-sized-int.rs:27:8
|
LL | m!(0usize, 0..usize::MAX | usize::MAX);
| ^^^^^^ pattern `usize::MAX..` not covered
|
= note: the matched value is of type `usize`
= note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
- = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
LL | match $s { $($t)+ => {}, usize::MAX.. => todo!() }
| +++++++++++++++++++++++++
error[E0004]: non-exhaustive patterns: `(usize::MAX.., _)` not covered
- --> $DIR/pointer-sized-int.rs:31:8
+ --> $DIR/pointer-sized-int.rs:29:8
|
LL | m!((0usize, true), (0..5, true) | (5..=usize::MAX, true) | (0..=usize::MAX, false));
| ^^^^^^^^^^^^^^ pattern `(usize::MAX.., _)` not covered
|
= note: the matched value is of type `(usize, bool)`
= note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
- = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
LL | match $s { $($t)+ => {}, (usize::MAX.., _) => todo!() }
| ++++++++++++++++++++++++++++++
error[E0004]: non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
- --> $DIR/pointer-sized-int.rs:36:8
+ --> $DIR/pointer-sized-int.rs:38:8
|
LL | m!(0isize, isize::MIN..=isize::MAX);
| ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
|
= note: the matched value is of type `isize`
= note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
- = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
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
|
LL | match $s { $($t)+ => {}, ..isize::MIN | isize::MAX.. => todo!() }
| ++++++++++++++++++++++++++++++++++++++++
error[E0004]: non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
- --> $DIR/pointer-sized-int.rs:38:8
+ --> $DIR/pointer-sized-int.rs:40:8
|
LL | m!(0isize, isize::MIN..5 | 5..=isize::MAX);
| ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
|
= note: the matched value is of type `isize`
= note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
- = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
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
|
LL | match $s { $($t)+ => {}, ..isize::MIN | isize::MAX.. => todo!() }
| ++++++++++++++++++++++++++++++++++++++++
error[E0004]: non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
- --> $DIR/pointer-sized-int.rs:40:8
+ --> $DIR/pointer-sized-int.rs:42:8
|
-LL | m!(0isize, isize::MIN..isize::MAX | isize::MAX);
+LL | m!(0isize, isize::MIN..=-1 | 0 | 1..=isize::MAX);
| ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
|
= note: the matched value is of type `isize`
= note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
- = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
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
|
LL | match $s { $($t)+ => {}, ..isize::MIN | isize::MAX.. => todo!() }
| ++++++++++++++++++++++++++++++++++++++++
-error[E0004]: non-exhaustive patterns: `(..isize::MIN, _)` and `(isize::MAX.., _)` not covered
- --> $DIR/pointer-sized-int.rs:42:8
+error[E0004]: non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
+ --> $DIR/pointer-sized-int.rs:44:8
|
-LL | m!((0isize, true), (isize::MIN..5, true)
- | ^^^^^^^^^^^^^^ patterns `(..isize::MIN, _)` and `(isize::MAX.., _)` not covered
+LL | m!(0isize, isize::MIN..isize::MAX | isize::MAX);
+ | ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
|
- = note: the matched value is of type `(isize, bool)`
+ = note: the matched value is of type `isize`
= note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
- = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
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
|
-LL | match $s { $($t)+ => {}, (..isize::MIN, _) | (isize::MAX.., _) => todo!() }
- | ++++++++++++++++++++++++++++++++++++++++++++++++++
+LL | match $s { $($t)+ => {}, ..isize::MIN | isize::MAX.. => todo!() }
+ | ++++++++++++++++++++++++++++++++++++++++
-error[E0004]: non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
- --> $DIR/pointer-sized-int.rs:47:11
+error[E0004]: non-exhaustive patterns: `(..isize::MIN, _)` and `(isize::MAX.., _)` not covered
+ --> $DIR/pointer-sized-int.rs:47:9
|
-LL | match 0isize {
- | ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
+LL | (0isize, true),
+ | ^^^^^^^^^^^^^^ patterns `(..isize::MIN, _)` and `(isize::MAX.., _)` not covered
|
- = note: the matched value is of type `isize`
+ = note: the matched value is of type `(isize, bool)`
= note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
- = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
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
|
-LL ~ 1 ..= isize::MAX => {},
-LL + ..isize::MIN | isize::MAX.. => todo!()
- |
+LL | match $s { $($t)+ => {}, (..isize::MIN, _) | (isize::MAX.., _) => todo!() }
+ | ++++++++++++++++++++++++++++++++++++++++++++++++++
error[E0004]: non-exhaustive patterns: type `usize` is non-empty
- --> $DIR/pointer-sized-int.rs:54:11
+ --> $DIR/pointer-sized-int.rs:58:11
|
LL | match 7usize {}
| ^^^^^^
diff --git a/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.rs b/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.rs
index 20a3cbe12..3778dede7 100644
--- a/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.rs
+++ b/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.rs
@@ -1,6 +1,5 @@
-// revisions: allow deny
+// revisions: deny
#![feature(exclusive_range_pattern)]
-#![cfg_attr(allow, feature(precise_pointer_size_matching))]
#![allow(overlapping_range_endpoints)]
macro_rules! m {
@@ -12,44 +11,49 @@ macro_rules! m {
#[rustfmt::skip]
fn main() {
match 0usize {
- //[deny]~^ ERROR non-exhaustive patterns
- 0 ..= usize::MAX => {}
+ //~^ ERROR non-exhaustive patterns
+ 0..=usize::MAX => {}
}
match 0isize {
- //[deny]~^ ERROR non-exhaustive patterns
- isize::MIN ..= isize::MAX => {}
+ //~^ ERROR non-exhaustive patterns
+ isize::MIN..=isize::MAX => {}
}
- m!(0usize, 0..);
m!(0usize, 0..=usize::MAX);
- //[deny]~^ ERROR non-exhaustive patterns
+ //~^ ERROR non-exhaustive patterns
m!(0usize, 0..5 | 5..=usize::MAX);
- //[deny]~^ ERROR non-exhaustive patterns
+ //~^ ERROR non-exhaustive patterns
m!(0usize, 0..usize::MAX | usize::MAX);
- //[deny]~^ ERROR non-exhaustive patterns
+ //~^ ERROR non-exhaustive patterns
m!((0usize, true), (0..5, true) | (5..=usize::MAX, true) | (0..=usize::MAX, false));
- //[deny]~^ ERROR non-exhaustive patterns
+ //~^ ERROR non-exhaustive patterns
+
+ m!(0usize, 0..);
+ m!(0usize, 0..5 | 5..);
+ m!(0usize, ..5 | 5..);
+ m!((0usize, true), (0..5, true) | (5.., true) | (0.., false));
m!(0usize, 0..=usize::MAX | usize::MAX..);
- m!(0isize, ..0 | 0..);
m!(0isize, isize::MIN..=isize::MAX);
- //[deny]~^ ERROR non-exhaustive patterns
+ //~^ ERROR non-exhaustive patterns
m!(0isize, isize::MIN..5 | 5..=isize::MAX);
- //[deny]~^ ERROR non-exhaustive patterns
+ //~^ ERROR non-exhaustive patterns
+ m!(0isize, isize::MIN..=-1 | 0 | 1..=isize::MAX);
+ //~^ ERROR non-exhaustive patterns
m!(0isize, isize::MIN..isize::MAX | isize::MAX);
- //[deny]~^ ERROR non-exhaustive patterns
- m!((0isize, true), (isize::MIN..5, true)
- | (5..=isize::MAX, true) | (isize::MIN..=isize::MAX, false));
- //[deny]~^^ ERROR non-exhaustive patterns
- m!(0isize, ..=isize::MIN | isize::MIN..=isize::MAX | isize::MAX..);
+ //~^ ERROR non-exhaustive patterns
+ m!(
+ (0isize, true),
+ (isize::MIN..5, true) | (5..=isize::MAX, true) | (isize::MIN..=isize::MAX, false)
+ );
+ //~^^^ ERROR non-exhaustive patterns
- match 0isize {
- //[deny]~^ ERROR non-exhaustive patterns
- isize::MIN ..= -1 => {}
- 0 => {}
- 1 ..= isize::MAX => {}
- }
+ m!(0isize, ..0 | 0..);
+ m!(0isize, ..5 | 5..);
+ m!((0isize, true), (..5, true)
+ | (5.., true) | (..0 | 0.., false));
+ m!(0isize, ..=isize::MIN | isize::MIN..=isize::MAX | isize::MAX..);
match 7usize {}
//~^ ERROR non-exhaustive patterns
diff --git a/tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.stderr b/tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.stderr
index a7f93648e..36743aa81 100644
--- a/tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.stderr
+++ b/tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.stderr
@@ -6,7 +6,6 @@ LL | match 0usize {
|
= note: the matched value is of type `usize`
= note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
- = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
LL ~ 0..=usize::MAX => {},
@@ -21,7 +20,6 @@ LL | match 0isize {
|
= note: the matched value is of type `isize`
= note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
- = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
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
|
LL ~ isize::MIN..=isize::MAX => {},
diff --git a/tests/ui/pattern/usefulness/integer-ranges/reachability.rs b/tests/ui/pattern/usefulness/integer-ranges/reachability.rs
index fb4d59b05..247fdd915 100644
--- a/tests/ui/pattern/usefulness/integer-ranges/reachability.rs
+++ b/tests/ui/pattern/usefulness/integer-ranges/reachability.rs
@@ -9,9 +9,10 @@ macro_rules! m {
$t2 => {}
_ => {}
}
- }
+ };
}
+#[rustfmt::skip]
fn main() {
m!(0u8, 42, 41);
m!(0u8, 42, 42); //~ ERROR unreachable pattern
@@ -85,7 +86,7 @@ fn main() {
match 'a' {
'\u{0}'..='\u{D7FF}' => {},
'\u{E000}'..='\u{10_FFFF}' => {},
- '\u{D7FF}'..='\u{E000}' => {}, // FIXME should be unreachable
+ '\u{D7FF}'..='\u{E000}' => {}, //~ ERROR unreachable pattern
}
match (0u8, true) {
diff --git a/tests/ui/pattern/usefulness/integer-ranges/reachability.stderr b/tests/ui/pattern/usefulness/integer-ranges/reachability.stderr
index 0ffb0ffd8..c5b028d20 100644
--- a/tests/ui/pattern/usefulness/integer-ranges/reachability.stderr
+++ b/tests/ui/pattern/usefulness/integer-ranges/reachability.stderr
@@ -1,5 +1,5 @@
error: unreachable pattern
- --> $DIR/reachability.rs:17:17
+ --> $DIR/reachability.rs:18:17
|
LL | m!(0u8, 42, 42);
| ^^
@@ -11,127 +11,127 @@ LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:21:22
+ --> $DIR/reachability.rs:22:22
|
LL | m!(0u8, 20..=30, 20);
| ^^
error: unreachable pattern
- --> $DIR/reachability.rs:22:22
+ --> $DIR/reachability.rs:23:22
|
LL | m!(0u8, 20..=30, 21);
| ^^
error: unreachable pattern
- --> $DIR/reachability.rs:23:22
+ --> $DIR/reachability.rs:24:22
|
LL | m!(0u8, 20..=30, 25);
| ^^
error: unreachable pattern
- --> $DIR/reachability.rs:24:22
+ --> $DIR/reachability.rs:25:22
|
LL | m!(0u8, 20..=30, 29);
| ^^
error: unreachable pattern
- --> $DIR/reachability.rs:25:22
+ --> $DIR/reachability.rs:26:22
|
LL | m!(0u8, 20..=30, 30);
| ^^
error: unreachable pattern
- --> $DIR/reachability.rs:28:21
+ --> $DIR/reachability.rs:29:21
|
LL | m!(0u8, 20..30, 20);
| ^^
error: unreachable pattern
- --> $DIR/reachability.rs:29:21
+ --> $DIR/reachability.rs:30:21
|
LL | m!(0u8, 20..30, 21);
| ^^
error: unreachable pattern
- --> $DIR/reachability.rs:30:21
+ --> $DIR/reachability.rs:31:21
|
LL | m!(0u8, 20..30, 25);
| ^^
error: unreachable pattern
- --> $DIR/reachability.rs:31:21
+ --> $DIR/reachability.rs:32:21
|
LL | m!(0u8, 20..30, 29);
| ^^
error: unreachable pattern
- --> $DIR/reachability.rs:35:22
+ --> $DIR/reachability.rs:36:22
|
LL | m!(0u8, 20..=30, 20..=30);
| ^^^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:36:22
+ --> $DIR/reachability.rs:37:22
|
LL | m!(0u8, 20.. 30, 20.. 30);
| ^^^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:37:22
+ --> $DIR/reachability.rs:38:22
|
LL | m!(0u8, 20..=30, 20.. 30);
| ^^^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:39:22
+ --> $DIR/reachability.rs:40:22
|
LL | m!(0u8, 20..=30, 21..=30);
| ^^^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:40:22
+ --> $DIR/reachability.rs:41:22
|
LL | m!(0u8, 20..=30, 20..=29);
| ^^^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:42:24
+ --> $DIR/reachability.rs:43:24
|
LL | m!('a', 'A'..='z', 'a'..='z');
| ^^^^^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:49:9
+ --> $DIR/reachability.rs:50:9
|
LL | 5..=8 => {},
| ^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:55:9
+ --> $DIR/reachability.rs:56:9
|
LL | 5..15 => {},
| ^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:62:9
+ --> $DIR/reachability.rs:63:9
|
LL | 5..25 => {},
| ^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:70:9
+ --> $DIR/reachability.rs:71:9
|
LL | 5..25 => {},
| ^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:76:9
+ --> $DIR/reachability.rs:77:9
|
LL | 5..15 => {},
| ^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:83:9
+ --> $DIR/reachability.rs:84:9
|
LL | _ => {},
| - matches any value
@@ -139,16 +139,22 @@ LL | '\u{D7FF}'..='\u{E000}' => {},
| ^^^^^^^^^^^^^^^^^^^^^^^ unreachable pattern
error: unreachable pattern
- --> $DIR/reachability.rs:104:9
+ --> $DIR/reachability.rs:89:9
+ |
+LL | '\u{D7FF}'..='\u{E000}' => {},
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+error: unreachable pattern
+ --> $DIR/reachability.rs:105:9
|
LL | &FOO => {}
| ^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:105:9
+ --> $DIR/reachability.rs:106:9
|
LL | BAR => {}
| ^^^
-error: aborting due to 24 previous errors
+error: aborting due to 25 previous errors
diff --git a/tests/ui/pattern/usefulness/issue-105479-str-non-exhaustiveness.stderr b/tests/ui/pattern/usefulness/issue-105479-str-non-exhaustiveness.stderr
index 771fc320a..96500ddb9 100644
--- a/tests/ui/pattern/usefulness/issue-105479-str-non-exhaustiveness.stderr
+++ b/tests/ui/pattern/usefulness/issue-105479-str-non-exhaustiveness.stderr
@@ -12,6 +12,6 @@ LL ~ ("c", "d") => {},
LL + (&_, _) => todo!()
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/issue-118437-exponential-time-on-diagonal-match.rs b/tests/ui/pattern/usefulness/issue-118437-exponential-time-on-diagonal-match.rs
new file mode 100644
index 000000000..39ad2d4ab
--- /dev/null
+++ b/tests/ui/pattern/usefulness/issue-118437-exponential-time-on-diagonal-match.rs
@@ -0,0 +1,72 @@
+// check-pass
+struct BaseCommand {
+ field01: bool,
+ field02: bool,
+ field03: bool,
+ field04: bool,
+ field05: bool,
+ field06: bool,
+ field07: bool,
+ field08: bool,
+ field09: bool,
+ field10: bool,
+ field11: bool,
+ field12: bool,
+ field13: bool,
+ field14: bool,
+ field15: bool,
+ field16: bool,
+ field17: bool,
+ field18: bool,
+ field19: bool,
+ field20: bool,
+ field21: bool,
+ field22: bool,
+ field23: bool,
+ field24: bool,
+ field25: bool,
+ field26: bool,
+ field27: bool,
+ field28: bool,
+ field29: bool,
+ field30: bool,
+}
+
+fn request_key(command: BaseCommand) {
+ match command {
+ BaseCommand { field01: true, .. } => {}
+ BaseCommand { field02: true, .. } => {}
+ BaseCommand { field03: true, .. } => {}
+ BaseCommand { field04: true, .. } => {}
+ BaseCommand { field05: true, .. } => {}
+ BaseCommand { field06: true, .. } => {}
+ BaseCommand { field07: true, .. } => {}
+ BaseCommand { field08: true, .. } => {}
+ BaseCommand { field09: true, .. } => {}
+ BaseCommand { field10: true, .. } => {}
+ BaseCommand { field11: true, .. } => {}
+ BaseCommand { field12: true, .. } => {}
+ BaseCommand { field13: true, .. } => {}
+ BaseCommand { field14: true, .. } => {}
+ BaseCommand { field15: true, .. } => {}
+ BaseCommand { field16: true, .. } => {}
+ BaseCommand { field17: true, .. } => {}
+ BaseCommand { field18: true, .. } => {}
+ BaseCommand { field19: true, .. } => {}
+ BaseCommand { field20: true, .. } => {}
+ BaseCommand { field21: true, .. } => {}
+ BaseCommand { field22: true, .. } => {}
+ BaseCommand { field23: true, .. } => {}
+ BaseCommand { field24: true, .. } => {}
+ BaseCommand { field25: true, .. } => {}
+ BaseCommand { field26: true, .. } => {}
+ BaseCommand { field27: true, .. } => {}
+ BaseCommand { field28: true, .. } => {}
+ BaseCommand { field29: true, .. } => {}
+ BaseCommand { field30: true, .. } => {}
+
+ _ => {}
+ }
+}
+
+fn main() {}
diff --git a/tests/ui/pattern/usefulness/issue-12116.stderr b/tests/ui/pattern/usefulness/issue-12116.stderr
index 7f15c4703..199bdc6ac 100644
--- a/tests/ui/pattern/usefulness/issue-12116.stderr
+++ b/tests/ui/pattern/usefulness/issue-12116.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pattern/usefulness/issue-12369.stderr b/tests/ui/pattern/usefulness/issue-12369.stderr
index aab2be78c..2b6e2e14b 100644
--- a/tests/ui/pattern/usefulness/issue-12369.stderr
+++ b/tests/ui/pattern/usefulness/issue-12369.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pattern/usefulness/issue-13727.stderr b/tests/ui/pattern/usefulness/issue-13727.stderr
index 07ca56a56..ab80c56ea 100644
--- a/tests/ui/pattern/usefulness/issue-13727.stderr
+++ b/tests/ui/pattern/usefulness/issue-13727.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pattern/usefulness/issue-15129.stderr b/tests/ui/pattern/usefulness/issue-15129.stderr
index ee8410b76..cd6c30511 100644
--- a/tests/ui/pattern/usefulness/issue-15129.stderr
+++ b/tests/ui/pattern/usefulness/issue-15129.stderr
@@ -11,6 +11,6 @@ LL ~ (T::T2(()), V::V2(b)) => (),
LL ~ (T::T1(()), V::V2(_)) | (T::T2(()), V::V1(_)) => todo!(),
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/issue-2111.stderr b/tests/ui/pattern/usefulness/issue-2111.stderr
index 7f7c5a0f1..18ce7cc58 100644
--- a/tests/ui/pattern/usefulness/issue-2111.stderr
+++ b/tests/ui/pattern/usefulness/issue-2111.stderr
@@ -11,6 +11,6 @@ LL ~ (Some(_), None) | (None, Some(_)) => {},
LL + (None, None) | (Some(_), Some(_)) => todo!()
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/issue-30240-b.stderr b/tests/ui/pattern/usefulness/issue-30240-b.stderr
index 59d64bc25..74d39eba9 100644
--- a/tests/ui/pattern/usefulness/issue-30240-b.stderr
+++ b/tests/ui/pattern/usefulness/issue-30240-b.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pattern/usefulness/issue-3096-1.stderr b/tests/ui/pattern/usefulness/issue-3096-1.stderr
index d8884394f..8a81116f0 100644
--- a/tests/ui/pattern/usefulness/issue-3096-1.stderr
+++ b/tests/ui/pattern/usefulness/issue-3096-1.stderr
@@ -12,6 +12,6 @@ LL + _ => todo!(),
LL ~ }
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/issue-3096-2.stderr b/tests/ui/pattern/usefulness/issue-3096-2.stderr
index 2df8911ba..3eff2ee9b 100644
--- a/tests/ui/pattern/usefulness/issue-3096-2.stderr
+++ b/tests/ui/pattern/usefulness/issue-3096-2.stderr
@@ -12,6 +12,6 @@ LL + _ => todo!(),
LL ~ }
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/issue-31561.stderr b/tests/ui/pattern/usefulness/issue-31561.stderr
index 5367de5e5..cc7205658 100644
--- a/tests/ui/pattern/usefulness/issue-31561.stderr
+++ b/tests/ui/pattern/usefulness/issue-31561.stderr
@@ -22,6 +22,6 @@ help: you might want to use `let else` to handle the variants that aren't matche
LL | let Thing::Foo(y) = Thing::Foo(1) else { todo!() };
| ++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0005`.
diff --git a/tests/ui/pattern/usefulness/issue-3601.rs b/tests/ui/pattern/usefulness/issue-3601.rs
index a6d2b11f4..868e8c710 100644
--- a/tests/ui/pattern/usefulness/issue-3601.rs
+++ b/tests/ui/pattern/usefulness/issue-3601.rs
@@ -31,7 +31,7 @@ fn main() {
//~^ ERROR non-exhaustive patterns
//~| NOTE the matched value is of type
//~| NOTE match arms with guards don't count towards exhaustivity
- //~| NOTE pattern `box _` not covered
+ //~| NOTE pattern `box ElementKind::HTMLImageElement(_)` not covered
//~| NOTE `Box<ElementKind>` defined here
box ElementKind::HTMLImageElement(ref d) if d.image.is_some() => true,
},
diff --git a/tests/ui/pattern/usefulness/issue-3601.stderr b/tests/ui/pattern/usefulness/issue-3601.stderr
index b8c987431..a3fcaa79b 100644
--- a/tests/ui/pattern/usefulness/issue-3601.stderr
+++ b/tests/ui/pattern/usefulness/issue-3601.stderr
@@ -1,8 +1,8 @@
-error[E0004]: non-exhaustive patterns: `box _` not covered
+error[E0004]: non-exhaustive patterns: `box ElementKind::HTMLImageElement(_)` not covered
--> $DIR/issue-3601.rs:30:44
|
LL | box NodeKind::Element(ed) => match ed.kind {
- | ^^^^^^^ pattern `box _` not covered
+ | ^^^^^^^ pattern `box ElementKind::HTMLImageElement(_)` not covered
|
note: `Box<ElementKind>` defined here
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
@@ -11,9 +11,9 @@ note: `Box<ElementKind>` defined here
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
LL ~ box ElementKind::HTMLImageElement(ref d) if d.image.is_some() => true,
-LL ~ box _ => todo!(),
+LL ~ box ElementKind::HTMLImageElement(_) => todo!(),
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/issue-39362.stderr b/tests/ui/pattern/usefulness/issue-39362.stderr
index 8dc534916..9cce87a1c 100644
--- a/tests/ui/pattern/usefulness/issue-39362.stderr
+++ b/tests/ui/pattern/usefulness/issue-39362.stderr
@@ -18,6 +18,6 @@ LL ~ Foo::Bar { bar: Bar::B, .. } => (),
LL ~ _ => todo!(),
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/issue-40221.stderr b/tests/ui/pattern/usefulness/issue-40221.stderr
index 40b42af26..894cb95c7 100644
--- a/tests/ui/pattern/usefulness/issue-40221.stderr
+++ b/tests/ui/pattern/usefulness/issue-40221.stderr
@@ -18,6 +18,6 @@ LL ~ P::C(PC::Q) => (),
LL ~ P::C(PC::QA) => todo!(),
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/issue-4321.stderr b/tests/ui/pattern/usefulness/issue-4321.stderr
index 293273174..a38f360c8 100644
--- a/tests/ui/pattern/usefulness/issue-4321.stderr
+++ b/tests/ui/pattern/usefulness/issue-4321.stderr
@@ -11,6 +11,6 @@ LL ~ (true, true) => "baz",
LL + (true, false) => todo!()
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/issue-50900.stderr b/tests/ui/pattern/usefulness/issue-50900.stderr
index 7880c8925..90df1fb76 100644
--- a/tests/ui/pattern/usefulness/issue-50900.stderr
+++ b/tests/ui/pattern/usefulness/issue-50900.stderr
@@ -16,6 +16,6 @@ LL ~ Tag::ExifIFDPointer => {},
LL + Tag(Context::Exif, _) => todo!()
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/issue-56379.stderr b/tests/ui/pattern/usefulness/issue-56379.stderr
index 50e13bdfd..ea21ee4e5 100644
--- a/tests/ui/pattern/usefulness/issue-56379.stderr
+++ b/tests/ui/pattern/usefulness/issue-56379.stderr
@@ -22,6 +22,6 @@ LL ~ Foo::C(true) => {},
LL + Foo::A(false) | Foo::B(false) | Foo::C(false) => todo!()
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/issue-72377.stderr b/tests/ui/pattern/usefulness/issue-72377.stderr
index 123dd051d..1eaee1bd3 100644
--- a/tests/ui/pattern/usefulness/issue-72377.stderr
+++ b/tests/ui/pattern/usefulness/issue-72377.stderr
@@ -11,6 +11,6 @@ LL ~ (X::A, Some(X::C)) | (X::C, Some(X::A)) => false,
LL ~ _ => todo!(),
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/issue-78123-non-exhaustive-reference.stderr b/tests/ui/pattern/usefulness/issue-78123-non-exhaustive-reference.stderr
index bf05d616d..2acde8496 100644
--- a/tests/ui/pattern/usefulness/issue-78123-non-exhaustive-reference.stderr
+++ b/tests/ui/pattern/usefulness/issue-78123-non-exhaustive-reference.stderr
@@ -18,6 +18,6 @@ LL + _ => todo!(),
LL + }
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/issue-82772-match-box-as-struct.stderr b/tests/ui/pattern/usefulness/issue-82772-match-box-as-struct.stderr
index 2c8c85bb1..ba7573839 100644
--- a/tests/ui/pattern/usefulness/issue-82772-match-box-as-struct.stderr
+++ b/tests/ui/pattern/usefulness/issue-82772-match-box-as-struct.stderr
@@ -4,6 +4,6 @@ error[E0451]: field `1` of struct `Box` is private
LL | let Box { 1: _, .. }: Box<()>;
| ^^^^ private field
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0451`.
diff --git a/tests/ui/pattern/usefulness/issue-85222-types-containing-non-exhaustive-types.stderr b/tests/ui/pattern/usefulness/issue-85222-types-containing-non-exhaustive-types.stderr
index 556efcda5..c31411018 100644
--- a/tests/ui/pattern/usefulness/issue-85222-types-containing-non-exhaustive-types.stderr
+++ b/tests/ui/pattern/usefulness/issue-85222-types-containing-non-exhaustive-types.stderr
@@ -6,7 +6,6 @@ LL | match 0 {
|
= note: the matched value is of type `usize`
= note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
- = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
LL ~ 1..=usize::MAX => (),
@@ -21,7 +20,6 @@ LL | match (0usize, 0usize) {
|
= note: the matched value is of type `(usize, usize)`
= note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
- = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
LL ~ (1..=usize::MAX, 1..=usize::MAX) => (),
@@ -36,7 +34,6 @@ LL | match (0isize, 0usize) {
|
= note: the matched value is of type `(isize, usize)`
= note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
- = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
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
|
LL ~ (isize::MIN..=isize::MAX, 1..=usize::MAX) => (),
@@ -74,7 +71,6 @@ note: `Option<usize>` defined here
= note: not covered
= note: the matched value is of type `Option<usize>`
= note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
- = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
LL ~ None => (),
@@ -98,7 +94,6 @@ note: `Option<Option<Option<usize>>>` defined here
= note: not covered
= note: the matched value is of type `Option<Option<Option<usize>>>`
= note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
- = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
LL ~ None => (),
@@ -118,7 +113,6 @@ LL | struct A<T> {
| ^
= note: the matched value is of type `A<usize>`
= note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
- = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
LL ~ A { a: 1..=usize::MAX } => (),
@@ -138,7 +132,6 @@ LL | struct B<T, U>(T, U);
| ^
= note: the matched value is of type `B<isize, usize>`
= note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
- = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
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
|
LL ~ B(isize::MIN..=isize::MAX, 1..=usize::MAX) => (),
@@ -158,7 +151,6 @@ LL | struct B<T, U>(T, U);
| ^
= note: the matched value is of type `B<isize, usize>`
= note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
- = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
LL ~ B(_, 1..=usize::MAX) => (),
diff --git a/tests/ui/pattern/usefulness/match-non-exhaustive.stderr b/tests/ui/pattern/usefulness/match-non-exhaustive.stderr
index 4fa3a7292..1a0cc58f3 100644
--- a/tests/ui/pattern/usefulness/match-non-exhaustive.stderr
+++ b/tests/ui/pattern/usefulness/match-non-exhaustive.stderr
@@ -10,18 +10,18 @@ help: ensure that all possible cases are being handled by adding a match arm wit
LL | match 0 { 1 => (), i32::MIN..=0_i32 | 2_i32..=i32::MAX => todo!() }
| ++++++++++++++++++++++++++++++++++++++++++++++++
-error[E0004]: non-exhaustive patterns: `_` not covered
+error[E0004]: non-exhaustive patterns: `i32::MIN..=-1_i32` and `1_i32..=i32::MAX` not covered
--> $DIR/match-non-exhaustive.rs:3:11
|
LL | match 0 { 0 if false => () }
- | ^ pattern `_` not covered
+ | ^ patterns `i32::MIN..=-1_i32` and `1_i32..=i32::MAX` not covered
|
= note: the matched value is of type `i32`
= note: match arms with guards don't count towards exhaustivity
-help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+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
|
-LL | match 0 { 0 if false => (), _ => todo!() }
- | ++++++++++++++
+LL | match 0 { 0 if false => (), i32::MIN..=-1_i32 | 1_i32..=i32::MAX => todo!() }
+ | +++++++++++++++++++++++++++++++++++++++++++++++++
error: aborting due to 2 previous errors
diff --git a/tests/ui/pattern/usefulness/match-privately-empty.stderr b/tests/ui/pattern/usefulness/match-privately-empty.stderr
index 45352f094..d760790df 100644
--- a/tests/ui/pattern/usefulness/match-privately-empty.stderr
+++ b/tests/ui/pattern/usefulness/match-privately-empty.stderr
@@ -16,6 +16,6 @@ LL ~ }) => {},
LL + Some(Private { misc: true, .. }) => todo!()
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/match-ref-ice.stderr b/tests/ui/pattern/usefulness/match-ref-ice.stderr
index fad0940ba..0dbfa776f 100644
--- a/tests/ui/pattern/usefulness/match-ref-ice.stderr
+++ b/tests/ui/pattern/usefulness/match-ref-ice.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pattern/usefulness/match-slice-patterns.stderr b/tests/ui/pattern/usefulness/match-slice-patterns.stderr
index 63d1f38e9..30828ab6c 100644
--- a/tests/ui/pattern/usefulness/match-slice-patterns.stderr
+++ b/tests/ui/pattern/usefulness/match-slice-patterns.stderr
@@ -11,6 +11,6 @@ LL ~ &[.., Some(_), _] => {},
LL ~ &[_, Some(_), .., None, _] => todo!(),
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/nested-non-exhaustive-enums.stderr b/tests/ui/pattern/usefulness/nested-non-exhaustive-enums.stderr
index 9fbd871db..a96644415 100644
--- a/tests/ui/pattern/usefulness/nested-non-exhaustive-enums.stderr
+++ b/tests/ui/pattern/usefulness/nested-non-exhaustive-enums.stderr
@@ -17,6 +17,6 @@ LL ~ None => {},
LL + Some(_) => todo!()
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/refutable-pattern-in-fn-arg.stderr b/tests/ui/pattern/usefulness/refutable-pattern-in-fn-arg.stderr
index 01f077909..bd6c5002e 100644
--- a/tests/ui/pattern/usefulness/refutable-pattern-in-fn-arg.stderr
+++ b/tests/ui/pattern/usefulness/refutable-pattern-in-fn-arg.stderr
@@ -10,6 +10,6 @@ help: alternatively, you could prepend the pattern with an underscore to define
LL | let f = |_3: isize| println!("hello");
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0005`.
diff --git a/tests/ui/pattern/usefulness/slice-patterns-exhaustiveness.rs b/tests/ui/pattern/usefulness/slice-patterns-exhaustiveness.rs
index 46e0da5be..97ded70fc 100644
--- a/tests/ui/pattern/usefulness/slice-patterns-exhaustiveness.rs
+++ b/tests/ui/pattern/usefulness/slice-patterns-exhaustiveness.rs
@@ -44,6 +44,10 @@ fn main() {
[] => {}
}
match s {
+ //~^ ERROR `&[]` and `&[_, ..]` not covered
+ [..] if false => {}
+ }
+ match s {
//~^ ERROR `&[_, _, ..]` not covered
[] => {}
[_] => {}
diff --git a/tests/ui/pattern/usefulness/slice-patterns-exhaustiveness.stderr b/tests/ui/pattern/usefulness/slice-patterns-exhaustiveness.stderr
index fb6ecda3c..a8786d024 100644
--- a/tests/ui/pattern/usefulness/slice-patterns-exhaustiveness.stderr
+++ b/tests/ui/pattern/usefulness/slice-patterns-exhaustiveness.stderr
@@ -89,10 +89,24 @@ LL ~ [] => {},
LL + &[_, ..] => todo!()
|
-error[E0004]: non-exhaustive patterns: `&[_, _, ..]` not covered
+error[E0004]: non-exhaustive patterns: `&[]` and `&[_, ..]` not covered
--> $DIR/slice-patterns-exhaustiveness.rs:46:11
|
LL | match s {
+ | ^ patterns `&[]` and `&[_, ..]` not covered
+ |
+ = note: the matched value is of type `&[bool]`
+ = note: match arms with guards don't count towards exhaustivity
+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
+ |
+LL ~ [..] if false => {},
+LL + &[] | &[_, ..] => todo!()
+ |
+
+error[E0004]: non-exhaustive patterns: `&[_, _, ..]` not covered
+ --> $DIR/slice-patterns-exhaustiveness.rs:50:11
+ |
+LL | match s {
| ^ pattern `&[_, _, ..]` not covered
|
= note: the matched value is of type `&[bool]`
@@ -103,7 +117,7 @@ LL + &[_, _, ..] => todo!()
|
error[E0004]: non-exhaustive patterns: `&[false, ..]` not covered
- --> $DIR/slice-patterns-exhaustiveness.rs:51:11
+ --> $DIR/slice-patterns-exhaustiveness.rs:55:11
|
LL | match s {
| ^ pattern `&[false, ..]` not covered
@@ -116,7 +130,7 @@ LL + &[false, ..] => todo!()
|
error[E0004]: non-exhaustive patterns: `&[false, _, ..]` not covered
- --> $DIR/slice-patterns-exhaustiveness.rs:56:11
+ --> $DIR/slice-patterns-exhaustiveness.rs:60:11
|
LL | match s {
| ^ pattern `&[false, _, ..]` not covered
@@ -129,7 +143,7 @@ LL + &[false, _, ..] => todo!()
|
error[E0004]: non-exhaustive patterns: `&[_, .., false]` not covered
- --> $DIR/slice-patterns-exhaustiveness.rs:62:11
+ --> $DIR/slice-patterns-exhaustiveness.rs:66:11
|
LL | match s {
| ^ pattern `&[_, .., false]` not covered
@@ -142,7 +156,7 @@ LL + &[_, .., false] => todo!()
|
error[E0004]: non-exhaustive patterns: `&[_, _, .., true]` not covered
- --> $DIR/slice-patterns-exhaustiveness.rs:69:11
+ --> $DIR/slice-patterns-exhaustiveness.rs:73:11
|
LL | match s {
| ^ pattern `&[_, _, .., true]` not covered
@@ -155,7 +169,7 @@ LL + &[_, _, .., true] => todo!()
|
error[E0004]: non-exhaustive patterns: `&[true, _, .., _]` not covered
- --> $DIR/slice-patterns-exhaustiveness.rs:76:11
+ --> $DIR/slice-patterns-exhaustiveness.rs:80:11
|
LL | match s {
| ^ pattern `&[true, _, .., _]` not covered
@@ -168,7 +182,7 @@ LL + &[true, _, .., _] => todo!()
|
error[E0004]: non-exhaustive patterns: `&[]` and `&[_, _, ..]` not covered
- --> $DIR/slice-patterns-exhaustiveness.rs:85:11
+ --> $DIR/slice-patterns-exhaustiveness.rs:89:11
|
LL | match s {
| ^ patterns `&[]` and `&[_, _, ..]` not covered
@@ -181,7 +195,7 @@ LL + &[] | &[_, _, ..] => todo!()
|
error[E0004]: non-exhaustive patterns: `&[]` and `&[_, _, ..]` not covered
- --> $DIR/slice-patterns-exhaustiveness.rs:89:11
+ --> $DIR/slice-patterns-exhaustiveness.rs:93:11
|
LL | match s {
| ^ patterns `&[]` and `&[_, _, ..]` not covered
@@ -194,7 +208,7 @@ LL + &[] | &[_, _, ..] => todo!()
|
error[E0004]: non-exhaustive patterns: `&[]` and `&[_, _, ..]` not covered
- --> $DIR/slice-patterns-exhaustiveness.rs:93:11
+ --> $DIR/slice-patterns-exhaustiveness.rs:97:11
|
LL | match s {
| ^ patterns `&[]` and `&[_, _, ..]` not covered
@@ -207,7 +221,7 @@ LL + &[] | &[_, _, ..] => todo!()
|
error[E0004]: non-exhaustive patterns: `&[]` and `&[_, _, ..]` not covered
- --> $DIR/slice-patterns-exhaustiveness.rs:98:11
+ --> $DIR/slice-patterns-exhaustiveness.rs:102:11
|
LL | match s {
| ^ patterns `&[]` and `&[_, _, ..]` not covered
@@ -220,7 +234,7 @@ LL + &[] | &[_, _, ..] => todo!()
|
error[E0004]: non-exhaustive patterns: `&[_, _, ..]` not covered
- --> $DIR/slice-patterns-exhaustiveness.rs:103:11
+ --> $DIR/slice-patterns-exhaustiveness.rs:107:11
|
LL | match s {
| ^ pattern `&[_, _, ..]` not covered
@@ -233,7 +247,7 @@ LL + &[_, _, ..] => todo!()
|
error[E0004]: non-exhaustive patterns: `&[false]` not covered
- --> $DIR/slice-patterns-exhaustiveness.rs:108:11
+ --> $DIR/slice-patterns-exhaustiveness.rs:112:11
|
LL | match s {
| ^ pattern `&[false]` not covered
@@ -246,7 +260,7 @@ LL + &[false] => todo!()
|
error[E0004]: non-exhaustive patterns: `&[false]` not covered
- --> $DIR/slice-patterns-exhaustiveness.rs:121:11
+ --> $DIR/slice-patterns-exhaustiveness.rs:125:11
|
LL | match s1 {
| ^^ pattern `&[false]` not covered
@@ -258,6 +272,6 @@ LL ~ CONST1 => {},
LL + &[false] => todo!()
|
-error: aborting due to 20 previous errors
+error: aborting due to 21 previous errors
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/slice_of_empty.rs b/tests/ui/pattern/usefulness/slice_of_empty.rs
index fe0688711..3cbd0eba5 100644
--- a/tests/ui/pattern/usefulness/slice_of_empty.rs
+++ b/tests/ui/pattern/usefulness/slice_of_empty.rs
@@ -11,12 +11,12 @@ fn foo(nevers: &[!]) {
match nevers {
&[] => (),
- &[_] => (), //~ ERROR unreachable pattern
- &[_, _, ..] => (), //~ ERROR unreachable pattern
+ &[_] => (),
+ &[_, _, ..] => (),
};
match nevers {
//~^ ERROR non-exhaustive patterns: `&[]` not covered
- &[_] => (), //~ ERROR unreachable pattern
+ &[_] => (),
};
}
diff --git a/tests/ui/pattern/usefulness/slice_of_empty.stderr b/tests/ui/pattern/usefulness/slice_of_empty.stderr
index 07bb6b3a6..d56360d4c 100644
--- a/tests/ui/pattern/usefulness/slice_of_empty.stderr
+++ b/tests/ui/pattern/usefulness/slice_of_empty.stderr
@@ -1,27 +1,3 @@
-error: unreachable pattern
- --> $DIR/slice_of_empty.rs:14:9
- |
-LL | &[_] => (),
- | ^^^^
- |
-note: the lint level is defined here
- --> $DIR/slice_of_empty.rs:3:9
- |
-LL | #![deny(unreachable_patterns)]
- | ^^^^^^^^^^^^^^^^^^^^
-
-error: unreachable pattern
- --> $DIR/slice_of_empty.rs:15:9
- |
-LL | &[_, _, ..] => (),
- | ^^^^^^^^^^^
-
-error: unreachable pattern
- --> $DIR/slice_of_empty.rs:20:9
- |
-LL | &[_] => (),
- | ^^^^
-
error[E0004]: non-exhaustive patterns: `&[]` not covered
--> $DIR/slice_of_empty.rs:18:11
|
@@ -31,9 +7,10 @@ LL | match nevers {
= note: the matched value is of type `&[!]`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
-LL | &[_] => (), &[] => todo!(),
- | ++++++++++++++++
+LL ~ &[_] => (),
+LL ~ &[] => todo!(),
+ |
-error: aborting due to 4 previous errors
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/struct-like-enum-nonexhaustive.stderr b/tests/ui/pattern/usefulness/struct-like-enum-nonexhaustive.stderr
index 3d2b540a9..17d937bd5 100644
--- a/tests/ui/pattern/usefulness/struct-like-enum-nonexhaustive.stderr
+++ b/tests/ui/pattern/usefulness/struct-like-enum-nonexhaustive.stderr
@@ -18,6 +18,6 @@ LL ~ A::B { x: None } => {},
LL + A::B { x: Some(_) } => todo!()
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/struct-pattern-match-useless.stderr b/tests/ui/pattern/usefulness/struct-pattern-match-useless.stderr
index fbee33de6..cc29c42e4 100644
--- a/tests/ui/pattern/usefulness/struct-pattern-match-useless.stderr
+++ b/tests/ui/pattern/usefulness/struct-pattern-match-useless.stderr
@@ -12,5 +12,5 @@ note: the lint level is defined here
LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pattern/usefulness/tuple-struct-nonexhaustive.stderr b/tests/ui/pattern/usefulness/tuple-struct-nonexhaustive.stderr
index ef707ed4a..0b21bd3f5 100644
--- a/tests/ui/pattern/usefulness/tuple-struct-nonexhaustive.stderr
+++ b/tests/ui/pattern/usefulness/tuple-struct-nonexhaustive.stderr
@@ -16,6 +16,6 @@ LL ~ Foo(2, b) => println!("{}", b),
LL + Foo(..=0_isize, _) | Foo(3_isize.., _) => todo!()
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pattern/usefulness/unstable-gated-patterns.stderr b/tests/ui/pattern/usefulness/unstable-gated-patterns.stderr
index 4a4945156..5f3e5a739 100644
--- a/tests/ui/pattern/usefulness/unstable-gated-patterns.stderr
+++ b/tests/ui/pattern/usefulness/unstable-gated-patterns.stderr
@@ -19,6 +19,6 @@ LL ~ UnstableEnum::Stable2 => {},
LL + UnstableEnum::Unstable => todo!()
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/pin-macro/cant_access_internals.stderr b/tests/ui/pin-macro/cant_access_internals.stderr
index d43027657..9af1cd2a1 100644
--- a/tests/ui/pin-macro/cant_access_internals.stderr
+++ b/tests/ui/pin-macro/cant_access_internals.stderr
@@ -6,6 +6,6 @@ LL | mem::take(phantom_pinned.pointer);
|
= help: add `#![feature(unsafe_pin_internals)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/point-to-type-err-cause-on-impl-trait-return-2.stderr b/tests/ui/point-to-type-err-cause-on-impl-trait-return-2.stderr
index a8d0d6236..34aaea5b7 100644
--- a/tests/ui/point-to-type-err-cause-on-impl-trait-return-2.stderr
+++ b/tests/ui/point-to-type-err-cause-on-impl-trait-return-2.stderr
@@ -7,6 +7,6 @@ LL | let value: &bool = unsafe { &42 };
= note: expected reference `&bool`
found reference `&{integer}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/polymorphization/const_parameters/functions.stderr b/tests/ui/polymorphization/const_parameters/functions.stderr
index 9d0922ac7..a3033d1dc 100644
--- a/tests/ui/polymorphization/const_parameters/functions.stderr
+++ b/tests/ui/polymorphization/const_parameters/functions.stderr
@@ -13,5 +13,5 @@ error: item has unused generic parameters
LL | pub fn unused<const T: usize>() {
| ^^^^^^ -------------- generic parameter `T` is unused
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/polymorphization/promoted-function-1.stderr b/tests/ui/polymorphization/promoted-function-1.stderr
index fcbb86949..8ab0320aa 100644
--- a/tests/ui/polymorphization/promoted-function-1.stderr
+++ b/tests/ui/polymorphization/promoted-function-1.stderr
@@ -4,5 +4,5 @@ error: item has unused generic parameters
LL | pub fn test<T>() {
| ^^^^ - generic parameter `T` is unused
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/polymorphization/promoted-function-2.stderr b/tests/ui/polymorphization/promoted-function-2.stderr
index 547569df7..a5d3bee11 100644
--- a/tests/ui/polymorphization/promoted-function-2.stderr
+++ b/tests/ui/polymorphization/promoted-function-2.stderr
@@ -13,5 +13,5 @@ error: item has unused generic parameters
LL | fn test<T>() {
| ^^^^ - generic parameter `T` is unused
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/print_type_sizes/coroutine_discr_placement.stdout b/tests/ui/print_type_sizes/coroutine_discr_placement.stdout
index f34a8e9a7..71a7f3c63 100644
--- a/tests/ui/print_type_sizes/coroutine_discr_placement.stdout
+++ b/tests/ui/print_type_sizes/coroutine_discr_placement.stdout
@@ -9,3 +9,9 @@ print-type-size padding: 3 bytes
print-type-size local `.z`: 4 bytes, alignment: 4 bytes
print-type-size variant `Returned`: 0 bytes
print-type-size variant `Panicked`: 0 bytes
+print-type-size type: `std::mem::ManuallyDrop<i32>`: 4 bytes, alignment: 4 bytes
+print-type-size field `.value`: 4 bytes
+print-type-size type: `std::mem::MaybeUninit<i32>`: 4 bytes, alignment: 4 bytes
+print-type-size variant `MaybeUninit`: 4 bytes
+print-type-size field `.uninit`: 0 bytes
+print-type-size field `.value`: 4 bytes
diff --git a/tests/ui/print_type_sizes/niche-filling.rs b/tests/ui/print_type_sizes/niche-filling.rs
index 5e620f248..5ee5085dd 100644
--- a/tests/ui/print_type_sizes/niche-filling.rs
+++ b/tests/ui/print_type_sizes/niche-filling.rs
@@ -1,4 +1,5 @@
// compile-flags: -Z print-type-sizes --crate-type=lib
+// ignore-debug debug assertions will print more types
// build-pass
// ignore-pass
// ^-- needed because `--pass check` does not emit the output needed.
diff --git a/tests/ui/privacy/auxiliary/issue-117997.rs b/tests/ui/privacy/auxiliary/issue-117997.rs
new file mode 100644
index 000000000..6f71cc2ba
--- /dev/null
+++ b/tests/ui/privacy/auxiliary/issue-117997.rs
@@ -0,0 +1,35 @@
+// no-prefer-dynamic
+// compile-flags: --crate-type=rlib
+
+pub use impl_mod::TraitImplementer as Implementer;
+
+pub use trait_mod::get_assoc;
+
+mod impl_mod {
+ use crate::trait_mod::TraitWithAssocType;
+
+ pub struct TraitImplementer {}
+ pub struct AssociatedType {}
+
+ impl AssociatedType {
+ pub fn method_on_assoc(&self) -> i32 {
+ todo!()
+ }
+ }
+
+ impl TraitWithAssocType for TraitImplementer {
+ type AssocType = AssociatedType;
+ }
+}
+
+mod trait_mod {
+ use crate::Implementer;
+
+ pub fn get_assoc() -> <Implementer as TraitWithAssocType>::AssocType {
+ todo!()
+ }
+
+ pub trait TraitWithAssocType {
+ type AssocType;
+ }
+}
diff --git a/tests/ui/privacy/decl-macro.stderr b/tests/ui/privacy/decl-macro.stderr
index 5bc6f07ff..1ca75ec36 100644
--- a/tests/ui/privacy/decl-macro.stderr
+++ b/tests/ui/privacy/decl-macro.stderr
@@ -10,6 +10,6 @@ note: the macro `mac` is defined here
LL | macro mac() {}
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/privacy/export-tag-variant.stderr b/tests/ui/privacy/export-tag-variant.stderr
index e8906985e..778ded2df 100644
--- a/tests/ui/privacy/export-tag-variant.stderr
+++ b/tests/ui/privacy/export-tag-variant.stderr
@@ -12,6 +12,6 @@ note: the enum `Y` is defined here
LL | enum Y { Y1 }
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/privacy/import-list-stem-visibility-issue-119126.rs b/tests/ui/privacy/import-list-stem-visibility-issue-119126.rs
new file mode 100644
index 000000000..21f7828fc
--- /dev/null
+++ b/tests/ui/privacy/import-list-stem-visibility-issue-119126.rs
@@ -0,0 +1,14 @@
+// check-pass
+// edition: 2018
+
+mod outer {
+ mod inner {
+ pub mod inner2 {}
+ }
+ pub(crate) use inner::{};
+ pub(crate) use inner::{{}};
+ pub(crate) use inner::{inner2::{}};
+ pub(crate) use inner::{inner2::{{}}};
+}
+
+fn main() {}
diff --git a/tests/ui/privacy/issue-111220-2-tuple-struct-fields-projection.stderr b/tests/ui/privacy/issue-111220-2-tuple-struct-fields-projection.stderr
index 231a4da8b..eda42c24c 100644
--- a/tests/ui/privacy/issue-111220-2-tuple-struct-fields-projection.stderr
+++ b/tests/ui/privacy/issue-111220-2-tuple-struct-fields-projection.stderr
@@ -4,6 +4,6 @@ error[E0603]: tuple struct constructor `A` is private
LL | let Self(a) = self;
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/privacy/issue-117997.rs b/tests/ui/privacy/issue-117997.rs
new file mode 100644
index 000000000..d8284ef29
--- /dev/null
+++ b/tests/ui/privacy/issue-117997.rs
@@ -0,0 +1,8 @@
+// aux-build:issue-117997.rs
+// build-pass
+
+extern crate issue_117997;
+
+pub fn main() {
+ issue_117997::get_assoc().method_on_assoc();
+}
diff --git a/tests/ui/privacy/issue-46209-private-enum-variant-reexport.stderr b/tests/ui/privacy/issue-46209-private-enum-variant-reexport.stderr
index df5968ba3..93a39edbb 100644
--- a/tests/ui/privacy/issue-46209-private-enum-variant-reexport.stderr
+++ b/tests/ui/privacy/issue-46209-private-enum-variant-reexport.stderr
@@ -22,12 +22,18 @@ note: consider marking `Full` as `pub` in the imported module
LL | pub use self::Lieutenant::{JuniorGrade, Full};
| ^^^^
-error: glob import doesn't reexport anything because no candidate is public enough
+error: glob import doesn't reexport anything with visibility `pub` because no imported item is public enough
--> $DIR/issue-46209-private-enum-variant-reexport.rs:3:13
|
LL | pub use self::Professor::*;
| ^^^^^^^^^^^^^^^^^^
|
+note: the most public imported item is `pub(self)`
+ --> $DIR/issue-46209-private-enum-variant-reexport.rs:3:13
+ |
+LL | pub use self::Professor::*;
+ | ^^^^^^^^^^^^^^^^^^
+ = help: reduce the glob import's visibility or increase visibility of imported items
note: the lint level is defined here
--> $DIR/issue-46209-private-enum-variant-reexport.rs:1:8
|
@@ -46,11 +52,18 @@ error: unused imports: `Full`, `JuniorGrade`
LL | pub use self::Lieutenant::{JuniorGrade, Full};
| ^^^^^^^^^^^ ^^^^
-error: glob import doesn't reexport anything because no candidate is public enough
+error: glob import doesn't reexport anything with visibility `pub` because no imported item is public enough
+ --> $DIR/issue-46209-private-enum-variant-reexport.rs:10:13
+ |
+LL | pub use self::PettyOfficer::*;
+ | ^^^^^^^^^^^^^^^^^^^^^
+ |
+note: the most public imported item is `pub(self)`
--> $DIR/issue-46209-private-enum-variant-reexport.rs:10:13
|
LL | pub use self::PettyOfficer::*;
| ^^^^^^^^^^^^^^^^^^^^^
+ = help: reduce the glob import's visibility or increase visibility of imported items
error: unused import: `self::PettyOfficer::*`
--> $DIR/issue-46209-private-enum-variant-reexport.rs:10:13
@@ -58,11 +71,18 @@ error: unused import: `self::PettyOfficer::*`
LL | pub use self::PettyOfficer::*;
| ^^^^^^^^^^^^^^^^^^^^^
-error: glob import doesn't reexport anything because no candidate is public enough
+error: glob import doesn't reexport anything with visibility `pub` because no imported item is public enough
+ --> $DIR/issue-46209-private-enum-variant-reexport.rs:13:13
+ |
+LL | pub use self::Crewman::*;
+ | ^^^^^^^^^^^^^^^^
+ |
+note: the most public imported item is `pub(crate)`
--> $DIR/issue-46209-private-enum-variant-reexport.rs:13:13
|
LL | pub use self::Crewman::*;
| ^^^^^^^^^^^^^^^^
+ = help: reduce the glob import's visibility or increase visibility of imported items
error: unused import: `self::Crewman::*`
--> $DIR/issue-46209-private-enum-variant-reexport.rs:13:13
diff --git a/tests/ui/privacy/issue-75062-fieldless-tuple-struct.stderr b/tests/ui/privacy/issue-75062-fieldless-tuple-struct.stderr
index 14a12003e..b00e566f8 100644
--- a/tests/ui/privacy/issue-75062-fieldless-tuple-struct.stderr
+++ b/tests/ui/privacy/issue-75062-fieldless-tuple-struct.stderr
@@ -10,6 +10,6 @@ note: the tuple struct `Bar` is defined here
LL | struct Bar();
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/privacy/issue-75906.stderr b/tests/ui/privacy/issue-75906.stderr
index 600dc7c87..c5bbef97c 100644
--- a/tests/ui/privacy/issue-75906.stderr
+++ b/tests/ui/privacy/issue-75906.stderr
@@ -14,6 +14,6 @@ help: consider making the field publicly accessible
LL | pub struct Bar(pub u8);
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0423`.
diff --git a/tests/ui/privacy/issue-79593.stderr b/tests/ui/privacy/issue-79593.stderr
index 21ba760ad..5bb69836f 100644
--- a/tests/ui/privacy/issue-79593.stderr
+++ b/tests/ui/privacy/issue-79593.stderr
@@ -16,7 +16,7 @@ error: cannot construct `Pub` with struct literal syntax due to private fields
LL | foo::Pub {};
| ^^^^^^^^
|
- = note: ... and other private field `private` that was not provided
+ = note: private field `private` that was not provided
error[E0063]: missing field `y` in initializer of `Enum`
--> $DIR/issue-79593.rs:23:5
diff --git a/tests/ui/privacy/legacy-ctor-visibility.stderr b/tests/ui/privacy/legacy-ctor-visibility.stderr
index c8057d85e..78c79fc95 100644
--- a/tests/ui/privacy/legacy-ctor-visibility.stderr
+++ b/tests/ui/privacy/legacy-ctor-visibility.stderr
@@ -4,6 +4,6 @@ error[E0423]: expected function, tuple struct or tuple variant, found struct `S`
LL | S(10);
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0423`.
diff --git a/tests/ui/privacy/privacy-ufcs.stderr b/tests/ui/privacy/privacy-ufcs.stderr
index f45f3d8ec..5c986895d 100644
--- a/tests/ui/privacy/privacy-ufcs.stderr
+++ b/tests/ui/privacy/privacy-ufcs.stderr
@@ -12,6 +12,6 @@ note: the trait `Bar` is defined here
LL | trait Bar {
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/privacy/privacy2.stderr b/tests/ui/privacy/privacy2.stderr
index e7135d3fd..46bb9823d 100644
--- a/tests/ui/privacy/privacy2.stderr
+++ b/tests/ui/privacy/privacy2.stderr
@@ -19,7 +19,7 @@ note: ...and refers to the function `foo` which is defined here
--> $DIR/privacy2.rs:16:1
|
LL | pub fn foo() {}
- | ^^^^^^^^^^^^ consider importing it directly
+ | ^^^^^^^^^^^^ you could import this directly
error: requires `sized` lang_item
diff --git a/tests/ui/privacy/privacy4.stderr b/tests/ui/privacy/privacy4.stderr
index 7552fa71a..4aa3ae964 100644
--- a/tests/ui/privacy/privacy4.stderr
+++ b/tests/ui/privacy/privacy4.stderr
@@ -10,6 +10,6 @@ note: the module `glob` is defined here
LL | mod glob {
| ^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/privacy/private-field-ty-err.stderr b/tests/ui/privacy/private-field-ty-err.stderr
index 98ba7856e..17d50f24a 100644
--- a/tests/ui/privacy/private-field-ty-err.stderr
+++ b/tests/ui/privacy/private-field-ty-err.stderr
@@ -4,6 +4,6 @@ error[E0616]: field `len` of struct `Foo` is private
LL | if x.len {
| ^^^ private field
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0616`.
diff --git a/tests/ui/privacy/private-impl-method.stderr b/tests/ui/privacy/private-impl-method.stderr
index 18e4531d1..c53232e4c 100644
--- a/tests/ui/privacy/private-impl-method.stderr
+++ b/tests/ui/privacy/private-impl-method.stderr
@@ -7,6 +7,6 @@ LL | fn foo(&self) {}
LL | s.foo();
| ^^^ private method
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0624`.
diff --git a/tests/ui/privacy/private-in-public-non-principal-2.stderr b/tests/ui/privacy/private-in-public-non-principal-2.stderr
index 7cc8bf0de..d3da2326a 100644
--- a/tests/ui/privacy/private-in-public-non-principal-2.stderr
+++ b/tests/ui/privacy/private-in-public-non-principal-2.stderr
@@ -4,5 +4,5 @@ error: trait `PrivNonPrincipal` is private
LL | m::leak_dyn_nonprincipal();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ private trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/privacy/private-in-public-non-principal.stderr b/tests/ui/privacy/private-in-public-non-principal.stderr
index 63512f462..73f2249bc 100644
--- a/tests/ui/privacy/private-in-public-non-principal.stderr
+++ b/tests/ui/privacy/private-in-public-non-principal.stderr
@@ -23,5 +23,5 @@ note: the lint level is defined here
LL | #[deny(missing_docs)]
| ^^^^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/privacy/private-in-public.rs b/tests/ui/privacy/private-in-public.rs
index 3fff2d517..7b8e0fbe6 100644
--- a/tests/ui/privacy/private-in-public.rs
+++ b/tests/ui/privacy/private-in-public.rs
@@ -106,6 +106,7 @@ mod aliases_pub {
pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
//~^ WARNING type `aliases_pub::Priv` is more private than the item `aliases_pub::f3`
//~| WARNING associated type `aliases_pub::PrivTr::Assoc` is more private than the item `aliases_pub::f3`
+ //~^^^ WARNING trait `aliases_pub::PrivTr` is more private than the item `aliases_pub::f3`
impl PrivUseAlias {
pub fn f(arg: Priv) {}
@@ -135,6 +136,7 @@ mod aliases_priv {
pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
//~^ WARNING type `aliases_priv::Priv` is more private than the item `aliases_priv::f3`
//~| WARNING associated type `aliases_priv::PrivTr::Assoc` is more private than the item `aliases_priv::f3`
+ //~^^^ WARNING trait `aliases_priv::PrivTr` is more private than the item `aliases_priv::f3`
}
mod aliases_params {
diff --git a/tests/ui/privacy/private-in-public.stderr b/tests/ui/privacy/private-in-public.stderr
index 49cc2e19b..ff3061337 100644
--- a/tests/ui/privacy/private-in-public.stderr
+++ b/tests/ui/privacy/private-in-public.stderr
@@ -288,6 +288,18 @@ note: but associated type `aliases_pub::PrivTr::Assoc` is only usable at visibil
LL | type Assoc = m::Pub3;
| ^^^^^^^^^^
+warning: trait `aliases_pub::PrivTr` is more private than the item `aliases_pub::f3`
+ --> $DIR/private-in-public.rs:106:5
+ |
+LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_pub::f3` is reachable at visibility `pub(crate)`
+ |
+note: but trait `aliases_pub::PrivTr` is only usable at visibility `pub(self)`
+ --> $DIR/private-in-public.rs:100:5
+ |
+LL | trait PrivTr {
+ | ^^^^^^^^^^^^
+
warning: type `aliases_pub::Priv` is more private than the item `aliases_pub::f3`
--> $DIR/private-in-public.rs:106:5
|
@@ -301,76 +313,88 @@ LL | struct Priv;
| ^^^^^^^^^^^
warning: type `Priv1` is more private than the item `aliases_priv::f1`
- --> $DIR/private-in-public.rs:133:5
+ --> $DIR/private-in-public.rs:134:5
|
LL | pub fn f1(arg: PrivUseAlias) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_priv::f1` is reachable at visibility `pub(crate)`
|
note: but type `Priv1` is only usable at visibility `pub(self)`
- --> $DIR/private-in-public.rs:118:5
+ --> $DIR/private-in-public.rs:119:5
|
LL | struct Priv1;
| ^^^^^^^^^^^^
warning: type `Priv2` is more private than the item `aliases_priv::f2`
- --> $DIR/private-in-public.rs:134:5
+ --> $DIR/private-in-public.rs:135:5
|
LL | pub fn f2(arg: PrivAlias) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_priv::f2` is reachable at visibility `pub(crate)`
|
note: but type `Priv2` is only usable at visibility `pub(self)`
- --> $DIR/private-in-public.rs:119:5
+ --> $DIR/private-in-public.rs:120:5
|
LL | struct Priv2;
| ^^^^^^^^^^^^
warning: associated type `aliases_priv::PrivTr::Assoc` is more private than the item `aliases_priv::f3`
- --> $DIR/private-in-public.rs:135:5
+ --> $DIR/private-in-public.rs:136:5
|
LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_priv::f3` is reachable at visibility `pub(crate)`
|
note: but associated type `aliases_priv::PrivTr::Assoc` is only usable at visibility `pub(self)`
- --> $DIR/private-in-public.rs:129:9
+ --> $DIR/private-in-public.rs:130:9
|
LL | type Assoc = Priv3;
| ^^^^^^^^^^
+warning: trait `aliases_priv::PrivTr` is more private than the item `aliases_priv::f3`
+ --> $DIR/private-in-public.rs:136:5
+ |
+LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_priv::f3` is reachable at visibility `pub(crate)`
+ |
+note: but trait `aliases_priv::PrivTr` is only usable at visibility `pub(self)`
+ --> $DIR/private-in-public.rs:129:5
+ |
+LL | trait PrivTr {
+ | ^^^^^^^^^^^^
+
warning: type `aliases_priv::Priv` is more private than the item `aliases_priv::f3`
- --> $DIR/private-in-public.rs:135:5
+ --> $DIR/private-in-public.rs:136:5
|
LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_priv::f3` is reachable at visibility `pub(crate)`
|
note: but type `aliases_priv::Priv` is only usable at visibility `pub(self)`
- --> $DIR/private-in-public.rs:116:5
+ --> $DIR/private-in-public.rs:117:5
|
LL | struct Priv;
| ^^^^^^^^^^^
warning: type `aliases_params::Priv` is more private than the item `aliases_params::f2`
- --> $DIR/private-in-public.rs:145:5
+ --> $DIR/private-in-public.rs:147:5
|
LL | pub fn f2(arg: PrivAliasGeneric) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_params::f2` is reachable at visibility `pub(crate)`
|
note: but type `aliases_params::Priv` is only usable at visibility `pub(self)`
- --> $DIR/private-in-public.rs:141:5
+ --> $DIR/private-in-public.rs:143:5
|
LL | struct Priv;
| ^^^^^^^^^^^
warning: type `aliases_params::Priv` is more private than the item `aliases_params::f3`
- --> $DIR/private-in-public.rs:147:5
+ --> $DIR/private-in-public.rs:149:5
|
LL | pub fn f3(arg: Result<u8>) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_params::f3` is reachable at visibility `pub(crate)`
|
note: but type `aliases_params::Priv` is only usable at visibility `pub(self)`
- --> $DIR/private-in-public.rs:141:5
+ --> $DIR/private-in-public.rs:143:5
|
LL | struct Priv;
| ^^^^^^^^^^^
-warning: 31 warnings emitted
+warning: 33 warnings emitted
diff --git a/tests/ui/privacy/private-item-simple.stderr b/tests/ui/privacy/private-item-simple.stderr
index e3d90150e..330d892e9 100644
--- a/tests/ui/privacy/private-item-simple.stderr
+++ b/tests/ui/privacy/private-item-simple.stderr
@@ -10,6 +10,6 @@ note: the function `f` is defined here
LL | fn f() {}
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/privacy/private-method-cross-crate.stderr b/tests/ui/privacy/private-method-cross-crate.stderr
index e644440c8..9c524e2bd 100644
--- a/tests/ui/privacy/private-method-cross-crate.stderr
+++ b/tests/ui/privacy/private-method-cross-crate.stderr
@@ -9,6 +9,6 @@ LL | nyan.nap();
LL | fn nap(&self) {}
| ------------- private method defined here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0624`.
diff --git a/tests/ui/privacy/private-method-inherited.stderr b/tests/ui/privacy/private-method-inherited.stderr
index 0104a1b27..dd36afe8b 100644
--- a/tests/ui/privacy/private-method-inherited.stderr
+++ b/tests/ui/privacy/private-method-inherited.stderr
@@ -7,6 +7,6 @@ LL | fn f(self) {}
LL | x.f();
| ^ private method
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0624`.
diff --git a/tests/ui/privacy/private-method.stderr b/tests/ui/privacy/private-method.stderr
index 42fec7622..076a149e1 100644
--- a/tests/ui/privacy/private-method.stderr
+++ b/tests/ui/privacy/private-method.stderr
@@ -7,6 +7,6 @@ LL | fn nap(&self) {}
LL | nyan.nap();
| ^^^ private method
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0624`.
diff --git a/tests/ui/privacy/private-struct-field-cross-crate.stderr b/tests/ui/privacy/private-struct-field-cross-crate.stderr
index 40cf3448d..ed4c83f15 100644
--- a/tests/ui/privacy/private-struct-field-cross-crate.stderr
+++ b/tests/ui/privacy/private-struct-field-cross-crate.stderr
@@ -4,6 +4,6 @@ error[E0616]: field `meows` of struct `cat` is private
LL | assert_eq!(nyan.meows, 52);
| ^^^^^ private field
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0616`.
diff --git a/tests/ui/privacy/private-struct-field-ctor.stderr b/tests/ui/privacy/private-struct-field-ctor.stderr
index 9dc9db0ea..2a3553723 100644
--- a/tests/ui/privacy/private-struct-field-ctor.stderr
+++ b/tests/ui/privacy/private-struct-field-ctor.stderr
@@ -4,6 +4,6 @@ error[E0451]: field `x` of struct `Foo` is private
LL | let s = a::Foo { x: 1 };
| ^^^^ private field
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0451`.
diff --git a/tests/ui/privacy/private-struct-field-pattern.stderr b/tests/ui/privacy/private-struct-field-pattern.stderr
index 630553036..de24d1e09 100644
--- a/tests/ui/privacy/private-struct-field-pattern.stderr
+++ b/tests/ui/privacy/private-struct-field-pattern.stderr
@@ -4,6 +4,6 @@ error[E0451]: field `x` of struct `Foo` is private
LL | Foo { x: _ } => {}
| ^^^^ private field
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0451`.
diff --git a/tests/ui/privacy/private-struct-field.stderr b/tests/ui/privacy/private-struct-field.stderr
index facf4e82f..cc5a966bc 100644
--- a/tests/ui/privacy/private-struct-field.stderr
+++ b/tests/ui/privacy/private-struct-field.stderr
@@ -4,6 +4,6 @@ error[E0616]: field `meows` of struct `Cat` is private
LL | assert_eq!(nyan.meows, 52);
| ^^^^^ private field
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0616`.
diff --git a/tests/ui/privacy/private-variant-reexport.stderr b/tests/ui/privacy/private-variant-reexport.stderr
index 2f041934a..d73bd1a8c 100644
--- a/tests/ui/privacy/private-variant-reexport.stderr
+++ b/tests/ui/privacy/private-variant-reexport.stderr
@@ -30,12 +30,18 @@ LL | pub use ::E::V::{self};
|
= note: consider declaring type or module `V` with `pub`
-error: glob import doesn't reexport anything because no candidate is public enough
+error: glob import doesn't reexport anything with visibility `pub` because no imported item is public enough
--> $DIR/private-variant-reexport.rs:15:13
|
LL | pub use ::E::*;
| ^^^^^^
|
+note: the most public imported item is `pub(crate)`
+ --> $DIR/private-variant-reexport.rs:15:13
+ |
+LL | pub use ::E::*;
+ | ^^^^^^
+ = help: reduce the glob import's visibility or increase visibility of imported items
note: the lint level is defined here
--> $DIR/private-variant-reexport.rs:13:8
|
diff --git a/tests/ui/privacy/restricted/struct-literal-field.stderr b/tests/ui/privacy/restricted/struct-literal-field.stderr
index eee964f02..dcdadf1da 100644
--- a/tests/ui/privacy/restricted/struct-literal-field.stderr
+++ b/tests/ui/privacy/restricted/struct-literal-field.stderr
@@ -4,6 +4,6 @@ error[E0451]: field `x` of struct `S` is private
LL | S { x: 0 };
| ^^^^ private field
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0451`.
diff --git a/tests/ui/privacy/sealed-traits/private-trait-non-local.stderr b/tests/ui/privacy/sealed-traits/private-trait-non-local.stderr
index 294999798..e6b76322f 100644
--- a/tests/ui/privacy/sealed-traits/private-trait-non-local.stderr
+++ b/tests/ui/privacy/sealed-traits/private-trait-non-local.stderr
@@ -7,6 +7,6 @@ LL | use core::slice::index::private_slice_index::Sealed;
note: the module `index` is defined here
--> $SRC_DIR/core/src/slice/mod.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/privacy/sealed-traits/private-trait.stderr b/tests/ui/privacy/sealed-traits/private-trait.stderr
index c7ec72ff1..e8d88906f 100644
--- a/tests/ui/privacy/sealed-traits/private-trait.stderr
+++ b/tests/ui/privacy/sealed-traits/private-trait.stderr
@@ -12,6 +12,6 @@ note: the module `b` is defined here
LL | mod b {
| ^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/privacy/sealed-traits/re-exported-trait.stderr b/tests/ui/privacy/sealed-traits/re-exported-trait.stderr
index b630565d0..9f2291e68 100644
--- a/tests/ui/privacy/sealed-traits/re-exported-trait.stderr
+++ b/tests/ui/privacy/sealed-traits/re-exported-trait.stderr
@@ -14,6 +14,6 @@ help: consider importing this trait through its public re-export instead
LL | impl a::Trait for S {}
| ~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/privacy/suggest-box-new.fixed b/tests/ui/privacy/suggest-box-new.fixed
deleted file mode 100644
index f5ae5c2ab..000000000
--- a/tests/ui/privacy/suggest-box-new.fixed
+++ /dev/null
@@ -1,15 +0,0 @@
-// run-rustfix
-#![allow(dead_code)]
-struct U <T> {
- wtf: Option<Box<U<T>>>,
- x: T,
-}
-fn main() {
- U {
- wtf: Some(Box::new(U { //~ ERROR cannot initialize a tuple struct which contains private fields
- wtf: None,
- x: (),
- })),
- x: ()
- };
-}
diff --git a/tests/ui/privacy/suggest-box-new.rs b/tests/ui/privacy/suggest-box-new.rs
index 2e18dba8b..7125285fc 100644
--- a/tests/ui/privacy/suggest-box-new.rs
+++ b/tests/ui/privacy/suggest-box-new.rs
@@ -1,4 +1,3 @@
-// run-rustfix
#![allow(dead_code)]
struct U <T> {
wtf: Option<Box<U<T>>>,
@@ -12,4 +11,9 @@ fn main() {
})),
x: ()
};
+ let _ = std::collections::HashMap();
+ //~^ ERROR expected function, tuple struct or tuple variant, found struct `std::collections::HashMap`
+ let _ = std::collections::HashMap {};
+ //~^ ERROR cannot construct `HashMap<_, _, _>` with struct literal syntax due to private fields
+ let _ = Box {}; //~ ERROR cannot construct `Box<_, _>` with struct literal syntax due to private fields
}
diff --git a/tests/ui/privacy/suggest-box-new.stderr b/tests/ui/privacy/suggest-box-new.stderr
index ed7fa0364..8b01e8c3c 100644
--- a/tests/ui/privacy/suggest-box-new.stderr
+++ b/tests/ui/privacy/suggest-box-new.stderr
@@ -1,5 +1,29 @@
+error[E0423]: expected function, tuple struct or tuple variant, found struct `std::collections::HashMap`
+ --> $DIR/suggest-box-new.rs:14:13
+ |
+LL | let _ = std::collections::HashMap();
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
+ |
+ = note: `std::collections::HashMap` defined here
+ |
+help: you might have meant to use an associated function to build this type
+ |
+LL | let _ = std::collections::HashMap::new();
+ | ~~~~~~~
+LL | let _ = std::collections::HashMap::with_capacity(_);
+ | ~~~~~~~~~~~~~~~~~~
+LL | let _ = std::collections::HashMap::with_hasher(_);
+ | ~~~~~~~~~~~~~~~~
+LL | let _ = std::collections::HashMap::with_capacity_and_hasher(_, _);
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+help: consider using the `Default` trait
+ |
+LL | let _ = <std::collections::HashMap as std::default::Default>::default();
+ | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
error[E0423]: cannot initialize a tuple struct which contains private fields
- --> $DIR/suggest-box-new.rs:9:19
+ --> $DIR/suggest-box-new.rs:8:19
|
LL | wtf: Some(Box(U {
| ^^^
@@ -10,11 +34,67 @@ note: constructor is not visible here due to private fields
= note: private field
|
= note: private field
-help: you might have meant to use the `new` associated function
+help: you might have meant to use an associated function to build this type
+ |
+LL | wtf: Some(Box::new(_)),
+ | ~~~~~~~~
+LL | wtf: Some(Box::new_uninit()),
+ | ~~~~~~~~~~~~~~
+LL | wtf: Some(Box::new_zeroed()),
+ | ~~~~~~~~~~~~~~
+LL | wtf: Some(Box::new_in(_, _)),
+ | ~~~~~~~~~~~~~~
+ and 10 other candidates
+help: consider using the `Default` trait
+ |
+LL | wtf: Some(<Box as std::default::Default>::default()),
+ | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+error: cannot construct `HashMap<_, _, _>` with struct literal syntax due to private fields
+ --> $DIR/suggest-box-new.rs:16:13
+ |
+LL | let _ = std::collections::HashMap {};
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: private field `base` that was not provided
+help: you might have meant to use an associated function to build this type
+ |
+LL | let _ = std::collections::HashMap::new();
+ | ~~~~~~~
+LL | let _ = std::collections::HashMap::with_capacity(_);
+ | ~~~~~~~~~~~~~~~~~~
+LL | let _ = std::collections::HashMap::with_hasher(_);
+ | ~~~~~~~~~~~~~~~~
+LL | let _ = std::collections::HashMap::with_capacity_and_hasher(_, _);
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+help: consider using the `Default` trait
+ |
+LL | let _ = <std::collections::HashMap as std::default::Default>::default();
+ | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+error: cannot construct `Box<_, _>` with struct literal syntax due to private fields
+ --> $DIR/suggest-box-new.rs:18:13
+ |
+LL | let _ = Box {};
+ | ^^^
+ |
+ = note: private fields `0` and `1` that were not provided
+help: you might have meant to use an associated function to build this type
+ |
+LL | let _ = Box::new(_);
+ | ~~~~~~~~
+LL | let _ = Box::new_uninit();
+ | ~~~~~~~~~~~~~~
+LL | let _ = Box::new_zeroed();
+ | ~~~~~~~~~~~~~~
+LL | let _ = Box::new_in(_, _);
+ | ~~~~~~~~~~~~~~
+ and 10 other candidates
+help: consider using the `Default` trait
|
-LL | wtf: Some(Box::new(U {
- | +++++
+LL | let _ = <Box as std::default::Default>::default();
+ | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0423`.
diff --git a/tests/ui/privacy/union-field-privacy-2.stderr b/tests/ui/privacy/union-field-privacy-2.stderr
index bf6a2b625..7b6b84bfd 100644
--- a/tests/ui/privacy/union-field-privacy-2.stderr
+++ b/tests/ui/privacy/union-field-privacy-2.stderr
@@ -4,6 +4,6 @@ error[E0616]: field `c` of union `U` is private
LL | let c = u.c;
| ^ private field
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0616`.
diff --git a/tests/ui/privacy/unresolved-trait-impl-item.rs b/tests/ui/privacy/unresolved-trait-impl-item.rs
new file mode 100644
index 000000000..fea7c462a
--- /dev/null
+++ b/tests/ui/privacy/unresolved-trait-impl-item.rs
@@ -0,0 +1,15 @@
+// edition:2018
+
+trait MyTrait {
+ async fn resolved(&self);
+ const RESOLVED_WRONG: u8 = 0;
+}
+
+impl MyTrait for i32 {
+ async fn resolved(&self) {}
+
+ async fn unresolved(&self) {} //~ ERROR method `unresolved` is not a member of trait `MyTrait`
+ async fn RESOLVED_WRONG() {} //~ ERROR doesn't match its trait `MyTrait`
+}
+
+fn main() {}
diff --git a/tests/ui/privacy/unresolved-trait-impl-item.stderr b/tests/ui/privacy/unresolved-trait-impl-item.stderr
new file mode 100644
index 000000000..588e47c26
--- /dev/null
+++ b/tests/ui/privacy/unresolved-trait-impl-item.stderr
@@ -0,0 +1,22 @@
+error[E0407]: method `unresolved` is not a member of trait `MyTrait`
+ --> $DIR/unresolved-trait-impl-item.rs:11:5
+ |
+LL | async fn unresolved(&self) {}
+ | ^^^^^^^^^----------^^^^^^^^^^
+ | | |
+ | | help: there is an associated function with a similar name: `resolved`
+ | not a member of trait `MyTrait`
+
+error[E0324]: item `RESOLVED_WRONG` is an associated method, which doesn't match its trait `MyTrait`
+ --> $DIR/unresolved-trait-impl-item.rs:12:5
+ |
+LL | const RESOLVED_WRONG: u8 = 0;
+ | ----------------------------- item in trait
+...
+LL | async fn RESOLVED_WRONG() {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ does not match trait
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0324, E0407.
+For more information about an error, try `rustc --explain E0324`.
diff --git a/tests/ui/privacy/where-priv-type.stderr b/tests/ui/privacy/where-priv-type.stderr
index 650766458..126330b14 100644
--- a/tests/ui/privacy/where-priv-type.stderr
+++ b/tests/ui/privacy/where-priv-type.stderr
@@ -77,6 +77,6 @@ LL | type AssocTy = Const<{ my_const_fn(U) }>;
LL | const fn my_const_fn(val: u8) -> u8 {
| ----------------------------------- `fn(u8) -> u8 {my_const_fn}` declared as private
-error: aborting due to previous error; 5 warnings emitted
+error: aborting due to 1 previous error; 5 warnings emitted
For more information about this error, try `rustc --explain E0446`.
diff --git a/tests/ui/proc-macro/allowed-attr-stmt-expr.stdout b/tests/ui/proc-macro/allowed-attr-stmt-expr.stdout
index 4f8730053..8459f4e63 100644
--- a/tests/ui/proc-macro/allowed-attr-stmt-expr.stdout
+++ b/tests/ui/proc-macro/allowed-attr-stmt-expr.stdout
@@ -1,4 +1,5 @@
-PRINT-ATTR INPUT (DISPLAY): struct ItemWithSemi ;
+PRINT-ATTR INPUT (DISPLAY): struct ItemWithSemi;
+PRINT-ATTR RE-COLLECTED (DISPLAY): struct ItemWithSemi ;
PRINT-ATTR INPUT (DEBUG): TokenStream [
Ident {
ident: "struct",
@@ -45,7 +46,8 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
span: $DIR/allowed-attr-stmt-expr.rs:53:27: 53:29 (#0),
},
]
-PRINT-ATTR INPUT (DISPLAY): #[expect_let] let string = "Hello, world!" ;
+PRINT-ATTR INPUT (DISPLAY): #[expect_let] let string = "Hello, world!";
+PRINT-ATTR RE-COLLECTED (DISPLAY): #[expect_let] let string = "Hello, world!" ;
PRINT-ATTR INPUT (DEBUG): TokenStream [
Punct {
ch: '#',
@@ -87,7 +89,8 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
span: $DIR/allowed-attr-stmt-expr.rs:57:33: 57:34 (#0),
},
]
-PRINT-ATTR INPUT (DISPLAY): #[expect_my_macro_stmt] my_macro! ("{}", string) ;
+PRINT-ATTR INPUT (DISPLAY): #[expect_my_macro_stmt] my_macro!("{}", string);
+PRINT-ATTR RE-COLLECTED (DISPLAY): #[expect_my_macro_stmt] my_macro! ("{}", string) ;
PRINT-ATTR INPUT (DEBUG): TokenStream [
Punct {
ch: '#',
@@ -140,7 +143,8 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
span: $DIR/allowed-attr-stmt-expr.rs:61:28: 61:29 (#0),
},
]
-PRINT-ATTR INPUT (DISPLAY): second_make_stmt! (#[allow(dead_code)] struct Bar {}) ;
+PRINT-ATTR INPUT (DISPLAY): second_make_stmt!(#[allow(dead_code)] struct Bar {});
+PRINT-ATTR RE-COLLECTED (DISPLAY): second_make_stmt! (#[allow(dead_code)] struct Bar {}) ;
PRINT-ATTR INPUT (DEBUG): TokenStream [
Ident {
ident: "second_make_stmt",
@@ -288,7 +292,8 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
span: $DIR/allowed-attr-stmt-expr.rs:68:18: 68:20 (#0),
},
]
-PRINT-ATTR INPUT (DISPLAY): #[rustc_dummy] struct NonBracedStruct ;
+PRINT-ATTR INPUT (DISPLAY): #[rustc_dummy] struct NonBracedStruct;
+PRINT-ATTR RE-COLLECTED (DISPLAY): #[rustc_dummy] struct NonBracedStruct ;
PRINT-ATTR INPUT (DEBUG): TokenStream [
Punct {
ch: '#',
diff --git a/tests/ui/proc-macro/ambiguous-builtin-attrs-test.stderr b/tests/ui/proc-macro/ambiguous-builtin-attrs-test.stderr
index 316eb636b..346cebf63 100644
--- a/tests/ui/proc-macro/ambiguous-builtin-attrs-test.stderr
+++ b/tests/ui/proc-macro/ambiguous-builtin-attrs-test.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `NonExistent` in this scope
LL | NonExistent;
| ^^^^^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/proc-macro/attr-complex-fn.stdout b/tests/ui/proc-macro/attr-complex-fn.stdout
index b12eb587f..7c23d1eca 100644
--- a/tests/ui/proc-macro/attr-complex-fn.stdout
+++ b/tests/ui/proc-macro/attr-complex-fn.stdout
@@ -1,4 +1,5 @@
-PRINT-ATTR INPUT (DISPLAY): fn foo < T : MyTrait < MyStruct < { true } >> > () {}
+PRINT-ATTR INPUT (DISPLAY): fn foo<T: MyTrait<MyStruct<{ true }>>>() {}
+PRINT-ATTR RE-COLLECTED (DISPLAY): fn foo < T : MyTrait < MyStruct < { true } >>> () {}
PRINT-ATTR INPUT (DEBUG): TokenStream [
Ident {
ident: "fn",
@@ -76,7 +77,9 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
span: $DIR/attr-complex-fn.rs:19:42: 19:44 (#0),
},
]
-PRINT-ATTR INPUT (DISPLAY): impl < T > MyTrait < T > for MyStruct < { true } > { #! [rustc_dummy] }
+PRINT-ATTR INPUT (DISPLAY): impl<T> MyTrait<T> for MyStruct<{ true }> { #![rustc_dummy] }
+PRINT-ATTR RE-COLLECTED (DISPLAY): impl < T > MyTrait < T > for MyStruct < { true } > { #![rustc_dummy] }
+PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): impl < T > MyTrait < T > for MyStruct < { true } > { #! [rustc_dummy] }
PRINT-ATTR INPUT (DEBUG): TokenStream [
Ident {
ident: "impl",
diff --git a/tests/ui/proc-macro/attr-stmt-expr.stdout b/tests/ui/proc-macro/attr-stmt-expr.stdout
index c6d77e0ed..5e09198bb 100644
--- a/tests/ui/proc-macro/attr-stmt-expr.stdout
+++ b/tests/ui/proc-macro/attr-stmt-expr.stdout
@@ -29,7 +29,8 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
span: $DIR/attr-stmt-expr.rs:45:27: 45:29 (#0),
},
]
-PRINT-ATTR INPUT (DISPLAY): #[expect_let] let string = "Hello, world!" ;
+PRINT-ATTR INPUT (DISPLAY): #[expect_let] let string = "Hello, world!";
+PRINT-ATTR RE-COLLECTED (DISPLAY): #[expect_let] let string = "Hello, world!" ;
PRINT-ATTR INPUT (DEBUG): TokenStream [
Punct {
ch: '#',
@@ -71,7 +72,8 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
span: $DIR/attr-stmt-expr.rs:49:33: 49:34 (#0),
},
]
-PRINT-ATTR INPUT (DISPLAY): #[expect_my_macro_stmt] my_macro! ("{}", string) ;
+PRINT-ATTR INPUT (DISPLAY): #[expect_my_macro_stmt] my_macro!("{}", string);
+PRINT-ATTR RE-COLLECTED (DISPLAY): #[expect_my_macro_stmt] my_macro! ("{}", string) ;
PRINT-ATTR INPUT (DEBUG): TokenStream [
Punct {
ch: '#',
@@ -124,7 +126,8 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
span: $DIR/attr-stmt-expr.rs:53:28: 53:29 (#0),
},
]
-PRINT-ATTR INPUT (DISPLAY): second_make_stmt! (#[allow(dead_code)] struct Bar {}) ;
+PRINT-ATTR INPUT (DISPLAY): second_make_stmt!(#[allow(dead_code)] struct Bar {});
+PRINT-ATTR RE-COLLECTED (DISPLAY): second_make_stmt! (#[allow(dead_code)] struct Bar {}) ;
PRINT-ATTR INPUT (DEBUG): TokenStream [
Ident {
ident: "second_make_stmt",
diff --git a/tests/ui/proc-macro/attribute-after-derive.stdout b/tests/ui/proc-macro/attribute-after-derive.stdout
index 1b17d6047..6d9531df8 100644
--- a/tests/ui/proc-macro/attribute-after-derive.stdout
+++ b/tests/ui/proc-macro/attribute-after-derive.stdout
@@ -1,4 +1,5 @@
-PRINT-ATTR INPUT (DISPLAY): #[derive(Print)] struct AttributeDerive { #[cfg(FALSE)] field : u8, }
+PRINT-ATTR INPUT (DISPLAY): #[derive(Print)] struct AttributeDerive { #[cfg(FALSE)] field: u8, }
+PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): #[derive(Print)] struct AttributeDerive { #[cfg(FALSE)] field : u8, }
PRINT-ATTR INPUT (DEBUG): TokenStream [
Punct {
ch: '#',
@@ -130,7 +131,8 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [
span: $DIR/attribute-after-derive.rs:23:24: 26:2 (#0),
},
]
-PRINT-ATTR INPUT (DISPLAY): struct DeriveAttribute { #[cfg(FALSE)] field : u8, }
+PRINT-ATTR INPUT (DISPLAY): struct DeriveAttribute { #[cfg(FALSE)] field: u8, }
+PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): struct DeriveAttribute { #[cfg(FALSE)] field : u8, }
PRINT-ATTR INPUT (DEBUG): TokenStream [
Ident {
ident: "struct",
diff --git a/tests/ui/proc-macro/attribute-spans-preserved.stdout b/tests/ui/proc-macro/attribute-spans-preserved.stdout
index cf9a97491..190098d02 100644
--- a/tests/ui/proc-macro/attribute-spans-preserved.stdout
+++ b/tests/ui/proc-macro/attribute-spans-preserved.stdout
@@ -1 +1 @@
-fn main() { let y : u32 = "z" ; { let x : u32 = "y" ; } }
+fn main() { let y : u32 = "z" ; { let x: u32 = "y"; } }
diff --git a/tests/ui/proc-macro/auxiliary/attr-stmt-expr-rpass.rs b/tests/ui/proc-macro/auxiliary/attr-stmt-expr-rpass.rs
index 5b386b46b..76346d9a1 100644
--- a/tests/ui/proc-macro/auxiliary/attr-stmt-expr-rpass.rs
+++ b/tests/ui/proc-macro/auxiliary/attr-stmt-expr-rpass.rs
@@ -10,14 +10,14 @@ use proc_macro::TokenStream;
#[proc_macro_attribute]
pub fn expect_let(attr: TokenStream, item: TokenStream) -> TokenStream {
assert!(attr.to_string().is_empty());
- assert_eq!(item.to_string(), "let string = \"Hello, world!\" ;");
+ assert_eq!(item.to_string(), "let string = \"Hello, world!\";");
item
}
#[proc_macro_attribute]
pub fn expect_print_stmt(attr: TokenStream, item: TokenStream) -> TokenStream {
assert!(attr.to_string().is_empty());
- assert_eq!(item.to_string(), "println! (\"{}\", string) ;");
+ assert_eq!(item.to_string(), "println!(\"{}\", string);");
item
}
@@ -31,7 +31,7 @@ pub fn expect_expr(attr: TokenStream, item: TokenStream) -> TokenStream {
#[proc_macro_attribute]
pub fn expect_print_expr(attr: TokenStream, item: TokenStream) -> TokenStream {
assert!(attr.to_string().is_empty());
- assert_eq!(item.to_string(), "println! (\"{}\", string)");
+ assert_eq!(item.to_string(), "println!(\"{}\", string)");
item
}
@@ -40,7 +40,6 @@ pub fn no_output(attr: TokenStream, item: TokenStream) -> TokenStream {
assert!(attr.to_string().is_empty());
assert!(!item.to_string().is_empty());
"".parse().unwrap()
-
}
#[proc_macro_attribute]
diff --git a/tests/ui/proc-macro/auxiliary/attr-stmt-expr.rs b/tests/ui/proc-macro/auxiliary/attr-stmt-expr.rs
index 4d6dc06b4..7a29894bb 100644
--- a/tests/ui/proc-macro/auxiliary/attr-stmt-expr.rs
+++ b/tests/ui/proc-macro/auxiliary/attr-stmt-expr.rs
@@ -31,7 +31,7 @@ pub fn expect_expr(attr: TokenStream, item: TokenStream) -> TokenStream {
#[proc_macro_attribute]
pub fn expect_my_macro_expr(attr: TokenStream, item: TokenStream) -> TokenStream {
assert!(attr.to_string().is_empty());
- assert_eq!(item.to_string(), "my_macro! (\"{}\", string)");
+ assert_eq!(item.to_string(), "my_macro!(\"{}\", string)");
item
}
diff --git a/tests/ui/proc-macro/auxiliary/derive-a.rs b/tests/ui/proc-macro/auxiliary/derive-a.rs
index 79a3864bf..cd2be5fd8 100644
--- a/tests/ui/proc-macro/auxiliary/derive-a.rs
+++ b/tests/ui/proc-macro/auxiliary/derive-a.rs
@@ -10,6 +10,6 @@ use proc_macro::TokenStream;
#[proc_macro_derive(A)]
pub fn derive(input: TokenStream) -> TokenStream {
let input = input.to_string();
- assert!(input.contains("struct A ;"));
+ assert!(input.contains("struct A;"));
"".parse().unwrap()
}
diff --git a/tests/ui/proc-macro/auxiliary/derive-atob.rs b/tests/ui/proc-macro/auxiliary/derive-atob.rs
index 207b7fd32..e78e5bb8f 100644
--- a/tests/ui/proc-macro/auxiliary/derive-atob.rs
+++ b/tests/ui/proc-macro/auxiliary/derive-atob.rs
@@ -10,6 +10,6 @@ use proc_macro::TokenStream;
#[proc_macro_derive(AToB)]
pub fn derive(input: TokenStream) -> TokenStream {
let input = input.to_string();
- assert_eq!(input, "struct A ;");
+ assert_eq!(input, "struct A;");
"struct B;".parse().unwrap()
}
diff --git a/tests/ui/proc-macro/auxiliary/derive-b-rpass.rs b/tests/ui/proc-macro/auxiliary/derive-b-rpass.rs
index 641a95f78..3e6af67a9 100644
--- a/tests/ui/proc-macro/auxiliary/derive-b-rpass.rs
+++ b/tests/ui/proc-macro/auxiliary/derive-b-rpass.rs
@@ -10,7 +10,7 @@ use proc_macro::TokenStream;
#[proc_macro_derive(B, attributes(B, C))]
pub fn derive(input: TokenStream) -> TokenStream {
let input = input.to_string();
- assert!(input.contains("#[B [arbitrary tokens]]"));
+ assert!(input.contains("#[B[arbitrary tokens]]"));
assert!(input.contains("struct B {"));
assert!(input.contains("#[C]"));
"".parse().unwrap()
diff --git a/tests/ui/proc-macro/auxiliary/derive-ctod.rs b/tests/ui/proc-macro/auxiliary/derive-ctod.rs
index 2efe5a913..dbf44ed1b 100644
--- a/tests/ui/proc-macro/auxiliary/derive-ctod.rs
+++ b/tests/ui/proc-macro/auxiliary/derive-ctod.rs
@@ -10,6 +10,6 @@ use proc_macro::TokenStream;
#[proc_macro_derive(CToD)]
pub fn derive(input: TokenStream) -> TokenStream {
let input = input.to_string();
- assert_eq!(input, "struct C ;");
+ assert_eq!(input, "struct C;");
"struct D;".parse().unwrap()
}
diff --git a/tests/ui/proc-macro/auxiliary/derive-same-struct.rs b/tests/ui/proc-macro/auxiliary/derive-same-struct.rs
index 7598d632c..ce7a50d23 100644
--- a/tests/ui/proc-macro/auxiliary/derive-same-struct.rs
+++ b/tests/ui/proc-macro/auxiliary/derive-same-struct.rs
@@ -10,12 +10,12 @@ use proc_macro::TokenStream;
#[proc_macro_derive(AToB)]
pub fn derive1(input: TokenStream) -> TokenStream {
println!("input1: {:?}", input.to_string());
- assert_eq!(input.to_string(), "struct A ;");
+ assert_eq!(input.to_string(), "struct A;");
"#[derive(BToC)] struct B;".parse().unwrap()
}
#[proc_macro_derive(BToC)]
pub fn derive2(input: TokenStream) -> TokenStream {
- assert_eq!(input.to_string(), "struct B ;");
+ assert_eq!(input.to_string(), "struct B;");
"struct C;".parse().unwrap()
}
diff --git a/tests/ui/proc-macro/auxiliary/derive-union.rs b/tests/ui/proc-macro/auxiliary/derive-union.rs
index 05883170c..d950e1e77 100644
--- a/tests/ui/proc-macro/auxiliary/derive-union.rs
+++ b/tests/ui/proc-macro/auxiliary/derive-union.rs
@@ -12,7 +12,7 @@ pub fn derive(input: TokenStream) -> TokenStream {
let input = input.to_string();
assert!(input.contains("#[repr(C)]"));
assert!(input.contains("union Test {"));
- assert!(input.contains("a : u8,"));
+ assert!(input.contains("a: u8,"));
assert!(input.contains("}"));
"".parse().unwrap()
}
diff --git a/tests/ui/proc-macro/auxiliary/edition-gated-async-move-syntax.rs b/tests/ui/proc-macro/auxiliary/edition-gated-async-move-syntax.rs
new file mode 100644
index 000000000..ce7e60356
--- /dev/null
+++ b/tests/ui/proc-macro/auxiliary/edition-gated-async-move-syntax.rs
@@ -0,0 +1,39 @@
+// force-host
+// no-prefer-dynamic
+
+// Proc macro helper for issue #89699, used by tests/ui/proc-macro/edition-gated-async-move-
+// syntax-issue89699.rs, emitting an `async move` closure. This syntax is only available in
+// editions 2018 and up, but is used in edition 2015 in the test.
+
+#![crate_type = "proc-macro"]
+
+extern crate proc_macro;
+use proc_macro::*;
+
+#[proc_macro_attribute]
+pub fn foo(_attr: TokenStream, item: TokenStream) -> TokenStream {
+ let tt = item.into_iter().next().unwrap();
+ let sp = tt.span();
+ let mut arg = TokenStream::new();
+ let mut g = Group::new(Delimiter::Brace, TokenStream::new());
+ g.set_span(sp);
+ arg.extend([
+ TokenTree::Ident(Ident::new("async", sp)),
+ TokenTree::Ident(Ident::new("move", sp)),
+ TokenTree::Group(g),
+ ]);
+ let mut body = TokenStream::new();
+ body.extend([
+ TokenTree::Ident(Ident::new("async_main", sp)),
+ TokenTree::Group(Group::new(Delimiter::Parenthesis, arg)),
+ ]);
+
+ let mut ret = TokenStream::new();
+ ret.extend([
+ TokenTree::Ident(Ident::new("fn", sp)),
+ TokenTree::Ident(Ident::new("main", sp)),
+ TokenTree::Group(Group::new(Delimiter::Parenthesis, TokenStream::new())),
+ TokenTree::Group(Group::new(Delimiter::Brace, body)),
+ ]);
+ ret
+}
diff --git a/tests/ui/proc-macro/auxiliary/env.rs b/tests/ui/proc-macro/auxiliary/env.rs
new file mode 100644
index 000000000..58bcb08bf
--- /dev/null
+++ b/tests/ui/proc-macro/auxiliary/env.rs
@@ -0,0 +1,28 @@
+// force-host
+// no-prefer-dynamic
+
+#![crate_type = "proc-macro"]
+#![feature(proc_macro_tracked_env)]
+
+extern crate proc_macro;
+
+use proc_macro::TokenStream;
+use proc_macro::tracked_env::var;
+
+#[proc_macro]
+pub fn generate_const(input: TokenStream) -> TokenStream {
+ let the_const = match var("THE_CONST") {
+ Ok(x) if x == "12" => {
+ "const THE_CONST: u32 = 12;"
+ }
+ _ => {
+ "const THE_CONST: u32 = 0;"
+ }
+ };
+ let another = if var("ANOTHER").is_ok() {
+ "const ANOTHER: u32 = 1;"
+ } else {
+ "const ANOTHER: u32 = 2;"
+ };
+ format!("{the_const}{another}").parse().unwrap()
+}
diff --git a/tests/ui/proc-macro/auxiliary/expand-with-a-macro.rs b/tests/ui/proc-macro/auxiliary/expand-with-a-macro.rs
index d779d57af..5155a4b85 100644
--- a/tests/ui/proc-macro/auxiliary/expand-with-a-macro.rs
+++ b/tests/ui/proc-macro/auxiliary/expand-with-a-macro.rs
@@ -11,7 +11,7 @@ use proc_macro::TokenStream;
#[proc_macro_derive(A)]
pub fn derive(input: TokenStream) -> TokenStream {
let input = input.to_string();
- assert!(input.contains("struct A ;"));
+ assert!(input.contains("struct A;"));
r#"
impl A {
fn a(&self) {
diff --git a/tests/ui/proc-macro/auxiliary/issue-79825.rs b/tests/ui/proc-macro/auxiliary/issue-79825.rs
index 930891b1d..69cf5904f 100644
--- a/tests/ui/proc-macro/auxiliary/issue-79825.rs
+++ b/tests/ui/proc-macro/auxiliary/issue-79825.rs
@@ -8,7 +8,7 @@ use proc_macro::TokenStream;
#[proc_macro_attribute]
pub fn assert_input(args: TokenStream, input: TokenStream) -> TokenStream {
- assert_eq!(input.to_string(), "trait Alias = Sized ;");
+ assert_eq!(input.to_string(), "trait Alias = Sized;");
assert!(args.is_empty());
TokenStream::new()
}
diff --git a/tests/ui/proc-macro/capture-macro-rules-invoke.stdout b/tests/ui/proc-macro/capture-macro-rules-invoke.stdout
index 01d71ff98..71e34119b 100644
--- a/tests/ui/proc-macro/capture-macro-rules-invoke.stdout
+++ b/tests/ui/proc-macro/capture-macro-rules-invoke.stdout
@@ -14,6 +14,8 @@ PRINT-BANG INPUT (DEBUG): TokenStream [
PRINT-BANG INPUT (DISPLAY): 1 + 1, { "a" }, let a = 1;, String, my_name, 'a, my_val = 30,
std::option::Option, pub(in some::path) , [a b c], -30
PRINT-BANG RE-COLLECTED (DISPLAY): 1 + 1, { "a" }, let a = 1, String, my_name, 'a, my_val = 30,
+std::option::Option, pub(in some::path), [a b c], -30
+PRINT-BANG DEEP-RE-COLLECTED (DISPLAY): 1 + 1, { "a" }, let a = 1, String, my_name, 'a, my_val = 30,
std :: option :: Option, pub(in some :: path), [a b c], - 30
PRINT-BANG INPUT (DEBUG): TokenStream [
Group {
diff --git a/tests/ui/proc-macro/capture-unglued-token.stdout b/tests/ui/proc-macro/capture-unglued-token.stdout
index a0d2178f0..84b7ca355 100644
--- a/tests/ui/proc-macro/capture-unglued-token.stdout
+++ b/tests/ui/proc-macro/capture-unglued-token.stdout
@@ -1,5 +1,5 @@
PRINT-BANG INPUT (DISPLAY): Vec<u8>
-PRINT-BANG RE-COLLECTED (DISPLAY): Vec < u8 >
+PRINT-BANG DEEP-RE-COLLECTED (DISPLAY): Vec < u8 >
PRINT-BANG INPUT (DEBUG): TokenStream [
Group {
delimiter: None,
diff --git a/tests/ui/proc-macro/cfg-eval-fail.stderr b/tests/ui/proc-macro/cfg-eval-fail.stderr
index df8b6d5f3..945ad46bf 100644
--- a/tests/ui/proc-macro/cfg-eval-fail.stderr
+++ b/tests/ui/proc-macro/cfg-eval-fail.stderr
@@ -4,5 +4,5 @@ error: removing an expression is not supported in this position
LL | let _ = #[cfg_eval] #[cfg(FALSE)] 0;
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/proc-macro/cfg-eval-inner.stdout b/tests/ui/proc-macro/cfg-eval-inner.stdout
index 9d25def58..43ae47c20 100644
--- a/tests/ui/proc-macro/cfg-eval-inner.stdout
+++ b/tests/ui/proc-macro/cfg-eval-inner.stdout
@@ -1,4 +1,16 @@
-PRINT-ATTR INPUT (DISPLAY): impl Foo <
+PRINT-ATTR INPUT (DISPLAY): impl
+Foo<[u8;
+{
+ #![rustc_dummy(cursed_inner)] #![allow(unused)] struct Inner
+ { field: [u8; { #![rustc_dummy(another_cursed_inner)] 1 }] } 0
+}]> { #![rustc_dummy(evaluated_attr)] fn bar() {} }
+PRINT-ATTR RE-COLLECTED (DISPLAY): impl Foo <
+[u8;
+{
+ #![rustc_dummy(cursed_inner)] #![allow(unused)] struct Inner
+ { field: [u8; { #![rustc_dummy(another_cursed_inner)] 1 }] } 0
+}] > { #![rustc_dummy(evaluated_attr)] fn bar() {} }
+PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): impl Foo <
[u8 ;
{
#! [rustc_dummy(cursed_inner)] #! [allow(unused)] struct Inner
@@ -35,7 +47,7 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
stream: TokenStream [
Punct {
ch: '#',
- spacing: Alone,
+ spacing: Joint,
span: $DIR/cfg-eval-inner.rs:19:5: 19:6 (#0),
},
Punct {
@@ -130,7 +142,7 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
stream: TokenStream [
Punct {
ch: '#',
- spacing: Alone,
+ spacing: Joint,
span: $DIR/cfg-eval-inner.rs:23:13: 23:14 (#0),
},
Punct {
@@ -195,7 +207,7 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
stream: TokenStream [
Punct {
ch: '#',
- spacing: Alone,
+ spacing: Joint,
span: $DIR/cfg-eval-inner.rs:32:5: 32:6 (#0),
},
Punct {
diff --git a/tests/ui/proc-macro/cfg-eval.stdout b/tests/ui/proc-macro/cfg-eval.stdout
index 6732caf08..e26e16f5a 100644
--- a/tests/ui/proc-macro/cfg-eval.stdout
+++ b/tests/ui/proc-macro/cfg-eval.stdout
@@ -1,4 +1,5 @@
-PRINT-ATTR INPUT (DISPLAY): struct S1 { #[cfg(all())] #[allow()] field_true : u8, }
+PRINT-ATTR INPUT (DISPLAY): struct S1 { #[cfg(all())] #[allow()] field_true: u8, }
+PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): struct S1 { #[cfg(all())] #[allow()] field_true : u8, }
PRINT-ATTR INPUT (DEBUG): TokenStream [
Ident {
ident: "struct",
diff --git a/tests/ui/proc-macro/custom-attr-only-one-derive.rs b/tests/ui/proc-macro/custom-attr-only-one-derive.rs
index 2cd5b4873..901394384 100644
--- a/tests/ui/proc-macro/custom-attr-only-one-derive.rs
+++ b/tests/ui/proc-macro/custom-attr-only-one-derive.rs
@@ -1,8 +1,6 @@
// run-pass
// aux-build:custom-attr-only-one-derive.rs
-#![feature(rust_2018_preview)]
-
#[macro_use]
extern crate custom_attr_only_one_derive;
diff --git a/tests/ui/proc-macro/define-two.stderr b/tests/ui/proc-macro/define-two.stderr
index bf1bd8427..a39ce366f 100644
--- a/tests/ui/proc-macro/define-two.stderr
+++ b/tests/ui/proc-macro/define-two.stderr
@@ -9,6 +9,6 @@ LL | #[proc_macro_derive(A)]
|
= note: `A` must be defined only once in the macro namespace of this module
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0428`.
diff --git a/tests/ui/proc-macro/derive-helper-legacy-limits.stderr b/tests/ui/proc-macro/derive-helper-legacy-limits.stderr
index 186f38a00..f5cd45543 100644
--- a/tests/ui/proc-macro/derive-helper-legacy-limits.stderr
+++ b/tests/ui/proc-macro/derive-helper-legacy-limits.stderr
@@ -4,5 +4,5 @@ error: cannot find attribute `empty_helper` in this scope
LL | #[empty_helper]
| ^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/proc-macro/derive-same-struct.stdout b/tests/ui/proc-macro/derive-same-struct.stdout
index 7478d9741..77605de5e 100644
--- a/tests/ui/proc-macro/derive-same-struct.stdout
+++ b/tests/ui/proc-macro/derive-same-struct.stdout
@@ -1 +1 @@
-input1: "struct A ;"
+input1: "struct A;"
diff --git a/tests/ui/proc-macro/derive-still-gated.stderr b/tests/ui/proc-macro/derive-still-gated.stderr
index 99289fdfe..25777f72b 100644
--- a/tests/ui/proc-macro/derive-still-gated.stderr
+++ b/tests/ui/proc-macro/derive-still-gated.stderr
@@ -4,5 +4,5 @@ error: cannot find attribute `derive_Empty` in this scope
LL | #[derive_Empty]
| ^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/proc-macro/disappearing-resolution.stderr b/tests/ui/proc-macro/disappearing-resolution.stderr
index 5b969549a..e6d086868 100644
--- a/tests/ui/proc-macro/disappearing-resolution.stderr
+++ b/tests/ui/proc-macro/disappearing-resolution.stderr
@@ -19,7 +19,11 @@ note: ...and refers to the derive macro `Empty` which is defined here
--> $DIR/auxiliary/test-macros.rs:25:1
|
LL | pub fn empty_derive(_: TokenStream) -> TokenStream {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider importing it directly
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ you could import this directly
+help: import `Empty` directly
+ |
+LL | use test_macros::Empty;
+ | ~~~~~~~~~~~~~~~~~~
error: aborting due to 2 previous errors
diff --git a/tests/ui/proc-macro/doc-comment-preserved.stdout b/tests/ui/proc-macro/doc-comment-preserved.stdout
index f4160d7da..b0ea180d9 100644
--- a/tests/ui/proc-macro/doc-comment-preserved.stdout
+++ b/tests/ui/proc-macro/doc-comment-preserved.stdout
@@ -5,7 +5,7 @@ PRINT-BANG INPUT (DISPLAY): /**
* DOC *
*******
*/
- pub struct S ;
+ pub struct S;
PRINT-BANG RE-COLLECTED (DISPLAY): #[doc = "\n*******\n* DOC *\n* DOC *\n* DOC *\n*******\n"] pub struct S ;
PRINT-BANG INPUT (DEBUG): TokenStream [
Punct {
diff --git a/tests/ui/proc-macro/dollar-crate-issue-57089.stdout b/tests/ui/proc-macro/dollar-crate-issue-57089.stdout
index de4f0c000..7f97ac9db 100644
--- a/tests/ui/proc-macro/dollar-crate-issue-57089.stdout
+++ b/tests/ui/proc-macro/dollar-crate-issue-57089.stdout
@@ -1,4 +1,5 @@
-PRINT-BANG INPUT (DISPLAY): struct M($crate :: S) ;
+PRINT-BANG INPUT (DISPLAY): struct M($crate :: S);
+PRINT-BANG RE-COLLECTED (DISPLAY): struct M($crate :: S) ;
PRINT-BANG INPUT (DEBUG): TokenStream [
Ident {
ident: "struct",
@@ -38,7 +39,8 @@ PRINT-BANG INPUT (DEBUG): TokenStream [
span: $DIR/dollar-crate-issue-57089.rs:17:32: 17:33 (#3),
},
]
-PRINT-ATTR INPUT (DISPLAY): struct A($crate :: S) ;
+PRINT-ATTR INPUT (DISPLAY): struct A($crate :: S);
+PRINT-ATTR RE-COLLECTED (DISPLAY): struct A($crate :: S) ;
PRINT-ATTR INPUT (DEBUG): TokenStream [
Ident {
ident: "struct",
diff --git a/tests/ui/proc-macro/dollar-crate-issue-62325.stdout b/tests/ui/proc-macro/dollar-crate-issue-62325.stdout
index c7e72bf4f..96161049e 100644
--- a/tests/ui/proc-macro/dollar-crate-issue-62325.stdout
+++ b/tests/ui/proc-macro/dollar-crate-issue-62325.stdout
@@ -1,4 +1,5 @@
-PRINT-ATTR INPUT (DISPLAY): struct A(identity! ($crate :: S)) ;
+PRINT-ATTR INPUT (DISPLAY): struct A(identity! ($crate :: S));
+PRINT-ATTR RE-COLLECTED (DISPLAY): struct A(identity! ($crate :: S)) ;
PRINT-ATTR INPUT (DEBUG): TokenStream [
Ident {
ident: "struct",
@@ -53,7 +54,8 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
span: $DIR/dollar-crate-issue-62325.rs:19:35: 19:36 (#3),
},
]
-PRINT-ATTR INPUT (DISPLAY): struct B(identity! ($crate :: S)) ;
+PRINT-ATTR INPUT (DISPLAY): struct B(identity! ($crate :: S));
+PRINT-ATTR RE-COLLECTED (DISPLAY): struct B(identity! ($crate :: S)) ;
PRINT-ATTR INPUT (DEBUG): TokenStream [
Ident {
ident: "struct",
diff --git a/tests/ui/proc-macro/dollar-crate.stdout b/tests/ui/proc-macro/dollar-crate.stdout
index 0f5f87cec..a6bdab004 100644
--- a/tests/ui/proc-macro/dollar-crate.stdout
+++ b/tests/ui/proc-macro/dollar-crate.stdout
@@ -1,4 +1,5 @@
-PRINT-BANG INPUT (DISPLAY): struct M($crate :: S) ;
+PRINT-BANG INPUT (DISPLAY): struct M($crate :: S);
+PRINT-BANG RE-COLLECTED (DISPLAY): struct M($crate :: S) ;
PRINT-BANG INPUT (DEBUG): TokenStream [
Ident {
ident: "struct",
@@ -38,7 +39,8 @@ PRINT-BANG INPUT (DEBUG): TokenStream [
span: $DIR/dollar-crate.rs:20:36: 20:37 (#3),
},
]
-PRINT-ATTR INPUT (DISPLAY): struct A($crate :: S) ;
+PRINT-ATTR INPUT (DISPLAY): struct A($crate :: S);
+PRINT-ATTR RE-COLLECTED (DISPLAY): struct A($crate :: S) ;
PRINT-ATTR INPUT (DEBUG): TokenStream [
Ident {
ident: "struct",
@@ -78,7 +80,8 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
span: $DIR/dollar-crate.rs:24:32: 24:33 (#3),
},
]
-PRINT-DERIVE INPUT (DISPLAY): struct D($crate :: S) ;
+PRINT-DERIVE INPUT (DISPLAY): struct D($crate :: S);
+PRINT-DERIVE RE-COLLECTED (DISPLAY): struct D($crate :: S) ;
PRINT-DERIVE INPUT (DEBUG): TokenStream [
Ident {
ident: "struct",
@@ -118,7 +121,8 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [
span: $DIR/dollar-crate.rs:27:32: 27:33 (#3),
},
]
-PRINT-BANG INPUT (DISPLAY): struct M($crate :: S) ;
+PRINT-BANG INPUT (DISPLAY): struct M($crate :: S);
+PRINT-BANG RE-COLLECTED (DISPLAY): struct M($crate :: S) ;
PRINT-BANG INPUT (DEBUG): TokenStream [
Ident {
ident: "struct",
@@ -158,7 +162,8 @@ PRINT-BANG INPUT (DEBUG): TokenStream [
span: $DIR/auxiliary/dollar-crate-external.rs:7:32: 7:33 (#14),
},
]
-PRINT-ATTR INPUT (DISPLAY): struct A($crate :: S) ;
+PRINT-ATTR INPUT (DISPLAY): struct A($crate :: S);
+PRINT-ATTR RE-COLLECTED (DISPLAY): struct A($crate :: S) ;
PRINT-ATTR INPUT (DEBUG): TokenStream [
Ident {
ident: "struct",
@@ -198,7 +203,8 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
span: $DIR/auxiliary/dollar-crate-external.rs:11:28: 11:29 (#14),
},
]
-PRINT-DERIVE INPUT (DISPLAY): struct D($crate :: S) ;
+PRINT-DERIVE INPUT (DISPLAY): struct D($crate :: S);
+PRINT-DERIVE RE-COLLECTED (DISPLAY): struct D($crate :: S) ;
PRINT-DERIVE INPUT (DEBUG): TokenStream [
Ident {
ident: "struct",
diff --git a/tests/ui/proc-macro/edition-gated-async-move-syntax-issue89699.rs b/tests/ui/proc-macro/edition-gated-async-move-syntax-issue89699.rs
new file mode 100644
index 000000000..1a9d4601a
--- /dev/null
+++ b/tests/ui/proc-macro/edition-gated-async-move-syntax-issue89699.rs
@@ -0,0 +1,10 @@
+// aux-build:edition-gated-async-move-syntax.rs
+// edition: 2015
+
+// Non-regression test for issue #89699, where a proc-macro emitting syntax only available in
+// edition 2018 and up (`async move`) is used on edition 2015
+
+extern crate edition_gated_async_move_syntax;
+
+#[edition_gated_async_move_syntax::foo]
+fn foo() {} //~ ERROR `async move` blocks are only allowed in Rust 2018 or later
diff --git a/tests/ui/proc-macro/edition-gated-async-move-syntax-issue89699.stderr b/tests/ui/proc-macro/edition-gated-async-move-syntax-issue89699.stderr
new file mode 100644
index 000000000..5123b823f
--- /dev/null
+++ b/tests/ui/proc-macro/edition-gated-async-move-syntax-issue89699.stderr
@@ -0,0 +1,8 @@
+error: `async move` blocks are only allowed in Rust 2018 or later
+ --> $DIR/edition-gated-async-move-syntax-issue89699.rs:10:1
+ |
+LL | fn foo() {}
+ | ^^
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/proc-macro/env.rs b/tests/ui/proc-macro/env.rs
new file mode 100644
index 000000000..1b1d1873e
--- /dev/null
+++ b/tests/ui/proc-macro/env.rs
@@ -0,0 +1,17 @@
+// aux-build:env.rs
+// run-pass
+// rustc-env: THE_CONST=1
+// compile-flags: -Zunstable-options --env THE_CONST=12 --env ANOTHER=4
+
+#![crate_name = "foo"]
+
+extern crate env;
+
+use env::generate_const;
+
+generate_const!();
+
+fn main() {
+ assert_eq!(THE_CONST, 12);
+ assert_eq!(ANOTHER, 1);
+}
diff --git a/tests/ui/proc-macro/expand-to-derive.stdout b/tests/ui/proc-macro/expand-to-derive.stdout
index 39f009183..9f03a469a 100644
--- a/tests/ui/proc-macro/expand-to-derive.stdout
+++ b/tests/ui/proc-macro/expand-to-derive.stdout
@@ -1,6 +1,11 @@
PRINT-DERIVE INPUT (DISPLAY): struct Foo
{
field :
+ [bool ; { #[rustc_dummy] struct Inner { other_inner_field: u8, } 0 }]
+}
+PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): struct Foo
+{
+ field :
[bool ; { #[rustc_dummy] struct Inner { other_inner_field : u8, } 0 }]
}
PRINT-DERIVE INPUT (DEBUG): TokenStream [
diff --git a/tests/ui/proc-macro/expand-to-unstable.stderr b/tests/ui/proc-macro/expand-to-unstable.stderr
index b27dcd7e6..dda590ee8 100644
--- a/tests/ui/proc-macro/expand-to-unstable.stderr
+++ b/tests/ui/proc-macro/expand-to-unstable.stderr
@@ -7,6 +7,6 @@ LL | #[derive(Unstable)]
= help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
= note: this error originates in the derive macro `Unstable` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/proc-macro/export-macro.stderr b/tests/ui/proc-macro/export-macro.stderr
index 36a6a9bb3..410770eca 100644
--- a/tests/ui/proc-macro/export-macro.stderr
+++ b/tests/ui/proc-macro/export-macro.stderr
@@ -4,5 +4,5 @@ error: cannot export macro_rules! macros from a `proc-macro` crate type currentl
LL | macro_rules! foo {
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout b/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout
index 40181efc0..eda2f433b 100644
--- a/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout
+++ b/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout
@@ -122,7 +122,7 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [
span: #3 bytes(306..355),
},
]
-PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { 0; } ; 0 }, }
+PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { 0; }; 0 }, }
PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = { 0 } ; 0 }, }
PRINT-DERIVE INPUT (DEBUG): TokenStream [
Ident {
@@ -202,7 +202,8 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [
span: #7 bytes(430..483),
},
]
-PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { {} } ; 0 }, }
+PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { {} }; 0 }, }
+PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = { {} } ; 0 }, }
PRINT-DERIVE INPUT (DEBUG): TokenStream [
Ident {
ident: "enum",
@@ -280,7 +281,7 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [
span: #11 bytes(430..483),
},
]
-PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { PATH; } ; 0 }, }
+PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { PATH; }; 0 }, }
PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = { PATH } ; 0 }, }
PRINT-DERIVE INPUT (DEBUG): TokenStream [
Ident {
@@ -358,7 +359,7 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [
span: #15 bytes(430..483),
},
]
-PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { 0 + 1; } ; 0 }, }
+PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { 0 + 1; }; 0 }, }
PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = { 0 + 1 } ; 0 }, }
PRINT-DERIVE INPUT (DEBUG): TokenStream [
Ident {
@@ -449,7 +450,7 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [
span: #19 bytes(430..483),
},
]
-PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { PATH + 1; } ; 0 }, }
+PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { PATH + 1; }; 0 }, }
PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = { PATH + 1 } ; 0 }, }
PRINT-DERIVE INPUT (DEBUG): TokenStream [
Ident {
diff --git a/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.stderr b/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.stderr
index 9441cdcc8..1c12a2804 100644
--- a/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.stderr
+++ b/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.stderr
@@ -30,6 +30,6 @@ LL | #[derive(Empty)]
= note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
= note: `#[warn(legacy_derive_helpers)]` on by default
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0659`.
diff --git a/tests/ui/proc-macro/import.stderr b/tests/ui/proc-macro/import.stderr
index aae621193..c5d1648ab 100644
--- a/tests/ui/proc-macro/import.stderr
+++ b/tests/ui/proc-macro/import.stderr
@@ -4,6 +4,6 @@ error[E0432]: unresolved import `test_macros::empty_derive`
LL | use test_macros::empty_derive;
| ^^^^^^^^^^^^^^^^^^^^^^^^^ no `empty_derive` in the root
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/proc-macro/inert-attribute-order.stdout b/tests/ui/proc-macro/inert-attribute-order.stdout
index cc2155459..86b272179 100644
--- a/tests/ui/proc-macro/inert-attribute-order.stdout
+++ b/tests/ui/proc-macro/inert-attribute-order.stdout
@@ -1,7 +1,11 @@
PRINT-ATTR INPUT (DISPLAY): /// 1
-#[rustfmt :: attr2] #[doc = "3"] #[doc = "4"] #[rustfmt :: attr5] /// 6
-#[print_attr(nodebug)] struct S ;
-PRINT-ATTR RE-COLLECTED (DISPLAY): #[doc = " 1"] #[rustfmt :: attr2] #[doc = "3"] #[doc = "4"]
+#[rustfmt::attr2] #[doc = "3"] #[doc = "4"] #[rustfmt::attr5] /// 6
+#[print_attr(nodebug)] struct S;
+PRINT-ATTR RE-COLLECTED (DISPLAY): #[doc = " 1"] #[rustfmt::attr2] #[doc = "3"] #[doc = "4"] #[rustfmt::attr5]
+#[doc = " 6"] #[print_attr(nodebug)] struct S ;
+PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): #[doc = " 1"] #[rustfmt :: attr2] #[doc = "3"] #[doc = "4"]
#[rustfmt :: attr5] #[doc = " 6"] #[print_attr(nodebug)] struct S ;
-PRINT-ATTR INPUT (DISPLAY): #[doc = " 1"] #[rustfmt :: attr2] #[doc = "3"] #[doc = "4"]
+PRINT-ATTR INPUT (DISPLAY): #[doc = " 1"] #[rustfmt::attr2] #[doc = "3"] #[doc = "4"] #[rustfmt::attr5]
+#[doc = " 6"] struct S ;
+PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): #[doc = " 1"] #[rustfmt :: attr2] #[doc = "3"] #[doc = "4"]
#[rustfmt :: attr5] #[doc = " 6"] struct S ;
diff --git a/tests/ui/proc-macro/inner-attr-non-inline-mod.stdout b/tests/ui/proc-macro/inner-attr-non-inline-mod.stdout
index 6261d82e2..aaec40669 100644
--- a/tests/ui/proc-macro/inner-attr-non-inline-mod.stdout
+++ b/tests/ui/proc-macro/inner-attr-non-inline-mod.stdout
@@ -1,4 +1,5 @@
-PRINT-ATTR INPUT (DISPLAY): #[deny(unused_attributes)] mod module_with_attrs { #! [rustfmt :: skip] }
+PRINT-ATTR INPUT (DISPLAY): #[deny(unused_attributes)] mod module_with_attrs { #![rustfmt::skip] }
+PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): #[deny(unused_attributes)] mod module_with_attrs { #! [rustfmt :: skip] }
PRINT-ATTR INPUT (DEBUG): TokenStream [
Punct {
ch: '#',
diff --git a/tests/ui/proc-macro/inner-attrs.stdout b/tests/ui/proc-macro/inner-attrs.stdout
index ee8adf0b4..037ec044e 100644
--- a/tests/ui/proc-macro/inner-attrs.stdout
+++ b/tests/ui/proc-macro/inner-attrs.stdout
@@ -6,6 +6,8 @@ PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
},
]
PRINT-ATTR INPUT (DISPLAY): #[print_target_and_args(second)] fn foo()
+{ #![print_target_and_args(third)] #![print_target_and_args(fourth)] }
+PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): #[print_target_and_args(second)] fn foo()
{ #! [print_target_and_args(third)] #! [print_target_and_args(fourth)] }
PRINT-ATTR INPUT (DEBUG): TokenStream [
Punct {
@@ -121,6 +123,8 @@ PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
},
]
PRINT-ATTR INPUT (DISPLAY): fn foo()
+{ #![print_target_and_args(third)] #![print_target_and_args(fourth)] }
+PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): fn foo()
{ #! [print_target_and_args(third)] #! [print_target_and_args(fourth)] }
PRINT-ATTR INPUT (DEBUG): TokenStream [
Ident {
@@ -210,7 +214,8 @@ PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
span: $DIR/inner-attrs.rs:20:30: 20:35 (#0),
},
]
-PRINT-ATTR INPUT (DISPLAY): fn foo() { #! [print_target_and_args(fourth)] }
+PRINT-ATTR INPUT (DISPLAY): fn foo() { #![print_target_and_args(fourth)] }
+PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): fn foo() { #! [print_target_and_args(fourth)] }
PRINT-ATTR INPUT (DEBUG): TokenStream [
Ident {
ident: "fn",
@@ -298,6 +303,8 @@ PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
},
]
PRINT-ATTR INPUT (DISPLAY): #[print_target_and_args(mod_second)] mod inline_mod
+{ #![print_target_and_args(mod_third)] #![print_target_and_args(mod_fourth)] }
+PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): #[print_target_and_args(mod_second)] mod inline_mod
{
#! [print_target_and_args(mod_third)] #!
[print_target_and_args(mod_fourth)]
@@ -411,6 +418,8 @@ PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
},
]
PRINT-ATTR INPUT (DISPLAY): mod inline_mod
+{ #![print_target_and_args(mod_third)] #![print_target_and_args(mod_fourth)] }
+PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): mod inline_mod
{
#! [print_target_and_args(mod_third)] #!
[print_target_and_args(mod_fourth)]
@@ -498,7 +507,8 @@ PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
span: $DIR/inner-attrs.rs:27:30: 27:39 (#0),
},
]
-PRINT-ATTR INPUT (DISPLAY): mod inline_mod { #! [print_target_and_args(mod_fourth)] }
+PRINT-ATTR INPUT (DISPLAY): mod inline_mod { #![print_target_and_args(mod_fourth)] }
+PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): mod inline_mod { #! [print_target_and_args(mod_fourth)] }
PRINT-ATTR INPUT (DEBUG): TokenStream [
Ident {
ident: "mod",
@@ -569,6 +579,8 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
},
]
PRINT-DERIVE INPUT (DISPLAY): struct MyDerivePrint
+{ field: [u8; { match true { _ => { #![rustc_dummy(third)] true } }; 0 }] }
+PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): struct MyDerivePrint
{
field :
[u8 ; { match true { _ => { #! [rustc_dummy(third)] true } } ; 0 }]
@@ -639,7 +651,7 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [
stream: TokenStream [
Punct {
ch: '#',
- spacing: Alone,
+ spacing: Joint,
span: $DIR/inner-attrs.rs:40:17: 40:18 (#0),
},
Punct {
@@ -705,7 +717,9 @@ PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
span: $DIR/inner-attrs.rs:49:29: 49:40 (#0),
},
]
-PRINT-ATTR INPUT (DISPLAY): (3, 4, { #! [cfg_attr(not(FALSE), rustc_dummy(innermost))] 5 }) ;
+PRINT-ATTR INPUT (DISPLAY): (3, 4, { #![cfg_attr(not(FALSE), rustc_dummy(innermost))] 5 });
+PRINT-ATTR RE-COLLECTED (DISPLAY): (3, 4, { #![cfg_attr(not(FALSE), rustc_dummy(innermost))] 5 }) ;
+PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): (3, 4, { #! [cfg_attr(not(FALSE), rustc_dummy(innermost))] 5 }) ;
PRINT-ATTR INPUT (DEBUG): TokenStream [
Group {
delimiter: Parenthesis,
@@ -819,7 +833,9 @@ PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
span: $DIR/inner-attrs.rs:56:29: 56:40 (#0),
},
]
-PRINT-ATTR INPUT (DISPLAY): (3, 4, { #! [cfg_attr(not(FALSE), rustc_dummy(innermost))] 5 }) ;
+PRINT-ATTR INPUT (DISPLAY): (3, 4, { #![cfg_attr(not(FALSE), rustc_dummy(innermost))] 5 });
+PRINT-ATTR RE-COLLECTED (DISPLAY): (3, 4, { #![cfg_attr(not(FALSE), rustc_dummy(innermost))] 5 }) ;
+PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): (3, 4, { #! [cfg_attr(not(FALSE), rustc_dummy(innermost))] 5 }) ;
PRINT-ATTR INPUT (DEBUG): TokenStream [
Group {
delimiter: Parenthesis,
diff --git a/tests/ui/proc-macro/invalid-punct-ident-1.stderr b/tests/ui/proc-macro/invalid-punct-ident-1.stderr
index 78aa84401..0013bfd16 100644
--- a/tests/ui/proc-macro/invalid-punct-ident-1.stderr
+++ b/tests/ui/proc-macro/invalid-punct-ident-1.stderr
@@ -6,5 +6,5 @@ LL | invalid_punct!();
|
= help: message: unsupported character `'`'`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/proc-macro/invalid-punct-ident-2.stderr b/tests/ui/proc-macro/invalid-punct-ident-2.stderr
index 66979e756..3de2139d5 100644
--- a/tests/ui/proc-macro/invalid-punct-ident-2.stderr
+++ b/tests/ui/proc-macro/invalid-punct-ident-2.stderr
@@ -6,5 +6,5 @@ LL | invalid_ident!();
|
= help: message: `"*"` is not a valid identifier
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/proc-macro/invalid-punct-ident-3.stderr b/tests/ui/proc-macro/invalid-punct-ident-3.stderr
index c096bc8c0..158ba0d4f 100644
--- a/tests/ui/proc-macro/invalid-punct-ident-3.stderr
+++ b/tests/ui/proc-macro/invalid-punct-ident-3.stderr
@@ -6,5 +6,5 @@ LL | invalid_raw_ident!();
|
= help: message: `self` cannot be a raw identifier
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/proc-macro/issue-107113-wrap.stderr b/tests/ui/proc-macro/issue-107113-wrap.stderr
index 4122253d2..b54105114 100644
--- a/tests/ui/proc-macro/issue-107113-wrap.stderr
+++ b/tests/ui/proc-macro/issue-107113-wrap.stderr
@@ -11,6 +11,6 @@ LL | #[issue_107113::main]
found unit type `()`
= note: this error originates in the attribute macro `issue_107113::main` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/proc-macro/issue-37788.stderr b/tests/ui/proc-macro/issue-37788.stderr
index 0a116d6f8..9ce783073 100644
--- a/tests/ui/proc-macro/issue-37788.stderr
+++ b/tests/ui/proc-macro/issue-37788.stderr
@@ -12,6 +12,6 @@ LL | std::cell::Cell::new(0)
= note: expected unit type `()`
found struct `Cell<{integer}>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/proc-macro/issue-38586.stderr b/tests/ui/proc-macro/issue-38586.stderr
index ddd0a0874..004915564 100644
--- a/tests/ui/proc-macro/issue-38586.stderr
+++ b/tests/ui/proc-macro/issue-38586.stderr
@@ -6,6 +6,6 @@ LL | #[derive(A)]
|
= note: this error originates in the derive macro `A` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/proc-macro/issue-50493.stderr b/tests/ui/proc-macro/issue-50493.stderr
index 23e103dbf..1cd358313 100644
--- a/tests/ui/proc-macro/issue-50493.stderr
+++ b/tests/ui/proc-macro/issue-50493.stderr
@@ -4,6 +4,6 @@ error[E0742]: visibilities can only be restricted to ancestor modules
LL | pub(in restricted) field: usize,
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0742`.
diff --git a/tests/ui/proc-macro/issue-59191-replace-root-with-fn.stderr b/tests/ui/proc-macro/issue-59191-replace-root-with-fn.stderr
index f7516c7d3..08e679a7c 100644
--- a/tests/ui/proc-macro/issue-59191-replace-root-with-fn.stderr
+++ b/tests/ui/proc-macro/issue-59191-replace-root-with-fn.stderr
@@ -1,4 +1,4 @@
error: requires `sized` lang_item
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/proc-macro/issue-66286.stderr b/tests/ui/proc-macro/issue-66286.stderr
index fe2464b3b..fc4c2062f 100644
--- a/tests/ui/proc-macro/issue-66286.stderr
+++ b/tests/ui/proc-macro/issue-66286.stderr
@@ -9,6 +9,6 @@ help: use angle brackets instead
LL | pub extern fn foo(_: Vec<u32>) -> u32 {
| ~ ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0214`.
diff --git a/tests/ui/proc-macro/issue-75734-pp-paren.stdout b/tests/ui/proc-macro/issue-75734-pp-paren.stdout
index 2f7c013e9..ee135366f 100644
--- a/tests/ui/proc-macro/issue-75734-pp-paren.stdout
+++ b/tests/ui/proc-macro/issue-75734-pp-paren.stdout
@@ -1,4 +1,5 @@
-PRINT-ATTR INPUT (DISPLAY): fn main() { & | _ : u8 | {} ; mul_2! (1 + 1) ; }
+PRINT-ATTR INPUT (DISPLAY): fn main() { &|_: u8| {}; mul_2!(1 + 1); }
+PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): fn main() { &| _ : u8 | {} ; mul_2! (1 + 1) ; }
PRINT-ATTR INPUT (DEBUG): TokenStream [
Ident {
ident: "fn",
diff --git a/tests/ui/proc-macro/issue-75801.stderr b/tests/ui/proc-macro/issue-75801.stderr
index ee0a9bd77..3b5f9e3b5 100644
--- a/tests/ui/proc-macro/issue-75801.stderr
+++ b/tests/ui/proc-macro/issue-75801.stderr
@@ -7,6 +7,6 @@ LL | let _bar: u32 = $arg;
LL | foo!("baz");
| ^^^^^ expected `u32`, found `&str`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/proc-macro/issue-75930-derive-cfg.stdout b/tests/ui/proc-macro/issue-75930-derive-cfg.stdout
index 31a1c44b6..47f26451d 100644
--- a/tests/ui/proc-macro/issue-75930-derive-cfg.stdout
+++ b/tests/ui/proc-macro/issue-75930-derive-cfg.stdout
@@ -1,5 +1,53 @@
PRINT-ATTR INPUT (DISPLAY): #[print_helper(a)] #[allow(dead_code)] #[derive(Print)] #[print_helper(b)]
-struct Foo < #[cfg(FALSE)] A, B >
+struct Foo<#[cfg(FALSE)] A, B>
+{
+ #[cfg(FALSE)] first: String, #[cfg_attr(FALSE, deny(warnings))] second:
+ bool, third:
+ [u8;
+ {
+ #[cfg(FALSE)] struct Bar; #[cfg(not(FALSE))] struct Inner;
+ #[cfg(FALSE)] let a = 25; match true
+ {
+ #[cfg(FALSE)] true => {}, #[cfg_attr(not(FALSE), allow(warnings))]
+ false => {}, _ => {}
+ }; #[print_helper(should_be_removed)] fn removed_fn()
+ { #![cfg(FALSE)] } #[print_helper(c)] #[cfg(not(FALSE))] fn kept_fn()
+ { #![cfg(not(FALSE))] let my_val = true; } enum TupleEnum
+ {
+ Foo(#[cfg(FALSE)] u8, #[cfg(FALSE)] bool, #[cfg(not(FALSE))] i32,
+ #[cfg(FALSE)] String, u8)
+ } struct
+ TupleStruct(#[cfg(FALSE)] String, #[cfg(not(FALSE))] i32,
+ #[cfg(FALSE)] bool, u8); fn plain_removed_fn()
+ { #![cfg_attr(not(FALSE), cfg(FALSE))] } 0
+ }], #[print_helper(d)] fourth: B
+}
+PRINT-ATTR RE-COLLECTED (DISPLAY): #[print_helper(a)] #[allow(dead_code)] #[derive(Print)] #[print_helper(b)]
+struct Foo <#[cfg(FALSE)] A, B >
+{
+ #[cfg(FALSE)] first: String, #[cfg_attr(FALSE, deny(warnings))] second:
+ bool, third:
+ [u8;
+ {
+ #[cfg(FALSE)] struct Bar; #[cfg(not(FALSE))] struct Inner;
+ #[cfg(FALSE)] let a = 25; match true
+ {
+ #[cfg(FALSE)] true => {}, #[cfg_attr(not(FALSE), allow(warnings))]
+ false => {}, _ => {}
+ }; #[print_helper(should_be_removed)] fn removed_fn()
+ { #![cfg(FALSE)] } #[print_helper(c)] #[cfg(not(FALSE))] fn kept_fn()
+ { #![cfg(not(FALSE))] let my_val = true; } enum TupleEnum
+ {
+ Foo(#[cfg(FALSE)] u8, #[cfg(FALSE)] bool, #[cfg(not(FALSE))] i32,
+ #[cfg(FALSE)] String, u8)
+ } struct
+ TupleStruct(#[cfg(FALSE)] String, #[cfg(not(FALSE))] i32,
+ #[cfg(FALSE)] bool, u8); fn plain_removed_fn()
+ { #![cfg_attr(not(FALSE), cfg(FALSE))] } 0
+ }], #[print_helper(d)] fourth: B
+}
+PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): #[print_helper(a)] #[allow(dead_code)] #[derive(Print)] #[print_helper(b)]
+struct Foo <#[cfg(FALSE)] A, B >
{
#[cfg(FALSE)] first : String, #[cfg_attr(FALSE, deny(warnings))] second :
bool, third :
@@ -1272,7 +1320,20 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
span: $DIR/issue-75930-derive-cfg.rs:55:32: 102:2 (#0),
},
]
-PRINT-DERIVE INPUT (DISPLAY): #[print_helper(a)] #[allow(dead_code)] #[print_helper(b)] struct Foo < B >
+PRINT-DERIVE INPUT (DISPLAY): #[print_helper(a)] #[allow(dead_code)] #[print_helper(b)] struct Foo <B >
+{
+ second: bool, third:
+ [u8;
+ {
+ #[cfg(not(FALSE))] struct Inner; match true
+ { #[allow(warnings)] false => {}, _ => {} }; #[print_helper(c)]
+ #[cfg(not(FALSE))] fn kept_fn()
+ { #![cfg(not(FALSE))] let my_val = true; } enum TupleEnum
+ { Foo(#[cfg(not(FALSE))] i32, u8) } struct
+ TupleStruct(#[cfg(not(FALSE))] i32, u8); 0
+ }], #[print_helper(d)] fourth: B
+}
+PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): #[print_helper(a)] #[allow(dead_code)] #[print_helper(b)] struct Foo <B >
{
second : bool, third :
[u8 ;
diff --git a/tests/ui/proc-macro/issue-76270-panic-in-libproc-macro.stderr b/tests/ui/proc-macro/issue-76270-panic-in-libproc-macro.stderr
index d69de23a4..7bf85104d 100644
--- a/tests/ui/proc-macro/issue-76270-panic-in-libproc-macro.stderr
+++ b/tests/ui/proc-macro/issue-76270-panic-in-libproc-macro.stderr
@@ -6,5 +6,5 @@ LL | proc_macro_panic::panic_in_libproc_macro!();
|
= help: message: `""` is not a valid identifier
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/proc-macro/issue-78675-captured-inner-attrs.stdout b/tests/ui/proc-macro/issue-78675-captured-inner-attrs.stdout
index ae5e94008..37ecf3a8d 100644
--- a/tests/ui/proc-macro/issue-78675-captured-inner-attrs.stdout
+++ b/tests/ui/proc-macro/issue-78675-captured-inner-attrs.stdout
@@ -46,7 +46,7 @@ PRINT-BANG INPUT (DEBUG): TokenStream [
stream: TokenStream [
Punct {
ch: '#',
- spacing: Alone,
+ spacing: Joint,
span: $DIR/issue-78675-captured-inner-attrs.rs:28:9: 28:16 (#0),
},
Punct {
diff --git a/tests/ui/proc-macro/issue-79148.stderr b/tests/ui/proc-macro/issue-79148.stderr
index a3b2de01d..8adc4c6e0 100644
--- a/tests/ui/proc-macro/issue-79148.stderr
+++ b/tests/ui/proc-macro/issue-79148.stderr
@@ -11,6 +11,6 @@ LL | cause_ice!();
| ^^^^^^^^^^^^
= note: this error originates in the macro `cause_ice` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0364`.
diff --git a/tests/ui/proc-macro/issue-81543-item-parse-err.stderr b/tests/ui/proc-macro/issue-81543-item-parse-err.stderr
index ca5241760..50f9c71eb 100644
--- a/tests/ui/proc-macro/issue-81543-item-parse-err.stderr
+++ b/tests/ui/proc-macro/issue-81543-item-parse-err.stderr
@@ -4,5 +4,5 @@ error: expected identifier, found `32`
LL | fn 32() {}
| ^^ expected identifier
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/proc-macro/issue-83469-global-alloc-invalid-stmt.stderr b/tests/ui/proc-macro/issue-83469-global-alloc-invalid-stmt.stderr
index ec0e3c4c7..02fcaf542 100644
--- a/tests/ui/proc-macro/issue-83469-global-alloc-invalid-stmt.stderr
+++ b/tests/ui/proc-macro/issue-83469-global-alloc-invalid-stmt.stderr
@@ -4,5 +4,5 @@ error: allocators must be statics
LL | fn inner() {}
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/proc-macro/issue-86781-bad-inner-doc.stderr b/tests/ui/proc-macro/issue-86781-bad-inner-doc.stderr
index a92f07522..aeb824303 100644
--- a/tests/ui/proc-macro/issue-86781-bad-inner-doc.stderr
+++ b/tests/ui/proc-macro/issue-86781-bad-inner-doc.stderr
@@ -12,6 +12,6 @@ help: to annotate the struct, change the doc comment from inner to outer style
LL | /// Inner doc comment
| ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0753`.
diff --git a/tests/ui/proc-macro/item-error.stderr b/tests/ui/proc-macro/item-error.stderr
index b544be6e9..71d0ee10a 100644
--- a/tests/ui/proc-macro/item-error.stderr
+++ b/tests/ui/proc-macro/item-error.stderr
@@ -10,6 +10,6 @@ LL ~ struct A<'a> {
LL ~ a: &'a u64
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0106`.
diff --git a/tests/ui/proc-macro/keep-expr-tokens.stdout b/tests/ui/proc-macro/keep-expr-tokens.stdout
index fcd72a0e0..8e4d4785e 100644
--- a/tests/ui/proc-macro/keep-expr-tokens.stdout
+++ b/tests/ui/proc-macro/keep-expr-tokens.stdout
@@ -1,4 +1,5 @@
-PRINT-ATTR INPUT (DISPLAY): #[rustc_dummy] { 1 + 1 ; }
+PRINT-ATTR INPUT (DISPLAY): #[rustc_dummy] { 1 +1; }
+PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): #[rustc_dummy] { 1 + 1 ; }
PRINT-ATTR INPUT (DEBUG): TokenStream [
Punct {
ch: '#',
diff --git a/tests/ui/proc-macro/lifetimes.stderr b/tests/ui/proc-macro/lifetimes.stderr
index 0c99809ed..315b4c591 100644
--- a/tests/ui/proc-macro/lifetimes.stderr
+++ b/tests/ui/proc-macro/lifetimes.stderr
@@ -9,5 +9,5 @@ LL | type A = single_quote_alone!();
|
= note: this error originates in the macro `single_quote_alone` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/proc-macro/lints_in_proc_macros.stderr b/tests/ui/proc-macro/lints_in_proc_macros.stderr
index 4dd8be7d9..244d21860 100644
--- a/tests/ui/proc-macro/lints_in_proc_macros.stderr
+++ b/tests/ui/proc-macro/lints_in_proc_macros.stderr
@@ -6,6 +6,6 @@ LL | bang_proc_macro2!();
|
= note: this error originates in the macro `bang_proc_macro2` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/proc-macro/load-panic-backtrace.stderr b/tests/ui/proc-macro/load-panic-backtrace.stderr
index c1a642713..18f513586 100644
--- a/tests/ui/proc-macro/load-panic-backtrace.stderr
+++ b/tests/ui/proc-macro/load-panic-backtrace.stderr
@@ -8,5 +8,5 @@ LL | #[derive(Panic)]
|
= help: message: panic-derive
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/proc-macro/load-panic.stderr b/tests/ui/proc-macro/load-panic.stderr
index f0d62f690..bb429ad63 100644
--- a/tests/ui/proc-macro/load-panic.stderr
+++ b/tests/ui/proc-macro/load-panic.stderr
@@ -6,5 +6,5 @@ LL | #[derive(Panic)]
|
= help: message: panic-derive
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/proc-macro/macro-brackets.stderr b/tests/ui/proc-macro/macro-brackets.stderr
index d35163752..f14b5fed6 100644
--- a/tests/ui/proc-macro/macro-brackets.stderr
+++ b/tests/ui/proc-macro/macro-brackets.stderr
@@ -9,6 +9,6 @@ help: you can cast a `char` to a `u32`, since a `char` always occupies 4 bytes
LL | id![static X: u32 = 'a' as u32;];
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/proc-macro/macro-rules-derive-cfg.stdout b/tests/ui/proc-macro/macro-rules-derive-cfg.stdout
index aee0f966d..89817a1ef 100644
--- a/tests/ui/proc-macro/macro-rules-derive-cfg.stdout
+++ b/tests/ui/proc-macro/macro-rules-derive-cfg.stdout
@@ -4,6 +4,15 @@ PRINT-DERIVE INPUT (DISPLAY): struct Foo
[bool ;
{
let a = #[rustc_dummy(first)] #[rustc_dummy(second)]
+ { #![allow(unused)] 30 }; 0
+ }]
+}
+PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): struct Foo
+{
+ val :
+ [bool ;
+ {
+ let a = #[rustc_dummy(first)] #[rustc_dummy(second)]
{ #! [allow(unused)] 30 } ; 0
}]
}
@@ -111,7 +120,7 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [
stream: TokenStream [
Punct {
ch: '#',
- spacing: Alone,
+ spacing: Joint,
span: $DIR/macro-rules-derive-cfg.rs:27:5: 27:6 (#0),
},
Punct {
diff --git a/tests/ui/proc-macro/macro-rules-derive.stderr b/tests/ui/proc-macro/macro-rules-derive.stderr
index 517cbabd5..e7cd44746 100644
--- a/tests/ui/proc-macro/macro-rules-derive.stderr
+++ b/tests/ui/proc-macro/macro-rules-derive.stderr
@@ -9,6 +9,6 @@ LL | produce_it!(MyName);
|
= note: this error originates in the macro `produce_it` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/proc-macro/macros-in-extern-derive.stderr b/tests/ui/proc-macro/macros-in-extern-derive.stderr
index efd9ff225..c7d2881ad 100644
--- a/tests/ui/proc-macro/macros-in-extern-derive.stderr
+++ b/tests/ui/proc-macro/macros-in-extern-derive.stderr
@@ -6,6 +6,6 @@ LL | #[derive(Copy)]
LL | fn f();
| ------- not a `struct`, `enum` or `union`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0774`.
diff --git a/tests/ui/proc-macro/meta-macro-hygiene.stdout b/tests/ui/proc-macro/meta-macro-hygiene.stdout
index eeb7179e6..6d10cc604 100644
--- a/tests/ui/proc-macro/meta-macro-hygiene.stdout
+++ b/tests/ui/proc-macro/meta-macro-hygiene.stdout
@@ -32,13 +32,13 @@ macro_rules! produce_it
*/ {
() =>
{
- meta_macro :: print_def_site! ($crate :: dummy! ()) ;
+ meta_macro::print_def_site!($crate::dummy!());
// `print_def_site!` will respan the `$crate` identifier
// with `Span::def_site()`. This should cause it to resolve
// relative to `meta_macro`, *not* `make_macro` (despite
// the fact that `print_def_site` is produced by a
// `macro_rules!` macro in `make_macro`).
- } ;
+ };
}
fn main /* 0#0 */() { ; }
diff --git a/tests/ui/proc-macro/nested-derive-cfg.stdout b/tests/ui/proc-macro/nested-derive-cfg.stdout
index 9a562c971..c94808c3c 100644
--- a/tests/ui/proc-macro/nested-derive-cfg.stdout
+++ b/tests/ui/proc-macro/nested-derive-cfg.stdout
@@ -1,4 +1,6 @@
PRINT-DERIVE INPUT (DISPLAY): struct Foo
+{ my_array: [bool; { struct Inner { non_removed_inner_field: usize } 0 }] }
+PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): struct Foo
{ my_array : [bool ; { struct Inner { non_removed_inner_field : usize } 0 }] }
PRINT-DERIVE INPUT (DEBUG): TokenStream [
Ident {
diff --git a/tests/ui/proc-macro/no-macro-use-attr.stderr b/tests/ui/proc-macro/no-macro-use-attr.stderr
index a9e5256a0..3dda3cc7d 100644
--- a/tests/ui/proc-macro/no-macro-use-attr.stderr
+++ b/tests/ui/proc-macro/no-macro-use-attr.stderr
@@ -16,5 +16,5 @@ error: fatal error triggered by #[rustc_error]
LL | fn main() {}
| ^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/proc-macro/non-root.stderr b/tests/ui/proc-macro/non-root.stderr
index 90f94b677..ecc0202c1 100644
--- a/tests/ui/proc-macro/non-root.stderr
+++ b/tests/ui/proc-macro/non-root.stderr
@@ -4,5 +4,5 @@ error: functions tagged with `#[proc_macro]` must currently reside in the root o
LL | pub fn foo(arg: TokenStream) -> TokenStream { arg }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/proc-macro/nonterminal-expansion.stdout b/tests/ui/proc-macro/nonterminal-expansion.stdout
index b2557af18..c671f6239 100644
--- a/tests/ui/proc-macro/nonterminal-expansion.stdout
+++ b/tests/ui/proc-macro/nonterminal-expansion.stdout
@@ -1,5 +1,5 @@
PRINT-ATTR_ARGS INPUT (DISPLAY): a, line!(), b
-PRINT-ATTR_ARGS RE-COLLECTED (DISPLAY): a, line! (), b
+PRINT-ATTR_ARGS DEEP-RE-COLLECTED (DISPLAY): a, line! (), b
PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
Ident {
ident: "a",
diff --git a/tests/ui/proc-macro/nonterminal-token-hygiene.stdout b/tests/ui/proc-macro/nonterminal-token-hygiene.stdout
index c437853ac..5c70e780f 100644
--- a/tests/ui/proc-macro/nonterminal-token-hygiene.stdout
+++ b/tests/ui/proc-macro/nonterminal-token-hygiene.stdout
@@ -1,5 +1,5 @@
PRINT-BANG INPUT (DISPLAY): struct S;
-PRINT-BANG RE-COLLECTED (DISPLAY): struct S ;
+PRINT-BANG DEEP-RE-COLLECTED (DISPLAY): struct S ;
PRINT-BANG INPUT (DEBUG): TokenStream [
Group {
delimiter: None,
@@ -51,11 +51,11 @@ macro_rules! outer
/*
0#0
*/ {
- ($item : item) =>
+ ($item:item) =>
{
- macro inner() { print_bang! { $item } } inner! () ;
+ macro inner() { print_bang! { $item } } inner!();
- } ;
+ };
}
struct S /* 0#0 */;
diff --git a/tests/ui/proc-macro/pretty-print-tts.stdout b/tests/ui/proc-macro/pretty-print-tts.stdout
index f52e97a86..fbe8640a0 100644
--- a/tests/ui/proc-macro/pretty-print-tts.stdout
+++ b/tests/ui/proc-macro/pretty-print-tts.stdout
@@ -1,4 +1,5 @@
-PRINT-BANG INPUT (DISPLAY): { #! [rustc_dummy] let a = "hello".len() ; matches! (a, 5) ; }
+PRINT-BANG INPUT (DISPLAY): { #![rustc_dummy] let a = "hello".len(); matches!(a, 5); }
+PRINT-BANG DEEP-RE-COLLECTED (DISPLAY): { #! [rustc_dummy] let a = "hello".len() ; matches! (a, 5) ; }
PRINT-BANG INPUT (DEBUG): TokenStream [
Group {
delimiter: Brace,
diff --git a/tests/ui/proc-macro/raw-ident.stderr b/tests/ui/proc-macro/raw-ident.stderr
index 905a5f946..a72067021 100644
--- a/tests/ui/proc-macro/raw-ident.stderr
+++ b/tests/ui/proc-macro/raw-ident.stderr
@@ -6,5 +6,5 @@ LL | make_bad_struct!(S);
|
= note: this error originates in the macro `make_bad_struct` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/proc-macro/shadow.stderr b/tests/ui/proc-macro/shadow.stderr
index e7d95cc83..6f50d89f5 100644
--- a/tests/ui/proc-macro/shadow.stderr
+++ b/tests/ui/proc-macro/shadow.stderr
@@ -9,6 +9,6 @@ LL | extern crate test_macros;
|
= note: `test_macros` must be defined only once in the type namespace of this module
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0259`.
diff --git a/tests/ui/proc-macro/signature.stderr b/tests/ui/proc-macro/signature.stderr
index ba5c8c157..2a53145a6 100644
--- a/tests/ui/proc-macro/signature.stderr
+++ b/tests/ui/proc-macro/signature.stderr
@@ -7,5 +7,5 @@ LL | pub unsafe extern "C" fn foo(a: i32, b: u32) -> u32 {
= note: expected signature `fn(proc_macro::TokenStream) -> proc_macro::TokenStream`
found signature `unsafe extern "C" fn(i32, u32) -> u32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/proc-macro/test-same-crate.stderr b/tests/ui/proc-macro/test-same-crate.stderr
index 5d12e149c..3cab0ae67 100644
--- a/tests/ui/proc-macro/test-same-crate.stderr
+++ b/tests/ui/proc-macro/test-same-crate.stderr
@@ -6,5 +6,5 @@ LL | fn t() { crate::mac!(A) }
|
= help: you can define integration tests in a directory named `tests`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/proc-macro/trailing-plus.stdout b/tests/ui/proc-macro/trailing-plus.stdout
index b90057cd6..b20401190 100644
--- a/tests/ui/proc-macro/trailing-plus.stdout
+++ b/tests/ui/proc-macro/trailing-plus.stdout
@@ -1,4 +1,5 @@
-PRINT-ATTR INPUT (DISPLAY): fn foo < T > () where T : Copy + {}
+PRINT-ATTR INPUT (DISPLAY): fn foo<T>() where T: Copy + {}
+PRINT-ATTR RE-COLLECTED (DISPLAY): fn foo < T > () where T : Copy + {}
PRINT-ATTR INPUT (DEBUG): TokenStream [
Ident {
ident: "fn",
diff --git a/tests/ui/proc-macro/two-crate-types-1.stderr b/tests/ui/proc-macro/two-crate-types-1.stderr
index deaba1cf2..a7524fd3b 100644
--- a/tests/ui/proc-macro/two-crate-types-1.stderr
+++ b/tests/ui/proc-macro/two-crate-types-1.stderr
@@ -1,4 +1,4 @@
error: cannot mix `proc-macro` crate type with others
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/proc-macro/two-crate-types-2.stderr b/tests/ui/proc-macro/two-crate-types-2.stderr
index deaba1cf2..a7524fd3b 100644
--- a/tests/ui/proc-macro/two-crate-types-2.stderr
+++ b/tests/ui/proc-macro/two-crate-types-2.stderr
@@ -1,4 +1,4 @@
error: cannot mix `proc-macro` crate type with others
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/proc-macro/weird-braces.stdout b/tests/ui/proc-macro/weird-braces.stdout
index 9bf562217..7da769ef0 100644
--- a/tests/ui/proc-macro/weird-braces.stdout
+++ b/tests/ui/proc-macro/weird-braces.stdout
@@ -5,7 +5,18 @@ PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
span: $DIR/weird-braces.rs:16:25: 16:36 (#0),
},
]
-PRINT-ATTR INPUT (DISPLAY): #[print_target_and_args(second_outer)] impl Bar < { 1 > 0 } > for Foo <
+PRINT-ATTR INPUT (DISPLAY): #[print_target_and_args(second_outer)] impl Bar<{ 1 > 0 }> for Foo<{ true }>
+{
+ #![print_target_and_args(first_inner)]
+ #![print_target_and_args(second_inner)]
+}
+PRINT-ATTR RE-COLLECTED (DISPLAY): #[print_target_and_args(second_outer)] impl Bar < { 1 > 0 } > for Foo <
+{ true } >
+{
+ #![print_target_and_args(first_inner)]
+ #![print_target_and_args(second_inner)]
+}
+PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): #[print_target_and_args(second_outer)] impl Bar < { 1 > 0 } > for Foo <
{ true } >
{
#! [print_target_and_args(first_inner)] #!
@@ -180,7 +191,17 @@ PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
span: $DIR/weird-braces.rs:17:25: 17:37 (#0),
},
]
-PRINT-ATTR INPUT (DISPLAY): impl Bar < { 1 > 0 } > for Foo < { true } >
+PRINT-ATTR INPUT (DISPLAY): impl Bar<{ 1 > 0 }> for Foo<{ true }>
+{
+ #![print_target_and_args(first_inner)]
+ #![print_target_and_args(second_inner)]
+}
+PRINT-ATTR RE-COLLECTED (DISPLAY): impl Bar < { 1 > 0 } > for Foo < { true } >
+{
+ #![print_target_and_args(first_inner)]
+ #![print_target_and_args(second_inner)]
+}
+PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): impl Bar < { 1 > 0 } > for Foo < { true } >
{
#! [print_target_and_args(first_inner)] #!
[print_target_and_args(second_inner)]
@@ -329,7 +350,11 @@ PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
span: $DIR/weird-braces.rs:19:30: 19:41 (#0),
},
]
-PRINT-ATTR INPUT (DISPLAY): impl Bar < { 1 > 0 } > for Foo < { true } >
+PRINT-ATTR INPUT (DISPLAY): impl Bar<{ 1 > 0 }> for Foo<{ true }>
+{ #![print_target_and_args(second_inner)] }
+PRINT-ATTR RE-COLLECTED (DISPLAY): impl Bar < { 1 > 0 } > for Foo < { true } >
+{ #![print_target_and_args(second_inner)] }
+PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): impl Bar < { 1 > 0 } > for Foo < { true } >
{ #! [print_target_and_args(second_inner)] }
PRINT-ATTR INPUT (DEBUG): TokenStream [
Ident {
@@ -445,7 +470,8 @@ PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
span: $DIR/weird-braces.rs:20:30: 20:42 (#0),
},
]
-PRINT-ATTR INPUT (DISPLAY): impl Bar < { 1 > 0 } > for Foo < { true } > {}
+PRINT-ATTR INPUT (DISPLAY): impl Bar<{ 1 > 0 }> for Foo<{ true }> {}
+PRINT-ATTR RE-COLLECTED (DISPLAY): impl Bar < { 1 > 0 } > for Foo < { true } > {}
PRINT-ATTR INPUT (DEBUG): TokenStream [
Ident {
ident: "impl",
diff --git a/tests/ui/pub/pub-ident-fn-2.stderr b/tests/ui/pub/pub-ident-fn-2.stderr
index b5b667b41..e724278b2 100644
--- a/tests/ui/pub/pub-ident-fn-2.stderr
+++ b/tests/ui/pub/pub-ident-fn-2.stderr
@@ -9,5 +9,5 @@ help: add `fn` here to parse `foo` as a public function
LL | pub fn foo(_s: usize) { bar() }
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pub/pub-ident-fn-or-struct.stderr b/tests/ui/pub/pub-ident-fn-or-struct.stderr
index c4a196eb2..a8fa4bd3b 100644
--- a/tests/ui/pub/pub-ident-fn-or-struct.stderr
+++ b/tests/ui/pub/pub-ident-fn-or-struct.stderr
@@ -4,5 +4,5 @@ error: missing `fn` or `struct` for function or struct definition
LL | pub S (foo) bar
| ---^- help: if you meant to call a macro, try: `S!`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pub/pub-ident-fn-with-lifetime-2.stderr b/tests/ui/pub/pub-ident-fn-with-lifetime-2.stderr
index 6a9aeaf4a..b0d5ce9de 100644
--- a/tests/ui/pub/pub-ident-fn-with-lifetime-2.stderr
+++ b/tests/ui/pub/pub-ident-fn-with-lifetime-2.stderr
@@ -9,5 +9,5 @@ help: add `fn` here to parse `bar` as a public method
LL | pub fn bar<'a>(&self, _s: &'a usize) -> bool { true }
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pub/pub-ident-fn-with-lifetime.stderr b/tests/ui/pub/pub-ident-fn-with-lifetime.stderr
index c1ca0136b..63fcf6bf5 100644
--- a/tests/ui/pub/pub-ident-fn-with-lifetime.stderr
+++ b/tests/ui/pub/pub-ident-fn-with-lifetime.stderr
@@ -9,5 +9,5 @@ help: add `fn` here to parse `foo` as a public function
LL | pub fn foo<'a>(_s: &'a usize) -> bool { true }
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pub/pub-ident-fn.stderr b/tests/ui/pub/pub-ident-fn.stderr
index cb94c48ad..06dac6164 100644
--- a/tests/ui/pub/pub-ident-fn.stderr
+++ b/tests/ui/pub/pub-ident-fn.stderr
@@ -9,5 +9,5 @@ help: add `fn` here to parse `foo` as a public function
LL | pub fn foo(_s: usize) -> bool { true }
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pub/pub-ident-struct-2.stderr b/tests/ui/pub/pub-ident-struct-2.stderr
index 6969a376a..5e0f328d9 100644
--- a/tests/ui/pub/pub-ident-struct-2.stderr
+++ b/tests/ui/pub/pub-ident-struct-2.stderr
@@ -9,5 +9,5 @@ help: add `struct` here to parse `bar` as a public struct
LL | pub struct bar();
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pub/pub-ident-struct-3.stderr b/tests/ui/pub/pub-ident-struct-3.stderr
index d94198a6b..d08e51205 100644
--- a/tests/ui/pub/pub-ident-struct-3.stderr
+++ b/tests/ui/pub/pub-ident-struct-3.stderr
@@ -9,5 +9,5 @@ help: add `struct` here to parse `S` as a public struct
LL | pub struct S();
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pub/pub-ident-struct-4.stderr b/tests/ui/pub/pub-ident-struct-4.stderr
index 90c7138e5..470874e06 100644
--- a/tests/ui/pub/pub-ident-struct-4.stderr
+++ b/tests/ui/pub/pub-ident-struct-4.stderr
@@ -9,5 +9,5 @@ help: add `struct` here to parse `T` as a public struct
LL | pub struct T(String);
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pub/pub-ident-struct-with-lifetime.stderr b/tests/ui/pub/pub-ident-struct-with-lifetime.stderr
index 562b68e35..0e08a5ff4 100644
--- a/tests/ui/pub/pub-ident-struct-with-lifetime.stderr
+++ b/tests/ui/pub/pub-ident-struct-with-lifetime.stderr
@@ -9,5 +9,5 @@ help: add `struct` here to parse `S` as a public struct
LL | pub struct S<'a> {
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pub/pub-ident-struct.stderr b/tests/ui/pub/pub-ident-struct.stderr
index d3a378786..2d5d61d93 100644
--- a/tests/ui/pub/pub-ident-struct.stderr
+++ b/tests/ui/pub/pub-ident-struct.stderr
@@ -9,5 +9,5 @@ help: add `struct` here to parse `S` as a public struct
LL | pub struct S {
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pub/pub-ident-with-lifetime-incomplete.stderr b/tests/ui/pub/pub-ident-with-lifetime-incomplete.stderr
index 0e0b12705..750e2d17e 100644
--- a/tests/ui/pub/pub-ident-with-lifetime-incomplete.stderr
+++ b/tests/ui/pub/pub-ident-with-lifetime-incomplete.stderr
@@ -4,5 +4,5 @@ error: missing `fn` or `struct` for function or struct definition
LL | pub foo<'a>
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pub/pub-restricted-error.stderr b/tests/ui/pub/pub-restricted-error.stderr
index b47328f34..4db848783 100644
--- a/tests/ui/pub/pub-restricted-error.stderr
+++ b/tests/ui/pub/pub-restricted-error.stderr
@@ -6,5 +6,5 @@ LL | struct Foo {
LL | pub(crate) () foo: usize,
| ^ expected identifier
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/pub/pub-restricted-non-path.stderr b/tests/ui/pub/pub-restricted-non-path.stderr
index e0ea50621..1402ec231 100644
--- a/tests/ui/pub/pub-restricted-non-path.stderr
+++ b/tests/ui/pub/pub-restricted-non-path.stderr
@@ -4,5 +4,5 @@ error: expected identifier, found `.`
LL | pub (.) fn afn() {}
| ^ expected identifier
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/qualified/qualified-path-params-2.stderr b/tests/ui/qualified/qualified-path-params-2.stderr
index b6cf19b82..56644bdd4 100644
--- a/tests/ui/qualified/qualified-path-params-2.stderr
+++ b/tests/ui/qualified/qualified-path-params-2.stderr
@@ -9,6 +9,6 @@ help: if there were a trait named `Example` with associated type `f` implemented
LL | type A = <<S as Tr>::A as Example>::f;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0223`.
diff --git a/tests/ui/query-system/fn-sig-cycle-arity.stderr b/tests/ui/query-system/fn-sig-cycle-arity.stderr
index 67e0c2545..fa1d03375 100644
--- a/tests/ui/query-system/fn-sig-cycle-arity.stderr
+++ b/tests/ui/query-system/fn-sig-cycle-arity.stderr
@@ -4,6 +4,6 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
LL | fn dance(&self) -> _ {
| ^ not allowed in type signatures
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/ui/query-system/no-query-in-printing-during-query-descr.stderr b/tests/ui/query-system/no-query-in-printing-during-query-descr.stderr
index 35e608b6b..e86e38225 100644
--- a/tests/ui/query-system/no-query-in-printing-during-query-descr.stderr
+++ b/tests/ui/query-system/no-query-in-printing-during-query-descr.stderr
@@ -4,6 +4,6 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
LL | fn a() -> _ {
| ^ not allowed in type signatures
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/ui/query-system/query_depth.stderr b/tests/ui/query-system/query_depth.stderr
index 43a18b4e0..d455e0e4f 100644
--- a/tests/ui/query-system/query_depth.stderr
+++ b/tests/ui/query-system/query_depth.stderr
@@ -7,5 +7,5 @@ LL | fn main() {
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "128"]` attribute to your crate (`query_depth`)
= note: query depth increased by 66 when computing layout of `core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<alloc::boxed::Box<alloc::string::String>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/range/issue-73553-misinterp-range-literal.stderr b/tests/ui/range/issue-73553-misinterp-range-literal.stderr
index 52efa241d..15e55708c 100644
--- a/tests/ui/range/issue-73553-misinterp-range-literal.stderr
+++ b/tests/ui/range/issue-73553-misinterp-range-literal.stderr
@@ -6,8 +6,8 @@ LL | demo(tell(1)..tell(10));
| |
| arguments to this function are incorrect
|
- = note: expected reference `&std::ops::Range<usize>`
- found struct `std::ops::Range<usize>`
+ = note: expected reference `&std::ops::Range<_>`
+ found struct `std::ops::Range<_>`
note: function defined here
--> $DIR/issue-73553-misinterp-range-literal.rs:3:4
|
diff --git a/tests/ui/range/range-inclusive-pattern-precedence.stderr b/tests/ui/range/range-inclusive-pattern-precedence.stderr
index f6788d034..2e2d7983c 100644
--- a/tests/ui/range/range-inclusive-pattern-precedence.stderr
+++ b/tests/ui/range/range-inclusive-pattern-precedence.stderr
@@ -18,5 +18,5 @@ note: the lint level is defined here
LL | #![warn(ellipsis_inclusive_range_patterns)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/range/range-inclusive-pattern-precedence2.stderr b/tests/ui/range/range-inclusive-pattern-precedence2.stderr
index bb4e3a13a..84294604c 100644
--- a/tests/ui/range/range-inclusive-pattern-precedence2.stderr
+++ b/tests/ui/range/range-inclusive-pattern-precedence2.stderr
@@ -18,5 +18,5 @@ note: the lint level is defined here
LL | #![warn(ellipsis_inclusive_range_patterns)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/range/range_traits-2.stderr b/tests/ui/range/range_traits-2.stderr
index 0829fc2ce..04778eecf 100644
--- a/tests/ui/range/range_traits-2.stderr
+++ b/tests/ui/range/range_traits-2.stderr
@@ -8,6 +8,6 @@ LL | struct R(Range<usize>);
|
= note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0204`.
diff --git a/tests/ui/range/range_traits-3.stderr b/tests/ui/range/range_traits-3.stderr
index db19d1bae..094cc146b 100644
--- a/tests/ui/range/range_traits-3.stderr
+++ b/tests/ui/range/range_traits-3.stderr
@@ -8,6 +8,6 @@ LL | struct R(RangeFrom<usize>);
|
= note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0204`.
diff --git a/tests/ui/range/range_traits-6.stderr b/tests/ui/range/range_traits-6.stderr
index dfc74f87c..7c66d1c74 100644
--- a/tests/ui/range/range_traits-6.stderr
+++ b/tests/ui/range/range_traits-6.stderr
@@ -8,6 +8,6 @@ LL | struct R(RangeInclusive<usize>);
|
= note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0204`.
diff --git a/tests/ui/reachable/expr_add.stderr b/tests/ui/reachable/expr_add.stderr
index 692bd20f5..f4a56fcbc 100644
--- a/tests/ui/reachable/expr_add.stderr
+++ b/tests/ui/reachable/expr_add.stderr
@@ -13,5 +13,5 @@ note: the lint level is defined here
LL | #![deny(unreachable_code)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/reachable/expr_again.stderr b/tests/ui/reachable/expr_again.stderr
index a3c54e135..5dec512ba 100644
--- a/tests/ui/reachable/expr_again.stderr
+++ b/tests/ui/reachable/expr_again.stderr
@@ -13,5 +13,5 @@ LL | #![deny(unreachable_code)]
| ^^^^^^^^^^^^^^^^
= note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/reachable/expr_repeat.stderr b/tests/ui/reachable/expr_repeat.stderr
index defa87046..1949af2a9 100644
--- a/tests/ui/reachable/expr_repeat.stderr
+++ b/tests/ui/reachable/expr_repeat.stderr
@@ -13,5 +13,5 @@ note: the lint level is defined here
LL | #![deny(unreachable_code)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/reachable/expr_return.stderr b/tests/ui/reachable/expr_return.stderr
index 3791559f4..c9766f14d 100644
--- a/tests/ui/reachable/expr_return.stderr
+++ b/tests/ui/reachable/expr_return.stderr
@@ -13,5 +13,5 @@ note: the lint level is defined here
LL | #![deny(unreachable_code)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/reachable/expr_return_in_macro.stderr b/tests/ui/reachable/expr_return_in_macro.stderr
index 3c562a7ee..68ba6529a 100644
--- a/tests/ui/reachable/expr_return_in_macro.stderr
+++ b/tests/ui/reachable/expr_return_in_macro.stderr
@@ -13,5 +13,5 @@ note: the lint level is defined here
LL | #![deny(unreachable_code)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/reachable/expr_type.stderr b/tests/ui/reachable/expr_type.stderr
index 3cb4a32e0..70536326f 100644
--- a/tests/ui/reachable/expr_type.stderr
+++ b/tests/ui/reachable/expr_type.stderr
@@ -13,5 +13,5 @@ note: the lint level is defined here
LL | #![deny(unreachable_code)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/reachable/unreachable-arm.stderr b/tests/ui/reachable/unreachable-arm.stderr
index 1cbea8288..60db82176 100644
--- a/tests/ui/reachable/unreachable-arm.stderr
+++ b/tests/ui/reachable/unreachable-arm.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/reachable/unreachable-code-ret.stderr b/tests/ui/reachable/unreachable-code-ret.stderr
index 263a1b5a9..824515a22 100644
--- a/tests/ui/reachable/unreachable-code-ret.stderr
+++ b/tests/ui/reachable/unreachable-code-ret.stderr
@@ -13,5 +13,5 @@ LL | #![deny(unreachable_code)]
| ^^^^^^^^^^^^^^^^
= note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/reachable/unreachable-code.stderr b/tests/ui/reachable/unreachable-code.stderr
index cb1b760c2..52be0277c 100644
--- a/tests/ui/reachable/unreachable-code.stderr
+++ b/tests/ui/reachable/unreachable-code.stderr
@@ -13,5 +13,5 @@ note: the lint level is defined here
LL | #![deny(unreachable_code)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/reachable/unreachable-loop-patterns.stderr b/tests/ui/reachable/unreachable-loop-patterns.stderr
index 80ffa5d73..1dea9d813 100644
--- a/tests/ui/reachable/unreachable-loop-patterns.stderr
+++ b/tests/ui/reachable/unreachable-loop-patterns.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/reachable/unreachable-variant.stderr b/tests/ui/reachable/unreachable-variant.stderr
index ca1d2be65..81faa59a0 100644
--- a/tests/ui/reachable/unreachable-variant.stderr
+++ b/tests/ui/reachable/unreachable-variant.stderr
@@ -10,6 +10,6 @@ note: the module `super_sekrit` is defined here
LL | mod super_sekrit {
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr b/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr
index 514bed607..e77fb025b 100644
--- a/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr
+++ b/tests/ui/recursion/issue-26548-recursion-via-normalize.stderr
@@ -6,6 +6,6 @@ error[E0391]: cycle detected when computing layout of `core::option::Option<S>`
= note: cycle used when computing layout of `core::option::Option<<S as Mirror>::It>`
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/recursion/issue-38591-non-regular-dropck-recursion.polonius.stderr b/tests/ui/recursion/issue-38591-non-regular-dropck-recursion.polonius.stderr
index 4b4fc4fb7..ff1a127e6 100644
--- a/tests/ui/recursion/issue-38591-non-regular-dropck-recursion.polonius.stderr
+++ b/tests/ui/recursion/issue-38591-non-regular-dropck-recursion.polonius.stderr
@@ -11,5 +11,5 @@ LL | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: the full type name has been written to '$TEST_BUILD_DIR/recursion/issue-38591-non-regular-dropck-recursion.polonius/issue-38591-non-regular-dropck-recursion.long-type.txt'
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/recursion/issue-38591-non-regular-dropck-recursion.stderr b/tests/ui/recursion/issue-38591-non-regular-dropck-recursion.stderr
index 002dfe115..a5bbc5499 100644
--- a/tests/ui/recursion/issue-38591-non-regular-dropck-recursion.stderr
+++ b/tests/ui/recursion/issue-38591-non-regular-dropck-recursion.stderr
@@ -6,6 +6,6 @@ LL | fn f(x: S<u32>) {}
|
= note: overflowed on S<fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(u32)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))>
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0320`.
diff --git a/tests/ui/recursion/issue-83150.stderr b/tests/ui/recursion/issue-83150.stderr
index 5df8af484..783f9cf76 100644
--- a/tests/ui/recursion/issue-83150.stderr
+++ b/tests/ui/recursion/issue-83150.stderr
@@ -16,6 +16,6 @@ error[E0275]: overflow evaluating the requirement `Map<&mut std::ops::Range<u8>,
= note: 65 redundant requirements hidden
= note: required for `&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut std::ops::Range<u8>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>` to implement `Iterator`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/recursion/issue-95134.rs b/tests/ui/recursion/issue-95134.rs
index 7ee31d85c..2f1cffa2f 100644
--- a/tests/ui/recursion/issue-95134.rs
+++ b/tests/ui/recursion/issue-95134.rs
@@ -3,7 +3,6 @@
// compile-flags: -Copt-level=0
// dont-check-failure-status
// dont-check-compiler-stderr
-// ignore-compare-mode-next-solver (hangs)
pub fn encode_num<Writer: ExampleWriter>(n: u32, mut writer: Writer) -> Result<(), Writer::Error> {
if n > 15 {
diff --git a/tests/ui/recursion/recursion.polonius.stderr b/tests/ui/recursion/recursion.polonius.stderr
index c727fe551..737e71e88 100644
--- a/tests/ui/recursion/recursion.polonius.stderr
+++ b/tests/ui/recursion/recursion.polonius.stderr
@@ -11,5 +11,5 @@ LL | fn test<T:Dot> (n:isize, i:isize, first:T, second:T) ->isize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: the full type name has been written to '$TEST_BUILD_DIR/recursion/recursion.polonius/recursion.long-type.txt'
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/recursion/recursion.stderr b/tests/ui/recursion/recursion.stderr
index cf0809537..7a9f04d4b 100644
--- a/tests/ui/recursion/recursion.stderr
+++ b/tests/ui/recursion/recursion.stderr
@@ -11,5 +11,5 @@ LL | fn test<T:Dot> (n:isize, i:isize, first:T, second:T) ->isize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: the full type name has been written to '$TEST_BUILD_DIR/recursion/recursion/recursion.long-type.txt'
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/recursion/recursive-enum.stderr b/tests/ui/recursion/recursive-enum.stderr
index d662d1022..b584cb466 100644
--- a/tests/ui/recursion/recursive-enum.stderr
+++ b/tests/ui/recursion/recursive-enum.stderr
@@ -9,6 +9,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | enum List<T> { Cons(T, Box<List<T>>), Nil }
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/recursion/recursive-reexports.stderr b/tests/ui/recursion/recursive-reexports.stderr
index f39d0a0d5..71653d26a 100644
--- a/tests/ui/recursion/recursive-reexports.stderr
+++ b/tests/ui/recursion/recursive-reexports.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `S` in crate `recursive_reexports`
LL | fn f() -> recursive_reexports::S {}
| ^ not found in `recursive_reexports`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/recursion/recursive-static-definition.stderr b/tests/ui/recursion/recursive-static-definition.stderr
index b112228d4..570d203d0 100644
--- a/tests/ui/recursion/recursive-static-definition.stderr
+++ b/tests/ui/recursion/recursive-static-definition.stderr
@@ -20,6 +20,6 @@ LL | | fn main() {}
| |____________^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/recursion/recursive-types-are-not-uninhabited.stderr b/tests/ui/recursion/recursive-types-are-not-uninhabited.stderr
index 1b4d80d90..5abec88ee 100644
--- a/tests/ui/recursion/recursive-types-are-not-uninhabited.stderr
+++ b/tests/ui/recursion/recursive-types-are-not-uninhabited.stderr
@@ -12,6 +12,6 @@ help: you might want to use `let else` to handle the variant that isn't matched
LL | let Ok(x) = res else { todo!() };
| ++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0005`.
diff --git a/tests/ui/recursion_limit/invalid_digit_type.stderr b/tests/ui/recursion_limit/invalid_digit_type.stderr
index 6d1409bb3..94442b574 100644
--- a/tests/ui/recursion_limit/invalid_digit_type.stderr
+++ b/tests/ui/recursion_limit/invalid_digit_type.stderr
@@ -4,5 +4,5 @@ error: malformed `recursion_limit` attribute input
LL | #![recursion_limit = 123]
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![recursion_limit = "N"]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/recursion_limit/invalid_macro.stderr b/tests/ui/recursion_limit/invalid_macro.stderr
index 0189e99da..aa4894ec4 100644
--- a/tests/ui/recursion_limit/invalid_macro.stderr
+++ b/tests/ui/recursion_limit/invalid_macro.stderr
@@ -4,5 +4,5 @@ error: malformed `recursion_limit` attribute input
LL | #![recursion_limit = foo!()]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![recursion_limit = "N"]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/recursion_limit/issue-105700.stderr b/tests/ui/recursion_limit/issue-105700.stderr
index 9b1114e9c..fd53d248c 100644
--- a/tests/ui/recursion_limit/issue-105700.stderr
+++ b/tests/ui/recursion_limit/issue-105700.stderr
@@ -6,5 +6,5 @@ LL | #![invalid_attribute]
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "8"]` attribute to your crate (`issue_105700`)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/recursion_limit/no-value.stderr b/tests/ui/recursion_limit/no-value.stderr
index 35ac2c4cd..b2e8c46c3 100644
--- a/tests/ui/recursion_limit/no-value.stderr
+++ b/tests/ui/recursion_limit/no-value.stderr
@@ -4,5 +4,5 @@ error: malformed `recursion_limit` attribute input
LL | #![recursion_limit]
| ^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![recursion_limit = "N"]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/recursion_limit/zero-overflow.stderr b/tests/ui/recursion_limit/zero-overflow.stderr
index 9007ec0d7..fc03cc5b6 100644
--- a/tests/ui/recursion_limit/zero-overflow.stderr
+++ b/tests/ui/recursion_limit/zero-overflow.stderr
@@ -2,6 +2,6 @@ error[E0275]: overflow evaluating the requirement `&mut Self: DispatchFromDyn<&m
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "2"]` attribute to your crate (`zero_overflow`)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/recursion_limit/zero.stderr b/tests/ui/recursion_limit/zero.stderr
index b43565909..f97eff193 100644
--- a/tests/ui/recursion_limit/zero.stderr
+++ b/tests/ui/recursion_limit/zero.stderr
@@ -6,5 +6,5 @@ LL | test!(test);
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "2"]` attribute to your crate (`zero`)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/do-not-suggest-adding-bound-to-opaque-type.stderr b/tests/ui/regions/do-not-suggest-adding-bound-to-opaque-type.stderr
index d76a83b02..509863eaf 100644
--- a/tests/ui/regions/do-not-suggest-adding-bound-to-opaque-type.stderr
+++ b/tests/ui/regions/do-not-suggest-adding-bound-to-opaque-type.stderr
@@ -11,6 +11,6 @@ LL | S(&x)
LL | }
| - `x` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/regions/forall-wf-ref-reflexive.stderr b/tests/ui/regions/forall-wf-ref-reflexive.stderr
index 3d059ccec..5ee7cc786 100644
--- a/tests/ui/regions/forall-wf-ref-reflexive.stderr
+++ b/tests/ui/regions/forall-wf-ref-reflexive.stderr
@@ -4,5 +4,5 @@ error: `T` does not live long enough
LL | self_wf2::<T>();
| ^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/issue-101280.stderr b/tests/ui/regions/issue-101280.stderr
index 320d008ae..48deb9949 100644
--- a/tests/ui/regions/issue-101280.stderr
+++ b/tests/ui/regions/issue-101280.stderr
@@ -6,9 +6,9 @@ LL | fn f<'r>(f: fn(Cell<(&'r i32, &i32)>)) -> Ty {
LL | f
| ^ one type is more general than the other
|
- = note: expected fn pointer `for<'r> fn(Cell<(&'r i32, &'r i32)>)`
- found fn pointer `for<'a> fn(Cell<(&'r i32, &'a i32)>)`
+ = note: expected fn pointer `for<'r> fn(Cell<(&'r _, &'r _)>)`
+ found fn pointer `for<'a> fn(Cell<(&'r _, &'a _)>)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/regions/issue-102374.stderr b/tests/ui/regions/issue-102374.stderr
index a4230cf8b..e07dca0c7 100644
--- a/tests/ui/regions/issue-102374.stderr
+++ b/tests/ui/regions/issue-102374.stderr
@@ -9,6 +9,6 @@ LL | f
= note: expected type `i32`
found fn pointer `for<'z1, 'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, 'o, 'p, 'q, 'r, 's, 't, 'u, 'v, 'w, 'x, 'y, 'z, 'z0> fn(Cell<(&'z1 i32, &'a i32, &'b i32, &'c i32, &'d i32, &'e i32, &'f i32, &'g i32, &'h i32, &'i i32, &'j i32, &'k i32, &'l i32, &'m i32, &'n i32, &'o i32, &'p i32, &'q i32, &'r i32, &'s i32, &'t i32, &'u i32, &'v i32, &'w i32, &'x i32, &'y i32, &'z i32, &'z0 i32)>)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/regions/issue-102392.stderr b/tests/ui/regions/issue-102392.stderr
index 56f4c0c5d..fb3373091 100644
--- a/tests/ui/regions/issue-102392.stderr
+++ b/tests/ui/regions/issue-102392.stderr
@@ -9,6 +9,6 @@ LL | f
= note: expected type `bool`
found fn pointer `for<'a> fn(for<'b> fn(&'b str, &'a str))`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/regions/issue-12470.stderr b/tests/ui/regions/issue-12470.stderr
index c97e59195..e6e629321 100644
--- a/tests/ui/regions/issue-12470.stderr
+++ b/tests/ui/regions/issue-12470.stderr
@@ -6,6 +6,6 @@ LL | let bb: &B = &*b;
LL | make_a(bb)
| ^^^^^^^^^^ returns a value referencing data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/regions/issue-28848.stderr b/tests/ui/regions/issue-28848.stderr
index a29dac4c9..058229583 100644
--- a/tests/ui/regions/issue-28848.stderr
+++ b/tests/ui/regions/issue-28848.stderr
@@ -10,5 +10,5 @@ LL | Foo::<'a, 'b>::xmute(u)
|
= help: consider adding the following bound: `'b: 'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/issue-78262.base.stderr b/tests/ui/regions/issue-78262.base.stderr
index 7f232e4a7..113c84c65 100644
--- a/tests/ui/regions/issue-78262.base.stderr
+++ b/tests/ui/regions/issue-78262.base.stderr
@@ -9,6 +9,6 @@ LL | let f = |x: &dyn TT| x.func();
| | let's call the lifetime of this reference `'1`
| `x` is a reference that is only valid in the closure body
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0521`.
diff --git a/tests/ui/regions/issue-78262.polonius.stderr b/tests/ui/regions/issue-78262.polonius.stderr
index 7f232e4a7..113c84c65 100644
--- a/tests/ui/regions/issue-78262.polonius.stderr
+++ b/tests/ui/regions/issue-78262.polonius.stderr
@@ -9,6 +9,6 @@ LL | let f = |x: &dyn TT| x.func();
| | let's call the lifetime of this reference `'1`
| `x` is a reference that is only valid in the closure body
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0521`.
diff --git a/tests/ui/regions/outlives-with-missing.stderr b/tests/ui/regions/outlives-with-missing.stderr
index e204c9187..0e3aaaf5f 100644
--- a/tests/ui/regions/outlives-with-missing.stderr
+++ b/tests/ui/regions/outlives-with-missing.stderr
@@ -7,6 +7,6 @@ LL | impl<H: HandlerFamily> HandlerWrapper<H> {
LL | T: Send + Sync + 'static,
| ^ help: a type parameter with a similar name exists: `H`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/regions/region-bound-on-closure-outlives-call.stderr b/tests/ui/regions/region-bound-on-closure-outlives-call.stderr
index ea43dde11..96d0cb80a 100644
--- a/tests/ui/regions/region-bound-on-closure-outlives-call.stderr
+++ b/tests/ui/regions/region-bound-on-closure-outlives-call.stderr
@@ -19,6 +19,6 @@ LL | (|x| f(x))(call_rec(f))
| | borrow occurs due to use in closure
| borrow of `f` occurs here
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0505`.
diff --git a/tests/ui/regions/region-invariant-static-error-reporting.stderr b/tests/ui/regions/region-invariant-static-error-reporting.stderr
index 2ad39b000..834d5c6cf 100644
--- a/tests/ui/regions/region-invariant-static-error-reporting.stderr
+++ b/tests/ui/regions/region-invariant-static-error-reporting.stderr
@@ -16,6 +16,6 @@ LL | x.unwrap()
= note: the struct `Invariant<'a>` is invariant over the parameter `'a`
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0521`.
diff --git a/tests/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr b/tests/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr
index a9a92b7a6..d8269514b 100644
--- a/tests/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr
+++ b/tests/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr
@@ -6,9 +6,9 @@ LL | let _: fn(&mut &isize, &mut &isize) = a;
| |
| expected due to this
|
- = note: expected fn pointer `for<'a, 'b, 'c, 'd> fn(&'a mut &'b isize, &'c mut &'d isize)`
- found fn item `for<'a, 'b> fn(&'a mut &isize, &'b mut &isize) {a::<'_, '_>}`
+ = note: expected fn pointer `for<'a, 'b, 'c, 'd> fn(&'a mut &'b _, &'c mut &'d _)`
+ found fn item `for<'a, 'b> fn(&'a mut &_, &'b mut &_) {a::<'_, '_>}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr b/tests/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr
index e96559937..e383f352b 100644
--- a/tests/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr
+++ b/tests/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr
@@ -6,9 +6,9 @@ LL | let _: fn(&mut &isize, &mut &isize, &mut &isize) = a;
| |
| expected due to this
|
- = note: expected fn pointer `for<'a, 'b, 'c, 'd, 'e, 'f> fn(&'a mut &'b isize, &'c mut &'d isize, &'e mut &'f isize)`
- found fn item `for<'a, 'b, 'c> fn(&'a mut &isize, &'b mut &isize, &'c mut &isize) {a::<'_, '_, '_>}`
+ = note: expected fn pointer `for<'a, 'b, 'c, 'd, 'e, 'f> fn(&'a mut &'b _, &'c mut &'d _, &'e mut &'f _)`
+ found fn item `for<'a, 'b, 'c> fn(&'a mut &_, &'b mut &_, &'c mut &_) {a::<'_, '_, '_>}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/regions/region-object-lifetime-2.stderr b/tests/ui/regions/region-object-lifetime-2.stderr
index d95289f3f..7eb5d39ec 100644
--- a/tests/ui/regions/region-object-lifetime-2.stderr
+++ b/tests/ui/regions/region-object-lifetime-2.stderr
@@ -10,5 +10,5 @@ LL | x.borrowed()
|
= help: consider adding the following bound: `'a: 'b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/region-object-lifetime-4.stderr b/tests/ui/regions/region-object-lifetime-4.stderr
index fda66a241..713252dbc 100644
--- a/tests/ui/regions/region-object-lifetime-4.stderr
+++ b/tests/ui/regions/region-object-lifetime-4.stderr
@@ -10,5 +10,5 @@ LL | x.borrowed()
|
= help: consider adding the following bound: `'a: 'b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/region-object-lifetime-5.stderr b/tests/ui/regions/region-object-lifetime-5.stderr
index b86f6e3a2..e8960fcc6 100644
--- a/tests/ui/regions/region-object-lifetime-5.stderr
+++ b/tests/ui/regions/region-object-lifetime-5.stderr
@@ -7,6 +7,6 @@ LL | x.borrowed()
| returns a value referencing data owned by the current function
| `*x` is borrowed here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/regions/regions-addr-of-self.stderr b/tests/ui/regions/regions-addr-of-self.stderr
index 3d7aac74b..75e1abdda 100644
--- a/tests/ui/regions/regions-addr-of-self.stderr
+++ b/tests/ui/regions/regions-addr-of-self.stderr
@@ -6,5 +6,5 @@ LL | pub fn chase_cat(&mut self) {
LL | let p: &'static mut usize = &mut self.cats_chased;
| ^^^^^^^^^^^^^^^^^^ type annotation requires that `'1` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-assoc-type-in-supertrait-outlives-container.stderr b/tests/ui/regions/regions-assoc-type-in-supertrait-outlives-container.stderr
index 2a2625203..2a5831aad 100644
--- a/tests/ui/regions/regions-assoc-type-in-supertrait-outlives-container.stderr
+++ b/tests/ui/regions/regions-assoc-type-in-supertrait-outlives-container.stderr
@@ -11,5 +11,5 @@ LL | let _: &'a WithAssoc<TheType<'b>> = loop { };
|
= help: consider adding the following bound: `'b: 'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.stderr b/tests/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.stderr
index a96f5612f..6ffe416ca 100644
--- a/tests/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.stderr
+++ b/tests/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.stderr
@@ -10,6 +10,6 @@ note: type must satisfy the static lifetime as required by this binding
LL | type Value: 'static;
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0477`.
diff --git a/tests/ui/regions/regions-bounded-method-type-parameters-cross-crate.stderr b/tests/ui/regions/regions-bounded-method-type-parameters-cross-crate.stderr
index 6193bf02f..bd8640b9d 100644
--- a/tests/ui/regions/regions-bounded-method-type-parameters-cross-crate.stderr
+++ b/tests/ui/regions/regions-bounded-method-type-parameters-cross-crate.stderr
@@ -14,5 +14,5 @@ LL | a.bigger_region(b)
= note: the struct `Inv<'a>` is invariant over the parameter `'a`
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-bounded-method-type-parameters-trait-bound.stderr b/tests/ui/regions/regions-bounded-method-type-parameters-trait-bound.stderr
index 0e0086be9..df37df99b 100644
--- a/tests/ui/regions/regions-bounded-method-type-parameters-trait-bound.stderr
+++ b/tests/ui/regions/regions-bounded-method-type-parameters-trait-bound.stderr
@@ -14,5 +14,5 @@ LL | f.method(b);
= note: the struct `Inv<'a>` is invariant over the parameter `'a`
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-bounded-method-type-parameters.stderr b/tests/ui/regions/regions-bounded-method-type-parameters.stderr
index b6d7b8aac..f13754044 100644
--- a/tests/ui/regions/regions-bounded-method-type-parameters.stderr
+++ b/tests/ui/regions/regions-bounded-method-type-parameters.stderr
@@ -6,5 +6,5 @@ LL | fn caller<'a>(x: &isize) {
LL | Foo.some_method::<&'a isize>();
| ^^^^^^^^^^^ requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-close-object-into-object-1.stderr b/tests/ui/regions/regions-close-object-into-object-1.stderr
index 5bfaeb295..8353587c6 100644
--- a/tests/ui/regions/regions-close-object-into-object-1.stderr
+++ b/tests/ui/regions/regions-close-object-into-object-1.stderr
@@ -7,6 +7,6 @@ LL | Box::new(B(&*v)) as Box<X>
| | `*v` is borrowed here
| returns a value referencing data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/regions/regions-close-object-into-object-3.stderr b/tests/ui/regions/regions-close-object-into-object-3.stderr
index 9f92c40e1..706595ae8 100644
--- a/tests/ui/regions/regions-close-object-into-object-3.stderr
+++ b/tests/ui/regions/regions-close-object-into-object-3.stderr
@@ -7,6 +7,6 @@ LL | Box::new(B(&*v)) as Box<X>
| | `*v` is borrowed here
| returns a value referencing data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/regions/regions-close-over-type-parameter-multiple.stderr b/tests/ui/regions/regions-close-over-type-parameter-multiple.stderr
index baa0506d0..a353ff89b 100644
--- a/tests/ui/regions/regions-close-over-type-parameter-multiple.stderr
+++ b/tests/ui/regions/regions-close-over-type-parameter-multiple.stderr
@@ -11,5 +11,5 @@ LL | Box::new(v) as Box<dyn SomeTrait + 'a>
|
= help: consider adding the following bound: `'a: 'c`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-creating-enums3.stderr b/tests/ui/regions/regions-creating-enums3.stderr
index 41d609b56..93a0a1dc7 100644
--- a/tests/ui/regions/regions-creating-enums3.stderr
+++ b/tests/ui/regions/regions-creating-enums3.stderr
@@ -10,5 +10,5 @@ LL | Ast::Add(x, y)
|
= help: consider adding the following bound: `'b: 'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-creating-enums4.stderr b/tests/ui/regions/regions-creating-enums4.stderr
index 91cf57e09..fee2b7779 100644
--- a/tests/ui/regions/regions-creating-enums4.stderr
+++ b/tests/ui/regions/regions-creating-enums4.stderr
@@ -10,5 +10,5 @@ LL | Ast::Add(x, y)
|
= help: consider adding the following bound: `'a: 'b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-early-bound-error-method.stderr b/tests/ui/regions/regions-early-bound-error-method.stderr
index a7746d898..8c79eb222 100644
--- a/tests/ui/regions/regions-early-bound-error-method.stderr
+++ b/tests/ui/regions/regions-early-bound-error-method.stderr
@@ -10,5 +10,5 @@ LL | g2.get()
|
= help: consider adding the following bound: `'b: 'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-early-bound-error.stderr b/tests/ui/regions/regions-early-bound-error.stderr
index eb4cd5ca7..5ad16069a 100644
--- a/tests/ui/regions/regions-early-bound-error.stderr
+++ b/tests/ui/regions/regions-early-bound-error.stderr
@@ -10,5 +10,5 @@ LL | g1.get()
|
= help: consider adding the following bound: `'a: 'b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-escape-method.stderr b/tests/ui/regions/regions-escape-method.stderr
index 9f425125b..aeda923b0 100644
--- a/tests/ui/regions/regions-escape-method.stderr
+++ b/tests/ui/regions/regions-escape-method.stderr
@@ -7,5 +7,5 @@ LL | s.f(|p| p)
| |return type of closure is &'2 i32
| has type `&'1 i32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-escape-via-trait-or-not.stderr b/tests/ui/regions/regions-escape-via-trait-or-not.stderr
index cae6c33ac..4d185e52d 100644
--- a/tests/ui/regions/regions-escape-via-trait-or-not.stderr
+++ b/tests/ui/regions/regions-escape-via-trait-or-not.stderr
@@ -7,5 +7,5 @@ LL | with(|o| o)
| |return type of closure is &'2 isize
| has type `&'1 isize`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-fn-subtyping-return-static-fail.stderr b/tests/ui/regions/regions-fn-subtyping-return-static-fail.stderr
index 8d82ff958..2ccdd65f2 100644
--- a/tests/ui/regions/regions-fn-subtyping-return-static-fail.stderr
+++ b/tests/ui/regions/regions-fn-subtyping-return-static-fail.stderr
@@ -14,6 +14,6 @@ note: function defined here
LL | fn want_G(f: G) {}
| ^^^^^^ ----
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/regions/regions-free-region-ordering-callee-4.stderr b/tests/ui/regions/regions-free-region-ordering-callee-4.stderr
index 1df7ca0e3..1c8f1c1e4 100644
--- a/tests/ui/regions/regions-free-region-ordering-callee-4.stderr
+++ b/tests/ui/regions/regions-free-region-ordering-callee-4.stderr
@@ -15,6 +15,6 @@ note: but the referenced data is only valid for the lifetime `'b` as defined her
LL | fn ordering4<'a, 'b, F>(a: &'a usize, b: &'b usize, x: F) where F: FnOnce(&'a &'b usize) {
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0491`.
diff --git a/tests/ui/regions/regions-free-region-ordering-incorrect.stderr b/tests/ui/regions/regions-free-region-ordering-incorrect.stderr
index d0ceaec3b..9025f0c3c 100644
--- a/tests/ui/regions/regions-free-region-ordering-incorrect.stderr
+++ b/tests/ui/regions/regions-free-region-ordering-incorrect.stderr
@@ -13,5 +13,5 @@ LL | | }
|
= help: consider adding the following bound: `'a: 'b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-glb-free-free.stderr b/tests/ui/regions/regions-glb-free-free.stderr
index 575037a0a..727669f26 100644
--- a/tests/ui/regions/regions-glb-free-free.stderr
+++ b/tests/ui/regions/regions-glb-free-free.stderr
@@ -11,6 +11,6 @@ LL | | value: self.value
LL | | }
| |_____________^ lifetime `'a` required
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0621`.
diff --git a/tests/ui/regions/regions-implied-bounds-projection-gap-1.stderr b/tests/ui/regions/regions-implied-bounds-projection-gap-1.stderr
index 8c1791fc1..7d9f9121a 100644
--- a/tests/ui/regions/regions-implied-bounds-projection-gap-1.stderr
+++ b/tests/ui/regions/regions-implied-bounds-projection-gap-1.stderr
@@ -12,6 +12,6 @@ help: consider adding an explicit lifetime bound
LL | fn func<'x, T:Trait1<'x> + 'x>(t: &'x T::Foo)
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0309`.
diff --git a/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr b/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr
index 6844e8665..1555e5981 100644
--- a/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr
+++ b/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr
@@ -9,6 +9,6 @@ help: consider restricting type parameter `T`
LL | fn callee<'x, 'y, T: for<'z> Trait2<'y, 'z>>(t: &'x dyn for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >)
| ++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/regions/regions-in-enums-anon.stderr b/tests/ui/regions/regions-in-enums-anon.stderr
index ed547aa9c..86a6d33d6 100644
--- a/tests/ui/regions/regions-in-enums-anon.stderr
+++ b/tests/ui/regions/regions-in-enums-anon.stderr
@@ -10,6 +10,6 @@ LL ~ enum Foo<'a> {
LL ~ Bar(&'a isize)
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0106`.
diff --git a/tests/ui/regions/regions-in-structs-anon.stderr b/tests/ui/regions/regions-in-structs-anon.stderr
index 992d25c9f..2679ef93b 100644
--- a/tests/ui/regions/regions-in-structs-anon.stderr
+++ b/tests/ui/regions/regions-in-structs-anon.stderr
@@ -10,6 +10,6 @@ LL ~ struct Foo<'a> {
LL ~ x: &'a isize
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0106`.
diff --git a/tests/ui/regions/regions-infer-at-fn-not-param.stderr b/tests/ui/regions/regions-infer-at-fn-not-param.stderr
index 8cfc44f6a..4c7660276 100644
--- a/tests/ui/regions/regions-infer-at-fn-not-param.stderr
+++ b/tests/ui/regions/regions-infer-at-fn-not-param.stderr
@@ -6,6 +6,6 @@ LL | fn take1<'a>(p: Parameterized1) -> Parameterized1<'a> { p }
| |
| help: add explicit lifetime `'a` to the type of `p`: `Parameterized1<'a>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0621`.
diff --git a/tests/ui/regions/regions-infer-borrow-scope-too-big.stderr b/tests/ui/regions/regions-infer-borrow-scope-too-big.stderr
index 2c7a6e8b5..15dc1cef8 100644
--- a/tests/ui/regions/regions-infer-borrow-scope-too-big.stderr
+++ b/tests/ui/regions/regions-infer-borrow-scope-too-big.stderr
@@ -7,6 +7,6 @@ LL | assert_eq!(*xc, 3);
LL | return xc;
| ^^ returns a value referencing data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/regions/regions-infer-bound-from-trait-self.stderr b/tests/ui/regions/regions-infer-bound-from-trait-self.stderr
index d0c4b9a57..7bf112dc7 100644
--- a/tests/ui/regions/regions-infer-bound-from-trait-self.stderr
+++ b/tests/ui/regions/regions-infer-bound-from-trait-self.stderr
@@ -12,6 +12,6 @@ help: consider adding an explicit lifetime bound
LL | trait InheritsFromNothing<'a> : Sized where Self: 'a {
| ++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0309`.
diff --git a/tests/ui/regions/regions-infer-call-3.stderr b/tests/ui/regions/regions-infer-call-3.stderr
index ca51555a0..14d1ce7ae 100644
--- a/tests/ui/regions/regions-infer-call-3.stderr
+++ b/tests/ui/regions/regions-infer-call-3.stderr
@@ -7,5 +7,5 @@ LL | let z = with(|y| { select(x, y) });
| |return type of closure is &'2 isize
| has type `&'1 isize`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-infer-contravariance-due-to-decl.stderr b/tests/ui/regions/regions-infer-contravariance-due-to-decl.stderr
index 94b80852d..56ee07bde 100644
--- a/tests/ui/regions/regions-infer-contravariance-due-to-decl.stderr
+++ b/tests/ui/regions/regions-infer-contravariance-due-to-decl.stderr
@@ -11,5 +11,5 @@ LL | let _: Contravariant<'long> = c;
|
= help: consider adding the following bound: `'short: 'long`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-infer-covariance-due-to-decl.stderr b/tests/ui/regions/regions-infer-covariance-due-to-decl.stderr
index f44a0fad5..013475c26 100644
--- a/tests/ui/regions/regions-infer-covariance-due-to-decl.stderr
+++ b/tests/ui/regions/regions-infer-covariance-due-to-decl.stderr
@@ -11,5 +11,5 @@ LL | let _: Covariant<'short> = c;
|
= help: consider adding the following bound: `'short: 'long`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-infer-invariance-due-to-decl.stderr b/tests/ui/regions/regions-infer-invariance-due-to-decl.stderr
index c8c7808e0..2b17f74ad 100644
--- a/tests/ui/regions/regions-infer-invariance-due-to-decl.stderr
+++ b/tests/ui/regions/regions-infer-invariance-due-to-decl.stderr
@@ -10,5 +10,5 @@ LL | b_isize
= note: the struct `Invariant<'a>` is invariant over the parameter `'a`
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-infer-invariance-due-to-mutability-3.stderr b/tests/ui/regions/regions-infer-invariance-due-to-mutability-3.stderr
index 1165011c1..9cb9dac4f 100644
--- a/tests/ui/regions/regions-infer-invariance-due-to-mutability-3.stderr
+++ b/tests/ui/regions/regions-infer-invariance-due-to-mutability-3.stderr
@@ -10,5 +10,5 @@ LL | b_isize
= note: the struct `Invariant<'a>` is invariant over the parameter `'a`
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-infer-invariance-due-to-mutability-4.stderr b/tests/ui/regions/regions-infer-invariance-due-to-mutability-4.stderr
index f3973a93b..098a9c11d 100644
--- a/tests/ui/regions/regions-infer-invariance-due-to-mutability-4.stderr
+++ b/tests/ui/regions/regions-infer-invariance-due-to-mutability-4.stderr
@@ -10,5 +10,5 @@ LL | b_isize
= note: the struct `Invariant<'a>` is invariant over the parameter `'a`
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-infer-paramd-indirect.stderr b/tests/ui/regions/regions-infer-paramd-indirect.stderr
index afabdc1de..4a1cd1119 100644
--- a/tests/ui/regions/regions-infer-paramd-indirect.stderr
+++ b/tests/ui/regions/regions-infer-paramd-indirect.stderr
@@ -9,5 +9,5 @@ LL | fn set_f_bad(&mut self, b: Box<B>) {
LL | self.f = b;
| ^^^^^^ assignment requires that `'1` must outlive `'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-infer-proc-static-upvar.stderr b/tests/ui/regions/regions-infer-proc-static-upvar.stderr
index c8a33bbc5..919fcffdc 100644
--- a/tests/ui/regions/regions-infer-proc-static-upvar.stderr
+++ b/tests/ui/regions/regions-infer-proc-static-upvar.stderr
@@ -12,6 +12,6 @@ LL | | });
LL | }
| - `x` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/regions/regions-lifetime-bounds-on-fns.stderr b/tests/ui/regions/regions-lifetime-bounds-on-fns.stderr
index 53a5612d2..989e91c70 100644
--- a/tests/ui/regions/regions-lifetime-bounds-on-fns.stderr
+++ b/tests/ui/regions/regions-lifetime-bounds-on-fns.stderr
@@ -6,9 +6,9 @@ LL | let _: fn(&mut &isize, &mut &isize) = a;
| |
| expected due to this
|
- = note: expected fn pointer `for<'a, 'b, 'c, 'd> fn(&'a mut &'b isize, &'c mut &'d isize)`
- found fn item `for<'a, 'b> fn(&'a mut &isize, &'b mut &isize) {a::<'_, '_>}`
+ = note: expected fn pointer `for<'a, 'b, 'c, 'd> fn(&'a mut &'b _, &'c mut &'d _)`
+ found fn item `for<'a, 'b> fn(&'a mut &_, &'b mut &_) {a::<'_, '_>}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/regions/regions-lifetime-static-items-enclosing-scopes.rs b/tests/ui/regions/regions-lifetime-static-items-enclosing-scopes.rs
index b6a89e29e..2c455fc35 100644
--- a/tests/ui/regions/regions-lifetime-static-items-enclosing-scopes.rs
+++ b/tests/ui/regions/regions-lifetime-static-items-enclosing-scopes.rs
@@ -3,9 +3,6 @@
// This test verifies that temporary lifetime is correctly computed
// for static objects in enclosing scopes.
-
-use std::cmp::PartialEq;
-
fn f<T:PartialEq+std::fmt::Debug>(o: &mut Option<T>) {
assert_eq!(*o, None);
}
diff --git a/tests/ui/regions/regions-name-duplicated.stderr b/tests/ui/regions/regions-name-duplicated.stderr
index cef73c18d..8b0cc925a 100644
--- a/tests/ui/regions/regions-name-duplicated.stderr
+++ b/tests/ui/regions/regions-name-duplicated.stderr
@@ -6,6 +6,6 @@ LL | struct Foo<'a, 'a> {
| |
| first use of `'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0403`.
diff --git a/tests/ui/regions/regions-name-static.stderr b/tests/ui/regions/regions-name-static.stderr
index 4b7026e65..6d334b498 100644
--- a/tests/ui/regions/regions-name-static.stderr
+++ b/tests/ui/regions/regions-name-static.stderr
@@ -4,6 +4,6 @@ error[E0262]: invalid lifetime parameter name: `'static`
LL | struct Foo<'static> {
| ^^^^^^^ 'static is a reserved lifetime name
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0262`.
diff --git a/tests/ui/regions/regions-nested-fns-2.stderr b/tests/ui/regions/regions-nested-fns-2.stderr
index 43c8d1272..254497639 100644
--- a/tests/ui/regions/regions-nested-fns-2.stderr
+++ b/tests/ui/regions/regions-nested-fns-2.stderr
@@ -12,6 +12,6 @@ LL | if false { &y } else { z }
LL | }
| - `y` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/regions/regions-normalize-in-where-clause-list.stderr b/tests/ui/regions/regions-normalize-in-where-clause-list.stderr
index 567283729..2e76333e2 100644
--- a/tests/ui/regions/regions-normalize-in-where-clause-list.stderr
+++ b/tests/ui/regions/regions-normalize-in-where-clause-list.stderr
@@ -22,6 +22,6 @@ LL | fn bar<'a, 'b>()
= note: expected `Project<'a, 'b>`
found `Project<'_, '_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0495`.
diff --git a/tests/ui/regions/regions-outlives-projection-container-wc.stderr b/tests/ui/regions/regions-outlives-projection-container-wc.stderr
index eba2a0d58..1c270d6c3 100644
--- a/tests/ui/regions/regions-outlives-projection-container-wc.stderr
+++ b/tests/ui/regions/regions-outlives-projection-container-wc.stderr
@@ -11,5 +11,5 @@ LL | let _: &'a WithAssoc<TheType<'b>> = loop { };
|
= help: consider adding the following bound: `'b: 'a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-pattern-typing-issue-19552.stderr b/tests/ui/regions/regions-pattern-typing-issue-19552.stderr
index 18aec29ad..1d3d5e831 100644
--- a/tests/ui/regions/regions-pattern-typing-issue-19552.stderr
+++ b/tests/ui/regions/regions-pattern-typing-issue-19552.stderr
@@ -11,6 +11,6 @@ LL | }
LL | }
| - `line` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/regions/regions-pattern-typing-issue-19997.stderr b/tests/ui/regions/regions-pattern-typing-issue-19997.stderr
index 0abe77a86..b2f63b3b8 100644
--- a/tests/ui/regions/regions-pattern-typing-issue-19997.stderr
+++ b/tests/ui/regions/regions-pattern-typing-issue-19997.stderr
@@ -9,6 +9,6 @@ LL | a1 = &f;
LL | drop(b0);
| -- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/regions/regions-proc-bound-capture.stderr b/tests/ui/regions/regions-proc-bound-capture.stderr
index 60c5246e2..3fe497bf2 100644
--- a/tests/ui/regions/regions-proc-bound-capture.stderr
+++ b/tests/ui/regions/regions-proc-bound-capture.stderr
@@ -16,5 +16,5 @@ help: alternatively, add an explicit `'static` bound to this reference
LL | fn static_proc(x: &'static isize) -> Box<dyn FnMut() -> (isize) + 'static> {
| ~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.stderr b/tests/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.stderr
index dc905d076..40d4f1652 100644
--- a/tests/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.stderr
+++ b/tests/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.stderr
@@ -10,5 +10,5 @@ LL | &mut ***p
|
= help: consider adding the following bound: `'a: 'b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-reborrow-from-shorter-mut-ref.stderr b/tests/ui/regions/regions-reborrow-from-shorter-mut-ref.stderr
index c98ec4774..fd23fce76 100644
--- a/tests/ui/regions/regions-reborrow-from-shorter-mut-ref.stderr
+++ b/tests/ui/regions/regions-reborrow-from-shorter-mut-ref.stderr
@@ -10,5 +10,5 @@ LL | &mut **p
|
= help: consider adding the following bound: `'a: 'b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-ret-borrowed-1.stderr b/tests/ui/regions/regions-ret-borrowed-1.stderr
index 0784e894e..4ad526602 100644
--- a/tests/ui/regions/regions-ret-borrowed-1.stderr
+++ b/tests/ui/regions/regions-ret-borrowed-1.stderr
@@ -7,5 +7,5 @@ LL | with(|o| o)
| |return type of closure is &'2 isize
| has type `&'1 isize`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-ret-borrowed.stderr b/tests/ui/regions/regions-ret-borrowed.stderr
index d9be5ef89..f16a4a2e8 100644
--- a/tests/ui/regions/regions-ret-borrowed.stderr
+++ b/tests/ui/regions/regions-ret-borrowed.stderr
@@ -7,5 +7,5 @@ LL | with(|o| o)
| |return type of closure is &'2 isize
| has type `&'1 isize`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-ret.stderr b/tests/ui/regions/regions-ret.stderr
index 0e4875ac9..470b6ab06 100644
--- a/tests/ui/regions/regions-ret.stderr
+++ b/tests/ui/regions/regions-ret.stderr
@@ -7,6 +7,6 @@ LL | return &id(3);
| |temporary value created here
| returns a reference to data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/regions/regions-return-ref-to-upvar-issue-17403.stderr b/tests/ui/regions/regions-return-ref-to-upvar-issue-17403.stderr
index b087e03b4..be9ffbe8d 100644
--- a/tests/ui/regions/regions-return-ref-to-upvar-issue-17403.stderr
+++ b/tests/ui/regions/regions-return-ref-to-upvar-issue-17403.stderr
@@ -13,5 +13,5 @@ LL | let mut f = || &mut x;
= note: `FnMut` closures only have access to their captured variables while they are executing...
= note: ...therefore, they cannot allow references to captured variables to escape
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-return-stack-allocated-vec.stderr b/tests/ui/regions/regions-return-stack-allocated-vec.stderr
index 9d87fe266..68631c74e 100644
--- a/tests/ui/regions/regions-return-stack-allocated-vec.stderr
+++ b/tests/ui/regions/regions-return-stack-allocated-vec.stderr
@@ -7,6 +7,6 @@ LL | &[x]
| |temporary value created here
| returns a reference to data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/regions/regions-steal-closure.stderr b/tests/ui/regions/regions-steal-closure.stderr
index 5b0efaf95..9324eb892 100644
--- a/tests/ui/regions/regions-steal-closure.stderr
+++ b/tests/ui/regions/regions-steal-closure.stderr
@@ -11,6 +11,6 @@ LL | box_it(Box::new(|| i += 1))
LL | };
| - `i` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/regions/regions-trait-variance.stderr b/tests/ui/regions/regions-trait-variance.stderr
index 56c9f89e1..235950c2e 100644
--- a/tests/ui/regions/regions-trait-variance.stderr
+++ b/tests/ui/regions/regions-trait-variance.stderr
@@ -6,6 +6,6 @@ LL | let bb: &B = &*b;
LL | make_a(bb)
| ^^^^^^^^^^ returns a value referencing data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/regions/regions-var-type-out-of-scope.stderr b/tests/ui/regions/regions-var-type-out-of-scope.stderr
index c32bbe0ee..b261f5a41 100644
--- a/tests/ui/regions/regions-var-type-out-of-scope.stderr
+++ b/tests/ui/regions/regions-var-type-out-of-scope.stderr
@@ -10,6 +10,6 @@ LL | assert_eq!(*x, 3);
|
= note: consider using a `let` binding to create a longer lived value
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.stderr b/tests/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.stderr
index 5352be430..5e952ee57 100644
--- a/tests/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.stderr
+++ b/tests/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.stderr
@@ -11,5 +11,5 @@ LL | let _: S<'long, 'long> = c;
|
= help: consider adding the following bound: `'short: 'long`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-variance-contravariant-use-covariant.stderr b/tests/ui/regions/regions-variance-contravariant-use-covariant.stderr
index 22c9b915b..bb96bf597 100644
--- a/tests/ui/regions/regions-variance-contravariant-use-covariant.stderr
+++ b/tests/ui/regions/regions-variance-contravariant-use-covariant.stderr
@@ -11,5 +11,5 @@ LL | let _: Contravariant<'long> = c;
|
= help: consider adding the following bound: `'short: 'long`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-variance-covariant-use-contravariant.stderr b/tests/ui/regions/regions-variance-covariant-use-contravariant.stderr
index a07181ad5..b544bf5ec 100644
--- a/tests/ui/regions/regions-variance-covariant-use-contravariant.stderr
+++ b/tests/ui/regions/regions-variance-covariant-use-contravariant.stderr
@@ -11,5 +11,5 @@ LL | let _: Covariant<'short> = c;
|
= help: consider adding the following bound: `'short: 'long`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-variance-invariant-use-contravariant.stderr b/tests/ui/regions/regions-variance-invariant-use-contravariant.stderr
index b35a2cb90..4695045bb 100644
--- a/tests/ui/regions/regions-variance-invariant-use-contravariant.stderr
+++ b/tests/ui/regions/regions-variance-invariant-use-contravariant.stderr
@@ -14,5 +14,5 @@ LL | let _: Invariant<'short> = c;
= note: the struct `Invariant<'a>` is invariant over the parameter `'a`
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-variance-invariant-use-covariant.stderr b/tests/ui/regions/regions-variance-invariant-use-covariant.stderr
index 761e78d17..5945f9ba1 100644
--- a/tests/ui/regions/regions-variance-invariant-use-covariant.stderr
+++ b/tests/ui/regions/regions-variance-invariant-use-covariant.stderr
@@ -11,5 +11,5 @@ LL | let _: Invariant<'static> = c;
= note: the struct `Invariant<'a>` is invariant over the parameter `'a`
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/regions/regions-wf-trait-object.stderr b/tests/ui/regions/regions-wf-trait-object.stderr
index f6006ca04..209961508 100644
--- a/tests/ui/regions/regions-wf-trait-object.stderr
+++ b/tests/ui/regions/regions-wf-trait-object.stderr
@@ -15,6 +15,6 @@ note: but lifetime parameter must outlive the lifetime `'a` as defined here
LL | struct Foo<'a,'b> {
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0478`.
diff --git a/tests/ui/regions/resolve-re-error-ice.rs b/tests/ui/regions/resolve-re-error-ice.rs
index f37b27a82..bf6defb9b 100644
--- a/tests/ui/regions/resolve-re-error-ice.rs
+++ b/tests/ui/regions/resolve-re-error-ice.rs
@@ -1,8 +1,3 @@
-// check-pass
-
-// Allow this for now, can remove this UI test when this becomes a hard error.
-#![allow(implied_bounds_entailment)]
-
use std::collections::hash_map::{Keys, HashMap};
use std::marker::PhantomData;
@@ -15,6 +10,7 @@ struct Subject<'a, T, V, R>(PhantomData<(&'a T, V, R)>);
impl<'a, K, V, R> MapAssertion<'a, K, V, R> for Subject<'a, HashMap<K, V>, (), R>
{
fn key_set(&self) -> Subject<'a, Keys<K, V>, (), R> {
+ //~^ ERROR cannot infer an appropriate lifetime for lifetime parameter '_ in generic type due to conflicting requirements
todo!()
}
}
diff --git a/tests/ui/regions/resolve-re-error-ice.stderr b/tests/ui/regions/resolve-re-error-ice.stderr
index e7003e1c3..41c5f0fa9 100644
--- a/tests/ui/regions/resolve-re-error-ice.stderr
+++ b/tests/ui/regions/resolve-re-error-ice.stderr
@@ -1,15 +1,37 @@
-Future incompatibility report: Future breakage diagnostic:
-warning: impl method assumes more implied bounds than the corresponding trait method
- --> $DIR/resolve-re-error-ice.rs:17:16
+error[E0495]: cannot infer an appropriate lifetime for lifetime parameter '_ in generic type due to conflicting requirements
+ --> $DIR/resolve-re-error-ice.rs:12:5
|
LL | fn key_set(&self) -> Subject<'a, Keys<K, V>, (), R> {
- | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this type to make the impl signature compatible: `Subject<'_, std::collections::hash_map::Keys<'_, K, V>, (), R>`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = 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 #105572 <https://github.com/rust-lang/rust/issues/105572>
-note: the lint level is defined here
- --> $DIR/resolve-re-error-ice.rs:4:10
+note: first, the lifetime cannot outlive the anonymous lifetime defined here...
+ --> $DIR/resolve-re-error-ice.rs:5:16
|
-LL | #![allow(implied_bounds_entailment)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn key_set(&self) -> Subject<Keys<K, V>, (), R>;
+ | ^^^^^
+note: ...so that the method type is compatible with trait
+ --> $DIR/resolve-re-error-ice.rs:12:5
+ |
+LL | fn key_set(&self) -> Subject<'a, Keys<K, V>, (), R> {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ = note: expected `fn(&Subject<'_, _, _, _>) -> Subject<'_, std::collections::hash_map::Keys<'_, _, _>, _, _>`
+ found `fn(&Subject<'_, _, _, _>) -> Subject<'a, std::collections::hash_map::Keys<'_, _, _>, _, _>`
+note: but, the lifetime must be valid for the lifetime `'a` as defined here...
+ --> $DIR/resolve-re-error-ice.rs:10:6
+ |
+LL | impl<'a, K, V, R> MapAssertion<'a, K, V, R> for Subject<'a, HashMap<K, V>, (), R>
+ | ^^
+note: ...so that the type `std::collections::hash_map::Keys<'_, K, V>` will meet its required lifetime bounds...
+ --> $DIR/resolve-re-error-ice.rs:12:5
+ |
+LL | fn key_set(&self) -> Subject<'a, Keys<K, V>, (), R> {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+note: ...that is required by this bound
+ --> $DIR/resolve-re-error-ice.rs:8:29
+ |
+LL | struct Subject<'a, T, V, R>(PhantomData<(&'a T, V, R)>);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+For more information about this error, try `rustc --explain E0495`.
diff --git a/tests/ui/repeat-expr/repeat-to-run-dtor-twice.stderr b/tests/ui/repeat-expr/repeat-to-run-dtor-twice.stderr
index 1bf8e6e06..2e3ede46e 100644
--- a/tests/ui/repeat-expr/repeat-to-run-dtor-twice.stderr
+++ b/tests/ui/repeat-expr/repeat-to-run-dtor-twice.stderr
@@ -11,6 +11,6 @@ LL + #[derive(Copy)]
LL | struct Foo {
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/repr/issue-83921-ice.rs b/tests/ui/repr/malformed-repr-hints.rs
index 70583eb9b..27840b5f8 100644
--- a/tests/ui/repr/issue-83921-ice.rs
+++ b/tests/ui/repr/malformed-repr-hints.rs
@@ -19,6 +19,15 @@ struct S3;
//~^ ERROR: incorrect `repr(align)` attribute format
struct S4;
+// Regression test for issue #118334:
+#[repr(Rust(u8))]
+//~^ ERROR: invalid representation hint
+#[repr(Rust(0))]
+//~^ ERROR: invalid representation hint
+#[repr(Rust = 0)]
+//~^ ERROR: invalid representation hint
+struct S5;
+
#[repr(i8())]
//~^ ERROR: invalid representation hint
enum E1 { A, B }
diff --git a/tests/ui/repr/issue-83921-ice.stderr b/tests/ui/repr/malformed-repr-hints.stderr
index 32c450410..6fb927557 100644
--- a/tests/ui/repr/issue-83921-ice.stderr
+++ b/tests/ui/repr/malformed-repr-hints.stderr
@@ -1,46 +1,64 @@
error[E0552]: incorrect `repr(packed)` attribute format: `packed` takes exactly one parenthesized argument, or no parentheses at all
- --> $DIR/issue-83921-ice.rs:6:8
+ --> $DIR/malformed-repr-hints.rs:6:8
|
LL | #[repr(packed())]
| ^^^^^^^^
error[E0589]: invalid `repr(align)` attribute: `align` needs an argument
- --> $DIR/issue-83921-ice.rs:10:8
+ --> $DIR/malformed-repr-hints.rs:10:8
|
LL | #[repr(align)]
| ^^^^^ help: supply an argument here: `align(...)`
error[E0693]: incorrect `repr(align)` attribute format: `align` takes exactly one argument in parentheses
- --> $DIR/issue-83921-ice.rs:14:8
+ --> $DIR/malformed-repr-hints.rs:14:8
|
LL | #[repr(align(2, 4))]
| ^^^^^^^^^^^
error[E0693]: incorrect `repr(align)` attribute format: `align` takes exactly one argument in parentheses
- --> $DIR/issue-83921-ice.rs:18:8
+ --> $DIR/malformed-repr-hints.rs:18:8
|
LL | #[repr(align())]
| ^^^^^^^
+error[E0552]: invalid representation hint: `Rust` does not take a parenthesized argument list
+ --> $DIR/malformed-repr-hints.rs:23:8
+ |
+LL | #[repr(Rust(u8))]
+ | ^^^^^^^^
+
+error[E0552]: invalid representation hint: `Rust` does not take a parenthesized argument list
+ --> $DIR/malformed-repr-hints.rs:25:8
+ |
+LL | #[repr(Rust(0))]
+ | ^^^^^^^
+
+error[E0552]: invalid representation hint: `Rust` does not take a value
+ --> $DIR/malformed-repr-hints.rs:27:8
+ |
+LL | #[repr(Rust = 0)]
+ | ^^^^^^^^
+
error[E0552]: invalid representation hint: `i8` does not take a parenthesized argument list
- --> $DIR/issue-83921-ice.rs:22:8
+ --> $DIR/malformed-repr-hints.rs:31:8
|
LL | #[repr(i8())]
| ^^^^
error[E0552]: invalid representation hint: `u32` does not take a parenthesized argument list
- --> $DIR/issue-83921-ice.rs:26:8
+ --> $DIR/malformed-repr-hints.rs:35:8
|
LL | #[repr(u32(42))]
| ^^^^^^^
error[E0552]: invalid representation hint: `i64` does not take a value
- --> $DIR/issue-83921-ice.rs:30:8
+ --> $DIR/malformed-repr-hints.rs:39:8
|
LL | #[repr(i64 = 2)]
| ^^^^^^^
-error: aborting due to 7 previous errors
+error: aborting due to 10 previous errors
Some errors have detailed explanations: E0552, E0589, E0693.
For more information about an error, try `rustc --explain E0552`.
diff --git a/tests/ui/repr/repr-disallow-on-variant.stderr b/tests/ui/repr/repr-disallow-on-variant.stderr
index f7e4dcc9d..ebdb851b7 100644
--- a/tests/ui/repr/repr-disallow-on-variant.stderr
+++ b/tests/ui/repr/repr-disallow-on-variant.stderr
@@ -7,6 +7,6 @@ LL |
LL | Variant,
| ------- not an enum
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0517`.
diff --git a/tests/ui/repr/transparent-enum-too-many-variants.stderr b/tests/ui/repr/transparent-enum-too-many-variants.stderr
index 1a500257f..1e434d22b 100644
--- a/tests/ui/repr/transparent-enum-too-many-variants.stderr
+++ b/tests/ui/repr/transparent-enum-too-many-variants.stderr
@@ -8,6 +8,6 @@ LL | A(u8), B(u8),
| |
| variant here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0731`.
diff --git a/tests/ui/reserved/reserved-become.stderr b/tests/ui/reserved/reserved-become.stderr
index 0703b76d6..8e9fa1855 100644
--- a/tests/ui/reserved/reserved-become.stderr
+++ b/tests/ui/reserved/reserved-become.stderr
@@ -9,5 +9,5 @@ help: escape `become` to use it as an identifier
LL | let r#become = 0;
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/resolve/bad-type-env-capture.stderr b/tests/ui/resolve/bad-type-env-capture.stderr
index 941b6b7a6..3f9bc9149 100644
--- a/tests/ui/resolve/bad-type-env-capture.stderr
+++ b/tests/ui/resolve/bad-type-env-capture.stderr
@@ -8,6 +8,6 @@ LL | fn bar(b: T) { }
| |
| help: try introducing a local generic parameter here: `<T>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0401`.
diff --git a/tests/ui/resolve/crate-called-as-function.stderr b/tests/ui/resolve/crate-called-as-function.stderr
index eb42349af..1d6eb8ad6 100644
--- a/tests/ui/resolve/crate-called-as-function.stderr
+++ b/tests/ui/resolve/crate-called-as-function.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find external crate `foo` in the crate root
LL | ::foo()
| ^^^ not found in the crate root
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/resolve/crate-in-paths.stderr b/tests/ui/resolve/crate-in-paths.stderr
index 07fb5dcc0..9eb735a3a 100644
--- a/tests/ui/resolve/crate-in-paths.stderr
+++ b/tests/ui/resolve/crate-in-paths.stderr
@@ -9,6 +9,6 @@ help: consider importing this unit struct
LL + use crate::bar::Foo;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/resolve/disambiguate-identical-names.stderr b/tests/ui/resolve/disambiguate-identical-names.stderr
index 7d8293018..9900ade3d 100644
--- a/tests/ui/resolve/disambiguate-identical-names.stderr
+++ b/tests/ui/resolve/disambiguate-identical-names.stderr
@@ -14,6 +14,6 @@ note: function defined here
LL | fn test(_v: &Vec<Vec<u32>>) {
| ^^^^ ------------------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/resolve/enums-pats-not-idents.stderr b/tests/ui/resolve/enums-pats-not-idents.stderr
index 072b88716..6bb6e152c 100644
--- a/tests/ui/resolve/enums-pats-not-idents.stderr
+++ b/tests/ui/resolve/enums-pats-not-idents.stderr
@@ -4,6 +4,6 @@ error[E0531]: cannot find tuple struct or tuple variant `a` in this scope
LL | let a(1) = 13;
| ^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0531`.
diff --git a/tests/ui/resolve/explicit-self-lowercase-param.stderr b/tests/ui/resolve/explicit-self-lowercase-param.stderr
index cd64dbb38..6daa6f5d7 100644
--- a/tests/ui/resolve/explicit-self-lowercase-param.stderr
+++ b/tests/ui/resolve/explicit-self-lowercase-param.stderr
@@ -4,5 +4,5 @@ error: attempt to use a non-constant value in a constant
LL | fn do_nothing(self: Box<self>) {}
| ^^^^ help: try using `Self`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/resolve/export-fully-qualified-2018.stderr b/tests/ui/resolve/export-fully-qualified-2018.stderr
index b724da930..378d9832a 100644
--- a/tests/ui/resolve/export-fully-qualified-2018.stderr
+++ b/tests/ui/resolve/export-fully-qualified-2018.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: use of undeclared crate or module `foo`
LL | pub fn bar() { foo::baz(); }
| ^^^ use of undeclared crate or module `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/resolve/export-fully-qualified.stderr b/tests/ui/resolve/export-fully-qualified.stderr
index a8af0c7c9..869149d8d 100644
--- a/tests/ui/resolve/export-fully-qualified.stderr
+++ b/tests/ui/resolve/export-fully-qualified.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: use of undeclared crate or module `foo`
LL | pub fn bar() { foo::baz(); }
| ^^^ use of undeclared crate or module `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/resolve/fn-new-doesnt-exist.stderr b/tests/ui/resolve/fn-new-doesnt-exist.stderr
index 39adc0fde..418dd9ea6 100644
--- a/tests/ui/resolve/fn-new-doesnt-exist.stderr
+++ b/tests/ui/resolve/fn-new-doesnt-exist.stderr
@@ -9,6 +9,6 @@ note: if you're trying to build a new `TcpStream` consider using one of the foll
TcpStream::connect_timeout
--> $SRC_DIR/std/src/net/tcp.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/resolve/impl-items-vis-unresolved.stderr b/tests/ui/resolve/impl-items-vis-unresolved.stderr
index f2293d28e..cccffdcbf 100644
--- a/tests/ui/resolve/impl-items-vis-unresolved.stderr
+++ b/tests/ui/resolve/impl-items-vis-unresolved.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: there are too many leading `super` keywords
LL | pub(super) fn new() {}
| ^^^^^ there are too many leading `super` keywords
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/resolve/issue-101749-2.stderr b/tests/ui/resolve/issue-101749-2.stderr
index 370d4b145..300aaf26c 100644
--- a/tests/ui/resolve/issue-101749-2.stderr
+++ b/tests/ui/resolve/issue-101749-2.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: use of undeclared crate or module `rect`
LL | let _ = rect::area();
| ^^^^ use of undeclared crate or module `rect`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/resolve/issue-101749.stderr b/tests/ui/resolve/issue-101749.stderr
index dd29d7fc0..05515b1b4 100644
--- a/tests/ui/resolve/issue-101749.stderr
+++ b/tests/ui/resolve/issue-101749.stderr
@@ -9,6 +9,6 @@ help: you may have meant to call an instance method
LL | let _ = rect.area();
| ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/resolve/issue-10200.stderr b/tests/ui/resolve/issue-10200.stderr
index e60489f5b..7b218694b 100644
--- a/tests/ui/resolve/issue-10200.stderr
+++ b/tests/ui/resolve/issue-10200.stderr
@@ -7,6 +7,6 @@ LL | struct Foo(bool);
LL | foo(x)
| ^^^ help: a tuple struct with a similar name exists (notice the capitalization): `Foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0532`.
diff --git a/tests/ui/resolve/issue-103202.stderr b/tests/ui/resolve/issue-103202.stderr
index d4d141fb0..87fa940ac 100644
--- a/tests/ui/resolve/issue-103202.stderr
+++ b/tests/ui/resolve/issue-103202.stderr
@@ -9,6 +9,6 @@ help: if there were a trait named `Example` with associated type `x` implemented
LL | fn f(self: &<S as Example>::x) {}
| ~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0223`.
diff --git a/tests/ui/resolve/issue-105069.stderr b/tests/ui/resolve/issue-105069.stderr
index a049cac83..5e87ccf41 100644
--- a/tests/ui/resolve/issue-105069.stderr
+++ b/tests/ui/resolve/issue-105069.stderr
@@ -18,6 +18,6 @@ LL | use self::B::*;
| ^^^^^^^^^^
= help: consider adding an explicit import of `V` to disambiguate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0659`.
diff --git a/tests/ui/resolve/issue-108529.stderr b/tests/ui/resolve/issue-108529.stderr
index cf4e4759c..ef1a6c919 100644
--- a/tests/ui/resolve/issue-108529.stderr
+++ b/tests/ui/resolve/issue-108529.stderr
@@ -4,6 +4,6 @@ error[E0432]: unresolved import `f::f`
LL | use f::f::f;
| ^ expected type, found associated function `f` in `f`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/resolve/issue-109153.stderr b/tests/ui/resolve/issue-109153.stderr
index 1a345d2a3..da95029f6 100644
--- a/tests/ui/resolve/issue-109153.stderr
+++ b/tests/ui/resolve/issue-109153.stderr
@@ -18,6 +18,6 @@ LL | use bar::*;
| ^^^^^^
= help: consider adding an explicit import of `bar` to disambiguate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0659`.
diff --git a/tests/ui/resolve/issue-109250.stderr b/tests/ui/resolve/issue-109250.stderr
index d5b8c08ce..ad6cc6986 100644
--- a/tests/ui/resolve/issue-109250.stderr
+++ b/tests/ui/resolve/issue-109250.stderr
@@ -9,6 +9,6 @@ help: consider importing this struct
LL + use std::collections::HashMap;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/resolve/issue-111312.stderr b/tests/ui/resolve/issue-111312.stderr
index 4c864029c..7e7ef22ae 100644
--- a/tests/ui/resolve/issue-111312.stderr
+++ b/tests/ui/resolve/issue-111312.stderr
@@ -10,6 +10,6 @@ note: `Has` defines an item `has`
LL | trait Has {
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/resolve/issue-111727.stderr b/tests/ui/resolve/issue-111727.stderr
index bd748211e..b58168d0e 100644
--- a/tests/ui/resolve/issue-111727.stderr
+++ b/tests/ui/resolve/issue-111727.stderr
@@ -4,6 +4,6 @@ error[E0599]: no function or associated item named `create` found for trait `Any
LL | std::any::Any::create();
| ^^^^^^ function or associated item not found in `Any`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/resolve/issue-116164.stderr b/tests/ui/resolve/issue-116164.stderr
index 5820a189f..8880242c1 100644
--- a/tests/ui/resolve/issue-116164.stderr
+++ b/tests/ui/resolve/issue-116164.stderr
@@ -9,6 +9,6 @@ help: consider importing this unit variant
LL + use inner::Example::ExOne;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/resolve/issue-117920.rs b/tests/ui/resolve/issue-117920.rs
new file mode 100644
index 000000000..928f194c5
--- /dev/null
+++ b/tests/ui/resolve/issue-117920.rs
@@ -0,0 +1,11 @@
+#![crate_type = "lib"]
+
+use super::A; //~ ERROR failed to resolve
+
+mod b {
+ pub trait A {}
+ pub trait B {}
+}
+
+/// [`A`]
+pub use b::*;
diff --git a/tests/ui/resolve/issue-117920.stderr b/tests/ui/resolve/issue-117920.stderr
new file mode 100644
index 000000000..c4528d467
--- /dev/null
+++ b/tests/ui/resolve/issue-117920.stderr
@@ -0,0 +1,9 @@
+error[E0433]: failed to resolve: there are too many leading `super` keywords
+ --> $DIR/issue-117920.rs:3:5
+ |
+LL | use super::A;
+ | ^^^^^ there are too many leading `super` keywords
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/resolve/issue-118295.rs b/tests/ui/resolve/issue-118295.rs
new file mode 100644
index 000000000..b97681d95
--- /dev/null
+++ b/tests/ui/resolve/issue-118295.rs
@@ -0,0 +1,5 @@
+macro_rules! {}
+//~^ ERROR cannot find macro `macro_rules` in this scope
+//~| NOTE maybe you have forgotten to define a name for this `macro_rules!`
+
+fn main() {}
diff --git a/tests/ui/resolve/issue-118295.stderr b/tests/ui/resolve/issue-118295.stderr
new file mode 100644
index 000000000..d60d7d918
--- /dev/null
+++ b/tests/ui/resolve/issue-118295.stderr
@@ -0,0 +1,14 @@
+error: cannot find macro `macro_rules` in this scope
+ --> $DIR/issue-118295.rs:1:1
+ |
+LL | macro_rules! {}
+ | ^^^^^^^^^^^
+ |
+note: maybe you have forgotten to define a name for this `macro_rules!`
+ --> $DIR/issue-118295.rs:1:1
+ |
+LL | macro_rules! {}
+ | ^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/resolve/issue-12796.stderr b/tests/ui/resolve/issue-12796.stderr
index ef59d0036..6809fd50f 100644
--- a/tests/ui/resolve/issue-12796.stderr
+++ b/tests/ui/resolve/issue-12796.stderr
@@ -7,6 +7,6 @@ LL | fn inner(_: &Self) {
| use of generic parameter from outer item
| can't use `Self` here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0401`.
diff --git a/tests/ui/resolve/issue-16058.stderr b/tests/ui/resolve/issue-16058.stderr
index 710002a15..914990c35 100644
--- a/tests/ui/resolve/issue-16058.stderr
+++ b/tests/ui/resolve/issue-16058.stderr
@@ -13,6 +13,6 @@ LL + use std::io::Result;
LL + use std::thread::Result;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0574`.
diff --git a/tests/ui/resolve/issue-17518.stderr b/tests/ui/resolve/issue-17518.stderr
index 492e3b34a..3eba71518 100644
--- a/tests/ui/resolve/issue-17518.stderr
+++ b/tests/ui/resolve/issue-17518.stderr
@@ -9,6 +9,6 @@ help: consider importing this variant
LL + use SomeEnum::E;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0422`.
diff --git a/tests/ui/resolve/issue-18252.stderr b/tests/ui/resolve/issue-18252.stderr
index d9006c0a6..511b8da71 100644
--- a/tests/ui/resolve/issue-18252.stderr
+++ b/tests/ui/resolve/issue-18252.stderr
@@ -4,6 +4,6 @@ error[E0533]: expected value, found struct variant `Foo::Variant`
LL | let f = Foo::Variant(42);
| ^^^^^^^^^^^^ not a value
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0533`.
diff --git a/tests/ui/resolve/issue-21221-2.stderr b/tests/ui/resolve/issue-21221-2.stderr
index 9beb62662..3bd4c1a5d 100644
--- a/tests/ui/resolve/issue-21221-2.stderr
+++ b/tests/ui/resolve/issue-21221-2.stderr
@@ -11,6 +11,6 @@ LL + use baz::T;
LL + use foo::bar::T;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0405`.
diff --git a/tests/ui/resolve/issue-21221-3.stderr b/tests/ui/resolve/issue-21221-3.stderr
index 0dabdfd9b..ed3eb2dfb 100644
--- a/tests/ui/resolve/issue-21221-3.stderr
+++ b/tests/ui/resolve/issue-21221-3.stderr
@@ -9,6 +9,6 @@ help: consider importing this trait
LL + use issue_21221_3::outer::OuterTrait;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0405`.
diff --git a/tests/ui/resolve/issue-21221-4.stderr b/tests/ui/resolve/issue-21221-4.stderr
index 5af14b1b6..482a3bd54 100644
--- a/tests/ui/resolve/issue-21221-4.stderr
+++ b/tests/ui/resolve/issue-21221-4.stderr
@@ -9,6 +9,6 @@ help: consider importing this trait
LL + use issue_21221_4::T;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0405`.
diff --git a/tests/ui/resolve/issue-2330.stderr b/tests/ui/resolve/issue-2330.stderr
index 877cf68b5..8ac8a6dc4 100644
--- a/tests/ui/resolve/issue-2330.stderr
+++ b/tests/ui/resolve/issue-2330.stderr
@@ -4,6 +4,6 @@ error[E0404]: expected trait, found enum `Chan`
LL | impl Chan for isize {
| ^^^^ not a trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0404`.
diff --git a/tests/ui/resolve/issue-23305.stderr b/tests/ui/resolve/issue-23305.stderr
index aad1b583a..e522e461e 100644
--- a/tests/ui/resolve/issue-23305.stderr
+++ b/tests/ui/resolve/issue-23305.stderr
@@ -6,5 +6,5 @@ LL | impl dyn ToNbt<Self> {}
|
= note: replace `Self` with a different type
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/resolve/issue-26545.stderr b/tests/ui/resolve/issue-26545.stderr
index 42a7531c5..ced19ea18 100644
--- a/tests/ui/resolve/issue-26545.stderr
+++ b/tests/ui/resolve/issue-26545.stderr
@@ -9,6 +9,6 @@ help: consider importing this tuple struct
LL + use foo::B;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/resolve/issue-3021.stderr b/tests/ui/resolve/issue-3021.stderr
index d5b015eec..5dc4f9542 100644
--- a/tests/ui/resolve/issue-3021.stderr
+++ b/tests/ui/resolve/issue-3021.stderr
@@ -6,6 +6,6 @@ LL | self.v0 = k0 ^ 0x736f6d6570736575;
|
= help: use the `|| { ... }` closure form instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0434`.
diff --git a/tests/ui/resolve/issue-30535.stderr b/tests/ui/resolve/issue-30535.stderr
index e3692934b..0fa96a874 100644
--- a/tests/ui/resolve/issue-30535.stderr
+++ b/tests/ui/resolve/issue-30535.stderr
@@ -7,6 +7,6 @@ LL | _: foo::Foo::FooV
| not a type
| help: try using the variant's enum: `foo::Foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0573`.
diff --git a/tests/ui/resolve/issue-3099-a.stderr b/tests/ui/resolve/issue-3099-a.stderr
index e3733cebb..a092f562d 100644
--- a/tests/ui/resolve/issue-3099-a.stderr
+++ b/tests/ui/resolve/issue-3099-a.stderr
@@ -9,6 +9,6 @@ LL | enum A { D, E }
|
= note: `A` must be defined only once in the type namespace of this module
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0428`.
diff --git a/tests/ui/resolve/issue-3099-b.stderr b/tests/ui/resolve/issue-3099-b.stderr
index c0cfefeb9..7817ab401 100644
--- a/tests/ui/resolve/issue-3099-b.stderr
+++ b/tests/ui/resolve/issue-3099-b.stderr
@@ -9,6 +9,6 @@ LL | pub mod a {}
|
= note: `a` must be defined only once in the type namespace of this module
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0428`.
diff --git a/tests/ui/resolve/issue-31845.stderr b/tests/ui/resolve/issue-31845.stderr
index 562819385..e65b91115 100644
--- a/tests/ui/resolve/issue-31845.stderr
+++ b/tests/ui/resolve/issue-31845.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find function `g` in this scope
LL | g();
| ^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/resolve/issue-33876.stderr b/tests/ui/resolve/issue-33876.stderr
index 52308f2a7..12e1b4b0b 100644
--- a/tests/ui/resolve/issue-33876.stderr
+++ b/tests/ui/resolve/issue-33876.stderr
@@ -4,6 +4,6 @@ error[E0423]: expected value, found trait `Bar`
LL | let any: &dyn Any = &Bar;
| ^^^ not a value
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0423`.
diff --git a/tests/ui/resolve/issue-3907-2.stderr b/tests/ui/resolve/issue-3907-2.stderr
index 782cfeec4..2693daa3c 100644
--- a/tests/ui/resolve/issue-3907-2.stderr
+++ b/tests/ui/resolve/issue-3907-2.stderr
@@ -10,6 +10,6 @@ note: for a trait to be "object safe" it needs to allow building a vtable to all
LL | fn bar();
| ^^^ the trait cannot be made into an object because associated function `bar` has no `self` parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/resolve/issue-3907.stderr b/tests/ui/resolve/issue-3907.stderr
index 70631a13c..e9dc34449 100644
--- a/tests/ui/resolve/issue-3907.stderr
+++ b/tests/ui/resolve/issue-3907.stderr
@@ -13,6 +13,6 @@ help: consider importing this trait instead
LL + use issue_3907::Foo;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0404`.
diff --git a/tests/ui/resolve/issue-39226.stderr b/tests/ui/resolve/issue-39226.stderr
index 5045ec6c3..857f6a735 100644
--- a/tests/ui/resolve/issue-39226.stderr
+++ b/tests/ui/resolve/issue-39226.stderr
@@ -16,6 +16,6 @@ help: a local variable with a similar name exists
LL | handle: handle
| ~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0423`.
diff --git a/tests/ui/resolve/issue-39559.stderr b/tests/ui/resolve/issue-39559.stderr
index 7626f827f..0aab54fe5 100644
--- a/tests/ui/resolve/issue-39559.stderr
+++ b/tests/ui/resolve/issue-39559.stderr
@@ -5,7 +5,7 @@ LL | entries: [T; D::dim()],
| ^^^^^^ cannot perform const operation using `D`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/resolve/issue-5035-2.stderr b/tests/ui/resolve/issue-5035-2.stderr
index 558e6b7b1..8eeb398f0 100644
--- a/tests/ui/resolve/issue-5035-2.stderr
+++ b/tests/ui/resolve/issue-5035-2.stderr
@@ -15,6 +15,6 @@ help: function arguments must have a statically known size, borrowed types alway
LL | fn foo(_x: &K) {}
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/resolve/issue-50599.stderr b/tests/ui/resolve/issue-50599.stderr
index d58b6ca5b..25e98b474 100644
--- a/tests/ui/resolve/issue-50599.stderr
+++ b/tests/ui/resolve/issue-50599.stderr
@@ -16,6 +16,6 @@ LL - const M: usize = (f64::from(N) * std::f64::LOG10_2) as usize;
LL + const M: usize = (f64::from(N) * LOG10_2) as usize;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/resolve/issue-65025-extern-static-parent-generics.stderr b/tests/ui/resolve/issue-65025-extern-static-parent-generics.stderr
index 3e9c3fd11..363bb5564 100644
--- a/tests/ui/resolve/issue-65025-extern-static-parent-generics.stderr
+++ b/tests/ui/resolve/issue-65025-extern-static-parent-generics.stderr
@@ -7,6 +7,6 @@ LL | extern "C" {
LL | static baz: *const A;
| ^ use of generic parameter from outer item
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0401`.
diff --git a/tests/ui/resolve/issue-6642.stderr b/tests/ui/resolve/issue-6642.stderr
index 6668108d0..7f1a1aa44 100644
--- a/tests/ui/resolve/issue-6642.stderr
+++ b/tests/ui/resolve/issue-6642.stderr
@@ -6,6 +6,6 @@ LL | self.m()
|
= help: use the `|| { ... }` closure form instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0434`.
diff --git a/tests/ui/resolve/issue-6702.stderr b/tests/ui/resolve/issue-6702.stderr
index a118f9419..d1ceee3e5 100644
--- a/tests/ui/resolve/issue-6702.stderr
+++ b/tests/ui/resolve/issue-6702.stderr
@@ -9,6 +9,6 @@ LL | | }
LL | let _m = Monster();
| ^^^^^^^^^ help: use struct literal syntax instead: `Monster { damage: val }`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0423`.
diff --git a/tests/ui/resolve/issue-69401-trait-fn-no-body-ty-local.stderr b/tests/ui/resolve/issue-69401-trait-fn-no-body-ty-local.stderr
index 109409d27..60ef13551 100644
--- a/tests/ui/resolve/issue-69401-trait-fn-no-body-ty-local.stderr
+++ b/tests/ui/resolve/issue-69401-trait-fn-no-body-ty-local.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `b` in this scope
LL | fn fn_with_type_named_same_as_local_in_param(b: b);
| ^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/resolve/issue-80079.stderr b/tests/ui/resolve/issue-80079.stderr
index 93e8c0341..e300ee964 100644
--- a/tests/ui/resolve/issue-80079.stderr
+++ b/tests/ui/resolve/issue-80079.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `Foo` in this scope
LL | let _ = Foo;
| ^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/resolve/issue-82156.stderr b/tests/ui/resolve/issue-82156.stderr
index d53599dcc..3894b9573 100644
--- a/tests/ui/resolve/issue-82156.stderr
+++ b/tests/ui/resolve/issue-82156.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: there are too many leading `super` keywords
LL | super();
| ^^^^^ there are too many leading `super` keywords
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/resolve/issue-90113.stderr b/tests/ui/resolve/issue-90113.stderr
index 5f55d9c24..d25c67825 100644
--- a/tests/ui/resolve/issue-90113.stderr
+++ b/tests/ui/resolve/issue-90113.stderr
@@ -9,6 +9,6 @@ help: consider importing this tuple variant
LL + use list::List::Cons;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0531`.
diff --git a/tests/ui/resolve/missing-in-namespace.stderr b/tests/ui/resolve/missing-in-namespace.stderr
index 7a7b749ae..35585e424 100644
--- a/tests/ui/resolve/missing-in-namespace.stderr
+++ b/tests/ui/resolve/missing-in-namespace.stderr
@@ -14,6 +14,6 @@ LL - let _map = std::hahmap::HashMap::new();
LL + let _map = HashMap::new();
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/resolve/name-clash-nullary.stderr b/tests/ui/resolve/name-clash-nullary.stderr
index fffd3027a..08e7fe9a6 100644
--- a/tests/ui/resolve/name-clash-nullary.stderr
+++ b/tests/ui/resolve/name-clash-nullary.stderr
@@ -9,6 +9,6 @@ LL | let None: isize = 42;
= note: expected type `isize`
found enum `Option<_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/resolve/point-at-type-parameter-shadowing-another-type.stderr b/tests/ui/resolve/point-at-type-parameter-shadowing-another-type.stderr
index 5790e425c..a7770e1e7 100644
--- a/tests/ui/resolve/point-at-type-parameter-shadowing-another-type.stderr
+++ b/tests/ui/resolve/point-at-type-parameter-shadowing-another-type.stderr
@@ -10,6 +10,6 @@ LL | impl<Baz> Foo<Baz> for Bar {
LL | Baz { num } => num,
| ^^^ not a struct, variant or union type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0574`.
diff --git a/tests/ui/resolve/raw-ident-in-path.stderr b/tests/ui/resolve/raw-ident-in-path.stderr
index 771dacbbb..7d2aa6911 100644
--- a/tests/ui/resolve/raw-ident-in-path.stderr
+++ b/tests/ui/resolve/raw-ident-in-path.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `r#break` in the crate root
LL | type A = crate::r#break;
| ^^^^^^^ not found in the crate root
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/resolve/resolve-bad-import-prefix.stderr b/tests/ui/resolve/resolve-bad-import-prefix.stderr
index 852b9c6af..36eb3148a 100644
--- a/tests/ui/resolve/resolve-bad-import-prefix.stderr
+++ b/tests/ui/resolve/resolve-bad-import-prefix.stderr
@@ -4,6 +4,6 @@ error[E0432]: unresolved import `Nonexistent`
LL | use Nonexistent::{};
| ^^^^^^^^^^^^^^^ no `Nonexistent` in the root
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.stderr b/tests/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.stderr
index ea6cb9eb0..999e9a47d 100644
--- a/tests/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.stderr
+++ b/tests/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.stderr
@@ -6,6 +6,6 @@ help: you can use `as` to change the binding name of the import
LL | extern crate std as other_std;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0259`.
diff --git a/tests/ui/resolve/resolve-conflict-import-vs-extern-crate.stderr b/tests/ui/resolve/resolve-conflict-import-vs-extern-crate.stderr
index abf068a1f..e22e636ad 100644
--- a/tests/ui/resolve/resolve-conflict-import-vs-extern-crate.stderr
+++ b/tests/ui/resolve/resolve-conflict-import-vs-extern-crate.stderr
@@ -10,6 +10,6 @@ help: you can use `as` to change the binding name of the import
LL | use std::slice as other_std;
| ~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0254`.
diff --git a/tests/ui/resolve/resolve-conflict-import-vs-import.stderr b/tests/ui/resolve/resolve-conflict-import-vs-import.stderr
index 632be50f4..de33addcb 100644
--- a/tests/ui/resolve/resolve-conflict-import-vs-import.stderr
+++ b/tests/ui/resolve/resolve-conflict-import-vs-import.stderr
@@ -8,6 +8,6 @@ LL | use std::mem::transmute;
|
= note: `transmute` must be defined only once in the value namespace of this module
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0252`.
diff --git a/tests/ui/resolve/resolve-conflict-item-vs-extern-crate.stderr b/tests/ui/resolve/resolve-conflict-item-vs-extern-crate.stderr
index 7b9fb6c63..1097dab41 100644
--- a/tests/ui/resolve/resolve-conflict-item-vs-extern-crate.stderr
+++ b/tests/ui/resolve/resolve-conflict-item-vs-extern-crate.stderr
@@ -6,6 +6,6 @@ LL | mod std {}
|
= note: `std` must be defined only once in the type namespace of this module
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0260`.
diff --git a/tests/ui/resolve/resolve-conflict-item-vs-import.stderr b/tests/ui/resolve/resolve-conflict-item-vs-import.stderr
index 5e5c9f6b3..3b1b5f1ad 100644
--- a/tests/ui/resolve/resolve-conflict-item-vs-import.stderr
+++ b/tests/ui/resolve/resolve-conflict-item-vs-import.stderr
@@ -13,6 +13,6 @@ help: you can use `as` to change the binding name of the import
LL | use std::mem::transmute as other_transmute;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0255`.
diff --git a/tests/ui/resolve/resolve-conflict-type-vs-import.stderr b/tests/ui/resolve/resolve-conflict-type-vs-import.stderr
index 198ef1031..c5cb4e078 100644
--- a/tests/ui/resolve/resolve-conflict-type-vs-import.stderr
+++ b/tests/ui/resolve/resolve-conflict-type-vs-import.stderr
@@ -13,6 +13,6 @@ help: you can use `as` to change the binding name of the import
LL | use std::slice::Iter as OtherIter;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0255`.
diff --git a/tests/ui/resolve/resolve-dont-hint-macro.rs b/tests/ui/resolve/resolve-dont-hint-macro.rs
new file mode 100644
index 000000000..da1752b33
--- /dev/null
+++ b/tests/ui/resolve/resolve-dont-hint-macro.rs
@@ -0,0 +1,4 @@
+fn main() {
+ let zero = assert_eq::<()>();
+ //~^ ERROR expected function, found macro `assert_eq`
+}
diff --git a/tests/ui/resolve/resolve-dont-hint-macro.stderr b/tests/ui/resolve/resolve-dont-hint-macro.stderr
new file mode 100644
index 000000000..597e014d2
--- /dev/null
+++ b/tests/ui/resolve/resolve-dont-hint-macro.stderr
@@ -0,0 +1,9 @@
+error[E0423]: expected function, found macro `assert_eq`
+ --> $DIR/resolve-dont-hint-macro.rs:2:16
+ |
+LL | let zero = assert_eq::<()>();
+ | ^^^^^^^^^^^^^^^ not a function
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0423`.
diff --git a/tests/ui/resolve/resolve-inconsistent-binding-mode.stderr b/tests/ui/resolve/resolve-inconsistent-binding-mode.stderr
index c805c9eb1..6e44c280f 100644
--- a/tests/ui/resolve/resolve-inconsistent-binding-mode.stderr
+++ b/tests/ui/resolve/resolve-inconsistent-binding-mode.stderr
@@ -62,8 +62,8 @@ LL | Opts::A(ref mut i) | Opts::B(ref i) => {}
| |
| first introduced with type `&mut isize` here
|
- = note: expected mutable reference `&mut isize`
- found reference `&isize`
+ = note: expected mutable reference `&mut _`
+ found reference `&_`
= note: in the same arm, a binding must have the same type in all alternatives
error: aborting due to 6 previous errors
diff --git a/tests/ui/resolve/resolve-label.stderr b/tests/ui/resolve/resolve-label.stderr
index 5729348ef..4c93cf9ea 100644
--- a/tests/ui/resolve/resolve-label.stderr
+++ b/tests/ui/resolve/resolve-label.stderr
@@ -9,6 +9,6 @@ LL | break 'l;
|
= note: labels are unreachable through functions, closures, async blocks and modules
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0767`.
diff --git a/tests/ui/resolve/suggest-import-without-clobbering-attrs.stderr b/tests/ui/resolve/suggest-import-without-clobbering-attrs.stderr
index d3574851d..de65d695d 100644
--- a/tests/ui/resolve/suggest-import-without-clobbering-attrs.stderr
+++ b/tests/ui/resolve/suggest-import-without-clobbering-attrs.stderr
@@ -9,6 +9,6 @@ help: consider importing this function
LL + use y::z;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/resolve/token-error-correct-2.stderr b/tests/ui/resolve/token-error-correct-2.stderr
index be5fb18a5..662b849da 100644
--- a/tests/ui/resolve/token-error-correct-2.stderr
+++ b/tests/ui/resolve/token-error-correct-2.stderr
@@ -6,5 +6,5 @@ LL | if foo {
LL | )
| ^ mismatched closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/resolve/token-error-correct-3.stderr b/tests/ui/resolve/token-error-correct-3.stderr
index 79d1d4883..d4ca6c6b7 100644
--- a/tests/ui/resolve/token-error-correct-3.stderr
+++ b/tests/ui/resolve/token-error-correct-3.stderr
@@ -9,5 +9,5 @@ LL | fs::create_dir_all(path.as_ref()).map(|()| true)
LL | } else {
| ^ mismatched closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/resolve/token-error-correct-4.stderr b/tests/ui/resolve/token-error-correct-4.stderr
index 3ec97171f..c4e50cdbf 100644
--- a/tests/ui/resolve/token-error-correct-4.stderr
+++ b/tests/ui/resolve/token-error-correct-4.stderr
@@ -8,5 +8,5 @@ LL | setsuna(kazusa();
LL | }
| ^ mismatched closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/resolve/token-error-correct.stderr b/tests/ui/resolve/token-error-correct.stderr
index 35b2d0b32..5fa3703fd 100644
--- a/tests/ui/resolve/token-error-correct.stderr
+++ b/tests/ui/resolve/token-error-correct.stderr
@@ -8,5 +8,5 @@ LL | foo(bar(;
LL | }
| ^ mismatched closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/resolve/tool-import.stderr b/tests/ui/resolve/tool-import.stderr
index d3bdfc93d..b070439d7 100644
--- a/tests/ui/resolve/tool-import.stderr
+++ b/tests/ui/resolve/tool-import.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: `clippy` is a tool module, not a module
LL | use clippy::time::Instant;
| ^^^^^^ `clippy` is a tool module, not a module
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/resolve/unresolved-segments-visibility.stderr b/tests/ui/resolve/unresolved-segments-visibility.stderr
index 0a11549cd..09f3c5025 100644
--- a/tests/ui/resolve/unresolved-segments-visibility.stderr
+++ b/tests/ui/resolve/unresolved-segments-visibility.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: `String` is a struct, not a module
LL | pub(in b::string::String::newy) extern crate alloc as e;
| ^^^^^^ `String` is a struct, not a module
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/resolve/unresolved_static_type_field.stderr b/tests/ui/resolve/unresolved_static_type_field.stderr
index 035dc9b96..e3de0a3fb 100644
--- a/tests/ui/resolve/unresolved_static_type_field.stderr
+++ b/tests/ui/resolve/unresolved_static_type_field.stderr
@@ -7,6 +7,6 @@ LL | cx: bool,
LL | f(cx);
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/resolve/use-self-in-inner-fn.stderr b/tests/ui/resolve/use-self-in-inner-fn.stderr
index 832aaacaf..165e100bf 100644
--- a/tests/ui/resolve/use-self-in-inner-fn.stderr
+++ b/tests/ui/resolve/use-self-in-inner-fn.stderr
@@ -10,6 +10,6 @@ LL | fn peach(this: &Self) {
| use of generic parameter from outer item
| refer to the type directly here instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0401`.
diff --git a/tests/ui/ret-non-nil.stderr b/tests/ui/ret-non-nil.stderr
index 2029c6d9d..17567c601 100644
--- a/tests/ui/ret-non-nil.stderr
+++ b/tests/ui/ret-non-nil.stderr
@@ -6,6 +6,6 @@ LL | fn g() -> isize { return; }
| |
| expected `isize` because of this return type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0069`.
diff --git a/tests/ui/return-disjoint-regions.stderr b/tests/ui/return-disjoint-regions.stderr
index ed1592988..7b5b03257 100644
--- a/tests/ui/return-disjoint-regions.stderr
+++ b/tests/ui/return-disjoint-regions.stderr
@@ -6,6 +6,6 @@ LL | let y = &x;
LL | (y, y)
| ^^^^^^ returns a value referencing data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/return/issue-64620.stderr b/tests/ui/return/issue-64620.stderr
index 3210a67d4..3c5583da6 100644
--- a/tests/ui/return/issue-64620.stderr
+++ b/tests/ui/return/issue-64620.stderr
@@ -4,6 +4,6 @@ error[E0572]: return statement outside of function body
LL | V1 = return [0][0],
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0572`.
diff --git a/tests/ui/return/issue-82612-return-mutable-reference.stderr b/tests/ui/return/issue-82612-return-mutable-reference.stderr
index eb2322d51..59a6bb85d 100644
--- a/tests/ui/return/issue-82612-return-mutable-reference.stderr
+++ b/tests/ui/return/issue-82612-return-mutable-reference.stderr
@@ -23,6 +23,6 @@ help: you might have meant to return this value
LL | return value.get_or_insert_with(func);
| ++++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/return/return-from-diverging.stderr b/tests/ui/return/return-from-diverging.stderr
index 0c1fb4d9c..2eeed960d 100644
--- a/tests/ui/return/return-from-diverging.stderr
+++ b/tests/ui/return/return-from-diverging.stderr
@@ -9,6 +9,6 @@ LL | return "wow";
= note: expected type `!`
found reference `&'static str`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/return/return-type.stderr b/tests/ui/return/return-type.stderr
index 60d538eba..1757fcac6 100644
--- a/tests/ui/return/return-type.stderr
+++ b/tests/ui/return/return-type.stderr
@@ -15,6 +15,6 @@ help: try adding a return type
LL | fn bar() -> S<usize> {
| +++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/return/return-unit-from-diverging.stderr b/tests/ui/return/return-unit-from-diverging.stderr
index befc57563..0ce161e24 100644
--- a/tests/ui/return/return-unit-from-diverging.stderr
+++ b/tests/ui/return/return-unit-from-diverging.stderr
@@ -6,6 +6,6 @@ LL | fn fail() -> ! {
LL | return;
| ^^^^^^ return type is not `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0069`.
diff --git a/tests/ui/rfcs/rfc-0000-never_patterns/check.rs b/tests/ui/rfcs/rfc-0000-never_patterns/check.rs
new file mode 100644
index 000000000..e29811224
--- /dev/null
+++ b/tests/ui/rfcs/rfc-0000-never_patterns/check.rs
@@ -0,0 +1,33 @@
+#![feature(never_patterns)]
+#![allow(incomplete_features)]
+
+enum Void {}
+
+fn main() {}
+
+macro_rules! never {
+ () => { ! }
+}
+
+fn no_arms_or_guards(x: Void) {
+ match None::<Void> {
+ Some(!) => {}
+ //~^ ERROR a never pattern is always unreachable
+ None => {}
+ }
+ match None::<Void> {
+ Some(!) if true,
+ //~^ ERROR guard on a never pattern
+ None => {}
+ }
+ match None::<Void> {
+ Some(!) if true => {}
+ //~^ ERROR a never pattern is always unreachable
+ None => {}
+ }
+ match None::<Void> {
+ Some(never!()) => {},
+ //~^ ERROR a never pattern is always unreachable
+ None => {}
+ }
+}
diff --git a/tests/ui/rfcs/rfc-0000-never_patterns/check.stderr b/tests/ui/rfcs/rfc-0000-never_patterns/check.stderr
new file mode 100644
index 000000000..bfbc7a1b5
--- /dev/null
+++ b/tests/ui/rfcs/rfc-0000-never_patterns/check.stderr
@@ -0,0 +1,35 @@
+error: a never pattern is always unreachable
+ --> $DIR/check.rs:14:20
+ |
+LL | Some(!) => {}
+ | ^^
+ | |
+ | this will never be executed
+ | help: remove this expression
+
+error: a guard on a never pattern will never be run
+ --> $DIR/check.rs:19:20
+ |
+LL | Some(!) if true,
+ | ^^^^ help: remove this guard
+
+error: a never pattern is always unreachable
+ --> $DIR/check.rs:24:28
+ |
+LL | Some(!) if true => {}
+ | ^^
+ | |
+ | this will never be executed
+ | help: remove this expression
+
+error: a never pattern is always unreachable
+ --> $DIR/check.rs:29:27
+ |
+LL | Some(never!()) => {},
+ | ^^
+ | |
+ | this will never be executed
+ | help: remove this expression
+
+error: aborting due to 4 previous errors
+
diff --git a/tests/ui/rfcs/rfc-0000-never_patterns/parse.rs b/tests/ui/rfcs/rfc-0000-never_patterns/parse.rs
new file mode 100644
index 000000000..1b23e60e0
--- /dev/null
+++ b/tests/ui/rfcs/rfc-0000-never_patterns/parse.rs
@@ -0,0 +1,71 @@
+#![feature(never_patterns)]
+#![allow(incomplete_features)]
+
+enum Void {}
+
+fn main() {}
+
+macro_rules! never {
+ () => { ! }
+}
+
+fn parse(x: Void) {
+ match None::<Void> {
+ None => {}
+ Some(!),
+ }
+ match None::<Void> {
+ Some(!),
+ None => {}
+ }
+ match None::<Void> {
+ None => {}
+ Some(!)
+ }
+ match None::<Void> {
+ Some(!)
+ //~^ ERROR expected `,` following `match` arm
+ None => {}
+ }
+ match None::<Void> {
+ Some(!) if true
+ //~^ ERROR expected `,` following `match` arm
+ //~| ERROR guard on a never pattern
+ None => {}
+ }
+ match None::<Void> {
+ Some(!) if true,
+ //~^ ERROR guard on a never pattern
+ None => {}
+ }
+ match None::<Void> {
+ Some(!) <=
+ //~^ ERROR expected one of
+ }
+ match x {
+ never!(),
+ }
+ match x {
+ never!() if true,
+ //~^ ERROR guard on a never pattern
+ }
+ match x {
+ never!()
+ }
+ match &x {
+ &never!(),
+ }
+ match None::<Void> {
+ Some(never!()),
+ None => {}
+ }
+ match x { ! }
+ match &x { &! }
+
+ let res: Result<bool, Void> = Ok(false);
+ let Ok(_) = res;
+ let Ok(_) | Err(!) = &res; // Disallowed; see #82048.
+ //~^ ERROR top-level or-patterns are not allowed in `let` bindings
+ let (Ok(_) | Err(!)) = &res;
+ let (Ok(_) | Err(&!)) = res.as_ref();
+}
diff --git a/tests/ui/rfcs/rfc-0000-never_patterns/parse.stderr b/tests/ui/rfcs/rfc-0000-never_patterns/parse.stderr
new file mode 100644
index 000000000..e81a13a39
--- /dev/null
+++ b/tests/ui/rfcs/rfc-0000-never_patterns/parse.stderr
@@ -0,0 +1,44 @@
+error: expected `,` following `match` arm
+ --> $DIR/parse.rs:26:16
+ |
+LL | Some(!)
+ | ^ help: missing a comma here to end this `match` arm: `,`
+
+error: expected `,` following `match` arm
+ --> $DIR/parse.rs:31:24
+ |
+LL | Some(!) if true
+ | ^ help: missing a comma here to end this `match` arm: `,`
+
+error: expected one of `,`, `=>`, `if`, `|`, or `}`, found `<=`
+ --> $DIR/parse.rs:42:17
+ |
+LL | Some(!) <=
+ | ^^ expected one of `,`, `=>`, `if`, `|`, or `}`
+
+error: top-level or-patterns are not allowed in `let` bindings
+ --> $DIR/parse.rs:67:9
+ |
+LL | let Ok(_) | Err(!) = &res; // Disallowed; see #82048.
+ | ^^^^^^^^^^^^^^ help: wrap the pattern in parentheses: `(Ok(_) | Err(!))`
+
+error: a guard on a never pattern will never be run
+ --> $DIR/parse.rs:31:20
+ |
+LL | Some(!) if true
+ | ^^^^ help: remove this guard
+
+error: a guard on a never pattern will never be run
+ --> $DIR/parse.rs:37:20
+ |
+LL | Some(!) if true,
+ | ^^^^ help: remove this guard
+
+error: a guard on a never pattern will never be run
+ --> $DIR/parse.rs:49:21
+ |
+LL | never!() if true,
+ | ^^^^ help: remove this guard
+
+error: aborting due to 7 previous errors
+
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-embedded.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-embedded.stderr
index f08ba522a..334bd7618 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-embedded.stderr
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-embedded.stderr
@@ -7,5 +7,5 @@ LL | WRAP_DIRECT_INLINE => { panic!("WRAP_DIRECT_INLINE matched itself")
= note: the traits must be derived, manual `impl`s are not sufficient
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-param.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-param.stderr
index 012ccab17..58bfcbb45 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-param.stderr
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-param.stderr
@@ -7,5 +7,5 @@ LL | WRAP_DIRECT_PARAM => { panic!("WRAP_DIRECT_PARAM matched itself");
= note: the traits must be derived, manual `impl`s are not sufficient
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.with_gate.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.with_gate.stderr
index 623fd585a..505b7d79c 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.with_gate.stderr
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.with_gate.stderr
@@ -4,5 +4,5 @@ error: fatal error triggered by #[rustc_error]
LL | fn main() {
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.stderr
index 46600e7b2..729e747de 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.stderr
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.stderr
@@ -7,5 +7,5 @@ LL | A => (),
= note: the traits must be derived, manual `impl`s are not sufficient
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-forbidden-without-eq.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-forbidden-without-eq.stderr
index 1c4fb9146..c2000df88 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-forbidden-without-eq.stderr
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-forbidden-without-eq.stderr
@@ -17,5 +17,5 @@ LL | f32::INFINITY => { }
= note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
= note: `#[warn(illegal_floating_point_literal_pattern)]` on by default
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-nonempty-array-forbidden-without-eq.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-nonempty-array-forbidden-without-eq.stderr
index 6adebada0..477789f33 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-nonempty-array-forbidden-without-eq.stderr
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-nonempty-array-forbidden-without-eq.stderr
@@ -7,5 +7,5 @@ LL | FOO => { }
= note: the traits must be derived, manual `impl`s are not sufficient
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-requires-both-partialeq-and-eq.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-requires-both-partialeq-and-eq.stderr
index f5b10f062..b806046db 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-requires-both-partialeq-and-eq.stderr
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-requires-both-partialeq-and-eq.stderr
@@ -7,5 +7,5 @@ LL | FOO => { }
= note: the traits must be derived, manual `impl`s are not sufficient
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-1623-static/rfc1623-2.stderr b/tests/ui/rfcs/rfc-1623-static/rfc1623-2.stderr
index 5f8c5dbe6..52c700c32 100644
--- a/tests/ui/rfcs/rfc-1623-static/rfc1623-2.stderr
+++ b/tests/ui/rfcs/rfc-1623-static/rfc1623-2.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
LL | f: &id,
| ^^^ one type is more general than the other
|
- = note: expected trait `for<'a, 'b> Fn<(&'a Foo<'b>,)>`
- found trait `Fn<(&Foo<'_>,)>`
+ = note: expected trait `for<'a, 'b> Fn(&'a Foo<'b>)`
+ found trait `Fn(&Foo<'_>)`
error[E0308]: mismatched types
--> $DIR/rfc1623-2.rs:28:8
@@ -13,8 +13,8 @@ error[E0308]: mismatched types
LL | f: &id,
| ^^^ one type is more general than the other
|
- = note: expected trait `for<'a, 'b> Fn<(&'a Foo<'b>,)>`
- found trait `Fn<(&Foo<'_>,)>`
+ = note: expected trait `for<'a, 'b> Fn(&'a Foo<'b>)`
+ found trait `Fn(&Foo<'_>)`
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: implementation of `FnOnce` is not general enough
diff --git a/tests/ui/rfcs/rfc-1717-dllimport/missing-link-attr.stderr b/tests/ui/rfcs/rfc-1717-dllimport/missing-link-attr.stderr
index d4410e147..4218ef31e 100644
--- a/tests/ui/rfcs/rfc-1717-dllimport/missing-link-attr.stderr
+++ b/tests/ui/rfcs/rfc-1717-dllimport/missing-link-attr.stderr
@@ -1,4 +1,4 @@
error: renaming of the library `foo` was specified, however this crate contains no `#[link(...)]` attributes referencing this library
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-1717-dllimport/multiple-renames.stderr b/tests/ui/rfcs/rfc-1717-dllimport/multiple-renames.stderr
index a6fec9c4e..d931e23c7 100644
--- a/tests/ui/rfcs/rfc-1717-dllimport/multiple-renames.stderr
+++ b/tests/ui/rfcs/rfc-1717-dllimport/multiple-renames.stderr
@@ -1,4 +1,4 @@
error: multiple renamings were specified for library `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-1717-dllimport/rename-modifiers.stderr b/tests/ui/rfcs/rfc-1717-dllimport/rename-modifiers.stderr
index bee639bf2..ce145689f 100644
--- a/tests/ui/rfcs/rfc-1717-dllimport/rename-modifiers.stderr
+++ b/tests/ui/rfcs/rfc-1717-dllimport/rename-modifiers.stderr
@@ -4,5 +4,5 @@ error: overriding linking modifiers from command line is not supported
LL | extern "C" {}
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-1717-dllimport/rename-to-empty.stderr b/tests/ui/rfcs/rfc-1717-dllimport/rename-to-empty.stderr
index aca839d80..c208e0503 100644
--- a/tests/ui/rfcs/rfc-1717-dllimport/rename-to-empty.stderr
+++ b/tests/ui/rfcs/rfc-1717-dllimport/rename-to-empty.stderr
@@ -1,4 +1,4 @@
error: an empty renaming target was specified for library `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-1.stderr b/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-1.stderr
index 409dede1a..6c3d576cf 100644
--- a/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-1.stderr
+++ b/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-1.stderr
@@ -12,6 +12,6 @@ note: required by a bound in `receive`
LL | fn receive(_: impl std::process::Termination) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `receive`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.current.stderr b/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.current.stderr
index f72b3ab02..f2727336b 100644
--- a/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.current.stderr
+++ b/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.current.stderr
@@ -10,6 +10,6 @@ note: required by a bound in `Main::main::{opaque#0}`
LL | fn main() -> impl std::process::Termination;
| ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Main::main::{opaque#0}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.next.stderr b/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.next.stderr
index 8b01941b4..4bb420664 100644
--- a/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.next.stderr
+++ b/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.next.stderr
@@ -10,6 +10,6 @@ note: required by a bound in `Main::{opaque#0}`
LL | fn main() -> impl std::process::Termination;
| ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Main::{opaque#0}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.stderr b/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.stderr
index 40f736c21..3fbbfd0fd 100644
--- a/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.stderr
+++ b/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.stderr
@@ -10,6 +10,6 @@ note: required by a bound in `Main::{opaque#0}`
LL | fn main() -> impl std::process::Termination;
| ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Main::{opaque#0}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-impl-trait.stderr b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-impl-trait.stderr
index 5ee6d127e..f562b97c3 100644
--- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-impl-trait.stderr
+++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-impl-trait.stderr
@@ -6,6 +6,6 @@ LL | fn main() -> impl Copy { }
|
= help: consider using `()`, or a `Result`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-in-test-should-panic.stderr b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-in-test-should-panic.stderr
index 7f6749fc9..534599b74 100644
--- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-in-test-should-panic.stderr
+++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-in-test-should-panic.stderr
@@ -8,5 +8,5 @@ LL | | Ok(())
LL | | }
| |_^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-main-i32.stderr b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-main-i32.stderr
index 53779d365..fdbb0e655 100644
--- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-main-i32.stderr
+++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-main-i32.stderr
@@ -6,6 +6,6 @@ LL | fn main() -> i32 {
|
= help: consider using `()`, or a `Result`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-main-wrong-type.stderr b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-main-wrong-type.stderr
index bc8fd92ce..7ed17dff1 100644
--- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-main-wrong-type.stderr
+++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-main-wrong-type.stderr
@@ -6,6 +6,6 @@ LL | fn main() -> char {
|
= help: consider using `()`, or a `Result`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-not-satisfied.stderr b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-not-satisfied.stderr
index cb329548d..1b842c206 100644
--- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-not-satisfied.stderr
+++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-not-satisfied.stderr
@@ -6,6 +6,6 @@ LL | fn main() -> ReturnType {
|
= help: consider using `()`, or a `Result`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr
index a19750cc7..0a703367d 100644
--- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr
+++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `assert_test_result`
--> $SRC_DIR/test/src/lib.rs:LL:COL
= note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/borrowck-issue-49631.stderr b/tests/ui/rfcs/rfc-2005-default-binding-mode/borrowck-issue-49631.stderr
index 04572920e..a9c9eb2a5 100644
--- a/tests/ui/rfcs/rfc-2005-default-binding-mode/borrowck-issue-49631.stderr
+++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/borrowck-issue-49631.stderr
@@ -9,6 +9,6 @@ LL |
LL | println!("foo={:?}", *string);
| ------- immutable borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/const.stderr b/tests/ui/rfcs/rfc-2005-default-binding-mode/const.stderr
index fc06de90a..1c8e8d5b0 100644
--- a/tests/ui/rfcs/rfc-2005-default-binding-mode/const.stderr
+++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/const.stderr
@@ -13,6 +13,6 @@ LL | FOO => {},
| `FOO` is interpreted as a constant, not a new binding
| help: introduce a new binding instead: `other_foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/for.stderr b/tests/ui/rfcs/rfc-2005-default-binding-mode/for.stderr
index 07991af6e..8f720daf1 100644
--- a/tests/ui/rfcs/rfc-2005-default-binding-mode/for.stderr
+++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/for.stderr
@@ -12,6 +12,6 @@ help: consider borrowing the pattern binding
LL | for (n, ref mut m) in &tups {
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/issue-44912-or.stderr b/tests/ui/rfcs/rfc-2005-default-binding-mode/issue-44912-or.stderr
index e1e1bf7f6..84ba69703 100644
--- a/tests/ui/rfcs/rfc-2005-default-binding-mode/issue-44912-or.stderr
+++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/issue-44912-or.stderr
@@ -4,6 +4,6 @@ error[E0409]: variable `x` is bound inconsistently across alternatives separated
LL | Some((x, 3)) | &Some((ref x, 5)) => x,
| - first binding ^ bound in different ways
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0409`.
diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/lit.stderr b/tests/ui/rfcs/rfc-2005-default-binding-mode/lit.stderr
index 181f57899..970a9c151 100644
--- a/tests/ui/rfcs/rfc-2005-default-binding-mode/lit.stderr
+++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/lit.stderr
@@ -6,8 +6,8 @@ LL | match &s {
LL | "abc" => true,
| ^^^^^ expected `&&str`, found `&str`
|
- = note: expected reference `&&str`
- found reference `&'static str`
+ = note: expected reference `&&_`
+ found reference `&'static _`
error[E0308]: mismatched types
--> $DIR/lit.rs:16:9
diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/no-double-error.stderr b/tests/ui/rfcs/rfc-2005-default-binding-mode/no-double-error.stderr
index c672acee0..6000507c5 100644
--- a/tests/ui/rfcs/rfc-2005-default-binding-mode/no-double-error.stderr
+++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/no-double-error.stderr
@@ -4,6 +4,6 @@ error[E0599]: no associated item named `XXX` found for type `u32` in the current
LL | u32::XXX => { }
| ^^^ associated item not found in `u32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/slice.stderr b/tests/ui/rfcs/rfc-2005-default-binding-mode/slice.stderr
index 5b51dc5ac..a83c58e70 100644
--- a/tests/ui/rfcs/rfc-2005-default-binding-mode/slice.stderr
+++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/slice.stderr
@@ -11,6 +11,6 @@ LL ~ [first, remainder @ ..] => {},
LL ~ &[] => todo!(),
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/borrowck-non-exhaustive.stderr b/tests/ui/rfcs/rfc-2008-non-exhaustive/borrowck-non-exhaustive.stderr
index ad84ebe3a..70f5b2b84 100644
--- a/tests/ui/rfcs/rfc-2008-non-exhaustive/borrowck-non-exhaustive.stderr
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/borrowck-non-exhaustive.stderr
@@ -9,6 +9,6 @@ LL | match x {
LL | drop(y);
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0503`.
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/enum-as-cast.stderr b/tests/ui/rfcs/rfc-2008-non-exhaustive/enum-as-cast.stderr
index a61dcf839..c8dad8b80 100644
--- a/tests/ui/rfcs/rfc-2008-non-exhaustive/enum-as-cast.stderr
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/enum-as-cast.stderr
@@ -6,6 +6,6 @@ LL | let d = e as u8;
|
= note: cannot cast an enum with a non-exhaustive variant when it's defined in another crate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0606`.
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.normal.stderr b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.normal.stderr
index 46093eb9f..2535e0518 100644
--- a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.normal.stderr
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.normal.stderr
@@ -27,5 +27,5 @@ LL + #[deny(non_exhaustive_omitted_patterns)]
LL | match val {
|
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.rs
index e0a6051a8..a6c1dc53f 100644
--- a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.rs
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.rs
@@ -1,6 +1,7 @@
// Test that the `non_exhaustive_omitted_patterns` lint is triggered correctly.
#![feature(non_exhaustive_omitted_patterns_lint, unstable_test_feature)]
+#![deny(unreachable_patterns)]
// aux-build:enums.rs
extern crate enums;
@@ -31,11 +32,21 @@ pub enum Bar {
C,
}
+fn no_lint() {
+ let non_enum = NonExhaustiveEnum::Unit;
+ // Ok: without the attribute
+ match non_enum {
+ NonExhaustiveEnum::Unit => {}
+ NonExhaustiveEnum::Tuple(_) => {}
+ _ => {}
+ }
+}
+
+#[deny(non_exhaustive_omitted_patterns)]
fn main() {
let enumeration = Bar::A;
// Ok: this is a crate local non_exhaustive enum
- #[deny(non_exhaustive_omitted_patterns)]
match enumeration {
Bar::A => {}
Bar::B => {}
@@ -44,14 +55,13 @@ fn main() {
let non_enum = NonExhaustiveEnum::Unit;
- // Ok: without the attribute
+ #[allow(non_exhaustive_omitted_patterns)]
match non_enum {
NonExhaustiveEnum::Unit => {}
NonExhaustiveEnum::Tuple(_) => {}
_ => {}
}
- #[deny(non_exhaustive_omitted_patterns)]
match non_enum {
//~^ some variants are not matched explicitly
NonExhaustiveEnum::Unit => {}
@@ -59,7 +69,6 @@ fn main() {
_ => {}
}
- #[deny(non_exhaustive_omitted_patterns)]
match non_enum {
//~^ some variants are not matched explicitly
NonExhaustiveEnum::Unit | NonExhaustiveEnum::Struct { .. } => {}
@@ -68,7 +77,6 @@ fn main() {
let x = 5;
// We ignore the guard.
- #[deny(non_exhaustive_omitted_patterns)]
match non_enum {
NonExhaustiveEnum::Unit if x > 10 => {}
NonExhaustiveEnum::Tuple(_) => {}
@@ -76,14 +84,12 @@ fn main() {
_ => {}
}
- #[deny(non_exhaustive_omitted_patterns)]
match (non_enum, true) {
(NonExhaustiveEnum::Unit, true) => {}
(NonExhaustiveEnum::Tuple(_), false) => {}
(NonExhaustiveEnum::Struct { .. }, false) => {}
_ => {}
}
- #[deny(non_exhaustive_omitted_patterns)]
match (non_enum, true) {
//~^ some variants are not matched explicitly
(NonExhaustiveEnum::Unit, true) => {}
@@ -91,14 +97,12 @@ fn main() {
_ => {}
}
- #[deny(non_exhaustive_omitted_patterns)]
match (true, non_enum) {
(true, NonExhaustiveEnum::Unit) => {}
(false, NonExhaustiveEnum::Tuple(_)) => {}
(false, NonExhaustiveEnum::Struct { .. }) => {}
_ => {}
}
- #[deny(non_exhaustive_omitted_patterns)]
match (true, non_enum) {
//~^ some variants are not matched explicitly
(true, NonExhaustiveEnum::Unit) => {}
@@ -106,7 +110,6 @@ fn main() {
_ => {}
}
- #[deny(non_exhaustive_omitted_patterns)]
match Some(non_enum) {
//~^ some variants are not matched explicitly
Some(NonExhaustiveEnum::Unit) => {}
@@ -116,7 +119,6 @@ fn main() {
// Ok: all covered and not `unreachable-patterns`
#[deny(unreachable_patterns)]
- #[deny(non_exhaustive_omitted_patterns)]
match non_enum {
NonExhaustiveEnum::Unit => {}
NonExhaustiveEnum::Tuple(_) => {}
@@ -124,7 +126,6 @@ fn main() {
_ => {}
}
- #[deny(non_exhaustive_omitted_patterns)]
match NestedNonExhaustive::B {
//~^ some variants are not matched explicitly
NestedNonExhaustive::A(NonExhaustiveEnum::Unit) => {}
@@ -133,54 +134,53 @@ fn main() {
_ => {}
}
- #[warn(non_exhaustive_omitted_patterns)]
match VariantNonExhaustive::Baz(1, 2) {
VariantNonExhaustive::Baz(_, _) => {}
VariantNonExhaustive::Bar { x, .. } => {}
}
//~^^ some fields are not explicitly listed
- #[warn(non_exhaustive_omitted_patterns)]
let FunctionalRecord { first_field, second_field, .. } = FunctionalRecord::default();
//~^ some fields are not explicitly listed
// Ok: this is local
- #[warn(non_exhaustive_omitted_patterns)]
let Foo { a, b, .. } = Foo::default();
- #[warn(non_exhaustive_omitted_patterns)]
let NestedStruct { bar: NormalStruct { first_field, .. }, .. } = NestedStruct::default();
//~^ some fields are not explicitly listed
//~^^ some fields are not explicitly listed
// Ok: this tests https://github.com/rust-lang/rust/issues/89382
- #[warn(non_exhaustive_omitted_patterns)]
let MixedVisFields { a, b, .. } = MixedVisFields::default();
// Ok: this only has 1 variant
- #[deny(non_exhaustive_omitted_patterns)]
match NonExhaustiveSingleVariant::A(true) {
NonExhaustiveSingleVariant::A(true) => {}
_ => {}
}
// We can't catch the case below, so for consistency we don't catch this one either.
- #[deny(non_exhaustive_omitted_patterns)]
match NonExhaustiveSingleVariant::A(true) {
_ => {}
}
// We can't catch this case, because this would require digging fully through all the values of
// any type we encounter. We need to be able to only consider present constructors.
- #[deny(non_exhaustive_omitted_patterns)]
match &NonExhaustiveSingleVariant::A(true) {
_ => {}
}
+ match Some(NonExhaustiveSingleVariant::A(true)) {
+ Some(_) => {}
+ None => {}
+ }
+ match Some(&NonExhaustiveSingleVariant::A(true)) {
+ Some(_) => {}
+ None => {}
+ }
+
// Ok: we don't lint on `if let` expressions
- #[deny(non_exhaustive_omitted_patterns)]
if let NonExhaustiveEnum::Tuple(_) = non_enum {}
- #[deny(non_exhaustive_omitted_patterns)]
match UnstableEnum::Stable {
//~^ some variants are not matched explicitly
UnstableEnum::Stable => {}
@@ -189,7 +189,6 @@ fn main() {
}
// Ok: the feature is on and all variants are matched
- #[deny(non_exhaustive_omitted_patterns)]
match UnstableEnum::Stable {
UnstableEnum::Stable => {}
UnstableEnum::Stable2 => {}
@@ -198,52 +197,66 @@ fn main() {
}
// Ok: the feature is on and both variants are matched
- #[deny(non_exhaustive_omitted_patterns)]
match OnlyUnstableEnum::Unstable {
OnlyUnstableEnum::Unstable => {}
OnlyUnstableEnum::Unstable2 => {}
_ => {}
}
- #[deny(non_exhaustive_omitted_patterns)]
match OnlyUnstableEnum::Unstable {
//~^ some variants are not matched explicitly
OnlyUnstableEnum::Unstable => {}
_ => {}
}
- #[warn(non_exhaustive_omitted_patterns)]
let OnlyUnstableStruct { unstable, .. } = OnlyUnstableStruct::new();
//~^ some fields are not explicitly listed
// OK: both unstable fields are matched with feature on
- #[warn(non_exhaustive_omitted_patterns)]
let OnlyUnstableStruct { unstable, unstable2, .. } = OnlyUnstableStruct::new();
- #[warn(non_exhaustive_omitted_patterns)]
let UnstableStruct { stable, stable2, .. } = UnstableStruct::default();
//~^ some fields are not explicitly listed
// OK: both unstable and stable fields are matched with feature on
- #[warn(non_exhaustive_omitted_patterns)]
let UnstableStruct { stable, stable2, unstable, .. } = UnstableStruct::default();
// Ok: local bindings are allowed
- #[deny(non_exhaustive_omitted_patterns)]
let local = NonExhaustiveEnum::Unit;
// Ok: missing patterns will be blocked by the pattern being refutable
- #[deny(non_exhaustive_omitted_patterns)]
let local_refutable @ NonExhaustiveEnum::Unit = NonExhaustiveEnum::Unit;
//~^ refutable pattern in local binding
- #[deny(non_exhaustive_omitted_patterns)]
+ // Check that matching on a reference results in a correct diagnostic
match &non_enum {
//~^ some variants are not matched explicitly
+ //~| pattern `&NonExhaustiveEnum::Struct { .. }` not covered
NonExhaustiveEnum::Unit => {}
NonExhaustiveEnum::Tuple(_) => {}
_ => {}
}
+
+ match (true, &non_enum) {
+ //~^ some variants are not matched explicitly
+ //~| patterns `(_, &NonExhaustiveEnum::Tuple(_))` and `(_, &NonExhaustiveEnum::Struct { .. })` not covered
+ (true, NonExhaustiveEnum::Unit) => {}
+ _ => {}
+ }
+
+ match (&non_enum, true) {
+ //~^ some variants are not matched explicitly
+ //~| patterns `(&NonExhaustiveEnum::Tuple(_), _)` and `(&NonExhaustiveEnum::Struct { .. }, _)` not covered
+ (NonExhaustiveEnum::Unit, true) => {}
+ _ => {}
+ }
+
+ match Some(&non_enum) {
+ //~^ some variants are not matched explicitly
+ //~| pattern `Some(&NonExhaustiveEnum::Struct { .. })` not covered
+ Some(NonExhaustiveEnum::Unit | NonExhaustiveEnum::Tuple(_)) => {}
+ _ => {}
+ }
}
#[deny(non_exhaustive_omitted_patterns)]
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.stderr b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.stderr
index 7db61f124..1037033c4 100644
--- a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.stderr
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.stderr
@@ -1,4 +1,4 @@
-warning: some fields are not explicitly listed
+error: some fields are not explicitly listed
--> $DIR/omitted-patterns.rs:139:9
|
LL | VariantNonExhaustive::Bar { x, .. } => {}
@@ -7,41 +7,31 @@ LL | VariantNonExhaustive::Bar { x, .. } => {}
= help: ensure that all fields are mentioned explicitly by adding the suggested fields
= note: the pattern is of type `VariantNonExhaustive` and the `non_exhaustive_omitted_patterns` attribute was found
note: the lint level is defined here
- --> $DIR/omitted-patterns.rs:136:12
+ --> $DIR/omitted-patterns.rs:45:8
|
-LL | #[warn(non_exhaustive_omitted_patterns)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #[deny(non_exhaustive_omitted_patterns)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-warning: some fields are not explicitly listed
- --> $DIR/omitted-patterns.rs:144:9
+error: some fields are not explicitly listed
+ --> $DIR/omitted-patterns.rs:143:9
|
LL | let FunctionalRecord { first_field, second_field, .. } = FunctionalRecord::default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `third_field` not listed
|
= help: ensure that all fields are mentioned explicitly by adding the suggested fields
= note: the pattern is of type `FunctionalRecord` and the `non_exhaustive_omitted_patterns` attribute was found
-note: the lint level is defined here
- --> $DIR/omitted-patterns.rs:143:12
- |
-LL | #[warn(non_exhaustive_omitted_patterns)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-warning: some fields are not explicitly listed
- --> $DIR/omitted-patterns.rs:152:29
+error: some fields are not explicitly listed
+ --> $DIR/omitted-patterns.rs:149:29
|
LL | let NestedStruct { bar: NormalStruct { first_field, .. }, .. } = NestedStruct::default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `second_field` not listed
|
= help: ensure that all fields are mentioned explicitly by adding the suggested fields
= note: the pattern is of type `NormalStruct` and the `non_exhaustive_omitted_patterns` attribute was found
-note: the lint level is defined here
- --> $DIR/omitted-patterns.rs:151:12
- |
-LL | #[warn(non_exhaustive_omitted_patterns)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-warning: some fields are not explicitly listed
- --> $DIR/omitted-patterns.rs:152:9
+error: some fields are not explicitly listed
+ --> $DIR/omitted-patterns.rs:149:9
|
LL | let NestedStruct { bar: NormalStruct { first_field, .. }, .. } = NestedStruct::default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `foo` not listed
@@ -49,117 +39,77 @@ LL | let NestedStruct { bar: NormalStruct { first_field, .. }, .. } = Nested
= help: ensure that all fields are mentioned explicitly by adding the suggested fields
= note: the pattern is of type `NestedStruct` and the `non_exhaustive_omitted_patterns` attribute was found
-warning: some fields are not explicitly listed
- --> $DIR/omitted-patterns.rs:216:9
+error: some fields are not explicitly listed
+ --> $DIR/omitted-patterns.rs:212:9
|
LL | let OnlyUnstableStruct { unstable, .. } = OnlyUnstableStruct::new();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `unstable2` not listed
|
= help: ensure that all fields are mentioned explicitly by adding the suggested fields
= note: the pattern is of type `OnlyUnstableStruct` and the `non_exhaustive_omitted_patterns` attribute was found
-note: the lint level is defined here
- --> $DIR/omitted-patterns.rs:215:12
- |
-LL | #[warn(non_exhaustive_omitted_patterns)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-warning: some fields are not explicitly listed
- --> $DIR/omitted-patterns.rs:224:9
+error: some fields are not explicitly listed
+ --> $DIR/omitted-patterns.rs:218:9
|
LL | let UnstableStruct { stable, stable2, .. } = UnstableStruct::default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `unstable` not listed
|
= help: ensure that all fields are mentioned explicitly by adding the suggested fields
= note: the pattern is of type `UnstableStruct` and the `non_exhaustive_omitted_patterns` attribute was found
-note: the lint level is defined here
- --> $DIR/omitted-patterns.rs:223:12
- |
-LL | #[warn(non_exhaustive_omitted_patterns)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: some variants are not matched explicitly
- --> $DIR/omitted-patterns.rs:55:11
+ --> $DIR/omitted-patterns.rs:65:11
|
LL | match non_enum {
| ^^^^^^^^ pattern `NonExhaustiveEnum::Struct { .. }` not covered
|
= help: ensure that all variants are matched explicitly by adding the suggested match arms
= note: the matched value is of type `NonExhaustiveEnum` and the `non_exhaustive_omitted_patterns` attribute was found
-note: the lint level is defined here
- --> $DIR/omitted-patterns.rs:54:12
- |
-LL | #[deny(non_exhaustive_omitted_patterns)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: some variants are not matched explicitly
- --> $DIR/omitted-patterns.rs:63:11
+ --> $DIR/omitted-patterns.rs:72:11
|
LL | match non_enum {
| ^^^^^^^^ pattern `NonExhaustiveEnum::Tuple(_)` not covered
|
= help: ensure that all variants are matched explicitly by adding the suggested match arms
= note: the matched value is of type `NonExhaustiveEnum` and the `non_exhaustive_omitted_patterns` attribute was found
-note: the lint level is defined here
- --> $DIR/omitted-patterns.rs:62:12
- |
-LL | #[deny(non_exhaustive_omitted_patterns)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: some variants are not matched explicitly
- --> $DIR/omitted-patterns.rs:87:11
+ --> $DIR/omitted-patterns.rs:93:11
|
LL | match (non_enum, true) {
| ^^^^^^^^^^^^^^^^ pattern `(NonExhaustiveEnum::Struct { .. }, _)` not covered
|
= help: ensure that all variants are matched explicitly by adding the suggested match arms
= note: the matched value is of type `(NonExhaustiveEnum, bool)` and the `non_exhaustive_omitted_patterns` attribute was found
-note: the lint level is defined here
- --> $DIR/omitted-patterns.rs:86:12
- |
-LL | #[deny(non_exhaustive_omitted_patterns)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: some variants are not matched explicitly
- --> $DIR/omitted-patterns.rs:102:11
+ --> $DIR/omitted-patterns.rs:106:11
|
LL | match (true, non_enum) {
| ^^^^^^^^^^^^^^^^ pattern `(_, NonExhaustiveEnum::Struct { .. })` not covered
|
= help: ensure that all variants are matched explicitly by adding the suggested match arms
= note: the matched value is of type `(bool, NonExhaustiveEnum)` and the `non_exhaustive_omitted_patterns` attribute was found
-note: the lint level is defined here
- --> $DIR/omitted-patterns.rs:101:12
- |
-LL | #[deny(non_exhaustive_omitted_patterns)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: some variants are not matched explicitly
- --> $DIR/omitted-patterns.rs:110:11
+ --> $DIR/omitted-patterns.rs:113:11
|
LL | match Some(non_enum) {
| ^^^^^^^^^^^^^^ pattern `Some(NonExhaustiveEnum::Struct { .. })` not covered
|
= help: ensure that all variants are matched explicitly by adding the suggested match arms
= note: the matched value is of type `Option<NonExhaustiveEnum>` and the `non_exhaustive_omitted_patterns` attribute was found
-note: the lint level is defined here
- --> $DIR/omitted-patterns.rs:109:12
- |
-LL | #[deny(non_exhaustive_omitted_patterns)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: some variants are not matched explicitly
- --> $DIR/omitted-patterns.rs:128:11
+ --> $DIR/omitted-patterns.rs:129:11
|
LL | match NestedNonExhaustive::B {
| ^^^^^^^^^^^^^^^^^^^^^^ patterns `NestedNonExhaustive::C`, `NestedNonExhaustive::A(NonExhaustiveEnum::Tuple(_))` and `NestedNonExhaustive::A(NonExhaustiveEnum::Struct { .. })` not covered
|
= help: ensure that all variants are matched explicitly by adding the suggested match arms
= note: the matched value is of type `NestedNonExhaustive` and the `non_exhaustive_omitted_patterns` attribute was found
-note: the lint level is defined here
- --> $DIR/omitted-patterns.rs:127:12
- |
-LL | #[deny(non_exhaustive_omitted_patterns)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: some variants are not matched explicitly
--> $DIR/omitted-patterns.rs:184:11
@@ -169,28 +119,18 @@ LL | match UnstableEnum::Stable {
|
= help: ensure that all variants are matched explicitly by adding the suggested match arms
= note: the matched value is of type `UnstableEnum` and the `non_exhaustive_omitted_patterns` attribute was found
-note: the lint level is defined here
- --> $DIR/omitted-patterns.rs:183:12
- |
-LL | #[deny(non_exhaustive_omitted_patterns)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: some variants are not matched explicitly
- --> $DIR/omitted-patterns.rs:209:11
+ --> $DIR/omitted-patterns.rs:206:11
|
LL | match OnlyUnstableEnum::Unstable {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `OnlyUnstableEnum::Unstable2` not covered
|
= help: ensure that all variants are matched explicitly by adding the suggested match arms
= note: the matched value is of type `OnlyUnstableEnum` and the `non_exhaustive_omitted_patterns` attribute was found
-note: the lint level is defined here
- --> $DIR/omitted-patterns.rs:208:12
- |
-LL | #[deny(non_exhaustive_omitted_patterns)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0005]: refutable pattern in local binding
- --> $DIR/omitted-patterns.rs:237:9
+ --> $DIR/omitted-patterns.rs:228:9
|
LL | let local_refutable @ NonExhaustiveEnum::Unit = NonExhaustiveEnum::Unit;
| ^^^^^^^^^^^^^^^ pattern `_` not covered
@@ -204,19 +144,41 @@ LL | let local_refutable @ NonExhaustiveEnum::Unit = NonExhaustiveEnum::Unit
| ++++++++++++++++
error: some variants are not matched explicitly
- --> $DIR/omitted-patterns.rs:241:11
+ --> $DIR/omitted-patterns.rs:232:11
|
LL | match &non_enum {
| ^^^^^^^^^ pattern `&NonExhaustiveEnum::Struct { .. }` not covered
|
= help: ensure that all variants are matched explicitly by adding the suggested match arms
= note: the matched value is of type `&NonExhaustiveEnum` and the `non_exhaustive_omitted_patterns` attribute was found
-note: the lint level is defined here
- --> $DIR/omitted-patterns.rs:240:12
+
+error: some variants are not matched explicitly
+ --> $DIR/omitted-patterns.rs:240:11
+ |
+LL | match (true, &non_enum) {
+ | ^^^^^^^^^^^^^^^^^ patterns `(_, &NonExhaustiveEnum::Tuple(_))` and `(_, &NonExhaustiveEnum::Struct { .. })` not covered
|
-LL | #[deny(non_exhaustive_omitted_patterns)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ = help: ensure that all variants are matched explicitly by adding the suggested match arms
+ = note: the matched value is of type `(bool, &NonExhaustiveEnum)` and the `non_exhaustive_omitted_patterns` attribute was found
+
+error: some variants are not matched explicitly
+ --> $DIR/omitted-patterns.rs:247:11
+ |
+LL | match (&non_enum, true) {
+ | ^^^^^^^^^^^^^^^^^ patterns `(&NonExhaustiveEnum::Tuple(_), _)` and `(&NonExhaustiveEnum::Struct { .. }, _)` not covered
+ |
+ = help: ensure that all variants are matched explicitly by adding the suggested match arms
+ = note: the matched value is of type `(&NonExhaustiveEnum, bool)` and the `non_exhaustive_omitted_patterns` attribute was found
+
+error: some variants are not matched explicitly
+ --> $DIR/omitted-patterns.rs:254:11
+ |
+LL | match Some(&non_enum) {
+ | ^^^^^^^^^^^^^^^ pattern `Some(&NonExhaustiveEnum::Struct { .. })` not covered
+ |
+ = help: ensure that all variants are matched explicitly by adding the suggested match arms
+ = note: the matched value is of type `Option<&NonExhaustiveEnum>` and the `non_exhaustive_omitted_patterns` attribute was found
-error: aborting due to 10 previous errors; 6 warnings emitted
+error: aborting due to 19 previous errors
For more information about this error, try `rustc --explain E0005`.
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/stable-omitted-patterns.stderr b/tests/ui/rfcs/rfc-2008-non-exhaustive/stable-omitted-patterns.stderr
index 27939176f..2658b20a7 100644
--- a/tests/ui/rfcs/rfc-2008-non-exhaustive/stable-omitted-patterns.stderr
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/stable-omitted-patterns.stderr
@@ -26,5 +26,5 @@ note: the lint level is defined here
LL | #[deny(non_exhaustive_omitted_patterns)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/issue-65157-repeated-match-arm.stderr b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/issue-65157-repeated-match-arm.stderr
index f39e6ee29..3034a67dc 100644
--- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/issue-65157-repeated-match-arm.stderr
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/issue-65157-repeated-match-arm.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.rs b/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.rs
index c27e8c4b0..c7665affb 100644
--- a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.rs
+++ b/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.rs
@@ -1,7 +1,7 @@
// Check that we can manually implement an object-unsafe trait for its trait object.
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// run-pass
#![feature(object_safe_for_dispatch)]
diff --git a/tests/ui/rfcs/rfc-2091-track-caller/error-odd-syntax.stderr b/tests/ui/rfcs/rfc-2091-track-caller/error-odd-syntax.stderr
index e7ddf8df4..e22d812c8 100644
--- a/tests/ui/rfcs/rfc-2091-track-caller/error-odd-syntax.stderr
+++ b/tests/ui/rfcs/rfc-2091-track-caller/error-odd-syntax.stderr
@@ -4,5 +4,5 @@ error: malformed `track_caller` attribute input
LL | #[track_caller(1)]
| ^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[track_caller]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2091-track-caller/error-with-main.stderr b/tests/ui/rfcs/rfc-2091-track-caller/error-with-main.stderr
index 6d6562dae..4626544a5 100644
--- a/tests/ui/rfcs/rfc-2091-track-caller/error-with-main.stderr
+++ b/tests/ui/rfcs/rfc-2091-track-caller/error-with-main.stderr
@@ -6,5 +6,5 @@ LL | #[track_caller]
LL | fn main() {
| --------- `main` function is not allowed to be `#[track_caller]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2091-track-caller/error-with-start.stderr b/tests/ui/rfcs/rfc-2091-track-caller/error-with-start.stderr
index b6ef62152..2738444f2 100644
--- a/tests/ui/rfcs/rfc-2091-track-caller/error-with-start.stderr
+++ b/tests/ui/rfcs/rfc-2091-track-caller/error-with-start.stderr
@@ -6,5 +6,5 @@ LL | #[track_caller]
LL | fn start(_argc: isize, _argv: *const *const u8) -> isize {
| -------------------------------------------------------- `#[start]` function is not allowed to be `#[track_caller]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2091-track-caller/only-for-fns.stderr b/tests/ui/rfcs/rfc-2091-track-caller/only-for-fns.stderr
index b36597bde..f976b7f52 100644
--- a/tests/ui/rfcs/rfc-2091-track-caller/only-for-fns.stderr
+++ b/tests/ui/rfcs/rfc-2091-track-caller/only-for-fns.stderr
@@ -6,6 +6,6 @@ LL | #[track_caller]
LL | struct S;
| --------- not a function definition
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0739`.
diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/cross-crate.stderr b/tests/ui/rfcs/rfc-2093-infer-outlives/cross-crate.stderr
index 76300cce5..e2a92cf72 100644
--- a/tests/ui/rfcs/rfc-2093-infer-outlives/cross-crate.stderr
+++ b/tests/ui/rfcs/rfc-2093-infer-outlives/cross-crate.stderr
@@ -6,5 +6,5 @@ LL | struct Foo<'a, T> {
|
= note: T: 'a
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/dont-infer-static.stderr b/tests/ui/rfcs/rfc-2093-infer-outlives/dont-infer-static.stderr
index 041f7ebc0..b0f1d7b33 100644
--- a/tests/ui/rfcs/rfc-2093-infer-outlives/dont-infer-static.stderr
+++ b/tests/ui/rfcs/rfc-2093-infer-outlives/dont-infer-static.stderr
@@ -17,6 +17,6 @@ help: consider adding an explicit lifetime bound
LL | struct Foo<U: 'static> {
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0310`.
diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/explicit-dyn.stderr b/tests/ui/rfcs/rfc-2093-infer-outlives/explicit-dyn.stderr
index 595a5c280..30d1b3e77 100644
--- a/tests/ui/rfcs/rfc-2093-infer-outlives/explicit-dyn.stderr
+++ b/tests/ui/rfcs/rfc-2093-infer-outlives/explicit-dyn.stderr
@@ -6,5 +6,5 @@ LL | struct Foo<'a, A>
|
= note: A: 'a
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/explicit-enum.stderr b/tests/ui/rfcs/rfc-2093-infer-outlives/explicit-enum.stderr
index 3059f95ae..afc044d88 100644
--- a/tests/ui/rfcs/rfc-2093-infer-outlives/explicit-enum.stderr
+++ b/tests/ui/rfcs/rfc-2093-infer-outlives/explicit-enum.stderr
@@ -6,5 +6,5 @@ LL | enum Foo<'a, U> {
|
= note: U: 'a
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/explicit-projection.stderr b/tests/ui/rfcs/rfc-2093-infer-outlives/explicit-projection.stderr
index 589e95899..1c39c984a 100644
--- a/tests/ui/rfcs/rfc-2093-infer-outlives/explicit-projection.stderr
+++ b/tests/ui/rfcs/rfc-2093-infer-outlives/explicit-projection.stderr
@@ -6,5 +6,5 @@ LL | struct Foo<'a, A, B> where A: Trait<'a, B>
|
= note: B: 'a
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/explicit-struct.stderr b/tests/ui/rfcs/rfc-2093-infer-outlives/explicit-struct.stderr
index 9912e36b2..4ec3087ac 100644
--- a/tests/ui/rfcs/rfc-2093-infer-outlives/explicit-struct.stderr
+++ b/tests/ui/rfcs/rfc-2093-infer-outlives/explicit-struct.stderr
@@ -6,5 +6,5 @@ LL | struct Foo<'b, U> {
|
= note: U: 'b
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/explicit-union.stderr b/tests/ui/rfcs/rfc-2093-infer-outlives/explicit-union.stderr
index 16b64bdc2..bbb48ef1f 100644
--- a/tests/ui/rfcs/rfc-2093-infer-outlives/explicit-union.stderr
+++ b/tests/ui/rfcs/rfc-2093-infer-outlives/explicit-union.stderr
@@ -6,5 +6,5 @@ LL | union Foo<'b, U: Copy> {
|
= note: U: 'b
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/nested-enum.stderr b/tests/ui/rfcs/rfc-2093-infer-outlives/nested-enum.stderr
index 4350e6e8b..b584d17ae 100644
--- a/tests/ui/rfcs/rfc-2093-infer-outlives/nested-enum.stderr
+++ b/tests/ui/rfcs/rfc-2093-infer-outlives/nested-enum.stderr
@@ -6,5 +6,5 @@ LL | enum Foo<'a, T> {
|
= note: T: 'a
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/nested-regions.stderr b/tests/ui/rfcs/rfc-2093-infer-outlives/nested-regions.stderr
index c08add7ed..59df869c4 100644
--- a/tests/ui/rfcs/rfc-2093-infer-outlives/nested-regions.stderr
+++ b/tests/ui/rfcs/rfc-2093-infer-outlives/nested-regions.stderr
@@ -8,5 +8,5 @@ LL | struct Foo<'a, 'b, T> {
= note: T: 'a
= note: T: 'b
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/nested-structs.stderr b/tests/ui/rfcs/rfc-2093-infer-outlives/nested-structs.stderr
index 769555234..7e5af7fe6 100644
--- a/tests/ui/rfcs/rfc-2093-infer-outlives/nested-structs.stderr
+++ b/tests/ui/rfcs/rfc-2093-infer-outlives/nested-structs.stderr
@@ -6,5 +6,5 @@ LL | struct Foo<'a, T> {
|
= note: T: 'a
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/nested-union.stderr b/tests/ui/rfcs/rfc-2093-infer-outlives/nested-union.stderr
index a785c63ce..bb0eea027 100644
--- a/tests/ui/rfcs/rfc-2093-infer-outlives/nested-union.stderr
+++ b/tests/ui/rfcs/rfc-2093-infer-outlives/nested-union.stderr
@@ -6,5 +6,5 @@ LL | union Foo<'a, T: Copy> {
|
= note: T: 'a
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/projection.stderr b/tests/ui/rfcs/rfc-2093-infer-outlives/projection.stderr
index d9342013f..47f3458e0 100644
--- a/tests/ui/rfcs/rfc-2093-infer-outlives/projection.stderr
+++ b/tests/ui/rfcs/rfc-2093-infer-outlives/projection.stderr
@@ -6,5 +6,5 @@ LL | struct Foo<'a, T: Iterator> {
|
= note: <T as Iterator>::Item: 'a
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/reference.stderr b/tests/ui/rfcs/rfc-2093-infer-outlives/reference.stderr
index 508114357..329d5ff06 100644
--- a/tests/ui/rfcs/rfc-2093-infer-outlives/reference.stderr
+++ b/tests/ui/rfcs/rfc-2093-infer-outlives/reference.stderr
@@ -6,5 +6,5 @@ LL | struct Foo<'a, T> {
|
= note: T: 'a
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.stderr b/tests/ui/rfcs/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.stderr
index 5dff4c8ff..591585c88 100644
--- a/tests/ui/rfcs/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.stderr
+++ b/tests/ui/rfcs/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.stderr
@@ -15,6 +15,6 @@ note: but the referenced data is only valid for the lifetime `'b` as defined her
LL | impl<'a, 'b> Trait<'a, 'b> for usize {
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0491`.
diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.stderr b/tests/ui/rfcs/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.stderr
index 975776cdd..0404b52d9 100644
--- a/tests/ui/rfcs/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.stderr
+++ b/tests/ui/rfcs/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.stderr
@@ -15,6 +15,6 @@ note: but the referenced data is only valid for the lifetime `'b` as defined her
LL | impl<'a, 'b> Trait<'a, 'b> for usize {
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0491`.
diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.stderr b/tests/ui/rfcs/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.stderr
index be05ecec0..62415e250 100644
--- a/tests/ui/rfcs/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.stderr
+++ b/tests/ui/rfcs/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.stderr
@@ -15,6 +15,6 @@ note: but the referenced data is only valid for the lifetime `'b` as defined her
LL | impl<'a, 'b> Trait<'a, 'b> for usize {
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0491`.
diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr b/tests/ui/rfcs/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr
index 4ba1778d6..464d7968b 100644
--- a/tests/ui/rfcs/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr
+++ b/tests/ui/rfcs/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr
@@ -15,6 +15,6 @@ note: but the referenced data is only valid for the lifetime `'b` as defined her
LL | impl<'a, 'b> Trait<'a, 'b> for usize {
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0491`.
diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/self-dyn.stderr b/tests/ui/rfcs/rfc-2093-infer-outlives/self-dyn.stderr
index 9c836b190..8f8ee9205 100644
--- a/tests/ui/rfcs/rfc-2093-infer-outlives/self-dyn.stderr
+++ b/tests/ui/rfcs/rfc-2093-infer-outlives/self-dyn.stderr
@@ -6,5 +6,5 @@ LL | struct Foo<'a, 'b, A>
|
= note: A: 'a
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/self-structs.stderr b/tests/ui/rfcs/rfc-2093-infer-outlives/self-structs.stderr
index 2b4625f77..7fef81c26 100644
--- a/tests/ui/rfcs/rfc-2093-infer-outlives/self-structs.stderr
+++ b/tests/ui/rfcs/rfc-2093-infer-outlives/self-structs.stderr
@@ -6,5 +6,5 @@ LL | struct Foo<'a, 'b, T> {
|
= note: T: 'a
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2126-crate-paths/keyword-crate-as-identifier.stderr b/tests/ui/rfcs/rfc-2126-crate-paths/keyword-crate-as-identifier.stderr
index c39a70f66..771a09abe 100644
--- a/tests/ui/rfcs/rfc-2126-crate-paths/keyword-crate-as-identifier.stderr
+++ b/tests/ui/rfcs/rfc-2126-crate-paths/keyword-crate-as-identifier.stderr
@@ -4,6 +4,6 @@ error[E0532]: expected unit struct, unit variant or constant, found module `crat
LL | let crate = 0;
| ^^^^^ not a unit struct, unit variant or constant
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0532`.
diff --git a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-1.stderr b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-1.stderr
index 818915721..1047dbe10 100644
--- a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-1.stderr
+++ b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-1.stderr
@@ -4,6 +4,6 @@ error[E0432]: unresolved import `xcrate`
LL | use xcrate::S;
| ^^^^^^ use of undeclared crate or module `xcrate`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-2.stderr b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-2.stderr
index 7df4f06d1..e3875fd84 100644
--- a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-2.stderr
+++ b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-2.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: could not find `xcrate` in the list of imported
LL | let s = ::xcrate::S;
| ^^^^^^ could not find `xcrate` in the list of imported crates
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-3.stderr b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-3.stderr
index bd6778cf3..c321f3ede 100644
--- a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-3.stderr
+++ b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-3.stderr
@@ -4,6 +4,6 @@ error[E0432]: unresolved import `ycrate`
LL | use ycrate;
| ^^^^^^ no external crate `ycrate`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/not-allowed.stderr b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/not-allowed.stderr
index 122e8fd35..7f989c15f 100644
--- a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/not-allowed.stderr
+++ b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/not-allowed.stderr
@@ -11,6 +11,6 @@ LL | use core::alloc;
LL | use std::alloc;
| ~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/guard-lifetime-1.stderr b/tests/ui/rfcs/rfc-2294-if-let-guard/guard-lifetime-1.stderr
index b8e1bb324..741ae7c92 100644
--- a/tests/ui/rfcs/rfc-2294-if-let-guard/guard-lifetime-1.stderr
+++ b/tests/ui/rfcs/rfc-2294-if-let-guard/guard-lifetime-1.stderr
@@ -10,6 +10,6 @@ LL |
LL | let _z: &String = z;
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0505`.
diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/guard-mutability-1.stderr b/tests/ui/rfcs/rfc-2294-if-let-guard/guard-mutability-1.stderr
index 009d15338..98285f5c3 100644
--- a/tests/ui/rfcs/rfc-2294-if-let-guard/guard-mutability-1.stderr
+++ b/tests/ui/rfcs/rfc-2294-if-let-guard/guard-mutability-1.stderr
@@ -6,6 +6,6 @@ LL | Some(mut y) if let Some(ref mut z) = y => {
|
= note: variables bound in patterns are immutable until the end of the pattern guard
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/guard-mutability-2.stderr b/tests/ui/rfcs/rfc-2294-if-let-guard/guard-mutability-2.stderr
index 07e7c6a2c..31df8a922 100644
--- a/tests/ui/rfcs/rfc-2294-if-let-guard/guard-mutability-2.stderr
+++ b/tests/ui/rfcs/rfc-2294-if-let-guard/guard-mutability-2.stderr
@@ -6,6 +6,6 @@ LL | Some(ref mut y) if let Some(ref mut z) = *y => {
|
= note: variables bound in patterns are immutable until the end of the pattern guard
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/macro-expanded.stderr b/tests/ui/rfcs/rfc-2294-if-let-guard/macro-expanded.stderr
index 00c1c303d..b8065b9f5 100644
--- a/tests/ui/rfcs/rfc-2294-if-let-guard/macro-expanded.stderr
+++ b/tests/ui/rfcs/rfc-2294-if-let-guard/macro-expanded.stderr
@@ -10,5 +10,5 @@ LL | () if m!(Some(5)) => {}
= note: only supported directly in conditions of `if` and `while` expressions
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-expected-behavior.run.stderr b/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-expected-behavior.run.stderr
index a20a6062c..2c018ca87 100644
--- a/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-expected-behavior.run.stderr
+++ b/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-expected-behavior.run.stderr
@@ -1,28 +1,28 @@
-[$DIR/dbg-macro-expected-behavior.rs:22] Unit = Unit
-[$DIR/dbg-macro-expected-behavior.rs:23] a = Unit
-[$DIR/dbg-macro-expected-behavior.rs:29] Point { x: 42, y: 24 } = Point {
+[$DIR/dbg-macro-expected-behavior.rs:22:19] Unit = Unit
+[$DIR/dbg-macro-expected-behavior.rs:23:19] a = Unit
+[$DIR/dbg-macro-expected-behavior.rs:29:24] Point { x: 42, y: 24 } = Point {
x: 42,
y: 24,
}
-[$DIR/dbg-macro-expected-behavior.rs:30] b = Point {
+[$DIR/dbg-macro-expected-behavior.rs:30:24] b = Point {
x: 42,
y: 24,
}
-[$DIR/dbg-macro-expected-behavior.rs:38]
-[$DIR/dbg-macro-expected-behavior.rs:42] &a = NoCopy(
+[$DIR/dbg-macro-expected-behavior.rs:38:17]
+[$DIR/dbg-macro-expected-behavior.rs:42:27] &a = NoCopy(
1337,
)
-[$DIR/dbg-macro-expected-behavior.rs:42] dbg!(& a) = NoCopy(
+[$DIR/dbg-macro-expected-behavior.rs:42:22] dbg!(&a) = NoCopy(
1337,
)
-[$DIR/dbg-macro-expected-behavior.rs:47] f(&42) = 42
+[$DIR/dbg-macro-expected-behavior.rs:47:18] f(&42) = 42
before
-[$DIR/dbg-macro-expected-behavior.rs:52] { foo += 1; eprintln!("before"); 7331 } = 7331
-[$DIR/dbg-macro-expected-behavior.rs:60] ("Yeah",) = (
+[$DIR/dbg-macro-expected-behavior.rs:52:22] { foo += 1; eprintln!("before"); 7331 } = 7331
+[$DIR/dbg-macro-expected-behavior.rs:60:27] ("Yeah",) = (
"Yeah",
)
-[$DIR/dbg-macro-expected-behavior.rs:63] 1 = 1
-[$DIR/dbg-macro-expected-behavior.rs:63] 2 = 2
-[$DIR/dbg-macro-expected-behavior.rs:67] 1u8 = 1
-[$DIR/dbg-macro-expected-behavior.rs:67] 2u32 = 2
-[$DIR/dbg-macro-expected-behavior.rs:67] "Yeah" = "Yeah"
+[$DIR/dbg-macro-expected-behavior.rs:63:29] 1 = 1
+[$DIR/dbg-macro-expected-behavior.rs:63:29] 2 = 2
+[$DIR/dbg-macro-expected-behavior.rs:67:37] 1u8 = 1
+[$DIR/dbg-macro-expected-behavior.rs:67:37] 2u32 = 2
+[$DIR/dbg-macro-expected-behavior.rs:67:37] "Yeah" = "Yeah"
diff --git a/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr b/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr
index 9dc339abc..c2b9899e2 100644
--- a/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr
+++ b/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr
@@ -10,6 +10,6 @@ LL | let _ = dbg!(a);
|
= note: this error originates in the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr b/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr
index ce165e646..7ec018a95 100644
--- a/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr
+++ b/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr
@@ -13,6 +13,6 @@ LL + #[derive(Debug)]
LL | struct NotDebug;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/feature-gate-target_feature_11.stderr b/tests/ui/rfcs/rfc-2396-target_feature-11/feature-gate-target_feature_11.stderr
index 18917fd25..06c6c9053 100644
--- a/tests/ui/rfcs/rfc-2396-target_feature-11/feature-gate-target_feature_11.stderr
+++ b/tests/ui/rfcs/rfc-2396-target_feature-11/feature-gate-target_feature_11.stderr
@@ -9,6 +9,6 @@ LL | fn foo() {}
= note: see issue #69098 <https://github.com/rust-lang/rust/issues/69098> for more information
= help: add `#![feature(target_feature_11)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.mir.stderr b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.mir.stderr
index e08ffe42d..7bbd4e158 100644
--- a/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.mir.stderr
+++ b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.mir.stderr
@@ -18,6 +18,6 @@ help: consider casting to a fn pointer
LL | let foo: fn() = foo as fn();
| ~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.thir.stderr b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.thir.stderr
index e08ffe42d..7bbd4e158 100644
--- a/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.thir.stderr
+++ b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.thir.stderr
@@ -18,6 +18,6 @@ help: consider casting to a fn pointer
LL | let foo: fn() = foo as fn();
| ~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-main.stderr b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-main.stderr
index cfafbd522..57ad1cc8d 100644
--- a/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-main.stderr
+++ b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-main.stderr
@@ -4,5 +4,5 @@ error: `main` function is not allowed to have `#[target_feature]`
LL | fn main() {}
| ^^^^^^^^^ `main` function is not allowed to have `#[target_feature]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-start.stderr b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-start.stderr
index b49f8afd9..d0a67c4f6 100644
--- a/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-start.stderr
+++ b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-start.stderr
@@ -7,5 +7,5 @@ LL |
LL | fn start(_argc: isize, _argv: *const *const u8) -> isize { 0 }
| -------------------------------------------------------- `#[start]` function is not allowed to have `#[target_feature]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.mir.stderr b/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.mir.stderr
index 0ef7b8b09..cabc475fa 100644
--- a/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.mir.stderr
+++ b/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.mir.stderr
@@ -1,83 +1,115 @@
error[E0133]: call to function with `#[target_feature]` is unsafe and requires unsafe function or block
- --> $DIR/safe-calls.rs:23:5
+ --> $DIR/safe-calls.rs:28:5
|
LL | sse2();
| ^^^^^^ call to function with `#[target_feature]`
|
- = note: can only be called if the required target features are available
+ = help: in order for the call to be safe, the context requires the following additional target feature: sse2
+ = note: the sse2 target feature being enabled in the build configuration does not remove the requirement to list it in `#[target_feature]`
error[E0133]: call to function with `#[target_feature]` is unsafe and requires unsafe function or block
- --> $DIR/safe-calls.rs:26:5
+ --> $DIR/safe-calls.rs:31:5
|
LL | avx_bmi2();
| ^^^^^^^^^^ call to function with `#[target_feature]`
|
- = note: can only be called if the required target features are available
+ = help: in order for the call to be safe, the context requires the following additional target features: avx and bmi2
error[E0133]: call to function with `#[target_feature]` is unsafe and requires unsafe function or block
- --> $DIR/safe-calls.rs:29:5
+ --> $DIR/safe-calls.rs:34:5
|
LL | Quux.avx_bmi2();
| ^^^^^^^^^^^^^^^ call to function with `#[target_feature]`
|
- = note: can only be called if the required target features are available
+ = help: in order for the call to be safe, the context requires the following additional target features: avx and bmi2
error[E0133]: call to function with `#[target_feature]` is unsafe and requires unsafe function or block
- --> $DIR/safe-calls.rs:36:5
+ --> $DIR/safe-calls.rs:41:5
|
LL | avx_bmi2();
| ^^^^^^^^^^ call to function with `#[target_feature]`
|
- = note: can only be called if the required target features are available
+ = help: in order for the call to be safe, the context requires the following additional target features: avx and bmi2
error[E0133]: call to function with `#[target_feature]` is unsafe and requires unsafe function or block
- --> $DIR/safe-calls.rs:39:5
+ --> $DIR/safe-calls.rs:44:5
|
LL | Quux.avx_bmi2();
| ^^^^^^^^^^^^^^^ call to function with `#[target_feature]`
|
- = note: can only be called if the required target features are available
+ = help: in order for the call to be safe, the context requires the following additional target features: avx and bmi2
error[E0133]: call to function with `#[target_feature]` is unsafe and requires unsafe function or block
- --> $DIR/safe-calls.rs:46:5
+ --> $DIR/safe-calls.rs:51:5
|
LL | sse2();
| ^^^^^^ call to function with `#[target_feature]`
|
- = note: can only be called if the required target features are available
+ = help: in order for the call to be safe, the context requires the following additional target feature: sse2
+ = note: the sse2 target feature being enabled in the build configuration does not remove the requirement to list it in `#[target_feature]`
error[E0133]: call to function with `#[target_feature]` is unsafe and requires unsafe function or block
- --> $DIR/safe-calls.rs:49:5
+ --> $DIR/safe-calls.rs:54:5
|
LL | avx_bmi2();
| ^^^^^^^^^^ call to function with `#[target_feature]`
|
- = note: can only be called if the required target features are available
+ = help: in order for the call to be safe, the context requires the following additional target feature: bmi2
error[E0133]: call to function with `#[target_feature]` is unsafe and requires unsafe function or block
- --> $DIR/safe-calls.rs:52:5
+ --> $DIR/safe-calls.rs:57:5
|
LL | Quux.avx_bmi2();
| ^^^^^^^^^^^^^^^ call to function with `#[target_feature]`
|
- = note: can only be called if the required target features are available
+ = help: in order for the call to be safe, the context requires the following additional target feature: bmi2
error[E0133]: call to function with `#[target_feature]` is unsafe and requires unsafe function or block
- --> $DIR/safe-calls.rs:60:5
+ --> $DIR/safe-calls.rs:65:5
|
LL | sse2();
| ^^^^^^ call to function with `#[target_feature]`
|
- = note: can only be called if the required target features are available
+ = help: in order for the call to be safe, the context requires the following additional target feature: sse2
+ = note: the sse2 target feature being enabled in the build configuration does not remove the requirement to list it in `#[target_feature]`
error[E0133]: call to function with `#[target_feature]` is unsafe and requires unsafe function or block
- --> $DIR/safe-calls.rs:65:18
+ --> $DIR/safe-calls.rs:70:15
|
-LL | const name: () = sse2();
- | ^^^^^^ call to function with `#[target_feature]`
+LL | const _: () = sse2();
+ | ^^^^^^ call to function with `#[target_feature]`
|
- = note: can only be called if the required target features are available
+ = help: in order for the call to be safe, the context requires the following additional target feature: sse2
+ = note: the sse2 target feature being enabled in the build configuration does not remove the requirement to list it in `#[target_feature]`
-error: aborting due to 10 previous errors
+error[E0133]: call to function with `#[target_feature]` is unsafe and requires unsafe function or block
+ --> $DIR/safe-calls.rs:74:15
+ |
+LL | const _: () = sse2_and_fxsr();
+ | ^^^^^^^^^^^^^^^ call to function with `#[target_feature]`
+ |
+ = help: in order for the call to be safe, the context requires the following additional target features: sse2 and fxsr
+ = note: the fxsr and sse2 target features being enabled in the build configuration does not remove the requirement to list them in `#[target_feature]`
+
+error: call to function with `#[target_feature]` is unsafe and requires unsafe block (error E0133)
+ --> $DIR/safe-calls.rs:82:5
+ |
+LL | sse2();
+ | ^^^^^^ call to function with `#[target_feature]`
+ |
+ = help: in order for the call to be safe, the context requires the following additional target feature: sse2
+ = note: the sse2 target feature being enabled in the build configuration does not remove the requirement to list it in `#[target_feature]`
+note: an unsafe function restricts its caller, but its body is safe by default
+ --> $DIR/safe-calls.rs:81:1
+ |
+LL | unsafe fn needs_unsafe_block() {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+note: the lint level is defined here
+ --> $DIR/safe-calls.rs:78:8
+ |
+LL | #[deny(unsafe_op_in_unsafe_fn)]
+ | ^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 12 previous errors
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.rs
index cebc6f947..f17dab269 100644
--- a/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.rs
+++ b/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.rs
@@ -7,6 +7,11 @@
#[target_feature(enable = "sse2")]
const fn sse2() {}
+#[target_feature(enable = "sse2")]
+#[target_feature(enable = "fxsr")]
+const fn sse2_and_fxsr() {}
+
+
#[target_feature(enable = "avx")]
#[target_feature(enable = "bmi2")]
fn avx_bmi2() {}
@@ -62,8 +67,21 @@ fn qux() {
//[thir]~^^ ERROR call to function `sse2` with `#[target_feature]` is unsafe
}
-const name: () = sse2();
+const _: () = sse2();
//[mir]~^ ERROR call to function with `#[target_feature]` is unsafe
//[thir]~^^ ERROR call to function `sse2` with `#[target_feature]` is unsafe
+const _: () = sse2_and_fxsr();
+//[mir]~^ ERROR call to function with `#[target_feature]` is unsafe
+//[thir]~^^ ERROR call to function `sse2_and_fxsr` with `#[target_feature]` is unsafe
+
+#[deny(unsafe_op_in_unsafe_fn)]
+#[target_feature(enable = "avx")]
+#[target_feature(enable = "bmi2")]
+unsafe fn needs_unsafe_block() {
+ sse2();
+ //[mir]~^ ERROR call to function with `#[target_feature]` is unsafe
+ //[thir]~^^ ERROR call to function `sse2` with `#[target_feature]` is unsafe
+}
+
fn main() {}
diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.thir.stderr b/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.thir.stderr
index c75ac6e8b..13b58fde8 100644
--- a/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.thir.stderr
+++ b/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.thir.stderr
@@ -1,83 +1,115 @@
error[E0133]: call to function `sse2` with `#[target_feature]` is unsafe and requires unsafe function or block
- --> $DIR/safe-calls.rs:23:5
+ --> $DIR/safe-calls.rs:28:5
|
LL | sse2();
| ^^^^^^ call to function with `#[target_feature]`
|
- = note: can only be called if the required target features are available
+ = help: in order for the call to be safe, the context requires the following additional target feature: sse2
+ = note: the sse2 target feature being enabled in the build configuration does not remove the requirement to list it in `#[target_feature]`
error[E0133]: call to function `avx_bmi2` with `#[target_feature]` is unsafe and requires unsafe function or block
- --> $DIR/safe-calls.rs:26:5
+ --> $DIR/safe-calls.rs:31:5
|
LL | avx_bmi2();
| ^^^^^^^^^^ call to function with `#[target_feature]`
|
- = note: can only be called if the required target features are available
+ = help: in order for the call to be safe, the context requires the following additional target features: avx and bmi2
error[E0133]: call to function `Quux::avx_bmi2` with `#[target_feature]` is unsafe and requires unsafe function or block
- --> $DIR/safe-calls.rs:29:5
+ --> $DIR/safe-calls.rs:34:5
|
LL | Quux.avx_bmi2();
| ^^^^^^^^^^^^^^^ call to function with `#[target_feature]`
|
- = note: can only be called if the required target features are available
+ = help: in order for the call to be safe, the context requires the following additional target features: avx and bmi2
error[E0133]: call to function `avx_bmi2` with `#[target_feature]` is unsafe and requires unsafe function or block
- --> $DIR/safe-calls.rs:36:5
+ --> $DIR/safe-calls.rs:41:5
|
LL | avx_bmi2();
| ^^^^^^^^^^ call to function with `#[target_feature]`
|
- = note: can only be called if the required target features are available
+ = help: in order for the call to be safe, the context requires the following additional target features: avx and bmi2
error[E0133]: call to function `Quux::avx_bmi2` with `#[target_feature]` is unsafe and requires unsafe function or block
- --> $DIR/safe-calls.rs:39:5
+ --> $DIR/safe-calls.rs:44:5
|
LL | Quux.avx_bmi2();
| ^^^^^^^^^^^^^^^ call to function with `#[target_feature]`
|
- = note: can only be called if the required target features are available
+ = help: in order for the call to be safe, the context requires the following additional target features: avx and bmi2
error[E0133]: call to function `sse2` with `#[target_feature]` is unsafe and requires unsafe function or block
- --> $DIR/safe-calls.rs:46:5
+ --> $DIR/safe-calls.rs:51:5
|
LL | sse2();
| ^^^^^^ call to function with `#[target_feature]`
|
- = note: can only be called if the required target features are available
+ = help: in order for the call to be safe, the context requires the following additional target feature: sse2
+ = note: the sse2 target feature being enabled in the build configuration does not remove the requirement to list it in `#[target_feature]`
error[E0133]: call to function `avx_bmi2` with `#[target_feature]` is unsafe and requires unsafe function or block
- --> $DIR/safe-calls.rs:49:5
+ --> $DIR/safe-calls.rs:54:5
|
LL | avx_bmi2();
| ^^^^^^^^^^ call to function with `#[target_feature]`
|
- = note: can only be called if the required target features are available
+ = help: in order for the call to be safe, the context requires the following additional target feature: bmi2
error[E0133]: call to function `Quux::avx_bmi2` with `#[target_feature]` is unsafe and requires unsafe function or block
- --> $DIR/safe-calls.rs:52:5
+ --> $DIR/safe-calls.rs:57:5
|
LL | Quux.avx_bmi2();
| ^^^^^^^^^^^^^^^ call to function with `#[target_feature]`
|
- = note: can only be called if the required target features are available
+ = help: in order for the call to be safe, the context requires the following additional target feature: bmi2
error[E0133]: call to function `sse2` with `#[target_feature]` is unsafe and requires unsafe function or block
- --> $DIR/safe-calls.rs:60:5
+ --> $DIR/safe-calls.rs:65:5
|
LL | sse2();
| ^^^^^^ call to function with `#[target_feature]`
|
- = note: can only be called if the required target features are available
+ = help: in order for the call to be safe, the context requires the following additional target feature: sse2
+ = note: the sse2 target feature being enabled in the build configuration does not remove the requirement to list it in `#[target_feature]`
error[E0133]: call to function `sse2` with `#[target_feature]` is unsafe and requires unsafe function or block
- --> $DIR/safe-calls.rs:65:18
+ --> $DIR/safe-calls.rs:70:15
|
-LL | const name: () = sse2();
- | ^^^^^^ call to function with `#[target_feature]`
+LL | const _: () = sse2();
+ | ^^^^^^ call to function with `#[target_feature]`
|
- = note: can only be called if the required target features are available
+ = help: in order for the call to be safe, the context requires the following additional target feature: sse2
+ = note: the sse2 target feature being enabled in the build configuration does not remove the requirement to list it in `#[target_feature]`
-error: aborting due to 10 previous errors
+error[E0133]: call to function `sse2_and_fxsr` with `#[target_feature]` is unsafe and requires unsafe function or block
+ --> $DIR/safe-calls.rs:74:15
+ |
+LL | const _: () = sse2_and_fxsr();
+ | ^^^^^^^^^^^^^^^ call to function with `#[target_feature]`
+ |
+ = help: in order for the call to be safe, the context requires the following additional target features: sse2 and fxsr
+ = note: the fxsr and sse2 target features being enabled in the build configuration does not remove the requirement to list them in `#[target_feature]`
+
+error: call to function `sse2` with `#[target_feature]` is unsafe and requires unsafe block (error E0133)
+ --> $DIR/safe-calls.rs:82:5
+ |
+LL | sse2();
+ | ^^^^^^ call to function with `#[target_feature]`
+ |
+ = help: in order for the call to be safe, the context requires the following additional target feature: sse2
+ = note: the sse2 target feature being enabled in the build configuration does not remove the requirement to list it in `#[target_feature]`
+note: an unsafe function restricts its caller, but its body is safe by default
+ --> $DIR/safe-calls.rs:81:1
+ |
+LL | unsafe fn needs_unsafe_block() {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+note: the lint level is defined here
+ --> $DIR/safe-calls.rs:78:8
+ |
+LL | #[deny(unsafe_op_in_unsafe_fn)]
+ | ^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 12 previous errors
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/rfcs/rfc-2397-do-not-recommend/feature-gate-do_not_recommend.stderr b/tests/ui/rfcs/rfc-2397-do-not-recommend/feature-gate-do_not_recommend.stderr
index a3e559054..6af1d4533 100644
--- a/tests/ui/rfcs/rfc-2397-do-not-recommend/feature-gate-do_not_recommend.stderr
+++ b/tests/ui/rfcs/rfc-2397-do-not-recommend/feature-gate-do_not_recommend.stderr
@@ -20,6 +20,6 @@ note: required by a bound in `stuff`
LL | fn stuff<T: Bar>(_: T) {}
| ^^^ required by this bound in `stuff`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-2397-do-not-recommend/unstable-feature.stderr b/tests/ui/rfcs/rfc-2397-do-not-recommend/unstable-feature.stderr
index 1597e5be4..b2c1406d0 100644
--- a/tests/ui/rfcs/rfc-2397-do-not-recommend/unstable-feature.stderr
+++ b/tests/ui/rfcs/rfc-2397-do-not-recommend/unstable-feature.stderr
@@ -7,6 +7,6 @@ LL | #[do_not_recommend]
= note: see issue #51992 <https://github.com/rust-lang/rust/issues/51992> for more information
= help: add `#![feature(do_not_recommend)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/rfcs/rfc-2457-non-ascii-idents/crate_name_nonascii_forbidden.stderr b/tests/ui/rfcs/rfc-2457-non-ascii-idents/crate_name_nonascii_forbidden.stderr
index 5aade17cb..cb663401e 100644
--- a/tests/ui/rfcs/rfc-2457-non-ascii-idents/crate_name_nonascii_forbidden.stderr
+++ b/tests/ui/rfcs/rfc-2457-non-ascii-idents/crate_name_nonascii_forbidden.stderr
@@ -4,5 +4,5 @@ error: cannot load a crate with a non-ascii name `ьаг`
LL | extern crate ьаг;
| ^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/avoid-invalid-mir.stderr b/tests/ui/rfcs/rfc-2497-if-let-chains/avoid-invalid-mir.stderr
index 3eaccde3b..606f808f0 100644
--- a/tests/ui/rfcs/rfc-2497-if-let-chains/avoid-invalid-mir.stderr
+++ b/tests/ui/rfcs/rfc-2497-if-let-chains/avoid-invalid-mir.stderr
@@ -6,5 +6,5 @@ LL | !let y = 42;
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/invalid-let-in-a-valid-let-context.stderr b/tests/ui/rfcs/rfc-2497-if-let-chains/invalid-let-in-a-valid-let-context.stderr
index 247fad2e9..f3726166e 100644
--- a/tests/ui/rfcs/rfc-2497-if-let-chains/invalid-let-in-a-valid-let-context.stderr
+++ b/tests/ui/rfcs/rfc-2497-if-let-chains/invalid-let-in-a-valid-let-context.stderr
@@ -29,6 +29,10 @@ LL | if let Some(elem) = _opt && [1, 2, 3][let _ = &&let Some(x) = Some(
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
+help: you might have meant to compare for equality
+ |
+LL | if let Some(elem) = _opt && [1, 2, 3][let _ = &&let Some(x) = Some(42)] == 1 {
+ | +
error: expected expression, found `let` statement
--> $DIR/invalid-let-in-a-valid-let-context.rs:24:23
@@ -53,6 +57,10 @@ LL | if let Some(elem) = _opt && [1, 2, 3][let _ = ()] = 1 {
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
+help: you might have meant to compare for equality
+ |
+LL | if let Some(elem) = _opt && [1, 2, 3][let _ = ()] == 1 {
+ | +
error: expected expression, found `let` statement
--> $DIR/invalid-let-in-a-valid-let-context.rs:42:21
diff --git a/tests/ui/rfcs/rfc-2528-type-changing-struct-update/issue-92010-trait-bound-not-satisfied.stderr b/tests/ui/rfcs/rfc-2528-type-changing-struct-update/issue-92010-trait-bound-not-satisfied.stderr
index 831731ba4..86f2d9b6e 100644
--- a/tests/ui/rfcs/rfc-2528-type-changing-struct-update/issue-92010-trait-bound-not-satisfied.stderr
+++ b/tests/ui/rfcs/rfc-2528-type-changing-struct-update/issue-92010-trait-bound-not-satisfied.stderr
@@ -4,9 +4,9 @@ error[E0308]: mismatched types
LL | fn y(&self, y: f64) -> Self { P{y, .. self.clone() } }
| ^^^^^^^^^^^^ expected `P<T>`, found `&P<T>`
|
- = note: expected struct `P<T>`
- found reference `&P<T>`
+ = note: expected struct `P<_>`
+ found reference `&P<_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/rfcs/rfc-2528-type-changing-struct-update/lifetime-update.stderr b/tests/ui/rfcs/rfc-2528-type-changing-struct-update/lifetime-update.stderr
index 1c26eb880..8ae7691a4 100644
--- a/tests/ui/rfcs/rfc-2528-type-changing-struct-update/lifetime-update.stderr
+++ b/tests/ui/rfcs/rfc-2528-type-changing-struct-update/lifetime-update.stderr
@@ -13,6 +13,6 @@ LL | let m2: Machine<'static, State1> = Machine {
LL | }
| - `s` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/rfcs/rfc-2565-param-attrs/auxiliary/param-attrs.rs b/tests/ui/rfcs/rfc-2565-param-attrs/auxiliary/param-attrs.rs
index 82c4120b4..67de50a1d 100644
--- a/tests/ui/rfcs/rfc-2565-param-attrs/auxiliary/param-attrs.rs
+++ b/tests/ui/rfcs/rfc-2565-param-attrs/auxiliary/param-attrs.rs
@@ -17,27 +17,26 @@ macro_rules! checker {
}
}
-checker!(attr_extern, r#"extern "C" { fn ffi(#[a1] arg1 : i32, #[a2] ...) ; }"#);
-checker!(attr_extern_cvar, r#"unsafe extern "C" fn cvar(arg1 : i32, #[a1] mut args : ...) {}"#);
-checker!(attr_alias, "type Alias = fn(#[a1] u8, #[a2] ...) ;");
-checker!(attr_free, "fn free(#[a1] arg1 : u8) { let lam = | #[a2] W(x), #[a3] y | () ; }");
-checker!(attr_inherent_1, "fn inherent1(#[a1] self, #[a2] arg1 : u8) {}");
-checker!(attr_inherent_2, "fn inherent2(#[a1] & self, #[a2] arg1 : u8) {}");
-checker!(attr_inherent_3, "fn inherent3 < 'a > (#[a1] & 'a mut self, #[a2] arg1 : u8) {}");
-checker!(attr_inherent_4, "fn inherent4 < 'a > (#[a1] self : Box < Self >, #[a2] arg1 : u8) {}");
-checker!(attr_inherent_issue_64682, "fn inherent5(#[a1] #[a2] arg1 : u8, #[a3] arg2 : u8) {}");
-checker!(attr_trait_1, "fn trait1(#[a1] self, #[a2] arg1 : u8) ;");
-checker!(attr_trait_2, "fn trait2(#[a1] & self, #[a2] arg1 : u8) ;");
-checker!(attr_trait_3, "fn trait3 < 'a > (#[a1] & 'a mut self, #[a2] arg1 : u8) ;");
-checker!(attr_trait_4, r#"fn trait4 < 'a >
-(#[a1] self : Box < Self >, #[a2] arg1 : u8, #[a3] Vec < u8 >) ;"#);
-checker!(attr_trait_issue_64682, "fn trait5(#[a1] #[a2] arg1 : u8, #[a3] arg2 : u8) ;");
+checker!(attr_extern, r#"extern "C" { fn ffi(#[a1] arg1: i32, #[a2] ...); }"#);
+checker!(attr_extern_cvar, r#"unsafe extern "C" fn cvar(arg1: i32, #[a1] mut args: ...) {}"#);
+checker!(attr_alias, "type Alias = fn(#[a1] u8, #[a2] ...);");
+checker!(attr_free, "fn free(#[a1] arg1: u8) { let lam = |#[a2] W(x), #[a3] y| (); }");
+checker!(attr_inherent_1, "fn inherent1(#[a1] self, #[a2] arg1: u8) {}");
+checker!(attr_inherent_2, "fn inherent2(#[a1] &self, #[a2] arg1: u8) {}");
+checker!(attr_inherent_3, "fn inherent3<'a>(#[a1] &'a mut self, #[a2] arg1: u8) {}");
+checker!(attr_inherent_4, "fn inherent4<'a>(#[a1] self: Box<Self>, #[a2] arg1: u8) {}");
+checker!(attr_inherent_issue_64682, "fn inherent5(#[a1] #[a2] arg1: u8, #[a3] arg2: u8) {}");
+checker!(attr_trait_1, "fn trait1(#[a1] self, #[a2] arg1: u8);");
+checker!(attr_trait_2, "fn trait2(#[a1] &self, #[a2] arg1: u8);");
+checker!(attr_trait_3, "fn trait3<'a>(#[a1] &'a mut self, #[a2] arg1: u8);");
+checker!(attr_trait_4, r#"fn trait4<'a>(#[a1] self: Box<Self>, #[a2] arg1: u8, #[a3] Vec<u8>);"#);
+checker!(attr_trait_issue_64682, "fn trait5(#[a1] #[a2] arg1: u8, #[a3] arg2: u8);");
checker!(rename_params, r#"impl Foo
{
- fn hello(#[angery(true)] a : i32, #[a2] b : i32, #[what = "how"] c : u32)
+ fn hello(#[angery(true)] a: i32, #[a2] b: i32, #[what = "how"] c: u32) {}
+ fn
+ hello2(#[a1] #[a2] a: i32, #[what = "how"] b: i32, #[angery(true)] c: u32)
{} fn
- hello2(#[a1] #[a2] a : i32, #[what = "how"] b : i32, #[angery(true)] c :
- u32) {} fn
- hello_self(#[a1] #[a2] & self, #[a1] #[a2] a : i32, #[what = "how"] b :
- i32, #[angery(true)] c : u32) {}
+ hello_self(#[a1] #[a2] &self, #[a1] #[a2] a: i32, #[what = "how"] b: i32,
+ #[angery(true)] c: u32) {}
}"#);
diff --git a/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-2018.stderr b/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-2018.stderr
index 593821bf9..0c269a23f 100644
--- a/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-2018.stderr
+++ b/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-2018.stderr
@@ -18,5 +18,5 @@ help: if this is a type, explicitly ignore the parameter name
LL | trait Trait2015 { fn foo(#[allow(C)] _: i32); }
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/dlltool-failed.stderr b/tests/ui/rfcs/rfc-2627-raw-dylib/dlltool-failed.stderr
index cc532ccc4..0c5a06e68 100644
--- a/tests/ui/rfcs/rfc-2627-raw-dylib/dlltool-failed.stderr
+++ b/tests/ui/rfcs/rfc-2627-raw-dylib/dlltool-failed.stderr
@@ -2,5 +2,5 @@ error: Dlltool could not create import library with $DLLTOOL -d $DEF_FILE -D foo
$DLLTOOL: Syntax error in def file $DEF_FILE:1
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-invalid-format.stderr b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-invalid-format.stderr
index fb70b987f..d2cf7a0ba 100644
--- a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-invalid-format.stderr
+++ b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-invalid-format.stderr
@@ -4,5 +4,5 @@ error: import name type must be of the form `import_name_type = "string"`
LL | #[link(name = "foo", kind = "raw-dylib", import_name_type = 6)]
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-multiple.stderr b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-multiple.stderr
index 953306189..8e65baf65 100644
--- a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-multiple.stderr
+++ b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-multiple.stderr
@@ -4,5 +4,5 @@ error: multiple `import_name_type` arguments in a single `#[link]` attribute
LL | #[link(name = "foo", kind = "raw-dylib", import_name_type = "decorated", import_name_type = "decorated")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-unknown-value.stderr b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-unknown-value.stderr
index 2bce9758e..4b8b90eb6 100644
--- a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-unknown-value.stderr
+++ b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-unknown-value.stderr
@@ -4,5 +4,5 @@ error: unknown import name type `unknown`, expected one of: decorated, noprefix,
LL | #[link(name = "foo", kind = "raw-dylib", import_name_type = "unknown")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-x86-only.stderr b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-x86-only.stderr
index b56449299..757f1f799 100644
--- a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-x86-only.stderr
+++ b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-x86-only.stderr
@@ -4,5 +4,5 @@ error: import name type is only supported on x86
LL | #[link(name = "foo", kind = "raw-dylib", import_name_type = "decorated")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/invalid-dlltool.stderr b/tests/ui/rfcs/rfc-2627-raw-dylib/invalid-dlltool.stderr
index 3ae901e0d..9dbeee49f 100644
--- a/tests/ui/rfcs/rfc-2627-raw-dylib/invalid-dlltool.stderr
+++ b/tests/ui/rfcs/rfc-2627-raw-dylib/invalid-dlltool.stderr
@@ -1,4 +1,4 @@
error: Error calling dlltool 'does_not_exit.exe': program not found
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/multiple-declarations.stderr b/tests/ui/rfcs/rfc-2627-raw-dylib/multiple-declarations.stderr
index dfd245669..7866af594 100644
--- a/tests/ui/rfcs/rfc-2627-raw-dylib/multiple-declarations.stderr
+++ b/tests/ui/rfcs/rfc-2627-raw-dylib/multiple-declarations.stderr
@@ -4,5 +4,5 @@ error: multiple declarations of external function `f` from library `foo.dll` hav
LL | fn f(x: i32);
| ^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/raw-dylib-windows-only.stderr b/tests/ui/rfcs/rfc-2627-raw-dylib/raw-dylib-windows-only.stderr
index b635a09af..ede20cb8c 100644
--- a/tests/ui/rfcs/rfc-2627-raw-dylib/raw-dylib-windows-only.stderr
+++ b/tests/ui/rfcs/rfc-2627-raw-dylib/raw-dylib-windows-only.stderr
@@ -4,6 +4,6 @@ error[E0455]: link kind `raw-dylib` is only supported on Windows targets
LL | #[link(name = "foo", kind = "raw-dylib")]
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0455`.
diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/unsupported-abi.stderr b/tests/ui/rfcs/rfc-2627-raw-dylib/unsupported-abi.stderr
index f69275a01..d7c7344b5 100644
--- a/tests/ui/rfcs/rfc-2627-raw-dylib/unsupported-abi.stderr
+++ b/tests/ui/rfcs/rfc-2627-raw-dylib/unsupported-abi.stderr
@@ -4,5 +4,5 @@ error: ABI not supported by `#[link(kind = "raw-dylib")]` on this architecture
LL | fn f(x: i32);
| ^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.stderr
index 6d436018b..1b8883998 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.stderr
@@ -1,3 +1,11 @@
+error: `~const` is not allowed here
+ --> $DIR/assoc-type-const-bound-usage.rs:7:17
+ |
+LL | type Assoc: ~const Foo;
+ | ^^^^^^
+ |
+ = note: this item cannot have `~const` trait bounds
+
error[E0308]: mismatched types
--> $DIR/assoc-type-const-bound-usage.rs:12:5
|
@@ -7,6 +15,6 @@ LL | <T as Foo>::Assoc::foo();
= note: expected constant `host`
found constant `true`
-error: aborting due to previous error
+error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.stderr
index 0cffae1da..290ef6e2f 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.stderr
@@ -1,8 +1,16 @@
+error: `~const` is not allowed here
+ --> $DIR/assoc-type.rs:17:15
+ |
+LL | type Bar: ~const std::ops::Add;
+ | ^^^^^^
+ |
+ = note: this item cannot have `~const` trait bounds
+
error: ~const can only be applied to `#[const_trait]` traits
--> $DIR/assoc-type.rs:17:22
|
LL | type Bar: ~const std::ops::Add;
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 2 previous errors
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-fail.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-fail.stderr
index 452bf757d..93d520f29 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-fail.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-fail.stderr
@@ -2,10 +2,10 @@ error[E0277]: the trait bound `u32: ~const Plus` is not satisfied
--> $DIR/call-const-trait-method-fail.rs:25:5
|
LL | a.plus(b)
- | ^ the trait `Plus` is not implemented for `u32`
+ | ^ the trait `~const Plus` is not implemented for `u32`
|
= help: the trait `Plus` is implemented for `u32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-in-impl.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-in-impl.rs
index 5120e6bfb..50c465790 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-in-impl.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-in-impl.rs
@@ -1,4 +1,4 @@
-// known-bug: #110395
+// check-pass
#![feature(const_trait_impl)]
#[const_trait]
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-in-impl.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-in-impl.stderr
deleted file mode 100644
index 02d53cc78..000000000
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-in-impl.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: ~const can only be applied to `#[const_trait]` traits
- --> $DIR/call-generic-in-impl.rs:9:16
- |
-LL | impl<T: ~const PartialEq> const MyPartialEq for T {
- | ^^^^^^^^^
-
-error: aborting due to previous error
-
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-chain.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-chain.rs
index 3febb328a..0df370bff 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-chain.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-chain.rs
@@ -1,8 +1,8 @@
//! Basic test for calling methods on generic type parameters in `const fn`.
-// known-bug: #110395
+// check-pass
-#![feature(const_trait_impl)]
+#![feature(const_trait_impl, effects)]
struct S;
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-chain.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-chain.stderr
deleted file mode 100644
index 37faa3f6b..000000000
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-chain.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error: ~const can only be applied to `#[const_trait]` traits
- --> $DIR/call-generic-method-chain.rs:18:32
- |
-LL | const fn equals_self<T: ~const PartialEq>(t: &T) -> bool {
- | ^^^^^^^^^
-
-error: ~const can only be applied to `#[const_trait]` traits
- --> $DIR/call-generic-method-chain.rs:22:40
- |
-LL | const fn equals_self_wrapper<T: ~const PartialEq>(t: &T) -> bool {
- | ^^^^^^^^^
-
-error: aborting due to 2 previous errors
-
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-dup-bound.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-dup-bound.rs
index e618160d3..b0d5d0685 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-dup-bound.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-dup-bound.rs
@@ -1,6 +1,6 @@
-// known-bug: #110395
+// check-pass
-#![feature(const_trait_impl)]
+#![feature(const_trait_impl, effects)]
struct S;
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-dup-bound.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-dup-bound.stderr
deleted file mode 100644
index 90cfe04a9..000000000
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-dup-bound.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error: ~const can only be applied to `#[const_trait]` traits
- --> $DIR/call-generic-method-dup-bound.rs:18:44
- |
-LL | const fn equals_self<T: PartialEq + ~const PartialEq>(t: &T) -> bool {
- | ^^^^^^^^^
-
-error: ~const can only be applied to `#[const_trait]` traits
- --> $DIR/call-generic-method-dup-bound.rs:25:37
- |
-LL | const fn equals_self2<T: A + ~const PartialEq>(t: &T) -> bool {
- | ^^^^^^^^^
-
-error: aborting due to 2 previous errors
-
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-fail.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-fail.rs
index 53778b3af..043939750 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-fail.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-fail.rs
@@ -1,10 +1,9 @@
-// FIXME(effects)
-// check-pass
#![feature(const_trait_impl, effects)]
pub const fn equals_self<T: PartialEq>(t: &T) -> bool {
*t == *t
- // (remove this) ~^ ERROR can't compare
+ //~^ ERROR mismatched types
+ // FIXME(effects): diagnostic
}
fn main() {}
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde_const_on_impl_bound.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-fail.stderr
index f77672f3e..5074c4a22 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde_const_on_impl_bound.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-fail.stderr
@@ -1,12 +1,12 @@
error[E0308]: mismatched types
- --> $DIR/tilde_const_on_impl_bound.rs:14:9
+ --> $DIR/call-generic-method-fail.rs:4:5
|
-LL | self.0.foo()
- | ^^^^^^^^^^^^ expected `host`, found `true`
+LL | *t == *t
+ | ^^^^^^^^ expected `host`, found `true`
|
= note: expected constant `host`
found constant `true`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst.rs
index eada4ceaf..76bc73812 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst.rs
@@ -1,7 +1,4 @@
-// check-pass
-// known-bug: #110395
-
-#![feature(const_trait_impl)]
+#![feature(const_trait_impl, effects)]
struct S;
@@ -24,6 +21,6 @@ const fn equals_self<T: ~const Foo>(t: &T) -> bool {
// it not using the impl.
pub const EQ: bool = equals_self(&S);
-// FIXME(effects) ~^ ERROR
+//~^ ERROR: the trait bound `S: ~const Foo` is not satisfied
fn main() {}
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst.stderr
new file mode 100644
index 000000000..aea9a39b2
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst.stderr
@@ -0,0 +1,18 @@
+error[E0277]: the trait bound `S: ~const Foo` is not satisfied
+ --> $DIR/call-generic-method-nonconst.rs:23:34
+ |
+LL | pub const EQ: bool = equals_self(&S);
+ | ----------- ^^ the trait `~const Foo` is not implemented for `S`
+ | |
+ | required by a bound introduced by this call
+ |
+ = help: the trait `Foo` is implemented for `S`
+note: required by a bound in `equals_self`
+ --> $DIR/call-generic-method-nonconst.rs:16:25
+ |
+LL | const fn equals_self<T: ~const Foo>(t: &T) -> bool {
+ | ^^^^^^^^^^ required by this bound in `equals_self`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-pass.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-pass.rs
index 09f35a277..abd5d2fdb 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-pass.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-pass.rs
@@ -1,8 +1,8 @@
//! Basic test for calling methods on generic type parameters in `const fn`.
-// known-bug: #110395
+// check-pass
-#![feature(const_trait_impl)]
+#![feature(const_trait_impl, effects)]
struct S;
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-pass.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-pass.stderr
deleted file mode 100644
index bea1846e7..000000000
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-pass.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: ~const can only be applied to `#[const_trait]` traits
- --> $DIR/call-generic-method-pass.rs:18:32
- |
-LL | const fn equals_self<T: ~const PartialEq>(t: &T) -> bool {
- | ^^^^^^^^^
-
-error: aborting due to previous error
-
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const-bound-on-not-const-associated-fn.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-bound-on-not-const-associated-fn.rs
index 1e22ddcea..0025449c4 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const-bound-on-not-const-associated-fn.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-bound-on-not-const-associated-fn.rs
@@ -1,4 +1,4 @@
-#![feature(const_trait_impl, effects)]
+#![feature(const_trait_impl)]
#[const_trait]
trait MyTrait {
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const-bound-on-not-const-associated-fn.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-bound-on-not-const-associated-fn.stderr
index 9210f6427..db48c170d 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const-bound-on-not-const-associated-fn.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-bound-on-not-const-associated-fn.stderr
@@ -2,7 +2,7 @@ error: `~const` is not allowed here
--> $DIR/const-bound-on-not-const-associated-fn.rs:9:40
|
LL | fn do_something_else() where Self: ~const MyTrait;
- | ^^^^^^^^^^^^^^
+ | ^^^^^^
|
note: this function is not `const`, so it cannot have `~const` trait bounds
--> $DIR/const-bound-on-not-const-associated-fn.rs:9:8
@@ -14,7 +14,7 @@ error: `~const` is not allowed here
--> $DIR/const-bound-on-not-const-associated-fn.rs:20:32
|
LL | pub fn foo(&self) where T: ~const MyTrait {
- | ^^^^^^^^^^^^^^
+ | ^^^^^^
|
note: this function is not `const`, so it cannot have `~const` trait bounds
--> $DIR/const-bound-on-not-const-associated-fn.rs:20:12
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-check-fns-in-const-impl.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-check-fns-in-const-impl.stderr
index c8783de4c..ae035b26e 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-check-fns-in-const-impl.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-check-fns-in-const-impl.stderr
@@ -6,6 +6,6 @@ LL | fn foo() { non_const() }
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-parse-not-item.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-parse-not-item.stderr
index f25390a90..fc9b5557a 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-parse-not-item.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-parse-not-item.stderr
@@ -4,5 +4,5 @@ error: ~const can only be applied to `#[const_trait]` traits
LL | const fn test() -> impl ~const Fn() {
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method-fail.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method-fail.stderr
index 4c45b0e56..73ee0f215 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method-fail.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method-fail.stderr
@@ -4,5 +4,5 @@ error: ~const can only be applied to `#[const_trait]` traits
LL | const fn need_const_closure<T: ~const FnOnce(()) -> i32>(x: T) -> i32 {
| ^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method.stderr
index a8ef244ea..33ae7131b 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method.stderr
@@ -4,5 +4,5 @@ error: ~const can only be applied to `#[const_trait]` traits
LL | const fn need_const_closure<T: ~const FnOnce(()) -> i32>(x: T) -> i32 {
| ^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-default-method-bodies.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-default-method-bodies.stderr
index 7b558e3f7..f39e6dcad 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-default-method-bodies.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-default-method-bodies.stderr
@@ -2,10 +2,10 @@ error[E0277]: the trait bound `NonConstImpl: ~const ConstDefaultFn` is not satis
--> $DIR/const-default-method-bodies.rs:24:18
|
LL | NonConstImpl.a();
- | ^ the trait `ConstDefaultFn` is not implemented for `NonConstImpl`
+ | ^ the trait `~const ConstDefaultFn` is not implemented for `NonConstImpl`
|
= help: the trait `ConstDefaultFn` is implemented for `NonConstImpl`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-bound.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-bound.stderr
index f5147dc74..16ed61590 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-bound.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-bound.stderr
@@ -4,6 +4,6 @@ error[E0493]: destructor of `E` cannot be evaluated at compile-time
LL | Err(_e) => None,
| ^^ the destructor for this type cannot be evaluated in constant functions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0493`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.stderr
index 100d1df87..6f75924f0 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.stderr
@@ -6,6 +6,6 @@ LL | const fn check<T: ~const Destruct>(_: T) {}
| |
| the destructor for this type cannot be evaluated in constant functions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0493`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr
index dfa5ea8c4..8997e7ade 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr
@@ -4,6 +4,6 @@ error[E0493]: destructor of `T` cannot be evaluated at compile-time
LL | const fn check<T: ~const Destruct>(_: T) {}
| ^ the destructor for this type cannot be evaluated in constant functions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0493`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.stock.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.stock.stderr
index 8af38b792..09ebf55c5 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.stock.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.stock.stderr
@@ -6,6 +6,6 @@ LL | const fn check<T: ~const Destruct>(_: T) {}
| |
| the destructor for this type cannot be evaluated in constant functions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0493`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.precise.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.precise.stderr
index 23e368870..daaba08d7 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.precise.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.precise.stderr
@@ -1,19 +1,10 @@
-error[E0493]: destructor of `T` cannot be evaluated at compile-time
- --> $DIR/const-drop.rs:19:32
+error: `~const` is not allowed here
+ --> $DIR/const-drop.rs:67:38
|
-LL | const fn a<T: ~const Destruct>(_: T) {}
- | ^ - value is dropped here
- | |
- | the destructor for this type cannot be evaluated in constant functions
-
-error[E0493]: destructor of `S<'_>` cannot be evaluated at compile-time
- --> $DIR/const-drop.rs:24:13
+LL | pub struct ConstDropWithBound<T: ~const SomeTrait>(pub core::marker::PhantomData<T>);
+ | ^^^^^^
|
-LL | let _ = S(&mut c);
- | ^^^^^^^^^- value is dropped here
- | |
- | the destructor for this type cannot be evaluated in constant functions
+ = note: this item cannot have `~const` trait bounds
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
-For more information about this error, try `rustc --explain E0493`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs
index 0a9cf638a..9da84cdb0 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs
@@ -63,6 +63,7 @@ mod t {
fn foo() {}
}
+ // FIXME(effects): This should be a `const` bound instead of a `~const` one.
pub struct ConstDropWithBound<T: ~const SomeTrait>(pub core::marker::PhantomData<T>);
impl<T: ~const SomeTrait> const Drop for ConstDropWithBound<T> {
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.stock.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.stock.stderr
index 23e368870..daaba08d7 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.stock.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.stock.stderr
@@ -1,19 +1,10 @@
-error[E0493]: destructor of `T` cannot be evaluated at compile-time
- --> $DIR/const-drop.rs:19:32
+error: `~const` is not allowed here
+ --> $DIR/const-drop.rs:67:38
|
-LL | const fn a<T: ~const Destruct>(_: T) {}
- | ^ - value is dropped here
- | |
- | the destructor for this type cannot be evaluated in constant functions
-
-error[E0493]: destructor of `S<'_>` cannot be evaluated at compile-time
- --> $DIR/const-drop.rs:24:13
+LL | pub struct ConstDropWithBound<T: ~const SomeTrait>(pub core::marker::PhantomData<T>);
+ | ^^^^^^
|
-LL | let _ = S(&mut c);
- | ^^^^^^^^^- value is dropped here
- | |
- | the destructor for this type cannot be evaluated in constant functions
+ = note: this item cannot have `~const` trait bounds
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
-For more information about this error, try `rustc --explain E0493`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-norecover.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-norecover.stderr
index 603f6b7d2..efa72463c 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-norecover.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-norecover.stderr
@@ -4,5 +4,5 @@ error: expected identifier, found keyword `impl`
LL | const impl Foo {
| ^^^^ expected identifier, found keyword
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.stderr
index c45af1a9f..f0b6e2b1c 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.stderr
@@ -10,5 +10,5 @@ LL | impl const A for () {}
= note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
= note: adding a non-const method body in the future would be a breaking change
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs
index 8e4de57b0..14d306fc3 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs
@@ -3,6 +3,7 @@
#![feature(
associated_type_bounds,
const_trait_impl,
+ effects,
const_cmp,
)]
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr
index 4a9090d0b..ddedf8f1d 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr
@@ -1,39 +1,28 @@
-error[E0635]: unknown feature `const_cmp`
- --> $DIR/const-impl-trait.rs:6:5
+error[E0277]: can't compare `impl PartialEq + Destruct + Copy` with `impl PartialEq + Destruct + Copy`
+ --> $DIR/const-impl-trait.rs:28:17
|
-LL | const_cmp,
- | ^^^^^^^^^
-
-error: ~const can only be applied to `#[const_trait]` traits
- --> $DIR/const-impl-trait.rs:11:30
- |
-LL | const fn cmp(a: &impl ~const PartialEq) -> bool {
- | ^^^^^^^^^
-
-error: ~const can only be applied to `#[const_trait]` traits
- --> $DIR/const-impl-trait.rs:15:30
- |
-LL | const fn wrap(x: impl ~const PartialEq + ~const Destruct)
- | ^^^^^^^^^
-
-error: ~const can only be applied to `#[const_trait]` traits
- --> $DIR/const-impl-trait.rs:16:20
+LL | fn huh() -> impl ~const PartialEq + ~const Destruct + Copy {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `impl PartialEq + Destruct + Copy == impl PartialEq + Destruct + Copy`
|
-LL | -> impl ~const PartialEq + ~const Destruct
- | ^^^^^^^^^
-
-error: ~const can only be applied to `#[const_trait]` traits
- --> $DIR/const-impl-trait.rs:23:29
+ = help: the trait `~const PartialEq` is not implemented for `impl PartialEq + Destruct + Copy`
+note: required by a bound in `Foo::{opaque#0}`
+ --> $DIR/const-impl-trait.rs:24:22
|
LL | fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
- | ^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^ required by this bound in `Foo::{opaque#0}`
-error: ~const can only be applied to `#[const_trait]` traits
- --> $DIR/const-impl-trait.rs:27:29
+error[E0277]: can't drop `impl PartialEq + Destruct + Copy`
+ --> $DIR/const-impl-trait.rs:28:17
|
LL | fn huh() -> impl ~const PartialEq + ~const Destruct + Copy {
- | ^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const Destruct` is not implemented for `impl PartialEq + Destruct + Copy`
+ |
+note: required by a bound in `Foo::{opaque#0}`
+ --> $DIR/const-impl-trait.rs:24:41
+ |
+LL | fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
+ | ^^^^^^^^^^^^^^^ required by this bound in `Foo::{opaque#0}`
-error: aborting due to 6 previous errors
+error: aborting due to 2 previous errors
-For more information about this error, try `rustc --explain E0635`.
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-gate.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-gate.stderr
index cc9bdd271..2dd96f548 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-gate.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-gate.stderr
@@ -6,6 +6,6 @@ LL | #[derive_const(Default)]
|
= help: add `#![feature(derive_const)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.stderr
index 1c69ad431..dfe8fa79e 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.stderr
@@ -8,5 +8,5 @@ LL | #[derive_const(Default)]
= note: adding a non-const method body in the future would be a breaking change
= note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.rs
index 69098542b..42d728369 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.rs
@@ -1,5 +1,6 @@
// known-bug: #110395
-#![feature(const_trait_impl, const_cmp, const_default_impls, derive_const)]
+
+#![feature(const_trait_impl, const_cmp, const_default_impls, derive_const, effects)]
pub struct A;
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.stderr
index 046dbae0e..c561f8065 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.stderr
@@ -1,15 +1,28 @@
-error[E0635]: unknown feature `const_cmp`
- --> $DIR/derive-const-use.rs:2:30
- |
-LL | #![feature(const_trait_impl, const_cmp, const_default_impls, derive_const)]
- | ^^^^^^^^^
-
error[E0635]: unknown feature `const_default_impls`
- --> $DIR/derive-const-use.rs:2:41
+ --> $DIR/derive-const-use.rs:3:41
|
-LL | #![feature(const_trait_impl, const_cmp, const_default_impls, derive_const)]
+LL | #![feature(const_trait_impl, const_cmp, const_default_impls, derive_const, effects)]
| ^^^^^^^^^^^^^^^^^^^
-error: aborting due to 2 previous errors
+error: const `impl` for trait `Default` which is not marked with `#[const_trait]`
+ --> $DIR/derive-const-use.rs:7:12
+ |
+LL | impl const Default for A {
+ | ^^^^^^^
+ |
+ = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+ = note: adding a non-const method body in the future would be a breaking change
+
+error: const `impl` for trait `Default` which is not marked with `#[const_trait]`
+ --> $DIR/derive-const-use.rs:15:16
+ |
+LL | #[derive_const(Default, PartialEq)]
+ | ^^^^^^^
+ |
+ = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+ = note: adding a non-const method body in the future would be a breaking change
+ = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0635`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.rs
index 2a5d0176b..b479c967b 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.rs
@@ -1,7 +1,7 @@
-// known-bug: #110395
+// check-pass
#![feature(derive_const)]
-#![feature(const_trait_impl)]
+#![feature(const_trait_impl, effects)]
#[derive_const(PartialEq)]
pub struct Reverse<T>(T);
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.stderr
deleted file mode 100644
index 37d123e4c..000000000
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-error: ~const can only be applied to `#[const_trait]` traits
- --> $DIR/derive-const-with-params.rs:6:16
- |
-LL | #[derive_const(PartialEq)]
- | ^^^^^^^^^
- |
- = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to previous error
-
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.gatednc.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.gatednc.stderr
index 428286e0b..f0ac953fd 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.gatednc.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.gatednc.stderr
@@ -2,10 +2,10 @@ error[E0277]: the trait bound `cross_crate::NonConst: ~const cross_crate::MyTrai
--> $DIR/cross-crate.rs:17:14
|
LL | NonConst.func();
- | ^^^^ the trait `cross_crate::MyTrait` is not implemented for `cross_crate::NonConst`
+ | ^^^^ the trait `~const cross_crate::MyTrait` is not implemented for `cross_crate::NonConst`
|
= help: the trait `cross_crate::MyTrait` is implemented for `cross_crate::NonConst`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.stock.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.stock.stderr
index 22f13a741..ab039397e 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.stock.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.stock.stderr
@@ -7,6 +7,6 @@ LL | Const.func();
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.stderr
index a6881b8fe..29db6109a 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.stderr
@@ -2,10 +2,10 @@ error[E0277]: the trait bound `(): ~const Tr` is not satisfied
--> $DIR/default-method-body-is-const-same-trait-ck.rs:8:12
|
LL | ().a()
- | ^ the trait `Tr` is not implemented for `()`
+ | ^ the trait `~const Tr` is not implemented for `()`
|
= help: the trait `Tr` is implemented for `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.stderr
index 002d586ac..413e21702 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.stderr
@@ -6,6 +6,6 @@ LL | (const || { (()).foo() })();
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/effect-param-infer.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/effect-param-infer.rs
new file mode 100644
index 000000000..e216f6879
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/effect-param-infer.rs
@@ -0,0 +1,15 @@
+// Ensure that we don't get a mismatch error when inserting the host param
+// at the end of generic args when the generics have defaulted params.
+//
+// check-pass
+
+#![feature(const_trait_impl, effects)]
+
+#[const_trait]
+pub trait Foo<Rhs: ?Sized = Self> {
+ /* stuff */
+}
+
+impl const Foo for () {}
+
+fn main() {}
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/helloworld.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/helloworld.rs
index e7ba0505d..17f203e15 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/helloworld.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/helloworld.rs
@@ -3,15 +3,16 @@
// gate-test-effects
// ^ effects doesn't have a gate so we will trick tidy into thinking this is a gate test
-#![feature(const_trait_impl, effects, rustc_attrs)]
+#![feature(const_trait_impl, effects, core_intrinsics, const_eval_select)]
// ensure we are passing in the correct host effect in always const contexts.
-pub const fn hmm<T, #[rustc_host] const host: bool = true>() -> usize {
- if host {
- 1
- } else {
- 0
+pub const fn hmm<T>() -> usize {
+ // FIXME(const_trait_impl): maybe we should have a way to refer to the (hidden) effect param
+ fn one() -> usize { 1 }
+ const fn zero() -> usize { 0 }
+ unsafe {
+ std::intrinsics::const_eval_select((), zero, one)
}
}
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs
index c38b4b3f1..59fb48e79 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs
@@ -1,12 +1,13 @@
+// check-pass
+
#![crate_type = "lib"]
-#![feature(no_core, lang_items, unboxed_closures, auto_traits, intrinsics, rustc_attrs)]
+#![feature(no_core, lang_items, unboxed_closures, auto_traits, intrinsics, rustc_attrs, staged_api)]
#![feature(fundamental)]
#![feature(const_trait_impl, effects, const_mut_refs)]
#![allow(internal_features)]
#![no_std]
#![no_core]
-
-// known-bug: #110395
+#![stable(feature = "minicore", since = "1.0.0")]
#[lang = "sized"]
trait Sized {}
@@ -21,8 +22,7 @@ trait Add<Rhs = Self> {
fn add(self, rhs: Rhs) -> Self::Output;
}
-// FIXME we shouldn't need to have to specify `Rhs`.
-impl const Add<i32> for i32 {
+impl const Add for i32 {
type Output = i32;
fn add(self, rhs: i32) -> i32 {
loop {}
@@ -83,6 +83,7 @@ trait FnMut<Args: Tuple>: ~const FnOnce<Args> {
#[lang = "fn_once"]
#[rustc_paren_sugar]
trait FnOnce<Args: Tuple> {
+ #[lang = "fn_once_output"]
type Output;
extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
@@ -94,7 +95,7 @@ struct ConstFnMutClosure<CapturedData, Function> {
}
#[lang = "tuple_trait"]
-pub trait Tuple {}
+trait Tuple {}
macro_rules! impl_fn_mut_tuple {
($($var:ident)*) => {
@@ -344,8 +345,16 @@ trait PartialEq<Rhs: ?Sized = Self> {
}
}
-// FIXME(effects): again, this should not error without Rhs specified
-impl PartialEq<str> for str {
+impl<A: ?Sized, B: ?Sized> const PartialEq<&B> for &A
+where
+ A: ~const PartialEq<B>,
+{
+ fn eq(&self, other: &&B) -> bool {
+ PartialEq::eq(*self, *other)
+ }
+}
+
+impl PartialEq for str {
fn eq(&self, other: &str) -> bool {
loop {}
}
@@ -502,3 +511,17 @@ trait StructuralPartialEq {}
trait StructuralEq {}
const fn drop<T: ~const Destruct>(_: T) {}
+
+extern "rust-intrinsic" {
+ #[rustc_const_stable(feature = "const_eval_select", since = "1.0.0")]
+ fn const_eval_select<ARG: Tuple, F, G, RET>(
+ arg: ARG,
+ called_in_const: F,
+ called_at_rt: G,
+ ) -> RET
+ /* where clauses enforced by built-in method confirmation:
+ where
+ F: const FnOnce<Arg, Output = RET>,
+ G: FnOnce<Arg, Output = RET>,
+ */;
+}
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.stderr
deleted file mode 100644
index 024293742..000000000
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.stderr
+++ /dev/null
@@ -1,32 +0,0 @@
-error[E0369]: cannot add `i32` to `i32`
- --> $DIR/minicore.rs:33:20
- |
-LL | let x = 42_i32 + 43_i32;
- | ------ ^ ------ i32
- | |
- | i32
-
-error[E0369]: cannot add `i32` to `i32`
- --> $DIR/minicore.rs:37:20
- |
-LL | let x = 42_i32 + 43_i32;
- | ------ ^ ------ i32
- | |
- | i32
-
-error[E0600]: cannot apply unary operator `!` to type `bool`
- --> $DIR/minicore.rs:343:9
- |
-LL | !self.eq(other)
- | ^^^^^^^^^^^^^^^ cannot apply unary operator `!`
-
-error[E0600]: cannot apply unary operator `!` to type `bool`
- --> $DIR/minicore.rs:365:9
- |
-LL | !self
- | ^^^^^ cannot apply unary operator `!`
-
-error: aborting due to 4 previous errors
-
-Some errors have detailed explanations: E0369, E0600.
-For more information about an error, try `rustc --explain E0369`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/feature-gate.gated.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/feature-gate.gated.stderr
index 4c630d33c..663cdd1fe 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/feature-gate.gated.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/feature-gate.gated.stderr
@@ -4,5 +4,5 @@ error: fatal error triggered by #[rustc_error]
LL | fn main() {}
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/generic-bound.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/generic-bound.stderr
index 6a177592b..1e8a70ffd 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/generic-bound.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/generic-bound.stderr
@@ -11,6 +11,6 @@ LL | impl<T> const std::ops::Add for S<T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/hir-const-check.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/hir-const-check.stderr
index 6d2be1daa..90f30ea63 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/hir-const-check.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/hir-const-check.stderr
@@ -7,6 +7,6 @@ LL | Some(())?;
= note: see issue #74935 <https://github.com/rust-lang/rust/issues/74935> for more information
= help: add `#![feature(const_try)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/impl-tilde-const-trait.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/impl-tilde-const-trait.stderr
index 0a91719e1..4695728f8 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/impl-tilde-const-trait.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/impl-tilde-const-trait.stderr
@@ -4,5 +4,5 @@ error: expected a trait, found type
LL | impl ~const T for S {}
| ^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/impl-with-default-fn-fail.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/impl-with-default-fn-fail.stderr
index 6c6ca9f5d..36c8163f1 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/impl-with-default-fn-fail.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/impl-with-default-fn-fail.stderr
@@ -7,6 +7,6 @@ LL | fn req(&self);
LL | impl const Tr for u16 {
| ^^^^^^^^^^^^^^^^^^^^^ missing `req` in implementation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102156.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102156.stderr
index e8ae7e4e3..c331236a4 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102156.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102156.stderr
@@ -2,17 +2,20 @@ error[E0433]: failed to resolve: maybe a missing crate `core`?
--> $DIR/issue-102156.rs:4:5
|
LL | use core::convert::{From, TryFrom};
- | ^^^^ maybe a missing crate `core`?
- |
- = help: consider adding `extern crate core` to use the `core` crate
+ | ^^^^
+ | |
+ | maybe a missing crate `core`?
+ | help: try using `std` instead of `core`: `std`
error[E0433]: failed to resolve: maybe a missing crate `core`?
--> $DIR/issue-102156.rs:4:5
|
LL | use core::convert::{From, TryFrom};
- | ^^^^ maybe a missing crate `core`?
+ | ^^^^
+ | |
+ | maybe a missing crate `core`?
+ | help: try using `std` instead of `core`: `std`
|
- = help: consider adding `extern crate core` to use the `core` crate
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: aborting due to 2 previous errors
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102985.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102985.stderr
index f0c61cf9d..077f6c7b2 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102985.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102985.stderr
@@ -6,6 +6,6 @@ LL | n => n(),
|
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-79450.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-79450.stderr
index 082c0333f..85996c212 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-79450.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-79450.stderr
@@ -7,6 +7,6 @@ LL | println!("lul");
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
= note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.stderr
index d8cb10c65..157b54214 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.stderr
@@ -6,6 +6,6 @@ LL | T::assoc()
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-90052.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-90052.rs
deleted file mode 100644
index 21ddf4ab4..000000000
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-90052.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-#![feature(const_trait_impl)]
-
-#[const_trait]
-trait Bar {}
-
-fn foo<T>() where T: ~const Bar {}
-//~^ ERROR `~const` is not allowed
-
-fn main() {}
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-90052.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-90052.stderr
deleted file mode 100644
index b2a936537..000000000
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-90052.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error: `~const` is not allowed here
- --> $DIR/issue-90052.rs:6:22
- |
-LL | fn foo<T>() where T: ~const Bar {}
- | ^^^^^^^^^^
- |
-note: this function is not `const`, so it cannot have `~const` trait bounds
- --> $DIR/issue-90052.rs:6:4
- |
-LL | fn foo<T>() where T: ~const Bar {}
- | ^^^
-
-error: aborting due to previous error
-
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92111.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92111.stderr
index b27f94f99..2edaca606 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92111.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92111.stderr
@@ -6,6 +6,6 @@ LL | const fn a<T: ~const Destruct>(t: T) {}
| |
| the destructor for this type cannot be evaluated in constant functions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0493`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.gated.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.gated.stderr
index 4fe8a372e..89e59e5db 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.gated.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.gated.stderr
@@ -7,6 +7,6 @@ LL | "a" => (), //FIXME [gated]~ ERROR can't compare `str` with `str` in
= note: `str` cannot be compared in compile-time, and therefore cannot be used in `match`es
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.stock.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.stock.stderr
index c36142dac..5431116a1 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.stock.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.stock.stderr
@@ -8,6 +8,6 @@ LL | "a" => (), //FIXME [gated]~ ERROR can't compare `str` with `str` in
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-const-closure-non-const-outer.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-const-closure-non-const-outer.stderr
index 979d7febb..97ad83130 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-const-closure-non-const-outer.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-const-closure-non-const-outer.stderr
@@ -6,6 +6,6 @@ LL | (const || { (()).foo() })();
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-in-closure-in-const.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-in-closure-in-const.stderr
index cfdda4713..b2e09d82a 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-in-closure-in-const.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-in-closure-in-const.stderr
@@ -4,5 +4,5 @@ error: ~const can only be applied to `#[const_trait]` traits
LL | impl<A, B> const Convert<B> for A where B: ~const From<A> {
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs
index 3db59631e..234b0dd00 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs
@@ -18,11 +18,7 @@ trait Bar {
fn bar();
}
-// bgr360: I was only able to exercise the code path that raises the
-// "missing ~const qualifier" error by making this base impl non-const, even
-// though that doesn't really make sense to do. As seen below, if the base impl
-// is made const, rustc fails earlier with an overlapping impl failure.
-impl<T> Bar for T
+impl<T> const Bar for T
where
T: ~const Foo,
{
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-impl-non-const-specialized-impl.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-impl-non-const-specialized-impl.stderr
index 247668047..e356621ba 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-impl-non-const-specialized-impl.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-impl-non-const-specialized-impl.stderr
@@ -4,5 +4,5 @@ error: cannot specialize on const impl with non-const impl
LL | impl Value for FortyTwo {
| ^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/non-const-default-const-specialized.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/non-const-default-const-specialized.stderr
index 4734cee7f..68eac990a 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/non-const-default-const-specialized.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/non-const-default-const-specialized.stderr
@@ -7,6 +7,6 @@ LL | impl<T> Value for T {
LL | impl const Value for FortyTwo {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `FortyTwo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness-2.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness-2.stderr
index 92bc9815e..0b35feddc 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness-2.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness-2.stderr
@@ -6,6 +6,6 @@ LL | <T as A>::a();
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness.stderr
index 08258fd1a..21e21c2cb 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness.stderr
@@ -4,5 +4,5 @@ error: cannot specialize on const impl with non-const impl
LL | impl<T: Spec + Sup> A for T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api-user-crate.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api-user-crate.stderr
index d7aa0d95c..1346c4c4a 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api-user-crate.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api-user-crate.stderr
@@ -7,6 +7,6 @@ LL | Unstable::func();
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.gated.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.gated.stderr
index 78aab9469..bf53b995b 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.gated.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.gated.stderr
@@ -4,6 +4,6 @@ error[E0635]: unknown feature `const_default_impls`
LL | #![cfg_attr(gated, feature(const_trait_impl, const_default_impls))]
| ^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0635`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.stock.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.stock.stderr
index 6a3396401..6d624def2 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.stock.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.stock.stderr
@@ -7,6 +7,6 @@ LL | Default::default()
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.nn.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.nn.stderr
index b60399c57..12bcdb034 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.nn.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.nn.stderr
@@ -1,3 +1,15 @@
+error: `~const` is not allowed here
+ --> $DIR/super-traits-fail-2.rs:11:12
+ |
+LL | trait Bar: ~const Foo {}
+ | ^^^^^^
+ |
+note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
+ --> $DIR/super-traits-fail-2.rs:11:1
+ |
+LL | trait Bar: ~const Foo {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+
error: ~const can only be applied to `#[const_trait]` traits
--> $DIR/super-traits-fail-2.rs:11:19
|
@@ -12,5 +24,5 @@ LL | trait Bar: ~const Foo {}
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr
index 5d34156a5..e465ebaff 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr
@@ -1,11 +1,14 @@
-error[E0015]: cannot call non-const fn `<T as Foo>::a` in constant functions
- --> $DIR/super-traits-fail-2.rs:16:7
+error: `~const` is not allowed here
+ --> $DIR/super-traits-fail-2.rs:11:12
|
-LL | x.a();
- | ^^^
+LL | trait Bar: ~const Foo {}
+ | ^^^^^^
|
- = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
+note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
+ --> $DIR/super-traits-fail-2.rs:11:1
+ |
+LL | trait Bar: ~const Foo {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
-For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yy.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yy.stderr
index 5d34156a5..1faa5b4dd 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yy.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yy.stderr
@@ -6,6 +6,6 @@ LL | x.a();
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.nn.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.nn.stderr
index eb12a236d..e10c51ef4 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.nn.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.nn.stderr
@@ -1,3 +1,15 @@
+error: `~const` is not allowed here
+ --> $DIR/super-traits-fail-3.rs:13:12
+ |
+LL | trait Bar: ~const Foo {}
+ | ^^^^^^
+ |
+note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
+ --> $DIR/super-traits-fail-3.rs:13:1
+ |
+LL | trait Bar: ~const Foo {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+
error: ~const can only be applied to `#[const_trait]` traits
--> $DIR/super-traits-fail-3.rs:13:19
|
@@ -13,10 +25,10 @@ LL | trait Bar: ~const Foo {}
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: ~const can only be applied to `#[const_trait]` traits
- --> $DIR/super-traits-fail-3.rs:17:24
+ --> $DIR/super-traits-fail-3.rs:18:24
|
LL | const fn foo<T: ~const Bar>(x: &T) {
| ^^^
-error: aborting due to 3 previous errors
+error: aborting due to 4 previous errors
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs
index 16c592830..5994057b2 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs
@@ -13,6 +13,7 @@ trait Foo {
trait Bar: ~const Foo {}
//[ny,nn]~^ ERROR: ~const can only be applied to `#[const_trait]`
//[ny,nn]~| ERROR: ~const can only be applied to `#[const_trait]`
+//[yn,nn]~^^^ ERROR: `~const` is not allowed here
const fn foo<T: ~const Bar>(x: &T) {
//[yn,nn]~^ ERROR: ~const can only be applied to `#[const_trait]`
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yn.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yn.stderr
index 58225b945..34f6515b5 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yn.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yn.stderr
@@ -1,8 +1,20 @@
+error: `~const` is not allowed here
+ --> $DIR/super-traits-fail-3.rs:13:12
+ |
+LL | trait Bar: ~const Foo {}
+ | ^^^^^^
+ |
+note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
+ --> $DIR/super-traits-fail-3.rs:13:1
+ |
+LL | trait Bar: ~const Foo {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+
error: ~const can only be applied to `#[const_trait]` traits
- --> $DIR/super-traits-fail-3.rs:17:24
+ --> $DIR/super-traits-fail-3.rs:18:24
|
LL | const fn foo<T: ~const Bar>(x: &T) {
| ^^^
-error: aborting due to previous error
+error: aborting due to 2 previous errors
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yy.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yy.stderr
index 6bc643e68..5cccc0251 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yy.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yy.stderr
@@ -1,11 +1,11 @@
error[E0015]: cannot call non-const fn `<T as Foo>::a` in constant functions
- --> $DIR/super-traits-fail-3.rs:19:7
+ --> $DIR/super-traits-fail-3.rs:20:7
|
LL | x.a();
| ^^^
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-and-const-params.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-and-const-params.stderr
index be7a83dc1..b47979381 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-and-const-params.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-and-const-params.stderr
@@ -2,7 +2,7 @@ error: `~const` is not allowed here
--> $DIR/tilde-const-and-const-params.rs:9:15
|
LL | fn add<A: ~const Add42>(self) -> Foo<{ A::add(N) }> {
- | ^^^^^^^^^^^^
+ | ^^^^^^
|
note: this function is not `const`, so it cannot have `~const` trait bounds
--> $DIR/tilde-const-and-const-params.rs:9:8
@@ -14,7 +14,7 @@ error: `~const` is not allowed here
--> $DIR/tilde-const-and-const-params.rs:27:11
|
LL | fn bar<A: ~const Add42, const N: usize>(_: Foo<N>) -> Foo<{ A::add(N) }> {
- | ^^^^^^^^^^^^
+ | ^^^^^^
|
note: this function is not `const`, so it cannot have `~const` trait bounds
--> $DIR/tilde-const-and-const-params.rs:27:4
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.rs
index 95f7aaba0..5ecb75094 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.rs
@@ -1,7 +1,58 @@
#![feature(const_trait_impl)]
-#![feature(associated_type_bounds)]
-struct TildeQuestion<T: ~const ?Sized>(std::marker::PhantomData<T>);
-//~^ ERROR `~const` and `?` are mutually exclusive
+#[const_trait]
+trait Trait {}
+
+// Regression test for issue #90052.
+fn non_const_function<T: ~const Trait>() {} //~ ERROR `~const` is not allowed
+
+struct Struct<T: ~const Trait> { field: T } //~ ERROR `~const` is not allowed here
+struct TupleStruct<T: ~const Trait>(T); //~ ERROR `~const` is not allowed here
+struct UnitStruct<T: ~const Trait>; //~ ERROR `~const` is not allowed here
+
+enum Enum<T: ~const Trait> { Variant(T) } //~ ERROR `~const` is not allowed here
+
+union Union<T: ~const Trait> { field: T } //~ ERROR `~const` is not allowed here
+
+type Type<T: ~const Trait> = T; //~ ERROR `~const` is not allowed here
+
+const CONSTANT<T: ~const Trait>: () = (); //~ ERROR `~const` is not allowed here
+//~^ ERROR generic const items are experimental
+
+trait NonConstTrait {
+ type Type<T: ~const Trait>: ~const Trait;
+ //~^ ERROR `~const` is not allowed
+ //~| ERROR `~const` is not allowed
+ fn non_const_function<T: ~const Trait>(); //~ ERROR `~const` is not allowed
+ const CONSTANT<T: ~const Trait>: (); //~ ERROR `~const` is not allowed
+ //~^ ERROR generic const items are experimental
+}
+
+impl NonConstTrait for () {
+ type Type<T: ~const Trait> = (); //~ ERROR `~const` is not allowed
+ fn non_const_function<T: ~const Trait>() {} //~ ERROR `~const` is not allowed
+ const CONSTANT<T: ~const Trait>: () = (); //~ ERROR `~const` is not allowed
+ //~^ ERROR generic const items are experimental
+}
+
+struct Implementor;
+
+impl Implementor {
+ type Type<T: ~const Trait> = (); //~ ERROR `~const` is not allowed
+ //~^ ERROR inherent associated types are unstable
+ fn non_const_function<T: ~const Trait>() {} //~ ERROR `~const` is not allowed
+ const CONSTANT<T: ~const Trait>: () = (); //~ ERROR `~const` is not allowed
+ //~^ ERROR generic const items are experimental
+}
+
+// non-const traits
+trait Child0: ~const Trait {} //~ ERROR `~const` is not allowed
+trait Child1 where Self: ~const Trait {} //~ ERROR `~const` is not allowed
+
+// non-const impl
+impl<T: ~const Trait> Trait for T {} //~ ERROR `~const` is not allowed
+
+// inherent impl (regression test for issue #117004)
+impl<T: ~const Trait> Struct<T> {} //~ ERROR `~const` is not allowed
fn main() {}
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr
index d20f146df..497ec5bcf 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr
@@ -1,8 +1,256 @@
-error: `~const` and `?` are mutually exclusive
- --> $DIR/tilde-const-invalid-places.rs:4:25
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:7:26
|
-LL | struct TildeQuestion<T: ~const ?Sized>(std::marker::PhantomData<T>);
- | ^^^^^^^^^^^^^
+LL | fn non_const_function<T: ~const Trait>() {}
+ | ^^^^^^
+ |
+note: this function is not `const`, so it cannot have `~const` trait bounds
+ --> $DIR/tilde-const-invalid-places.rs:7:4
+ |
+LL | fn non_const_function<T: ~const Trait>() {}
+ | ^^^^^^^^^^^^^^^^^^
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:9:18
+ |
+LL | struct Struct<T: ~const Trait> { field: T }
+ | ^^^^^^
+ |
+ = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:10:23
+ |
+LL | struct TupleStruct<T: ~const Trait>(T);
+ | ^^^^^^
+ |
+ = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:11:22
+ |
+LL | struct UnitStruct<T: ~const Trait>;
+ | ^^^^^^
+ |
+ = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:13:14
+ |
+LL | enum Enum<T: ~const Trait> { Variant(T) }
+ | ^^^^^^
+ |
+ = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:15:16
+ |
+LL | union Union<T: ~const Trait> { field: T }
+ | ^^^^^^
+ |
+ = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:17:14
+ |
+LL | type Type<T: ~const Trait> = T;
+ | ^^^^^^
+ |
+ = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:19:19
+ |
+LL | const CONSTANT<T: ~const Trait>: () = ();
+ | ^^^^^^
+ |
+ = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:23:18
+ |
+LL | type Type<T: ~const Trait>: ~const Trait;
+ | ^^^^^^
+ |
+ = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:23:33
+ |
+LL | type Type<T: ~const Trait>: ~const Trait;
+ | ^^^^^^
+ |
+ = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:26:30
+ |
+LL | fn non_const_function<T: ~const Trait>();
+ | ^^^^^^
+ |
+note: this function is not `const`, so it cannot have `~const` trait bounds
+ --> $DIR/tilde-const-invalid-places.rs:26:8
+ |
+LL | fn non_const_function<T: ~const Trait>();
+ | ^^^^^^^^^^^^^^^^^^
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:27:23
+ |
+LL | const CONSTANT<T: ~const Trait>: ();
+ | ^^^^^^
+ |
+ = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:32:18
+ |
+LL | type Type<T: ~const Trait> = ();
+ | ^^^^^^
+ |
+ = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:33:30
+ |
+LL | fn non_const_function<T: ~const Trait>() {}
+ | ^^^^^^
+ |
+note: this function is not `const`, so it cannot have `~const` trait bounds
+ --> $DIR/tilde-const-invalid-places.rs:33:8
+ |
+LL | fn non_const_function<T: ~const Trait>() {}
+ | ^^^^^^^^^^^^^^^^^^
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:34:23
+ |
+LL | const CONSTANT<T: ~const Trait>: () = ();
+ | ^^^^^^
+ |
+ = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:41:18
+ |
+LL | type Type<T: ~const Trait> = ();
+ | ^^^^^^
+ |
+ = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:43:30
+ |
+LL | fn non_const_function<T: ~const Trait>() {}
+ | ^^^^^^
+ |
+note: this function is not `const`, so it cannot have `~const` trait bounds
+ --> $DIR/tilde-const-invalid-places.rs:43:8
+ |
+LL | fn non_const_function<T: ~const Trait>() {}
+ | ^^^^^^^^^^^^^^^^^^
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:44:23
+ |
+LL | const CONSTANT<T: ~const Trait>: () = ();
+ | ^^^^^^
+ |
+ = note: this item cannot have `~const` trait bounds
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:49:15
+ |
+LL | trait Child0: ~const Trait {}
+ | ^^^^^^
+ |
+note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
+ --> $DIR/tilde-const-invalid-places.rs:49:1
+ |
+LL | trait Child0: ~const Trait {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:50:26
+ |
+LL | trait Child1 where Self: ~const Trait {}
+ | ^^^^^^
+ |
+note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
+ --> $DIR/tilde-const-invalid-places.rs:50:1
+ |
+LL | trait Child1 where Self: ~const Trait {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:53:9
+ |
+LL | impl<T: ~const Trait> Trait for T {}
+ | ^^^^^^
+ |
+note: this impl is not `const`, so it cannot have `~const` trait bounds
+ --> $DIR/tilde-const-invalid-places.rs:53:1
+ |
+LL | impl<T: ~const Trait> Trait for T {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: `~const` is not allowed here
+ --> $DIR/tilde-const-invalid-places.rs:56:9
+ |
+LL | impl<T: ~const Trait> Struct<T> {}
+ | ^^^^^^
+ |
+note: inherent impls cannot have `~const` trait bounds
+ --> $DIR/tilde-const-invalid-places.rs:56:1
+ |
+LL | impl<T: ~const Trait> Struct<T> {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0658]: generic const items are experimental
+ --> $DIR/tilde-const-invalid-places.rs:19:15
+ |
+LL | const CONSTANT<T: ~const Trait>: () = ();
+ | ^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #113521 <https://github.com/rust-lang/rust/issues/113521> for more information
+ = help: add `#![feature(generic_const_items)]` to the crate attributes to enable
+
+error[E0658]: generic const items are experimental
+ --> $DIR/tilde-const-invalid-places.rs:27:19
+ |
+LL | const CONSTANT<T: ~const Trait>: ();
+ | ^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #113521 <https://github.com/rust-lang/rust/issues/113521> for more information
+ = help: add `#![feature(generic_const_items)]` to the crate attributes to enable
+
+error[E0658]: generic const items are experimental
+ --> $DIR/tilde-const-invalid-places.rs:34:19
+ |
+LL | const CONSTANT<T: ~const Trait>: () = ();
+ | ^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #113521 <https://github.com/rust-lang/rust/issues/113521> for more information
+ = help: add `#![feature(generic_const_items)]` to the crate attributes to enable
+
+error[E0658]: generic const items are experimental
+ --> $DIR/tilde-const-invalid-places.rs:44:19
+ |
+LL | const CONSTANT<T: ~const Trait>: () = ();
+ | ^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #113521 <https://github.com/rust-lang/rust/issues/113521> for more information
+ = help: add `#![feature(generic_const_items)]` to the crate attributes to enable
+
+error[E0658]: inherent associated types are unstable
+ --> $DIR/tilde-const-invalid-places.rs:41:5
+ |
+LL | type Type<T: ~const Trait> = ();
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #8995 <https://github.com/rust-lang/rust/issues/8995> for more information
+ = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 27 previous errors
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-maybe-trait.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-maybe-trait.rs
new file mode 100644
index 000000000..ed911d965
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-maybe-trait.rs
@@ -0,0 +1,6 @@
+#![feature(const_trait_impl)]
+
+const fn tilde_question<T: ~const ?Sized>() {}
+//~^ ERROR `~const` and `?` are mutually exclusive
+
+fn main() {}
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-maybe-trait.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-maybe-trait.stderr
new file mode 100644
index 000000000..5850ab41c
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-maybe-trait.stderr
@@ -0,0 +1,8 @@
+error: `~const` and `?` are mutually exclusive
+ --> $DIR/tilde-const-maybe-trait.rs:3:28
+ |
+LL | const fn tilde_question<T: ~const ?Sized>() {}
+ | ^^^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-twice.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-twice.stderr
index 928d23e8a..a809736a4 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-twice.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-twice.stderr
@@ -4,5 +4,5 @@ error: expected identifier, found `~`
LL | struct S<T: ~const ~const Tr>;
| ^ expected identifier
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde_const_on_impl_bound.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde_const_on_impl_bound.rs
index fbdc3a4f3..bfd9fe42e 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde_const_on_impl_bound.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde_const_on_impl_bound.rs
@@ -1,5 +1,4 @@
-// known-bug: #110395
-// FIXME check-pass
+// check-pass
#![feature(const_trait_impl, effects)]
#[const_trait]
@@ -9,8 +8,8 @@ trait Foo {
struct Bar<T>(T);
-impl<T: ~const Foo> Bar<T> {
- const fn foo(&self) {
+impl<T> Bar<T> {
+ const fn foo(&self) where T: ~const Foo {
self.0.foo()
}
}
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause.stderr
index 3d6fedbab..abe24b662 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause.stderr
@@ -2,7 +2,7 @@ error: `~const` is not allowed here
--> $DIR/trait-where-clause.rs:8:24
|
LL | fn b() where Self: ~const Bar;
- | ^^^^^^^^^^
+ | ^^^^^^
|
note: this function is not `const`, so it cannot have `~const` trait bounds
--> $DIR/trait-where-clause.rs:8:8
@@ -14,7 +14,7 @@ error: `~const` is not allowed here
--> $DIR/trait-where-clause.rs:10:13
|
LL | fn c<T: ~const Bar>();
- | ^^^^^^^^^^
+ | ^^^^^^
|
note: this function is not `const`, so it cannot have `~const` trait bounds
--> $DIR/trait-where-clause.rs:10:8
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/without-tilde.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/without-tilde.stderr
index 31300354a..646cdfc78 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/without-tilde.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/without-tilde.stderr
@@ -6,5 +6,5 @@ LL | struct S<T: const Tr>;
| |
| help: add `~`: `~`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rfcs/rfc-3348-c-string-literals/no-nuls.rs b/tests/ui/rfcs/rfc-3348-c-string-literals/no-nuls.rs
index 369173e23..dc1bf8045 100644
--- a/tests/ui/rfcs/rfc-3348-c-string-literals/no-nuls.rs
+++ b/tests/ui/rfcs/rfc-3348-c-string-literals/no-nuls.rs
Binary files differ
diff --git a/tests/ui/rmeta/emit-artifact-notifications.stderr b/tests/ui/rmeta/emit-artifact-notifications.stderr
index b2f0aa757..4f68a2d74 100644
--- a/tests/ui/rmeta/emit-artifact-notifications.stderr
+++ b/tests/ui/rmeta/emit-artifact-notifications.stderr
@@ -1 +1 @@
-{"artifact":"$TEST_BUILD_DIR/rmeta/emit-artifact-notifications/libemit_artifact_notifications.rmeta","emit":"metadata"}
+{"$message_type":"artifact","artifact":"$TEST_BUILD_DIR/rmeta/emit-artifact-notifications/libemit_artifact_notifications.rmeta","emit":"metadata"}
diff --git a/tests/ui/rmeta/no_optitimized_mir.stderr b/tests/ui/rmeta/no_optitimized_mir.stderr
index a17024c53..92f22d780 100644
--- a/tests/ui/rmeta/no_optitimized_mir.stderr
+++ b/tests/ui/rmeta/no_optitimized_mir.stderr
@@ -6,5 +6,5 @@ note: missing optimized MIR for this item (was the crate `rmeta_meta` compiled w
LL | pub fn missing_optimized_mir() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rmeta/rmeta.stderr b/tests/ui/rmeta/rmeta.stderr
index d15caeb66..85452ea41 100644
--- a/tests/ui/rmeta/rmeta.stderr
+++ b/tests/ui/rmeta/rmeta.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `Foo` in this scope
LL | let _ = Foo;
| ^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/rmeta/rmeta_lib.stderr b/tests/ui/rmeta/rmeta_lib.stderr
index 8a9179cca..830169e03 100644
--- a/tests/ui/rmeta/rmeta_lib.stderr
+++ b/tests/ui/rmeta/rmeta_lib.stderr
@@ -1,4 +1,4 @@
error: crate `rmeta_meta` required to be available in rlib format, but was not found in this form
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rmeta/rmeta_meta_main.stderr b/tests/ui/rmeta/rmeta_meta_main.stderr
index 0c6ed9afd..af11c88d9 100644
--- a/tests/ui/rmeta/rmeta_meta_main.stderr
+++ b/tests/ui/rmeta/rmeta_meta_main.stderr
@@ -2,8 +2,13 @@ error[E0560]: struct `Foo` has no field named `field2`
--> $DIR/rmeta_meta_main.rs:13:19
|
LL | let _ = Foo { field2: 42 };
- | ^^^^^^ help: a field with a similar name exists: `field`
+ | ^^^^^^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | let _ = Foo { field: 42 };
+ | ~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0560`.
diff --git a/tests/ui/rust-2018/async-ident-allowed.stderr b/tests/ui/rust-2018/async-ident-allowed.stderr
index 992b29750..b413c0fd9 100644
--- a/tests/ui/rust-2018/async-ident-allowed.stderr
+++ b/tests/ui/rust-2018/async-ident-allowed.stderr
@@ -13,5 +13,5 @@ LL | #![deny(rust_2018_compatibility)]
| ^^^^^^^^^^^^^^^^^^^^^^^
= note: `#[deny(keyword_idents)]` implied by `#[deny(rust_2018_compatibility)]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rust-2018/dyn-keyword.stderr b/tests/ui/rust-2018/dyn-keyword.stderr
index b6f5b10cf..6f9a5ddb1 100644
--- a/tests/ui/rust-2018/dyn-keyword.stderr
+++ b/tests/ui/rust-2018/dyn-keyword.stderr
@@ -12,5 +12,5 @@ note: the lint level is defined here
LL | #![deny(keyword_idents)]
| ^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed
index ede0c2e8e..3bfa6d2c2 100644
--- a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed
+++ b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed
@@ -1,6 +1,5 @@
// run-rustfix
-#![feature(rust_2018_preview)]
#![deny(absolute_paths_not_starting_with_crate)]
mod foo {
diff --git a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs
index 48b091ddb..140396265 100644
--- a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs
+++ b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs
@@ -1,6 +1,5 @@
// run-rustfix
-#![feature(rust_2018_preview)]
#![deny(absolute_paths_not_starting_with_crate)]
mod foo {
diff --git a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.stderr b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.stderr
index c0a322edc..036b9ccab 100644
--- a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.stderr
+++ b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.stderr
@@ -1,5 +1,5 @@
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/edition-lint-fully-qualified-paths.rs:19:25
+ --> $DIR/edition-lint-fully-qualified-paths.rs:18:25
|
LL | let _: <foo::Baz as ::foo::Foo>::Bar = ();
| ^^^^^^^^^^ help: use `crate`: `crate::foo::Foo`
@@ -7,13 +7,13 @@ LL | let _: <foo::Baz as ::foo::Foo>::Bar = ();
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
note: the lint level is defined here
- --> $DIR/edition-lint-fully-qualified-paths.rs:4:9
+ --> $DIR/edition-lint-fully-qualified-paths.rs:3:9
|
LL | #![deny(absolute_paths_not_starting_with_crate)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/edition-lint-fully-qualified-paths.rs:19:25
+ --> $DIR/edition-lint-fully-qualified-paths.rs:18:25
|
LL | let _: <foo::Baz as ::foo::Foo>::Bar = ();
| ^^^^^^^^^^ help: use `crate`: `crate::foo::Foo`
@@ -23,7 +23,7 @@ LL | let _: <foo::Baz as ::foo::Foo>::Bar = ();
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/edition-lint-fully-qualified-paths.rs:25:13
+ --> $DIR/edition-lint-fully-qualified-paths.rs:24:13
|
LL | let _: <::foo::Baz as foo::Foo>::Bar = ();
| ^^^^^^^^^^ help: use `crate`: `crate::foo::Baz`
diff --git a/tests/ui/rust-2018/edition-lint-nested-empty-paths.fixed b/tests/ui/rust-2018/edition-lint-nested-empty-paths.fixed
index f25d46ce3..fd23e9f55 100644
--- a/tests/ui/rust-2018/edition-lint-nested-empty-paths.fixed
+++ b/tests/ui/rust-2018/edition-lint-nested-empty-paths.fixed
@@ -1,6 +1,5 @@
// run-rustfix
-#![feature(rust_2018_preview)]
#![deny(absolute_paths_not_starting_with_crate)]
#![allow(unused_imports)]
#![allow(dead_code)]
diff --git a/tests/ui/rust-2018/edition-lint-nested-empty-paths.rs b/tests/ui/rust-2018/edition-lint-nested-empty-paths.rs
index 9be1680c1..f3fb012a5 100644
--- a/tests/ui/rust-2018/edition-lint-nested-empty-paths.rs
+++ b/tests/ui/rust-2018/edition-lint-nested-empty-paths.rs
@@ -1,6 +1,5 @@
// run-rustfix
-#![feature(rust_2018_preview)]
#![deny(absolute_paths_not_starting_with_crate)]
#![allow(unused_imports)]
#![allow(dead_code)]
diff --git a/tests/ui/rust-2018/edition-lint-nested-empty-paths.stderr b/tests/ui/rust-2018/edition-lint-nested-empty-paths.stderr
index 041572be8..4174c2fa9 100644
--- a/tests/ui/rust-2018/edition-lint-nested-empty-paths.stderr
+++ b/tests/ui/rust-2018/edition-lint-nested-empty-paths.stderr
@@ -1,5 +1,5 @@
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/edition-lint-nested-empty-paths.rs:17:5
+ --> $DIR/edition-lint-nested-empty-paths.rs:16:5
|
LL | use foo::{bar::{baz::{}}};
| ^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{bar::{baz::{}}}`
@@ -7,13 +7,13 @@ LL | use foo::{bar::{baz::{}}};
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
note: the lint level is defined here
- --> $DIR/edition-lint-nested-empty-paths.rs:4:9
+ --> $DIR/edition-lint-nested-empty-paths.rs:3:9
|
LL | #![deny(absolute_paths_not_starting_with_crate)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/edition-lint-nested-empty-paths.rs:21:5
+ --> $DIR/edition-lint-nested-empty-paths.rs:20:5
|
LL | use foo::{bar::{XX, baz::{}}};
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{bar::{XX, baz::{}}}`
@@ -22,7 +22,7 @@ LL | use foo::{bar::{XX, baz::{}}};
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/edition-lint-nested-empty-paths.rs:21:5
+ --> $DIR/edition-lint-nested-empty-paths.rs:20:5
|
LL | use foo::{bar::{XX, baz::{}}};
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{bar::{XX, baz::{}}}`
@@ -32,7 +32,7 @@ LL | use foo::{bar::{XX, baz::{}}};
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/edition-lint-nested-empty-paths.rs:27:5
+ --> $DIR/edition-lint-nested-empty-paths.rs:26:5
|
LL | use foo::{bar::{baz::{}, baz1::{}}};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{bar::{baz::{}, baz1::{}}}`
@@ -41,7 +41,7 @@ LL | use foo::{bar::{baz::{}, baz1::{}}};
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/edition-lint-nested-empty-paths.rs:27:5
+ --> $DIR/edition-lint-nested-empty-paths.rs:26:5
|
LL | use foo::{bar::{baz::{}, baz1::{}}};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{bar::{baz::{}, baz1::{}}}`
diff --git a/tests/ui/rust-2018/edition-lint-nested-paths.fixed b/tests/ui/rust-2018/edition-lint-nested-paths.fixed
index a04937ae8..0e47e70bb 100644
--- a/tests/ui/rust-2018/edition-lint-nested-paths.fixed
+++ b/tests/ui/rust-2018/edition-lint-nested-paths.fixed
@@ -1,6 +1,5 @@
// run-rustfix
-#![feature(rust_2018_preview)]
#![deny(absolute_paths_not_starting_with_crate)]
use crate::foo::{a, b};
diff --git a/tests/ui/rust-2018/edition-lint-nested-paths.rs b/tests/ui/rust-2018/edition-lint-nested-paths.rs
index e622a8e24..d261c10e3 100644
--- a/tests/ui/rust-2018/edition-lint-nested-paths.rs
+++ b/tests/ui/rust-2018/edition-lint-nested-paths.rs
@@ -1,6 +1,5 @@
// run-rustfix
-#![feature(rust_2018_preview)]
#![deny(absolute_paths_not_starting_with_crate)]
use foo::{a, b};
diff --git a/tests/ui/rust-2018/edition-lint-nested-paths.stderr b/tests/ui/rust-2018/edition-lint-nested-paths.stderr
index 4a70bb7e5..d059a2533 100644
--- a/tests/ui/rust-2018/edition-lint-nested-paths.stderr
+++ b/tests/ui/rust-2018/edition-lint-nested-paths.stderr
@@ -1,5 +1,5 @@
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/edition-lint-nested-paths.rs:6:5
+ --> $DIR/edition-lint-nested-paths.rs:5:5
|
LL | use foo::{a, b};
| ^^^^^^^^^^^ help: use `crate`: `crate::foo::{a, b}`
@@ -7,13 +7,13 @@ LL | use foo::{a, b};
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
note: the lint level is defined here
- --> $DIR/edition-lint-nested-paths.rs:4:9
+ --> $DIR/edition-lint-nested-paths.rs:3:9
|
LL | #![deny(absolute_paths_not_starting_with_crate)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/edition-lint-nested-paths.rs:6:5
+ --> $DIR/edition-lint-nested-paths.rs:5:5
|
LL | use foo::{a, b};
| ^^^^^^^^^^^ help: use `crate`: `crate::foo::{a, b}`
@@ -23,7 +23,7 @@ LL | use foo::{a, b};
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/edition-lint-nested-paths.rs:23:13
+ --> $DIR/edition-lint-nested-paths.rs:22:13
|
LL | use foo::{self as x, c};
| ^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{self as x, c}`
@@ -32,7 +32,7 @@ LL | use foo::{self as x, c};
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/edition-lint-nested-paths.rs:23:13
+ --> $DIR/edition-lint-nested-paths.rs:22:13
|
LL | use foo::{self as x, c};
| ^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{self as x, c}`
diff --git a/tests/ui/rust-2018/edition-lint-paths.fixed b/tests/ui/rust-2018/edition-lint-paths.fixed
index 47f82c51d..5057453c9 100644
--- a/tests/ui/rust-2018/edition-lint-paths.fixed
+++ b/tests/ui/rust-2018/edition-lint-paths.fixed
@@ -1,7 +1,6 @@
// aux-build:edition-lint-paths.rs
// run-rustfix
-#![feature(rust_2018_preview)]
#![deny(absolute_paths_not_starting_with_crate)]
#![allow(unused)]
diff --git a/tests/ui/rust-2018/edition-lint-paths.rs b/tests/ui/rust-2018/edition-lint-paths.rs
index e278983da..2c4a070ce 100644
--- a/tests/ui/rust-2018/edition-lint-paths.rs
+++ b/tests/ui/rust-2018/edition-lint-paths.rs
@@ -1,7 +1,6 @@
// aux-build:edition-lint-paths.rs
// run-rustfix
-#![feature(rust_2018_preview)]
#![deny(absolute_paths_not_starting_with_crate)]
#![allow(unused)]
diff --git a/tests/ui/rust-2018/edition-lint-paths.stderr b/tests/ui/rust-2018/edition-lint-paths.stderr
index fde17338d..553a3bfda 100644
--- a/tests/ui/rust-2018/edition-lint-paths.stderr
+++ b/tests/ui/rust-2018/edition-lint-paths.stderr
@@ -1,5 +1,5 @@
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/edition-lint-paths.rs:12:9
+ --> $DIR/edition-lint-paths.rs:11:9
|
LL | use bar::Bar;
| ^^^^^^^^ help: use `crate`: `crate::bar::Bar`
@@ -7,13 +7,13 @@ LL | use bar::Bar;
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
note: the lint level is defined here
- --> $DIR/edition-lint-paths.rs:5:9
+ --> $DIR/edition-lint-paths.rs:4:9
|
LL | #![deny(absolute_paths_not_starting_with_crate)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/edition-lint-paths.rs:19:9
+ --> $DIR/edition-lint-paths.rs:18:9
|
LL | use bar;
| ^^^ help: use `crate`: `crate::bar`
@@ -22,7 +22,7 @@ LL | use bar;
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/edition-lint-paths.rs:25:9
+ --> $DIR/edition-lint-paths.rs:24:9
|
LL | use {main, Bar as SomethingElse};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::{main, Bar as SomethingElse}`
@@ -31,7 +31,7 @@ LL | use {main, Bar as SomethingElse};
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/edition-lint-paths.rs:25:9
+ --> $DIR/edition-lint-paths.rs:24:9
|
LL | use {main, Bar as SomethingElse};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::{main, Bar as SomethingElse}`
@@ -41,7 +41,7 @@ LL | use {main, Bar as SomethingElse};
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/edition-lint-paths.rs:25:9
+ --> $DIR/edition-lint-paths.rs:24:9
|
LL | use {main, Bar as SomethingElse};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::{main, Bar as SomethingElse}`
@@ -51,7 +51,7 @@ LL | use {main, Bar as SomethingElse};
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/edition-lint-paths.rs:40:5
+ --> $DIR/edition-lint-paths.rs:39:5
|
LL | use bar::Bar;
| ^^^^^^^^ help: use `crate`: `crate::bar::Bar`
@@ -60,7 +60,7 @@ LL | use bar::Bar;
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/edition-lint-paths.rs:52:9
+ --> $DIR/edition-lint-paths.rs:51:9
|
LL | use *;
| ^ help: use `crate`: `crate::*`
@@ -69,7 +69,7 @@ LL | use *;
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/edition-lint-paths.rs:57:6
+ --> $DIR/edition-lint-paths.rs:56:6
|
LL | impl ::foo::SomeTrait for u32 {}
| ^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::SomeTrait`
@@ -78,7 +78,7 @@ LL | impl ::foo::SomeTrait for u32 {}
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/edition-lint-paths.rs:62:13
+ --> $DIR/edition-lint-paths.rs:61:13
|
LL | let x = ::bar::Bar;
| ^^^^^^^^^^ help: use `crate`: `crate::bar::Bar`
diff --git a/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.stderr b/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.stderr
index bb50ec3f5..a68d99c14 100644
--- a/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.stderr
+++ b/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.stderr
@@ -11,5 +11,5 @@ LL | #![deny(rust_2018_idioms)]
| ^^^^^^^^^^^^^^^^
= note: `#[deny(unused_extern_crates)]` implied by `#[deny(rust_2018_idioms)]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rust-2018/extern-crate-idiomatic.fixed b/tests/ui/rust-2018/extern-crate-idiomatic.fixed
index 3111b1dab..6a0639099 100644
--- a/tests/ui/rust-2018/extern-crate-idiomatic.fixed
+++ b/tests/ui/rust-2018/extern-crate-idiomatic.fixed
@@ -6,7 +6,6 @@
// The "normal case". Ideally we would remove the `extern crate` here,
// but we don't.
-#![feature(rust_2018_preview)]
#![deny(absolute_paths_not_starting_with_crate)]
extern crate edition_lint_paths;
diff --git a/tests/ui/rust-2018/extern-crate-idiomatic.rs b/tests/ui/rust-2018/extern-crate-idiomatic.rs
index 3111b1dab..6a0639099 100644
--- a/tests/ui/rust-2018/extern-crate-idiomatic.rs
+++ b/tests/ui/rust-2018/extern-crate-idiomatic.rs
@@ -6,7 +6,6 @@
// The "normal case". Ideally we would remove the `extern crate` here,
// but we don't.
-#![feature(rust_2018_preview)]
#![deny(absolute_paths_not_starting_with_crate)]
extern crate edition_lint_paths;
diff --git a/tests/ui/rust-2018/extern-crate-referenced-by-self-path.fixed b/tests/ui/rust-2018/extern-crate-referenced-by-self-path.fixed
index 11b9a67ed..c4a3dd941 100644
--- a/tests/ui/rust-2018/extern-crate-referenced-by-self-path.fixed
+++ b/tests/ui/rust-2018/extern-crate-referenced-by-self-path.fixed
@@ -6,7 +6,6 @@
// rather than being accessed directly. Unless we rewrite that path,
// we can't drop the extern crate.
-#![feature(rust_2018_preview)]
#![deny(absolute_paths_not_starting_with_crate)]
extern crate edition_lint_paths;
diff --git a/tests/ui/rust-2018/extern-crate-referenced-by-self-path.rs b/tests/ui/rust-2018/extern-crate-referenced-by-self-path.rs
index 11b9a67ed..c4a3dd941 100644
--- a/tests/ui/rust-2018/extern-crate-referenced-by-self-path.rs
+++ b/tests/ui/rust-2018/extern-crate-referenced-by-self-path.rs
@@ -6,7 +6,6 @@
// rather than being accessed directly. Unless we rewrite that path,
// we can't drop the extern crate.
-#![feature(rust_2018_preview)]
#![deny(absolute_paths_not_starting_with_crate)]
extern crate edition_lint_paths;
diff --git a/tests/ui/rust-2018/extern-crate-rename.fixed b/tests/ui/rust-2018/extern-crate-rename.fixed
index ea832ef3e..5e2bf64a2 100644
--- a/tests/ui/rust-2018/extern-crate-rename.fixed
+++ b/tests/ui/rust-2018/extern-crate-rename.fixed
@@ -4,7 +4,6 @@
// Oddball: crate is renamed, making it harder for us to rewrite
// paths. We don't (and we leave the `extern crate` in place).
-#![feature(rust_2018_preview)]
#![deny(absolute_paths_not_starting_with_crate)]
extern crate edition_lint_paths as my_crate;
diff --git a/tests/ui/rust-2018/extern-crate-rename.rs b/tests/ui/rust-2018/extern-crate-rename.rs
index b1f617dd8..290fcd6b7 100644
--- a/tests/ui/rust-2018/extern-crate-rename.rs
+++ b/tests/ui/rust-2018/extern-crate-rename.rs
@@ -4,7 +4,6 @@
// Oddball: crate is renamed, making it harder for us to rewrite
// paths. We don't (and we leave the `extern crate` in place).
-#![feature(rust_2018_preview)]
#![deny(absolute_paths_not_starting_with_crate)]
extern crate edition_lint_paths as my_crate;
diff --git a/tests/ui/rust-2018/extern-crate-rename.stderr b/tests/ui/rust-2018/extern-crate-rename.stderr
index eb040f5de..6b2512080 100644
--- a/tests/ui/rust-2018/extern-crate-rename.stderr
+++ b/tests/ui/rust-2018/extern-crate-rename.stderr
@@ -1,5 +1,5 @@
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/extern-crate-rename.rs:12:5
+ --> $DIR/extern-crate-rename.rs:11:5
|
LL | use my_crate::foo;
| ^^^^^^^^^^^^^ help: use `crate`: `crate::my_crate::foo`
@@ -7,10 +7,10 @@ LL | use my_crate::foo;
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
note: the lint level is defined here
- --> $DIR/extern-crate-rename.rs:8:9
+ --> $DIR/extern-crate-rename.rs:7:9
|
LL | #![deny(absolute_paths_not_starting_with_crate)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rust-2018/extern-crate-submod.fixed b/tests/ui/rust-2018/extern-crate-submod.fixed
index 9b0b0dd8e..dd3171041 100644
--- a/tests/ui/rust-2018/extern-crate-submod.fixed
+++ b/tests/ui/rust-2018/extern-crate-submod.fixed
@@ -5,7 +5,6 @@
// us to rewrite paths. We don't (and we leave the `extern crate` in
// place).
-#![feature(rust_2018_preview)]
#![deny(absolute_paths_not_starting_with_crate)]
mod m {
diff --git a/tests/ui/rust-2018/extern-crate-submod.rs b/tests/ui/rust-2018/extern-crate-submod.rs
index dfce9128c..cb0cd7a83 100644
--- a/tests/ui/rust-2018/extern-crate-submod.rs
+++ b/tests/ui/rust-2018/extern-crate-submod.rs
@@ -5,7 +5,6 @@
// us to rewrite paths. We don't (and we leave the `extern crate` in
// place).
-#![feature(rust_2018_preview)]
#![deny(absolute_paths_not_starting_with_crate)]
mod m {
diff --git a/tests/ui/rust-2018/extern-crate-submod.stderr b/tests/ui/rust-2018/extern-crate-submod.stderr
index 1a9aa7578..0d45d32d5 100644
--- a/tests/ui/rust-2018/extern-crate-submod.stderr
+++ b/tests/ui/rust-2018/extern-crate-submod.stderr
@@ -1,5 +1,5 @@
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/extern-crate-submod.rs:19:5
+ --> $DIR/extern-crate-submod.rs:18:5
|
LL | use m::edition_lint_paths::foo;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::m::edition_lint_paths::foo`
@@ -7,10 +7,10 @@ LL | use m::edition_lint_paths::foo;
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
note: the lint level is defined here
- --> $DIR/extern-crate-submod.rs:9:9
+ --> $DIR/extern-crate-submod.rs:8:9
|
LL | #![deny(absolute_paths_not_starting_with_crate)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rust-2018/issue-51008-1.rs b/tests/ui/rust-2018/issue-51008-1.rs
index 8ae5e8278..da7b8ef65 100644
--- a/tests/ui/rust-2018/issue-51008-1.rs
+++ b/tests/ui/rust-2018/issue-51008-1.rs
@@ -4,8 +4,6 @@
//
// run-pass
-#![feature(rust_2018_preview)]
-
trait A {
}
diff --git a/tests/ui/rust-2018/issue-51008.rs b/tests/ui/rust-2018/issue-51008.rs
index b62609e32..56517b9ad 100644
--- a/tests/ui/rust-2018/issue-51008.rs
+++ b/tests/ui/rust-2018/issue-51008.rs
@@ -4,8 +4,6 @@
//
// run-pass
-#![feature(rust_2018_preview)]
-
trait A {
}
diff --git a/tests/ui/rust-2018/issue-52202-use-suggestions.stderr b/tests/ui/rust-2018/issue-52202-use-suggestions.stderr
index 9933b9243..49736205f 100644
--- a/tests/ui/rust-2018/issue-52202-use-suggestions.stderr
+++ b/tests/ui/rust-2018/issue-52202-use-suggestions.stderr
@@ -16,6 +16,6 @@ LL + use std::collections::hash_set::Drain;
|
and 3 other candidates
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0422`.
diff --git a/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr b/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr
index 2ef97e7f2..801d16af8 100644
--- a/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr
+++ b/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr
@@ -14,5 +14,5 @@ LL | #![deny(rust_2018_idioms)]
| ^^^^^^^^^^^^^^^^
= note: `#[deny(unused_extern_crates)]` implied by `#[deny(rust_2018_idioms)]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rust-2018/local-path-suggestions-2015.stderr b/tests/ui/rust-2018/local-path-suggestions-2015.stderr
index 666864a18..e726b1e3e 100644
--- a/tests/ui/rust-2018/local-path-suggestions-2015.stderr
+++ b/tests/ui/rust-2018/local-path-suggestions-2015.stderr
@@ -7,6 +7,6 @@ LL | use foobar::Baz;
| unresolved import
| help: a similar path exists: `aux_baz::foobar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/rust-2018/proc-macro-crate-in-paths.rs b/tests/ui/rust-2018/proc-macro-crate-in-paths.rs
index 2d4cb6514..37e00a393 100644
--- a/tests/ui/rust-2018/proc-macro-crate-in-paths.rs
+++ b/tests/ui/rust-2018/proc-macro-crate-in-paths.rs
@@ -4,7 +4,6 @@
#![crate_type = "proc-macro"]
#![deny(rust_2018_compatibility)]
-#![feature(rust_2018_preview)]
extern crate proc_macro;
diff --git a/tests/ui/rust-2018/suggestions-not-always-applicable.fixed b/tests/ui/rust-2018/suggestions-not-always-applicable.fixed
index f5afbad9f..d9e39a3b7 100644
--- a/tests/ui/rust-2018/suggestions-not-always-applicable.fixed
+++ b/tests/ui/rust-2018/suggestions-not-always-applicable.fixed
@@ -4,7 +4,6 @@
// rustfix-only-machine-applicable
// check-pass
-#![feature(rust_2018_preview)]
#![warn(rust_2018_compatibility)]
extern crate suggestions_not_always_applicable as foo;
diff --git a/tests/ui/rust-2018/suggestions-not-always-applicable.rs b/tests/ui/rust-2018/suggestions-not-always-applicable.rs
index f5afbad9f..d9e39a3b7 100644
--- a/tests/ui/rust-2018/suggestions-not-always-applicable.rs
+++ b/tests/ui/rust-2018/suggestions-not-always-applicable.rs
@@ -4,7 +4,6 @@
// rustfix-only-machine-applicable
// check-pass
-#![feature(rust_2018_preview)]
#![warn(rust_2018_compatibility)]
extern crate suggestions_not_always_applicable as foo;
diff --git a/tests/ui/rust-2018/uniform-paths/ambiguity-macros-nested.stderr b/tests/ui/rust-2018/uniform-paths/ambiguity-macros-nested.stderr
index a5c79366b..f2536c1a1 100644
--- a/tests/ui/rust-2018/uniform-paths/ambiguity-macros-nested.stderr
+++ b/tests/ui/rust-2018/uniform-paths/ambiguity-macros-nested.stderr
@@ -20,6 +20,6 @@ LL | m!();
= help: use `self::std` to refer to this module unambiguously
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0659`.
diff --git a/tests/ui/rust-2018/uniform-paths/ambiguity-macros.stderr b/tests/ui/rust-2018/uniform-paths/ambiguity-macros.stderr
index 8045f3a45..3400183df 100644
--- a/tests/ui/rust-2018/uniform-paths/ambiguity-macros.stderr
+++ b/tests/ui/rust-2018/uniform-paths/ambiguity-macros.stderr
@@ -20,6 +20,6 @@ LL | m!();
= help: use `crate::std` to refer to this module unambiguously
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0659`.
diff --git a/tests/ui/rust-2018/uniform-paths/issue-54253.stderr b/tests/ui/rust-2018/uniform-paths/issue-54253.stderr
index adde63590..7a1c55a8b 100644
--- a/tests/ui/rust-2018/uniform-paths/issue-54253.stderr
+++ b/tests/ui/rust-2018/uniform-paths/issue-54253.stderr
@@ -4,6 +4,6 @@ error[E0432]: unresolved import `crate::version`
LL | use crate::version;
| ^^^^^^^^^^^^^^ no `version` in the root
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/rust-2018/uniform-paths/issue-56596.stderr b/tests/ui/rust-2018/uniform-paths/issue-56596.stderr
index 849d6275e..363d7a7a2 100644
--- a/tests/ui/rust-2018/uniform-paths/issue-56596.stderr
+++ b/tests/ui/rust-2018/uniform-paths/issue-56596.stderr
@@ -15,6 +15,6 @@ LL | use m::*;
= help: consider adding an explicit import of `issue_56596` to disambiguate
= help: or use `crate::issue_56596` to refer to this module unambiguously
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0659`.
diff --git a/tests/ui/rust-2018/uniform-paths/issue-87932.stderr b/tests/ui/rust-2018/uniform-paths/issue-87932.stderr
index ac2baa359..4a874a834 100644
--- a/tests/ui/rust-2018/uniform-paths/issue-87932.stderr
+++ b/tests/ui/rust-2018/uniform-paths/issue-87932.stderr
@@ -13,6 +13,6 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f
LL + use <crate::A as issue_87932_a::Deserialize>::deserialize::_a::Deserialize;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/rust-2018/uniform-paths/macro-rules.stderr b/tests/ui/rust-2018/uniform-paths/macro-rules.stderr
index 8a978c98a..661d667eb 100644
--- a/tests/ui/rust-2018/uniform-paths/macro-rules.stderr
+++ b/tests/ui/rust-2018/uniform-paths/macro-rules.stderr
@@ -10,6 +10,6 @@ help: consider adding a `#[macro_export]` to the macro in the imported module
LL | macro_rules! legacy_macro { () => () }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0364`.
diff --git a/tests/ui/rust-2018/uniform-paths/prelude-fail.stderr b/tests/ui/rust-2018/uniform-paths/prelude-fail.stderr
index 97d4c7367..a0d272dc6 100644
--- a/tests/ui/rust-2018/uniform-paths/prelude-fail.stderr
+++ b/tests/ui/rust-2018/uniform-paths/prelude-fail.stderr
@@ -4,6 +4,6 @@ error[E0432]: unresolved import `rustfmt`
LL | use rustfmt::skip as imported_rustfmt_skip;
| ^^^^^^^ `rustfmt` is a tool module, not a module
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/rust-2018/unresolved-asterisk-imports.stderr b/tests/ui/rust-2018/unresolved-asterisk-imports.stderr
index 09e9edc63..b6bf10982 100644
--- a/tests/ui/rust-2018/unresolved-asterisk-imports.stderr
+++ b/tests/ui/rust-2018/unresolved-asterisk-imports.stderr
@@ -4,6 +4,6 @@ error[E0432]: unresolved import `not_existing_crate`
LL | use not_existing_crate::*;
| ^^^^^^^^^^^^^^^^^^ use of undeclared crate or module `not_existing_crate`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/rust-2021/future-prelude-collision-shadow.stderr b/tests/ui/rust-2021/future-prelude-collision-shadow.stderr
index 9dfaf13e2..d2b2e5b2f 100644
--- a/tests/ui/rust-2021/future-prelude-collision-shadow.stderr
+++ b/tests/ui/rust-2021/future-prelude-collision-shadow.stderr
@@ -13,6 +13,6 @@ LL + use crate::m::TryIntoU32;
LL + use std::convert::TryInto;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/rustc-error.stderr b/tests/ui/rustc-error.stderr
index de27e9b8f..67451195b 100644
--- a/tests/ui/rustc-error.stderr
+++ b/tests/ui/rustc-error.stderr
@@ -4,5 +4,5 @@ error: fatal error triggered by #[rustc_error]
LL | fn main() {
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rustdoc/cfg-rustdoc.stderr b/tests/ui/rustdoc/cfg-rustdoc.stderr
index c687d1869..340a8e224 100644
--- a/tests/ui/rustdoc/cfg-rustdoc.stderr
+++ b/tests/ui/rustdoc/cfg-rustdoc.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `Foo` in this scope
LL | let f = Foo;
| ^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/rustdoc/deny-invalid-doc-attrs.stderr b/tests/ui/rustdoc/deny-invalid-doc-attrs.stderr
index e9a4c1dd5..bf104f48b 100644
--- a/tests/ui/rustdoc/deny-invalid-doc-attrs.stderr
+++ b/tests/ui/rustdoc/deny-invalid-doc-attrs.stderr
@@ -12,5 +12,5 @@ note: the lint level is defined here
LL | #![deny(invalid_doc_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rustdoc/doc-alias-same-name.stderr b/tests/ui/rustdoc/doc-alias-same-name.stderr
index 5ba09a2ea..a9da75c01 100644
--- a/tests/ui/rustdoc/doc-alias-same-name.stderr
+++ b/tests/ui/rustdoc/doc-alias-same-name.stderr
@@ -4,5 +4,5 @@ error: `#[doc(alias = "...")]` is the same as the item's name
LL | #[doc(alias = "Foo")]
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rustdoc/doc-inline-extern-crate.stderr b/tests/ui/rustdoc/doc-inline-extern-crate.stderr
index 41518295b..df0c4cb6b 100644
--- a/tests/ui/rustdoc/doc-inline-extern-crate.stderr
+++ b/tests/ui/rustdoc/doc-inline-extern-crate.stderr
@@ -9,5 +9,5 @@ LL | #[doc(no_inline)]
|
= help: remove one of the conflicting attributes
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rustdoc/doc-primitive.stderr b/tests/ui/rustdoc/doc-primitive.stderr
index d61eb3816..5f535206d 100644
--- a/tests/ui/rustdoc/doc-primitive.stderr
+++ b/tests/ui/rustdoc/doc-primitive.stderr
@@ -12,5 +12,5 @@ note: the lint level is defined here
LL | #![deny(invalid_doc_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/rustdoc/feature-gate-doc_primitive.stderr b/tests/ui/rustdoc/feature-gate-doc_primitive.stderr
index 592088067..0f5665f1f 100644
--- a/tests/ui/rustdoc/feature-gate-doc_primitive.stderr
+++ b/tests/ui/rustdoc/feature-gate-doc_primitive.stderr
@@ -6,6 +6,6 @@ LL | #[rustc_doc_primitive = "usize"]
|
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/rustdoc/unterminated-doc-comment.stderr b/tests/ui/rustdoc/unterminated-doc-comment.stderr
index 2d5e53797..2d96c606b 100644
--- a/tests/ui/rustdoc/unterminated-doc-comment.stderr
+++ b/tests/ui/rustdoc/unterminated-doc-comment.stderr
@@ -4,6 +4,6 @@ error[E0758]: unterminated block doc-comment
LL | /*!
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0758`.
diff --git a/tests/ui/sanitize/cfg-kasan.rs b/tests/ui/sanitize/cfg-kasan.rs
index d721011f3..fb9a6f549 100644
--- a/tests/ui/sanitize/cfg-kasan.rs
+++ b/tests/ui/sanitize/cfg-kasan.rs
@@ -8,10 +8,8 @@
//[aarch64] needs-llvm-components: aarch64
//[riscv64imac] compile-flags: --target riscv64imac-unknown-none-elf
//[riscv64imac] needs-llvm-components: riscv
-//[riscv64imac] min-llvm-version: 16
//[riscv64gc] compile-flags: --target riscv64gc-unknown-none-elf
//[riscv64gc] needs-llvm-components: riscv
-//[riscv64gc] min-llvm-version: 16
//[x86_64] compile-flags: --target x86_64-unknown-none
//[x86_64] needs-llvm-components: x86
diff --git a/tests/ui/sanitize/crt-static.stderr b/tests/ui/sanitize/crt-static.stderr
index 9f74235fe..98b0ed82e 100644
--- a/tests/ui/sanitize/crt-static.stderr
+++ b/tests/ui/sanitize/crt-static.stderr
@@ -1,4 +1,4 @@
error: sanitizer is incompatible with statically linked libc, disable it using `-C target-feature=-crt-static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/sanitize/incompatible.stderr b/tests/ui/sanitize/incompatible.stderr
index f86db41ba..4dff813ee 100644
--- a/tests/ui/sanitize/incompatible.stderr
+++ b/tests/ui/sanitize/incompatible.stderr
@@ -1,4 +1,4 @@
error: `-Zsanitizer=address` is incompatible with `-Zsanitizer=memory`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/sanitize/sanitizer-cfi-canonical-jump-tables-require-cfi.stderr b/tests/ui/sanitize/sanitizer-cfi-canonical-jump-tables-require-cfi.stderr
index 3ee95634b..de67d6a6b 100644
--- a/tests/ui/sanitize/sanitizer-cfi-canonical-jump-tables-require-cfi.stderr
+++ b/tests/ui/sanitize/sanitizer-cfi-canonical-jump-tables-require-cfi.stderr
@@ -1,4 +1,4 @@
error: `-Zsanitizer-cfi-canonical-jump-tables` requires `-Zsanitizer=cfi`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-require-cfi.stderr b/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-require-cfi.stderr
index 6eb09a53b..621708de2 100644
--- a/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-require-cfi.stderr
+++ b/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-require-cfi.stderr
@@ -1,4 +1,4 @@
error: `-Zsanitizer-cfi-generalize-pointers` requires `-Zsanitizer=cfi` or `-Zsanitizer=kcfi`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/sanitize/sanitizer-cfi-invalid-attr-cfi-encoding.stderr b/tests/ui/sanitize/sanitizer-cfi-invalid-attr-cfi-encoding.stderr
index e23bafb18..b9e9722da 100644
--- a/tests/ui/sanitize/sanitizer-cfi-invalid-attr-cfi-encoding.stderr
+++ b/tests/ui/sanitize/sanitizer-cfi-invalid-attr-cfi-encoding.stderr
@@ -4,5 +4,5 @@ error: malformed `cfi_encoding` attribute input
LL | #[cfi_encoding]
| ^^^^^^^^^^^^^^^ help: must be of the form: `#[cfi_encoding = "encoding"]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/sanitize/sanitizer-cfi-normalize-integers-require-cfi.stderr b/tests/ui/sanitize/sanitizer-cfi-normalize-integers-require-cfi.stderr
index e31642054..748fb60da 100644
--- a/tests/ui/sanitize/sanitizer-cfi-normalize-integers-require-cfi.stderr
+++ b/tests/ui/sanitize/sanitizer-cfi-normalize-integers-require-cfi.stderr
@@ -1,4 +1,4 @@
error: `-Zsanitizer-cfi-normalize-integers` requires `-Zsanitizer=cfi` or `-Zsanitizer=kcfi`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/sanitize/sanitizer-cfi-requires-lto.stderr b/tests/ui/sanitize/sanitizer-cfi-requires-lto.stderr
index 8cd9c5444..efc0c4313 100644
--- a/tests/ui/sanitize/sanitizer-cfi-requires-lto.stderr
+++ b/tests/ui/sanitize/sanitizer-cfi-requires-lto.stderr
@@ -1,4 +1,4 @@
error: `-Zsanitizer=cfi` requires `-Clto` or `-Clinker-plugin-lto`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/sanitize/sanitizer-cfi-with-rustc-lto-requires-single-codegen-unit.stderr b/tests/ui/sanitize/sanitizer-cfi-with-rustc-lto-requires-single-codegen-unit.stderr
index 136f49360..8d6dc1d8f 100644
--- a/tests/ui/sanitize/sanitizer-cfi-with-rustc-lto-requires-single-codegen-unit.stderr
+++ b/tests/ui/sanitize/sanitizer-cfi-with-rustc-lto-requires-single-codegen-unit.stderr
@@ -1,4 +1,4 @@
error: `-Zsanitizer=cfi` with `-Clto` requires `-Ccodegen-units=1`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/sanitize/split-lto-unit-requires-lto.stderr b/tests/ui/sanitize/split-lto-unit-requires-lto.stderr
index ab8f4f4f3..0da06b7f8 100644
--- a/tests/ui/sanitize/split-lto-unit-requires-lto.stderr
+++ b/tests/ui/sanitize/split-lto-unit-requires-lto.stderr
@@ -1,4 +1,4 @@
error: `-Zsplit-lto-unit` requires `-Clto`, `-Clto=thin`, or `-Clinker-plugin-lto`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/sanitize/unsupported-target.stderr b/tests/ui/sanitize/unsupported-target.stderr
index 9bb840502..bebbf3884 100644
--- a/tests/ui/sanitize/unsupported-target.stderr
+++ b/tests/ui/sanitize/unsupported-target.stderr
@@ -1,4 +1,4 @@
error: leak sanitizer is not supported for this target
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/self/arbitrary-self-from-method-substs.default.stderr b/tests/ui/self/arbitrary-self-from-method-substs.default.stderr
index cbf5e6c54..a415aa3d7 100644
--- a/tests/ui/self/arbitrary-self-from-method-substs.default.stderr
+++ b/tests/ui/self/arbitrary-self-from-method-substs.default.stderr
@@ -8,6 +8,6 @@ LL | fn get<R: Deref<Target = Self>>(self: R) -> u32 {
= help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable
= help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/self/arbitrary-self-from-method-substs.feature.stderr b/tests/ui/self/arbitrary-self-from-method-substs.feature.stderr
index 7378d53c3..44e553f1a 100644
--- a/tests/ui/self/arbitrary-self-from-method-substs.feature.stderr
+++ b/tests/ui/self/arbitrary-self-from-method-substs.feature.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | foo.get::<&Foo>();
| ^^^ expected `&Foo`, found `Foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr b/tests/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr
index 0a567ddcc..363ba072c 100644
--- a/tests/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr
+++ b/tests/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr
@@ -17,6 +17,6 @@ LL | fn foo(self: &Rc<Self>) -> usize;
= help: only type `usize` implements the trait, consider using it directly instead
= note: required for the cast from `Rc<usize>` to `Rc<dyn Foo>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/self/arbitrary_self_types_needing_mut_pin.stderr b/tests/ui/self/arbitrary_self_types_needing_mut_pin.stderr
index 5dcb58611..f33b9ec68 100644
--- a/tests/ui/self/arbitrary_self_types_needing_mut_pin.stderr
+++ b/tests/ui/self/arbitrary_self_types_needing_mut_pin.stderr
@@ -13,6 +13,6 @@ LL ~ let mut pinned = std::pin::pin!(S);
LL ~ pinned.as_mut().x();
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr b/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr
index 944cdc5f5..e04ec8bb3 100644
--- a/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr
+++ b/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr
@@ -12,6 +12,6 @@ help: to declare that `impl Clone` captures `'_`, you can add an explicit `'_` l
LL | async fn f(self: Pin<&Self>) -> impl Clone + '_ { self }
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0700`.
diff --git a/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr b/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr
index 8a9b397ca..a2964881d 100644
--- a/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr
+++ b/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr
@@ -12,6 +12,6 @@ help: to declare that `impl Clone` captures `'_`, you can add an explicit `'_` l
LL | fn f(self: Pin<&Self>) -> impl Clone + '_ { self }
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0700`.
diff --git a/tests/ui/self/elision/nested-item.stderr b/tests/ui/self/elision/nested-item.stderr
index 752fd8233..7bad26fa1 100644
--- a/tests/ui/self/elision/nested-item.stderr
+++ b/tests/ui/self/elision/nested-item.stderr
@@ -21,10 +21,19 @@ LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() {
| ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &'static () {
| +++++++
+help: instead, you are more likely to want to change the argument to be borrowed...
+ |
+LL | fn wrap(self: &Wrap<{ fn bar(&self) {} }>) -> &() {
+ | +
+help: ...or alternatively, you might want to return an owned value
+ |
+LL - fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() {
+LL + fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> () {
+ |
error[E0412]: cannot find type `Wrap` in this scope
--> $DIR/nested-item.rs:5:15
diff --git a/tests/ui/self/issue-61882-2.stderr b/tests/ui/self/issue-61882-2.stderr
index 6faa4477d..7d5214421 100644
--- a/tests/ui/self/issue-61882-2.stderr
+++ b/tests/ui/self/issue-61882-2.stderr
@@ -12,6 +12,6 @@ LL |
LL | }
| - `x` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/self/point-at-arbitrary-self-type-method.stderr b/tests/ui/self/point-at-arbitrary-self-type-method.stderr
index 3c7cccfc9..14bd6ca6b 100644
--- a/tests/ui/self/point-at-arbitrary-self-type-method.stderr
+++ b/tests/ui/self/point-at-arbitrary-self-type-method.stderr
@@ -15,6 +15,6 @@ help: consider wrapping the receiver expression with the appropriate type
LL | Box::new(A).foo();
| +++++++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/self/point-at-arbitrary-self-type-trait-method.stderr b/tests/ui/self/point-at-arbitrary-self-type-trait-method.stderr
index 366c14f76..29510190c 100644
--- a/tests/ui/self/point-at-arbitrary-self-type-trait-method.stderr
+++ b/tests/ui/self/point-at-arbitrary-self-type-trait-method.stderr
@@ -16,6 +16,6 @@ help: consider wrapping the receiver expression with the appropriate type
LL | Box::new(A).foo()
| +++++++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/self/self-vs-path-ambiguity.stderr b/tests/ui/self/self-vs-path-ambiguity.stderr
index 2beef50cd..9e140e210 100644
--- a/tests/ui/self/self-vs-path-ambiguity.stderr
+++ b/tests/ui/self/self-vs-path-ambiguity.stderr
@@ -4,5 +4,5 @@ error: unexpected lifetime `'a` in pattern
LL | fn i(&'a self::S: &S) {}
| ^^ help: remove the lifetime
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/self/self_type_keyword.stderr b/tests/ui/self/self_type_keyword.stderr
index 6e65fae80..fed853a7e 100644
--- a/tests/ui/self/self_type_keyword.stderr
+++ b/tests/ui/self/self_type_keyword.stderr
@@ -14,7 +14,7 @@ error: `mut` must be followed by a named binding
--> $DIR/self_type_keyword.rs:16:9
|
LL | mut Self => (),
- | ^^^^^^^^ help: remove the `mut` prefix: `Self`
+ | ^^^^ help: remove the `mut` prefix
|
= note: `mut` may be followed by `variable` and `variable @ pattern`
diff --git a/tests/ui/sepcomp/sepcomp-lib-lto.rs b/tests/ui/sepcomp/sepcomp-lib-lto.rs
index 51a572899..164ae79c2 100644
--- a/tests/ui/sepcomp/sepcomp-lib-lto.rs
+++ b/tests/ui/sepcomp/sepcomp-lib-lto.rs
@@ -4,7 +4,6 @@
// aux-build:sepcomp_lib.rs
// compile-flags: -C lto -g
-// ignore-asmjs wasm2js does not support source maps yet
// no-prefer-dynamic
extern crate sepcomp_lib;
diff --git a/tests/ui/shadowed/shadowed-trait-methods.stderr b/tests/ui/shadowed/shadowed-trait-methods.stderr
index 1af0400c8..0bcf32790 100644
--- a/tests/ui/shadowed/shadowed-trait-methods.stderr
+++ b/tests/ui/shadowed/shadowed-trait-methods.stderr
@@ -13,6 +13,6 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f
LL + use foo::T;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/simd/libm_no_std_cant_float.rs b/tests/ui/simd/libm_no_std_cant_float.rs
index 50ac8e208..f54a1faf4 100644
--- a/tests/ui/simd/libm_no_std_cant_float.rs
+++ b/tests/ui/simd/libm_no_std_cant_float.rs
@@ -2,7 +2,7 @@
#![no_std]
#![feature(portable_simd)]
use core::simd::f32x4;
-use core::simd::SimdFloat;
+use core::simd::num::SimdFloat;
// For SIMD float ops, the LLIR version which is used to implement the portable
// forms of them may become calls to math.h AKA libm. So, we can't guarantee
diff --git a/tests/ui/simd/libm_std_can_float.rs b/tests/ui/simd/libm_std_can_float.rs
index 1c520856e..78bd0c140 100644
--- a/tests/ui/simd/libm_std_can_float.rs
+++ b/tests/ui/simd/libm_std_can_float.rs
@@ -3,7 +3,7 @@
// This is the converse of the other libm test.
#![feature(portable_simd)]
use std::simd::f32x4;
-use std::simd::{SimdFloat, StdFloat};
+use std::simd::{num::SimdFloat, StdFloat};
// For SIMD float ops, the LLIR version which is used to implement the portable
// forms of them may become calls to math.h AKA libm. So, we can't guarantee
diff --git a/tests/ui/simd/masked-load-store-build-fail.rs b/tests/ui/simd/masked-load-store-build-fail.rs
new file mode 100644
index 000000000..9b79b3bd6
--- /dev/null
+++ b/tests/ui/simd/masked-load-store-build-fail.rs
@@ -0,0 +1,74 @@
+// build-fail
+#![feature(repr_simd, platform_intrinsics)]
+
+extern "platform-intrinsic" {
+ fn simd_masked_load<M, P, T>(mask: M, pointer: P, values: T) -> T;
+ fn simd_masked_store<M, P, T>(mask: M, pointer: P, values: T) -> ();
+}
+
+#[derive(Copy, Clone)]
+#[repr(simd)]
+struct Simd<T, const N: usize>([T; N]);
+
+fn main() {
+ unsafe {
+ let mut arr = [4u8, 5, 6, 7];
+ let default = Simd::<u8, 4>([9; 4]);
+
+ simd_masked_load(
+ Simd::<i8, 8>([-1, 0, -1, -1, 0, 0, 0, 0]),
+ arr.as_ptr(),
+ default
+ );
+ //~^^^^^ ERROR expected third argument with length 8 (same as input type `Simd<i8, 8>`), found `Simd<u8, 4>` with length 4
+
+ simd_masked_load(
+ Simd::<i8, 4>([-1, 0, -1, -1]),
+ arr.as_ptr() as *const i8,
+ default
+ );
+ //~^^^^^ ERROR expected element type `u8` of second argument `*const i8` to be a pointer to the element type `u8` of the first argument `Simd<u8, 4>`, found `u8` != `*_ u8`
+
+ simd_masked_load(
+ Simd::<i8, 4>([-1, 0, -1, -1]),
+ arr.as_ptr(),
+ Simd::<u32, 4>([9; 4])
+ );
+ //~^^^^^ ERROR expected element type `u32` of second argument `*const u8` to be a pointer to the element type `u32` of the first argument `Simd<u32, 4>`, found `u32` != `*_ u32`
+
+ simd_masked_load(
+ Simd::<u8, 4>([1, 0, 1, 1]),
+ arr.as_ptr(),
+ default
+ );
+ //~^^^^^ ERROR expected element type `u8` of third argument `Simd<u8, 4>` to be a signed integer type
+
+ simd_masked_store(
+ Simd([-1i8; 4]),
+ arr.as_ptr(),
+ Simd([5u32; 4])
+ );
+ //~^^^^^ ERROR expected element type `u32` of second argument `*const u8` to be a pointer to the element type `u32` of the first argument `Simd<u32, 4>`, found `u32` != `*mut u32`
+
+ simd_masked_store(
+ Simd([-1i8; 4]),
+ arr.as_ptr(),
+ Simd([5u8; 4])
+ );
+ //~^^^^^ ERROR expected element type `u8` of second argument `*const u8` to be a pointer to the element type `u8` of the first argument `Simd<u8, 4>`, found `u8` != `*mut u8`
+
+ simd_masked_store(
+ Simd([-1i8; 4]),
+ arr.as_mut_ptr(),
+ Simd([5u8; 2])
+ );
+ //~^^^^^ ERROR expected third argument with length 4 (same as input type `Simd<i8, 4>`), found `Simd<u8, 2>` with length 2
+
+ simd_masked_store(
+ Simd([1u32; 4]),
+ arr.as_mut_ptr(),
+ Simd([5u8; 4])
+ );
+ //~^^^^^ ERROR expected element type `u8` of third argument `Simd<u32, 4>` to be a signed integer type
+ }
+}
diff --git a/tests/ui/simd/masked-load-store-build-fail.stderr b/tests/ui/simd/masked-load-store-build-fail.stderr
new file mode 100644
index 000000000..59af83fe0
--- /dev/null
+++ b/tests/ui/simd/masked-load-store-build-fail.stderr
@@ -0,0 +1,83 @@
+error[E0511]: invalid monomorphization of `simd_masked_load` intrinsic: expected third argument with length 8 (same as input type `Simd<i8, 8>`), found `Simd<u8, 4>` with length 4
+ --> $DIR/masked-load-store-build-fail.rs:18:9
+ |
+LL | / simd_masked_load(
+LL | | Simd::<i8, 8>([-1, 0, -1, -1, 0, 0, 0, 0]),
+LL | | arr.as_ptr(),
+LL | | default
+LL | | );
+ | |_________^
+
+error[E0511]: invalid monomorphization of `simd_masked_load` intrinsic: expected element type `u8` of second argument `*const i8` to be a pointer to the element type `u8` of the first argument `Simd<u8, 4>`, found `u8` != `*_ u8`
+ --> $DIR/masked-load-store-build-fail.rs:25:9
+ |
+LL | / simd_masked_load(
+LL | | Simd::<i8, 4>([-1, 0, -1, -1]),
+LL | | arr.as_ptr() as *const i8,
+LL | | default
+LL | | );
+ | |_________^
+
+error[E0511]: invalid monomorphization of `simd_masked_load` intrinsic: expected element type `u32` of second argument `*const u8` to be a pointer to the element type `u32` of the first argument `Simd<u32, 4>`, found `u32` != `*_ u32`
+ --> $DIR/masked-load-store-build-fail.rs:32:9
+ |
+LL | / simd_masked_load(
+LL | | Simd::<i8, 4>([-1, 0, -1, -1]),
+LL | | arr.as_ptr(),
+LL | | Simd::<u32, 4>([9; 4])
+LL | | );
+ | |_________^
+
+error[E0511]: invalid monomorphization of `simd_masked_load` intrinsic: expected element type `u8` of third argument `Simd<u8, 4>` to be a signed integer type
+ --> $DIR/masked-load-store-build-fail.rs:39:9
+ |
+LL | / simd_masked_load(
+LL | | Simd::<u8, 4>([1, 0, 1, 1]),
+LL | | arr.as_ptr(),
+LL | | default
+LL | | );
+ | |_________^
+
+error[E0511]: invalid monomorphization of `simd_masked_store` intrinsic: expected element type `u32` of second argument `*const u8` to be a pointer to the element type `u32` of the first argument `Simd<u32, 4>`, found `u32` != `*mut u32`
+ --> $DIR/masked-load-store-build-fail.rs:46:9
+ |
+LL | / simd_masked_store(
+LL | | Simd([-1i8; 4]),
+LL | | arr.as_ptr(),
+LL | | Simd([5u32; 4])
+LL | | );
+ | |_________^
+
+error[E0511]: invalid monomorphization of `simd_masked_store` intrinsic: expected element type `u8` of second argument `*const u8` to be a pointer to the element type `u8` of the first argument `Simd<u8, 4>`, found `u8` != `*mut u8`
+ --> $DIR/masked-load-store-build-fail.rs:53:9
+ |
+LL | / simd_masked_store(
+LL | | Simd([-1i8; 4]),
+LL | | arr.as_ptr(),
+LL | | Simd([5u8; 4])
+LL | | );
+ | |_________^
+
+error[E0511]: invalid monomorphization of `simd_masked_store` intrinsic: expected third argument with length 4 (same as input type `Simd<i8, 4>`), found `Simd<u8, 2>` with length 2
+ --> $DIR/masked-load-store-build-fail.rs:60:9
+ |
+LL | / simd_masked_store(
+LL | | Simd([-1i8; 4]),
+LL | | arr.as_mut_ptr(),
+LL | | Simd([5u8; 2])
+LL | | );
+ | |_________^
+
+error[E0511]: invalid monomorphization of `simd_masked_store` intrinsic: expected element type `u8` of third argument `Simd<u32, 4>` to be a signed integer type
+ --> $DIR/masked-load-store-build-fail.rs:67:9
+ |
+LL | / simd_masked_store(
+LL | | Simd([1u32; 4]),
+LL | | arr.as_mut_ptr(),
+LL | | Simd([5u8; 4])
+LL | | );
+ | |_________^
+
+error: aborting due to 8 previous errors
+
+For more information about this error, try `rustc --explain E0511`.
diff --git a/tests/ui/simd/masked-load-store-check-fail.rs b/tests/ui/simd/masked-load-store-check-fail.rs
new file mode 100644
index 000000000..d4b35e211
--- /dev/null
+++ b/tests/ui/simd/masked-load-store-check-fail.rs
@@ -0,0 +1,32 @@
+// check-fail
+#![feature(repr_simd, platform_intrinsics)]
+
+extern "platform-intrinsic" {
+ fn simd_masked_load<M, P, T>(mask: M, pointer: P, values: T) -> T;
+ fn simd_masked_store<M, P, T>(mask: M, pointer: P, values: T) -> ();
+}
+
+#[derive(Copy, Clone)]
+#[repr(simd)]
+struct Simd<T, const N: usize>([T; N]);
+
+fn main() {
+ unsafe {
+ let mut arr = [4u8, 5, 6, 7];
+ let default = Simd::<u8, 4>([9; 4]);
+
+ let _x: Simd<u8, 2> = simd_masked_load(
+ Simd::<i8, 4>([-1, 0, -1, -1]),
+ arr.as_ptr(),
+ Simd::<u8, 4>([9; 4])
+ );
+ //~^^ ERROR mismatched types
+
+ let _x: Simd<u32, 4> = simd_masked_load(
+ Simd::<u8, 4>([1, 0, 1, 1]),
+ arr.as_ptr(),
+ default
+ );
+ //~^^ ERROR mismatched types
+ }
+}
diff --git a/tests/ui/simd/masked-load-store-check-fail.stderr b/tests/ui/simd/masked-load-store-check-fail.stderr
new file mode 100644
index 000000000..5d205d607
--- /dev/null
+++ b/tests/ui/simd/masked-load-store-check-fail.stderr
@@ -0,0 +1,59 @@
+error[E0308]: mismatched types
+ --> $DIR/masked-load-store-check-fail.rs:21:13
+ |
+LL | let _x: Simd<u8, 2> = simd_masked_load(
+ | ---------------- arguments to this function are incorrect
+...
+LL | Simd::<u8, 4>([9; 4])
+ | ^^^^^^^^^^^^^^^^^^^^^ expected `2`, found `4`
+ |
+ = note: expected struct `Simd<_, 2>`
+ found struct `Simd<_, 4>`
+help: the return type of this call is `Simd<u8, 4>` due to the type of the argument passed
+ --> $DIR/masked-load-store-check-fail.rs:18:31
+ |
+LL | let _x: Simd<u8, 2> = simd_masked_load(
+ | _______________________________^
+LL | | Simd::<i8, 4>([-1, 0, -1, -1]),
+LL | | arr.as_ptr(),
+LL | | Simd::<u8, 4>([9; 4])
+ | | --------------------- this argument influences the return type of `simd_masked_load`
+LL | | );
+ | |_________^
+note: function defined here
+ --> $DIR/masked-load-store-check-fail.rs:5:8
+ |
+LL | fn simd_masked_load<M, P, T>(mask: M, pointer: P, values: T) -> T;
+ | ^^^^^^^^^^^^^^^^
+
+error[E0308]: mismatched types
+ --> $DIR/masked-load-store-check-fail.rs:28:13
+ |
+LL | let _x: Simd<u32, 4> = simd_masked_load(
+ | ---------------- arguments to this function are incorrect
+...
+LL | default
+ | ^^^^^^^ expected `Simd<u32, 4>`, found `Simd<u8, 4>`
+ |
+ = note: expected struct `Simd<u32, _>`
+ found struct `Simd<u8, _>`
+help: the return type of this call is `Simd<u8, 4>` due to the type of the argument passed
+ --> $DIR/masked-load-store-check-fail.rs:25:32
+ |
+LL | let _x: Simd<u32, 4> = simd_masked_load(
+ | ________________________________^
+LL | | Simd::<u8, 4>([1, 0, 1, 1]),
+LL | | arr.as_ptr(),
+LL | | default
+ | | ------- this argument influences the return type of `simd_masked_load`
+LL | | );
+ | |_________^
+note: function defined here
+ --> $DIR/masked-load-store-check-fail.rs:5:8
+ |
+LL | fn simd_masked_load<M, P, T>(mask: M, pointer: P, values: T) -> T;
+ | ^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/simd/masked-load-store.rs b/tests/ui/simd/masked-load-store.rs
new file mode 100644
index 000000000..74ee652ec
--- /dev/null
+++ b/tests/ui/simd/masked-load-store.rs
@@ -0,0 +1,33 @@
+// run-pass
+#![feature(repr_simd, platform_intrinsics)]
+
+extern "platform-intrinsic" {
+ fn simd_masked_load<M, P, T>(mask: M, pointer: P, values: T) -> T;
+ fn simd_masked_store<M, P, T>(mask: M, pointer: P, values: T) -> ();
+}
+
+#[derive(Copy, Clone)]
+#[repr(simd)]
+struct Simd<T, const N: usize>([T; N]);
+
+fn main() {
+ unsafe {
+ let a = Simd::<u8, 4>([0, 1, 2, 3]);
+ let b_src = [4u8, 5, 6, 7];
+ let b_default = Simd::<u8, 4>([9; 4]);
+ let b: Simd::<u8, 4> = simd_masked_load(
+ Simd::<i8, 4>([-1, 0, -1, -1]),
+ b_src.as_ptr(),
+ b_default
+ );
+
+ assert_eq!(&b.0, &[4, 9, 6, 7]);
+
+ let mut output = [u8::MAX; 5];
+
+ simd_masked_store(Simd::<i8, 4>([-1, -1, -1, 0]), output.as_mut_ptr(), a);
+ assert_eq!(&output, &[0, 1, 2, u8::MAX, u8::MAX]);
+ simd_masked_store(Simd::<i8, 4>([0, -1, -1, 0]), output[1..].as_mut_ptr(), b);
+ assert_eq!(&output, &[0, 1, 9, 6, u8::MAX]);
+ }
+}
diff --git a/tests/ui/simd/monomorphize-heterogeneous.stderr b/tests/ui/simd/monomorphize-heterogeneous.stderr
index e7b41cd78..58e2b7c83 100644
--- a/tests/ui/simd/monomorphize-heterogeneous.stderr
+++ b/tests/ui/simd/monomorphize-heterogeneous.stderr
@@ -4,6 +4,6 @@ error[E0076]: SIMD vector should be homogeneous
LL | struct I64F64(i64, f64);
| ^^^^^^^^^^^^^ SIMD elements must have the same type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0076`.
diff --git a/tests/ui/simd/monomorphize-shuffle-index.generic.stderr b/tests/ui/simd/monomorphize-shuffle-index.generic.stderr
index fc66b1956..c4cfca7be 100644
--- a/tests/ui/simd/monomorphize-shuffle-index.generic.stderr
+++ b/tests/ui/simd/monomorphize-shuffle-index.generic.stderr
@@ -8,5 +8,5 @@ LL | return simd_shuffle_generic::<_, _, { &Self::I }>(a, b);
|
= help: consider moving this anonymous constant into a `const` function
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/simd/portable-intrinsics-arent-exposed.stderr b/tests/ui/simd/portable-intrinsics-arent-exposed.stderr
index f8b3e6d65..a6f27af42 100644
--- a/tests/ui/simd/portable-intrinsics-arent-exposed.stderr
+++ b/tests/ui/simd/portable-intrinsics-arent-exposed.stderr
@@ -2,9 +2,10 @@ error[E0433]: failed to resolve: maybe a missing crate `core`?
--> $DIR/portable-intrinsics-arent-exposed.rs:4:5
|
LL | use core::simd::intrinsics;
- | ^^^^ maybe a missing crate `core`?
- |
- = help: consider adding `extern crate core` to use the `core` crate
+ | ^^^^
+ | |
+ | maybe a missing crate `core`?
+ | help: try using `std` instead of `core`: `std`
error[E0432]: unresolved import `std::simd::intrinsics`
--> $DIR/portable-intrinsics-arent-exposed.rs:5:5
diff --git a/tests/ui/simd/repr_packed.rs b/tests/ui/simd/repr_packed.rs
new file mode 100644
index 000000000..df2d59a58
--- /dev/null
+++ b/tests/ui/simd/repr_packed.rs
@@ -0,0 +1,59 @@
+// run-pass
+
+#![feature(repr_simd, platform_intrinsics)]
+#![allow(non_camel_case_types)]
+
+#[repr(simd, packed)]
+struct Simd<T, const N: usize>([T; N]);
+
+#[repr(simd)]
+struct FullSimd<T, const N: usize>([T; N]);
+
+fn check_size_align<T, const N: usize>() {
+ use std::mem;
+ assert_eq!(mem::size_of::<Simd<T, N>>(), mem::size_of::<[T; N]>());
+ assert_eq!(mem::size_of::<Simd<T, N>>() % mem::align_of::<Simd<T, N>>(), 0);
+}
+
+fn check_ty<T>() {
+ check_size_align::<T, 1>();
+ check_size_align::<T, 2>();
+ check_size_align::<T, 3>();
+ check_size_align::<T, 4>();
+ check_size_align::<T, 8>();
+ check_size_align::<T, 9>();
+ check_size_align::<T, 15>();
+}
+
+extern "platform-intrinsic" {
+ fn simd_add<T>(a: T, b: T) -> T;
+}
+
+fn main() {
+ check_ty::<u8>();
+ check_ty::<i16>();
+ check_ty::<u32>();
+ check_ty::<i64>();
+ check_ty::<usize>();
+ check_ty::<f32>();
+ check_ty::<f64>();
+
+ unsafe {
+ // powers-of-two have no padding and work as usual
+ let x: Simd<f64, 4> =
+ simd_add(Simd::<f64, 4>([0., 1., 2., 3.]), Simd::<f64, 4>([2., 2., 2., 2.]));
+ assert_eq!(std::mem::transmute::<_, [f64; 4]>(x), [2., 3., 4., 5.]);
+
+ // non-powers-of-two have padding and need to be expanded to full vectors
+ fn load<T, const N: usize>(v: Simd<T, N>) -> FullSimd<T, N> {
+ unsafe {
+ let mut tmp = core::mem::MaybeUninit::<FullSimd<T, N>>::uninit();
+ std::ptr::copy_nonoverlapping(&v as *const _, tmp.as_mut_ptr().cast(), 1);
+ tmp.assume_init()
+ }
+ }
+ let x: FullSimd<f64, 3> =
+ simd_add(load(Simd::<f64, 3>([0., 1., 2.])), load(Simd::<f64, 3>([2., 2., 2.])));
+ assert_eq!(x.0, [2., 3., 4.]);
+ }
+}
diff --git a/tests/ui/simd/type-generic-monomorphisation-empty.stderr b/tests/ui/simd/type-generic-monomorphisation-empty.stderr
index b334b1f4b..fc294607a 100644
--- a/tests/ui/simd/type-generic-monomorphisation-empty.stderr
+++ b/tests/ui/simd/type-generic-monomorphisation-empty.stderr
@@ -1,4 +1,4 @@
error: monomorphising SIMD type `Simd<0>` of zero length
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/simd/type-generic-monomorphisation-non-primitive.stderr b/tests/ui/simd/type-generic-monomorphisation-non-primitive.stderr
index 9e8f06b82..249a14098 100644
--- a/tests/ui/simd/type-generic-monomorphisation-non-primitive.stderr
+++ b/tests/ui/simd/type-generic-monomorphisation-non-primitive.stderr
@@ -1,4 +1,4 @@
error: monomorphising SIMD type `S<E>` with a non-primitive-scalar (integer/float/pointer) element type `E`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/simd/type-generic-monomorphisation-oversized.stderr b/tests/ui/simd/type-generic-monomorphisation-oversized.stderr
index a2dba1222..39ff36799 100644
--- a/tests/ui/simd/type-generic-monomorphisation-oversized.stderr
+++ b/tests/ui/simd/type-generic-monomorphisation-oversized.stderr
@@ -1,4 +1,4 @@
error: monomorphising SIMD type `Simd<65536>` of length greater than 32768
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/simd/type-generic-monomorphisation-wide-ptr.stderr b/tests/ui/simd/type-generic-monomorphisation-wide-ptr.stderr
index 3888e7a0f..7ac8d7153 100644
--- a/tests/ui/simd/type-generic-monomorphisation-wide-ptr.stderr
+++ b/tests/ui/simd/type-generic-monomorphisation-wide-ptr.stderr
@@ -1,4 +1,4 @@
error: monomorphising SIMD type `S<[*mut [u8]; 4]>` with a non-primitive-scalar (integer/float/pointer) element type `*mut [u8]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/simd/type-generic-monomorphisation.stderr b/tests/ui/simd/type-generic-monomorphisation.stderr
index 7f23893ac..35297e17d 100644
--- a/tests/ui/simd/type-generic-monomorphisation.stderr
+++ b/tests/ui/simd/type-generic-monomorphisation.stderr
@@ -1,4 +1,4 @@
error: monomorphising SIMD type `Simd2<X>` with a non-primitive-scalar (integer/float/pointer) element type `X`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/simd/type-wide-ptr.stderr b/tests/ui/simd/type-wide-ptr.stderr
index 51d3c0050..d2ce0fdd2 100644
--- a/tests/ui/simd/type-wide-ptr.stderr
+++ b/tests/ui/simd/type-wide-ptr.stderr
@@ -1,4 +1,4 @@
error: monomorphising SIMD type `S` with a non-primitive-scalar (integer/float/pointer) element type `*mut [u8]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/single-use-lifetime/one-use-in-inherent-impl-header.stderr b/tests/ui/single-use-lifetime/one-use-in-inherent-impl-header.stderr
index 94129560f..e151269d7 100644
--- a/tests/ui/single-use-lifetime/one-use-in-inherent-impl-header.stderr
+++ b/tests/ui/single-use-lifetime/one-use-in-inherent-impl-header.stderr
@@ -17,5 +17,5 @@ LL - impl<'f> Foo<'f> {
LL + impl Foo<'_> {
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/single-use-lifetime/one-use-in-inherent-method-return.stderr b/tests/ui/single-use-lifetime/one-use-in-inherent-method-return.stderr
index 69578fe2f..bc86e36f3 100644
--- a/tests/ui/single-use-lifetime/one-use-in-inherent-method-return.stderr
+++ b/tests/ui/single-use-lifetime/one-use-in-inherent-method-return.stderr
@@ -17,5 +17,5 @@ LL - impl<'f> Foo<'f> {
LL + impl Foo<'_> {
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/single-use-lifetime/one-use-in-trait-method-argument.stderr b/tests/ui/single-use-lifetime/one-use-in-trait-method-argument.stderr
index 1a6e8310d..0e67180a8 100644
--- a/tests/ui/single-use-lifetime/one-use-in-trait-method-argument.stderr
+++ b/tests/ui/single-use-lifetime/one-use-in-trait-method-argument.stderr
@@ -17,5 +17,5 @@ LL - fn next<'g>(&'g mut self) -> Option<Self::Item> {
LL + fn next(&mut self) -> Option<Self::Item> {
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/single-use-lifetime/two-uses-in-inherent-method-argument-and-return.stderr b/tests/ui/single-use-lifetime/two-uses-in-inherent-method-argument-and-return.stderr
index 4794566ea..4cc46524a 100644
--- a/tests/ui/single-use-lifetime/two-uses-in-inherent-method-argument-and-return.stderr
+++ b/tests/ui/single-use-lifetime/two-uses-in-inherent-method-argument-and-return.stderr
@@ -17,5 +17,5 @@ LL - impl<'f> Foo<'f> {
LL + impl Foo<'_> {
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/single-use-lifetime/zero-uses-in-impl.stderr b/tests/ui/single-use-lifetime/zero-uses-in-impl.stderr
index b6e42d3e7..554a19afb 100644
--- a/tests/ui/single-use-lifetime/zero-uses-in-impl.stderr
+++ b/tests/ui/single-use-lifetime/zero-uses-in-impl.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(unused_lifetimes)]
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/sized-cycle-note.stderr b/tests/ui/sized-cycle-note.stderr
index 06c87b61f..21e54c12f 100644
--- a/tests/ui/sized-cycle-note.stderr
+++ b/tests/ui/sized-cycle-note.stderr
@@ -14,6 +14,6 @@ LL |
LL ~ struct Foo { q: Option<Box<Baz>> }
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/sized/recursive-type-2.stderr b/tests/ui/sized/recursive-type-2.stderr
index 0f72f7414..4e7f40a01 100644
--- a/tests/ui/sized/recursive-type-2.stderr
+++ b/tests/ui/sized/recursive-type-2.stderr
@@ -9,6 +9,6 @@ LL | fn main() {
| ^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/sized/unsized-binding.stderr b/tests/ui/sized/unsized-binding.stderr
index af3066850..7c3276032 100644
--- a/tests/ui/sized/unsized-binding.stderr
+++ b/tests/ui/sized/unsized-binding.stderr
@@ -8,6 +8,6 @@ LL | let x = *"";
= note: all local variables must have a statically known size
= help: unsized locals are gated as an unstable feature
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/span/E0046.stderr b/tests/ui/span/E0046.stderr
index 1323524f2..416873a42 100644
--- a/tests/ui/span/E0046.stderr
+++ b/tests/ui/span/E0046.stderr
@@ -7,6 +7,6 @@ LL | fn foo();
LL | impl Foo for Bar {}
| ^^^^^^^^^^^^^^^^ missing `foo` in implementation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/span/E0072.stderr b/tests/ui/span/E0072.stderr
index 20f2e0df0..c8599b4eb 100644
--- a/tests/ui/span/E0072.stderr
+++ b/tests/ui/span/E0072.stderr
@@ -12,6 +12,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | tail: Option<Box<ListNode>>,
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/span/E0493.stderr b/tests/ui/span/E0493.stderr
index 9db627562..0f2e2d7b3 100644
--- a/tests/ui/span/E0493.stderr
+++ b/tests/ui/span/E0493.stderr
@@ -6,6 +6,6 @@ LL | const F : Foo = (Foo { a : 0 }, Foo { a : 1 }).1;
| |
| the destructor for this type cannot be evaluated in constants
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0493`.
diff --git a/tests/ui/span/E0535.stderr b/tests/ui/span/E0535.stderr
index b1411bc43..9060b687f 100644
--- a/tests/ui/span/E0535.stderr
+++ b/tests/ui/span/E0535.stderr
@@ -6,6 +6,6 @@ LL | #[inline(unknown)]
|
= help: valid inline arguments are `always` and `never`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0535`.
diff --git a/tests/ui/span/E0536.stderr b/tests/ui/span/E0536.stderr
index 820b0d744..b0f652208 100644
--- a/tests/ui/span/E0536.stderr
+++ b/tests/ui/span/E0536.stderr
@@ -4,6 +4,6 @@ error[E0536]: expected 1 cfg-pattern
LL | #[cfg(not())]
| ^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0536`.
diff --git a/tests/ui/span/E0537.stderr b/tests/ui/span/E0537.stderr
index 5478c3fbc..4254d3893 100644
--- a/tests/ui/span/E0537.stderr
+++ b/tests/ui/span/E0537.stderr
@@ -4,6 +4,6 @@ error[E0537]: invalid predicate `unknown`
LL | #[cfg(unknown())]
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0537`.
diff --git a/tests/ui/span/borrowck-call-method-from-mut-aliasable.stderr b/tests/ui/span/borrowck-call-method-from-mut-aliasable.stderr
index 3f033f5e4..39e7279fb 100644
--- a/tests/ui/span/borrowck-call-method-from-mut-aliasable.stderr
+++ b/tests/ui/span/borrowck-call-method-from-mut-aliasable.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be a mutable reference
LL | fn b(x: &mut Foo) {
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/span/borrowck-fn-in-const-b.stderr b/tests/ui/span/borrowck-fn-in-const-b.stderr
index 929878026..d4a8ba269 100644
--- a/tests/ui/span/borrowck-fn-in-const-b.stderr
+++ b/tests/ui/span/borrowck-fn-in-const-b.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be a mutable reference
LL | fn broken(x: &mut Vec<String>) {
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/span/borrowck-ref-into-rvalue.stderr b/tests/ui/span/borrowck-ref-into-rvalue.stderr
index 25e344fed..c0edeeae2 100644
--- a/tests/ui/span/borrowck-ref-into-rvalue.stderr
+++ b/tests/ui/span/borrowck-ref-into-rvalue.stderr
@@ -15,6 +15,6 @@ LL ~ let binding = Some("Hello".to_string());
LL ~ match binding {
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/span/destructor-restrictions.stderr b/tests/ui/span/destructor-restrictions.stderr
index b923cee5f..a80a89fb6 100644
--- a/tests/ui/span/destructor-restrictions.stderr
+++ b/tests/ui/span/destructor-restrictions.stderr
@@ -20,6 +20,6 @@ help: for example, you could save the expression's value in a new local variable
LL | let x = *a.borrow() + 1; x
| +++++++ +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.stderr b/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.stderr
index 1ec8ca427..004a057bb 100644
--- a/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.stderr
+++ b/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.stderr
@@ -4,5 +4,5 @@ error: this file contains an unclosed delimiter
LL | trait C{async fn new(val: T) {}
| - unclosed delimiter ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/span/dropck-object-cycle.stderr b/tests/ui/span/dropck-object-cycle.stderr
index 097fb6219..6e05f901a 100644
--- a/tests/ui/span/dropck-object-cycle.stderr
+++ b/tests/ui/span/dropck-object-cycle.stderr
@@ -12,6 +12,6 @@ LL | }
| `*m` dropped here while still borrowed
| borrow might be used here, when `m` is dropped and runs the destructor for type `Box<dyn Trait<'_>>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/span/gated-features-attr-spans.stderr b/tests/ui/span/gated-features-attr-spans.stderr
index c8b8f346b..5376d7799 100644
--- a/tests/ui/span/gated-features-attr-spans.stderr
+++ b/tests/ui/span/gated-features-attr-spans.stderr
@@ -7,6 +7,6 @@ LL | #[repr(simd)]
= note: see issue #27731 <https://github.com/rust-lang/rust/issues/27731> for more information
= help: add `#![feature(repr_simd)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/span/issue-11925.stderr b/tests/ui/span/issue-11925.stderr
index 1d317fc33..c7f957359 100644
--- a/tests/ui/span/issue-11925.stderr
+++ b/tests/ui/span/issue-11925.stderr
@@ -4,6 +4,6 @@ error[E0515]: cannot return reference to local data `x`
LL | let f = to_fn_once(move|| &x);
| ^^ returns a reference to data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/span/issue-15480.stderr b/tests/ui/span/issue-15480.stderr
index d9cce2254..45a5d7dfb 100644
--- a/tests/ui/span/issue-15480.stderr
+++ b/tests/ui/span/issue-15480.stderr
@@ -16,6 +16,6 @@ LL ~ let v = vec![
LL ~ &binding
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/span/issue-23729.stderr b/tests/ui/span/issue-23729.stderr
index cd854e61f..6baec60d5 100644
--- a/tests/ui/span/issue-23729.stderr
+++ b/tests/ui/span/issue-23729.stderr
@@ -6,6 +6,6 @@ LL | impl Iterator for Recurrence {
|
= help: implement the missing item: `type Item = /* Type */;`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/span/issue-23827.stderr b/tests/ui/span/issue-23827.stderr
index 83a9e8c9b..fe7c7794c 100644
--- a/tests/ui/span/issue-23827.stderr
+++ b/tests/ui/span/issue-23827.stderr
@@ -6,6 +6,6 @@ LL | impl<C: Component> FnOnce<(C,)> for Prototype {
|
= help: implement the missing item: `type Output = /* Type */;`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/span/issue-24356.stderr b/tests/ui/span/issue-24356.stderr
index cf666e8b4..609991f2b 100644
--- a/tests/ui/span/issue-24356.stderr
+++ b/tests/ui/span/issue-24356.stderr
@@ -6,6 +6,6 @@ LL | impl Deref for Thing {
|
= help: implement the missing item: `type Target = /* Type */;`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr b/tests/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr
index c3b6d7580..f7564f8c7 100644
--- a/tests/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr
+++ b/tests/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr
@@ -15,6 +15,6 @@ LL | }
|
= note: values in a scope are dropped in the opposite order they are defined
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/span/issue-24895-copy-clone-dropck.stderr b/tests/ui/span/issue-24895-copy-clone-dropck.stderr
index 83db4d509..2252a241b 100644
--- a/tests/ui/span/issue-24895-copy-clone-dropck.stderr
+++ b/tests/ui/span/issue-24895-copy-clone-dropck.stderr
@@ -14,6 +14,6 @@ LL | }
|
= note: values in a scope are dropped in the opposite order they are defined
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/span/issue-25199.stderr b/tests/ui/span/issue-25199.stderr
index 1e0276f0c..7a6910065 100644
--- a/tests/ui/span/issue-25199.stderr
+++ b/tests/ui/span/issue-25199.stderr
@@ -12,6 +12,6 @@ LL | }
| `container` dropped here while still borrowed
| borrow might be used here, when `container` is dropped and runs the destructor for type `Container<'_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/span/issue-26656.stderr b/tests/ui/span/issue-26656.stderr
index fea6e0012..586eca254 100644
--- a/tests/ui/span/issue-26656.stderr
+++ b/tests/ui/span/issue-26656.stderr
@@ -14,6 +14,6 @@ LL | }
|
= note: values in a scope are dropped in the opposite order they are defined
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/span/issue-27522.stderr b/tests/ui/span/issue-27522.stderr
index 8a254a968..c2de15628 100644
--- a/tests/ui/span/issue-27522.stderr
+++ b/tests/ui/span/issue-27522.stderr
@@ -7,6 +7,6 @@ LL | fn handler(self: &SomeType);
= note: type of `self` must be `Self` or a type that dereferences to it
= help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0307`.
diff --git a/tests/ui/span/issue-29595.stderr b/tests/ui/span/issue-29595.stderr
index 7d603cdbf..c78287546 100644
--- a/tests/ui/span/issue-29595.stderr
+++ b/tests/ui/span/issue-29595.stderr
@@ -10,6 +10,6 @@ help: this trait has no implementations, consider adding one
LL | trait Tr {
| ^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/span/issue-33884.stderr b/tests/ui/span/issue-33884.stderr
index 8cece07cd..29490d86f 100644
--- a/tests/ui/span/issue-33884.stderr
+++ b/tests/ui/span/issue-33884.stderr
@@ -6,6 +6,6 @@ LL | stream.write_fmt(format!("message received"))
|
= note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/span/issue-35987.stderr b/tests/ui/span/issue-35987.stderr
index 88c86d2a9..4c4b100da 100644
--- a/tests/ui/span/issue-35987.stderr
+++ b/tests/ui/span/issue-35987.stderr
@@ -14,6 +14,6 @@ help: consider importing this trait instead
LL + use std::ops::Add;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0404`.
diff --git a/tests/ui/span/issue-36537.stderr b/tests/ui/span/issue-36537.stderr
index 8dfee8d64..eeb4e9a0e 100644
--- a/tests/ui/span/issue-36537.stderr
+++ b/tests/ui/span/issue-36537.stderr
@@ -11,6 +11,6 @@ LL | }
LL | p.use_ref();
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/span/issue-40157.stderr b/tests/ui/span/issue-40157.stderr
index 216876717..7b2ce292c 100644
--- a/tests/ui/span/issue-40157.stderr
+++ b/tests/ui/span/issue-40157.stderr
@@ -7,6 +7,6 @@ LL | {println!("{:?}", match { let foo = vec![1, 2]; foo.get(1) } { x => x }
| | borrowed value does not live long enough
| binding `foo` declared here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/span/issue28498-reject-ex1.stderr b/tests/ui/span/issue28498-reject-ex1.stderr
index 86e2d8c56..7b8af23a6 100644
--- a/tests/ui/span/issue28498-reject-ex1.stderr
+++ b/tests/ui/span/issue28498-reject-ex1.stderr
@@ -12,6 +12,6 @@ LL | }
|
= note: consider using a `let` binding to create a longer lived value
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0713`.
diff --git a/tests/ui/span/issue28498-reject-lifetime-param.stderr b/tests/ui/span/issue28498-reject-lifetime-param.stderr
index 94c450c7b..4b66dc76c 100644
--- a/tests/ui/span/issue28498-reject-lifetime-param.stderr
+++ b/tests/ui/span/issue28498-reject-lifetime-param.stderr
@@ -15,6 +15,6 @@ LL | }
|
= note: values in a scope are dropped in the opposite order they are defined
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/span/issue28498-reject-passed-to-fn.stderr b/tests/ui/span/issue28498-reject-passed-to-fn.stderr
index e133f75d5..fe43657bd 100644
--- a/tests/ui/span/issue28498-reject-passed-to-fn.stderr
+++ b/tests/ui/span/issue28498-reject-passed-to-fn.stderr
@@ -15,6 +15,6 @@ LL | }
|
= note: values in a scope are dropped in the opposite order they are defined
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/span/issue28498-reject-trait-bound.stderr b/tests/ui/span/issue28498-reject-trait-bound.stderr
index 9ab3cdd13..aafa29e5e 100644
--- a/tests/ui/span/issue28498-reject-trait-bound.stderr
+++ b/tests/ui/span/issue28498-reject-trait-bound.stderr
@@ -15,6 +15,6 @@ LL | }
|
= note: values in a scope are dropped in the opposite order they are defined
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/span/move-closure.stderr b/tests/ui/span/move-closure.stderr
index 2127b8202..2e9cef32e 100644
--- a/tests/ui/span/move-closure.stderr
+++ b/tests/ui/span/move-closure.stderr
@@ -13,6 +13,6 @@ help: use parentheses to call this closure
LL | let x: () = (move || ())();
| + +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/span/multiline-span-E0072.stderr b/tests/ui/span/multiline-span-E0072.stderr
index fc2f6e662..9e675d56e 100644
--- a/tests/ui/span/multiline-span-E0072.stderr
+++ b/tests/ui/span/multiline-span-E0072.stderr
@@ -13,6 +13,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | tail: Option<Box<ListNode>>,
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/span/multiline-span-simple.stderr b/tests/ui/span/multiline-span-simple.stderr
index b6052a209..f0eec632a 100644
--- a/tests/ui/span/multiline-span-simple.stderr
+++ b/tests/ui/span/multiline-span-simple.stderr
@@ -11,6 +11,6 @@ LL | foo(1 as u32 +
<&'a u32 as Add<u32>>
<&u32 as Add<&u32>>
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/span/mut-ptr-cant-outlive-ref.stderr b/tests/ui/span/mut-ptr-cant-outlive-ref.stderr
index 395b6ec67..1624b80e7 100644
--- a/tests/ui/span/mut-ptr-cant-outlive-ref.stderr
+++ b/tests/ui/span/mut-ptr-cant-outlive-ref.stderr
@@ -11,6 +11,6 @@ LL |
LL | p.use_ref();
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/span/non-existing-module-import.stderr b/tests/ui/span/non-existing-module-import.stderr
index 25c099590..7da9e32b3 100644
--- a/tests/ui/span/non-existing-module-import.stderr
+++ b/tests/ui/span/non-existing-module-import.stderr
@@ -4,6 +4,6 @@ error[E0432]: unresolved import `std::bar`
LL | use std::bar::{foo1, foo2};
| ^^^ could not find `bar` in `std`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/span/recursive-type-field.stderr b/tests/ui/span/recursive-type-field.stderr
index 10af4c36b..30ba8cde4 100644
--- a/tests/ui/span/recursive-type-field.stderr
+++ b/tests/ui/span/recursive-type-field.stderr
@@ -22,6 +22,6 @@ LL | struct Bar<'a> {
LL ~ y: (Box<Foo<'a>>, Box<Foo<'a>>),
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/span/regionck-unboxed-closure-lifetimes.stderr b/tests/ui/span/regionck-unboxed-closure-lifetimes.stderr
index 9b5ec8461..225f83b6e 100644
--- a/tests/ui/span/regionck-unboxed-closure-lifetimes.stderr
+++ b/tests/ui/span/regionck-unboxed-closure-lifetimes.stderr
@@ -11,6 +11,6 @@ LL | }
LL | f.use_mut();
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/span/regions-close-over-borrowed-ref-in-obj.stderr b/tests/ui/span/regions-close-over-borrowed-ref-in-obj.stderr
index 81e858fa0..b7ca491f2 100644
--- a/tests/ui/span/regions-close-over-borrowed-ref-in-obj.stderr
+++ b/tests/ui/span/regions-close-over-borrowed-ref-in-obj.stderr
@@ -11,6 +11,6 @@ LL | }
|
= note: consider using a `let` binding to create a longer lived value
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/span/regions-close-over-type-parameter-2.stderr b/tests/ui/span/regions-close-over-type-parameter-2.stderr
index fed40a4fd..3849b9eef 100644
--- a/tests/ui/span/regions-close-over-type-parameter-2.stderr
+++ b/tests/ui/span/regions-close-over-type-parameter-2.stderr
@@ -10,6 +10,6 @@ LL | repeater3(tmp1)
LL | };
| - `tmp0` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/span/regions-escape-loop-via-variable.stderr b/tests/ui/span/regions-escape-loop-via-variable.stderr
index e5c7d8b26..e32cc10c0 100644
--- a/tests/ui/span/regions-escape-loop-via-variable.stderr
+++ b/tests/ui/span/regions-escape-loop-via-variable.stderr
@@ -10,6 +10,6 @@ LL | p = &x;
LL | }
| - `x` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/span/regions-infer-borrow-scope-within-loop.stderr b/tests/ui/span/regions-infer-borrow-scope-within-loop.stderr
index 47931db84..746be0456 100644
--- a/tests/ui/span/regions-infer-borrow-scope-within-loop.stderr
+++ b/tests/ui/span/regions-infer-borrow-scope-within-loop.stderr
@@ -12,6 +12,6 @@ LL | }
LL | assert!(*y != 0);
| -- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/span/slice-borrow.stderr b/tests/ui/span/slice-borrow.stderr
index b271c9ae6..48ac20fee 100644
--- a/tests/ui/span/slice-borrow.stderr
+++ b/tests/ui/span/slice-borrow.stderr
@@ -12,6 +12,6 @@ LL | y.use_ref();
= note: consider using a `let` binding to create a longer lived value
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/span/suggestion-non-ascii.stderr b/tests/ui/span/suggestion-non-ascii.stderr
index 21f8bb62a..6e6e31a56 100644
--- a/tests/ui/span/suggestion-non-ascii.stderr
+++ b/tests/ui/span/suggestion-non-ascii.stderr
@@ -4,6 +4,6 @@ error[E0608]: cannot index into a value of type `({integer},)`
LL | println!("☃{}", tup[0]);
| ^^^ help: to access tuple elements, use: `.0`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0608`.
diff --git a/tests/ui/span/transitive-dep-span.stderr b/tests/ui/span/transitive-dep-span.stderr
index 4dc3e5721..c0f3f3a65 100644
--- a/tests/ui/span/transitive-dep-span.stderr
+++ b/tests/ui/span/transitive-dep-span.stderr
@@ -14,5 +14,5 @@ LL | transitive_dep_two::parse_error!();
| in this macro invocation
| in this macro invocation
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/span/type-annotations-needed-expr.stderr b/tests/ui/span/type-annotations-needed-expr.stderr
index 65a90318a..a548df052 100644
--- a/tests/ui/span/type-annotations-needed-expr.stderr
+++ b/tests/ui/span/type-annotations-needed-expr.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic argument
LL | let _ = (vec![1,2,3]).into_iter().sum::<S>() as f64;
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/span/type-binding.stderr b/tests/ui/span/type-binding.stderr
index cb0aefe06..5df74fa2f 100644
--- a/tests/ui/span/type-binding.stderr
+++ b/tests/ui/span/type-binding.stderr
@@ -4,6 +4,6 @@ error[E0220]: associated type `Trget` not found for `Deref`
LL | fn homura<T: Deref<Trget = i32>>(_: T) {}
| ^^^^^ help: there is an associated type with a similar name: `Target`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0220`.
diff --git a/tests/ui/span/wf-method-late-bound-regions.stderr b/tests/ui/span/wf-method-late-bound-regions.stderr
index 64c2d0f16..09d6714e7 100644
--- a/tests/ui/span/wf-method-late-bound-regions.stderr
+++ b/tests/ui/span/wf-method-late-bound-regions.stderr
@@ -10,6 +10,6 @@ LL | f2.xmute(&pointer)
LL | };
| - `pointer` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/specialization/default-associated-type-bound-1.stderr b/tests/ui/specialization/default-associated-type-bound-1.stderr
index e498187c0..516df555a 100644
--- a/tests/ui/specialization/default-associated-type-bound-1.stderr
+++ b/tests/ui/specialization/default-associated-type-bound-1.stderr
@@ -21,6 +21,6 @@ note: required by a bound in `X::U`
LL | type U: Clone;
| ^^^^^ required by this bound in `X::U`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/specialization/default-associated-type-bound-2.stderr b/tests/ui/specialization/default-associated-type-bound-2.stderr
index 4dbe251ed..e02a945d9 100644
--- a/tests/ui/specialization/default-associated-type-bound-2.stderr
+++ b/tests/ui/specialization/default-associated-type-bound-2.stderr
@@ -25,6 +25,6 @@ help: consider introducing a `where` clause, but there might be an alternative b
LL | impl<B: 'static, T> X<B> for T where &'static B: PartialEq<B> {
| ++++++++++++++++++++++++++++++
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/specialization/default-generic-associated-type-bound.stderr b/tests/ui/specialization/default-generic-associated-type-bound.stderr
index c597eed37..afdbe2eb2 100644
--- a/tests/ui/specialization/default-generic-associated-type-bound.stderr
+++ b/tests/ui/specialization/default-generic-associated-type-bound.stderr
@@ -25,6 +25,6 @@ help: consider further restricting this bound
LL | impl<T: 'static + std::cmp::PartialEq> X for T {
| +++++++++++++++++++++
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/specialization/defaultimpl/specialization-feature-gate-default.stderr b/tests/ui/specialization/defaultimpl/specialization-feature-gate-default.stderr
index 64e14f580..18edcad0a 100644
--- a/tests/ui/specialization/defaultimpl/specialization-feature-gate-default.stderr
+++ b/tests/ui/specialization/defaultimpl/specialization-feature-gate-default.stderr
@@ -9,6 +9,6 @@ LL | | }
= note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
= help: add `#![feature(specialization)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/specialization/defaultimpl/specialization-trait-item-not-implemented.stderr b/tests/ui/specialization/defaultimpl/specialization-trait-item-not-implemented.stderr
index f19975060..d3441b0e8 100644
--- a/tests/ui/specialization/defaultimpl/specialization-trait-item-not-implemented.stderr
+++ b/tests/ui/specialization/defaultimpl/specialization-trait-item-not-implemented.stderr
@@ -17,6 +17,6 @@ LL | fn foo_two(&self) -> &'static str;
LL | impl Foo for MyStruct {}
| ^^^^^^^^^^^^^^^^^^^^^ missing `foo_two` in implementation
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr b/tests/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr
index 37788612f..75c91e480 100644
--- a/tests/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr
+++ b/tests/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr
@@ -39,6 +39,6 @@ note: `Foo` defines an item `foo_one`, perhaps you need to implement it
LL | trait Foo {
| ^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/specialization/defaultimpl/specialization-wfcheck.stderr b/tests/ui/specialization/defaultimpl/specialization-wfcheck.stderr
index e78016034..01188e293 100644
--- a/tests/ui/specialization/defaultimpl/specialization-wfcheck.stderr
+++ b/tests/ui/specialization/defaultimpl/specialization-wfcheck.stderr
@@ -24,6 +24,6 @@ help: consider restricting type parameter `U`
LL | default impl<U: std::cmp::Eq> Foo<'static, U> for () {}
| ++++++++++++++
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/specialization/issue-111232.stderr b/tests/ui/specialization/issue-111232.stderr
index 27ee42fc0..ed392e4f9 100644
--- a/tests/ui/specialization/issue-111232.stderr
+++ b/tests/ui/specialization/issue-111232.stderr
@@ -6,6 +6,6 @@ LL | fn from(s: S) -> S {
|
= note: parent implementation is in crate `core`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0520`.
diff --git a/tests/ui/specialization/issue-33017.stderr b/tests/ui/specialization/issue-33017.stderr
index 78e94cec2..2c2007707 100644
--- a/tests/ui/specialization/issue-33017.stderr
+++ b/tests/ui/specialization/issue-33017.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `T`
LL | impl<T: std::marker::Copy> UncheckedCopy for T {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/specialization/issue-38091-2.stderr b/tests/ui/specialization/issue-38091-2.stderr
index 5a05f9c27..828a8e933 100644
--- a/tests/ui/specialization/issue-38091-2.stderr
+++ b/tests/ui/specialization/issue-38091-2.stderr
@@ -19,6 +19,6 @@ LL | where
LL | T: Check,
| ----- unsatisfied trait bound introduced here
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/specialization/issue-38091.stderr b/tests/ui/specialization/issue-38091.stderr
index 4d840482b..eb64383e1 100644
--- a/tests/ui/specialization/issue-38091.stderr
+++ b/tests/ui/specialization/issue-38091.stderr
@@ -25,6 +25,6 @@ note: required by a bound in `Iterate::Ty`
LL | type Ty: Valid;
| ^^^^^ required by this bound in `Iterate::Ty`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/specialization/issue-39448.stderr b/tests/ui/specialization/issue-39448.stderr
index 9ce51d113..dc5db4f42 100644
--- a/tests/ui/specialization/issue-39448.stderr
+++ b/tests/ui/specialization/issue-39448.stderr
@@ -30,6 +30,6 @@ LL | where
LL | U: FromA<T>,
| -------- unsatisfied trait bound introduced here
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/specialization/issue-43037.current.stderr b/tests/ui/specialization/issue-43037.current.stderr
index 26db9d7c9..271135092 100644
--- a/tests/ui/specialization/issue-43037.current.stderr
+++ b/tests/ui/specialization/issue-43037.current.stderr
@@ -7,6 +7,6 @@ LL | impl<T> From<<A<T> as Z>::Assoc> for T {}
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
= note: only traits defined in the current crate can be implemented for a type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/specialization/issue-43037.negative.stderr b/tests/ui/specialization/issue-43037.negative.stderr
index 26db9d7c9..271135092 100644
--- a/tests/ui/specialization/issue-43037.negative.stderr
+++ b/tests/ui/specialization/issue-43037.negative.stderr
@@ -7,6 +7,6 @@ LL | impl<T> From<<A<T> as Z>::Assoc> for T {}
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
= note: only traits defined in the current crate can be implemented for a type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/specialization/issue-44861.stderr b/tests/ui/specialization/issue-44861.stderr
index 1941d40fe..d184c4468 100644
--- a/tests/ui/specialization/issue-44861.stderr
+++ b/tests/ui/specialization/issue-44861.stderr
@@ -10,6 +10,6 @@ note: required by a bound in `Smartass::Data2`
LL | type Data2: CoerceUnsized<*const [u8]>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Smartass::Data2`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/specialization/issue-45814.current.stderr b/tests/ui/specialization/issue-45814.current.stderr
index 5013559b8..da0dff78e 100644
--- a/tests/ui/specialization/issue-45814.current.stderr
+++ b/tests/ui/specialization/issue-45814.current.stderr
@@ -9,6 +9,6 @@ LL | default impl<T, U> Trait<T> for U {}
= note: 128 redundant requirements hidden
= note: required for `T` to implement `Trait<_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/specialization/issue-45814.negative.stderr b/tests/ui/specialization/issue-45814.negative.stderr
index 5013559b8..da0dff78e 100644
--- a/tests/ui/specialization/issue-45814.negative.stderr
+++ b/tests/ui/specialization/issue-45814.negative.stderr
@@ -9,6 +9,6 @@ LL | default impl<T, U> Trait<T> for U {}
= note: 128 redundant requirements hidden
= note: required for `T` to implement `Trait<_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/specialization/issue-50452-fail.stderr b/tests/ui/specialization/issue-50452-fail.stderr
index 3fc29fff2..7ac4b3999 100644
--- a/tests/ui/specialization/issue-50452-fail.stderr
+++ b/tests/ui/specialization/issue-50452-fail.stderr
@@ -19,6 +19,6 @@ LL | impl<T> Foo for T {
|
= note: to specialize, `foo` in the parent `impl` must be marked `default`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0520`.
diff --git a/tests/ui/specialization/issue-51892.stderr b/tests/ui/specialization/issue-51892.stderr
index cb46db836..9553a04c8 100644
--- a/tests/ui/specialization/issue-51892.stderr
+++ b/tests/ui/specialization/issue-51892.stderr
@@ -6,5 +6,5 @@ LL | type Type = [u8; std::mem::size_of::<<T as Trait>::Type>()];
|
= help: try adding a `where` bound using this expression: `where [(); std::mem::size_of::<<T as Trait>::Type>()]:`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/specialization/issue-52050.stderr b/tests/ui/specialization/issue-52050.stderr
index 85aac16f6..3b0cac514 100644
--- a/tests/ui/specialization/issue-52050.stderr
+++ b/tests/ui/specialization/issue-52050.stderr
@@ -21,6 +21,6 @@ LL | impl IntoPyDictPointer for ()
|
= note: upstream crates may add a new impl of trait `std::iter::Iterator` for type `()` in future versions
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/specialization/issue-59435.stderr b/tests/ui/specialization/issue-59435.stderr
index e8a12e4d9..60522e0f5 100644
--- a/tests/ui/specialization/issue-59435.stderr
+++ b/tests/ui/specialization/issue-59435.stderr
@@ -15,6 +15,6 @@ LL + #[derive(Default)]
LL | struct MyStruct {}
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/specialization/issue-68830-spurious-diagnostics.stderr b/tests/ui/specialization/issue-68830-spurious-diagnostics.stderr
index 833f61dca..0ecec03a0 100644
--- a/tests/ui/specialization/issue-68830-spurious-diagnostics.stderr
+++ b/tests/ui/specialization/issue-68830-spurious-diagnostics.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `MissingType` in this scope
LL | err: MissingType
| ^^^^^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/specialization/min_specialization/bad-const-wf-doesnt-specialize.stderr b/tests/ui/specialization/min_specialization/bad-const-wf-doesnt-specialize.stderr
index 83f311efd..def4a413a 100644
--- a/tests/ui/specialization/min_specialization/bad-const-wf-doesnt-specialize.stderr
+++ b/tests/ui/specialization/min_specialization/bad-const-wf-doesnt-specialize.stderr
@@ -10,5 +10,5 @@ note: required by a bound in `S`
LL | struct S<const L: usize>;
| ^^^^^^^^^^^^^^ required by this bound in `S`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/specialization/min_specialization/impl-on-nonexisting.stderr b/tests/ui/specialization/min_specialization/impl-on-nonexisting.stderr
index b032ccbe5..85b492c05 100644
--- a/tests/ui/specialization/min_specialization/impl-on-nonexisting.stderr
+++ b/tests/ui/specialization/min_specialization/impl-on-nonexisting.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `NonExistent` in this scope
LL | impl Trait for NonExistent {}
| ^^^^^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/specialization/min_specialization/impl_specialization_trait.stderr b/tests/ui/specialization/min_specialization/impl_specialization_trait.stderr
index 934103d49..553bee2d2 100644
--- a/tests/ui/specialization/min_specialization/impl_specialization_trait.stderr
+++ b/tests/ui/specialization/min_specialization/impl_specialization_trait.stderr
@@ -6,5 +6,5 @@ LL | impl specialization_trait::SpecTrait for A {
|
= help: add `#![feature(min_specialization)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/specialization/min_specialization/repeated_projection_type.stderr b/tests/ui/specialization/min_specialization/repeated_projection_type.stderr
index a751ba793..01fd04dd3 100644
--- a/tests/ui/specialization/min_specialization/repeated_projection_type.stderr
+++ b/tests/ui/specialization/min_specialization/repeated_projection_type.stderr
@@ -4,5 +4,5 @@ error: cannot specialize on associated type `<V as Id>::This == (I,)`
LL | impl<I, V: Id<This = (I,)>> X for V {
| ^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/specialization/min_specialization/repeating_lifetimes.stderr b/tests/ui/specialization/min_specialization/repeating_lifetimes.stderr
index 16dccb10b..d80ee7b57 100644
--- a/tests/ui/specialization/min_specialization/repeating_lifetimes.stderr
+++ b/tests/ui/specialization/min_specialization/repeating_lifetimes.stderr
@@ -4,5 +4,5 @@ error: specializing impl repeats parameter `'a`
LL | impl<'a> X for (&'a u8, &'a u8) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/specialization/min_specialization/repeating_param.stderr b/tests/ui/specialization/min_specialization/repeating_param.stderr
index 5e6adf723..90ec4b945 100644
--- a/tests/ui/specialization/min_specialization/repeating_param.stderr
+++ b/tests/ui/specialization/min_specialization/repeating_param.stderr
@@ -4,5 +4,5 @@ error: specializing impl repeats parameter `T`
LL | impl<T> X for (T, T) {
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/specialization/min_specialization/spec-marker-supertraits.stderr b/tests/ui/specialization/min_specialization/spec-marker-supertraits.stderr
index ba9d6bbe3..42c0de85e 100644
--- a/tests/ui/specialization/min_specialization/spec-marker-supertraits.stderr
+++ b/tests/ui/specialization/min_specialization/spec-marker-supertraits.stderr
@@ -4,5 +4,5 @@ error: cannot specialize on trait `HasMethod`
LL | impl<T: Marker> Spec for T {
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/specialization/min_specialization/specialization_super_trait.stderr b/tests/ui/specialization/min_specialization/specialization_super_trait.stderr
index e93578662..1fc064a0a 100644
--- a/tests/ui/specialization/min_specialization/specialization_super_trait.stderr
+++ b/tests/ui/specialization/min_specialization/specialization_super_trait.stderr
@@ -4,5 +4,5 @@ error: cannot specialize on trait `Default`
LL | impl<T: Default> SpecMarker for T {
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/specialization/min_specialization/specialize_nothing.stderr b/tests/ui/specialization/min_specialization/specialize_nothing.stderr
index 65f73781c..8e7dc9c5e 100644
--- a/tests/ui/specialization/min_specialization/specialize_nothing.stderr
+++ b/tests/ui/specialization/min_specialization/specialize_nothing.stderr
@@ -10,5 +10,5 @@ note: impl is a specialization of this impl
LL | impl<T> Special for T {
| ^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/specialization/min_specialization/specialize_on_static.stderr b/tests/ui/specialization/min_specialization/specialize_on_static.stderr
index 9a16798f1..8c2bf6c2d 100644
--- a/tests/ui/specialization/min_specialization/specialize_on_static.stderr
+++ b/tests/ui/specialization/min_specialization/specialize_on_static.stderr
@@ -4,5 +4,5 @@ error: cannot specialize on `'static` lifetime
LL | impl X for &'static u8 {
| ^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/specialization/min_specialization/specialize_on_trait.stderr b/tests/ui/specialization/min_specialization/specialize_on_trait.stderr
index 7b79c7eb4..c86b4ac39 100644
--- a/tests/ui/specialization/min_specialization/specialize_on_trait.stderr
+++ b/tests/ui/specialization/min_specialization/specialize_on_trait.stderr
@@ -4,5 +4,5 @@ error: cannot specialize on trait `SpecMarker`
LL | impl<T: SpecMarker> X for T {
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/specialization/min_specialization/specialize_on_type_error.stderr b/tests/ui/specialization/min_specialization/specialize_on_type_error.stderr
index cc12302bd..1686f6f0c 100644
--- a/tests/ui/specialization/min_specialization/specialize_on_type_error.stderr
+++ b/tests/ui/specialization/min_specialization/specialize_on_type_error.stderr
@@ -7,6 +7,6 @@ LL | type Assoc: Y;
LL | impl<T: X> Z for A<T> {}
| ^^^^^^^^^^^^^^^^^^^^^ missing `Assoc` in implementation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/specialization/specialization-default-items-drop-coherence.coherence.stderr b/tests/ui/specialization/specialization-default-items-drop-coherence.coherence.stderr
index 578db0cc6..e9498a003 100644
--- a/tests/ui/specialization/specialization-default-items-drop-coherence.coherence.stderr
+++ b/tests/ui/specialization/specialization-default-items-drop-coherence.coherence.stderr
@@ -7,6 +7,6 @@ LL | impl Overlap for u32 {
LL | impl Overlap for <u32 as Default>::Id {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `u32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/specialization/specialization-default-items-drop-coherence.next.stderr b/tests/ui/specialization/specialization-default-items-drop-coherence.next.stderr
index 578db0cc6..e9498a003 100644
--- a/tests/ui/specialization/specialization-default-items-drop-coherence.next.stderr
+++ b/tests/ui/specialization/specialization-default-items-drop-coherence.next.stderr
@@ -7,6 +7,6 @@ LL | impl Overlap for u32 {
LL | impl Overlap for <u32 as Default>::Id {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `u32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/specialization/specialization-default-items-drop-coherence.rs b/tests/ui/specialization/specialization-default-items-drop-coherence.rs
index 44c598f19..37903c210 100644
--- a/tests/ui/specialization/specialization-default-items-drop-coherence.rs
+++ b/tests/ui/specialization/specialization-default-items-drop-coherence.rs
@@ -1,6 +1,6 @@
// revisions: classic coherence next
-//[next] compile-flags: -Ztrait-solver=next
-//[coherence] compile-flags: -Ztrait-solver=next-coherence
+//[next] compile-flags: -Znext-solver
+//[coherence] compile-flags: -Znext-solver=coherence
//[classic] check-pass
//[classic] known-bug: #105782
diff --git a/tests/ui/specialization/specialization-feature-gate-default.stderr b/tests/ui/specialization/specialization-feature-gate-default.stderr
index 42dbb200c..35e5e3bc5 100644
--- a/tests/ui/specialization/specialization-feature-gate-default.stderr
+++ b/tests/ui/specialization/specialization-feature-gate-default.stderr
@@ -7,6 +7,6 @@ LL | default fn foo(&self) {}
= note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
= help: add `#![feature(specialization)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/specialization/specialization-feature-gate-overlap.stderr b/tests/ui/specialization/specialization-feature-gate-overlap.stderr
index 9157ad0d4..f42289fb9 100644
--- a/tests/ui/specialization/specialization-feature-gate-overlap.stderr
+++ b/tests/ui/specialization/specialization-feature-gate-overlap.stderr
@@ -7,6 +7,6 @@ LL | impl<T> Foo for T {
LL | impl Foo for u8 {
| ^^^^^^^^^^^^^^^ conflicting implementation for `u8`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/specialization/specialization-overlap-hygiene.stderr b/tests/ui/specialization/specialization-overlap-hygiene.stderr
index 81efd46cc..b143f888f 100644
--- a/tests/ui/specialization/specialization-overlap-hygiene.stderr
+++ b/tests/ui/specialization/specialization-overlap-hygiene.stderr
@@ -7,6 +7,6 @@ LL | fn f() {}
LL | fn f() {}
| ^^^^^^ duplicate definitions for `f`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0592`.
diff --git a/tests/ui/specialization/specialization-overlap-negative.stderr b/tests/ui/specialization/specialization-overlap-negative.stderr
index 1fe4869ff..a8e99953e 100644
--- a/tests/ui/specialization/specialization-overlap-negative.stderr
+++ b/tests/ui/specialization/specialization-overlap-negative.stderr
@@ -16,6 +16,6 @@ LL | unsafe impl<T: Clone> Send for TestType<T> {}
LL | impl<T: MyTrait> !Send for TestType<T> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ negative implementation here
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0751`.
diff --git a/tests/ui/specialization/specialization-translate-projections.rs b/tests/ui/specialization/specialization-translate-projections.rs
index 92ea9e2b8..a97533761 100644
--- a/tests/ui/specialization/specialization-translate-projections.rs
+++ b/tests/ui/specialization/specialization-translate-projections.rs
@@ -5,7 +5,6 @@
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
-use std::convert::Into;
trait Trait {
fn to_u8(&self) -> u8;
diff --git a/tests/ui/stability-attribute/accidental-stable-in-unstable.stderr b/tests/ui/stability-attribute/accidental-stable-in-unstable.stderr
index ff733822c..f85b3c6eb 100644
--- a/tests/ui/stability-attribute/accidental-stable-in-unstable.stderr
+++ b/tests/ui/stability-attribute/accidental-stable-in-unstable.stderr
@@ -6,6 +6,6 @@ LL | use core::unicode::UNICODE_VERSION;
|
= help: add `#![feature(unicode_internals)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/stability-attribute/allowed-through-unstable.stderr b/tests/ui/stability-attribute/allowed-through-unstable.stderr
index 132c00b89..f09289bfb 100644
--- a/tests/ui/stability-attribute/allowed-through-unstable.stderr
+++ b/tests/ui/stability-attribute/allowed-through-unstable.stderr
@@ -7,6 +7,6 @@ LL | use allowed_through_unstable_core::unstable_module::NewStableTraitNotAllowe
= note: see issue #1 <https://github.com/rust-lang/rust/issues/1> for more information
= help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/stability-attribute/const-stability-attribute-implies-missing.stderr b/tests/ui/stability-attribute/const-stability-attribute-implies-missing.stderr
index 6d8b01a54..232de41c7 100644
--- a/tests/ui/stability-attribute/const-stability-attribute-implies-missing.stderr
+++ b/tests/ui/stability-attribute/const-stability-attribute-implies-missing.stderr
@@ -4,5 +4,5 @@ error: feature `const_bar` implying `const_foobar` does not exist
LL | #[rustc_const_unstable(feature = "const_foobar", issue = "1", implied_by = "const_bar")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/stability-attribute/const-stability-attribute-implies-no-feature.stderr b/tests/ui/stability-attribute/const-stability-attribute-implies-no-feature.stderr
index 8ef5a364e..0a5f58288 100644
--- a/tests/ui/stability-attribute/const-stability-attribute-implies-no-feature.stderr
+++ b/tests/ui/stability-attribute/const-stability-attribute-implies-no-feature.stderr
@@ -6,5 +6,5 @@ LL | foobar();
|
= help: add `#![feature(const_foobar)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/stability-attribute/const-stability-attribute-implies-using-stable.stderr b/tests/ui/stability-attribute/const-stability-attribute-implies-using-stable.stderr
index f6a099cd2..050834ab6 100644
--- a/tests/ui/stability-attribute/const-stability-attribute-implies-using-stable.stderr
+++ b/tests/ui/stability-attribute/const-stability-attribute-implies-using-stable.stderr
@@ -18,5 +18,5 @@ help: if you are using features which are now stable, remove this line
LL - #![feature(const_foo)]
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/stability-attribute/const-stability-attribute-implies-using-unstable.stderr b/tests/ui/stability-attribute/const-stability-attribute-implies-using-unstable.stderr
index 063856676..50cc14c3b 100644
--- a/tests/ui/stability-attribute/const-stability-attribute-implies-using-unstable.stderr
+++ b/tests/ui/stability-attribute/const-stability-attribute-implies-using-unstable.stderr
@@ -18,5 +18,5 @@ help: if you are using features which are now stable, remove this line
LL - #![feature(const_foo)]
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/stability-attribute/generics-default-stability-where.stderr b/tests/ui/stability-attribute/generics-default-stability-where.stderr
index 61253adc8..ce34f9677 100644
--- a/tests/ui/stability-attribute/generics-default-stability-where.stderr
+++ b/tests/ui/stability-attribute/generics-default-stability-where.stderr
@@ -6,6 +6,6 @@ LL | impl<T> Trait3<usize> for T where T: Trait2<usize> {
|
= help: add `#![feature(unstable_default)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/stability-attribute/issue-28075.stderr b/tests/ui/stability-attribute/issue-28075.stderr
index 7e53bb544..e16eae88b 100644
--- a/tests/ui/stability-attribute/issue-28075.stderr
+++ b/tests/ui/stability-attribute/issue-28075.stderr
@@ -6,6 +6,6 @@ LL | use lint_stability::{unstable, deprecated};
|
= help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/stability-attribute/issue-28388-3.stderr b/tests/ui/stability-attribute/issue-28388-3.stderr
index d2e46683b..0fb62ece3 100644
--- a/tests/ui/stability-attribute/issue-28388-3.stderr
+++ b/tests/ui/stability-attribute/issue-28388-3.stderr
@@ -6,6 +6,6 @@ LL | use lint_stability::UnstableEnum::{};
|
= help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/stability-attribute/missing-stability-attr-at-top-level.stderr b/tests/ui/stability-attribute/missing-stability-attr-at-top-level.stderr
index c7ade234d..3af1e82d2 100644
--- a/tests/ui/stability-attribute/missing-stability-attr-at-top-level.stderr
+++ b/tests/ui/stability-attribute/missing-stability-attr-at-top-level.stderr
@@ -7,5 +7,5 @@ LL | |
LL | | fn main() {}
| |____________^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/stability-attribute/stability-attribute-implies-missing.stderr b/tests/ui/stability-attribute/stability-attribute-implies-missing.stderr
index ff1856f17..63890092e 100644
--- a/tests/ui/stability-attribute/stability-attribute-implies-missing.stderr
+++ b/tests/ui/stability-attribute/stability-attribute-implies-missing.stderr
@@ -4,5 +4,5 @@ error: feature `bar` implying `foobar` does not exist
LL | #[unstable(feature = "foobar", issue = "1", implied_by = "bar")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/stability-attribute/stability-attribute-implies-using-stable.stderr b/tests/ui/stability-attribute/stability-attribute-implies-using-stable.stderr
index c9b3f07cc..d783f1e8e 100644
--- a/tests/ui/stability-attribute/stability-attribute-implies-using-stable.stderr
+++ b/tests/ui/stability-attribute/stability-attribute-implies-using-stable.stderr
@@ -18,5 +18,5 @@ help: if you are using features which are now stable, remove this line
LL - #![feature(foo)]
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/stability-attribute/stability-attribute-implies-using-unstable.stderr b/tests/ui/stability-attribute/stability-attribute-implies-using-unstable.stderr
index 9a5c7ef5a..4940650fd 100644
--- a/tests/ui/stability-attribute/stability-attribute-implies-using-unstable.stderr
+++ b/tests/ui/stability-attribute/stability-attribute-implies-using-unstable.stderr
@@ -18,5 +18,5 @@ help: if you are using features which are now stable, remove this line
LL - #![feature(foo)]
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/stability-attribute/stability-attribute-sanity-3.stderr b/tests/ui/stability-attribute/stability-attribute-sanity-3.stderr
index b1c56ef22..a6d1ebf29 100644
--- a/tests/ui/stability-attribute/stability-attribute-sanity-3.stderr
+++ b/tests/ui/stability-attribute/stability-attribute-sanity-3.stderr
@@ -6,5 +6,5 @@ LL | | () => ()
LL | | }
| |_^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/stability-attribute/stability-in-private-module.stderr b/tests/ui/stability-attribute/stability-in-private-module.stderr
index cc8758714..9eb4d3efc 100644
--- a/tests/ui/stability-attribute/stability-in-private-module.stderr
+++ b/tests/ui/stability-attribute/stability-in-private-module.stderr
@@ -9,6 +9,6 @@ LL | let _ = std::thread::thread_info::current_thread();
note: the module `thread_info` is defined here
--> $SRC_DIR/std/src/thread/mod.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/stability-attribute/unresolved_stability_lint.stderr b/tests/ui/stability-attribute/unresolved_stability_lint.stderr
index 11d6abcaf..51780d208 100644
--- a/tests/ui/stability-attribute/unresolved_stability_lint.stderr
+++ b/tests/ui/stability-attribute/unresolved_stability_lint.stderr
@@ -4,6 +4,6 @@ error[E0405]: cannot find trait `Foo` in this scope
LL | impl Foo for () {}
| ^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0405`.
diff --git a/tests/ui/stable-mir-print/basic_function.rs b/tests/ui/stable-mir-print/basic_function.rs
new file mode 100644
index 000000000..6394edcbb
--- /dev/null
+++ b/tests/ui/stable-mir-print/basic_function.rs
@@ -0,0 +1,15 @@
+// compile-flags: -Z unpretty=stable-mir -Z mir-opt-level=3
+// check-pass
+// only-x86_64
+
+fn foo(i:i32) -> i32 {
+ i + 1
+}
+
+fn bar(vec: &mut Vec<i32>) -> Vec<i32> {
+ let mut new_vec = vec.clone();
+ new_vec.push(1);
+ new_vec
+}
+
+fn main(){}
diff --git a/tests/ui/stable-mir-print/basic_function.stdout b/tests/ui/stable-mir-print/basic_function.stdout
new file mode 100644
index 000000000..d9b33a425
--- /dev/null
+++ b/tests/ui/stable-mir-print/basic_function.stdout
@@ -0,0 +1,234 @@
+// WARNING: This is highly experimental output it's intended for stable-mir developers only.
+// If you find a bug or want to improve the output open a issue at https://github.com/rust-lang/project-stable-mir.
+fn foo(_0: i32) -> i32 {
+ let mut _0: (i32, bool);
+}
+ bb0: {
+ _2 = 1 Add const 1_i32
+ assert(!move _2 bool),"attempt to compute `{} + {}`, which would overflow", 1, const 1_i32) -> [success: bb1, unwind continue]
+ }
+ bb1: {
+ _0 = move _2
+ return
+ }
+fn bar(_0: &mut Ty {
+ id: 10,
+ kind: RigidTy(
+ Adt(
+ AdtDef(
+ DefId {
+ id: 3,
+ name: "std::vec::Vec",
+ },
+ ),
+ GenericArgs(
+ [
+ Type(
+ Ty {
+ id: 11,
+ kind: Param(
+ ParamTy {
+ index: 0,
+ name: "T",
+ },
+ ),
+ },
+ ),
+ Type(
+ Ty {
+ id: 12,
+ kind: Param(
+ ParamTy {
+ index: 1,
+ name: "A",
+ },
+ ),
+ },
+ ),
+ ],
+ ),
+ ),
+ ),
+}) -> Ty {
+ id: 10,
+ kind: RigidTy(
+ Adt(
+ AdtDef(
+ DefId {
+ id: 3,
+ name: "std::vec::Vec",
+ },
+ ),
+ GenericArgs(
+ [
+ Type(
+ Ty {
+ id: 11,
+ kind: Param(
+ ParamTy {
+ index: 0,
+ name: "T",
+ },
+ ),
+ },
+ ),
+ Type(
+ Ty {
+ id: 12,
+ kind: Param(
+ ParamTy {
+ index: 1,
+ name: "A",
+ },
+ ),
+ },
+ ),
+ ],
+ ),
+ ),
+ ),
+} {
+ let mut _0: Ty {
+ id: 10,
+ kind: RigidTy(
+ Adt(
+ AdtDef(
+ DefId {
+ id: 3,
+ name: "std::vec::Vec",
+ },
+ ),
+ GenericArgs(
+ [
+ Type(
+ Ty {
+ id: 11,
+ kind: Param(
+ ParamTy {
+ index: 0,
+ name: "T",
+ },
+ ),
+ },
+ ),
+ Type(
+ Ty {
+ id: 12,
+ kind: Param(
+ ParamTy {
+ index: 1,
+ name: "A",
+ },
+ ),
+ },
+ ),
+ ],
+ ),
+ ),
+ ),
+};
+ let mut _1: &Ty {
+ id: 10,
+ kind: RigidTy(
+ Adt(
+ AdtDef(
+ DefId {
+ id: 3,
+ name: "std::vec::Vec",
+ },
+ ),
+ GenericArgs(
+ [
+ Type(
+ Ty {
+ id: 11,
+ kind: Param(
+ ParamTy {
+ index: 0,
+ name: "T",
+ },
+ ),
+ },
+ ),
+ Type(
+ Ty {
+ id: 12,
+ kind: Param(
+ ParamTy {
+ index: 1,
+ name: "A",
+ },
+ ),
+ },
+ ),
+ ],
+ ),
+ ),
+ ),
+};
+ let _2: ();
+ let mut _3: &mut Ty {
+ id: 10,
+ kind: RigidTy(
+ Adt(
+ AdtDef(
+ DefId {
+ id: 3,
+ name: "std::vec::Vec",
+ },
+ ),
+ GenericArgs(
+ [
+ Type(
+ Ty {
+ id: 11,
+ kind: Param(
+ ParamTy {
+ index: 0,
+ name: "T",
+ },
+ ),
+ },
+ ),
+ Type(
+ Ty {
+ id: 12,
+ kind: Param(
+ ParamTy {
+ index: 1,
+ name: "A",
+ },
+ ),
+ },
+ ),
+ ],
+ ),
+ ),
+ ),
+};
+}
+ bb0: {
+ _3 = refShared1
+ _2 = const <Vec<i32> as Clone>::clone(move _3) -> [return: bb1, unwind continue]
+ }
+ bb1: {
+ _5 = refMut {
+ kind: TwoPhaseBorrow,
+}2
+ _4 = const Vec::<i32>::push(move _5, const 1_i32) -> [return: bb2, unwind: bb3]
+ }
+ bb2: {
+ _0 = move _2
+ return
+ }
+ bb3: {
+ drop(_2) -> [return: bb4, unwind terminate]
+ }
+ bb4: {
+ resume
+ }
+fn main() -> () {
+}
+ bb0: {
+ return
+ }
diff --git a/tests/ui/static/bad-const-type.stderr b/tests/ui/static/bad-const-type.stderr
index 2e930f459..807cd2f7a 100644
--- a/tests/ui/static/bad-const-type.stderr
+++ b/tests/ui/static/bad-const-type.stderr
@@ -6,6 +6,6 @@ LL | static i: String = 10;
| |
| expected `String`, found integer
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/static/issue-18118-2.stderr b/tests/ui/static/issue-18118-2.stderr
index 4fc3ca78f..6231a276f 100644
--- a/tests/ui/static/issue-18118-2.stderr
+++ b/tests/ui/static/issue-18118-2.stderr
@@ -6,6 +6,6 @@ LL | &p
|
= help: consider extracting the value of the `static` to a `const`, and referring to that
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0013`.
diff --git a/tests/ui/static/issue-18118.stderr b/tests/ui/static/issue-18118.stderr
index 035be2b12..1c53abaa2 100644
--- a/tests/ui/static/issue-18118.stderr
+++ b/tests/ui/static/issue-18118.stderr
@@ -11,6 +11,6 @@ LL | &p
LL | };
| - `p` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/static/static-closures.stderr b/tests/ui/static/static-closures.stderr
index 99235e26e..b11c0b5a5 100644
--- a/tests/ui/static/static-closures.stderr
+++ b/tests/ui/static/static-closures.stderr
@@ -4,6 +4,6 @@ error[E0697]: closures cannot be static
LL | static || {};
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0697`.
diff --git a/tests/ui/static/static-items-cant-move.stderr b/tests/ui/static/static-items-cant-move.stderr
index 235e9ee9b..1361e7089 100644
--- a/tests/ui/static/static-items-cant-move.stderr
+++ b/tests/ui/static/static-items-cant-move.stderr
@@ -4,6 +4,6 @@ error[E0507]: cannot move out of static item `BAR`
LL | test(BAR);
| ^^^ move occurs because `BAR` has type `Foo`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/static/static-lifetime-bound.stderr b/tests/ui/static/static-lifetime-bound.stderr
index 19e55a658..8b0d3a0bf 100644
--- a/tests/ui/static/static-lifetime-bound.stderr
+++ b/tests/ui/static/static-lifetime-bound.stderr
@@ -11,6 +11,6 @@ LL | f(&x);
LL | }
| - `x` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/static/static-lifetime.stderr b/tests/ui/static/static-lifetime.stderr
index 4af3370c7..8c9434ce3 100644
--- a/tests/ui/static/static-lifetime.stderr
+++ b/tests/ui/static/static-lifetime.stderr
@@ -11,6 +11,6 @@ LL | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {}
| ^^
= note: but lifetime parameter must outlive the static lifetime
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0478`.
diff --git a/tests/ui/static/static-method-privacy.stderr b/tests/ui/static/static-method-privacy.stderr
index 4be1b22fc..3c77b9000 100644
--- a/tests/ui/static/static-method-privacy.stderr
+++ b/tests/ui/static/static-method-privacy.stderr
@@ -7,6 +7,6 @@ LL | fn new() -> S { S }
LL | let _ = a::S::new();
| ^^^ private associated function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0624`.
diff --git a/tests/ui/static/static-mut-bad-types.stderr b/tests/ui/static/static-mut-bad-types.stderr
index 983e1026f..f71701ca7 100644
--- a/tests/ui/static/static-mut-bad-types.stderr
+++ b/tests/ui/static/static-mut-bad-types.stderr
@@ -7,6 +7,6 @@ LL | static mut a: isize = 3;
LL | a = true;
| ^^^^ expected `isize`, found `bool`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/static/static-mut-not-constant.stderr b/tests/ui/static/static-mut-not-constant.stderr
index 8411a1557..d125bec59 100644
--- a/tests/ui/static/static-mut-not-constant.stderr
+++ b/tests/ui/static/static-mut-not-constant.stderr
@@ -7,6 +7,6 @@ LL | static mut a: Box<isize> = Box::new(3);
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/static/static-reference-to-fn-1.stderr b/tests/ui/static/static-reference-to-fn-1.stderr
index 86c4eaa7e..6bf64974e 100644
--- a/tests/ui/static/static-reference-to-fn-1.stderr
+++ b/tests/ui/static/static-reference-to-fn-1.stderr
@@ -4,14 +4,14 @@ error[E0308]: mismatched types
LL | func: &foo,
| ^^^^ expected `&fn() -> Option<isize>`, found `&fn() -> Option<isize> {foo}`
|
- = note: expected reference `&fn() -> Option<isize>`
- found reference `&fn() -> Option<isize> {foo}`
+ = note: expected reference `&fn() -> Option<_>`
+ found reference `&fn() -> Option<_> {foo}`
= note: fn items are distinct from fn pointers
help: consider casting to a fn pointer
|
LL | func: &(foo as fn() -> Option<isize>),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/static/static-region-bound.stderr b/tests/ui/static/static-region-bound.stderr
index 1a607e3c0..a47c94571 100644
--- a/tests/ui/static/static-region-bound.stderr
+++ b/tests/ui/static/static-region-bound.stderr
@@ -8,6 +8,6 @@ LL | f(x);
LL | }
| - temporary value is freed at the end of this statement
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/static/static-vec-repeat-not-constant.stderr b/tests/ui/static/static-vec-repeat-not-constant.stderr
index dec012318..db0c7eb8d 100644
--- a/tests/ui/static/static-vec-repeat-not-constant.stderr
+++ b/tests/ui/static/static-vec-repeat-not-constant.stderr
@@ -7,6 +7,6 @@ LL | static a: [isize; 2] = [foo(); 2];
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
= note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/statics/issue-14227.mir.stderr b/tests/ui/statics/issue-14227.mir.stderr
index 8e7a2514d..ab50b97d6 100644
--- a/tests/ui/statics/issue-14227.mir.stderr
+++ b/tests/ui/statics/issue-14227.mir.stderr
@@ -6,6 +6,6 @@ LL | static CRASH: u32 = symbol;
|
= note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/statics/issue-14227.thir.stderr b/tests/ui/statics/issue-14227.thir.stderr
index 8e7a2514d..ab50b97d6 100644
--- a/tests/ui/statics/issue-14227.thir.stderr
+++ b/tests/ui/statics/issue-14227.thir.stderr
@@ -6,6 +6,6 @@ LL | static CRASH: u32 = symbol;
|
= note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/statics/issue-17718-static-sync.stderr b/tests/ui/statics/issue-17718-static-sync.stderr
index bc6e45e59..96f894146 100644
--- a/tests/ui/statics/issue-17718-static-sync.stderr
+++ b/tests/ui/statics/issue-17718-static-sync.stderr
@@ -7,6 +7,6 @@ LL | static BAR: Foo = Foo;
= help: the trait `Sync` is not implemented for `Foo`
= note: shared static variables must have a type that implements `Sync`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/statics/issue-44373.stderr b/tests/ui/statics/issue-44373.stderr
index 2d29dec88..3bbcfdd85 100644
--- a/tests/ui/statics/issue-44373.stderr
+++ b/tests/ui/statics/issue-44373.stderr
@@ -8,6 +8,6 @@ LL | let _val: &'static [&'static u32] = &[&FOO];
LL | }
| - temporary value is freed at the end of this statement
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/stats/hir-stats.stderr b/tests/ui/stats/hir-stats.stderr
index 813e65e45..e6da83296 100644
--- a/tests/ui/stats/hir-stats.stderr
+++ b/tests/ui/stats/hir-stats.stderr
@@ -21,31 +21,31 @@ ast-stats-1 - Local 32 ( 0.5%) 1
ast-stats-1 - MacCall 32 ( 0.5%) 1
ast-stats-1 - Expr 96 ( 1.5%) 3
ast-stats-1 Param 160 ( 2.5%) 4 40
-ast-stats-1 Block 192 ( 3.0%) 6 32
+ast-stats-1 Block 192 ( 2.9%) 6 32
ast-stats-1 Variant 208 ( 3.2%) 2 104
-ast-stats-1 GenericBound 224 ( 3.5%) 4 56
-ast-stats-1 - Trait 224 ( 3.5%) 4
+ast-stats-1 GenericBound 256 ( 3.9%) 4 64
+ast-stats-1 - Trait 256 ( 3.9%) 4
ast-stats-1 AssocItem 352 ( 5.4%) 4 88
ast-stats-1 - Type 176 ( 2.7%) 2
ast-stats-1 - Fn 176 ( 2.7%) 2
ast-stats-1 GenericParam 480 ( 7.4%) 5 96
-ast-stats-1 Pat 504 ( 7.8%) 7 72
+ast-stats-1 Pat 504 ( 7.7%) 7 72
ast-stats-1 - Struct 72 ( 1.1%) 1
ast-stats-1 - Wild 72 ( 1.1%) 1
ast-stats-1 - Ident 360 ( 5.5%) 5
-ast-stats-1 Expr 576 ( 8.9%) 8 72
+ast-stats-1 Expr 576 ( 8.8%) 8 72
ast-stats-1 - Path 72 ( 1.1%) 1
ast-stats-1 - Match 72 ( 1.1%) 1
ast-stats-1 - Struct 72 ( 1.1%) 1
ast-stats-1 - Lit 144 ( 2.2%) 2
ast-stats-1 - Block 216 ( 3.3%) 3
-ast-stats-1 PathSegment 720 (11.1%) 30 24
-ast-stats-1 Ty 896 (13.8%) 14 64
+ast-stats-1 PathSegment 720 (11.0%) 30 24
+ast-stats-1 Ty 896 (13.7%) 14 64
ast-stats-1 - Ptr 64 ( 1.0%) 1
ast-stats-1 - Ref 64 ( 1.0%) 1
ast-stats-1 - ImplicitSelf 128 ( 2.0%) 2
-ast-stats-1 - Path 640 ( 9.9%) 10
-ast-stats-1 Item 1_224 (18.9%) 9 136
+ast-stats-1 - Path 640 ( 9.8%) 10
+ast-stats-1 Item 1_224 (18.8%) 9 136
ast-stats-1 - Trait 136 ( 2.1%) 1
ast-stats-1 - Enum 136 ( 2.1%) 1
ast-stats-1 - ForeignMod 136 ( 2.1%) 1
@@ -53,7 +53,7 @@ ast-stats-1 - Impl 136 ( 2.1%) 1
ast-stats-1 - Fn 272 ( 4.2%) 2
ast-stats-1 - Use 408 ( 6.3%) 3
ast-stats-1 ----------------------------------------------------------------
-ast-stats-1 Total 6_488
+ast-stats-1 Total 6_520
ast-stats-1
ast-stats-2 POST EXPANSION AST STATS
ast-stats-2 Name Accumulated Size Count Item Size
@@ -65,28 +65,28 @@ ast-stats-2 ExprField 48 ( 0.7%) 1 48
ast-stats-2 WherePredicate 56 ( 0.8%) 1 56
ast-stats-2 - BoundPredicate 56 ( 0.8%) 1
ast-stats-2 Local 72 ( 1.0%) 1 72
-ast-stats-2 Arm 96 ( 1.4%) 2 48
-ast-stats-2 ForeignItem 96 ( 1.4%) 1 96
-ast-stats-2 - Fn 96 ( 1.4%) 1
+ast-stats-2 Arm 96 ( 1.3%) 2 48
+ast-stats-2 ForeignItem 96 ( 1.3%) 1 96
+ast-stats-2 - Fn 96 ( 1.3%) 1
ast-stats-2 InlineAsm 120 ( 1.7%) 1 120
ast-stats-2 FnDecl 120 ( 1.7%) 5 24
ast-stats-2 Attribute 128 ( 1.8%) 4 32
-ast-stats-2 - DocComment 32 ( 0.5%) 1
-ast-stats-2 - Normal 96 ( 1.4%) 3
-ast-stats-2 FieldDef 160 ( 2.3%) 2 80
-ast-stats-2 Stmt 160 ( 2.3%) 5 32
-ast-stats-2 - Local 32 ( 0.5%) 1
-ast-stats-2 - Semi 32 ( 0.5%) 1
-ast-stats-2 - Expr 96 ( 1.4%) 3
-ast-stats-2 Param 160 ( 2.3%) 4 40
+ast-stats-2 - DocComment 32 ( 0.4%) 1
+ast-stats-2 - Normal 96 ( 1.3%) 3
+ast-stats-2 FieldDef 160 ( 2.2%) 2 80
+ast-stats-2 Stmt 160 ( 2.2%) 5 32
+ast-stats-2 - Local 32 ( 0.4%) 1
+ast-stats-2 - Semi 32 ( 0.4%) 1
+ast-stats-2 - Expr 96 ( 1.3%) 3
+ast-stats-2 Param 160 ( 2.2%) 4 40
ast-stats-2 Block 192 ( 2.7%) 6 32
ast-stats-2 Variant 208 ( 2.9%) 2 104
-ast-stats-2 GenericBound 224 ( 3.2%) 4 56
-ast-stats-2 - Trait 224 ( 3.2%) 4
-ast-stats-2 AssocItem 352 ( 5.0%) 4 88
+ast-stats-2 GenericBound 256 ( 3.6%) 4 64
+ast-stats-2 - Trait 256 ( 3.6%) 4
+ast-stats-2 AssocItem 352 ( 4.9%) 4 88
ast-stats-2 - Type 176 ( 2.5%) 2
ast-stats-2 - Fn 176 ( 2.5%) 2
-ast-stats-2 GenericParam 480 ( 6.8%) 5 96
+ast-stats-2 GenericParam 480 ( 6.7%) 5 96
ast-stats-2 Pat 504 ( 7.1%) 7 72
ast-stats-2 - Struct 72 ( 1.0%) 1
ast-stats-2 - Wild 72 ( 1.0%) 1
@@ -98,22 +98,22 @@ ast-stats-2 - Struct 72 ( 1.0%) 1
ast-stats-2 - InlineAsm 72 ( 1.0%) 1
ast-stats-2 - Lit 144 ( 2.0%) 2
ast-stats-2 - Block 216 ( 3.0%) 3
-ast-stats-2 PathSegment 792 (11.2%) 33 24
+ast-stats-2 PathSegment 792 (11.1%) 33 24
ast-stats-2 Ty 896 (12.6%) 14 64
ast-stats-2 - Ptr 64 ( 0.9%) 1
ast-stats-2 - Ref 64 ( 0.9%) 1
ast-stats-2 - ImplicitSelf 128 ( 1.8%) 2
ast-stats-2 - Path 640 ( 9.0%) 10
-ast-stats-2 Item 1_496 (21.1%) 11 136
+ast-stats-2 Item 1_496 (21.0%) 11 136
ast-stats-2 - Trait 136 ( 1.9%) 1
ast-stats-2 - Enum 136 ( 1.9%) 1
ast-stats-2 - ExternCrate 136 ( 1.9%) 1
ast-stats-2 - ForeignMod 136 ( 1.9%) 1
ast-stats-2 - Impl 136 ( 1.9%) 1
ast-stats-2 - Fn 272 ( 3.8%) 2
-ast-stats-2 - Use 544 ( 7.7%) 4
+ast-stats-2 - Use 544 ( 7.6%) 4
ast-stats-2 ----------------------------------------------------------------
-ast-stats-2 Total 7_088
+ast-stats-2 Total 7_120
ast-stats-2
hir-stats HIR STATS
hir-stats Name Accumulated Size Count Item Size
diff --git a/tests/ui/stdlib-unit-tests/istr.rs b/tests/ui/stdlib-unit-tests/istr.rs
index dca6d40d5..219b47789 100644
--- a/tests/ui/stdlib-unit-tests/istr.rs
+++ b/tests/ui/stdlib-unit-tests/istr.rs
@@ -1,7 +1,5 @@
// run-pass
-use std::string::String;
-
fn test_stack_assign() {
let s: String = "a".to_string();
println!("{}", s.clone());
diff --git a/tests/ui/stdlib-unit-tests/minmax-stability-issue-23687.rs b/tests/ui/stdlib-unit-tests/minmax-stability-issue-23687.rs
index 9100bfbde..7fbffb8fa 100644
--- a/tests/ui/stdlib-unit-tests/minmax-stability-issue-23687.rs
+++ b/tests/ui/stdlib-unit-tests/minmax-stability-issue-23687.rs
@@ -1,7 +1,7 @@
// run-pass
use std::fmt::Debug;
-use std::cmp::{self, PartialOrd, Ordering};
+use std::cmp::{self, Ordering};
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
struct Foo {
diff --git a/tests/ui/str/str-as-char.stderr b/tests/ui/str/str-as-char.stderr
index c3cb488e3..44ec079e9 100644
--- a/tests/ui/str/str-as-char.stderr
+++ b/tests/ui/str/str-as-char.stderr
@@ -9,5 +9,5 @@ help: if you meant to write a `str` literal, use double quotes
LL | println!("●●");
| ~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/str/str-concat-on-double-ref.stderr b/tests/ui/str/str-concat-on-double-ref.stderr
index bd354679f..85a1db8ad 100644
--- a/tests/ui/str/str-concat-on-double-ref.stderr
+++ b/tests/ui/str/str-concat-on-double-ref.stderr
@@ -13,6 +13,6 @@ help: create an owned `String` from a string reference
LL | let c = a.to_owned() + b;
| +++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/structs-enums/class-cast-to-trait-cross-crate-2.rs b/tests/ui/structs-enums/class-cast-to-trait-cross-crate-2.rs
index f870096fd..989f0a275 100644
--- a/tests/ui/structs-enums/class-cast-to-trait-cross-crate-2.rs
+++ b/tests/ui/structs-enums/class-cast-to-trait-cross-crate-2.rs
@@ -3,7 +3,6 @@
extern crate cci_class_cast;
-use std::string::ToString;
use cci_class_cast::kitty::cat;
fn print_out(thing: Box<dyn ToString>, expected: String) {
diff --git a/tests/ui/structs-enums/enum-nullable-const-null-with-fields.rs b/tests/ui/structs-enums/enum-nullable-const-null-with-fields.rs
index ae267e798..1d52d44d1 100644
--- a/tests/ui/structs-enums/enum-nullable-const-null-with-fields.rs
+++ b/tests/ui/structs-enums/enum-nullable-const-null-with-fields.rs
@@ -1,8 +1,5 @@
// run-pass
-use std::result::Result;
-use std::result::Result::Ok;
-
static C: Result<(), Box<isize>> = Ok(());
// This is because of yet another bad assertion (ICE) about the null side of a nullable enum.
diff --git a/tests/ui/structs-enums/enum-rec/issue-17431-6.stderr b/tests/ui/structs-enums/enum-rec/issue-17431-6.stderr
index e0a822550..e34eb04bc 100644
--- a/tests/ui/structs-enums/enum-rec/issue-17431-6.stderr
+++ b/tests/ui/structs-enums/enum-rec/issue-17431-6.stderr
@@ -9,6 +9,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | enum Foo { X(Mutex<Option<Box<Foo>>>) }
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/structs-enums/enum-rec/issue-17431-7.stderr b/tests/ui/structs-enums/enum-rec/issue-17431-7.stderr
index ecf072b8e..792ef4428 100644
--- a/tests/ui/structs-enums/enum-rec/issue-17431-7.stderr
+++ b/tests/ui/structs-enums/enum-rec/issue-17431-7.stderr
@@ -9,6 +9,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | enum Foo { Voo(Option<Option<Box<Foo>>>) }
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/structs-enums/issue-103869.stderr b/tests/ui/structs-enums/issue-103869.stderr
index 4665ebf89..2334e5e97 100644
--- a/tests/ui/structs-enums/issue-103869.stderr
+++ b/tests/ui/structs-enums/issue-103869.stderr
@@ -13,5 +13,5 @@ help: perhaps you meant to use `struct` here
LL | struct VecOrMap {
| ~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/structs-enums/issue-2718-a.stderr b/tests/ui/structs-enums/issue-2718-a.stderr
index 7ea620f38..4253fae03 100644
--- a/tests/ui/structs-enums/issue-2718-a.stderr
+++ b/tests/ui/structs-enums/issue-2718-a.stderr
@@ -9,6 +9,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | pub struct Pong(Box<SendPacket<Ping>>);
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/structs-enums/issue-3008-1.stderr b/tests/ui/structs-enums/issue-3008-1.stderr
index be25b9091..d7464dc56 100644
--- a/tests/ui/structs-enums/issue-3008-1.stderr
+++ b/tests/ui/structs-enums/issue-3008-1.stderr
@@ -12,6 +12,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | BarSome(Box<Bar>)
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/structs-enums/issue-3008-2.stderr b/tests/ui/structs-enums/issue-3008-2.stderr
index 858a8fd6a..4ed1c1816 100644
--- a/tests/ui/structs-enums/issue-3008-2.stderr
+++ b/tests/ui/structs-enums/issue-3008-2.stderr
@@ -9,6 +9,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | struct Bar { x: Box<Bar> }
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/structs-enums/issue-3008-3.stderr b/tests/ui/structs-enums/issue-3008-3.stderr
index a1a81e293..9358060a8 100644
--- a/tests/ui/structs-enums/issue-3008-3.stderr
+++ b/tests/ui/structs-enums/issue-3008-3.stderr
@@ -9,6 +9,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | enum E2<T> { V2(Box<E2<E1>>, marker::PhantomData<T>), }
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/structs-enums/struct-enum-ignoring-field-with-underscore.stderr b/tests/ui/structs-enums/struct-enum-ignoring-field-with-underscore.stderr
index 2f3a150e5..664a00e33 100644
--- a/tests/ui/structs-enums/struct-enum-ignoring-field-with-underscore.stderr
+++ b/tests/ui/structs-enums/struct-enum-ignoring-field-with-underscore.stderr
@@ -9,5 +9,5 @@ help: to omit remaining fields, use `..`
LL | if let Some(Foo::Bar {..}) = foo {}
| ~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/structs-enums/struct-rec/issue-17431-1.stderr b/tests/ui/structs-enums/struct-rec/issue-17431-1.stderr
index e3af8976c..b28c3de24 100644
--- a/tests/ui/structs-enums/struct-rec/issue-17431-1.stderr
+++ b/tests/ui/structs-enums/struct-rec/issue-17431-1.stderr
@@ -9,6 +9,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | struct Foo { foo: Option<Option<Box<Foo>>> }
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/structs-enums/struct-rec/issue-17431-2.stderr b/tests/ui/structs-enums/struct-rec/issue-17431-2.stderr
index 39a99ec1e..cdf51632a 100644
--- a/tests/ui/structs-enums/struct-rec/issue-17431-2.stderr
+++ b/tests/ui/structs-enums/struct-rec/issue-17431-2.stderr
@@ -15,6 +15,6 @@ LL |
LL ~ struct Foo { q: Option<Box<Baz>> }
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/structs-enums/struct-rec/issue-17431-3.stderr b/tests/ui/structs-enums/struct-rec/issue-17431-3.stderr
index 394134c78..e788b2ed0 100644
--- a/tests/ui/structs-enums/struct-rec/issue-17431-3.stderr
+++ b/tests/ui/structs-enums/struct-rec/issue-17431-3.stderr
@@ -9,6 +9,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | struct Foo { foo: Mutex<Option<Box<Foo>>> }
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/structs-enums/struct-rec/issue-17431-4.stderr b/tests/ui/structs-enums/struct-rec/issue-17431-4.stderr
index 3d141e44b..3208effc0 100644
--- a/tests/ui/structs-enums/struct-rec/issue-17431-4.stderr
+++ b/tests/ui/structs-enums/struct-rec/issue-17431-4.stderr
@@ -9,6 +9,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | struct Foo<T> { foo: Option<Option<Box<Foo<T>>>>, marker: marker::PhantomData<T> }
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/structs-enums/struct-rec/issue-17431-5.stderr b/tests/ui/structs-enums/struct-rec/issue-17431-5.stderr
index 44a90a6fe..1b943bf89 100644
--- a/tests/ui/structs-enums/struct-rec/issue-17431-5.stderr
+++ b/tests/ui/structs-enums/struct-rec/issue-17431-5.stderr
@@ -9,6 +9,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | struct Bar<T> { x: Box<Bar<Foo>> , marker: marker::PhantomData<T> }
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/structs-enums/struct-rec/issue-74224.stderr b/tests/ui/structs-enums/struct-rec/issue-74224.stderr
index f1d50bc8a..550b078a6 100644
--- a/tests/ui/structs-enums/struct-rec/issue-74224.stderr
+++ b/tests/ui/structs-enums/struct-rec/issue-74224.stderr
@@ -12,6 +12,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | y: Box<A<A<T>>>,
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/structs-enums/struct-rec/issue-84611.stderr b/tests/ui/structs-enums/struct-rec/issue-84611.stderr
index 536f54e3e..2d971cfc8 100644
--- a/tests/ui/structs-enums/struct-rec/issue-84611.stderr
+++ b/tests/ui/structs-enums/struct-rec/issue-84611.stderr
@@ -12,6 +12,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | x: Box<Foo<[T; 1]>>,
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/structs-enums/type-sizes.rs b/tests/ui/structs-enums/type-sizes.rs
index 406e5c844..490d6a2f9 100644
--- a/tests/ui/structs-enums/type-sizes.rs
+++ b/tests/ui/structs-enums/type-sizes.rs
@@ -4,7 +4,6 @@
#![allow(dead_code)]
#![feature(never_type)]
#![feature(pointer_is_aligned)]
-#![feature(ptr_from_ref)]
#![feature(strict_provenance)]
use std::mem::size_of;
diff --git a/tests/ui/structs/incomplete-fn-in-struct-definition.stderr b/tests/ui/structs/incomplete-fn-in-struct-definition.stderr
index 0d12ba9c9..15850962b 100644
--- a/tests/ui/structs/incomplete-fn-in-struct-definition.stderr
+++ b/tests/ui/structs/incomplete-fn-in-struct-definition.stderr
@@ -11,5 +11,5 @@ help: escape `fn` to use it as an identifier
LL | r#fn: u8
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/structs/issue-80853.stderr b/tests/ui/structs/issue-80853.stderr
index 1c7d52b6d..9930efab7 100644
--- a/tests/ui/structs/issue-80853.stderr
+++ b/tests/ui/structs/issue-80853.stderr
@@ -8,6 +8,6 @@ LL | thing();
| |
| call expression requires function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0618`.
diff --git a/tests/ui/structs/method-chain-expression-failure.stderr b/tests/ui/structs/method-chain-expression-failure.stderr
index ba635ab1f..a0bcef6b0 100644
--- a/tests/ui/structs/method-chain-expression-failure.stderr
+++ b/tests/ui/structs/method-chain-expression-failure.stderr
@@ -10,6 +10,6 @@ LL | A.b().c().d().e().foo();
| | method `foo` is available on `&C`
| method `foo` is available on `&A`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/structs/multi-line-fru-suggestion.stderr b/tests/ui/structs/multi-line-fru-suggestion.stderr
index 8bbd3ace7..5b4b532fc 100644
--- a/tests/ui/structs/multi-line-fru-suggestion.stderr
+++ b/tests/ui/structs/multi-line-fru-suggestion.stderr
@@ -20,6 +20,6 @@ help: to set the remaining fields from `Default::default()`, separate the last n
LL | },
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0063`.
diff --git a/tests/ui/structs/struct-duplicate-comma.stderr b/tests/ui/structs/struct-duplicate-comma.stderr
index 834b3c5c1..4ac3fc9fe 100644
--- a/tests/ui/structs/struct-duplicate-comma.stderr
+++ b/tests/ui/structs/struct-duplicate-comma.stderr
@@ -9,5 +9,5 @@ LL | a: 0,,
| expected identifier
| help: remove this comma
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/structs/struct-fields-decl-dupe.stderr b/tests/ui/structs/struct-fields-decl-dupe.stderr
index d7ce9bb89..3c25708a3 100644
--- a/tests/ui/structs/struct-fields-decl-dupe.stderr
+++ b/tests/ui/structs/struct-fields-decl-dupe.stderr
@@ -6,6 +6,6 @@ LL | foo: isize,
LL | foo: isize,
| ^^^^^^^^^^ field already declared
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0124`.
diff --git a/tests/ui/structs/struct-fields-dupe.stderr b/tests/ui/structs/struct-fields-dupe.stderr
index aaf2533dc..ee3874347 100644
--- a/tests/ui/structs/struct-fields-dupe.stderr
+++ b/tests/ui/structs/struct-fields-dupe.stderr
@@ -6,6 +6,6 @@ LL | foo: 0,
LL | foo: 0
| ^^^ used more than once
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0062`.
diff --git a/tests/ui/structs/struct-fields-hints-no-dupe.stderr b/tests/ui/structs/struct-fields-hints-no-dupe.stderr
index 1a88f2693..2b88d8028 100644
--- a/tests/ui/structs/struct-fields-hints-no-dupe.stderr
+++ b/tests/ui/structs/struct-fields-hints-no-dupe.stderr
@@ -2,8 +2,13 @@ error[E0560]: struct `A` has no field named `bar`
--> $DIR/struct-fields-hints-no-dupe.rs:10:9
|
LL | bar : 42,
- | ^^^ help: a field with a similar name exists: `barr`
+ | ^^^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | barr : 42,
+ | ~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0560`.
diff --git a/tests/ui/structs/struct-fields-hints.stderr b/tests/ui/structs/struct-fields-hints.stderr
index 3b8a2b5c7..8217d7a6e 100644
--- a/tests/ui/structs/struct-fields-hints.stderr
+++ b/tests/ui/structs/struct-fields-hints.stderr
@@ -2,8 +2,13 @@ error[E0560]: struct `A` has no field named `bar`
--> $DIR/struct-fields-hints.rs:10:9
|
LL | bar : 42,
- | ^^^ help: a field with a similar name exists: `car`
+ | ^^^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | car : 42,
+ | ~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0560`.
diff --git a/tests/ui/structs/struct-fields-missing.stderr b/tests/ui/structs/struct-fields-missing.stderr
index b3e42a948..eba095fd3 100644
--- a/tests/ui/structs/struct-fields-missing.stderr
+++ b/tests/ui/structs/struct-fields-missing.stderr
@@ -4,6 +4,6 @@ error[E0063]: missing field `bar` in initializer of `BuildData`
LL | let foo = BuildData {
| ^^^^^^^^^ missing `bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0063`.
diff --git a/tests/ui/structs/struct-fields-shorthand-unresolved.stderr b/tests/ui/structs/struct-fields-shorthand-unresolved.stderr
index 09fc4f7ee..b485c17c1 100644
--- a/tests/ui/structs/struct-fields-shorthand-unresolved.stderr
+++ b/tests/ui/structs/struct-fields-shorthand-unresolved.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `y` in this scope
LL | y
| ^ help: a local variable with a similar name exists: `x`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/structs/struct-fields-shorthand.stderr b/tests/ui/structs/struct-fields-shorthand.stderr
index d89d45b39..c4d804aaf 100644
--- a/tests/ui/structs/struct-fields-shorthand.stderr
+++ b/tests/ui/structs/struct-fields-shorthand.stderr
@@ -6,6 +6,6 @@ LL | x, y, z
|
= note: all struct fields are already assigned
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0560`.
diff --git a/tests/ui/structs/struct-fields-too-many.stderr b/tests/ui/structs/struct-fields-too-many.stderr
index 9342607eb..838917474 100644
--- a/tests/ui/structs/struct-fields-too-many.stderr
+++ b/tests/ui/structs/struct-fields-too-many.stderr
@@ -6,6 +6,6 @@ LL | bar: 0
|
= note: all struct fields are already assigned
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0560`.
diff --git a/tests/ui/structs/struct-fields-typo.stderr b/tests/ui/structs/struct-fields-typo.stderr
index 6949a0a4a..d87bace72 100644
--- a/tests/ui/structs/struct-fields-typo.stderr
+++ b/tests/ui/structs/struct-fields-typo.stderr
@@ -2,8 +2,13 @@ error[E0609]: no field `baa` on type `BuildData`
--> $DIR/struct-fields-typo.rs:11:17
|
LL | let x = foo.baa;
- | ^^^ help: a field with a similar name exists: `bar`
+ | ^^^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | let x = foo.bar;
+ | ~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0609`.
diff --git a/tests/ui/structs/struct-missing-comma.stderr b/tests/ui/structs/struct-missing-comma.stderr
index eceec65e7..4fdd47a48 100644
--- a/tests/ui/structs/struct-missing-comma.stderr
+++ b/tests/ui/structs/struct-missing-comma.stderr
@@ -4,5 +4,5 @@ error: expected `,`, or `}`, found keyword `pub`
LL | pub foo: u32
| ^ help: try adding a comma: `,`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/structs/struct-pat-derived-error.stderr b/tests/ui/structs/struct-pat-derived-error.stderr
index a91e47657..78bb018cb 100644
--- a/tests/ui/structs/struct-pat-derived-error.stderr
+++ b/tests/ui/structs/struct-pat-derived-error.stderr
@@ -2,7 +2,12 @@ error[E0609]: no field `d` on type `&A`
--> $DIR/struct-pat-derived-error.rs:8:31
|
LL | let A { x, y } = self.d;
- | ^ help: a field with a similar name exists: `b`
+ | ^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | let A { x, y } = self.b;
+ | ~
error[E0026]: struct `A` does not have fields named `x`, `y`
--> $DIR/struct-pat-derived-error.rs:8:17
diff --git a/tests/ui/structs/struct-path-alias-bounds.stderr b/tests/ui/structs/struct-path-alias-bounds.stderr
index 5b01208c5..621496bb4 100644
--- a/tests/ui/structs/struct-path-alias-bounds.stderr
+++ b/tests/ui/structs/struct-path-alias-bounds.stderr
@@ -15,6 +15,6 @@ LL + #[derive(Clone)]
LL | struct NoClone;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/structs/struct-path-self-type-mismatch.stderr b/tests/ui/structs/struct-path-self-type-mismatch.stderr
index cddc13561..bbe5bae29 100644
--- a/tests/ui/structs/struct-path-self-type-mismatch.stderr
+++ b/tests/ui/structs/struct-path-self-type-mismatch.stderr
@@ -24,7 +24,9 @@ error[E0308]: mismatched types
--> $DIR/struct-path-self-type-mismatch.rs:13:9
|
LL | impl<T> Foo<T> {
- | - found type parameter
+ | - ------ this is the type of the `Self` literal
+ | |
+ | found type parameter
LL | fn new<U>(u: U) -> Foo<U> {
| - ------ expected `Foo<U>` because of return type
| |
@@ -40,6 +42,10 @@ LL | | }
found struct `Foo<T>`
= note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
= note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
+help: use the type name directly
+ |
+LL | Foo::<U> {
+ | ~~~~~~~~
error: aborting due to 3 previous errors
diff --git a/tests/ui/structs/suggest-private-fields.stderr b/tests/ui/structs/suggest-private-fields.stderr
index d628bd162..f67a4ed78 100644
--- a/tests/ui/structs/suggest-private-fields.stderr
+++ b/tests/ui/structs/suggest-private-fields.stderr
@@ -2,7 +2,12 @@ error[E0560]: struct `B` has no field named `aa`
--> $DIR/suggest-private-fields.rs:15:9
|
LL | aa: 20,
- | ^^ help: a field with a similar name exists: `a`
+ | ^^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | a: 20,
+ | ~
error[E0560]: struct `B` has no field named `bb`
--> $DIR/suggest-private-fields.rs:17:9
@@ -16,13 +21,23 @@ error[E0560]: struct `A` has no field named `aa`
--> $DIR/suggest-private-fields.rs:22:9
|
LL | aa: 20,
- | ^^ help: a field with a similar name exists: `a`
+ | ^^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | a: 20,
+ | ~
error[E0560]: struct `A` has no field named `bb`
--> $DIR/suggest-private-fields.rs:24:9
|
LL | bb: 20,
- | ^^ help: a field with a similar name exists: `b`
+ | ^^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | b: 20,
+ | ~
error: aborting due to 4 previous errors
diff --git a/tests/ui/structs/unresolved-struct-with-fru.stderr b/tests/ui/structs/unresolved-struct-with-fru.stderr
index a5796a222..9902c3ed3 100644
--- a/tests/ui/structs/unresolved-struct-with-fru.stderr
+++ b/tests/ui/structs/unresolved-struct-with-fru.stderr
@@ -4,6 +4,6 @@ error[E0422]: cannot find struct, variant or union type `Oops` in this scope
LL | let s2 = Oops { a: 2, ..s1 };
| ^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0422`.
diff --git a/tests/ui/suggestions/abi-typo.stderr b/tests/ui/suggestions/abi-typo.stderr
index 67a84f119..ea474e321 100644
--- a/tests/ui/suggestions/abi-typo.stderr
+++ b/tests/ui/suggestions/abi-typo.stderr
@@ -9,6 +9,6 @@ LL | extern "cdedl" fn cdedl() {}
|
= note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions.
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0703`.
diff --git a/tests/ui/suggestions/as-ref-2.stderr b/tests/ui/suggestions/as-ref-2.stderr
index e2129b450..309285775 100644
--- a/tests/ui/suggestions/as-ref-2.stderr
+++ b/tests/ui/suggestions/as-ref-2.stderr
@@ -12,7 +12,16 @@ LL | let _y = foo;
|
note: `Option::<T>::map` takes ownership of the receiver `self`, which moves `foo`
--> $SRC_DIR/core/src/option.rs:LL:COL
+help: you could `clone` the value and consume it, if the `Struct: Clone` trait bound could be satisfied
+ |
+LL | let _x: Option<Struct> = foo.clone().map(|s| bar(&s));
+ | ++++++++
+help: consider annotating `Struct` with `#[derive(Clone)]`
+ |
+LL + #[derive(Clone)]
+LL | struct Struct;
+ |
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/suggestions/as-ref.stderr b/tests/ui/suggestions/as-ref.stderr
index c5b2bb126..a42e2af31 100644
--- a/tests/ui/suggestions/as-ref.stderr
+++ b/tests/ui/suggestions/as-ref.stderr
@@ -78,8 +78,8 @@ LL | let y: Option<&usize> = x;
| |
| expected due to this
|
- = note: expected enum `Option<&usize>`
- found reference `&Option<usize>`
+ = note: expected enum `Option<&_>`
+ found reference `&Option<_>`
help: try using `.as_ref()` to convert `&Option<usize>` to `Option<&usize>`
|
LL | let y: Option<&usize> = x.as_ref();
@@ -93,8 +93,8 @@ LL | let y: Result<&usize, &usize> = x;
| |
| expected due to this
|
- = note: expected enum `Result<&usize, &usize>`
- found reference `&Result<usize, usize>`
+ = note: expected enum `Result<&_, &_>`
+ found reference `&Result<_, _>`
help: try using `.as_ref()` to convert `&Result<usize, usize>` to `Result<&usize, &usize>`
|
LL | let y: Result<&usize, &usize> = x.as_ref();
@@ -108,8 +108,8 @@ LL | let y: Result<&usize, usize> = x;
| |
| expected due to this
|
- = note: expected enum `Result<&usize, usize>`
- found reference `&Result<usize, usize>`
+ = note: expected enum `Result<&_, _>`
+ found reference `&Result<_, _>`
error[E0308]: mismatched types
--> $DIR/as-ref.rs:22:42
diff --git a/tests/ui/suggestions/assoc-const-as-field.stderr b/tests/ui/suggestions/assoc-const-as-field.stderr
index 78e5634b2..0f58ce650 100644
--- a/tests/ui/suggestions/assoc-const-as-field.stderr
+++ b/tests/ui/suggestions/assoc-const-as-field.stderr
@@ -4,6 +4,6 @@ error[E0423]: expected value, found struct `Mod::Foo`
LL | foo(Mod::Foo.Bar);
| ^^^^^^^^- help: use the path separator to refer to an item: `::`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0423`.
diff --git a/tests/ui/suggestions/assoc-const-as-fn.stderr b/tests/ui/suggestions/assoc-const-as-fn.stderr
index d55d968b6..69e9af726 100644
--- a/tests/ui/suggestions/assoc-const-as-fn.stderr
+++ b/tests/ui/suggestions/assoc-const-as-fn.stderr
@@ -9,6 +9,6 @@ help: consider further restricting this bound
LL | pub fn foo<T: UniformScalar + GlUniformScalar>(value: T) {
| +++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/assoc-const-without-self.stderr b/tests/ui/suggestions/assoc-const-without-self.stderr
index 05528d277..5a9fba8a0 100644
--- a/tests/ui/suggestions/assoc-const-without-self.stderr
+++ b/tests/ui/suggestions/assoc-const-without-self.stderr
@@ -9,6 +9,6 @@ help: consider using the associated constant on `Self`
LL | Self::A_CONST
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/suggestions/assoc-type-in-method-return.stderr b/tests/ui/suggestions/assoc-type-in-method-return.stderr
index df3828ad4..f83da7909 100644
--- a/tests/ui/suggestions/assoc-type-in-method-return.stderr
+++ b/tests/ui/suggestions/assoc-type-in-method-return.stderr
@@ -9,6 +9,6 @@ help: you might have meant to use the associated type
LL | fn to_bla(&self) -> Self::Bla;
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/suggestions/bad-infer-in-trait-impl.stderr b/tests/ui/suggestions/bad-infer-in-trait-impl.stderr
index 418690ff8..d96ee33a9 100644
--- a/tests/ui/suggestions/bad-infer-in-trait-impl.stderr
+++ b/tests/ui/suggestions/bad-infer-in-trait-impl.stderr
@@ -9,6 +9,6 @@ help: use type parameters instead
LL | fn bar<T>(s: T) {}
| +++ ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/ui/suggestions/box-future-wrong-output.stderr b/tests/ui/suggestions/box-future-wrong-output.stderr
index e0c57af25..6a232c344 100644
--- a/tests/ui/suggestions/box-future-wrong-output.stderr
+++ b/tests/ui/suggestions/box-future-wrong-output.stderr
@@ -9,6 +9,6 @@ LL | let _: BoxFuture<'static, bool> = async {}.boxed();
= note: expected struct `Pin<Box<(dyn Future<Output = bool> + Send + 'static)>>`
found struct `Pin<Box<dyn Future<Output = ()> + Send>>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/boxed-variant-field.stderr b/tests/ui/suggestions/boxed-variant-field.stderr
index 1adbc0540..c5fe9630b 100644
--- a/tests/ui/suggestions/boxed-variant-field.stderr
+++ b/tests/ui/suggestions/boxed-variant-field.stderr
@@ -18,6 +18,6 @@ help: consider unboxing the value
LL | Ty::List(elem) => foo(*elem),
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/call-boxed.stderr b/tests/ui/suggestions/call-boxed.stderr
index 11823ff09..08fa1a698 100644
--- a/tests/ui/suggestions/call-boxed.stderr
+++ b/tests/ui/suggestions/call-boxed.stderr
@@ -15,6 +15,6 @@ help: use parentheses to call this closure
LL | x = y();
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/call-on-missing.stderr b/tests/ui/suggestions/call-on-missing.stderr
index ca9abc7e9..1bab075dc 100644
--- a/tests/ui/suggestions/call-on-missing.stderr
+++ b/tests/ui/suggestions/call-on-missing.stderr
@@ -13,7 +13,7 @@ error[E0609]: no field `i` on type `fn() -> Foo {foo}`
--> $DIR/call-on-missing.rs:16:9
|
LL | foo.i;
- | ^
+ | ^ unknown field
|
help: use parentheses to call this function
|
@@ -62,7 +62,7 @@ LL | fn type_param<T: Fn() -> Foo>(t: T) {
| - type parameter 'T' declared here
...
LL | t.i;
- | ^
+ | ^ unknown field
|
help: use parentheses to call this type parameter
|
diff --git a/tests/ui/suggestions/call-on-unimplemented-ctor.stderr b/tests/ui/suggestions/call-on-unimplemented-ctor.stderr
index 58612cbfb..4124a0061 100644
--- a/tests/ui/suggestions/call-on-unimplemented-ctor.stderr
+++ b/tests/ui/suggestions/call-on-unimplemented-ctor.stderr
@@ -16,6 +16,6 @@ help: use parentheses to construct this tuple struct
LL | insert_resource(Time(/* u32 */));
| +++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/call-on-unimplemented-fn-ptr.stderr b/tests/ui/suggestions/call-on-unimplemented-fn-ptr.stderr
index 167f7e592..f20596a80 100644
--- a/tests/ui/suggestions/call-on-unimplemented-fn-ptr.stderr
+++ b/tests/ui/suggestions/call-on-unimplemented-fn-ptr.stderr
@@ -16,6 +16,6 @@ help: use parentheses to call this function pointer
LL | needs_bar(f());
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/call-on-unimplemented-with-autoderef.stderr b/tests/ui/suggestions/call-on-unimplemented-with-autoderef.stderr
index 90f44cce0..f804c66aa 100644
--- a/tests/ui/suggestions/call-on-unimplemented-with-autoderef.stderr
+++ b/tests/ui/suggestions/call-on-unimplemented-with-autoderef.stderr
@@ -16,6 +16,6 @@ help: use parentheses to call this trait object
LL | needs_foo(x());
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.stderr b/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.stderr
index 8c973995c..afbb9c32d 100644
--- a/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.stderr
+++ b/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.stderr
@@ -8,8 +8,8 @@ LL | fn wat<T>(t: &T) -> T {
LL | t.clone()
| ^^^^^^^^^ expected type parameter `T`, found `&T`
|
- = note: expected type parameter `T`
- found reference `&T`
+ = note: expected type parameter `_`
+ found reference `&_`
note: `T` does not implement `Clone`, so `&T` was cloned instead
--> $DIR/clone-on-unconstrained-borrowed-type-param.rs:3:5
|
diff --git a/tests/ui/suggestions/const-in-struct-pat.stderr b/tests/ui/suggestions/const-in-struct-pat.stderr
index f344ac06d..d4056e09c 100644
--- a/tests/ui/suggestions/const-in-struct-pat.stderr
+++ b/tests/ui/suggestions/const-in-struct-pat.stderr
@@ -15,6 +15,6 @@ help: bind the struct field to a different name instead
LL | let Thing { foo: other_foo } = t;
| +++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/const-pat-non-exaustive-let-new-var.stderr b/tests/ui/suggestions/const-pat-non-exaustive-let-new-var.stderr
index 9ee3e6eb2..b6c286128 100644
--- a/tests/ui/suggestions/const-pat-non-exaustive-let-new-var.stderr
+++ b/tests/ui/suggestions/const-pat-non-exaustive-let-new-var.stderr
@@ -12,6 +12,6 @@ LL | let A = 3;
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
= note: the matched value is of type `i32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0005`.
diff --git a/tests/ui/suggestions/constrain-suggest-ice.stderr b/tests/ui/suggestions/constrain-suggest-ice.stderr
index 9b92091de..96f1f8605 100644
--- a/tests/ui/suggestions/constrain-suggest-ice.stderr
+++ b/tests/ui/suggestions/constrain-suggest-ice.stderr
@@ -9,5 +9,5 @@ LL | A: [(); {
LL | }
| ^ mismatched closing delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/suggestions/core-std-import-order-issue-83564.stderr b/tests/ui/suggestions/core-std-import-order-issue-83564.stderr
index 48ee44a74..c2634e307 100644
--- a/tests/ui/suggestions/core-std-import-order-issue-83564.stderr
+++ b/tests/ui/suggestions/core-std-import-order-issue-83564.stderr
@@ -11,6 +11,6 @@ LL + use core::num::NonZeroU32;
LL + use std::num::NonZeroU32;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.stderr b/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.stderr
index 2298e7f4e..2cd3fba87 100644
--- a/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.stderr
+++ b/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.stderr
@@ -17,6 +17,6 @@ help: consider introducing a `where` clause, but there might be an alternative b
LL | fn foo<T: Foo>() where for<'a> &'a T: Bar {}
| ++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/crate-or-module-typo.rs b/tests/ui/suggestions/crate-or-module-typo.rs
index 2471b11c6..b12ad495e 100644
--- a/tests/ui/suggestions/crate-or-module-typo.rs
+++ b/tests/ui/suggestions/crate-or-module-typo.rs
@@ -3,7 +3,7 @@
use st::cell::Cell; //~ ERROR failed to resolve: use of undeclared crate or module `st`
mod bar {
- pub fn bar() { bar::baz(); } //~ ERROR failed to resolve: use of undeclared crate or module `bar`
+ pub fn bar() { bar::baz(); } //~ ERROR failed to resolve: function `bar` is not a crate or module
fn baz() {}
}
diff --git a/tests/ui/suggestions/crate-or-module-typo.stderr b/tests/ui/suggestions/crate-or-module-typo.stderr
index 9ece31e76..457d77906 100644
--- a/tests/ui/suggestions/crate-or-module-typo.stderr
+++ b/tests/ui/suggestions/crate-or-module-typo.stderr
@@ -42,11 +42,11 @@ LL - bar: st::cell::Cell<bool>
LL + bar: cell::Cell<bool>
|
-error[E0433]: failed to resolve: use of undeclared crate or module `bar`
+error[E0433]: failed to resolve: function `bar` is not a crate or module
--> $DIR/crate-or-module-typo.rs:6:20
|
LL | pub fn bar() { bar::baz(); }
- | ^^^ use of undeclared crate or module `bar`
+ | ^^^ function `bar` is not a crate or module
error: aborting due to 4 previous errors
diff --git a/tests/ui/suggestions/deref-path-method.stderr b/tests/ui/suggestions/deref-path-method.stderr
index 0372a7e6c..a2b68fa96 100644
--- a/tests/ui/suggestions/deref-path-method.stderr
+++ b/tests/ui/suggestions/deref-path-method.stderr
@@ -16,6 +16,6 @@ help: the function `contains` is implemented on `[_]`
LL | <[_]>::contains(&vec, &0);
| ~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/suggestions/derive-clone-for-eq.fixed b/tests/ui/suggestions/derive-clone-for-eq.fixed
index f07784d53..a74487019 100644
--- a/tests/ui/suggestions/derive-clone-for-eq.fixed
+++ b/tests/ui/suggestions/derive-clone-for-eq.fixed
@@ -1,8 +1,6 @@
// run-rustfix
// https://github.com/rust-lang/rust/issues/79076
-use std::cmp::PartialEq;
-
#[derive(Clone, Eq)] //~ ERROR [E0277]
pub struct Struct<T: std::clone::Clone>(T);
diff --git a/tests/ui/suggestions/derive-clone-for-eq.rs b/tests/ui/suggestions/derive-clone-for-eq.rs
index 15c0d4659..99956ed98 100644
--- a/tests/ui/suggestions/derive-clone-for-eq.rs
+++ b/tests/ui/suggestions/derive-clone-for-eq.rs
@@ -1,8 +1,6 @@
// run-rustfix
// https://github.com/rust-lang/rust/issues/79076
-use std::cmp::PartialEq;
-
#[derive(Clone, Eq)] //~ ERROR [E0277]
pub struct Struct<T>(T);
diff --git a/tests/ui/suggestions/derive-clone-for-eq.stderr b/tests/ui/suggestions/derive-clone-for-eq.stderr
index 9d843c251..680890e88 100644
--- a/tests/ui/suggestions/derive-clone-for-eq.stderr
+++ b/tests/ui/suggestions/derive-clone-for-eq.stderr
@@ -1,11 +1,11 @@
error[E0277]: the trait bound `T: Clone` is not satisfied
- --> $DIR/derive-clone-for-eq.rs:6:17
+ --> $DIR/derive-clone-for-eq.rs:4:17
|
LL | #[derive(Clone, Eq)]
| ^^ the trait `Clone` is not implemented for `T`
|
note: required for `Struct<T>` to implement `PartialEq`
- --> $DIR/derive-clone-for-eq.rs:9:19
+ --> $DIR/derive-clone-for-eq.rs:7:19
|
LL | impl<T: Clone, U> PartialEq<U> for Struct<T>
| ----- ^^^^^^^^^^^^ ^^^^^^^^^
@@ -19,6 +19,6 @@ help: consider restricting type parameter `T`
LL | pub struct Struct<T: std::clone::Clone>(T);
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr b/tests/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr
index c6867270a..46613e8e1 100644
--- a/tests/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr
+++ b/tests/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr
@@ -8,6 +8,6 @@ LL | | };
|
= note: this error originates in the macro `format` which comes from the expansion of the macro `intrinsic_match` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-child.stderr b/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-child.stderr
index 866d3fab4..00d001f6b 100644
--- a/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-child.stderr
+++ b/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-child.stderr
@@ -13,6 +13,6 @@ help: try wrapping the expression in `hidden_child::__private::Some`
LL | let x: Option<i32> = hidden_child::__private::Some(1i32);
| ++++++++++++++++++++++++++++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-parent.stderr b/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-parent.stderr
index f8029e452..ef0828270 100644
--- a/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-parent.stderr
+++ b/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-parent.stderr
@@ -13,6 +13,6 @@ help: try wrapping the expression in `Some`
LL | let x: Option<i32> = Some(1i32);
| +++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/dont-suggest-pin-array-dot-set.stderr b/tests/ui/suggestions/dont-suggest-pin-array-dot-set.stderr
index c66da3ea6..8f738465d 100644
--- a/tests/ui/suggestions/dont-suggest-pin-array-dot-set.stderr
+++ b/tests/ui/suggestions/dont-suggest-pin-array-dot-set.stderr
@@ -4,6 +4,6 @@ error[E0599]: no method named `set` found for array `[u8; 1]` in the current sco
LL | a.set(0, 3);
| ^^^ help: there is a method with a similar name: `get`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/suggestions/dont-suggest-try_into-in-macros.stderr b/tests/ui/suggestions/dont-suggest-try_into-in-macros.stderr
index 319d86600..348f7e00d 100644
--- a/tests/ui/suggestions/dont-suggest-try_into-in-macros.stderr
+++ b/tests/ui/suggestions/dont-suggest-try_into-in-macros.stderr
@@ -9,6 +9,6 @@ help: change the type of the numeric literal from `usize` to `u64`
LL | assert_eq!(10u64, 10u64);
| ~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/dont-suggest-ufcs-for-const.stderr b/tests/ui/suggestions/dont-suggest-ufcs-for-const.stderr
index 0d9543e0b..6aa187bfb 100644
--- a/tests/ui/suggestions/dont-suggest-ufcs-for-const.stderr
+++ b/tests/ui/suggestions/dont-suggest-ufcs-for-const.stderr
@@ -4,6 +4,6 @@ error[E0599]: no method named `MAX` found for type `u32` in the current scope
LL | 1_u32.MAX();
| ^^^ method not found in `u32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/suggestions/dont-wrap-ambiguous-receivers.stderr b/tests/ui/suggestions/dont-wrap-ambiguous-receivers.stderr
index 85fbb8b88..974aedd13 100644
--- a/tests/ui/suggestions/dont-wrap-ambiguous-receivers.stderr
+++ b/tests/ui/suggestions/dont-wrap-ambiguous-receivers.stderr
@@ -15,6 +15,6 @@ LL + use banana::Apple;
LL + use banana::Peach;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/suggestions/enum-variant-arg-mismatch.stderr b/tests/ui/suggestions/enum-variant-arg-mismatch.stderr
index f76019b70..16f03d16d 100644
--- a/tests/ui/suggestions/enum-variant-arg-mismatch.stderr
+++ b/tests/ui/suggestions/enum-variant-arg-mismatch.stderr
@@ -16,7 +16,11 @@ note: required by a bound in `map`
|
LL | fn map<'a, F: Fn(String) -> Sexpr<'a>>(f: F) {}
| ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map`
+help: consider wrapping the function in a closure
+ |
+LL | map(|arg0: String| Sexpr::Ident(/* &str */));
+ | ++++++++++++++ ++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0631`.
diff --git a/tests/ui/suggestions/field-access-considering-privacy.stderr b/tests/ui/suggestions/field-access-considering-privacy.stderr
index cbf6f3d10..2b1f45923 100644
--- a/tests/ui/suggestions/field-access-considering-privacy.stderr
+++ b/tests/ui/suggestions/field-access-considering-privacy.stderr
@@ -9,6 +9,6 @@ help: one of the expressions' fields has a field of the same name
LL | tcx.sess.opts;
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0609`.
diff --git a/tests/ui/suggestions/field-has-method.stderr b/tests/ui/suggestions/field-has-method.stderr
index def164017..daff2db64 100644
--- a/tests/ui/suggestions/field-has-method.stderr
+++ b/tests/ui/suggestions/field-has-method.stderr
@@ -12,6 +12,6 @@ help: one of the expressions' fields has a method of the same name
LL | let k = i.value.kind();
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/suggestions/fn-needing-specified-return-type-param.stderr b/tests/ui/suggestions/fn-needing-specified-return-type-param.stderr
index 9dea667fb..47a7ac895 100644
--- a/tests/ui/suggestions/fn-needing-specified-return-type-param.stderr
+++ b/tests/ui/suggestions/fn-needing-specified-return-type-param.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic argument
LL | let _ = f::<A>;
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr b/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr
index fc5a52174..2733bbff3 100644
--- a/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr
+++ b/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr
@@ -17,6 +17,6 @@ LL | where
LL | for<'b> &'b X: Trait,
| ^^^^^ required by this bound in `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/imm-ref-trait-object.stderr b/tests/ui/suggestions/imm-ref-trait-object.stderr
index f7f7902c1..6cd21fcab 100644
--- a/tests/ui/suggestions/imm-ref-trait-object.stderr
+++ b/tests/ui/suggestions/imm-ref-trait-object.stderr
@@ -9,5 +9,5 @@ help: you need `&mut dyn Iterator<Item = &u64>` instead of `&dyn Iterator<Item =
LL | fn test(t: &mut dyn Iterator<Item=&u64>) -> u64 {
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr b/tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr
index 50806a672..2dfaa7311 100644
--- a/tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr
+++ b/tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr
@@ -5,10 +5,19 @@ LL | fn g(mut x: impl Iterator<Item = &()>) -> Option<&()> { x.next() }
| ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
LL | fn g(mut x: impl Iterator<Item = &()>) -> Option<&'static ()> { x.next() }
| +++++++
+help: consider introducing a named lifetime parameter
+ |
+LL | fn g<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&'a ()> { x.next() }
+ | ++++ ~~~ ~~~
+help: alternatively, you might want to return an owned value
+ |
+LL - fn g(mut x: impl Iterator<Item = &()>) -> Option<&()> { x.next() }
+LL + fn g(mut x: impl Iterator<Item = &()>) -> Option<()> { x.next() }
+ |
error[E0106]: missing lifetime specifier
--> $DIR/impl-trait-missing-lifetime-gated.rs:19:60
@@ -17,10 +26,19 @@ LL | async fn i(mut x: impl Iterator<Item = &()>) -> Option<&()> { x.next()
| ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
LL | async fn i(mut x: impl Iterator<Item = &()>) -> Option<&'static ()> { x.next() }
| +++++++
+help: consider introducing a named lifetime parameter
+ |
+LL | async fn i<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&'a ()> { x.next() }
+ | ++++ ~~~ ~~~
+help: alternatively, you might want to return an owned value
+ |
+LL - async fn i(mut x: impl Iterator<Item = &()>) -> Option<&()> { x.next() }
+LL + async fn i(mut x: impl Iterator<Item = &()>) -> Option<()> { x.next() }
+ |
error[E0106]: missing lifetime specifier
--> $DIR/impl-trait-missing-lifetime-gated.rs:27:58
@@ -29,10 +47,19 @@ LL | fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next()
| ^^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
|
LL | fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'static ()> { x.next() }
| ~~~~~~~
+help: consider introducing a named lifetime parameter
+ |
+LL | fn g<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&'a ()> { x.next() }
+ | ++++ ~~~ ~~~
+help: alternatively, you might want to return an owned value
+ |
+LL - fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
+LL + fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<()> { x.next() }
+ |
error[E0106]: missing lifetime specifier
--> $DIR/impl-trait-missing-lifetime-gated.rs:37:64
@@ -41,10 +68,19 @@ LL | async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.n
| ^^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
|
LL | async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'static ()> { x.next() }
| ~~~~~~~
+help: consider introducing a named lifetime parameter
+ |
+LL | async fn i<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&'a ()> { x.next() }
+ | ++++ ~~~ ~~~
+help: alternatively, you might want to return an owned value
+ |
+LL - async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
+LL + async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<()> { x.next() }
+ |
error[E0106]: missing lifetime specifier
--> $DIR/impl-trait-missing-lifetime-gated.rs:47:37
@@ -53,10 +89,19 @@ LL | fn g(mut x: impl Foo) -> Option<&()> { x.next() }
| ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
LL | fn g(mut x: impl Foo) -> Option<&'static ()> { x.next() }
| +++++++
+help: consider introducing a named lifetime parameter
+ |
+LL | fn g<'a>(mut x: impl Foo) -> Option<&'a ()> { x.next() }
+ | ++++ ~~~
+help: alternatively, you might want to return an owned value
+ |
+LL - fn g(mut x: impl Foo) -> Option<&()> { x.next() }
+LL + fn g(mut x: impl Foo) -> Option<()> { x.next() }
+ |
error[E0106]: missing lifetime specifier
--> $DIR/impl-trait-missing-lifetime-gated.rs:58:41
@@ -65,10 +110,19 @@ LL | fn g(mut x: impl Foo<()>) -> Option<&()> { x.next() }
| ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
LL | fn g(mut x: impl Foo<()>) -> Option<&'static ()> { x.next() }
| +++++++
+help: consider introducing a named lifetime parameter
+ |
+LL | fn g<'a>(mut x: impl Foo<()>) -> Option<&'a ()> { x.next() }
+ | ++++ ~~~
+help: alternatively, you might want to return an owned value
+ |
+LL - fn g(mut x: impl Foo<()>) -> Option<&()> { x.next() }
+LL + fn g(mut x: impl Foo<()>) -> Option<()> { x.next() }
+ |
error[E0658]: anonymous lifetimes in `impl Trait` are unstable
--> $DIR/impl-trait-missing-lifetime-gated.rs:6:35
diff --git a/tests/ui/suggestions/impl-trait-missing-lifetime.stderr b/tests/ui/suggestions/impl-trait-missing-lifetime.stderr
index 2c29cfa0b..c1dbaae06 100644
--- a/tests/ui/suggestions/impl-trait-missing-lifetime.stderr
+++ b/tests/ui/suggestions/impl-trait-missing-lifetime.stderr
@@ -5,10 +5,19 @@ LL | fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
| ^^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
|
LL | fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'static ()> { x.next() }
| ~~~~~~~
+help: consider introducing a named lifetime parameter
+ |
+LL | fn g<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&'a ()> { x.next() }
+ | ++++ ~~~ ~~~
+help: alternatively, you might want to return an owned value
+ |
+LL - fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
+LL + fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<()> { x.next() }
+ |
error[E0106]: missing lifetime specifier
--> $DIR/impl-trait-missing-lifetime.rs:16:60
@@ -17,10 +26,19 @@ LL | async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next(
| ^^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
|
LL | async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'static ()> { x.next() }
| ~~~~~~~
+help: consider introducing a named lifetime parameter
+ |
+LL | async fn i<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&'a ()> { x.next() }
+ | ++++ ~~~ ~~~
+help: alternatively, you might want to return an owned value
+ |
+LL - async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
+LL + async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<()> { x.next() }
+ |
error: lifetime may not live long enough
--> $DIR/impl-trait-missing-lifetime.rs:16:69
diff --git a/tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.stderr b/tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.stderr
index 20f8e65f7..3a6052448 100644
--- a/tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.stderr
+++ b/tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.stderr
@@ -12,6 +12,6 @@ help: the following trait defines an item `hello`, perhaps you need to restrict
LL | fn test(foo: impl Foo + Bar) {
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/suggestions/import-trait-for-method-call.rs b/tests/ui/suggestions/import-trait-for-method-call.rs
index 4dbadbdf9..feb2c7e84 100644
--- a/tests/ui/suggestions/import-trait-for-method-call.rs
+++ b/tests/ui/suggestions/import-trait-for-method-call.rs
@@ -1,7 +1,7 @@
use std::hash::BuildHasher;
fn next_u64() -> u64 {
- let bh = std::collections::hash_map::RandomState::new();
+ let bh = std::hash::RandomState::new();
let h = bh.build_hasher();
h.finish() //~ ERROR no method named `finish` found for struct `DefaultHasher`
}
diff --git a/tests/ui/suggestions/into-str.stderr b/tests/ui/suggestions/into-str.stderr
index 7e24150e7..d6efc8173 100644
--- a/tests/ui/suggestions/into-str.stderr
+++ b/tests/ui/suggestions/into-str.stderr
@@ -21,6 +21,6 @@ note: required by a bound in `foo`
LL | fn foo<'a, T>(_t: T) where T: Into<&'a str> {}
| ^^^^^^^^^^^^^ required by this bound in `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/invalid-bin-op.stderr b/tests/ui/suggestions/invalid-bin-op.stderr
index 570afcea6..2bd745c64 100644
--- a/tests/ui/suggestions/invalid-bin-op.stderr
+++ b/tests/ui/suggestions/invalid-bin-op.stderr
@@ -16,11 +16,7 @@ help: consider annotating `S<T>` with `#[derive(PartialEq)]`
LL + #[derive(PartialEq)]
LL | struct S<T>(T);
|
-help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
- |
-LL | pub fn foo<T>(s: S<T>, t: S<T>) where S<T>: PartialEq {
- | +++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/suggestions/issue-101065.stderr b/tests/ui/suggestions/issue-101065.stderr
index 9f77ead42..8a7ecc801 100644
--- a/tests/ui/suggestions/issue-101065.stderr
+++ b/tests/ui/suggestions/issue-101065.stderr
@@ -18,6 +18,6 @@ help: try wrapping the expression in `FakeResult::Ok`
LL | FakeResult::Ok(FakeResult::Ok(()))
| +++++++++++++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/issue-101421.stderr b/tests/ui/suggestions/issue-101421.stderr
index 2656ab3db..ececba5fb 100644
--- a/tests/ui/suggestions/issue-101421.stderr
+++ b/tests/ui/suggestions/issue-101421.stderr
@@ -12,6 +12,6 @@ note: method defined here, with 0 generic parameters
LL | fn f(&self, _: ());
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/suggestions/issue-101465.stderr b/tests/ui/suggestions/issue-101465.stderr
index 2aec3c863..0dad813b3 100644
--- a/tests/ui/suggestions/issue-101465.stderr
+++ b/tests/ui/suggestions/issue-101465.stderr
@@ -20,6 +20,6 @@ LL ~ true => Box::new(B),
LL ~ false => Box::new(C),
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/issue-101623.stderr b/tests/ui/suggestions/issue-101623.stderr
index 9f00de174..4de91a1b9 100644
--- a/tests/ui/suggestions/issue-101623.stderr
+++ b/tests/ui/suggestions/issue-101623.stderr
@@ -10,6 +10,6 @@ LL | Trait::do_stuff({ fun(&mut *inner) });
= help: the trait `Trait<'_>` is implemented for `()`
= help: for that trait implementation, expected `()`, found `*mut ()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/issue-101984.stderr b/tests/ui/suggestions/issue-101984.stderr
index 151587d42..c19cda204 100644
--- a/tests/ui/suggestions/issue-101984.stderr
+++ b/tests/ui/suggestions/issue-101984.stderr
@@ -9,6 +9,6 @@ LL | let (cmp, router) = self.router.at()?;
= note: expected struct `Match<&(for<'a> fn(&'a ()), Box<Wrapper>)>`
found tuple `(_, _)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/issue-102354.stderr b/tests/ui/suggestions/issue-102354.stderr
index 08d4b9955..8340d9340 100644
--- a/tests/ui/suggestions/issue-102354.stderr
+++ b/tests/ui/suggestions/issue-102354.stderr
@@ -14,6 +14,6 @@ note: the candidate is defined in the trait `Trait`
LL | fn func() {}
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/suggestions/issue-103112.stderr b/tests/ui/suggestions/issue-103112.stderr
index 4ca7fdf9b..b7de57bfd 100644
--- a/tests/ui/suggestions/issue-103112.stderr
+++ b/tests/ui/suggestions/issue-103112.stderr
@@ -10,6 +10,6 @@ LL - std::process::abort!();
LL + std::process::abort();
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/suggestions/issue-103646.stderr b/tests/ui/suggestions/issue-103646.stderr
index 3ae9813d4..8d0e86523 100644
--- a/tests/ui/suggestions/issue-103646.stderr
+++ b/tests/ui/suggestions/issue-103646.stderr
@@ -16,6 +16,6 @@ note: the candidate is defined in the trait `Cat`
LL | fn nya() {}
| ^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/suggestions/issue-104327.stderr b/tests/ui/suggestions/issue-104327.stderr
index acec3a55d..325b6b6eb 100644
--- a/tests/ui/suggestions/issue-104327.stderr
+++ b/tests/ui/suggestions/issue-104327.stderr
@@ -12,6 +12,6 @@ help: use the fully-qualified path to the only available implementation
LL | <(dyn Bar + 'static) as Foo>::f();
| +++++++++++++++++++++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0790`.
diff --git a/tests/ui/suggestions/issue-104328.stderr b/tests/ui/suggestions/issue-104328.stderr
index b31b84781..a59262183 100644
--- a/tests/ui/suggestions/issue-104328.stderr
+++ b/tests/ui/suggestions/issue-104328.stderr
@@ -12,6 +12,6 @@ help: use the fully-qualified path to the only available implementation
LL | <(dyn Sized + 'static) as Foo>::f();
| +++++++++++++++++++++++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0790`.
diff --git a/tests/ui/suggestions/issue-105645.stderr b/tests/ui/suggestions/issue-105645.stderr
index 895f5ffd1..f717f8f4e 100644
--- a/tests/ui/suggestions/issue-105645.stderr
+++ b/tests/ui/suggestions/issue-105645.stderr
@@ -13,6 +13,6 @@ note: required by a bound in `foo`
LL | fn foo(_: &mut impl std::io::Write) {}
| ^^^^^^^^^^^^^^ required by this bound in `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/issue-107860.stderr b/tests/ui/suggestions/issue-107860.stderr
index 92e3cf8c4..4be495da4 100644
--- a/tests/ui/suggestions/issue-107860.stderr
+++ b/tests/ui/suggestions/issue-107860.stderr
@@ -7,6 +7,6 @@ LL | async fn str<T>(T: &str) -> &str { &str }
= note: expected reference `&str`
found reference `&for<'a> fn(&'a str) -> impl Future<Output = &'a str> {str::<_>}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/issue-109291.stderr b/tests/ui/suggestions/issue-109291.stderr
index 644841fdf..c787be4de 100644
--- a/tests/ui/suggestions/issue-109291.stderr
+++ b/tests/ui/suggestions/issue-109291.stderr
@@ -14,6 +14,6 @@ note: if you're trying to build a new `Backtrace` consider using one of the foll
Backtrace::create
--> $SRC_DIR/std/src/backtrace.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/suggestions/issue-109436.stderr b/tests/ui/suggestions/issue-109436.stderr
index c479326f9..4425ce84b 100644
--- a/tests/ui/suggestions/issue-109436.stderr
+++ b/tests/ui/suggestions/issue-109436.stderr
@@ -10,6 +10,6 @@ help: consider borrowing here
LL | let b: Bar = (&foo).into();
| ++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/issue-109854.stderr b/tests/ui/suggestions/issue-109854.stderr
index 621a38971..52444cd4c 100644
--- a/tests/ui/suggestions/issue-109854.stderr
+++ b/tests/ui/suggestions/issue-109854.stderr
@@ -26,6 +26,6 @@ LL - generate_setter,
LL + /* usize */,
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0061`.
diff --git a/tests/ui/suggestions/issue-114701.stderr b/tests/ui/suggestions/issue-114701.stderr
index 67462a09c..d2a7806b7 100644
--- a/tests/ui/suggestions/issue-114701.stderr
+++ b/tests/ui/suggestions/issue-114701.stderr
@@ -10,6 +10,6 @@ LL | assert!(if let Enum::$variant::<()> $matcher = $expr () { true } el
LL | is_variant!(UVariant, Enum::<()>::UVariant);
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0618`.
diff --git a/tests/ui/suggestions/issue-117669.rs b/tests/ui/suggestions/issue-117669.rs
new file mode 100644
index 000000000..09b4f2bd4
--- /dev/null
+++ b/tests/ui/suggestions/issue-117669.rs
@@ -0,0 +1,4 @@
+fn main() {
+ let abs: i32 = 3i32.checked_abs();
+ //~^ ERROR mismatched types
+}
diff --git a/tests/ui/suggestions/issue-117669.stderr b/tests/ui/suggestions/issue-117669.stderr
new file mode 100644
index 000000000..01783ea4e
--- /dev/null
+++ b/tests/ui/suggestions/issue-117669.stderr
@@ -0,0 +1,18 @@
+error[E0308]: mismatched types
+ --> $DIR/issue-117669.rs:2:20
+ |
+LL | let abs: i32 = 3i32.checked_abs();
+ | --- ^^^^^^^^^^^^^^^^^^ expected `i32`, found `Option<i32>`
+ | |
+ | expected due to this
+ |
+ = note: expected type `i32`
+ found enum `Option<i32>`
+help: consider using `Option::expect` to unwrap the `Option<i32>` value, panicking if the value is an `Option::None`
+ |
+LL | let abs: i32 = 3i32.checked_abs().expect("REASON");
+ | +++++++++++++++++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/issue-51055-missing-semicolon-between-call-and-tuple.stderr b/tests/ui/suggestions/issue-51055-missing-semicolon-between-call-and-tuple.stderr
index bb8b9b370..3c3bc2305 100644
--- a/tests/ui/suggestions/issue-51055-missing-semicolon-between-call-and-tuple.stderr
+++ b/tests/ui/suggestions/issue-51055-missing-semicolon-between-call-and-tuple.stderr
@@ -11,6 +11,6 @@ LL | vindictive()
LL | | (1, 2)
| |__________- call expression requires function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0618`.
diff --git a/tests/ui/suggestions/issue-61226.stderr b/tests/ui/suggestions/issue-61226.stderr
index cda962a90..890950b1a 100644
--- a/tests/ui/suggestions/issue-61226.stderr
+++ b/tests/ui/suggestions/issue-61226.stderr
@@ -7,6 +7,6 @@ LL | fn main() {
LL | let _ = vec![X]; //…
| ^ help: use struct literal syntax instead: `X {}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0423`.
diff --git a/tests/ui/suggestions/issue-62843.stderr b/tests/ui/suggestions/issue-62843.stderr
index ead8f1854..f3a9f6b79 100644
--- a/tests/ui/suggestions/issue-62843.stderr
+++ b/tests/ui/suggestions/issue-62843.stderr
@@ -15,6 +15,6 @@ help: consider borrowing here
LL | println!("{:?}", line.find(&pattern));
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/issue-66968-suggest-sorted-words.stderr b/tests/ui/suggestions/issue-66968-suggest-sorted-words.stderr
index d7b33ea41..ce0087fbf 100644
--- a/tests/ui/suggestions/issue-66968-suggest-sorted-words.stderr
+++ b/tests/ui/suggestions/issue-66968-suggest-sorted-words.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find value `a_variable_longer_name` in this scope
LL | println!("{}", a_variable_longer_name);
| ^^^^^^^^^^^^^^^^^^^^^^ help: a local variable with a similar name exists: `a_longer_variable_name`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/suggestions/issue-68049-1.stderr b/tests/ui/suggestions/issue-68049-1.stderr
index 7f931f0cd..760f83d54 100644
--- a/tests/ui/suggestions/issue-68049-1.stderr
+++ b/tests/ui/suggestions/issue-68049-1.stderr
@@ -4,6 +4,6 @@ error[E0594]: cannot assign to `self.0`, which is behind a `&` reference
LL | self.0 += 1;
| ^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be written
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/suggestions/issue-71394-no-from-impl.stderr b/tests/ui/suggestions/issue-71394-no-from-impl.stderr
index 80be252a0..b9b72e0e6 100644
--- a/tests/ui/suggestions/issue-71394-no-from-impl.stderr
+++ b/tests/ui/suggestions/issue-71394-no-from-impl.stderr
@@ -5,7 +5,7 @@ LL | let _: &[i8] = data.into();
| ^^^^ the trait `From<&[u8]>` is not implemented for `&[i8]`
|
= help: the following other types implement trait `From<T>`:
- <[bool; LANES] as From<Mask<T, LANES>>>
+ <[bool; N] as From<Mask<T, N>>>
<[T; N] as From<Simd<T, N>>>
<[T; 1] as From<(T,)>>
<[T; 2] as From<(T, T)>>
@@ -16,6 +16,6 @@ LL | let _: &[i8] = data.into();
and 6 others
= note: required for `&[u8]` to implement `Into<&[i8]>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/issue-72766.stderr b/tests/ui/suggestions/issue-72766.stderr
index f257bb9b0..f0680dfe1 100644
--- a/tests/ui/suggestions/issue-72766.stderr
+++ b/tests/ui/suggestions/issue-72766.stderr
@@ -10,6 +10,6 @@ help: consider `await`ing on the `Future`
LL | SadGirl {}.call().await?;
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/issue-81839.stderr b/tests/ui/suggestions/issue-81839.stderr
index 238ee637c..de1ea9855 100644
--- a/tests/ui/suggestions/issue-81839.stderr
+++ b/tests/ui/suggestions/issue-81839.stderr
@@ -21,6 +21,6 @@ help: consider using a semicolon here, but this will discard any values in the m
LL | };
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/issue-83892.stderr b/tests/ui/suggestions/issue-83892.stderr
index 5e471819b..7dbffcfca 100644
--- a/tests/ui/suggestions/issue-83892.stderr
+++ b/tests/ui/suggestions/issue-83892.stderr
@@ -9,6 +9,6 @@ LL | () => func()
LL | }
| - help: consider using a semicolon here: `;`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/issue-83943.stderr b/tests/ui/suggestions/issue-83943.stderr
index c73667f09..1a0853684 100644
--- a/tests/ui/suggestions/issue-83943.stderr
+++ b/tests/ui/suggestions/issue-83943.stderr
@@ -12,6 +12,6 @@ LL | | "B"
LL | | };
| |_____- `if` and `else` have incompatible types
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/issue-84592.stderr b/tests/ui/suggestions/issue-84592.stderr
index 70c96feb1..fe0a7b673 100644
--- a/tests/ui/suggestions/issue-84592.stderr
+++ b/tests/ui/suggestions/issue-84592.stderr
@@ -12,6 +12,6 @@ help: consider introducing a named lifetime parameter
LL | fn two_lifetimes_needed<'a>(a: &'a (), b: &'a ()) -> TwoLifetimes<'a, 'a> {
| ++++ ++ ++ ~~ ~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0106`.
diff --git a/tests/ui/suggestions/issue-84973-2.stderr b/tests/ui/suggestions/issue-84973-2.stderr
index 513bf28fb..74995a050 100644
--- a/tests/ui/suggestions/issue-84973-2.stderr
+++ b/tests/ui/suggestions/issue-84973-2.stderr
@@ -16,6 +16,6 @@ help: consider mutably borrowing here
LL | foo(&mut a);
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/issue-84973.stderr b/tests/ui/suggestions/issue-84973.stderr
index 55c89884a..c5e1958e0 100644
--- a/tests/ui/suggestions/issue-84973.stderr
+++ b/tests/ui/suggestions/issue-84973.stderr
@@ -19,6 +19,6 @@ help: consider borrowing here
LL | let o = Other::new(&f);
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/issue-85943-no-suggest-unsized-indirection-in-where-clause.stderr b/tests/ui/suggestions/issue-85943-no-suggest-unsized-indirection-in-where-clause.stderr
index 752533cdc..21b568b02 100644
--- a/tests/ui/suggestions/issue-85943-no-suggest-unsized-indirection-in-where-clause.stderr
+++ b/tests/ui/suggestions/issue-85943-no-suggest-unsized-indirection-in-where-clause.stderr
@@ -18,6 +18,6 @@ LL | struct A<T>(T) where T: Send;
| |
| this could be changed to `T: ?Sized`...
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/issue-85945-check-where-clause-before-suggesting-unsized.stderr b/tests/ui/suggestions/issue-85945-check-where-clause-before-suggesting-unsized.stderr
index 92be9f764..77e5dcd91 100644
--- a/tests/ui/suggestions/issue-85945-check-where-clause-before-suggesting-unsized.stderr
+++ b/tests/ui/suggestions/issue-85945-check-where-clause-before-suggesting-unsized.stderr
@@ -13,6 +13,6 @@ note: required by a bound in `foo`
LL | fn foo<T>(_: &T) where T: Sized {}
| ^ required by this bound in `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/issue-88696.stderr b/tests/ui/suggestions/issue-88696.stderr
index 4947269d7..b4f0793c2 100644
--- a/tests/ui/suggestions/issue-88696.stderr
+++ b/tests/ui/suggestions/issue-88696.stderr
@@ -6,6 +6,6 @@ LL | a().into()
|
= note: required for `Result<u64, i32>` to implement `Into<Result<u32, i32>>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/issue-89333.stderr b/tests/ui/suggestions/issue-89333.stderr
index 4739f11dd..761de7f25 100644
--- a/tests/ui/suggestions/issue-89333.stderr
+++ b/tests/ui/suggestions/issue-89333.stderr
@@ -15,6 +15,6 @@ note: required by a bound in `test`
LL | fn test<T>(arg: &impl Fn() -> T) where for<'a> &'a T: Trait {}
| ^^^^^ required by this bound in `test`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/issue-89640.stderr b/tests/ui/suggestions/issue-89640.stderr
index 8ff4ef4f0..3252cd6bb 100644
--- a/tests/ui/suggestions/issue-89640.stderr
+++ b/tests/ui/suggestions/issue-89640.stderr
@@ -9,5 +9,5 @@ help: consider removing the space to spell keyword `let`
LL | let x: i32 = 3;
| ~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/suggestions/issue-90213-expected-boxfuture-self-ice.stderr b/tests/ui/suggestions/issue-90213-expected-boxfuture-self-ice.stderr
index 7d1da7d24..96fb1f3c6 100644
--- a/tests/ui/suggestions/issue-90213-expected-boxfuture-self-ice.stderr
+++ b/tests/ui/suggestions/issue-90213-expected-boxfuture-self-ice.stderr
@@ -19,6 +19,6 @@ help: store this in the heap by calling `Box::new`
LL | Self::foo(Box::new(None))
| +++++++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/issue-90974.stderr b/tests/ui/suggestions/issue-90974.stderr
index e1fb479a3..1a732ecaf 100644
--- a/tests/ui/suggestions/issue-90974.stderr
+++ b/tests/ui/suggestions/issue-90974.stderr
@@ -9,6 +9,6 @@ help: you must specify a concrete type for this numeric value, like `f32`
LL | println!("{}", (3_f32).recip());
| ~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0689`.
diff --git a/tests/ui/suggestions/issue-96223.stderr b/tests/ui/suggestions/issue-96223.stderr
index d4e9433df..a54a4e7b3 100644
--- a/tests/ui/suggestions/issue-96223.stderr
+++ b/tests/ui/suggestions/issue-96223.stderr
@@ -26,6 +26,6 @@ note: required by a bound in `icey_bounds`
LL | fn icey_bounds<D: Dummy<EmptyMarker>>(p: &D) {}
| ^^^^^^^^^^^^^^^^^^ required by this bound in `icey_bounds`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/issue-97677.stderr b/tests/ui/suggestions/issue-97677.stderr
index 575d79267..0e95167d8 100644
--- a/tests/ui/suggestions/issue-97677.stderr
+++ b/tests/ui/suggestions/issue-97677.stderr
@@ -11,6 +11,6 @@ help: consider restricting type parameter `N`
LL | fn add_ten<N: std::ops::Add<i32, Output = N>>(n: N) -> N {
| ++++++++++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/suggestions/issue-97704.stderr b/tests/ui/suggestions/issue-97704.stderr
index ca017be45..a7284db1d 100644
--- a/tests/ui/suggestions/issue-97704.stderr
+++ b/tests/ui/suggestions/issue-97704.stderr
@@ -10,6 +10,6 @@ help: consider `await`ing on the `Future`
LL | func(async { Ok::<_, i32>(()) }).await?;
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/issue-97760.stderr b/tests/ui/suggestions/issue-97760.stderr
index 5415c247c..c3cf7e139 100644
--- a/tests/ui/suggestions/issue-97760.stderr
+++ b/tests/ui/suggestions/issue-97760.stderr
@@ -13,6 +13,6 @@ LL ~ pub fn print_values<I: IntoIterator>(values: &I)
LL ~ where <I as IntoIterator>::Item: std::fmt::Display {
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/issue-98500.stderr b/tests/ui/suggestions/issue-98500.stderr
index e7251d735..aa66a9aa1 100644
--- a/tests/ui/suggestions/issue-98500.stderr
+++ b/tests/ui/suggestions/issue-98500.stderr
@@ -19,6 +19,6 @@ LL | pub trait B where
= help: consider moving `f` to another trait
= help: consider moving `f2` to another trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/suggestions/issue-98562.stderr b/tests/ui/suggestions/issue-98562.stderr
index 7897fa441..578eb284c 100644
--- a/tests/ui/suggestions/issue-98562.stderr
+++ b/tests/ui/suggestions/issue-98562.stderr
@@ -6,6 +6,6 @@ LL | impl TraitA<u8, u16, u32> for X {
|
= help: implement the missing item: `fn baz<U: TraitC<I1 = u8, I2 = u16> + TraitD<I3 = u32>, V: TraitD<I3 = u8>>(_: U, _: V) -> Self where U: TraitE, U: TraitB, <U as TraitB>::Item: Copy { todo!() }`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/suggestions/issue-99080.stderr b/tests/ui/suggestions/issue-99080.stderr
index d1908dd9d..9c385a7a4 100644
--- a/tests/ui/suggestions/issue-99080.stderr
+++ b/tests/ui/suggestions/issue-99080.stderr
@@ -15,6 +15,6 @@ note: required by a bound in `needs_meow`
LL | fn needs_meow<T: Meow>(t: T) {}
| ^^^^ required by this bound in `needs_meow`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/issue-99240-2.stderr b/tests/ui/suggestions/issue-99240-2.stderr
index a2b559784..00bffee65 100644
--- a/tests/ui/suggestions/issue-99240-2.stderr
+++ b/tests/ui/suggestions/issue-99240-2.stderr
@@ -16,6 +16,6 @@ LL - Unit();
LL + Unit;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0618`.
diff --git a/tests/ui/suggestions/issue-99240.stderr b/tests/ui/suggestions/issue-99240.stderr
index f1bea688b..ea819067a 100644
--- a/tests/ui/suggestions/issue-99240.stderr
+++ b/tests/ui/suggestions/issue-99240.stderr
@@ -6,6 +6,6 @@ LL | (it.0.take())()
| |
| call expression requires function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0618`.
diff --git a/tests/ui/suggestions/issue-99597.stderr b/tests/ui/suggestions/issue-99597.stderr
index bdf2a07c1..e1d7aac26 100644
--- a/tests/ui/suggestions/issue-99597.stderr
+++ b/tests/ui/suggestions/issue-99597.stderr
@@ -10,6 +10,6 @@ help: the following trait defines an item `test`, perhaps you need to restrict t
LL | fn go(s: &(impl T1 + T2)) {
| + +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/suggestions/js-style-comparison-op-separate-eq-token.stderr b/tests/ui/suggestions/js-style-comparison-op-separate-eq-token.stderr
index 6adefe3de..9ef28bc26 100644
--- a/tests/ui/suggestions/js-style-comparison-op-separate-eq-token.stderr
+++ b/tests/ui/suggestions/js-style-comparison-op-separate-eq-token.stderr
@@ -4,5 +4,5 @@ error: expected expression, found `=`
LL | if 1 == = 1 {
| ^ expected expression
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/suggestions/late-bound-in-borrow-closure-sugg.stderr b/tests/ui/suggestions/late-bound-in-borrow-closure-sugg.stderr
index a03d4e8ce..ee9245225 100644
--- a/tests/ui/suggestions/late-bound-in-borrow-closure-sugg.stderr
+++ b/tests/ui/suggestions/late-bound-in-borrow-closure-sugg.stderr
@@ -16,11 +16,15 @@ note: required by a bound in `Trader::<'a>::set_closure`
|
LL | pub fn set_closure(&mut self, function: impl Fn(&mut Trader) + 'a) {
| ^^^^^^^^^^^^^^^ required by this bound in `Trader::<'a>::set_closure`
+help: consider wrapping the function in a closure
+ |
+LL | trader.set_closure(|arg0: &mut Trader<'_>| closure(*arg0));
+ | +++++++++++++++++++++++ +++++++
help: consider adjusting the signature so it borrows its argument
|
LL | let closure = |trader : &mut Trader| {
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0631`.
diff --git a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.stderr b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.stderr
index 6c63e1ada..2677b7943 100644
--- a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.stderr
+++ b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.stderr
@@ -14,6 +14,6 @@ help: consider adding an explicit lifetime bound
LL | fn func<'a, T: Test + 'a>(_dummy: &Foo, foo: &Foo<'a>, t: T) {
| +++ ++++ ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0311`.
diff --git a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.stderr b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.stderr
index 7b126c90e..00bc43d5e 100644
--- a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.stderr
+++ b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.stderr
@@ -10,6 +10,6 @@ help: consider introducing a named lifetime parameter
LL | fn buggy_const<'a, const N: usize>(_a: &'a Option<[u8; N]>, _f: &'a str) -> &'a str {
| +++ ++ ++ ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0106`.
diff --git a/tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.fixed b/tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.fixed
new file mode 100644
index 000000000..84315ad91
--- /dev/null
+++ b/tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.fixed
@@ -0,0 +1,11 @@
+// run-rustfix
+use std::any::Any;
+
+fn foo<T: Any>(value: &T) -> Box<dyn Any + '_> {
+ Box::new(value) as Box<dyn Any>
+ //~^ ERROR lifetime may not live long enough
+}
+
+fn main() {
+ let _ = foo(&5);
+}
diff --git a/tests/ui/issues/issue-16922.rs b/tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.rs
index bbbbf72db..fa7e72ff2 100644
--- a/tests/ui/issues/issue-16922.rs
+++ b/tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.rs
@@ -1,3 +1,4 @@
+// run-rustfix
use std::any::Any;
fn foo<T: Any>(value: &T) -> Box<dyn Any> {
diff --git a/tests/ui/issues/issue-16922.stderr b/tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.stderr
index 9d9f32a97..73fa5ddb1 100644
--- a/tests/ui/issues/issue-16922.stderr
+++ b/tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.stderr
@@ -1,5 +1,5 @@
error: lifetime may not live long enough
- --> $DIR/issue-16922.rs:4:5
+ --> $DIR/suggest-using-tick-underscore-lifetime-in-return-trait-object.rs:5:5
|
LL | fn foo<T: Any>(value: &T) -> Box<dyn Any> {
| - let's call the lifetime of this reference `'1`
@@ -11,5 +11,5 @@ help: to declare that the trait object captures data from argument `value`, you
LL | fn foo<T: Any>(value: &T) -> Box<dyn Any + '_> {
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/suggestions/many-type-ascription.stderr b/tests/ui/suggestions/many-type-ascription.stderr
index e36919c82..feddc7d62 100644
--- a/tests/ui/suggestions/many-type-ascription.stderr
+++ b/tests/ui/suggestions/many-type-ascription.stderr
@@ -6,5 +6,5 @@ LL | let _ = 0: i32;
|
= note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/suggestions/method-access-to-range-literal-typo.stderr b/tests/ui/suggestions/method-access-to-range-literal-typo.stderr
index 54a16b8ef..b1fb0254c 100644
--- a/tests/ui/suggestions/method-access-to-range-literal-typo.stderr
+++ b/tests/ui/suggestions/method-access-to-range-literal-typo.stderr
@@ -18,8 +18,8 @@ LL | fn method(&self) -> Option<&Vec<u8>> {
LL | self.option..as_ref().map(|x| x)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Option<&Vec<u8>>`, found `Range<Option<Vec<u8>>>`
|
- = note: expected enum `Option<&Vec<u8>>`
- found struct `std::ops::Range<Option<Vec<u8>>>`
+ = note: expected enum `Option<&Vec<_>>`
+ found struct `std::ops::Range<Option<Vec<_>>>`
help: you likely meant to write a method call instead of a range
|
LL - self.option..as_ref().map(|x| x)
diff --git a/tests/ui/suggestions/mismatched-types-numeric-from.stderr b/tests/ui/suggestions/mismatched-types-numeric-from.stderr
index 4d44d893a..93024b1f0 100644
--- a/tests/ui/suggestions/mismatched-types-numeric-from.stderr
+++ b/tests/ui/suggestions/mismatched-types-numeric-from.stderr
@@ -6,6 +6,6 @@ LL | let _: u32 = i32::from(0_u8);
| |
| expected due to this
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/missing-assoc-fn-applicable-suggestions.stderr b/tests/ui/suggestions/missing-assoc-fn-applicable-suggestions.stderr
index 4c2d2776d..3cf5c6e7b 100644
--- a/tests/ui/suggestions/missing-assoc-fn-applicable-suggestions.stderr
+++ b/tests/ui/suggestions/missing-assoc-fn-applicable-suggestions.stderr
@@ -9,6 +9,6 @@ LL | impl TraitA<()> for S {
= help: implement the missing item: `fn baz<T>(_: T) -> Self where T: TraitB, <T as TraitB>::Item: Copy { todo!() }`
= help: implement the missing item: `const A: usize = 42;`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.stderr b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.stderr
index 03082be69..f9db1e1ec 100644
--- a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.stderr
+++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.stderr
@@ -14,6 +14,6 @@ help: consider further restricting this bound
LL | pub struct AABB<K: Debug + std::marker::Copy>{
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.stderr b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.stderr
index 09696e061..ed1bde5f8 100644
--- a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.stderr
+++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.stderr
@@ -18,6 +18,6 @@ help: consider further restricting this bound
LL | pub struct AABB<K: Copy + Debug>{
| +++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0204`.
diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl.stderr b/tests/ui/suggestions/missing-bound-in-derive-copy-impl.stderr
index 8585fe47b..03db737fa 100644
--- a/tests/ui/suggestions/missing-bound-in-derive-copy-impl.stderr
+++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl.stderr
@@ -18,6 +18,6 @@ help: consider restricting type parameter `K`
LL | pub struct AABB<K: Debug>{
| +++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0204`.
diff --git a/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.stderr b/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.stderr
index 856d8db38..6dc512223 100644
--- a/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.stderr
+++ b/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.stderr
@@ -17,6 +17,6 @@ help: consider restricting type parameter `S`
LL | impl<S: std::fmt::Display> Copy for Wrapper<OnlyCopyIfDisplay<S>> {}
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0204`.
diff --git a/tests/ui/suggestions/missing-bound-in-manual-copy-impl.stderr b/tests/ui/suggestions/missing-bound-in-manual-copy-impl.stderr
index ec3e4f23a..fd38d4c64 100644
--- a/tests/ui/suggestions/missing-bound-in-manual-copy-impl.stderr
+++ b/tests/ui/suggestions/missing-bound-in-manual-copy-impl.stderr
@@ -12,6 +12,6 @@ help: consider restricting type parameter `S`
LL | impl<S: Copy> Copy for Wrapper<S> {}
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0204`.
diff --git a/tests/ui/suggestions/missing-lifetime-specifier.stderr b/tests/ui/suggestions/missing-lifetime-specifier.stderr
index fa4bc2fa7..e41f547ce 100644
--- a/tests/ui/suggestions/missing-lifetime-specifier.stderr
+++ b/tests/ui/suggestions/missing-lifetime-specifier.stderr
@@ -5,7 +5,7 @@ LL | static a: RefCell<HashMap<i32, Vec<Vec<Foo>>>> = RefCell::new(HashMap::
| ^^^ expected 2 lifetime parameters
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
|
LL | static a: RefCell<HashMap<i32, Vec<Vec<Foo<'static, 'static>>>>> = RefCell::new(HashMap::new());
| ++++++++++++++++++
@@ -32,7 +32,7 @@ LL | static b: RefCell<HashMap<i32, Vec<Vec<&Bar>>>> = RefCell::new(HashMap:
| expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
LL | static b: RefCell<HashMap<i32, Vec<Vec<&'static Bar<'static, 'static>>>>> = RefCell::new(HashMap::new());
| +++++++ ++++++++++++++++++
@@ -59,7 +59,7 @@ LL | static c: RefCell<HashMap<i32, Vec<Vec<Qux<i32>>>>> = RefCell::new(Hash
| ^ expected 2 lifetime parameters
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
|
LL | static c: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
| +++++++++++++++++
@@ -86,7 +86,7 @@ LL | static d: RefCell<HashMap<i32, Vec<Vec<&Tar<i32>>>>> = RefCell::new(Has
| expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
LL | static d: RefCell<HashMap<i32, Vec<Vec<&'static Tar<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
| +++++++ +++++++++++++++++
@@ -113,7 +113,7 @@ LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell
| ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
LL | static f: RefCell<HashMap<i32, Vec<Vec<&'static Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
| +++++++
diff --git a/tests/ui/suggestions/missing-type-param-used-in-param.stderr b/tests/ui/suggestions/missing-type-param-used-in-param.stderr
index 3116c5a0a..d667fc365 100644
--- a/tests/ui/suggestions/missing-type-param-used-in-param.stderr
+++ b/tests/ui/suggestions/missing-type-param-used-in-param.stderr
@@ -16,6 +16,6 @@ help: add missing generic argument
LL | two_type_params::<String, _>(100);
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/suggestions/move-generic-to-trait-in-method-with-params.stderr b/tests/ui/suggestions/move-generic-to-trait-in-method-with-params.stderr
index bfdb35947..aa11bc7cf 100644
--- a/tests/ui/suggestions/move-generic-to-trait-in-method-with-params.stderr
+++ b/tests/ui/suggestions/move-generic-to-trait-in-method-with-params.stderr
@@ -19,6 +19,6 @@ LL - 1.bar::<i32>(0);
LL + 1.bar(0);
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/suggestions/mut-ref-reassignment.stderr b/tests/ui/suggestions/mut-ref-reassignment.stderr
index b86a04c7c..a225b34f8 100644
--- a/tests/ui/suggestions/mut-ref-reassignment.stderr
+++ b/tests/ui/suggestions/mut-ref-reassignment.stderr
@@ -32,8 +32,8 @@ LL | fn suggestion2(opt: &mut Option<String>) {
LL | opt = Some(String::new())
| ^^^^^^^^^^^^^^^^^^^ expected `&mut Option<String>`, found `Option<String>`
|
- = note: expected mutable reference `&mut Option<String>`
- found enum `Option<String>`
+ = note: expected mutable reference `&mut Option<_>`
+ found enum `Option<_>`
help: consider dereferencing here to assign to the mutably borrowed value
|
LL | *opt = Some(String::new())
diff --git a/tests/ui/suggestions/no-extern-crate-in-type.stderr b/tests/ui/suggestions/no-extern-crate-in-type.stderr
index 68100e56c..384b17d1e 100644
--- a/tests/ui/suggestions/no-extern-crate-in-type.stderr
+++ b/tests/ui/suggestions/no-extern-crate-in-type.stderr
@@ -9,6 +9,6 @@ help: consider importing this struct
LL + use foo::Foo;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/suggestions/non-existent-field-present-in-subfield-recursion-limit.stderr b/tests/ui/suggestions/non-existent-field-present-in-subfield-recursion-limit.stderr
index b294f4da7..278bfc60b 100644
--- a/tests/ui/suggestions/non-existent-field-present-in-subfield-recursion-limit.stderr
+++ b/tests/ui/suggestions/non-existent-field-present-in-subfield-recursion-limit.stderr
@@ -6,6 +6,6 @@ LL | let test = fooer.f;
|
= note: available fields are: `first`, `second`, `third`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0609`.
diff --git a/tests/ui/suggestions/non-existent-field-present-in-subfield.stderr b/tests/ui/suggestions/non-existent-field-present-in-subfield.stderr
index cc991b915..65353ed92 100644
--- a/tests/ui/suggestions/non-existent-field-present-in-subfield.stderr
+++ b/tests/ui/suggestions/non-existent-field-present-in-subfield.stderr
@@ -4,7 +4,6 @@ error[E0609]: no field `c` on type `Foo`
LL | let _test = &fooer.c;
| ^ unknown field
|
- = note: available fields are: `first`, `_second`, `_third`
help: one of the expressions' fields has a field of the same name
|
LL | let _test = &fooer.first.bar.c;
@@ -16,7 +15,6 @@ error[E0609]: no field `test` on type `Foo`
LL | let _test2 = fooer.test;
| ^^^^ unknown field
|
- = note: available fields are: `first`, `_second`, `_third`
help: one of the expressions' fields has a field of the same name
|
LL | let _test2 = fooer.first.bar.c.test;
diff --git a/tests/ui/suggestions/non_ascii_ident.rs b/tests/ui/suggestions/non_ascii_ident.rs
new file mode 100644
index 000000000..9c8971475
--- /dev/null
+++ b/tests/ui/suggestions/non_ascii_ident.rs
@@ -0,0 +1,7 @@
+fn main() {
+ // There shall be no suggestions here. In particular not `Ok`.
+ let _ = 读文; //~ ERROR cannot find value `读文` in this scope
+
+ let f = 0f32; // Important line to make this an ICE regression test
+ 读文(f); //~ ERROR cannot find function `读文` in this scope
+}
diff --git a/tests/ui/suggestions/non_ascii_ident.stderr b/tests/ui/suggestions/non_ascii_ident.stderr
new file mode 100644
index 000000000..fdcc64aef
--- /dev/null
+++ b/tests/ui/suggestions/non_ascii_ident.stderr
@@ -0,0 +1,15 @@
+error[E0425]: cannot find value `读文` in this scope
+ --> $DIR/non_ascii_ident.rs:3:13
+ |
+LL | let _ = 读文;
+ | ^^^^ not found in this scope
+
+error[E0425]: cannot find function `读文` in this scope
+ --> $DIR/non_ascii_ident.rs:6:5
+ |
+LL | 读文(f);
+ | ^^^^ not found in this scope
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/suggestions/opaque-type-error.stderr b/tests/ui/suggestions/opaque-type-error.stderr
index 5c90d3012..3ce45c7b6 100644
--- a/tests/ui/suggestions/opaque-type-error.stderr
+++ b/tests/ui/suggestions/opaque-type-error.stderr
@@ -24,6 +24,6 @@ LL | } else {
LL ~ thing_two().await
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/option-content-move-from-tuple-match.stderr b/tests/ui/suggestions/option-content-move-from-tuple-match.stderr
index 97d05d9dc..63314acb8 100644
--- a/tests/ui/suggestions/option-content-move-from-tuple-match.stderr
+++ b/tests/ui/suggestions/option-content-move-from-tuple-match.stderr
@@ -15,6 +15,6 @@ help: consider borrowing the pattern binding
LL | (None, &ref c) => &c.unwrap(),
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/suggestions/option-content-move.fixed b/tests/ui/suggestions/option-content-move.fixed
new file mode 100644
index 000000000..5e79cf71d
--- /dev/null
+++ b/tests/ui/suggestions/option-content-move.fixed
@@ -0,0 +1,38 @@
+// run-rustfix
+pub struct LipogramCorpora {
+ selections: Vec<(char, Option<String>)>,
+}
+
+impl LipogramCorpora {
+ pub fn validate_all(&mut self) -> Result<(), char> {
+ for selection in &self.selections {
+ if selection.1.is_some() {
+ if <Option<String> as Clone>::clone(&selection.1).unwrap().contains(selection.0) {
+ //~^ ERROR cannot move out of `selection.1`
+ return Err(selection.0);
+ }
+ }
+ }
+ Ok(())
+ }
+}
+
+pub struct LipogramCorpora2 {
+ selections: Vec<(char, Result<String, String>)>,
+}
+
+impl LipogramCorpora2 {
+ pub fn validate_all(&mut self) -> Result<(), char> {
+ for selection in &self.selections {
+ if selection.1.is_ok() {
+ if <Result<String, String> as Clone>::clone(&selection.1).unwrap().contains(selection.0) {
+ //~^ ERROR cannot move out of `selection.1`
+ return Err(selection.0);
+ }
+ }
+ }
+ Ok(())
+ }
+}
+
+fn main() {}
diff --git a/tests/ui/suggestions/option-content-move.rs b/tests/ui/suggestions/option-content-move.rs
index 46c895b95..58efbe71f 100644
--- a/tests/ui/suggestions/option-content-move.rs
+++ b/tests/ui/suggestions/option-content-move.rs
@@ -1,3 +1,4 @@
+// run-rustfix
pub struct LipogramCorpora {
selections: Vec<(char, Option<String>)>,
}
diff --git a/tests/ui/suggestions/option-content-move.stderr b/tests/ui/suggestions/option-content-move.stderr
index 5060606d8..e5de15027 100644
--- a/tests/ui/suggestions/option-content-move.stderr
+++ b/tests/ui/suggestions/option-content-move.stderr
@@ -1,5 +1,5 @@
error[E0507]: cannot move out of `selection.1` which is behind a shared reference
- --> $DIR/option-content-move.rs:9:20
+ --> $DIR/option-content-move.rs:10:20
|
LL | if selection.1.unwrap().contains(selection.0) {
| ^^^^^^^^^^^ -------- `selection.1` moved due to this method call
@@ -11,11 +11,11 @@ note: `Option::<T>::unwrap` takes ownership of the receiver `self`, which moves
--> $SRC_DIR/core/src/option.rs:LL:COL
help: you can `clone` the value and consume it, but this might not be your desired behavior
|
-LL | if selection.1.clone().unwrap().contains(selection.0) {
- | ++++++++
+LL | if <Option<String> as Clone>::clone(&selection.1).unwrap().contains(selection.0) {
+ | ++++++++++++++++++++++++++++++++++ +
error[E0507]: cannot move out of `selection.1` which is behind a shared reference
- --> $DIR/option-content-move.rs:27:20
+ --> $DIR/option-content-move.rs:28:20
|
LL | if selection.1.unwrap().contains(selection.0) {
| ^^^^^^^^^^^ -------- `selection.1` moved due to this method call
@@ -27,8 +27,8 @@ note: `Result::<T, E>::unwrap` takes ownership of the receiver `self`, which mov
--> $SRC_DIR/core/src/result.rs:LL:COL
help: you can `clone` the value and consume it, but this might not be your desired behavior
|
-LL | if selection.1.clone().unwrap().contains(selection.0) {
- | ++++++++
+LL | if <Result<String, String> as Clone>::clone(&selection.1).unwrap().contains(selection.0) {
+ | ++++++++++++++++++++++++++++++++++++++++++ +
error: aborting due to 2 previous errors
diff --git a/tests/ui/suggestions/option-content-move2.stderr b/tests/ui/suggestions/option-content-move2.stderr
index 94acda73c..0297c031e 100644
--- a/tests/ui/suggestions/option-content-move2.stderr
+++ b/tests/ui/suggestions/option-content-move2.stderr
@@ -15,6 +15,6 @@ LL | var = Some(NotCopyable);
| variable moved due to use in closure
| move occurs because `var` has type `Option<NotCopyable>`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/suggestions/option-to-bool.stderr b/tests/ui/suggestions/option-to-bool.stderr
index e042f07da..e16d829ca 100644
--- a/tests/ui/suggestions/option-to-bool.stderr
+++ b/tests/ui/suggestions/option-to-bool.stderr
@@ -13,6 +13,6 @@ help: use `Option::is_some` to test if the `Option` has a value
LL | if true && x.is_some() {}
| ++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/parenthesized-deref-suggestion.stderr b/tests/ui/suggestions/parenthesized-deref-suggestion.stderr
index cafddbe26..9f185f5dd 100644
--- a/tests/ui/suggestions/parenthesized-deref-suggestion.stderr
+++ b/tests/ui/suggestions/parenthesized-deref-suggestion.stderr
@@ -2,7 +2,7 @@ error[E0609]: no field `opts` on type `*const Session`
--> $DIR/parenthesized-deref-suggestion.rs:7:30
|
LL | (sess as *const Session).opts;
- | ^^^^
+ | ^^^^ unknown field
|
help: `(sess as *const Session)` is a raw pointer; try dereferencing it
|
@@ -14,7 +14,8 @@ error[E0609]: no field `0` on type `[u32; 1]`
|
LL | (x as [u32; 1]).0;
| ----------------^
- | |
+ | | |
+ | | unknown field
| help: instead of using tuple indexing, use array indexing: `(x as [u32; 1])[0]`
error: aborting due to 2 previous errors
diff --git a/tests/ui/suggestions/path-by-value.stderr b/tests/ui/suggestions/path-by-value.stderr
index fd3646b8c..567d9d5b9 100644
--- a/tests/ui/suggestions/path-by-value.stderr
+++ b/tests/ui/suggestions/path-by-value.stderr
@@ -13,6 +13,6 @@ help: function arguments must have a statically known size, borrowed types alway
LL | fn f(p: &Path) { }
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/private-field.stderr b/tests/ui/suggestions/private-field.stderr
index c38c795e0..0d73af038 100644
--- a/tests/ui/suggestions/private-field.stderr
+++ b/tests/ui/suggestions/private-field.stderr
@@ -4,8 +4,8 @@ error[E0609]: no field `cap` on type `S`
LL | dbg!(s.cap)
| ^^^ unknown field
|
- = note: available fields are: `val`
+ = note: available field is: `val`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0609`.
diff --git a/tests/ui/suggestions/range-index-instead-of-colon.rs b/tests/ui/suggestions/range-index-instead-of-colon.rs
new file mode 100644
index 000000000..3267527ec
--- /dev/null
+++ b/tests/ui/suggestions/range-index-instead-of-colon.rs
@@ -0,0 +1,7 @@
+// edition:2021
+
+fn main() {
+ &[1, 2, 3][1:2];
+ //~^ ERROR: expected one of
+ //~| HELP: you might have meant a range expression
+}
diff --git a/tests/ui/suggestions/range-index-instead-of-colon.stderr b/tests/ui/suggestions/range-index-instead-of-colon.stderr
new file mode 100644
index 000000000..df29356cc
--- /dev/null
+++ b/tests/ui/suggestions/range-index-instead-of-colon.stderr
@@ -0,0 +1,13 @@
+error: expected one of `.`, `?`, `]`, or an operator, found `:`
+ --> $DIR/range-index-instead-of-colon.rs:4:17
+ |
+LL | &[1, 2, 3][1:2];
+ | ^ expected one of `.`, `?`, `]`, or an operator
+ |
+help: you might have meant a range expression
+ |
+LL | &[1, 2, 3][1..2];
+ | ~~
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/suggestions/remove-question-symbol-with-paren.stderr b/tests/ui/suggestions/remove-question-symbol-with-paren.stderr
index 40b9cf2dc..bdea727a0 100644
--- a/tests/ui/suggestions/remove-question-symbol-with-paren.stderr
+++ b/tests/ui/suggestions/remove-question-symbol-with-paren.stderr
@@ -20,6 +20,6 @@ help: try wrapping the expression in `Some`
LL | (Some(x?))
| +++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/restrict-type-not-param.stderr b/tests/ui/suggestions/restrict-type-not-param.stderr
index 3c7d42888..6d9780a87 100644
--- a/tests/ui/suggestions/restrict-type-not-param.stderr
+++ b/tests/ui/suggestions/restrict-type-not-param.stderr
@@ -18,6 +18,6 @@ help: consider introducing a `where` clause, but there might be an alternative b
LL | fn qux<T>(a: Wrapper<T>, b: T) -> T where Wrapper<T>: Add<T, Output = T> {
| ++++++++++++++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/suggestions/return-cycle-2.stderr b/tests/ui/suggestions/return-cycle-2.stderr
index 3a1a0f7f4..23de2309e 100644
--- a/tests/ui/suggestions/return-cycle-2.stderr
+++ b/tests/ui/suggestions/return-cycle-2.stderr
@@ -7,6 +7,6 @@ LL | fn as_ref(_: i32, _: i32) -> _ {
| not allowed in type signatures
| help: replace with the correct return type: `Token<&'static T>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/ui/suggestions/return-cycle.stderr b/tests/ui/suggestions/return-cycle.stderr
index 63fa9e040..604704904 100644
--- a/tests/ui/suggestions/return-cycle.stderr
+++ b/tests/ui/suggestions/return-cycle.stderr
@@ -7,6 +7,6 @@ LL | fn new() -> _ {
| not allowed in type signatures
| help: replace with the correct return type: `Token<()>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/ui/suggestions/return-elided-lifetime.stderr b/tests/ui/suggestions/return-elided-lifetime.stderr
index 273d95bc7..7bfffd301 100644
--- a/tests/ui/suggestions/return-elided-lifetime.stderr
+++ b/tests/ui/suggestions/return-elided-lifetime.stderr
@@ -5,10 +5,15 @@ LL | fn f1() -> &i32 { loop {} }
| ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
LL | fn f1() -> &'static i32 { loop {} }
| +++++++
+help: instead, you are more likely to want to return an owned value
+ |
+LL - fn f1() -> &i32 { loop {} }
+LL + fn f1() -> i32 { loop {} }
+ |
error[E0106]: missing lifetime specifiers
--> $DIR/return-elided-lifetime.rs:8:14
@@ -19,7 +24,7 @@ LL | fn f1_() -> (&i32, &i32) { loop {} }
| expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
LL | fn f1_() -> (&'static i32, &'static i32) { loop {} }
| +++++++ +++++++
@@ -31,10 +36,19 @@ LL | fn f2(a: i32, b: i32) -> &i32 { loop {} }
| ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
LL | fn f2(a: i32, b: i32) -> &'static i32 { loop {} }
| +++++++
+help: instead, you are more likely to want to change one of the arguments to be borrowed...
+ |
+LL | fn f2(a: &i32, b: &i32) -> &i32 { loop {} }
+ | + +
+help: ...or alternatively, you might want to return an owned value
+ |
+LL - fn f2(a: i32, b: i32) -> &i32 { loop {} }
+LL + fn f2(a: i32, b: i32) -> i32 { loop {} }
+ |
error[E0106]: missing lifetime specifiers
--> $DIR/return-elided-lifetime.rs:13:28
@@ -45,7 +59,7 @@ LL | fn f2_(a: i32, b: i32) -> (&i32, &i32) { loop {} }
| expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
|
LL | fn f2_(a: i32, b: i32) -> (&'static i32, &'static i32) { loop {} }
| +++++++ +++++++
diff --git a/tests/ui/suggestions/shadowed-lplace-method-2.stderr b/tests/ui/suggestions/shadowed-lplace-method-2.stderr
index 295636098..088da83f5 100644
--- a/tests/ui/suggestions/shadowed-lplace-method-2.stderr
+++ b/tests/ui/suggestions/shadowed-lplace-method-2.stderr
@@ -20,6 +20,6 @@ help: try wrapping the expression in `X`
LL | *x.foo(0) = X { x: () };
| ++++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/shadowed-lplace-method.stderr b/tests/ui/suggestions/shadowed-lplace-method.stderr
index 33824c4cb..3e49716b0 100644
--- a/tests/ui/suggestions/shadowed-lplace-method.stderr
+++ b/tests/ui/suggestions/shadowed-lplace-method.stderr
@@ -21,6 +21,6 @@ help: you might have meant to call the other method; you can use the fully-quali
LL | *std::cell::RefCell::<_>::borrow_mut(&rc) = false;
| +++++++++++++++++++++++++++++++++++++ ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/silenced-binding-typo.stderr b/tests/ui/suggestions/silenced-binding-typo.stderr
index 9c0e6e265..8dbd94208 100644
--- a/tests/ui/suggestions/silenced-binding-typo.stderr
+++ b/tests/ui/suggestions/silenced-binding-typo.stderr
@@ -9,6 +9,6 @@ help: a local variable with a similar name exists, consider changing it
LL | let x = 42;
| ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/suggestions/sugg-else-for-closure.stderr b/tests/ui/suggestions/sugg-else-for-closure.stderr
index 80ad3f9e4..fda5ac4e4 100644
--- a/tests/ui/suggestions/sugg-else-for-closure.stderr
+++ b/tests/ui/suggestions/sugg-else-for-closure.stderr
@@ -22,6 +22,6 @@ help: try calling `unwrap_or_else` instead
LL | let _s = y.unwrap_or_else(|| x.split('.').nth(1).unwrap());
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/sugg_with_positional_args_and_debug_fmt.stderr b/tests/ui/suggestions/sugg_with_positional_args_and_debug_fmt.stderr
index 850f69f2d..be458f3bd 100644
--- a/tests/ui/suggestions/sugg_with_positional_args_and_debug_fmt.stderr
+++ b/tests/ui/suggestions/sugg_with_positional_args_and_debug_fmt.stderr
@@ -17,5 +17,5 @@ help: use the named argument by name to avoid ambiguity
LL | println!("hello {world:?}", world = "world");
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/suggestions/suggest-assoc-fn-call-deref.stderr b/tests/ui/suggestions/suggest-assoc-fn-call-deref.stderr
index 00fb96f03..a30b78692 100644
--- a/tests/ui/suggestions/suggest-assoc-fn-call-deref.stderr
+++ b/tests/ui/suggestions/suggest-assoc-fn-call-deref.stderr
@@ -14,6 +14,6 @@ note: the candidate is defined in an impl for the type `Foo<T>`
LL | fn test() -> i32 { 1 }
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish-placeholder.stderr b/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish-placeholder.stderr
index c247e73b3..6e4c77dea 100644
--- a/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish-placeholder.stderr
+++ b/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish-placeholder.stderr
@@ -17,6 +17,6 @@ note: the candidate is defined in an impl for the type `GenericAssocMethod<T>`
LL | fn default_hello() {}
| ^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish-through-deref.stderr b/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish-through-deref.stderr
index 7c9f0b6c2..1bc259294 100644
--- a/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish-through-deref.stderr
+++ b/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish-through-deref.stderr
@@ -14,6 +14,6 @@ note: the candidate is defined in an impl for the type `HasAssocMethod`
LL | fn hello() {}
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.fixed b/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.fixed
new file mode 100644
index 000000000..61f06d802
--- /dev/null
+++ b/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.fixed
@@ -0,0 +1,30 @@
+// run-rustfix
+
+struct A {}
+
+impl A {
+ fn hello(_a: i32) {}
+ fn test(_a: Self, _b: i32) {}
+}
+
+struct B<T> {
+ _b: T
+}
+impl<T> B<T> {
+ fn hello(_a: i32) {}
+ fn test(_a: Self, _b: i32) {}
+}
+
+fn main() {
+ let _a = A {};
+ A::hello(1);
+ //~^ ERROR no method named `hello` found
+ A::test(_a, 1);
+ //~^ ERROR no method named `test` found
+
+ let _b = B {_b: ""};
+ B::<&str>::hello(1);
+ //~^ ERROR no method named `hello` found
+ B::<&str>::test(_b, 1);
+ //~^ ERROR no method named `test` found
+}
diff --git a/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.rs b/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.rs
new file mode 100644
index 000000000..07e614f0c
--- /dev/null
+++ b/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.rs
@@ -0,0 +1,30 @@
+// run-rustfix
+
+struct A {}
+
+impl A {
+ fn hello(_a: i32) {}
+ fn test(_a: Self, _b: i32) {}
+}
+
+struct B<T> {
+ _b: T
+}
+impl<T> B<T> {
+ fn hello(_a: i32) {}
+ fn test(_a: Self, _b: i32) {}
+}
+
+fn main() {
+ let _a = A {};
+ _a.hello(1);
+ //~^ ERROR no method named `hello` found
+ _a.test(1);
+ //~^ ERROR no method named `test` found
+
+ let _b = B {_b: ""};
+ _b.hello(1);
+ //~^ ERROR no method named `hello` found
+ _b.test(1);
+ //~^ ERROR no method named `test` found
+}
diff --git a/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.stderr b/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.stderr
new file mode 100644
index 000000000..793595784
--- /dev/null
+++ b/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.stderr
@@ -0,0 +1,79 @@
+error[E0599]: no method named `hello` found for struct `A` in the current scope
+ --> $DIR/suggest-assoc-fn-call-without-receiver.rs:20:8
+ |
+LL | struct A {}
+ | -------- method `hello` not found for this struct
+...
+LL | _a.hello(1);
+ | ---^^^^^---
+ | | |
+ | | this is an associated function, not a method
+ | help: use associated function syntax instead: `A::hello(1)`
+ |
+ = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
+note: the candidate is defined in an impl for the type `A`
+ --> $DIR/suggest-assoc-fn-call-without-receiver.rs:6:5
+ |
+LL | fn hello(_a: i32) {}
+ | ^^^^^^^^^^^^^^^^^
+
+error[E0599]: no method named `test` found for struct `A` in the current scope
+ --> $DIR/suggest-assoc-fn-call-without-receiver.rs:22:8
+ |
+LL | struct A {}
+ | -------- method `test` not found for this struct
+...
+LL | _a.test(1);
+ | ---^^^^---
+ | | |
+ | | this is an associated function, not a method
+ | help: use associated function syntax instead: `A::test(_a, 1)`
+ |
+ = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
+note: the candidate is defined in an impl for the type `A`
+ --> $DIR/suggest-assoc-fn-call-without-receiver.rs:7:5
+ |
+LL | fn test(_a: Self, _b: i32) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0599]: no method named `hello` found for struct `B<&str>` in the current scope
+ --> $DIR/suggest-assoc-fn-call-without-receiver.rs:26:8
+ |
+LL | struct B<T> {
+ | ----------- method `hello` not found for this struct
+...
+LL | _b.hello(1);
+ | ---^^^^^---
+ | | |
+ | | this is an associated function, not a method
+ | help: use associated function syntax instead: `B::<&str>::hello(1)`
+ |
+ = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
+note: the candidate is defined in an impl for the type `B<T>`
+ --> $DIR/suggest-assoc-fn-call-without-receiver.rs:14:5
+ |
+LL | fn hello(_a: i32) {}
+ | ^^^^^^^^^^^^^^^^^
+
+error[E0599]: no method named `test` found for struct `B<&str>` in the current scope
+ --> $DIR/suggest-assoc-fn-call-without-receiver.rs:28:8
+ |
+LL | struct B<T> {
+ | ----------- method `test` not found for this struct
+...
+LL | _b.test(1);
+ | ---^^^^---
+ | | |
+ | | this is an associated function, not a method
+ | help: use associated function syntax instead: `B::<&str>::test(_b, 1)`
+ |
+ = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
+note: the candidate is defined in an impl for the type `B<T>`
+ --> $DIR/suggest-assoc-fn-call-without-receiver.rs:15:5
+ |
+LL | fn test(_a: Self, _b: i32) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/suggestions/suggest-box.stderr b/tests/ui/suggestions/suggest-box.stderr
index e5d5ecc0b..58f8774fe 100644
--- a/tests/ui/suggestions/suggest-box.stderr
+++ b/tests/ui/suggestions/suggest-box.stderr
@@ -21,6 +21,6 @@ LL | Ok(())
LL ~ });
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/suggest-closure-return-type-1.stderr b/tests/ui/suggestions/suggest-closure-return-type-1.stderr
index f4c2eb7ff..be473d3cf 100644
--- a/tests/ui/suggestions/suggest-closure-return-type-1.stderr
+++ b/tests/ui/suggestions/suggest-closure-return-type-1.stderr
@@ -9,6 +9,6 @@ help: try giving this closure an explicit return type
LL | unbound_drop(|| -> [_; 0] { [] });
| ~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/suggestions/suggest-closure-return-type-2.stderr b/tests/ui/suggestions/suggest-closure-return-type-2.stderr
index 88bf26304..f6c2a79b6 100644
--- a/tests/ui/suggestions/suggest-closure-return-type-2.stderr
+++ b/tests/ui/suggestions/suggest-closure-return-type-2.stderr
@@ -9,6 +9,6 @@ help: try giving this closure an explicit return type
LL | unbound_drop(|| -> [_; 0] { [] })
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/suggestions/suggest-closure-return-type-3.stderr b/tests/ui/suggestions/suggest-closure-return-type-3.stderr
index bc4107528..d02e20eb7 100644
--- a/tests/ui/suggestions/suggest-closure-return-type-3.stderr
+++ b/tests/ui/suggestions/suggest-closure-return-type-3.stderr
@@ -9,6 +9,6 @@ help: try giving this closure an explicit return type
LL | unbound_drop(|| -> [_; 0] { [] });
| +++++++++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/suggestions/suggest-dereferencing-index.stderr b/tests/ui/suggestions/suggest-dereferencing-index.stderr
index adf013399..2316acbe9 100644
--- a/tests/ui/suggestions/suggest-dereferencing-index.stderr
+++ b/tests/ui/suggestions/suggest-dereferencing-index.stderr
@@ -8,11 +8,13 @@ LL | let one_item_please: i32 = [1, 2, 3][i];
= help: the trait `SliceIndex<[{integer}]>` is implemented for `usize`
= help: for that trait implementation, expected `usize`, found `&usize`
= note: required for `[{integer}]` to implement `Index<&usize>`
+ = note: 1 redundant requirement hidden
+ = note: required for `[{integer}; 3]` to implement `Index<&usize>`
help: dereference this index
|
LL | let one_item_please: i32 = [1, 2, 3][*i];
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/suggest-field-through-deref.fixed b/tests/ui/suggestions/suggest-field-through-deref.fixed
new file mode 100644
index 000000000..07ba3aa91
--- /dev/null
+++ b/tests/ui/suggestions/suggest-field-through-deref.fixed
@@ -0,0 +1,21 @@
+// run-rustfix
+#![allow(dead_code)]
+use std::sync::Arc;
+struct S {
+ long_name: (),
+ foo: (),
+}
+fn main() {
+ let x = Arc::new(S { long_name: (), foo: () });
+ let _ = x.long_name; //~ ERROR no field `longname`
+ let y = S { long_name: (), foo: () };
+ let _ = y.long_name; //~ ERROR no field `longname`
+ let a = Some(Arc::new(S { long_name: (), foo: () }));
+ let _ = a.unwrap().long_name; //~ ERROR no field `longname`
+ let b = Some(S { long_name: (), foo: () });
+ let _ = b.unwrap().long_name; //~ ERROR no field `long_name`
+ let c = Ok::<_, ()>(Arc::new(S { long_name: (), foo: () }));
+ let _ = c.unwrap().long_name; //~ ERROR no field `longname`
+ let d = Ok::<_, ()>(S { long_name: (), foo: () });
+ let _ = d.unwrap().long_name; //~ ERROR no field `long_name`
+}
diff --git a/tests/ui/suggestions/suggest-field-through-deref.rs b/tests/ui/suggestions/suggest-field-through-deref.rs
new file mode 100644
index 000000000..6e24b425e
--- /dev/null
+++ b/tests/ui/suggestions/suggest-field-through-deref.rs
@@ -0,0 +1,21 @@
+// run-rustfix
+#![allow(dead_code)]
+use std::sync::Arc;
+struct S {
+ long_name: (),
+ foo: (),
+}
+fn main() {
+ let x = Arc::new(S { long_name: (), foo: () });
+ let _ = x.longname; //~ ERROR no field `longname`
+ let y = S { long_name: (), foo: () };
+ let _ = y.longname; //~ ERROR no field `longname`
+ let a = Some(Arc::new(S { long_name: (), foo: () }));
+ let _ = a.longname; //~ ERROR no field `longname`
+ let b = Some(S { long_name: (), foo: () });
+ let _ = b.long_name; //~ ERROR no field `long_name`
+ let c = Ok::<_, ()>(Arc::new(S { long_name: (), foo: () }));
+ let _ = c.longname; //~ ERROR no field `longname`
+ let d = Ok::<_, ()>(S { long_name: (), foo: () });
+ let _ = d.long_name; //~ ERROR no field `long_name`
+}
diff --git a/tests/ui/suggestions/suggest-field-through-deref.stderr b/tests/ui/suggestions/suggest-field-through-deref.stderr
new file mode 100644
index 000000000..cc9fe2044
--- /dev/null
+++ b/tests/ui/suggestions/suggest-field-through-deref.stderr
@@ -0,0 +1,69 @@
+error[E0609]: no field `longname` on type `Arc<S>`
+ --> $DIR/suggest-field-through-deref.rs:10:15
+ |
+LL | let _ = x.longname;
+ | ^^^^^^^^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | let _ = x.long_name;
+ | ~~~~~~~~~
+
+error[E0609]: no field `longname` on type `S`
+ --> $DIR/suggest-field-through-deref.rs:12:15
+ |
+LL | let _ = y.longname;
+ | ^^^^^^^^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | let _ = y.long_name;
+ | ~~~~~~~~~
+
+error[E0609]: no field `longname` on type `Option<Arc<S>>`
+ --> $DIR/suggest-field-through-deref.rs:14:15
+ |
+LL | let _ = a.longname;
+ | ^^^^^^^^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | let _ = a.unwrap().long_name;
+ | ~~~~~~~~~~~~~~~~~~
+
+error[E0609]: no field `long_name` on type `Option<S>`
+ --> $DIR/suggest-field-through-deref.rs:16:15
+ |
+LL | let _ = b.long_name;
+ | ^^^^^^^^^ unknown field
+ |
+help: one of the expressions' fields has a field of the same name
+ |
+LL | let _ = b.unwrap().long_name;
+ | +++++++++
+
+error[E0609]: no field `longname` on type `Result<Arc<S>, ()>`
+ --> $DIR/suggest-field-through-deref.rs:18:15
+ |
+LL | let _ = c.longname;
+ | ^^^^^^^^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | let _ = c.unwrap().long_name;
+ | ~~~~~~~~~~~~~~~~~~
+
+error[E0609]: no field `long_name` on type `Result<S, ()>`
+ --> $DIR/suggest-field-through-deref.rs:20:15
+ |
+LL | let _ = d.long_name;
+ | ^^^^^^^^^ unknown field
+ |
+help: one of the expressions' fields has a field of the same name
+ |
+LL | let _ = d.unwrap().long_name;
+ | +++++++++
+
+error: aborting due to 6 previous errors
+
+For more information about this error, try `rustc --explain E0609`.
diff --git a/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.stderr b/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.stderr
index 347a03852..bf7790e23 100644
--- a/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.stderr
+++ b/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.stderr
@@ -7,6 +7,6 @@ LL | fn bar() -> _ { Wrapper(foo) }
| not allowed in type signatures
| help: replace with the correct return type: `Wrapper<fn()>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/ui/suggestions/suggest-full-enum-variant-for-local-module.stderr b/tests/ui/suggestions/suggest-full-enum-variant-for-local-module.stderr
index 3fb3047d8..866162bab 100644
--- a/tests/ui/suggestions/suggest-full-enum-variant-for-local-module.stderr
+++ b/tests/ui/suggestions/suggest-full-enum-variant-for-local-module.stderr
@@ -13,6 +13,6 @@ help: try wrapping the expression in `option::O::Some`
LL | let _: option::O<()> = option::O::Some(());
| ++++++++++++++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/suggest-impl-trait-lifetime.stderr b/tests/ui/suggestions/suggest-impl-trait-lifetime.stderr
index 1660db1aa..de2485b7b 100644
--- a/tests/ui/suggestions/suggest-impl-trait-lifetime.stderr
+++ b/tests/ui/suggestions/suggest-impl-trait-lifetime.stderr
@@ -12,6 +12,6 @@ help: consider adding an explicit lifetime bound
LL | fn foo(d: impl Debug + 'static) {
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0310`.
diff --git a/tests/ui/suggestions/suggest-let-for-assignment.fixed b/tests/ui/suggestions/suggest-let-for-assignment.fixed
index 3a25e25ee..76dc1dad8 100644
--- a/tests/ui/suggestions/suggest-let-for-assignment.fixed
+++ b/tests/ui/suggestions/suggest-let-for-assignment.fixed
@@ -7,6 +7,12 @@ fn main() {
let x = "x"; //~ ERROR cannot find value `x` in this scope
println!("x: {}", x); //~ ERROR cannot find value `x` in this scope
+ let some_variable = 6; //~ cannot find value `let_some_variable` in this scope
+ println!("some_variable: {}", some_variable); //~ ERROR cannot find value `some_variable` in this scope
+
+ let other_variable = 6; //~ cannot find value `letother_variable` in this scope
+ println!("other_variable: {}", other_variable); //~ ERROR cannot find value `other_variable` in this scope
+
if x == "x" {
//~^ ERROR cannot find value `x` in this scope
println!("x is 1");
diff --git a/tests/ui/suggestions/suggest-let-for-assignment.rs b/tests/ui/suggestions/suggest-let-for-assignment.rs
index 67705fe06..f1edf65a7 100644
--- a/tests/ui/suggestions/suggest-let-for-assignment.rs
+++ b/tests/ui/suggestions/suggest-let-for-assignment.rs
@@ -7,6 +7,12 @@ fn main() {
x = "x"; //~ ERROR cannot find value `x` in this scope
println!("x: {}", x); //~ ERROR cannot find value `x` in this scope
+ let_some_variable = 6; //~ cannot find value `let_some_variable` in this scope
+ println!("some_variable: {}", some_variable); //~ ERROR cannot find value `some_variable` in this scope
+
+ letother_variable = 6; //~ cannot find value `letother_variable` in this scope
+ println!("other_variable: {}", other_variable); //~ ERROR cannot find value `other_variable` in this scope
+
if x == "x" {
//~^ ERROR cannot find value `x` in this scope
println!("x is 1");
diff --git a/tests/ui/suggestions/suggest-let-for-assignment.stderr b/tests/ui/suggestions/suggest-let-for-assignment.stderr
index 3f6a3da4b..8d97dbeb1 100644
--- a/tests/ui/suggestions/suggest-let-for-assignment.stderr
+++ b/tests/ui/suggestions/suggest-let-for-assignment.stderr
@@ -32,14 +32,48 @@ error[E0425]: cannot find value `x` in this scope
LL | println!("x: {}", x);
| ^ not found in this scope
+error[E0425]: cannot find value `let_some_variable` in this scope
+ --> $DIR/suggest-let-for-assignment.rs:10:5
+ |
+LL | let_some_variable = 6;
+ | ^^^^^^^^^^^^^^^^^
+ |
+help: you might have meant to introduce a new binding
+ |
+LL | let some_variable = 6;
+ | ~~~~~~~~~~~~~~~~~
+
+error[E0425]: cannot find value `some_variable` in this scope
+ --> $DIR/suggest-let-for-assignment.rs:11:35
+ |
+LL | println!("some_variable: {}", some_variable);
+ | ^^^^^^^^^^^^^ not found in this scope
+
+error[E0425]: cannot find value `letother_variable` in this scope
+ --> $DIR/suggest-let-for-assignment.rs:13:5
+ |
+LL | letother_variable = 6;
+ | ^^^^^^^^^^^^^^^^^
+ |
+help: you might have meant to introduce a new binding
+ |
+LL | let other_variable = 6;
+ | ~~~~~~~~~~~~~~~~~~
+
+error[E0425]: cannot find value `other_variable` in this scope
+ --> $DIR/suggest-let-for-assignment.rs:14:36
+ |
+LL | println!("other_variable: {}", other_variable);
+ | ^^^^^^^^^^^^^^ not found in this scope
+
error[E0425]: cannot find value `x` in this scope
- --> $DIR/suggest-let-for-assignment.rs:10:8
+ --> $DIR/suggest-let-for-assignment.rs:16:8
|
LL | if x == "x" {
| ^ not found in this scope
error[E0425]: cannot find value `y` in this scope
- --> $DIR/suggest-let-for-assignment.rs:15:5
+ --> $DIR/suggest-let-for-assignment.rs:21:5
|
LL | y = 1 + 2;
| ^
@@ -50,11 +84,11 @@ LL | let y = 1 + 2;
| +++
error[E0425]: cannot find value `y` in this scope
- --> $DIR/suggest-let-for-assignment.rs:16:23
+ --> $DIR/suggest-let-for-assignment.rs:22:23
|
LL | println!("y: {}", y);
| ^ not found in this scope
-error: aborting due to 7 previous errors
+error: aborting due to 11 previous errors
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/suggestions/suggest-mut-method-for-loop-closure.stderr b/tests/ui/suggestions/suggest-mut-method-for-loop-closure.stderr
index 8a2df8d7c..0bd286e0a 100644
--- a/tests/ui/suggestions/suggest-mut-method-for-loop-closure.stderr
+++ b/tests/ui/suggestions/suggest-mut-method-for-loop-closure.stderr
@@ -10,6 +10,6 @@ LL | for mut t in buzz.values() {
LL | t.v += 1;
| ^^^^^^^^ `t` is a `&` reference, so the data it refers to cannot be written
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.stderr b/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.stderr
index c442ed637..1be14aa8f 100644
--- a/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.stderr
+++ b/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.stderr
@@ -10,6 +10,6 @@ LL | for (_k, v) in map.iter() {
LL | v.v += 1;
| ^^^^^^^^ `v` is a `&` reference, so the data it refers to cannot be written
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/suggestions/suggest-mut-method-for-loop.stderr b/tests/ui/suggestions/suggest-mut-method-for-loop.stderr
index 3eb9e1031..37bb25b30 100644
--- a/tests/ui/suggestions/suggest-mut-method-for-loop.stderr
+++ b/tests/ui/suggestions/suggest-mut-method-for-loop.stderr
@@ -10,6 +10,6 @@ LL | for mut t in buzz.values() {
LL | t.v += 1;
| ^^^^^^^^ `t` is a `&` reference, so the data it refers to cannot be written
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/suggestions/suggest-pin-macro.stderr b/tests/ui/suggestions/suggest-pin-macro.stderr
index 1220cf650..a761a454a 100644
--- a/tests/ui/suggestions/suggest-pin-macro.stderr
+++ b/tests/ui/suggestions/suggest-pin-macro.stderr
@@ -14,6 +14,6 @@ LL | struct Test {
note: required by a bound in `Pin::<&'a mut T>::get_mut`
--> $SRC_DIR/core/src/pin.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/suggest-remove-refs-1.stderr b/tests/ui/suggestions/suggest-remove-refs-1.stderr
index 387770535..523f78dff 100644
--- a/tests/ui/suggestions/suggest-remove-refs-1.stderr
+++ b/tests/ui/suggestions/suggest-remove-refs-1.stderr
@@ -12,6 +12,6 @@ LL - for (i, _) in &v.iter().enumerate() {
LL + for (i, _) in v.iter().enumerate() {
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/suggest-remove-refs-2.stderr b/tests/ui/suggestions/suggest-remove-refs-2.stderr
index 1632b2abb..bbe3261e1 100644
--- a/tests/ui/suggestions/suggest-remove-refs-2.stderr
+++ b/tests/ui/suggestions/suggest-remove-refs-2.stderr
@@ -12,6 +12,6 @@ LL - for (i, _) in & & & & &v.iter().enumerate() {
LL + for (i, _) in v.iter().enumerate() {
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/suggest-remove-refs-3.stderr b/tests/ui/suggestions/suggest-remove-refs-3.stderr
index 7bf421a77..a3e142563 100644
--- a/tests/ui/suggestions/suggest-remove-refs-3.stderr
+++ b/tests/ui/suggestions/suggest-remove-refs-3.stderr
@@ -16,6 +16,6 @@ LL - for (i, _) in & & &
LL + for (i, _) in v
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/suggest-remove-refs-4.stderr b/tests/ui/suggestions/suggest-remove-refs-4.stderr
index e4ad17e06..ed9fc2dd2 100644
--- a/tests/ui/suggestions/suggest-remove-refs-4.stderr
+++ b/tests/ui/suggestions/suggest-remove-refs-4.stderr
@@ -12,6 +12,6 @@ LL ~ let foo = [1,2,3].iter();
LL ~ for _i in foo {}
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/suggest-ret-on-async-w-late.stderr b/tests/ui/suggestions/suggest-ret-on-async-w-late.stderr
index 352f6da36..0da0241fe 100644
--- a/tests/ui/suggestions/suggest-ret-on-async-w-late.stderr
+++ b/tests/ui/suggestions/suggest-ret-on-async-w-late.stderr
@@ -6,6 +6,6 @@ LL | async fn ice(_: &i32) {
LL | true
| ^^^^ expected `()`, found `bool`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.stderr b/tests/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.stderr
index c5df72c4a..12da91c20 100644
--- a/tests/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.stderr
+++ b/tests/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.stderr
@@ -6,5 +6,5 @@ LL | fn foo()
LL | }
| - unexpected token
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/suggestions/suggest-split-at-mut.stderr b/tests/ui/suggestions/suggest-split-at-mut.stderr
index bb1851383..c42f09e32 100644
--- a/tests/ui/suggestions/suggest-split-at-mut.stderr
+++ b/tests/ui/suggestions/suggest-split-at-mut.stderr
@@ -11,6 +11,6 @@ LL | *a = 5;
= help: consider using `.split_at_mut(position)` or similar method to obtain two mutable non-overlapping sub-slices
= help: consider using `.swap(index_1, index_2)` to swap elements at the specified indices
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/suggestions/suggest-trait-in-ufcs-in-hrtb.stderr b/tests/ui/suggestions/suggest-trait-in-ufcs-in-hrtb.stderr
index 0d1eed67c..c0f0c4142 100644
--- a/tests/ui/suggestions/suggest-trait-in-ufcs-in-hrtb.stderr
+++ b/tests/ui/suggestions/suggest-trait-in-ufcs-in-hrtb.stderr
@@ -4,6 +4,6 @@ error[E0223]: ambiguous associated type
LL | impl<S> Foo for Bar<S> where for<'a> <&'a S>::Item: Foo {}
| ^^^^^^^^^^^^^ help: use fully-qualified syntax: `<&'a S as IntoIterator>::Item`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0223`.
diff --git a/tests/ui/suggestions/suggest-tryinto-edition-change.stderr b/tests/ui/suggestions/suggest-tryinto-edition-change.stderr
index 671f5efdd..057e37dbe 100644
--- a/tests/ui/suggestions/suggest-tryinto-edition-change.stderr
+++ b/tests/ui/suggestions/suggest-tryinto-edition-change.stderr
@@ -4,8 +4,8 @@ error[E0433]: failed to resolve: use of undeclared type `TryFrom`
LL | let _i: i16 = TryFrom::try_from(0_i32).unwrap();
| ^^^^^^^ use of undeclared type `TryFrom`
|
- = note: 'std::convert::TryFrom' is included in the prelude starting in Edition 2021
= note: 'core::convert::TryFrom' is included in the prelude starting in Edition 2021
+ = note: 'std::convert::TryFrom' is included in the prelude starting in Edition 2021
help: consider importing one of these items
|
LL + use core::convert::TryFrom;
@@ -19,8 +19,8 @@ error[E0433]: failed to resolve: use of undeclared type `TryInto`
LL | let _i: i16 = TryInto::try_into(0_i32).unwrap();
| ^^^^^^^ use of undeclared type `TryInto`
|
- = note: 'std::convert::TryInto' is included in the prelude starting in Edition 2021
= note: 'core::convert::TryInto' is included in the prelude starting in Edition 2021
+ = note: 'std::convert::TryInto' is included in the prelude starting in Edition 2021
help: consider importing one of these items
|
LL + use core::convert::TryInto;
@@ -34,8 +34,8 @@ error[E0433]: failed to resolve: use of undeclared type `FromIterator`
LL | let _v: Vec<_> = FromIterator::from_iter(&[1]);
| ^^^^^^^^^^^^ use of undeclared type `FromIterator`
|
- = note: 'std::iter::FromIterator' is included in the prelude starting in Edition 2021
= note: 'core::iter::FromIterator' is included in the prelude starting in Edition 2021
+ = note: 'std::iter::FromIterator' is included in the prelude starting in Edition 2021
help: a trait with a similar name exists
|
LL | let _v: Vec<_> = IntoIterator::from_iter(&[1]);
diff --git a/tests/ui/suggestions/suggest_print_over_printf.stderr b/tests/ui/suggestions/suggest_print_over_printf.stderr
index 1214bec16..8a7974513 100644
--- a/tests/ui/suggestions/suggest_print_over_printf.stderr
+++ b/tests/ui/suggestions/suggest_print_over_printf.stderr
@@ -9,6 +9,6 @@ help: you may have meant to use the `print` macro
LL | print!("%d", x);
| ~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/suggestions/too-many-field-suggestions.stderr b/tests/ui/suggestions/too-many-field-suggestions.stderr
index 63ad6fdb1..ac5c8cb60 100644
--- a/tests/ui/suggestions/too-many-field-suggestions.stderr
+++ b/tests/ui/suggestions/too-many-field-suggestions.stderr
@@ -25,7 +25,6 @@ error[E0609]: no field `field` on type `Thing`
LL | t.field;
| ^^^^^ unknown field
|
- = note: available fields are: `a0`, `a1`, `a2`, `a3`, `a4` ... and 5 others
help: some of the expressions' fields have a field of the same name
|
LL | t.a0.field;
diff --git a/tests/ui/suggestions/type-ascription-and-other-error.stderr b/tests/ui/suggestions/type-ascription-and-other-error.stderr
index eadf634bb..4efddca4b 100644
--- a/tests/ui/suggestions/type-ascription-and-other-error.stderr
+++ b/tests/ui/suggestions/type-ascription-and-other-error.stderr
@@ -4,5 +4,5 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found
LL | not rust;
| ^^^^ expected one of 8 possible tokens
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/suggestions/type-ascription-instead-of-let.stderr b/tests/ui/suggestions/type-ascription-instead-of-let.stderr
index 065b1f4d3..939990d74 100644
--- a/tests/ui/suggestions/type-ascription-instead-of-let.stderr
+++ b/tests/ui/suggestions/type-ascription-instead-of-let.stderr
@@ -9,5 +9,5 @@ help: you might have meant to introduce a new binding
LL | let temp: i32 = fun(5i32);
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/suggestions/type-ascription-instead-of-method.stderr b/tests/ui/suggestions/type-ascription-instead-of-method.stderr
index b3799101c..3242b028d 100644
--- a/tests/ui/suggestions/type-ascription-instead-of-method.stderr
+++ b/tests/ui/suggestions/type-ascription-instead-of-method.stderr
@@ -6,5 +6,5 @@ LL | let _ = Box:new("foo".to_string());
|
= note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/suggestions/type-ascription-instead-of-path-2.stderr b/tests/ui/suggestions/type-ascription-instead-of-path-2.stderr
index 43d00591e..ba0682cda 100644
--- a/tests/ui/suggestions/type-ascription-instead-of-path-2.stderr
+++ b/tests/ui/suggestions/type-ascription-instead-of-path-2.stderr
@@ -10,5 +10,5 @@ help: maybe write a path separator here
LL | let _ = vec![Ok(2)].into_iter().collect::<Result<Vec<_>,_>>()?;
| ~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/suggestions/type-ascription-instead-of-path.stderr b/tests/ui/suggestions/type-ascription-instead-of-path.stderr
index 849630218..566b036e5 100644
--- a/tests/ui/suggestions/type-ascription-instead-of-path.stderr
+++ b/tests/ui/suggestions/type-ascription-instead-of-path.stderr
@@ -6,5 +6,5 @@ LL | std:io::stdin();
|
= note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/suggestions/type-ascription-instead-of-variant.stderr b/tests/ui/suggestions/type-ascription-instead-of-variant.stderr
index 11d0f5f52..6fea7f940 100644
--- a/tests/ui/suggestions/type-ascription-instead-of-variant.stderr
+++ b/tests/ui/suggestions/type-ascription-instead-of-variant.stderr
@@ -6,5 +6,5 @@ LL | let _ = Option:Some("");
|
= note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/suggestions/type-mismatch-struct-field-shorthand-2.stderr b/tests/ui/suggestions/type-mismatch-struct-field-shorthand-2.stderr
index 12466868f..fb3573ee2 100644
--- a/tests/ui/suggestions/type-mismatch-struct-field-shorthand-2.stderr
+++ b/tests/ui/suggestions/type-mismatch-struct-field-shorthand-2.stderr
@@ -24,7 +24,12 @@ error[E0560]: struct `RGB` has no field named `c`
--> $DIR/type-mismatch-struct-field-shorthand-2.rs:5:25
|
LL | let _ = RGB { r, g, c };
- | ^ help: a field with a similar name exists: `b`
+ | ^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | let _ = RGB { r, g, b };
+ | ~
error: aborting due to 3 previous errors
diff --git a/tests/ui/suggestions/undeclared-module-alloc.stderr b/tests/ui/suggestions/undeclared-module-alloc.stderr
index 39169dfa9..a43954649 100644
--- a/tests/ui/suggestions/undeclared-module-alloc.stderr
+++ b/tests/ui/suggestions/undeclared-module-alloc.stderr
@@ -6,6 +6,6 @@ LL | use alloc::rc::Rc;
|
= help: add `extern crate alloc` to use the `alloc` crate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/suggestions/use-placement-resolve.stderr b/tests/ui/suggestions/use-placement-resolve.stderr
index 77724e7e2..562e0bc3f 100644
--- a/tests/ui/suggestions/use-placement-resolve.stderr
+++ b/tests/ui/suggestions/use-placement-resolve.stderr
@@ -9,6 +9,6 @@ help: consider importing this trait instead
LL + use std::fmt::Debug;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0404`.
diff --git a/tests/ui/suggestions/use-placement-typeck.stderr b/tests/ui/suggestions/use-placement-typeck.stderr
index e900e12b7..d8f2d58a2 100644
--- a/tests/ui/suggestions/use-placement-typeck.stderr
+++ b/tests/ui/suggestions/use-placement-typeck.stderr
@@ -16,6 +16,6 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f
LL + use m::Foo;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/super-at-top-level.stderr b/tests/ui/super-at-top-level.stderr
index 23613df67..4dce81fbe 100644
--- a/tests/ui/super-at-top-level.stderr
+++ b/tests/ui/super-at-top-level.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: there are too many leading `super` keywords
LL | use super::f;
| ^^^^^ there are too many leading `super` keywords
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/svh/changing-crates.stderr b/tests/ui/svh/changing-crates.stderr
index caefdfc96..130042e34 100644
--- a/tests/ui/svh/changing-crates.stderr
+++ b/tests/ui/svh/changing-crates.stderr
@@ -9,6 +9,6 @@ LL | extern crate b;
crate `a`: $PATH_a
crate `b`: $PATH_b
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0460`.
diff --git a/tests/ui/svh/svh-change-lit.stderr b/tests/ui/svh/svh-change-lit.stderr
index 5e890c6aa..b4d64a78e 100644
--- a/tests/ui/svh/svh-change-lit.stderr
+++ b/tests/ui/svh/svh-change-lit.stderr
@@ -9,6 +9,6 @@ LL | extern crate b;
crate `a`: $PATH_a
crate `b`: $PATH_b
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0460`.
diff --git a/tests/ui/svh/svh-change-significant-cfg.stderr b/tests/ui/svh/svh-change-significant-cfg.stderr
index dcc250d52..7cbbcca99 100644
--- a/tests/ui/svh/svh-change-significant-cfg.stderr
+++ b/tests/ui/svh/svh-change-significant-cfg.stderr
@@ -9,6 +9,6 @@ LL | extern crate b;
crate `a`: $PATH_a
crate `b`: $PATH_b
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0460`.
diff --git a/tests/ui/svh/svh-change-trait-bound.stderr b/tests/ui/svh/svh-change-trait-bound.stderr
index 2035993d2..b06b4a961 100644
--- a/tests/ui/svh/svh-change-trait-bound.stderr
+++ b/tests/ui/svh/svh-change-trait-bound.stderr
@@ -9,6 +9,6 @@ LL | extern crate b;
crate `a`: $PATH_a
crate `b`: $PATH_b
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0460`.
diff --git a/tests/ui/svh/svh-change-type-arg.stderr b/tests/ui/svh/svh-change-type-arg.stderr
index eef85aa95..c3e2b436f 100644
--- a/tests/ui/svh/svh-change-type-arg.stderr
+++ b/tests/ui/svh/svh-change-type-arg.stderr
@@ -9,6 +9,6 @@ LL | extern crate b;
crate `a`: $PATH_a
crate `b`: $PATH_b
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0460`.
diff --git a/tests/ui/svh/svh-change-type-ret.stderr b/tests/ui/svh/svh-change-type-ret.stderr
index 247f74e50..34602405d 100644
--- a/tests/ui/svh/svh-change-type-ret.stderr
+++ b/tests/ui/svh/svh-change-type-ret.stderr
@@ -9,6 +9,6 @@ LL | extern crate b;
crate `a`: $PATH_a
crate `b`: $PATH_b
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0460`.
diff --git a/tests/ui/svh/svh-change-type-static.stderr b/tests/ui/svh/svh-change-type-static.stderr
index 78b54f227..94c2d9f15 100644
--- a/tests/ui/svh/svh-change-type-static.stderr
+++ b/tests/ui/svh/svh-change-type-static.stderr
@@ -9,6 +9,6 @@ LL | extern crate b;
crate `a`: $PATH_a
crate `b`: $PATH_b
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0460`.
diff --git a/tests/ui/svh/svh-use-trait.stderr b/tests/ui/svh/svh-use-trait.stderr
index d8a81864d..31c16973b 100644
--- a/tests/ui/svh/svh-use-trait.stderr
+++ b/tests/ui/svh/svh-use-trait.stderr
@@ -9,6 +9,6 @@ LL | extern crate utb;
crate `uta`: $PATH_uta
crate `utb`: $PATH_utb
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0460`.
diff --git a/tests/ui/switched-expectations.stderr b/tests/ui/switched-expectations.stderr
index 6e1bbf701..cc5767474 100644
--- a/tests/ui/switched-expectations.stderr
+++ b/tests/ui/switched-expectations.stderr
@@ -6,6 +6,6 @@ LL | let ref string: String = var;
| |
| expected `String`, found `i32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/symbol-names/foreign-types.stderr b/tests/ui/symbol-names/foreign-types.stderr
index 9c8633742..630449914 100644
--- a/tests/ui/symbol-names/foreign-types.stderr
+++ b/tests/ui/symbol-names/foreign-types.stderr
@@ -1,4 +1,4 @@
-error: symbol-name(_RMCsCRATE_HASH_13foreign_typesINtB<REF>_5CheckNvB<REF>_11ForeignTypeE)
+error: symbol-name(_RMCsCRATE_HASH_13foreign_typesINtB<REF>_5CheckNtB<REF>_11ForeignTypeE)
--> $DIR/foreign-types.rs:13:1
|
LL | #[rustc_symbol_name]
diff --git a/tests/ui/symbol-names/impl2.stderr b/tests/ui/symbol-names/impl2.stderr
index 0c3205e01..36f080b60 100644
--- a/tests/ui/symbol-names/impl2.stderr
+++ b/tests/ui/symbol-names/impl2.stderr
@@ -4,5 +4,5 @@ error: def-path(<[u8; 1 + 2] as Foo>::baz)
LL | #[rustc_def_path]
| ^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/sync/mutexguard-sync.stderr b/tests/ui/sync/mutexguard-sync.stderr
index 4dc557119..1501a793d 100644
--- a/tests/ui/sync/mutexguard-sync.stderr
+++ b/tests/ui/sync/mutexguard-sync.stderr
@@ -15,6 +15,6 @@ note: required by a bound in `test_sync`
LL | fn test_sync<T: Sync>(_t: T) {}
| ^^^^ required by this bound in `test_sync`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/sync/suggest-once-cell.stderr b/tests/ui/sync/suggest-once-cell.stderr
index 20242f4b6..8a9446a09 100644
--- a/tests/ui/sync/suggest-once-cell.stderr
+++ b/tests/ui/sync/suggest-once-cell.stderr
@@ -12,6 +12,6 @@ note: required by a bound in `require_sync`
LL | fn require_sync<T: Sync>() {}
| ^^^^ required by this bound in `require_sync`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/sync/suggest-ref-cell.stderr b/tests/ui/sync/suggest-ref-cell.stderr
index ca3ae77b1..9ef8ddc18 100644
--- a/tests/ui/sync/suggest-ref-cell.stderr
+++ b/tests/ui/sync/suggest-ref-cell.stderr
@@ -12,6 +12,6 @@ note: required by a bound in `require_sync`
LL | fn require_sync<T: Sync>() {}
| ^^^^ required by this bound in `require_sync`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/tag-type-args.stderr b/tests/ui/tag-type-args.stderr
index 5b54880a6..49ecf65b7 100644
--- a/tests/ui/tag-type-args.stderr
+++ b/tests/ui/tag-type-args.stderr
@@ -14,6 +14,6 @@ help: add missing generic argument
LL | fn foo(c: Quux<T>) { assert!((false)); }
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/tag-variant-cast-non-nullary.stderr b/tests/ui/tag-variant-cast-non-nullary.stderr
index ae2f5a7ae..560dd7e81 100644
--- a/tests/ui/tag-variant-cast-non-nullary.stderr
+++ b/tests/ui/tag-variant-cast-non-nullary.stderr
@@ -6,6 +6,6 @@ LL | let val = v as isize;
|
= note: an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0605`.
diff --git a/tests/ui/tail-typeck.stderr b/tests/ui/tail-typeck.stderr
index 10dfd2de7..0e470a7b4 100644
--- a/tests/ui/tail-typeck.stderr
+++ b/tests/ui/tail-typeck.stderr
@@ -11,6 +11,6 @@ help: you can convert a `usize` to an `isize` and panic if the converted value d
LL | fn f() -> isize { return g().try_into().unwrap(); }
| ++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/target-feature/gate.stderr b/tests/ui/target-feature/gate.stderr
index 0ec7427c3..b3bd12600 100644
--- a/tests/ui/target-feature/gate.stderr
+++ b/tests/ui/target-feature/gate.stderr
@@ -7,6 +7,6 @@ LL | #[target_feature(enable = "avx512bw")]
= note: see issue #44839 <https://github.com/rust-lang/rust/issues/44839> for more information
= help: add `#![feature(avx512_target_feature)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/target-feature/tied-features-cli.one.stderr b/tests/ui/target-feature/tied-features-cli.one.stderr
index b4b50d981..bf211fbee 100644
--- a/tests/ui/target-feature/tied-features-cli.one.stderr
+++ b/tests/ui/target-feature/tied-features-cli.one.stderr
@@ -1,4 +1,4 @@
error: the target features paca, pacg must all be either enabled or disabled together
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/target-feature/tied-features-cli.three.stderr b/tests/ui/target-feature/tied-features-cli.three.stderr
index b4b50d981..bf211fbee 100644
--- a/tests/ui/target-feature/tied-features-cli.three.stderr
+++ b/tests/ui/target-feature/tied-features-cli.three.stderr
@@ -1,4 +1,4 @@
error: the target features paca, pacg must all be either enabled or disabled together
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/target-feature/tied-features-cli.two.stderr b/tests/ui/target-feature/tied-features-cli.two.stderr
index b4b50d981..bf211fbee 100644
--- a/tests/ui/target-feature/tied-features-cli.two.stderr
+++ b/tests/ui/target-feature/tied-features-cli.two.stderr
@@ -1,4 +1,4 @@
error: the target features paca, pacg must all be either enabled or disabled together
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/test-attrs/custom-test-frameworks/issue-107454.stderr b/tests/ui/test-attrs/custom-test-frameworks/issue-107454.stderr
index bd604afb7..6ac79924d 100644
--- a/tests/ui/test-attrs/custom-test-frameworks/issue-107454.stderr
+++ b/tests/ui/test-attrs/custom-test-frameworks/issue-107454.stderr
@@ -11,5 +11,5 @@ LL | #![deny(unnameable_test_items)]
| ^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the attribute macro `test_case` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/test-attrs/issue-109816.stderr b/tests/ui/test-attrs/issue-109816.stderr
index e69932875..6f5e3ae6b 100644
--- a/tests/ui/test-attrs/issue-109816.stderr
+++ b/tests/ui/test-attrs/issue-109816.stderr
@@ -12,5 +12,5 @@ help: replace with conditional compilation to make the item only exist when test
LL | #[cfg(test)]
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/test-attrs/issue-12997-2.stderr b/tests/ui/test-attrs/issue-12997-2.stderr
index 2a3d0e345..bc84ff413 100644
--- a/tests/ui/test-attrs/issue-12997-2.stderr
+++ b/tests/ui/test-attrs/issue-12997-2.stderr
@@ -16,6 +16,6 @@ LL | fn bar(x: isize) { }
| ^^^ --------
= note: this error originates in the attribute macro `bench` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/test-attrs/test-panic-abort-disabled.stderr b/tests/ui/test-attrs/test-panic-abort-disabled.stderr
index 9c65c7360..c6aeb41f5 100644
--- a/tests/ui/test-attrs/test-panic-abort-disabled.stderr
+++ b/tests/ui/test-attrs/test-panic-abort-disabled.stderr
@@ -1,4 +1,4 @@
error: building tests with panic=abort is not supported without `-Zpanic_abort_tests`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/test-attrs/test-warns-dead-code.stderr b/tests/ui/test-attrs/test-warns-dead-code.stderr
index 6c0f28841..1c58e3885 100644
--- a/tests/ui/test-attrs/test-warns-dead-code.stderr
+++ b/tests/ui/test-attrs/test-warns-dead-code.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(dead_code)]
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/thir-print/thir-flat-const-variant.stdout b/tests/ui/thir-print/thir-flat-const-variant.stdout
index 7bddc9259..1840be788 100644
--- a/tests/ui/thir-print/thir-flat-const-variant.stdout
+++ b/tests/ui/thir-print/thir-flat-const-variant.stdout
@@ -66,18 +66,6 @@ Thir {
),
span: $DIR/thir-flat-const-variant.rs:12:23: 12:35 (#0),
},
- Expr {
- kind: Scope {
- region_scope: Destruction(3),
- lint_level: Inherited,
- value: e3,
- },
- ty: Foo,
- temp_lifetime: Some(
- Node(3),
- ),
- span: $DIR/thir-flat-const-variant.rs:12:23: 12:35 (#0),
- },
],
stmts: [],
params: [],
@@ -151,18 +139,6 @@ Thir {
),
span: $DIR/thir-flat-const-variant.rs:13:23: 13:36 (#0),
},
- Expr {
- kind: Scope {
- region_scope: Destruction(3),
- lint_level: Inherited,
- value: e3,
- },
- ty: Foo,
- temp_lifetime: Some(
- Node(3),
- ),
- span: $DIR/thir-flat-const-variant.rs:13:23: 13:36 (#0),
- },
],
stmts: [],
params: [],
@@ -236,18 +212,6 @@ Thir {
),
span: $DIR/thir-flat-const-variant.rs:14:24: 14:36 (#0),
},
- Expr {
- kind: Scope {
- region_scope: Destruction(3),
- lint_level: Inherited,
- value: e3,
- },
- ty: Foo,
- temp_lifetime: Some(
- Node(3),
- ),
- span: $DIR/thir-flat-const-variant.rs:14:24: 14:36 (#0),
- },
],
stmts: [],
params: [],
@@ -321,18 +285,6 @@ Thir {
),
span: $DIR/thir-flat-const-variant.rs:15:24: 15:37 (#0),
},
- Expr {
- kind: Scope {
- region_scope: Destruction(3),
- lint_level: Inherited,
- value: e3,
- },
- ty: Foo,
- temp_lifetime: Some(
- Node(3),
- ),
- span: $DIR/thir-flat-const-variant.rs:15:24: 15:37 (#0),
- },
],
stmts: [],
params: [],
@@ -348,7 +300,6 @@ Thir {
Block {
targeted_by_break: false,
region_scope: Node(1),
- opt_destruction_scope: None,
span: $DIR/thir-flat-const-variant.rs:18:11: 18:13 (#0),
stmts: [],
expr: None,
@@ -380,18 +331,6 @@ Thir {
),
span: $DIR/thir-flat-const-variant.rs:18:11: 18:13 (#0),
},
- Expr {
- kind: Scope {
- region_scope: Destruction(2),
- lint_level: Inherited,
- value: e1,
- },
- ty: (),
- temp_lifetime: Some(
- Node(2),
- ),
- span: $DIR/thir-flat-const-variant.rs:18:11: 18:13 (#0),
- },
],
stmts: [],
params: [],
diff --git a/tests/ui/thir-print/thir-flat.stdout b/tests/ui/thir-print/thir-flat.stdout
index b0aa44b56..a31d08ada 100644
--- a/tests/ui/thir-print/thir-flat.stdout
+++ b/tests/ui/thir-print/thir-flat.stdout
@@ -8,7 +8,6 @@ Thir {
Block {
targeted_by_break: false,
region_scope: Node(1),
- opt_destruction_scope: None,
span: $DIR/thir-flat.rs:4:15: 4:17 (#0),
stmts: [],
expr: None,
@@ -40,18 +39,6 @@ Thir {
),
span: $DIR/thir-flat.rs:4:15: 4:17 (#0),
},
- Expr {
- kind: Scope {
- region_scope: Destruction(2),
- lint_level: Inherited,
- value: e1,
- },
- ty: (),
- temp_lifetime: Some(
- Node(2),
- ),
- span: $DIR/thir-flat.rs:4:15: 4:17 (#0),
- },
],
stmts: [],
params: [],
diff --git a/tests/ui/thir-print/thir-tree-match.stdout b/tests/ui/thir-print/thir-tree-match.stdout
index 3fc130f01..60c9283ab 100644
--- a/tests/ui/thir-print/thir-tree-match.stdout
+++ b/tests/ui/thir-print/thir-tree-match.stdout
@@ -31,262 +31,217 @@ body:
span: $DIR/thir-tree-match.rs:15:32: 21:2 (#0)
kind:
Scope {
- region_scope: Destruction(26)
- lint_level: Inherited
+ region_scope: Node(26)
+ lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).26))
value:
Expr {
ty: bool
temp_lifetime: Some(Node(26))
span: $DIR/thir-tree-match.rs:15:32: 21:2 (#0)
kind:
- Scope {
- region_scope: Node(26)
- lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).26))
- value:
+ Block {
+ targeted_by_break: false
+ span: $DIR/thir-tree-match.rs:15:32: 21:2 (#0)
+ region_scope: Node(25)
+ safety_mode: Safe
+ stmts: []
+ expr:
Expr {
ty: bool
temp_lifetime: Some(Node(26))
- span: $DIR/thir-tree-match.rs:15:32: 21:2 (#0)
+ span: $DIR/thir-tree-match.rs:16:5: 20:6 (#0)
kind:
- Block {
- targeted_by_break: false
- opt_destruction_scope: None
- span: $DIR/thir-tree-match.rs:15:32: 21:2 (#0)
- region_scope: Node(25)
- safety_mode: Safe
- stmts: []
- expr:
+ Scope {
+ region_scope: Node(3)
+ lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).3))
+ value:
Expr {
ty: bool
temp_lifetime: Some(Node(26))
span: $DIR/thir-tree-match.rs:16:5: 20:6 (#0)
kind:
- Scope {
- region_scope: Node(3)
- lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).3))
- value:
+ Match {
+ scrutinee:
Expr {
- ty: bool
+ ty: Foo
temp_lifetime: Some(Node(26))
- span: $DIR/thir-tree-match.rs:16:5: 20:6 (#0)
+ span: $DIR/thir-tree-match.rs:16:11: 16:14 (#0)
kind:
- Match {
- scrutinee:
+ Scope {
+ region_scope: Node(4)
+ lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).4))
+ value:
Expr {
ty: Foo
temp_lifetime: Some(Node(26))
span: $DIR/thir-tree-match.rs:16:11: 16:14 (#0)
kind:
- Scope {
- region_scope: Node(4)
- lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).4))
- value:
- Expr {
- ty: Foo
- temp_lifetime: Some(Node(26))
- span: $DIR/thir-tree-match.rs:16:11: 16:14 (#0)
- kind:
- VarRef {
- id: LocalVarId(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).2))
- }
- }
+ VarRef {
+ id: LocalVarId(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).2))
}
}
- arms: [
- Arm {
- pattern:
+ }
+ }
+ arms: [
+ Arm {
+ pattern:
+ Pat: {
+ ty: Foo
+ span: $DIR/thir-tree-match.rs:17:9: 17:32 (#0)
+ kind: PatKind {
+ Variant {
+ adt_def:
+ AdtDef {
+ did: DefId(0:10 ~ thir_tree_match[fcf8]::Foo)
+ variants: [VariantDef { def_id: DefId(0:11 ~ thir_tree_match[fcf8]::Foo::FooOne), ctor: Some((Fn, DefId(0:12 ~ thir_tree_match[fcf8]::Foo::FooOne::{constructor#0}))), name: "FooOne", discr: Relative(0), fields: [FieldDef { did: DefId(0:13 ~ thir_tree_match[fcf8]::Foo::FooOne::0), name: "0", vis: Restricted(DefId(0:0 ~ thir_tree_match[fcf8])) }], flags: NO_VARIANT_FLAGS }, VariantDef { def_id: DefId(0:14 ~ thir_tree_match[fcf8]::Foo::FooTwo), ctor: Some((Const, DefId(0:15 ~ thir_tree_match[fcf8]::Foo::FooTwo::{constructor#0}))), name: "FooTwo", discr: Relative(1), fields: [], flags: NO_VARIANT_FLAGS }]
+ flags: IS_ENUM
+ repr: ReprOptions { int: None, align: None, pack: None, flags: (empty), field_shuffle_seed: 3477539199540094892 }
+ args: []
+ variant_index: 0
+ subpatterns: [
Pat: {
- ty: Foo
- span: $DIR/thir-tree-match.rs:17:9: 17:32 (#0)
+ ty: Bar
+ span: $DIR/thir-tree-match.rs:17:21: 17:31 (#0)
kind: PatKind {
Variant {
adt_def:
AdtDef {
- did: DefId(0:10 ~ thir_tree_match[fcf8]::Foo)
- variants: [VariantDef { def_id: DefId(0:11 ~ thir_tree_match[fcf8]::Foo::FooOne), ctor: Some((Fn, DefId(0:12 ~ thir_tree_match[fcf8]::Foo::FooOne::{constructor#0}))), name: "FooOne", discr: Relative(0), fields: [FieldDef { did: DefId(0:13 ~ thir_tree_match[fcf8]::Foo::FooOne::0), name: "0", vis: Restricted(DefId(0:0 ~ thir_tree_match[fcf8])) }], flags: NO_VARIANT_FLAGS }, VariantDef { def_id: DefId(0:14 ~ thir_tree_match[fcf8]::Foo::FooTwo), ctor: Some((Const, DefId(0:15 ~ thir_tree_match[fcf8]::Foo::FooTwo::{constructor#0}))), name: "FooTwo", discr: Relative(1), fields: [], flags: NO_VARIANT_FLAGS }]
+ did: DefId(0:3 ~ thir_tree_match[fcf8]::Bar)
+ variants: [VariantDef { def_id: DefId(0:4 ~ thir_tree_match[fcf8]::Bar::First), ctor: Some((Const, DefId(0:5 ~ thir_tree_match[fcf8]::Bar::First::{constructor#0}))), name: "First", discr: Relative(0), fields: [], flags: NO_VARIANT_FLAGS }, VariantDef { def_id: DefId(0:6 ~ thir_tree_match[fcf8]::Bar::Second), ctor: Some((Const, DefId(0:7 ~ thir_tree_match[fcf8]::Bar::Second::{constructor#0}))), name: "Second", discr: Relative(1), fields: [], flags: NO_VARIANT_FLAGS }, VariantDef { def_id: DefId(0:8 ~ thir_tree_match[fcf8]::Bar::Third), ctor: Some((Const, DefId(0:9 ~ thir_tree_match[fcf8]::Bar::Third::{constructor#0}))), name: "Third", discr: Relative(2), fields: [], flags: NO_VARIANT_FLAGS }]
flags: IS_ENUM
- repr: ReprOptions { int: None, align: None, pack: None, flags: (empty), field_shuffle_seed: 3477539199540094892 }
+ repr: ReprOptions { int: None, align: None, pack: None, flags: (empty), field_shuffle_seed: 10333377570083945360 }
args: []
variant_index: 0
- subpatterns: [
- Pat: {
- ty: Bar
- span: $DIR/thir-tree-match.rs:17:21: 17:31 (#0)
- kind: PatKind {
- Variant {
- adt_def:
- AdtDef {
- did: DefId(0:3 ~ thir_tree_match[fcf8]::Bar)
- variants: [VariantDef { def_id: DefId(0:4 ~ thir_tree_match[fcf8]::Bar::First), ctor: Some((Const, DefId(0:5 ~ thir_tree_match[fcf8]::Bar::First::{constructor#0}))), name: "First", discr: Relative(0), fields: [], flags: NO_VARIANT_FLAGS }, VariantDef { def_id: DefId(0:6 ~ thir_tree_match[fcf8]::Bar::Second), ctor: Some((Const, DefId(0:7 ~ thir_tree_match[fcf8]::Bar::Second::{constructor#0}))), name: "Second", discr: Relative(1), fields: [], flags: NO_VARIANT_FLAGS }, VariantDef { def_id: DefId(0:8 ~ thir_tree_match[fcf8]::Bar::Third), ctor: Some((Const, DefId(0:9 ~ thir_tree_match[fcf8]::Bar::Third::{constructor#0}))), name: "Third", discr: Relative(2), fields: [], flags: NO_VARIANT_FLAGS }]
- flags: IS_ENUM
- repr: ReprOptions { int: None, align: None, pack: None, flags: (empty), field_shuffle_seed: 10333377570083945360 }
- args: []
- variant_index: 0
- subpatterns: []
- }
- }
- }
- ]
+ subpatterns: []
}
}
}
- guard: None
- body:
+ ]
+ }
+ }
+ }
+ guard: None
+ body:
+ Expr {
+ ty: bool
+ temp_lifetime: Some(Node(13))
+ span: $DIR/thir-tree-match.rs:17:36: 17:40 (#0)
+ kind:
+ Scope {
+ region_scope: Node(13)
+ lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).13))
+ value:
Expr {
ty: bool
temp_lifetime: Some(Node(13))
span: $DIR/thir-tree-match.rs:17:36: 17:40 (#0)
kind:
- Scope {
- region_scope: Destruction(13)
- lint_level: Inherited
- value:
- Expr {
- ty: bool
- temp_lifetime: Some(Node(13))
- span: $DIR/thir-tree-match.rs:17:36: 17:40 (#0)
- kind:
- Scope {
- region_scope: Node(13)
- lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).13))
- value:
- Expr {
- ty: bool
- temp_lifetime: Some(Node(13))
- span: $DIR/thir-tree-match.rs:17:36: 17:40 (#0)
- kind:
- Literal( lit: Spanned { node: Bool(true), span: $DIR/thir-tree-match.rs:17:36: 17:40 (#0) }, neg: false)
+ Literal( lit: Spanned { node: Bool(true), span: $DIR/thir-tree-match.rs:17:36: 17:40 (#0) }, neg: false)
- }
- }
- }
- }
}
- lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).12))
- scope: Node(12)
- span: $DIR/thir-tree-match.rs:17:9: 17:40 (#0)
}
- Arm {
- pattern:
+ }
+ lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).12))
+ scope: Node(12)
+ span: $DIR/thir-tree-match.rs:17:9: 17:40 (#0)
+ }
+ Arm {
+ pattern:
+ Pat: {
+ ty: Foo
+ span: $DIR/thir-tree-match.rs:18:9: 18:23 (#0)
+ kind: PatKind {
+ Variant {
+ adt_def:
+ AdtDef {
+ did: DefId(0:10 ~ thir_tree_match[fcf8]::Foo)
+ variants: [VariantDef { def_id: DefId(0:11 ~ thir_tree_match[fcf8]::Foo::FooOne), ctor: Some((Fn, DefId(0:12 ~ thir_tree_match[fcf8]::Foo::FooOne::{constructor#0}))), name: "FooOne", discr: Relative(0), fields: [FieldDef { did: DefId(0:13 ~ thir_tree_match[fcf8]::Foo::FooOne::0), name: "0", vis: Restricted(DefId(0:0 ~ thir_tree_match[fcf8])) }], flags: NO_VARIANT_FLAGS }, VariantDef { def_id: DefId(0:14 ~ thir_tree_match[fcf8]::Foo::FooTwo), ctor: Some((Const, DefId(0:15 ~ thir_tree_match[fcf8]::Foo::FooTwo::{constructor#0}))), name: "FooTwo", discr: Relative(1), fields: [], flags: NO_VARIANT_FLAGS }]
+ flags: IS_ENUM
+ repr: ReprOptions { int: None, align: None, pack: None, flags: (empty), field_shuffle_seed: 3477539199540094892 }
+ args: []
+ variant_index: 0
+ subpatterns: [
Pat: {
- ty: Foo
- span: $DIR/thir-tree-match.rs:18:9: 18:23 (#0)
+ ty: Bar
+ span: $DIR/thir-tree-match.rs:18:21: 18:22 (#0)
kind: PatKind {
- Variant {
- adt_def:
- AdtDef {
- did: DefId(0:10 ~ thir_tree_match[fcf8]::Foo)
- variants: [VariantDef { def_id: DefId(0:11 ~ thir_tree_match[fcf8]::Foo::FooOne), ctor: Some((Fn, DefId(0:12 ~ thir_tree_match[fcf8]::Foo::FooOne::{constructor#0}))), name: "FooOne", discr: Relative(0), fields: [FieldDef { did: DefId(0:13 ~ thir_tree_match[fcf8]::Foo::FooOne::0), name: "0", vis: Restricted(DefId(0:0 ~ thir_tree_match[fcf8])) }], flags: NO_VARIANT_FLAGS }, VariantDef { def_id: DefId(0:14 ~ thir_tree_match[fcf8]::Foo::FooTwo), ctor: Some((Const, DefId(0:15 ~ thir_tree_match[fcf8]::Foo::FooTwo::{constructor#0}))), name: "FooTwo", discr: Relative(1), fields: [], flags: NO_VARIANT_FLAGS }]
- flags: IS_ENUM
- repr: ReprOptions { int: None, align: None, pack: None, flags: (empty), field_shuffle_seed: 3477539199540094892 }
- args: []
- variant_index: 0
- subpatterns: [
- Pat: {
- ty: Bar
- span: $DIR/thir-tree-match.rs:18:21: 18:22 (#0)
- kind: PatKind {
- Wild
- }
- }
- ]
- }
+ Wild
}
}
- guard: None
- body:
+ ]
+ }
+ }
+ }
+ guard: None
+ body:
+ Expr {
+ ty: bool
+ temp_lifetime: Some(Node(19))
+ span: $DIR/thir-tree-match.rs:18:27: 18:32 (#0)
+ kind:
+ Scope {
+ region_scope: Node(19)
+ lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).19))
+ value:
Expr {
ty: bool
temp_lifetime: Some(Node(19))
span: $DIR/thir-tree-match.rs:18:27: 18:32 (#0)
kind:
- Scope {
- region_scope: Destruction(19)
- lint_level: Inherited
- value:
- Expr {
- ty: bool
- temp_lifetime: Some(Node(19))
- span: $DIR/thir-tree-match.rs:18:27: 18:32 (#0)
- kind:
- Scope {
- region_scope: Node(19)
- lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).19))
- value:
- Expr {
- ty: bool
- temp_lifetime: Some(Node(19))
- span: $DIR/thir-tree-match.rs:18:27: 18:32 (#0)
- kind:
- Literal( lit: Spanned { node: Bool(false), span: $DIR/thir-tree-match.rs:18:27: 18:32 (#0) }, neg: false)
+ Literal( lit: Spanned { node: Bool(false), span: $DIR/thir-tree-match.rs:18:27: 18:32 (#0) }, neg: false)
- }
- }
- }
- }
}
- lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).18))
- scope: Node(18)
- span: $DIR/thir-tree-match.rs:18:9: 18:32 (#0)
}
- Arm {
- pattern:
- Pat: {
- ty: Foo
- span: $DIR/thir-tree-match.rs:19:9: 19:20 (#0)
- kind: PatKind {
- Variant {
- adt_def:
- AdtDef {
- did: DefId(0:10 ~ thir_tree_match[fcf8]::Foo)
- variants: [VariantDef { def_id: DefId(0:11 ~ thir_tree_match[fcf8]::Foo::FooOne), ctor: Some((Fn, DefId(0:12 ~ thir_tree_match[fcf8]::Foo::FooOne::{constructor#0}))), name: "FooOne", discr: Relative(0), fields: [FieldDef { did: DefId(0:13 ~ thir_tree_match[fcf8]::Foo::FooOne::0), name: "0", vis: Restricted(DefId(0:0 ~ thir_tree_match[fcf8])) }], flags: NO_VARIANT_FLAGS }, VariantDef { def_id: DefId(0:14 ~ thir_tree_match[fcf8]::Foo::FooTwo), ctor: Some((Const, DefId(0:15 ~ thir_tree_match[fcf8]::Foo::FooTwo::{constructor#0}))), name: "FooTwo", discr: Relative(1), fields: [], flags: NO_VARIANT_FLAGS }]
- flags: IS_ENUM
- repr: ReprOptions { int: None, align: None, pack: None, flags: (empty), field_shuffle_seed: 3477539199540094892 }
- args: []
- variant_index: 1
- subpatterns: []
- }
- }
- }
- guard: None
- body:
+ }
+ lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).18))
+ scope: Node(18)
+ span: $DIR/thir-tree-match.rs:18:9: 18:32 (#0)
+ }
+ Arm {
+ pattern:
+ Pat: {
+ ty: Foo
+ span: $DIR/thir-tree-match.rs:19:9: 19:20 (#0)
+ kind: PatKind {
+ Variant {
+ adt_def:
+ AdtDef {
+ did: DefId(0:10 ~ thir_tree_match[fcf8]::Foo)
+ variants: [VariantDef { def_id: DefId(0:11 ~ thir_tree_match[fcf8]::Foo::FooOne), ctor: Some((Fn, DefId(0:12 ~ thir_tree_match[fcf8]::Foo::FooOne::{constructor#0}))), name: "FooOne", discr: Relative(0), fields: [FieldDef { did: DefId(0:13 ~ thir_tree_match[fcf8]::Foo::FooOne::0), name: "0", vis: Restricted(DefId(0:0 ~ thir_tree_match[fcf8])) }], flags: NO_VARIANT_FLAGS }, VariantDef { def_id: DefId(0:14 ~ thir_tree_match[fcf8]::Foo::FooTwo), ctor: Some((Const, DefId(0:15 ~ thir_tree_match[fcf8]::Foo::FooTwo::{constructor#0}))), name: "FooTwo", discr: Relative(1), fields: [], flags: NO_VARIANT_FLAGS }]
+ flags: IS_ENUM
+ repr: ReprOptions { int: None, align: None, pack: None, flags: (empty), field_shuffle_seed: 3477539199540094892 }
+ args: []
+ variant_index: 1
+ subpatterns: []
+ }
+ }
+ }
+ guard: None
+ body:
+ Expr {
+ ty: bool
+ temp_lifetime: Some(Node(24))
+ span: $DIR/thir-tree-match.rs:19:24: 19:28 (#0)
+ kind:
+ Scope {
+ region_scope: Node(24)
+ lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).24))
+ value:
Expr {
ty: bool
temp_lifetime: Some(Node(24))
span: $DIR/thir-tree-match.rs:19:24: 19:28 (#0)
kind:
- Scope {
- region_scope: Destruction(24)
- lint_level: Inherited
- value:
- Expr {
- ty: bool
- temp_lifetime: Some(Node(24))
- span: $DIR/thir-tree-match.rs:19:24: 19:28 (#0)
- kind:
- Scope {
- region_scope: Node(24)
- lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).24))
- value:
- Expr {
- ty: bool
- temp_lifetime: Some(Node(24))
- span: $DIR/thir-tree-match.rs:19:24: 19:28 (#0)
- kind:
- Literal( lit: Spanned { node: Bool(true), span: $DIR/thir-tree-match.rs:19:24: 19:28 (#0) }, neg: false)
+ Literal( lit: Spanned { node: Bool(true), span: $DIR/thir-tree-match.rs:19:24: 19:28 (#0) }, neg: false)
- }
- }
- }
- }
}
- lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).23))
- scope: Node(23)
- span: $DIR/thir-tree-match.rs:19:9: 19:28 (#0)
}
- ]
}
+ lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).23))
+ scope: Node(23)
+ span: $DIR/thir-tree-match.rs:19:9: 19:28 (#0)
}
+ ]
}
}
}
@@ -307,33 +262,21 @@ body:
span: $DIR/thir-tree-match.rs:23:11: 23:13 (#0)
kind:
Scope {
- region_scope: Destruction(2)
- lint_level: Inherited
+ region_scope: Node(2)
+ lint_level: Explicit(HirId(DefId(0:17 ~ thir_tree_match[fcf8]::main).2))
value:
Expr {
ty: ()
temp_lifetime: Some(Node(2))
span: $DIR/thir-tree-match.rs:23:11: 23:13 (#0)
kind:
- Scope {
- region_scope: Node(2)
- lint_level: Explicit(HirId(DefId(0:17 ~ thir_tree_match[fcf8]::main).2))
- value:
- Expr {
- ty: ()
- temp_lifetime: Some(Node(2))
- span: $DIR/thir-tree-match.rs:23:11: 23:13 (#0)
- kind:
- Block {
- targeted_by_break: false
- opt_destruction_scope: None
- span: $DIR/thir-tree-match.rs:23:11: 23:13 (#0)
- region_scope: Node(1)
- safety_mode: Safe
- stmts: []
- expr: []
- }
- }
+ Block {
+ targeted_by_break: false
+ span: $DIR/thir-tree-match.rs:23:11: 23:13 (#0)
+ region_scope: Node(1)
+ safety_mode: Safe
+ stmts: []
+ expr: []
}
}
}
diff --git a/tests/ui/thir-print/thir-tree.stdout b/tests/ui/thir-print/thir-tree.stdout
index 1b478dbef..ef6db368d 100644
--- a/tests/ui/thir-print/thir-tree.stdout
+++ b/tests/ui/thir-print/thir-tree.stdout
@@ -8,33 +8,21 @@ body:
span: $DIR/thir-tree.rs:4:15: 4:17 (#0)
kind:
Scope {
- region_scope: Destruction(2)
- lint_level: Inherited
+ region_scope: Node(2)
+ lint_level: Explicit(HirId(DefId(0:3 ~ thir_tree[7aaa]::main).2))
value:
Expr {
ty: ()
temp_lifetime: Some(Node(2))
span: $DIR/thir-tree.rs:4:15: 4:17 (#0)
kind:
- Scope {
- region_scope: Node(2)
- lint_level: Explicit(HirId(DefId(0:3 ~ thir_tree[7aaa]::main).2))
- value:
- Expr {
- ty: ()
- temp_lifetime: Some(Node(2))
- span: $DIR/thir-tree.rs:4:15: 4:17 (#0)
- kind:
- Block {
- targeted_by_break: false
- opt_destruction_scope: None
- span: $DIR/thir-tree.rs:4:15: 4:17 (#0)
- region_scope: Node(1)
- safety_mode: Safe
- stmts: []
- expr: []
- }
- }
+ Block {
+ targeted_by_break: false
+ span: $DIR/thir-tree.rs:4:15: 4:17 (#0)
+ region_scope: Node(1)
+ safety_mode: Safe
+ stmts: []
+ expr: []
}
}
}
diff --git a/tests/ui/thread-local/thread-local-mutation.stderr b/tests/ui/thread-local/thread-local-mutation.stderr
index e5dc0e72e..9001de34a 100644
--- a/tests/ui/thread-local/thread-local-mutation.stderr
+++ b/tests/ui/thread-local/thread-local-mutation.stderr
@@ -4,6 +4,6 @@ error[E0594]: cannot assign to immutable static item `S`
LL | S = "after";
| ^^^^^^^^^^^ cannot assign
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/tool-attributes/diagnostic_item.stderr b/tests/ui/tool-attributes/diagnostic_item.stderr
index 743e4b658..a181aee6b 100644
--- a/tests/ui/tool-attributes/diagnostic_item.stderr
+++ b/tests/ui/tool-attributes/diagnostic_item.stderr
@@ -6,6 +6,6 @@ LL | #[rustc_diagnostic_item = "foomp"]
|
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/tool-attributes/tool-attributes-shadowing.stderr b/tests/ui/tool-attributes/tool-attributes-shadowing.stderr
index 98ad109a0..f2da61727 100644
--- a/tests/ui/tool-attributes/tool-attributes-shadowing.stderr
+++ b/tests/ui/tool-attributes/tool-attributes-shadowing.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: could not find `skip` in `rustfmt`
LL | #[rustfmt::skip]
| ^^^^ could not find `skip` in `rustfmt`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/tool_lints-fail.stderr b/tests/ui/tool_lints-fail.stderr
index 16f678144..7d80e0728 100644
--- a/tests/ui/tool_lints-fail.stderr
+++ b/tests/ui/tool_lints-fail.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(unknown_lints)]
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/tool_lints_2018_preview.rs b/tests/ui/tool_lints_2018_preview.rs
index 190f0b99d..e467d3437 100644
--- a/tests/ui/tool_lints_2018_preview.rs
+++ b/tests/ui/tool_lints_2018_preview.rs
@@ -1,6 +1,5 @@
// run-pass
-#![feature(rust_2018_preview)]
#![deny(unknown_lints)]
#[allow(clippy::almost_swapped)]
diff --git a/tests/ui/track-diagnostics/track2.stderr b/tests/ui/track-diagnostics/track2.stderr
index fe13e5ef3..dffa0b0c9 100644
--- a/tests/ui/track-diagnostics/track2.stderr
+++ b/tests/ui/track-diagnostics/track2.stderr
@@ -13,6 +13,6 @@ help: borrow this binding in the pattern to avoid moving the value
LL | let ref _moved @ ref _from = String::from("foo");
| +++ +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/track-diagnostics/track4.stderr b/tests/ui/track-diagnostics/track4.stderr
index 9ebf222ee..d9eaea936 100644
--- a/tests/ui/track-diagnostics/track4.stderr
+++ b/tests/ui/track-diagnostics/track4.stderr
@@ -10,5 +10,5 @@ help: add `struct` here to parse `onion` as a public struct
LL | pub struct onion {
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/track-diagnostics/track5.stderr b/tests/ui/track-diagnostics/track5.stderr
index aa54f92b6..ecc7d81b3 100644
--- a/tests/ui/track-diagnostics/track5.stderr
+++ b/tests/ui/track-diagnostics/track5.stderr
@@ -5,5 +5,5 @@ LL | }
| ^ unexpected closing delimiter
-Ztrack-diagnostics: created at compiler/rustc_parse/src/lexer/tokentrees.rs:LL:CC
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/track-diagnostics/track6.stderr b/tests/ui/track-diagnostics/track6.stderr
index 583b02555..8ca56d6db 100644
--- a/tests/ui/track-diagnostics/track6.stderr
+++ b/tests/ui/track-diagnostics/track6.stderr
@@ -8,6 +8,6 @@ LL | default fn bar() {}
= note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
= help: add `#![feature(specialization)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/trait-bounds/enum-unit-variant-trait-bound.stderr b/tests/ui/trait-bounds/enum-unit-variant-trait-bound.stderr
index 32f6b00b2..9a3bcaa0c 100644
--- a/tests/ui/trait-bounds/enum-unit-variant-trait-bound.stderr
+++ b/tests/ui/trait-bounds/enum-unit-variant-trait-bound.stderr
@@ -8,6 +8,6 @@ LL | let _ = Option::<[u8]>::None;
note: required by a bound in `None`
--> $SRC_DIR/core/src/option.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/trait-bounds/impl-derived-implicit-sized-bound-2.stderr b/tests/ui/trait-bounds/impl-derived-implicit-sized-bound-2.stderr
index 543ceac8e..84c2ab68d 100644
--- a/tests/ui/trait-bounds/impl-derived-implicit-sized-bound-2.stderr
+++ b/tests/ui/trait-bounds/impl-derived-implicit-sized-bound-2.stderr
@@ -26,6 +26,6 @@ help: consider restricting the type parameter to satisfy the trait bound
LL | struct Victim<'a, T: Perpetrator + ?Sized> where Self: Sized {
| +++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/trait-bounds/impl-derived-implicit-sized-bound.stderr b/tests/ui/trait-bounds/impl-derived-implicit-sized-bound.stderr
index f08d68583..c597ad0b5 100644
--- a/tests/ui/trait-bounds/impl-derived-implicit-sized-bound.stderr
+++ b/tests/ui/trait-bounds/impl-derived-implicit-sized-bound.stderr
@@ -26,6 +26,6 @@ help: consider restricting the type parameter to satisfy the trait bound
LL | Self: Sized, Self: Sized
| +++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/trait-bounds/issue-82038.stderr b/tests/ui/trait-bounds/issue-82038.stderr
index 30bb4a0a8..a97daece3 100644
--- a/tests/ui/trait-bounds/issue-82038.stderr
+++ b/tests/ui/trait-bounds/issue-82038.stderr
@@ -10,6 +10,6 @@ help: this trait has no implementations, consider adding one
LL | trait Foo {
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.stderr b/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.stderr
index 61132efc4..5024ad218 100644
--- a/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.stderr
+++ b/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.stderr
@@ -15,6 +15,6 @@ help: consider further restricting this bound
LL | pub fn foo<A: MyTrait<T = B>, B>(a: A) -> B {
| +++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.stderr b/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.stderr
index 4547e1c98..e2a726975 100644
--- a/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.stderr
+++ b/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.stderr
@@ -14,6 +14,6 @@ LL - pub struct A<H: A::Trait>(pub H);
LL + pub struct A<H: Trait>(pub H);
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0405`.
diff --git a/tests/ui/trait-impl-bound-suggestions.stderr b/tests/ui/trait-impl-bound-suggestions.stderr
index 38679679c..c1f31e2b3 100644
--- a/tests/ui/trait-impl-bound-suggestions.stderr
+++ b/tests/ui/trait-impl-bound-suggestions.stderr
@@ -14,6 +14,6 @@ help: consider further restricting type parameter `X`
LL | trait InsufficientlyConstrainedGeneric<X=()> where X: std::marker::Copy {
| ++++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/trait-method-number-parameters.stderr b/tests/ui/trait-method-number-parameters.stderr
index e47fe1a80..cf9b4f2ae 100644
--- a/tests/ui/trait-method-number-parameters.stderr
+++ b/tests/ui/trait-method-number-parameters.stderr
@@ -8,6 +8,6 @@ LL | / &mut self,
LL | | x: i32,
| |______________^ expected 3 parameters, found 2
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0050`.
diff --git a/tests/ui/traits/alias/ambiguous.stderr b/tests/ui/traits/alias/ambiguous.stderr
index 203bdc526..034e8a3fb 100644
--- a/tests/ui/traits/alias/ambiguous.stderr
+++ b/tests/ui/traits/alias/ambiguous.stderr
@@ -23,6 +23,6 @@ help: disambiguate the method for candidate #2
LL | B::foo(&t);
| ~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0034`.
diff --git a/tests/ui/traits/alias/dont-elaborate-non-self.stderr b/tests/ui/traits/alias/dont-elaborate-non-self.stderr
index 247a4f812..4e2edb474 100644
--- a/tests/ui/traits/alias/dont-elaborate-non-self.stderr
+++ b/tests/ui/traits/alias/dont-elaborate-non-self.stderr
@@ -15,6 +15,6 @@ help: function arguments must have a statically known size, borrowed types alway
LL | fn f<Fut>(a: &dyn F<Fut>) {}
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/alias/impl.stderr b/tests/ui/traits/alias/impl.stderr
index cedcd1021..ff463f479 100644
--- a/tests/ui/traits/alias/impl.stderr
+++ b/tests/ui/traits/alias/impl.stderr
@@ -4,6 +4,6 @@ error[E0404]: expected trait, found trait alias `DefaultAlias`
LL | impl DefaultAlias for () {}
| ^^^^^^^^^^^^ not a trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0404`.
diff --git a/tests/ui/traits/alias/issue-108072-unmet-trait-alias-bound.stderr b/tests/ui/traits/alias/issue-108072-unmet-trait-alias-bound.stderr
index 39f974f96..968ad2667 100644
--- a/tests/ui/traits/alias/issue-108072-unmet-trait-alias-bound.stderr
+++ b/tests/ui/traits/alias/issue-108072-unmet-trait-alias-bound.stderr
@@ -14,6 +14,6 @@ note: required by a bound in `f`
LL | fn f(_: impl IteratorAlias) {}
| ^^^^^^^^^^^^^ required by this bound in `f`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/alias/issue-108132-unmet-trait-alias-bound-on-generic-impl.stderr b/tests/ui/traits/alias/issue-108132-unmet-trait-alias-bound-on-generic-impl.stderr
index f1b259d5a..74526b4db 100644
--- a/tests/ui/traits/alias/issue-108132-unmet-trait-alias-bound-on-generic-impl.stderr
+++ b/tests/ui/traits/alias/issue-108132-unmet-trait-alias-bound-on-generic-impl.stderr
@@ -20,6 +20,6 @@ LL | impl<I: IteratorAlias> Foo<I> {
| |
| unsatisfied trait bound introduced here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/traits/alias/issue-83613.stderr b/tests/ui/traits/alias/issue-83613.stderr
index a78294da6..847fda417 100644
--- a/tests/ui/traits/alias/issue-83613.stderr
+++ b/tests/ui/traits/alias/issue-83613.stderr
@@ -6,6 +6,6 @@ LL | impl<T: Send> AnotherTrait for T {}
LL | impl AnotherTrait for OpaqueType {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `OpaqueType`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/traits/alias/self-in-const-generics.stderr b/tests/ui/traits/alias/self-in-const-generics.stderr
index 61cc217cf..3de31b64c 100644
--- a/tests/ui/traits/alias/self-in-const-generics.stderr
+++ b/tests/ui/traits/alias/self-in-const-generics.stderr
@@ -6,6 +6,6 @@ LL | fn foo(x: &dyn BB) {}
|
= note: it cannot use `Self` as a type parameter in a supertrait or `where`-clause
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/traits/alias/self-in-generics.stderr b/tests/ui/traits/alias/self-in-generics.stderr
index 80af4e5aa..ffc0a00ad 100644
--- a/tests/ui/traits/alias/self-in-generics.stderr
+++ b/tests/ui/traits/alias/self-in-generics.stderr
@@ -6,6 +6,6 @@ LL | pub fn f(_f: &dyn SelfInput) {}
|
= note: it cannot use `Self` as a type parameter in a supertrait or `where`-clause
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/traits/alias/suggest-trait-alias-instead-of-type.stderr b/tests/ui/traits/alias/suggest-trait-alias-instead-of-type.stderr
index 6e03eeada..afe34a125 100644
--- a/tests/ui/traits/alias/suggest-trait-alias-instead-of-type.stderr
+++ b/tests/ui/traits/alias/suggest-trait-alias-instead-of-type.stderr
@@ -9,6 +9,6 @@ help: you might have meant to use `#![feature(trait_alias)]` instead of a `type`
LL | trait Strings = Iterator<Item=String>;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0404`.
diff --git a/tests/ui/traits/alias/wf.stderr b/tests/ui/traits/alias/wf.stderr
index 7172008d3..3be6e8a49 100644
--- a/tests/ui/traits/alias/wf.stderr
+++ b/tests/ui/traits/alias/wf.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `T`
LL | trait B<T: Foo> = A<T>;
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/as-struct-constructor.stderr b/tests/ui/traits/as-struct-constructor.stderr
index d06e85f3a..42353d210 100644
--- a/tests/ui/traits/as-struct-constructor.stderr
+++ b/tests/ui/traits/as-struct-constructor.stderr
@@ -4,6 +4,6 @@ error[E0574]: expected struct, variant or union type, found trait `TraitNotAStru
LL | TraitNotAStruct{ value: 0 };
| ^^^^^^^^^^^^^^^ not a struct, variant or union type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0574`.
diff --git a/tests/ui/traits/assoc-type-in-superbad.stderr b/tests/ui/traits/assoc-type-in-superbad.stderr
index 7fa1d2c2e..2f07a32aa 100644
--- a/tests/ui/traits/assoc-type-in-superbad.stderr
+++ b/tests/ui/traits/assoc-type-in-superbad.stderr
@@ -10,6 +10,6 @@ note: required by a bound in `Foo`
LL | pub trait Foo: Iterator<Item = <Self as Foo>::Key> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-1.stderr b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-1.stderr
index fa7a8a2a0..e7e55d0be 100644
--- a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-1.stderr
+++ b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-1.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `f`
LL | fn f<T: X + ?Sized>() {
| ^ required by this bound in `f`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2.stderr b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2.stderr
index 68b9319d6..b7a778475 100644
--- a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2.stderr
+++ b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `f`
LL | fn f<T: for<'r> X<'r> + ?Sized>() {
| ^^^^^^^^^^^^^ required by this bound in `f`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-3.stderr b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-3.stderr
index c7af71a42..77072656c 100644
--- a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-3.stderr
+++ b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-3.stderr
@@ -12,6 +12,6 @@ LL |
LL | }
| - `s` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-4.stderr b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-4.stderr
index 4891ee9c2..5cc38e437 100644
--- a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-4.stderr
+++ b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-4.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `f`
LL | fn f<T: X + ?Sized>() {
| ^ required by this bound in `f`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-5.stderr b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-5.stderr
index 00fdb3753..3e9e6dcac 100644
--- a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-5.stderr
+++ b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-5.stderr
@@ -17,6 +17,6 @@ note: required by a bound in `is_obj`
LL | fn is_obj<T: ?Sized + Obj>(_: &T) {}
| ^^^ required by this bound in `is_obj`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-6.stderr b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-6.stderr
index 9b0975e5e..0e2a32735 100644
--- a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-6.stderr
+++ b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-6.stderr
@@ -17,6 +17,6 @@ note: required by a bound in `is_obj`
LL | fn is_obj<T: ?Sized + Obj>(_: &T) {}
| ^^^ required by this bound in `is_obj`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/traits/bad-method-typaram-kind.stderr b/tests/ui/traits/bad-method-typaram-kind.stderr
index 4c2d8e9f0..376a83e58 100644
--- a/tests/ui/traits/bad-method-typaram-kind.stderr
+++ b/tests/ui/traits/bad-method-typaram-kind.stderr
@@ -16,6 +16,6 @@ help: consider further restricting this bound
LL | fn foo<T:'static + std::marker::Send>() {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/bound/assoc-fn-bound-root-obligation.stderr b/tests/ui/traits/bound/assoc-fn-bound-root-obligation.stderr
index f30fe12b2..c8631ed36 100644
--- a/tests/ui/traits/bound/assoc-fn-bound-root-obligation.stderr
+++ b/tests/ui/traits/bound/assoc-fn-bound-root-obligation.stderr
@@ -15,6 +15,6 @@ LL | s.strip_suffix(b'\n').unwrap_or(s)
&'b str
= note: required for `u8` to implement `Pattern<'_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/bound/not-on-bare-trait.stderr b/tests/ui/traits/bound/not-on-bare-trait.stderr
index 36b08a7d3..1d97bf3d8 100644
--- a/tests/ui/traits/bound/not-on-bare-trait.stderr
+++ b/tests/ui/traits/bound/not-on-bare-trait.stderr
@@ -29,6 +29,6 @@ help: function arguments must have a statically known size, borrowed types alway
LL | fn foo(_x: &Foo + Send) {
| +
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/bound/on-structs-and-enums-in-impls.stderr b/tests/ui/traits/bound/on-structs-and-enums-in-impls.stderr
index 372bbabbd..48c3688a0 100644
--- a/tests/ui/traits/bound/on-structs-and-enums-in-impls.stderr
+++ b/tests/ui/traits/bound/on-structs-and-enums-in-impls.stderr
@@ -15,6 +15,6 @@ note: required by a bound in `Foo`
LL | struct Foo<T:Trait> {
| ^^^^^ required by this bound in `Foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/bound/sugar.stderr b/tests/ui/traits/bound/sugar.stderr
index b67648c7b..3b3ab1e99 100644
--- a/tests/ui/traits/bound/sugar.stderr
+++ b/tests/ui/traits/bound/sugar.stderr
@@ -14,6 +14,6 @@ note: function defined here
LL | fn a(_x: Box<dyn Foo + Send>) {
| ^ -----------------------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/traits/cache-reached-depth-ice.stderr b/tests/ui/traits/cache-reached-depth-ice.stderr
index 7cd758192..e84ebc91a 100644
--- a/tests/ui/traits/cache-reached-depth-ice.stderr
+++ b/tests/ui/traits/cache-reached-depth-ice.stderr
@@ -7,5 +7,5 @@ LL | fn test<X: ?Sized + Send>() {}
LL | test::<A>();
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/traits/coercion-generic-bad.stderr b/tests/ui/traits/coercion-generic-bad.stderr
index 30a3c40db..26136c6f7 100644
--- a/tests/ui/traits/coercion-generic-bad.stderr
+++ b/tests/ui/traits/coercion-generic-bad.stderr
@@ -8,6 +8,6 @@ LL | let s: Box<dyn Trait<isize>> = Box::new(Struct { person: "Fred" });
= help: for that trait implementation, expected `&'static str`, found `isize`
= note: required for the cast from `Box<Struct>` to `Box<dyn Trait<isize>>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/coercion-generic-regions.stderr b/tests/ui/traits/coercion-generic-regions.stderr
index ae70202ab..576035f8c 100644
--- a/tests/ui/traits/coercion-generic-regions.stderr
+++ b/tests/ui/traits/coercion-generic-regions.stderr
@@ -12,6 +12,6 @@ LL | let s: Box<dyn Trait<&'static str>> = Box::new(Struct { person: person
LL | }
| - `person` dropped here while still borrowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/traits/copy-guessing.stderr b/tests/ui/traits/copy-guessing.stderr
index 7e676c9da..750140c01 100644
--- a/tests/ui/traits/copy-guessing.stderr
+++ b/tests/ui/traits/copy-guessing.stderr
@@ -9,6 +9,6 @@ help: consider giving `n` an explicit type, where the type for type parameter `T
LL | let n: Option<T> = None;
| +++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/traits/copy-impl-cannot-normalize.stderr b/tests/ui/traits/copy-impl-cannot-normalize.stderr
index 86c511c08..3bdb8b701 100644
--- a/tests/ui/traits/copy-impl-cannot-normalize.stderr
+++ b/tests/ui/traits/copy-impl-cannot-normalize.stderr
@@ -19,6 +19,6 @@ help: consider restricting type parameter `T`
LL | impl<T: TraitFoo> Copy for Foo<T> {}
| ++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/copy-is-not-modulo-regions.not_static.stderr b/tests/ui/traits/copy-is-not-modulo-regions.not_static.stderr
index 130425211..56544dd4d 100644
--- a/tests/ui/traits/copy-is-not-modulo-regions.not_static.stderr
+++ b/tests/ui/traits/copy-is-not-modulo-regions.not_static.stderr
@@ -17,6 +17,6 @@ help: consider restricting type parameter `'any`
LL | impl<'any: 'static> Copy for Bar<'any> {}
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0204`.
diff --git a/tests/ui/traits/cycle-cache-err-60010.stderr b/tests/ui/traits/cycle-cache-err-60010.stderr
index aee41c43a..4f9615104 100644
--- a/tests/ui/traits/cycle-cache-err-60010.stderr
+++ b/tests/ui/traits/cycle-cache-err-60010.stderr
@@ -37,6 +37,6 @@ LL | where
LL | DB: SourceDatabase,
| -------------- unsatisfied trait bound introduced here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/default-method/rustc_must_implement_one_of.stderr b/tests/ui/traits/default-method/rustc_must_implement_one_of.stderr
index 5a4dd1388..7ad10cfce 100644
--- a/tests/ui/traits/default-method/rustc_must_implement_one_of.stderr
+++ b/tests/ui/traits/default-method/rustc_must_implement_one_of.stderr
@@ -10,6 +10,6 @@ note: required because of this annotation
LL | #[rustc_must_implement_one_of(eq, neq)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/traits/default-method/rustc_must_implement_one_of_gated.stderr b/tests/ui/traits/default-method/rustc_must_implement_one_of_gated.stderr
index 228bc3e35..cb7eb1567 100644
--- a/tests/ui/traits/default-method/rustc_must_implement_one_of_gated.stderr
+++ b/tests/ui/traits/default-method/rustc_must_implement_one_of_gated.stderr
@@ -6,6 +6,6 @@ LL | #[rustc_must_implement_one_of(eq, neq)]
|
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/traits/deny-builtin-object-impl.current.stderr b/tests/ui/traits/deny-builtin-object-impl.current.stderr
index 8ca3d3a05..0dbf8f0e6 100644
--- a/tests/ui/traits/deny-builtin-object-impl.current.stderr
+++ b/tests/ui/traits/deny-builtin-object-impl.current.stderr
@@ -15,6 +15,6 @@ note: required by a bound in `test_not_object`
LL | fn test_not_object<T: NotObject + ?Sized>() {}
| ^^^^^^^^^ required by this bound in `test_not_object`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/deny-builtin-object-impl.next.stderr b/tests/ui/traits/deny-builtin-object-impl.next.stderr
index 8ca3d3a05..0dbf8f0e6 100644
--- a/tests/ui/traits/deny-builtin-object-impl.next.stderr
+++ b/tests/ui/traits/deny-builtin-object-impl.next.stderr
@@ -15,6 +15,6 @@ note: required by a bound in `test_not_object`
LL | fn test_not_object<T: NotObject + ?Sized>() {}
| ^^^^^^^^^ required by this bound in `test_not_object`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/deny-builtin-object-impl.rs b/tests/ui/traits/deny-builtin-object-impl.rs
index dce03a43b..d0eb6382e 100644
--- a/tests/ui/traits/deny-builtin-object-impl.rs
+++ b/tests/ui/traits/deny-builtin-object-impl.rs
@@ -1,5 +1,5 @@
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
#![feature(rustc_attrs)]
diff --git a/tests/ui/traits/do-not-mention-type-params-by-name-in-suggestion-issue-96292.stderr b/tests/ui/traits/do-not-mention-type-params-by-name-in-suggestion-issue-96292.stderr
index 2185c51e5..460595dd9 100644
--- a/tests/ui/traits/do-not-mention-type-params-by-name-in-suggestion-issue-96292.stderr
+++ b/tests/ui/traits/do-not-mention-type-params-by-name-in-suggestion-issue-96292.stderr
@@ -17,6 +17,6 @@ help: try using a fully qualified path to specify the expected types
LL | <Thing<bool> as Method<T>>::method(thing, 42);
| +++++++++++++++++++++++++++++++++++ ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/traits/duplicate-methods.stderr b/tests/ui/traits/duplicate-methods.stderr
index 6aa88d0df..062327726 100644
--- a/tests/ui/traits/duplicate-methods.stderr
+++ b/tests/ui/traits/duplicate-methods.stderr
@@ -8,6 +8,6 @@ LL | fn orange(&self);
|
= note: `orange` must be defined only once in the value namespace of this trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0428`.
diff --git a/tests/ui/traits/ice-with-dyn-pointee-errors.stderr b/tests/ui/traits/ice-with-dyn-pointee-errors.stderr
index 8ad11c334..8bfda71ba 100644
--- a/tests/ui/traits/ice-with-dyn-pointee-errors.stderr
+++ b/tests/ui/traits/ice-with-dyn-pointee-errors.stderr
@@ -14,6 +14,6 @@ note: required by a bound in `unknown_sized_object_ptr_in`
LL | fn unknown_sized_object_ptr_in(_: &(impl Pointee<Metadata = ()> + ?Sized)) {}
| ^^^^^^^^^^^^^ required by this bound in `unknown_sized_object_ptr_in`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/traits/ignore-err-impls.stderr b/tests/ui/traits/ignore-err-impls.stderr
index 45bd533b5..955e2d780 100644
--- a/tests/ui/traits/ignore-err-impls.stderr
+++ b/tests/ui/traits/ignore-err-impls.stderr
@@ -9,6 +9,6 @@ help: you might be missing a type parameter
LL | impl<Type> Generic<Type> for S {}
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/traits/impl-1.stderr b/tests/ui/traits/impl-1.stderr
index 7694e3f5c..8c290addc 100644
--- a/tests/ui/traits/impl-1.stderr
+++ b/tests/ui/traits/impl-1.stderr
@@ -4,6 +4,6 @@ error[E0599]: no method named `foo` found for reference `&i32` in the current sc
LL | x.foo();
| ^^^ method not found in `&i32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/traits/impl-bounds-checking.stderr b/tests/ui/traits/impl-bounds-checking.stderr
index bfa8213ab..61302bfa0 100644
--- a/tests/ui/traits/impl-bounds-checking.stderr
+++ b/tests/ui/traits/impl-bounds-checking.stderr
@@ -15,6 +15,6 @@ note: required by a bound in `Getter`
LL | trait Getter<T: Clone2> {
| ^^^^^^ required by this bound in `Getter`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/impl-different-num-params.stderr b/tests/ui/traits/impl-different-num-params.stderr
index 910ba3510..0f73f5ca7 100644
--- a/tests/ui/traits/impl-different-num-params.stderr
+++ b/tests/ui/traits/impl-different-num-params.stderr
@@ -7,6 +7,6 @@ LL | fn bar(&self, x: usize) -> Self;
LL | fn bar(&self) -> isize {
| ^^^^^ expected 2 parameters, found 1
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0050`.
diff --git a/tests/ui/traits/impl-for-module.stderr b/tests/ui/traits/impl-for-module.stderr
index 6ec4083b5..b715c699e 100644
--- a/tests/ui/traits/impl-for-module.stderr
+++ b/tests/ui/traits/impl-for-module.stderr
@@ -7,6 +7,6 @@ LL | trait A {
LL | impl A for a {
| ^ help: a trait with a similar name exists: `A`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0573`.
diff --git a/tests/ui/traits/impl-method-mismatch.stderr b/tests/ui/traits/impl-method-mismatch.stderr
index 252b5aff9..2061fc785 100644
--- a/tests/ui/traits/impl-method-mismatch.stderr
+++ b/tests/ui/traits/impl-method-mismatch.stderr
@@ -9,9 +9,9 @@ note: type in trait
|
LL | fn jumbo(&self, x: &usize) -> usize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = note: expected signature `fn(&usize, &usize) -> usize`
- found signature `unsafe fn(&usize, &usize)`
+ = note: expected signature `fn(&_, &_) -> usize`
+ found signature `unsafe fn(&_, &_)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0053`.
diff --git a/tests/ui/traits/impl-of-supertrait-has-wrong-lifetime-parameters.stderr b/tests/ui/traits/impl-of-supertrait-has-wrong-lifetime-parameters.stderr
index 1bace8ab2..092776ede 100644
--- a/tests/ui/traits/impl-of-supertrait-has-wrong-lifetime-parameters.stderr
+++ b/tests/ui/traits/impl-of-supertrait-has-wrong-lifetime-parameters.stderr
@@ -22,6 +22,6 @@ LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> {
= note: expected `T1<'a>`
found `T1<'_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0495`.
diff --git a/tests/ui/traits/inductive-overflow/lifetime.stderr b/tests/ui/traits/inductive-overflow/lifetime.stderr
index 7ab2864a8..b34bb0361 100644
--- a/tests/ui/traits/inductive-overflow/lifetime.stderr
+++ b/tests/ui/traits/inductive-overflow/lifetime.stderr
@@ -15,6 +15,6 @@ note: required by a bound in `is_send`
LL | fn is_send<S: NotAuto>() {}
| ^^^^^^^ required by this bound in `is_send`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/inductive-overflow/simultaneous.stderr b/tests/ui/traits/inductive-overflow/simultaneous.stderr
index e3b4ec07d..b9a746e44 100644
--- a/tests/ui/traits/inductive-overflow/simultaneous.stderr
+++ b/tests/ui/traits/inductive-overflow/simultaneous.stderr
@@ -17,6 +17,6 @@ note: required by a bound in `is_ee`
LL | fn is_ee<T: Combo>(t: T) {
| ^^^^^ required by this bound in `is_ee`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/inductive-overflow/supertrait.stderr b/tests/ui/traits/inductive-overflow/supertrait.stderr
index b537ecf17..f2dccbbbb 100644
--- a/tests/ui/traits/inductive-overflow/supertrait.stderr
+++ b/tests/ui/traits/inductive-overflow/supertrait.stderr
@@ -17,6 +17,6 @@ note: required by a bound in `copy`
LL | fn copy<T: Magic>(x: T) -> (T, T) { (x, x) }
| ^^^^^ required by this bound in `copy`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/inheritance/num0.rs b/tests/ui/traits/inheritance/num0.rs
index cee52542d..c9c73ee00 100644
--- a/tests/ui/traits/inheritance/num0.rs
+++ b/tests/ui/traits/inheritance/num0.rs
@@ -4,8 +4,6 @@
// pretty-expanded FIXME #23616
-use std::cmp::PartialOrd;
-
pub trait NumCast: Sized {
fn from(i: i32) -> Option<Self>;
}
diff --git a/tests/ui/traits/inheritance/overloading-simple.rs b/tests/ui/traits/inheritance/overloading-simple.rs
index c306aa2cd..800d7bc6b 100644
--- a/tests/ui/traits/inheritance/overloading-simple.rs
+++ b/tests/ui/traits/inheritance/overloading-simple.rs
@@ -1,6 +1,5 @@
// run-pass
#![allow(dead_code)]
-use std::cmp::PartialEq;
trait MyNum : PartialEq { }
diff --git a/tests/ui/traits/inheritance/overloading.rs b/tests/ui/traits/inheritance/overloading.rs
index 083643e82..f126847da 100644
--- a/tests/ui/traits/inheritance/overloading.rs
+++ b/tests/ui/traits/inheritance/overloading.rs
@@ -1,5 +1,4 @@
// run-pass
-use std::cmp::PartialEq;
use std::ops::{Add, Sub, Mul};
trait MyNum : Add<Output=Self> + Sub<Output=Self> + Mul<Output=Self> + PartialEq + Clone { }
diff --git a/tests/ui/traits/invalid_operator_trait.stderr b/tests/ui/traits/invalid_operator_trait.stderr
index 8c6e36959..f2e5e9080 100644
--- a/tests/ui/traits/invalid_operator_trait.stderr
+++ b/tests/ui/traits/invalid_operator_trait.stderr
@@ -4,5 +4,5 @@ error: `add` must not have any generic parameters
LL | fn add<Y>(self, _: RHS) -> Self::Output;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/traits/issue-102989.rs b/tests/ui/traits/issue-102989.rs
index 216cd78e5..f1ecee0a5 100644
--- a/tests/ui/traits/issue-102989.rs
+++ b/tests/ui/traits/issue-102989.rs
@@ -7,6 +7,7 @@ trait Sized { } //~ ERROR found duplicate lang item `sized`
fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
//~^ ERROR `self` parameter is only allowed in associated functions
//~| ERROR cannot find type `Struct` in this scope
+ //~| ERROR mismatched types
let x = x << 1;
//~^ ERROR cannot find value `x` in this scope
}
diff --git a/tests/ui/traits/issue-102989.stderr b/tests/ui/traits/issue-102989.stderr
index 7d0098fe8..40e49df2b 100644
--- a/tests/ui/traits/issue-102989.stderr
+++ b/tests/ui/traits/issue-102989.stderr
@@ -13,7 +13,7 @@ LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
| ^^^^^^ not found in this scope
error[E0425]: cannot find value `x` in this scope
- --> $DIR/issue-102989.rs:10:13
+ --> $DIR/issue-102989.rs:11:13
|
LL | let x = x << 1;
| ^ help: a local variable with a similar name exists: `f`
@@ -22,13 +22,27 @@ error[E0152]: found duplicate lang item `sized`
--> $DIR/issue-102989.rs:5:1
|
LL | trait Sized { }
- | ^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^
|
= note: the lang item is first defined in crate `core` (which `std` depends on)
= note: first definition in `core` loaded from SYSROOT/libcore-*.rlib
= note: second definition in the local crate (`issue_102989`)
-error: aborting due to 4 previous errors
+error[E0308]: mismatched types
+ --> $DIR/issue-102989.rs:7:42
+ |
+LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
+ | ---------- ^^^^ expected `&u32`, found `()`
+ | |
+ | implicitly returns `()` as its body has no tail or `return` expression
+ |
+help: consider returning the local binding `f`
+ |
+LL ~ let x = x << 1;
+LL + f
+ |
+
+error: aborting due to 5 previous errors
-Some errors have detailed explanations: E0152, E0412, E0425.
+Some errors have detailed explanations: E0152, E0308, E0412, E0425.
For more information about an error, try `rustc --explain E0152`.
diff --git a/tests/ui/traits/issue-117794.rs b/tests/ui/traits/issue-117794.rs
new file mode 100644
index 000000000..a66d6eb10
--- /dev/null
+++ b/tests/ui/traits/issue-117794.rs
@@ -0,0 +1,10 @@
+trait Foo {}
+
+trait T {
+ fn a(&self) -> impl Foo {
+ self.b(|| 0)
+ //~^ ERROR no method named `b` found for reference `&Self` in the current scope
+ }
+}
+
+fn main() {}
diff --git a/tests/ui/traits/issue-117794.stderr b/tests/ui/traits/issue-117794.stderr
new file mode 100644
index 000000000..af63b47f0
--- /dev/null
+++ b/tests/ui/traits/issue-117794.stderr
@@ -0,0 +1,9 @@
+error[E0599]: no method named `b` found for reference `&Self` in the current scope
+ --> $DIR/issue-117794.rs:5:14
+ |
+LL | self.b(|| 0)
+ | ^ help: there is a method with a similar name: `a`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/traits/issue-18400.stderr b/tests/ui/traits/issue-18400.stderr
index edaf08f49..146ba1639 100644
--- a/tests/ui/traits/issue-18400.stderr
+++ b/tests/ui/traits/issue-18400.stderr
@@ -15,6 +15,6 @@ LL | impl<'a, T, S> Set<&'a [T]> for S where
= note: 128 redundant requirements hidden
= note: required for `{integer}` to implement `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/issue-22019.rs b/tests/ui/traits/issue-22019.rs
index 1a887f0f3..605fee510 100644
--- a/tests/ui/traits/issue-22019.rs
+++ b/tests/ui/traits/issue-22019.rs
@@ -8,8 +8,6 @@
#![allow(missing_copy_implementations)]
#![allow(unused_variables)]
-use std::borrow::ToOwned;
-
pub struct CFGNode;
pub type Node<'a> = &'a CFGNode;
diff --git a/tests/ui/traits/issue-22384.stderr b/tests/ui/traits/issue-22384.stderr
index 1f767a443..f53c95c2b 100644
--- a/tests/ui/traits/issue-22384.stderr
+++ b/tests/ui/traits/issue-22384.stderr
@@ -4,6 +4,6 @@ error[E0576]: cannot find associated type `foobar` in trait `Copy`
LL | <<i32 as Copy>::foobar as Trait>::foo();
| ^^^^^^ not found in `Copy`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0576`.
diff --git a/tests/ui/traits/issue-24010.rs b/tests/ui/traits/issue-24010.rs
index fd7d6751d..1eaa5bf0c 100644
--- a/tests/ui/traits/issue-24010.rs
+++ b/tests/ui/traits/issue-24010.rs
@@ -1,6 +1,6 @@
// run-pass
// revisions: classic next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
trait Foo: Fn(i32) -> i32 + Send {}
diff --git a/tests/ui/traits/issue-28576.stderr b/tests/ui/traits/issue-28576.stderr
index 203cd0630..9fe508646 100644
--- a/tests/ui/traits/issue-28576.stderr
+++ b/tests/ui/traits/issue-28576.stderr
@@ -15,6 +15,6 @@ LL | pub trait Bar: Foo<Assoc=()> {
| | ...because it uses `Self` as a type parameter
| this trait cannot be made into an object...
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/traits/issue-43784-supertrait.stderr b/tests/ui/traits/issue-43784-supertrait.stderr
index 6b5b72138..2bf365745 100644
--- a/tests/ui/traits/issue-43784-supertrait.stderr
+++ b/tests/ui/traits/issue-43784-supertrait.stderr
@@ -19,6 +19,6 @@ help: consider restricting type parameter `T`
LL | impl<T: std::marker::Copy> Complete for T {}
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/issue-52893.stderr b/tests/ui/traits/issue-52893.stderr
index c57921a08..c37dde90e 100644
--- a/tests/ui/traits/issue-52893.stderr
+++ b/tests/ui/traits/issue-52893.stderr
@@ -24,6 +24,6 @@ note: method defined here
LL | fn push(self, other: T) -> Self::PushRes;
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/traits/issue-65284-suggest-generic-trait-bound.stderr b/tests/ui/traits/issue-65284-suggest-generic-trait-bound.stderr
index ae33e61d8..22b5af43b 100644
--- a/tests/ui/traits/issue-65284-suggest-generic-trait-bound.stderr
+++ b/tests/ui/traits/issue-65284-suggest-generic-trait-bound.stderr
@@ -12,6 +12,6 @@ help: the following trait defines an item `foo`, perhaps you need to restrict ty
LL | fn do_stuff<T : Bar + Foo>(t : T) {
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/traits/issue-65673.stderr b/tests/ui/traits/issue-65673.stderr
index 8f01d7c53..3c327f9ed 100644
--- a/tests/ui/traits/issue-65673.stderr
+++ b/tests/ui/traits/issue-65673.stderr
@@ -7,6 +7,6 @@ LL | trait Alias<T> = where T: Trait;
LL | type Ctx = dyn Alias<T>;
| ^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0224`.
diff --git a/tests/ui/traits/issue-68295.stderr b/tests/ui/traits/issue-68295.stderr
index 671a97666..8bc315302 100644
--- a/tests/ui/traits/issue-68295.stderr
+++ b/tests/ui/traits/issue-68295.stderr
@@ -12,6 +12,6 @@ LL | input.into_owned()
= help: consider constraining the associated type `<() as Allocator<R, C>>::Buffer` to `u32`
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/traits/issue-7013.stderr b/tests/ui/traits/issue-7013.stderr
index 1c0e8bcf1..174936631 100644
--- a/tests/ui/traits/issue-7013.stderr
+++ b/tests/ui/traits/issue-7013.stderr
@@ -14,6 +14,6 @@ LL | struct B {
| ^
= note: required for the cast from `Box<B>` to `Box<dyn Foo + Send>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/issue-71036.stderr b/tests/ui/traits/issue-71036.stderr
index 79eb7a2ae..2452731f1 100644
--- a/tests/ui/traits/issue-71036.stderr
+++ b/tests/ui/traits/issue-71036.stderr
@@ -7,6 +7,6 @@ LL | impl<'a, T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Foo<'a, U>> for
= 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 for `&'a &'a T` to implement `DispatchFromDyn<&'a &'a U>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/issue-71136.stderr b/tests/ui/traits/issue-71136.stderr
index ef5579618..2c03c6bf0 100644
--- a/tests/ui/traits/issue-71136.stderr
+++ b/tests/ui/traits/issue-71136.stderr
@@ -15,6 +15,6 @@ LL + #[derive(Clone)]
LL | struct Foo(u8);
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/issue-72410.stderr b/tests/ui/traits/issue-72410.stderr
index c7beb834b..58266e184 100644
--- a/tests/ui/traits/issue-72410.stderr
+++ b/tests/ui/traits/issue-72410.stderr
@@ -20,6 +20,6 @@ help: alternatively, consider constraining `map` so it does not apply to trait o
LL | where for<'a> &'a mut [dyn Bar]:, Self: Sized ;
| +++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/traits/issue-75627.stderr b/tests/ui/traits/issue-75627.stderr
index 1675edc9f..137985ee0 100644
--- a/tests/ui/traits/issue-75627.stderr
+++ b/tests/ui/traits/issue-75627.stderr
@@ -9,6 +9,6 @@ help: you might be missing a type parameter
LL | unsafe impl<T> Send for Foo<T> {}
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/traits/issue-79458.stderr b/tests/ui/traits/issue-79458.stderr
index 08f7bbbf0..c80efbe92 100644
--- a/tests/ui/traits/issue-79458.stderr
+++ b/tests/ui/traits/issue-79458.stderr
@@ -11,6 +11,6 @@ LL | bar: &'a mut T
= note: `Clone` is implemented for `&T`, but not for `&mut T`
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/issue-8153.stderr b/tests/ui/traits/issue-8153.stderr
index ae214bb9e..8882097af 100644
--- a/tests/ui/traits/issue-8153.stderr
+++ b/tests/ui/traits/issue-8153.stderr
@@ -9,6 +9,6 @@ LL | fn bar(&self) -> isize {1}
LL | fn bar(&self) -> isize {2}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definition
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0201`.
diff --git a/tests/ui/traits/issue-85735.stderr b/tests/ui/traits/issue-85735.stderr
index 9e80497ca..0980c5c33 100644
--- a/tests/ui/traits/issue-85735.stderr
+++ b/tests/ui/traits/issue-85735.stderr
@@ -1,10 +1,10 @@
-error[E0283]: type annotations needed: cannot satisfy `T: FnMut<(&'a (),)>`
+error[E0283]: type annotations needed: cannot satisfy `T: FnMut(&'a ())`
--> $DIR/issue-85735.rs:7:8
|
LL | T: FnMut(&'a ()),
| ^^^^^^^^^^^^^
|
-note: multiple `impl`s or `where` clauses satisfying `T: FnMut<(&'a (),)>` found
+note: multiple `impl`s or `where` clauses satisfying `T: FnMut(&'a ())` found
--> $DIR/issue-85735.rs:7:8
|
LL | T: FnMut(&'a ()),
@@ -13,6 +13,6 @@ LL |
LL | T: FnMut(&'b ()),
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/traits/issue-90662-projection-caching.rs b/tests/ui/traits/issue-90662-projection-caching.rs
index 879f30071..e08ab53fb 100644
--- a/tests/ui/traits/issue-90662-projection-caching.rs
+++ b/tests/ui/traits/issue-90662-projection-caching.rs
@@ -1,7 +1,15 @@
+// revisions: old next
+//[next] compile-flags: -Znext-solver=coherence
// check-pass
// Regression test for issue #90662
-// Tests that projection caching does not cause a spurious error
+// Tests that projection caching does not cause a spurious error.
+// Coherence relies on the following overflowing goal to still constrain
+// `?0` to `dyn Service`.
+//
+// Projection(<ServiceImpl as Provider<TestModule>>::Interface. ?0)
+//
+// cc https://github.com/rust-lang/trait-system-refactor-initiative/issues/70.
trait HasProvider<T: ?Sized> {}
trait Provider<M> {
diff --git a/tests/ui/traits/issue-91594.stderr b/tests/ui/traits/issue-91594.stderr
index 85d903fad..13568179e 100644
--- a/tests/ui/traits/issue-91594.stderr
+++ b/tests/ui/traits/issue-91594.stderr
@@ -13,6 +13,6 @@ LL | impl<M: HasComponent<()>> Component<M> for Foo {
| |
| unsatisfied trait bound introduced here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/issue-91949-hangs-on-recursion.stderr b/tests/ui/traits/issue-91949-hangs-on-recursion.stderr
index 4593fa2c4..c4324f0f0 100644
--- a/tests/ui/traits/issue-91949-hangs-on-recursion.stderr
+++ b/tests/ui/traits/issue-91949-hangs-on-recursion.stderr
@@ -25,6 +25,6 @@ LL | impl<T, I: Iterator<Item = T>> Iterator for IteratorOfWrapped<T, I> {
= note: 256 redundant requirements hidden
= note: required for `IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), std::iter::Empty<()>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:28:45: 28:48}>>` to implement `Iterator`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/issue-95898.stderr b/tests/ui/traits/issue-95898.stderr
index ca7bacdbf..0bb0b2840 100644
--- a/tests/ui/traits/issue-95898.stderr
+++ b/tests/ui/traits/issue-95898.stderr
@@ -12,6 +12,6 @@ help: the following trait defines an item `clone`, perhaps you need to restrict
LL | fn foo<T: Clone>(t: T) {
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/traits/issue-97576.stderr b/tests/ui/traits/issue-97576.stderr
index 9062a0fab..2c6cfd83b 100644
--- a/tests/ui/traits/issue-97576.stderr
+++ b/tests/ui/traits/issue-97576.stderr
@@ -6,6 +6,6 @@ LL | bar: bar.into(),
|
= note: required for `impl ToString` to implement `Into<String>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/map-types.stderr b/tests/ui/traits/map-types.stderr
index 4315056f2..b19b5d2e1 100644
--- a/tests/ui/traits/map-types.stderr
+++ b/tests/ui/traits/map-types.stderr
@@ -7,6 +7,6 @@ LL | let y: Box<dyn Map<usize, isize>> = Box::new(x);
= help: the trait `Map<K, V>` is implemented for `HashMap<K, V>`
= note: required for the cast from `Box<Box<dyn Map<isize, isize>>>` to `Box<dyn Map<usize, isize>>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/method-private.stderr b/tests/ui/traits/method-private.stderr
index e11799308..d19f0bc08 100644
--- a/tests/ui/traits/method-private.stderr
+++ b/tests/ui/traits/method-private.stderr
@@ -13,6 +13,6 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f
LL + use inner::Bar;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0624`.
diff --git a/tests/ui/traits/multidispatch-bad.stderr b/tests/ui/traits/multidispatch-bad.stderr
index d58f1e2d9..0bb095fb0 100644
--- a/tests/ui/traits/multidispatch-bad.stderr
+++ b/tests/ui/traits/multidispatch-bad.stderr
@@ -16,6 +16,6 @@ help: change the type of the numeric literal from `i32` to `u32`
LL | test(22i32, 44u32);
| ~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/traits/multidispatch-convert-ambig-dest.stderr b/tests/ui/traits/multidispatch-convert-ambig-dest.stderr
index e3bfc78bb..17c3db9ad 100644
--- a/tests/ui/traits/multidispatch-convert-ambig-dest.stderr
+++ b/tests/ui/traits/multidispatch-convert-ambig-dest.stderr
@@ -26,6 +26,6 @@ help: consider specifying the generic arguments
LL | test::<i32, U>(22, std::default::Default::default());
| ++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/traits/multidispatch2.rs b/tests/ui/traits/multidispatch2.rs
index 20608aabb..21aa13fd4 100644
--- a/tests/ui/traits/multidispatch2.rs
+++ b/tests/ui/traits/multidispatch2.rs
@@ -1,7 +1,6 @@
// run-pass
use std::fmt::Debug;
-use std::default::Default;
trait MyTrait<T> {
fn get(&self) -> T;
diff --git a/tests/ui/traits/mutual-recursion-issue-75860.stderr b/tests/ui/traits/mutual-recursion-issue-75860.stderr
index 23e182738..420ed2dcd 100644
--- a/tests/ui/traits/mutual-recursion-issue-75860.stderr
+++ b/tests/ui/traits/mutual-recursion-issue-75860.stderr
@@ -8,6 +8,6 @@ LL | iso(left, right)
note: required by a bound in `Option`
--> $SRC_DIR/core/src/option.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/negative-impls/feature-gate-negative_impls.stderr b/tests/ui/traits/negative-impls/feature-gate-negative_impls.stderr
index b253fbd0d..a232e6d86 100644
--- a/tests/ui/traits/negative-impls/feature-gate-negative_impls.stderr
+++ b/tests/ui/traits/negative-impls/feature-gate-negative_impls.stderr
@@ -7,6 +7,6 @@ LL | impl !MyTrait for u32 {}
= note: see issue #68318 <https://github.com/rust-lang/rust/issues/68318> for more information
= help: add `#![feature(negative_impls)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/traits/negative-impls/negated-auto-traits-error.stderr b/tests/ui/traits/negative-impls/negated-auto-traits-error.stderr
index a53879657..8f5b937e5 100644
--- a/tests/ui/traits/negative-impls/negated-auto-traits-error.stderr
+++ b/tests/ui/traits/negative-impls/negated-auto-traits-error.stderr
@@ -50,7 +50,7 @@ LL | is_send((8, TestType));
| required by a bound introduced by this call
|
= help: within `({integer}, dummy1c::TestType)`, the trait `Send` is not implemented for `dummy1c::TestType`
- = note: required because it appears within the type `({integer}, TestType)`
+ = note: required because it appears within the type `({integer}, dummy1c::TestType)`
note: required by a bound in `is_send`
--> $DIR/negated-auto-traits-error.rs:16:15
|
@@ -67,7 +67,7 @@ LL | is_send(Box::new(TestType));
|
= note: the trait bound `Unique<dummy2::TestType>: Send` is not satisfied
= note: required for `Unique<dummy2::TestType>` to implement `Send`
-note: required because it appears within the type `Box<TestType>`
+note: required because it appears within the type `Box<dummy2::TestType>`
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
note: required by a bound in `is_send`
--> $DIR/negated-auto-traits-error.rs:16:15
@@ -88,13 +88,13 @@ LL | is_send(Box::new(Outer2(TestType)));
| required by a bound introduced by this call
|
= help: within `Outer2<dummy3::TestType>`, the trait `Send` is not implemented for `dummy3::TestType`
-note: required because it appears within the type `Outer2<TestType>`
+note: required because it appears within the type `Outer2<dummy3::TestType>`
--> $DIR/negated-auto-traits-error.rs:12:8
|
LL | struct Outer2<T>(T);
| ^^^^^^
= note: required for `Unique<Outer2<dummy3::TestType>>` to implement `Send`
-note: required because it appears within the type `Box<Outer2<TestType>>`
+note: required because it appears within the type `Box<Outer2<dummy3::TestType>>`
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
note: required by a bound in `is_send`
--> $DIR/negated-auto-traits-error.rs:16:15
diff --git a/tests/ui/traits/negative-impls/negated-auto-traits-rpass.rs b/tests/ui/traits/negative-impls/negated-auto-traits-rpass.rs
index a1042f831..0bc611c26 100644
--- a/tests/ui/traits/negative-impls/negated-auto-traits-rpass.rs
+++ b/tests/ui/traits/negative-impls/negated-auto-traits-rpass.rs
@@ -2,8 +2,6 @@
#![allow(unused_variables)]
#![feature(negative_impls)]
-use std::marker::Send;
-
pub struct WaitToken;
impl !Send for WaitToken {}
diff --git a/tests/ui/traits/negative-impls/negative-default-impls.stderr b/tests/ui/traits/negative-impls/negative-default-impls.stderr
index 7b54cf542..328e744a1 100644
--- a/tests/ui/traits/negative-impls/negative-default-impls.stderr
+++ b/tests/ui/traits/negative-impls/negative-default-impls.stderr
@@ -14,6 +14,6 @@ error[E0750]: negative impls cannot be default impls
LL | default impl !MyTrait for u32 {}
| ^^^^^^^ ^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0750`.
diff --git a/tests/ui/traits/negative-impls/negative-specializes-positive-item.stderr b/tests/ui/traits/negative-impls/negative-specializes-positive-item.stderr
index 1cfa49b20..97727da76 100644
--- a/tests/ui/traits/negative-impls/negative-specializes-positive-item.stderr
+++ b/tests/ui/traits/negative-impls/negative-specializes-positive-item.stderr
@@ -17,6 +17,6 @@ LL | impl<T> MyTrait for T {
LL | impl !MyTrait for u32 {}
| ^^^^^^^^^^^^^^^^^^^^^ negative implementation here
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0751`.
diff --git a/tests/ui/traits/negative-impls/negative-specializes-positive.stderr b/tests/ui/traits/negative-impls/negative-specializes-positive.stderr
index 9f9e28678..100f97aba 100644
--- a/tests/ui/traits/negative-impls/negative-specializes-positive.stderr
+++ b/tests/ui/traits/negative-impls/negative-specializes-positive.stderr
@@ -16,6 +16,6 @@ LL | impl<T> MyTrait for T {}
LL | impl !MyTrait for u32 {}
| ^^^^^^^^^^^^^^^^^^^^^ negative implementation here
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0751`.
diff --git a/tests/ui/traits/negative-impls/no-items.stderr b/tests/ui/traits/negative-impls/no-items.stderr
index 040d9d145..36436dfba 100644
--- a/tests/ui/traits/negative-impls/no-items.stderr
+++ b/tests/ui/traits/negative-impls/no-items.stderr
@@ -4,6 +4,6 @@ error[E0749]: negative impls cannot have any items
LL | type Foo = i32;
| ^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0749`.
diff --git a/tests/ui/traits/negative-impls/pin-unsound-issue-66544-clone.stderr b/tests/ui/traits/negative-impls/pin-unsound-issue-66544-clone.stderr
index a87acb1fb..4778f31ff 100644
--- a/tests/ui/traits/negative-impls/pin-unsound-issue-66544-clone.stderr
+++ b/tests/ui/traits/negative-impls/pin-unsound-issue-66544-clone.stderr
@@ -6,6 +6,6 @@ LL | impl<'a> Clone for &'a mut MyType<'a> {
|
= note: negative implementation in crate `core`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0751`.
diff --git a/tests/ui/traits/negative-impls/pin-unsound-issue-66544-derefmut.stderr b/tests/ui/traits/negative-impls/pin-unsound-issue-66544-derefmut.stderr
index 9185e8f84..95d7f6ba9 100644
--- a/tests/ui/traits/negative-impls/pin-unsound-issue-66544-derefmut.stderr
+++ b/tests/ui/traits/negative-impls/pin-unsound-issue-66544-derefmut.stderr
@@ -6,6 +6,6 @@ LL | impl<'a> DerefMut for &'a MyType<'a> {
|
= note: negative implementation in crate `core`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0751`.
diff --git a/tests/ui/traits/negative-impls/positive-specializes-negative.stderr b/tests/ui/traits/negative-impls/positive-specializes-negative.stderr
index 545f94143..1655cb050 100644
--- a/tests/ui/traits/negative-impls/positive-specializes-negative.stderr
+++ b/tests/ui/traits/negative-impls/positive-specializes-negative.stderr
@@ -16,6 +16,6 @@ LL | impl<T> !MyTrait for T {}
LL | impl MyTrait for u32 {}
| ^^^^^^^^^^^^^^^^^^^^ positive implementation here
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0751`.
diff --git a/tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-norm-overflow.stderr b/tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-norm-overflow.stderr
deleted file mode 100644
index 73d46c4df..000000000
--- a/tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-norm-overflow.stderr
+++ /dev/null
@@ -1,18 +0,0 @@
-WARN rustc_trait_selection::traits::coherence expected an unknowable trait ref: <<LocalTy as Overflow>::Assoc as std::marker::Sized>
-WARN rustc_trait_selection::traits::coherence expected an unknowable trait ref: <<LocalTy as Overflow>::Assoc as std::marker::Sized>
-WARN rustc_trait_selection::traits::coherence expected an unknowable trait ref: <<LocalTy as Overflow>::Assoc as std::marker::Sized>
-WARN rustc_trait_selection::traits::coherence expected an unknowable trait ref: <<LocalTy as Overflow>::Assoc as std::marker::Sized>
-error[E0119]: conflicting implementations of trait `Trait` for type `<LocalTy as Overflow>::Assoc`
- --> $DIR/trait_ref_is_knowable-norm-overflow.rs:17:1
- |
-LL | impl<T: Copy> Trait for T {}
- | ------------------------- first implementation here
-LL | struct LocalTy;
-LL | impl Trait for <LocalTy as Overflow>::Assoc {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `<LocalTy as Overflow>::Assoc`
- |
- = note: upstream crates may add a new impl of trait `std::marker::Copy` for type `<LocalTy as Overflow>::Assoc` in future versions
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/traits/new-solver/equating-projection-cyclically.stderr b/tests/ui/traits/new-solver/equating-projection-cyclically.stderr
deleted file mode 100644
index 6031d4f08..000000000
--- a/tests/ui/traits/new-solver/equating-projection-cyclically.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/equating-projection-cyclically.rs:25:9
- |
-LL | x = transform(x);
- | ^^^^^^^^^^^^ cyclic type of infinite size
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/traits/new-solver/alias-bound-preference.rs b/tests/ui/traits/next-solver/alias-bound-preference.rs
index e4e0f634e..1c6e12096 100644
--- a/tests/ui/traits/new-solver/alias-bound-preference.rs
+++ b/tests/ui/traits/next-solver/alias-bound-preference.rs
@@ -1,5 +1,5 @@
// revisions: old next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// run-pass
// A test for https://github.com/rust-lang/trait-system-refactor-initiative/issues/45.
diff --git a/tests/ui/traits/new-solver/alias-bound-unsound.rs b/tests/ui/traits/next-solver/alias-bound-unsound.rs
index 825e874d7..4e279a84a 100644
--- a/tests/ui/traits/new-solver/alias-bound-unsound.rs
+++ b/tests/ui/traits/next-solver/alias-bound-unsound.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Makes sure that alias bounds are not unsound!
@@ -27,5 +27,6 @@ fn main() {
//~| ERROR overflow evaluating the requirement `<() as Foo>::Item well-formed`
//~| ERROR overflow evaluating the requirement `String <: <() as Foo>::Item`
//~| ERROR overflow evaluating the requirement `&<() as Foo>::Item well-formed`
+ //~| ERROR overflow evaluating the requirement `<() as Foo>::Item normalizes-to _`
println!("{x}");
}
diff --git a/tests/ui/traits/new-solver/alias-bound-unsound.stderr b/tests/ui/traits/next-solver/alias-bound-unsound.stderr
index ca4b5c90f..ac3f19b3f 100644
--- a/tests/ui/traits/new-solver/alias-bound-unsound.stderr
+++ b/tests/ui/traits/next-solver/alias-bound-unsound.stderr
@@ -52,6 +52,14 @@ LL | drop(<() as Foo>::copy_me(&x));
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`alias_bound_unsound`)
-error: aborting due to 6 previous errors
+error[E0275]: overflow evaluating the requirement `<() as Foo>::Item normalizes-to _`
+ --> $DIR/alias-bound-unsound.rs:24:10
+ |
+LL | drop(<() as Foo>::copy_me(&x));
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`alias_bound_unsound`)
+
+error: aborting due to 7 previous errors
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/new-solver/alias-eq-in-canonical-response.rs b/tests/ui/traits/next-solver/alias-eq-in-canonical-response.rs
index 4bfb6323a..aa7c94791 100644
--- a/tests/ui/traits/new-solver/alias-eq-in-canonical-response.rs
+++ b/tests/ui/traits/next-solver/alias-eq-in-canonical-response.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
trait Foo {
type Gat<'a>
diff --git a/tests/ui/traits/next-solver/alias-relate/deeply-nested-no-hang.rs b/tests/ui/traits/next-solver/alias-relate/deeply-nested-no-hang.rs
new file mode 100644
index 000000000..91cfda37a
--- /dev/null
+++ b/tests/ui/traits/next-solver/alias-relate/deeply-nested-no-hang.rs
@@ -0,0 +1,22 @@
+// check-pass
+// compile-flags: -Znext-solver
+// regression test for trait-system-refactor-initiative#68
+trait Identity {
+ type Assoc: ?Sized;
+}
+
+impl<T: ?Sized> Identity for T {
+ type Assoc = T;
+}
+
+type Id<T> = <T as Identity>::Assoc;
+
+type Five<T> = Id<Id<Id<Id<Id<T>>>>>;
+type Ty<T> = Five<Five<Five<Five<Five<T>>>>>;
+
+trait Trait<T> {}
+
+impl<T> Trait<T> for Ty<T> {}
+impl Trait<u32> for Ty<i32> {}
+
+fn main() {}
diff --git a/tests/ui/traits/next-solver/alias-relate/opaque-hidden-ty-is-rigid-alias.rs b/tests/ui/traits/next-solver/alias-relate/opaque-hidden-ty-is-rigid-alias.rs
new file mode 100644
index 000000000..88bbd13f9
--- /dev/null
+++ b/tests/ui/traits/next-solver/alias-relate/opaque-hidden-ty-is-rigid-alias.rs
@@ -0,0 +1,8 @@
+// check-pass
+// compile-flags: -Znext-solver
+
+fn test<T: Iterator>(x: T::Item) -> impl Sized {
+ x
+}
+
+fn main() {}
diff --git a/tests/ui/traits/new-solver/alias-sub.rs b/tests/ui/traits/next-solver/alias-sub.rs
index 30c1981a9..f7f23a024 100644
--- a/tests/ui/traits/new-solver/alias-sub.rs
+++ b/tests/ui/traits/next-solver/alias-sub.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Trait {
diff --git a/tests/ui/traits/new-solver/alias_eq_cant_be_furthur_normalized.rs b/tests/ui/traits/next-solver/alias_eq_cant_be_furthur_normalized.rs
index dc726ba51..04d1b9496 100644
--- a/tests/ui/traits/new-solver/alias_eq_cant_be_furthur_normalized.rs
+++ b/tests/ui/traits/next-solver/alias_eq_cant_be_furthur_normalized.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check that a goal such as `alias-eq(<T as TraitB>::Assoc<bool>, <T as TraitB>::Assoc<?0>)`
// succeeds with a constraint that `?0 = bool`
diff --git a/tests/ui/traits/new-solver/alias_eq_dont_use_normalizes_to_if_substs_eq.rs b/tests/ui/traits/next-solver/alias_eq_dont_use_normalizes_to_if_substs_eq.rs
index 3c7fc7403..48157192a 100644
--- a/tests/ui/traits/new-solver/alias_eq_dont_use_normalizes_to_if_substs_eq.rs
+++ b/tests/ui/traits/next-solver/alias_eq_dont_use_normalizes_to_if_substs_eq.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
// (should not pass, should be turned into a coherence-only test)
diff --git a/tests/ui/traits/new-solver/alias_eq_simple.rs b/tests/ui/traits/next-solver/alias_eq_simple.rs
index 6792cf3ce..21ad1a4fa 100644
--- a/tests/ui/traits/new-solver/alias_eq_simple.rs
+++ b/tests/ui/traits/next-solver/alias_eq_simple.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// test that the new solver can handle `alias-eq(<i32 as TraitB>::Assoc, u32)`
diff --git a/tests/ui/traits/new-solver/alias_eq_substs_eq_not_intercrate.rs b/tests/ui/traits/next-solver/alias_eq_substs_eq_not_intercrate.rs
index 204f6e8b0..4717aa804 100644
--- a/tests/ui/traits/new-solver/alias_eq_substs_eq_not_intercrate.rs
+++ b/tests/ui/traits/next-solver/alias_eq_substs_eq_not_intercrate.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check that a `alias-eq(<?a as TraitB>::Assoc, <?b as TraitB>::Assoc)` goal fails
// during coherence. We must not incorrectly constrain `?a` and `?b` to be
diff --git a/tests/ui/traits/new-solver/alias_eq_substs_eq_not_intercrate.stderr b/tests/ui/traits/next-solver/alias_eq_substs_eq_not_intercrate.stderr
index 46677a583..8c6840f72 100644
--- a/tests/ui/traits/new-solver/alias_eq_substs_eq_not_intercrate.stderr
+++ b/tests/ui/traits/next-solver/alias_eq_substs_eq_not_intercrate.stderr
@@ -8,6 +8,6 @@ LL | impl<U: TraitB> Overlaps<U> for <U as TraitB>::Assoc {}
|
= note: downstream crates may implement trait `TraitB` for type `std::boxed::Box<_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/traits/new-solver/array-default.rs b/tests/ui/traits/next-solver/array-default.rs
index 5077137b0..6bfbce7d4 100644
--- a/tests/ui/traits/new-solver/array-default.rs
+++ b/tests/ui/traits/next-solver/array-default.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
fn has_default<const N: usize>() where [(); N]: Default {}
diff --git a/tests/ui/traits/new-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs b/tests/ui/traits/next-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs
index 826e8c1e0..4401abd07 100644
--- a/tests/ui/traits/new-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs
+++ b/tests/ui/traits/next-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
// Checks that we do not get ambiguity by considering an impl
diff --git a/tests/ui/traits/new-solver/assembly/runaway-impl-candidate-selection.rs b/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.rs
index 1dca86d36..1edc1a8c5 100644
--- a/tests/ui/traits/new-solver/assembly/runaway-impl-candidate-selection.rs
+++ b/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// In the new solver, we are trying to select `<?0 as Iterator>::Item: Debug`,
// which, naively can be unified with every impl of `Debug` if we're not careful.
diff --git a/tests/ui/traits/new-solver/assembly/runaway-impl-candidate-selection.stderr b/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.stderr
index 414deb477..4bd55ee80 100644
--- a/tests/ui/traits/new-solver/assembly/runaway-impl-candidate-selection.stderr
+++ b/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `iter`
LL | fn iter<T: Iterator>() -> <T as Iterator>::Item {
| ^^^^^^^^ required by this bound in `iter`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/traits/new-solver/async.fail.stderr b/tests/ui/traits/next-solver/async.fail.stderr
index 44097b556..ebd0ada26 100644
--- a/tests/ui/traits/new-solver/async.fail.stderr
+++ b/tests/ui/traits/next-solver/async.fail.stderr
@@ -12,6 +12,6 @@ note: required by a bound in `needs_async`
LL | fn needs_async(_: impl Future<Output = i32>) {}
| ^^^^^^^^^^^^ required by this bound in `needs_async`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/traits/new-solver/async.rs b/tests/ui/traits/next-solver/async.rs
index 155b71eb7..5833c0522 100644
--- a/tests/ui/traits/new-solver/async.rs
+++ b/tests/ui/traits/next-solver/async.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// edition: 2021
// revisions: pass fail
//[pass] check-pass
diff --git a/tests/ui/traits/new-solver/auto-with-drop_tracking_mir.fail.stderr b/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.fail.stderr
index 4aefdd6bb..ac05dfb2d 100644
--- a/tests/ui/traits/new-solver/auto-with-drop_tracking_mir.fail.stderr
+++ b/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.fail.stderr
@@ -13,6 +13,6 @@ note: required by a bound in `is_send`
LL | fn is_send(_: impl Send) {}
| ^^^^ required by this bound in `is_send`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/new-solver/auto-with-drop_tracking_mir.rs b/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs
index 6b54718e3..d4010a552 100644
--- a/tests/ui/traits/new-solver/auto-with-drop_tracking_mir.rs
+++ b/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// edition: 2021
// revisions: pass fail
//[pass] check-pass
diff --git a/tests/ui/traits/new-solver/borrowck-error.rs b/tests/ui/traits/next-solver/borrowck-error.rs
index 4787a2c7e..25f144594 100644
--- a/tests/ui/traits/new-solver/borrowck-error.rs
+++ b/tests/ui/traits/next-solver/borrowck-error.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
use std::collections::HashMap;
diff --git a/tests/ui/traits/new-solver/borrowck-error.stderr b/tests/ui/traits/next-solver/borrowck-error.stderr
index a7d820174..4cb41e7d5 100644
--- a/tests/ui/traits/new-solver/borrowck-error.stderr
+++ b/tests/ui/traits/next-solver/borrowck-error.stderr
@@ -7,6 +7,6 @@ LL | &HashMap::new()
| |temporary value created here
| returns a reference to data owned by the current function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/traits/new-solver/builtin-fn-must-return-sized.rs b/tests/ui/traits/next-solver/builtin-fn-must-return-sized.rs
index ba473653e..eab25214d 100644
--- a/tests/ui/traits/new-solver/builtin-fn-must-return-sized.rs
+++ b/tests/ui/traits/next-solver/builtin-fn-must-return-sized.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
#![feature(fn_traits)]
#![feature(unboxed_closures)]
diff --git a/tests/ui/traits/new-solver/builtin-fn-must-return-sized.stderr b/tests/ui/traits/next-solver/builtin-fn-must-return-sized.stderr
index 4eaa25961..08047852f 100644
--- a/tests/ui/traits/new-solver/builtin-fn-must-return-sized.stderr
+++ b/tests/ui/traits/next-solver/builtin-fn-must-return-sized.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `foo`
LL | fn foo<F: Fn<T>, T: Tuple>(f: Option<F>, t: T) {
| ^^^^^ required by this bound in `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/new-solver/canonical-int-var-eq-in-response.rs b/tests/ui/traits/next-solver/canonical-int-var-eq-in-response.rs
index 4b013983a..ea2740523 100644
--- a/tests/ui/traits/new-solver/canonical-int-var-eq-in-response.rs
+++ b/tests/ui/traits/next-solver/canonical-int-var-eq-in-response.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Mirror {
diff --git a/tests/ui/traits/new-solver/canonical-ty-var-eq-in-response.rs b/tests/ui/traits/next-solver/canonical-ty-var-eq-in-response.rs
index d1c6b1077..b1e4a9e58 100644
--- a/tests/ui/traits/new-solver/canonical-ty-var-eq-in-response.rs
+++ b/tests/ui/traits/next-solver/canonical-ty-var-eq-in-response.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
trait Mirror {
type Item;
diff --git a/tests/ui/traits/new-solver/canonicalize-effect-var.rs b/tests/ui/traits/next-solver/canonicalize-effect-var.rs
index 35b69ed1a..4a13ba373 100644
--- a/tests/ui/traits/new-solver/canonicalize-effect-var.rs
+++ b/tests/ui/traits/next-solver/canonicalize-effect-var.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
#![feature(effects)]
diff --git a/tests/ui/traits/new-solver/cast-checks-handling-projections.rs b/tests/ui/traits/next-solver/cast-checks-handling-projections.rs
index 3b261062f..406b4dc12 100644
--- a/tests/ui/traits/new-solver/cast-checks-handling-projections.rs
+++ b/tests/ui/traits/next-solver/cast-checks-handling-projections.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
fn main() {
diff --git a/tests/ui/traits/new-solver/closure-inference-guidance.rs b/tests/ui/traits/next-solver/closure-inference-guidance.rs
index d2ad0cc03..8175b92f8 100644
--- a/tests/ui/traits/new-solver/closure-inference-guidance.rs
+++ b/tests/ui/traits/next-solver/closure-inference-guidance.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
fn foo(i: isize) -> isize { i + 1 }
diff --git a/tests/ui/traits/next-solver/closure-signature-inference-2.rs b/tests/ui/traits/next-solver/closure-signature-inference-2.rs
new file mode 100644
index 000000000..8fece7ba9
--- /dev/null
+++ b/tests/ui/traits/next-solver/closure-signature-inference-2.rs
@@ -0,0 +1,21 @@
+// compile-flags: -Znext-solver
+// check-pass
+
+fn map<T: Default, U, F: FnOnce(T) -> U>(f: F) {
+ f(T::default());
+}
+
+fn main() {
+ map::<i32, _ /* ?U */, _ /* ?F */>(|x| x.to_string());
+ // PREVIOUSLY when confirming the `map` call, we register:
+ //
+ // (1.) ?F: FnOnce<(i32,)>
+ // (2.) <?F as FnOnce<(i32,)>>::Output projects-to ?U
+ //
+ // While (1.) is ambiguous, (2.) immediately gets processed
+ // and we infer `?U := <?F as FnOnce<(i32,)>>::Output`.
+ //
+ // Thus, the only pending obligation that remains is (1.).
+ // Since it is a trait obligation, we don't use it to deduce
+ // the closure signature, and we fail!
+}
diff --git a/tests/ui/traits/next-solver/closure-signature-inference.rs b/tests/ui/traits/next-solver/closure-signature-inference.rs
new file mode 100644
index 000000000..355fc7902
--- /dev/null
+++ b/tests/ui/traits/next-solver/closure-signature-inference.rs
@@ -0,0 +1,15 @@
+// compile-flags: -Znext-solver
+// check-pass
+
+struct A;
+impl A {
+ fn hi(self) {}
+}
+
+fn hello() -> Result<(A,), ()> {
+ Err(())
+}
+
+fn main() {
+ let x = hello().map(|(x,)| x.hi());
+}
diff --git a/tests/ui/traits/new-solver/closure-substs-ambiguity.rs b/tests/ui/traits/next-solver/closure-substs-ambiguity.rs
index 48432f402..cc9ee58f2 100644
--- a/tests/ui/traits/new-solver/closure-substs-ambiguity.rs
+++ b/tests/ui/traits/next-solver/closure-substs-ambiguity.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
fn main() {
diff --git a/tests/ui/traits/next-solver/coerce-ambig-alias-to-rigid-alias.rs b/tests/ui/traits/next-solver/coerce-ambig-alias-to-rigid-alias.rs
new file mode 100644
index 000000000..bcb48b5ac
--- /dev/null
+++ b/tests/ui/traits/next-solver/coerce-ambig-alias-to-rigid-alias.rs
@@ -0,0 +1,15 @@
+// compile-flags: -Znext-solver
+// check-pass
+
+trait Trait {
+ type Assoc;
+}
+
+fn call<T: Trait>(_: <T as Trait>::Assoc, _: T) {}
+
+fn foo<T: Trait>(rigid: <T as Trait>::Assoc, t: T) {
+ // Check that we can coerce `<?0 as Trait>::Assoc` to `<T as Trait>::Assoc`.
+ call::<_ /* ?0 */>(rigid, t);
+}
+
+fn main() {}
diff --git a/tests/ui/traits/new-solver/coherence/issue-102048.rs b/tests/ui/traits/next-solver/coherence/issue-102048.rs
index 11636bfeb..600e63d4d 100644
--- a/tests/ui/traits/new-solver/coherence/issue-102048.rs
+++ b/tests/ui/traits/next-solver/coherence/issue-102048.rs
@@ -17,7 +17,7 @@
// that to `i32`. We then try to unify `i32` from `impl1` with `u32` from `impl2` which fails,
// causing coherence to consider these two impls distinct.
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
pub trait Trait<T> {}
pub trait WithAssoc1<'a> {
diff --git a/tests/ui/traits/new-solver/coherence/issue-102048.stderr b/tests/ui/traits/next-solver/coherence/issue-102048.stderr
index 41bf68a1d..4e93ae284 100644
--- a/tests/ui/traits/new-solver/coherence/issue-102048.stderr
+++ b/tests/ui/traits/next-solver/coherence/issue-102048.stderr
@@ -11,6 +11,6 @@ LL | / impl<T, U> Trait<for<'a> fn(<U as WithAssoc1<'a>>::Assoc, u32)> for (T, U
LL | | U: for<'a> WithAssoc1<'a>
| |_____________________________^ conflicting implementation for `(_, _)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-norm-overflow.rs b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.rs
index b39ae0333..af471b5e1 100644
--- a/tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-norm-overflow.rs
+++ b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Coherence should handle overflow while normalizing for
// `trait_ref_is_knowable` correctly.
diff --git a/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.stderr b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.stderr
new file mode 100644
index 000000000..e3c0dabf5
--- /dev/null
+++ b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.stderr
@@ -0,0 +1,12 @@
+error[E0119]: conflicting implementations of trait `Trait` for type `<LocalTy as Overflow>::Assoc`
+ --> $DIR/trait_ref_is_knowable-norm-overflow.rs:17:1
+ |
+LL | impl<T: Copy> Trait for T {}
+ | ------------------------- first implementation here
+LL | struct LocalTy;
+LL | impl Trait for <LocalTy as Overflow>::Assoc {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `<LocalTy as Overflow>::Assoc`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-normalization-1.rs b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-1.rs
index c38e3baf5..e6ffb55b4 100644
--- a/tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-normalization-1.rs
+++ b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-1.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Id {
diff --git a/tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-normalization-2.rs b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-2.rs
index 2d53266db..d16f9d22c 100644
--- a/tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-normalization-2.rs
+++ b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-2.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
use std::future::{Future, IntoFuture};
diff --git a/tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-normalization-3.rs b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-3.rs
index 2f27de4e4..90de6b847 100644
--- a/tests/ui/traits/new-solver/coherence/trait_ref_is_knowable-normalization-3.rs
+++ b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-3.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Id {
diff --git a/tests/ui/traits/new-solver/const-param-placeholder.fail.stderr b/tests/ui/traits/next-solver/const-param-placeholder.fail.stderr
index 4db6e22e5..163710706 100644
--- a/tests/ui/traits/new-solver/const-param-placeholder.fail.stderr
+++ b/tests/ui/traits/next-solver/const-param-placeholder.fail.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `needs_foo`
LL | fn needs_foo<F: Foo>() {}
| ^^^ required by this bound in `needs_foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/new-solver/const-param-placeholder.rs b/tests/ui/traits/next-solver/const-param-placeholder.rs
index a83102a4c..c22bc54cf 100644
--- a/tests/ui/traits/new-solver/const-param-placeholder.rs
+++ b/tests/ui/traits/next-solver/const-param-placeholder.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// revisions: pass fail
//[pass] check-pass
diff --git a/tests/ui/traits/new-solver/coroutine.fail.stderr b/tests/ui/traits/next-solver/coroutine.fail.stderr
index 14e67727d..14e67727d 100644
--- a/tests/ui/traits/new-solver/coroutine.fail.stderr
+++ b/tests/ui/traits/next-solver/coroutine.fail.stderr
diff --git a/tests/ui/traits/new-solver/coroutine.rs b/tests/ui/traits/next-solver/coroutine.rs
index af16f70fb..727e23568 100644
--- a/tests/ui/traits/new-solver/coroutine.rs
+++ b/tests/ui/traits/next-solver/coroutine.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// edition: 2021
// revisions: pass fail
//[pass] check-pass
diff --git a/tests/ui/traits/new-solver/cycles/coinduction/fixpoint-exponential-growth.rs b/tests/ui/traits/next-solver/cycles/coinduction/fixpoint-exponential-growth.rs
index 44e763ef9..947b52da7 100644
--- a/tests/ui/traits/new-solver/cycles/coinduction/fixpoint-exponential-growth.rs
+++ b/tests/ui/traits/next-solver/cycles/coinduction/fixpoint-exponential-growth.rs
@@ -1,10 +1,14 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Proving `W<?0>: Trait` instantiates `?0` with `(W<?1>, W<?2>)` and then
// proves `W<?1>: Trait` and `W<?2>: Trait`, resulting in a coinductive cycle.
//
-// Proving coinductive cycles runs until we reach a fixpoint. This fixpoint is
-// never reached here and each step doubles the amount of nested obligations.
+// Proving coinductive cycles runs until we reach a fixpoint. However, after
+// computing `try_evaluate_added_goals` in the second fixpoint iteration, the
+// self type already has a depth equal to the number of steps. This results
+// in enormous constraints, causing the canonicalizer to hang without ever
+// reaching the recursion limit. We currently avoid that by erasing the constraints
+// from overflow.
//
// This previously caused a hang in the trait solver, see
// https://github.com/rust-lang/trait-system-refactor-initiative/issues/13.
diff --git a/tests/ui/traits/new-solver/cycles/coinduction/fixpoint-exponential-growth.stderr b/tests/ui/traits/next-solver/cycles/coinduction/fixpoint-exponential-growth.stderr
index 1ac0e2977..150100f2c 100644
--- a/tests/ui/traits/new-solver/cycles/coinduction/fixpoint-exponential-growth.stderr
+++ b/tests/ui/traits/next-solver/cycles/coinduction/fixpoint-exponential-growth.stderr
@@ -1,16 +1,16 @@
error[E0275]: overflow evaluating the requirement `W<_>: Trait`
- --> $DIR/fixpoint-exponential-growth.rs:29:13
+ --> $DIR/fixpoint-exponential-growth.rs:33:13
|
LL | impls::<W<_>>();
| ^^^^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`fixpoint_exponential_growth`)
note: required by a bound in `impls`
- --> $DIR/fixpoint-exponential-growth.rs:26:13
+ --> $DIR/fixpoint-exponential-growth.rs:30:13
|
LL | fn impls<T: Trait>() {}
| ^^^^^ required by this bound in `impls`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/new-solver/cycles/coinduction/incompleteness-unstable-result.rs b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs
index 0cd14f05c..a3c07b987 100644
--- a/tests/ui/traits/new-solver/cycles/coinduction/incompleteness-unstable-result.rs
+++ b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
#![feature(rustc_attrs)]
// This test is incredibly subtle. At its core the goal is to get a coinductive cycle,
diff --git a/tests/ui/traits/new-solver/cycles/coinduction/incompleteness-unstable-result.stderr b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.stderr
index f1871ff05..d49321917 100644
--- a/tests/ui/traits/new-solver/cycles/coinduction/incompleteness-unstable-result.stderr
+++ b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `impls_trait`
LL | fn impls_trait<T: ?Sized + Trait<U, V, D>, U: ?Sized, V: ?Sized, D: ?Sized>() {}
| ^^^^^^^^^^^^^^ required by this bound in `impls_trait`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/new-solver/cycles/double-cycle-inductive-coinductive.rs b/tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.rs
index 5617e45ad..0f19bc2c5 100644
--- a/tests/ui/traits/new-solver/cycles/double-cycle-inductive-coinductive.rs
+++ b/tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
#![feature(rustc_attrs)]
// Test that having both an inductive and a coinductive cycle
diff --git a/tests/ui/traits/new-solver/cycles/double-cycle-inductive-coinductive.stderr b/tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.stderr
index a3404da51..a3404da51 100644
--- a/tests/ui/traits/new-solver/cycles/double-cycle-inductive-coinductive.stderr
+++ b/tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.stderr
diff --git a/tests/ui/traits/new-solver/cycles/fixpoint-rerun-all-cycle-heads.rs b/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.rs
index 279063923..c7e2e2d5e 100644
--- a/tests/ui/traits/new-solver/cycles/fixpoint-rerun-all-cycle-heads.rs
+++ b/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
#![feature(rustc_attrs)]
// Check that we correctly rerun the trait solver for heads of cycles,
diff --git a/tests/ui/traits/new-solver/cycles/fixpoint-rerun-all-cycle-heads.stderr b/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.stderr
index 4cbd08981..7b3075f4f 100644
--- a/tests/ui/traits/new-solver/cycles/fixpoint-rerun-all-cycle-heads.stderr
+++ b/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.stderr
@@ -6,5 +6,5 @@ LL | fn check<'a, T: ?Sized>() {
LL | impls_trait::<'a, 'static, A<T>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/traits/new-solver/cycles/inductive-cycle-but-err.rs b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.rs
index cda987898..fdc7afea3 100644
--- a/tests/ui/traits/new-solver/cycles/inductive-cycle-but-err.rs
+++ b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
#![feature(trivial_bounds, marker_trait_attr)]
#![allow(trivial_bounds)]
// This previously triggered a bug in the provisional cache.
diff --git a/tests/ui/traits/new-solver/cycles/inductive-cycle-but-err.stderr b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.stderr
index 57227321a..acacaf6a3 100644
--- a/tests/ui/traits/new-solver/cycles/inductive-cycle-but-err.stderr
+++ b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `impls_trait`
LL | fn impls_trait<T: Trait>() {}
| ^^^^^ required by this bound in `impls_trait`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/new-solver/cycles/inductive-cycle-but-ok.rs b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-ok.rs
index d4851eb69..d6d9762bb 100644
--- a/tests/ui/traits/new-solver/cycles/inductive-cycle-but-ok.rs
+++ b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-ok.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
#![feature(trivial_bounds, marker_trait_attr)]
#![allow(trivial_bounds)]
diff --git a/tests/ui/traits/new-solver/cycles/inductive-cycle-discarded-coinductive-constraints.rs b/tests/ui/traits/next-solver/cycles/inductive-cycle-discarded-coinductive-constraints.rs
index 530e6d0ec..a32f7a13a 100644
--- a/tests/ui/traits/new-solver/cycles/inductive-cycle-discarded-coinductive-constraints.rs
+++ b/tests/ui/traits/next-solver/cycles/inductive-cycle-discarded-coinductive-constraints.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
#![feature(rustc_attrs, marker_trait_attr)]
#[rustc_coinductive]
trait Trait {}
diff --git a/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.rs b/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.rs
new file mode 100644
index 000000000..efeb8d023
--- /dev/null
+++ b/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.rs
@@ -0,0 +1,33 @@
+// compile-flags: -Znext-solver
+
+// This currently hangs if we do not erase constraints from
+// overflow.
+//
+// We set the provisional result of `W<?0>` to `?0 := W<_>`.
+// The next iteration does not simply result in a `?0 := W<W<_>` constraint as
+// one might expect, but instead each time we evaluate the nested `W<T>` goal we
+// apply the previously returned constraints: the first fixpoint iteration goes
+// as follows: `W<?1>: Trait` constrains `?1` to `W<?2>`, we then evaluate
+// `W<W<?2>>: Trait` the next time we try to prove the nested goal. This results
+// inn `W<W<W<?3>>>` and so on. This goes on until we reach overflow in
+// `try_evaluate_added_goals`. This means the provisional result after the
+// second fixpoint iteration is already `W<W<W<...>>>` with a size proportional
+// to the number of steps in `try_evaluate_added_goals`. The size then continues
+// to grow. The exponential blowup from having 2 nested goals per impl causes
+// the solver to hang without hitting the recursion limit.
+trait Trait {}
+
+struct W<T: ?Sized>(*const T);
+
+impl<T: ?Sized> Trait for W<W<T>>
+where
+ W<T>: Trait,
+ W<T>: Trait,
+{}
+
+fn impls_trait<T: Trait>() {}
+
+fn main() {
+ impls_trait::<W<_>>();
+ //~^ ERROR overflow evaluating the requirement
+}
diff --git a/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.stderr b/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.stderr
new file mode 100644
index 000000000..424519207
--- /dev/null
+++ b/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.stderr
@@ -0,0 +1,16 @@
+error[E0275]: overflow evaluating the requirement `W<_>: Trait`
+ --> $DIR/inductive-fixpoint-hang.rs:31:19
+ |
+LL | impls_trait::<W<_>>();
+ | ^^^^
+ |
+ = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`inductive_fixpoint_hang`)
+note: required by a bound in `impls_trait`
+ --> $DIR/inductive-fixpoint-hang.rs:28:19
+ |
+LL | fn impls_trait<T: Trait>() {}
+ | ^^^^^ required by this bound in `impls_trait`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/new-solver/cycles/inductive-not-on-stack.rs b/tests/ui/traits/next-solver/cycles/inductive-not-on-stack.rs
index f06b98a79..f2f6e009d 100644
--- a/tests/ui/traits/new-solver/cycles/inductive-not-on-stack.rs
+++ b/tests/ui/traits/next-solver/cycles/inductive-not-on-stack.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
#![feature(rustc_attrs, trivial_bounds)]
// We have to be careful here:
diff --git a/tests/ui/traits/new-solver/cycles/inductive-not-on-stack.stderr b/tests/ui/traits/next-solver/cycles/inductive-not-on-stack.stderr
index 859b3f3f1..859b3f3f1 100644
--- a/tests/ui/traits/new-solver/cycles/inductive-not-on-stack.stderr
+++ b/tests/ui/traits/next-solver/cycles/inductive-not-on-stack.stderr
diff --git a/tests/ui/traits/new-solver/cycles/leak-check-coinductive-cycle.rs b/tests/ui/traits/next-solver/cycles/leak-check-coinductive-cycle.rs
index a6d318726..9ff362ec8 100644
--- a/tests/ui/traits/new-solver/cycles/leak-check-coinductive-cycle.rs
+++ b/tests/ui/traits/next-solver/cycles/leak-check-coinductive-cycle.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
#![feature(rustc_attrs)]
diff --git a/tests/ui/traits/new-solver/cycles/provisional-result-done.rs b/tests/ui/traits/next-solver/cycles/provisional-result-done.rs
index 589d34dd7..0f3b84ce5 100644
--- a/tests/ui/traits/new-solver/cycles/provisional-result-done.rs
+++ b/tests/ui/traits/next-solver/cycles/provisional-result-done.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
// This tests checks that we update results in the provisional cache when
diff --git a/tests/ui/traits/new-solver/deduce-closure-signature-after-normalization.rs b/tests/ui/traits/next-solver/deduce-closure-signature-after-normalization.rs
index 51f62bc23..08f26686b 100644
--- a/tests/ui/traits/new-solver/deduce-closure-signature-after-normalization.rs
+++ b/tests/ui/traits/next-solver/deduce-closure-signature-after-normalization.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Foo {
diff --git a/tests/ui/traits/new-solver/deduce-ty-from-object.rs b/tests/ui/traits/next-solver/deduce-ty-from-object.rs
index 7398bce7b..b627fd720 100644
--- a/tests/ui/traits/new-solver/deduce-ty-from-object.rs
+++ b/tests/ui/traits/next-solver/deduce-ty-from-object.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
fn main() {
let x: Box<dyn Iterator<Item = ()>> = Box::new(std::iter::empty());
diff --git a/tests/ui/traits/new-solver/dedup-regions.rs b/tests/ui/traits/next-solver/dedup-regions.rs
index f376f39a5..dd406333f 100644
--- a/tests/ui/traits/new-solver/dedup-regions.rs
+++ b/tests/ui/traits/next-solver/dedup-regions.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
struct A(*mut ());
diff --git a/tests/ui/traits/new-solver/destruct.rs b/tests/ui/traits/next-solver/destruct.rs
index 30d7777b7..5093344e4 100644
--- a/tests/ui/traits/new-solver/destruct.rs
+++ b/tests/ui/traits/next-solver/destruct.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
#![feature(const_trait_impl)]
diff --git a/tests/ui/traits/new-solver/dont-coerce-infer-to-dyn.rs b/tests/ui/traits/next-solver/dont-coerce-infer-to-dyn.rs
index c2ac80459..da07869f3 100644
--- a/tests/ui/traits/new-solver/dont-coerce-infer-to-dyn.rs
+++ b/tests/ui/traits/next-solver/dont-coerce-infer-to-dyn.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
use std::fmt::Display;
diff --git a/tests/ui/traits/new-solver/dont-elaborate-for-projections.rs b/tests/ui/traits/next-solver/dont-elaborate-for-projections.rs
index e60825006..9123871db 100644
--- a/tests/ui/traits/new-solver/dont-elaborate-for-projections.rs
+++ b/tests/ui/traits/next-solver/dont-elaborate-for-projections.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Iter<'a, I: 'a>: Iterator<Item = &'a I> {}
diff --git a/tests/ui/traits/new-solver/dont-ice-on-assoc-projection.rs b/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.rs
index b9798c79d..1e1ef8c23 100644
--- a/tests/ui/traits/new-solver/dont-ice-on-assoc-projection.rs
+++ b/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next-coherence
+// compile-flags: -Znext-solver=coherence
// Makes sure we don't ICE on associated const projection when the feature gate
// is not enabled, since we should avoid encountering ICEs on stable if possible.
diff --git a/tests/ui/traits/new-solver/dont-ice-on-assoc-projection.stderr b/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.stderr
index 368f5cd0c..368f5cd0c 100644
--- a/tests/ui/traits/new-solver/dont-ice-on-assoc-projection.stderr
+++ b/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.stderr
diff --git a/tests/ui/traits/new-solver/dont-loop-fulfill-on-region-constraints.rs b/tests/ui/traits/next-solver/dont-loop-fulfill-on-region-constraints.rs
index b241e3bf8..a85098a95 100644
--- a/tests/ui/traits/new-solver/dont-loop-fulfill-on-region-constraints.rs
+++ b/tests/ui/traits/next-solver/dont-loop-fulfill-on-region-constraints.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Eq<'a, 'b, T> {}
diff --git a/tests/ui/traits/new-solver/dont-normalize-proj-with-error.rs b/tests/ui/traits/next-solver/dont-normalize-proj-with-error.rs
index 19a6fa990..fd1682cd6 100644
--- a/tests/ui/traits/new-solver/dont-normalize-proj-with-error.rs
+++ b/tests/ui/traits/next-solver/dont-normalize-proj-with-error.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Test that we don't incorrectly leak unconstrained inference variables
// if the projection contained an error. This caused an ICE in writeback.
diff --git a/tests/ui/traits/new-solver/dont-normalize-proj-with-error.stderr b/tests/ui/traits/next-solver/dont-normalize-proj-with-error.stderr
index 5a7459ec1..576ede52a 100644
--- a/tests/ui/traits/new-solver/dont-normalize-proj-with-error.stderr
+++ b/tests/ui/traits/next-solver/dont-normalize-proj-with-error.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `TypeError` in this scope
LL | fn type_error() -> TypeError { todo!() }
| ^^^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/traits/new-solver/dont-remap-tait-substs.rs b/tests/ui/traits/next-solver/dont-remap-tait-substs.rs
index 309bee8aa..b089f0df3 100644
--- a/tests/ui/traits/new-solver/dont-remap-tait-substs.rs
+++ b/tests/ui/traits/next-solver/dont-remap-tait-substs.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
// Makes sure we don't prepopulate the MIR typeck of `define`
diff --git a/tests/ui/traits/new-solver/dont-type_of-tait-in-defining-scope.not_send.stderr b/tests/ui/traits/next-solver/dont-type_of-tait-in-defining-scope.not_send.stderr
index a31bfd958..076dab29d 100644
--- a/tests/ui/traits/new-solver/dont-type_of-tait-in-defining-scope.not_send.stderr
+++ b/tests/ui/traits/next-solver/dont-type_of-tait-in-defining-scope.not_send.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `needs_send`
LL | fn needs_send<T: Send>() {}
| ^^^^ required by this bound in `needs_send`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/traits/new-solver/dont-type_of-tait-in-defining-scope.rs b/tests/ui/traits/next-solver/dont-type_of-tait-in-defining-scope.rs
index 08f14d749..a1f38e69e 100644
--- a/tests/ui/traits/new-solver/dont-type_of-tait-in-defining-scope.rs
+++ b/tests/ui/traits/next-solver/dont-type_of-tait-in-defining-scope.rs
@@ -1,5 +1,5 @@
// revisions: is_send not_send
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
//[is_send] check-pass
#![feature(type_alias_impl_trait)]
diff --git a/tests/ui/traits/new-solver/dyn-any-dont-prefer-impl.rs b/tests/ui/traits/next-solver/dyn-any-dont-prefer-impl.rs
index af35a6195..bb1c24a00 100644
--- a/tests/ui/traits/new-solver/dyn-any-dont-prefer-impl.rs
+++ b/tests/ui/traits/next-solver/dyn-any-dont-prefer-impl.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
// Test that selection prefers the builtin trait object impl for `Any`
diff --git a/tests/ui/traits/new-solver/elaborate-item-bounds.rs b/tests/ui/traits/next-solver/elaborate-item-bounds.rs
index 076aefcf8..0f1f6c044 100644
--- a/tests/ui/traits/new-solver/elaborate-item-bounds.rs
+++ b/tests/ui/traits/next-solver/elaborate-item-bounds.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Foo {
diff --git a/tests/ui/traits/new-solver/equating-projection-cyclically.rs b/tests/ui/traits/next-solver/equating-projection-cyclically.rs
index 2668da1b7..e7c80cfd7 100644
--- a/tests/ui/traits/new-solver/equating-projection-cyclically.rs
+++ b/tests/ui/traits/next-solver/equating-projection-cyclically.rs
@@ -1,4 +1,5 @@
-// compile-flags: -Ztrait-solver=next
+// check-pass
+// compile-flags: -Znext-solver
trait Test {
type Assoc;
@@ -22,7 +23,9 @@ fn main() {
let mut x: Inv<_> = Inv(None);
// This ends up equating `Inv<?x>` with `Inv<<?x as Test>::Assoc>`
// which fails the occurs check when generalizing `?x`.
+ //
+ // We end up emitting a delayed obligation, causing this to still
+ // succeed.
x = transform(x);
- //~^ ERROR mismatched types
x = Inv::<i32>(None);
}
diff --git a/tests/ui/traits/new-solver/escaping-bound-vars-in-writeback-normalization.rs b/tests/ui/traits/next-solver/escaping-bound-vars-in-writeback-normalization.rs
index 29784c32a..77bedc351 100644
--- a/tests/ui/traits/new-solver/escaping-bound-vars-in-writeback-normalization.rs
+++ b/tests/ui/traits/next-solver/escaping-bound-vars-in-writeback-normalization.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Trivial {
diff --git a/tests/ui/traits/new-solver/float-canonical.rs b/tests/ui/traits/next-solver/float-canonical.rs
index b8748cd43..90d75bacb 100644
--- a/tests/ui/traits/new-solver/float-canonical.rs
+++ b/tests/ui/traits/next-solver/float-canonical.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
fn foo(x: f64) {
diff --git a/tests/ui/traits/new-solver/fn-trait-closure.rs b/tests/ui/traits/next-solver/fn-trait-closure.rs
index bd65737ee..cd2ae1f6f 100644
--- a/tests/ui/traits/new-solver/fn-trait-closure.rs
+++ b/tests/ui/traits/next-solver/fn-trait-closure.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
fn require_fn(_: impl Fn() -> i32) {}
diff --git a/tests/ui/traits/new-solver/fn-trait.rs b/tests/ui/traits/next-solver/fn-trait.rs
index 0a19e6265..1e3d8a21c 100644
--- a/tests/ui/traits/new-solver/fn-trait.rs
+++ b/tests/ui/traits/next-solver/fn-trait.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
fn require_fn(_: impl Fn() -> i32) {}
diff --git a/tests/ui/traits/new-solver/fn-trait.stderr b/tests/ui/traits/next-solver/fn-trait.stderr
index e33487235..e33487235 100644
--- a/tests/ui/traits/new-solver/fn-trait.stderr
+++ b/tests/ui/traits/next-solver/fn-trait.stderr
diff --git a/tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-1.rs b/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-1.rs
index b0b9b6bbd..4a70bd5f8 100644
--- a/tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-1.rs
+++ b/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-1.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
// A minimization of an ambiguity when using typenum. See
diff --git a/tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-2.rs b/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-2.rs
index 94d645a98..70758e7de 100644
--- a/tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-2.rs
+++ b/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-2.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// known-bug: trait-system-refactor-initiative#60
// Generalizing a projection containing an inference variable
diff --git a/tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-2.stderr b/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-2.stderr
index 9aa4f4531..4548ab1e2 100644
--- a/tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-2.stderr
+++ b/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-2.stderr
@@ -1,9 +1,10 @@
-error[E0284]: type annotations needed: cannot satisfy `<<Leaf as WithAssoc<_>>::Assoc as Id>::Assoc == <<Leaf as WithAssoc<_>>::Assoc as Id>::Assoc`
+error[E0284]: type annotations needed
--> $DIR/generalize-proj-new-universe-index-2.rs:74:5
|
LL | bound::<<Rigid as IdHigherRankedBound>::Assoc, <Wrapper<Leaf> as Id>::Assoc, _>()
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot satisfy `<<Leaf as WithAssoc<_>>::Assoc as Id>::Assoc == <<Leaf as WithAssoc<_>>::Assoc as Id>::Assoc`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `V` declared on the function `bound`
|
+ = note: cannot satisfy `<<Rigid as IdHigherRankedBound>::Assoc as WithAssoc<<Wrapper<Leaf> as Id>::Assoc>>::Assoc == _`
note: required by a bound in `bound`
--> $DIR/generalize-proj-new-universe-index-2.rs:69:21
|
@@ -13,6 +14,6 @@ LL | where
LL | T: WithAssoc<U, Assoc = V>,
| ^^^^^^^^^ required by this bound in `bound`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0284`.
diff --git a/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.next.stderr b/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.next.stderr
new file mode 100644
index 000000000..ad8b24a39
--- /dev/null
+++ b/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.next.stderr
@@ -0,0 +1,11 @@
+error[E0275]: overflow evaluating the requirement `<<T as Id<_>>::Id as Unnormalizable>::Assoc == _`
+ --> $DIR/occurs-check-nested-alias.rs:36:9
+ |
+LL | x = y;
+ | ^
+ |
+ = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`occurs_check_nested_alias`)
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.rs b/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.rs
new file mode 100644
index 000000000..e51508d68
--- /dev/null
+++ b/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.rs
@@ -0,0 +1,38 @@
+// revisions: old next
+//[old] check-pass
+
+// Currently always fails to generalize the outer alias, even if it
+// is treated as rigid by `alias-relate`.
+//[next] compile-flags: -Znext-solver
+//[next] known-bug: trait-system-refactor-initiative#8
+#![crate_type = "lib"]
+#![allow(unused)]
+trait Unnormalizable {
+ type Assoc;
+}
+
+trait Id<T> {
+ type Id;
+}
+impl<T, U> Id<T> for U {
+ type Id = U;
+}
+
+struct Inv<T>(*mut T);
+
+fn unconstrained<T>() -> T {
+ todo!()
+}
+
+fn create<T, U: Unnormalizable>(
+ x: &U,
+) -> (Inv<T>, Inv<<<U as Id<T>>::Id as Unnormalizable>::Assoc>) {
+ todo!()
+}
+
+fn foo<T: Unnormalizable>() {
+ let q = unconstrained();
+ let (mut x, y) = create::<_, _>(&q);
+ x = y;
+ drop::<T>(q);
+}
diff --git a/tests/ui/traits/new-solver/higher-ranked-dyn-bounds.rs b/tests/ui/traits/next-solver/higher-ranked-dyn-bounds.rs
index c886aeeda..b87210d7f 100644
--- a/tests/ui/traits/new-solver/higher-ranked-dyn-bounds.rs
+++ b/tests/ui/traits/next-solver/higher-ranked-dyn-bounds.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Trait<'a> {
diff --git a/tests/ui/traits/new-solver/int-var-alias-eq.rs b/tests/ui/traits/next-solver/int-var-alias-eq.rs
index 790197e2d..26ba7f8e5 100644
--- a/tests/ui/traits/new-solver/int-var-alias-eq.rs
+++ b/tests/ui/traits/next-solver/int-var-alias-eq.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// HIR typeck ends up equating `<?0i as Add>::Output == ?0i`.
// Want to make sure that we emit an alias-eq goal for this,
diff --git a/tests/ui/traits/new-solver/int-var-is-send.rs b/tests/ui/traits/next-solver/int-var-is-send.rs
index 083aa90e1..d8b963f20 100644
--- a/tests/ui/traits/new-solver/int-var-is-send.rs
+++ b/tests/ui/traits/next-solver/int-var-is-send.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
fn needs_send(_: impl Send) {}
diff --git a/tests/ui/traits/next-solver/issue-118950-root-region.rs b/tests/ui/traits/next-solver/issue-118950-root-region.rs
new file mode 100644
index 000000000..10fb7d525
--- /dev/null
+++ b/tests/ui/traits/next-solver/issue-118950-root-region.rs
@@ -0,0 +1,22 @@
+// compile-flags: -Znext-solver
+//
+// This is a gnarly test but I don't know how to minimize it, frankly.
+
+#![feature(lazy_type_alias)]
+//~^ WARN the feature `lazy_type_alias` is incomplete
+
+trait ToUnit<'a> {
+ type Unit;
+}
+
+trait Overlap<T> {}
+
+type Assoc<'a, T> = <*const T as ToUnit<'a>>::Unit;
+
+impl<T> Overlap<T> for T {}
+
+impl<T> Overlap<for<'a> fn(Assoc<'a, T>)> for T where Missing: Overlap<T> {}
+//~^ ERROR conflicting implementations of trait `Overlap<fn(_)>` for type `fn(_)`
+//~| ERROR cannot find type `Missing` in this scope
+
+fn main() {}
diff --git a/tests/ui/traits/next-solver/issue-118950-root-region.stderr b/tests/ui/traits/next-solver/issue-118950-root-region.stderr
new file mode 100644
index 000000000..c16a48d5f
--- /dev/null
+++ b/tests/ui/traits/next-solver/issue-118950-root-region.stderr
@@ -0,0 +1,36 @@
+error[E0412]: cannot find type `Missing` in this scope
+ --> $DIR/issue-118950-root-region.rs:18:55
+ |
+LL | impl<T> Overlap<for<'a> fn(Assoc<'a, T>)> for T where Missing: Overlap<T> {}
+ | ^^^^^^^ not found in this scope
+
+warning: the feature `lazy_type_alias` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/issue-118950-root-region.rs:5:12
+ |
+LL | #![feature(lazy_type_alias)]
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: see issue #112792 <https://github.com/rust-lang/rust/issues/112792> for more information
+ = note: `#[warn(incomplete_features)]` on by default
+
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Weak, AliasTy { args: [ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), 'a) }), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Weak, AliasTy { args: [RePlaceholder(!1_BoundRegion { var: 0, kind: BrNamed(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), 'a) }), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Weak, AliasTy { args: [ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), 'a) }), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Weak, AliasTy { args: [RePlaceholder(!1_BoundRegion { var: 0, kind: BrNamed(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), 'a) }), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Weak, AliasTy { args: [ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), 'a) }), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Weak, AliasTy { args: [RePlaceholder(!1_BoundRegion { var: 0, kind: BrNamed(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), 'a) }), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Weak, AliasTy { args: [ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), 'a) }), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) })
+WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: Alias(Weak, AliasTy { args: [RePlaceholder(!1_BoundRegion { var: 0, kind: BrNamed(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), 'a) }), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) })
+error[E0119]: conflicting implementations of trait `Overlap<fn(_)>` for type `fn(_)`
+ --> $DIR/issue-118950-root-region.rs:18:1
+ |
+LL | impl<T> Overlap<T> for T {}
+ | ------------------------ first implementation here
+LL |
+LL | impl<T> Overlap<for<'a> fn(Assoc<'a, T>)> for T where Missing: Overlap<T> {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `fn(_)`
+
+error: aborting due to 2 previous errors; 1 warning emitted
+
+Some errors have detailed explanations: E0119, E0412.
+For more information about an error, try `rustc --explain E0119`.
diff --git a/tests/ui/traits/new-solver/iter-filter-projection.rs b/tests/ui/traits/next-solver/iter-filter-projection.rs
index 8fb62323a..f948831ad 100644
--- a/tests/ui/traits/new-solver/iter-filter-projection.rs
+++ b/tests/ui/traits/next-solver/iter-filter-projection.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
use std::{iter, slice};
diff --git a/tests/ui/traits/new-solver/lazy-nested-obligations-1.rs b/tests/ui/traits/next-solver/lazy-nested-obligations-1.rs
index af00cbb3b..f9e73a93c 100644
--- a/tests/ui/traits/new-solver/lazy-nested-obligations-1.rs
+++ b/tests/ui/traits/next-solver/lazy-nested-obligations-1.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Issue 94358
fn foo<C>(_: C)
diff --git a/tests/ui/traits/new-solver/lazy-nested-obligations-2.rs b/tests/ui/traits/next-solver/lazy-nested-obligations-2.rs
index 20f504928..b85f9d973 100644
--- a/tests/ui/traits/new-solver/lazy-nested-obligations-2.rs
+++ b/tests/ui/traits/next-solver/lazy-nested-obligations-2.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
pub trait With {
diff --git a/tests/ui/traits/new-solver/lazy-nested-obligations-3.rs b/tests/ui/traits/next-solver/lazy-nested-obligations-3.rs
index baf399572..5fb4832dd 100644
--- a/tests/ui/traits/new-solver/lazy-nested-obligations-3.rs
+++ b/tests/ui/traits/next-solver/lazy-nested-obligations-3.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Issue 96750
use std::marker::PhantomData;
diff --git a/tests/ui/traits/new-solver/member-constraints-in-root-universe.rs b/tests/ui/traits/next-solver/member-constraints-in-root-universe.rs
index 97c443058..16e95e94c 100644
--- a/tests/ui/traits/new-solver/member-constraints-in-root-universe.rs
+++ b/tests/ui/traits/next-solver/member-constraints-in-root-universe.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Trait {
diff --git a/tests/ui/traits/new-solver/more-object-bound.rs b/tests/ui/traits/next-solver/more-object-bound.rs
index bb730b18e..8522f034d 100644
--- a/tests/ui/traits/new-solver/more-object-bound.rs
+++ b/tests/ui/traits/next-solver/more-object-bound.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// From #80800
trait SuperTrait {
diff --git a/tests/ui/traits/new-solver/more-object-bound.stderr b/tests/ui/traits/next-solver/more-object-bound.stderr
index 54965dee1..e3be2931e 100644
--- a/tests/ui/traits/new-solver/more-object-bound.stderr
+++ b/tests/ui/traits/next-solver/more-object-bound.stderr
@@ -17,6 +17,6 @@ help: consider introducing a `where` clause, but there might be an alternative b
LL | fn transmute<A, B>(x: A) -> B where dyn Trait<A = A, B = B>: Trait {
| ++++++++++++++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/new-solver/negative-coherence-bounds.rs b/tests/ui/traits/next-solver/negative-coherence-bounds.rs
index 5436b02c3..5436b02c3 100644
--- a/tests/ui/traits/new-solver/negative-coherence-bounds.rs
+++ b/tests/ui/traits/next-solver/negative-coherence-bounds.rs
diff --git a/tests/ui/traits/new-solver/negative-coherence-bounds.stderr b/tests/ui/traits/next-solver/negative-coherence-bounds.stderr
index 4127f51f5..4127f51f5 100644
--- a/tests/ui/traits/new-solver/negative-coherence-bounds.stderr
+++ b/tests/ui/traits/next-solver/negative-coherence-bounds.stderr
diff --git a/tests/ui/traits/new-solver/nested-alias-bound.rs b/tests/ui/traits/next-solver/nested-alias-bound.rs
index c365902db..2e3de0ac6 100644
--- a/tests/ui/traits/new-solver/nested-alias-bound.rs
+++ b/tests/ui/traits/next-solver/nested-alias-bound.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait A {
diff --git a/tests/ui/traits/new-solver/nested-obligations-with-bound-vars-gat.rs b/tests/ui/traits/next-solver/nested-obligations-with-bound-vars-gat.rs
index 92bad9590..94c6c2856 100644
--- a/tests/ui/traits/new-solver/nested-obligations-with-bound-vars-gat.rs
+++ b/tests/ui/traits/next-solver/nested-obligations-with-bound-vars-gat.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Issue 96230
use std::fmt::Debug;
diff --git a/tests/ui/traits/new-solver/normalize-async-closure-in-trait.rs b/tests/ui/traits/next-solver/normalize-async-closure-in-trait.rs
index cc16cc871..b58db2be8 100644
--- a/tests/ui/traits/new-solver/normalize-async-closure-in-trait.rs
+++ b/tests/ui/traits/next-solver/normalize-async-closure-in-trait.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
// edition:2021
diff --git a/tests/ui/traits/new-solver/normalize-param-env-1.rs b/tests/ui/traits/next-solver/normalize-param-env-1.rs
index b02a5d623..92d405137 100644
--- a/tests/ui/traits/new-solver/normalize-param-env-1.rs
+++ b/tests/ui/traits/next-solver/normalize-param-env-1.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Issue 108933
trait Add<Rhs> {
diff --git a/tests/ui/traits/new-solver/normalize-param-env-2.rs b/tests/ui/traits/next-solver/normalize-param-env-2.rs
index 7c2cebdd2..ce084651b 100644
--- a/tests/ui/traits/new-solver/normalize-param-env-2.rs
+++ b/tests/ui/traits/next-solver/normalize-param-env-2.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Issue 92505
trait A<T> {
diff --git a/tests/ui/traits/new-solver/normalize-param-env-3.rs b/tests/ui/traits/next-solver/normalize-param-env-3.rs
index ce2974b2a..e15e1155a 100644
--- a/tests/ui/traits/new-solver/normalize-param-env-3.rs
+++ b/tests/ui/traits/next-solver/normalize-param-env-3.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Issue 100177
trait GenericTrait<T> {}
diff --git a/tests/ui/traits/new-solver/normalize-rcvr-for-inherent.rs b/tests/ui/traits/next-solver/normalize-rcvr-for-inherent.rs
index d70534feb..d308b1695 100644
--- a/tests/ui/traits/new-solver/normalize-rcvr-for-inherent.rs
+++ b/tests/ui/traits/next-solver/normalize-rcvr-for-inherent.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
// Verify that we can assemble inherent impl candidates on a possibly
diff --git a/tests/ui/traits/new-solver/normalize-unsize-rhs.rs b/tests/ui/traits/next-solver/normalize-unsize-rhs.rs
index a398ab4f2..08bb0cf42 100644
--- a/tests/ui/traits/new-solver/normalize-unsize-rhs.rs
+++ b/tests/ui/traits/next-solver/normalize-unsize-rhs.rs
@@ -1,6 +1,5 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
-
#![feature(trait_upcasting)]
trait A {}
diff --git a/tests/ui/traits/new-solver/normalized-const-built-in-op.rs b/tests/ui/traits/next-solver/normalized-const-built-in-op.rs
index 2443e5178..0fffe7b43 100644
--- a/tests/ui/traits/new-solver/normalized-const-built-in-op.rs
+++ b/tests/ui/traits/next-solver/normalized-const-built-in-op.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
const fn foo() {
diff --git a/tests/ui/traits/new-solver/normalizes_to_ignores_unnormalizable_candidate.rs b/tests/ui/traits/next-solver/normalizes_to_ignores_unnormalizable_candidate.rs
index 46343241b..7dc87dacc 100644
--- a/tests/ui/traits/new-solver/normalizes_to_ignores_unnormalizable_candidate.rs
+++ b/tests/ui/traits/next-solver/normalizes_to_ignores_unnormalizable_candidate.rs
@@ -1,5 +1,5 @@
// [no_self_infer] check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// revisions: self_infer no_self_infer
// checks that the new solver is smart enough to infer `?0 = U` when solving:
@@ -7,7 +7,7 @@
// with `normalizes-to(<Vec<U> as Trait>::Assoc, u8)` in the paramenv even when
// there is a separate `Vec<T>: Trait` bound in the paramenv.
//
-// FIXME(-Ztrait-solver=next)
+// FIXME(-Znext-solver)
// This could also compile for `normalizes-to(<?0 as Trait>::Assoc, u8)` but
// we currently immediately consider a goal ambiguous if the self type is an
// inference variable.
diff --git a/tests/ui/traits/new-solver/normalizes_to_ignores_unnormalizable_candidate.self_infer.stderr b/tests/ui/traits/next-solver/normalizes_to_ignores_unnormalizable_candidate.self_infer.stderr
index f482e8cfa..c1a8b74df 100644
--- a/tests/ui/traits/new-solver/normalizes_to_ignores_unnormalizable_candidate.self_infer.stderr
+++ b/tests/ui/traits/next-solver/normalizes_to_ignores_unnormalizable_candidate.self_infer.stderr
@@ -17,6 +17,6 @@ help: consider specifying the generic argument
LL | foo::<T>(unconstrained())
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/traits/new-solver/object-soundness-requires-generalization.rs b/tests/ui/traits/next-solver/object-soundness-requires-generalization.rs
index d02dada72..6e709d9ae 100644
--- a/tests/ui/traits/new-solver/object-soundness-requires-generalization.rs
+++ b/tests/ui/traits/next-solver/object-soundness-requires-generalization.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// ignore-test
trait Trait {
diff --git a/tests/ui/traits/new-solver/object-unsafety.rs b/tests/ui/traits/next-solver/object-unsafety.rs
index da843c914..cfa53948b 100644
--- a/tests/ui/traits/new-solver/object-unsafety.rs
+++ b/tests/ui/traits/next-solver/object-unsafety.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
trait Setup {
type From: Copy;
@@ -13,11 +13,10 @@ pub fn copy_any<T>(t: &T) -> T {
//~^ ERROR the type `&<dyn Setup<From = T> as Setup>::From` is not well-formed
//~| ERROR the trait bound `dyn Setup<From = T>: Setup` is not satisfied
//~| ERROR mismatched types
- //~| ERROR mismatched types
//~| ERROR the type `<dyn Setup<From = T> as Setup>::From` is not well-formed
//~| ERROR the size for values of type `<dyn Setup<From = T> as Setup>::From` cannot be known at compilation time
- // FIXME(-Ztrait-solver=next): These error messages are horrible and some of them
+ // FIXME(-Znext-solver): These error messages are horrible and some of them
// are even simple fallout from previous error.
}
diff --git a/tests/ui/traits/new-solver/object-unsafety.stderr b/tests/ui/traits/next-solver/object-unsafety.stderr
index 914a8f9d4..ee38c256e 100644
--- a/tests/ui/traits/new-solver/object-unsafety.stderr
+++ b/tests/ui/traits/next-solver/object-unsafety.stderr
@@ -36,20 +36,6 @@ note: function defined here
LL | fn copy<U: Setup + ?Sized>(from: &U::From) -> U::From {
| ^^^^ --------------
-error[E0308]: mismatched types
- --> $DIR/object-unsafety.rs:12:5
- |
-LL | pub fn copy_any<T>(t: &T) -> T {
- | - - expected `T` because of return type
- | |
- | expected this type parameter
-LL | copy::<dyn Setup<From=T>>(t)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
- |
- = note: expected type parameter `T`
- found associated type `<dyn Setup<From = T> as Setup>::From`
- = note: you might be missing a type parameter or trait bound
-
error: the type `<dyn Setup<From = T> as Setup>::From` is not well-formed
--> $DIR/object-unsafety.rs:12:5
|
@@ -72,7 +58,7 @@ help: consider further restricting the associated type
LL | pub fn copy_any<T>(t: &T) -> T where <dyn Setup<From = T> as Setup>::From: Sized {
| +++++++++++++++++++++++++++++++++++++++++++++++++
-error: aborting due to 6 previous errors
+error: aborting due to 5 previous errors
Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/new-solver/opportunistic-region-resolve.rs b/tests/ui/traits/next-solver/opportunistic-region-resolve.rs
index 2610789cd..d852332d0 100644
--- a/tests/ui/traits/new-solver/opportunistic-region-resolve.rs
+++ b/tests/ui/traits/next-solver/opportunistic-region-resolve.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
#![feature(rustc_attrs)]
diff --git a/tests/ui/traits/new-solver/overflow/exponential-trait-goals.rs b/tests/ui/traits/next-solver/overflow/exponential-trait-goals.rs
index 3d2e70a63..a465bcecf 100644
--- a/tests/ui/traits/new-solver/overflow/exponential-trait-goals.rs
+++ b/tests/ui/traits/next-solver/overflow/exponential-trait-goals.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
trait Trait {}
diff --git a/tests/ui/traits/new-solver/overflow/exponential-trait-goals.stderr b/tests/ui/traits/next-solver/overflow/exponential-trait-goals.stderr
index 023efc41a..90b54b1e7 100644
--- a/tests/ui/traits/new-solver/overflow/exponential-trait-goals.stderr
+++ b/tests/ui/traits/next-solver/overflow/exponential-trait-goals.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `impls`
LL | fn impls<T: Trait>() {}
| ^^^^^ required by this bound in `impls`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/new-solver/overflow/global-cache.rs b/tests/ui/traits/next-solver/overflow/global-cache.rs
index adc03da04..fe4032ca6 100644
--- a/tests/ui/traits/new-solver/overflow/global-cache.rs
+++ b/tests/ui/traits/next-solver/overflow/global-cache.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Check that we consider the reached depth of global cache
// entries when detecting overflow. We would otherwise be unstable
diff --git a/tests/ui/traits/new-solver/overflow/global-cache.stderr b/tests/ui/traits/next-solver/overflow/global-cache.stderr
index ebb03d84b..676166193 100644
--- a/tests/ui/traits/new-solver/overflow/global-cache.stderr
+++ b/tests/ui/traits/next-solver/overflow/global-cache.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `impls_trait`
LL | fn impls_trait<T: Trait>() {}
| ^^^^^ required by this bound in `impls_trait`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs b/tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs
new file mode 100644
index 000000000..03ef93dc2
--- /dev/null
+++ b/tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs
@@ -0,0 +1,25 @@
+// compile-flags: -Znext-solver=coherence
+// check-pass
+
+// A regression test for trait-system-refactor-initiative#70.
+
+trait Trait {
+ type Assoc;
+}
+
+struct W<T: ?Sized>(*mut T);
+impl<T: ?Sized> Trait for W<W<T>>
+where
+ W<T>: Trait,
+{
+ type Assoc = ();
+}
+
+trait NoOverlap {}
+impl<T: Trait<Assoc = u32>> NoOverlap for T {}
+// `Projection(<W<_> as Trait>::Assoc, u32)` should result in error even
+// though applying the impl results in overflow. This is necessary to match
+// the behavior of the old solver.
+impl<T: ?Sized> NoOverlap for W<T> {}
+
+fn main() {}
diff --git a/tests/ui/traits/new-solver/overflow/recursion-limit-zero-issue-115351.rs b/tests/ui/traits/next-solver/overflow/recursion-limit-zero-issue-115351.rs
index 539c9614e..52a17a142 100644
--- a/tests/ui/traits/new-solver/overflow/recursion-limit-zero-issue-115351.rs
+++ b/tests/ui/traits/next-solver/overflow/recursion-limit-zero-issue-115351.rs
@@ -2,7 +2,7 @@
//~| ERROR overflow evaluating the requirement `Self: Trait`
// This is a non-regression test for issue #115351, where a recursion limit of 0 caused an ICE.
-// compile-flags: -Ztrait-solver=next --crate-type=lib
+// compile-flags: -Znext-solver --crate-type=lib
// check-fail
#![recursion_limit = "0"]
diff --git a/tests/ui/traits/new-solver/overflow/recursion-limit-zero-issue-115351.stderr b/tests/ui/traits/next-solver/overflow/recursion-limit-zero-issue-115351.stderr
index 16b25d90a..16b25d90a 100644
--- a/tests/ui/traits/new-solver/overflow/recursion-limit-zero-issue-115351.stderr
+++ b/tests/ui/traits/next-solver/overflow/recursion-limit-zero-issue-115351.stderr
diff --git a/tests/ui/traits/new-solver/overflow/recursive-self-normalization-2.rs b/tests/ui/traits/next-solver/overflow/recursive-self-normalization-2.rs
index d086db475..327ef865d 100644
--- a/tests/ui/traits/new-solver/overflow/recursive-self-normalization-2.rs
+++ b/tests/ui/traits/next-solver/overflow/recursive-self-normalization-2.rs
@@ -1,5 +1,4 @@
-//~ ERROR overflow
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
trait Foo1 {
type Assoc1;
@@ -15,6 +14,7 @@ fn needs_bar<S: Bar>() {}
fn test<T: Foo1<Assoc1 = <T as Foo2>::Assoc2> + Foo2<Assoc2 = <T as Foo1>::Assoc1>>() {
needs_bar::<T::Assoc1>();
//~^ ERROR overflow evaluating the requirement `<T as Foo1>::Assoc1: Bar`
+ //~| ERROR overflow evaluating the requirement `<T as Foo2>::Assoc2`
}
fn main() {}
diff --git a/tests/ui/traits/new-solver/overflow/recursive-self-normalization-2.stderr b/tests/ui/traits/next-solver/overflow/recursive-self-normalization-2.stderr
index 1dc63fae9..eda62b99c 100644
--- a/tests/ui/traits/new-solver/overflow/recursive-self-normalization-2.stderr
+++ b/tests/ui/traits/next-solver/overflow/recursive-self-normalization-2.stderr
@@ -1,17 +1,21 @@
error[E0275]: overflow evaluating the requirement `<T as Foo1>::Assoc1: Bar`
- --> $DIR/recursive-self-normalization-2.rs:16:17
+ --> $DIR/recursive-self-normalization-2.rs:15:17
|
LL | needs_bar::<T::Assoc1>();
| ^^^^^^^^^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`recursive_self_normalization_2`)
note: required by a bound in `needs_bar`
- --> $DIR/recursive-self-normalization-2.rs:13:17
+ --> $DIR/recursive-self-normalization-2.rs:12:17
|
LL | fn needs_bar<S: Bar>() {}
| ^^^ required by this bound in `needs_bar`
error[E0275]: overflow evaluating the requirement `<T as Foo2>::Assoc2`
+ --> $DIR/recursive-self-normalization-2.rs:15:5
+ |
+LL | needs_bar::<T::Assoc1>();
+ | ^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`recursive_self_normalization_2`)
diff --git a/tests/ui/traits/new-solver/overflow/recursive-self-normalization.rs b/tests/ui/traits/next-solver/overflow/recursive-self-normalization.rs
index d15df7dea..f45d208e6 100644
--- a/tests/ui/traits/new-solver/overflow/recursive-self-normalization.rs
+++ b/tests/ui/traits/next-solver/overflow/recursive-self-normalization.rs
@@ -1,5 +1,4 @@
-//~ ERROR overflow evaluating the requirement `<T as Foo>::Assoc` [E0275]
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
trait Foo {
type Assoc;
@@ -11,6 +10,7 @@ fn needs_bar<S: Bar>() {}
fn test<T: Foo<Assoc = <T as Foo>::Assoc>>() {
needs_bar::<T::Assoc>();
//~^ ERROR overflow evaluating the requirement `<T as Foo>::Assoc: Bar`
+ //~| ERROR overflow evaluating the requirement `<T as Foo>::Assoc` [E0275]
}
fn main() {}
diff --git a/tests/ui/traits/new-solver/overflow/recursive-self-normalization.stderr b/tests/ui/traits/next-solver/overflow/recursive-self-normalization.stderr
index afc5bfa54..b0a0a6976 100644
--- a/tests/ui/traits/new-solver/overflow/recursive-self-normalization.stderr
+++ b/tests/ui/traits/next-solver/overflow/recursive-self-normalization.stderr
@@ -1,17 +1,21 @@
error[E0275]: overflow evaluating the requirement `<T as Foo>::Assoc: Bar`
- --> $DIR/recursive-self-normalization.rs:12:17
+ --> $DIR/recursive-self-normalization.rs:11:17
|
LL | needs_bar::<T::Assoc>();
| ^^^^^^^^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`recursive_self_normalization`)
note: required by a bound in `needs_bar`
- --> $DIR/recursive-self-normalization.rs:9:17
+ --> $DIR/recursive-self-normalization.rs:8:17
|
LL | fn needs_bar<S: Bar>() {}
| ^^^ required by this bound in `needs_bar`
error[E0275]: overflow evaluating the requirement `<T as Foo>::Assoc`
+ --> $DIR/recursive-self-normalization.rs:11:5
+ |
+LL | needs_bar::<T::Assoc>();
+ | ^^^^^^^^^^^^^^^^^^^^^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`recursive_self_normalization`)
diff --git a/tests/ui/traits/new-solver/param-candidate-doesnt-shadow-project.rs b/tests/ui/traits/next-solver/param-candidate-doesnt-shadow-project.rs
index bdf999ec5..f67b073c5 100644
--- a/tests/ui/traits/new-solver/param-candidate-doesnt-shadow-project.rs
+++ b/tests/ui/traits/next-solver/param-candidate-doesnt-shadow-project.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Foo {
diff --git a/tests/ui/traits/new-solver/param-discr-kind.rs b/tests/ui/traits/next-solver/param-discr-kind.rs
index e319ddea1..c66b0b9f4 100644
--- a/tests/ui/traits/new-solver/param-discr-kind.rs
+++ b/tests/ui/traits/next-solver/param-discr-kind.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
fn foo<T>(x: T) {
diff --git a/tests/ui/traits/new-solver/pointee.rs b/tests/ui/traits/next-solver/pointee.rs
index 93c0542ac..a56df549a 100644
--- a/tests/ui/traits/new-solver/pointee.rs
+++ b/tests/ui/traits/next-solver/pointee.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
#![feature(ptr_metadata)]
diff --git a/tests/ui/traits/new-solver/pointer-like.rs b/tests/ui/traits/next-solver/pointer-like.rs
index 986301769..f6cc718c6 100644
--- a/tests/ui/traits/new-solver/pointer-like.rs
+++ b/tests/ui/traits/next-solver/pointer-like.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
#![feature(pointer_like_trait)]
diff --git a/tests/ui/traits/new-solver/pointer-like.stderr b/tests/ui/traits/next-solver/pointer-like.stderr
index 215a81cc2..4b624fd0d 100644
--- a/tests/ui/traits/new-solver/pointer-like.stderr
+++ b/tests/ui/traits/next-solver/pointer-like.stderr
@@ -19,6 +19,6 @@ LL | require_(&1u16);
LL | require_(&mut 1u16);
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/new-solver/prefer-candidate-no-constraints.rs b/tests/ui/traits/next-solver/prefer-candidate-no-constraints.rs
index 6f8164f3a..a47f819f1 100644
--- a/tests/ui/traits/new-solver/prefer-candidate-no-constraints.rs
+++ b/tests/ui/traits/next-solver/prefer-candidate-no-constraints.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Foo {}
diff --git a/tests/ui/traits/new-solver/prefer-param-env-on-ambiguity.rs b/tests/ui/traits/next-solver/prefer-param-env-on-ambiguity.rs
index 909b33ec3..f8c0223e1 100644
--- a/tests/ui/traits/new-solver/prefer-param-env-on-ambiguity.rs
+++ b/tests/ui/traits/next-solver/prefer-param-env-on-ambiguity.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
trait Foo<'a> {}
diff --git a/tests/ui/traits/new-solver/projection-discr-kind.rs b/tests/ui/traits/next-solver/projection-discr-kind.rs
index 20296b287..bf557f863 100644
--- a/tests/ui/traits/new-solver/projection-discr-kind.rs
+++ b/tests/ui/traits/next-solver/projection-discr-kind.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Check that `<T::Assoc as DiscriminantKind>::Discriminant` doesn't normalize
// to itself and cause overflow/ambiguity.
diff --git a/tests/ui/traits/new-solver/projection-discr-kind.stderr b/tests/ui/traits/next-solver/projection-discr-kind.stderr
index e14953f19..69999c755 100644
--- a/tests/ui/traits/new-solver/projection-discr-kind.stderr
+++ b/tests/ui/traits/next-solver/projection-discr-kind.stderr
@@ -17,6 +17,6 @@ note: required by a bound in `needs_bar`
LL | fn needs_bar(_: impl Bar) {}
| ^^^ required by this bound in `needs_bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/next-solver/projection/param-env-trait-candidate-1.rs b/tests/ui/traits/next-solver/projection/param-env-trait-candidate-1.rs
new file mode 100644
index 000000000..b337c0673
--- /dev/null
+++ b/tests/ui/traits/next-solver/projection/param-env-trait-candidate-1.rs
@@ -0,0 +1,14 @@
+// check-pass
+// compile-flags: -Znext-solver
+
+// See https://github.com/rust-lang/trait-system-refactor-initiative/issues/1
+// a minimization of a pattern in core.
+fn next<T: Iterator<Item = U>, U>(t: &mut T) -> Option<U> {
+ t.next()
+}
+
+fn foo<T: Iterator>(t: &mut T) {
+ let _: Option<T::Item> = next(t);
+}
+
+fn main() {}
diff --git a/tests/ui/traits/next-solver/projection/param-env-trait-candidate-2.rs b/tests/ui/traits/next-solver/projection/param-env-trait-candidate-2.rs
new file mode 100644
index 000000000..db8dc1eb9
--- /dev/null
+++ b/tests/ui/traits/next-solver/projection/param-env-trait-candidate-2.rs
@@ -0,0 +1,29 @@
+// check-pass
+// compile-flags: -Znext-solver
+
+// See https://github.com/rust-lang/trait-system-refactor-initiative/issues/1,
+// a minimization of a pattern in core.
+
+trait Iterator {
+ type Item;
+}
+
+struct Flatten<I>(I);
+
+impl<I, U> Iterator for Flatten<I>
+where
+ I: Iterator<Item = U>,
+{
+ type Item = U;
+}
+
+fn needs_iterator<I: Iterator>() {}
+
+fn environment<J>()
+where
+ J: Iterator,
+{
+ needs_iterator::<Flatten<J>>();
+}
+
+fn main() {}
diff --git a/tests/ui/traits/new-solver/slice-match-byte-lit.rs b/tests/ui/traits/next-solver/slice-match-byte-lit.rs
index 4f8480625..1edc9f1e8 100644
--- a/tests/ui/traits/new-solver/slice-match-byte-lit.rs
+++ b/tests/ui/traits/next-solver/slice-match-byte-lit.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
fn test(s: &[u8]) {
diff --git a/tests/ui/traits/new-solver/specialization-transmute.rs b/tests/ui/traits/next-solver/specialization-transmute.rs
index fac7d76f8..58b62f52d 100644
--- a/tests/ui/traits/new-solver/specialization-transmute.rs
+++ b/tests/ui/traits/next-solver/specialization-transmute.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
#![feature(specialization)]
//~^ WARN the feature `specialization` is incomplete
diff --git a/tests/ui/traits/new-solver/specialization-transmute.stderr b/tests/ui/traits/next-solver/specialization-transmute.stderr
index 18965a465..eaf32a475 100644
--- a/tests/ui/traits/new-solver/specialization-transmute.stderr
+++ b/tests/ui/traits/next-solver/specialization-transmute.stderr
@@ -8,13 +8,11 @@ LL | #![feature(specialization)]
= help: consider using `min_specialization` instead, which is more stable and complete
= note: `#[warn(incomplete_features)]` on by default
-error[E0284]: type annotations needed
+error[E0284]: type annotations needed: cannot satisfy `<T as Default>::Id normalizes-to _`
--> $DIR/specialization-transmute.rs:15:23
|
LL | fn intu(&self) -> &Self::Id {
- | ^^^^^^^^^ cannot infer type
- |
- = note: cannot satisfy `<T as Default>::Id == _`
+ | ^^^^^^^^^ cannot satisfy `<T as Default>::Id normalizes-to _`
error[E0282]: type annotations needed
--> $DIR/specialization-transmute.rs:13:23
diff --git a/tests/ui/traits/new-solver/specialization-unconstrained.rs b/tests/ui/traits/next-solver/specialization-unconstrained.rs
index 7fd753109..950fb1512 100644
--- a/tests/ui/traits/new-solver/specialization-unconstrained.rs
+++ b/tests/ui/traits/next-solver/specialization-unconstrained.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
#![feature(specialization)]
//~^ WARN the feature `specialization` is incomplete
diff --git a/tests/ui/traits/new-solver/specialization-unconstrained.stderr b/tests/ui/traits/next-solver/specialization-unconstrained.stderr
index ed4dafa14..ed4dafa14 100644
--- a/tests/ui/traits/new-solver/specialization-unconstrained.stderr
+++ b/tests/ui/traits/next-solver/specialization-unconstrained.stderr
diff --git a/tests/ui/traits/new-solver/stall-num-var-auto-trait.fallback.stderr b/tests/ui/traits/next-solver/stall-num-var-auto-trait.fallback.stderr
index a3ab7836c..2e3c22c8d 100644
--- a/tests/ui/traits/new-solver/stall-num-var-auto-trait.fallback.stderr
+++ b/tests/ui/traits/next-solver/stall-num-var-auto-trait.fallback.stderr
@@ -12,6 +12,6 @@ note: required by a bound in `needs_foo`
LL | fn needs_foo(x: impl Foo) {}
| ^^^ required by this bound in `needs_foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/new-solver/stall-num-var-auto-trait.rs b/tests/ui/traits/next-solver/stall-num-var-auto-trait.rs
index 0539c3a42..f5bf985cd 100644
--- a/tests/ui/traits/new-solver/stall-num-var-auto-trait.rs
+++ b/tests/ui/traits/next-solver/stall-num-var-auto-trait.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// revisions: fallback constrain
//[constrain] check-pass
diff --git a/tests/ui/traits/new-solver/structural-resolve-field.rs b/tests/ui/traits/next-solver/structural-resolve-field.rs
index 01899c9ad..b247e2375 100644
--- a/tests/ui/traits/new-solver/structural-resolve-field.rs
+++ b/tests/ui/traits/next-solver/structural-resolve-field.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
#[derive(Default)]
diff --git a/tests/ui/traits/new-solver/tait-eq-proj-2.rs b/tests/ui/traits/next-solver/tait-eq-proj-2.rs
index 77ea8bc24..a3df053dd 100644
--- a/tests/ui/traits/new-solver/tait-eq-proj-2.rs
+++ b/tests/ui/traits/next-solver/tait-eq-proj-2.rs
@@ -1,9 +1,9 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
#![feature(type_alias_impl_trait)]
-// Similar to tests/ui/traits/new-solver/tait-eq-proj.rs
+// Similar to tests/ui/traits/next-solver/tait-eq-proj.rs
// but check the alias-sub relation in the other direction.
type Tait = impl Iterator<Item = impl Sized>;
diff --git a/tests/ui/traits/new-solver/tait-eq-proj.rs b/tests/ui/traits/next-solver/tait-eq-proj.rs
index 01ef2ec95..871e8e1e9 100644
--- a/tests/ui/traits/new-solver/tait-eq-proj.rs
+++ b/tests/ui/traits/next-solver/tait-eq-proj.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
#![feature(type_alias_impl_trait)]
diff --git a/tests/ui/traits/new-solver/tait-eq-tait.rs b/tests/ui/traits/next-solver/tait-eq-tait.rs
index 70d9dc0ea..2629a124c 100644
--- a/tests/ui/traits/new-solver/tait-eq-tait.rs
+++ b/tests/ui/traits/next-solver/tait-eq-tait.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
// Not exactly sure if this is the inference behavior we *want*,
diff --git a/tests/ui/traits/new-solver/temporary-ambiguity.rs b/tests/ui/traits/next-solver/temporary-ambiguity.rs
index c6c11a1a1..6102de7e4 100644
--- a/tests/ui/traits/new-solver/temporary-ambiguity.rs
+++ b/tests/ui/traits/next-solver/temporary-ambiguity.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
// Checks that we don't explode when we assemble >1 candidate for a goal.
diff --git a/tests/ui/traits/new-solver/trait-upcast-lhs-needs-normalization.rs b/tests/ui/traits/next-solver/trait-upcast-lhs-needs-normalization.rs
index 43cd773bf..8e0378e94 100644
--- a/tests/ui/traits/new-solver/trait-upcast-lhs-needs-normalization.rs
+++ b/tests/ui/traits/next-solver/trait-upcast-lhs-needs-normalization.rs
@@ -1,6 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
-
+// compile-flags: -Znext-solver
#![feature(trait_upcasting)]
pub trait A {}
diff --git a/tests/ui/traits/new-solver/try-example.rs b/tests/ui/traits/next-solver/try-example.rs
index e826f3a00..92b0b5978 100644
--- a/tests/ui/traits/new-solver/try-example.rs
+++ b/tests/ui/traits/next-solver/try-example.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
use std::error::Error;
diff --git a/tests/ui/traits/new-solver/two-projection-param-candidates-are-ambiguous.rs b/tests/ui/traits/next-solver/two-projection-param-candidates-are-ambiguous.rs
index 3c7fc0d81..d25e372b5 100644
--- a/tests/ui/traits/new-solver/two-projection-param-candidates-are-ambiguous.rs
+++ b/tests/ui/traits/next-solver/two-projection-param-candidates-are-ambiguous.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// When we're solving `<T as Foo>::Assoc = i32`, we actually first solve
// `<T as Foo>::Assoc = ?1t`, then unify `?1t` with `i32`. That goal
diff --git a/tests/ui/traits/new-solver/two-projection-param-candidates-are-ambiguous.stderr b/tests/ui/traits/next-solver/two-projection-param-candidates-are-ambiguous.stderr
index b311ac6b5..dfff9f11b 100644
--- a/tests/ui/traits/new-solver/two-projection-param-candidates-are-ambiguous.stderr
+++ b/tests/ui/traits/next-solver/two-projection-param-candidates-are-ambiguous.stderr
@@ -12,6 +12,6 @@ note: required by a bound in `needs_bar`
LL | fn needs_bar<T: Bar>() {}
| ^^^ required by this bound in `needs_bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/traits/new-solver/unevaluated-const-impl-trait-ref.fails.stderr b/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.fails.stderr
index 072ac32a5..4be90c702 100644
--- a/tests/ui/traits/new-solver/unevaluated-const-impl-trait-ref.fails.stderr
+++ b/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.fails.stderr
@@ -13,6 +13,6 @@ note: required by a bound in `needs`
LL | fn needs<const N: usize>() where (): Trait<N> {}
| ^^^^^^^^ required by this bound in `needs`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/new-solver/unevaluated-const-impl-trait-ref.rs b/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.rs
index 26c595bc9..77a169d48 100644
--- a/tests/ui/traits/new-solver/unevaluated-const-impl-trait-ref.rs
+++ b/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// revisions: works fails
//[works] check-pass
diff --git a/tests/ui/traits/new-solver/unsafe-auto-trait-impl.rs b/tests/ui/traits/next-solver/unsafe-auto-trait-impl.rs
index bcfc747eb..f66bf0b87 100644
--- a/tests/ui/traits/new-solver/unsafe-auto-trait-impl.rs
+++ b/tests/ui/traits/next-solver/unsafe-auto-trait-impl.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
struct Foo(*mut ());
diff --git a/tests/ui/traits/new-solver/unsize-although-ambiguous.rs b/tests/ui/traits/next-solver/unsize-although-ambiguous.rs
index 431988a5f..8217701b9 100644
--- a/tests/ui/traits/new-solver/unsize-although-ambiguous.rs
+++ b/tests/ui/traits/next-solver/unsize-although-ambiguous.rs
@@ -1,5 +1,5 @@
// check-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
use std::fmt::Display;
diff --git a/tests/ui/traits/new-solver/unsize-good.rs b/tests/ui/traits/next-solver/unsize-good.rs
index 87ed9cfd1..04ebe66f2 100644
--- a/tests/ui/traits/new-solver/unsize-good.rs
+++ b/tests/ui/traits/next-solver/unsize-good.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
#![feature(unsized_tuple_coercion)]
diff --git a/tests/ui/traits/new-solver/upcast-right-substs.rs b/tests/ui/traits/next-solver/upcast-right-substs.rs
index c19c82acf..5b4f6d4be 100644
--- a/tests/ui/traits/new-solver/upcast-right-substs.rs
+++ b/tests/ui/traits/next-solver/upcast-right-substs.rs
@@ -1,6 +1,5 @@
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// check-pass
-
#![feature(trait_upcasting)]
trait Foo: Bar<i32> + Bar<u32> {}
diff --git a/tests/ui/traits/new-solver/upcast-wrong-substs.rs b/tests/ui/traits/next-solver/upcast-wrong-substs.rs
index f2d04d932..0cd253007 100644
--- a/tests/ui/traits/new-solver/upcast-wrong-substs.rs
+++ b/tests/ui/traits/next-solver/upcast-wrong-substs.rs
@@ -1,6 +1,4 @@
-// compile-flags: -Ztrait-solver=next
-
-#![feature(trait_upcasting)]
+// compile-flags: -Znext-solver
trait Foo: Bar<i32> + Bar<u32> {}
diff --git a/tests/ui/traits/new-solver/upcast-wrong-substs.stderr b/tests/ui/traits/next-solver/upcast-wrong-substs.stderr
index 8623f395f..00ba1ef67 100644
--- a/tests/ui/traits/new-solver/upcast-wrong-substs.stderr
+++ b/tests/ui/traits/next-solver/upcast-wrong-substs.stderr
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
- --> $DIR/upcast-wrong-substs.rs:11:30
+ --> $DIR/upcast-wrong-substs.rs:9:30
|
LL | let y: &dyn Bar<usize> = x;
| --------------- ^ expected trait `Bar`, found trait `Foo`
@@ -9,6 +9,6 @@ LL | let y: &dyn Bar<usize> = x;
= note: expected reference `&dyn Bar<usize>`
found reference `&dyn Foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/traits/new-solver/winnow-specializing-impls.rs b/tests/ui/traits/next-solver/winnow-specializing-impls.rs
index 06f64de74..d70a91596 100644
--- a/tests/ui/traits/new-solver/winnow-specializing-impls.rs
+++ b/tests/ui/traits/next-solver/winnow-specializing-impls.rs
@@ -1,5 +1,5 @@
// build-pass
-// compile-flags: -Ztrait-solver=next
+// compile-flags: -Znext-solver
// Tests that the specializing impl `<() as Foo>` holds during codegen.
diff --git a/tests/ui/traits/no-fallback-multiple-impls.stderr b/tests/ui/traits/no-fallback-multiple-impls.stderr
index 61c9e5aaa..e38c432ca 100644
--- a/tests/ui/traits/no-fallback-multiple-impls.stderr
+++ b/tests/ui/traits/no-fallback-multiple-impls.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find function `missing` in this scope
LL | missing();
| ^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/traits/no_send-struct.stderr b/tests/ui/traits/no_send-struct.stderr
index ee7bdf282..fb7f26bb7 100644
--- a/tests/ui/traits/no_send-struct.stderr
+++ b/tests/ui/traits/no_send-struct.stderr
@@ -13,6 +13,6 @@ note: required by a bound in `bar`
LL | fn bar<T: Send>(_: T) {}
| ^^^^ required by this bound in `bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/non-lifetime-via-dyn-builtin.rs b/tests/ui/traits/non-lifetime-via-dyn-builtin.rs
index 9a8a5ced2..996cd295d 100644
--- a/tests/ui/traits/non-lifetime-via-dyn-builtin.rs
+++ b/tests/ui/traits/non-lifetime-via-dyn-builtin.rs
@@ -1,5 +1,5 @@
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// check-pass
#![feature(non_lifetime_binders)]
diff --git a/tests/ui/traits/non_lifetime_binders/bad-copy-cond.stderr b/tests/ui/traits/non_lifetime_binders/bad-copy-cond.stderr
index 07e02d47f..d5f2bfef1 100644
--- a/tests/ui/traits/non_lifetime_binders/bad-copy-cond.stderr
+++ b/tests/ui/traits/non_lifetime_binders/bad-copy-cond.stderr
@@ -19,6 +19,6 @@ note: required by a bound in `foo`
LL | fn foo() where for<T> T: Copy {}
| ^^^^ required by this bound in `foo`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/non_lifetime_binders/capture-late-ct-in-anon.stderr b/tests/ui/traits/non_lifetime_binders/capture-late-ct-in-anon.stderr
index d65892ec6..4e0441c1c 100644
--- a/tests/ui/traits/non_lifetime_binders/capture-late-ct-in-anon.stderr
+++ b/tests/ui/traits/non_lifetime_binders/capture-late-ct-in-anon.stderr
@@ -15,5 +15,5 @@ LL | for<const C: usize> [(); C]: Copy,
| |
| parameter defined here
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/traits/non_lifetime_binders/drop-impl-pred.no.stderr b/tests/ui/traits/non_lifetime_binders/drop-impl-pred.no.stderr
index a985b1a6e..1f13207e3 100644
--- a/tests/ui/traits/non_lifetime_binders/drop-impl-pred.no.stderr
+++ b/tests/ui/traits/non_lifetime_binders/drop-impl-pred.no.stderr
@@ -19,6 +19,6 @@ note: the implementor must specify the same requirement
LL | struct Bar<T>(T) where T: Foo;
| ^^^^^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0367`.
diff --git a/tests/ui/traits/non_lifetime_binders/foreach-partial-eq.stderr b/tests/ui/traits/non_lifetime_binders/foreach-partial-eq.stderr
index da09343fb..8cf32c894 100644
--- a/tests/ui/traits/non_lifetime_binders/foreach-partial-eq.stderr
+++ b/tests/ui/traits/non_lifetime_binders/foreach-partial-eq.stderr
@@ -23,6 +23,6 @@ LL | where
LL | for<T> T: PartialEq + PartialOrd,
| ^^^^^^^^^^ required by this bound in `auto_trait`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.stderr b/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.stderr
index dc54e1acc..cc482887c 100644
--- a/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.stderr
+++ b/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.stderr
@@ -23,5 +23,5 @@ LL | for<T> [i32; { let _: T = todo!(); 0 }]:,
| |
| parameter defined here
-error: aborting due to previous error; 2 warnings emitted
+error: aborting due to 1 previous error; 2 warnings emitted
diff --git a/tests/ui/traits/non_lifetime_binders/missing-assoc-item.stderr b/tests/ui/traits/non_lifetime_binders/missing-assoc-item.stderr
index d98538642..eecf8e88f 100644
--- a/tests/ui/traits/non_lifetime_binders/missing-assoc-item.stderr
+++ b/tests/ui/traits/non_lifetime_binders/missing-assoc-item.stderr
@@ -18,6 +18,6 @@ help: if there were a trait named `Example` with associated type `Item` implemen
LL | for<B> <B as Example>::Item: Send,
| ~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0223`.
diff --git a/tests/ui/traits/non_lifetime_binders/nested-apit-mentioning-outer-bound-var.stderr b/tests/ui/traits/non_lifetime_binders/nested-apit-mentioning-outer-bound-var.stderr
index 1124076c2..830446915 100644
--- a/tests/ui/traits/non_lifetime_binders/nested-apit-mentioning-outer-bound-var.stderr
+++ b/tests/ui/traits/non_lifetime_binders/nested-apit-mentioning-outer-bound-var.stderr
@@ -13,5 +13,5 @@ error: `impl Trait` can only mention type parameters from an fn or impl
LL | fn uwu(_: impl for<T> Trait<(), Assoc = impl Trait<T>>) {}
| - type parameter declared here ^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/traits/non_lifetime_binders/on-dyn.stderr b/tests/ui/traits/non_lifetime_binders/on-dyn.stderr
index 95656f999..2d330f6b1 100644
--- a/tests/ui/traits/non_lifetime_binders/on-dyn.stderr
+++ b/tests/ui/traits/non_lifetime_binders/on-dyn.stderr
@@ -13,5 +13,5 @@ error: late-bound type parameter not allowed on trait object types
LL | fn foo() -> &'static dyn for<T> Test<T> {
| ^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/traits/non_lifetime_binders/on-ptr.stderr b/tests/ui/traits/non_lifetime_binders/on-ptr.stderr
index 3b17f7697..fbd723a1b 100644
--- a/tests/ui/traits/non_lifetime_binders/on-ptr.stderr
+++ b/tests/ui/traits/non_lifetime_binders/on-ptr.stderr
@@ -13,5 +13,5 @@ error: late-bound type parameter not allowed on function pointer types
LL | fn foo() -> for<T> fn(T) {
| ^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/traits/non_lifetime_binders/placeholders-dont-outlive-static.bad.stderr b/tests/ui/traits/non_lifetime_binders/placeholders-dont-outlive-static.bad.stderr
new file mode 100644
index 000000000..7dd383b1e
--- /dev/null
+++ b/tests/ui/traits/non_lifetime_binders/placeholders-dont-outlive-static.bad.stderr
@@ -0,0 +1,26 @@
+warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/placeholders-dont-outlive-static.rs:6:12
+ |
+LL | #![feature(non_lifetime_binders)]
+ | ^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
+ = note: `#[warn(incomplete_features)]` on by default
+
+error[E0310]: the placeholder type `!1_"T"` may not live long enough
+ --> $DIR/placeholders-dont-outlive-static.rs:13:5
+ |
+LL | foo();
+ | ^^^^^
+ | |
+ | the placeholder type `!1_"T"` must be valid for the static lifetime...
+ | ...so that the type `T` will meet its required lifetime bounds
+ |
+help: consider adding an explicit lifetime bound
+ |
+LL | fn bad() where !1_"T": 'static {
+ | +++++++++++++++++++++
+
+error: aborting due to 1 previous error; 1 warning emitted
+
+For more information about this error, try `rustc --explain E0310`.
diff --git a/tests/ui/traits/non_lifetime_binders/placeholders-dont-outlive-static.good.stderr b/tests/ui/traits/non_lifetime_binders/placeholders-dont-outlive-static.good.stderr
new file mode 100644
index 000000000..b4f00978a
--- /dev/null
+++ b/tests/ui/traits/non_lifetime_binders/placeholders-dont-outlive-static.good.stderr
@@ -0,0 +1,26 @@
+warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/placeholders-dont-outlive-static.rs:6:12
+ |
+LL | #![feature(non_lifetime_binders)]
+ | ^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
+ = note: `#[warn(incomplete_features)]` on by default
+
+error[E0310]: the placeholder type `!1_"T"` may not live long enough
+ --> $DIR/placeholders-dont-outlive-static.rs:19:5
+ |
+LL | foo();
+ | ^^^^^
+ | |
+ | the placeholder type `!1_"T"` must be valid for the static lifetime...
+ | ...so that the type `T` will meet its required lifetime bounds
+ |
+help: consider adding an explicit lifetime bound
+ |
+LL | fn good() where for<T> T: 'static, !1_"T": 'static {
+ | +++++++++++++++++
+
+error: aborting due to 1 previous error; 1 warning emitted
+
+For more information about this error, try `rustc --explain E0310`.
diff --git a/tests/ui/traits/non_lifetime_binders/placeholders-dont-outlive-static.rs b/tests/ui/traits/non_lifetime_binders/placeholders-dont-outlive-static.rs
new file mode 100644
index 000000000..ae6866511
--- /dev/null
+++ b/tests/ui/traits/non_lifetime_binders/placeholders-dont-outlive-static.rs
@@ -0,0 +1,22 @@
+// revisions: good bad
+
+//[good] known-bug: unknown
+// `for<T> T: 'static` doesn't imply itself when processing outlives obligations
+
+#![feature(non_lifetime_binders)]
+//[bad]~^ WARN the feature `non_lifetime_binders` is incomplete
+
+fn foo() where for<T> T: 'static {}
+
+#[cfg(bad)]
+fn bad() {
+ foo();
+ //[bad]~^ ERROR the placeholder type `!1_"T"` may not live long enough
+}
+
+#[cfg(good)]
+fn good() where for<T> T: 'static {
+ foo();
+}
+
+fn main() {}
diff --git a/tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.rs b/tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.rs
index 5ff7089b9..53957914e 100644
--- a/tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.rs
+++ b/tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.rs
@@ -1,10 +1,9 @@
// edition:2021
-// check-pass
+// known-bug: unknown
// Checks that test_type_match code doesn't ICE when predicates have late-bound types
#![feature(non_lifetime_binders)]
-//~^ WARN is incomplete and may not be safe to use
async fn walk2<'a, T: 'a>(_: T)
where
diff --git a/tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.stderr b/tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.stderr
index 3609bed28..3a4415ed2 100644
--- a/tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.stderr
+++ b/tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.stderr
@@ -7,5 +7,20 @@ LL | #![feature(non_lifetime_binders)]
= note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
= note: `#[warn(incomplete_features)]` on by default
-warning: 1 warning emitted
+error[E0309]: the placeholder type `!1_"F"` may not live long enough
+ --> $DIR/type-match-with-late-bound.rs:11:1
+ |
+LL | async fn walk2<'a, T: 'a>(_: T)
+ | -- the placeholder type `!1_"F"` must be valid for the lifetime `'a` as defined here...
+...
+LL | {}
+ | ^^ ...so that the type `F` will meet its required lifetime bounds
+ |
+help: consider adding an explicit lifetime bound
+ |
+LL | for<F> F: 'a, !1_"F": 'a
+ | ~~~~~~~~~~~~
+
+error: aborting due to 1 previous error; 1 warning emitted
+For more information about this error, try `rustc --explain E0309`.
diff --git a/tests/ui/traits/non_lifetime_binders/universe-error1.stderr b/tests/ui/traits/non_lifetime_binders/universe-error1.stderr
index bfcad72e3..ecc97e283 100644
--- a/tests/ui/traits/non_lifetime_binders/universe-error1.stderr
+++ b/tests/ui/traits/non_lifetime_binders/universe-error1.stderr
@@ -22,6 +22,6 @@ LL | where
LL | for<T> T: Other<U> {}
| ^^^^^^^^ required by this bound in `foo`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/not-suggest-non-existing-fully-qualified-path.stderr b/tests/ui/traits/not-suggest-non-existing-fully-qualified-path.stderr
index 86ae49b32..1d5489845 100644
--- a/tests/ui/traits/not-suggest-non-existing-fully-qualified-path.stderr
+++ b/tests/ui/traits/not-suggest-non-existing-fully-qualified-path.stderr
@@ -24,6 +24,6 @@ help: try using a fully qualified path to specify the expected types
LL | <A<B> as V<U>>::method(a);
| +++++++++++++++++++++++ ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/traits/object-does-not-impl-trait.stderr b/tests/ui/traits/object-does-not-impl-trait.stderr
index 81d67255a..1ae055851 100644
--- a/tests/ui/traits/object-does-not-impl-trait.stderr
+++ b/tests/ui/traits/object-does-not-impl-trait.stderr
@@ -17,6 +17,6 @@ note: required by a bound in `take_foo`
LL | fn take_foo<F:Foo>(f: F) {}
| ^^^ required by this bound in `take_foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/object/auto-dedup-in-impl.stderr b/tests/ui/traits/object/auto-dedup-in-impl.stderr
index 5f13c7813..075f3c338 100644
--- a/tests/ui/traits/object/auto-dedup-in-impl.stderr
+++ b/tests/ui/traits/object/auto-dedup-in-impl.stderr
@@ -7,6 +7,6 @@ LL | fn test(&self) { println!("one"); }
LL | fn test(&self) { println!("two"); }
| -------------- other definition for `test`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0592`.
diff --git a/tests/ui/traits/object/enforce-supertrait-projection.stderr b/tests/ui/traits/object/enforce-supertrait-projection.stderr
index 2fb94d348..198a185dd 100644
--- a/tests/ui/traits/object/enforce-supertrait-projection.stderr
+++ b/tests/ui/traits/object/enforce-supertrait-projection.stderr
@@ -21,6 +21,6 @@ LL | where
LL | T: Trait<B = B>,
| ^^^^^^^^^^^^ required by this bound in `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/traits/object/issue-44454-1.stderr b/tests/ui/traits/object/issue-44454-1.stderr
index 859487f50..e85b46769 100644
--- a/tests/ui/traits/object/issue-44454-1.stderr
+++ b/tests/ui/traits/object/issue-44454-1.stderr
@@ -6,5 +6,5 @@ LL | fn bar<'a>(_arg: &'a i32) {
LL | foo::<dyn Animal<&'a i32>, &'a i32>()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/traits/object/issue-44454-2.stderr b/tests/ui/traits/object/issue-44454-2.stderr
index 7f574769b..366b519ae 100644
--- a/tests/ui/traits/object/issue-44454-2.stderr
+++ b/tests/ui/traits/object/issue-44454-2.stderr
@@ -12,6 +12,6 @@ LL | hr::<DynTrait, _>(x)
| `x` escapes the function body here
| argument requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0521`.
diff --git a/tests/ui/traits/object/issue-44454-3.stderr b/tests/ui/traits/object/issue-44454-3.stderr
index 294684d26..5b1ebf2d1 100644
--- a/tests/ui/traits/object/issue-44454-3.stderr
+++ b/tests/ui/traits/object/issue-44454-3.stderr
@@ -7,5 +7,5 @@ LL | let x: <dyn Animal<&'a T> as Projector>::Foo = t;
LL | let any = generic::<dyn Animal<&'a T>, &'a T>(x);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/traits/object/object-unsafe-missing-assoc-type.stderr b/tests/ui/traits/object/object-unsafe-missing-assoc-type.stderr
index fcaa583e2..196e74d39 100644
--- a/tests/ui/traits/object/object-unsafe-missing-assoc-type.stderr
+++ b/tests/ui/traits/object/object-unsafe-missing-assoc-type.stderr
@@ -13,6 +13,6 @@ LL | type Bar<T>;
| ^^^ ...because it contains the generic associated type `Bar`
= help: consider moving `Bar` to another trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/traits/object/supertrait-lifetime-bound.stderr b/tests/ui/traits/object/supertrait-lifetime-bound.stderr
index ed2f86243..4fd7d2f0e 100644
--- a/tests/ui/traits/object/supertrait-lifetime-bound.stderr
+++ b/tests/ui/traits/object/supertrait-lifetime-bound.stderr
@@ -7,5 +7,5 @@ LL | fn test2<'a>() {
LL | test1::<dyn Bar<&'a u32>, _>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/traits/object/vs-lifetime-2.stderr b/tests/ui/traits/object/vs-lifetime-2.stderr
index 9b8e793df..9a2bb7d1c 100644
--- a/tests/ui/traits/object/vs-lifetime-2.stderr
+++ b/tests/ui/traits/object/vs-lifetime-2.stderr
@@ -4,6 +4,6 @@ error[E0224]: at least one trait is required for an object type
LL | dyn 'static +: 'static + Copy,
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0224`.
diff --git a/tests/ui/traits/overlap-not-permitted-for-builtin-trait.stderr b/tests/ui/traits/overlap-not-permitted-for-builtin-trait.stderr
index e24ed695d..d63362a7a 100644
--- a/tests/ui/traits/overlap-not-permitted-for-builtin-trait.stderr
+++ b/tests/ui/traits/overlap-not-permitted-for-builtin-trait.stderr
@@ -6,6 +6,6 @@ LL | impl !Send for MyStruct {}
LL | impl !Send for MyStruct {}
| ^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyStruct`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/traits/param-without-lifetime-constraint.stderr b/tests/ui/traits/param-without-lifetime-constraint.stderr
index b128b6518..b8ec1fa56 100644
--- a/tests/ui/traits/param-without-lifetime-constraint.stderr
+++ b/tests/ui/traits/param-without-lifetime-constraint.stderr
@@ -15,5 +15,5 @@ help: the lifetime requirements from the `impl` do not correspond to the require
LL | fn get_relation(&self) -> To;
| ^^ consider borrowing this type parameter in the trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/traits/project-modulo-regions.with_clause.stderr b/tests/ui/traits/project-modulo-regions.with_clause.stderr
index dcc98e855..0e3081ddf 100644
--- a/tests/ui/traits/project-modulo-regions.with_clause.stderr
+++ b/tests/ui/traits/project-modulo-regions.with_clause.stderr
@@ -7,5 +7,5 @@ LL | fn test(val: MyStruct) where Helper: HelperTrait {
LL | test(val);
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/traits/project-modulo-regions.without_clause.stderr b/tests/ui/traits/project-modulo-regions.without_clause.stderr
index e9959567e..830a07c4f 100644
--- a/tests/ui/traits/project-modulo-regions.without_clause.stderr
+++ b/tests/ui/traits/project-modulo-regions.without_clause.stderr
@@ -7,5 +7,5 @@ LL | fn test(val: MyStruct) where Helper: HelperTrait {
LL | test(val);
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/traits/question-mark-result-err-mismatch.rs b/tests/ui/traits/question-mark-result-err-mismatch.rs
new file mode 100644
index 000000000..0ca18b5b0
--- /dev/null
+++ b/tests/ui/traits/question-mark-result-err-mismatch.rs
@@ -0,0 +1,59 @@
+fn foo() -> Result<String, String> { //~ NOTE expected `String` because of this
+ let test = String::from("one,two");
+ let x = test
+ .split_whitespace()
+ .next()
+ .ok_or_else(|| {
+ "Couldn't split the test string"
+ });
+ let one = x
+ .map(|s| ())
+ .map_err(|e| { //~ NOTE this can't be annotated with `?` because it has type `Result<_, ()>`
+ e; //~ HELP remove this semicolon
+ })
+ .map(|()| "")?; //~ ERROR `?` couldn't convert the error to `String`
+ //~^ NOTE in this expansion of desugaring of operator `?`
+ //~| NOTE in this expansion of desugaring of operator `?`
+ //~| NOTE in this expansion of desugaring of operator `?`
+ //~| NOTE the trait `From<()>` is not implemented for `String`
+ //~| NOTE the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
+ //~| NOTE required for `Result<String, String>` to implement `FromResidual<Result<Infallible, ()>>`
+ Ok(one.to_string())
+}
+
+fn bar() -> Result<(), String> { //~ NOTE expected `String` because of this
+ let x = foo(); //~ NOTE this has type `Result<_, String>`
+ let one = x
+ .map(|s| ())
+ .map_err(|_| ())?; //~ ERROR `?` couldn't convert the error to `String`
+ //~^ NOTE in this expansion of desugaring of operator `?`
+ //~| NOTE in this expansion of desugaring of operator `?`
+ //~| NOTE in this expansion of desugaring of operator `?`
+ //~| NOTE in this expansion of desugaring of operator `?`
+ //~| NOTE this can't be annotated with `?` because it has type `Result<_, ()>`
+ //~| NOTE the trait `From<()>` is not implemented for `String`
+ //~| NOTE the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
+ //~| NOTE required for `Result<(), String>` to implement `FromResidual<Result<Infallible, ()>>`
+ //~| HELP the following other types implement trait `From<T>`:
+ Ok(one)
+}
+
+fn baz() -> Result<String, String> { //~ NOTE expected `String` because of this
+ let test = String::from("one,two");
+ let one = test
+ .split_whitespace()
+ .next()
+ .ok_or_else(|| { //~ NOTE this can't be annotated with `?` because it has type `Result<_, ()>`
+ "Couldn't split the test string"; //~ HELP remove this semicolon
+ })?;
+ //~^ ERROR `?` couldn't convert the error to `String`
+ //~| NOTE in this expansion of desugaring of operator `?`
+ //~| NOTE in this expansion of desugaring of operator `?`
+ //~| NOTE in this expansion of desugaring of operator `?`
+ //~| NOTE the trait `From<()>` is not implemented for `String`
+ //~| NOTE the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
+ //~| NOTE required for `Result<String, String>` to implement `FromResidual<Result<Infallible, ()>>`
+ Ok(one.to_string())
+}
+
+fn main() {}
diff --git a/tests/ui/traits/question-mark-result-err-mismatch.stderr b/tests/ui/traits/question-mark-result-err-mismatch.stderr
new file mode 100644
index 000000000..3059e0bec
--- /dev/null
+++ b/tests/ui/traits/question-mark-result-err-mismatch.stderr
@@ -0,0 +1,62 @@
+error[E0277]: `?` couldn't convert the error to `String`
+ --> $DIR/question-mark-result-err-mismatch.rs:14:22
+ |
+LL | fn foo() -> Result<String, String> {
+ | ---------------------- expected `String` because of this
+...
+LL | .map_err(|e| {
+ | __________-
+LL | | e;
+ | | - help: remove this semicolon
+LL | | })
+ | |__________- this can't be annotated with `?` because it has type `Result<_, ()>`
+LL | .map(|()| "")?;
+ | ^ the trait `From<()>` is not implemented for `String`
+ |
+ = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
+ = note: required for `Result<String, String>` to implement `FromResidual<Result<Infallible, ()>>`
+
+error[E0277]: `?` couldn't convert the error to `String`
+ --> $DIR/question-mark-result-err-mismatch.rs:28:25
+ |
+LL | fn bar() -> Result<(), String> {
+ | ------------------ expected `String` because of this
+LL | let x = foo();
+ | ----- this has type `Result<_, String>`
+...
+LL | .map_err(|_| ())?;
+ | ---------------^ the trait `From<()>` is not implemented for `String`
+ | |
+ | this can't be annotated with `?` because it has type `Result<_, ()>`
+ |
+ = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
+ = help: the following other types implement trait `From<T>`:
+ <String as From<char>>
+ <String as From<Box<str>>>
+ <String as From<Cow<'a, str>>>
+ <String as From<&str>>
+ <String as From<&mut str>>
+ <String as From<&String>>
+ = note: required for `Result<(), String>` to implement `FromResidual<Result<Infallible, ()>>`
+
+error[E0277]: `?` couldn't convert the error to `String`
+ --> $DIR/question-mark-result-err-mismatch.rs:48:11
+ |
+LL | fn baz() -> Result<String, String> {
+ | ---------------------- expected `String` because of this
+...
+LL | .ok_or_else(|| {
+ | __________-
+LL | | "Couldn't split the test string";
+ | | - help: remove this semicolon
+LL | | })?;
+ | | -^ the trait `From<()>` is not implemented for `String`
+ | |__________|
+ | this can't be annotated with `?` because it has type `Result<_, ()>`
+ |
+ = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
+ = note: required for `Result<String, String>` to implement `FromResidual<Result<Infallible, ()>>`
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/reservation-impl/coherence-conflict.next.stderr b/tests/ui/traits/reservation-impl/coherence-conflict.next.stderr
index e5a3c3f5c..2b5277f93 100644
--- a/tests/ui/traits/reservation-impl/coherence-conflict.next.stderr
+++ b/tests/ui/traits/reservation-impl/coherence-conflict.next.stderr
@@ -5,7 +5,9 @@ LL | impl OtherTrait for () {}
| ---------------------- first implementation here
LL | impl<T: MyTrait> OtherTrait for T {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `()`
+ |
+ = note: this impl is reserved
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/traits/reservation-impl/coherence-conflict.old.stderr b/tests/ui/traits/reservation-impl/coherence-conflict.old.stderr
index 393350ea3..2b5277f93 100644
--- a/tests/ui/traits/reservation-impl/coherence-conflict.old.stderr
+++ b/tests/ui/traits/reservation-impl/coherence-conflict.old.stderr
@@ -8,6 +8,6 @@ LL | impl<T: MyTrait> OtherTrait for T {}
|
= note: this impl is reserved
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/traits/reservation-impl/coherence-conflict.rs b/tests/ui/traits/reservation-impl/coherence-conflict.rs
index 6bbd90f94..cdea162d6 100644
--- a/tests/ui/traits/reservation-impl/coherence-conflict.rs
+++ b/tests/ui/traits/reservation-impl/coherence-conflict.rs
@@ -1,6 +1,6 @@
// check that reservation impls are accounted for in negative reasoning.
// revisions: old next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
#![feature(rustc_attrs)]
trait MyTrait {}
diff --git a/tests/ui/traits/reservation-impl/no-use.next.stderr b/tests/ui/traits/reservation-impl/no-use.next.stderr
index 632f0f816..aa7b51dc5 100644
--- a/tests/ui/traits/reservation-impl/no-use.next.stderr
+++ b/tests/ui/traits/reservation-impl/no-use.next.stderr
@@ -6,6 +6,6 @@ LL | <() as MyTrait>::foo(&());
|
= help: the trait `MyTrait` is implemented for `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/reservation-impl/no-use.old.stderr b/tests/ui/traits/reservation-impl/no-use.old.stderr
index 632f0f816..aa7b51dc5 100644
--- a/tests/ui/traits/reservation-impl/no-use.old.stderr
+++ b/tests/ui/traits/reservation-impl/no-use.old.stderr
@@ -6,6 +6,6 @@ LL | <() as MyTrait>::foo(&());
|
= help: the trait `MyTrait` is implemented for `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/reservation-impl/no-use.rs b/tests/ui/traits/reservation-impl/no-use.rs
index 864f1791f..10aad3605 100644
--- a/tests/ui/traits/reservation-impl/no-use.rs
+++ b/tests/ui/traits/reservation-impl/no-use.rs
@@ -1,6 +1,6 @@
// check that reservation impls can't be used as normal impls in positive reasoning.
// revisions: old next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
#![feature(rustc_attrs)]
trait MyTrait { fn foo(&self); }
diff --git a/tests/ui/traits/reservation-impl/non-lattice-ok.rs b/tests/ui/traits/reservation-impl/non-lattice-ok.rs
index 7787904d9..9a3c2b4f9 100644
--- a/tests/ui/traits/reservation-impl/non-lattice-ok.rs
+++ b/tests/ui/traits/reservation-impl/non-lattice-ok.rs
@@ -34,7 +34,7 @@
// check that reservation impls can't be used as normal impls in positive reasoning.
// revisions: old next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
#![feature(rustc_attrs, never_type)]
diff --git a/tests/ui/traits/reservation-impl/ok.rs b/tests/ui/traits/reservation-impl/ok.rs
index 8ff6645a2..2d945f6ad 100644
--- a/tests/ui/traits/reservation-impl/ok.rs
+++ b/tests/ui/traits/reservation-impl/ok.rs
@@ -4,7 +4,7 @@
// but still.
// revisions: old next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
#![feature(rustc_attrs)]
diff --git a/tests/ui/traits/resolution-in-overloaded-op.stderr b/tests/ui/traits/resolution-in-overloaded-op.stderr
index fe5e1d6d2..2f5408beb 100644
--- a/tests/ui/traits/resolution-in-overloaded-op.stderr
+++ b/tests/ui/traits/resolution-in-overloaded-op.stderr
@@ -11,6 +11,6 @@ help: consider introducing a `where` clause, but there might be an alternative b
LL | fn foo<T: MyMul<f64, f64>>(a: &T, b: f64) -> f64 where &T: Mul<f64, Output = f64> {
| ++++++++++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/traits/safety-fn-body.mir.stderr b/tests/ui/traits/safety-fn-body.mir.stderr
index ea7b2048e..9a04f3e7d 100644
--- a/tests/ui/traits/safety-fn-body.mir.stderr
+++ b/tests/ui/traits/safety-fn-body.mir.stderr
@@ -6,6 +6,6 @@ LL | *self += 1;
|
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/traits/safety-fn-body.thir.stderr b/tests/ui/traits/safety-fn-body.thir.stderr
index 23696c32b..5d4626c16 100644
--- a/tests/ui/traits/safety-fn-body.thir.stderr
+++ b/tests/ui/traits/safety-fn-body.thir.stderr
@@ -6,6 +6,6 @@ LL | *self += 1;
|
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/traits/safety-inherent-impl.stderr b/tests/ui/traits/safety-inherent-impl.stderr
index 1c8f43fec..2513fef90 100644
--- a/tests/ui/traits/safety-inherent-impl.stderr
+++ b/tests/ui/traits/safety-inherent-impl.stderr
@@ -6,6 +6,6 @@ LL | unsafe impl SomeStruct {
| |
| unsafe because of this
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0197`.
diff --git a/tests/ui/traits/safety-trait-impl-cc.stderr b/tests/ui/traits/safety-trait-impl-cc.stderr
index 0ca565787..f530e5a76 100644
--- a/tests/ui/traits/safety-trait-impl-cc.stderr
+++ b/tests/ui/traits/safety-trait-impl-cc.stderr
@@ -10,6 +10,6 @@ help: add `unsafe` to this trait implementation
LL | unsafe impl lib::Foo for Bar {
| ++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0200`.
diff --git a/tests/ui/traits/self-without-lifetime-constraint.stderr b/tests/ui/traits/self-without-lifetime-constraint.stderr
index 05a49820a..0a5ae8a02 100644
--- a/tests/ui/traits/self-without-lifetime-constraint.stderr
+++ b/tests/ui/traits/self-without-lifetime-constraint.stderr
@@ -15,5 +15,5 @@ help: the lifetime requirements from the `impl` do not correspond to the require
LL | fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self, &Self>;
| ^^^^ consider borrowing this type parameter in the trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/traits/solver-cycles/cycle-via-builtin-auto-trait-impl.stderr b/tests/ui/traits/solver-cycles/cycle-via-builtin-auto-trait-impl.stderr
index 8f9ce3ef1..2ab150fc0 100644
--- a/tests/ui/traits/solver-cycles/cycle-via-builtin-auto-trait-impl.stderr
+++ b/tests/ui/traits/solver-cycles/cycle-via-builtin-auto-trait-impl.stderr
@@ -19,6 +19,6 @@ note: required because it appears within the type `Runtime<RootDatabase>`
LL | struct Runtime<DB: Database> {
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/static-method-generic-inference.stderr b/tests/ui/traits/static-method-generic-inference.stderr
index 575ace237..44c7c0998 100644
--- a/tests/ui/traits/static-method-generic-inference.stderr
+++ b/tests/ui/traits/static-method-generic-inference.stderr
@@ -12,6 +12,6 @@ help: use the fully-qualified path to the only available implementation
LL | let _f: base::Foo = <Foo as base::HasNew>::new();
| +++++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0790`.
diff --git a/tests/ui/traits/staticness-mismatch.stderr b/tests/ui/traits/staticness-mismatch.stderr
index b67ac5adb..3546cb705 100644
--- a/tests/ui/traits/staticness-mismatch.stderr
+++ b/tests/ui/traits/staticness-mismatch.stderr
@@ -7,6 +7,6 @@ LL | fn bar();
LL | fn bar(&self) {}
| ^^^^^^^^^^^^^ `&self` used in impl
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0185`.
diff --git a/tests/ui/traits/subtype-recursion-limit.rs b/tests/ui/traits/subtype-recursion-limit.rs
new file mode 100644
index 000000000..580474884
--- /dev/null
+++ b/tests/ui/traits/subtype-recursion-limit.rs
@@ -0,0 +1,17 @@
+// Variant of #117151 when the overflow comes entirely from subtype predicates.
+
+#![allow(unreachable_code)]
+
+use std::ptr;
+
+fn main() {
+ // Give x and y completely unconstrained types. Using a function call
+ // or `as` cast would create a well-formed predicate.
+ let x = return;
+ let y = return;
+ let mut w = (x, y);
+ //~^ ERROR overflow evaluating the requirement
+ // Avoid creating lifetimes, `Sized` bounds or function calls.
+ let a = (ptr::addr_of!(y), ptr::addr_of!(x));
+ w = a;
+}
diff --git a/tests/ui/traits/subtype-recursion-limit.stderr b/tests/ui/traits/subtype-recursion-limit.stderr
new file mode 100644
index 000000000..5310f822c
--- /dev/null
+++ b/tests/ui/traits/subtype-recursion-limit.stderr
@@ -0,0 +1,9 @@
+error[E0275]: overflow evaluating the requirement `_ <: *const _`
+ --> $DIR/subtype-recursion-limit.rs:12:17
+ |
+LL | let mut w = (x, y);
+ | ^^^^^^
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/suggest-dereferences/dont-suggest-unsize-deref.stderr b/tests/ui/traits/suggest-dereferences/dont-suggest-unsize-deref.stderr
index bd0e7ca2c..8024ad28d 100644
--- a/tests/ui/traits/suggest-dereferences/dont-suggest-unsize-deref.stderr
+++ b/tests/ui/traits/suggest-dereferences/dont-suggest-unsize-deref.stderr
@@ -17,6 +17,6 @@ LL | where
LL | I: IntoIterator<Item = i32>,
| ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `use_iterator`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/suggest-dereferences/issue-39029.stderr b/tests/ui/traits/suggest-dereferences/issue-39029.stderr
index 49105de3d..fd45fa3cf 100644
--- a/tests/ui/traits/suggest-dereferences/issue-39029.stderr
+++ b/tests/ui/traits/suggest-dereferences/issue-39029.stderr
@@ -14,6 +14,6 @@ help: consider dereferencing here
LL | let _errors = TcpListener::bind(&*bad);
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/suggest-dereferences/issue-62530.stderr b/tests/ui/traits/suggest-dereferences/issue-62530.stderr
index e47ae0b65..22b001c80 100644
--- a/tests/ui/traits/suggest-dereferences/issue-62530.stderr
+++ b/tests/ui/traits/suggest-dereferences/issue-62530.stderr
@@ -16,6 +16,6 @@ help: consider dereferencing here
LL | takes_type_parameter(&*string); // Error
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/suggest-dereferences/multiple-0.stderr b/tests/ui/traits/suggest-dereferences/multiple-0.stderr
index 6a4d4b8d5..691b4ddc8 100644
--- a/tests/ui/traits/suggest-dereferences/multiple-0.stderr
+++ b/tests/ui/traits/suggest-dereferences/multiple-0.stderr
@@ -16,6 +16,6 @@ help: consider dereferencing here
LL | foo(&***baz);
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/suggest-dereferences/multiple-1.stderr b/tests/ui/traits/suggest-dereferences/multiple-1.stderr
index 6e12321c2..2517cc6a0 100644
--- a/tests/ui/traits/suggest-dereferences/multiple-1.stderr
+++ b/tests/ui/traits/suggest-dereferences/multiple-1.stderr
@@ -13,6 +13,6 @@ note: required by a bound in `foo`
LL | fn foo<T>(_: T) where T: Happy {}
| ^^^^^ required by this bound in `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/suggest-dereferences/root-obligation.stderr b/tests/ui/traits/suggest-dereferences/root-obligation.stderr
index a19708e46..62500866c 100644
--- a/tests/ui/traits/suggest-dereferences/root-obligation.stderr
+++ b/tests/ui/traits/suggest-dereferences/root-obligation.stderr
@@ -16,6 +16,6 @@ help: consider dereferencing here
LL | .filter(|c| "aeiou".contains(*c))
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.stderr b/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.stderr
index ede31a2c7..d6033bc6b 100644
--- a/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.stderr
+++ b/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.stderr
@@ -10,6 +10,6 @@ help: consider dereferencing here
LL | let _b: TargetStruct = (*a).into();
| ++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/suggest-fully-qualified-closure.stderr b/tests/ui/traits/suggest-fully-qualified-closure.stderr
index 43cef7027..e077bd7ac 100644
--- a/tests/ui/traits/suggest-fully-qualified-closure.stderr
+++ b/tests/ui/traits/suggest-fully-qualified-closure.stderr
@@ -17,6 +17,6 @@ help: try using a fully qualified path to specify the expected types
LL | <Qqq as MyTrait<T>>::lol::<{closure@}>(&q, ||());
| +++ ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/traits/test.stderr b/tests/ui/traits/test.stderr
index 668228abe..af005db58 100644
--- a/tests/ui/traits/test.stderr
+++ b/tests/ui/traits/test.stderr
@@ -4,6 +4,6 @@ error[E0404]: expected trait, found builtin type `isize`
LL | impl isize for usize { fn foo(&self) {} }
| ^^^^^ not a trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0404`.
diff --git a/tests/ui/traits/trait-object-lifetime-default-note.rs b/tests/ui/traits/trait-object-lifetime-default-note.rs
new file mode 100644
index 000000000..31e3eb4ba
--- /dev/null
+++ b/tests/ui/traits/trait-object-lifetime-default-note.rs
@@ -0,0 +1,16 @@
+trait A {}
+
+impl<T> A for T {}
+
+fn main() {
+ let local = 0; //~ NOTE binding `local` declared here
+ let r = &local; //~ ERROR `local` does not live long enough
+ //~| NOTE borrowed value does not live long enough
+ //~| NOTE due to object lifetime defaults, `Box<dyn A>` actually means `Box<(dyn A + 'static)>`
+ require_box(Box::new(r));
+ //~^ NOTE cast requires that `local` is borrowed for `'static`
+
+ let _ = 0;
+} //~ NOTE `local` dropped here while still borrowed
+
+fn require_box(_a: Box<dyn A>) {}
diff --git a/tests/ui/traits/trait-object-lifetime-default-note.stderr b/tests/ui/traits/trait-object-lifetime-default-note.stderr
new file mode 100644
index 000000000..4244e3487
--- /dev/null
+++ b/tests/ui/traits/trait-object-lifetime-default-note.stderr
@@ -0,0 +1,19 @@
+error[E0597]: `local` does not live long enough
+ --> $DIR/trait-object-lifetime-default-note.rs:7:13
+ |
+LL | let local = 0;
+ | ----- binding `local` declared here
+LL | let r = &local;
+ | ^^^^^^ borrowed value does not live long enough
+...
+LL | require_box(Box::new(r));
+ | ----------- cast requires that `local` is borrowed for `'static`
+...
+LL | }
+ | - `local` dropped here while still borrowed
+ |
+ = note: due to object lifetime defaults, `Box<dyn A>` actually means `Box<(dyn A + 'static)>`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/traits/trait-or-new-type-instead.stderr b/tests/ui/traits/trait-or-new-type-instead.stderr
index 6fd8a03fd..17ee93988 100644
--- a/tests/ui/traits/trait-or-new-type-instead.stderr
+++ b/tests/ui/traits/trait-or-new-type-instead.stderr
@@ -6,6 +6,6 @@ LL | impl<T> Option<T> {
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0116`.
diff --git a/tests/ui/traits/trait-upcasting/alias-where-clause-isnt-supertrait.stderr b/tests/ui/traits/trait-upcasting/alias-where-clause-isnt-supertrait.stderr
index 5574a0320..99c82b88d 100644
--- a/tests/ui/traits/trait-upcasting/alias-where-clause-isnt-supertrait.stderr
+++ b/tests/ui/traits/trait-upcasting/alias-where-clause-isnt-supertrait.stderr
@@ -9,6 +9,6 @@ LL | x
= note: expected reference `&dyn B`
found reference `&dyn C`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr b/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr
index 62c732fb1..85c05bd05 100644
--- a/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr
+++ b/tests/ui/traits/trait-upcasting/cyclic-trait-resolution.stderr
@@ -12,6 +12,6 @@ LL | trait A: B + A {}
| ^^^^^^^^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/traits/trait-upcasting/deref-upcast-behavioral-change.rs b/tests/ui/traits/trait-upcasting/deref-upcast-behavioral-change.rs
new file mode 100644
index 000000000..e4784fa41
--- /dev/null
+++ b/tests/ui/traits/trait-upcasting/deref-upcast-behavioral-change.rs
@@ -0,0 +1,35 @@
+#![deny(deref_into_dyn_supertrait)]
+use std::ops::Deref;
+
+trait Bar<T> {}
+impl<T, U> Bar<U> for T {}
+
+trait Foo: Bar<i32> {
+ fn as_dyn_bar_u32<'a>(&self) -> &(dyn Bar<u32> + 'a);
+}
+
+impl Foo for () {
+ fn as_dyn_bar_u32<'a>(&self) -> &(dyn Bar<u32> + 'a) {
+ self
+ }
+}
+
+impl<'a> Deref for dyn Foo + 'a {
+ //~^ ERROR this `Deref` implementation is covered by an implicit supertrait coercion
+ //~| WARN this will change its meaning in a future release!
+ type Target = dyn Bar<u32> + 'a;
+
+ fn deref(&self) -> &Self::Target {
+ self.as_dyn_bar_u32()
+ }
+}
+
+fn take_dyn<T>(x: &dyn Bar<T>) -> T {
+ todo!()
+}
+
+fn main() {
+ let x: &dyn Foo = &();
+ let y = take_dyn(x);
+ let z: u32 = y;
+}
diff --git a/tests/ui/traits/trait-upcasting/deref-upcast-behavioral-change.stderr b/tests/ui/traits/trait-upcasting/deref-upcast-behavioral-change.stderr
new file mode 100644
index 000000000..fa93e28c7
--- /dev/null
+++ b/tests/ui/traits/trait-upcasting/deref-upcast-behavioral-change.stderr
@@ -0,0 +1,19 @@
+error: this `Deref` implementation is covered by an implicit supertrait coercion
+ --> $DIR/deref-upcast-behavioral-change.rs:17:1
+ |
+LL | impl<'a> Deref for dyn Foo + 'a {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Foo` implements `Deref<Target = dyn Bar<u32>>` which conflicts with supertrait `Bar<i32>`
+...
+LL | type Target = dyn Bar<u32> + 'a;
+ | -------------------------------- target type is a supertrait of `dyn Foo`
+ |
+ = warning: this will change its meaning in a future release!
+ = note: for more information, see issue #89460 <https://github.com/rust-lang/rust/issues/89460>
+note: the lint level is defined here
+ --> $DIR/deref-upcast-behavioral-change.rs:1:9
+ |
+LL | #![deny(deref_into_dyn_supertrait)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/traits/trait-upcasting/fewer-associated.rs b/tests/ui/traits/trait-upcasting/fewer-associated.rs
index 8228eea26..58e72d9d7 100644
--- a/tests/ui/traits/trait-upcasting/fewer-associated.rs
+++ b/tests/ui/traits/trait-upcasting/fewer-associated.rs
@@ -1,7 +1,7 @@
// check-pass
// issue: 114035
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
#![feature(trait_upcasting)]
diff --git a/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.current.stderr b/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.current.stderr
index 59c9d5737..1538e2f3f 100644
--- a/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.current.stderr
+++ b/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.current.stderr
@@ -9,6 +9,6 @@ LL | fn illegal(x: &dyn Sub<Assoc = ()>) -> &dyn Super<Assoc = i32> { x }
= note: expected reference `&dyn Super<Assoc = i32>`
found reference `&dyn Sub<Assoc = ()>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.next.stderr b/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.next.stderr
index 59c9d5737..1538e2f3f 100644
--- a/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.next.stderr
+++ b/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.next.stderr
@@ -9,6 +9,6 @@ LL | fn illegal(x: &dyn Sub<Assoc = ()>) -> &dyn Super<Assoc = i32> { x }
= note: expected reference `&dyn Super<Assoc = i32>`
found reference `&dyn Sub<Assoc = ()>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.rs b/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.rs
index 774474281..ffed8beb4 100644
--- a/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.rs
+++ b/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.rs
@@ -1,5 +1,5 @@
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
#![feature(trait_upcasting)]
diff --git a/tests/ui/traits/trait-upcasting/inference-behavior-change-deref.rs b/tests/ui/traits/trait-upcasting/inference-behavior-change-deref.rs
new file mode 100644
index 000000000..79fb643ea
--- /dev/null
+++ b/tests/ui/traits/trait-upcasting/inference-behavior-change-deref.rs
@@ -0,0 +1,36 @@
+#![deny(deref_into_dyn_supertrait)]
+#![feature(trait_upcasting)] // remove this and the test compiles
+
+use std::ops::Deref;
+
+trait Bar<T> {}
+impl<T, U> Bar<U> for T {}
+
+trait Foo: Bar<i32> {
+ fn as_dyn_bar_u32<'a>(&self) -> &(dyn Bar<u32> + 'a);
+}
+
+impl Foo for () {
+ fn as_dyn_bar_u32<'a>(&self) -> &(dyn Bar<u32> + 'a) {
+ self
+ }
+}
+
+impl<'a> Deref for dyn Foo + 'a {
+ type Target = dyn Bar<u32> + 'a;
+
+ fn deref(&self) -> &Self::Target {
+ self.as_dyn_bar_u32()
+ }
+}
+
+fn take_dyn<T>(x: &dyn Bar<T>) -> T {
+ todo!()
+}
+
+fn main() {
+ let x: &dyn Foo = &();
+ let y = take_dyn(x);
+ let z: u32 = y;
+ //~^ ERROR mismatched types
+}
diff --git a/tests/ui/traits/trait-upcasting/inference-behavior-change-deref.stderr b/tests/ui/traits/trait-upcasting/inference-behavior-change-deref.stderr
new file mode 100644
index 000000000..6b6a26d15
--- /dev/null
+++ b/tests/ui/traits/trait-upcasting/inference-behavior-change-deref.stderr
@@ -0,0 +1,16 @@
+error[E0308]: mismatched types
+ --> $DIR/inference-behavior-change-deref.rs:34:18
+ |
+LL | let z: u32 = y;
+ | --- ^ expected `u32`, found `i32`
+ | |
+ | expected due to this
+ |
+help: you can convert an `i32` to a `u32` and panic if the converted value doesn't fit
+ |
+LL | let z: u32 = y.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/traits/trait-upcasting/issue-11515.current.stderr b/tests/ui/traits/trait-upcasting/issue-11515.current.stderr
index 97d66cccb..da7ac4cc0 100644
--- a/tests/ui/traits/trait-upcasting/issue-11515.current.stderr
+++ b/tests/ui/traits/trait-upcasting/issue-11515.current.stderr
@@ -8,6 +8,6 @@ LL | let test = Box::new(Test { func: closure });
= help: add `#![feature(trait_upcasting)]` to the crate attributes to enable
= note: required when coercing `Box<(dyn Fn() + 'static)>` into `Box<(dyn FnMut() + 'static)>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/traits/trait-upcasting/issue-11515.next.stderr b/tests/ui/traits/trait-upcasting/issue-11515.next.stderr
index 97d66cccb..da7ac4cc0 100644
--- a/tests/ui/traits/trait-upcasting/issue-11515.next.stderr
+++ b/tests/ui/traits/trait-upcasting/issue-11515.next.stderr
@@ -8,6 +8,6 @@ LL | let test = Box::new(Test { func: closure });
= help: add `#![feature(trait_upcasting)]` to the crate attributes to enable
= note: required when coercing `Box<(dyn Fn() + 'static)>` into `Box<(dyn FnMut() + 'static)>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/traits/trait-upcasting/issue-11515.rs b/tests/ui/traits/trait-upcasting/issue-11515.rs
index 723f3a24f..31ea2fb35 100644
--- a/tests/ui/traits/trait-upcasting/issue-11515.rs
+++ b/tests/ui/traits/trait-upcasting/issue-11515.rs
@@ -1,5 +1,5 @@
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
struct Test {
func: Box<dyn FnMut() + 'static>,
diff --git a/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.rs b/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.rs
new file mode 100644
index 000000000..da1a9cc27
--- /dev/null
+++ b/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.rs
@@ -0,0 +1,18 @@
+#![deny(deref_into_dyn_supertrait)]
+
+use std::ops::Deref;
+
+trait Bar<'a> {}
+trait Foo<'a>: Bar<'a> {}
+
+impl<'a> Deref for dyn Foo<'a> {
+ //~^ ERROR this `Deref` implementation is covered by an implicit supertrait coercion
+ //~| WARN this will change its meaning in a future release!
+ type Target = dyn Bar<'a>;
+
+ fn deref(&self) -> &Self::Target {
+ todo!()
+ }
+}
+
+fn main() {}
diff --git a/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.stderr b/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.stderr
new file mode 100644
index 000000000..a5f3660d4
--- /dev/null
+++ b/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.stderr
@@ -0,0 +1,19 @@
+error: this `Deref` implementation is covered by an implicit supertrait coercion
+ --> $DIR/migrate-lint-deny-regions.rs:8:1
+ |
+LL | impl<'a> Deref for dyn Foo<'a> {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Foo<'_>` implements `Deref<Target = dyn Bar<'_>>` which conflicts with supertrait `Bar<'_>`
+...
+LL | type Target = dyn Bar<'a>;
+ | -------------------------- target type is a supertrait of `dyn Foo<'_>`
+ |
+ = warning: this will change its meaning in a future release!
+ = note: for more information, see issue #89460 <https://github.com/rust-lang/rust/issues/89460>
+note: the lint level is defined here
+ --> $DIR/migrate-lint-deny-regions.rs:1:9
+ |
+LL | #![deny(deref_into_dyn_supertrait)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/traits/trait-upcasting/migrate-lint-deny.rs b/tests/ui/traits/trait-upcasting/migrate-lint-deny.rs
index d62418756..926b3649e 100644
--- a/tests/ui/traits/trait-upcasting/migrate-lint-deny.rs
+++ b/tests/ui/traits/trait-upcasting/migrate-lint-deny.rs
@@ -1,16 +1,14 @@
#![deny(deref_into_dyn_supertrait)]
-extern crate core;
-
-use core::ops::Deref;
+use std::ops::Deref;
// issue 89190
trait A {}
trait B: A {}
impl<'a> Deref for dyn 'a + B {
- //~^ ERROR `(dyn B + 'a)` implements `Deref` with supertrait `A` as target
- //~| WARN this was previously accepted by the compiler but is being phased out;
+ //~^ ERROR this `Deref` implementation is covered by an implicit supertrait coercion
+ //~| WARN this will change its meaning in a future release!
type Target = dyn A;
fn deref(&self) -> &Self::Target {
diff --git a/tests/ui/traits/trait-upcasting/migrate-lint-deny.stderr b/tests/ui/traits/trait-upcasting/migrate-lint-deny.stderr
index 4533b1163..29997a9b3 100644
--- a/tests/ui/traits/trait-upcasting/migrate-lint-deny.stderr
+++ b/tests/ui/traits/trait-upcasting/migrate-lint-deny.stderr
@@ -1,13 +1,13 @@
-error: `(dyn B + 'a)` implements `Deref` with supertrait `A` as target
- --> $DIR/migrate-lint-deny.rs:11:1
+error: this `Deref` implementation is covered by an implicit supertrait coercion
+ --> $DIR/migrate-lint-deny.rs:9:1
|
LL | impl<'a> Deref for dyn 'a + B {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn B` implements `Deref<Target = dyn A>` which conflicts with supertrait `A`
...
LL | type Target = dyn A;
- | -------------------- target type is set here
+ | -------------------- target type is a supertrait of `dyn B`
|
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+ = warning: this will change its meaning in a future release!
= note: for more information, see issue #89460 <https://github.com/rust-lang/rust/issues/89460>
note: the lint level is defined here
--> $DIR/migrate-lint-deny.rs:1:9
@@ -15,5 +15,5 @@ note: the lint level is defined here
LL | #![deny(deref_into_dyn_supertrait)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.rs b/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.rs
new file mode 100644
index 000000000..8a90a09ff
--- /dev/null
+++ b/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.rs
@@ -0,0 +1,21 @@
+// check-pass
+
+use std::ops::Deref;
+
+trait Bar<T> {}
+
+trait Foo: Bar<i32> {
+ fn as_dyn_bar_u32<'a>(&self) -> &(dyn Bar<u32> + 'a);
+}
+
+impl<'a> Deref for dyn Foo + 'a {
+ //~^ WARN this `Deref` implementation is covered by an implicit supertrait coercion
+ //~| WARN this will change its meaning in a future release!
+ type Target = dyn Bar<u32> + 'a;
+
+ fn deref(&self) -> &Self::Target {
+ self.as_dyn_bar_u32()
+ }
+}
+
+fn main() {}
diff --git a/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.stderr b/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.stderr
new file mode 100644
index 000000000..6245da5a1
--- /dev/null
+++ b/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.stderr
@@ -0,0 +1,15 @@
+warning: this `Deref` implementation is covered by an implicit supertrait coercion
+ --> $DIR/migrate-lint-different-substs.rs:11:1
+ |
+LL | impl<'a> Deref for dyn Foo + 'a {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Foo` implements `Deref<Target = dyn Bar<u32>>` which conflicts with supertrait `Bar<i32>`
+...
+LL | type Target = dyn Bar<u32> + 'a;
+ | -------------------------------- target type is a supertrait of `dyn Foo`
+ |
+ = warning: this will change its meaning in a future release!
+ = note: for more information, see issue #89460 <https://github.com/rust-lang/rust/issues/89460>
+ = note: `#[warn(deref_into_dyn_supertrait)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguousity.stderr b/tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguousity.stderr
index 0ad18be03..70ba1fcaf 100644
--- a/tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguousity.stderr
+++ b/tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguousity.stderr
@@ -9,6 +9,6 @@ LL | let t: &dyn Bar<_> = s;
= note: expected reference `&dyn Bar<_>`
found reference `&dyn Foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/traits/trait-upcasting/multiple_supertrait_upcastable.stderr b/tests/ui/traits/trait-upcasting/multiple_supertrait_upcastable.stderr
index ad80a009e..d075102b2 100644
--- a/tests/ui/traits/trait-upcasting/multiple_supertrait_upcastable.stderr
+++ b/tests/ui/traits/trait-upcasting/multiple_supertrait_upcastable.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(multiple_supertrait_upcastable)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/traits/trait-upcasting/normalization.rs b/tests/ui/traits/trait-upcasting/normalization.rs
index c78338b0d..24da1ec5d 100644
--- a/tests/ui/traits/trait-upcasting/normalization.rs
+++ b/tests/ui/traits/trait-upcasting/normalization.rs
@@ -1,7 +1,7 @@
// check-pass
// issue: 114113
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
#![feature(trait_upcasting)]
diff --git a/tests/ui/traits/trait-upcasting/type-checking-test-1.current.stderr b/tests/ui/traits/trait-upcasting/type-checking-test-1.current.stderr
index b612005fc..10c22440a 100644
--- a/tests/ui/traits/trait-upcasting/type-checking-test-1.current.stderr
+++ b/tests/ui/traits/trait-upcasting/type-checking-test-1.current.stderr
@@ -4,6 +4,6 @@ error[E0605]: non-primitive cast: `&dyn Foo` as `&dyn Bar<_>`
LL | let _ = x as &dyn Bar<_>; // Ambiguous
| ^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0605`.
diff --git a/tests/ui/traits/trait-upcasting/type-checking-test-1.next.stderr b/tests/ui/traits/trait-upcasting/type-checking-test-1.next.stderr
index b612005fc..10c22440a 100644
--- a/tests/ui/traits/trait-upcasting/type-checking-test-1.next.stderr
+++ b/tests/ui/traits/trait-upcasting/type-checking-test-1.next.stderr
@@ -4,6 +4,6 @@ error[E0605]: non-primitive cast: `&dyn Foo` as `&dyn Bar<_>`
LL | let _ = x as &dyn Bar<_>; // Ambiguous
| ^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0605`.
diff --git a/tests/ui/traits/trait-upcasting/type-checking-test-1.rs b/tests/ui/traits/trait-upcasting/type-checking-test-1.rs
index afea8521e..54c3c5e0c 100644
--- a/tests/ui/traits/trait-upcasting/type-checking-test-1.rs
+++ b/tests/ui/traits/trait-upcasting/type-checking-test-1.rs
@@ -1,5 +1,5 @@
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
#![feature(trait_upcasting)]
diff --git a/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.current.stderr b/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.current.stderr
index 9f0993d65..f1f0cd309 100644
--- a/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.current.stderr
+++ b/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.current.stderr
@@ -8,6 +8,6 @@ LL | x
= help: add `#![feature(trait_upcasting)]` to the crate attributes to enable
= note: required when coercing `Box<Wrapper<(dyn A + 'a)>>` into `Box<Wrapper<(dyn B + 'a)>>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.next.stderr b/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.next.stderr
index 9f0993d65..f1f0cd309 100644
--- a/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.next.stderr
+++ b/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.next.stderr
@@ -8,6 +8,6 @@ LL | x
= help: add `#![feature(trait_upcasting)]` to the crate attributes to enable
= note: required when coercing `Box<Wrapper<(dyn A + 'a)>>` into `Box<Wrapper<(dyn B + 'a)>>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.rs b/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.rs
index 42495f45f..948f058e5 100644
--- a/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.rs
+++ b/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.rs
@@ -1,5 +1,5 @@
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
struct Wrapper<T: ?Sized>(T);
diff --git a/tests/ui/traits/trivial_impl.stderr b/tests/ui/traits/trivial_impl.stderr
index 4b29b55be..68dbf5dd4 100644
--- a/tests/ui/traits/trivial_impl.stderr
+++ b/tests/ui/traits/trivial_impl.stderr
@@ -9,6 +9,6 @@ LL | | Self: Foo<()>;
LL | impl Foo<u32> for () {}
| ^^^^^^^^^^^^^^^^^^^^ missing `foo` in implementation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/traits/trivial_impl2.stderr b/tests/ui/traits/trivial_impl2.stderr
index 04c05df06..9a220d24f 100644
--- a/tests/ui/traits/trivial_impl2.stderr
+++ b/tests/ui/traits/trivial_impl2.stderr
@@ -9,6 +9,6 @@ LL | | Self: Foo<()>;
LL | impl Foo<u32> for () {}
| ^^^^^^^^^^^^^^^^^^^^ missing `foo` in implementation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/traits/trivial_impl3.stderr b/tests/ui/traits/trivial_impl3.stderr
index dfb39d6ce..5aa1a4a3c 100644
--- a/tests/ui/traits/trivial_impl3.stderr
+++ b/tests/ui/traits/trivial_impl3.stderr
@@ -9,6 +9,6 @@ LL | | Self: trivial3::Trait;
LL | impl Foo for u8 {}
| ^^^^^^^^^^^^^^^ missing `foo` in implementation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/traits/trivial_impl4.stderr b/tests/ui/traits/trivial_impl4.stderr
index 04b29ed77..2e86be730 100644
--- a/tests/ui/traits/trivial_impl4.stderr
+++ b/tests/ui/traits/trivial_impl4.stderr
@@ -9,6 +9,6 @@ LL | | Self: trivial4::Trait;
LL | impl Foo for u8 {}
| ^^^^^^^^^^^^^^^ missing `foo` in implementation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/traits/unsend-future.stderr b/tests/ui/traits/unsend-future.stderr
index 01829021b..25df34197 100644
--- a/tests/ui/traits/unsend-future.stderr
+++ b/tests/ui/traits/unsend-future.stderr
@@ -18,5 +18,5 @@ note: required by a bound in `require_handler`
LL | fn require_handler<H: Handler>(h: H) {}
| ^^^^^^^ required by this bound in `require_handler`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/traits/upcast_soundness_bug.rs b/tests/ui/traits/upcast_soundness_bug.rs
new file mode 100644
index 000000000..32e328509
--- /dev/null
+++ b/tests/ui/traits/upcast_soundness_bug.rs
@@ -0,0 +1,69 @@
+#![feature(trait_upcasting)]
+// known-bug: #120222
+// check-pass
+//! This will segfault at runtime.
+
+pub trait SupSupA {
+ fn method(&self) {}
+}
+pub trait SupSupB {}
+impl<T> SupSupA for T {}
+impl<T> SupSupB for T {}
+
+pub trait Super<T>: SupSupA + SupSupB {}
+
+pub trait Unimplemented {}
+
+pub trait Trait<T1, T2>: Super<T1> + Super<T2> {
+ fn missing_method(&self)
+ where
+ T1: Unimplemented,
+ {
+ }
+}
+
+impl<S, T> Super<T> for S {}
+
+impl<S, T1, T2> Trait<T1, T2> for S {}
+
+#[inline(never)]
+pub fn user1() -> &'static dyn Trait<u8, u8> {
+ &()
+ /* VTABLE:
+ .L__unnamed_2:
+ .quad core::ptr::drop_in_place<()>
+ .asciz "\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000"
+ .quad example::SupSupA::method
+ .quad .L__unnamed_4 // SupSupB vtable (pointer)
+ .zero 8 // null pointer for missing_method
+ */
+}
+
+#[inline(never)]
+pub fn user2() -> &'static dyn Trait<u8, u16> {
+ &()
+ /* VTABLE:
+ .L__unnamed_3:
+ .quad core::ptr::drop_in_place<()>
+ .asciz "\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000"
+ .quad example::SupSupA::method
+ .quad .L__unnamed_4 // SupSupB vtable (pointer)
+ .quad .L__unnamed_5 // Super<u16> vtable (pointer)
+ .zero 8 // null pointer for missing_method
+ */
+}
+
+fn main() {
+ let p: *const dyn Trait<u8, u8> = &();
+ let p = p as *const dyn Trait<u8, u16>; // <- this is bad!
+ let p = p as *const dyn Super<u16>; // <- this upcast accesses improper vtable entry
+ // accessing from L__unnamed_2 the position for the 'Super<u16> vtable (pointer)',
+ // thus reading 'null pointer for missing_method'
+
+ let p = p as *const dyn SupSupB; // <- this upcast dereferences (null) pointer from that entry
+ // to read the SupSupB vtable (pointer)
+
+ // SEGFAULT
+
+ println!("{:?}", p);
+}
diff --git a/tests/ui/traits/vtable-res-trait-param.stderr b/tests/ui/traits/vtable-res-trait-param.stderr
index 4cfceefb2..fff602b8d 100644
--- a/tests/ui/traits/vtable-res-trait-param.stderr
+++ b/tests/ui/traits/vtable-res-trait-param.stderr
@@ -17,6 +17,6 @@ note: required by a bound in `TraitB::gimme_an_a`
LL | fn gimme_an_a<A:TraitA>(&self, a: A) -> isize;
| ^^^^^^ required by this bound in `TraitB::gimme_an_a`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/vtable/issue-97381.stderr b/tests/ui/traits/vtable/issue-97381.stderr
index 89360c44e..503d0f125 100644
--- a/tests/ui/traits/vtable/issue-97381.stderr
+++ b/tests/ui/traits/vtable/issue-97381.stderr
@@ -13,6 +13,6 @@ LL |
LL | println!("{}", ***el > 0);
| ---- borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0505`.
diff --git a/tests/ui/traits/vtable/vtable-non-object-safe.stderr b/tests/ui/traits/vtable/vtable-non-object-safe.stderr
index 9345c2711..53eef5d0b 100644
--- a/tests/ui/traits/vtable/vtable-non-object-safe.stderr
+++ b/tests/ui/traits/vtable/vtable-non-object-safe.stderr
@@ -12,5 +12,5 @@ error: vtable entries for `<std::vec::IntoIter<u8> as A>`: [
LL | trait A: Iterator {}
| ^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/traits/vtable/vtable-vacant.stderr b/tests/ui/traits/vtable/vtable-vacant.stderr
index 5346a7027..9ce1d0b76 100644
--- a/tests/ui/traits/vtable/vtable-vacant.stderr
+++ b/tests/ui/traits/vtable/vtable-vacant.stderr
@@ -12,5 +12,5 @@ error: vtable entries for `<S as B>`: [
LL | trait B: A {
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/traits/well-formed-recursion-limit.rs b/tests/ui/traits/well-formed-recursion-limit.rs
new file mode 100644
index 000000000..056cf947d
--- /dev/null
+++ b/tests/ui/traits/well-formed-recursion-limit.rs
@@ -0,0 +1,27 @@
+// Regression test for #117151, this used to hang the compiler
+
+pub type ISO<A: 'static, B: 'static> = (Box<dyn Fn(A) -> B>, Box<dyn Fn(B) -> A>);
+pub fn iso<A: 'static, B: 'static, F1, F2>(a: F1, b: F2) -> ISO<A, B>
+where
+ F1: 'static + Fn(A) -> B,
+ F2: 'static + Fn(B) -> A,
+{
+ (Box::new(a), Box::new(b))
+}
+pub fn iso_un_option<A: 'static, B: 'static>(i: ISO<Option<A>, Option<B>>) -> ISO<A, B> {
+ let (ab, ba) = (i.ab, i.ba);
+ //~^ ERROR no field `ab` on type
+ //~| ERROR no field `ba` on type
+ let left = move |o_a| match o_a {
+ //~^ ERROR overflow evaluating the requirement
+ None => panic!("absured"),
+ Some(a) => a,
+ };
+ let right = move |o_b| match o_b {
+ None => panic!("absurd"),
+ Some(b) => b,
+ };
+ iso(left, right)
+}
+
+fn main() {}
diff --git a/tests/ui/traits/well-formed-recursion-limit.stderr b/tests/ui/traits/well-formed-recursion-limit.stderr
new file mode 100644
index 000000000..6f5fda023
--- /dev/null
+++ b/tests/ui/traits/well-formed-recursion-limit.stderr
@@ -0,0 +1,22 @@
+error[E0609]: no field `ab` on type `(Box<(dyn Fn(Option<A>) -> Option<B> + 'static)>, Box<(dyn Fn(Option<B>) -> Option<A> + 'static)>)`
+ --> $DIR/well-formed-recursion-limit.rs:12:23
+ |
+LL | let (ab, ba) = (i.ab, i.ba);
+ | ^^ unknown field
+
+error[E0609]: no field `ba` on type `(Box<(dyn Fn(Option<A>) -> Option<B> + 'static)>, Box<(dyn Fn(Option<B>) -> Option<A> + 'static)>)`
+ --> $DIR/well-formed-recursion-limit.rs:12:29
+ |
+LL | let (ab, ba) = (i.ab, i.ba);
+ | ^^ unknown field
+
+error[E0275]: overflow evaluating the requirement `_ <: Option<_>`
+ --> $DIR/well-formed-recursion-limit.rs:15:33
+ |
+LL | let left = move |o_a| match o_a {
+ | ^^^
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0275, E0609.
+For more information about an error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/wf-object/reverse-order.rs b/tests/ui/traits/wf-object/reverse-order.rs
index 4f676cbe3..74b2ef485 100644
--- a/tests/ui/traits/wf-object/reverse-order.rs
+++ b/tests/ui/traits/wf-object/reverse-order.rs
@@ -2,8 +2,6 @@
// Ensure that `dyn $($AutoTrait)+ ObjSafe` is well-formed.
-use std::marker::Unpin;
-
// Some arbitrary object-safe trait:
trait Obj {}
diff --git a/tests/ui/traits/wrong-mul-method-signature.stderr b/tests/ui/traits/wrong-mul-method-signature.stderr
index 25a92f5ec..91162cbc1 100644
--- a/tests/ui/traits/wrong-mul-method-signature.stderr
+++ b/tests/ui/traits/wrong-mul-method-signature.stderr
@@ -7,8 +7,8 @@ LL | fn mul(self, s: &f64) -> Vec1 {
| expected `f64`, found `&f64`
| help: change the parameter type to match the trait: `f64`
|
- = note: expected signature `fn(Vec1, f64) -> Vec1`
- found signature `fn(Vec1, &f64) -> Vec1`
+ = note: expected signature `fn(Vec1, _) -> Vec1`
+ found signature `fn(Vec1, &_) -> Vec1`
error[E0053]: method `mul` has an incompatible type for trait
--> $DIR/wrong-mul-method-signature.rs:33:21
diff --git a/tests/ui/transmutability/alignment/align-fail.stderr b/tests/ui/transmutability/alignment/align-fail.stderr
index 59246fb1b..c68c1481f 100644
--- a/tests/ui/transmutability/alignment/align-fail.stderr
+++ b/tests/ui/transmutability/alignment/align-fail.stderr
@@ -25,6 +25,6 @@ LL - assert::is_maybe_transmutable::<&'static [u8; 0], &'static [u16; 0]>();
LL + assert::is_maybe_transmutable::<&'static [u8; 0], [u16; 0]>();
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/transmutability/arrays/issue-103783-array-length.stderr b/tests/ui/transmutability/arrays/issue-103783-array-length.stderr
index 37774c59e..2c581664f 100644
--- a/tests/ui/transmutability/arrays/issue-103783-array-length.stderr
+++ b/tests/ui/transmutability/arrays/issue-103783-array-length.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | type NaughtyLenArray = [u32; 3.14159];
| ^^^^^^^ expected `usize`, found floating-point number
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/transmutability/enums/should_pad_variants.stderr b/tests/ui/transmutability/enums/should_pad_variants.stderr
index bfbef8b25..fd98e355f 100644
--- a/tests/ui/transmutability/enums/should_pad_variants.stderr
+++ b/tests/ui/transmutability/enums/should_pad_variants.stderr
@@ -19,6 +19,6 @@ LL | | .and(Assume::VALIDITY)
LL | | }>
| |__________^ required by this bound in `is_transmutable`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/transmutability/enums/should_respect_endianness.stderr b/tests/ui/transmutability/enums/should_respect_endianness.stderr
index e59301a8c..8823f40e5 100644
--- a/tests/ui/transmutability/enums/should_respect_endianness.stderr
+++ b/tests/ui/transmutability/enums/should_respect_endianness.stderr
@@ -19,6 +19,6 @@ LL | | .and(Assume::VALIDITY)
LL | | }>
| |__________^ required by this bound in `is_transmutable`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/transmutability/issue-101739-2.stderr b/tests/ui/transmutability/issue-101739-2.stderr
index 420a9f330..d5ed205d1 100644
--- a/tests/ui/transmutability/issue-101739-2.stderr
+++ b/tests/ui/transmutability/issue-101739-2.stderr
@@ -9,6 +9,6 @@ LL | | ASSUME_VALIDITY,
LL | | ASSUME_VISIBILITY,
| |_____________________________- help: remove these generic arguments
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/transmutability/malformed-program-gracefulness/unknown_dst.stderr b/tests/ui/transmutability/malformed-program-gracefulness/unknown_dst.stderr
index b4591778f..10e057ec1 100644
--- a/tests/ui/transmutability/malformed-program-gracefulness/unknown_dst.stderr
+++ b/tests/ui/transmutability/malformed-program-gracefulness/unknown_dst.stderr
@@ -9,6 +9,6 @@ help: you might be missing a type parameter
LL | fn should_gracefully_handle_unknown_dst<Dst>() {
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/transmutability/malformed-program-gracefulness/unknown_src.stderr b/tests/ui/transmutability/malformed-program-gracefulness/unknown_src.stderr
index a55d71d80..a84d2726f 100644
--- a/tests/ui/transmutability/malformed-program-gracefulness/unknown_src.stderr
+++ b/tests/ui/transmutability/malformed-program-gracefulness/unknown_src.stderr
@@ -9,6 +9,6 @@ help: you might be missing a type parameter
LL | fn should_gracefully_handle_unknown_src<Src>() {
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/transmutability/primitives/bool-mut.rs b/tests/ui/transmutability/primitives/bool-mut.rs
index 49dbe90e4..6ee168d1a 100644
--- a/tests/ui/transmutability/primitives/bool-mut.rs
+++ b/tests/ui/transmutability/primitives/bool-mut.rs
@@ -1,5 +1,5 @@
// check-fail
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
#![feature(transmutability)]
mod assert {
diff --git a/tests/ui/transmutability/primitives/bool-mut.stderr b/tests/ui/transmutability/primitives/bool-mut.stderr
index b36991e1c..62a7a2b86 100644
--- a/tests/ui/transmutability/primitives/bool-mut.stderr
+++ b/tests/ui/transmutability/primitives/bool-mut.stderr
@@ -13,6 +13,6 @@ LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, Context, { Assume::SAFETY }>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/transmutability/primitives/bool.current.stderr b/tests/ui/transmutability/primitives/bool.current.stderr
index 4b3eb6c51..6dfd83dd5 100644
--- a/tests/ui/transmutability/primitives/bool.current.stderr
+++ b/tests/ui/transmutability/primitives/bool.current.stderr
@@ -13,6 +13,6 @@ LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, Context, { Assume::SAFETY }>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/transmutability/primitives/bool.next.stderr b/tests/ui/transmutability/primitives/bool.next.stderr
index 4b3eb6c51..6dfd83dd5 100644
--- a/tests/ui/transmutability/primitives/bool.next.stderr
+++ b/tests/ui/transmutability/primitives/bool.next.stderr
@@ -13,6 +13,6 @@ LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, Context, { Assume::SAFETY }>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/transmutability/primitives/bool.rs b/tests/ui/transmutability/primitives/bool.rs
index 654e7b47e..ac4024b7f 100644
--- a/tests/ui/transmutability/primitives/bool.rs
+++ b/tests/ui/transmutability/primitives/bool.rs
@@ -1,5 +1,5 @@
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
#![feature(transmutability)]
mod assert {
diff --git a/tests/ui/transmutability/primitives/numbers.rs b/tests/ui/transmutability/primitives/numbers.rs
index e980e91ed..1afc7d677 100644
--- a/tests/ui/transmutability/primitives/numbers.rs
+++ b/tests/ui/transmutability/primitives/numbers.rs
@@ -1,5 +1,5 @@
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
#![crate_type = "lib"]
#![feature(transmutability)]
diff --git a/tests/ui/transmutability/primitives/unit.current.stderr b/tests/ui/transmutability/primitives/unit.current.stderr
index c49eb6097..e5d8466c3 100644
--- a/tests/ui/transmutability/primitives/unit.current.stderr
+++ b/tests/ui/transmutability/primitives/unit.current.stderr
@@ -19,6 +19,6 @@ LL | | .and(Assume::VALIDITY)
LL | | }>
| |__________^ required by this bound in `is_transmutable`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/transmutability/primitives/unit.next.stderr b/tests/ui/transmutability/primitives/unit.next.stderr
index c49eb6097..e5d8466c3 100644
--- a/tests/ui/transmutability/primitives/unit.next.stderr
+++ b/tests/ui/transmutability/primitives/unit.next.stderr
@@ -19,6 +19,6 @@ LL | | .and(Assume::VALIDITY)
LL | | }>
| |__________^ required by this bound in `is_transmutable`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/transmutability/primitives/unit.rs b/tests/ui/transmutability/primitives/unit.rs
index 12eac1751..5ea96cf8b 100644
--- a/tests/ui/transmutability/primitives/unit.rs
+++ b/tests/ui/transmutability/primitives/unit.rs
@@ -1,5 +1,5 @@
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
//! The unit type, `()`, should be one byte.
diff --git a/tests/ui/transmutability/references/recursive-wrapper-types-bit-compatible-mut.stderr b/tests/ui/transmutability/references/recursive-wrapper-types-bit-compatible-mut.stderr
index 4b4d6ad02..8b22f89c7 100644
--- a/tests/ui/transmutability/references/recursive-wrapper-types-bit-compatible-mut.stderr
+++ b/tests/ui/transmutability/references/recursive-wrapper-types-bit-compatible-mut.stderr
@@ -20,6 +20,6 @@ LL | | }
LL | | }>
| |__________^ required by this bound in `is_maybe_transmutable`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/transmutability/references/recursive-wrapper-types-bit-incompatible.stderr b/tests/ui/transmutability/references/recursive-wrapper-types-bit-incompatible.stderr
index ecfe48659..982af8259 100644
--- a/tests/ui/transmutability/references/recursive-wrapper-types-bit-incompatible.stderr
+++ b/tests/ui/transmutability/references/recursive-wrapper-types-bit-incompatible.stderr
@@ -20,6 +20,6 @@ LL | | }
LL | | }>
| |__________^ required by this bound in `is_maybe_transmutable`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/transmutability/references/unit-to-u8.stderr b/tests/ui/transmutability/references/unit-to-u8.stderr
index f2b72357f..a0891dfd0 100644
--- a/tests/ui/transmutability/references/unit-to-u8.stderr
+++ b/tests/ui/transmutability/references/unit-to-u8.stderr
@@ -20,6 +20,6 @@ LL | | }
LL | | }>
| |__________^ required by this bound in `is_maybe_transmutable`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/transmutability/region-infer.stderr b/tests/ui/transmutability/region-infer.stderr
index 307d0dfe5..50d060cd4 100644
--- a/tests/ui/transmutability/region-infer.stderr
+++ b/tests/ui/transmutability/region-infer.stderr
@@ -18,6 +18,6 @@ LL | | { Assume { alignment: true, lifetimes: true, safety: true, va
LL | | >,
| |_________^ required by this bound in `test`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/transmutability/unions/should_pad_variants.stderr b/tests/ui/transmutability/unions/should_pad_variants.stderr
index bfbef8b25..fd98e355f 100644
--- a/tests/ui/transmutability/unions/should_pad_variants.stderr
+++ b/tests/ui/transmutability/unions/should_pad_variants.stderr
@@ -19,6 +19,6 @@ LL | | .and(Assume::VALIDITY)
LL | | }>
| |__________^ required by this bound in `is_transmutable`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/transmutability/unions/should_reject_contraction.stderr b/tests/ui/transmutability/unions/should_reject_contraction.stderr
index 553f655a1..e3493e184 100644
--- a/tests/ui/transmutability/unions/should_reject_contraction.stderr
+++ b/tests/ui/transmutability/unions/should_reject_contraction.stderr
@@ -13,6 +13,6 @@ LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, Context, { Assume::SAFETY }>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_unreachable_ty.stderr b/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_unreachable_ty.stderr
index 827df05de..cf94d72b8 100644
--- a/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_unreachable_ty.stderr
+++ b/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_unreachable_ty.stderr
@@ -10,6 +10,6 @@ note: the struct `Dst` is defined here
LL | #[repr(C)] pub(self) struct Dst {
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/transmutability/visibility/should_accept_if_src_has_unreachable_ty.stderr b/tests/ui/transmutability/visibility/should_accept_if_src_has_unreachable_ty.stderr
index 76dc7f340..57ceac61f 100644
--- a/tests/ui/transmutability/visibility/should_accept_if_src_has_unreachable_ty.stderr
+++ b/tests/ui/transmutability/visibility/should_accept_if_src_has_unreachable_ty.stderr
@@ -10,6 +10,6 @@ note: the struct `Src` is defined here
LL | #[repr(C)] pub(self) struct Src {
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/transmutability/visibility/should_reject_if_dst_has_private_field.stderr b/tests/ui/transmutability/visibility/should_reject_if_dst_has_private_field.stderr
index 863ada3c2..cb2e7ec29 100644
--- a/tests/ui/transmutability/visibility/should_reject_if_dst_has_private_field.stderr
+++ b/tests/ui/transmutability/visibility/should_reject_if_dst_has_private_field.stderr
@@ -13,6 +13,6 @@ LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, Context> // safety is NOT assumed
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/transmutability/visibility/should_reject_if_dst_has_private_variant.stderr b/tests/ui/transmutability/visibility/should_reject_if_dst_has_private_variant.stderr
index 7b0f1b4d5..434c3fcd2 100644
--- a/tests/ui/transmutability/visibility/should_reject_if_dst_has_private_variant.stderr
+++ b/tests/ui/transmutability/visibility/should_reject_if_dst_has_private_variant.stderr
@@ -13,6 +13,6 @@ LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, Context> // safety is NOT assumed
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_field.stderr b/tests/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_field.stderr
index df19477ef..e987aa595 100644
--- a/tests/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_field.stderr
+++ b/tests/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_field.stderr
@@ -13,6 +13,6 @@ LL | where
LL | Dst: BikeshedIntrinsicFrom<Src, Context> // safety is NOT assumed
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/transmute/transmute-impl.stderr b/tests/ui/transmute/transmute-impl.stderr
index dd19bcd54..6ed1cd6ce 100644
--- a/tests/ui/transmute/transmute-impl.stderr
+++ b/tests/ui/transmute/transmute-impl.stderr
@@ -7,6 +7,6 @@ LL | unsafe { transmute(x) }
= note: source type: `&T` (pointer to `T`)
= note: target type: `&isize` (N bits)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0512`.
diff --git a/tests/ui/transmute/transmute-imut-to-mut.stderr b/tests/ui/transmute/transmute-imut-to-mut.stderr
index 1e9dff3ce..d37050fa5 100644
--- a/tests/ui/transmute/transmute-imut-to-mut.stderr
+++ b/tests/ui/transmute/transmute-imut-to-mut.stderr
@@ -6,5 +6,5 @@ LL | let _a: &mut u8 = unsafe { transmute(&1u8) };
|
= note: `#[deny(mutable_transmutes)]` on by default
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/transmute/transmute-padding-ice.stderr b/tests/ui/transmute/transmute-padding-ice.stderr
index f5480e0b9..ff5c5c3a5 100644
--- a/tests/ui/transmute/transmute-padding-ice.stderr
+++ b/tests/ui/transmute/transmute-padding-ice.stderr
@@ -18,6 +18,6 @@ LL | | { Assume { alignment: true, lifetimes: true, safety: true, va
LL | | >,
| |_________^ required by this bound in `is_maybe_transmutable`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/treat-err-as-bug/delay_span_bug.rs b/tests/ui/treat-err-as-bug/span_delayed_bug.rs
index 533c8d1ec..dda35b9b9 100644
--- a/tests/ui/treat-err-as-bug/delay_span_bug.rs
+++ b/tests/ui/treat-err-as-bug/span_delayed_bug.rs
@@ -1,12 +1,12 @@
// compile-flags: -Ztreat-err-as-bug
// failure-status: 101
// error-pattern: aborting due to `-Z treat-err-as-bug=1`
-// error-pattern: [trigger_delay_span_bug] triggering a delay span bug
+// error-pattern: [trigger_span_delayed_bug] triggering a span delayed bug for testing incremental
// normalize-stderr-test "note: .*\n\n" -> ""
// normalize-stderr-test "thread 'rustc' panicked.*:\n.*\n" -> ""
// rustc-env:RUST_BACKTRACE=0
#![feature(rustc_attrs)]
-#[rustc_error(delay_span_bug_from_inside_query)]
+#[rustc_error(span_delayed_bug_from_inside_query)]
fn main() {}
diff --git a/tests/ui/treat-err-as-bug/delay_span_bug.stderr b/tests/ui/treat-err-as-bug/span_delayed_bug.stderr
index 22c617504..a61ffaea8 100644
--- a/tests/ui/treat-err-as-bug/delay_span_bug.stderr
+++ b/tests/ui/treat-err-as-bug/span_delayed_bug.stderr
@@ -1,5 +1,5 @@
-error: internal compiler error: delayed span bug triggered by #[rustc_error(delay_span_bug_from_inside_query)]
- --> $DIR/delay_span_bug.rs:12:1
+error: internal compiler error: delayed span bug triggered by #[rustc_error(span_delayed_bug_from_inside_query)]
+ --> $DIR/span_delayed_bug.rs:12:1
|
LL | fn main() {}
| ^^^^^^^^^
@@ -7,5 +7,5 @@ LL | fn main() {}
error: the compiler unexpectedly panicked. this is a bug.
query stack during panic:
-#0 [trigger_delay_span_bug] triggering a delay span bug
+#0 [trigger_span_delayed_bug] triggering a span delayed bug for testing incremental
end of query stack
diff --git a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr
index 26679e713..554b3a64c 100644
--- a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr
+++ b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr
@@ -12,6 +12,6 @@ help: you can convert an `i32` to a `u8` and panic if the converted value doesn'
LL | B::get_x().try_into().unwrap()
| ++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/trivial-bounds/trivial-bounds-leak-copy.stderr b/tests/ui/trivial-bounds/trivial-bounds-leak-copy.stderr
index b3ec3cd8d..e48d48a72 100644
--- a/tests/ui/trivial-bounds/trivial-bounds-leak-copy.stderr
+++ b/tests/ui/trivial-bounds/trivial-bounds-leak-copy.stderr
@@ -4,6 +4,6 @@ error[E0507]: cannot move out of `*t` which is behind a shared reference
LL | *t
| ^^ move occurs because `*t` has type `String`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/try-block/try-block-bad-type.stderr b/tests/ui/try-block/try-block-bad-type.stderr
index b41bf86d3..d58a011ff 100644
--- a/tests/ui/try-block/try-block-bad-type.stderr
+++ b/tests/ui/try-block/try-block-bad-type.stderr
@@ -2,7 +2,9 @@ error[E0277]: `?` couldn't convert the error to `TryFromSliceError`
--> $DIR/try-block-bad-type.rs:7:16
|
LL | Err("")?;
- | ^ the trait `From<&str>` is not implemented for `TryFromSliceError`
+ | -------^ the trait `From<&str>` is not implemented for `TryFromSliceError`
+ | |
+ | this can't be annotated with `?` because it has type `Result<_, &str>`
|
= note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
= help: the trait `From<Infallible>` is implemented for `TryFromSliceError`
diff --git a/tests/ui/try-block/try-block-catch.stderr b/tests/ui/try-block/try-block-catch.stderr
index 39cf943f4..185bcb407 100644
--- a/tests/ui/try-block/try-block-catch.stderr
+++ b/tests/ui/try-block/try-block-catch.stderr
@@ -6,5 +6,5 @@ LL | } catch { };
|
= help: try using `match` on the result of the `try` block instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/try-block/try-block-in-while.stderr b/tests/ui/try-block/try-block-in-while.stderr
index 62cc26dd4..2760e9301 100644
--- a/tests/ui/try-block/try-block-in-while.stderr
+++ b/tests/ui/try-block/try-block-in-while.stderr
@@ -6,6 +6,6 @@ LL | while try { false } {}
|
= help: the trait `Try` is not implemented for `bool`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/try-block/try-block-opt-init.stderr b/tests/ui/try-block/try-block-opt-init.stderr
index c39738501..1679fc2ac 100644
--- a/tests/ui/try-block/try-block-opt-init.stderr
+++ b/tests/ui/try-block/try-block-opt-init.stderr
@@ -12,6 +12,6 @@ LL | assert_eq!(cfg_res, 5);
|
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/try-trait/bad-interconversion.stderr b/tests/ui/try-trait/bad-interconversion.stderr
index d8b9431be..97fbbdbf8 100644
--- a/tests/ui/try-trait/bad-interconversion.stderr
+++ b/tests/ui/try-trait/bad-interconversion.stderr
@@ -4,7 +4,9 @@ error[E0277]: `?` couldn't convert the error to `u8`
LL | fn result_to_result() -> Result<u64, u8> {
| --------------- expected `u8` because of this
LL | Ok(Err(123_i32)?)
- | ^ the trait `From<i32>` is not implemented for `u8`
+ | ------------^ the trait `From<i32>` is not implemented for `u8`
+ | |
+ | this can't be annotated with `?` because it has type `Result<_, i32>`
|
= note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
= help: the following other types implement trait `From<T>`:
diff --git a/tests/ui/try-trait/issue-32709.stderr b/tests/ui/try-trait/issue-32709.stderr
index 94e8f9295..b155b3ff6 100644
--- a/tests/ui/try-trait/issue-32709.stderr
+++ b/tests/ui/try-trait/issue-32709.stderr
@@ -4,7 +4,9 @@ error[E0277]: `?` couldn't convert the error to `()`
LL | fn a() -> Result<i32, ()> {
| --------------- expected `()` because of this
LL | Err(5)?;
- | ^ the trait `From<{integer}>` is not implemented for `()`
+ | ------^ the trait `From<{integer}>` is not implemented for `()`
+ | |
+ | this can't be annotated with `?` because it has type `Result<_, {integer}>`
|
= note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
= help: the following other types implement trait `From<T>`:
@@ -19,6 +21,6 @@ LL | Err(5)?;
and 4 others
= note: required for `Result<i32, ()>` to implement `FromResidual<Result<Infallible, {integer}>>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/tuple/array-diagnostics.stderr b/tests/ui/tuple/array-diagnostics.stderr
index a10d7af47..629ca2b37 100644
--- a/tests/ui/tuple/array-diagnostics.stderr
+++ b/tests/ui/tuple/array-diagnostics.stderr
@@ -4,6 +4,6 @@ error[E0618]: expected function, found `(&'static str, {integer})`
LL | ("C200B40A83", 4)
| ^^^^^^^^^^^^^^^^^- help: consider separating array elements with a comma: `,`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0618`.
diff --git a/tests/ui/tuple/index-invalid.stderr b/tests/ui/tuple/index-invalid.stderr
index 8d22f458a..ae2c275f5 100644
--- a/tests/ui/tuple/index-invalid.stderr
+++ b/tests/ui/tuple/index-invalid.stderr
@@ -2,19 +2,19 @@ error[E0609]: no field `1` on type `(((),),)`
--> $DIR/index-invalid.rs:2:22
|
LL | let _ = (((),),).1.0;
- | ^
+ | ^ unknown field
error[E0609]: no field `1` on type `((),)`
--> $DIR/index-invalid.rs:4:24
|
LL | let _ = (((),),).0.1;
- | ^
+ | ^ unknown field
error[E0609]: no field `000` on type `(((),),)`
--> $DIR/index-invalid.rs:6:22
|
LL | let _ = (((),),).000.000;
- | ^^^
+ | ^^^ unknown field
error: aborting due to 3 previous errors
diff --git a/tests/ui/tuple/tuple-index-not-tuple.stderr b/tests/ui/tuple/tuple-index-not-tuple.stderr
index a1bcdfaed..a267e41b1 100644
--- a/tests/ui/tuple/tuple-index-not-tuple.stderr
+++ b/tests/ui/tuple/tuple-index-not-tuple.stderr
@@ -2,7 +2,12 @@ error[E0609]: no field `0` on type `Point`
--> $DIR/tuple-index-not-tuple.rs:6:12
|
LL | origin.0;
- | ^ help: a field with a similar name exists: `x`
+ | ^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | origin.x;
+ | ~
error[E0609]: no field `0` on type `Empty`
--> $DIR/tuple-index-not-tuple.rs:8:11
diff --git a/tests/ui/tuple/tuple-index-out-of-bounds.stderr b/tests/ui/tuple/tuple-index-out-of-bounds.stderr
index 7d7c5cd78..96090435d 100644
--- a/tests/ui/tuple/tuple-index-out-of-bounds.stderr
+++ b/tests/ui/tuple/tuple-index-out-of-bounds.stderr
@@ -2,13 +2,18 @@ error[E0609]: no field `2` on type `Point`
--> $DIR/tuple-index-out-of-bounds.rs:7:12
|
LL | origin.2;
- | ^ help: a field with a similar name exists: `0`
+ | ^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | origin.0;
+ | ~
error[E0609]: no field `2` on type `({integer}, {integer})`
--> $DIR/tuple-index-out-of-bounds.rs:12:11
|
LL | tuple.2;
- | ^
+ | ^ unknown field
error: aborting due to 2 previous errors
diff --git a/tests/ui/tuple/wrong_argument_ice-2.stderr b/tests/ui/tuple/wrong_argument_ice-2.stderr
index 412442092..a868adf41 100644
--- a/tests/ui/tuple/wrong_argument_ice-2.stderr
+++ b/tests/ui/tuple/wrong_argument_ice-2.stderr
@@ -14,6 +14,6 @@ help: wrap these arguments in parentheses to construct a tuple
LL | test((x.qux(), x.qux()));
| + +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0061`.
diff --git a/tests/ui/tuple/wrong_argument_ice-3.stderr b/tests/ui/tuple/wrong_argument_ice-3.stderr
index 8b9dac6e2..ce21751f3 100644
--- a/tests/ui/tuple/wrong_argument_ice-3.stderr
+++ b/tests/ui/tuple/wrong_argument_ice-3.stderr
@@ -19,6 +19,6 @@ LL - groups.push(new_group, vec![process]);
LL + groups.push(/* (Vec<String>, Vec<Process>) */);
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0061`.
diff --git a/tests/ui/tuple/wrong_argument_ice-4.stderr b/tests/ui/tuple/wrong_argument_ice-4.stderr
index 1fbf180c6..3c7d6699b 100644
--- a/tests/ui/tuple/wrong_argument_ice-4.stderr
+++ b/tests/ui/tuple/wrong_argument_ice-4.stderr
@@ -17,6 +17,6 @@ note: closure defined here
LL | (|| {})(|| {
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0057`.
diff --git a/tests/ui/tuple/wrong_argument_ice.stderr b/tests/ui/tuple/wrong_argument_ice.stderr
index 213ca8f88..6d0558d28 100644
--- a/tests/ui/tuple/wrong_argument_ice.stderr
+++ b/tests/ui/tuple/wrong_argument_ice.stderr
@@ -11,6 +11,6 @@ help: wrap these arguments in parentheses to construct a tuple
LL | self.acc.push_back((self.current_provides, self.current_requires));
| + +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0061`.
diff --git a/tests/ui/type-alias-enum-variants/incorrect-variant-form-through-Self-issue-58006.stderr b/tests/ui/type-alias-enum-variants/incorrect-variant-form-through-Self-issue-58006.stderr
index 6870b9d7d..2e6136eb9 100644
--- a/tests/ui/type-alias-enum-variants/incorrect-variant-form-through-Self-issue-58006.stderr
+++ b/tests/ui/type-alias-enum-variants/incorrect-variant-form-through-Self-issue-58006.stderr
@@ -4,6 +4,6 @@ error[E0533]: expected unit struct, unit variant or constant, found tuple varian
LL | Self::A => (),
| ^^^^^^^ not a unit struct, unit variant or constant
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0533`.
diff --git a/tests/ui/type-alias-enum-variants/no-type-application-on-aliased-enum-variant.stderr b/tests/ui/type-alias-enum-variants/no-type-application-on-aliased-enum-variant.stderr
index 51b1c8a10..3c143f342 100644
--- a/tests/ui/type-alias-enum-variants/no-type-application-on-aliased-enum-variant.stderr
+++ b/tests/ui/type-alias-enum-variants/no-type-application-on-aliased-enum-variant.stderr
@@ -6,6 +6,6 @@ LL | let _ = Alias::None::<u8>;
| |
| not allowed on this type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0109`.
diff --git a/tests/ui/type-alias-enum-variants/resolve-to-enum-variant-in-type-namespace-and-error.stderr b/tests/ui/type-alias-enum-variants/resolve-to-enum-variant-in-type-namespace-and-error.stderr
index f190bfb69..7ddcc318f 100644
--- a/tests/ui/type-alias-enum-variants/resolve-to-enum-variant-in-type-namespace-and-error.stderr
+++ b/tests/ui/type-alias-enum-variants/resolve-to-enum-variant-in-type-namespace-and-error.stderr
@@ -4,5 +4,5 @@ error: expected type, found variant `V`
LL | fn check() -> <E>::V {}
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr b/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr
index aa79b1a57..404e376e3 100644
--- a/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr
+++ b/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr
@@ -69,6 +69,6 @@ LL | | fn main() {}
| |____________^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/type-alias-impl-trait/assoc-type-const.rs b/tests/ui/type-alias-impl-trait/assoc-type-const.rs
index 62f66914e..e385fe045 100644
--- a/tests/ui/type-alias-impl-trait/assoc-type-const.rs
+++ b/tests/ui/type-alias-impl-trait/assoc-type-const.rs
@@ -1,7 +1,9 @@
// Tests that we properly detect defining usages when using
// const generics in an associated opaque type
-// check-pass
+// check-pass
+// revisions: current next
+//[next] compile-flags: -Znext-solver
#![feature(impl_trait_in_assoc_type)]
trait UnwrapItemsExt<'a, const C: usize> {
diff --git a/tests/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.stderr b/tests/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.stderr
index e594dc577..089c3e4fd 100644
--- a/tests/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.stderr
+++ b/tests/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.stderr
@@ -4,6 +4,6 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait,
LL | impl<'a, I> UnwrapItemsExt for I {
| ^^ unconstrained lifetime parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0207`.
diff --git a/tests/ui/type-alias-impl-trait/auto-trait-leakage2.stderr b/tests/ui/type-alias-impl-trait/auto-trait-leakage2.stderr
index d7247302d..2ed918eca 100644
--- a/tests/ui/type-alias-impl-trait/auto-trait-leakage2.stderr
+++ b/tests/ui/type-alias-impl-trait/auto-trait-leakage2.stderr
@@ -21,6 +21,6 @@ note: required by a bound in `is_send`
LL | fn is_send<T: Send>(_: T) {}
| ^^^^ required by this bound in `is_send`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr
index d47b1fe36..f6f754557 100644
--- a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr
+++ b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr
@@ -22,5 +22,5 @@ note: required by a bound in `is_send`
LL | fn is_send<T: Send>(_: T) {}
| ^^^^ required by this bound in `is_send`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/bounds-are-checked-2.stderr b/tests/ui/type-alias-impl-trait/bounds-are-checked-2.stderr
index 8678e9b33..20e478160 100644
--- a/tests/ui/type-alias-impl-trait/bounds-are-checked-2.stderr
+++ b/tests/ui/type-alias-impl-trait/bounds-are-checked-2.stderr
@@ -9,6 +9,6 @@ help: consider restricting type parameter `T`
LL | type X<T: std::clone::Clone> = impl Clone;
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias-impl-trait/bounds-are-checked.stderr b/tests/ui/type-alias-impl-trait/bounds-are-checked.stderr
index 962dedde0..ad1b9f19d 100644
--- a/tests/ui/type-alias-impl-trait/bounds-are-checked.stderr
+++ b/tests/ui/type-alias-impl-trait/bounds-are-checked.stderr
@@ -7,6 +7,6 @@ LL | type X<'a> = impl Into<&'static str> + From<&'a str>;
LL | t
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0792`.
diff --git a/tests/ui/type-alias-impl-trait/bounds-are-checked3.stderr b/tests/ui/type-alias-impl-trait/bounds-are-checked3.stderr
index a845cba77..bca88b5fa 100644
--- a/tests/ui/type-alias-impl-trait/bounds-are-checked3.stderr
+++ b/tests/ui/type-alias-impl-trait/bounds-are-checked3.stderr
@@ -15,6 +15,6 @@ help: consider further restricting this bound
LL | type Foo<T: Debug + std::fmt::Display> = (impl Debug, Struct<T>);
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias-impl-trait/coherence.stderr b/tests/ui/type-alias-impl-trait/coherence.stderr
index 36bbb985e..4462b70f7 100644
--- a/tests/ui/type-alias-impl-trait/coherence.stderr
+++ b/tests/ui/type-alias-impl-trait/coherence.stderr
@@ -9,6 +9,6 @@ LL | impl foreign_crate::ForeignTrait for AliasOfForeignType<()> {}
|
= note: define and implement a trait or new type instead
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0117`.
diff --git a/tests/ui/type-alias-impl-trait/coherence_cross_crate.stderr b/tests/ui/type-alias-impl-trait/coherence_cross_crate.stderr
index 63a3ce29c..893a27fac 100644
--- a/tests/ui/type-alias-impl-trait/coherence_cross_crate.stderr
+++ b/tests/ui/type-alias-impl-trait/coherence_cross_crate.stderr
@@ -8,6 +8,6 @@ LL | impl OtherTrait for i32 {}
|
= note: upstream crates may add a new impl of trait `coherence_cross_crate_trait_decl::SomeTrait` for type `i32` in future versions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/type-alias-impl-trait/coherence_different_hidden_ty.stderr b/tests/ui/type-alias-impl-trait/coherence_different_hidden_ty.stderr
index f2aee7986..ef170101b 100644
--- a/tests/ui/type-alias-impl-trait/coherence_different_hidden_ty.stderr
+++ b/tests/ui/type-alias-impl-trait/coherence_different_hidden_ty.stderr
@@ -7,6 +7,6 @@ LL |
LL | impl Trait for (u32, i32) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(TAIT, TAIT)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/type-alias-impl-trait/constrain_inputs_unsound.stderr b/tests/ui/type-alias-impl-trait/constrain_inputs_unsound.stderr
index d5fc46cb1..948bd6dea 100644
--- a/tests/ui/type-alias-impl-trait/constrain_inputs_unsound.stderr
+++ b/tests/ui/type-alias-impl-trait/constrain_inputs_unsound.stderr
@@ -4,6 +4,6 @@ error[E0582]: binding for associated type `Output` references lifetime `'a`, whi
LL | type MalformedTy = dyn for<'a> Callable<Gal<&'a ()>, Output = &'a str>;
| ^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0582`.
diff --git a/tests/ui/type-alias-impl-trait/cross_inference.rs b/tests/ui/type-alias-impl-trait/cross_inference.rs
index 5eaf0ddda..c5ef75fee 100644
--- a/tests/ui/type-alias-impl-trait/cross_inference.rs
+++ b/tests/ui/type-alias-impl-trait/cross_inference.rs
@@ -1,5 +1,5 @@
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// check-pass
#![feature(type_alias_impl_trait)]
diff --git a/tests/ui/type-alias-impl-trait/declared_but_never_defined.stderr b/tests/ui/type-alias-impl-trait/declared_but_never_defined.stderr
index 60bc24320..772f487d9 100644
--- a/tests/ui/type-alias-impl-trait/declared_but_never_defined.stderr
+++ b/tests/ui/type-alias-impl-trait/declared_but_never_defined.stderr
@@ -6,5 +6,5 @@ LL | type Bar = impl std::fmt::Debug;
|
= note: `Bar` must be used in combination with a concrete type within the same module
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/different_defining_uses.stderr b/tests/ui/type-alias-impl-trait/different_defining_uses.stderr
index a8b4cd7af..9e6169b2a 100644
--- a/tests/ui/type-alias-impl-trait/different_defining_uses.stderr
+++ b/tests/ui/type-alias-impl-trait/different_defining_uses.stderr
@@ -10,5 +10,5 @@ note: previous use here
LL | ""
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/different_defining_uses_never_type-2.stderr b/tests/ui/type-alias-impl-trait/different_defining_uses_never_type-2.stderr
index b138f9d5c..e5cee49cf 100644
--- a/tests/ui/type-alias-impl-trait/different_defining_uses_never_type-2.stderr
+++ b/tests/ui/type-alias-impl-trait/different_defining_uses_never_type-2.stderr
@@ -10,5 +10,5 @@ note: previous use here
LL | if { return } {
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/different_defining_uses_never_type-3.stderr b/tests/ui/type-alias-impl-trait/different_defining_uses_never_type-3.stderr
index 8fc2e2284..0fdcb81f6 100644
--- a/tests/ui/type-alias-impl-trait/different_defining_uses_never_type-3.stderr
+++ b/tests/ui/type-alias-impl-trait/different_defining_uses_never_type-3.stderr
@@ -10,5 +10,5 @@ note: previous use here
LL | let x: Tait<T> = ();
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/different_defining_uses_never_type.stderr b/tests/ui/type-alias-impl-trait/different_defining_uses_never_type.stderr
index 09dadb0af..2a77eb4c4 100644
--- a/tests/ui/type-alias-impl-trait/different_defining_uses_never_type.stderr
+++ b/tests/ui/type-alias-impl-trait/different_defining_uses_never_type.stderr
@@ -10,5 +10,5 @@ note: previous use here
LL | ""
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/different_defining_uses_never_type3.stderr b/tests/ui/type-alias-impl-trait/different_defining_uses_never_type3.stderr
index 146a57cbb..abf4a0d24 100644
--- a/tests/ui/type-alias-impl-trait/different_defining_uses_never_type3.stderr
+++ b/tests/ui/type-alias-impl-trait/different_defining_uses_never_type3.stderr
@@ -10,5 +10,5 @@ note: previous use here
LL | fn one() -> Tait { One }
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/different_lifetimes_defining_uses.stderr b/tests/ui/type-alias-impl-trait/different_lifetimes_defining_uses.stderr
index 0c50a84e8..07ba17ad2 100644
--- a/tests/ui/type-alias-impl-trait/different_lifetimes_defining_uses.stderr
+++ b/tests/ui/type-alias-impl-trait/different_lifetimes_defining_uses.stderr
@@ -10,5 +10,5 @@ note: previous use here
LL | a
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/escaping-bound-var.stderr b/tests/ui/type-alias-impl-trait/escaping-bound-var.stderr
index 8205a60cc..7dce067d3 100644
--- a/tests/ui/type-alias-impl-trait/escaping-bound-var.stderr
+++ b/tests/ui/type-alias-impl-trait/escaping-bound-var.stderr
@@ -4,5 +4,5 @@ error: cannot capture late-bound lifetime in type alias impl trait
LL | pub type Foo = impl for<'a> Trait<'a, Assoc = impl Test<'a>>;
| -- lifetime defined here ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/fallback.stderr b/tests/ui/type-alias-impl-trait/fallback.stderr
index e767bfdb0..5250252a0 100644
--- a/tests/ui/type-alias-impl-trait/fallback.stderr
+++ b/tests/ui/type-alias-impl-trait/fallback.stderr
@@ -12,6 +12,6 @@ help: consider specifying the generic argument
LL | Wrapper::<T>::Second
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/type-alias-impl-trait/future.stderr b/tests/ui/type-alias-impl-trait/future.stderr
index 7e76c120a..b20073fcd 100644
--- a/tests/ui/type-alias-impl-trait/future.stderr
+++ b/tests/ui/type-alias-impl-trait/future.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `B`
LL | type FooFuture<B: Bar> = impl Future<Output = ()>;
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias-impl-trait/generic_different_defining_uses.stderr b/tests/ui/type-alias-impl-trait/generic_different_defining_uses.stderr
index 47ac33462..72271d158 100644
--- a/tests/ui/type-alias-impl-trait/generic_different_defining_uses.stderr
+++ b/tests/ui/type-alias-impl-trait/generic_different_defining_uses.stderr
@@ -10,5 +10,5 @@ note: previous use here
LL | std::iter::once(t)
| ^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/generic_duplicate_param_use2.stderr b/tests/ui/type-alias-impl-trait/generic_duplicate_param_use2.stderr
index 3dbfff745..d2d6380b6 100644
--- a/tests/ui/type-alias-impl-trait/generic_duplicate_param_use2.stderr
+++ b/tests/ui/type-alias-impl-trait/generic_duplicate_param_use2.stderr
@@ -9,6 +9,6 @@ help: consider restricting type parameter `T`
LL | type Two<T: std::fmt::Debug, U> = impl Debug;
| +++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias-impl-trait/generic_duplicate_param_use4.stderr b/tests/ui/type-alias-impl-trait/generic_duplicate_param_use4.stderr
index 21a5369d9..2338dbd52 100644
--- a/tests/ui/type-alias-impl-trait/generic_duplicate_param_use4.stderr
+++ b/tests/ui/type-alias-impl-trait/generic_duplicate_param_use4.stderr
@@ -9,6 +9,6 @@ help: consider restricting type parameter `U`
LL | type Two<T, U: std::fmt::Debug> = impl Debug;
| +++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias-impl-trait/hidden_behind_projection_behind_struct_field.stderr b/tests/ui/type-alias-impl-trait/hidden_behind_projection_behind_struct_field.stderr
index 648efd1cb..00aedfae4 100644
--- a/tests/ui/type-alias-impl-trait/hidden_behind_projection_behind_struct_field.stderr
+++ b/tests/ui/type-alias-impl-trait/hidden_behind_projection_behind_struct_field.stderr
@@ -15,6 +15,6 @@ note: this item must have the opaque type in its signature in order to be able t
LL | fn foo() -> Foo<Bar> {
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/type-alias-impl-trait/hidden_type_mismatch.stderr b/tests/ui/type-alias-impl-trait/hidden_type_mismatch.stderr
index 85e8a600c..5a6998f41 100644
--- a/tests/ui/type-alias-impl-trait/hidden_type_mismatch.stderr
+++ b/tests/ui/type-alias-impl-trait/hidden_type_mismatch.stderr
@@ -10,5 +10,5 @@ note: previous use here
LL | pub type Tait = impl Copy + From<Bar<()>> + Into<Bar<()>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/higher_kinded_params2.stderr b/tests/ui/type-alias-impl-trait/higher_kinded_params2.stderr
index 39f584dd4..e037dede2 100644
--- a/tests/ui/type-alias-impl-trait/higher_kinded_params2.stderr
+++ b/tests/ui/type-alias-impl-trait/higher_kinded_params2.stderr
@@ -11,5 +11,5 @@ note: this item must mention the opaque type in its signature in order to be abl
LL | fn successors(&self, mut f: for<'x> fn(&'x ()) -> <&'x A as B>::C) -> Successors<'_> {
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/impl-with-unconstrained-param.stderr b/tests/ui/type-alias-impl-trait/impl-with-unconstrained-param.stderr
index 8cf8fb1d1..137a4db81 100644
--- a/tests/ui/type-alias-impl-trait/impl-with-unconstrained-param.stderr
+++ b/tests/ui/type-alias-impl-trait/impl-with-unconstrained-param.stderr
@@ -4,6 +4,6 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self
LL | impl<T> X for () {
| ^ unconstrained type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0207`.
diff --git a/tests/ui/type-alias-impl-trait/impl_for_weak_alias.stderr b/tests/ui/type-alias-impl-trait/impl_for_weak_alias.stderr
index c312ee7de..a13e9eaab 100644
--- a/tests/ui/type-alias-impl-trait/impl_for_weak_alias.stderr
+++ b/tests/ui/type-alias-impl-trait/impl_for_weak_alias.stderr
@@ -6,6 +6,6 @@ LL | impl Trait for Alias {}
|
= note: a trait object implements `Trait` if and only if `Trait` is one of the trait object's trait bounds
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0321`.
diff --git a/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound.stderr b/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound.stderr
index 1c83105a1..9840bcef7 100644
--- a/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound.stderr
+++ b/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `is_yay`
LL | fn is_yay<T: Yay>() { }
| ^^^ required by this bound in `is_yay`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound2.stderr b/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound2.stderr
index a6440f02c..2259aa7bb 100644
--- a/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound2.stderr
+++ b/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound2.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `is_yay`
LL | fn is_yay<T: Yay>() { }
| ^^^ required by this bound in `is_yay`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias-impl-trait/implied_bounds.stderr b/tests/ui/type-alias-impl-trait/implied_bounds.stderr
index 6f11b6663..64a203fe4 100644
--- a/tests/ui/type-alias-impl-trait/implied_bounds.stderr
+++ b/tests/ui/type-alias-impl-trait/implied_bounds.stderr
@@ -12,5 +12,5 @@ LL | x
|
= help: consider adding the following bound: `'a: 'b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/implied_bounds_closure.stderr b/tests/ui/type-alias-impl-trait/implied_bounds_closure.stderr
index 151564c3b..f3f9962f1 100644
--- a/tests/ui/type-alias-impl-trait/implied_bounds_closure.stderr
+++ b/tests/ui/type-alias-impl-trait/implied_bounds_closure.stderr
@@ -7,5 +7,5 @@ LL | let t = into_impl(x);
LL | helper(|_| t)
| ^ returning this value requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/implied_bounds_from_types.stderr b/tests/ui/type-alias-impl-trait/implied_bounds_from_types.stderr
index cbc5e6073..5967a9468 100644
--- a/tests/ui/type-alias-impl-trait/implied_bounds_from_types.stderr
+++ b/tests/ui/type-alias-impl-trait/implied_bounds_from_types.stderr
@@ -12,5 +12,5 @@ LL | x
|
= help: consider adding the following bound: `'a: 'b`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/implied_lifetime_wf_check4_static.stderr b/tests/ui/type-alias-impl-trait/implied_lifetime_wf_check4_static.stderr
index 81bc64bc3..ff11aee40 100644
--- a/tests/ui/type-alias-impl-trait/implied_lifetime_wf_check4_static.stderr
+++ b/tests/ui/type-alias-impl-trait/implied_lifetime_wf_check4_static.stderr
@@ -12,6 +12,6 @@ help: consider adding an explicit lifetime bound
LL | type Ty<A: 'static> = impl Sized + 'static;
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0310`.
diff --git a/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.stderr b/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.stderr
index 66e478315..9bffa94fd 100644
--- a/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.stderr
+++ b/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.stderr
@@ -13,6 +13,6 @@ help: to declare that `impl PlusOne` captures `'a`, you can add an explicit `'a`
LL | fn test<'a>(y: &'a mut i32) -> impl PlusOne + 'a {
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0700`.
diff --git a/tests/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.stderr b/tests/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.stderr
index b93ea955c..f0cf681d8 100644
--- a/tests/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.stderr
+++ b/tests/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.stderr
@@ -7,6 +7,6 @@ LL | impl<F> FnOnce<()> for &F {
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
= note: only traits defined in the current crate can be implemented for a type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/type-alias-impl-trait/incomplete-inference.stderr b/tests/ui/type-alias-impl-trait/incomplete-inference.stderr
index 9a0e71b4e..3976a43a8 100644
--- a/tests/ui/type-alias-impl-trait/incomplete-inference.stderr
+++ b/tests/ui/type-alias-impl-trait/incomplete-inference.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic argument
LL | None::<T>
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs b/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs
index f6cbbf04d..6a2ee761e 100644
--- a/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs
+++ b/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs
@@ -1,6 +1,5 @@
// edition: 2021
// build-fail
-//~^^ ERROR cycle detected when computing layout of
#![feature(impl_trait_in_assoc_type)]
@@ -21,6 +20,7 @@ impl Recur for () {
fn recur(self) -> Self::Recur {
async move { recur(self).await; }
+ //~^ ERROR cycle detected when computing layout of
}
}
diff --git a/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.stderr b/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.stderr
index 2063becdb..11d9cd0af 100644
--- a/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.stderr
+++ b/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.stderr
@@ -1,19 +1,27 @@
-error[E0391]: cycle detected when computing layout of `{async block@$DIR/indirect-recursion-issue-112047.rs:23:9: 23:42}`
+error[E0391]: cycle detected when computing layout of `{async block@$DIR/indirect-recursion-issue-112047.rs:22:9: 22:42}`
+ --> $DIR/indirect-recursion-issue-112047.rs:22:22
|
- = note: ...which requires computing layout of `core::mem::maybe_uninit::MaybeUninit<{async fn body@$DIR/indirect-recursion-issue-112047.rs:15:31: 17:2}>`...
- = note: ...which requires computing layout of `core::mem::manually_drop::ManuallyDrop<{async fn body@$DIR/indirect-recursion-issue-112047.rs:15:31: 17:2}>`...
- = note: ...which requires computing layout of `{async fn body@$DIR/indirect-recursion-issue-112047.rs:15:31: 17:2}`...
+LL | async move { recur(self).await; }
+ | ^^^^^^^^^^^^^^^^^
+ |
+ = note: ...which requires computing layout of `core::mem::maybe_uninit::MaybeUninit<{async fn body@$DIR/indirect-recursion-issue-112047.rs:14:31: 16:2}>`...
+ = note: ...which requires computing layout of `core::mem::manually_drop::ManuallyDrop<{async fn body@$DIR/indirect-recursion-issue-112047.rs:14:31: 16:2}>`...
+note: ...which requires computing layout of `{async fn body@$DIR/indirect-recursion-issue-112047.rs:14:31: 16:2}`...
+ --> $DIR/indirect-recursion-issue-112047.rs:15:5
+ |
+LL | t.recur().await;
+ | ^^^^^^^^^^^^^^^
= note: ...which requires computing layout of `core::mem::maybe_uninit::MaybeUninit<<() as Recur>::Recur>`...
- = note: ...which requires computing layout of `core::mem::maybe_uninit::MaybeUninit<{async block@$DIR/indirect-recursion-issue-112047.rs:23:9: 23:42}>`...
- = note: ...which requires computing layout of `core::mem::manually_drop::ManuallyDrop<{async block@$DIR/indirect-recursion-issue-112047.rs:23:9: 23:42}>`...
- = note: ...which again requires computing layout of `{async block@$DIR/indirect-recursion-issue-112047.rs:23:9: 23:42}`, completing the cycle
-note: cycle used when elaborating drops for `<impl at $DIR/indirect-recursion-issue-112047.rs:19:1: 19:18>::recur`
- --> $DIR/indirect-recursion-issue-112047.rs:22:5
+ = note: ...which requires computing layout of `core::mem::maybe_uninit::MaybeUninit<{async block@$DIR/indirect-recursion-issue-112047.rs:22:9: 22:42}>`...
+ = note: ...which requires computing layout of `core::mem::manually_drop::ManuallyDrop<{async block@$DIR/indirect-recursion-issue-112047.rs:22:9: 22:42}>`...
+ = note: ...which again requires computing layout of `{async block@$DIR/indirect-recursion-issue-112047.rs:22:9: 22:42}`, completing the cycle
+note: cycle used when elaborating drops for `<impl at $DIR/indirect-recursion-issue-112047.rs:18:1: 18:18>::recur`
+ --> $DIR/indirect-recursion-issue-112047.rs:21:5
|
LL | fn recur(self) -> Self::Recur {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/type-alias-impl-trait/inference-cycle.stderr b/tests/ui/type-alias-impl-trait/inference-cycle.stderr
index ef7abe588..fd7488fa2 100644
--- a/tests/ui/type-alias-impl-trait/inference-cycle.stderr
+++ b/tests/ui/type-alias-impl-trait/inference-cycle.stderr
@@ -22,5 +22,5 @@ note: required by a bound in `is_send`
LL | fn is_send<T: Send>(_: T) {}
| ^^^^ required by this bound in `is_send`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.stderr b/tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.stderr
index 50ae6f386..d820df472 100644
--- a/tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.stderr
+++ b/tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.stderr
@@ -4,6 +4,6 @@ error[E0720]: cannot resolve opaque type
LL | type T = impl Copy;
| ^^^^^^^^^ cannot resolve opaque type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0720`.
diff --git a/tests/ui/type-alias-impl-trait/invalid_impl_trait_in_assoc_ty.stderr b/tests/ui/type-alias-impl-trait/invalid_impl_trait_in_assoc_ty.stderr
index 6ec5d13f8..169d8e41d 100644
--- a/tests/ui/type-alias-impl-trait/invalid_impl_trait_in_assoc_ty.stderr
+++ b/tests/ui/type-alias-impl-trait/invalid_impl_trait_in_assoc_ty.stderr
@@ -17,6 +17,6 @@ note: this item must have the opaque type in its signature in order to be able t
LL | fn bar() {
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/type-alias-impl-trait/issue-104817.stock.stderr b/tests/ui/type-alias-impl-trait/issue-104817.stock.stderr
index 47bae8bd1..41c5206d9 100644
--- a/tests/ui/type-alias-impl-trait/issue-104817.stock.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-104817.stock.stderr
@@ -6,6 +6,6 @@ LL | impl<T: Send> AnotherTrait for T {}
LL | impl AnotherTrait for OpaqueType {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `OpaqueType`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/type-alias-impl-trait/issue-109054.stderr b/tests/ui/type-alias-impl-trait/issue-109054.stderr
index a611b9fe4..a099b7d8b 100644
--- a/tests/ui/type-alias-impl-trait/issue-109054.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-109054.stderr
@@ -7,6 +7,6 @@ LL | type ReturnType<'a> = impl std::future::Future<Output = u32> + 'a;
LL | &inner
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0792`.
diff --git a/tests/ui/type-alias-impl-trait/issue-52843-closure-constrain.stderr b/tests/ui/type-alias-impl-trait/issue-52843-closure-constrain.stderr
index 4c5fd2255..4570ce8e4 100644
--- a/tests/ui/type-alias-impl-trait/issue-52843-closure-constrain.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-52843-closure-constrain.stderr
@@ -10,5 +10,5 @@ note: previous use here
LL | fn _unused() -> Opaque { String::new() }
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/issue-52843.stderr b/tests/ui/type-alias-impl-trait/issue-52843.stderr
index acd40f980..ea4c5297a 100644
--- a/tests/ui/type-alias-impl-trait/issue-52843.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-52843.stderr
@@ -9,6 +9,6 @@ help: consider restricting type parameter `T`
LL | type Foo<T: std::default::Default> = impl Default;
| +++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias-impl-trait/issue-53092.stderr b/tests/ui/type-alias-impl-trait/issue-53092.stderr
index 2109cf8a7..8605a0981 100644
--- a/tests/ui/type-alias-impl-trait/issue-53092.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-53092.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `U`
LL | type Bug<T, U: std::convert::From<T>> = impl Fn(T) -> U + Copy;
| +++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias-impl-trait/issue-53096.stderr b/tests/ui/type-alias-impl-trait/issue-53096.stderr
index 0af3a75f8..fba1802ef 100644
--- a/tests/ui/type-alias-impl-trait/issue-53096.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-53096.stderr
@@ -4,5 +4,5 @@ error: fatal error triggered by #[rustc_error]
LL | fn main() {}
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/issue-53598.stderr b/tests/ui/type-alias-impl-trait/issue-53598.stderr
index f8b8201e2..a31aabedb 100644
--- a/tests/ui/type-alias-impl-trait/issue-53598.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-53598.stderr
@@ -4,5 +4,5 @@ error: type parameter `T` is part of concrete type but not used in parameter lis
LL | S::<T>(Default::default())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/issue-57700.stderr b/tests/ui/type-alias-impl-trait/issue-57700.stderr
index 31b6df5d4..7efb05f40 100644
--- a/tests/ui/type-alias-impl-trait/issue-57700.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-57700.stderr
@@ -4,5 +4,5 @@ error: type parameter `impl Deref<Target = Self>` is part of concrete type but n
LL | self
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/issue-57961.stderr b/tests/ui/type-alias-impl-trait/issue-57961.stderr
index 8d11b4888..314296b5b 100644
--- a/tests/ui/type-alias-impl-trait/issue-57961.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-57961.stderr
@@ -15,6 +15,6 @@ note: required by a bound in `Foo::Bar`
LL | type Bar: Iterator<Item = X>;
| ^^^^^^^^ required by this bound in `Foo::Bar`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/type-alias-impl-trait/issue-60407.stderr b/tests/ui/type-alias-impl-trait/issue-60407.stderr
index fecee2779..583156b9f 100644
--- a/tests/ui/type-alias-impl-trait/issue-60407.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-60407.stderr
@@ -4,5 +4,5 @@ error: fatal error triggered by #[rustc_error]
LL | fn main() {
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/issue-65384.stderr b/tests/ui/type-alias-impl-trait/issue-65384.stderr
index f6692ae32..6accd45ba 100644
--- a/tests/ui/type-alias-impl-trait/issue-65384.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-65384.stderr
@@ -7,6 +7,6 @@ LL | impl MyTrait for () {}
LL | impl MyTrait for Bar {}
| ^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.stderr b/tests/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.stderr
index b7af3f06d..aa7bcbf6a 100644
--- a/tests/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.stderr
@@ -14,6 +14,6 @@ help: consider introducing lifetime `'a` here
LL | type Return<'a, A> = impl WithAssoc<A, AssocType = impl SomeTrait + 'a>;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0261`.
diff --git a/tests/ui/type-alias-impl-trait/issue-70121.stderr b/tests/ui/type-alias-impl-trait/issue-70121.stderr
index 30c3ddd86..d6ab26e30 100644
--- a/tests/ui/type-alias-impl-trait/issue-70121.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-70121.stderr
@@ -11,5 +11,5 @@ note: this item must mention the opaque type in its signature in order to be abl
LL | pub fn kazusa<'a>() -> <&'a () as Tr>::Item {
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/issue-74244.stderr b/tests/ui/type-alias-impl-trait/issue-74244.stderr
index ff6bacd27..f5ca56bac 100644
--- a/tests/ui/type-alias-impl-trait/issue-74244.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-74244.stderr
@@ -4,6 +4,6 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self
LL | impl<T> Allocator for DefaultAllocator {
| ^ unconstrained type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0207`.
diff --git a/tests/ui/type-alias-impl-trait/issue-74280.stderr b/tests/ui/type-alias-impl-trait/issue-74280.stderr
index 66886db6e..c09efbe4e 100644
--- a/tests/ui/type-alias-impl-trait/issue-74280.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-74280.stderr
@@ -7,6 +7,6 @@ LL | let y = || -> Test { () };
LL | 7
| ^ expected `()`, found integer
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.rs b/tests/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.rs
index 386b77d4d..af1c18bbb 100644
--- a/tests/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.rs
+++ b/tests/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.rs
@@ -2,7 +2,7 @@
// Tests that we don't ICE when we have a trait impl on a TAIT.
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// check-pass
#![feature(type_alias_impl_trait)]
diff --git a/tests/ui/type-alias-impl-trait/issue-77179.stderr b/tests/ui/type-alias-impl-trait/issue-77179.stderr
index 053546e4b..68dd6570d 100644
--- a/tests/ui/type-alias-impl-trait/issue-77179.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-77179.stderr
@@ -7,6 +7,6 @@ LL | fn test() -> Pointer<_> {
| | not allowed in type signatures
| help: replace with the correct return type: `Pointer<i32>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/ui/type-alias-impl-trait/issue-78450.rs b/tests/ui/type-alias-impl-trait/issue-78450.rs
index 2a984c1ed..c51dfb678 100644
--- a/tests/ui/type-alias-impl-trait/issue-78450.rs
+++ b/tests/ui/type-alias-impl-trait/issue-78450.rs
@@ -1,4 +1,6 @@
// check-pass
+// revisions: current next
+//[next] compile-flags: -Znext-solver
#![feature(impl_trait_in_assoc_type)]
diff --git a/tests/ui/type-alias-impl-trait/issue-84660-unsoundness.stderr b/tests/ui/type-alias-impl-trait/issue-84660-unsoundness.stderr
index 6a75e1bd2..461da20f3 100644
--- a/tests/ui/type-alias-impl-trait/issue-84660-unsoundness.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-84660-unsoundness.stderr
@@ -7,6 +7,6 @@ LL | impl<In, Out> Trait<Bar, In> for Out {
LL | impl<In, Out> Trait<(), In> for Out {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/type-alias-impl-trait/issue-89686.stderr b/tests/ui/type-alias-impl-trait/issue-89686.stderr
index b636ada8b..91d71339a 100644
--- a/tests/ui/type-alias-impl-trait/issue-89686.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-89686.stderr
@@ -9,6 +9,6 @@ help: consider restricting type parameter `T`
LL | type G<'a, T: Trait> = impl Future<Output = ()>;
| +++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias-impl-trait/issue-90400-1.stderr b/tests/ui/type-alias-impl-trait/issue-90400-1.stderr
index ead28769f..bc233a532 100644
--- a/tests/ui/type-alias-impl-trait/issue-90400-1.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-90400-1.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `B`
LL | type FooFn<B: Bar> = impl FnOnce();
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias-impl-trait/issue-90400-2.stderr b/tests/ui/type-alias-impl-trait/issue-90400-2.stderr
index 0c45046f5..37abb3fe0 100644
--- a/tests/ui/type-alias-impl-trait/issue-90400-2.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-90400-2.stderr
@@ -16,6 +16,6 @@ help: consider restricting type parameter `B`
LL | type FooFn<B: Bar> = impl Baz;
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias-impl-trait/issue-94429.stderr b/tests/ui/type-alias-impl-trait/issue-94429.stderr
index 360ecfa61..5d081e6b1 100644
--- a/tests/ui/type-alias-impl-trait/issue-94429.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-94429.stderr
@@ -4,6 +4,6 @@ error[E0271]: type mismatch resolving `<{coroutine@$DIR/issue-94429.rs:17:9: 17:
LL | fn run(&mut self) -> Self::Coro {
| ^^^^^^^^^^ expected integer, found `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/type-alias-impl-trait/issue-96572-unconstrained-mismatch.stderr b/tests/ui/type-alias-impl-trait/issue-96572-unconstrained-mismatch.stderr
index 728244a18..4f4ca1041 100644
--- a/tests/ui/type-alias-impl-trait/issue-96572-unconstrained-mismatch.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-96572-unconstrained-mismatch.stderr
@@ -10,6 +10,6 @@ LL | Some((a, b, c)) => (),
= note: expected tuple `(u32, u32)`
found tuple `(_, _, _)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/type-alias-impl-trait/issue-98604.stderr b/tests/ui/type-alias-impl-trait/issue-98604.stderr
index af758d809..2390b7253 100644
--- a/tests/ui/type-alias-impl-trait/issue-98604.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-98604.stderr
@@ -6,6 +6,6 @@ LL | Box::new(test) as AsyncFnPtr;
|
= note: required for the cast from `Box<fn() -> impl Future<Output = ()> {test}>` to `Box<(dyn Fn() -> Pin<Box<(dyn Future<Output = ()> + 'static)>> + 'static)>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/type-alias-impl-trait/issue-98608.stderr b/tests/ui/type-alias-impl-trait/issue-98608.stderr
index 9b6510083..d5c56636f 100644
--- a/tests/ui/type-alias-impl-trait/issue-98608.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-98608.stderr
@@ -11,6 +11,6 @@ LL | let b: Box<dyn Fn() -> Box<u8>> = Box::new(hi);
found opaque type `impl Sized`
= note: required for the cast from `Box<fn() -> impl Sized {hi}>` to `Box<dyn Fn() -> Box<u8>>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/type-alias-impl-trait/missing_lifetime_bound.stderr b/tests/ui/type-alias-impl-trait/missing_lifetime_bound.stderr
index 6bcae6e53..03cc943d5 100644
--- a/tests/ui/type-alias-impl-trait/missing_lifetime_bound.stderr
+++ b/tests/ui/type-alias-impl-trait/missing_lifetime_bound.stderr
@@ -9,6 +9,6 @@ LL | fn defining<'a, T>(x: &'a i32) -> Opaque<T> { x }
| |
| hidden type `&'a i32` captures the lifetime `'a` as defined here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0700`.
diff --git a/tests/ui/type-alias-impl-trait/multi-error.stderr b/tests/ui/type-alias-impl-trait/multi-error.stderr
index b2de2effe..b0e6d13b0 100644
--- a/tests/ui/type-alias-impl-trait/multi-error.stderr
+++ b/tests/ui/type-alias-impl-trait/multi-error.stderr
@@ -10,6 +10,6 @@ note: for this opaque type
LL | type Bar<T> = impl Sized;
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0792`.
diff --git a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-infer.stderr b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-infer.stderr
index 278117009..b050b08a8 100644
--- a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-infer.stderr
+++ b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-infer.stderr
@@ -7,5 +7,5 @@ LL | (42_i64, 60)
| expected `i64`, got `i32`
| this expression supplies two conflicting concrete types for the same opaque type
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.stderr b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.stderr
index 81e603e23..552cf3fda 100644
--- a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.stderr
+++ b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.stderr
@@ -7,5 +7,5 @@ LL | (i, i)
| expected `&'a i32`, got `&'b i32`
| this expression supplies two conflicting concrete types for the same opaque type
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.stderr b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.stderr
index 66a6b0bbf..b5f380746 100644
--- a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.stderr
+++ b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.stderr
@@ -10,6 +10,6 @@ help: consider introducing a `where` clause, but there might be an alternative b
LL | fn f<A, B: 'static>(a: &'static A, b: B) -> (X<A, B>, X<B, A>) where &'static B: From<&A> {
| ++++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn2.stderr b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn2.stderr
index 0f752212a..c7a4b2115 100644
--- a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn2.stderr
+++ b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn2.stderr
@@ -7,5 +7,5 @@ LL | (a.clone(), a)
| expected `A`, got `B`
| this expression supplies two conflicting concrete types for the same opaque type
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn3.stderr b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn3.stderr
index bbe709dcc..c3128ea6f 100644
--- a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn3.stderr
+++ b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn3.stderr
@@ -13,6 +13,6 @@ LL | (a, b)
= note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
= note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/type-alias-impl-trait/mututally-recursive-overflow.stderr b/tests/ui/type-alias-impl-trait/mututally-recursive-overflow.stderr
index 49c59f7eb..cf6e42bc7 100644
--- a/tests/ui/type-alias-impl-trait/mututally-recursive-overflow.stderr
+++ b/tests/ui/type-alias-impl-trait/mututally-recursive-overflow.stderr
@@ -1,5 +1,5 @@
error[E0275]: overflow evaluating the requirement `<() as B>::Assoc == _`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/type-alias-impl-trait/nested-tait-inference.stderr b/tests/ui/type-alias-impl-trait/nested-tait-inference.stderr
index 62db019ed..172ecded7 100644
--- a/tests/ui/type-alias-impl-trait/nested-tait-inference.stderr
+++ b/tests/ui/type-alias-impl-trait/nested-tait-inference.stderr
@@ -9,6 +9,6 @@ LL | ()
|
= help: the trait `Foo<()>` is implemented for `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias-impl-trait/nested-tait-inference2.stderr b/tests/ui/type-alias-impl-trait/nested-tait-inference2.stderr
index dccf84362..c549ca5b2 100644
--- a/tests/ui/type-alias-impl-trait/nested-tait-inference2.stderr
+++ b/tests/ui/type-alias-impl-trait/nested-tait-inference2.stderr
@@ -11,6 +11,6 @@ LL | ()
<() as Foo<u32>>
<() as Foo<()>>
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias-impl-trait/nested-tait-inference3.stderr b/tests/ui/type-alias-impl-trait/nested-tait-inference3.stderr
index b1d947a9c..ce5d30370 100644
--- a/tests/ui/type-alias-impl-trait/nested-tait-inference3.stderr
+++ b/tests/ui/type-alias-impl-trait/nested-tait-inference3.stderr
@@ -6,5 +6,5 @@ LL | type FooX = impl Debug;
|
= note: `FooX` must be used in combination with a concrete type within the same module
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/nested.stderr b/tests/ui/type-alias-impl-trait/nested.stderr
index 732af5c0b..a19d4c4eb 100644
--- a/tests/ui/type-alias-impl-trait/nested.stderr
+++ b/tests/ui/type-alias-impl-trait/nested.stderr
@@ -7,6 +7,6 @@ LL | println!("{:?}", bar());
= help: the trait `Debug` is not implemented for `Bar`
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias-impl-trait/nested_type_alias_impl_trait.stderr b/tests/ui/type-alias-impl-trait/nested_type_alias_impl_trait.stderr
index fa6ecf68d..3e67a162f 100644
--- a/tests/ui/type-alias-impl-trait/nested_type_alias_impl_trait.stderr
+++ b/tests/ui/type-alias-impl-trait/nested_type_alias_impl_trait.stderr
@@ -15,5 +15,5 @@ note: opaque type being used as hidden type
LL | pub type Foo = impl Debug;
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/no_inferrable_concrete_type.stderr b/tests/ui/type-alias-impl-trait/no_inferrable_concrete_type.stderr
index f3e8ae9c7..fabc80c0a 100644
--- a/tests/ui/type-alias-impl-trait/no_inferrable_concrete_type.stderr
+++ b/tests/ui/type-alias-impl-trait/no_inferrable_concrete_type.stderr
@@ -6,5 +6,5 @@ LL | pub type Foo = impl Copy;
|
= note: `Foo` must be used in combination with a concrete type within the same module
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/non-defining-method.stderr b/tests/ui/type-alias-impl-trait/non-defining-method.stderr
index ed5590f9d..2ba4c90a1 100644
--- a/tests/ui/type-alias-impl-trait/non-defining-method.stderr
+++ b/tests/ui/type-alias-impl-trait/non-defining-method.stderr
@@ -10,6 +10,6 @@ note: for this opaque type
LL | type Bar<T> = impl Sized;
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0792`.
diff --git a/tests/ui/type-alias-impl-trait/normalize-hidden-types.rs b/tests/ui/type-alias-impl-trait/normalize-hidden-types.rs
index 8d8054644..371cac6da 100644
--- a/tests/ui/type-alias-impl-trait/normalize-hidden-types.rs
+++ b/tests/ui/type-alias-impl-trait/normalize-hidden-types.rs
@@ -1,7 +1,7 @@
// Regression test for #112691
//
// revisions: current next
-// [next] compile-flags: -Ztrait-solver=next
+// [next] compile-flags: -Znext-solver
// [next] check-pass
// [current]: known-bug: #112691
diff --git a/tests/ui/type-alias-impl-trait/not-matching-trait-refs-isnt-defining.stderr b/tests/ui/type-alias-impl-trait/not-matching-trait-refs-isnt-defining.stderr
index a621bb519..d4528fb76 100644
--- a/tests/ui/type-alias-impl-trait/not-matching-trait-refs-isnt-defining.stderr
+++ b/tests/ui/type-alias-impl-trait/not-matching-trait-refs-isnt-defining.stderr
@@ -17,6 +17,6 @@ note: this item must have the opaque type in its signature in order to be able t
LL | fn test() -> <() as Foo<NoOpaques>>::Assoc {
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/type-alias-impl-trait/not_well_formed.stderr b/tests/ui/type-alias-impl-trait/not_well_formed.stderr
index b267e6a75..dbd80ffa4 100644
--- a/tests/ui/type-alias-impl-trait/not_well_formed.stderr
+++ b/tests/ui/type-alias-impl-trait/not_well_formed.stderr
@@ -9,6 +9,6 @@ help: consider restricting type parameter `V`
LL | type Foo<V: TraitWithAssoc> = impl Trait<V::Assoc>;
| ++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0220`.
diff --git a/tests/ui/type-alias-impl-trait/recursive-fn-tait.stderr b/tests/ui/type-alias-impl-trait/recursive-fn-tait.stderr
index b2898a211..e8925b9b4 100644
--- a/tests/ui/type-alias-impl-trait/recursive-fn-tait.stderr
+++ b/tests/ui/type-alias-impl-trait/recursive-fn-tait.stderr
@@ -10,5 +10,5 @@ note: previous use here
LL | |_: usize |loop {}
| ^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn-2.stderr b/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn-2.stderr
index 7481557fc..eec35548c 100644
--- a/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn-2.stderr
+++ b/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn-2.stderr
@@ -10,5 +10,5 @@ note: previous use here
LL | fn foo() -> Op { &"hello world" }
| ^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn.stderr b/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn.stderr
index e4209643b..05825e686 100644
--- a/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn.stderr
+++ b/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn.stderr
@@ -10,5 +10,5 @@ note: previous use here
LL | A
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.current.stderr b/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.current.stderr
index 844103d77..d4e2f9535 100644
--- a/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.current.stderr
+++ b/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.current.stderr
@@ -1,4 +1,4 @@
-error: internal compiler error: no errors encountered even though `delay_span_bug` issued
+error: internal compiler error: no errors encountered even though `span_delayed_bug` issued
error: internal compiler error: {OpaqueTypeKey { def_id: DefId(get_rpit::{opaque#0}), args: [] }: OpaqueTypeDecl { hidden_type: OpaqueHiddenType { span: no-location (#0), ty: Alias(Opaque, AliasTy { args: [], def_id: DefId(Opaque::{opaque#0}) }) } }}
|
diff --git a/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs b/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs
index 0f0002f77..222841f34 100644
--- a/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs
+++ b/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs
@@ -6,7 +6,7 @@
//! have a situation where the RPIT gets constrained outside its anchor.
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
//[next] check-pass
//[current] known-bug: #108498
diff --git a/tests/ui/type-alias-impl-trait/self-referential-2.stderr b/tests/ui/type-alias-impl-trait/self-referential-2.stderr
index c2cf70687..ab57812ba 100644
--- a/tests/ui/type-alias-impl-trait/self-referential-2.stderr
+++ b/tests/ui/type-alias-impl-trait/self-referential-2.stderr
@@ -9,6 +9,6 @@ LL | 42_i32
= help: the trait `PartialEq<Foo>` is not implemented for `i32`
= help: the trait `PartialEq` is implemented for `i32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias-impl-trait/self-referential-3.rs b/tests/ui/type-alias-impl-trait/self-referential-3.rs
index 18f09b548..922ac6620 100644
--- a/tests/ui/type-alias-impl-trait/self-referential-3.rs
+++ b/tests/ui/type-alias-impl-trait/self-referential-3.rs
@@ -1,3 +1,5 @@
+// ignore-compare-mode-next-solver (hangs)
+
#![feature(type_alias_impl_trait)]
type Bar<'a, 'b> = impl PartialEq<Bar<'a, 'b>> + std::fmt::Debug;
diff --git a/tests/ui/type-alias-impl-trait/self-referential-3.stderr b/tests/ui/type-alias-impl-trait/self-referential-3.stderr
index 4155a114b..32eac622e 100644
--- a/tests/ui/type-alias-impl-trait/self-referential-3.stderr
+++ b/tests/ui/type-alias-impl-trait/self-referential-3.stderr
@@ -1,5 +1,5 @@
error[E0277]: can't compare `&i32` with `Bar<'a, 'b>`
- --> $DIR/self-referential-3.rs:5:31
+ --> $DIR/self-referential-3.rs:7:31
|
LL | fn bar<'a, 'b>(i: &'a i32) -> Bar<'a, 'b> {
| ^^^^^^^^^^^ no implementation for `&i32 == Bar<'a, 'b>`
@@ -10,6 +10,6 @@ LL | i
= help: the trait `PartialEq<Bar<'a, 'b>>` is not implemented for `&i32`
= help: the trait `PartialEq` is implemented for `i32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias-impl-trait/self-referential-4.rs b/tests/ui/type-alias-impl-trait/self-referential-4.rs
index 36742c8ad..caa9e33ba 100644
--- a/tests/ui/type-alias-impl-trait/self-referential-4.rs
+++ b/tests/ui/type-alias-impl-trait/self-referential-4.rs
@@ -1,3 +1,5 @@
+// ignore-compare-mode-next-solver (hangs)
+
#![feature(type_alias_impl_trait)]
type Bar<'a, 'b> = impl PartialEq<Bar<'b, 'static>> + std::fmt::Debug;
diff --git a/tests/ui/type-alias-impl-trait/self-referential-4.stderr b/tests/ui/type-alias-impl-trait/self-referential-4.stderr
index 98c762e3d..e7f9e232a 100644
--- a/tests/ui/type-alias-impl-trait/self-referential-4.stderr
+++ b/tests/ui/type-alias-impl-trait/self-referential-4.stderr
@@ -1,5 +1,5 @@
error[E0277]: can't compare `&i32` with `Bar<'b, 'static>`
- --> $DIR/self-referential-4.rs:5:31
+ --> $DIR/self-referential-4.rs:7:31
|
LL | fn bar<'a, 'b>(i: &'a i32) -> Bar<'a, 'b> {
| ^^^^^^^^^^^ no implementation for `&i32 == Bar<'b, 'static>`
@@ -10,7 +10,7 @@ LL | i
= help: the trait `PartialEq` is implemented for `i32`
error[E0277]: can't compare `&i32` with `Foo<'static, 'b>`
- --> $DIR/self-referential-4.rs:11:31
+ --> $DIR/self-referential-4.rs:13:31
|
LL | fn foo<'a, 'b>(i: &'a i32) -> Foo<'a, 'b> {
| ^^^^^^^^^^^ no implementation for `&i32 == Foo<'static, 'b>`
@@ -21,7 +21,7 @@ LL | i
= help: the trait `PartialEq` is implemented for `i32`
error[E0277]: can't compare `&i32` with `Moo<'static, 'a>`
- --> $DIR/self-referential-4.rs:17:31
+ --> $DIR/self-referential-4.rs:19:31
|
LL | fn moo<'a, 'b>(i: &'a i32) -> Moo<'a, 'b> {
| ^^^^^^^^^^^ no implementation for `&i32 == Moo<'static, 'a>`
diff --git a/tests/ui/type-alias-impl-trait/self-referential.rs b/tests/ui/type-alias-impl-trait/self-referential.rs
index 34b7c24df..0900d7279 100644
--- a/tests/ui/type-alias-impl-trait/self-referential.rs
+++ b/tests/ui/type-alias-impl-trait/self-referential.rs
@@ -1,3 +1,5 @@
+// ignore-compare-mode-next-solver (hangs)
+
#![feature(type_alias_impl_trait)]
type Bar<'a, 'b> = impl PartialEq<Bar<'b, 'a>> + std::fmt::Debug;
diff --git a/tests/ui/type-alias-impl-trait/self-referential.stderr b/tests/ui/type-alias-impl-trait/self-referential.stderr
index 9a17d495b..27506b8d0 100644
--- a/tests/ui/type-alias-impl-trait/self-referential.stderr
+++ b/tests/ui/type-alias-impl-trait/self-referential.stderr
@@ -1,5 +1,5 @@
error[E0277]: can't compare `&i32` with `Bar<'b, 'a>`
- --> $DIR/self-referential.rs:5:31
+ --> $DIR/self-referential.rs:7:31
|
LL | fn bar<'a, 'b>(i: &'a i32) -> Bar<'a, 'b> {
| ^^^^^^^^^^^ no implementation for `&i32 == Bar<'b, 'a>`
@@ -11,7 +11,7 @@ LL | i
= help: the trait `PartialEq` is implemented for `i32`
error[E0277]: can't compare `&i32` with `(i32, Foo<'a, 'b>::{opaque#0})`
- --> $DIR/self-referential.rs:12:31
+ --> $DIR/self-referential.rs:14:31
|
LL | fn foo<'a, 'b>(i: &'a i32) -> Foo<'a, 'b> {
| ^^^^^^^^^^^ no implementation for `&i32 == (i32, Foo<'a, 'b>::{opaque#0})`
@@ -23,7 +23,7 @@ LL | (42, i)
= help: the trait `PartialEq` is implemented for `i32`
error[E0277]: can't compare `&i32` with `(i32, Moo<'b, 'a>::{opaque#0})`
- --> $DIR/self-referential.rs:19:31
+ --> $DIR/self-referential.rs:21:31
|
LL | fn moo<'a, 'b>(i: &'a i32) -> Moo<'a, 'b> {
| ^^^^^^^^^^^ no implementation for `&i32 == (i32, Moo<'b, 'a>::{opaque#0})`
diff --git a/tests/ui/type-alias-impl-trait/structural-match-no-leak.stderr b/tests/ui/type-alias-impl-trait/structural-match-no-leak.stderr
index dbc183f54..b1ccd5cc4 100644
--- a/tests/ui/type-alias-impl-trait/structural-match-no-leak.stderr
+++ b/tests/ui/type-alias-impl-trait/structural-match-no-leak.stderr
@@ -4,5 +4,5 @@ error: `Bar` cannot be used in patterns
LL | LEAK_FREE => (),
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/structural-match.stderr b/tests/ui/type-alias-impl-trait/structural-match.stderr
index 61287f268..b0415db0e 100644
--- a/tests/ui/type-alias-impl-trait/structural-match.stderr
+++ b/tests/ui/type-alias-impl-trait/structural-match.stderr
@@ -4,5 +4,5 @@ error: `Foo` cannot be used in patterns
LL | VALUE => (),
| ^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-fn-type.stderr b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-fn-type.stderr
index e57c59d61..5641ff301 100644
--- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-fn-type.stderr
+++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-fn-type.stderr
@@ -4,6 +4,6 @@ error[E0562]: `impl Trait` only allowed in function and inherent method argument
LL | type Foo = fn() -> impl Send;
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0562`.
diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.stderr b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.stderr
index 8cdce2f8e..cff269530 100644
--- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.stderr
+++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.stderr
@@ -4,6 +4,6 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait,
LL | impl<'a, I: Iterator<Item = i32>> Trait for (i32, I) {
| ^^ unconstrained lifetime parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0207`.
diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.stderr b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.stderr
index a770eeac3..3d43fbe0d 100644
--- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.stderr
+++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.stderr
@@ -6,5 +6,5 @@ LL | type Foo = impl Fn() -> Foo;
|
= note: `Foo` must be used in combination with a concrete type within the same module
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.stderr b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.stderr
index 3f3699ce5..e2dc88798 100644
--- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.stderr
+++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.stderr
@@ -6,5 +6,5 @@ LL | type Foo = impl Bar<Foo, Item = Foo>;
|
= note: `Foo` must be used in combination with a concrete type within the same module
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type-alias-impl-trait/unconstrained-due-to-bad-pattern.stderr b/tests/ui/type-alias-impl-trait/unconstrained-due-to-bad-pattern.stderr
index 6cc5b7a8a..6d9c8eabf 100644
--- a/tests/ui/type-alias-impl-trait/unconstrained-due-to-bad-pattern.stderr
+++ b/tests/ui/type-alias-impl-trait/unconstrained-due-to-bad-pattern.stderr
@@ -12,6 +12,6 @@ LL + _ => todo!(),
LL + }
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/type-alias-impl-trait/unconstrained-impl-param.stderr b/tests/ui/type-alias-impl-trait/unconstrained-impl-param.stderr
index 65139307f..6206f169c 100644
--- a/tests/ui/type-alias-impl-trait/unconstrained-impl-param.stderr
+++ b/tests/ui/type-alias-impl-trait/unconstrained-impl-param.stderr
@@ -4,6 +4,6 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait,
LL | impl<'a> Trait for Opaque<&'a str> {
| ^^ unconstrained lifetime parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0207`.
diff --git a/tests/ui/type-alias-impl-trait/under-binder.stderr b/tests/ui/type-alias-impl-trait/under-binder.stderr
index 82c4ec973..f4a121ce4 100644
--- a/tests/ui/type-alias-impl-trait/under-binder.stderr
+++ b/tests/ui/type-alias-impl-trait/under-binder.stderr
@@ -7,6 +7,6 @@ LL | type Opaque<'a> = impl Sized + 'a;
LL | f
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0792`.
diff --git a/tests/ui/type-alias-impl-trait/underconstrained_generic.stderr b/tests/ui/type-alias-impl-trait/underconstrained_generic.stderr
index 103636b6c..e4de92459 100644
--- a/tests/ui/type-alias-impl-trait/underconstrained_generic.stderr
+++ b/tests/ui/type-alias-impl-trait/underconstrained_generic.stderr
@@ -16,6 +16,6 @@ help: consider restricting type parameter `T`
LL | type Converter<T: Trait> = impl ProofForConversion<T>;
| +++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias-impl-trait/underconstrained_lifetime.stderr b/tests/ui/type-alias-impl-trait/underconstrained_lifetime.stderr
index 12d85a49d..34b50fb1f 100644
--- a/tests/ui/type-alias-impl-trait/underconstrained_lifetime.stderr
+++ b/tests/ui/type-alias-impl-trait/underconstrained_lifetime.stderr
@@ -15,6 +15,6 @@ note: but the referenced data is only valid for the lifetime `'a` as defined her
LL | type Converter<'a, 'b> = impl ProofForConversion<'a, 'b>;
| ^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0491`.
diff --git a/tests/ui/type-alias-impl-trait/wf-check-fn-def.stderr b/tests/ui/type-alias-impl-trait/wf-check-fn-def.stderr
index e0005489d..47bea7bbe 100644
--- a/tests/ui/type-alias-impl-trait/wf-check-fn-def.stderr
+++ b/tests/ui/type-alias-impl-trait/wf-check-fn-def.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `B`
LL | type FooFn<B: Bar> = impl FnOnce(B);
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias-impl-trait/wf-in-associated-type.fail.stderr b/tests/ui/type-alias-impl-trait/wf-in-associated-type.fail.stderr
index 7d72c9f81..c4ad8434e 100644
--- a/tests/ui/type-alias-impl-trait/wf-in-associated-type.fail.stderr
+++ b/tests/ui/type-alias-impl-trait/wf-in-associated-type.fail.stderr
@@ -1,5 +1,5 @@
error[E0309]: the parameter type `T` may not live long enough
- --> $DIR/wf-in-associated-type.rs:36:23
+ --> $DIR/wf-in-associated-type.rs:38:23
|
LL | impl<'a, T> Trait<'a, T> for () {
| -- the parameter type `T` must be valid for the lifetime `'a` as defined here...
@@ -12,7 +12,7 @@ LL | impl<'a, T: 'a> Trait<'a, T> for () {
| ++++
error[E0309]: the parameter type `T` may not live long enough
- --> $DIR/wf-in-associated-type.rs:36:23
+ --> $DIR/wf-in-associated-type.rs:38:23
|
LL | impl<'a, T> Trait<'a, T> for () {
| -- the parameter type `T` must be valid for the lifetime `'a` as defined here...
diff --git a/tests/ui/type-alias-impl-trait/wf-in-associated-type.rs b/tests/ui/type-alias-impl-trait/wf-in-associated-type.rs
index 31fbef9f7..22e2b0efd 100644
--- a/tests/ui/type-alias-impl-trait/wf-in-associated-type.rs
+++ b/tests/ui/type-alias-impl-trait/wf-in-associated-type.rs
@@ -1,14 +1,16 @@
// WF check for impl Trait in associated type position.
//
-// revisions: pass fail
+// revisions: pass pass_next fail
// [pass] check-pass
+// [pass_next] compile-flags: -Znext-solver
+// [pass_next] check-pass
// [fail] check-fail
#![feature(impl_trait_in_assoc_type)]
// The hidden type here (`&'a T`) requires proving `T: 'a`.
// We know it holds because of implied bounds from the impl header.
-#[cfg(pass)]
+#[cfg(any(pass, pass_next))]
mod pass {
trait Trait<Req> {
type Opaque1;
diff --git a/tests/ui/type-alias-impl-trait/wf-nested.fail.stderr b/tests/ui/type-alias-impl-trait/wf-nested.fail.stderr
index 2858afcd4..dcc4b8021 100644
--- a/tests/ui/type-alias-impl-trait/wf-nested.fail.stderr
+++ b/tests/ui/type-alias-impl-trait/wf-nested.fail.stderr
@@ -17,6 +17,6 @@ help: consider adding an explicit lifetime bound
LL | type InnerOpaque<T: 'static> = impl Sized;
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0310`.
diff --git a/tests/ui/type-alias-impl-trait/wf-nested.pass_sound.stderr b/tests/ui/type-alias-impl-trait/wf-nested.pass_sound.stderr
index 285e4f18c..121664bd9 100644
--- a/tests/ui/type-alias-impl-trait/wf-nested.pass_sound.stderr
+++ b/tests/ui/type-alias-impl-trait/wf-nested.pass_sound.stderr
@@ -12,6 +12,6 @@ help: consider adding an explicit lifetime bound
LL | fn test<T: 'static>() {
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0310`.
diff --git a/tests/ui/type-alias-impl-trait/wf_check_closures.stderr b/tests/ui/type-alias-impl-trait/wf_check_closures.stderr
index 58ae8617b..09a42f734 100644
--- a/tests/ui/type-alias-impl-trait/wf_check_closures.stderr
+++ b/tests/ui/type-alias-impl-trait/wf_check_closures.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `B`
LL | type FooFn<B: Bar> = impl FnOnce();
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias/issue-62263-self-in-atb.stderr b/tests/ui/type-alias/issue-62263-self-in-atb.stderr
index c20074dc2..18c8bc1a1 100644
--- a/tests/ui/type-alias/issue-62263-self-in-atb.stderr
+++ b/tests/ui/type-alias/issue-62263-self-in-atb.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: `Self` is only available in impls, traits, and
LL | pub type Alias = dyn Trait<A = Self::A>;
| ^^^^ `Self` is only available in impls, traits, and type definitions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/type-alias/issue-62305-self-assoc-ty.stderr b/tests/ui/type-alias/issue-62305-self-assoc-ty.stderr
index f3da50df9..a35e644d3 100644
--- a/tests/ui/type-alias/issue-62305-self-assoc-ty.stderr
+++ b/tests/ui/type-alias/issue-62305-self-assoc-ty.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: `Self` is only available in impls, traits, and
LL | type Alias = Self::Target;
| ^^^^ `Self` is only available in impls, traits, and type definitions
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/type-alias/issue-62364-self-ty-arg.stderr b/tests/ui/type-alias/issue-62364-self-ty-arg.stderr
index 7e15e42e3..26d93dcc2 100644
--- a/tests/ui/type-alias/issue-62364-self-ty-arg.stderr
+++ b/tests/ui/type-alias/issue-62364-self-ty-arg.stderr
@@ -6,6 +6,6 @@ LL | type Alias<'a> = Struct<&'a Self>;
| |
| `Self` not allowed in a type alias
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0411`.
diff --git a/tests/ui/type-inference/generalize-subtyped-variables.rs b/tests/ui/type-inference/generalize-subtyped-variables.rs
new file mode 100644
index 000000000..f93408a43
--- /dev/null
+++ b/tests/ui/type-inference/generalize-subtyped-variables.rs
@@ -0,0 +1,25 @@
+// Test for specific details of how we handle higher-ranked subtyping to make
+// sure that any changes are made deliberately.
+//
+// - `let y = x` creates a `Subtype` obligation that is deferred for later.
+// - `w = a` sets the type of `x` to `Option<for<'a> fn(&'a ())>` and generalizes
+// `z` first to `Option<_>` and then to `Option<fn(&'0 ())>`.
+// - The various subtyping obligations are then processed.
+//
+// This requires that
+// 1. the `Subtype` obligation from `y = x` isn't processed while the types of
+// `w` and `a` are being unified.
+// 2. the pending subtype obligation isn't considered when determining the type
+// to generalize `z` to first (when related to the type of `y`).
+//
+// Found when considering fixes to #117151
+// check-pass
+
+fn main() {
+ let mut x = None;
+ let y = x;
+ let z = Default::default();
+ let mut w = (&mut x, z, z);
+ let a = (&mut None::<fn(&())>, y, None::<fn(&'static ())>);
+ w = a;
+}
diff --git a/tests/ui/type-inference/issue-30225.stderr b/tests/ui/type-inference/issue-30225.stderr
index 72c33d16c..cd2d9e2be 100644
--- a/tests/ui/type-inference/issue-30225.stderr
+++ b/tests/ui/type-inference/issue-30225.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | u = v; // mark $0 and $1 in a subtype relationship
| ^ expected `A`, found `B`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/type-inference/or_else-multiple-type-params.stderr b/tests/ui/type-inference/or_else-multiple-type-params.stderr
index 6ac63a91e..d1bbe308e 100644
--- a/tests/ui/type-inference/or_else-multiple-type-params.stderr
+++ b/tests/ui/type-inference/or_else-multiple-type-params.stderr
@@ -9,6 +9,6 @@ help: try giving this closure an explicit return type
LL | .or_else(|err| -> Result<Child, F> {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/type-inference/sort_by_key.stderr b/tests/ui/type-inference/sort_by_key.stderr
index 81af024b3..3d2e0250d 100644
--- a/tests/ui/type-inference/sort_by_key.stderr
+++ b/tests/ui/type-inference/sort_by_key.stderr
@@ -14,6 +14,6 @@ help: consider specifying the generic argument
LL | lst.sort_by_key(|&(v, _)| v.iter().sum::<S>());
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/type-inference/unbounded-associated-type.stderr b/tests/ui/type-inference/unbounded-associated-type.stderr
index e0fecc72f..c9dfa0bf5 100644
--- a/tests/ui/type-inference/unbounded-associated-type.stderr
+++ b/tests/ui/type-inference/unbounded-associated-type.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic argument
LL | S(std::marker::PhantomData::<T>).foo();
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/type-inference/unbounded-type-param-in-fn-with-assoc-type.stderr b/tests/ui/type-inference/unbounded-type-param-in-fn-with-assoc-type.stderr
index 209abfe5c..dc0bea58a 100644
--- a/tests/ui/type-inference/unbounded-type-param-in-fn-with-assoc-type.stderr
+++ b/tests/ui/type-inference/unbounded-type-param-in-fn-with-assoc-type.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic arguments
LL | foo::<T, U>();
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/type-inference/unbounded-type-param-in-fn.stderr b/tests/ui/type-inference/unbounded-type-param-in-fn.stderr
index d92892eeb..31e6e805e 100644
--- a/tests/ui/type-inference/unbounded-type-param-in-fn.stderr
+++ b/tests/ui/type-inference/unbounded-type-param-in-fn.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic argument
LL | foo::<T>();
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/type/ascription/issue-34255-1.stderr b/tests/ui/type/ascription/issue-34255-1.stderr
index 254d36cb9..6cb42fad6 100644
--- a/tests/ui/type/ascription/issue-34255-1.stderr
+++ b/tests/ui/type/ascription/issue-34255-1.stderr
@@ -14,5 +14,5 @@ LL | input_cells: Vec::new()
LL ~ } }
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type/ascription/issue-47666.stderr b/tests/ui/type/ascription/issue-47666.stderr
index 74d85a75c..562ce5305 100644
--- a/tests/ui/type/ascription/issue-47666.stderr
+++ b/tests/ui/type/ascription/issue-47666.stderr
@@ -6,5 +6,5 @@ LL | let _ = Option:Some(vec![0, 1]);
|
= note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type/ascription/issue-54516.stderr b/tests/ui/type/ascription/issue-54516.stderr
index a1371432f..2c567a1a0 100644
--- a/tests/ui/type/ascription/issue-54516.stderr
+++ b/tests/ui/type/ascription/issue-54516.stderr
@@ -6,5 +6,5 @@ LL | println!("{}", std::mem:size_of::<BTreeMap<u32, u32>>());
|
= note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type/ascription/issue-60933.stderr b/tests/ui/type/ascription/issue-60933.stderr
index 0ec527ff5..cd184ceba 100644
--- a/tests/ui/type/ascription/issue-60933.stderr
+++ b/tests/ui/type/ascription/issue-60933.stderr
@@ -6,5 +6,5 @@ LL | let _: usize = std::mem:size_of::<u32>();
|
= note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type/closure-with-wrong-borrows.stderr b/tests/ui/type/closure-with-wrong-borrows.stderr
index 7370bc764..65e11ec52 100644
--- a/tests/ui/type/closure-with-wrong-borrows.stderr
+++ b/tests/ui/type/closure-with-wrong-borrows.stderr
@@ -14,6 +14,6 @@ note: function defined here
LL | fn f(inner: fn(&str, &S)) {
| ^ -------------------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/type/issue-101866.stderr b/tests/ui/type/issue-101866.stderr
index fe9982119..6f4b380b4 100644
--- a/tests/ui/type/issue-101866.stderr
+++ b/tests/ui/type/issue-101866.stderr
@@ -13,6 +13,6 @@ LL - TraitA::<i32>::func();
LL + <StructA as TraitA<i32>>::func();
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0790`.
diff --git a/tests/ui/type/issue-58355.stderr b/tests/ui/type/issue-58355.stderr
index 67078bcfe..b6056f0fd 100644
--- a/tests/ui/type/issue-58355.stderr
+++ b/tests/ui/type/issue-58355.stderr
@@ -8,6 +8,6 @@ LL | x = Some(Box::new(callback));
= note: required because it appears within the type `fn() -> dyn ToString`
= note: required for the cast from `Box<fn() -> dyn ToString>` to `Box<dyn Fn() -> (dyn ToString + 'static)>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type/issue-91268.stderr b/tests/ui/type/issue-91268.stderr
index a3619d863..395559442 100644
--- a/tests/ui/type/issue-91268.stderr
+++ b/tests/ui/type/issue-91268.stderr
@@ -8,5 +8,5 @@ LL | 0: u8(ţ
| |
| unclosed delimiter
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type/missing-let-in-binding-2.stderr b/tests/ui/type/missing-let-in-binding-2.stderr
index 2e1012594..abf24763a 100644
--- a/tests/ui/type/missing-let-in-binding-2.stderr
+++ b/tests/ui/type/missing-let-in-binding-2.stderr
@@ -9,5 +9,5 @@ help: you might have meant to introduce a new binding
LL | let _v: Vec<i32> = vec![1, 2, 3];
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type/missing-let-in-binding-3.stderr b/tests/ui/type/missing-let-in-binding-3.stderr
index ca828ce37..b01323b4e 100644
--- a/tests/ui/type/missing-let-in-binding-3.stderr
+++ b/tests/ui/type/missing-let-in-binding-3.stderr
@@ -6,5 +6,5 @@ LL | struct A {
LL | : :u8,
| ^ expected identifier
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type/missing-let-in-binding-4.stderr b/tests/ui/type/missing-let-in-binding-4.stderr
index e6f173a66..258eab5b9 100644
--- a/tests/ui/type/missing-let-in-binding-4.stderr
+++ b/tests/ui/type/missing-let-in-binding-4.stderr
@@ -6,5 +6,5 @@ LL | struct A {
LL | : u8 =,
| ^ expected identifier
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type/missing-let-in-binding.stderr b/tests/ui/type/missing-let-in-binding.stderr
index fc094e8cb..a9d766e4c 100644
--- a/tests/ui/type/missing-let-in-binding.stderr
+++ b/tests/ui/type/missing-let-in-binding.stderr
@@ -10,5 +10,5 @@ help: you might have meant to introduce a new binding
LL | let _foo: i32 = 4;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type/type-annotation-needed.stderr b/tests/ui/type/type-annotation-needed.stderr
index 87bba3166..521d25537 100644
--- a/tests/ui/type/type-annotation-needed.stderr
+++ b/tests/ui/type/type-annotation-needed.stderr
@@ -15,6 +15,6 @@ help: consider specifying the generic argument
LL | foo::<T>(42);
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/type/type-ascription-with-fn-call.stderr b/tests/ui/type/type-ascription-with-fn-call.stderr
index e3afa497a..2ae5873c8 100644
--- a/tests/ui/type/type-ascription-with-fn-call.stderr
+++ b/tests/ui/type/type-ascription-with-fn-call.stderr
@@ -6,5 +6,5 @@ LL | f() :
|
= note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type/type-check/cannot_infer_local_or_array.stderr b/tests/ui/type/type-check/cannot_infer_local_or_array.stderr
index e823bad26..dafbab827 100644
--- a/tests/ui/type/type-check/cannot_infer_local_or_array.stderr
+++ b/tests/ui/type/type-check/cannot_infer_local_or_array.stderr
@@ -9,6 +9,6 @@ help: consider giving `x` an explicit type, where the placeholders `_` are speci
LL | let x: [_; 0] = [];
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/type/type-check/cannot_infer_local_or_vec.stderr b/tests/ui/type/type-check/cannot_infer_local_or_vec.stderr
index 7be00341d..fa90240d3 100644
--- a/tests/ui/type/type-check/cannot_infer_local_or_vec.stderr
+++ b/tests/ui/type/type-check/cannot_infer_local_or_vec.stderr
@@ -9,6 +9,6 @@ help: consider giving `x` an explicit type, where the placeholders `_` are speci
LL | let x: Vec<_> = vec![];
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.stderr b/tests/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.stderr
index 1fa253052..5f389bee7 100644
--- a/tests/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.stderr
+++ b/tests/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.stderr
@@ -9,6 +9,6 @@ help: consider giving this pattern a type, where the placeholders `_` are specif
LL | let (x, ): (Vec<_>,) = (vec![], );
| +++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/type/type-check/issue-116967-cannot-coerce-returned-result.stderr b/tests/ui/type/type-check/issue-116967-cannot-coerce-returned-result.stderr
index 447b22a15..3a8d9c719 100644
--- a/tests/ui/type/type-check/issue-116967-cannot-coerce-returned-result.stderr
+++ b/tests/ui/type/type-check/issue-116967-cannot-coerce-returned-result.stderr
@@ -10,6 +10,6 @@ LL | out
= note: expected enum `Result<String, _>`
found enum `Result<(), _>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/type/type-check/issue-22897.stderr b/tests/ui/type/type-check/issue-22897.stderr
index fae7b7926..e3e8deb30 100644
--- a/tests/ui/type/type-check/issue-22897.stderr
+++ b/tests/ui/type/type-check/issue-22897.stderr
@@ -4,6 +4,6 @@ error[E0282]: type annotations needed
LL | [];
| ^^ cannot infer type for array `[_; 0]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/type/type-check/issue-40294.stderr b/tests/ui/type/type-check/issue-40294.stderr
index d15fd2341..c6c1d6893 100644
--- a/tests/ui/type/type-check/issue-40294.stderr
+++ b/tests/ui/type/type-check/issue-40294.stderr
@@ -12,6 +12,6 @@ LL | where &'a T : Foo,
LL | &'b T : Foo
| ^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/type/type-check/issue-41314.stderr b/tests/ui/type/type-check/issue-41314.stderr
index 4a9bf6106..2a089029b 100644
--- a/tests/ui/type/type-check/issue-41314.stderr
+++ b/tests/ui/type/type-check/issue-41314.stderr
@@ -9,6 +9,6 @@ help: use the tuple variant pattern syntax instead
LL | X::Y(number) => {}
| ~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0769`.
diff --git a/tests/ui/type/type-check/issue-67273-assignment-match-prior-arm-bool-expected-unit.stderr b/tests/ui/type/type-check/issue-67273-assignment-match-prior-arm-bool-expected-unit.stderr
index a431fe89c..229729a9b 100644
--- a/tests/ui/type/type-check/issue-67273-assignment-match-prior-arm-bool-expected-unit.stderr
+++ b/tests/ui/type/type-check/issue-67273-assignment-match-prior-arm-bool-expected-unit.stderr
@@ -17,6 +17,6 @@ LL | | _ => (),
LL | | }
| |_____- `match` arms have incompatible types
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/type/type-check/issue-88577-check-fn-with-more-than-65535-arguments.stderr b/tests/ui/type/type-check/issue-88577-check-fn-with-more-than-65535-arguments.stderr
index 847bc517e..1ef02321e 100644
--- a/tests/ui/type/type-check/issue-88577-check-fn-with-more-than-65535-arguments.stderr
+++ b/tests/ui/type/type-check/issue-88577-check-fn-with-more-than-65535-arguments.stderr
@@ -9,5 +9,5 @@ LL | many_args!{[_]########## ######}
|
= note: this error originates in the macro `many_args` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type/type-check/point-at-inference-2.stderr b/tests/ui/type/type-check/point-at-inference-2.stderr
index 1d2777ad6..8b559ffff 100644
--- a/tests/ui/type/type-check/point-at-inference-2.stderr
+++ b/tests/ui/type/type-check/point-at-inference-2.stderr
@@ -25,8 +25,8 @@ LL | bar(v);
| |
| arguments to this function are incorrect
|
- = note: expected struct `Vec<i32>`
- found struct `Vec<&i32>`
+ = note: expected struct `Vec<_>`
+ found struct `Vec<&_>`
note: function defined here
--> $DIR/point-at-inference-2.rs:1:4
|
@@ -43,8 +43,8 @@ LL | bar(v);
| |
| arguments to this function are incorrect
|
- = note: expected struct `Vec<i32>`
- found struct `Vec<&i32>`
+ = note: expected struct `Vec<_>`
+ found struct `Vec<&_>`
note: function defined here
--> $DIR/point-at-inference-2.rs:1:4
|
diff --git a/tests/ui/type/type-check/point-at-inference-3.stderr b/tests/ui/type/type-check/point-at-inference-3.stderr
index 238764812..663799e9f 100644
--- a/tests/ui/type/type-check/point-at-inference-3.stderr
+++ b/tests/ui/type/type-check/point-at-inference-3.stderr
@@ -18,6 +18,6 @@ help: change the type of the numeric literal from `u32` to `i32`
LL | v.push(1i32);
| ~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/type/type-check/point-at-inference-issue-116155.stderr b/tests/ui/type/type-check/point-at-inference-issue-116155.stderr
index c8c01603c..703694abe 100644
--- a/tests/ui/type/type-check/point-at-inference-issue-116155.stderr
+++ b/tests/ui/type/type-check/point-at-inference-issue-116155.stderr
@@ -13,6 +13,6 @@ LL | let _: S<usize> = s;
= note: expected struct `S<usize>`
found struct `S<bool>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/type/type-check/point-at-inference.stderr b/tests/ui/type/type-check/point-at-inference.stderr
index 5fc94d4d1..b5b0353eb 100644
--- a/tests/ui/type/type-check/point-at-inference.stderr
+++ b/tests/ui/type/type-check/point-at-inference.stderr
@@ -23,6 +23,6 @@ help: consider dereferencing the borrow
LL | foo.push(*i);
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/type/type-dependent-def-issue-49241.stderr b/tests/ui/type/type-dependent-def-issue-49241.stderr
index 64c7687f7..15d47cca3 100644
--- a/tests/ui/type/type-dependent-def-issue-49241.stderr
+++ b/tests/ui/type/type-dependent-def-issue-49241.stderr
@@ -6,6 +6,6 @@ LL | const l: usize = v.count();
| |
| help: consider using `let` instead of `const`: `let l`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0435`.
diff --git a/tests/ui/type/type-error-break-tail.stderr b/tests/ui/type/type-error-break-tail.stderr
index 9a02bc287..5ef522fee 100644
--- a/tests/ui/type/type-error-break-tail.stderr
+++ b/tests/ui/type/type-error-break-tail.stderr
@@ -13,6 +13,6 @@ help: give it a value of the expected type
LL | if false { break 42; }
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/type/type-mismatch.stderr b/tests/ui/type/type-mismatch.stderr
index ce6f29d35..aca96978a 100644
--- a/tests/ui/type/type-mismatch.stderr
+++ b/tests/ui/type/type-mismatch.stderr
@@ -382,8 +382,8 @@ LL | want::<&Foo<foo>>(f);
| |
| arguments to this function are incorrect
|
- = note: expected reference `&Foo<foo>`
- found struct `Foo<foo>`
+ = note: expected reference `&Foo<_>`
+ found struct `Foo<_>`
note: function defined here
--> $DIR/type-mismatch.rs:14:4
|
@@ -402,8 +402,8 @@ LL | want::<&Foo<foo, B>>(f);
| |
| arguments to this function are incorrect
|
- = note: expected reference `&Foo<foo, B>`
- found struct `Foo<foo>`
+ = note: expected reference `&Foo<_, B>`
+ found struct `Foo<_, A>`
note: function defined here
--> $DIR/type-mismatch.rs:14:4
|
@@ -546,8 +546,8 @@ LL | want::<&Foo<foo>>(f);
| |
| arguments to this function are incorrect
|
- = note: expected reference `&Foo<foo>`
- found struct `Foo<foo, B>`
+ = note: expected reference `&Foo<_, A>`
+ found struct `Foo<_, B>`
note: function defined here
--> $DIR/type-mismatch.rs:14:4
|
@@ -562,8 +562,8 @@ LL | want::<&Foo<foo, B>>(f);
| |
| arguments to this function are incorrect
|
- = note: expected reference `&Foo<foo, B>`
- found struct `Foo<foo, B>`
+ = note: expected reference `&Foo<_, _>`
+ found struct `Foo<_, _>`
note: function defined here
--> $DIR/type-mismatch.rs:14:4
|
@@ -726,8 +726,8 @@ LL | want::<&Foo<foo>>(f);
| |
| arguments to this function are incorrect
|
- = note: expected reference `&Foo<foo>`
- found struct `Foo<foo, B, A>`
+ = note: expected reference `&Foo<_, A, B>`
+ found struct `Foo<_, B, A>`
note: function defined here
--> $DIR/type-mismatch.rs:14:4
|
@@ -742,8 +742,8 @@ LL | want::<&Foo<foo, B>>(f);
| |
| arguments to this function are incorrect
|
- = note: expected reference `&Foo<foo, B>`
- found struct `Foo<foo, B, A>`
+ = note: expected reference `&Foo<_, _, B>`
+ found struct `Foo<_, _, A>`
note: function defined here
--> $DIR/type-mismatch.rs:14:4
|
diff --git a/tests/ui/type/type-parameter-defaults-referencing-Self.stderr b/tests/ui/type/type-parameter-defaults-referencing-Self.stderr
index 67a4745b3..16d08b267 100644
--- a/tests/ui/type/type-parameter-defaults-referencing-Self.stderr
+++ b/tests/ui/type/type-parameter-defaults-referencing-Self.stderr
@@ -9,6 +9,6 @@ LL | fn foo(x: &dyn Foo) { }
|
= note: because of the default `Self` reference, type parameters must be specified on object types
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0393`.
diff --git a/tests/ui/type/type-parameter-names.stderr b/tests/ui/type/type-parameter-names.stderr
index f0ca8afca..8e3e2388c 100644
--- a/tests/ui/type/type-parameter-names.stderr
+++ b/tests/ui/type/type-parameter-names.stderr
@@ -14,6 +14,6 @@ LL | x
= note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
= note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/type/type-params-in-different-spaces-1.stderr b/tests/ui/type/type-params-in-different-spaces-1.stderr
index 7529f25bd..1d0e097fd 100644
--- a/tests/ui/type/type-params-in-different-spaces-1.stderr
+++ b/tests/ui/type/type-params-in-different-spaces-1.stderr
@@ -15,6 +15,6 @@ LL | *self + rhs
= note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
= note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/type/type-params-in-different-spaces-3.stderr b/tests/ui/type/type-params-in-different-spaces-3.stderr
index c538d6731..58783fe1f 100644
--- a/tests/ui/type/type-params-in-different-spaces-3.stderr
+++ b/tests/ui/type/type-params-in-different-spaces-3.stderr
@@ -15,6 +15,6 @@ LL | u
= note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
= note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/type/type-recursive-box-shadowed.stderr b/tests/ui/type/type-recursive-box-shadowed.stderr
index cb0e98287..8cc4eb36d 100644
--- a/tests/ui/type/type-recursive-box-shadowed.stderr
+++ b/tests/ui/type/type-recursive-box-shadowed.stderr
@@ -12,6 +12,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | inner: Box<Foo>,
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/type/type-shadow.stderr b/tests/ui/type/type-shadow.stderr
index 25b4bff4d..999ba4b5f 100644
--- a/tests/ui/type/type-shadow.stderr
+++ b/tests/ui/type/type-shadow.stderr
@@ -6,6 +6,6 @@ LL | let y: Y = "hello";
| |
| expected due to this
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/type/type-unsatisfiable.usage.stderr b/tests/ui/type/type-unsatisfiable.usage.stderr
index 0b76ba8eb..b7c828b74 100644
--- a/tests/ui/type/type-unsatisfiable.usage.stderr
+++ b/tests/ui/type/type-unsatisfiable.usage.stderr
@@ -6,6 +6,6 @@ LL | let bar = *hey - *word;
| |
| dyn Vector2<ScalarType = i32>
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/type_length_limit.polonius.stderr b/tests/ui/type_length_limit.polonius.stderr
index 82d066b2a..bc09f1591 100644
--- a/tests/ui/type_length_limit.polonius.stderr
+++ b/tests/ui/type_length_limit.polonius.stderr
@@ -7,5 +7,5 @@ LL | pub fn drop<T>(_x: T) {}
= note: the full type name has been written to '$TEST_BUILD_DIR/type_length_limit.polonius/type_length_limit.long-type.txt'
= help: consider adding a `#![type_length_limit="8"]` attribute to your crate
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/type_length_limit.stderr b/tests/ui/type_length_limit.stderr
index 5b00d387a..32290a2f5 100644
--- a/tests/ui/type_length_limit.stderr
+++ b/tests/ui/type_length_limit.stderr
@@ -4,5 +4,5 @@ error: reached the type-length limit while instantiating `std::mem::drop::<Optio
= help: consider adding a `#![type_length_limit="10"]` attribute to your crate
= note: the full type name has been written to '$TEST_BUILD_DIR/type_length_limit/type_length_limit.long-type.txt'
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/typeck/apit-with-error-type-in-sig.stderr b/tests/ui/typeck/apit-with-error-type-in-sig.stderr
index 49b2eac1b..6ed9b1f9b 100644
--- a/tests/ui/typeck/apit-with-error-type-in-sig.stderr
+++ b/tests/ui/typeck/apit-with-error-type-in-sig.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `Bar` in this scope
LL | type Foo = Bar;
| ^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/typeck/assign-non-lval-needs-deref.stderr b/tests/ui/typeck/assign-non-lval-needs-deref.stderr
index ee83b1453..28520b7ac 100644
--- a/tests/ui/typeck/assign-non-lval-needs-deref.stderr
+++ b/tests/ui/typeck/assign-non-lval-needs-deref.stderr
@@ -11,6 +11,6 @@ help: consider dereferencing the left-hand side of this operation
LL | *(&mut Foo) += ();
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0067`.
diff --git a/tests/ui/typeck/autoderef-with-param-env-error.stderr b/tests/ui/typeck/autoderef-with-param-env-error.stderr
index 182612d5e..e06be398a 100644
--- a/tests/ui/typeck/autoderef-with-param-env-error.stderr
+++ b/tests/ui/typeck/autoderef-with-param-env-error.stderr
@@ -9,6 +9,6 @@ help: you might be missing a type parameter
LL | fn foo<T>()
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/typeck/bad-index-due-to-nested.stderr b/tests/ui/typeck/bad-index-due-to-nested.stderr
index 0b705d467..bd7fd0392 100644
--- a/tests/ui/typeck/bad-index-due-to-nested.stderr
+++ b/tests/ui/typeck/bad-index-due-to-nested.stderr
@@ -44,8 +44,8 @@ LL | fn index<'a, K, V>(map: &'a HashMap<K, V>, k: K) -> &'a V {
LL | map[k]
| ^ expected `&K`, found type parameter `K`
|
- = note: expected reference `&K`
- found type parameter `K`
+ = note: expected reference `&_`
+ found type parameter `_`
help: consider borrowing here
|
LL | map[&k]
@@ -59,8 +59,8 @@ LL | fn index<'a, K, V>(map: &'a HashMap<K, V>, k: K) -> &'a V {
LL | map[k]
| ^^^^^^ expected `&V`, found type parameter `V`
|
- = note: expected reference `&'a V`
- found type parameter `V`
+ = note: expected reference `&'a _`
+ found type parameter `_`
help: consider borrowing here
|
LL | &map[k]
diff --git a/tests/ui/typeck/bad-index-modulo-higher-ranked-regions.rs b/tests/ui/typeck/bad-index-modulo-higher-ranked-regions.rs
new file mode 100644
index 000000000..c8f6db7ae
--- /dev/null
+++ b/tests/ui/typeck/bad-index-modulo-higher-ranked-regions.rs
@@ -0,0 +1,29 @@
+// Test against ICE in #118111
+
+use std::ops::Index;
+
+struct Map<T, F> {
+ f: F,
+ inner: T,
+}
+
+impl<T, F, Idx> Index<Idx> for Map<T, F>
+where
+ T: Index<Idx>,
+ F: FnOnce(&T, Idx) -> Idx,
+{
+ type Output = T::Output;
+
+ fn index(&self, index: Idx) -> &Self::Output {
+ todo!()
+ }
+}
+
+fn main() {
+ Map { inner: [0_usize], f: |_, i: usize| 1_usize }[0];
+ //~^ ERROR cannot index into a value of type
+ // Problem here is that
+ // `f: |_, i: usize| ...`
+ // should be
+ // `f: |_: &_, i: usize| ...`
+}
diff --git a/tests/ui/typeck/bad-index-modulo-higher-ranked-regions.stderr b/tests/ui/typeck/bad-index-modulo-higher-ranked-regions.stderr
new file mode 100644
index 000000000..93c370fd8
--- /dev/null
+++ b/tests/ui/typeck/bad-index-modulo-higher-ranked-regions.stderr
@@ -0,0 +1,9 @@
+error[E0608]: cannot index into a value of type `Map<[usize; 1], {closure@$DIR/bad-index-modulo-higher-ranked-regions.rs:23:32: 23:45}>`
+ --> $DIR/bad-index-modulo-higher-ranked-regions.rs:23:55
+ |
+LL | Map { inner: [0_usize], f: |_, i: usize| 1_usize }[0];
+ | ^^^
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0608`.
diff --git a/tests/ui/typeck/bad-type-in-vec-contains.stderr b/tests/ui/typeck/bad-type-in-vec-contains.stderr
index b9b3a5fe5..de9bd33eb 100644
--- a/tests/ui/typeck/bad-type-in-vec-contains.stderr
+++ b/tests/ui/typeck/bad-type-in-vec-contains.stderr
@@ -15,6 +15,6 @@ help: consider borrowing here
LL | primes.contains(&3);
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/call-block.stderr b/tests/ui/typeck/call-block.stderr
index 68984bc1c..3c67cdd0f 100644
--- a/tests/ui/typeck/call-block.stderr
+++ b/tests/ui/typeck/call-block.stderr
@@ -6,6 +6,6 @@ LL | let _ = {42}();
| |
| call expression requires function
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0618`.
diff --git a/tests/ui/typeck/check-args-on-fn-err.stderr b/tests/ui/typeck/check-args-on-fn-err.stderr
index 864d33e0e..be0798ab1 100644
--- a/tests/ui/typeck/check-args-on-fn-err.stderr
+++ b/tests/ui/typeck/check-args-on-fn-err.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find function `unknown` in this scope
LL | unknown(1, |glyf| {
| ^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/typeck/derive-sugg-arg-arity.stderr b/tests/ui/typeck/derive-sugg-arg-arity.stderr
index 5b4c48171..41b16a772 100644
--- a/tests/ui/typeck/derive-sugg-arg-arity.stderr
+++ b/tests/ui/typeck/derive-sugg-arg-arity.stderr
@@ -26,6 +26,6 @@ LL + #[derive(PartialEq, PartialOrd)]
LL | pub struct A;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/typeck/dont-record-adjustments-when-pointing-at-arg.stderr b/tests/ui/typeck/dont-record-adjustments-when-pointing-at-arg.stderr
index 02e87d701..b651d8029 100644
--- a/tests/ui/typeck/dont-record-adjustments-when-pointing-at-arg.stderr
+++ b/tests/ui/typeck/dont-record-adjustments-when-pointing-at-arg.stderr
@@ -12,6 +12,6 @@ note: method defined here
LL | fn setFrame_display_(self, display: ()) {}
| ^^^^^^^^^^^^^^^^^ -----------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/escaping_bound_vars.stderr b/tests/ui/typeck/escaping_bound_vars.stderr
index f7077e52a..3ea409435 100644
--- a/tests/ui/typeck/escaping_bound_vars.stderr
+++ b/tests/ui/typeck/escaping_bound_vars.stderr
@@ -6,5 +6,5 @@ LL | (): Test<{ 1 + (<() as Elide(&())>::call) }>,
| |
| lifetime defined here
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/typeck/issue-100246.stderr b/tests/ui/typeck/issue-100246.stderr
index 428a07920..86eb163b4 100644
--- a/tests/ui/typeck/issue-100246.stderr
+++ b/tests/ui/typeck/issue-100246.stderr
@@ -8,6 +8,6 @@ LL | let other: Other = downcast()?;
= note: expected struct `Other`
found reference `&_`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/issue-100285.rs b/tests/ui/typeck/issue-100285.rs
index e206469b8..460e04571 100644
--- a/tests/ui/typeck/issue-100285.rs
+++ b/tests/ui/typeck/issue-100285.rs
@@ -1,6 +1,5 @@
-fn foo(n: i32) -> i32 {
- for i in 0..0 {
- //~^ ERROR: mismatched types [E0308]
+fn foo(n: i32) -> i32 { //~ HELP otherwise consider changing the return type to account for that possibility
+ for i in 0..0 { //~ ERROR mismatched types [E0308]
if n < 0 {
return i;
} else if n < 10 {
@@ -15,8 +14,7 @@ fn foo(n: i32) -> i32 {
return 5;
}
- }
- //~| help: return a value for the case when the loop has zero elements to iterate on, or consider changing the return type to account for that possibility
+ } //~ HELP return a value for the case when the loop has zero elements to iterate on
}
fn main() {}
diff --git a/tests/ui/typeck/issue-100285.stderr b/tests/ui/typeck/issue-100285.stderr
index 42c64b039..9c8685a77 100644
--- a/tests/ui/typeck/issue-100285.stderr
+++ b/tests/ui/typeck/issue-100285.stderr
@@ -4,9 +4,9 @@ error[E0308]: mismatched types
LL | fn foo(n: i32) -> i32 {
| --- expected `i32` because of return type
LL | / for i in 0..0 {
-LL | |
LL | | if n < 0 {
LL | | return i;
+LL | | } else if n < 10 {
... |
LL | |
LL | | }
@@ -17,7 +17,7 @@ note: the function expects a value to always be returned, but loops might run ze
|
LL | for i in 0..0 {
| ^^^^^^^^^^^^^ this might have zero elements to iterate on
-...
+LL | if n < 0 {
LL | return i;
| -------- if the loop doesn't execute, this value would never get returned
LL | } else if n < 10 {
@@ -27,8 +27,33 @@ LL | } else if n < 20 {
LL | return 2;
| -------- if the loop doesn't execute, this value would never get returned
= note: if the loop doesn't execute, 3 other values would never get returned
- = help: return a value for the case when the loop has zero elements to iterate on, or consider changing the return type to account for that possibility
+help: return a value for the case when the loop has zero elements to iterate on
+ |
+LL ~ }
+LL ~ /* `i32` value */
+ |
+help: otherwise consider changing the return type to account for that possibility
+ |
+LL ~ fn foo(n: i32) -> Option<i32> {
+LL | for i in 0..0 {
+LL | if n < 0 {
+LL ~ return Some(i);
+LL | } else if n < 10 {
+LL ~ return Some(1);
+LL | } else if n < 20 {
+LL ~ return Some(2);
+LL | } else if n < 30 {
+LL ~ return Some(3);
+LL | } else if n < 40 {
+LL ~ return Some(4);
+LL | } else {
+LL ~ return Some(5);
+LL | }
+LL |
+LL ~ }
+LL ~ None
+ |
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/issue-10401.stderr b/tests/ui/typeck/issue-10401.stderr
index 1f68abcfb..1b7daa9c2 100644
--- a/tests/ui/typeck/issue-10401.stderr
+++ b/tests/ui/typeck/issue-10401.stderr
@@ -6,6 +6,6 @@ LL | a += { "b" };
| |
| cannot use `+=` on type `&str`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0368`.
diff --git a/tests/ui/typeck/issue-104510-ice.stderr b/tests/ui/typeck/issue-104510-ice.stderr
index ddb510ef0..143139b2c 100644
--- a/tests/ui/typeck/issue-104510-ice.stderr
+++ b/tests/ui/typeck/issue-104510-ice.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `Oops` in this scope
LL | struct W<T: ?Sized>(Oops);
| ^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/typeck/issue-105946.stderr b/tests/ui/typeck/issue-105946.stderr
index 26c3b7fbc..2220271e5 100644
--- a/tests/ui/typeck/issue-105946.stderr
+++ b/tests/ui/typeck/issue-105946.stderr
@@ -3,6 +3,11 @@ error[E0425]: cannot find value `_y` in this scope
|
LL | let [_y..] = [Box::new(1), Box::new(2)];
| ^^ not found in this scope
+ |
+help: if you meant to collect the rest of the slice in `_y`, use the at operator
+ |
+LL | let [_y @ ..] = [Box::new(1), Box::new(2)];
+ | +
error[E0658]: `X..` patterns in slices are experimental
--> $DIR/issue-105946.rs:6:10
diff --git a/tests/ui/typeck/issue-106929.stderr b/tests/ui/typeck/issue-106929.stderr
index f744e5a41..375c9372e 100644
--- a/tests/ui/typeck/issue-106929.stderr
+++ b/tests/ui/typeck/issue-106929.stderr
@@ -10,6 +10,6 @@ LL - post(c, ());
LL + c.post(());
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/typeck/issue-107087.stderr b/tests/ui/typeck/issue-107087.stderr
index 8921e3f76..289c8d161 100644
--- a/tests/ui/typeck/issue-107087.stderr
+++ b/tests/ui/typeck/issue-107087.stderr
@@ -4,6 +4,6 @@ error[E0223]: ambiguous associated type
LL | A::B::<>::C
| ^^^^^^^^ help: use fully-qualified syntax: `<A<_> as Foo>::B`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0223`.
diff --git a/tests/ui/typeck/issue-107775.stderr b/tests/ui/typeck/issue-107775.stderr
index b97e74b7e..180b0183a 100644
--- a/tests/ui/typeck/issue-107775.stderr
+++ b/tests/ui/typeck/issue-107775.stderr
@@ -11,6 +11,6 @@ LL | Self { map }
= note: expected struct `HashMap<u16, fn(_) -> Pin<Box<(dyn Future<Output = ()> + Send + 'static)>>>`
found struct `HashMap<{integer}, fn(_) -> Pin<Box<dyn Future<Output = ()> + Send>> {<Struct as Trait>::do_something::<'_>}>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/issue-110052.stderr b/tests/ui/typeck/issue-110052.stderr
index 75374fa61..b25b6c0c0 100644
--- a/tests/ui/typeck/issue-110052.stderr
+++ b/tests/ui/typeck/issue-110052.stderr
@@ -4,6 +4,6 @@ error[E0223]: ambiguous associated type
LL | for<'iter> dyn Validator<<&'iter I>::Item>:,
| ^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<&'iter I as IntoIterator>::Item`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0223`.
diff --git a/tests/ui/typeck/issue-112385-while-assign-lhs-place-expr-ice.stderr b/tests/ui/typeck/issue-112385-while-assign-lhs-place-expr-ice.stderr
index cf2648d08..c7d853428 100644
--- a/tests/ui/typeck/issue-112385-while-assign-lhs-place-expr-ice.stderr
+++ b/tests/ui/typeck/issue-112385-while-assign-lhs-place-expr-ice.stderr
@@ -9,6 +9,6 @@ help: consider adding `let`
LL | while let Some(foo) = None {}
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/issue-114529-illegal-break-with-value.rs b/tests/ui/typeck/issue-114529-illegal-break-with-value.rs
index 613d1b634..353a935e3 100644
--- a/tests/ui/typeck/issue-114529-illegal-break-with-value.rs
+++ b/tests/ui/typeck/issue-114529-illegal-break-with-value.rs
@@ -17,4 +17,10 @@ fn main() {
};
51
}];
+
+ while true {
+ break (|| { //~ ERROR `break` with value from a `while` loop
+ let local = 9;
+ });
+ }
}
diff --git a/tests/ui/typeck/issue-114529-illegal-break-with-value.stderr b/tests/ui/typeck/issue-114529-illegal-break-with-value.stderr
index 4d6c27bbb..731f234c1 100644
--- a/tests/ui/typeck/issue-114529-illegal-break-with-value.stderr
+++ b/tests/ui/typeck/issue-114529-illegal-break-with-value.stderr
@@ -24,6 +24,21 @@ help: use `break` on its own without a value inside this `while` loop
LL | break;
| ~~~~~
-error: aborting due to 2 previous errors
+error[E0571]: `break` with value from a `while` loop
+ --> $DIR/issue-114529-illegal-break-with-value.rs:22:9
+ |
+LL | while true {
+ | ---------- you can't `break` with a value in a `while` loop
+LL | / break (|| {
+LL | | let local = 9;
+LL | | });
+ | |__________^ can only break with a value inside `loop` or breakable block
+ |
+help: use `break` on its own without a value inside this `while` loop
+ |
+LL | break;
+ | ~~~~~
+
+error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0571`.
diff --git a/tests/ui/typeck/issue-114918/const-in-fn-return-type.stderr b/tests/ui/typeck/issue-114918/const-in-fn-return-type.stderr
index 88ed96e14..02c212e24 100644
--- a/tests/ui/typeck/issue-114918/const-in-fn-return-type.stderr
+++ b/tests/ui/typeck/issue-114918/const-in-fn-return-type.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | fn func() -> [u8; { () } ] {
| ^^ expected `usize`, found `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/issue-114918/const-in-struct-type-arg.stderr b/tests/ui/typeck/issue-114918/const-in-struct-type-arg.stderr
index 3307e76d9..5941ea188 100644
--- a/tests/ui/typeck/issue-114918/const-in-struct-type-arg.stderr
+++ b/tests/ui/typeck/issue-114918/const-in-struct-type-arg.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | let s = S::<{ () }> { arr: [5, 6, 7]};
| ^^ expected `usize`, found `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/issue-114918/const-in-trait-fn-return-type.stderr b/tests/ui/typeck/issue-114918/const-in-trait-fn-return-type.stderr
index 6bc0de77a..063e21f40 100644
--- a/tests/ui/typeck/issue-114918/const-in-trait-fn-return-type.stderr
+++ b/tests/ui/typeck/issue-114918/const-in-trait-fn-return-type.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | fn func<const N: u32>() -> [ (); { () }] {
| ^^ expected `usize`, found `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/issue-13853-2.stderr b/tests/ui/typeck/issue-13853-2.stderr
index 92068df6c..af50e8da7 100644
--- a/tests/ui/typeck/issue-13853-2.stderr
+++ b/tests/ui/typeck/issue-13853-2.stderr
@@ -9,6 +9,6 @@ help: use parentheses to call the method
LL | fn foo(res : Box<dyn ResponseHook>) { res.get() }
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0615`.
diff --git a/tests/ui/typeck/issue-13853-5.stderr b/tests/ui/typeck/issue-13853-5.stderr
index 3d8f824ec..1eead9563 100644
--- a/tests/ui/typeck/issue-13853-5.stderr
+++ b/tests/ui/typeck/issue-13853-5.stderr
@@ -4,6 +4,6 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self
LL | impl<'a, T: Deserializable> Deserializable for &'a str {
| ^ unconstrained type parameter
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0207`.
diff --git a/tests/ui/typeck/issue-1871.stderr b/tests/ui/typeck/issue-1871.stderr
index b774ca22d..808226015 100644
--- a/tests/ui/typeck/issue-1871.stderr
+++ b/tests/ui/typeck/issue-1871.stderr
@@ -4,6 +4,6 @@ error[E0599]: no method named `honk` found for type `{integer}` in the current s
LL | f.honk()
| ^^^^ method not found in `{integer}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/typeck/issue-18937.stderr b/tests/ui/typeck/issue-18937.stderr
index 5e2ba0ef4..0575751a8 100644
--- a/tests/ui/typeck/issue-18937.stderr
+++ b/tests/ui/typeck/issue-18937.stderr
@@ -9,6 +9,6 @@ LL | | Self: Sized;
LL | where F: fmt::Debug + 'static,
| ^^^^^^^ impl has extra requirement `F: 'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0276`.
diff --git a/tests/ui/typeck/issue-33575.stderr b/tests/ui/typeck/issue-33575.stderr
index bbd8042d1..dc723952f 100644
--- a/tests/ui/typeck/issue-33575.stderr
+++ b/tests/ui/typeck/issue-33575.stderr
@@ -4,6 +4,6 @@ error[E0599]: no method named `foo` found for unit type `()` in the current scop
LL | let baz = ().foo();
| ^^^ method not found in `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/typeck/issue-36708.stderr b/tests/ui/typeck/issue-36708.stderr
index f1e0f4719..3589796b6 100644
--- a/tests/ui/typeck/issue-36708.stderr
+++ b/tests/ui/typeck/issue-36708.stderr
@@ -9,6 +9,6 @@ LL | fn foo<T>() {}
LL | fn foo();
| --------- expected 0 type parameters
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0049`.
diff --git a/tests/ui/typeck/issue-43189.stderr b/tests/ui/typeck/issue-43189.stderr
index c072e6a08..2e1265169 100644
--- a/tests/ui/typeck/issue-43189.stderr
+++ b/tests/ui/typeck/issue-43189.stderr
@@ -15,6 +15,6 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f
LL + use xcrate_issue_43189_b::xcrate_issue_43189_a::A;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/typeck/issue-46112.stderr b/tests/ui/typeck/issue-46112.stderr
index 26fc21dda..16beaea75 100644
--- a/tests/ui/typeck/issue-46112.stderr
+++ b/tests/ui/typeck/issue-46112.stderr
@@ -22,6 +22,6 @@ help: try wrapping the expression in `Some`
LL | fn main() { test(Ok(Some(()))); }
| +++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/issue-50687-ice-on-borrow.stderr b/tests/ui/typeck/issue-50687-ice-on-borrow.stderr
index 9e48ccefd..24dce4697 100644
--- a/tests/ui/typeck/issue-50687-ice-on-borrow.stderr
+++ b/tests/ui/typeck/issue-50687-ice-on-borrow.stderr
@@ -13,6 +13,6 @@ help: consider dereferencing the borrow
LL | let _: () = *Borrow::borrow(&owned);
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/issue-52082-type-param-shadows-existing-type.stderr b/tests/ui/typeck/issue-52082-type-param-shadows-existing-type.stderr
index 4be4c91df..e1091c8f5 100644
--- a/tests/ui/typeck/issue-52082-type-param-shadows-existing-type.stderr
+++ b/tests/ui/typeck/issue-52082-type-param-shadows-existing-type.stderr
@@ -5,7 +5,7 @@ LL | fn equals_ref<Point>(a: &Point, b: &Point) -> bool
| ----- type parameter 'Point' declared here
LL | {
LL | a.x == b.x && a.y == b.y
- | ^
+ | ^ unknown field
error[E0609]: no field `x` on type `&Point`
--> $DIR/issue-52082-type-param-shadows-existing-type.rs:31:18
@@ -14,7 +14,7 @@ LL | fn equals_ref<Point>(a: &Point, b: &Point) -> bool
| ----- type parameter 'Point' declared here
LL | {
LL | a.x == b.x && a.y == b.y
- | ^
+ | ^ unknown field
error[E0609]: no field `y` on type `&Point`
--> $DIR/issue-52082-type-param-shadows-existing-type.rs:31:25
@@ -23,7 +23,7 @@ LL | fn equals_ref<Point>(a: &Point, b: &Point) -> bool
| ----- type parameter 'Point' declared here
LL | {
LL | a.x == b.x && a.y == b.y
- | ^
+ | ^ unknown field
error[E0609]: no field `y` on type `&Point`
--> $DIR/issue-52082-type-param-shadows-existing-type.rs:31:32
@@ -32,7 +32,7 @@ LL | fn equals_ref<Point>(a: &Point, b: &Point) -> bool
| ----- type parameter 'Point' declared here
LL | {
LL | a.x == b.x && a.y == b.y
- | ^
+ | ^ unknown field
error[E0609]: no field `x` on type `Point`
--> $DIR/issue-52082-type-param-shadows-existing-type.rs:39:11
@@ -41,7 +41,7 @@ LL | fn equals_val<Point>(a: Point, b: Point) -> bool
| ----- type parameter 'Point' declared here
LL | {
LL | a.x == b.x && a.y == b.y
- | ^
+ | ^ unknown field
error[E0609]: no field `x` on type `Point`
--> $DIR/issue-52082-type-param-shadows-existing-type.rs:39:18
@@ -50,7 +50,7 @@ LL | fn equals_val<Point>(a: Point, b: Point) -> bool
| ----- type parameter 'Point' declared here
LL | {
LL | a.x == b.x && a.y == b.y
- | ^
+ | ^ unknown field
error[E0609]: no field `y` on type `Point`
--> $DIR/issue-52082-type-param-shadows-existing-type.rs:39:25
@@ -59,7 +59,7 @@ LL | fn equals_val<Point>(a: Point, b: Point) -> bool
| ----- type parameter 'Point' declared here
LL | {
LL | a.x == b.x && a.y == b.y
- | ^
+ | ^ unknown field
error[E0609]: no field `y` on type `Point`
--> $DIR/issue-52082-type-param-shadows-existing-type.rs:39:32
@@ -68,7 +68,7 @@ LL | fn equals_val<Point>(a: Point, b: Point) -> bool
| ----- type parameter 'Point' declared here
LL | {
LL | a.x == b.x && a.y == b.y
- | ^
+ | ^ unknown field
error: aborting due to 8 previous errors
diff --git a/tests/ui/typeck/issue-53712.stderr b/tests/ui/typeck/issue-53712.stderr
index db85919af..ec3176632 100644
--- a/tests/ui/typeck/issue-53712.stderr
+++ b/tests/ui/typeck/issue-53712.stderr
@@ -3,9 +3,10 @@ error[E0609]: no field `0` on type `[{integer}; 5]`
|
LL | arr.0;
| ----^
- | |
+ | | |
+ | | unknown field
| help: instead of using tuple indexing, use array indexing: `arr[0]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0609`.
diff --git a/tests/ui/typeck/issue-57404.stderr b/tests/ui/typeck/issue-57404.stderr
index a631dbb39..4c1bfc0cb 100644
--- a/tests/ui/typeck/issue-57404.stderr
+++ b/tests/ui/typeck/issue-57404.stderr
@@ -14,6 +14,6 @@ LL - handlers.unwrap().as_mut().call_mut(&mut ());
LL + handlers.unwrap().as_mut().call_mut(());
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr b/tests/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr
index 6c3302f29..301838880 100644
--- a/tests/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr
+++ b/tests/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr
@@ -9,6 +9,6 @@ LL | *x
= note: expected unit type `()`
found trait object `(dyn Iterator<Item = ()> + 'static)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/issue-65611.stderr b/tests/ui/typeck/issue-65611.stderr
index 003c63079..2278450a6 100644
--- a/tests/ui/typeck/issue-65611.stderr
+++ b/tests/ui/typeck/issue-65611.stderr
@@ -8,7 +8,7 @@ error[E0609]: no field `0` on type `&_`
--> $DIR/issue-65611.rs:59:36
|
LL | let x = buffer.last().unwrap().0.clone();
- | ^
+ | ^ unknown field
error: aborting due to 2 previous errors
diff --git a/tests/ui/typeck/issue-69378-ice-on-invalid-type-node-after-recovery.stderr b/tests/ui/typeck/issue-69378-ice-on-invalid-type-node-after-recovery.stderr
index fc7c23a22..1b70c6f9d 100644
--- a/tests/ui/typeck/issue-69378-ice-on-invalid-type-node-after-recovery.stderr
+++ b/tests/ui/typeck/issue-69378-ice-on-invalid-type-node-after-recovery.stderr
@@ -6,5 +6,5 @@ LL | struct Foo { 0: u8 }
| |
| while parsing this struct
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/typeck/issue-7813.stderr b/tests/ui/typeck/issue-7813.stderr
index 2a747f679..953cbd206 100644
--- a/tests/ui/typeck/issue-7813.stderr
+++ b/tests/ui/typeck/issue-7813.stderr
@@ -9,6 +9,6 @@ help: consider giving `v` an explicit type, where the placeholders `_` are speci
LL | let v: &[_; 0] = &[];
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/typeck/issue-83621-placeholder-static-in-extern.stderr b/tests/ui/typeck/issue-83621-placeholder-static-in-extern.stderr
index 9376e8bcf..a4cb53025 100644
--- a/tests/ui/typeck/issue-83621-placeholder-static-in-extern.stderr
+++ b/tests/ui/typeck/issue-83621-placeholder-static-in-extern.stderr
@@ -4,6 +4,6 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
LL | static x: _;
| ^ not allowed in type signatures
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/ui/typeck/issue-84160.stderr b/tests/ui/typeck/issue-84160.stderr
index 4d456ae84..1dc798b5e 100644
--- a/tests/ui/typeck/issue-84160.stderr
+++ b/tests/ui/typeck/issue-84160.stderr
@@ -10,6 +10,6 @@ LL | return "test";
= note: expected reference `&u32`
found reference `&'static str`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/issue-86721-return-expr-ice.rev1.stderr b/tests/ui/typeck/issue-86721-return-expr-ice.rev1.stderr
index b1111fcf1..36ae7d5de 100644
--- a/tests/ui/typeck/issue-86721-return-expr-ice.rev1.stderr
+++ b/tests/ui/typeck/issue-86721-return-expr-ice.rev1.stderr
@@ -4,6 +4,6 @@ error[E0572]: return statement outside of function body
LL | const U: usize = return;
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0572`.
diff --git a/tests/ui/typeck/issue-86721-return-expr-ice.rev2.stderr b/tests/ui/typeck/issue-86721-return-expr-ice.rev2.stderr
index f489ae200..ff781a68d 100644
--- a/tests/ui/typeck/issue-86721-return-expr-ice.rev2.stderr
+++ b/tests/ui/typeck/issue-86721-return-expr-ice.rev2.stderr
@@ -4,6 +4,6 @@ error[E0572]: return statement outside of function body
LL | fn foo(a: [(); return]);
| ^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0572`.
diff --git a/tests/ui/typeck/issue-87181/empty-tuple-method.stderr b/tests/ui/typeck/issue-87181/empty-tuple-method.stderr
index f0ca49e6d..a34ed0837 100644
--- a/tests/ui/typeck/issue-87181/empty-tuple-method.stderr
+++ b/tests/ui/typeck/issue-87181/empty-tuple-method.stderr
@@ -9,6 +9,6 @@ help: use parentheses to construct this tuple struct
LL | (thing.bar)().foo();
| + +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/typeck/issue-87181/enum-variant.stderr b/tests/ui/typeck/issue-87181/enum-variant.stderr
index d313a887a..800369b51 100644
--- a/tests/ui/typeck/issue-87181/enum-variant.stderr
+++ b/tests/ui/typeck/issue-87181/enum-variant.stderr
@@ -9,6 +9,6 @@ help: use parentheses to construct this tuple variant
LL | (thing.bar)().foo();
| + +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/typeck/issue-87181/tuple-field.stderr b/tests/ui/typeck/issue-87181/tuple-field.stderr
index 0a7d30b61..e4b5a155e 100644
--- a/tests/ui/typeck/issue-87181/tuple-field.stderr
+++ b/tests/ui/typeck/issue-87181/tuple-field.stderr
@@ -2,13 +2,13 @@ error[E0609]: no field `0` on type `fn(char, u16) -> Foo {Foo}`
--> $DIR/tuple-field.rs:12:15
|
LL | thing.bar.0;
- | ^
+ | ^ unknown field
|
help: use parentheses to construct this tuple struct
|
LL | (thing.bar)(/* char */, /* u16 */).0;
| + ++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0609`.
diff --git a/tests/ui/typeck/issue-87181/tuple-method.stderr b/tests/ui/typeck/issue-87181/tuple-method.stderr
index de3dc15a5..87145d9bb 100644
--- a/tests/ui/typeck/issue-87181/tuple-method.stderr
+++ b/tests/ui/typeck/issue-87181/tuple-method.stderr
@@ -4,6 +4,6 @@ error[E0599]: no method named `foo` found for struct constructor `fn(u8, i32) ->
LL | thing.bar.foo();
| ^^^ method not found in `fn(u8, i32) -> Foo {Foo}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/typeck/issue-87771-ice-assign-assign-to-bool.stderr b/tests/ui/typeck/issue-87771-ice-assign-assign-to-bool.stderr
index 56817ee2c..93c52f3c5 100644
--- a/tests/ui/typeck/issue-87771-ice-assign-assign-to-bool.stderr
+++ b/tests/ui/typeck/issue-87771-ice-assign-assign-to-bool.stderr
@@ -6,6 +6,6 @@ LL | let mut a;
LL | a = a = true;
| ^^^^^^^^ expected `bool`, found `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/issue-87872-missing-inaccessible-field-literal.stderr b/tests/ui/typeck/issue-87872-missing-inaccessible-field-literal.stderr
index f0bd3e0dd..899dd0258 100644
--- a/tests/ui/typeck/issue-87872-missing-inaccessible-field-literal.stderr
+++ b/tests/ui/typeck/issue-87872-missing-inaccessible-field-literal.stderr
@@ -4,7 +4,7 @@ error: cannot construct `Foo` with struct literal syntax due to private fields
LL | foo::Foo {};
| ^^^^^^^^
|
- = note: ... and other private field `you_cant_use_this_field` that was not provided
+ = note: private field `you_cant_use_this_field` that was not provided
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/typeck/issue-87872-missing-inaccessible-field-pattern.stderr b/tests/ui/typeck/issue-87872-missing-inaccessible-field-pattern.stderr
index dc3097510..96ac48143 100644
--- a/tests/ui/typeck/issue-87872-missing-inaccessible-field-pattern.stderr
+++ b/tests/ui/typeck/issue-87872-missing-inaccessible-field-pattern.stderr
@@ -13,6 +13,6 @@ help: if you don't care about this missing field, you can explicitly ignore it
LL | let foo::Foo { .. } = foo::Foo::default();
| ~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0027`.
diff --git a/tests/ui/typeck/issue-88803-call-expr-method.stderr b/tests/ui/typeck/issue-88803-call-expr-method.stderr
index 645c04b87..ebae93cee 100644
--- a/tests/ui/typeck/issue-88803-call-expr-method.stderr
+++ b/tests/ui/typeck/issue-88803-call-expr-method.stderr
@@ -10,6 +10,6 @@ LL - (a.unwrap)()
LL + a.unwrap()
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0615`.
diff --git a/tests/ui/typeck/issue-88844.stderr b/tests/ui/typeck/issue-88844.stderr
index 90bba90be..68473f65d 100644
--- a/tests/ui/typeck/issue-88844.stderr
+++ b/tests/ui/typeck/issue-88844.stderr
@@ -7,6 +7,6 @@ LL | struct Struct { value: i32 }
LL | impl Stuct {
| ^^^^^ help: a struct with a similar name exists: `Struct`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/typeck/issue-89044-wrapped-expr-method.stderr b/tests/ui/typeck/issue-89044-wrapped-expr-method.stderr
index 6fa0915dc..bb407fdb8 100644
--- a/tests/ui/typeck/issue-89044-wrapped-expr-method.stderr
+++ b/tests/ui/typeck/issue-89044-wrapped-expr-method.stderr
@@ -9,6 +9,6 @@ help: use parentheses to call the method
LL | (a.unwrap())
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0615`.
diff --git a/tests/ui/typeck/issue-89275.stderr b/tests/ui/typeck/issue-89275.stderr
index d73e647d2..6686d5f97 100644
--- a/tests/ui/typeck/issue-89275.stderr
+++ b/tests/ui/typeck/issue-89275.stderr
@@ -9,6 +9,6 @@ LL | let other: &mut Other = downcast();
= note: expected mutable reference `&mut Other`
found reference `&_`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/issue-89806.stderr b/tests/ui/typeck/issue-89806.stderr
index c36b4967e..554a06cb6 100644
--- a/tests/ui/typeck/issue-89806.stderr
+++ b/tests/ui/typeck/issue-89806.stderr
@@ -4,6 +4,6 @@ error[E0599]: no method named `as_ref` found for type `u8` in the current scope
LL | 0u8.as_ref();
| ^^^^^^ method not found in `u8`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/typeck/issue-90101.stderr b/tests/ui/typeck/issue-90101.stderr
index 484089f9e..a24f9cb54 100644
--- a/tests/ui/typeck/issue-90101.stderr
+++ b/tests/ui/typeck/issue-90101.stderr
@@ -19,6 +19,6 @@ note: required by a bound in `func`
LL | fn func(path: impl Into<PathBuf>, code: impl Into<String>) {}
| ^^^^^^^^^^^^^ required by this bound in `func`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/typeck/issue-90164.stderr b/tests/ui/typeck/issue-90164.stderr
index 8586f5222..43e96e1ad 100644
--- a/tests/ui/typeck/issue-90164.stderr
+++ b/tests/ui/typeck/issue-90164.stderr
@@ -18,6 +18,6 @@ help: consider restricting type parameter `T`
LL | fn f<T: std::marker::Unpin>(r: T) {
| ++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/typeck/issue-90319.stderr b/tests/ui/typeck/issue-90319.stderr
index 61549dd70..fa18056e8 100644
--- a/tests/ui/typeck/issue-90319.stderr
+++ b/tests/ui/typeck/issue-90319.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `Thing` in this scope
LL | let thing = get::<Thing>();
| ^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/typeck/issue-90483-inaccessible-field-adjustment.stderr b/tests/ui/typeck/issue-90483-inaccessible-field-adjustment.stderr
index 02cdc102c..fff9f5da1 100644
--- a/tests/ui/typeck/issue-90483-inaccessible-field-adjustment.stderr
+++ b/tests/ui/typeck/issue-90483-inaccessible-field-adjustment.stderr
@@ -9,6 +9,6 @@ help: a method `foo` also exists, call it with parentheses
LL | || s.foo() + s.foo();
| ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0616`.
diff --git a/tests/ui/typeck/issue-90804-incorrect-reference-suggestion.stderr b/tests/ui/typeck/issue-90804-incorrect-reference-suggestion.stderr
index a75024aa2..2d4069f50 100644
--- a/tests/ui/typeck/issue-90804-incorrect-reference-suggestion.stderr
+++ b/tests/ui/typeck/issue-90804-incorrect-reference-suggestion.stderr
@@ -10,6 +10,6 @@ note: required by a bound in `check`
LL | pub fn check<T: Marker<u32>>(_: T) {}
| ^^^^^^^^^^^ required by this bound in `check`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/typeck/issue-91210-ptr-method.stderr b/tests/ui/typeck/issue-91210-ptr-method.stderr
index 7a0cfb2cf..f2f996c7b 100644
--- a/tests/ui/typeck/issue-91210-ptr-method.stderr
+++ b/tests/ui/typeck/issue-91210-ptr-method.stderr
@@ -9,6 +9,6 @@ help: to access the field, dereference first
LL | (*x).read = 4;
| ++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0615`.
diff --git a/tests/ui/typeck/issue-92481.stderr b/tests/ui/typeck/issue-92481.stderr
index d87d3277d..a1fdd8359 100644
--- a/tests/ui/typeck/issue-92481.stderr
+++ b/tests/ui/typeck/issue-92481.stderr
@@ -7,5 +7,5 @@ LL | fn r({) {
| |unclosed delimiter
| closing delimiter possibly meant for this
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/typeck/issue-93486.stderr b/tests/ui/typeck/issue-93486.stderr
index 167edc894..c1489d9bc 100644
--- a/tests/ui/typeck/issue-93486.stderr
+++ b/tests/ui/typeck/issue-93486.stderr
@@ -11,6 +11,6 @@ help: consider dereferencing here to assign to the mutably borrowed value
LL | *vec![].last_mut().unwrap() = 3_u8;
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0070`.
diff --git a/tests/ui/typeck/issue-96530.stderr b/tests/ui/typeck/issue-96530.stderr
index 3a67ef026..d2fb8169f 100644
--- a/tests/ui/typeck/issue-96530.stderr
+++ b/tests/ui/typeck/issue-96530.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | ..man.clone()
| ^^^^^^^^^^^ expected `Person`, found `&Person`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/issue-96738.stderr b/tests/ui/typeck/issue-96738.stderr
index 547cffffa..2bc8453dd 100644
--- a/tests/ui/typeck/issue-96738.stderr
+++ b/tests/ui/typeck/issue-96738.stderr
@@ -8,7 +8,7 @@ error[E0609]: no field `nonexistent_field` on type `fn(_) -> Option<_> {Option::
--> $DIR/issue-96738.rs:3:10
|
LL | Some.nonexistent_field;
- | ^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^ unknown field
error: aborting due to 2 previous errors
diff --git a/tests/ui/typeck/issue-98260.stderr b/tests/ui/typeck/issue-98260.stderr
index 08a1d17e2..b7debd335 100644
--- a/tests/ui/typeck/issue-98260.stderr
+++ b/tests/ui/typeck/issue-98260.stderr
@@ -7,6 +7,6 @@ LL | fn a(aa: B) -> Result<_, B> {
| | not allowed in type signatures
| help: replace with the correct return type: `Result<(), B>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/ui/typeck/issue-98982.rs b/tests/ui/typeck/issue-98982.rs
index 2553824bb..f875d20fa 100644
--- a/tests/ui/typeck/issue-98982.rs
+++ b/tests/ui/typeck/issue-98982.rs
@@ -1,9 +1,7 @@
-fn foo() -> i32 {
- for i in 0..0 {
- //~^ ERROR: mismatched types [E0308]
+fn foo() -> i32 { //~ HELP otherwise consider changing the return type to account for that possibility
+ for i in 0..0 { //~ ERROR mismatched types [E0308]
return i;
- }
- //~| help: return a value for the case when the loop has zero elements to iterate on, or consider changing the return type to account for that possibility
+ } //~ HELP return a value for the case when the loop has zero elements to iterate on
}
fn main() {}
diff --git a/tests/ui/typeck/issue-98982.stderr b/tests/ui/typeck/issue-98982.stderr
index 3c9806ac9..d8d5a86b1 100644
--- a/tests/ui/typeck/issue-98982.stderr
+++ b/tests/ui/typeck/issue-98982.stderr
@@ -4,7 +4,6 @@ error[E0308]: mismatched types
LL | fn foo() -> i32 {
| --- expected `i32` because of return type
LL | / for i in 0..0 {
-LL | |
LL | | return i;
LL | | }
| |_____^ expected `i32`, found `()`
@@ -14,11 +13,22 @@ note: the function expects a value to always be returned, but loops might run ze
|
LL | for i in 0..0 {
| ^^^^^^^^^^^^^ this might have zero elements to iterate on
-LL |
LL | return i;
| -------- if the loop doesn't execute, this value would never get returned
- = help: return a value for the case when the loop has zero elements to iterate on, or consider changing the return type to account for that possibility
+help: return a value for the case when the loop has zero elements to iterate on
+ |
+LL ~ }
+LL ~ /* `i32` value */
+ |
+help: otherwise consider changing the return type to account for that possibility
+ |
+LL ~ fn foo() -> Option<i32> {
+LL | for i in 0..0 {
+LL ~ return Some(i);
+LL ~ }
+LL ~ None
+ |
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/mismatched-map-under-self.stderr b/tests/ui/typeck/mismatched-map-under-self.stderr
index 51491407c..13678b4b8 100644
--- a/tests/ui/typeck/mismatched-map-under-self.stderr
+++ b/tests/ui/typeck/mismatched-map-under-self.stderr
@@ -12,8 +12,8 @@ note: type in trait
|
LL | fn values(&self) -> Self::Values;
| ^^^^^
- = note: expected signature `fn(&Option<T>)`
- found signature `fn(Option<T>)`
+ = note: expected signature `fn(&Option<_>)`
+ found signature `fn(Option<_>)`
error[E0631]: type mismatch in function arguments
--> $DIR/mismatched-map-under-self.rs:12:18
@@ -30,6 +30,10 @@ LL | self.map(Insertable::values).unwrap_or_default()
found function signature `for<'a> fn(&'a _) -> _`
note: required by a bound in `Option::<T>::map`
--> $SRC_DIR/core/src/option.rs:LL:COL
+help: consider wrapping the function in a closure
+ |
+LL | self.map(|arg0: T| Insertable::values(&arg0)).unwrap_or_default()
+ | +++++++++ +++++++
error: aborting due to 2 previous errors
diff --git a/tests/ui/typeck/missing-private-fields-in-struct-literal.stderr b/tests/ui/typeck/missing-private-fields-in-struct-literal.stderr
index 234110f31..003eaa405 100644
--- a/tests/ui/typeck/missing-private-fields-in-struct-literal.stderr
+++ b/tests/ui/typeck/missing-private-fields-in-struct-literal.stderr
@@ -9,7 +9,7 @@ LL | a: (),
LL | b: (),
| ----- private field
|
- = note: ... and other private fields `c`, `d` and `e` that were not provided
+ = note: ...and other private fields `c`, `d` and `e` that were not provided
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/typeck/no-type-for-node-ice.stderr b/tests/ui/typeck/no-type-for-node-ice.stderr
index b50241fb1..a79d6b600 100644
--- a/tests/ui/typeck/no-type-for-node-ice.stderr
+++ b/tests/ui/typeck/no-type-for-node-ice.stderr
@@ -2,8 +2,8 @@ error[E0609]: no field `homura` on type `&'static str`
--> $DIR/no-type-for-node-ice.rs:4:8
|
LL | "".homura[""];
- | ^^^^^^
+ | ^^^^^^ unknown field
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0609`.
diff --git a/tests/ui/typeck/nonexistent-field-not-ambiguous.stderr b/tests/ui/typeck/nonexistent-field-not-ambiguous.stderr
index 76a2a5f99..82207a731 100644
--- a/tests/ui/typeck/nonexistent-field-not-ambiguous.stderr
+++ b/tests/ui/typeck/nonexistent-field-not-ambiguous.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `MissingType` in this scope
LL | val: MissingType,
| ^^^^^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/typeck/output-type-mismatch.stderr b/tests/ui/typeck/output-type-mismatch.stderr
index 4507a4df6..c6df66506 100644
--- a/tests/ui/typeck/output-type-mismatch.stderr
+++ b/tests/ui/typeck/output-type-mismatch.stderr
@@ -6,6 +6,6 @@ LL | fn main() { let i: isize; i = f(); }
| |
| expected due to this type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/path-to-method-sugg-unresolved-expr.stderr b/tests/ui/typeck/path-to-method-sugg-unresolved-expr.stderr
index b01e30be5..3e03c17f3 100644
--- a/tests/ui/typeck/path-to-method-sugg-unresolved-expr.stderr
+++ b/tests/ui/typeck/path-to-method-sugg-unresolved-expr.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: use of undeclared crate or module `page_size`
LL | let page_size = page_size::get();
| ^^^^^^^^^ use of undeclared crate or module `page_size`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/typeck/point-at-type-param-in-path-expr.stderr b/tests/ui/typeck/point-at-type-param-in-path-expr.stderr
index 1feaa0508..14642b25c 100644
--- a/tests/ui/typeck/point-at-type-param-in-path-expr.stderr
+++ b/tests/ui/typeck/point-at-type-param-in-path-expr.stderr
@@ -12,6 +12,6 @@ note: required by a bound in `foo`
LL | fn foo<T: std::fmt::Display>() {}
| ^^^^^^^^^^^^^^^^^ required by this bound in `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/typeck/point-at-type-parameter-definition.stderr b/tests/ui/typeck/point-at-type-parameter-definition.stderr
index 8a6ab6110..bfe01f361 100644
--- a/tests/ui/typeck/point-at-type-parameter-definition.stderr
+++ b/tests/ui/typeck/point-at-type-parameter-definition.stderr
@@ -7,6 +7,6 @@ LL | fn do_stuff(&self) {
LL | self[0].method();
| ^^^^^^ method not found in `Hello`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/typeck/ptr-null-mutability-suggestions.stderr b/tests/ui/typeck/ptr-null-mutability-suggestions.stderr
index 705b029bd..b615d9fb4 100644
--- a/tests/ui/typeck/ptr-null-mutability-suggestions.stderr
+++ b/tests/ui/typeck/ptr-null-mutability-suggestions.stderr
@@ -16,6 +16,6 @@ note: function defined here
LL | fn expecting_null_mut(_: *mut u8) {}
| ^^^^^^^^^^^^^^^^^^ ----------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/quiet-type-err-let-binding.stderr b/tests/ui/typeck/quiet-type-err-let-binding.stderr
index ad7f85e01..f27ca1dd5 100644
--- a/tests/ui/typeck/quiet-type-err-let-binding.stderr
+++ b/tests/ui/typeck/quiet-type-err-let-binding.stderr
@@ -4,6 +4,6 @@ error[E0425]: cannot find function `foo` in this scope
LL | let x = foo();
| ^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/typeck/remove-extra-argument.stderr b/tests/ui/typeck/remove-extra-argument.stderr
index 72ddebab4..9557c4145 100644
--- a/tests/ui/typeck/remove-extra-argument.stderr
+++ b/tests/ui/typeck/remove-extra-argument.stderr
@@ -13,6 +13,6 @@ note: function defined here
LL | fn l(_a: Vec<u8>) {}
| ^ -----------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0061`.
diff --git a/tests/ui/typeck/repeat-expr-checks-wf.stderr b/tests/ui/typeck/repeat-expr-checks-wf.stderr
index a821088a4..8d5b57ead 100644
--- a/tests/ui/typeck/repeat-expr-checks-wf.stderr
+++ b/tests/ui/typeck/repeat-expr-checks-wf.stderr
@@ -7,6 +7,6 @@ LL | let a = [T::ASSOC; 2];
= help: the trait `Sized` is not implemented for `[u8]`
= note: slice and array elements must have `Sized` type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/typeck/return-dyn-type-mismatch-2.stderr b/tests/ui/typeck/return-dyn-type-mismatch-2.stderr
index 9c368e838..77299621a 100644
--- a/tests/ui/typeck/return-dyn-type-mismatch-2.stderr
+++ b/tests/ui/typeck/return-dyn-type-mismatch-2.stderr
@@ -10,6 +10,6 @@ LL | 42
= note: expected trait object `(dyn Trait<T> + 'static)`
found type `{integer}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/return-dyn-type-mismatch.stderr b/tests/ui/typeck/return-dyn-type-mismatch.stderr
index 9d0a609d8..064d0d64e 100644
--- a/tests/ui/typeck/return-dyn-type-mismatch.stderr
+++ b/tests/ui/typeck/return-dyn-type-mismatch.stderr
@@ -10,6 +10,6 @@ LL | None => None,
= note: expected trait object `(dyn TestTrait<MyType = T> + 'static)`
found enum `Option<_>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/return_type_containing_closure.stderr b/tests/ui/typeck/return_type_containing_closure.stderr
index 7be46ac07..ea9c74be3 100644
--- a/tests/ui/typeck/return_type_containing_closure.stderr
+++ b/tests/ui/typeck/return_type_containing_closure.stderr
@@ -15,6 +15,6 @@ help: a return type might be missing here
LL | fn foo() -> _ {
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/suppressed-error.stderr b/tests/ui/typeck/suppressed-error.stderr
index 11d70f8a4..0b68fc97e 100644
--- a/tests/ui/typeck/suppressed-error.stderr
+++ b/tests/ui/typeck/suppressed-error.stderr
@@ -9,6 +9,6 @@ LL | let (x, y) = ();
= note: expected unit type `()`
found tuple `(_, _)`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/tag-that-dare-not-speak-its-name.stderr b/tests/ui/typeck/tag-that-dare-not-speak-its-name.stderr
index c4f164295..3a7e2068c 100644
--- a/tests/ui/typeck/tag-that-dare-not-speak-its-name.stderr
+++ b/tests/ui/typeck/tag-that-dare-not-speak-its-name.stderr
@@ -13,6 +13,6 @@ help: consider using `Option::expect` to unwrap the `Option<_>` value, panicking
LL | let x : char = last(y).expect("REASON");
| +++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/terr-in-field.stderr b/tests/ui/typeck/terr-in-field.stderr
index 09df4b34b..adc336db5 100644
--- a/tests/ui/typeck/terr-in-field.stderr
+++ b/tests/ui/typeck/terr-in-field.stderr
@@ -12,6 +12,6 @@ note: function defined here
LL | fn want_foo(f: Foo) {}
| ^^^^^^^^ ------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/terr-sorts.stderr b/tests/ui/typeck/terr-sorts.stderr
index 8f1975374..59d9392c2 100644
--- a/tests/ui/typeck/terr-sorts.stderr
+++ b/tests/ui/typeck/terr-sorts.stderr
@@ -18,6 +18,6 @@ help: consider unboxing the value
LL | want_foo(*b);
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/typeck-cast-pointer-to-float.stderr b/tests/ui/typeck/typeck-cast-pointer-to-float.stderr
index 81d968454..670ff73e2 100644
--- a/tests/ui/typeck/typeck-cast-pointer-to-float.stderr
+++ b/tests/ui/typeck/typeck-cast-pointer-to-float.stderr
@@ -4,6 +4,6 @@ error[E0606]: casting `*const i16` as `f32` is invalid
LL | ((&x) as *const i16) as f32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0606`.
diff --git a/tests/ui/typeck/typeck-default-trait-impl-assoc-type.stderr b/tests/ui/typeck/typeck-default-trait-impl-assoc-type.stderr
index 468a14762..cedb1b13b 100644
--- a/tests/ui/typeck/typeck-default-trait-impl-assoc-type.stderr
+++ b/tests/ui/typeck/typeck-default-trait-impl-assoc-type.stderr
@@ -15,6 +15,6 @@ help: consider further restricting the associated type
LL | fn bar<T:Trait+Send>() where <T as Trait>::AssocType: Send {
| +++++++++++++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/typeck/typeck-default-trait-impl-negation-send.stderr b/tests/ui/typeck/typeck-default-trait-impl-negation-send.stderr
index 2ce32990e..771272ad1 100644
--- a/tests/ui/typeck/typeck-default-trait-impl-negation-send.stderr
+++ b/tests/ui/typeck/typeck-default-trait-impl-negation-send.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `is_send`
LL | fn is_send<T: Send>() {}
| ^^^^ required by this bound in `is_send`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/typeck/typeck-default-trait-impl-send-param.stderr b/tests/ui/typeck/typeck-default-trait-impl-send-param.stderr
index 887a1ddbb..537ae6b2b 100644
--- a/tests/ui/typeck/typeck-default-trait-impl-send-param.stderr
+++ b/tests/ui/typeck/typeck-default-trait-impl-send-param.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `T`
LL | fn foo<T: std::marker::Send>() {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/typeck/typeck_type_placeholder_lifetime_1.stderr b/tests/ui/typeck/typeck_type_placeholder_lifetime_1.stderr
index c4e4aed20..e4b1c02c2 100644
--- a/tests/ui/typeck/typeck_type_placeholder_lifetime_1.stderr
+++ b/tests/ui/typeck/typeck_type_placeholder_lifetime_1.stderr
@@ -12,6 +12,6 @@ note: struct defined here, with 1 generic parameter: `T`
LL | struct Foo<'a, T:'a> {
| ^^^ -
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/typeck/typeck_type_placeholder_lifetime_2.stderr b/tests/ui/typeck/typeck_type_placeholder_lifetime_2.stderr
index 302231777..fcb5ecc40 100644
--- a/tests/ui/typeck/typeck_type_placeholder_lifetime_2.stderr
+++ b/tests/ui/typeck/typeck_type_placeholder_lifetime_2.stderr
@@ -12,6 +12,6 @@ note: struct defined here, with 1 generic parameter: `T`
LL | struct Foo<'a, T:'a> {
| ^^^ -
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/typeck/while-loop-block-cond.stderr b/tests/ui/typeck/while-loop-block-cond.stderr
index 598273af9..7f67650fd 100644
--- a/tests/ui/typeck/while-loop-block-cond.stderr
+++ b/tests/ui/typeck/while-loop-block-cond.stderr
@@ -4,6 +4,6 @@ error[E0308]: mismatched types
LL | while {} {}
| ^^ expected `bool`, found `()`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/while-type-error.stderr b/tests/ui/typeck/while-type-error.stderr
index 529cbff05..b67ec5615 100644
--- a/tests/ui/typeck/while-type-error.stderr
+++ b/tests/ui/typeck/while-type-error.stderr
@@ -7,6 +7,6 @@ LL | fn main() { while main { } }
= note: expected type `bool`
found fn item `fn() {main}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/wrong-ret-type.stderr b/tests/ui/typeck/wrong-ret-type.stderr
index c686a0b2f..33a094ce9 100644
--- a/tests/ui/typeck/wrong-ret-type.stderr
+++ b/tests/ui/typeck/wrong-ret-type.stderr
@@ -11,6 +11,6 @@ help: you can convert an `isize` to a `usize` and panic if the converted value d
LL | fn mk_int() -> usize { let i: isize = 3; return i.try_into().unwrap(); }
| ++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeof/issue-100183.stderr b/tests/ui/typeof/issue-100183.stderr
index 01d3079b2..7be923d93 100644
--- a/tests/ui/typeof/issue-100183.stderr
+++ b/tests/ui/typeof/issue-100183.stderr
@@ -9,6 +9,6 @@ help: consider replacing `typeof(...)` with an actual type
LL | y: (&'static str,),
| ~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0516`.
diff --git a/tests/ui/typeof/issue-29184.stderr b/tests/ui/typeof/issue-29184.stderr
index 75b6c64f2..f07c850e5 100644
--- a/tests/ui/typeof/issue-29184.stderr
+++ b/tests/ui/typeof/issue-29184.stderr
@@ -9,6 +9,6 @@ help: consider replacing `typeof(...)` with an actual type
LL | let x: i32 = 92;
| ~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0516`.
diff --git a/tests/ui/ufcs/ufcs-explicit-self-bad.rs b/tests/ui/ufcs/ufcs-explicit-self-bad.rs
index 9b0f99a18..3bb3d906d 100644
--- a/tests/ui/ufcs/ufcs-explicit-self-bad.rs
+++ b/tests/ui/ufcs/ufcs-explicit-self-bad.rs
@@ -39,12 +39,12 @@ impl<'a, T> SomeTrait for &'a Bar<T> {
//~| ERROR has an incompatible type for trait
fn dummy3(self: &&Bar<T>) {}
//~^ ERROR mismatched `self` parameter type
- //~| expected reference `&'a Bar<T>`
- //~| found reference `&Bar<T>`
+ //~| expected reference `&'a Bar<_>`
+ //~| found reference `&Bar<_>`
//~| lifetime mismatch
//~| ERROR mismatched `self` parameter type
- //~| expected reference `&'a Bar<T>`
- //~| found reference `&Bar<T>`
+ //~| expected reference `&'a Bar<_>`
+ //~| found reference `&Bar<_>`
//~| lifetime mismatch
}
diff --git a/tests/ui/ufcs/ufcs-explicit-self-bad.stderr b/tests/ui/ufcs/ufcs-explicit-self-bad.stderr
index 0efaa41d4..4c2cb0eb7 100644
--- a/tests/ui/ufcs/ufcs-explicit-self-bad.stderr
+++ b/tests/ui/ufcs/ufcs-explicit-self-bad.stderr
@@ -31,8 +31,8 @@ error[E0308]: mismatched `self` parameter type
LL | fn dummy2(self: &Bar<T>) {}
| ^^^^^^^ lifetime mismatch
|
- = note: expected reference `&'a Bar<T>`
- found reference `&Bar<T>`
+ = note: expected reference `&'a Bar<_>`
+ found reference `&Bar<_>`
note: the anonymous lifetime defined here...
--> $DIR/ufcs-explicit-self-bad.rs:37:21
|
@@ -50,8 +50,8 @@ error[E0308]: mismatched `self` parameter type
LL | fn dummy2(self: &Bar<T>) {}
| ^^^^^^^ lifetime mismatch
|
- = note: expected reference `&'a Bar<T>`
- found reference `&Bar<T>`
+ = note: expected reference `&'a Bar<_>`
+ found reference `&Bar<_>`
note: the lifetime `'a` as defined here...
--> $DIR/ufcs-explicit-self-bad.rs:35:6
|
@@ -69,8 +69,8 @@ error[E0308]: mismatched `self` parameter type
LL | fn dummy3(self: &&Bar<T>) {}
| ^^^^^^^^ lifetime mismatch
|
- = note: expected reference `&'a Bar<T>`
- found reference `&Bar<T>`
+ = note: expected reference `&'a Bar<_>`
+ found reference `&Bar<_>`
note: the anonymous lifetime defined here...
--> $DIR/ufcs-explicit-self-bad.rs:40:22
|
@@ -88,8 +88,8 @@ error[E0308]: mismatched `self` parameter type
LL | fn dummy3(self: &&Bar<T>) {}
| ^^^^^^^^ lifetime mismatch
|
- = note: expected reference `&'a Bar<T>`
- found reference `&Bar<T>`
+ = note: expected reference `&'a Bar<_>`
+ found reference `&Bar<_>`
note: the lifetime `'a` as defined here...
--> $DIR/ufcs-explicit-self-bad.rs:35:6
|
@@ -115,8 +115,8 @@ note: type in trait
|
LL | fn dummy2(&self);
| ^^^^^
- = note: expected signature `fn(&&'a Bar<T>)`
- found signature `fn(&Bar<T>)`
+ = note: expected signature `fn(&&'a Bar<_>)`
+ found signature `fn(&Bar<_>)`
error: aborting due to 8 previous errors
diff --git a/tests/ui/ufcs/ufcs-polymorphic-paths.rs b/tests/ui/ufcs/ufcs-polymorphic-paths.rs
index a14ebd6a4..71b9de818 100644
--- a/tests/ui/ufcs/ufcs-polymorphic-paths.rs
+++ b/tests/ui/ufcs/ufcs-polymorphic-paths.rs
@@ -1,7 +1,6 @@
// run-pass
-use std::borrow::{Cow, ToOwned};
-use std::default::Default;
+use std::borrow::Cow;
use std::iter::FromIterator;
use std::ops::Add;
use std::option::IntoIter as OptionIter;
diff --git a/tests/ui/unboxed-closures/issue-30906.stderr b/tests/ui/unboxed-closures/issue-30906.stderr
index 147a20974..0815ae1fb 100644
--- a/tests/ui/unboxed-closures/issue-30906.stderr
+++ b/tests/ui/unboxed-closures/issue-30906.stderr
@@ -7,5 +7,5 @@ LL | test(Compose(f, |_| {}));
= note: `fn(&'2 str) -> T` must implement `FnOnce<(&'1 str,)>`, for any lifetime `'1`...
= note: ...but it actually implements `FnOnce<(&'2 str,)>`, for some specific lifetime `'2`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/unboxed-closures/non-tupled-arg-mismatch.stderr b/tests/ui/unboxed-closures/non-tupled-arg-mismatch.stderr
index cfbe1c6f2..66d393c67 100644
--- a/tests/ui/unboxed-closures/non-tupled-arg-mismatch.stderr
+++ b/tests/ui/unboxed-closures/non-tupled-arg-mismatch.stderr
@@ -7,6 +7,6 @@ LL | fn a<F: Fn<usize>>(f: F) {}
note: required by a bound in `Fn`
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0059`.
diff --git a/tests/ui/unboxed-closures/non-tupled-call.stderr b/tests/ui/unboxed-closures/non-tupled-call.stderr
index 35ac9ebe2..207438bc9 100644
--- a/tests/ui/unboxed-closures/non-tupled-call.stderr
+++ b/tests/ui/unboxed-closures/non-tupled-call.stderr
@@ -4,6 +4,6 @@ error[E0059]: cannot use call notation; the first type parameter for the functio
LL | func(x);
| ^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0059`.
diff --git a/tests/ui/unboxed-closures/unboxed-closure-feature-gate.stderr b/tests/ui/unboxed-closures/unboxed-closure-feature-gate.stderr
index b824d160d..d06fa3007 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-feature-gate.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closure-feature-gate.stderr
@@ -7,6 +7,6 @@ LL | let x: Box<dyn Foo(isize)>;
= note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information
= help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.stderr b/tests/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.stderr
index 9d3c1902c..563167f3c 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.stderr
@@ -14,6 +14,6 @@ note: required by a bound in `g`
LL | fn g<F>(_: F) where F: FnOnce(Option<F>) {}
| ^^^^^^^^^^^^^^^^^ required by this bound in `g`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0644`.
diff --git a/tests/ui/unboxed-closures/unboxed-closure-region.stderr b/tests/ui/unboxed-closures/unboxed-closure-region.stderr
index 43e9af24a..70407628f 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-region.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closure-region.stderr
@@ -16,6 +16,6 @@ help: to force the closure to take ownership of `x` (and any other referenced va
LL | move || x
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0373`.
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-default.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-default.stderr
index a3b32d2c1..b5cef0b3a 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-default.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-default.stderr
@@ -10,6 +10,6 @@ note: required by a bound in `eq`
LL | fn eq<A: ?Sized,B: ?Sized>() where A : Eq<B> { }
| ^^^^^ required by this bound in `eq`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-equiv.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-equiv.stderr
index bccbf307a..923f1a345 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-equiv.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-equiv.stderr
@@ -10,6 +10,6 @@ note: required by a bound in `eq`
LL | fn eq<A: ?Sized,B: ?Sized +Eq<A>>() { }
| ^^^^^ required by this bound in `eq`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr
index 2b8fec86c..b7e9e1baa 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr
@@ -19,6 +19,6 @@ LL |
LL ~ let _: dyn Foo(&'a isize, &'a usize) -> &'a usize;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0106`.
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-region.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-region.stderr
index 881461781..0465c20df 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-region.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-region.stderr
@@ -10,6 +10,6 @@ note: trait defined here, with 1 lifetime parameter: `'a`
LL | trait Foo<'a,T> {
| ^^^ --
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-3.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-3.stderr
index 4df404e81..ce2c90f97 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-3.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-3.stderr
@@ -9,6 +9,6 @@ help: use angle brackets instead
LL | let b = Bar::<isize, usize>::new(); // OK too (for the parser)
| ~ ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0214`.
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-1.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-1.stderr
index e4772478b..b8fb0702a 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-1.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-1.stderr
@@ -4,6 +4,6 @@ error[E0220]: associated type `Output` not found for `One`
LL | fn foo(_: &dyn One())
| ^^^^^ associated type `Output` not found
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0220`.
diff --git a/tests/ui/unboxed-closures/unboxed-closures-borrow-conflict.stderr b/tests/ui/unboxed-closures/unboxed-closures-borrow-conflict.stderr
index 98fe97c5c..4adf24162 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-borrow-conflict.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closures-borrow-conflict.stderr
@@ -10,6 +10,6 @@ LL | let _y = x;
LL | f;
| - borrow later used here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0503`.
diff --git a/tests/ui/unboxed-closures/unboxed-closures-boxed.rs b/tests/ui/unboxed-closures/unboxed-closures-boxed.rs
index 3f550fd04..53f0523da 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-boxed.rs
+++ b/tests/ui/unboxed-closures/unboxed-closures-boxed.rs
@@ -1,6 +1,5 @@
// run-pass
-use std::ops::FnMut;
fn make_adder(x: i32) -> Box<dyn FnMut(i32)->i32+'static> {
Box::new(move |y: i32| -> i32 { x + y }) as
diff --git a/tests/ui/unboxed-closures/unboxed-closures-call-sugar-autoderef.rs b/tests/ui/unboxed-closures/unboxed-closures-call-sugar-autoderef.rs
index 9b8a3f409..8a40c1d47 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-call-sugar-autoderef.rs
+++ b/tests/ui/unboxed-closures/unboxed-closures-call-sugar-autoderef.rs
@@ -1,8 +1,6 @@
// run-pass
// Test that the call operator autoderefs when calling a bounded type parameter.
-use std::ops::FnMut;
-
fn call_with_2<F>(x: &mut F) -> isize
where F : FnMut(isize) -> isize
{
diff --git a/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object-autoderef.rs b/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object-autoderef.rs
index d47ceea0f..2433f0757 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object-autoderef.rs
+++ b/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object-autoderef.rs
@@ -1,8 +1,6 @@
// run-pass
// Test that the call operator autoderefs when calling to an object type.
-use std::ops::FnMut;
-
fn make_adder(x: isize) -> Box<dyn FnMut(isize)->isize + 'static> {
Box::new(move |y| { x + y })
}
diff --git a/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object.rs b/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object.rs
index f77733d10..b27d61049 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object.rs
+++ b/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object.rs
@@ -1,6 +1,4 @@
// run-pass
-use std::ops::FnMut;
-
fn make_adder(x: isize) -> Box<dyn FnMut(isize)->isize + 'static> {
Box::new(move |y| { x + y })
}
diff --git a/tests/ui/unboxed-closures/unboxed-closures-extern-fn.rs b/tests/ui/unboxed-closures/unboxed-closures-extern-fn.rs
index 677cd259a..d07e871b1 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-extern-fn.rs
+++ b/tests/ui/unboxed-closures/unboxed-closures-extern-fn.rs
@@ -1,7 +1,6 @@
// run-pass
// Checks that extern fn pointers implement the full range of Fn traits.
-use std::ops::{Fn,FnMut,FnOnce};
fn square(x: isize) -> isize { x * x }
diff --git a/tests/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-2.stderr b/tests/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-2.stderr
index ff2a597be..5a76ef3e8 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-2.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-2.stderr
@@ -12,6 +12,6 @@ help: consider giving `closure0` an explicit type, where the placeholders `_` ar
LL | let mut closure0: Option<T> = None;
| +++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/unboxed-closures/unboxed-closures-fn-as-fnmut-and-fnonce.rs b/tests/ui/unboxed-closures/unboxed-closures-fn-as-fnmut-and-fnonce.rs
index 851f3d2fe..db1bea0e1 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-fn-as-fnmut-and-fnonce.rs
+++ b/tests/ui/unboxed-closures/unboxed-closures-fn-as-fnmut-and-fnonce.rs
@@ -4,8 +4,6 @@
#![feature(unboxed_closures, fn_traits)]
-use std::ops::{Fn,FnMut,FnOnce};
-
struct S;
impl Fn<(i32,)> for S {
diff --git a/tests/ui/unboxed-closures/unboxed-closures-fnmut-as-fn.stderr b/tests/ui/unboxed-closures/unboxed-closures-fnmut-as-fn.stderr
index ce4d0fe25..795bd0a0d 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-fnmut-as-fn.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closures-fnmut-as-fn.stderr
@@ -14,6 +14,6 @@ note: required by a bound in `call_it`
LL | fn call_it<F:Fn(isize)->isize>(f: &F, x: isize) -> isize {
| ^^^^^^^^^^^^^^^^ required by this bound in `call_it`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/unboxed-closures/unboxed-closures-generic.rs b/tests/ui/unboxed-closures/unboxed-closures-generic.rs
index 740b8b2a7..524e756e6 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-generic.rs
+++ b/tests/ui/unboxed-closures/unboxed-closures-generic.rs
@@ -1,6 +1,4 @@
// run-pass
-use std::ops::FnMut;
-
fn call_it<F:FnMut(i32,i32)->i32>(y: i32, mut f: F) -> i32 {
f(2, y)
}
diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.stderr b/tests/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.stderr
index e97157b83..40d341402 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.stderr
@@ -8,5 +8,5 @@ LL | doit(0, &|x, y| {
LL | x.set(y);
| ^^^^^^^^ argument requires that `'1` must outlive `'2`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-fn-once-move-from-projection.stderr b/tests/ui/unboxed-closures/unboxed-closures-infer-fn-once-move-from-projection.stderr
index 846a44ce4..cc81ce9bc 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-infer-fn-once-move-from-projection.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closures-infer-fn-once-move-from-projection.stderr
@@ -18,6 +18,6 @@ LL | fn foo<F>(f: F)
LL | where F: Fn()
| ^^^^ required by this bound in `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0525`.
diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.stderr b/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.stderr
index 3f539c42d..b18f67a99 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.stderr
@@ -11,6 +11,6 @@ help: consider changing this to be mutable
LL | let mut tick = || counter += 1;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.stderr b/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.stderr
index e3b19297b..1c465f409 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.stderr
@@ -11,6 +11,6 @@ help: consider changing this to be mutable
LL | let mut tick = move || counter += 1;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce-call-twice.stderr b/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce-call-twice.stderr
index ab6f06518..7013529a8 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce-call-twice.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce-call-twice.stderr
@@ -17,6 +17,6 @@ note: this value implements `FnOnce`, which causes it to be moved when called
LL | tick();
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce-move-call-twice.stderr b/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce-move-call-twice.stderr
index 8d70a2b17..2884dbfd2 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce-move-call-twice.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce-move-call-twice.stderr
@@ -17,6 +17,6 @@ note: this value implements `FnOnce`, which causes it to be moved when called
LL | tick();
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.stderr b/tests/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.stderr
index 7d15cd0c8..cbe42861d 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.stderr
@@ -11,6 +11,6 @@ LL | call(|| {
LL | counter += 1;
| ^^^^^^^^^^^^ cannot assign
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.
diff --git a/tests/ui/unboxed-closures/unboxed-closures-recursive-fn-using-fn-mut.stderr b/tests/ui/unboxed-closures/unboxed-closures-recursive-fn-using-fn-mut.stderr
index 830f6bc99..178cabd42 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-recursive-fn-using-fn-mut.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closures-recursive-fn-using-fn-mut.stderr
@@ -7,6 +7,6 @@ LL | (self.func)(self, arg)
| first mutable borrow occurs here
| first borrow later used by call
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr b/tests/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr
index e2d867ff2..4d5e6f479 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr
@@ -4,6 +4,6 @@ error[E0599]: no method named `call` found for closure `{closure@$DIR/unboxed-cl
LL | mut_.call((0, ));
| ^^^^ method not found in `{closure@unboxed-closures-static-call-wrong-trait.rs:6:26}`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/unboxed-closures/unboxed-closures-unique-type-id.rs b/tests/ui/unboxed-closures/unboxed-closures-unique-type-id.rs
index 4b7016def..94bb44d2c 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-unique-type-id.rs
+++ b/tests/ui/unboxed-closures/unboxed-closures-unique-type-id.rs
@@ -10,7 +10,6 @@
// This is a regression test for issue #17021.
//
// compile-flags: -g
-// ignore-asmjs wasm2js does not support source maps yet
use std::ptr;
diff --git a/tests/ui/unconstrained-none.stderr b/tests/ui/unconstrained-none.stderr
index 19ac74fdf..4af6f412e 100644
--- a/tests/ui/unconstrained-none.stderr
+++ b/tests/ui/unconstrained-none.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic argument
LL | None::<T>;
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/unconstrained-ref.stderr b/tests/ui/unconstrained-ref.stderr
index 1df6d8b44..72fd0202f 100644
--- a/tests/ui/unconstrained-ref.stderr
+++ b/tests/ui/unconstrained-ref.stderr
@@ -9,6 +9,6 @@ help: consider specifying the generic argument
LL | S::<T> { o: &None };
| +++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/underscore-ident-matcher.stderr b/tests/ui/underscore-ident-matcher.stderr
index b0e4d88f6..a663f34cd 100644
--- a/tests/ui/underscore-ident-matcher.stderr
+++ b/tests/ui/underscore-ident-matcher.stderr
@@ -13,5 +13,5 @@ note: while trying to match meta-variable `$i:ident`
LL | ($i: ident) => (
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/underscore-imports/shadow.stderr b/tests/ui/underscore-imports/shadow.stderr
index f2c19405b..da2631638 100644
--- a/tests/ui/underscore-imports/shadow.stderr
+++ b/tests/ui/underscore-imports/shadow.stderr
@@ -10,6 +10,6 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f
LL + use std::ops::Deref;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr b/tests/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr
index fd0860028..e2bd9192d 100644
--- a/tests/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr
+++ b/tests/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr
@@ -10,6 +10,6 @@ LL ~ struct Foo<'a> {
LL ~ x: Box<dyn Debug + 'a>,
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0106`.
diff --git a/tests/ui/underscore-lifetime/dyn-trait-underscore.stderr b/tests/ui/underscore-lifetime/dyn-trait-underscore.stderr
index 60b0b3ee7..c3bda45e9 100644
--- a/tests/ui/underscore-lifetime/dyn-trait-underscore.stderr
+++ b/tests/ui/underscore-lifetime/dyn-trait-underscore.stderr
@@ -12,5 +12,5 @@ help: to declare that the trait object captures data from argument `items`, you
LL | fn a<T>(items: &[T]) -> Box<dyn Iterator<Item=&T> + '_> {
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/underscore-lifetime/in-fn-return-illegal.stderr b/tests/ui/underscore-lifetime/in-fn-return-illegal.stderr
index 6a104e8f9..fb036c695 100644
--- a/tests/ui/underscore-lifetime/in-fn-return-illegal.stderr
+++ b/tests/ui/underscore-lifetime/in-fn-return-illegal.stderr
@@ -10,6 +10,6 @@ help: consider introducing a named lifetime parameter
LL | fn foo<'a>(x: &'a u32, y: &'a u32) -> &'a u32 { loop { } }
| ++++ ++ ++ ~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0106`.
diff --git a/tests/ui/underscore-lifetime/underscore-lifetime-binders.stderr b/tests/ui/underscore-lifetime/underscore-lifetime-binders.stderr
index 50401791e..cd74d27dc 100644
--- a/tests/ui/underscore-lifetime/underscore-lifetime-binders.stderr
+++ b/tests/ui/underscore-lifetime/underscore-lifetime-binders.stderr
@@ -28,7 +28,7 @@ LL | fn meh() -> Box<dyn for<'_> Meh<'_>>
| ^^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
|
LL | fn meh() -> Box<dyn for<'_> Meh<'static>>
| ~~~~~~~
diff --git a/tests/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.stderr b/tests/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.stderr
index 2b34f0c55..ed9d22d25 100644
--- a/tests/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.stderr
+++ b/tests/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.stderr
@@ -12,5 +12,5 @@ help: consider introducing a named lifetime parameter
LL | fn foo<'a>(x: &mut Vec<&'a u8>, y: &'a u8) { x.push(y); }
| ++++ ~~ ~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/underscore-lifetime/underscore-outlives-bounds.stderr b/tests/ui/underscore-lifetime/underscore-outlives-bounds.stderr
index 4b38a26f9..4d23abf83 100644
--- a/tests/ui/underscore-lifetime/underscore-outlives-bounds.stderr
+++ b/tests/ui/underscore-lifetime/underscore-outlives-bounds.stderr
@@ -4,6 +4,6 @@ error[E0637]: `'_` cannot be used here
LL | impl<'b: '_> Foo<'b> for i32 {}
| ^^ `'_` is a reserved lifetime name
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0637`.
diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.stderr b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.stderr
index 3e197dc9a..54e62f34f 100644
--- a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.stderr
+++ b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.stderr
@@ -9,6 +9,6 @@ help: consider introducing a higher-ranked lifetime here
LL | T: for<'a> WithType<&'a u32>
| +++++++ ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0637`.
diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.stderr b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.stderr
index 08b4268e5..36f3e9ef1 100644
--- a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.stderr
+++ b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.stderr
@@ -9,6 +9,6 @@ help: consider introducing a higher-ranked lifetime here
LL | T: for<'a> WithType<&'a u32>
| +++++++ ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0637`.
diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2015.stderr b/tests/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2015.stderr
index 95939fd6b..d65c6042e 100644
--- a/tests/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2015.stderr
+++ b/tests/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2015.stderr
@@ -4,6 +4,6 @@ error[E0637]: `'_` cannot be used here
LL | T: WithRegion<'_>
| ^^ `'_` is a reserved lifetime name
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0637`.
diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2018.stderr b/tests/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2018.stderr
index 95939fd6b..d65c6042e 100644
--- a/tests/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2018.stderr
+++ b/tests/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2018.stderr
@@ -4,6 +4,6 @@ error[E0637]: `'_` cannot be used here
LL | T: WithRegion<'_>
| ^^ `'_` is a reserved lifetime name
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0637`.
diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.stderr b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.stderr
index 8c5bbb631..92b7a9c2a 100644
--- a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.stderr
+++ b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.stderr
@@ -9,6 +9,6 @@ help: consider introducing a higher-ranked lifetime here
LL | T: for<'a> WithType<&'a u32>
| +++++++ ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0637`.
diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.stderr b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.stderr
index 0268c59fa..63d8b99ed 100644
--- a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.stderr
+++ b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.stderr
@@ -9,6 +9,6 @@ help: consider introducing a higher-ranked lifetime here
LL | T: for<'a> WithType<&'a u32>
| +++++++ ++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0637`.
diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2015.stderr b/tests/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2015.stderr
index 92caff0dc..dae952397 100644
--- a/tests/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2015.stderr
+++ b/tests/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2015.stderr
@@ -4,6 +4,6 @@ error[E0637]: `'_` cannot be used here
LL | T: WithRegion<'_>
| ^^ `'_` is a reserved lifetime name
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0637`.
diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2018.stderr b/tests/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2018.stderr
index 92caff0dc..dae952397 100644
--- a/tests/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2018.stderr
+++ b/tests/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2018.stderr
@@ -4,6 +4,6 @@ error[E0637]: `'_` cannot be used here
LL | T: WithRegion<'_>
| ^^ `'_` is a reserved lifetime name
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0637`.
diff --git a/tests/ui/unevaluated_fixed_size_array_len.stderr b/tests/ui/unevaluated_fixed_size_array_len.stderr
index b04a7b7f2..43cc37700 100644
--- a/tests/ui/unevaluated_fixed_size_array_len.stderr
+++ b/tests/ui/unevaluated_fixed_size_array_len.stderr
@@ -6,6 +6,6 @@ LL | <[(); 0] as Foo>::foo()
|
= help: the trait `Foo` is implemented for `[(); 1]`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/uninhabited/privately-uninhabited-mir-call.stderr b/tests/ui/uninhabited/privately-uninhabited-mir-call.stderr
index 0dfd22a30..5f2f02c99 100644
--- a/tests/ui/uninhabited/privately-uninhabited-mir-call.stderr
+++ b/tests/ui/uninhabited/privately-uninhabited-mir-call.stderr
@@ -12,6 +12,6 @@ help: consider assigning a value
LL | let y: &mut u32 = todo!();
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0381`.
diff --git a/tests/ui/uninhabited/uninhabited-irrefutable.stderr b/tests/ui/uninhabited/uninhabited-irrefutable.stderr
index daf75f51b..304e738ed 100644
--- a/tests/ui/uninhabited/uninhabited-irrefutable.stderr
+++ b/tests/ui/uninhabited/uninhabited-irrefutable.stderr
@@ -21,6 +21,6 @@ help: you might want to use `let else` to handle the variant that isn't matched
LL | let Foo::D(_y, _z) = x else { todo!() };
| ++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0005`.
diff --git a/tests/ui/uninhabited/uninhabited-patterns.rs b/tests/ui/uninhabited/uninhabited-patterns.rs
index f1573b6ad..4e90691e5 100644
--- a/tests/ui/uninhabited/uninhabited-patterns.rs
+++ b/tests/ui/uninhabited/uninhabited-patterns.rs
@@ -1,8 +1,6 @@
#![feature(box_patterns)]
#![feature(never_type)]
#![feature(exhaustive_patterns)]
-
-
#![deny(unreachable_patterns)]
mod foo {
@@ -23,22 +21,22 @@ fn main() {
let x: &[!] = &[];
match x {
- &[] => (),
- &[..] => (), //~ ERROR unreachable pattern
+ &[] => (),
+ &[..] => (),
};
let x: Result<Box<NotSoSecretlyEmpty>, &[Result<!, !>]> = Err(&[]);
match x {
- Ok(box _) => (), //~ ERROR unreachable pattern
+ Ok(box _) => (), //~ ERROR unreachable pattern
Err(&[]) => (),
- Err(&[..]) => (), //~ ERROR unreachable pattern
+ Err(&[..]) => (),
}
let x: Result<foo::SecretlyEmpty, Result<NotSoSecretlyEmpty, u32>> = Err(Err(123));
match x {
Ok(_y) => (),
Err(Err(_y)) => (),
- Err(Ok(_y)) => (), //~ ERROR unreachable pattern
+ Err(Ok(_y)) => (), //~ ERROR unreachable pattern
}
while let Some(_y) = foo() {
diff --git a/tests/ui/uninhabited/uninhabited-patterns.stderr b/tests/ui/uninhabited/uninhabited-patterns.stderr
index 655569ad6..a6fda88f0 100644
--- a/tests/ui/uninhabited/uninhabited-patterns.stderr
+++ b/tests/ui/uninhabited/uninhabited-patterns.stderr
@@ -1,38 +1,26 @@
error: unreachable pattern
- --> $DIR/uninhabited-patterns.rs:27:9
+ --> $DIR/uninhabited-patterns.rs:30:9
|
-LL | &[..] => (),
- | ^^^^^
+LL | Ok(box _) => (),
+ | ^^^^^^^^^
|
note: the lint level is defined here
- --> $DIR/uninhabited-patterns.rs:6:9
+ --> $DIR/uninhabited-patterns.rs:4:9
|
LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
error: unreachable pattern
- --> $DIR/uninhabited-patterns.rs:32:9
- |
-LL | Ok(box _) => (),
- | ^^^^^^^^^
-
-error: unreachable pattern
- --> $DIR/uninhabited-patterns.rs:34:9
- |
-LL | Err(&[..]) => (),
- | ^^^^^^^^^^
-
-error: unreachable pattern
- --> $DIR/uninhabited-patterns.rs:41:9
+ --> $DIR/uninhabited-patterns.rs:39:9
|
LL | Err(Ok(_y)) => (),
| ^^^^^^^^^^^
error: unreachable pattern
- --> $DIR/uninhabited-patterns.rs:44:15
+ --> $DIR/uninhabited-patterns.rs:42:15
|
LL | while let Some(_y) = foo() {
| ^^^^^^^^
-error: aborting due to 5 previous errors
+error: aborting due to 3 previous errors
diff --git a/tests/ui/union/issue-41073.stderr b/tests/ui/union/issue-41073.stderr
index ae1c4dfed..c9b6903b1 100644
--- a/tests/ui/union/issue-41073.stderr
+++ b/tests/ui/union/issue-41073.stderr
@@ -10,6 +10,6 @@ help: wrap the field type in `ManuallyDrop<...>`
LL | a: std::mem::ManuallyDrop<A>,
| +++++++++++++++++++++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0740`.
diff --git a/tests/ui/union/projection-as-union-type-error-2.stderr b/tests/ui/union/projection-as-union-type-error-2.stderr
index 21f4ea103..3b073ca1f 100644
--- a/tests/ui/union/projection-as-union-type-error-2.stderr
+++ b/tests/ui/union/projection-as-union-type-error-2.stderr
@@ -17,6 +17,6 @@ LL | impl<T: NotImplemented> Identity for T {
| |
| unsatisfied trait bound introduced here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/union/projection-as-union-type-error.stderr b/tests/ui/union/projection-as-union-type-error.stderr
index 2b0241caf..f43fb2fe9 100644
--- a/tests/ui/union/projection-as-union-type-error.stderr
+++ b/tests/ui/union/projection-as-union-type-error.stderr
@@ -10,6 +10,6 @@ help: this trait has no implementations, consider adding one
LL | pub trait Identity {
| ^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/union/union-const-pat.stderr b/tests/ui/union/union-const-pat.stderr
index dc87f4de5..e9dbb2759 100644
--- a/tests/ui/union/union-const-pat.stderr
+++ b/tests/ui/union/union-const-pat.stderr
@@ -4,5 +4,5 @@ error: cannot use unions in constant patterns
LL | C => {}
| ^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/union/union-copy.stderr b/tests/ui/union/union-copy.stderr
index ff6fa48db..bd63908b4 100644
--- a/tests/ui/union/union-copy.stderr
+++ b/tests/ui/union/union-copy.stderr
@@ -13,6 +13,6 @@ note: the `Copy` impl for `ManuallyDrop<String>` requires that `String: Copy`
LL | a: std::mem::ManuallyDrop<String>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0204`.
diff --git a/tests/ui/union/union-derive-eq.mirunsafeck.stderr b/tests/ui/union/union-derive-eq.mirunsafeck.stderr
index 136cd883e..86e7c955d 100644
--- a/tests/ui/union/union-derive-eq.mirunsafeck.stderr
+++ b/tests/ui/union/union-derive-eq.mirunsafeck.stderr
@@ -16,6 +16,6 @@ LL + #[derive(Eq)]
LL | struct PartialEqNotEq;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/union/union-derive-eq.thirunsafeck.stderr b/tests/ui/union/union-derive-eq.thirunsafeck.stderr
index 136cd883e..86e7c955d 100644
--- a/tests/ui/union/union-derive-eq.thirunsafeck.stderr
+++ b/tests/ui/union/union-derive-eq.thirunsafeck.stderr
@@ -16,6 +16,6 @@ LL + #[derive(Eq)]
LL | struct PartialEqNotEq;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/union/union-empty.stderr b/tests/ui/union/union-empty.stderr
index a80b27e6e..03a939769 100644
--- a/tests/ui/union/union-empty.stderr
+++ b/tests/ui/union/union-empty.stderr
@@ -4,5 +4,5 @@ error: unions cannot have zero fields
LL | union U {}
| ^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/union/union-lint-dead-code.mirunsafeck.stderr b/tests/ui/union/union-lint-dead-code.mirunsafeck.stderr
index 6e21584c3..8a3677d52 100644
--- a/tests/ui/union/union-lint-dead-code.mirunsafeck.stderr
+++ b/tests/ui/union/union-lint-dead-code.mirunsafeck.stderr
@@ -13,5 +13,5 @@ note: the lint level is defined here
LL | #![deny(dead_code)]
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/union/union-lint-dead-code.thirunsafeck.stderr b/tests/ui/union/union-lint-dead-code.thirunsafeck.stderr
index 6e21584c3..8a3677d52 100644
--- a/tests/ui/union/union-lint-dead-code.thirunsafeck.stderr
+++ b/tests/ui/union/union-lint-dead-code.thirunsafeck.stderr
@@ -13,5 +13,5 @@ note: the lint level is defined here
LL | #![deny(dead_code)]
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/union/union-nonrepresentable.stderr b/tests/ui/union/union-nonrepresentable.stderr
index c266d2e9e..90d38727f 100644
--- a/tests/ui/union/union-nonrepresentable.stderr
+++ b/tests/ui/union/union-nonrepresentable.stderr
@@ -12,6 +12,6 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
LL | b: std::mem::ManuallyDrop<Box<U>>,
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/union/union-repr-c.stderr b/tests/ui/union/union-repr-c.stderr
index 49124eee5..0beb7c376 100644
--- a/tests/ui/union/union-repr-c.stderr
+++ b/tests/ui/union/union-repr-c.stderr
@@ -17,5 +17,5 @@ note: the lint level is defined here
LL | #![deny(improper_ctypes)]
| ^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/union/union-suggest-field.mirunsafeck.stderr b/tests/ui/union/union-suggest-field.mirunsafeck.stderr
index 58b1f5cb0..efe4987bd 100644
--- a/tests/ui/union/union-suggest-field.mirunsafeck.stderr
+++ b/tests/ui/union/union-suggest-field.mirunsafeck.stderr
@@ -2,13 +2,23 @@ error[E0560]: union `U` has no field named `principle`
--> $DIR/union-suggest-field.rs:13:17
|
LL | let u = U { principle: 0 };
- | ^^^^^^^^^ help: a field with a similar name exists: `principal`
+ | ^^^^^^^^^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | let u = U { principal: 0 };
+ | ~~~~~~~~~
error[E0609]: no field `principial` on type `U`
--> $DIR/union-suggest-field.rs:17:15
|
LL | let w = u.principial;
- | ^^^^^^^^^^ help: a field with a similar name exists: `principal`
+ | ^^^^^^^^^^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | let w = u.principal;
+ | ~~~~~~~~~
error[E0615]: attempted to take value of method `calculate` on type `U`
--> $DIR/union-suggest-field.rs:21:15
diff --git a/tests/ui/union/union-suggest-field.thirunsafeck.stderr b/tests/ui/union/union-suggest-field.thirunsafeck.stderr
index 58b1f5cb0..efe4987bd 100644
--- a/tests/ui/union/union-suggest-field.thirunsafeck.stderr
+++ b/tests/ui/union/union-suggest-field.thirunsafeck.stderr
@@ -2,13 +2,23 @@ error[E0560]: union `U` has no field named `principle`
--> $DIR/union-suggest-field.rs:13:17
|
LL | let u = U { principle: 0 };
- | ^^^^^^^^^ help: a field with a similar name exists: `principal`
+ | ^^^^^^^^^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | let u = U { principal: 0 };
+ | ~~~~~~~~~
error[E0609]: no field `principial` on type `U`
--> $DIR/union-suggest-field.rs:17:15
|
LL | let w = u.principial;
- | ^^^^^^^^^^ help: a field with a similar name exists: `principal`
+ | ^^^^^^^^^^ unknown field
+ |
+help: a field with a similar name exists
+ |
+LL | let w = u.principal;
+ | ~~~~~~~~~
error[E0615]: attempted to take value of method `calculate` on type `U`
--> $DIR/union-suggest-field.rs:21:15
diff --git a/tests/ui/union/unresolved-field-isnt-copy.stderr b/tests/ui/union/unresolved-field-isnt-copy.stderr
index 22301582e..ee5d1e37b 100644
--- a/tests/ui/union/unresolved-field-isnt-copy.stderr
+++ b/tests/ui/union/unresolved-field-isnt-copy.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `Missing` in this scope
LL | x: *const Missing,
| ^^^^^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/unknown-language-item.stderr b/tests/ui/unknown-language-item.stderr
index c5fe9b8ad..1e0256867 100644
--- a/tests/ui/unknown-language-item.stderr
+++ b/tests/ui/unknown-language-item.stderr
@@ -4,6 +4,6 @@ error[E0522]: definition of an unknown language item: `foo`
LL | #[lang = "foo"]
| ^^^^^^^^^^^^^^^ definition of unknown language item `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0522`.
diff --git a/tests/ui/unknown-tool-name.stderr b/tests/ui/unknown-tool-name.stderr
index 4a1370ba8..361d359a1 100644
--- a/tests/ui/unknown-tool-name.stderr
+++ b/tests/ui/unknown-tool-name.stderr
@@ -4,6 +4,6 @@ error[E0433]: failed to resolve: use of undeclared crate or module `foo`
LL | #[foo::bar]
| ^^^ use of undeclared crate or module `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/unop-neg-bool.stderr b/tests/ui/unop-neg-bool.stderr
index 9913747b8..9bc5e7dcf 100644
--- a/tests/ui/unop-neg-bool.stderr
+++ b/tests/ui/unop-neg-bool.stderr
@@ -4,6 +4,6 @@ error[E0600]: cannot apply unary operator `-` to type `bool`
LL | -true;
| ^^^^^ cannot apply unary operator `-`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0600`.
diff --git a/tests/ui/unpretty/avoid-crash.stderr b/tests/ui/unpretty/avoid-crash.stderr
index 15bcc277e..6fa3e8ca6 100644
--- a/tests/ui/unpretty/avoid-crash.stderr
+++ b/tests/ui/unpretty/avoid-crash.stderr
@@ -1,4 +1,4 @@
error: failed to write `/tmp/` due to $ERROR_MESSAGE
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/unpretty/bad-literal.stderr b/tests/ui/unpretty/bad-literal.stderr
index f3fcb4a4e..b6259484f 100644
--- a/tests/ui/unpretty/bad-literal.stderr
+++ b/tests/ui/unpretty/bad-literal.stderr
@@ -6,5 +6,5 @@ LL | 1u;
|
= help: the suffix must be one of the numeric types (`u32`, `isize`, `f32`, etc.)
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/unpretty/mir-unpretty.stderr b/tests/ui/unpretty/mir-unpretty.stderr
index 3808f8583..a9e40884b 100644
--- a/tests/ui/unpretty/mir-unpretty.stderr
+++ b/tests/ui/unpretty/mir-unpretty.stderr
@@ -6,6 +6,6 @@ LL | let x: () = 0;
| |
| expected due to this
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/unresolved/unresolved-asterisk-imports.stderr b/tests/ui/unresolved/unresolved-asterisk-imports.stderr
index 8df8eab34..24ac2f8e6 100644
--- a/tests/ui/unresolved/unresolved-asterisk-imports.stderr
+++ b/tests/ui/unresolved/unresolved-asterisk-imports.stderr
@@ -6,6 +6,6 @@ LL | use not_existing_crate::*;
|
= help: consider adding `extern crate not_existing_crate` to use the `not_existing_crate` crate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/unresolved/unresolved-extern-mod-suggestion.stderr b/tests/ui/unresolved/unresolved-extern-mod-suggestion.stderr
index 28333228a..b493d0fa3 100644
--- a/tests/ui/unresolved/unresolved-extern-mod-suggestion.stderr
+++ b/tests/ui/unresolved/unresolved-extern-mod-suggestion.stderr
@@ -8,6 +8,6 @@ LL | use core;
|
= note: `core` must be defined only once in the type namespace of this module
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0254`.
diff --git a/tests/ui/unresolved/unresolved-import-recovery.stderr b/tests/ui/unresolved/unresolved-import-recovery.stderr
index 5e371b70b..1c0060497 100644
--- a/tests/ui/unresolved/unresolved-import-recovery.stderr
+++ b/tests/ui/unresolved/unresolved-import-recovery.stderr
@@ -4,6 +4,6 @@ error[E0432]: unresolved import `unresolved`
LL | pub use unresolved;
| ^^^^^^^^^^ no `unresolved` in the root
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.stderr b/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.stderr
index f139c0f3c..c6812dbb1 100644
--- a/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.stderr
+++ b/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.stderr
@@ -9,6 +9,6 @@ help: consider importing this struct instead
LL | pub use ::library::SomeUsefulType;
| ~~~~~~~~~~~~~~~~~~~~~~~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/unsafe/foreign-unsafe-fn-called.mir.stderr b/tests/ui/unsafe/foreign-unsafe-fn-called.mir.stderr
index d3cf5d84f..5157dbb51 100644
--- a/tests/ui/unsafe/foreign-unsafe-fn-called.mir.stderr
+++ b/tests/ui/unsafe/foreign-unsafe-fn-called.mir.stderr
@@ -6,6 +6,6 @@ LL | test::free();
|
= note: consult the function's documentation for information on how to avoid undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/foreign-unsafe-fn-called.thir.stderr b/tests/ui/unsafe/foreign-unsafe-fn-called.thir.stderr
index 00ba0f7a6..8c221314c 100644
--- a/tests/ui/unsafe/foreign-unsafe-fn-called.thir.stderr
+++ b/tests/ui/unsafe/foreign-unsafe-fn-called.thir.stderr
@@ -6,6 +6,6 @@ LL | test::free();
|
= note: consult the function's documentation for information on how to avoid undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/initializing-ranged-via-ctor.stderr b/tests/ui/unsafe/initializing-ranged-via-ctor.stderr
index 13438fd31..56b112867 100644
--- a/tests/ui/unsafe/initializing-ranged-via-ctor.stderr
+++ b/tests/ui/unsafe/initializing-ranged-via-ctor.stderr
@@ -11,6 +11,6 @@ LL | println!("{:?}", Some(1).map(NonZeroAndOneU8).unwrap());
note: required by a bound in `Option::<T>::map`
--> $SRC_DIR/core/src/option.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/unsafe/inline_asm.mir.stderr b/tests/ui/unsafe/inline_asm.mir.stderr
index 633f1edb2..e38a9388a 100644
--- a/tests/ui/unsafe/inline_asm.mir.stderr
+++ b/tests/ui/unsafe/inline_asm.mir.stderr
@@ -6,6 +6,6 @@ LL | asm!("nop");
|
= note: inline assembly is entirely unchecked and can cause undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/inline_asm.thir.stderr b/tests/ui/unsafe/inline_asm.thir.stderr
index 633f1edb2..e38a9388a 100644
--- a/tests/ui/unsafe/inline_asm.thir.stderr
+++ b/tests/ui/unsafe/inline_asm.thir.stderr
@@ -6,6 +6,6 @@ LL | asm!("nop");
|
= note: inline assembly is entirely unchecked and can cause undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/issue-115348-false-positive-warning-of-unnecessary-unsafe.stderr b/tests/ui/unsafe/issue-115348-false-positive-warning-of-unnecessary-unsafe.stderr
index 7384899b9..9dd68d2a6 100644
--- a/tests/ui/unsafe/issue-115348-false-positive-warning-of-unnecessary-unsafe.stderr
+++ b/tests/ui/unsafe/issue-115348-false-positive-warning-of-unnecessary-unsafe.stderr
@@ -16,6 +16,6 @@ LL ~ Some(_) => unsafe { uwu() },
LL ~ None => todo!(),
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/unsafe/issue-3080.mir.stderr b/tests/ui/unsafe/issue-3080.mir.stderr
index f395c30b8..a1ad98d20 100644
--- a/tests/ui/unsafe/issue-3080.mir.stderr
+++ b/tests/ui/unsafe/issue-3080.mir.stderr
@@ -6,6 +6,6 @@ LL | X(()).with();
|
= note: consult the function's documentation for information on how to avoid undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/issue-3080.thir.stderr b/tests/ui/unsafe/issue-3080.thir.stderr
index 4d8acac61..1018218b1 100644
--- a/tests/ui/unsafe/issue-3080.thir.stderr
+++ b/tests/ui/unsafe/issue-3080.thir.stderr
@@ -6,6 +6,6 @@ LL | X(()).with();
|
= note: consult the function's documentation for information on how to avoid undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/ranged-ctor-as-fn-ptr.stderr b/tests/ui/unsafe/ranged-ctor-as-fn-ptr.stderr
index 660c40704..23bfe3c9c 100644
--- a/tests/ui/unsafe/ranged-ctor-as-fn-ptr.stderr
+++ b/tests/ui/unsafe/ranged-ctor-as-fn-ptr.stderr
@@ -10,6 +10,6 @@ LL | let x: fn(u8) -> NonZeroAndOneU8 = NonZeroAndOneU8;
found struct constructor `unsafe fn(_) -> NonZeroAndOneU8 {NonZeroAndOneU8}`
= note: unsafe functions cannot be coerced into safe function pointers
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/unsafe/ranged_ints.mir.stderr b/tests/ui/unsafe/ranged_ints.mir.stderr
index f9ef7834e..ef00edae0 100644
--- a/tests/ui/unsafe/ranged_ints.mir.stderr
+++ b/tests/ui/unsafe/ranged_ints.mir.stderr
@@ -6,6 +6,6 @@ LL | let _x = NonZero(0);
|
= note: initializing a layout restricted type's field with a value outside the valid range is undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/ranged_ints.thir.stderr b/tests/ui/unsafe/ranged_ints.thir.stderr
index f9ef7834e..ef00edae0 100644
--- a/tests/ui/unsafe/ranged_ints.thir.stderr
+++ b/tests/ui/unsafe/ranged_ints.thir.stderr
@@ -6,6 +6,6 @@ LL | let _x = NonZero(0);
|
= note: initializing a layout restricted type's field with a value outside the valid range is undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/ranged_ints3.mirunsafeck.stderr b/tests/ui/unsafe/ranged_ints3.mirunsafeck.stderr
index 9eec0b09e..72bce5de0 100644
--- a/tests/ui/unsafe/ranged_ints3.mirunsafeck.stderr
+++ b/tests/ui/unsafe/ranged_ints3.mirunsafeck.stderr
@@ -6,6 +6,6 @@ LL | let y = &x.0;
|
= note: references to fields of layout constrained fields lose the constraints. Coupled with interior mutability, the field can be changed to invalid values
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/ranged_ints3.thirunsafeck.stderr b/tests/ui/unsafe/ranged_ints3.thirunsafeck.stderr
index 9eec0b09e..72bce5de0 100644
--- a/tests/ui/unsafe/ranged_ints3.thirunsafeck.stderr
+++ b/tests/ui/unsafe/ranged_ints3.thirunsafeck.stderr
@@ -6,6 +6,6 @@ LL | let y = &x.0;
|
= note: references to fields of layout constrained fields lose the constraints. Coupled with interior mutability, the field can be changed to invalid values
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/ranged_ints4.mirunsafeck.stderr b/tests/ui/unsafe/ranged_ints4.mirunsafeck.stderr
index 493483d2c..4f2f1e42e 100644
--- a/tests/ui/unsafe/ranged_ints4.mirunsafeck.stderr
+++ b/tests/ui/unsafe/ranged_ints4.mirunsafeck.stderr
@@ -6,6 +6,6 @@ LL | x.0 = 0;
|
= note: mutating layout constrained fields cannot statically be checked for valid values
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/ranged_ints4.thirunsafeck.stderr b/tests/ui/unsafe/ranged_ints4.thirunsafeck.stderr
index 493483d2c..4f2f1e42e 100644
--- a/tests/ui/unsafe/ranged_ints4.thirunsafeck.stderr
+++ b/tests/ui/unsafe/ranged_ints4.thirunsafeck.stderr
@@ -6,6 +6,6 @@ LL | x.0 = 0;
|
= note: mutating layout constrained fields cannot statically be checked for valid values
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/ranged_ints4_const.mirunsafeck.stderr b/tests/ui/unsafe/ranged_ints4_const.mirunsafeck.stderr
index a06c6f479..a2a3ae668 100644
--- a/tests/ui/unsafe/ranged_ints4_const.mirunsafeck.stderr
+++ b/tests/ui/unsafe/ranged_ints4_const.mirunsafeck.stderr
@@ -6,6 +6,6 @@ LL | x.0 = 0;
|
= note: mutating layout constrained fields cannot statically be checked for valid values
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/ranged_ints4_const.thirunsafeck.stderr b/tests/ui/unsafe/ranged_ints4_const.thirunsafeck.stderr
index a06c6f479..a2a3ae668 100644
--- a/tests/ui/unsafe/ranged_ints4_const.thirunsafeck.stderr
+++ b/tests/ui/unsafe/ranged_ints4_const.thirunsafeck.stderr
@@ -6,6 +6,6 @@ LL | x.0 = 0;
|
= note: mutating layout constrained fields cannot statically be checked for valid values
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/ranged_ints_const.mir.stderr b/tests/ui/unsafe/ranged_ints_const.mir.stderr
index 33d134c7c..563b9be26 100644
--- a/tests/ui/unsafe/ranged_ints_const.mir.stderr
+++ b/tests/ui/unsafe/ranged_ints_const.mir.stderr
@@ -6,6 +6,6 @@ LL | const fn foo() -> NonZero<u32> { NonZero(0) }
|
= note: initializing a layout restricted type's field with a value outside the valid range is undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/ranged_ints_const.thir.stderr b/tests/ui/unsafe/ranged_ints_const.thir.stderr
index 33d134c7c..563b9be26 100644
--- a/tests/ui/unsafe/ranged_ints_const.thir.stderr
+++ b/tests/ui/unsafe/ranged_ints_const.thir.stderr
@@ -6,6 +6,6 @@ LL | const fn foo() -> NonZero<u32> { NonZero(0) }
|
= note: initializing a layout restricted type's field with a value outside the valid range is undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/unsafe-assign.mirunsafeck.stderr b/tests/ui/unsafe/unsafe-assign.mirunsafeck.stderr
index 9abc51424..f8b55e066 100644
--- a/tests/ui/unsafe/unsafe-assign.mirunsafeck.stderr
+++ b/tests/ui/unsafe/unsafe-assign.mirunsafeck.stderr
@@ -6,6 +6,6 @@ LL | foo.0.0 = 0;
|
= note: mutating layout constrained fields cannot statically be checked for valid values
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/unsafe-assign.thirunsafeck.stderr b/tests/ui/unsafe/unsafe-assign.thirunsafeck.stderr
index 9abc51424..f8b55e066 100644
--- a/tests/ui/unsafe/unsafe-assign.thirunsafeck.stderr
+++ b/tests/ui/unsafe/unsafe-assign.thirunsafeck.stderr
@@ -6,6 +6,6 @@ LL | foo.0.0 = 0;
|
= note: mutating layout constrained fields cannot statically be checked for valid values
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/unsafe-block-without-braces.stderr b/tests/ui/unsafe/unsafe-block-without-braces.stderr
index 44f77b99c..d29e49d73 100644
--- a/tests/ui/unsafe/unsafe-block-without-braces.stderr
+++ b/tests/ui/unsafe/unsafe-block-without-braces.stderr
@@ -11,5 +11,5 @@ help: try placing this code inside a block
LL | { std::mem::transmute::<f32, u32>(1.0); }
| + +
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/unsafe/unsafe-const-fn.mir.stderr b/tests/ui/unsafe/unsafe-const-fn.mir.stderr
index 3031be720..2450f0866 100644
--- a/tests/ui/unsafe/unsafe-const-fn.mir.stderr
+++ b/tests/ui/unsafe/unsafe-const-fn.mir.stderr
@@ -6,6 +6,6 @@ LL | const VAL: u32 = dummy(0xFFFF);
|
= note: consult the function's documentation for information on how to avoid undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/unsafe-const-fn.thir.stderr b/tests/ui/unsafe/unsafe-const-fn.thir.stderr
index 1a77adf44..199dca923 100644
--- a/tests/ui/unsafe/unsafe-const-fn.thir.stderr
+++ b/tests/ui/unsafe/unsafe-const-fn.thir.stderr
@@ -6,6 +6,6 @@ LL | const VAL: u32 = dummy(0xFFFF);
|
= note: consult the function's documentation for information on how to avoid undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/unsafe-fn-assign-deref-ptr.mir.stderr b/tests/ui/unsafe/unsafe-fn-assign-deref-ptr.mir.stderr
index fee645e41..da3d5f3bd 100644
--- a/tests/ui/unsafe/unsafe-fn-assign-deref-ptr.mir.stderr
+++ b/tests/ui/unsafe/unsafe-fn-assign-deref-ptr.mir.stderr
@@ -6,6 +6,6 @@ LL | *p = 0;
|
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/unsafe-fn-assign-deref-ptr.thir.stderr b/tests/ui/unsafe/unsafe-fn-assign-deref-ptr.thir.stderr
index bbe4a415b..aa5644782 100644
--- a/tests/ui/unsafe/unsafe-fn-assign-deref-ptr.thir.stderr
+++ b/tests/ui/unsafe/unsafe-fn-assign-deref-ptr.thir.stderr
@@ -6,6 +6,6 @@ LL | *p = 0;
|
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/unsafe-fn-autoderef.stderr b/tests/ui/unsafe/unsafe-fn-autoderef.stderr
index 20a88c356..c3ab80202 100644
--- a/tests/ui/unsafe/unsafe-fn-autoderef.stderr
+++ b/tests/ui/unsafe/unsafe-fn-autoderef.stderr
@@ -3,9 +3,10 @@ error[E0609]: no field `f` on type `*const Rec`
|
LL | return p.f;
| --^
- | |
+ | | |
+ | | unknown field
| help: `p` is a raw pointer; try dereferencing it: `(*p).f`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0609`.
diff --git a/tests/ui/unsafe/unsafe-fn-called-from-safe.mir.stderr b/tests/ui/unsafe/unsafe-fn-called-from-safe.mir.stderr
index 1d6fa4cbf..d33474370 100644
--- a/tests/ui/unsafe/unsafe-fn-called-from-safe.mir.stderr
+++ b/tests/ui/unsafe/unsafe-fn-called-from-safe.mir.stderr
@@ -6,6 +6,6 @@ LL | f();
|
= note: consult the function's documentation for information on how to avoid undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/unsafe-fn-called-from-safe.thir.stderr b/tests/ui/unsafe/unsafe-fn-called-from-safe.thir.stderr
index 206dbd90a..754316661 100644
--- a/tests/ui/unsafe/unsafe-fn-called-from-safe.thir.stderr
+++ b/tests/ui/unsafe/unsafe-fn-called-from-safe.thir.stderr
@@ -6,6 +6,6 @@ LL | f();
|
= note: consult the function's documentation for information on how to avoid undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/unsafe-fn-used-as-value.mir.stderr b/tests/ui/unsafe/unsafe-fn-used-as-value.mir.stderr
index b08a7109d..01e8e49ec 100644
--- a/tests/ui/unsafe/unsafe-fn-used-as-value.mir.stderr
+++ b/tests/ui/unsafe/unsafe-fn-used-as-value.mir.stderr
@@ -6,6 +6,6 @@ LL | x();
|
= note: consult the function's documentation for information on how to avoid undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/unsafe-fn-used-as-value.thir.stderr b/tests/ui/unsafe/unsafe-fn-used-as-value.thir.stderr
index e81dd3b2b..c38da7226 100644
--- a/tests/ui/unsafe/unsafe-fn-used-as-value.thir.stderr
+++ b/tests/ui/unsafe/unsafe-fn-used-as-value.thir.stderr
@@ -6,6 +6,6 @@ LL | x();
|
= note: consult the function's documentation for information on how to avoid undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/unsafe-subtyping.stderr b/tests/ui/unsafe/unsafe-subtyping.stderr
index 2db7cc312..1cc949cf7 100644
--- a/tests/ui/unsafe/unsafe-subtyping.stderr
+++ b/tests/ui/unsafe/unsafe-subtyping.stderr
@@ -9,6 +9,6 @@ LL | x
= note: expected enum `Option<unsafe fn(_)>`
found enum `Option<fn(_)>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/unsafe/unsafe-trait-impl.rs b/tests/ui/unsafe/unsafe-trait-impl.rs
index 1fc84ca02..9fd9ff652 100644
--- a/tests/ui/unsafe/unsafe-trait-impl.rs
+++ b/tests/ui/unsafe/unsafe-trait-impl.rs
@@ -7,8 +7,8 @@ trait Foo {
impl Foo for u32 {
fn len(&self) -> u32 { *self }
//~^ ERROR method `len` has an incompatible type for trait
- //~| expected signature `unsafe fn(&u32) -> _`
- //~| found signature `fn(&u32) -> _`
+ //~| expected signature `unsafe fn(&_) -> _`
+ //~| found signature `fn(&_) -> _`
}
fn main() { }
diff --git a/tests/ui/unsafe/unsafe-trait-impl.stderr b/tests/ui/unsafe/unsafe-trait-impl.stderr
index 18ba79404..5888b674d 100644
--- a/tests/ui/unsafe/unsafe-trait-impl.stderr
+++ b/tests/ui/unsafe/unsafe-trait-impl.stderr
@@ -9,9 +9,9 @@ note: type in trait
|
LL | unsafe fn len(&self) -> u32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = note: expected signature `unsafe fn(&u32) -> _`
- found signature `fn(&u32) -> _`
+ = note: expected signature `unsafe fn(&_) -> _`
+ found signature `fn(&_) -> _`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0053`.
diff --git a/tests/ui/unsafe/unsafe-unstable-const-fn.mir.stderr b/tests/ui/unsafe/unsafe-unstable-const-fn.mir.stderr
index dcb84a80c..79133ab39 100644
--- a/tests/ui/unsafe/unsafe-unstable-const-fn.mir.stderr
+++ b/tests/ui/unsafe/unsafe-unstable-const-fn.mir.stderr
@@ -6,6 +6,6 @@ LL | *a == b
|
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/unsafe-unstable-const-fn.thir.stderr b/tests/ui/unsafe/unsafe-unstable-const-fn.thir.stderr
index dcb84a80c..79133ab39 100644
--- a/tests/ui/unsafe/unsafe-unstable-const-fn.thir.stderr
+++ b/tests/ui/unsafe/unsafe-unstable-const-fn.thir.stderr
@@ -6,6 +6,6 @@ LL | *a == b
|
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsized-locals/by-value-trait-object-safety.stderr b/tests/ui/unsized-locals/by-value-trait-object-safety.stderr
index 4f13ec7ac..6a93464fe 100644
--- a/tests/ui/unsized-locals/by-value-trait-object-safety.stderr
+++ b/tests/ui/unsized-locals/by-value-trait-object-safety.stderr
@@ -16,5 +16,5 @@ LL | Self: Sized;
LL | x.foo();
| ^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/unsized-locals/issue-30276-feature-flagged.stderr b/tests/ui/unsized-locals/issue-30276-feature-flagged.stderr
index b6002cf89..ee8e4f3ee 100644
--- a/tests/ui/unsized-locals/issue-30276-feature-flagged.stderr
+++ b/tests/ui/unsized-locals/issue-30276-feature-flagged.stderr
@@ -17,6 +17,6 @@ LL | let _x: fn(_) -> Test = Test;
= note: all function arguments must have a statically known size
= help: unsized fn params are gated as an unstable feature
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/unsized-locals/issue-30276.stderr b/tests/ui/unsized-locals/issue-30276.stderr
index 8cccbd792..15f70b18b 100644
--- a/tests/ui/unsized-locals/issue-30276.stderr
+++ b/tests/ui/unsized-locals/issue-30276.stderr
@@ -8,6 +8,6 @@ LL | let _x: fn(_) -> Test = Test;
= note: all function arguments must have a statically known size
= help: unsized fn params are gated as an unstable feature
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/unsized-locals/issue-50940-with-feature.stderr b/tests/ui/unsized-locals/issue-50940-with-feature.stderr
index 8bbe317ec..b39eb2e70 100644
--- a/tests/ui/unsized-locals/issue-50940-with-feature.stderr
+++ b/tests/ui/unsized-locals/issue-50940-with-feature.stderr
@@ -21,6 +21,6 @@ LL | struct A<X: ?Sized>(X);
| ^
= note: the return type of a function must have a statically known size
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/unsized-locals/issue-50940.stderr b/tests/ui/unsized-locals/issue-50940.stderr
index 8f09b460e..160e14794 100644
--- a/tests/ui/unsized-locals/issue-50940.stderr
+++ b/tests/ui/unsized-locals/issue-50940.stderr
@@ -8,6 +8,6 @@ LL | A as fn(str) -> A<str>;
= note: all function arguments must have a statically known size
= help: unsized fn params are gated as an unstable feature
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/unsized-locals/issue-67981.stderr b/tests/ui/unsized-locals/issue-67981.stderr
index 13fdc037a..e1fa41de2 100644
--- a/tests/ui/unsized-locals/issue-67981.stderr
+++ b/tests/ui/unsized-locals/issue-67981.stderr
@@ -7,6 +7,6 @@ LL | let f: fn([u8]) = |_| {};
= help: the trait `Sized` is not implemented for `[u8]`
= note: all function arguments must have a statically known size
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/unsized-locals/rust-call.stderr b/tests/ui/unsized-locals/rust-call.stderr
index fff7ef75b..9eb0f3dab 100644
--- a/tests/ui/unsized-locals/rust-call.stderr
+++ b/tests/ui/unsized-locals/rust-call.stderr
@@ -8,6 +8,6 @@ LL | f(*slice);
= note: required because it appears within the type `([u8],)`
= note: argument required to be sized due to `extern "rust-call"` ABI
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/unsized-locals/unsized-exprs2.stderr b/tests/ui/unsized-locals/unsized-exprs2.stderr
index 88269f237..47b6d72ac 100644
--- a/tests/ui/unsized-locals/unsized-exprs2.stderr
+++ b/tests/ui/unsized-locals/unsized-exprs2.stderr
@@ -7,6 +7,6 @@ LL | udrop::<[u8]>(foo()[..]);
| cannot move out of here
| move occurs because value has type `[u8]`, which does not implement the `Copy` trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0508`.
diff --git a/tests/ui/unsized-locals/unsized-exprs3.stderr b/tests/ui/unsized-locals/unsized-exprs3.stderr
index 57d997822..9dfedfd8a 100644
--- a/tests/ui/unsized-locals/unsized-exprs3.stderr
+++ b/tests/ui/unsized-locals/unsized-exprs3.stderr
@@ -8,6 +8,6 @@ LL | udrop as fn([u8]);
= note: all function arguments must have a statically known size
= help: unsized fn params are gated as an unstable feature
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/unsized/box-instead-of-dyn-fn.stderr b/tests/ui/unsized/box-instead-of-dyn-fn.stderr
index 6087f5c54..f2828b384 100644
--- a/tests/ui/unsized/box-instead-of-dyn-fn.stderr
+++ b/tests/ui/unsized/box-instead-of-dyn-fn.stderr
@@ -16,6 +16,6 @@ LL | if a % 2 == 0 {
LL ~ Box::new(move || println!("{a}"))
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0746`.
diff --git a/tests/ui/unsized/issue-30355.stderr b/tests/ui/unsized/issue-30355.stderr
index 71bbdf5de..cfbcd0aea 100644
--- a/tests/ui/unsized/issue-30355.stderr
+++ b/tests/ui/unsized/issue-30355.stderr
@@ -8,6 +8,6 @@ LL | &X(*Y)
= note: all function arguments must have a statically known size
= help: unsized fn params are gated as an unstable feature
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/unsized/issue-71659.current.stderr b/tests/ui/unsized/issue-71659.current.stderr
index 6b982a739..df0b998fd 100644
--- a/tests/ui/unsized/issue-71659.current.stderr
+++ b/tests/ui/unsized/issue-71659.current.stderr
@@ -13,6 +13,6 @@ LL | where
LL | Self: CastTo<T>,
| ^^^^^^^^^ required by this bound in `Cast::cast`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/unsized/issue-71659.next.stderr b/tests/ui/unsized/issue-71659.next.stderr
index 6b982a739..df0b998fd 100644
--- a/tests/ui/unsized/issue-71659.next.stderr
+++ b/tests/ui/unsized/issue-71659.next.stderr
@@ -13,6 +13,6 @@ LL | where
LL | Self: CastTo<T>,
| ^^^^^^^^^ required by this bound in `Cast::cast`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/unsized/issue-71659.rs b/tests/ui/unsized/issue-71659.rs
index db5c2e205..65a867caf 100644
--- a/tests/ui/unsized/issue-71659.rs
+++ b/tests/ui/unsized/issue-71659.rs
@@ -1,5 +1,5 @@
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
#![feature(unsize)]
diff --git a/tests/ui/unsized/issue-75707.stderr b/tests/ui/unsized/issue-75707.stderr
index aa7f9c78f..f5f2f7192 100644
--- a/tests/ui/unsized/issue-75707.stderr
+++ b/tests/ui/unsized/issue-75707.stderr
@@ -15,6 +15,6 @@ note: required by a bound in `f`
LL | fn f<P: Processing + ?Sized>() {
| ^^^^^^^^^^ required by this bound in `f`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/unsized/issue-75899.rs b/tests/ui/unsized/issue-75899.rs
index 719431032..56c8a72bf 100644
--- a/tests/ui/unsized/issue-75899.rs
+++ b/tests/ui/unsized/issue-75899.rs
@@ -1,5 +1,5 @@
// revisions: current next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
// check-pass
trait Trait {}
diff --git a/tests/ui/unsized/issue-91801.stderr b/tests/ui/unsized/issue-91801.stderr
index da5c43224..d1d652d18 100644
--- a/tests/ui/unsized/issue-91801.stderr
+++ b/tests/ui/unsized/issue-91801.stderr
@@ -9,6 +9,6 @@ help: box the return type, and wrap all of the returned values in `Box::new`
LL | fn or<'a>(first: &'static Validator<'a>, second: &'static Validator<'a>) -> Box<Validator<'a>> {
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0746`.
diff --git a/tests/ui/unsized/issue-91803.stderr b/tests/ui/unsized/issue-91803.stderr
index a43b8d074..632af02b4 100644
--- a/tests/ui/unsized/issue-91803.stderr
+++ b/tests/ui/unsized/issue-91803.stderr
@@ -13,6 +13,6 @@ help: box the return type, and wrap all of the returned values in `Box::new`
LL | fn or<'a>(first: &'static dyn Foo<'a>) -> Box<dyn Foo<'a>> {
| ++++ +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0746`.
diff --git a/tests/ui/unsized/param-mentioned-by-different-field.stderr b/tests/ui/unsized/param-mentioned-by-different-field.stderr
index b1ad0cb5b..0d8b59aa9 100644
--- a/tests/ui/unsized/param-mentioned-by-different-field.stderr
+++ b/tests/ui/unsized/param-mentioned-by-different-field.stderr
@@ -9,6 +9,6 @@ LL | let y: &Foo<[u8]> = &x;
= note: expected reference `&Foo<[u8]>`
found reference `&Foo<[u8; 1]>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/unsized/return-unsized-from-trait-method.stderr b/tests/ui/unsized/return-unsized-from-trait-method.stderr
index 671d40993..82446151a 100644
--- a/tests/ui/unsized/return-unsized-from-trait-method.stderr
+++ b/tests/ui/unsized/return-unsized-from-trait-method.stderr
@@ -4,6 +4,6 @@ error[E0161]: cannot move a value of type `[u8]`
LL | let _ = f.foo();
| ^^^^^^^ the size of `[u8]` cannot be statically determined
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0161`.
diff --git a/tests/ui/unsized/unsized-bare-typaram.stderr b/tests/ui/unsized/unsized-bare-typaram.stderr
index daef98440..aa3f8fae7 100644
--- a/tests/ui/unsized/unsized-bare-typaram.stderr
+++ b/tests/ui/unsized/unsized-bare-typaram.stderr
@@ -17,6 +17,6 @@ LL - fn foo<T: ?Sized>() { bar::<T>() }
LL + fn foo<T>() { bar::<T>() }
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/unsized/unsized-enum.stderr b/tests/ui/unsized/unsized-enum.stderr
index 9e6408e81..8c56a83a5 100644
--- a/tests/ui/unsized/unsized-enum.stderr
+++ b/tests/ui/unsized/unsized-enum.stderr
@@ -24,6 +24,6 @@ LL - fn foo2<T: ?Sized>() { not_sized::<Foo<T>>() }
LL + fn foo2<T>() { not_sized::<Foo<T>>() }
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/unsized/unsized-fn-arg.stderr b/tests/ui/unsized/unsized-fn-arg.stderr
index 0f6fadde1..c8a6622b8 100644
--- a/tests/ui/unsized/unsized-fn-arg.stderr
+++ b/tests/ui/unsized/unsized-fn-arg.stderr
@@ -17,6 +17,6 @@ help: function arguments must have a statically known size, borrowed types alway
LL | fn f<T: ?Sized>(t: &T) {}
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/unsized/unsized-inherent-impl-self-type.stderr b/tests/ui/unsized/unsized-inherent-impl-self-type.stderr
index 9e5ad92eb..3e16a20d7 100644
--- a/tests/ui/unsized/unsized-inherent-impl-self-type.stderr
+++ b/tests/ui/unsized/unsized-inherent-impl-self-type.stderr
@@ -24,6 +24,6 @@ LL - impl<X: ?Sized> S5<X> {
LL + impl<X> S5<X> {
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/unused-crate-deps/deny-attr.stderr b/tests/ui/unused-crate-deps/deny-attr.stderr
index 93694f682..89e87c9d5 100644
--- a/tests/ui/unused-crate-deps/deny-attr.stderr
+++ b/tests/ui/unused-crate-deps/deny-attr.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(unused_crate_dependencies)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/unused-crate-deps/deny-cmdline-json-silent.stderr b/tests/ui/unused-crate-deps/deny-cmdline-json-silent.stderr
index 595619f3a..f6594fdaa 100644
--- a/tests/ui/unused-crate-deps/deny-cmdline-json-silent.stderr
+++ b/tests/ui/unused-crate-deps/deny-cmdline-json-silent.stderr
@@ -1 +1 @@
-{"lint_level":"deny","unused_extern_names":["bar"]}
+{"$message_type":"unused_extern","lint_level":"deny","unused_extern_names":["bar"]}
diff --git a/tests/ui/unused-crate-deps/deny-cmdline-json.stderr b/tests/ui/unused-crate-deps/deny-cmdline-json.stderr
index 595619f3a..f6594fdaa 100644
--- a/tests/ui/unused-crate-deps/deny-cmdline-json.stderr
+++ b/tests/ui/unused-crate-deps/deny-cmdline-json.stderr
@@ -1 +1 @@
-{"lint_level":"deny","unused_extern_names":["bar"]}
+{"$message_type":"unused_extern","lint_level":"deny","unused_extern_names":["bar"]}
diff --git a/tests/ui/unused-crate-deps/deny-cmdline.stderr b/tests/ui/unused-crate-deps/deny-cmdline.stderr
index 0951dc670..fc526878e 100644
--- a/tests/ui/unused-crate-deps/deny-cmdline.stderr
+++ b/tests/ui/unused-crate-deps/deny-cmdline.stderr
@@ -6,5 +6,5 @@ LL | fn main() {}
|
= note: requested on the command line with `-D unused-crate-dependencies`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/unused-crate-deps/warn-cmdline-json.stderr b/tests/ui/unused-crate-deps/warn-cmdline-json.stderr
index 98dbd7639..ef99f986e 100644
--- a/tests/ui/unused-crate-deps/warn-cmdline-json.stderr
+++ b/tests/ui/unused-crate-deps/warn-cmdline-json.stderr
@@ -1 +1 @@
-{"lint_level":"warn","unused_extern_names":["bar"]}
+{"$message_type":"unused_extern","lint_level":"warn","unused_extern_names":["bar"]}
diff --git a/tests/ui/use/issue-18986.stderr b/tests/ui/use/issue-18986.stderr
index 6c23178c7..350cb18f9 100644
--- a/tests/ui/use/issue-18986.stderr
+++ b/tests/ui/use/issue-18986.stderr
@@ -4,6 +4,6 @@ error[E0574]: expected struct, variant or union type, found trait `Trait`
LL | Trait { x: 42 } => ()
| ^^^^^ not a struct, variant or union type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0574`.
diff --git a/tests/ui/use/use-after-move-based-on-type.stderr b/tests/ui/use/use-after-move-based-on-type.stderr
index 7b4d24549..02a6ed599 100644
--- a/tests/ui/use/use-after-move-based-on-type.stderr
+++ b/tests/ui/use/use-after-move-based-on-type.stderr
@@ -14,6 +14,6 @@ help: consider cloning the value if the performance cost is acceptable
LL | let _y = x.clone();
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/use/use-after-move-implicity-coerced-object.stderr b/tests/ui/use/use-after-move-implicity-coerced-object.stderr
index 84487a8d0..35ede2171 100644
--- a/tests/ui/use/use-after-move-implicity-coerced-object.stderr
+++ b/tests/ui/use/use-after-move-implicity-coerced-object.stderr
@@ -18,6 +18,6 @@ LL | fn push(&mut self, n: Box<dyn ToString + 'static>) {
| |
| in this method
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/use/use-after-move-self-based-on-type.stderr b/tests/ui/use/use-after-move-self-based-on-type.stderr
index 1bdf49801..17827becc 100644
--- a/tests/ui/use/use-after-move-self-based-on-type.stderr
+++ b/tests/ui/use/use-after-move-self-based-on-type.stderr
@@ -14,6 +14,6 @@ note: `S::bar` takes ownership of the receiver `self`, which moves `self`
LL | pub fn bar(self) {}
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/use/use-after-move-self.stderr b/tests/ui/use/use-after-move-self.stderr
index 59cc22ead..ebd6cef58 100644
--- a/tests/ui/use/use-after-move-self.stderr
+++ b/tests/ui/use/use-after-move-self.stderr
@@ -14,6 +14,6 @@ note: `S::bar` takes ownership of the receiver `self`, which moves `self`
LL | pub fn bar(self) {}
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/use/use-associated-const.stderr b/tests/ui/use/use-associated-const.stderr
index 4bc0d7e61..f0de7a746 100644
--- a/tests/ui/use/use-associated-const.stderr
+++ b/tests/ui/use/use-associated-const.stderr
@@ -4,6 +4,6 @@ error[E0432]: unresolved import `foo::Foo`
LL | use foo::Foo::BAR;
| ^^^ `Foo` is a struct, not a module
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/use/use-crate-self.stderr b/tests/ui/use/use-crate-self.stderr
index dd4036bff..a8f65b128 100644
--- a/tests/ui/use/use-crate-self.stderr
+++ b/tests/ui/use/use-crate-self.stderr
@@ -4,5 +4,5 @@ error: crate root imports need to be explicitly named: `use crate as name;`
LL | use crate::{self};
| ^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/use/use-meta-mismatch.stderr b/tests/ui/use/use-meta-mismatch.stderr
index 62b71fe8e..b793229e5 100644
--- a/tests/ui/use/use-meta-mismatch.stderr
+++ b/tests/ui/use/use-meta-mismatch.stderr
@@ -4,6 +4,6 @@ error[E0463]: can't find crate for `fake_crate`
LL | extern crate fake_crate as extra;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0463`.
diff --git a/tests/ui/use/use-mod/use-mod-5.stderr b/tests/ui/use/use-mod/use-mod-5.stderr
index 62859e261..22201361c 100644
--- a/tests/ui/use/use-mod/use-mod-5.stderr
+++ b/tests/ui/use/use-mod/use-mod-5.stderr
@@ -14,6 +14,6 @@ help: alternatively, use the multi-path `use` syntax to import `self`
LL | use foo::bar::{self};
| + +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0429`.
diff --git a/tests/ui/use/use-mod/use-mod-6.stderr b/tests/ui/use/use-mod/use-mod-6.stderr
index 2d2c90067..f9ab346f8 100644
--- a/tests/ui/use/use-mod/use-mod-6.stderr
+++ b/tests/ui/use/use-mod/use-mod-6.stderr
@@ -14,6 +14,6 @@ help: alternatively, use the multi-path `use` syntax to import `self`
LL | use foo::bar::{self as abc};
| + +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0429`.
diff --git a/tests/ui/use/use-nested-groups-error.stderr b/tests/ui/use/use-nested-groups-error.stderr
index 7234c8ec6..d73754c6b 100644
--- a/tests/ui/use/use-nested-groups-error.stderr
+++ b/tests/ui/use/use-nested-groups-error.stderr
@@ -7,6 +7,6 @@ LL | use a::{b1::{C1, C2}, B2};
| no `C1` in `a::b1`
| help: a similar name exists in the module: `C2`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/use/use-paths-as-items.stderr b/tests/ui/use/use-paths-as-items.stderr
index b09001a9b..c54f40daf 100644
--- a/tests/ui/use/use-paths-as-items.stderr
+++ b/tests/ui/use/use-paths-as-items.stderr
@@ -8,6 +8,6 @@ LL | use std::mem;
|
= note: `mem` must be defined only once in the type namespace of this module
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0252`.
diff --git a/tests/ui/usize-generic-argument-parent.stderr b/tests/ui/usize-generic-argument-parent.stderr
index 131c476aa..9c081a287 100644
--- a/tests/ui/usize-generic-argument-parent.stderr
+++ b/tests/ui/usize-generic-argument-parent.stderr
@@ -12,6 +12,6 @@ LL - let x: usize<foo>;
LL + let x: usize;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0109`.
diff --git a/tests/ui/variance/variance-associated-consts.stderr b/tests/ui/variance/variance-associated-consts.stderr
index 4df2d8da3..e25f0879a 100644
--- a/tests/ui/variance/variance-associated-consts.stderr
+++ b/tests/ui/variance/variance-associated-consts.stderr
@@ -4,5 +4,5 @@ error: [o]
LL | struct Foo<T: Trait> {
| ^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/variance/variance-associated-types2.stderr b/tests/ui/variance/variance-associated-types2.stderr
index 35871c123..158b09b06 100644
--- a/tests/ui/variance/variance-associated-types2.stderr
+++ b/tests/ui/variance/variance-associated-types2.stderr
@@ -6,5 +6,5 @@ LL | fn take<'a>(_: &'a u32) {
LL | let _: Box<dyn Foo<Bar = &'a u32>> = make();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/variance/variance-cell-is-invariant.stderr b/tests/ui/variance/variance-cell-is-invariant.stderr
index ab5435d16..18e2de9f5 100644
--- a/tests/ui/variance/variance-cell-is-invariant.stderr
+++ b/tests/ui/variance/variance-cell-is-invariant.stderr
@@ -14,5 +14,5 @@ LL | let _: Foo<'long> = c;
= note: the struct `Foo<'a>` is invariant over the parameter `'a`
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/variance/variance-object-types.stderr b/tests/ui/variance/variance-object-types.stderr
index 55a760425..963f3454e 100644
--- a/tests/ui/variance/variance-object-types.stderr
+++ b/tests/ui/variance/variance-object-types.stderr
@@ -4,5 +4,5 @@ error: [o]
LL | struct Foo<'a> {
| ^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/variance/variance-trait-matching.stderr b/tests/ui/variance/variance-trait-matching.stderr
index 3308cc6d2..9c72fe239 100644
--- a/tests/ui/variance/variance-trait-matching.stderr
+++ b/tests/ui/variance/variance-trait-matching.stderr
@@ -7,6 +7,6 @@ LL | fn get<'a, G>(get: &G) -> i32
LL | pick(get, &22)
| ^^^^^^^^^^^^^^ lifetime `'a` required
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0621`.
diff --git a/tests/ui/variance/variance-trait-object-bound.stderr b/tests/ui/variance/variance-trait-object-bound.stderr
index bfcc8d4a1..f0471a346 100644
--- a/tests/ui/variance/variance-trait-object-bound.stderr
+++ b/tests/ui/variance/variance-trait-object-bound.stderr
@@ -4,5 +4,5 @@ error: [+]
LL | struct TOption<'a> {
| ^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/variance/variance-use-contravariant-struct-1.stderr b/tests/ui/variance/variance-use-contravariant-struct-1.stderr
index 50de7c90f..5000787b8 100644
--- a/tests/ui/variance/variance-use-contravariant-struct-1.stderr
+++ b/tests/ui/variance/variance-use-contravariant-struct-1.stderr
@@ -11,5 +11,5 @@ LL | v
|
= help: consider adding the following bound: `'min: 'max`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/variance/variance-use-covariant-struct-1.stderr b/tests/ui/variance/variance-use-covariant-struct-1.stderr
index bab858c5a..bd8458cd8 100644
--- a/tests/ui/variance/variance-use-covariant-struct-1.stderr
+++ b/tests/ui/variance/variance-use-covariant-struct-1.stderr
@@ -11,5 +11,5 @@ LL | v
|
= help: consider adding the following bound: `'min: 'max`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/variants/variant-size-differences.stderr b/tests/ui/variants/variant-size-differences.stderr
index 241a757d4..cbc3eabd1 100644
--- a/tests/ui/variants/variant-size-differences.stderr
+++ b/tests/ui/variants/variant-size-differences.stderr
@@ -10,5 +10,5 @@ note: the lint level is defined here
LL | #![deny(variant_size_differences)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/walk-struct-literal-with.stderr b/tests/ui/walk-struct-literal-with.stderr
index 2b85fa9be..34b501f8e 100644
--- a/tests/ui/walk-struct-literal-with.stderr
+++ b/tests/ui/walk-struct-literal-with.stderr
@@ -15,6 +15,6 @@ LL | fn make_string_bar(mut self) -> Mine{
| ^^^^
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/wf/issue-103573.stderr b/tests/ui/wf/issue-103573.stderr
index 5227badb7..3129f2a8c 100644
--- a/tests/ui/wf/issue-103573.stderr
+++ b/tests/ui/wf/issue-103573.stderr
@@ -9,6 +9,6 @@ help: consider further restricting the associated type
LL | fn g<'a>(_: &<<Self::TypeC<'a> as TraitB>::TypeB as TraitA>::TypeA) where <<Self as TraitC<E>>::TypeC<'a> as TraitB>::TypeB: TraitA;
| +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/issue-87495.stderr b/tests/ui/wf/issue-87495.stderr
index c924cd879..3ccfd7f8d 100644
--- a/tests/ui/wf/issue-87495.stderr
+++ b/tests/ui/wf/issue-87495.stderr
@@ -13,6 +13,6 @@ LL | const CONST: (bool, dyn T);
| ^^^^^ ...because it contains this associated `const`
= help: consider moving `CONST` to another trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/wf/issue-95665.stderr b/tests/ui/wf/issue-95665.stderr
index f80cd41a4..1b14045d5 100644
--- a/tests/ui/wf/issue-95665.stderr
+++ b/tests/ui/wf/issue-95665.stderr
@@ -15,6 +15,6 @@ note: required by a bound in `Struct`
LL | pub struct Struct<T: Trait> {
| ^^^^^ required by this bound in `Struct`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/issue-96810.stderr b/tests/ui/wf/issue-96810.stderr
index 1407e62b1..622d72f79 100644
--- a/tests/ui/wf/issue-96810.stderr
+++ b/tests/ui/wf/issue-96810.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `K`
LL | struct Hoge<K: Tr> {
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-array-elem-sized.stderr b/tests/ui/wf/wf-array-elem-sized.stderr
index 7f3c58d6b..6bca8d036 100644
--- a/tests/ui/wf/wf-array-elem-sized.stderr
+++ b/tests/ui/wf/wf-array-elem-sized.stderr
@@ -7,6 +7,6 @@ LL | foo: [[u8]],
= help: the trait `Sized` is not implemented for `[u8]`
= note: slice and array elements must have `Sized` type
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-complex-assoc-type.stderr b/tests/ui/wf/wf-complex-assoc-type.stderr
index 6a623bec8..161ee9d70 100644
--- a/tests/ui/wf/wf-complex-assoc-type.stderr
+++ b/tests/ui/wf/wf-complex-assoc-type.stderr
@@ -15,6 +15,6 @@ note: required by a bound in `AssertMyTrait`
LL | struct AssertMyTrait<T: MyTrait>(T);
| ^^^^^^^ required by this bound in `AssertMyTrait`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-enum-bound.stderr b/tests/ui/wf/wf-enum-bound.stderr
index d39fc0c6a..78b5c6ec2 100644
--- a/tests/ui/wf/wf-enum-bound.stderr
+++ b/tests/ui/wf/wf-enum-bound.stderr
@@ -14,6 +14,6 @@ help: consider further restricting type parameter `U`
LL | where T: ExtraCopy<U>, U: std::marker::Copy
| ++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-enum-fields-struct-variant.stderr b/tests/ui/wf/wf-enum-fields-struct-variant.stderr
index c12d62521..2f2c1c2d2 100644
--- a/tests/ui/wf/wf-enum-fields-struct-variant.stderr
+++ b/tests/ui/wf/wf-enum-fields-struct-variant.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `A`
LL | enum AnotherEnum<A: std::marker::Copy> {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-enum-fields.stderr b/tests/ui/wf/wf-enum-fields.stderr
index ac3301a96..a5feaadfc 100644
--- a/tests/ui/wf/wf-enum-fields.stderr
+++ b/tests/ui/wf/wf-enum-fields.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `A`
LL | enum SomeEnum<A: std::marker::Copy> {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-impl-associated-type-region.stderr b/tests/ui/wf/wf-impl-associated-type-region.stderr
index e6fb81247..f17d33474 100644
--- a/tests/ui/wf/wf-impl-associated-type-region.stderr
+++ b/tests/ui/wf/wf-impl-associated-type-region.stderr
@@ -11,6 +11,6 @@ help: consider adding an explicit lifetime bound
LL | impl<'a, T: 'a> Foo<'a> for T {
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0309`.
diff --git a/tests/ui/wf/wf-impl-associated-type-trait.stderr b/tests/ui/wf/wf-impl-associated-type-trait.stderr
index bdf8bba5e..09e255bea 100644
--- a/tests/ui/wf/wf-impl-associated-type-trait.stderr
+++ b/tests/ui/wf/wf-impl-associated-type-trait.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `T`
LL | impl<T: MyHash> Foo for T {
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-impl-self-type.stderr b/tests/ui/wf/wf-impl-self-type.stderr
index 1ca368729..86fe6df32 100644
--- a/tests/ui/wf/wf-impl-self-type.stderr
+++ b/tests/ui/wf/wf-impl-self-type.stderr
@@ -8,6 +8,6 @@ LL | impl Foo for Option<[u8]> {}
note: required by a bound in `Option`
--> $SRC_DIR/core/src/option.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-in-fn-arg.stderr b/tests/ui/wf/wf-in-fn-arg.stderr
index 83a4a592a..8f22edd17 100644
--- a/tests/ui/wf/wf-in-fn-arg.stderr
+++ b/tests/ui/wf/wf-in-fn-arg.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `T`
LL | fn bar<T: std::marker::Copy>(_: &MustBeCopy<T>)
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-in-fn-ret.stderr b/tests/ui/wf/wf-in-fn-ret.stderr
index 7eeb97472..85cf78c59 100644
--- a/tests/ui/wf/wf-in-fn-ret.stderr
+++ b/tests/ui/wf/wf-in-fn-ret.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `T`
LL | fn bar<T: std::marker::Copy>() -> MustBeCopy<T>
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-in-fn-type-arg.stderr b/tests/ui/wf/wf-in-fn-type-arg.stderr
index be5e9d418..17594c813 100644
--- a/tests/ui/wf/wf-in-fn-type-arg.stderr
+++ b/tests/ui/wf/wf-in-fn-type-arg.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `T`
LL | struct Bar<T: std::marker::Copy> {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-in-fn-type-ret.stderr b/tests/ui/wf/wf-in-fn-type-ret.stderr
index 8fcfcb0b2..fac535a11 100644
--- a/tests/ui/wf/wf-in-fn-type-ret.stderr
+++ b/tests/ui/wf/wf-in-fn-type-ret.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `T`
LL | struct Foo<T: std::marker::Copy> {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-in-fn-where-clause.stderr b/tests/ui/wf/wf-in-fn-where-clause.stderr
index 160a73840..4c556d3d7 100644
--- a/tests/ui/wf/wf-in-fn-where-clause.stderr
+++ b/tests/ui/wf/wf-in-fn-where-clause.stderr
@@ -14,6 +14,6 @@ help: consider further restricting type parameter `U`
LL | where T: MustBeCopy<U>, U: std::marker::Copy
| ++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-in-foreign-fn-decls-issue-80468.stderr b/tests/ui/wf/wf-in-foreign-fn-decls-issue-80468.stderr
index b10856571..0af4ab022 100644
--- a/tests/ui/wf/wf-in-foreign-fn-decls-issue-80468.stderr
+++ b/tests/ui/wf/wf-in-foreign-fn-decls-issue-80468.stderr
@@ -9,6 +9,6 @@ help: indicate the anonymous lifetime
LL | impl Trait for Ref<'_> {}
| ++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0726`.
diff --git a/tests/ui/wf/wf-in-obj-type-static.stderr b/tests/ui/wf/wf-in-obj-type-static.stderr
index 4b9b18916..9e837b10e 100644
--- a/tests/ui/wf/wf-in-obj-type-static.stderr
+++ b/tests/ui/wf/wf-in-obj-type-static.stderr
@@ -12,6 +12,6 @@ help: consider adding an explicit lifetime bound
LL | struct Foo<T: 'static> {
| +++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0310`.
diff --git a/tests/ui/wf/wf-in-obj-type-trait.stderr b/tests/ui/wf/wf-in-obj-type-trait.stderr
index f556b678e..b96f56a12 100644
--- a/tests/ui/wf/wf-in-obj-type-trait.stderr
+++ b/tests/ui/wf/wf-in-obj-type-trait.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `T`
LL | struct Bar<T: std::marker::Copy> {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-inherent-impl-method-where-clause.stderr b/tests/ui/wf/wf-inherent-impl-method-where-clause.stderr
index e723d1ba7..4cfbec12b 100644
--- a/tests/ui/wf/wf-inherent-impl-method-where-clause.stderr
+++ b/tests/ui/wf/wf-inherent-impl-method-where-clause.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `U`
LL | impl<T,U: std::marker::Copy> Foo<T,U> {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-inherent-impl-where-clause.stderr b/tests/ui/wf/wf-inherent-impl-where-clause.stderr
index 39e0d348e..bdc1ee3e0 100644
--- a/tests/ui/wf/wf-inherent-impl-where-clause.stderr
+++ b/tests/ui/wf/wf-inherent-impl-where-clause.stderr
@@ -14,6 +14,6 @@ help: consider further restricting type parameter `U`
LL | impl<T,U> Foo<T,U> where T: ExtraCopy<U>, U: std::marker::Copy
| ++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-object-safe.stderr b/tests/ui/wf/wf-object-safe.stderr
index 64969fbe3..cc5351346 100644
--- a/tests/ui/wf/wf-object-safe.stderr
+++ b/tests/ui/wf/wf-object-safe.stderr
@@ -13,6 +13,6 @@ LL | fn foo(&self, _x: &Self);
| ^^^^^ ...because method `foo` references the `Self` type in this parameter
= help: consider moving `foo` to another trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/wf/wf-packed-on-proj-of-type-as-unimpl-trait.stderr b/tests/ui/wf/wf-packed-on-proj-of-type-as-unimpl-trait.stderr
index 52f46562c..8e3088c6f 100644
--- a/tests/ui/wf/wf-packed-on-proj-of-type-as-unimpl-trait.stderr
+++ b/tests/ui/wf/wf-packed-on-proj-of-type-as-unimpl-trait.stderr
@@ -10,6 +10,6 @@ help: this trait has no implementations, consider adding one
LL | pub trait Allocator { type Buffer; }
| ^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-struct-bound.stderr b/tests/ui/wf/wf-struct-bound.stderr
index 6248e3e4e..4ac7f4634 100644
--- a/tests/ui/wf/wf-struct-bound.stderr
+++ b/tests/ui/wf/wf-struct-bound.stderr
@@ -14,6 +14,6 @@ help: consider further restricting type parameter `U`
LL | where T: ExtraCopy<U>, U: std::marker::Copy
| ++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-struct-field.stderr b/tests/ui/wf/wf-struct-field.stderr
index 78a8da860..241ced3c2 100644
--- a/tests/ui/wf/wf-struct-field.stderr
+++ b/tests/ui/wf/wf-struct-field.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `A`
LL | struct SomeStruct<A: std::marker::Copy> {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-trait-associated-type-bound.stderr b/tests/ui/wf/wf-trait-associated-type-bound.stderr
index 829770017..4ea895a9b 100644
--- a/tests/ui/wf/wf-trait-associated-type-bound.stderr
+++ b/tests/ui/wf/wf-trait-associated-type-bound.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `T`
LL | trait SomeTrait<T: std::marker::Copy> {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-trait-associated-type-region.stderr b/tests/ui/wf/wf-trait-associated-type-region.stderr
index ca7aeb55b..d6647b2cb 100644
--- a/tests/ui/wf/wf-trait-associated-type-region.stderr
+++ b/tests/ui/wf/wf-trait-associated-type-region.stderr
@@ -12,6 +12,6 @@ help: consider adding an explicit lifetime bound
LL | type Type2 = &'a Self::Type1 where <Self as SomeTrait<'a>>::Type1: 'a;
| ++++++++++++++++++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0309`.
diff --git a/tests/ui/wf/wf-trait-associated-type-trait.stderr b/tests/ui/wf/wf-trait-associated-type-trait.stderr
index a73c3a2ae..1dc8e2d87 100644
--- a/tests/ui/wf/wf-trait-associated-type-trait.stderr
+++ b/tests/ui/wf/wf-trait-associated-type-trait.stderr
@@ -14,6 +14,6 @@ help: consider further restricting the associated type
LL | trait SomeTrait where <Self as SomeTrait>::Type1: Copy {
| ++++++++++++++++++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-trait-bound.stderr b/tests/ui/wf/wf-trait-bound.stderr
index bace3e3ef..5845d05b3 100644
--- a/tests/ui/wf/wf-trait-bound.stderr
+++ b/tests/ui/wf/wf-trait-bound.stderr
@@ -14,6 +14,6 @@ help: consider further restricting type parameter `U`
LL | where T: ExtraCopy<U>, U: std::marker::Copy
| ++++++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-trait-default-fn-arg.stderr b/tests/ui/wf/wf-trait-default-fn-arg.stderr
index 8c3d0568f..a885f8988 100644
--- a/tests/ui/wf/wf-trait-default-fn-arg.stderr
+++ b/tests/ui/wf/wf-trait-default-fn-arg.stderr
@@ -14,6 +14,6 @@ help: consider further restricting `Self`
LL | fn bar(&self, x: &Bar<Self>) where Self: Eq {
| ++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-trait-default-fn-ret.stderr b/tests/ui/wf/wf-trait-default-fn-ret.stderr
index 6422e862d..f749ac7b1 100644
--- a/tests/ui/wf/wf-trait-default-fn-ret.stderr
+++ b/tests/ui/wf/wf-trait-default-fn-ret.stderr
@@ -14,6 +14,6 @@ help: consider further restricting `Self`
LL | fn bar(&self) -> Bar<Self> where Self: Eq {
| ++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-trait-default-fn-where-clause.stderr b/tests/ui/wf/wf-trait-default-fn-where-clause.stderr
index f260d5750..e44a96fa5 100644
--- a/tests/ui/wf/wf-trait-default-fn-where-clause.stderr
+++ b/tests/ui/wf/wf-trait-default-fn-where-clause.stderr
@@ -14,6 +14,6 @@ help: consider further restricting `Self`
LL | fn bar<A>(&self) where A: Bar<Self>, Self: Eq {
| ++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-trait-fn-arg.stderr b/tests/ui/wf/wf-trait-fn-arg.stderr
index 3bd1f4892..8b35f36fa 100644
--- a/tests/ui/wf/wf-trait-fn-arg.stderr
+++ b/tests/ui/wf/wf-trait-fn-arg.stderr
@@ -14,6 +14,6 @@ help: consider further restricting `Self`
LL | fn bar(&self, x: &Bar<Self>) where Self: Eq;
| ++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-trait-fn-ret.stderr b/tests/ui/wf/wf-trait-fn-ret.stderr
index 9bd3cc771..3d70f04de 100644
--- a/tests/ui/wf/wf-trait-fn-ret.stderr
+++ b/tests/ui/wf/wf-trait-fn-ret.stderr
@@ -14,6 +14,6 @@ help: consider further restricting `Self`
LL | fn bar(&self) -> &Bar<Self> where Self: Eq;
| ++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-trait-fn-where-clause.stderr b/tests/ui/wf/wf-trait-fn-where-clause.stderr
index d064f7fc5..0ad3b58e7 100644
--- a/tests/ui/wf/wf-trait-fn-where-clause.stderr
+++ b/tests/ui/wf/wf-trait-fn-where-clause.stderr
@@ -14,6 +14,6 @@ help: consider further restricting `Self`
LL | fn bar(&self) where Self: Sized, Bar<Self>: Copy, Self: Eq;
| ++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-trait-superbound.stderr b/tests/ui/wf/wf-trait-superbound.stderr
index cd49243a4..3c05065e5 100644
--- a/tests/ui/wf/wf-trait-superbound.stderr
+++ b/tests/ui/wf/wf-trait-superbound.stderr
@@ -14,6 +14,6 @@ help: consider restricting type parameter `T`
LL | trait SomeTrait<T: std::marker::Copy>: ExtraCopy<T> {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/where-clauses/higher-ranked-fn-type.quiet.stderr b/tests/ui/where-clauses/higher-ranked-fn-type.quiet.stderr
index 29b36f44a..4c15497d5 100644
--- a/tests/ui/where-clauses/higher-ranked-fn-type.quiet.stderr
+++ b/tests/ui/where-clauses/higher-ranked-fn-type.quiet.stderr
@@ -18,6 +18,6 @@ LL | where
LL | for<'b> fn(&'b ()): Foo,
| ^^^ required by this bound in `called`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/where-clauses/higher-ranked-fn-type.verbose.stderr b/tests/ui/where-clauses/higher-ranked-fn-type.verbose.stderr
index 54afeaa7e..3318c70f1 100644
--- a/tests/ui/where-clauses/higher-ranked-fn-type.verbose.stderr
+++ b/tests/ui/where-clauses/higher-ranked-fn-type.verbose.stderr
@@ -1,8 +1,8 @@
-error[E0277]: the trait bound `for<Region(BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b))> fn(&ReLateBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b) }) ()): Foo` is not satisfied
+error[E0277]: the trait bound `for<Region(BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b))> fn(&ReBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b) }) ()): Foo` is not satisfied
--> $DIR/higher-ranked-fn-type.rs:20:5
|
LL | called()
- | ^^^^^^ the trait `for<Region(BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b))> Foo` is not implemented for `fn(&ReLateBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b) }) ())`
+ | ^^^^^^ the trait `for<Region(BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b))> Foo` is not implemented for `fn(&ReBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b) }) ())`
|
help: this trait has no implementations, consider adding one
--> $DIR/higher-ranked-fn-type.rs:6:1
@@ -18,6 +18,6 @@ LL | where
LL | for<'b> fn(&'b ()): Foo,
| ^^^ required by this bound in `called`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/where-clauses/ignore-err-clauses.stderr b/tests/ui/where-clauses/ignore-err-clauses.stderr
index cfddc3e10..4cf553da4 100644
--- a/tests/ui/where-clauses/ignore-err-clauses.stderr
+++ b/tests/ui/where-clauses/ignore-err-clauses.stderr
@@ -4,6 +4,6 @@ error[E0412]: cannot find type `UUU` in this scope
LL | UUU: Copy,
| ^^^ not found in this scope
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/where-clauses/self-in-where-clause-allowed.stderr b/tests/ui/where-clauses/self-in-where-clause-allowed.stderr
index ea51f5084..7f92ac102 100644
--- a/tests/ui/where-clauses/self-in-where-clause-allowed.stderr
+++ b/tests/ui/where-clauses/self-in-where-clause-allowed.stderr
@@ -10,6 +10,6 @@ note: required by a bound in `Trait::autotrait_bound`
LL | fn autotrait_bound(&self) where Self: AutoTrait {}
| ^^^^^^^^^ required by this bound in `Trait::autotrait_bound`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr b/tests/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr
index 43fbc0a90..2612cefef 100644
--- a/tests/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr
+++ b/tests/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr
@@ -16,6 +16,6 @@ help: consider restricting type parameter `T`
LL | impl<T: std::marker::Copy> Foo<T> {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr b/tests/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr
index f2db8fcc4..090df26a3 100644
--- a/tests/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr
+++ b/tests/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr
@@ -16,6 +16,6 @@ help: consider restricting type parameter `T`
LL | impl<T: std::marker::Copy> Foo<T> for Bar<T> {
| +++++++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/where-clauses/where-clause-method-substituion.stderr b/tests/ui/where-clauses/where-clause-method-substituion.stderr
index 2f3b615a1..1a1d9c13a 100644
--- a/tests/ui/where-clauses/where-clause-method-substituion.stderr
+++ b/tests/ui/where-clauses/where-clause-method-substituion.stderr
@@ -15,6 +15,6 @@ note: required by a bound in `Bar::method`
LL | fn method<B>(&self) where A: Foo<B>;
| ^^^^^^ required by this bound in `Bar::method`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/where-clauses/where-clauses-method-unsatisfied.stderr b/tests/ui/where-clauses/where-clauses-method-unsatisfied.stderr
index 6cf717295..840df342e 100644
--- a/tests/ui/where-clauses/where-clauses-method-unsatisfied.stderr
+++ b/tests/ui/where-clauses/where-clauses-method-unsatisfied.stderr
@@ -15,6 +15,6 @@ LL + #[derive(Eq)]
LL | struct Bar; // does not implement Eq
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/where-clauses/where-clauses-unsatisfied.stderr b/tests/ui/where-clauses/where-clauses-unsatisfied.stderr
index 4d239bf43..205b82d49 100644
--- a/tests/ui/where-clauses/where-clauses-unsatisfied.stderr
+++ b/tests/ui/where-clauses/where-clauses-unsatisfied.stderr
@@ -15,6 +15,6 @@ LL + #[derive(Eq)]
LL | struct Struct;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/where-clauses/where-for-self-2.stderr b/tests/ui/where-clauses/where-for-self-2.stderr
index f65db78fc..f47921077 100644
--- a/tests/ui/where-clauses/where-for-self-2.stderr
+++ b/tests/ui/where-clauses/where-for-self-2.stderr
@@ -7,5 +7,5 @@ LL | foo(&X);
= note: `&'0 u32` must implement `Bar`, for any lifetime `'0`...
= note: ...but `Bar` is actually implemented for the type `&'static u32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/where-clauses/where-for-self.stderr b/tests/ui/where-clauses/where-for-self.stderr
index d06afc1e4..8936e45c1 100644
--- a/tests/ui/where-clauses/where-for-self.stderr
+++ b/tests/ui/where-clauses/where-for-self.stderr
@@ -4,6 +4,6 @@ error[E0316]: nested quantification of lifetimes
LL | where for<'a> &'a T: for<'b> Bar<'b>
| ^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0316`.
diff --git a/tests/ui/while/while-else-err.stderr b/tests/ui/while/while-else-err.stderr
index 88f715d56..b93795610 100644
--- a/tests/ui/while/while-else-err.stderr
+++ b/tests/ui/while/while-else-err.stderr
@@ -13,5 +13,5 @@ LL | | };
|
= note: consider moving this `else` clause to a separate `if` statement and use a `bool` variable to control if it should run
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/while/while-else-let-else-err.stderr b/tests/ui/while/while-else-let-else-err.stderr
index 431d37c00..27d68ffdb 100644
--- a/tests/ui/while/while-else-let-else-err.stderr
+++ b/tests/ui/while/while-else-let-else-err.stderr
@@ -13,5 +13,5 @@ LL | | };
|
= note: consider moving this `else` clause to a separate `if` statement and use a `bool` variable to control if it should run
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/windows-subsystem-invalid.stderr b/tests/ui/windows-subsystem-invalid.stderr
index 0cb843cf0..703f35c96 100644
--- a/tests/ui/windows-subsystem-invalid.stderr
+++ b/tests/ui/windows-subsystem-invalid.stderr
@@ -1,4 +1,4 @@
error: invalid windows subsystem `wrong`, only `windows` and `console` are allowed
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/writing-to-immutable-vec.stderr b/tests/ui/writing-to-immutable-vec.stderr
index 286267c38..06e1684df 100644
--- a/tests/ui/writing-to-immutable-vec.stderr
+++ b/tests/ui/writing-to-immutable-vec.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be mutable
LL | let mut v: Vec<isize> = vec![1, 2, 3];
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/xcrate/auxiliary/xcrate_unit_struct.rs b/tests/ui/xcrate/auxiliary/xcrate_unit_struct.rs
index 69ed498e7..4f8b35083 100644
--- a/tests/ui/xcrate/auxiliary/xcrate_unit_struct.rs
+++ b/tests/ui/xcrate/auxiliary/xcrate_unit_struct.rs
@@ -18,6 +18,11 @@ pub struct TupleStruct(pub usize, pub &'static str);
#[derive(Copy, Clone)]
pub struct StructWithFields {
+ pub foo: isize,
+}
+
+#[derive(Copy, Clone)]
+pub struct StructWithPrivFields {
foo: isize,
}
diff --git a/tests/ui/xcrate/xcrate-unit-struct.rs b/tests/ui/xcrate/xcrate-unit-struct.rs
index c99cf77ce..bc14cd8d4 100644
--- a/tests/ui/xcrate/xcrate-unit-struct.rs
+++ b/tests/ui/xcrate/xcrate-unit-struct.rs
@@ -8,5 +8,7 @@ extern crate xcrate_unit_struct;
fn main() {
let _ = xcrate_unit_struct::StructWithFields;
//~^ ERROR expected value, found struct `xcrate_unit_struct::StructWithFields`
+ let _ = xcrate_unit_struct::StructWithPrivFields;
+ //~^ ERROR expected value, found struct `xcrate_unit_struct::StructWithPrivFields`
let _ = xcrate_unit_struct::Struct;
}
diff --git a/tests/ui/xcrate/xcrate-unit-struct.stderr b/tests/ui/xcrate/xcrate-unit-struct.stderr
index cee314568..7365170b6 100644
--- a/tests/ui/xcrate/xcrate-unit-struct.stderr
+++ b/tests/ui/xcrate/xcrate-unit-struct.stderr
@@ -9,6 +9,17 @@ LL | let _ = xcrate_unit_struct::StructWithFields;
LL | pub struct StructWithFields {
| --------------------------- `xcrate_unit_struct::StructWithFields` defined here
-error: aborting due to previous error
+error[E0423]: expected value, found struct `xcrate_unit_struct::StructWithPrivFields`
+ --> $DIR/xcrate-unit-struct.rs:11:13
+ |
+LL | let _ = xcrate_unit_struct::StructWithPrivFields;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ ::: $DIR/auxiliary/xcrate_unit_struct.rs:25:1
+ |
+LL | pub struct StructWithPrivFields {
+ | ------------------------------- `xcrate_unit_struct::StructWithPrivFields` defined here
+
+error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0423`.
diff --git a/tests/ui/zero-sized/zero-sized-binary-heap-push.rs b/tests/ui/zero-sized/zero-sized-binary-heap-push.rs
index 6553c5adb..14cf6c203 100644
--- a/tests/ui/zero-sized/zero-sized-binary-heap-push.rs
+++ b/tests/ui/zero-sized/zero-sized-binary-heap-push.rs
@@ -1,7 +1,6 @@
// run-pass
#![allow(unused_variables)]
use std::collections::BinaryHeap;
-use std::iter::Iterator;
fn main() {
const N: usize = 8;
diff --git a/tests/ui/zero-sized/zero-sized-linkedlist-push.rs b/tests/ui/zero-sized/zero-sized-linkedlist-push.rs
index 03724085f..301f03110 100644
--- a/tests/ui/zero-sized/zero-sized-linkedlist-push.rs
+++ b/tests/ui/zero-sized/zero-sized-linkedlist-push.rs
@@ -1,6 +1,5 @@
// run-pass
use std::collections::LinkedList;
-use std::iter::Iterator;
fn main() {
const N: usize = 8;