In order to challenge a search at trial via an evidence suppression motion, the particular defendant has to have Fourth Amendment "standing"1 with respect to that search: Rakas v. Illinois, 439 U.S. 128 (1978).
From the syllabus:
Fourth Amendment rights are personal rights which ... may not be vicariously asserted ... a person aggrieved by an illegal search and seizure only through the introduction of damaging evidence secured by a search of a third person's premises or property has not had any of his Fourth Amendment rights infringed.
Subject to the various exemptions to the exclusionary rule discussed at this question, the evidence in your scenario would not be admissible against Bob, but would be admissible against Rob. This does not necessarily mean that Bob would go free. As noted in that other question, if police/prosecution have other evidence, independently gathered, or sufficiently attenuated from the illegal search, they may still have a case against Bob.
This also doesn't mean that an unconstitutional search of a person who will not even be prosecuted is without a remedy. See this answer for a discussion of civil remedies available for a person who has suffered an unconstitutional search.
1. The Court has distanced itself from the term "standing" in this context, so I am using it somewhat colloquially as it is still in common usage in this sense. The Court instead just conceives of whether the defendent even experienced a Fourth Amendment search; the notion of standing is either redundant with or subsumed by such analysis.