Skip to content

Commit 4d9b253

Browse files
committed
Fix coerce-unify test
1 parent 7374ae7 commit 4d9b253

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

compiler/rustc_middle/src/ty/relate.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,11 @@ impl<'tcx> Relate<'tcx> for abi::Abi {
221221

222222
impl<'tcx> Relate<'tcx> for ast::Constness {
223223
fn relate<R: TypeRelation<'tcx>>(
224-
relation: &mut R,
224+
_relation: &mut R,
225225
a: ast::Constness,
226226
b: ast::Constness,
227227
) -> RelateResult<'tcx, ast::Constness> {
228-
if a == b || (a == ast::Constness::Const && b == ast::Constness::NotConst) {
229-
Ok(b)
230-
} else {
231-
Err(TypeError::ConstnessMismatch(expected_found(relation, a, b)))
232-
}
228+
if a == b { Ok(a) } else { Ok(ast::Constness::NotConst) }
233229
}
234230
}
235231

0 commit comments

Comments
 (0)