Skip to content

Conversation

@hkBst
Copy link
Member

@hkBst hkBst commented Nov 4, 2025

Continuation of #148348
r? @Urgau

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 4, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 4, 2025

r? @lcnr

rustbot has assigned @lcnr.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot assigned Urgau and unassigned lcnr Nov 4, 2025
@Urgau Urgau added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 4, 2025
@hkBst
Copy link
Member Author

hkBst commented Nov 5, 2025

BTW help vs note: help should be used to show changes the user can possibly make to fix the problem. note should be used for everything else, such as other context, information and facts, online resources to read, etc. -- https://rustc-dev-guide.rust-lang.org/diagnostics.html#diagnostic-levels

Should probably change a lot of these helps to notes...

@rust-cloud-vms rust-cloud-vms bot force-pushed the dangling-ptr-lint-2 branch from 0ef89d7 to 09188da Compare November 5, 2025 14:11
@hkBst
Copy link
Member Author

hkBst commented Nov 5, 2025

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 5, 2025
@rust-cloud-vms rust-cloud-vms bot force-pushed the dangling-ptr-lint-2 branch from 09188da to 9fb5a03 Compare November 7, 2025 10:54
.note_safe = a dangling pointer is safe, but dereferencing one is undefined behavior
.note_more_info = for more information, see <https://doc.rust-lang.org/reference/destructors.html>
lint_dangling_pointers_from_temporaries = dangling pointer because temporary `{$ty}` is dropped at end of statement
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a native English speaker but I think it's missing a word that links "dangling pointer" and "because temporary [...]", maybe "created" or "made"?

dangling pointer created because {$ty} temporary is dropped at end of statement

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose there is an implied "there is a" at the beginning, but I suppose instead of "dangling pointer", "pointer is dangling" is not that much longer. Would that make it better?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, that works to.

@Urgau Urgau added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants