2. If $f(x)=\frac{1}{x}$ has a domain $A$, and $g(x)=f(x+1)-f(x)$ has a domain $B$, then ( ).
(A) $A \cup B=\mathbf{R}$
(B) $A \supsetneqq B$
(C) $A \subseteq B$
(D) $A \cap B=\varnothing$
2. B.

From the problem, we know
$$
A=\{x \mid x \neq 0\}, B=\{x \mid x \neq 0 \text { and } x \neq 1\} \text {. }
$$