Don't try to codegen static into an impl

Closes #194
This commit is contained in:
Alex Crichton
2018-05-11 08:28:09 -07:00
parent 06664b34ce
commit ca8809b4e9
3 changed files with 51 additions and 4 deletions

View File

@ -618,6 +618,14 @@ impl Import {
}
impl ImportKind {
pub fn fits_on_impl(&self) -> bool {
match *self {
ImportKind::Function(_) => true,
ImportKind::Static(_) => false,
ImportKind::Type(_) => false,
}
}
fn shared(&self) -> shared::ImportKind {
match *self {
ImportKind::Function(ref f) => shared::ImportKind::Function(f.shared()),