There has been a not-insignificant boost that Bernie has gotten, I think, from Trump and his antics. I mean, first of all -- and this really may be the most salient point I'll make -- Trump has actually put in the good word for Bernie on numerous occasions. No, the two aren't anything alike, and I won't be caught dead drawing ridiculous comparisons between the populism that backs each, or their extremities as candidates, or their 'outsider-hood'; that's surface level shit that I think obscures the more impactful stuff that could help Bernie win which Trump has unknowingly done, or done as a calculated risk. But, anyway, like I said Trump has, more than a couple times, underscored how poorly Bernie has been treated. I honestly believe that Trump has, up until recently, seen Bernie as a candidate who had no chance of winning, so he felt free to discuss how the DNC dealt with him, how Hilary dealt with him, how unfair the Warren attack was, or how the media has worked to hide him. Some of these things actually *are* things Trump saw during his rise; remember, it took the Republicans a long time before they kind-of-sort-of got in line and supported him, and during that time he was knocking down their establishment favorites one-by-one. His populism was both a shield and a weapon, and of course, he rallied his 'troops' under the banner of "The system is rigged." That bit may actually sound pretty familiar.
Hilariously? This may be a big part of the thing that topples his Presidency. Bernie is starting to appear like an "independent option" for even those who would vote R, but just ... can't. And it's in part, I feel, because Trump has never put his sights on him -- he's been allowed to walk and talk at the same time without any of the really nasty hit jobs Trump has conjured for others. Now, should Bernie be the nominee, of course the major attacks will begin, but I actually feel it'd be too late: Trump has done enough to bolster Bernie and paint him as an enemy of establishment, and a sometimes friend in a weird way. He's at least painted him as trustworthy.
Bernie's chances are looking far better this time around, and, to TLDR all of this: I'd say that's in part due to Trump. That's not to say they are buddies or something; Bernie is nearly the complete opposite in every way that matters, but I wouldn't be surprised if he does turn out to be the nominee and, God willing, he wins in the general, we might be able to trace a logical line through his candidacy that reflects some of Trump's rise. And we'll spot more than a few openings that Trump, in his inane stupidity, opened up himself.