diff --git a/pyupgrade.py b/pyupgrade.py
index c7a8d26..2f8626c 100644
--- a/pyupgrade.py
+++ b/pyupgrade.py
@@ -233,6 +233,8 @@ def _victims(tokens, start, arg, gen):
                 ends.extend((i - 1, i))
             else:
                 ends.append(i)
+            if len(brace_stack) > 1 and tokens[i + 1].src == ',':
+                ends.append(i + 1)
 
         if is_end_brace:
             brace_stack.pop()
@@ -245,9 +247,9 @@ def _victims(tokens, start, arg, gen):
         while tokens[i].name in NON_CODING_TOKENS:
             i -= 1
         if tokens[i].src == ',':
-            ends = sorted(set(ends + [i]))
+            ends.append(i)
 
-    return Victims(starts, ends, first_comma_index, arg_index)
+    return Victims(starts, sorted(set(ends)), first_comma_index, arg_index)
 
 
 def _find_token(tokens, i, token):  # type: (List[Token], int, Token) -> int

diff --git a/tests/set_literals_test.py b/tests/set_literals_test.py
index 22ac4d6..50363be 100644
--- a/tests/set_literals_test.py
+++ b/tests/set_literals_test.py
@@ -85,6 +85,16 @@ def test_fix_sets_noop(s):
             '    x for x in y\n'
             '}',
         ),
+        (
+            'set(\n'
+            '    [\n'
+            '        99, 100,\n'
+            '    ],\n'
+            ')\n',
+            '{\n'
+            '        99, 100,\n'
+            '}\n',
+        ),
     ),
 )
 def test_sets(s, expected):

`set` with trailing comma after list causes syntax error
```python
set(
    [
        1, 2, 3,
    ],
)
```

currently gets rewritten to (`SyntaxError`)

```python
{
        1, 2, 3,
    ,
}
```
tests/set_literals_test.py::test_sets[set(\n
tests/set_literals_test.py::test_fix_sets_noop[set()] tests/set_literals_test.py::test_fix_sets_noop[set((\n))] tests/set_literals_test.py::test_fix_sets_noop[set tests/set_literals_test.py::test_sets[set(())-set()] tests/set_literals_test.py::test_sets[set([])-set()] tests/set_literals_test.py::test_sets[set(( tests/set_literals_test.py::test_sets[set((1, tests/set_literals_test.py::test_sets[set([1, tests/set_literals_test.py::test_sets[set(x tests/set_literals_test.py::test_sets[set([x tests/set_literals_test.py::test_sets[set((x tests/set_literals_test.py::test_sets[set(((1, tests/set_literals_test.py::test_sets[set((a, tests/set_literals_test.py::test_sets[set([(1, tests/set_literals_test.py::test_sets[set([((1, tests/set_literals_test.py::test_sets[set((((1, tests/set_literals_test.py::test_sets[set(\n(1, tests/set_literals_test.py::test_sets[set((\n1,\n2,\n))\n-{\n1,\n2,\n}\n] tests/set_literals_test.py::test_sets[set((frozenset(set((1, tests/set_literals_test.py::test_sets[set((1,))-{1}]