summaryrefslogtreecommitdiff
path: root/src/codegen/mod.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-02-13 16:09:29 -0800
committerGitHub <noreply@github.com>2017-02-13 16:09:29 -0800
commit696e2bb7970eac1520f828c5725f56ff1ebed576 (patch)
tree6082666b199935a18060ac74e499be828ed2f878 /src/codegen/mod.rs
parentc8f1855e31475876faa7f481a8b0ec606f4ed3dc (diff)
parent6d2f9073d04e26fea4f01283f1bfd80de21f8f5d (diff)
Auto merge of #510 - fitzgen:cleanup-ir-graph-traversal, r=emilio
Cleanup IR graph traversal This is a bunch of pre-cursor work to properly determining which template type parameters are actually used or not. First three commits are mechanical / code motion / renaming. Fourth is the meat of this PR, making a bunch of things more generic and introducing the concept of an `EdgeKind` in the IR graph. Last commit is just `cargo fmt`. r? @emilio
Diffstat (limited to 'src/codegen/mod.rs')
-rw-r--r--src/codegen/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs
index 99400f7a..b626fe34 100644
--- a/src/codegen/mod.rs
+++ b/src/codegen/mod.rs
@@ -12,13 +12,13 @@ use ir::derive::{CanDeriveCopy, CanDeriveDebug, CanDeriveDefault};
use ir::enum_ty::{Enum, EnumVariant, EnumVariantValue};
use ir::function::{Function, FunctionSig};
use ir::int::IntKind;
-use ir::item::{Item, ItemAncestors, ItemCanonicalName, ItemCanonicalPath};
+use ir::item::{Item, ItemAncestors, ItemCanonicalName, ItemCanonicalPath,
+ ItemSet};
use ir::item_kind::ItemKind;
use ir::layout::Layout;
use ir::module::Module;
use ir::objc::ObjCInterface;
use ir::ty::{Type, TypeKind};
-use ir::type_collector::ItemSet;
use ir::var::Var;
use std::borrow::Cow;
@@ -2190,7 +2190,7 @@ impl ToRustTy for Type {
.map(|arg| arg.to_rust_ty(ctx))
.collect::<Vec<_>>();
- path.segments.last_mut().unwrap().parameters = if
+ path.segments.last_mut().unwrap().parameters = if
template_args.is_empty() {
None
} else {