Rename TypeckTables to TypeckResults.

This commit is contained in:
Valentin Lazureanu
2020-07-17 08:47:04 +00:00
parent 62db617e40
commit 5a20489c5c
103 changed files with 471 additions and 424 deletions

View File

@@ -37,8 +37,8 @@ struct OperandInfo {
}
fn analyze_operand(operand: &Expr<'_>, cx: &LateContext<'_>, expr: &Expr<'_>) -> Option<OperandInfo> {
match constant(cx, cx.tables(), operand) {
Some((Constant::Int(v), _)) => match cx.tables().expr_ty(expr).kind {
match constant(cx, cx.typeck_results(), operand) {
Some((Constant::Int(v), _)) => match cx.typeck_results().expr_ty(expr).kind {
ty::Int(ity) => {
let value = sext(cx.tcx, v, ity);
return Some(OperandInfo {
@@ -106,7 +106,7 @@ fn check_const_operands<'tcx>(
}
fn check_non_const_operands<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, operand: &Expr<'_>) {
let operand_type = cx.tables().expr_ty(operand);
let operand_type = cx.typeck_results().expr_ty(operand);
if might_have_negative_value(operand_type) {
span_lint_and_then(
cx,