fix dedup

This commit is contained in:
Esteban Küber
2019-07-31 14:13:00 -07:00
parent 9e59d744ac
commit 22ea38dd79

View File

@@ -300,8 +300,8 @@ impl<'a, 'b> Context<'a, 'b> {
let (mut refs, spans): (Vec<_>, Vec<_>) = refs.unzip();
// Avoid `invalid reference to positional arguments 7 and 7 (there is 1 argument)`
// for `println!("{7:7$}", 1);`
refs.dedup();
refs.sort();
refs.dedup();
let (arg_list, mut sp) = if refs.len() == 1 {
let spans: Vec<_> = spans.into_iter().filter_map(|sp| sp.map(|sp| *sp)).collect();
(