summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/new-solver/assembly
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
commit9918693037dce8aa4bb6f08741b6812923486c18 (patch)
tree21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /tests/ui/traits/new-solver/assembly
parentReleasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff)
downloadrustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz
rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/traits/new-solver/assembly')
-rw-r--r--tests/ui/traits/new-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs27
-rw-r--r--tests/ui/traits/new-solver/assembly/runaway-impl-candidate-selection.rs15
-rw-r--r--tests/ui/traits/new-solver/assembly/runaway-impl-candidate-selection.stderr16
3 files changed, 0 insertions, 58 deletions
diff --git a/tests/ui/traits/new-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs b/tests/ui/traits/new-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs
deleted file mode 100644
index 826e8c1e0..000000000
--- a/tests/ui/traits/new-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// compile-flags: -Ztrait-solver=next
-// check-pass
-
-// Checks that we do not get ambiguity by considering an impl
-// multiple times if we're able to normalize the self type.
-
-trait Trait<'a> {}
-
-impl<'a, T: 'a> Trait<'a> for T {}
-
-fn impls_trait<'a, T: Trait<'a>>() {}
-
-trait Id {
- type Assoc;
-}
-impl<T> Id for T {
- type Assoc = T;
-}
-
-fn call<T>() {
- impls_trait::<<T as Id>::Assoc>();
-}
-
-fn main() {
- call::<()>();
- impls_trait::<<<() as Id>::Assoc as Id>::Assoc>();
-}
diff --git a/tests/ui/traits/new-solver/assembly/runaway-impl-candidate-selection.rs b/tests/ui/traits/new-solver/assembly/runaway-impl-candidate-selection.rs
deleted file mode 100644
index 1dca86d36..000000000
--- a/tests/ui/traits/new-solver/assembly/runaway-impl-candidate-selection.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// compile-flags: -Ztrait-solver=next
-
-// In the new solver, we are trying to select `<?0 as Iterator>::Item: Debug`,
-// which, naively can be unified with every impl of `Debug` if we're not careful.
-// This test makes sure that we treat projections with inference var substs as
-// placeholders during fast reject.
-
-fn iter<T: Iterator>() -> <T as Iterator>::Item {
- todo!()
-}
-
-fn main() {
- println!("{:?}", iter::<_>());
- //~^ ERROR type annotations needed
-}
diff --git a/tests/ui/traits/new-solver/assembly/runaway-impl-candidate-selection.stderr b/tests/ui/traits/new-solver/assembly/runaway-impl-candidate-selection.stderr
deleted file mode 100644
index 414deb477..000000000
--- a/tests/ui/traits/new-solver/assembly/runaway-impl-candidate-selection.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-error[E0283]: type annotations needed
- --> $DIR/runaway-impl-candidate-selection.rs:13:22
- |
-LL | println!("{:?}", iter::<_>());
- | ^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `iter`
- |
- = note: cannot satisfy `_: Iterator`
-note: required by a bound in `iter`
- --> $DIR/runaway-impl-candidate-selection.rs:8:12
- |
-LL | fn iter<T: Iterator>() -> <T as Iterator>::Item {
- | ^^^^^^^^ required by this bound in `iter`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0283`.