Skip to content

libcore: wrappers for size/align_of to act on values without needing explicit ::<type> annotations #5970

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Apr 20, 2013

Conversation

huonw
Copy link
Member

@huonw huonw commented Apr 20, 2013

This allows one to write

let x = function_with_complicated_return_type();
let size = size_of_val(&x);

instead of

let x = function_with_complicated_return_type();
let size = size_of::<ComplicatedReturnType<Foo, Bar>>();

bors added a commit that referenced this pull request Apr 20, 2013
This allows one to write
```rust
let x = function_with_complicated_return_type();
let size = size_of_val(&x);
```
instead of 
```rust
let x = function_with_complicated_return_type();
let size = size_of::<ComplicatedReturnType<Foo, Bar>>();
```
@bors bors closed this Apr 20, 2013
@bors bors merged commit 5c2e9b2 into rust-lang:incoming Apr 20, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Sep 10, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants