diff --git a/compiler/rustc_borrowck/src/type_check/canonical.rs b/compiler/rustc_borrowck/src/type_check/canonical.rs index 57a5584421139..18a6605aa35a4 100644 --- a/compiler/rustc_borrowck/src/type_check/canonical.rs +++ b/compiler/rustc_borrowck/src/type_check/canonical.rs @@ -95,7 +95,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> { trait_ref, constness: ty::BoundConstness::NotConst, polarity: ty::ImplPolarity::Positive, - implicit: ty::ImplicitBound::No, + // implicit: ty::ImplicitBound::No, }))), locations, category, diff --git a/compiler/rustc_const_eval/src/transform/check_consts/check.rs b/compiler/rustc_const_eval/src/transform/check_consts/check.rs index a64229b42b69e..0e74015b1d290 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/check.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/check.rs @@ -813,7 +813,7 @@ impl Visitor<'tcx> for Checker<'mir, 'tcx> { trait_ref, constness: ty::BoundConstness::ConstIfConst, polarity: ty::ImplPolarity::Positive, - implicit: ty::ImplicitBound::No, + // implicit: ty::ImplicitBound::No, }), ); diff --git a/compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs b/compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs index fc19617617745..2939b2b32eb83 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs @@ -162,7 +162,7 @@ impl Qualif for NeedsNonConstDrop { trait_ref, constness: ty::BoundConstness::ConstIfConst, polarity: ty::ImplPolarity::Positive, - implicit: ty::ImplicitBound::No, + // implicit: ty::ImplicitBound::No, }), ); diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index 215d4a041befe..96bb590e3a203 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -165,24 +165,24 @@ pub struct ImplHeader<'tcx> { pub predicates: Vec>, } -#[derive( - Copy, - Clone, - PartialEq, - Eq, - Hash, - TyEncodable, - TyDecodable, - HashStable, - Debug, - TypeFoldable -)] -pub enum ImplicitBound { - /// `T: Trait` - No, - /// implicit `T: Sized` - Yes, -} +// #[derive( +// Copy, +// Clone, +// PartialEq, +// Eq, +// Hash, +// TyEncodable, +// TyDecodable, +// HashStable, +// Debug, +// TypeFoldable +// )] +// pub enum ImplicitBound { +// /// `T: Trait` +// No, +// /// implicit `T: Sized` +// Yes, +// } #[derive( Copy, @@ -541,12 +541,12 @@ impl<'tcx> Predicate<'tcx> { trait_ref, constness, polarity, - implicit, + // implicit, }) => Some(PredicateKind::Trait(TraitPredicate { trait_ref, constness, polarity: polarity.flip()?, - implicit, + // implicit, })), _ => None, @@ -753,7 +753,7 @@ pub struct TraitPredicate<'tcx> { pub polarity: ImplPolarity, - pub implicit: ImplicitBound, + // pub implicit: ImplicitBound, } pub type PolyTraitPredicate<'tcx> = ty::Binder<'tcx, TraitPredicate<'tcx>>; @@ -1450,7 +1450,7 @@ impl PolyTraitRef<'tcx> { trait_ref, constness, polarity: ty::ImplPolarity::Positive, - implicit: ty::ImplicitBound::No, + // implicit: ty::ImplicitBound::No, }) } #[inline] diff --git a/compiler/rustc_middle/src/ty/relate.rs b/compiler/rustc_middle/src/ty/relate.rs index 7c2cc6509433f..9763991d99a1a 100644 --- a/compiler/rustc_middle/src/ty/relate.rs +++ b/compiler/rustc_middle/src/ty/relate.rs @@ -788,20 +788,20 @@ impl<'tcx> Relate<'tcx> for GenericArg<'tcx> { } } -impl<'tcx> Relate<'tcx> for ty::ImplicitBound { - fn relate>( - _relation: &mut R, - a: ty::ImplicitBound, - b: ty::ImplicitBound, - ) -> RelateResult<'tcx, ty::ImplicitBound> { - match (a, b) { - (ty::ImplicitBound::No, ty::ty::ImplicitBound::No) => Ok(ty::ImplicitBound::No), - (ty::ImplicitBound::Yes, ty::ty::ImplicitBound::Yes) - | (ty::ImplicitBound::Yes, ty::ty::ImplicitBound::No) - | (ty::ImplicitBound::No, ty::ty::ImplicitBound::Yes) => Ok(ty::ImplicitBound::Yes), - } - } -} +// impl<'tcx> Relate<'tcx> for ty::ImplicitBound { +// fn relate>( +// _relation: &mut R, +// a: ty::ImplicitBound, +// b: ty::ImplicitBound, +// ) -> RelateResult<'tcx, ty::ImplicitBound> { +// match (a, b) { +// (ty::ImplicitBound::No, ty::ty::ImplicitBound::No) => Ok(ty::ImplicitBound::No), +// (ty::ImplicitBound::Yes, ty::ty::ImplicitBound::Yes) +// | (ty::ImplicitBound::Yes, ty::ty::ImplicitBound::No) +// | (ty::ImplicitBound::No, ty::ty::ImplicitBound::Yes) => Ok(ty::ImplicitBound::Yes), +// } +// } +// } impl<'tcx> Relate<'tcx> for ty::ImplPolarity { fn relate>( @@ -827,7 +827,7 @@ impl<'tcx> Relate<'tcx> for ty::TraitPredicate<'tcx> { trait_ref: relation.relate(a.trait_ref, b.trait_ref)?, constness: relation.relate(a.constness, b.constness)?, polarity: relation.relate(a.polarity, b.polarity)?, - implicit: relation.relate(a.implicit, b.implicit)?, + // implicit: relation.relate(a.implicit, b.implicit)?, }) } } diff --git a/compiler/rustc_middle/src/ty/structural_impls.rs b/compiler/rustc_middle/src/ty/structural_impls.rs index dfb0ac201f1a8..6604a4af63a7b 100644 --- a/compiler/rustc_middle/src/ty/structural_impls.rs +++ b/compiler/rustc_middle/src/ty/structural_impls.rs @@ -369,7 +369,7 @@ impl<'a, 'tcx> Lift<'tcx> for ty::TraitPredicate<'a> { trait_ref, constness: self.constness, polarity: self.polarity, - implicit: ty::ImplicitBound::No, + // implicit: ty::ImplicitBound::No, }) } } diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index 4d434e820f823..52f3f54ca4523 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -944,7 +944,7 @@ impl<'tcx> PolyTraitRef<'tcx> { trait_ref, constness: ty::BoundConstness::NotConst, polarity: ty::ImplPolarity::Positive, - implicit: ty::ImplicitBound::No, + // implicit: ty::ImplicitBound::No, }) } } diff --git a/compiler/rustc_privacy/src/lib.rs b/compiler/rustc_privacy/src/lib.rs index 4b9296fc10666..0c237347d9e24 100644 --- a/compiler/rustc_privacy/src/lib.rs +++ b/compiler/rustc_privacy/src/lib.rs @@ -128,7 +128,7 @@ where trait_ref, constness: _, polarity: _, - implicit: _, + // implicit: _, }) => self.visit_trait(trait_ref), ty::PredicateKind::Projection(ty::ProjectionPredicate { projection_ty, ty }) => { ty.visit_with(self)?; diff --git a/compiler/rustc_trait_selection/src/traits/auto_trait.rs b/compiler/rustc_trait_selection/src/traits/auto_trait.rs index a1c614d74b5d4..1ca1c32f816a1 100644 --- a/compiler/rustc_trait_selection/src/traits/auto_trait.rs +++ b/compiler/rustc_trait_selection/src/traits/auto_trait.rs @@ -290,7 +290,7 @@ impl AutoTraitFinder<'tcx> { constness: ty::BoundConstness::NotConst, // Auto traits are positive polarity: ty::ImplPolarity::Positive, - implicit: ty::ImplicitBound::No, + // implicit: ty::ImplicitBound::No, })); let computed_preds = param_env.caller_bounds().iter(); diff --git a/compiler/rustc_trait_selection/src/traits/mod.rs b/compiler/rustc_trait_selection/src/traits/mod.rs index 0f43db479679d..03a81397fb2f3 100644 --- a/compiler/rustc_trait_selection/src/traits/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/mod.rs @@ -826,7 +826,7 @@ pub fn vtable_trait_upcasting_coercion_new_vptr_slot( trait_ref, constness: ty::BoundConstness::NotConst, polarity: ty::ImplPolarity::Positive, - implicit: ty::ImplicitBound::No, + // implicit: ty::ImplicitBound::No, }), ); diff --git a/compiler/rustc_trait_selection/src/traits/query/type_op/prove_predicate.rs b/compiler/rustc_trait_selection/src/traits/query/type_op/prove_predicate.rs index 1be47bf78c989..081308ac73e05 100644 --- a/compiler/rustc_trait_selection/src/traits/query/type_op/prove_predicate.rs +++ b/compiler/rustc_trait_selection/src/traits/query/type_op/prove_predicate.rs @@ -16,9 +16,6 @@ impl<'tcx> super::QueryTypeOp<'tcx> for ProvePredicate<'tcx> { // we have to prove. No need to canonicalize and all that for // such cases. if let ty::PredicateKind::Trait(trait_ref) = key.value.predicate.kind().skip_binder() { - if trait_ref.implicit == ty::ImplicitBound::Yes { - return Some(()); - } if let Some(sized_def_id) = tcx.lang_items().sized_trait() { if trait_ref.def_id() == sized_def_id { if trait_ref.self_ty().is_trivially_sized(tcx) { diff --git a/compiler/rustc_trait_selection/src/traits/relationships.rs b/compiler/rustc_trait_selection/src/traits/relationships.rs index 6c75f75f2dcb5..6cce57786402c 100644 --- a/compiler/rustc_trait_selection/src/traits/relationships.rs +++ b/compiler/rustc_trait_selection/src/traits/relationships.rs @@ -45,7 +45,7 @@ pub(crate) fn update<'tcx, T>( trait_ref, constness: predicate.constness, polarity: predicate.polarity, - implicit: predicate.implicit, + // implicit: predicate.implicit, }) }) .to_predicate(infcx.tcx), diff --git a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs index 89d71ab33acfb..b537dd30fba8c 100644 --- a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs +++ b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs @@ -935,7 +935,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { }, constness: ty::BoundConstness::NotConst, polarity: ty::ImplPolarity::Positive, - implicit: ty::ImplicitBound::No, + // implicit: ty::ImplicitBound::No, })); copy_obligation.recursion_depth = depth + 1; self.assemble_candidates_from_impls(©_obligation, &mut new_candidates); @@ -952,7 +952,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { }, constness: ty::BoundConstness::ConstIfConst, polarity: ty::ImplPolarity::Positive, - implicit: ty::ImplicitBound::No, + // implicit: ty::ImplicitBound::No, })); let const_drop_stack = self.push_stack(obligation_stack.list(), &const_drop_obligation); diff --git a/compiler/rustc_trait_selection/src/traits/util.rs b/compiler/rustc_trait_selection/src/traits/util.rs index f2c7b7ecb4b07..90b032df392d7 100644 --- a/compiler/rustc_trait_selection/src/traits/util.rs +++ b/compiler/rustc_trait_selection/src/traits/util.rs @@ -237,10 +237,10 @@ pub fn predicates_for_generics<'tcx>( cause.span, cause.body_id, match predicate.kind().skip_binder() { - ty::PredicateKind::Trait(ty::TraitPredicate { - implicit: ty::ImplicitBound::Yes, - .. - }) => traits::ImplicitSizedObligation(def_id, span), + // ty::PredicateKind::Trait(ty::TraitPredicate { + // implicit: ty::ImplicitBound::Yes, + // .. + // }) => traits::ImplicitSizedObligation(def_id, span), _ => traits::BindingObligation(def_id, span), }, ), diff --git a/compiler/rustc_typeck/src/bounds.rs b/compiler/rustc_typeck/src/bounds.rs index 17459a491f5c5..df3001ab7d7d7 100644 --- a/compiler/rustc_typeck/src/bounds.rs +++ b/compiler/rustc_typeck/src/bounds.rs @@ -63,7 +63,7 @@ impl<'tcx> Bounds<'tcx> { }, constness: ty::BoundConstness::NotConst, polarity: ty::ImplPolarity::Positive, - implicit: ty::ImplicitBound::Yes, + // implicit: ty::ImplicitBound::Yes, })) .to_predicate(tcx); (pred, span) diff --git a/compiler/rustc_typeck/src/check/_match.rs b/compiler/rustc_typeck/src/check/_match.rs index d4112a149c8e6..bfd956e644d71 100644 --- a/compiler/rustc_typeck/src/check/_match.rs +++ b/compiler/rustc_typeck/src/check/_match.rs @@ -531,7 +531,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { }, constness: t.constness, polarity: t.polarity, - implicit: t.implicit, + // implicit: t.implicit, })); let obl = Obligation::new( o.cause.clone(), diff --git a/compiler/rustc_typeck/src/impl_wf_check/min_specialization.rs b/compiler/rustc_typeck/src/impl_wf_check/min_specialization.rs index 61169a6ca3636..6a41d8f775618 100644 --- a/compiler/rustc_typeck/src/impl_wf_check/min_specialization.rs +++ b/compiler/rustc_typeck/src/impl_wf_check/min_specialization.rs @@ -383,7 +383,7 @@ fn check_specialization_on<'tcx>(tcx: TyCtxt<'tcx>, predicate: ty::Predicate<'tc trait_ref, constness: ty::BoundConstness::NotConst, polarity: _, - implicit: _, + // implicit: _, }) => { if !matches!( trait_predicate_kind(tcx, predicate), @@ -416,7 +416,7 @@ fn trait_predicate_kind<'tcx>( trait_ref, constness: ty::BoundConstness::NotConst, polarity: _, - implicit: _, + // implicit: _, }) => Some(tcx.trait_def(trait_ref.def_id).specialization_kind), ty::PredicateKind::Trait(_) | ty::PredicateKind::RegionOutlives(_) diff --git a/src/test/ui/box/into-boxed-slice-fail.stderr b/src/test/ui/box/into-boxed-slice-fail.stderr index 18ad72a87e199..de654fdc1a4b5 100644 --- a/src/test/ui/box/into-boxed-slice-fail.stderr +++ b/src/test/ui/box/into-boxed-slice-fail.stderr @@ -7,7 +7,7 @@ LL | let _ = Box::into_boxed_slice(boxed_slice); | required by a bound introduced by this call | = help: the trait `Sized` is not implemented for `[u8]` -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `Box::::into_boxed_slice` --> $SRC_DIR/alloc/src/boxed.rs:LL:COL | LL | impl Box { @@ -31,7 +31,7 @@ LL | let _ = Box::into_boxed_slice(boxed_trait); | required by a bound introduced by this call | = help: the trait `Sized` is not implemented for `dyn Debug` -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `Box::::into_boxed_slice` --> $SRC_DIR/alloc/src/boxed.rs:LL:COL | LL | impl Box { diff --git a/src/test/ui/error-codes/E0275.stderr b/src/test/ui/error-codes/E0275.stderr index a4d01f65384c2..dfffbb182ad31 100644 --- a/src/test/ui/error-codes/E0275.stderr +++ b/src/test/ui/error-codes/E0275.stderr @@ -1,21 +1,16 @@ -error[E0275]: overflow evaluating the requirement `Bar>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Sized` +error[E0275]: overflow evaluating the requirement `Bar>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Foo` --> $DIR/E0275.rs:5:33 | LL | impl Foo for T where Bar: Foo {} | ^^^ | = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`E0275`) -note: required because it appears within the type `Bar>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` - --> $DIR/E0275.rs:3:8 - | -LL | struct Bar(T); - | ^^^ -note: required because of the requirements on the impl of `Foo` for `Bar>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` +note: required because of the requirements on the impl of `Foo` for `Bar>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` --> $DIR/E0275.rs:5:9 | LL | impl Foo for T where Bar: Foo {} | ^^^ ^ - = note: 126 redundant requirements hidden + = note: 127 redundant requirements hidden = note: required because of the requirements on the impl of `Foo` for `Bar` error: aborting due to previous error diff --git a/src/test/ui/extern/extern-types-unsized.stderr b/src/test/ui/extern/extern-types-unsized.stderr index 41b67ebfa50d1..8d6713261d5ec 100644 --- a/src/test/ui/extern/extern-types-unsized.stderr +++ b/src/test/ui/extern/extern-types-unsized.stderr @@ -5,7 +5,7 @@ LL | assert_sized::(); | ^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `A` -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `assert_sized` --> $DIR/extern-types-unsized.rs:19:17 | LL | fn assert_sized() {} @@ -27,7 +27,7 @@ note: required because it appears within the type `Foo` | LL | struct Foo { | ^^^ -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `assert_sized` --> $DIR/extern-types-unsized.rs:19:17 | LL | fn assert_sized() {} @@ -49,7 +49,7 @@ note: required because it appears within the type `Bar` | LL | struct Bar { | ^^^ -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `assert_sized` --> $DIR/extern-types-unsized.rs:19:17 | LL | fn assert_sized() {} @@ -71,7 +71,7 @@ note: required because it appears within the type `Bar` | LL | struct Bar { | ^^^ -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `assert_sized` --> $DIR/extern-types-unsized.rs:19:17 | LL | fn assert_sized() {} diff --git a/src/test/ui/generic-associated-types/projection-bound-cycle-generic.stderr b/src/test/ui/generic-associated-types/projection-bound-cycle-generic.stderr index a1b0264e04a78..2b57c439fe9a0 100644 --- a/src/test/ui/generic-associated-types/projection-bound-cycle-generic.stderr +++ b/src/test/ui/generic-associated-types/projection-bound-cycle-generic.stderr @@ -5,10 +5,10 @@ LL | type Assoc = OnlySized<::Item>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: required by a bound in `OnlySized` - --> $DIR/projection-bound-cycle-generic.rs:28:30 + --> $DIR/projection-bound-cycle-generic.rs:28:18 | LL | struct OnlySized where T: Sized { f: T } - | ^^^^^ required by this bound in `OnlySized` + | ^ required by this bound in `OnlySized` error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/projection-bound-cycle.stderr b/src/test/ui/generic-associated-types/projection-bound-cycle.stderr index 38b5164d79c9c..d9d0bf4274bd7 100644 --- a/src/test/ui/generic-associated-types/projection-bound-cycle.stderr +++ b/src/test/ui/generic-associated-types/projection-bound-cycle.stderr @@ -5,10 +5,10 @@ LL | type Assoc = OnlySized<::Item>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: required by a bound in `OnlySized` - --> $DIR/projection-bound-cycle.rs:30:30 + --> $DIR/projection-bound-cycle.rs:30:18 | LL | struct OnlySized where T: Sized { f: T } - | ^^^^^ required by this bound in `OnlySized` + | ^ required by this bound in `OnlySized` error: aborting due to previous error diff --git a/src/test/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr b/src/test/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr index 50f90618e4db7..2c397d80b013e 100644 --- a/src/test/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr +++ b/src/test/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr @@ -6,10 +6,10 @@ LL | impl Tsized for () {} | = help: the trait `Sized` is not implemented for `[()]` note: required by a bound in `Tsized` - --> $DIR/issue-61631-default-type-param-can-reference-self-in-trait.rs:17:17 + --> $DIR/issue-61631-default-type-param-can-reference-self-in-trait.rs:17:14 | LL | trait Tsized {} - | ^^^^^ required by this bound in `Tsized` + | ^ required by this bound in `Tsized` error: aborting due to previous error diff --git a/src/test/ui/higher-rank-trait-bounds/issue-60283.stderr b/src/test/ui/higher-rank-trait-bounds/issue-60283.stderr index 4b46f5d16a2d5..34893cd8f19d9 100644 --- a/src/test/ui/higher-rank-trait-bounds/issue-60283.stderr +++ b/src/test/ui/higher-rank-trait-bounds/issue-60283.stderr @@ -26,7 +26,7 @@ LL | foo((), drop) | required by a bound introduced by this call | = help: the trait `Sized` is not implemented for `<() as Trait<'_>>::Item` -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `std::mem::drop` --> $SRC_DIR/core/src/mem/mod.rs:LL:COL | LL | pub fn drop(_x: T) {} diff --git a/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-62529-1.stderr b/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-62529-1.stderr index ffb9a0dc2425a..01b14660b6531 100644 --- a/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-62529-1.stderr +++ b/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-62529-1.stderr @@ -14,7 +14,7 @@ LL | | )); | |_____^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `impl Execute` -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `task` --> $DIR/issue-62529-1.rs:69:9 | LL | fn task

(processor: P) -> Task diff --git a/src/test/ui/inference/cannot-infer-partial-try-return.stderr b/src/test/ui/inference/cannot-infer-partial-try-return.stderr index 70eac527fd89c..3542eb6848caf 100644 --- a/src/test/ui/inference/cannot-infer-partial-try-return.stderr +++ b/src/test/ui/inference/cannot-infer-partial-try-return.stderr @@ -1,8 +1,8 @@ error[E0282]: type annotations needed for the closure `fn() -> Result<(), QualifiedError<_>>` - --> $DIR/cannot-infer-partial-try-return.rs:18:19 + --> $DIR/cannot-infer-partial-try-return.rs:19:9 | -LL | let x = || -> Result<_, QualifiedError<_>> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type +LL | infallible()?; + | ^^^^^^^^^^^^^ cannot infer type | help: give this closure an explicit return type without `_` placeholders | diff --git a/src/test/ui/issues/issue-17651.stderr b/src/test/ui/issues/issue-17651.stderr index a68a9c9c59bd7..efaaeeda2fab6 100644 --- a/src/test/ui/issues/issue-17651.stderr +++ b/src/test/ui/issues/issue-17651.stderr @@ -7,7 +7,7 @@ LL | (|| Box::new(*(&[0][..])))(); | required by a bound introduced by this call | = help: the trait `Sized` is not implemented for `[{integer}]` -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `Box::::new` --> $SRC_DIR/alloc/src/boxed.rs:LL:COL | LL | impl Box { diff --git a/src/test/ui/issues/issue-20413.stderr b/src/test/ui/issues/issue-20413.stderr index 15666410098a0..2935214140419 100644 --- a/src/test/ui/issues/issue-20413.stderr +++ b/src/test/ui/issues/issue-20413.stderr @@ -37,104 +37,84 @@ LL | impl Foo for T where NoData: Foo { = note: 127 redundant requirements hidden = note: required because of the requirements on the impl of `Foo` for `NoData` -error[E0275]: overflow evaluating the requirement `AlmostNoData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Sized` +error[E0275]: overflow evaluating the requirement `EvenLessData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Baz` --> $DIR/issue-20413.rs:28:42 | LL | impl Bar for T where EvenLessData: Baz { | ^^^ | = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`) -note: required because it appears within the type `EvenLessData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` - --> $DIR/issue-20413.rs:26:8 +note: required because of the requirements on the impl of `Bar` for `AlmostNoData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` + --> $DIR/issue-20413.rs:28:9 | -LL | struct EvenLessData(Option); - | ^^^^^^^^^^^^ +LL | impl Bar for T where EvenLessData: Baz { + | ^^^ ^ note: required because of the requirements on the impl of `Baz` for `EvenLessData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` --> $DIR/issue-20413.rs:36:9 | LL | impl Baz for T where AlmostNoData: Bar { | ^^^ ^ -note: required because of the requirements on the impl of `Bar` for `AlmostNoData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` - --> $DIR/issue-20413.rs:28:9 - | -LL | impl Bar for T where EvenLessData: Baz { - | ^^^ ^ - = note: 125 redundant requirements hidden + = note: 126 redundant requirements hidden = note: required because of the requirements on the impl of `Baz` for `EvenLessData` -error[E0275]: overflow evaluating the requirement `AlmostNoData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Sized` +error[E0275]: overflow evaluating the requirement `EvenLessData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Baz` --> $DIR/issue-20413.rs:28:42 | LL | impl Bar for T where EvenLessData: Baz { | ^^^ | = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`) -note: required because it appears within the type `EvenLessData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` - --> $DIR/issue-20413.rs:26:8 +note: required because of the requirements on the impl of `Bar` for `AlmostNoData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` + --> $DIR/issue-20413.rs:28:9 | -LL | struct EvenLessData(Option); - | ^^^^^^^^^^^^ +LL | impl Bar for T where EvenLessData: Baz { + | ^^^ ^ note: required because of the requirements on the impl of `Baz` for `EvenLessData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` --> $DIR/issue-20413.rs:36:9 | LL | impl Baz for T where AlmostNoData: Bar { | ^^^ ^ -note: required because of the requirements on the impl of `Bar` for `AlmostNoData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` - --> $DIR/issue-20413.rs:28:9 - | -LL | impl Bar for T where EvenLessData: Baz { - | ^^^ ^ - = note: 125 redundant requirements hidden + = note: 126 redundant requirements hidden = note: required because of the requirements on the impl of `Baz` for `EvenLessData` -error[E0275]: overflow evaluating the requirement `EvenLessData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Sized` +error[E0275]: overflow evaluating the requirement `AlmostNoData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Bar` --> $DIR/issue-20413.rs:36:42 | LL | impl Baz for T where AlmostNoData: Bar { | ^^^ | = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`) -note: required because it appears within the type `AlmostNoData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` - --> $DIR/issue-20413.rs:24:8 +note: required because of the requirements on the impl of `Baz` for `EvenLessData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` + --> $DIR/issue-20413.rs:36:9 | -LL | struct AlmostNoData(Option); - | ^^^^^^^^^^^^ +LL | impl Baz for T where AlmostNoData: Bar { + | ^^^ ^ note: required because of the requirements on the impl of `Bar` for `AlmostNoData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` --> $DIR/issue-20413.rs:28:9 | LL | impl Bar for T where EvenLessData: Baz { | ^^^ ^ -note: required because of the requirements on the impl of `Baz` for `EvenLessData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` - --> $DIR/issue-20413.rs:36:9 - | -LL | impl Baz for T where AlmostNoData: Bar { - | ^^^ ^ - = note: 125 redundant requirements hidden + = note: 126 redundant requirements hidden = note: required because of the requirements on the impl of `Bar` for `AlmostNoData` -error[E0275]: overflow evaluating the requirement `EvenLessData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Sized` +error[E0275]: overflow evaluating the requirement `AlmostNoData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Bar` --> $DIR/issue-20413.rs:36:42 | LL | impl Baz for T where AlmostNoData: Bar { | ^^^ | = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`) -note: required because it appears within the type `AlmostNoData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` - --> $DIR/issue-20413.rs:24:8 +note: required because of the requirements on the impl of `Baz` for `EvenLessData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` + --> $DIR/issue-20413.rs:36:9 | -LL | struct AlmostNoData(Option); - | ^^^^^^^^^^^^ +LL | impl Baz for T where AlmostNoData: Bar { + | ^^^ ^ note: required because of the requirements on the impl of `Bar` for `AlmostNoData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` --> $DIR/issue-20413.rs:28:9 | LL | impl Bar for T where EvenLessData: Baz { | ^^^ ^ -note: required because of the requirements on the impl of `Baz` for `EvenLessData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` - --> $DIR/issue-20413.rs:36:9 - | -LL | impl Baz for T where AlmostNoData: Bar { - | ^^^ ^ - = note: 125 redundant requirements hidden + = note: 126 redundant requirements hidden = note: required because of the requirements on the impl of `Bar` for `AlmostNoData` error: aborting due to 7 previous errors diff --git a/src/test/ui/issues/issue-87199.stderr b/src/test/ui/issues/issue-87199.stderr index 2bca376e4e4b3..0ec5e73f39a85 100644 --- a/src/test/ui/issues/issue-87199.stderr +++ b/src/test/ui/issues/issue-87199.stderr @@ -25,7 +25,7 @@ LL | ref_arg::<[i32]>(&[5]); | required by a bound introduced by this call | = help: the trait `Sized` is not implemented for `[i32]` -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `ref_arg` --> $DIR/issue-87199.rs:10:12 | LL | fn ref_arg(_: &T) {} diff --git a/src/test/ui/range/range-1.stderr b/src/test/ui/range/range-1.stderr index 1d82e3c3e177b..2ce4e1553d28e 100644 --- a/src/test/ui/range/range-1.stderr +++ b/src/test/ui/range/range-1.stderr @@ -20,24 +20,13 @@ LL | let range = *arr..; | ^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[{integer}]` -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `RangeFrom` --> $SRC_DIR/core/src/ops/range.rs:LL:COL | LL | pub struct RangeFrom { | ^^^ required by this bound in `RangeFrom` -error[E0277]: the size for values of type `[{integer}]` cannot be known at compilation time - --> $DIR/range-1.rs:14:9 - | -LL | let range = *arr..; - | ^^^^^ doesn't have a size known at compile-time - | - = help: within `RangeFrom<[{integer}]>`, the trait `Sized` is not implemented for `[{integer}]` - = note: required because it appears within the type `RangeFrom<[{integer}]>` - = note: all local variables must have a statically known size - = help: unsized locals are gated as an unstable feature - -error: aborting due to 4 previous errors +error: aborting due to 3 previous errors Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/str/str-mut-idx.stderr b/src/test/ui/str/str-mut-idx.stderr index a87681ded1954..2559ee9eb49b2 100644 --- a/src/test/ui/str/str-mut-idx.stderr +++ b/src/test/ui/str/str-mut-idx.stderr @@ -5,7 +5,7 @@ LL | s[1..2] = bot(); | ^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `str` -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `bot` --> $DIR/str-mut-idx.rs:1:8 | LL | fn bot() -> T { loop {} } diff --git a/src/test/ui/suggestions/bound-suggestions.stderr b/src/test/ui/suggestions/bound-suggestions.stderr index 11bc913fb91b8..04f233a1e87af 100644 --- a/src/test/ui/suggestions/bound-suggestions.stderr +++ b/src/test/ui/suggestions/bound-suggestions.stderr @@ -76,7 +76,7 @@ error[E0277]: the size for values of type `Self` cannot be known at compilation LL | const SIZE: usize = core::mem::size_of::(); | ^^^^ doesn't have a size known at compile-time | -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `std::mem::size_of` --> $SRC_DIR/core/src/mem/mod.rs:LL:COL | LL | pub const fn size_of() -> usize { @@ -92,7 +92,7 @@ error[E0277]: the size for values of type `Self` cannot be known at compilation LL | const SIZE: usize = core::mem::size_of::(); | ^^^^ doesn't have a size known at compile-time | -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `std::mem::size_of` --> $SRC_DIR/core/src/mem/mod.rs:LL:COL | LL | pub const fn size_of() -> usize { @@ -108,7 +108,7 @@ error[E0277]: the size for values of type `Self` cannot be known at compilation LL | const SIZE: usize = core::mem::size_of::(); | ^^^^ doesn't have a size known at compile-time | -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `std::mem::size_of` --> $SRC_DIR/core/src/mem/mod.rs:LL:COL | LL | pub const fn size_of() -> usize { @@ -124,7 +124,7 @@ error[E0277]: the size for values of type `Self` cannot be known at compilation LL | const SIZE: usize = core::mem::size_of::(); | ^^^^ doesn't have a size known at compile-time | -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `std::mem::size_of` --> $SRC_DIR/core/src/mem/mod.rs:LL:COL | LL | pub const fn size_of() -> usize { @@ -140,7 +140,7 @@ error[E0277]: the size for values of type `Self` cannot be known at compilation LL | const SIZE: usize = core::mem::size_of::(); | ^^^^ doesn't have a size known at compile-time | -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `std::mem::size_of` --> $SRC_DIR/core/src/mem/mod.rs:LL:COL | LL | pub const fn size_of() -> usize { diff --git a/src/test/ui/suggestions/issue-84973-blacklist.stderr b/src/test/ui/suggestions/issue-84973-blacklist.stderr index aca88293d2b63..ae55c96702ada 100644 --- a/src/test/ui/suggestions/issue-84973-blacklist.stderr +++ b/src/test/ui/suggestions/issue-84973-blacklist.stderr @@ -48,7 +48,7 @@ LL | f_sized(*ref_cl); | required by a bound introduced by this call | = help: the trait `Sized` is not implemented for `dyn Fn()` -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `f_sized` --> $DIR/issue-84973-blacklist.rs:9:12 | LL | fn f_sized(t: T) {} diff --git a/src/test/ui/suggestions/issue-85945-check-where-clause-before-suggesting-unsized.stderr b/src/test/ui/suggestions/issue-85945-check-where-clause-before-suggesting-unsized.stderr index 981b210c13613..92be9f764cc4b 100644 --- a/src/test/ui/suggestions/issue-85945-check-where-clause-before-suggesting-unsized.stderr +++ b/src/test/ui/suggestions/issue-85945-check-where-clause-before-suggesting-unsized.stderr @@ -7,7 +7,7 @@ LL | fn bar() { foo(""); } | required by a bound introduced by this call | = help: the trait `Sized` is not implemented for `str` -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `foo` --> $DIR/issue-85945-check-where-clause-before-suggesting-unsized.rs:3:8 | LL | fn foo(_: &T) where T: Sized {} diff --git a/src/test/ui/traits/bad-sized.stderr b/src/test/ui/traits/bad-sized.stderr index 27d568b7c0bea..6f9113fff5161 100644 --- a/src/test/ui/traits/bad-sized.stderr +++ b/src/test/ui/traits/bad-sized.stderr @@ -29,7 +29,7 @@ LL | let x: Vec = Vec::new(); | ^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `dyn Trait` -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `Vec::::new` --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL | LL | impl Vec { diff --git a/src/test/ui/traits/mutual-recursion-issue-75860.stderr b/src/test/ui/traits/mutual-recursion-issue-75860.stderr index aa229cc4256ee..920f66121e098 100644 --- a/src/test/ui/traits/mutual-recursion-issue-75860.stderr +++ b/src/test/ui/traits/mutual-recursion-issue-75860.stderr @@ -5,7 +5,6 @@ LL | iso(left, right) | ^^^ | = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`mutual_recursion_issue_75860`) - = note: required because it appears within the type `Option>` note: required by a bound in `Option` --> $SRC_DIR/core/src/option.rs:LL:COL | diff --git a/src/test/ui/traits/suggest-where-clause.stderr b/src/test/ui/traits/suggest-where-clause.stderr index 5f6bb89542231..e2cdd368888a8 100644 --- a/src/test/ui/traits/suggest-where-clause.stderr +++ b/src/test/ui/traits/suggest-where-clause.stderr @@ -7,7 +7,7 @@ LL | // suggest a where-clause, if needed LL | mem::size_of::(); | ^ doesn't have a size known at compile-time | -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `std::mem::size_of` --> $SRC_DIR/core/src/mem/mod.rs:LL:COL | LL | pub const fn size_of() -> usize { @@ -32,7 +32,7 @@ note: required because it appears within the type `Misc` | LL | struct Misc(T); | ^^^^ -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `std::mem::size_of` --> $SRC_DIR/core/src/mem/mod.rs:LL:COL | LL | pub const fn size_of() -> usize { @@ -78,7 +78,7 @@ LL | mem::size_of::<[T]>(); | ^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[T]` -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `std::mem::size_of` --> $SRC_DIR/core/src/mem/mod.rs:LL:COL | LL | pub const fn size_of() -> usize { @@ -91,7 +91,7 @@ LL | mem::size_of::<[&U]>(); | ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[&U]` -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `std::mem::size_of` --> $SRC_DIR/core/src/mem/mod.rs:LL:COL | LL | pub const fn size_of() -> usize { diff --git a/src/test/ui/unsized/unsized-bare-typaram.stderr b/src/test/ui/unsized/unsized-bare-typaram.stderr index fe997ea4d8b1d..531e9b4c9c955 100644 --- a/src/test/ui/unsized/unsized-bare-typaram.stderr +++ b/src/test/ui/unsized/unsized-bare-typaram.stderr @@ -6,7 +6,7 @@ LL | fn foo() { bar::() } | | | this type parameter needs to be `std::marker::Sized` | -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `bar` --> $DIR/unsized-bare-typaram.rs:1:8 | LL | fn bar() { } diff --git a/src/test/ui/unsized/unsized-struct.stderr b/src/test/ui/unsized/unsized-struct.stderr index daa3088fa8c8a..1c70a840c77dc 100644 --- a/src/test/ui/unsized/unsized-struct.stderr +++ b/src/test/ui/unsized/unsized-struct.stderr @@ -37,7 +37,7 @@ note: required because it appears within the type `Bar` | LL | struct Bar { data: T } | ^^^ -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `is_sized` --> $DIR/unsized-struct.rs:1:13 | LL | fn is_sized() { } diff --git a/src/test/ui/unsized/unsized3.stderr b/src/test/ui/unsized/unsized3.stderr index 42636a7765686..ae89f2f997728 100644 --- a/src/test/ui/unsized/unsized3.stderr +++ b/src/test/ui/unsized/unsized3.stderr @@ -8,7 +8,7 @@ LL | f2::(x); | | | required by a bound introduced by this call | -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `f2` --> $DIR/unsized3.rs:10:7 | LL | fn f2(x: &X) { @@ -33,7 +33,7 @@ LL | f4::(x); | | | required by a bound introduced by this call | -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `f4` --> $DIR/unsized3.rs:21:7 | LL | fn f4(x: &X) { @@ -63,7 +63,7 @@ note: required because it appears within the type `S` | LL | struct S { | ^ -note: type parameters have an implicit `Sized` obligation +note: required by a bound in `f5` --> $DIR/unsized3.rs:24:7 | LL | fn f5(x: &Y) {}