Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_trait_selection/src/traits/select/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
if pred.0.has_free_regions()
|| pred.0.has_bound_regions()
|| pred.0.has_non_region_infer()
|| pred.0.has_non_region_infer()
|| pred.0.has_non_region_param()
{
Ok(EvaluatedToOkModuloRegions)
} else {
Expand Down
15 changes: 8 additions & 7 deletions tests/ui/marker_trait_attr/overlapping-impl-1-modulo-regions.rs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this mentions the old solver, is there an equivalent next solver test that this one was derived from?

Either way, should probably run on both solvers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None that I could find. I added the directives to test with both solvers.

Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
//@ known-bug: #109481
//@ check-pass
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[next] compile-flags: -Znext-solver
//
// While the `T: Copy` is always applicable when checking
// that the impl `impl<T: Copy> F for T {}` is well formed,
// the old trait solver can only approximate this by checking
// that there are no inference variables in the obligation and
// no region constraints in the evaluation result.
// Regression test for #109481 and #84917.
//
// Because of this we end up with ambiguity here.
// Overlapping marker trait impls where one has a `T: 'static` bound
// should be accepted. A bug previously made marker trait winnowing
// order-dependent, producing a spurious E0310 here.
#![feature(marker_trait_attr)]

#[marker]
Expand Down

This file was deleted.

Loading