-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Move various checks to typeck so them failing causes the typeck result to get tainted #96046
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
Changes from all commits
31e0bf7
cb886cc
0fdaaad
0d88631
ac6b708
d5ffe11
46a2342
6ba8da6
4332c2f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,8 +149,6 @@ pub enum InvalidProgramInfo<'tcx> { | |
/// (which unfortunately typeck does not reject). | ||
/// Not using `FnAbiError` as that contains a nested `LayoutError`. | ||
FnAbiAdjustForForeignAbi(call::AdjustForForeignAbiError), | ||
/// An invalid transmute happened. | ||
TransmuteSizeDiff(Ty<'tcx>, Ty<'tcx>), | ||
|
||
/// SizeOf of unsized type was requested. | ||
SizeOfUnsizedType(Ty<'tcx>), | ||
} | ||
|
@@ -166,11 +164,6 @@ impl fmt::Display for InvalidProgramInfo<'_> { | |
} | ||
Layout(ref err) => write!(f, "{}", err), | ||
FnAbiAdjustForForeignAbi(ref err) => write!(f, "{}", err), | ||
TransmuteSizeDiff(from_ty, to_ty) => write!( | ||
f, | ||
"transmuting `{}` to `{}` is not possible, because these types do not have the same size", | ||
from_ty, to_ty | ||
), | ||
SizeOfUnsizedType(ty) => write!(f, "size_of called on unsized type `{}`", ty), | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -273,6 +273,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> { | |
error: &SelectionError<'tcx>, | ||
fallback_has_occurred: bool, | ||
) { | ||
self.set_tainted_by_errors(); | ||
|
||
let tcx = self.tcx; | ||
let mut span = obligation.cause.span; | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.