diff options
| author | Chris Wong <lambda.fairy@gmail.com> | 2016-07-03 15:24:27 +1200 |
|---|---|---|
| committer | Chris Wong <lambda.fairy@gmail.com> | 2016-08-31 18:54:19 +1200 |
| commit | 42b75a5c18463b4fef98267663fab13d265eac3e (patch) | |
| tree | c6fee17c4ff63cdc07071354c6316907ef5ef084 /src/libsyntax | |
| parent | eac41469d778d18ae7bf38fa917ed0fe122f944b (diff) | |
| download | rust-42b75a5c18463b4fef98267663fab13d265eac3e.tar.gz rust-42b75a5c18463b4fef98267663fab13d265eac3e.zip | |
Warn about multiple conflicting #[repr] hints
Closes #34622
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/attr.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libsyntax/attr.rs b/src/libsyntax/attr.rs index 6060ff529f2..703f3f7adf9 100644 --- a/src/libsyntax/attr.rs +++ b/src/libsyntax/attr.rs @@ -904,9 +904,8 @@ pub fn find_repr_attrs(diagnostic: &Handler, attr: &Attribute) -> Vec<ReprAttr> } }; - match hint { - Some(h) => acc.push(h), - None => { } + if let Some(h) = hint { + acc.push(h); } } else { span_err!(diagnostic, item.span, E0553, |
