mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
Remove const trait bound modifier hack
This commit is contained in:
parent
8f8bee4f60
commit
204e6af3ea
@ -1327,14 +1327,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
|||||||
// takes care of rejecting invalid modifier combinations and
|
// takes care of rejecting invalid modifier combinations and
|
||||||
// const trait bounds in trait object types.
|
// const trait bounds in trait object types.
|
||||||
GenericBound::Trait(ty, modifiers) => {
|
GenericBound::Trait(ty, modifiers) => {
|
||||||
// Still, don't pass along the constness here; we don't want to
|
let trait_ref = this.lower_poly_trait_ref(ty, itctx, *modifiers);
|
||||||
// synthesize any host effect args, it'd only cause problems.
|
let polarity = this.lower_trait_bound_modifiers(*modifiers);
|
||||||
let modifiers = TraitBoundModifiers {
|
|
||||||
constness: BoundConstness::Never,
|
|
||||||
..*modifiers
|
|
||||||
};
|
|
||||||
let trait_ref = this.lower_poly_trait_ref(ty, itctx, modifiers);
|
|
||||||
let polarity = this.lower_trait_bound_modifiers(modifiers);
|
|
||||||
Some((trait_ref, polarity))
|
Some((trait_ref, polarity))
|
||||||
}
|
}
|
||||||
GenericBound::Outlives(lifetime) => {
|
GenericBound::Outlives(lifetime) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user