diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2012-09-07 18:53:14 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2012-09-10 12:48:42 -0700 |
| commit | 22b875770543ec1fe93cfb35fd07c692db5675e2 (patch) | |
| tree | 62004747db05cf0fb7d82b85133210c67e2c7bb3 /src/libsyntax/attr.rs | |
| parent | 9a15c50f6c3cec5320ef91f000142af0367890a4 (diff) | |
| download | rust-22b875770543ec1fe93cfb35fd07c692db5675e2.tar.gz rust-22b875770543ec1fe93cfb35fd07c692db5675e2.zip | |
rustc: Make shape-based compare glue never called for comparison operators.
Only called for string patterns.
Diffstat (limited to 'src/libsyntax/attr.rs')
| -rw-r--r-- | src/libsyntax/attr.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libsyntax/attr.rs b/src/libsyntax/attr.rs index 9dc610e2fb6..a12233765ca 100644 --- a/src/libsyntax/attr.rs +++ b/src/libsyntax/attr.rs @@ -337,6 +337,13 @@ enum inline_attr { ia_never, } +impl inline_attr : cmp::Eq { + pure fn eq(&&other: inline_attr) -> bool { + (self as uint) == (other as uint) + } + pure fn ne(&&other: inline_attr) -> bool { !self.eq(other) } +} + /// True if something like #[inline] is found in the list of attrs. fn find_inline_attr(attrs: ~[ast::attribute]) -> inline_attr { // FIXME (#2809)---validate the usage of #[inline] and #[inline(always)] |
