The habitats where three leaved rush~(Juncus trifidus) grows:

Alpine and subalpine calcareous grassland
High montane heath and snow bed
Lowland dry acid grassland
Montane dwarf shrub heath
Rocky slope
Scree
Upland calcareous grassland
Upland dry heath