Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 9 pull requests #106209

Merged
merged 21 commits into from
Dec 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
321247d
Share testing utilities with non-btree test cases
ssomers Feb 18, 2022
204f854
Slightly tighten leak-on-panic test cases
ssomers Feb 18, 2022
a80e685
Test leaking of BinaryHeap Drain iterators
ssomers Feb 18, 2022
b473bc9
Remove `iter::Empty` hack
Nov 3, 2022
3b8b0ac
Fix unused_must_use warning for Box::from_raw
noeddl Nov 5, 2022
70bba3b
rustdoc: Fix backoff doc to match implementation
jonasspinner Nov 22, 2022
5e44a65
Implement allow-by-default multiple_supertrait_upcastable lint
nbdd0121 Dec 9, 2022
b656e24
Add tests
nbdd0121 Dec 9, 2022
6d332c4
Fix `core::any` mod-level docs
albertlarsan68 Dec 27, 2022
05e8ba1
Account for `match` expr in single line
estebank Dec 6, 2022
50c1be1
Emit fewer errors on invalid `#[repr(transparent)]` on `enum`
estebank Dec 28, 2022
605ad65
Remove some totally duplicated files
compiler-errors Dec 28, 2022
dc98aa6
Rollup merge of #94145 - ssomers:binary_heap_tests, r=jyn514
fee1-dead Dec 28, 2022
d1193ad
Rollup merge of #103945 - H4x5:remove-iter-empty-hack, r=compiler-errors
fee1-dead Dec 28, 2022
58233e9
Rollup merge of #104024 - noeddl:unused-must-use, r=compiler-errors
fee1-dead Dec 28, 2022
0818ba4
Rollup merge of #104708 - jonasspinner:fix-backoff-doc-to-match-imple…
fee1-dead Dec 28, 2022
ade9605
Rollup merge of #105347 - estebank:single-line-match, r=compiler-errors
fee1-dead Dec 28, 2022
8b3d0c4
Rollup merge of #105484 - nbdd0121:upcast, r=compiler-errors
fee1-dead Dec 28, 2022
45d6f02
Rollup merge of #106184 - albertlarsan68:docs-106154, r=Nilstrieb
fee1-dead Dec 28, 2022
f837da7
Rollup merge of #106201 - estebank:verbose-transparent, r=compiler-er…
fee1-dead Dec 28, 2022
5e9c91c
Rollup merge of #106205 - compiler-errors:oopsy, r=fee1-dead
fee1-dead Dec 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions compiler/rustc_feature/src/active.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ declare_features! (
(active, intrinsics, "1.0.0", None, None),
/// Allows using `#[lang = ".."]` attribute for linking items to special compiler logic.
(active, lang_items, "1.0.0", None, None),
/// Allows the `multiple_supertrait_upcastable` lint.
(active, multiple_supertrait_upcastable, "CURRENT_RUSTC_VERSION", None, None),
/// Allows using `#[omit_gdb_pretty_printer_section]`.
(active, omit_gdb_pretty_printer_section, "1.5.0", None, None),
/// Allows using `#[prelude_import]` on glob `use` items.
Expand Down
6 changes: 2 additions & 4 deletions compiler/rustc_hir_analysis/src/check/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1060,10 +1060,8 @@ pub(super) fn check_transparent<'tcx>(tcx: TyCtxt<'tcx>, adt: ty::AdtDef<'tcx>)

if adt.variants().len() != 1 {
bad_variant_count(tcx, adt, tcx.def_span(adt.did()), adt.did());
if adt.variants().is_empty() {
// Don't bother checking the fields. No variants (and thus no fields) exist.
return;
}
// Don't bother checking the fields.
return;
}

// For each field, figure out if it's known to be a ZST and align(1), with "known"
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_infer/src/infer/error_reporting/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -729,15 +729,15 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
format!("this and all prior arms are found to be of type `{}`", t),
);
}
let outer_error_span = if any_multiline_arm {
let outer = if any_multiline_arm || !source_map.is_multiline(cause.span) {
// Cover just `match` and the scrutinee expression, not
// the entire match body, to reduce diagram noise.
cause.span.shrink_to_lo().to(scrut_span)
} else {
cause.span
};
let msg = "`match` arms have incompatible types";
err.span_label(outer_error_span, msg);
err.span_label(outer, msg);
self.suggest_remove_semi_or_return_binding(
err,
prior_arm_block_id,
Expand Down
Loading