# Change Log
All notable changes to this project will be documented in this file.
+## 0.0.171
+* Rustup to *rustc 1.23.0-nightly (ff0f5de3b 2017-11-14)*
+
## 0.0.170
* Rustup to *rustc 1.23.0-nightly (d6b06c63a 2017-11-09)*
[package]
name = "clippy"
-version = "0.0.170"
+version = "0.0.171"
authors = [
"Manish Goregaokar <manishsmail@gmail.com>",
"Andre Bogus <bogusandre@gmail.com>",
[dependencies]
# begin automatic update
-clippy_lints = { version = "0.0.170", path = "clippy_lints" }
+clippy_lints = { version = "0.0.171", path = "clippy_lints" }
# end automatic update
cargo_metadata = "0.2"
regex = "0.2"
use rustc::session::Session;
use rustc::traits;
use rustc::ty::{self, Ty, TyCtxt};
-use rustc::mir::transform::MirSource;
use rustc_errors;
use std::borrow::Cow;
use std::env;
pub fn in_constant(cx: &LateContext, id: NodeId) -> bool {
let parent_id = cx.tcx.hir.get_parent(id);
- match MirSource::from_node(cx.tcx, parent_id) {
- MirSource::GeneratorDrop(_) | MirSource::Fn(_) => false,
- MirSource::Const(_) | MirSource::Static(..) | MirSource::Promoted(..) => true,
+ match cx.tcx.hir.body_owner_kind(parent_id) {
+ hir::BodyOwnerKind::Fn => false,
+ hir::BodyOwnerKind::Const | hir::BodyOwnerKind::Static(..) => true,
}
}