Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions std/traits.d
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,6 @@ private template fqnType(T,

string functionAttributeString(T)() @property
{
alias FA = FunctionAttribute;
enum attrs = functionAttributes!T;

static if (attrs == FA.none)
Expand Down Expand Up @@ -1315,6 +1314,8 @@ enum FunctionAttribute : uint
return_ = 1 << 12, /// ditto
}

alias FA = FunctionAttribute; // shorten the enum name

/// ditto
template functionAttributes(func...)
if (func.length == 1 && isCallable!func)
Expand All @@ -1330,9 +1331,7 @@ template functionAttributes(func...)
///
unittest
{
import std.traits : functionAttributes, FunctionAttribute;

alias FA = FunctionAttribute; // shorten the enum name
import std.traits : functionAttributes, FA;

real func(real x) pure nothrow @safe
{
Expand All @@ -1345,8 +1344,6 @@ unittest

unittest
{
alias FA = FunctionAttribute;

struct S
{
int noF() { return 0; }
Expand Down Expand Up @@ -2016,7 +2013,6 @@ unittest
{
import std.algorithm : reduce;

alias FA = FunctionAttribute;
foreach (BaseT; TypeTuple!(typeof(&sc), typeof(&novar), typeof(&cstyle),
typeof(&dstyle), typeof(&typesafe)))
{
Expand Down Expand Up @@ -4418,7 +4414,6 @@ template isCovariantWith(F, G)
*/
template checkAttributes()
{
alias FA = FunctionAttribute;
enum uprAtts = functionAttributes!Upr;
enum lwrAtts = functionAttributes!Lwr;
//
Expand Down