I was robbed at gunpoint in Rio de Janeiro last year. Unfortunately, this is extremely common in Rio. Even scarier are express kidnappings where they hold you for several hours while they withdraw your daily limit from the ATM.
With that said, I still love Rio and encourage other travelers to go there every chance I get. I think the situation would have to get very bad in Rio before people stopped visiting.