Skip to content

Commit 2840916

Browse files
committed
Remove some noise in comments
1 parent 8480a6d commit 2840916

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

src/special-types-and-traits.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -216,36 +216,36 @@ r[lang-types.sized.implicit-sized]
216216
```rust
217217
fn is_sized<T: Sized>() {}
218218
fn f<T>() { is_sized::<T>() }
219-
//~ ^ Equivalent to `T: Sized`.
219+
// ^ Equivalent to `T: Sized`.
220220
```
221221

222222
```rust
223223
# fn is_sized<T: Sized>() {}
224224
trait Tr<T> { fn f() { is_sized::<T>() } }
225-
//~ ^ Equivalent to `T: Sized`.
225+
// ^ Equivalent to `T: Sized`.
226226
```
227227

228228
```rust
229229
{{#rustdoc_include notation/prove.rs:-1 }}
230230
trait Tr { type Ty; }
231-
//~ ^^^^^^^ Equivalent to `type Ty: Sized`.^
231+
// ^^^^^^^ Equivalent to `type Ty: Sized`.
232232
prove! { for<T> { T: Tr } => { <T as Tr>::Ty: Sized } }
233233
```
234234

235235
```rust
236236
{{#rustdoc_include notation/prove.rs:-1 }}
237237
trait Tr { type Ty: ?Sized; }
238-
//~ ^^ No `Sized` supertrait bound is inferred here.
238+
// ^^ No `Sized` supertrait bound is inferred here.
239239
prove! { for<T> { T: ?Sized + Tr } ?=> { T: Sized } }
240-
//~^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^
241-
//~| | That `T: Tr` does not imply
242-
//~| | that `T: Sized`.
243-
//~| |
244-
//~| We relax the implicit `Sized` bound on the generic parameter.
240+
// ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^
241+
// | That `T: Tr` does not imply
242+
// | that `T: Sized`.
243+
// |
244+
// We relax the implicit `Sized` bound on the generic parameter.
245245
prove! { for<T> { T: Tr<Ty:> } ?=> { <T as Tr>::Ty: Sized } }
246-
//~^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
247-
//~| An associated type bound does not imply
248-
//~| that the associated type is `Sized`.
246+
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
247+
// An associated type bound does not imply
248+
// that the associated type is `Sized`.
249249
```
250250

251251
> [!NOTE]
@@ -256,36 +256,36 @@ These implicit `Sized` bounds may be relaxed by using the special `?Sized` bound
256256

257257
```rust
258258
fn f<T: ?Sized>(_: *const T) {}
259-
//~ ^^^^^^^^^ This bound can be relaxed as `Sized` was implied.
259+
// ^^^^^^^^^ This bound can be relaxed as `Sized` was implied.
260260
struct S<T: ?Sized>(*const T);
261-
//~ ^^^^^^^^^ As above.
261+
// ^^^^^^^^^ As above.
262262
trait Tr { type Ty: ?Sized; }
263-
//~ ^^^^^^^^^^^ As above
263+
// ^^^^^^^^^^^ As above
264264
impl<T: ?Sized> Tr for T { type Ty = *const T; }
265-
//~ ^^^^^^^^^ As above.
265+
// ^^^^^^^^^ As above.
266266
```
267267

268268
```rust,compile_fail
269269
trait Tr: ?Sized {} //~ ERROR
270-
//~^ ^^^^^^^^^^
271-
//~| On supertrait bounds, `Sized` is not implied, so
272-
//~| this cannot be relaxed.
270+
// ^^^^^^^^^^
271+
// On supertrait bounds, `Sized` is not implied, so
272+
// this cannot be relaxed.
273273
```
274274

275275
```rust,compile_fail
276276
trait Tr { type Ty: ?Sized; }
277277
fn f<T: Tr<Ty: ?Sized>>() {} //~ ERROR as of #135331
278-
//~^ ^^^^^^^^^^
279-
//~| On associated type bounds, `Sized` is not implied,
280-
//~| so this cannot be relaxed.
278+
// ^^^^^^^^^^
279+
// On associated type bounds, `Sized` is not implied,
280+
// so this cannot be relaxed.
281281
```
282282

283283
```rust,compile_fail
284284
trait Tr { type Ty: ?Sized; }
285285
fn f<T: Tr>() where <T as Tr>::Ty: ?Sized {} //~ ERROR
286-
//~^ ^^^^^^^^^^^^^^^^^^^^^
287-
//~| On bounds on associated types, `Sized` is not
288-
//~| implied, so this cannot be relaxed.
286+
// ^^^^^^^^^^^^^^^^^^^^^
287+
// On bounds on associated types, `Sized` is not
288+
// implied, so this cannot be relaxed.
289289
```
290290

291291
[`Arc<Self>`]: std::sync::Arc

0 commit comments

Comments
 (0)