Skip to content

Rollup of 7 pull requests #87182

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 30 commits into from
Jul 16, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
07f1e61
Add natvis for NonZero and Wrapping types
wesleywiser Jun 28, 2021
9740dcc
Add natvis for Atomic types
wesleywiser Jun 29, 2021
cad42e0
Add natvis for cell types
wesleywiser Jun 29, 2021
8f1eec3
Fixup natvis for NonNull and Unique types
wesleywiser Jun 29, 2021
f2aba34
Add natvis for Range types
wesleywiser Jun 29, 2021
691ee05
Add natvis for Duration, ManuallyDrop and Pin types
wesleywiser Jun 30, 2021
a6a82c6
Add/improve visualizations for liballoc types
wesleywiser Jun 30, 2021
8500274
Add visualizer for OsString and fixup other string visualizers
wesleywiser Jul 1, 2021
d1852e1
Respond to review feedback
wesleywiser Jul 9, 2021
10b536f
ExprUseVisitor: treat ByValue use of Copy types as ImmBorrow
arora-aman Jul 11, 2021
14fdf8a
Add test for `Unique<T>`, weak ref counts and ref counts for `Weak<T>`
wesleywiser Jul 12, 2021
36f51c9
Add test for copy type in move closure
arora-aman Jul 14, 2021
6c3774e
ExprUseVisitor::Delegate consume only when moving
arora-aman Jul 14, 2021
e753f30
Correct invariant documentation for `steps_between`
dhwthompson Jul 14, 2021
6e357bc
Fix tests for i686
wesleywiser Jul 14, 2021
51142a0
Make --cap-lints and related options leave crate hash alone
jsgf Jul 14, 2021
c4ac836
PR feedback
arora-aman Jul 15, 2021
75291ee
Update compiler/rustc_typeck/src/expr_use_visitor.rs
nikomatsakis Jul 15, 2021
9fe470b
Get the right place type
roxelo Jul 15, 2021
59103d1
Fix layout overflow in type declaration
GuillaumeGomez Jul 15, 2021
25e7403
Add regression test for type declaration layout overflow
GuillaumeGomez Jul 15, 2021
c3c4b9e
Do not hide the sidebar on mobile, move it outside of the viewport in…
GuillaumeGomez Jul 15, 2021
868ffd0
Add test for sidebar display value on mobile
GuillaumeGomez Jul 15, 2021
f4e47ba
Rollup merge of #86983 - wesleywiser:natvis_std_types, r=michaelwoeri…
GuillaumeGomez Jul 16, 2021
c1ffca0
Rollup merge of #87069 - sexxi-goose:copy_ref_always, r=nikomatsakis
GuillaumeGomez Jul 16, 2021
36de877
Rollup merge of #87138 - dhwthompson:fix-range-invariant, r=JohnTitor
GuillaumeGomez Jul 16, 2021
c1b9bbf
Rollup merge of #87145 - jsgf:fix-lint-opt-hash, r=michaelwoerister
GuillaumeGomez Jul 16, 2021
4143379
Rollup merge of #87161 - sexxi-goose:fix-issue-87097, r=nikomatsakis
GuillaumeGomez Jul 16, 2021
a547abe
Rollup merge of #87162 - GuillaumeGomez:type-decl-overflow, r=notriddle
GuillaumeGomez Jul 16, 2021
b19f37c
Rollup merge of #87167 - GuillaumeGomez:sidebar-display-mobile, r=not…
GuillaumeGomez Jul 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add natvis for Duration, ManuallyDrop and Pin types
  • Loading branch information
wesleywiser committed Jul 8, 2021
commit 691ee054d5bb8e0a95fd0486a7167bd8889ebba7
22 changes: 22 additions & 0 deletions src/etc/natvis/libcore.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@
</Expand>
</Type>

<Type Name="core::mem::manually_drop::ManuallyDrop&lt;*&gt;">
<DisplayString>{value}</DisplayString>
<Expand>
<ExpandedItem>value</ExpandedItem>
</Expand>
</Type>

<Type Name="core::num::nonzero::NonZeroI8">
<DisplayString>{__0}</DisplayString>
</Type>
Expand Down Expand Up @@ -91,6 +98,13 @@
<DisplayString>(..={end})</DisplayString>
</Type>

<Type Name="core::pin::Pin&lt;*&gt;">
<DisplayString>Pin({(void*)pointer}: {pointer})</DisplayString>
<Expand>
<ExpandedItem>pointer</ExpandedItem>
</Expand>
</Type>

<Type Name="core::ptr::non_null::NonNull&lt;*&gt;">
<DisplayString>NonNull({(void*) pointer}: {pointer})</DisplayString>
<Expand>
Expand Down Expand Up @@ -138,4 +152,12 @@
<Type Name="core::sync::atomic::AtomicUsize">
<DisplayString>{v.value}</DisplayString>
</Type>

<Type Name="core::time::Duration">
<DisplayString>{secs,d}s {nanos,d}ns</DisplayString>
<Expand>
<Item Name="seconds">secs</Item>
<Item Name="nanoseconds">nanos</Item>
</Expand>
</Type>
</AutoVisualizer>
22 changes: 22 additions & 0 deletions src/test/debuginfo/duration-type.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// only-cdb
// compile-flags:-g

// === CDB TESTS ==================================================================================

// cdb-command: g

// cdb-command: dx duration
// cdb-check:duration : 5s 12ns [Type: core::time::Duration]
// cdb-check: [<Raw View>] [Type: core::time::Duration]
// cdb-check: seconds : 0x5 [Type: unsigned __int64]
// cdb-check: nanoseconds : 0xc [Type: unsigned int]

use std::time::Duration;

fn main() {
let duration = Duration::new(5, 12);

zzz(); // #break
}

fn zzz() { }
18 changes: 18 additions & 0 deletions src/test/debuginfo/marker-types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,29 @@
// cdb-check: [<Raw View>] [Type: core::ptr::non_null::NonNull<u32>]
// cdb-checK: 0xc [Type: unsigned int]

// cdb-command: dx manuallydrop
// cdb-check:manuallydrop : 12345 [Type: core::mem::manually_drop::ManuallyDrop<i32>]
// cdb-check: [<Raw View>] [Type: core::mem::manually_drop::ManuallyDrop<i32>]

// cdb-command: dx pin
// cdb-check:pin : Pin(0x[...]: "this") [Type: core::pin::Pin<ref_mut$<alloc::string::String> >]
// cdb-check: [<Raw View>] [Type: core::pin::Pin<ref_mut$<alloc::string::String> >]
// cdb-check: [len] : 0x4 [Type: unsigned __int64]
// cdb-check: [capacity] : 0x4 [Type: unsigned __int64]
// cdb-check: [chars]

use std::mem::ManuallyDrop;
use std::pin::Pin;
use std::ptr::NonNull;

fn main() {
let nonnull: NonNull<_> = (&12u32).into();

let manuallydrop = ManuallyDrop::new(12345i32);

let mut s = "this".to_string();
let pin = Pin::new(&mut s);

zzz(); // #break
}

Expand Down