Carrying a bike lock while cycling can be a hassle, which is why some companies have started developing built-in locks. One of the latest, the Frameblock, is actually part of the frame. That way, if a thief cuts through it, they're left with a damaged bike that they won't want ... a fact that they'll hopefully realize before cutting it.
The Frameblock was created by Italian designer Matteo Diego Caldiroli and the concept is being marketed via his business, Milano Bike. As can be seen, part of the bike's frame consists of a rubber-coated steel cable lock. Its two free ends are anchored to a receptacle on the frame while riding, but are then then disconnected and locked around an adjacent immovable object when the bike is parked.
Although it looks like the frame's structural integrity wouldn't be greatly affected by cutting through the 10 mm-thick cable, the unremovable nature of the lock would result in a permanently hacked-up-looking bike, which had obviously been stolen.
Caldiroli is proposing that Frameblock-equipped bikes would be sold with an included anti-theft insurance policy.
For another example of a bike with a frame that becomes a lock, check out the one-off Yerka Project bike.