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

debuginfo: Support for destructured locals and function arguments. #8045

Closed

Conversation

michaelwoerister
Copy link
Member

As the title says, valid debug info is now generated for any kind of pattern-based bindings like an example from the automated tests:

let ((u, v), ((w, (x, Struct { a: y, b: z})), Struct { a: ae, b: oe }), ue) =
    ((25, 26), ((27, (28, Struct { a: 29, b: 30})), Struct { a: 31, b: 32 }), 33);  

(Not that you would necessarily want to do a thing like that :P )

Fixes #2533

@jdm
Copy link
Contributor

jdm commented Jul 25, 2013

Fantastic work as usual. Your tests are excellent!

@graydon
Copy link
Contributor

graydon commented Jul 25, 2013

Agreed, these are great. Thanks!

@michaelwoerister
Copy link
Member Author

@jdm: Thank you. I'll incorporate your comments asap.
@graydon: Thanks :)

@michaelwoerister
Copy link
Member Author

@jdm OK, changes applied.

@michaelwoerister
Copy link
Member Author

@jdm I moved the argument counter into the DebugContext.

@brson
Copy link
Contributor

brson commented Jul 26, 2013

👍

bors added a commit that referenced this pull request Jul 27, 2013
As the title says, valid debug info is now generated for any kind of pattern-based bindings like an example from the automated tests: 
```rust
let ((u, v), ((w, (x, Struct { a: y, b: z})), Struct { a: ae, b: oe }), ue) =
    ((25, 26), ((27, (28, Struct { a: 29, b: 30})), Struct { a: 31, b: 32 }), 33);  
```
(Not that you would necessarily want to do a thing like that :P )

Fixes #2533
@bors bors closed this Jul 27, 2013
@michaelwoerister michaelwoerister deleted the destructuring branch July 9, 2014 07:51
flip1995 pushed a commit to flip1995/rust that referenced this pull request Dec 6, 2021
Consider NonNull as a pointer type

PR 1/2 for issue rust-lang#8045. Add `NonNull` as a pointer class to suppress false positives like `UnsafeCell<NonNull<()>>`. However, this change is not sufficient to handle the cases shared in gtk-rs and Rug in the issue.

changelog: none

r? `@xFrednet`
flip1995 pushed a commit to flip1995/rust that referenced this pull request Dec 17, 2021
…xFrednet

Clarify the purpose of the non_send lint

PR 2/2 for issue rust-lang#8045. Tried to tone down the warning message and clarify the intention of the lint. Specifically, I added a description that this lint tries to detect "types that are not safe to be sent to another thread".

changelog: none

r? `@xFrednet`
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.

In debuginfo::create_local_var, handle pattern bindings
5 participants