Skip to content
Closed
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
17 changes: 16 additions & 1 deletion compiler/rustc_next_trait_solver/src/solve/assembly/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,24 @@ where

match assemble_from {
AssembleCandidatesFrom::All => {
self.assemble_impl_candidates(goal, &mut candidates);
self.assemble_builtin_impl_candidates(goal, &mut candidates);

// UwU
if !matches!(self.typing_mode(), TypingMode::Coherence) {
if candidates.iter().any(|cand| {
matches!(
cand.source,
CandidateSource::ParamEnv(ParamEnvSource::NonGlobal)
| CandidateSource::AliasBound
| CandidateSource::BuiltinImpl(BuiltinImplSource::Trivial)
)
}) {
return candidates;
}
}

self.assemble_object_bound_candidates(goal, &mut candidates);
self.assemble_impl_candidates(goal, &mut candidates);
}
AssembleCandidatesFrom::EnvAndBounds => {}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
--> $DIR/unconstrained-projection-normalization-2.rs:14:6
|
LL | impl<T: ?Sized> Every for Thing {
| ^ unconstrained type parameter

error[E0277]: the size for values of type `T` cannot be known at compilation time
--> $DIR/unconstrained-projection-normalization-2.rs:16:18
|
Expand All @@ -28,6 +22,12 @@ help: consider relaxing the implicit `Sized` restriction
LL | type Assoc: ?Sized;
| ++++++++

error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
--> $DIR/unconstrained-projection-normalization-2.rs:14:6
|
LL | impl<T: ?Sized> Every for Thing {
| ^ unconstrained type parameter

error[E0282]: type annotations needed
--> $DIR/unconstrained-projection-normalization-2.rs:20:11
|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
--> $DIR/unconstrained-projection-normalization.rs:13:6
|
LL | impl<T: ?Sized> Every for Thing {
| ^ unconstrained type parameter

error[E0277]: the size for values of type `T` cannot be known at compilation time
--> $DIR/unconstrained-projection-normalization.rs:15:18
|
Expand All @@ -28,6 +22,12 @@ help: consider relaxing the implicit `Sized` restriction
LL | type Assoc: ?Sized;
| ++++++++

error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
--> $DIR/unconstrained-projection-normalization.rs:13:6
|
LL | impl<T: ?Sized> Every for Thing {
| ^ unconstrained type parameter

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0207, E0277.
Expand Down
Loading