Skip to content

Commit 96b5ea1

Browse files
committed
enable default bounds
1 parent c9d15c4 commit 96b5ea1

File tree

7 files changed

+6
-129
lines changed

7 files changed

+6
-129
lines changed

compiler/rustc_hir_analysis/src/astconv/bounds.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
4949
let tcx = self.tcx();
5050
let trait_id = tcx.lang_items().get(trait_);
5151

52-
if self.check_for_implicit_trait(trait_id, ast_bounds, self_ty_where_predicates)
53-
&& (trait_ == hir::LangItem::Sized || tcx.features().default_auto_traits)
54-
{
52+
if self.check_for_implicit_trait(trait_id, ast_bounds, self_ty_where_predicates) {
5553
// There was no `?Trait` or `!Trait` bound;
5654
// add `Trait` if it's available.
5755
bounds.push_lang_item_trait(tcx, self_ty, trait_, span);

compiler/rustc_hir_analysis/src/astconv/object_safety.rs

+5-7
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,11 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
5454
}
5555
}
5656
// FIXME: support polarity for trait objects
57-
if tcx.features().default_auto_traits {
58-
hir::lang_items::DEFAULT_TRAITS.iter().for_each(|default_trait| {
59-
if *default_trait != hir::LangItem::Sized {
60-
bounds.push_lang_item_trait(tcx, dummy_self, *default_trait, span);
61-
}
62-
});
63-
}
57+
hir::lang_items::DEFAULT_TRAITS.iter().for_each(|default_trait| {
58+
if *default_trait != hir::LangItem::Sized {
59+
bounds.push_lang_item_trait(tcx, dummy_self, *default_trait, span);
60+
}
61+
});
6462

6563
let mut trait_bounds = vec![];
6664
let mut projection_bounds = vec![];

tests/ui/issues/issue-29147-rpass.rs

-28
This file was deleted.

tests/ui/issues/issue-29147.rs

-23
This file was deleted.

tests/ui/issues/issue-29147.stderr

-17
This file was deleted.

tests/ui/traits/next-solver/cycles/coinduction/fixpoint-exponential-growth.rs

-35
This file was deleted.

tests/ui/traits/next-solver/cycles/coinduction/fixpoint-exponential-growth.stderr

-16
This file was deleted.

0 commit comments

Comments
 (0)