Gate repr(Rust) correctly on non-ADT items · rust-lang/rust@363addc (original) (raw)

`@@ -107,6 +107,21 @@ LL | |

`

107

107

`LL | | }

`

108

108

` | |_- not a struct, enum, or union

`

109

109

``

``

110

`+

error[E0517]: attribute should be applied to a struct, enum, or union

`

``

111

`+

--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:168:8

`

``

112

`+

|

`

``

113

`+

LL | #[repr(Rust)]

`

``

114

`+

| ^^^^

`

``

115

`+

LL |

`

``

116

`+

LL | / mod repr_rust {

`

``

117

`+

LL | |

`

``

118

`+

LL | | mod inner { #![repr(Rust)] }

`

``

119

`+

LL | |

`

``

120

`+

... |

`

``

121

`+

LL | |

`

``

122

`+

LL | | }

`

``

123

`+

| |_- not a struct, enum, or union

`

``

124

+

110

125

`` error: attribute should be applied to an extern crate item

``

111

126

` --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:26:1

`

112

127

` |

`

`@@ -329,7 +344,31 @@ error[E0517]: attribute should be applied to a struct, enum, or union

`

329

344

`LL | #[repr(C)] impl S { }

`

330

345

` | ^ ---------- not a struct, enum, or union

`

331

346

``

332

``

`-

error: aborting due to 39 previous errors

`

``

347

`+

error[E0517]: attribute should be applied to a struct, enum, or union

`

``

348

`+

--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:172:25

`

``

349

`+

|

`

``

350

`+

LL | mod inner { #![repr(Rust)] }

`

``

351

`+

| --------------------^^^^---- not a struct, enum, or union

`

``

352

+

``

353

`+

error[E0517]: attribute should be applied to a struct, enum, or union

`

``

354

`+

--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:176:12

`

``

355

`+

|

`

``

356

`+

LL | #[repr(Rust)] fn f() { }

`

``

357

`+

| ^^^^ ---------- not a struct, enum, or union

`

``

358

+

``

359

`+

error[E0517]: attribute should be applied to a struct, enum, or union

`

``

360

`+

--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:182:12

`

``

361

`+

|

`

``

362

`+

LL | #[repr(Rust)] type T = S;

`

``

363

`+

| ^^^^ ----------- not a struct, enum, or union

`

``

364

+

``

365

`+

error[E0517]: attribute should be applied to a struct, enum, or union

`

``

366

`+

--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:186:12

`

``

367

`+

|

`

``

368

`+

LL | #[repr(Rust)] impl S { }

`

``

369

`+

| ^^^^ ---------- not a struct, enum, or union

`

``

370

+

``

371

`+

error: aborting due to 44 previous errors

`

333

372

``

334

373

`Some errors have detailed explanations: E0517, E0518, E0658.

`

335

374

`` For more information about an error, try rustc --explain E0517.

``