Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
6dea155
No need to validate_alias_bound_self_from_param_env in assemble_alias…
compiler-errors Feb 3, 2024
31478cd
Add more tests
oli-obk Feb 20, 2024
66bd645
test that we do not support higher-ranked regions in opaque type infe…
aliemjay Aug 15, 2022
00234f0
Fix typo in serialized.rs
eltociear Feb 21, 2024
5c9d580
Tiny simplification
Nadrieril Feb 19, 2024
a181bdc
Introduce `TestCase` enum to replace most matching on `PatKind`
Nadrieril Feb 10, 2024
b1a0607
Process bindings and ascriptions in `MatchPair::new()`
Nadrieril Feb 20, 2024
0610f59
Inline `simplify_match_pair`
Nadrieril Feb 20, 2024
326b44e
Fix panic when compiling `Rocket`.
nnethercote Feb 22, 2024
02423a5
Make some `IntoDiagnostic` impls generic.
nnethercote Feb 22, 2024
c276af2
Fix typo in metadata.rs doc comment
jrudolph Feb 22, 2024
7921ce3
`DefId` to `LocalDefId`
lcnr Feb 22, 2024
9e016a8
Avoid emitting type mismatches against `{type error}`
oli-obk Feb 22, 2024
a2a6e47
Add new maintainers to nto-qnx.md
jonathanpallant Feb 22, 2024
e3021eb
Preserve the `Span` from `prove_predicate` all the way to registering…
oli-obk Feb 22, 2024
e4622e0
`report_mismatch` did not actually report anymore
oli-obk Feb 22, 2024
1efb747
Remove some annotations that just specify the default
oli-obk Feb 22, 2024
702225e
Rollup merge of #120598 - compiler-errors:no-rigid-check, r=lcnr
matthiaskrgr Feb 22, 2024
379ef9b
Rollup merge of #121386 - oli-obk:no_higher_ranked_opaques, r=lcnr
matthiaskrgr Feb 22, 2024
5a87e13
Rollup merge of #121393 - Nadrieril:match-lowering-testcase, r=matthe…
matthiaskrgr Feb 22, 2024
47bf8a6
Rollup merge of #121401 - eltociear:patch-25, r=nnethercote
matthiaskrgr Feb 22, 2024
01ec4eb
Rollup merge of #121427 - nnethercote:fix-Rocket, r=oli-obk
matthiaskrgr Feb 22, 2024
e064bf6
Rollup merge of #121439 - jrudolph:patch-1, r=bjorn3
matthiaskrgr Feb 22, 2024
5401098
Rollup merge of #121441 - lcnr:typesystem-cleanup, r=compiler-errors
matthiaskrgr Feb 22, 2024
4537e6d
Rollup merge of #121452 - jonathanpallant:patch-1, r=Amanieu
matthiaskrgr Feb 22, 2024
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
Prev Previous commit
Next Next commit
report_mismatch did not actually report anymore
  • Loading branch information
oli-obk committed Feb 22, 2024
commit e4622e0608a24c796dede1ff839ada61fa145a54
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/region_infer/opaque_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
if prev.ty != ty {
let guar = ty.error_reported().err().unwrap_or_else(|| {
let (Ok(e) | Err(e)) = prev
.report_mismatch(
.build_mismatch_error(
&OpaqueHiddenType { ty, span: concrete_type.span },
opaque_type_key.def_id,
infcx.tcx,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir_analysis/src/check/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ fn sanity_check_found_hidden_type<'tcx>(
} else {
let span = tcx.def_span(key.def_id);
let other = ty::OpaqueHiddenType { ty: hidden_ty, span };
Err(ty.report_mismatch(&other, key.def_id, tcx)?.emit())
Err(ty.build_mismatch_error(&other, key.def_id, tcx)?.emit())
}
}

Expand Down
12 changes: 7 additions & 5 deletions compiler/rustc_hir_analysis/src/collect/type_of/opaque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub(super) fn find_opaque_ty_constraints_for_impl_trait_in_assoc_type(
if !hidden.ty.references_error() {
for concrete_type in locator.typeck_types {
if concrete_type.ty != tcx.erase_regions(hidden.ty) {
if let Ok(d) = hidden.report_mismatch(&concrete_type, def_id, tcx) {
if let Ok(d) = hidden.build_mismatch_error(&concrete_type, def_id, tcx) {
d.emit();
}
}
Expand Down Expand Up @@ -135,7 +135,7 @@ pub(super) fn find_opaque_ty_constraints_for_tait(tcx: TyCtxt<'_>, def_id: Local
if !hidden.ty.references_error() {
for concrete_type in locator.typeck_types {
if concrete_type.ty != tcx.erase_regions(hidden.ty) {
if let Ok(d) = hidden.report_mismatch(&concrete_type, def_id, tcx) {
if let Ok(d) = hidden.build_mismatch_error(&concrete_type, def_id, tcx) {
d.emit();
}
}
Expand Down Expand Up @@ -289,7 +289,7 @@ impl TaitConstraintLocator<'_> {
if let Some(prev) = &mut self.found {
if concrete_type.ty != prev.ty {
let (Ok(guar) | Err(guar)) = prev
.report_mismatch(&concrete_type, self.def_id, self.tcx)
.build_mismatch_error(&concrete_type, self.def_id, self.tcx)
.map(|d| d.emit());
prev.ty = Ty::new_error(self.tcx, guar);
}
Expand Down Expand Up @@ -364,7 +364,7 @@ pub(super) fn find_opaque_ty_constraints_for_rpit<'tcx>(
);
if let Some(prev) = &mut hir_opaque_ty {
if concrete_type.ty != prev.ty {
if let Ok(d) = prev.report_mismatch(&concrete_type, def_id, tcx) {
if let Ok(d) = prev.build_mismatch_error(&concrete_type, def_id, tcx) {
d.stash(
tcx.def_span(opaque_type_key.def_id),
StashKey::OpaqueHiddenTypeMismatch,
Expand Down Expand Up @@ -441,7 +441,9 @@ impl RpitConstraintChecker<'_> {
debug!(?concrete_type, "found constraint");

if concrete_type.ty != self.found.ty {
if let Ok(d) = self.found.report_mismatch(&concrete_type, self.def_id, self.tcx) {
if let Ok(d) =
self.found.build_mismatch_error(&concrete_type, self.def_id, self.tcx)
{
d.emit();
}
}
Expand Down
8 changes: 5 additions & 3 deletions compiler/rustc_hir_typeck/src/writeback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -589,9 +589,11 @@ impl<'cx, 'tcx> WritebackCx<'cx, 'tcx> {
&& last_opaque_ty.ty != hidden_type.ty
{
assert!(!self.fcx.next_trait_solver());
if let Ok(d) =
hidden_type.report_mismatch(&last_opaque_ty, opaque_type_key.def_id, self.tcx())
{
if let Ok(d) = hidden_type.build_mismatch_error(
&last_opaque_ty,
opaque_type_key.def_id,
self.tcx(),
) {
d.stash(
self.tcx().def_span(opaque_type_key.def_id),
StashKey::OpaqueHiddenTypeMismatch,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ pub struct OpaqueHiddenType<'tcx> {
}

impl<'tcx> OpaqueHiddenType<'tcx> {
pub fn report_mismatch(
pub fn build_mismatch_error(
&self,
other: &Self,
opaque_def_id: LocalDefId,
Expand Down