Skip to content

Commit 979937e

Browse files
committed
remove implicit field
1 parent d445c12 commit 979937e

40 files changed

+122
-162
lines changed

compiler/rustc_borrowck/src/type_check/canonical.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
9595
trait_ref,
9696
constness: ty::BoundConstness::NotConst,
9797
polarity: ty::ImplPolarity::Positive,
98-
implicit: ty::ImplicitBound::No,
98+
// implicit: ty::ImplicitBound::No,
9999
}))),
100100
locations,
101101
category,

compiler/rustc_const_eval/src/transform/check_consts/check.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ impl Visitor<'tcx> for Checker<'mir, 'tcx> {
813813
trait_ref,
814814
constness: ty::BoundConstness::ConstIfConst,
815815
polarity: ty::ImplPolarity::Positive,
816-
implicit: ty::ImplicitBound::No,
816+
// implicit: ty::ImplicitBound::No,
817817
}),
818818
);
819819

compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ impl Qualif for NeedsNonConstDrop {
162162
trait_ref,
163163
constness: ty::BoundConstness::ConstIfConst,
164164
polarity: ty::ImplPolarity::Positive,
165-
implicit: ty::ImplicitBound::No,
165+
// implicit: ty::ImplicitBound::No,
166166
}),
167167
);
168168

compiler/rustc_middle/src/ty/mod.rs

+22-22
Original file line numberDiff line numberDiff line change
@@ -165,24 +165,24 @@ pub struct ImplHeader<'tcx> {
165165
pub predicates: Vec<Predicate<'tcx>>,
166166
}
167167

168-
#[derive(
169-
Copy,
170-
Clone,
171-
PartialEq,
172-
Eq,
173-
Hash,
174-
TyEncodable,
175-
TyDecodable,
176-
HashStable,
177-
Debug,
178-
TypeFoldable
179-
)]
180-
pub enum ImplicitBound {
181-
/// `T: Trait`
182-
No,
183-
/// implicit `T: Sized`
184-
Yes,
185-
}
168+
// #[derive(
169+
// Copy,
170+
// Clone,
171+
// PartialEq,
172+
// Eq,
173+
// Hash,
174+
// TyEncodable,
175+
// TyDecodable,
176+
// HashStable,
177+
// Debug,
178+
// TypeFoldable
179+
// )]
180+
// pub enum ImplicitBound {
181+
// /// `T: Trait`
182+
// No,
183+
// /// implicit `T: Sized`
184+
// Yes,
185+
// }
186186

187187
#[derive(
188188
Copy,
@@ -541,12 +541,12 @@ impl<'tcx> Predicate<'tcx> {
541541
trait_ref,
542542
constness,
543543
polarity,
544-
implicit,
544+
// implicit,
545545
}) => Some(PredicateKind::Trait(TraitPredicate {
546546
trait_ref,
547547
constness,
548548
polarity: polarity.flip()?,
549-
implicit,
549+
// implicit,
550550
})),
551551

552552
_ => None,
@@ -753,7 +753,7 @@ pub struct TraitPredicate<'tcx> {
753753

754754
pub polarity: ImplPolarity,
755755

756-
pub implicit: ImplicitBound,
756+
// pub implicit: ImplicitBound,
757757
}
758758

759759
pub type PolyTraitPredicate<'tcx> = ty::Binder<'tcx, TraitPredicate<'tcx>>;
@@ -1450,7 +1450,7 @@ impl PolyTraitRef<'tcx> {
14501450
trait_ref,
14511451
constness,
14521452
polarity: ty::ImplPolarity::Positive,
1453-
implicit: ty::ImplicitBound::No,
1453+
// implicit: ty::ImplicitBound::No,
14541454
})
14551455
}
14561456
#[inline]

compiler/rustc_middle/src/ty/relate.rs

+15-15
Original file line numberDiff line numberDiff line change
@@ -788,20 +788,20 @@ impl<'tcx> Relate<'tcx> for GenericArg<'tcx> {
788788
}
789789
}
790790

791-
impl<'tcx> Relate<'tcx> for ty::ImplicitBound {
792-
fn relate<R: TypeRelation<'tcx>>(
793-
_relation: &mut R,
794-
a: ty::ImplicitBound,
795-
b: ty::ImplicitBound,
796-
) -> RelateResult<'tcx, ty::ImplicitBound> {
797-
match (a, b) {
798-
(ty::ImplicitBound::No, ty::ty::ImplicitBound::No) => Ok(ty::ImplicitBound::No),
799-
(ty::ImplicitBound::Yes, ty::ty::ImplicitBound::Yes)
800-
| (ty::ImplicitBound::Yes, ty::ty::ImplicitBound::No)
801-
| (ty::ImplicitBound::No, ty::ty::ImplicitBound::Yes) => Ok(ty::ImplicitBound::Yes),
802-
}
803-
}
804-
}
791+
// impl<'tcx> Relate<'tcx> for ty::ImplicitBound {
792+
// fn relate<R: TypeRelation<'tcx>>(
793+
// _relation: &mut R,
794+
// a: ty::ImplicitBound,
795+
// b: ty::ImplicitBound,
796+
// ) -> RelateResult<'tcx, ty::ImplicitBound> {
797+
// match (a, b) {
798+
// (ty::ImplicitBound::No, ty::ty::ImplicitBound::No) => Ok(ty::ImplicitBound::No),
799+
// (ty::ImplicitBound::Yes, ty::ty::ImplicitBound::Yes)
800+
// | (ty::ImplicitBound::Yes, ty::ty::ImplicitBound::No)
801+
// | (ty::ImplicitBound::No, ty::ty::ImplicitBound::Yes) => Ok(ty::ImplicitBound::Yes),
802+
// }
803+
// }
804+
// }
805805

806806
impl<'tcx> Relate<'tcx> for ty::ImplPolarity {
807807
fn relate<R: TypeRelation<'tcx>>(
@@ -827,7 +827,7 @@ impl<'tcx> Relate<'tcx> for ty::TraitPredicate<'tcx> {
827827
trait_ref: relation.relate(a.trait_ref, b.trait_ref)?,
828828
constness: relation.relate(a.constness, b.constness)?,
829829
polarity: relation.relate(a.polarity, b.polarity)?,
830-
implicit: relation.relate(a.implicit, b.implicit)?,
830+
// implicit: relation.relate(a.implicit, b.implicit)?,
831831
})
832832
}
833833
}

compiler/rustc_middle/src/ty/structural_impls.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ impl<'a, 'tcx> Lift<'tcx> for ty::TraitPredicate<'a> {
369369
trait_ref,
370370
constness: self.constness,
371371
polarity: self.polarity,
372-
implicit: ty::ImplicitBound::No,
372+
// implicit: ty::ImplicitBound::No,
373373
})
374374
}
375375
}

compiler/rustc_middle/src/ty/sty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ impl<'tcx> PolyTraitRef<'tcx> {
944944
trait_ref,
945945
constness: ty::BoundConstness::NotConst,
946946
polarity: ty::ImplPolarity::Positive,
947-
implicit: ty::ImplicitBound::No,
947+
// implicit: ty::ImplicitBound::No,
948948
})
949949
}
950950
}

compiler/rustc_privacy/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ where
128128
trait_ref,
129129
constness: _,
130130
polarity: _,
131-
implicit: _,
131+
// implicit: _,
132132
}) => self.visit_trait(trait_ref),
133133
ty::PredicateKind::Projection(ty::ProjectionPredicate { projection_ty, ty }) => {
134134
ty.visit_with(self)?;

compiler/rustc_trait_selection/src/traits/auto_trait.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ impl AutoTraitFinder<'tcx> {
290290
constness: ty::BoundConstness::NotConst,
291291
// Auto traits are positive
292292
polarity: ty::ImplPolarity::Positive,
293-
implicit: ty::ImplicitBound::No,
293+
// implicit: ty::ImplicitBound::No,
294294
}));
295295

296296
let computed_preds = param_env.caller_bounds().iter();

compiler/rustc_trait_selection/src/traits/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ pub fn vtable_trait_upcasting_coercion_new_vptr_slot(
826826
trait_ref,
827827
constness: ty::BoundConstness::NotConst,
828828
polarity: ty::ImplPolarity::Positive,
829-
implicit: ty::ImplicitBound::No,
829+
// implicit: ty::ImplicitBound::No,
830830
}),
831831
);
832832

compiler/rustc_trait_selection/src/traits/query/type_op/prove_predicate.rs

-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ impl<'tcx> super::QueryTypeOp<'tcx> for ProvePredicate<'tcx> {
1616
// we have to prove. No need to canonicalize and all that for
1717
// such cases.
1818
if let ty::PredicateKind::Trait(trait_ref) = key.value.predicate.kind().skip_binder() {
19-
if trait_ref.implicit == ty::ImplicitBound::Yes {
20-
return Some(());
21-
}
2219
if let Some(sized_def_id) = tcx.lang_items().sized_trait() {
2320
if trait_ref.def_id() == sized_def_id {
2421
if trait_ref.self_ty().is_trivially_sized(tcx) {

compiler/rustc_trait_selection/src/traits/relationships.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub(crate) fn update<'tcx, T>(
4545
trait_ref,
4646
constness: predicate.constness,
4747
polarity: predicate.polarity,
48-
implicit: predicate.implicit,
48+
// implicit: predicate.implicit,
4949
})
5050
})
5151
.to_predicate(infcx.tcx),

compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
935935
},
936936
constness: ty::BoundConstness::NotConst,
937937
polarity: ty::ImplPolarity::Positive,
938-
implicit: ty::ImplicitBound::No,
938+
// implicit: ty::ImplicitBound::No,
939939
}));
940940
copy_obligation.recursion_depth = depth + 1;
941941
self.assemble_candidates_from_impls(&copy_obligation, &mut new_candidates);
@@ -952,7 +952,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
952952
},
953953
constness: ty::BoundConstness::ConstIfConst,
954954
polarity: ty::ImplPolarity::Positive,
955-
implicit: ty::ImplicitBound::No,
955+
// implicit: ty::ImplicitBound::No,
956956
}));
957957

958958
let const_drop_stack = self.push_stack(obligation_stack.list(), &const_drop_obligation);

compiler/rustc_trait_selection/src/traits/util.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,10 @@ pub fn predicates_for_generics<'tcx>(
237237
cause.span,
238238
cause.body_id,
239239
match predicate.kind().skip_binder() {
240-
ty::PredicateKind::Trait(ty::TraitPredicate {
241-
implicit: ty::ImplicitBound::Yes,
242-
..
243-
}) => traits::ImplicitSizedObligation(def_id, span),
240+
// ty::PredicateKind::Trait(ty::TraitPredicate {
241+
// implicit: ty::ImplicitBound::Yes,
242+
// ..
243+
// }) => traits::ImplicitSizedObligation(def_id, span),
244244
_ => traits::BindingObligation(def_id, span),
245245
},
246246
),

compiler/rustc_typeck/src/bounds.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ impl<'tcx> Bounds<'tcx> {
6363
},
6464
constness: ty::BoundConstness::NotConst,
6565
polarity: ty::ImplPolarity::Positive,
66-
implicit: ty::ImplicitBound::Yes,
66+
// implicit: ty::ImplicitBound::Yes,
6767
}))
6868
.to_predicate(tcx);
6969
(pred, span)

compiler/rustc_typeck/src/check/_match.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
531531
},
532532
constness: t.constness,
533533
polarity: t.polarity,
534-
implicit: t.implicit,
534+
// implicit: t.implicit,
535535
}));
536536
let obl = Obligation::new(
537537
o.cause.clone(),

compiler/rustc_typeck/src/impl_wf_check/min_specialization.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ fn check_specialization_on<'tcx>(tcx: TyCtxt<'tcx>, predicate: ty::Predicate<'tc
383383
trait_ref,
384384
constness: ty::BoundConstness::NotConst,
385385
polarity: _,
386-
implicit: _,
386+
// implicit: _,
387387
}) => {
388388
if !matches!(
389389
trait_predicate_kind(tcx, predicate),
@@ -416,7 +416,7 @@ fn trait_predicate_kind<'tcx>(
416416
trait_ref,
417417
constness: ty::BoundConstness::NotConst,
418418
polarity: _,
419-
implicit: _,
419+
// implicit: _,
420420
}) => Some(tcx.trait_def(trait_ref.def_id).specialization_kind),
421421
ty::PredicateKind::Trait(_)
422422
| ty::PredicateKind::RegionOutlives(_)

src/test/ui/box/into-boxed-slice-fail.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | let _ = Box::into_boxed_slice(boxed_slice);
77
| required by a bound introduced by this call
88
|
99
= help: the trait `Sized` is not implemented for `[u8]`
10-
note: type parameters have an implicit `Sized` obligation
10+
note: required by a bound in `Box::<T, A>::into_boxed_slice`
1111
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
1212
|
1313
LL | impl<T, A: Allocator> Box<T, A> {
@@ -31,7 +31,7 @@ LL | let _ = Box::into_boxed_slice(boxed_trait);
3131
| required by a bound introduced by this call
3232
|
3333
= help: the trait `Sized` is not implemented for `dyn Debug`
34-
note: type parameters have an implicit `Sized` obligation
34+
note: required by a bound in `Box::<T, A>::into_boxed_slice`
3535
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
3636
|
3737
LL | impl<T, A: Allocator> Box<T, A> {

src/test/ui/error-codes/E0275.stderr

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
1-
error[E0275]: overflow evaluating the requirement `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Sized`
1+
error[E0275]: overflow evaluating the requirement `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Foo`
22
--> $DIR/E0275.rs:5:33
33
|
44
LL | impl<T> Foo for T where Bar<T>: Foo {}
55
| ^^^
66
|
77
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`E0275`)
8-
note: required because it appears within the type `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
9-
--> $DIR/E0275.rs:3:8
10-
|
11-
LL | struct Bar<T>(T);
12-
| ^^^
13-
note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
8+
note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
149
--> $DIR/E0275.rs:5:9
1510
|
1611
LL | impl<T> Foo for T where Bar<T>: Foo {}
1712
| ^^^ ^
18-
= note: 126 redundant requirements hidden
13+
= note: 127 redundant requirements hidden
1914
= note: required because of the requirements on the impl of `Foo` for `Bar<T>`
2015

2116
error: aborting due to previous error

src/test/ui/extern/extern-types-unsized.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | assert_sized::<A>();
55
| ^ doesn't have a size known at compile-time
66
|
77
= help: the trait `Sized` is not implemented for `A`
8-
note: type parameters have an implicit `Sized` obligation
8+
note: required by a bound in `assert_sized`
99
--> $DIR/extern-types-unsized.rs:19:17
1010
|
1111
LL | fn assert_sized<T>() {}
@@ -27,7 +27,7 @@ note: required because it appears within the type `Foo`
2727
|
2828
LL | struct Foo {
2929
| ^^^
30-
note: type parameters have an implicit `Sized` obligation
30+
note: required by a bound in `assert_sized`
3131
--> $DIR/extern-types-unsized.rs:19:17
3232
|
3333
LL | fn assert_sized<T>() {}
@@ -49,7 +49,7 @@ note: required because it appears within the type `Bar<A>`
4949
|
5050
LL | struct Bar<T: ?Sized> {
5151
| ^^^
52-
note: type parameters have an implicit `Sized` obligation
52+
note: required by a bound in `assert_sized`
5353
--> $DIR/extern-types-unsized.rs:19:17
5454
|
5555
LL | fn assert_sized<T>() {}
@@ -71,7 +71,7 @@ note: required because it appears within the type `Bar<A>`
7171
|
7272
LL | struct Bar<T: ?Sized> {
7373
| ^^^
74-
note: type parameters have an implicit `Sized` obligation
74+
note: required by a bound in `assert_sized`
7575
--> $DIR/extern-types-unsized.rs:19:17
7676
|
7777
LL | fn assert_sized<T>() {}

src/test/ui/generic-associated-types/projection-bound-cycle-generic.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ LL | type Assoc = OnlySized<<T as Foo>::Item>;
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
note: required by a bound in `OnlySized`
8-
--> $DIR/projection-bound-cycle-generic.rs:28:30
8+
--> $DIR/projection-bound-cycle-generic.rs:28:18
99
|
1010
LL | struct OnlySized<T> where T: Sized { f: T }
11-
| ^^^^^ required by this bound in `OnlySized`
11+
| ^ required by this bound in `OnlySized`
1212

1313
error: aborting due to previous error
1414

src/test/ui/generic-associated-types/projection-bound-cycle.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ LL | type Assoc = OnlySized<<T as Foo>::Item>;
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
note: required by a bound in `OnlySized`
8-
--> $DIR/projection-bound-cycle.rs:30:30
8+
--> $DIR/projection-bound-cycle.rs:30:18
99
|
1010
LL | struct OnlySized<T> where T: Sized { f: T }
11-
| ^^^^^ required by this bound in `OnlySized`
11+
| ^ required by this bound in `OnlySized`
1212

1313
error: aborting due to previous error
1414

src/test/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ LL | impl Tsized for () {}
66
|
77
= help: the trait `Sized` is not implemented for `[()]`
88
note: required by a bound in `Tsized`
9-
--> $DIR/issue-61631-default-type-param-can-reference-self-in-trait.rs:17:17
9+
--> $DIR/issue-61631-default-type-param-can-reference-self-in-trait.rs:17:14
1010
|
1111
LL | trait Tsized<P: Sized = [Self]> {}
12-
| ^^^^^ required by this bound in `Tsized`
12+
| ^ required by this bound in `Tsized`
1313

1414
error: aborting due to previous error
1515

0 commit comments

Comments
 (0)