The Mishna says that if one makes a Succah in a tree, it is kasher but one cannot use it on yom tov because there is an issur to climb up a tree on yom tov. The Sefas Emes points out that it would even be assur to climb the tree before yom tov and wait until yom tov starts. He proves that it would be a violation from the fact that R. Yehuda considers a Succah in a tree not fit for the 7 days of Succos. If it were possible to go up before yom tov, it should be considered fit for 7 days to at least use on chol hamoed.
Rashi writes that in addition to one using it on chol hamoed, if one used it on yom tov b'issur, they would fulfill their mitzvah of Succah. The Pri Megadim points out that this should be a mitzvah haba'ah b'aveira since the mitzvah is completely contingent on doing the aveirah. In my sefer, I pointed out that this Rashi may hold that there is no problem of mitzvah haba'ah ba'aveira when the aveira is only d'rabonon. Otherwise, it is very difficult to understands why one would be yotzei. Perhaps Rashi means to say that on a d'rabonon level it would be a mitzvah haba'ah ba'aveira, but on a d'oraysa level there is no aveira, therefore m'drabonon one is not yotzei, but m'doraysa one would be yotzei. The Mishna Berura (628:3) cites a machlokes between the pri megadim and bikurei yaakov whether one should use such a Succah if that is all they have. The Pri Megadim entertains that one can use the Succah to fulfill the mitzvah d'oraysa, whereas the bikurei yaakov says that the chachamim uprooted the mitzvah בשב ואל תעשה, which they have the authority to do. According to the Pri Megadim that one should actually use such a Succah to fulfill the d'oraysa, we can understand that Rashi means to say that one is yotzei m'doraysa, just not m'drabonon.