Uh oh!
There was an error while loading. Please reload this page.
Add debug info for boxes, vectors, and strings - #5824
Closed
bleibig wants to merge 7 commits into
Closed
Conversation
If a node has a (0, 0) span, it was not in the source, so debug symbols should not be generated for it.
brson
commented
Apr 16, 2013
Contributor
I don't know much about this area but r+ed this to see what happens. I'm guessing it will bounce off the bots after the llvm upgrade. @jdm are you ok with merging this despite your previous comment? |
jdm
commented
Apr 17, 2013
Contributor
Sure. We can file a follow up about filling out the tests. |
brson
commented
Apr 18, 2013
Contributor
Ah, I didn't read closely enough that there were missing tests (even though that's exactly what you said). Would be good to have them. |
bors added a commit
that referenced
this pull request
Apr 19, 2013
This adds debugging symbol generation for boxes, bare functions, vectors, and strings, along with a tests for boxes and vectors. Note that gdb will see them as their actual compiled representation with the refcount, tydesc, etc. fields, so if `b` refers to box, `b->boxed` will refer to its value. Also, since you seem to use the [C struct hack](http://c-faq.com/struct/structhack.html) for dynamic vectors, you won't be able to print out the whole vector at once, only one element at a time by indexing specific elements.
flip1995 pushed a commit
to flip1995/rust
that referenced
this pull request
Jul 26, 2020
…arth
Ignore not really redundant clones of ManuallyDrop
"Redundant" clones of `ManuallyDrop` are sometimes used for the side effect of
invoking the clone, without running the drop implementation of the inner type.
In other words, they aren't really redundant. For example, futures-rs crate:
```rust
#[allow(clippy::redundant_clone)] // The clone here isn't actually redundant.
unsafe fn increase_refcount<T: ArcWake>(data: *const ()) {
// Retain Arc, but don't touch refcount by wrapping in ManuallyDrop
let arc = mem::ManuallyDrop::new(Arc::<T>::from_raw(data as *const T));
// Now increase refcount, but don't drop new refcount either
let _arc_clone: mem::ManuallyDrop<_> = arc.clone();
}
```
changelog: Ignore redundant clone lint for ManuallyDrop.U007D pushed a commit
to U007D/rust-mos
that referenced
this pull request
Aug 21, 2026
5824: Optimize reference search r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds debugging symbol generation for boxes, bare functions, vectors, and strings, along with a tests for boxes and vectors.
Note that gdb will see them as their actual compiled representation with the refcount, tydesc, etc. fields, so if
brefers to box,b->boxedwill refer to its value. Also, since you seem to use the C struct hack for dynamic vectors, you won't be able to print out the whole vector at once, only one element at a time by indexing specific elements.