Can I use a Shimano XT 11-gear derailleur with a 10 ring cassette on a mountainbike?
10 and 11 speed systems are not compatible. The pull ratio of the shifters is different, as is the cog spacing of the clusters.

You may get away with some combinations of frankien-mixandmatch, but as the drive chain wears, the differences become more problematic. Ultimately, most find its not worth the problems it creates.