There's no refactoring for this, however, when you click that error in Messages, the Source Editor is focused on the relevant line and Ctrl+Y deletes it.
If it is the only one error, you don't even have to click Messages, Source Editor is focused and Ctrl+Y is enough.