File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1988,7 +1988,8 @@ types also implicitly conform to these common protocol.
19881988For more information,
19891989see < doc:Protocols#Implicit-Conformance-to-a-Protocol > .
19901990
1991- To suppress an implicit protocol conformance requirement,
1991+ To suppress an implicit constraint
1992+ that requires conformance to a given protocol,
19921993you write the protocol name with a tilde (` ~ ` ) in front of it.
19931994You can read the ` ~Copyable ` constraint as "maybe copyable",
19941995because values of this type
@@ -2010,7 +2011,7 @@ In the code above,
20102011the function ` f() ` implicitly requires ` MyType ` to be copyable.
20112012Within the function body,
20122013the value of ` x ` is copied to ` x1 ` and ` x2 ` in the assignment.
2013- In contrast, ` g() ` suppresses the implicit requirement ,
2014+ In contrast, ` g() ` suppresses the implicit constraint ,
20142015which allows you to pass either a copyable or noncopyable type.
20152016Within the function body,
20162017the value of ` y ` is consumed instead of copied,
You can’t perform that action at this time.
0 commit comments