use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use rustc_span::source_map::Spanned;
+use rustc_span::sym;
declare_clippy_lint! {
/// **What it does:** Checks for using `x.get(x.len() - 1)` instead of
// Argument 0 (the struct we're calling the method on) is a vector
if let Some(struct_calling_on) = args.get(0);
- let struct_ty = cx.tables().expr_ty(struct_calling_on);
- if is_type_diagnostic_item(cx, struct_ty, sym!(vec_type));
+ let struct_ty = cx.typeck_results().expr_ty(struct_calling_on);
+ if is_type_diagnostic_item(cx, struct_ty, sym::vec_type);
// Argument to "get" is a subtraction
if let Some(get_index_arg) = args.get(1);