NOT even a fortnight has passed since Theresa May announced she would be resigning as Prime Minister and already it’s almost as if she had never occupied10 Downing Street.

I suppose she’ll pop up now and again during US President Donald Trump’s state visit, but he will be much more interested in making his number with the Queen.

It all shows, no doubt, how May will leave scarcely a mark on history either. Brexit, the main business of her premiership, has been a catalogue of failure. But there is one way she did make an impression on the life of the country, and over an extended period, dating back to when she became home secretary in 2010. She was the longest-serving politician in that job and she took the centrepiece of her policies along with her when she moved onwards and upwards to head the Tory government.

I refer of course to her hostility towards immigration. Apart from the malign Brexit, it was the only matter in the whole range of official business that ever held her attention. She gave the occasional speech hinting at wider ambitions, quite liberal ones too, but her always-illiberal attitude on migrants was the single constant priority.

Without her stone-faced vindictiveness towards foreigners while she was at the Home Office, as the threat to the Tories from Ukip loomed, this deeply unpleasant woman would probably never have become Prime Minister. She added the phrase “hostile environment” to the political language of our time, and it was not just phrase-making either. She gave real grief to anybody threatened with deportation, some of them people who had done nothing at all wrong – such as the Caribbean migrants innocently caught up in the Windrush fiasco, long-time residents of the UK invited her 60 years ago to fill gaps in our labour market.

This newspaper has regularly chronicled the cruel mistreatment of inoffensive and hard-working families who often did not even know they had broken the law till they got a letter from the Home Office telling them to leave the UK, on the allegation they had broken some obscure rule that might well have been changed without their knowledge.

May’s stranglehold on immigration policy for those nine years, even beyond her time at the Home Office, also shut out new thinking on the issue. The international tide of migrants has risen enormously during the present decade and was bound to have an impact on the host communities. Europeans needed to respond, which they have done in varying degrees of generosity, the Nordic nations at the nice end of the spectrum, the Slavic nations at the nasty end. The UK might have set everyone an example, because we had been absorbing waves of migrants since the end of the Second World War. But our contribution to a common approach has been nil, except to say we would make none.

Instead, May set a target for reducing net migration into the UK to below 100,000 a year. In the event, that has turned out to be hopelessly unrealistic. Not once since 2010 has the target been met, and in most years it has been exceeded two or three times over. A policy that has proved impossible to implement for so long is, surely, a failed policy.

It still made no difference to the Prime Minister who, in what we can now recognise as her normal fall-back position, stuck rigidly to the unrealistic stance she first espoused. She might even have thought it was helping her with Brexit. The more that English nationalists perceived themselves as overrun by foreigners, the more they were likely to want out of the EU. But short of an actual Brexit, it is the Brexit Party that has cashed in.

May was particularly intransigent over details which seemed absurd to anybody beyond her own bubble – to academic analysts, to businesses in need of key workers, indeed to some members of her Cabinet.

For example, she insisted that students from overseas should be included in her targeting, even if by their nature many were strictly temporary residents in the UK. And even if they weren’t, and wanted to stay on after they qualified, it was hard to see them as harmful to the country. They would be repaying some of the intellectual and economic capital they had acquired from us, and if they got a job they would normally be supplying a skill shortage.

But May would have none of this. The sole good she has done this UK that brings tears to her eyes is to show beyond a doubt that it cannot operate an anti-immigrant policy any more than it can renounce free trade.

In the end it is a country unable even to feed its 60 million citizens out of its own agriculture, so it needs to look elsewhere for food supplies and to offer goods and services in exchange for them. Nowadays this is more a matter of services than of goods, produced in greatest and most money-making volume in the City of London. But London is a global market place which cannot exclude foreigners, or else it dies.

For different reasons, a similar argument applies to Scotland. We need migrants to counter the decline of the economically active native population. To raise our productivity, and with it our living standards, we can call on our excellent record in new technology and on our ample resources of capital. But we will get nowhere in regenerating the economy unless we have the workers to put these things together in actual output. If they cannot be Scots, they need to be Poles or other hard-working foreigners.

May has only one thing to her credit from three years of premiership, and it is a negative thing: she has shown that the UK cannot segregate its necessary guest workers into a hostile environment. After her crashing failure, I doubt if any future Prime Minister will try it again. Her own successor at the Home Office, Sajid Javid, himself of migrant origin, has made clear he thinks little of targets and intends to relax them after Brexit. By that time, he may be Prime Minister himself.

It is true Javid has said “no, no, no” to a second EU referendum, to a General Election and to the revocation of Article 50 (that is, abandoning Brexit). Confronted with 13 candidates for the Conservative leadership, there is a temptation to wish a plague on all their houses. Yet some are better than others, and the number who reject a no-deal Brexit is growing.

They include not only Javid but also my own pal, Rory Stewart, whose praises I sang in my last column – ahead, I can fairly claim, of any other commentator. Since then he has admitted smoking opium and he has said the end of the Union would break his heart (could Boris Johnson say that with a straight face?).

Rory is at least human, unlike the present Prime Minister, unlike most of his rivals, and this quality may yet open the door of Number 10 to him. You read it here first.