Skip to content

typeck: handle unsized structs in type hints by recursing into their last field. #27294

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

Merged
merged 1 commit into from
Jul 27, 2015

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented Jul 26, 2015

Rc::new(RefCell::new(x)): Rc<RefCell<Trait>> should not mean RefCell::new(x): RefCell<Trait>.
The latter is impossible, as an rvalue can't have an unsized type.
We were already handling unsized argument hints, but not when dealing with unsized structures.

@rust-highfive
Copy link
Contributor

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

r? @nrc

@rust-highfive rust-highfive assigned nrc and unassigned alexcrichton Jul 26, 2015
@nrc
Copy link
Member

nrc commented Jul 26, 2015

@bors: r+

@bors
Copy link
Collaborator

bors commented Jul 26, 2015

📌 Commit 2c69514 has been approved by nrc

@eddyb eddyb force-pushed the deep-unsize-hinting branch from 2c69514 to c46f913 Compare July 26, 2015 21:50
@eddyb
Copy link
Member Author

eddyb commented Jul 26, 2015

@bors r=nrc

@bors
Copy link
Collaborator

bors commented Jul 26, 2015

📌 Commit c46f913 has been approved by nrc

@bors
Copy link
Collaborator

bors commented Jul 26, 2015

⌛ Testing commit c46f913 with merge 6d28819...

bors added a commit that referenced this pull request Jul 26, 2015
`Rc::new(RefCell::new(x)): Rc<RefCell<Trait>>` should not mean `RefCell::new(x): RefCell<Trait>`.
The latter is impossible, as an rvalue can't have an unsized type.
We were already handling unsized argument hints, but not when dealing with unsized structures.
@bors bors merged commit c46f913 into rust-lang:master Jul 27, 2015
@eddyb eddyb deleted the deep-unsize-hinting branch July 27, 2015 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants