cargo is looking for a file with the exact name of main.rs. You can probably just rename bar.rs to main.rs in your example and run it with cargo r --example multi-file-example.
Btw, this requirement is described in the docs link you posted - it's in the paragraph under the bullet points. It also applies to the src/bin, benches, and tests directories, so you can have multi-file directories in those places too.