]> git.lizzy.rs Git - rust.git/commit
Auto merge of #88681 - ehuss:duplicate-attributes, r=petrochenkov
authorbors <bors@rust-lang.org>
Mon, 22 Nov 2021 02:15:25 +0000 (02:15 +0000)
committerbors <bors@rust-lang.org>
Mon, 22 Nov 2021 02:15:25 +0000 (02:15 +0000)
commitf7c48297ce21ac0dc5b36ff730377bdb7be6ece4
tree304ae03b96b6d7f179e5831754425f729242b32f
parentcebd2dda1d9071f2209079370c412f4ef9ef2b82
parent36dcd4cbd9a455707f2b790e01fbdc38a86d5e9b
Auto merge of #88681 - ehuss:duplicate-attributes, r=petrochenkov

Check for duplicate attributes.

This adds some checks for duplicate attributes. In many cases, the duplicates were being ignored without error or warning. This adds several kinds of checks (see `AttributeDuplicates` enum).

The motivation here is to issue unused warnings with similar reasoning for any unused lint, and to error for cases where there are conflicts.

This also adds a check for empty attribute lists in a few attributes where this causes the attribute to be ignored.

Closes #55112.
compiler/rustc_typeck/src/collect.rs