-
Couldn't load subscription status.
- Fork 13.9k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-langRelevant to the language teamRelevant to the language team
Description
rust/compiler/rustc_hir_analysis/src/hir_ty_lowering/bounds.rs
Lines 97 to 111 in b605c65
| let mut seen_sized_unbound = false; | |
| for unbound in unbounds { | |
| if let Some(sized_def_id) = sized_def_id | |
| && unbound.trait_ref.path.res == Res::Def(DefKind::Trait, sized_def_id) | |
| { | |
| seen_sized_unbound = true; | |
| continue; | |
| } | |
| // There was a `?Trait` bound, but it was not `?Sized`; warn. | |
| self.dcx().span_warn( | |
| unbound.span, | |
| "relaxing a default bound only does something for `?Sized`; \ | |
| all other traits are not bound by default", | |
| ); | |
| } |
fn foo() -> impl ?Send {}warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
--> src/lib.rs:1:18
|
1 | fn foo() -> impl ?Send {}
| ^^^^^
This should either be a (future-compat) lint or a hard-error.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-langRelevant to the language teamRelevant to the language team