rust/compiler/rustc_lint/src
bors 7c2012d0ec 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)
2024-07-26 20:14:16 +00:00
..
context Improve well known value check-cfg diagnostic for the standard library 2024-07-01 23:03:36 +02:00
nonstandard_style mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
async_closures.rs Make it into a structured suggestion, maybe-incorrect 2024-06-28 20:16:35 -04:00
async_fn_in_trait.rs Move trait selection error reporting to its own top-level module 2024-07-08 16:04:47 -04:00
builtin.rs Update the description of lint type_alias_bounds 2024-07-23 01:49:00 +02:00
context.rs Tweak CheckLintNameResult::Tool. 2024-06-03 09:02:49 +10:00
deref_into_dyn_supertrait.rs Use is_lang_item more aggressively 2024-06-14 16:54:29 -04:00
drop_forget_useless.rs Change lint_dropping_copy_types to use UseLetUnderscoreIgnoreSuggestion as suggestion. 2024-05-29 18:09:20 +08:00
early.rs Remove #[macro_use] extern crate tracing from rustc_lint. 2024-05-23 18:02:17 +10:00
enum_intrinsics_non_enums.rs Remove extern crate rustc_session from rustc_lint. 2024-04-29 13:57:41 +10:00
errors.rs Fix up comments. 2024-06-03 08:44:33 +10:00
expect.rs RFC 2383: Stabilize lint_reasons 🎉 2024-06-25 17:22:22 +02:00
for_loops_over_fallibles.rs Run rustfmt on files that need it. 2024-05-24 15:17:21 +10:00
foreign_modules.rs Remove #[macro_use] extern crate tracing from rustc_lint. 2024-05-23 18:02:17 +10:00
hidden_unicode_codepoints.rs Remove extern crate rustc_session from rustc_lint. 2024-04-29 13:57:41 +10:00
impl_trait_overcaptures.rs Only require symbol name for @feature_gate 2024-06-28 18:33:31 -04:00
internal.rs Add internal lint for detecting non-glob imports of rustc_type_ir::inherent 2024-07-18 13:03:26 +02:00
invalid_from_utf8.rs Remove extern crate rustc_session from rustc_lint. 2024-04-29 13:57:41 +10:00
late.rs Don't require visit_body to take a lifetime that must outlive the function call 2024-05-29 10:04:08 +00:00
let_underscore.rs Fix up comments. 2024-06-03 08:44:33 +10:00
levels.rs RFC 2383: Stabilize lint_reasons 🎉 2024-06-25 17:22:22 +02:00
lib.rs Rollup merge of #127950 - nnethercote:rustfmt-skip-on-use-decls, r=cuviper 2024-07-26 00:57:21 +02:00
lints.rs Rollup merge of #126575 - fmease:update-lint-type_alias_bounds, r=compiler-errors 2024-07-26 02:20:28 -04:00
macro_expr_fragment_specifier_2024_migration.rs Adds expr_2024 migration lit 2024-07-09 17:41:13 +00:00
map_unit_fn.rs Remove extern crate rustc_session from rustc_lint. 2024-04-29 13:57:41 +10:00
methods.rs Fix up comments. 2024-06-03 08:44:33 +10:00
multiple_supertrait_upcastable.rs Auto merge of #127097 - compiler-errors:async-closure-lint, r=oli-obk 2024-07-11 06:59:10 +00:00
non_ascii_idents.rs Remove extern crate rustc_session from rustc_lint. 2024-04-29 13:57:41 +10:00
non_fmt_panic.rs Use is_lang_item more aggressively 2024-06-14 16:54:29 -04:00
non_local_def.rs Support ?Trait bounds in supertraits and dyn Trait under a feature gate 2024-07-25 20:53:33 +03:00
nonstandard_style.rs Fix up comments. 2024-06-03 08:44:33 +10:00
noop_method_call.rs Instance::resolve -> Instance::try_resolve, and other nits 2024-07-02 17:28:03 -04:00
opaque_hidden_inferred_bound.rs Remove fully_normalize 2024-07-11 19:15:04 -04:00
pass_by_value.rs hir: Create hir::ConstArgKind enum 2024-07-16 19:27:28 -07:00
passes.rs Reduce some pub exposure. 2024-06-03 08:44:33 +10:00
precedence.rs Implement ambiguous_negative_literals lint 2024-07-11 00:46:47 +02:00
ptr_nulls.rs Rename LintContext::emit_spanned_lint as LintContext::emit_span_lint. 2024-01-23 08:08:25 +11:00
redundant_semicolon.rs Remove extern crate rustc_session from rustc_lint. 2024-04-29 13:57:41 +10:00
reference_casting.rs Handle Deref expressions in invalid_reference_casting 2024-05-10 12:33:07 -04:00
shadowed_into_iter.rs boxed_slice_into_iter: tiny doc correction 2024-06-16 20:57:48 +02:00
tests.rs refactor(rustc_lint): inline check_lint_name_cmdline 2023-08-30 17:35:07 +01:00
traits.rs Support ?Trait bounds in supertraits and dyn Trait under a feature gate 2024-07-25 20:53:33 +03:00
types.rs Update a f16/f128 FIXME to be more accurate 2024-07-08 18:55:26 -04:00
unit_bindings.rs Inline & delete Ty::new_unit, since it's just a field access 2024-05-02 17:49:23 +02:00
unused.rs iter_identity is a better name 2024-07-07 00:12:35 -04:00