about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-07-26 20:14:16 +0000
committerbors <bors@rust-lang.org>2024-07-26 20:14:16 +0000
commit2acbd3168637421ac9ee406e3acb38ba33f0e01e (patch)
treed2cb7500e0d1a1ec9d1f2989f38707cd5f56e554 /compiler/rustc_codegen_llvm/src/errors.rs
parent95ee06c7499a50ef3632440c59d5e2392f0062df (diff)
parentdc49aa3884b4e57c71629ccd6b019599d2cc8cc1 (diff)
downloadrust-2acbd3168637421ac9ee406e3acb38ba33f0e01e.tar.gz
rust-2acbd3168637421ac9ee406e3acb38ba33f0e01e.zip
Auto merge of #121676 - Bryanskiy:polarity, r=petrochenkov
Support ?Trait bounds in supertraits and dyn Trait under a feature gate

This patch allows `maybe` polarity bounds under a feature gate. The only language change here is that corresponding hard errors are replaced by feature gates. Example:
```rust
#![feature(allow_maybe_polarity)]
...
trait Trait1 : ?Trait { ... } // ok
fn foo(_: Box<(dyn Trait2 + ?Trait)>) {} // ok
fn bar<T: ?Sized + ?Trait>(_: &T) {} // ok
```
Maybe bounds still don't do anything (except for `Sized` trait), however this patch will allow us to [experiment with default auto traits](https://github.com/rust-lang/rust/pull/120706#issuecomment-1934006762).

This is a part of the [MCP: Low level components for async drop](https://github.com/rust-lang/compiler-team/issues/727)
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions