Skip to content
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

const fn arguments not properly checked for destructors. #47351

Closed
eddyb opened this issue Jan 11, 2018 · 0 comments
Closed

const fn arguments not properly checked for destructors. #47351

eddyb opened this issue Jan 11, 2018 · 0 comments
Labels
A-const-fn Area: const fn foo(..) {..}. Pure functions which can be applied at compile time. C-bug Category: This is a bug.

Comments

@eddyb
Copy link
Member

eddyb commented Jan 11, 2018

These currently compile, even if they can be used from compile-time code to trigger a drop:

#![feature(const_fn)]
pub const fn drop<T>(_: T) {}
pub const fn drop2<T>(x: T) { (x, ()).1 }

cc @alexreg

@kennytm kennytm added A-const-fn Area: const fn foo(..) {..}. Pure functions which can be applied at compile time. C-bug Category: This is a bug. labels Jan 11, 2018
@bors bors closed this as completed in e2c1a93 Jan 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-fn Area: const fn foo(..) {..}. Pure functions which can be applied at compile time. C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants