forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#36212 - razielgn:updated-e0493-to-new-forma…
…t, r=jonathandturner Updated e0493 to new format (+ bonus). Part of rust-lang#35233. Fixes rust-lang#35999. r? @jonathandturner I'm not satisfied with the bonus part, there has to be an easier way to reach into the `Drop`'s span implementation. I'm all ears. :)
- Loading branch information
Showing
3 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
error[E0493]: constants are not allowed to have destructors | ||
--> $DIR/E0493.rs:27:17 | ||
| | ||
16 | fn drop(&mut self) {} | ||
| --------------------- destructor defined here | ||
... | ||
27 | const F : Foo = Foo { a : 0 }; | ||
| ^^^^^^^^^^^^^ constants cannot have destructors | ||
|
||
error: aborting due to previous error | ||
|