We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7374ae7 commit 4d9b253Copy full SHA for 4d9b253
compiler/rustc_middle/src/ty/relate.rs
@@ -221,15 +221,11 @@ impl<'tcx> Relate<'tcx> for abi::Abi {
221
222
impl<'tcx> Relate<'tcx> for ast::Constness {
223
fn relate<R: TypeRelation<'tcx>>(
224
- relation: &mut R,
+ _relation: &mut R,
225
a: ast::Constness,
226
b: ast::Constness,
227
) -> 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
- }
+ if a == b { Ok(a) } else { Ok(ast::Constness::NotConst) }
233
}
234
235
0 commit comments