about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-12-14 23:56:32 +0100
committerGitHub <noreply@github.com>2024-12-14 23:56:32 +0100
commit0f828022dbc8e57696b624914082713ce7b447c5 (patch)
treea662e88671f1fbe7d6dda8f33938dae185a14816 /compiler/rustc_codegen_llvm/src
parent1fa1f3001ffea7690f530c37ff961d426632e5b4 (diff)
parentb27817c8c605499dc8269c5d1ad34527be8c52f2 (diff)
downloadrust-0f828022dbc8e57696b624914082713ce7b447c5.tar.gz
rust-0f828022dbc8e57696b624914082713ce7b447c5.zip
Rollup merge of #134264 - adetaylor:weak-and-nonnull, r=compiler-errors
Arbitrary self types v2: Weak & NonNull diagnostics

This builds on top of #134262 which is more urgent to review and merge first. I'll likely rebase this PR once that lands.

This is the first part of the diagnostic enhancements planned for Arbitrary Self Types v2.

Various types can be used as method receivers, such as `Rc<>`, `Box<>` and `Arc<>`. The arbitrary self types v2 work allows further types to be made method receivers by implementing the Receiver trait.

With that in mind, it may come as a surprise to people when certain common types do not implement Receiver and thus cannot be used as a method receiver.

The RFC for arbitrary self types v2 therefore proposes emitting specific
lint hints for these cases:
* `NonNull`
* `Weak`
* Raw pointers

The code already emits a hint for this third case, in that it advises folks that the `arbitrary_self_types_pointers` feature may meet their need. This PR adds diagnostic hints for the `Weak` and `NonNull` cases.

Tracking issue #44874

r? `@wesleywiser`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions