Better error for non const PartialEq
call generated by match
This commit is contained in:
parent
ed7281e784
commit
89c24af133
35 changed files with 211 additions and 100 deletions
|
@ -271,6 +271,18 @@ pub struct RawBytesNote {
|
|||
pub bytes: String,
|
||||
}
|
||||
|
||||
// FIXME(fee1-dead) do not use stringly typed `ConstContext`
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(const_eval_match_eq_non_const, code = "E0015")]
|
||||
#[note]
|
||||
pub struct NonConstMatchEq<'tcx> {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
pub ty: Ty<'tcx>,
|
||||
pub kind: ConstContext,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(const_eval_for_loop_into_iter_non_const, code = "E0015")]
|
||||
pub struct NonConstForLoopIntoIter<'tcx> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue