Let $f$ be Lebesgue-integrable on $[0,1]$. Suppose $\int_a^bf(x)\,dx=0$ for all $0\leq a\leq b\leq 1$. Show $\int_Af(x)\,dx=0$ for every measurable subset $A$ of $[0,1]$.
*Let $A$ be a measurable subset of $[0,1]$. Then $A$ can be written as the union of disjoint, countable? intervals. Since $\int_a^bf(x)\,dx=0$ for all $0\leq a\leq b\leq 1$, each integral of $f$ over each interval is $0$ so $\int_Af(x)\,dx=0$.
I'm not sure if I did it right...
The Lebesgue measure is regular, and in particular outer regular. Therefore there exists a sequence $(O_n)$ of open measurable sets containing $A$ such that $\lambda(A)=\inf \lambda(O_n)$.
Then $\displaystyle \int_A f(x)\, \mathrm{d}x=\int_{O_n} f(x)\, \mathrm{d}x - \int_{O_n - A} f(x)\, \mathrm{d}x$.
Since $O_n$ is an open set of $\mathbb{R}$, it is a countable union of open intervals and $\int_{O_n} f(x)\, \mathrm{d}x=0$. By dominated convergence you can show that $\int_{O_n - A} f(x)\, \mathrm{d}x \to 0$: use the sequence of functions $f1_{O_n-A}$ dominated by $|f|$.