[Refactoring] simplify the code to inherit @safe attribute
fix 9148 - Issue 9148 - 'pure' is broken
Remove hack for issue 10981
Remove redundant diagnostic message