You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `external` behavior is the default for macros that don't have this attribute, unless they are built-in macros.
174
174
For built-in macros the default is `yes`.
175
175
176
-
> **Note**: `rustc` has a `-C collapse-macro-debuginfo` CLI option to override both the default collapsing behavior and `#[collapse_debuginfo]` attributes.
176
+
> [!NOTE]
177
+
> `rustc` has a `-C collapse-macro-debuginfo` CLI option to override both the default collapsing behavior and `#[collapse_debuginfo]` attributes.
The `#[diagnostic::do_not_recommend]` attribute is a hint to the compiler to not show the annotated trait implementation as part of a diagnostic message.
560
566
561
-
> **Note**: Suppressing the recommendation can be useful if you know that the recommendation would normally not be useful to the programmer. This often occurs with broad, blanket impls. The recommendation may send the programmer down the wrong path, or the trait implementation may be an internal detail that you don't want to expose, or the bounds may not be able to be satisfied by the programmer.
567
+
> [!NOTE]
568
+
> Suppressing the recommendation can be useful if you know that the recommendation would normally not be useful to the programmer. This often occurs with broad, blanket impls. The recommendation may send the programmer down the wrong path, or the trait implementation may be an internal detail that you don't want to expose, or the bounds may not be able to be satisfied by the programmer.
562
569
>
563
570
> For example, in an error message about a type not implementing a required trait, the compiler may find a trait implementation that would satisfy the requirements if it weren't for specific bounds in the trait implementation. The compiler may tell the user that there is an impl, but the problem is the bounds in the trait implementation. The `#[diagnostic::do_not_recommend]` attribute can be used to tell the compiler to *not* tell the user about the trait implementation, and instead simply tell the user the type doesn't implement the required trait.
Copy file name to clipboardExpand all lines: src/behavior-considered-undefined.md
+4-2
Original file line number
Diff line number
Diff line change
@@ -101,7 +101,8 @@ r[undefined.runtime]
101
101
* For assumptions specifically related to unwinding, see the [panic documentation][unwinding-ffi].
102
102
* The runtime assumes that a Rust stack frame is not deallocated without executing destructors for local variables owned by the stack frame. This assumption can be violated by C functions like `longjmp`.
103
103
104
-
> **Note**: Undefined behavior affects the entire program. For example, calling
104
+
> [!NOTE]
105
+
> Undefined behavior affects the entire program. For example, calling
105
106
> a function in C that exhibits undefined behavior of C means your entire
106
107
> program contains undefined behaviour that can also affect the Rust code. And
107
108
> vice versa, undefined behavior in Rust can cause adverse affects on code
and [`std::mem::ManuallyDrop`] provides a wrapper to prevent a
433
433
variable or field from being dropped automatically.
434
434
435
-
> Note: Preventing a destructor from being run via [`std::mem::forget`] or other means is safe even if it has a type that isn't `'static`.
435
+
> [!NOTE]
436
+
> Preventing a destructor from being run via [`std::mem::forget`] or other means is safe even if it has a type that isn't `'static`.
436
437
> Besides the places where destructors are guaranteed to run as defined by this document, types may *not* safely rely on a destructor being run for soundness.
Copy file name to clipboardExpand all lines: src/expressions.md
+8-4
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,8 @@ r[expr.structure]
65
65
In this way, the structure of expressions dictates the structure of execution.
66
66
Blocks are just another kind of expression, so blocks, statements, expressions, and blocks again can recursively nest inside each other to an arbitrary depth.
67
67
68
-
> **Note**: We give names to the operands of expressions so that we may discuss them, but these names are not stable and may be changed.
68
+
> [!NOTE]
69
+
> We give names to the operands of expressions so that we may discuss them, but these names are not stable and may be changed.
The operands of these expressions are evaluated prior to applying the effects of the expression.
127
128
Expressions taking multiple operands are evaluated left to right as written in the source code.
128
129
129
-
> **Note**: Which subexpressions are the operands of an expression is
130
+
> [!NOTE]
131
+
> Which subexpressions are the operands of an expression is
130
132
> determined by expression precedence as per the previous section.
131
133
132
134
For example, the two `next` method calls will always be called in the same order:
@@ -142,7 +144,8 @@ assert_eq!(
142
144
);
143
145
```
144
146
145
-
> **Note**: Since this is applied recursively, these expressions are also evaluated from innermost to outermost, ignoring siblings until there are no inner subexpressions.
147
+
> [!NOTE]
148
+
> Since this is applied recursively, these expressions are also evaluated from innermost to outermost, ignoring siblings until there are no inner subexpressions.
146
149
147
150
r[expr.place-value]
148
151
## Place Expressions and Value Expressions
@@ -178,7 +181,8 @@ The following contexts are *place expression* contexts:
178
181
expression.
179
182
* The base of a [functional update] struct expression.
180
183
181
-
> Note: Historically, place expressions were called *lvalues* and value expressions were called *rvalues*.
184
+
> [!NOTE]
185
+
> Historically, place expressions were called *lvalues* and value expressions were called *rvalues*.
182
186
183
187
r[expr.place-value.assignee]
184
188
An *assignee expression* is an expression that appears in the left operand of an [assignment][assign] expression.
0 commit comments