Rat snakes usually do not harm other snakes or eat other snakes including rattlesnakes.
Actually rat snakes and rattlesnakes tend to get along just fine with each other and they tend to hibernate with each other as well.
Black racer snakes do tend to eat some rattlesnakes though but most rat snakes just leave the rattlesnakes alone and will hibernate up with each other as well.
During the cold months they will usually go into the same spaces together to stay warm and stay there until the weather warms back up.
There is a type of snake though that will eat rattlesnakes and that snake is the kingsnake (Lampropeltis getula) which are very notorious ophiophages and will easily consume a rattlesnake when they get near one.