-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Constify Drop
and Destruct
#133402
Constify Drop
and Destruct
#133402
Conversation
@@ -25,6 +25,8 @@ const fn check<T: ~const Destruct>(_: T) {} | |||
macro_rules! check_all { | |||
($($exp:expr),*$(,)?) => {$( | |||
const _: () = check($exp); | |||
//~^ ERROR the trait bound `NonTrivialDrop: const Destruct` is not satisfied |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The span here sucks because we point at the span of the check($exp)
expr, rather than pointing at the argument. I plan on fixing that soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some questions wrt to test changes, otherwise r=me
98926dc
to
bd44b63
Compare
@bors r=lcnr |
…mpiler-errors Rollup of 8 pull requests Successful merges: - rust-lang#115293 (Remove -Zfuel.) - rust-lang#132605 (CI: increase timeout from 4h to 6h) - rust-lang#133304 (Revert diagnostics hack to fix ICE 132920) - rust-lang#133402 (Constify `Drop` and `Destruct`) - rust-lang#133458 (Fix `Result` and `Option` not getting a jump to def link generated) - rust-lang#133471 (gce: fix typing_mode mismatch) - rust-lang#133475 (`MaybeStorage` improvements) - rust-lang#133513 (Only ignore windows-gnu in avr-jmp-offset) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#133402 - compiler-errors:drop-and-destruct, r=lcnr Constify `Drop` and `Destruct` r? `@lcnr` or `@fee1-dead`
r? @lcnr or @fee1-dead