Skip to content

Commit d74089c

Browse files
committed
Fix doctests
1 parent 75d2364 commit d74089c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/rustc_lint/src/unused.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,16 +1042,16 @@ pub(crate) struct UnusedParens {
10421042
/// Whether parentheses may be omitted from a type without resulting in ambiguity.
10431043
///
10441044
/// ```
1045-
/// type Example = Box<dyn Fn() -> &'static (dyn Trait) + Send>
1045+
/// type Example = Box<dyn Fn() -> &'static (dyn Send) + Sync>;
10461046
/// ```
10471047
///
1048-
/// Here, `&'static (dyn Trait) + Send` is a `TypeNoBounds`. As such, it may not directly
1049-
/// contain `ImplTraitType` or `TraitObjectType` which is why `(dyn Trait)` is parenthesized.
1048+
/// Here, `&'static (dyn Send) + Sync` is a `TypeNoBounds`. As such, it may not directly
1049+
/// contain `ImplTraitType` or `TraitObjectType` which is why `(dyn Send)` is parenthesized.
10501050
/// However, an exception is made for `ImplTraitTypeOneBound` and `TraitObjectTypeOneBound`.
10511051
/// The following is accepted because there is no `+`.
10521052
///
10531053
/// ```
1054-
/// type Example = Box<dyn Fn() -> &'static dyn Trait>
1054+
/// type Example = Box<dyn Fn() -> &'static dyn Send>;
10551055
/// ```
10561056
enum NoBoundsException {
10571057
/// The type must be parenthesized.

0 commit comments

Comments
 (0)