Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ir: Cleanup name duplication in aliases and named types. #461

Merged
merged 1 commit into from
Jan 30, 2017

Conversation

emilio
Copy link
Contributor

@emilio emilio commented Jan 30, 2017

It's just dumb.

r? @fitzgen

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! r=me

_ => false,
}
}

/// Creates a new named type, with name `name`.
pub fn named(name: String) -> Self {
assert!(!name.is_empty());
// TODO: stop duplicating the name, it's stupid.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hehehe

@@ -143,17 +127,15 @@ impl Type {
TypeKind::BlockPointer |
TypeKind::Int(..) |
TypeKind::Float(..) |
TypeKind::Named(..) => true,
TypeKind::Named => true,
_ => false,
}
}

/// Creates a new named type, with name `name`.
pub fn named(name: String) -> Self {
assert!(!name.is_empty());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be good to assert about identifiers like we now do in codegen here as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, the point is that invalid identifiers may come here, we just don't want to generate code for them. It'd be good if they didn't, but more work needs to happen so that's true.

@emilio
Copy link
Contributor Author

emilio commented Jan 30, 2017

@bors-servo r=fitzgen

@bors-servo
Copy link

📌 Commit a46971c has been approved by fitzgen

@bors-servo
Copy link

⚡ Test exempted - status

@bors-servo bors-servo merged commit a46971c into rust-lang:master Jan 30, 2017
bors-servo pushed a commit that referenced this pull request Jan 30, 2017
ir: Cleanup name duplication in aliases and named types.

It's just dumb.

r? @fitzgen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants