diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-02-13 16:09:29 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-13 16:09:29 -0800 |
commit | 696e2bb7970eac1520f828c5725f56ff1ebed576 (patch) | |
tree | 6082666b199935a18060ac74e499be828ed2f878 /src/codegen/mod.rs | |
parent | c8f1855e31475876faa7f481a8b0ec606f4ed3dc (diff) | |
parent | 6d2f9073d04e26fea4f01283f1bfd80de21f8f5d (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.rs | 6 |
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 { |